oziko-ui-kit 0.0.96 → 0.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -88,7 +88,7 @@ const eF=e=>e&&e.enabled&&e.modifierKey,tF=(e,t)=>e&&t[e+"Key"],nF=(e,t)=>e&&!t[
|
|
|
88
88
|
* https://www.chartjs.org
|
|
89
89
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
90
90
|
* Released under the MIT license
|
|
91
|
-
*/(0,o))return NaN;return n*(r*tH+o*eH)}(o.timezone),isNaN(s)?n():oH(a+l+s,t?.in)}const uV={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},dV=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,hV=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,pV=/^([+-])(\d{2})(?::?(\d{2}))?$/;function fV(e){return e?parseInt(e):1}function mV(e){return e&&parseFloat(e.replace(",","."))||0}const gV=[31,null,31,30,31,30,31,31,30,31,30,31];function vV(e){return e%400==0||e%4==0&&e%100!=0}const yV={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};var bV;xd._date.override({_id:"date-fns",formats:function(){return yV},parse:function(e,t){if(null==e)return null;const n=typeof e;return"number"===n||e instanceof Date?e=oH(e):"string"===n&&(e="string"==typeof t?lV(e,t,new Date,this.options):cV(e,this.options)),yH(e)?e.getTime():null},format:function(e,t){return function(e,t,n){const r=cH(),o=n?.locale??r.locale??RH,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=oH(e,n?.in);if(!yH(s))throw new RangeError("Invalid time value");let l=t.match(cW).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,tW[t])(e,o.formatLong):e})).join("").match(lW).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:pW(e)};if(ZH[t])return{isToken:!0,value:e};if(t.match(hW))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&aW(i)||!n?.useAdditionalDayOfYearTokens&&iW(i))&&sW(i,t,String(e)),(0,ZH[i[0]])(s,i,o.localize,c)})).join("")}(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return sH(e,t);case"second":return function(e,t,n){return sH(e,1e3*t,n)}(e,t);case"minute":return function(e,t,n){const r=oH(e,n?.in);return r.setTime(r.getTime()+t*eH),r}(e,t);case"hour":return function(e,t,n){return sH(e,t*tH,n)}(e,t);case"day":return iH(e,t);case"week":return function(e,t,n){return iH(e,7*t,n)}(e,t);case"month":return aH(e,t);case"quarter":return function(e,t,n){return aH(e,3*t,n)}(e,t);case"year":return function(e,t,n){return aH(e,12*t,n)}(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return wH(e,t);case"second":return function(e,t,n){const r=wH(e,t)/1e3;return xH(n?.roundingMethod)(r)}(e,t);case"minute":return function(e,t,n){const r=wH(e,t)/eH;return xH(n?.roundingMethod)(r)}(e,t);case"hour":return function(e,t,n){const[r,o]=fH(n?.in,e,t),i=(+r-+o)/tH;return xH(n?.roundingMethod)(i)}(e,t);case"day":return bH(e,t);case"week":return function(e,t,n){const r=bH(e,t,n)/7;return xH(n?.roundingMethod)(r)}(e,t);case"month":return CH(e,t);case"quarter":return function(e,t,n){const r=CH(e,t,n)/3;return xH(n?.roundingMethod)(r)}(e,t);case"year":return EH(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return function(e,t){const n=oH(e,t?.in);return n.setMilliseconds(0),n}(e);case"minute":return function(e,t){const n=oH(e,t?.in);return n.setSeconds(0,0),n}(e);case"hour":return function(e,t){const n=oH(e,t?.in);return n.setMinutes(0,0,0),n}(e);case"day":return mH(e);case"week":return uH(e);case"isoWeek":return uH(e,{weekStartsOn:+n});case"month":return function(e,t){const n=oH(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e);case"quarter":return function(e,t){const n=oH(e,t?.in),r=n.getMonth(),o=r-r%3;return n.setMonth(o,1),n.setHours(0,0,0,0),n}(e);case"year":return MH(e);default:return e}},endOf:function(e,t){switch(t){case"second":return function(e,t){const n=oH(e,t?.in);return n.setMilliseconds(999),n}(e);case"minute":return function(e,t){const n=oH(e,t?.in);return n.setSeconds(59,999),n}(e);case"hour":return function(e,t){const n=oH(e,t?.in);return n.setMinutes(59,59,999),n}(e);case"day":return SH(e);case"week":return function(e,t){const n=cH(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=oH(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}(e);case"month":return kH(e);case"quarter":return function(e,t){const n=oH(e,t?.in),r=n.getMonth(),o=r-r%3+3;return n.setMonth(o,0),n.setHours(23,59,59,999),n}(e);case"year":return function(e,t){const n=oH(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e);default:return e}}}),function(e){!function(e){e.isTypeLocation=e=>"object"==typeof e&&null!==e&&"string"==typeof e.type&&Array.isArray(e.coordinates)&&2===e.coordinates.length&&e.coordinates.every((e=>"number"==typeof e))}(e.api||(e.api={})),function(e){e.timeUnitsInSeconds={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3},e.unitMapper=e=>e<=10?"second":e<=120?"minute":e<=2160?"hour":e<=43200?"day":e<=50400?"week":e<=1296e3?"month":e<=9331200?"quarter":"year",e.getDiffInMinutes=(e,t)=>Math.abs(t.getTime()-e.getTime())/6e4,e.formatDateToEnUs=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(e)}(e.time||(e.time={})),function(e){e.hexToHSL=e=>{let t=0,n=0,r=0;if(4===e.length)t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16);else{if(7!==e.length)throw new Error("Invalid HEX format");t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)}t/=255,n/=255,r/=255;const o=Math.max(t,n,r),i=Math.min(t,n,r);let a=0,s=0,l=(o+i)/2;if(o!==i){const e=o-i;switch(s=l>.5?e/(2-o-i):e/(o+i),o){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return{h:a,s:s,l:l}},e.hslToHex=(e,t,n)=>{const r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e);let o,i,a;if(0===t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=r(l,s,e+1/3),i=r(l,s,e),a=r(l,s,e-1/3)}return`#${Math.round(255*o).toString(16).padStart(2,"0")}${Math.round(255*i).toString(16).padStart(2,"0")}${Math.round(255*a).toString(16).padStart(2,"0")}`},e.hexToRgb=e=>{let t=0,n=0,r=0;return 7===e.length&&(t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),`${t}, ${n}, ${r}`}}(e.color||(e.color={}))}(bV||(bV={}));var _V="DraggableBar-module_bar__TpW1R";const xV=({x:t,y:n,maxX:r,minX:o,maxY:i,minY:a,height:l,style:c,onChange:u,onDown:d,onUp:h})=>{const p=s(null),f=s(!1),m=s(0),g=s(0),v=e=>{if(!f.current)return;const t=e.clientX-m.current,i=g.current+t;(!o||i>=o)&&(!r||i<=r)&&u?.({x:i,y:n})},y=()=>{f.current=!1,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y),h?.()};return e("div",{ref:p,onMouseDown:e=>{f.current=!0,m.current=e.clientX,g.current=t,document.addEventListener("mousemove",v),document.addEventListener("mouseup",y),d?.()},className:_V,style:{...c,left:`${t}px`,bottom:`${n}px`,height:`${l}px`}})};qh.register(vf,xf,mp,Vf,Zp,pf,qp,QF,GB);var wV=a((({dateRange:n,annotationRange:r,data:o,showArrows:i=!0,onPan:a,onClickBar:c,onChangeDateRange:d,...h})=>{const p=s(null),[f,m]=u(null),[g,v]=u(null),y=()=>{const e=bV.time.getDiffInMinutes(n.from,n.to);return bV.time.unitMapper(e)},b=e=>{const t=p?.current?.scales.x.ticks;if(!t)return;const n=.1*t.length,r=y(),o=n*bV.time.timeUnitsInSeconds[r];a?.(e,o)},_={responsive:!0,onClick:e=>{const t=p.current;if(!t)return;const n=t.getElementsAtEventForMode(e,"nearest",{intersect:!0},!1);if(!n.length)return;const r=n[0],o=t.data?.labels?.[r.index];o&&c?.(new Date(o))},scales:{x:{type:"time",time:{unit:y(),displayFormats:{[y()]:"p"}},title:{display:!1},grid:{display:!1},border:{width:3,color:"#d5e3fa"}},y:{title:{display:!1},grid:{display:!1},border:{width:0},ticks:{padding:10},offset:!0,beginAtZero:!0}},plugins:{legend:{display:!1},annotation:{annotations:r?{selectedBox:{type:"box",drawTime:"beforeDraw",xMin:r?.from.toISOString(),xMax:r?.to.toISOString(),backgroundColor:"#eaf0fd",borderWidth:0}}:{}}}};l((()=>{p.current?.scales.y.right&&(m({x:p.current?.scales.y.right,y:30}),v({x:p.current?.width,y:30}))}),[]);const x=(e,t)=>{const r=p?.current?.scales?.x,o=r?.getValueForPixel(e?.x||0);o&&d?.({...n,[t]:new Date(o)})};return e(H,{dimensionX:"fill",alignment:"top",gap:0,prefix:{children:i&&e(_s,{variant:"filled",color:"transparent",className:z$,onClick:()=>b("left"),children:e(Za,{name:"chevronLeft",size:32})})},root:{dimensionX:"fill",dimensionY:"fill",children:t(B,{className:R$,dimensionX:"fill",dimensionY:"fill",children:[e(V,{className:`${$$} ${F$}`,children:bV.time.formatDateToEnUs(n.from)}),f&&e(xV,{x:f.x,y:f.y,minX:p.current?.scales.y.right,maxX:g?.x,height:p.current?.scales.y.height,onChange:m,onUp:()=>x(f,"from")}),e(Z$,{ref:p,options:_,data:o}),g&&e(xV,{x:g.x,y:g.y,minX:f?.x,maxX:p.current?.width,height:p.current?.scales.y.height,onChange:v,onUp:()=>x(g,"to")}),e(V,{className:`${$$} ${j$}`,children:bV.time.formatDateToEnUs(n.to)})]})},suffix:{children:i&&e(_s,{variant:"filled",color:"transparent",className:z$,onClick:()=>b("right"),children:e(Za,{name:"chevronRight",size:32})})},...h})})),SV={exports:{}},kV={};function CV(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function EV(e){return function(t,n,r,o){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r,o);var i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var s=e(t,n,r,o);return o.delete(t),o.delete(n),s}}function MV(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function PV(e){return e.constructor===Object||null==e.constructor}function OV(e){return"function"==typeof e.then}function TV(e,t){return e===t||e!=e&&t!=t}var NV=Object.prototype.toString;function DV(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.areRegExpsEqual,a=e.areSetsEqual,s=(0,e.createIsNestedEqual)(l);function l(e,l,c){if(e===l)return!0;if(!e||!l||"object"!=typeof e||"object"!=typeof l)return e!=e&&l!=l;if(PV(e)&&PV(l))return o(e,l,s,c);var u=Array.isArray(e),d=Array.isArray(l);if(u||d)return u===d&&t(e,l,s,c);var h=NV.call(e);return h===NV.call(l)&&("[object Date]"===h?n(e,l,s,c):"[object RegExp]"===h?i(e,l,s,c):"[object Map]"===h?r(e,l,s,c):"[object Set]"===h?a(e,l,s,c):"[object Object]"===h||"[object Arguments]"===h?!OV(e)&&!OV(l)&&o(e,l,s,c):("[object Boolean]"===h||"[object Number]"===h||"[object String]"===h)&&TV(e.valueOf(),l.valueOf()))}return l}function AV(e,t,n,r){var o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n(e[o],t[o],o,o,e,t,r))return!1;return!0}var LV=EV(AV);function IV(e,t){return TV(e.valueOf(),t.valueOf())}function zV(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={},a=0;return e.forEach((function(s,l){if(o){var c=!1,u=0;t.forEach((function(o,d){c||i[u]||!(c=n(l,d,a,u,e,t,r)&&n(s,o,l,d,e,t,r))||(i[u]=!0),u++})),a++,o=c}})),o}var RV=EV(zV),$V=Object.prototype.hasOwnProperty;function FV(e,t,n,r){var o,i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(;a-- >0;){if("_owner"===(o=i[a])){var s=!!e.$$typeof,l=!!t.$$typeof;if((s||l)&&s!==l)return!1}if(!$V.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var jV=EV(FV);function BV(e,t){return e.source===t.source&&e.flags===t.flags}function HV(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={};return e.forEach((function(a,s){if(o){var l=!1,c=0;t.forEach((function(o,u){l||i[c]||!(l=n(a,o,s,u,e,t,r))||(i[c]=!0),c++})),o=l}})),o}var WV=EV(HV),VV=Object.freeze({areArraysEqual:AV,areDatesEqual:IV,areMapsEqual:zV,areObjectsEqual:FV,areRegExpsEqual:BV,areSetsEqual:HV,createIsNestedEqual:CV}),YV=Object.freeze({areArraysEqual:LV,areDatesEqual:IV,areMapsEqual:RV,areObjectsEqual:jV,areRegExpsEqual:BV,areSetsEqual:WV,createIsNestedEqual:CV}),XV=DV(VV);var qV=DV(MV(VV,{createIsNestedEqual:function(){return TV}}));var UV=DV(YV);var ZV=DV(MV(YV,{createIsNestedEqual:function(){return TV}}));var GV,KV=Object.freeze({__proto__:null,circularDeepEqual:function(e,t){return UV(e,t,new WeakMap)},circularShallowEqual:function(e,t){return ZV(e,t,new WeakMap)},createCustomCircularEqual:function(e){var t=DV(MV(YV,e(YV)));return function(e,n,r){return void 0===r&&(r=new WeakMap),t(e,n,r)}},createCustomEqual:function(e){return DV(MV(VV,e(VV)))},deepEqual:function(e,t){return XV(e,t,void 0)},sameValueZeroEqual:TV,shallowEqual:function(e,t){return qV(e,t,void 0)}}),JV=be(KV),QV={exports:{}};function eY(){if(GV)return QV.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return GV=1,QV.exports=t,QV.exports.clsx=t,QV.exports}var tY,nY,rY,oY={};function iY(){if(rY)return oY;rY=1,Object.defineProperty(oY,"__esModule",{value:!0}),oY.bottom=i,oY.childrenEqual=function(e,r){return(0,t.deepEqual)(n.default.Children.map(e,(e=>e?.key)),n.default.Children.map(r,(e=>e?.key)))&&(0,t.deepEqual)(n.default.Children.map(e,(e=>e?.props["data-grid"])),n.default.Children.map(r,(e=>e?.props["data-grid"])))},oY.cloneLayout=a,oY.cloneLayoutItem=l,oY.collides=c,oY.compact=u,oY.compactItem=p,oY.compactType=function(e){const{verticalCompact:t,compactType:n}=e||{};return!1===t?null:n},oY.correctBounds=f,oY.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},oY.fastRGLPropsEqual=void 0,oY.getAllCollisions=v,oY.getFirstCollision=g,oY.getLayoutItem=m,oY.getStatics=y,oY.modifyLayout=s,oY.moveElement=b,oY.moveElementAwayFromCollision=_,oY.noop=void 0,oY.perc=function(e){return 100*e+"%"},oY.resizeItemInDirection=function(e,t,n,r){const o=O[e];return o?o(t,{...t,...n},r):n},oY.setTopLeft=function(e){let{top:t,left:n,width:r,height:o}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${o}px`,position:"absolute"}},oY.setTransform=function(e){let{top:t,left:n,width:r,height:o}=e;const i=`translate(${n}px,${t}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${r}px`,height:`${o}px`,position:"absolute"}},oY.sortLayoutItems=T,oY.sortLayoutItemsByColRow=D,oY.sortLayoutItemsByRowCol=N,oY.synchronizeLayoutWithChildren=function(e,t,o,a,s){e=e||[];const c=[];n.default.Children.forEach(t,(t=>{if(null==t?.key)return;const n=m(e,String(t.key)),o=t.props["data-grid"];n&&null==o?c.push(l(n)):o?(r||A([o],"ReactGridLayout.children"),c.push(l({...o,i:t.key}))):c.push(l({w:1,h:1,x:0,y:i(c),i:String(t.key)}))}));const d=f(c,{cols:o});return s?d:u(d,a,o)},oY.validateLayout=A,oY.withLayoutItem=function(e,t,n){let r=m(e,t);return r?(r=n(l(r)),[e=s(e,r),r]):[e,null]};var e,t=JV,n=(e=o)&&e.__esModule?e:{default:e};const r="production"===process.env.NODE_ENV;function i(e){let t,n=0;for(let r=0,o=e.length;r<o;r++)t=e[r].y+e[r].h,t>n&&(n=t);return n}function a(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=l(e[n]);return t}function s(e,t){const n=Array(e.length);for(let r=0,o=e.length;r<o;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function l(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function c(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function u(e,t,n,r){const o=y(e),i=T(e,t),a=Array(e.length);for(let s=0,c=i.length;s<c;s++){let c=l(i[s]);c.static||(c=p(o,c,t,n,i,r),o.push(c)),a[e.indexOf(i[s])]=c,c.moved=!1}return a}oY.fastRGLPropsEqual=(nY||(nY=1,tY=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}),tY);const d={x:"w",y:"h"};function h(e,t,n,r){const o=d[r];t[r]+=1;for(let i=e.map((e=>e.i)).indexOf(t.i)+1;i<e.length;i++){const a=e[i];if(!a.static){if(a.y>t.y+t.h)break;c(t,a)&&h(e,a,n+t[o],r)}}t[r]=n}function p(e,t,n,r,o,a){const s="horizontal"===n;if("vertical"===n)for(t.y=Math.min(i(e),t.y);t.y>0&&!g(e,t);)t.y--;else if(s)for(;t.x>0&&!g(e,t);)t.x--;let l;for(;(l=g(e,t))&&(null!==n||!a);)if(s?h(o,t,l.x+l.w,"x"):h(o,t,l.y+l.h,"y"),s&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!g(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function f(e,t){const n=y(e);for(let r=0,o=e.length;r<o;r++){const o=e[r];if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),o.static)for(;g(n,o);)o.y++;else n.push(o)}return e}function m(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function g(e,t){for(let n=0,r=e.length;n<r;n++)if(c(e[n],t))return e[n]}function v(e,t){return e.filter((e=>c(e,t)))}function y(e){return e.filter((e=>e.static))}function b(e,t,n,r,o,i,s,l,c){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;t.i,String(n),String(r),t.x,t.y;const u=t.x,d=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;let h=T(e,s);("vertical"===s&&"number"==typeof r?d>=r:"horizontal"===s&&"number"==typeof n&&u>=n)&&(h=h.reverse());const p=v(h,t),f=p.length>0;if(f&&c)return a(e);if(f&&i)return t.i,t.x=u,t.y=d,t.moved=!1,e;for(let n=0,r=p.length;n<r;n++){const r=p[n];t.i,t.x,t.y,r.i,r.x,r.y,r.moved||(e=r.static?_(e,r,t,o,s):_(e,t,r,o,s))}return e}function _(e,t,n,r,o,i){const a="horizontal"===o,s="vertical"===o,l=t.static;if(r){r=!1;const i={x:a?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},c=g(e,i),u=c&&c.y+c.h>t.y,d=c&&t.x+t.w>c.x;if(!c)return n.i,i.x,i.y,b(e,n,a?i.x:void 0,s?i.y:void 0,r,l,o);if(u&&s)return b(e,n,void 0,t.y+1,r,l,o);if(u&&null==o)return t.y=n.y,n.y=n.y+n.h,e;if(d&&a)return b(e,t,n.x,void 0,r,l,o)}const c=a?n.x+1:void 0,u=s?n.y+1:void 0;return null==c&&null==u?e:b(e,n,a?n.x+1:void 0,s?n.y+1:void 0,r,l,o)}const x=(e,t,n,r)=>e+n>r?t:n,w=(e,t,n)=>e<0?t:n,S=e=>Math.max(0,e),k=e=>Math.max(0,e),C=(e,t,n)=>{let{left:r,height:o,width:i}=t;const a=e.top-(o-e.height);return{left:r,width:i,height:w(a,e.height,o),top:k(a)}},E=(e,t,n)=>{let{top:r,left:o,height:i,width:a}=t;return{top:r,height:i,width:x(e.left,e.width,a,n),left:S(o)}},M=(e,t,n)=>{let{top:r,height:o,width:i}=t;const a=e.left-(i-e.width);return{height:o,width:a<0?e.width:x(e.left,e.width,i,n),top:k(r),left:S(a)}},P=(e,t,n)=>{let{top:r,left:o,height:i,width:a}=t;return{width:a,left:o,height:w(r,e.height,i),top:k(r)}},O={n:C,ne:function(){return C(arguments.length<=0?void 0:arguments[0],E(...arguments))},e:E,se:function(){return P(arguments.length<=0?void 0:arguments[0],E(...arguments))},s:P,sw:function(){return P(arguments.length<=0?void 0:arguments[0],M(...arguments))},w:M,nw:function(){return C(arguments.length<=0?void 0:arguments[0],M(...arguments))}};function T(e,t){return"horizontal"===t?D(e):"vertical"===t?N(e):e}function N(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function D(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let r=0,o=e.length;r<o;r++){const o=e[r];for(let e=0;e<n.length;e++)if("number"!=typeof o[n[e]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[e]+" must be a number!")}}return oY.noop=()=>{},oY}var aY,sY={};function lY(){if(aY)return sY;function e(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-2*n[0])/o}function t(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function n(e,t,n){return Math.max(Math.min(e,n),t)}return aY=1,Object.defineProperty(sY,"__esModule",{value:!0}),sY.calcGridColWidth=e,sY.calcGridItemPosition=function(n,r,o,i,a,s){const{margin:l,containerPadding:c,rowHeight:u}=n,d=e(n),h={};s&&s.resizing?(h.width=Math.round(s.resizing.width),h.height=Math.round(s.resizing.height)):(h.width=t(i,d,l[0]),h.height=t(a,u,l[1]));s&&s.dragging?(h.top=Math.round(s.dragging.top),h.left=Math.round(s.dragging.left)):s&&s.resizing&&"number"==typeof s.resizing.top&&"number"==typeof s.resizing.left?(h.top=Math.round(s.resizing.top),h.left=Math.round(s.resizing.left)):(h.top=Math.round((u+l[1])*o+c[1]),h.left=Math.round((d+l[0])*r+c[0]));return h},sY.calcGridItemWHPx=t,sY.calcWH=function(t,r,o,i,a,s){const{margin:l,maxRows:c,cols:u,rowHeight:d}=t,h=e(t);let p=Math.round((r+l[0])/(h+l[0])),f=Math.round((o+l[1])/(d+l[1])),m=n(p,0,u-i),g=n(f,0,c-a);-1!==["sw","w","nw"].indexOf(s)&&(m=n(p,0,u));-1!==["nw","n","ne"].indexOf(s)&&(g=n(f,0,c));return{w:m,h:g}},sY.calcXY=function(t,r,o,i,a){const{margin:s,cols:l,rowHeight:c,maxRows:u}=t,d=e(t);let h=Math.round((o-s[0])/(d+s[0])),p=Math.round((r-s[1])/(c+s[1]));return h=n(h,0,l-i),p=n(p,0,u-a),{x:h,y:p}},sY.clamp=n,sY}var cY={},uY={exports:{}},dY={};function hY(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=hY(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function pY(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=hY(e))&&(r&&(r+=" "),r+=t);return r}var fY,mY=be(Object.freeze({__proto__:null,clsx:pY,default:pY})),gY={},vY={};function yY(){if(fY)return vY;return fY=1,Object.defineProperty(vY,"__esModule",{value:!0}),vY.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},vY.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},vY.int=function(e){return parseInt(e,10)},vY.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},vY.isNum=function(e){return"number"==typeof e&&!isNaN(e)},vY}var bY,_Y,xY={};function wY(){if(_Y)return gY;_Y=1,Object.defineProperty(gY,"__esModule",{value:!0}),gY.addClassName=a,gY.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},gY.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&a(e.body,"react-draggable-transparent-selection")},gY.createCSSTransform=function(e,n){const r=i(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},gY.createSVGTransform=function(e,t){return i(e,t,"")},gY.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},gY.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},gY.getTranslation=i,gY.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},gY.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},gY.matchesSelector=o,gY.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(o(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},gY.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},gY.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},gY.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},gY.removeClassName=s,gY.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},gY.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&s(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var e=yY(),t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(function(){if(bY)return xY;bY=1,Object.defineProperty(xY,"__esModule",{value:!0}),xY.browserPrefixToKey=n,xY.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},xY.default=void 0,xY.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const o=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(r in o)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in o)return e[t];return""}function n(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}return xY.default=t(),xY}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function o(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[r])&&t[r](n)}function i(e,t,n){let{x:r,y:o}=e,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(e,", ").concat(r,")")+i}return i}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function s(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return gY}var SY,kY={};function CY(){if(SY)return kY;SY=1,Object.defineProperty(kY,"__esModule",{value:!0}),kY.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},kY.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},kY.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},kY.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},kY.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=n(r);if("string"==typeof a){const{ownerDocument:n}=s,r=n.defaultView;let o;if(o="parent"===a?s.parentNode:n.querySelector(a),!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,l=r.getComputedStyle(s),c=r.getComputedStyle(i);a={left:-s.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-s.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},kY.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),s=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,s,o.props.scale)},kY.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=yY(),t=wY();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return kY}var EY,MY,PY,OY,TY={},NY={};function DY(){if(EY)return NY;return EY=1,Object.defineProperty(NY,"__esModule",{value:!0}),NY.default=function(){},NY}function AY(){if(MY)return TY;MY=1,Object.defineProperty(TY,"__esModule",{value:!0}),TY.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=l(qe()),n=l(M),r=wY(),i=CY(),a=yY(),s=l(DY());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h;class f extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const o=(0,r.getTouchIdentifier)(e);this.touchIdentifier=o;const a=(0,i.getControlPosition)(e,o,this);if(null==a)return;const{x:l,y:c}=a,u=(0,i.createCoreData)(this,l,c);(0,s.default)("DraggableCore: handleDragStart: %j",u),(0,s.default)("calling",this.props.onStart);!1!==this.props.onStart(e,u)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=c,(0,r.addEvent)(n,p.move,this.handleDrag),(0,r.addEvent)(n,p.stop,this.handleDragStop))})),u(this,"handleDrag",(e=>{const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,i.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,i.createCoreData)(this,n,r);(0,s.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),u(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:o}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=o-this.lastY||0;[e,t]=(0,i.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,o=this.lastY+t}const a=(0,i.createCoreData)(this,n,o);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(l.ownerDocument),(0,s.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,s.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(l.ownerDocument,p.move,this.handleDrag),(0,r.removeEvent)(l.ownerDocument,p.stop,this.handleDragStop))})),u(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),u(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),u(this,"onTouchStart",(e=>(p=d,this.handleDragStart(e)))),u(this,"onTouchEnd",(e=>(p=d,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,d.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,h.move,this.handleDrag),(0,r.removeEvent)(t,d.move,this.handleDrag),(0,r.removeEvent)(t,h.stop,this.handleDragStop),(0,r.removeEvent)(t,d.stop,this.handleDragStop),(0,r.removeEvent)(e,d.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}return TY.default=f,u(f,"displayName","DraggableCore"),u(f,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),u(f,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),TY}function LY(){return PY||(PY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),n=d(qe()),r=d(M),i=d(mY),a=wY(),s=CY(),l=yY(),c=d(AY()),u=d(DY());function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function p(){return p=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},p.apply(this,arguments)}function f(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,s.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:u,defaultClassNameDragged:d,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},y=null;const b=!Boolean(h)||this.state.dragging,_=h||o,x={x:(0,s.canDragX)(this)&&b?this.state.x:_.x,y:(0,s.canDragY)(this)&&b?this.state.y:_.y};this.state.isElementSVG?y=(0,a.createSVGTransform)(x,f):v=(0,a.createCSSTransform)(x,f);const w=(0,i.default)(r.props.className||"",l,{[u]:this.state.dragging,[d]:this.state.dragged});return t.createElement(c.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:w,style:{...r.props.style,...v},transform:y}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(m,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(dY)),dY}function IY(){if(OY)return uY.exports;OY=1;const{default:e,DraggableCore:t}=LY();return uY.exports=e,uY.exports.default=e,uY.exports.DraggableCore=t,uY.exports}var zY,RY={exports:{}},$Y={},FY={};function jY(){if(zY)return FY;zY=1,FY.__esModule=!0,FY.cloneElement=function(e,n){n.style&&e.props.style&&(n.style=r(r({},e.props.style),n.style));n.className&&e.props.className&&(n.className=e.props.className+" "+n.className);return t.default.cloneElement(e,n)};var e,t=(e=o)&&e.__esModule?e:{default:e};function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return FY}var BY,HY,WY={};function VY(){if(BY)return WY;BY=1,WY.__esModule=!0,WY.resizableProps=void 0;var e,t=(e=qe())&&e.__esModule?e:{default:e};IY();var n={axis:t.default.oneOf(["both","x","y","none"]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o,i=n[0];return"both"===i.axis||"y"===i.axis?(o=t.default.number).isRequired.apply(o,n):t.default.number.apply(t.default,n)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:t.default.number,width:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o,i=n[0];return"both"===i.axis||"x"===i.axis?(o=t.default.number).isRequired.apply(o,n):t.default.number.apply(t.default,n)}};return WY.resizableProps=n,WY}function YY(){if(HY)return $Y;HY=1,$Y.__esModule=!0,$Y.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=IY(),n=jY(),r=VY(),i=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return s=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},s.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var h=function(r){var o,a;function l(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=r.call.apply(r,[this].concat(n))||this).handleRefs={},e.lastHandleRect=null,e.slack=null,e}a=r,(o=l).prototype=Object.create(a.prototype),o.prototype.constructor=o,d(o,a);var u=l.prototype;return u.componentWillUnmount=function(){this.resetData()},u.resetData=function(){this.lastHandleRect=this.slack=null},u.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,o=n.maxConstraints,i=n.lockAspectRatio;if(!r&&!o&&!i)return[e,t];if(i){var a=this.props.width/this.props.height,s=e-this.props.width,l=t-this.props.height;Math.abs(s)>Math.abs(l*a)?t=e/a:e=t*a}var c=e,u=t,d=this.slack||[0,0],h=d[0],p=d[1];return e+=h,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),o&&(e=Math.min(o[0],e),t=Math.min(o[1],t)),this.slack=[h+(c-e),p+(u-t)],[e,t]},u.resizeHandler=function(e,t){var n=this;return function(r,o){var i=o.node,a=o.deltaX,s=o.deltaY;"onResizeStart"===e&&n.resetData();var l=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,c=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(l||c){var u=t[0],d=t[t.length-1],h=i.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===d)a+=h.left-n.lastHandleRect.left;if("n"===u)s+=h.top-n.lastHandleRect.top}n.lastHandleRect=h,"w"===d&&(a=-a),"n"===u&&(s=-s);var p=n.props.width+(l?a/n.props.transformScale:0),f=n.props.height+(c?s/n.props.transformScale:0),m=n.runConstraints(p,f);p=m[0],f=m[1];var g=p!==n.props.width||f!==n.props.height,v="function"==typeof n.props[e]?n.props[e]:null;v&&!("onResize"===e&&!g)&&(null==r.persist||r.persist(),v(r,{node:i,size:{width:p,height:f},handle:t})),"onResizeStop"===e&&n.resetData()}}},u.renderResizeHandle=function(t,n){var r=this.props.handle;if(!r)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:n});if("function"==typeof r)return r(t,n);var o=c({ref:n},"string"==typeof r.type?{}:{handleAxis:t});return e.cloneElement(r,o)},u.render=function(){var r=this,o=this.props,a=o.children,l=o.className,u=o.draggableOpts;o.width,o.height,o.handle,o.handleSize,o.lockAspectRatio,o.axis,o.minConstraints,o.maxConstraints,o.onResize,o.onResizeStop,o.onResizeStart;var d=o.resizeHandles;o.transformScale;var h=function(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}(o,i);return(0,n.cloneElement)(a,c(c({},h),{},{className:(l?l+" ":"")+"react-resizable",children:[].concat(a.props.children,d.map((function(n){var o,i=null!=(o=r.handleRefs[n])?o:r.handleRefs[n]=e.createRef();return e.createElement(t.DraggableCore,s({},u,{nodeRef:i,key:"resizableHandle-"+n,onStop:r.resizeHandler("onResizeStop",n),onStart:r.resizeHandler("onResizeStart",n),onDrag:r.resizeHandler("onResize",n)}),r.renderResizeHandle(n,i))})))}))},l}(e.Component);return $Y.default=h,h.propTypes=r.resizableProps,h.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},$Y}var XY,qY,UY={};function ZY(){if(XY)return UY;XY=1,UY.__esModule=!0,UY.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=a(qe()),n=a(YY()),r=VY(),i=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function a(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(){return l=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},l.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var p=function(t){var r,o;function a(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).state={width:e.props.width,height:e.props.height,propsWidth:e.props.width,propsHeight:e.props.height},e.onResize=function(t,n){var r=n.size;e.props.onResize?(null==t.persist||t.persist(),e.setState(r,(function(){return e.props.onResize&&e.props.onResize(t,n)}))):e.setState(r)},e}return o=t,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,h(r,o),a.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},a.prototype.render=function(){var t=this.props,r=t.handle,o=t.handleSize;t.onResize;var a=t.onResizeStart,s=t.onResizeStop,c=t.draggableOpts,d=t.minConstraints,h=t.maxConstraints,p=t.lockAspectRatio,f=t.axis;t.width,t.height;var m=t.resizeHandles,g=t.style,v=t.transformScale,y=function(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}(t,i);return e.createElement(n.default,{axis:f,draggableOpts:c,handle:r,handleSize:o,height:this.state.height,lockAspectRatio:p,maxConstraints:h,minConstraints:d,onResizeStart:a,onResize:this.onResize,onResizeStop:s,resizeHandles:m,transformScale:v,width:this.state.width},e.createElement("div",l({},y,{style:u(u({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},a}(e.Component);return UY.default=p,p.propTypes=u(u({},r.resizableProps),{},{children:t.default.element}),UY}var GY,KY,JY,QY={};function eX(){if(GY)return QY;GY=1,Object.defineProperty(QY,"__esModule",{value:!0}),QY.resizeHandleType=QY.resizeHandleAxesType=QY.default=void 0;var e=n(qe()),t=n(o);function n(e){return e&&e.__esModule?e:{default:e}}const r=QY.resizeHandleAxesType=e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),i=QY.resizeHandleType=e.default.oneOfType([e.default.node,e.default.func]);return QY.default={className:e.default.string,style:e.default.object,width:e.default.number,autoSize:e.default.bool,cols:e.default.number,draggableCancel:e.default.string,draggableHandle:e.default.string,verticalCompact:function(e){!1===e.verticalCompact&&"production"!==process.env.NODE_ENV&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:e.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&iY().validateLayout(t,"layout")},margin:e.default.arrayOf(e.default.number),containerPadding:e.default.arrayOf(e.default.number),rowHeight:e.default.number,maxRows:e.default.number,isBounded:e.default.bool,isDraggable:e.default.bool,isResizable:e.default.bool,allowOverlap:e.default.bool,preventCollision:e.default.bool,useCSSTransforms:e.default.bool,transformScale:e.default.number,isDroppable:e.default.bool,resizeHandles:r,resizeHandle:i,onLayoutChange:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onDragStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,onResizeStop:e.default.func,onDrop:e.default.func,droppingItem:e.default.shape({i:e.default.string.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired}),children:function(e,n){const r=e[n],o={};t.default.Children.forEach(r,(function(e){if(null!=e?.key){if(o[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');o[e.key]=!0}}))},innerRef:e.default.any},QY}function tX(){if(KY)return cY;KY=1,Object.defineProperty(cY,"__esModule",{value:!0}),cY.default=void 0;var e=c(o),t=c(qe()),n=IY(),r=(qY||(qY=1,RY.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},RY.exports.Resizable=YY().default,RY.exports.ResizableBox=ZY().default),RY.exports),i=iY(),a=lY(),s=eX(),l=c(eY());function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends e.default.Component{constructor(){super(...arguments),u(this,"state",{resizing:null,dragging:null,className:""}),u(this,"elementRef",e.default.createRef()),u(this,"onDragStart",((e,t)=>{let{node:n}=t;const{onDragStart:r,transformScale:o}=this.props;if(!r)return;const i={top:0,left:0},{offsetParent:s}=n;if(!s)return;const l=s.getBoundingClientRect(),c=n.getBoundingClientRect(),u=c.left/o,d=l.left/o,h=c.top/o,p=l.top/o;i.left=u-d+s.scrollLeft,i.top=h-p+s.scrollTop,this.setState({dragging:i});const{x:f,y:m}=(0,a.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return r.call(this,this.props.i,f,m,{e:e,node:n,newPosition:i})})),u(this,"onDrag",((e,t)=>{let{node:n,deltaX:r,deltaY:o}=t;const{onDrag:i}=this.props;if(!i)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let s=this.state.dragging.top+o,l=this.state.dragging.left+r;const{isBounded:c,i:u,w:d,h:h,containerWidth:p}=this.props,f=this.getPositionParams();if(c){const{offsetParent:e}=n;if(e){const{margin:t,rowHeight:n,containerPadding:r}=this.props,o=e.clientHeight-(0,a.calcGridItemWHPx)(h,n,t[1]);s=(0,a.clamp)(s-r[1],0,o);const i=(0,a.calcGridColWidth)(f),c=p-(0,a.calcGridItemWHPx)(d,i,t[0]);l=(0,a.clamp)(l-r[0],0,c)}}const m={top:s,left:l};this.setState({dragging:m});const{containerPadding:g}=this.props,{x:v,y:y}=(0,a.calcXY)(f,s-g[1],l-g[0],d,h);return i.call(this,u,v,y,{e:e,node:n,newPosition:m})})),u(this,"onDragStop",((e,t)=>{let{node:n}=t;const{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:o,h:i,i:s,containerPadding:l}=this.props,{left:c,top:u}=this.state.dragging,d={top:u,left:c};this.setState({dragging:null});const{x:h,y:p}=(0,a.calcXY)(this.getPositionParams(),u-l[1],c-l[0],o,i);return r.call(this,s,h,p,{e:e,node:n,newPosition:d})})),u(this,"onResizeStop",((e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStop"))),u(this,"onResizeStart",((e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStart"))),u(this,"onResize",((e,t,n)=>this.onResizeHandler(e,t,n,"onResize")))}shouldComponentUpdate(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;const n=(0,a.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,a.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,i.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const n=this.elementRef.current;if(!n)return;const r=e.droppingPosition||{left:0,top:0},{dragging:o}=this.state,i=o&&t.left!==r.left||t.top!==r.top;if(o){if(i){const e=t.left-o.left,r=t.top-o.top;this.onDrag(t.e,{node:n,deltaX:e,deltaY:r})}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}getPositionParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:n,useCSSTransforms:r}=this.props;let o;return r?o=(0,i.setTransform)(e):(o=(0,i.setTopLeft)(e),t&&(o.left=(0,i.perc)(e.left/n),o.width=(0,i.perc)(e.width/n))),o}mixinDraggable(t,r){return e.default.createElement(n.DraggableCore,{disabled:!r,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},t)}curryResizeHandler(e,t){return(n,r)=>t(n,r,e)}mixinResizable(t,n,o){const{cols:i,minW:s,minH:l,maxW:c,maxH:u,transformScale:d,resizeHandles:h,resizeHandle:p}=this.props,f=this.getPositionParams(),m=(0,a.calcGridItemPosition)(f,0,0,i,0).width,g=(0,a.calcGridItemPosition)(f,0,0,s,l),v=(0,a.calcGridItemPosition)(f,0,0,c,u),y=[g.width,g.height],b=[Math.min(v.width,m),Math.min(v.height,1/0)];return e.default.createElement(r.Resizable,{draggableOpts:{disabled:!o},className:o?void 0:"react-resizable-hide",width:n.width,height:n.height,minConstraints:y,maxConstraints:b,onResizeStop:this.curryResizeHandler(n,this.onResizeStop),onResizeStart:this.curryResizeHandler(n,this.onResizeStart),onResize:this.curryResizeHandler(n,this.onResize),transformScale:d,resizeHandles:h,handle:p},t)}onResizeHandler(e,t,n,r){let{node:o,size:s,handle:l}=t;const c=this.props[r];if(!c)return;const{x:u,y:d,i:h,maxH:p,minH:f,containerWidth:m}=this.props,{minW:g,maxW:v}=this.props;let y=s;o&&(y=(0,i.resizeItemInDirection)(l,n,s,m),this.setState({resizing:"onResizeStop"===r?null:y}));let{w:b,h:_}=(0,a.calcWH)(this.getPositionParams(),y.width,y.height,u,d,l);b=(0,a.clamp)(b,Math.max(g,1),v),_=(0,a.clamp)(_,f,p),c.call(this,h,b,_,{e:e,node:o,size:y,handle:l})}render(){const{x:t,y:n,w:r,h:o,isDraggable:i,isResizable:s,droppingPosition:c,useCSSTransforms:u}=this.props,d=(0,a.calcGridItemPosition)(this.getPositionParams(),t,n,r,o,this.state),h=e.default.Children.only(this.props.children);let p=e.default.cloneElement(h,{ref:this.elementRef,className:(0,l.default)("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":i,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(c),cssTransforms:u}),style:{...this.props.style,...h.props.style,...this.createStyle(d)}});return p=this.mixinResizable(p,d,s),p=this.mixinDraggable(p,i),p}}return cY.default=d,u(d,"propTypes",{children:t.default.element,cols:t.default.number.isRequired,containerWidth:t.default.number.isRequired,rowHeight:t.default.number.isRequired,margin:t.default.array.isRequired,maxRows:t.default.number.isRequired,containerPadding:t.default.array.isRequired,x:t.default.number.isRequired,y:t.default.number.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired,minW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:t.default.string.isRequired,resizeHandles:s.resizeHandleAxesType,resizeHandle:s.resizeHandleType,onDragStop:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,isDraggable:t.default.bool.isRequired,isResizable:t.default.bool.isRequired,isBounded:t.default.bool.isRequired,static:t.default.bool,useCSSTransforms:t.default.bool.isRequired,transformScale:t.default.number,className:t.default.string,handle:t.default.string,cancel:t.default.string,droppingPosition:t.default.shape({e:t.default.object.isRequired,left:t.default.number.isRequired,top:t.default.number.isRequired})}),u(d,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),cY}function nX(){if(JY)return kV;JY=1,Object.defineProperty(kV,"__esModule",{value:!0}),kV.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=JV,n=l(eY()),r=iY(),i=lY(),a=l(tX()),s=l(eX());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d="react-grid-layout";let h=!1;try{h=/firefox/i.test(navigator.userAgent)}catch(e){}class p extends e.Component{constructor(){super(...arguments),u(this,"state",{activeDrag:null,layout:(0,r.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,r.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),u(this,"dragEnterCounter",0),u(this,"onDragStart",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s}=this.state,l=(0,r.getLayoutItem)(s,e);if(!l)return;const c={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,r.cloneLayoutItem)(l),oldLayout:s,activeDrag:c}),this.props.onDragStart(s,l,l,null,i,a)})),u(this,"onDrag",((e,t,n,o)=>{let{e:i,node:a}=o;const{oldDragItem:s}=this.state;let{layout:l}=this.state;const{cols:c,allowOverlap:u,preventCollision:d}=this.props,h=(0,r.getLayoutItem)(l,e);if(!h)return;const p={w:h.w,h:h.h,x:h.x,y:h.y,placeholder:!0,i:e};l=(0,r.moveElement)(l,h,t,n,!0,d,(0,r.compactType)(this.props),c,u),this.props.onDrag(l,s,h,p,i,a),this.setState({layout:u?l:(0,r.compact)(l,(0,r.compactType)(this.props),c),activeDrag:p})})),u(this,"onDragStop",((e,t,n,o)=>{let{e:i,node:a}=o;if(!this.state.activeDrag)return;const{oldDragItem:s}=this.state;let{layout:l}=this.state;const{cols:c,preventCollision:u,allowOverlap:d}=this.props,h=(0,r.getLayoutItem)(l,e);if(!h)return;l=(0,r.moveElement)(l,h,t,n,!0,u,(0,r.compactType)(this.props),c,d);const p=d?l:(0,r.compact)(l,(0,r.compactType)(this.props),c);this.props.onDragStop(p,s,h,null,i,a);const{oldLayout:f}=this.state;this.setState({activeDrag:null,layout:p,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(p,f)})),u(this,"onResizeStart",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s}=this.state,l=(0,r.getLayoutItem)(s,e);l&&(this.setState({oldResizeItem:(0,r.cloneLayoutItem)(l),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,l,l,null,i,a))})),u(this,"onResize",((e,t,n,o)=>{let{e:i,node:a,size:s,handle:l}=o;const{oldResizeItem:c}=this.state,{layout:u}=this.state,{cols:d,preventCollision:h,allowOverlap:p}=this.props;let f,m,g,v=!1;const[y,b]=(0,r.withLayoutItem)(u,e,(e=>{let o;if(m=e.x,g=e.y,-1!==["sw","w","nw","n","ne"].indexOf(l)&&(-1!==["sw","nw","w"].indexOf(l)&&(m=e.x+(e.w-t),t=e.x!==m&&m<0?e.w:t,m=m<0?0:m),-1!==["ne","n","nw"].indexOf(l)&&(g=e.y+(e.h-n),n=e.y!==g&&g<0?e.h:n,g=g<0?0:g),v=!0),h&&!p){o=(0,r.getAllCollisions)(u,{...e,w:t,h:n,x:m,y:g}).filter((t=>t.i!==e.i)).length>0,o&&(g=e.y,n=e.h,m=e.x,t=e.w,v=!1)}return e.w=t,e.h=n,e}));if(!b)return;if(f=y,v){const e=!0;f=(0,r.moveElement)(y,b,m,g,e,this.props.preventCollision,(0,r.compactType)(this.props),d,p)}const _={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(f,c,b,_,i,a),this.setState({layout:p?f:(0,r.compact)(f,(0,r.compactType)(this.props),d),activeDrag:_})})),u(this,"onResizeStop",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s,oldResizeItem:l}=this.state,{cols:c,allowOverlap:u}=this.props,d=(0,r.getLayoutItem)(s,e),h=u?s:(0,r.compact)(s,(0,r.compactType)(this.props),c);this.props.onResizeStop(h,l,d,null,i,a);const{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(h,p)})),u(this,"onDragOver",(t=>{if(t.preventDefault(),t.stopPropagation(),h&&!t.nativeEvent.target?.classList.contains(d))return!1;const{droppingItem:n,onDropDragOver:r,margin:o,cols:a,rowHeight:s,maxRows:l,width:c,containerPadding:u,transformScale:p}=this.props,f=r?.(t);if(!1===f)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const m={...n,...f},{layout:g}=this.state,v=t.currentTarget.getBoundingClientRect(),y=t.clientX-v.left,b=t.clientY-v.top,_={left:y/p,top:b/p,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:e,top:t}=this.state.droppingPosition;(e!=y||t!=b)&&this.setState({droppingPosition:_})}}else{const t={cols:a,margin:o,maxRows:l,rowHeight:s,containerWidth:c,containerPadding:u||o},n=(0,i.calcXY)(t,b,y,m.w,m.h);this.setState({droppingDOMNode:e.createElement("div",{key:m.i}),droppingPosition:_,layout:[...g,{...m,x:n.x,y:n.y,static:!1,isDraggable:!0}]})}})),u(this,"removeDroppingPlaceholder",(()=>{const{droppingItem:e,cols:t}=this.props,{layout:n}=this.state,o=(0,r.compact)(n.filter((t=>t.i!==e.i)),(0,r.compactType)(this.props),t,this.props.allowOverlap);this.setState({layout:o,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),u(this,"onDragLeave",(e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,0===this.dragEnterCounter&&this.removeDroppingPlaceholder()})),u(this,"onDragEnter",(e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++})),u(this,"onDrop",(e=>{e.preventDefault(),e.stopPropagation();const{droppingItem:t}=this.props,{layout:n}=this.state,r=n.find((e=>e.i===t.i));this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,e)}))}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,n){let o;if(n.activeDrag)return null;if((0,t.deepEqual)(e.layout,n.propsLayout)&&e.compactType===n.compactType?(0,r.childrenEqual)(e.children,n.children)||(o=n.layout):o=e.layout,o){return{layout:(0,r.synchronizeLayoutWithChildren)(o,e.children,e.cols,(0,r.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}}return null}shouldComponentUpdate(e,n){return this.props.children!==e.children||!(0,r.fastRGLPropsEqual)(this.props,e,t.deepEqual)||this.state.activeDrag!==n.activeDrag||this.state.mounted!==n.mounted||this.state.droppingPosition!==n.droppingPosition}componentDidUpdate(e,t){if(!this.state.activeDrag){const e=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(e,n)}}containerHeight(){if(!this.props.autoSize)return;const e=(0,r.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}onLayoutMaybeChanged(e,n){n||(n=this.state.layout),(0,t.deepEqual)(n,e)||this.props.onLayoutChange(e)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:n,cols:r,margin:o,containerPadding:i,rowHeight:s,maxRows:l,useCSSTransforms:c,transformScale:u}=this.props;return e.createElement(a.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder "+(this.state.resizing?"placeholder-resizing":""),containerWidth:n,cols:r,margin:o,containerPadding:i||o,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:u},e.createElement("div",null))}processGridItem(t,n){if(!t||!t.key)return;const o=(0,r.getLayoutItem)(this.state.layout,String(t.key));if(!o)return null;const{width:i,cols:s,margin:l,containerPadding:c,rowHeight:u,maxRows:d,isDraggable:h,isResizable:p,isBounded:f,useCSSTransforms:m,transformScale:g,draggableCancel:v,draggableHandle:y,resizeHandles:b,resizeHandle:_}=this.props,{mounted:x,droppingPosition:w}=this.state,S="boolean"==typeof o.isDraggable?o.isDraggable:!o.static&&h,k="boolean"==typeof o.isResizable?o.isResizable:!o.static&&p,C=o.resizeHandles||b,E=S&&f&&!1!==o.isBounded;return e.createElement(a.default,{containerWidth:i,cols:s,margin:l,containerPadding:c||l,maxRows:d,rowHeight:u,cancel:v,handle:y,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:S,isResizable:k,isBounded:E,useCSSTransforms:m&&x,usePercentages:!x,transformScale:g,w:o.w,h:o.h,x:o.x,y:o.y,i:o.i,minH:o.minH,minW:o.minW,maxH:o.maxH,maxW:o.maxW,static:o.static,droppingPosition:n?w:void 0,resizeHandles:C,resizeHandle:_},t)}render(){const{className:t,style:o,isDroppable:i,innerRef:a}=this.props,s=(0,n.default)(d,t),l={height:this.containerHeight(),...o};return e.createElement("div",{ref:a,className:s,style:l,onDrop:i?this.onDrop:r.noop,onDragLeave:i?this.onDragLeave:r.noop,onDragEnter:i?this.onDragEnter:r.noop,onDragOver:i?this.onDragOver:r.noop},e.Children.map(this.props.children,(e=>this.processGridItem(e))),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}return kV.default=p,u(p,"displayName","ReactGridLayout"),u(p,"propTypes",s.default),u(p,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:r.noop,onDragStart:r.noop,onDrag:r.noop,onDragStop:r.noop,onResizeStart:r.noop,onResize:r.noop,onResizeStop:r.noop,onDrop:r.noop,onDropDragOver:r.noop}),kV}var rX,oX,iX={},aX={};function sX(){if(rX)return aX;rX=1,Object.defineProperty(aX,"__esModule",{value:!0}),aX.findOrGenerateResponsiveLayout=function(n,r,o,i,a,s){if(n[o])return(0,e.cloneLayout)(n[o]);let l=n[i];const c=t(r),u=c.slice(c.indexOf(o));for(let e=0,t=u.length;e<t;e++){const t=u[e];if(n[t]){l=n[t];break}}return l=(0,e.cloneLayout)(l||[]),(0,e.compact)((0,e.correctBounds)(l,{cols:a}),s,a)},aX.getBreakpointFromWidth=function(e,n){const r=t(e);let o=r[0];for(let t=1,i=r.length;t<i;t++){const i=r[t];n>e[i]&&(o=i)}return o},aX.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},aX.sortBreakpoints=t;var e=iY();function t(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}return aX}function lX(){if(oX)return iX;oX=1,Object.defineProperty(iX,"__esModule",{value:!0}),iX.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=s(qe()),n=JV,r=iY(),i=sX(),a=s(nX());function s(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function c(){return c=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},c.apply(this,arguments)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=e=>Object.prototype.toString.call(e);function h(e,t){return null==e?null:Array.isArray(e)?e:e[t]}class p extends e.Component{constructor(){super(...arguments),u(this,"state",this.generateInitialState()),u(this,"onLayoutChange",(e=>{this.props.onLayoutChange(e,{...this.props.layouts,[this.state.breakpoint]:e})}))}generateInitialState(){const{width:e,breakpoints:t,layouts:n,cols:r}=this.props,o=(0,i.getBreakpointFromWidth)(t,e),a=(0,i.getColsFromBreakpoint)(o,r),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,i.findOrGenerateResponsiveLayout)(n,t,o,o,a,s),breakpoint:o,cols:a}}static getDerivedStateFromProps(e,t){if(!(0,n.deepEqual)(e.layouts,t.layouts)){const{breakpoint:n,cols:r}=t;return{layout:(0,i.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,n.deepEqual)(this.props.breakpoints,e.breakpoints)&&(0,n.deepEqual)(this.props.cols,e.cols)||this.onWidthChange(e)}onWidthChange(e){const{breakpoints:t,cols:n,layouts:o,compactType:a}=this.props,s=this.props.breakpoint||(0,i.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),l=this.state.breakpoint,c=(0,i.getColsFromBreakpoint)(s,n),u={...o};if(l!==s||e.breakpoints!==t||e.cols!==n){l in u||(u[l]=(0,r.cloneLayout)(this.state.layout));let e=(0,i.findOrGenerateResponsiveLayout)(u,t,s,l,c,a);e=(0,r.synchronizeLayoutWithChildren)(e,this.props.children,c,a,this.props.allowOverlap),u[s]=e,this.props.onLayoutChange(e,u),this.props.onBreakpointChange(s,c),this.setState({breakpoint:s,layout:e,cols:c})}const d=h(this.props.margin,s),p=h(this.props.containerPadding,s);this.props.onWidthChange(this.props.width,d,c,p)}render(){const{breakpoint:t,breakpoints:n,cols:r,layouts:o,margin:i,containerPadding:s,onBreakpointChange:l,onLayoutChange:u,onWidthChange:d,...p}=this.props;return e.createElement(a.default,c({},p,{margin:h(i,this.state.breakpoint),containerPadding:h(s,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}return iX.default=p,u(p,"propTypes",{breakpoint:t.default.string,breakpoints:t.default.object,allowOverlap:t.default.bool,cols:t.default.object,margin:t.default.oneOfType([t.default.array,t.default.object]),containerPadding:t.default.oneOfType([t.default.array,t.default.object]),layouts(e,t){if("[object Object]"!==d(e[t]))throw new Error("Layout property must be an object. Received: "+d(e[t]));Object.keys(e[t]).forEach((t=>{if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,r.validateLayout)(e.layouts[t],"layouts."+t)}))},width:t.default.number.isRequired,onBreakpointChange:t.default.func,onLayoutChange:t.default.func,onWidthChange:t.default.func}),u(p,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:r.noop,onLayoutChange:r.noop,onWidthChange:r.noop}),iX}var cX,uX,dX={},hX=be(gv);function pX(){if(cX)return dX;cX=1,Object.defineProperty(dX,"__esModule",{value:!0}),dX.default=function(o){var i;return i=class extends e.Component{constructor(){super(...arguments),l(this,"state",{width:1280}),l(this,"elementRef",e.createRef()),l(this,"mounted",!1),l(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new n.default((e=>{if(this.elementRef.current instanceof HTMLElement){const t=e[0].contentRect.width;this.setState({width:t})}}));const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.observe(e)}componentWillUnmount(){this.mounted=!1;const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.unobserve(e),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:t,...n}=this.props;return t&&!this.mounted?e.createElement("div",{className:(0,r.default)(this.props.className,c),style:this.props.style,ref:this.elementRef}):e.createElement(o,s({innerRef:this.elementRef},n,this.state))}},l(i,"defaultProps",{measureBeforeMount:!1}),l(i,"propTypes",{measureBeforeMount:t.default.bool}),i};var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=i(qe()),n=i(hX),r=i(eY());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return s=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},s.apply(this,arguments)}function l(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c="react-grid-layout";return dX}var fX=ye((uX||(uX=1,function(e){e.exports=nX().default,e.exports.utils=iY(),e.exports.calculateUtils=lY(),e.exports.Responsive=lX().default,e.exports.Responsive.utils=sX(),e.exports.WidthProvider=pX().default}(SV)),SV.exports)),mX={layoutContainer:"DashboardLayout-module_layoutContainer__wOGEu",addNewComponent:"DashboardLayout-module_addNewComponent__Gan9z",plusIcon:"DashboardLayout-module_plusIcon__yQQHP",gridItem:"DashboardLayout-module_gridItem__NtXI-"};const gX=({dashboards:n})=>{const[r,i]=o.useState(window.innerWidth),[a,s]=o.useState([]),[c,u]=o.useState(n||[]);l((()=>{const e=()=>i(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),l((()=>{const e=JSON.parse(localStorage.getItem("dashboardLayout")||"[]"),t=c.map((e=>e.id)),n=e.filter((e=>t.includes(e.i)));if(console.log("existDashboardItems",n),n.length>0)return s(n)}),[c]);const d=e=>{localStorage.setItem("dashboardLayout",JSON.stringify(e))};return e("div",{className:mX.layoutContainer,children:e(fX,{className:mX.gridLayout,layout:a,width:r,cols:8,onLayoutChange:e=>{d(e)},draggableHandle:".dragHandle",children:a.map((n=>e("div",{className:mX.gridItem,onClick:()=>{console.log(n)},children:"addNewComponent"!==n.i?e(ag,{chartProps:{type:"bar",data:c.find((e=>e.id===n.i))?.data,options:c.find((e=>e.id===n.i))?.options},headerProps:{content:"Title",suffix:e(Za,{name:"cog",className:mX.dragHandle})}}):t(B,{className:mX.addNewComponent,direction:"vertical",alignment:"center",dimensionX:"fill",gap:15,dimensionY:"fill",children:[e(Za,{name:"plus",className:mX.plusIcon}),e(V,{size:"xlarge",children:" New Component"})]})},n.i)))})})};var vX="MenuGroup-module_container__VQaFb",yX="MenuGroup-module_menuSection__Nfvar",bX="MenuGroup-module_label__5skIC",_X="MenuGroup-module_noDivider__7fIo3";var xX=a((({options:n={},showDivider:r=!0,className:o,...i})=>e(B,{dimensionX:160,direction:"vertical",gap:0,alignment:"leftCenter",className:`${vX} ${o||""}`,...i,children:Object.entries(n).map((([n,o],i,a)=>{const{label:s,value:l,className:c,...u}=o;return t(B,{dimensionX:"fill",direction:"vertical",gap:10,alignment:"leftCenter",...u,className:`${yX} ${r&&i!==a.length-1?"":_X} ${o.className||""}`,children:[s&&e(V,{className:bX,children:s}),l]},n)}))}))),wX="Table-module_table__7BBwk",SX="Table-module_fixedColumns__fjVOb",kX="Table-module_scrollableColumns__PzDZ9",CX="Table-module_column__daVNe",EX="Table-module_header__w6wP3",MX="Table-module_border__ise22",PX="Table-module_cell__K--55",OX="Table-module_resizer__PTgL3",TX="Table-module_focusedCell__-1YzJ";var NX=a((({columns:n,data:r,saveToLocalStorage:o={id:"table",save:!1},fixedColumns:i=[],noResizeableColumns:a=[],onCellEnter:s,onCellEscape:c,tableClassName:d="",columnClassName:h="",headerClassName:p="",cellClassName:f=""})=>{const[m,g]=u((()=>n.map((e=>{const t=o?.save?localStorage.getItem(`${o?.id}-${e.key}`):null;return{...e,width:t||e.width||"300px"}})))),[v,y]=u(null),b=(e,t)=>{g((n=>n.map((n=>n.key===e?{...n,width:t}:n))))};l((()=>{((e,t)=>{e.forEach((e=>{localStorage.setItem(`${t}-${e.key}`,e.width)}))})(m,o.id)}),[m,o.save]);return l((()=>{const e=e=>{if(!v)return;const t=n.findIndex((e=>e.key===v?.column)),o=v?.row;switch(e.key){case"ArrowRight":t<n.length-1&&(e.preventDefault(),y({column:n[t+1].key,row:o}));break;case"ArrowLeft":t>0&&(e.preventDefault(),y({column:n[t-1].key,row:o}));break;case"ArrowDown":o<r.length-1&&(e.preventDefault(),y({column:v?.column,row:o+1}));break;case"ArrowUp":o>0&&(e.preventDefault(),y({column:v?.column,row:o-1}));break;case"Enter":e.preventDefault(),s?.(v.column,v.row,e);break;case"Escape":e.preventDefault(),c?.(v.column,v.row,e)}};return v&&window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[v,n,r,s,c]),e("div",{className:`${wX} ${d}`,children:m.map(((n,o)=>{const s=i.includes(n.key),l=s?i.slice(0,i.indexOf(n.key)).reduce(((e,t)=>e+parseInt(m.find((e=>e.key===t)).width)),0)+"px":"unset";return t(DX,{columnKey:n.key,className:`${CX} ${s?SX:kX} ${h}`,style:{left:l},width:n.width,updateColumnWidth:b,noResizeable:a.includes(n.key),children:[e(DX.Header,{className:p,children:n.header}),r.map(((t,r)=>e(DX.Cell,{focused:v?.column===n.key&&v?.row===r,onClick:()=>((e,t)=>{y({column:e,row:t})})(n.key,r),"data-cell-key":`${n.key}-${r}`,className:f,children:t[n.key]},r)))]},n.key)}))})}));const DX=a((({columnKey:n,children:r,ref:o,className:i,width:a,updateColumnWidth:c,noResizeable:d,style:h})=>{const[p,f]=u(a),[m,g]=u(!1),v=s(null);return l((()=>{const e=e=>{if(m&&v.current){const t=e.clientX-v.current.getBoundingClientRect().left;f(`${t}px`)}},t=()=>{if(g(!1),v.current){const e=v.current.style.minWidth;c?.(n,e)}};return m&&(window.addEventListener("mousemove",e),window.addEventListener("mouseup",t)),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}}),[m,n,c]),t("div",{ref:v,className:i,style:{...h,minWidth:p},children:[r,!d&&e("div",{className:OX,onMouseDown:()=>g(!0)})]})}));DX.Header=({border:t=!0,headerAlign:n="center",children:r,...o})=>e(B,{dimensionX:"fill",alignment:{left:"leftTop",center:"center",right:"rightTop"}[n],...o,className:`${EX} ${t?MX:""} ${o.className||""}`,children:r}),DX.Cell=({children:t,focused:n,...r})=>e("div",{...r,className:`${PX} ${n?TX:""} ${r.className||""}`,children:t});var AX={notificationContainer:"Notification-module_notificationContainer__AQGHi",notificationItem:"Notification-module_notificationItem__a97Y1",enter:"Notification-module_enter__QJYI5",exit:"Notification-module_exit__7-eTw",notificationIcon:"Notification-module_notificationIcon__GfxMq",spin:"Notification-module_spin__NnI0P",notificationContent:"Notification-module_notificationContent__dL0yz",notificationMessage:"Notification-module_notificationMessage__9YbKE",notificationDescription:"Notification-module_notificationDescription__1r9AU",notificationAction:"Notification-module_notificationAction__SrLVH",notificationClose:"Notification-module_notificationClose__1xqz9",notificationProgressContainer:"Notification-module_notificationProgressContainer__FXOGc",notificationProgress:"Notification-module_notificationProgress__lWMoZ",notificationPortal:"Notification-module_notificationPortal__hmII4"};function LX({notification:n,onClose:r,stackGap:i,rtl:a,duration:d,style:h,animationDuration:p=300}){const[f,m]=u(!1),[g,v]=u(!1),[y,b]=u(!1),[_,x]=u(0),w=s(null),S=s(null),k=s(null),C=s(0),E=s(!1),M=s(null),{config:P}=n,O=void 0!==P.duration?P.duration:d,T=c((()=>{g||(v(!0),P.onClose?.(),r(n.id),setTimeout((()=>{}),p))}),[P,n.id,r,p]),N=c(((e=!1)=>{if(null===O||O<=0||g)return;const t=e?Math.max(0,O-C.current):O;if(t<=0)return void T();k.current=Date.now()-(e?C.current:0),e||(x(0),C.current=0),w.current=setTimeout((()=>{T()}),t);const n=()=>{if(null===k.current||g)return;const e=Date.now()-k.current,t=Math.min(e/O*100,100);x(t),t<100&&!g&&(S.current=setTimeout(n,16))};S.current=setTimeout(n,16)}),[O,T,g]),D=c(((e=!1)=>{e&&null!==k.current&&(C.current=Date.now()-k.current),w.current&&(clearTimeout(w.current),w.current=null),S.current&&(clearTimeout(S.current),S.current=null),e||(k.current=null,C.current=0,E.current=!1)}),[]),A=c((()=>{P.onClick?.()}),[P]),L=c((()=>{b(!0),D(!0)}),[D]),I=c((()=>{b(!1),!g&&null!==O&&O>0&&N(!0)}),[N,g,O]),z=c((e=>{"Escape"===e.key&&!1!==P.closable&&(e.preventDefault(),T())}),[P.closable,T]);l((()=>{const e=setTimeout((()=>{m(!0)}),10);return()=>clearTimeout(e)}),[]),l((()=>(!f||y||g||E.current||(E.current=!0,N(!1)),()=>D(!1))),[f,y,g]),l((()=>()=>{D(!1)}),[D]);const R=!1!==P.closable,$=`\n ${AX.notificationItem}\n ${f?AX.enter:""}\n ${g?AX.exit:""}\n ${P.className||""}\n `.trim();return t("div",{ref:M,className:$,style:{pointerEvents:"auto",...P.style,...h},onMouseEnter:L,onMouseLeave:I,onClick:A,onKeyDown:z,tabIndex:P.btn?0:-1,role:o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className&&P.icon.props.className.includes("error")?"alert":"status","aria-live":o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className&&P.icon.props.className.includes("error")?"assertive":"polite","data-placement":n.placement,"data-type":(()=>{if(o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className){const e=P.icon.props.className;if(e.includes("success"))return"success";if(e.includes("error"))return"error";if(e.includes("warning"))return"warning";if(e.includes("info"))return"info";if(e.includes("loading"))return"loading"}return"default"})(),"data-rtl":a,children:[P.icon&&e("div",{className:AX.notificationIcon,children:P.icon}),t("div",{className:AX.notificationContent,children:[e("div",{className:AX.notificationMessage,children:P.message}),P.description&&e("div",{className:AX.notificationDescription,children:P.description}),P.btn&&e("div",{className:AX.notificationAction,children:P.btn})]}),R&&e("button",{className:AX.notificationClose,onClick:e=>{e.stopPropagation(),T()},"aria-label":"Close notification",tabIndex:0,children:P.closeIcon||e(Za,{name:"close",size:"sm"})}),null!==O&&O>0&&e("div",{className:AX.notificationProgressContainer,children:e("div",{className:AX.notificationProgress,style:{width:`${_}%`,opacity:y?.3:1}})})]})}const IX=({placement:t,notifications:n,onRemove:r,stackGap:o,rtl:i,duration:a,zIndex:s,top:l,bottom:c,animationDuration:u=300})=>{if(0===n.length)return null;const d=e=>{switch(e){case"topLeft":return"topRight";case"topRight":return"topLeft";case"bottomLeft":return"bottomRight";case"bottomRight":return"bottomLeft";default:return e}};return e("div",{className:`${AX.notificationContainer} ${AX[t]}`,style:(()=>{const e={position:"fixed",zIndex:s,display:"flex",flexDirection:"column",gap:o,pointerEvents:"none"};switch(i?d(t):t){case"topLeft":return{...e,top:l,left:24,alignItems:"flex-start"};case"topRight":return{...e,top:l,right:24,alignItems:"flex-end"};case"bottomLeft":return{...e,bottom:c,left:24,alignItems:"flex-start",flexDirection:"column-reverse"};case"bottomRight":return{...e,bottom:c,right:24,alignItems:"flex-end",flexDirection:"column-reverse"};default:return e}})(),children:n.sort(((e,t)=>e.createdAt-t.createdAt)).map(((t,n)=>e(LX,{notification:t,onClose:r,stackGap:o,rtl:i,duration:a,animationDuration:u,style:{zIndex:s+n}},t.id)))})},zX=y(null),RX=({children:n,maxCount:r=5,top:o=24,bottom:a=24,rtl:s=!1,zIndexBase:l=1e3,duration:d=4500,stackGap:h=12,placementDefaults:p={},concurrent:f=!0,animationDuration:m=300})=>{const[g,v]=u([]),y=c(((e,t)=>{const n=e.placement||"topRight",o={id:e.key||`notification-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,config:{...p[n],...e,placement:n},placement:n,instanceId:t,createdAt:Date.now()};v((i=>{if(e.key){const n=i.findIndex((n=>n.config.key===e.key&&n.instanceId===t));if(-1!==n){const e=[...i];return e[n]={...e[n],config:o.config,createdAt:Date.now()},e}}const a=[...i,o],s=a.filter((e=>e.placement===n&&e.instanceId===t));if(s.length>r){const e=s.sort(((e,t)=>e.createdAt-t.createdAt)),t=e.slice(0,s.length-r);return t.forEach((e=>{setTimeout((()=>e.config.onClose?.()),0)})),a.filter((e=>!t.some((t=>t.id===e.id))))}return a}))}),[r,p]),b=c(((e,t)=>{v((n=>n.filter((n=>!(n.id===e&&n.instanceId===t)))))}),[]),_=c(((e,t,n)=>{v((r=>r.map((r=>r.config.key===e&&r.instanceId===n?{...r,config:{...r.config,...t}}:r))))}),[]),x=c(((e,t)=>{v((n=>{if(!e&&!t)return n.forEach((e=>e.config.onClose?.())),[];if(e&&t){const r=n.filter((n=>n.config.key===e&&n.instanceId===t));return r.forEach((e=>e.config.onClose?.())),n.filter((n=>!(n.config.key===e&&n.instanceId===t)))}if(t){const e=n.filter((e=>e.instanceId===t));return e.forEach((e=>e.config.onClose?.())),n.filter((e=>e.instanceId!==t))}if(e){const t=n.filter((t=>t.config.key===e));return t.forEach((e=>e.config.onClose?.())),n.filter((t=>t.config.key!==e))}return n}))}),[]),w=i((()=>({addNotification:y,removeNotification:b,updateNotification:_,destroyNotifications:x})),[y,b,_,x]),S=i((()=>{const e={};return g.forEach((t=>{const n=t.placement;e[n]||(e[n]=[]),e[n].push(t)})),e}),[g]);return t(zX.Provider,{value:w,children:[n,["topLeft","topRight","bottomLeft","bottomRight"].map((t=>{const n=S[t]||[];return 0===n.length?null:e(Wm,{className:AX.notificationPortal,children:e(IX,{placement:t,notifications:n,onRemove:e=>{const t=n.find((t=>t.id===e));t&&b(e,t.instanceId)},stackGap:h,rtl:s,duration:d,zIndex:l,top:o,bottom:a,animationDuration:m})},t)}))]})},$X=()=>{const t=f(),n=(()=>{const e=p(zX);if(!e)throw new Error("useNotificationContext must be used within NotificationProvider");return e})();return[i((()=>{const r=e=>{n.addNotification(e,t)};return{open:r,info:t=>{r({...t,icon:e(Za,{name:"help",className:"notification-icon-info"})})},success:t=>{r({...t,icon:e(Za,{name:"check",className:"notification-icon-success"})})},error:t=>{r({...t,icon:e(Za,{name:"close",className:"notification-icon-error"})})},warning:t=>{r({...t,icon:e(Za,{name:"notificationClearAll",className:"notification-icon-warning"})})},loading:t=>{r({...t,icon:e(Za,{name:"refresh",className:"notification-icon-loading"}),duration:null})},destroy:e=>{n.destroyNotifications(e,t)}}}),[n,t]),c((()=>null),[])]};var FX="Array-module_inputMinimized__N3CzD",jX="Array-module_contentContainer__Nf98X",BX="Array-module_value__X6PGp",HX={container:"ArrayInput-module_container__pCN6T",header:"ArrayInput-module_header__v88Lg",inputHeader:"ArrayInput-module_inputHeader__YhlBU",emptyStateText:"ArrayInput-module_emptyStateText__ZHJbR"},WX="String-module_icon__pKB1k",VX="String-module_text__-rE-j",YX="String-module_select__G6d9c",XX="String-module_baseInput__ieBad",qX="String-module_input__sXbRz";var UX=a((({label:t,description:n,value:r,options:o,onChange:i,selectProps:a,inputProps:l,inputContainerClassName:c,iconName:d="formatQuoteClose",...h})=>{const p=s(null),f=s(null),m=s(null),[g,v]=u(!1);return e(he,{dimensionX:"fill",description:n,forceFocus:g,dropDownRef:m,onFocusChange:e=>(e=>{p?.current?.toggleDropdown(e),v(e),e&&!o&&f.current?.focus()})(e),labelProps:{dimensionX:"hug",divider:!!t?.trim(),prefix:{children:e(Za,{className:WX,name:d})},root:t?{dimensionX:"hug",children:e(V,{className:VX,size:"medium",children:t})}:void 0},inputContainerProps:{className:`${XX} ${c}`},...h,children:o?e(Zm,{selectRef:p,externalDropdownRef:m,disableClick:!0,options:o,value:r,placeholder:"",onChange:e=>{i?.(e),v(!1)},...a,className:`${YX} ${a?.className}`}):e(G,{ref:f,value:r,onChange:e=>i?.(e.target.value),...l,className:`${qX} ${l?.className}`})})})),ZX="Number-module_icon__o1inF",GX="Number-module_text__S4l2F",KX="Number-module_select__NRfCp",JX="Number-module_baseInput__uueTo",QX="Number-module_input__m1vMZ";var eq=a((({label:t,description:n,value:r,options:o,onChange:i,selectProps:a,inputProps:l,inputContainerClassName:c,iconName:d="numericBox",...h})=>{const p=s(null),f=s(null),[m,g]=u(!1),v=s(null);return e(he,{dimensionX:"fill",description:n,forceFocus:m,dropDownRef:v,onFocusChange:e=>(e=>{p?.current?.toggleDropdown(e),g(e),e&&!o&&f.current?.focus()})(e),labelProps:{dimensionX:"hug",divider:!!t?.trim(),prefix:{children:e(Za,{className:ZX,name:d})},root:t?{dimensionX:"hug",children:e(V,{className:GX,size:"medium",children:t})}:void 0},inputContainerProps:{className:`${JX} ${c}`},...h,children:o?e(Zm,{selectRef:p,externalDropdownRef:v,disableClick:!0,options:o,value:r,placeholder:"",onChange:e=>{i?.(e),g(!1)},...a,className:`${KX} ${a?.className}`}):e(G,{ref:f,value:r,type:"number",onChange:e=>{const t=e.target.value,n=""===t;i?.(n?void 0:Number(t))},...l,className:`${QX} ${l?.className}`})})})),tq="TextArea-module_container__VXi9C",nq="TextArea-module_titleContainer__l1CD0",rq="TextArea-module_textAreaInput__iYLK4",oq="TextArea-module_description__VEpUG",iq="TextArea-module_icon__iVGeQ";var aq=a((({value:r,title:o="",icon:i,textAreaProps:a,textAreaContainerProps:l,titleContainerProps:c,titlePrefixProps:u,titleRootProps:d,titleSuffixProps:h,containerProps:p,description:f,placeholder:g,onChange:v})=>{const y=s(null);return m(a?.ref??{current:null},(()=>y.current)),t(B,{dimensionX:"fill",alignment:"leftCenter",direction:"vertical",...p,className:`${tq} ${p?.className||""}`,children:[t(n,{children:[(o||i||u||h)&&e(WA,{dimensionX:"fill",dimensionY:36,alignment:"leftCenter",...c,className:`${nq} ${c?.className||""}`,prefix:{children:i?e(Za,{name:i,className:iq}):null,dimensionX:"hug",alignment:"leftCenter",...u},root:{children:o,dimensionX:"fill",alignment:"leftCenter",...d},suffix:{children:h?.children,dimensionX:"hug",alignment:"rightCenter",...h},onClick:e=>{y.current?.focus();try{c?.onClick?.(e)}catch(e){console.error("Error in titleContainerProps.onClick:",e)}}}),e(B,{dimensionX:"fill",alignment:"leftCenter",...l,className:`${l?.className||""}`,children:e("textarea",{className:rq,value:r,onChange:v,placeholder:g||"",ref:y,...a})})]}),e(V,{size:"xsmall",className:`${oq}`,children:f})]})})),sq="Date-module_text__eXWDJ",lq="Date-module_dateInput__hx3cC",cq="Date-module_stringValueWrapper__XM06v",uq="Date-module_iconGroup__W1sPW",dq="Date-module_clearIcon__rTC7y",hq="Date-module_stringValue__eJN9C";var pq=a((({label:n,description:r,onChange:o,value:i,placeholder:a="",inputContainerClassName:s,datePickerProps:l})=>{const c=e=>{o?.(new Date(e))};return e(he,{dimensionX:"fill",alignment:"leftCenter",description:r,labelProps:{prefix:{children:e(Za,{name:"calendarBlank"})},root:{children:e(V,{className:sq,children:n})}},inputContainerProps:{dimensionX:"fill",alignment:"leftCenter",className:`${s} ${lq}`},children:e(wA,{placeholder:a,suffixIcon:null,onChange:c,value:i,renderLabel:n=>t("div",{className:cq,children:[e(vA,{color:"default",className:hq,children:n}),e("div",{className:uq,children:e(FS,{className:dq,onClick:()=>c("")})})]}),...l})})})),fq="Boolean-module_container__RN4yt",mq="Boolean-module_description__v3iuY";var gq=a((({checked:n=!1,disabled:r=!1,label:o,containerProps:i,switchContainerProps:a,suffixProps:s,rootProps:l,labelProps:c,description:u,onChange:d,size:h,className:p})=>t(B,{dimensionX:"fill",alignment:"leftCenter",direction:"vertical",className:p||"",children:[e(H,{dimensionY:36,dimensionX:"fill",root:{children:e(NL,{checked:n,disabled:r,...a,onChange:d,size:h}),...l},suffix:{children:o&&e(V,{...c,children:o}),...s},className:`${i?.className} ${fq}`,...i}),u&&e(V,{size:"xsmall",className:`${mq}`,children:u})]}))),vq={baseInput:"Color-module_baseInput__gWvlQ"};var yq=a((({label:t,description:n,value:r="#000000",labelProps:o,colorContainerProps:i,inputContainerClassName:a,onChange:s,...l})=>e(he,{dimensionX:"fill",description:n,labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Za,{className:vq.icon,name:"invertColors"})},root:{dimensionX:"hug",children:e(V,{className:vq.text,size:"medium",children:t})},...o},inputContainerProps:{className:`${vq.baseInput} ${a}`},...l,children:e(rm,{dimensionX:"fill",value:r,onChange:e=>{s?.(e)},...i})}))),bq={container:"Storage-module_container__jdMaj",top:"Storage-module_top__vhJmX",storage:"Storage-module_storage__aXBhd",previewIcon:"Storage-module_previewIcon__zNCCM",text:"Storage-module_text__8eR8V"};function _q(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const xq=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function wq(e,t,n){const r=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const n=t.split(".").pop().toLowerCase(),r=xq.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:o}=e,i="string"==typeof t?t:"string"==typeof o&&o.length>0?o:`./${e.name}`;return"string"!=typeof r.path&&Sq(r,"path",i),void 0!==n&&Object.defineProperty(r,"handle",{value:n,writable:!1,configurable:!1,enumerable:!0}),Sq(r,"relativePath",i),r}function Sq(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const kq=[".DS_Store","Thumbs.db"];function Cq(e){return"object"==typeof e&&null!==e}function Eq(e){return e.filter((e=>-1===kq.indexOf(e.name)))}function Mq(e){if(null===e)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Pq(e){if("function"!=typeof e.webkitGetAsEntry)return Tq(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Dq(t):Tq(e,t)}function Oq(e){return e.reduce(((e,t)=>[...e,...Array.isArray(t)?Oq(t):[t]]),[])}function Tq(e,t){return _q(this,void 0,void 0,(function*(){var n;if(globalThis.isSecureContext&&"function"==typeof e.getAsFileSystemHandle){const t=yield e.getAsFileSystemHandle();if(null===t)throw new Error(`${e} is not a File`);if(void 0!==t){const e=yield t.getFile();return e.handle=t,wq(e)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return wq(r,null!==(n=null==t?void 0:t.fullPath)&&void 0!==n?n:void 0)}))}function Nq(e){return _q(this,void 0,void 0,(function*(){return e.isDirectory?Dq(e):function(e){return _q(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{e.file((n=>{const r=wq(n,e.fullPath);t(r)}),(e=>{n(e)}))}))}))}(e)}))}function Dq(e){const t=e.createReader();return new Promise(((e,n)=>{const r=[];!function o(){t.readEntries((t=>_q(this,void 0,void 0,(function*(){if(t.length){const e=Promise.all(t.map(Nq));r.push(e),o()}else try{const t=yield Promise.all(r);e(t)}catch(e){n(e)}}))),(e=>{n(e)}))}()}))}var Aq,Lq={};var Iq=(Aq||(Aq=1,Lq.__esModule=!0,Lq.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(0===n.length)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}),Lq),zq=ye(Iq);function Rq(e){return function(e){if(Array.isArray(e))return Wq(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Hq(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$q(Object(n),!0).forEach((function(t){jq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||Hq(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hq(e,t){if(e){if("string"==typeof e)return Wq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wq(e,t):void 0}}function Wq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Vq="function"==typeof zq?zq:zq.default,Yq=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:"file-invalid-type",message:"File type must be ".concat(t)}},Xq=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},qq=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},Uq={code:"too-many-files",message:"Too many files"};function Zq(e,t){var n="application/x-moz-file"===e.type||Vq(e,t);return[n,n?null:Yq(t)]}function Gq(e,t,n){if(Kq(e.size))if(Kq(t)&&Kq(n)){if(e.size>n)return[!1,Xq(n)];if(e.size<t)return[!1,qq(t)]}else{if(Kq(t)&&e.size<t)return[!1,qq(t)];if(Kq(n)&&e.size>n)return[!1,Xq(n)]}return[!0,null]}function Kq(e){return null!=e}function Jq(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function Qq(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function eU(e){e.preventDefault()}function tU(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!Jq(e)&&t&&t.apply(void 0,[e].concat(r)),Jq(e)}))}}function nU(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function rU(e){return/^.*\.[\w]+$/.test(e)}var oU=["children"],iU=["open"],aU=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],sU=["refKey","onChange","onClick"];function lU(e){return function(e){if(Array.isArray(e))return dU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||uU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||uU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uU(e,t){if(e){if("string"==typeof e)return dU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dU(e,t):void 0}}function dU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hU(Object(n),!0).forEach((function(t){fU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mU(e,t){if(null==e)return{};var n,r,o=function(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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gU=h((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=pU(pU({},vU),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,u=t.minSize,d=t.multiple,h=t.maxFiles,p=t.onDragEnter,f=t.onDragLeave,m=t.onDragOver,g=t.onDrop,v=t.onDropAccepted,y=t.onDropRejected,b=t.onFileDialogCancel,_=t.onFileDialogOpen,x=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,C=t.noClick,E=t.noKeyboard,M=t.noDrag,P=t.noDragEventsBubbling,O=t.onError,T=t.validator,N=i((function(){return function(e){if(Kq(e))return Object.entries(e).reduce((function(e,t){var n=Bq(t,2),r=n[0],o=n[1];return[].concat(Rq(e),[r],Rq(o))}),[]).filter((function(e){return nU(e)||rU(e)})).join(",")}(n)}),[n]),D=i((function(){return function(e){return Kq(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=Bq(e,2),n=t[0],r=t[1],o=!0;return nU(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(rU)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=Bq(t,2),r=n[0],o=n[1];return Fq(Fq({},e),{},jq({},r,o))}),{})}]:e}(n)}),[n]),A=i((function(){return"function"==typeof _?_:xU}),[_]),L=i((function(){return"function"==typeof b?b:xU}),[b]),I=s(null),z=s(null),R=cU(k(_U,bU),2),$=R[0],F=R[1],j=$.isFocused,B=$.isFileDialogActive,H=s("undefined"!=typeof window&&window.isSecureContext&&x&&"showOpenFilePicker"in window),W=function(){!H.current&&B&&setTimeout((function(){z.current&&(z.current.files.length||(F({type:"closeDialog"}),L()))}),300)};l((function(){return window.addEventListener("focus",W,!1),function(){window.removeEventListener("focus",W,!1)}}),[z,B,L,H]);var V=s([]),Y=function(e){I.current&&I.current.contains(e.target)||(e.preventDefault(),V.current=[])};l((function(){return S&&(document.addEventListener("dragover",eU,!1),document.addEventListener("drop",Y,!1)),function(){S&&(document.removeEventListener("dragover",eU),document.removeEventListener("drop",Y))}}),[I,S]),l((function(){return!r&&w&&I.current&&I.current.focus(),function(){}}),[I,w,r]);var X=c((function(e){O?O(e):console.error(e)}),[O]),q=c((function(e){e.preventDefault(),e.persist(),ae(e),V.current=[].concat(lU(V.current),[e.target]),Qq(e)&&Promise.resolve(o(e)).then((function(t){if(!Jq(e)||P){var n=t.length,r=n>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=Bq(Zq(e,n),1)[0],i=Bq(Gq(e,r,o),1)[0],a=s?s(e):null;return t&&i&&!a}))}({files:t,accept:N,minSize:u,maxSize:a,multiple:d,maxFiles:h,validator:T});F({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),p&&p(e)}})).catch((function(e){return X(e)}))}),[o,p,X,P,N,u,a,d,h,T]),U=c((function(e){e.preventDefault(),e.persist(),ae(e);var t=Qq(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&m&&m(e),!1}),[m,P]),Z=c((function(e){e.preventDefault(),e.persist(),ae(e);var t=V.current.filter((function(e){return I.current&&I.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),V.current=t,t.length>0||(F({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qq(e)&&f&&f(e))}),[I,f,P]),G=c((function(e,t){var n=[],r=[];e.forEach((function(e){var t=cU(Zq(e,N),2),o=t[0],i=t[1],s=cU(Gq(e,u,a),2),l=s[0],c=s[1],d=T?T(e):null;if(o&&l&&!d)n.push(e);else{var h=[i,c];d&&(h=h.concat(d)),r.push({file:e,errors:h.filter((function(e){return e}))})}})),(!d&&n.length>1||d&&h>=1&&n.length>h)&&(n.forEach((function(e){r.push({file:e,errors:[Uq]})})),n.splice(0)),F({acceptedFiles:n,fileRejections:r,isDragReject:r.length>0,type:"setFiles"}),g&&g(n,r,t),r.length>0&&y&&y(r,t),n.length>0&&v&&v(n,t)}),[F,d,N,u,a,h,g,v,y,T]),K=c((function(e){e.preventDefault(),e.persist(),ae(e),V.current=[],Qq(e)&&Promise.resolve(o(e)).then((function(t){Jq(e)&&!P||G(t,e)})).catch((function(e){return X(e)})),F({type:"reset"})}),[o,G,X,P]),J=c((function(){if(H.current){F({type:"openDialog"}),A();var e={multiple:d,types:D};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){G(e,null),F({type:"closeDialog"})})).catch((function(e){!function(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}(e)?!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?X(e):(H.current=!1,z.current?(z.current.value=null,z.current.click()):X(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):(L(e),F({type:"closeDialog"}))}))}else z.current&&(F({type:"openDialog"}),A(),z.current.value=null,z.current.click())}),[F,A,L,x,G,X,D,d]),Q=c((function(e){I.current&&I.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),J()))}),[I,J]),ee=c((function(){F({type:"focus"})}),[]),te=c((function(){F({type:"blur"})}),[]),ne=c((function(){C||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?J():setTimeout(J,0))}),[C,J]),re=function(e){return r?null:e},oe=function(e){return E?null:re(e)},ie=function(e){return M?null:re(e)},ae=function(e){P&&e.stopPropagation()},se=i((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,h=e.onDrop,p=mU(e,aU);return pU(pU(fU({onKeyDown:oe(tU(i,Q)),onFocus:oe(tU(a,ee)),onBlur:oe(tU(s,te)),onClick:re(tU(l,ne)),onDragEnter:ie(tU(c,q)),onDragOver:ie(tU(u,U)),onDragLeave:ie(tU(d,Z)),onDrop:ie(tU(h,K)),role:"string"==typeof o&&""!==o?o:"presentation"},n,I),r||E?{}:{tabIndex:0}),p)}}),[I,Q,ee,te,ne,q,U,Z,K,E,M,r]),le=c((function(e){e.stopPropagation()}),[]),ce=i((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=mU(e,sU);return pU(pU({},fU({accept:N,multiple:d,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:re(tU(r,K)),onClick:re(tU(o,le)),tabIndex:-1},n,z)),i)}}),[z,n,d,K,r]);return pU(pU({},$),{},{isFocused:j&&!r,getRootProps:se,getInputProps:ce,rootRef:I,inputRef:z,open:re(J)})}(mU(e,oU)),a=r.open,u=mU(r,iU);return m(t,(function(){return{open:a}}),[a]),o.createElement(_,null,n(pU(pU({},u),{},{open:a})))}));gU.displayName="Dropzone";var vU={disabled:!1,getFilesFromEvent:function(e){return _q(this,void 0,void 0,(function*(){return Cq(e)&&Cq(e.dataTransfer)?function(e,t){return _q(this,void 0,void 0,(function*(){if(e.items){const n=Mq(e.items).filter((e=>"file"===e.kind));if("drop"!==t)return n;return Eq(Oq(yield Promise.all(n.map(Pq))))}return Eq(Mq(e.files).map((e=>wq(e))))}))}(e.dataTransfer,e.type):function(e){return Cq(e)&&Cq(e.target)}(e)?function(e){return Mq(e.target.files).map((e=>wq(e)))}(e):Array.isArray(e)&&e.every((e=>"getFile"in e&&"function"==typeof e.getFile))?function(e){return _q(this,void 0,void 0,(function*(){const t=yield Promise.all(e.map((e=>e.getFile())));return t.map((e=>wq(e)))}))}(e):[]}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};gU.defaultProps=vU,gU.propTypes={children:Ue.func,accept:Ue.objectOf(Ue.arrayOf(Ue.string)),multiple:Ue.bool,preventDropOnDocument:Ue.bool,noClick:Ue.bool,noKeyboard:Ue.bool,noDrag:Ue.bool,noDragEventsBubbling:Ue.bool,minSize:Ue.number,maxSize:Ue.number,maxFiles:Ue.number,disabled:Ue.bool,getFilesFromEvent:Ue.func,onFileDialogCancel:Ue.func,onFileDialogOpen:Ue.func,useFsAccessApi:Ue.bool,autoFocus:Ue.bool,onDragEnter:Ue.func,onDragLeave:Ue.func,onDragOver:Ue.func,onDrop:Ue.func,onDropAccepted:Ue.func,onDropRejected:Ue.func,onError:Ue.func,validator:Ue.func};var yU=gU,bU={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function _U(e,t){switch(t.type){case"focus":return pU(pU({},e),{},{isFocused:!0});case"blur":return pU(pU({},e),{},{isFocused:!1});case"openDialog":return pU(pU({},bU),{},{isFileDialogActive:!0});case"closeDialog":return pU(pU({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return pU(pU({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return pU(pU({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return pU({},bU);default:return e}}function xU(){}var wU=a((({file:r,label:o,containerProps:i,topContainerProps:a,dropzoneContainerProps:s,description:l,errorMessage:c,helperTextContainerProps:u,helperTextProps:d,onClickShowFileSelect:h,onUpload:p,onDelete:f,onPreview:m})=>{const g={position:"absolute",height:"100%",width:"100%",objectFit:"contain"},v=CL({file:r,styles:{img:g,embed:g}});return t(B,{direction:"vertical",dimensionX:"fill",dimensionY:472,alignment:"top",gap:10,className:`${i?.className}`,children:[t(B,{direction:"vertical",dimensionX:"fill",gap:10,className:`${i?.className} ${bq.container}`,children:[e(WA,{prefix:{children:e(Za,{name:"storage",className:bq.icon})},root:{children:e(V,{variant:"secondary",children:o})},suffix:{children:a?.hideActions?null:t(n,{children:[e(_s,{variant:"icon",onClick:h,disabled:a?.disableEditIcon,children:a?.editIcon||e(Za,{name:"pencil"})}),e(_s,{variant:"icon",color:"danger",onClick:e=>{f?.(e)},disabled:a?.disableDeleteIcon,children:a?.deleteIcon||e(Za,{name:"delete"})})]}),gap:0,...a?.suffix},...a?.container}),e(yU,{multiple:!1,onDrop:e=>{e.length&&p?.(e[0])},children:({getRootProps:o,getInputProps:i})=>e(B,{className:`${s?.container?.className} ${bq.storage}`,alignment:"center",dimensionX:"fill",dimensionY:407,direction:"vertical",gap:10,...o(),...s?.container,onClick:e=>{r?.url?m?.():h?.()},children:t(n,{children:[t(n,r?{children:[v,e(Za,{name:s?.previewIcon||"filterCenterFocus",size:32,className:bq.previewIcon})]}:{children:[e(Za,{name:s?.uploadIcon||"storage",size:80}),e(V,{className:bq.text,children:s?.description||t("span",{children:["Upload your file or ",e("br",{})," pick an file from storage"]})})]}),e("input",{...i()})]})})})]}),(c||l)&&e(ae.HelperText,{alignment:"leftCenter",dimensionX:"fill",...u,className:`${bq.helperText} ${u?.className}`,children:e(V,{...d,size:"small",variant:c?"danger":"secondary",className:`${d?.className}`,children:c||l})})]})})),SU="MultipleSelection-module_icon__ewhbs",kU="MultipleSelection-module_text__G5mEr",CU="MultipleSelection-module_select__YXbPL",EU="MultipleSelection-module_baseInput__eUWHB";var MU=a((({label:t,description:n,value:r=[],options:o,onChange:i,selectProps:a,inputContainerClassName:l,...c})=>{const d=s(null),[h,p]=u(!1),f=s(null);return e(he,{dimensionX:"fill",description:n,dropDownRef:f,forceFocus:h,onFocusChange:e=>(e=>{d?.current?.toggleDropdown(e),p(e)})(e),labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Za,{className:SU,name:"formatListChecks"})},root:{dimensionX:"hug",children:e(V,{className:kU,size:"medium",children:t})}},inputContainerProps:{className:`${EU} ${l}`},...c,children:e(Zm,{selectRef:d,externalDropdownRef:f,disableClick:!0,options:o||[],value:r,placeholder:"",multiple:!0,onChange:e=>{i?.(e)},...a,className:`${CU} ${a?.className}`})})})),PU="Location-module_location__ix8Fi",OU="Location-module_icon__a3NfC",TU="Location-module_mapMarker__J3aE2",NU="Location-module_description__mG0kX";var DU=a((({coordinates:n,title:r,onChange:o,description:i,...a})=>t(B,{dimensionX:500,dimensionY:500,gap:10,direction:"vertical",alignment:"leftCenter",...a,className:`${a.className} ${PU}`,children:[e(WA,{prefix:{children:e(Za,{name:"mapMarker",className:OU})},root:{children:e(V,{variant:"secondary",children:r})}}),e(hL,{coordinates:n,markerIcon:{icon:e(Za,{name:"mapMarker",size:"lg",className:TU})},onChange:o}),e(V,{size:"xsmall",className:`${NU}`,children:i})]}))),AU="RichText-module_container__MIFsF",LU="RichText-module_description__-uZpI";const IU={},zU={},RU={},$U={},FU={},jU={},BU={},HU={},WU={},VU={},YU={},XU={},qU={},UU={},ZU={},GU={},KU={},JU={},QU={},eZ={},tZ={},nZ={},rZ={},oZ={},iZ={},aZ={},sZ={},lZ={},cZ={},uZ={},dZ={},hZ={},pZ={},fZ={},mZ={},gZ={},vZ={},yZ={},bZ={},_Z={},xZ={},wZ={},SZ={},kZ={},CZ={},EZ="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,MZ=EZ&&"documentMode"in document?document.documentMode:null,PZ=EZ&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),OZ=EZ&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),TZ=!(!EZ||!("InputEvent"in window)||MZ)&&"getTargetRanges"in new window.InputEvent("input"),NZ=EZ&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),DZ=EZ&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,AZ=EZ&&/Android/.test(navigator.userAgent),LZ=EZ&&/^(?=.*Chrome).*/i.test(navigator.userAgent),IZ=EZ&&AZ&&LZ,zZ=EZ&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!LZ,RZ=0,$Z=1,FZ=2,jZ=1,BZ=2,HZ=3,WZ=4,VZ=5,YZ=6,XZ=NZ||DZ||zZ?" ":"",qZ="\n\n",UZ=OZ?" ":XZ,ZZ="֑-߿יִ-﷽ﹰ-ﻼ",GZ="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",KZ=new RegExp("^[^"+GZ+"]*["+ZZ+"]"),JZ=new RegExp("^[^"+ZZ+"]*["+GZ+"]"),QZ={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},eG={directionless:1,unmergeable:2},tG={center:2,end:6,justify:4,left:1,right:3,start:5},nG={[BZ]:"center",[YZ]:"end",[WZ]:"justify",[jZ]:"left",[HZ]:"right",[VZ]:"start"},rG={normal:0,segmented:2,token:1},oG={[RZ]:"normal",[FZ]:"segmented",[$Z]:"token"};var iG=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function aG(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let sG=!1,lG=0;function cG(e){lG=e.timeStamp}function uG(e,t,n){const r="BR"===e.nodeName,o=t.__lexicalLineBreak;return o&&(e===o||r&&e.previousSibling===o)||r&&void 0!==FG(e,n)}function dG(e,t,n){const r=CK(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&QG(t,a,o,i,!1)}function hG(e,t,n){if(SQ(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return TG(t)&&n.isAttached()}function pG(e,t,n,r){for(let o=e;o&&!FK(o);o=mK(o)){const e=FG(o,t);if(void 0!==e){const t=RG(e,n);if(t)return x0(t)||!MK(o)?void 0:[o,t]}else if(o===r)return[r,VG(n)]}}function fG(e,t,n){sG=!0;const r=performance.now()-lG>100;try{f0(e,(()=>{const o=RQ()||function(e){return e.getEditorState().read((()=>{const e=RQ();return null!==e?e.clone():null}))}(e),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],h=d.type,p=d.target,f=pG(p,e,s,a);if(!f)continue;const[m,g]=f;if("characterData"===h)r&&hQ(g)&&TG(p)&&hG(o,p,g)&&dG(p,g,e);else if("childList"===h){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=$G(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&!uG(r,i,e)){if(OZ){const e=(MK(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];(uG(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&i.set(m,g)}}}if(i.size>0)for(const[t,n]of i)n.reconcileObservedMutation(t,e);const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||uG(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,YG(o)),OZ&&dK(e)&&o.insertRawText(u))}))}finally{sG=!1}}function mG(e){const t=e._observer;null!==t&&fG(e,t.takeRecords(),t)}function gG(e){!function(e){0===lG&&bK(e).addEventListener("textInput",cG,!0)}(e),e._observer=new MutationObserver(((t,n)=>{fG(e,t,n)}))}function vG(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function yG(e,t){const n=e.mergeWithSibling(t),r=t0()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function bG(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&hQ(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(vG(t,r)){r=yG(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&hQ(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(vG(r,n)){r=yG(r,n);break}break}n.remove()}}else r.remove()}function _G(e){return xG(e.anchor),xG(e.focus),e}function xG(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),hQ(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!y0(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let wG=1;const SG="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function kG(e){const t=document.activeElement;if(!MK(t))return!1;const n=t.nodeName;return x0(jG(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==PG(t))}function CG(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!kG(t)&&MG(t)===e}catch(e){return!1}}function EG(e){return e instanceof I0}function MG(e){let t=e;for(;null!=t;){const e=PG(t);if(EG(e))return e;t=mK(t)}return null}function PG(e){return e?e.__lexicalEditor:null}function OG(e){return e.isToken()||e.isSegmented()}function TG(e){return PK(e)&&3===e.nodeType}function NG(e){let t=e;for(;null!=t;){if(TG(t))return t;t=t.firstChild}return null}function DG(e,t,n){const r=QZ[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~QZ.superscript:"superscript"===t?o&=~QZ.subscript:"lowercase"===t?(o&=~QZ.uppercase,o&=~QZ.capitalize):"uppercase"===t?(o&=~QZ.lowercase,o&=~QZ.capitalize):"capitalize"===t&&(o&=~QZ.lowercase,o&=~QZ.uppercase),o}function AG(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function LG(e){QQ();const t=e.getLatest(),n=t.__parent,r=e0(),o=t0(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,y0(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function IG(e){JQ();const t=t0(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=RG(n);null!==e&&e.getWritable()}if(null!==e){const t=RG(e);null!==t&&t.getWritable()}}}function zG(){return KQ()?null:t0()._compositionKey}function RG(e,t){const n=(t||e0())._nodeMap.get(e);return void 0===n?null:n}function $G(e,t){const n=FG(e,t0());return void 0!==n?RG(n,t):null}function FG(e,t){return e[`__lexicalKey_${t._key}`]}function jG(e,t){let n=e;for(;null!=n;){const e=$G(n,t);if(null!==e)return e;n=mK(n)}return null}function BG(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function HG(e){return e.read((()=>WG().getTextContent()))}function WG(){return VG(e0())}function VG(e){return e._nodeMap.get("root")}function YG(e){JQ();const t=e0();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function XG(e){const t=t0(),n=function(e,t){let n=e;for(;null!=n;){const e=FG(n,t);if(void 0!==e)return e;n=mK(n)}return null}(e,t);return null===n?e===t.getRootElement()?RG("root"):null:RG(n)}function qG(e,t){return t?e.getTextContentSize():0}function UG(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ZG(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function GG(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function KG(e){return TG(e)?e.nodeValue:null}function JG(e,t,n){const r=CK(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=KG(o);const r=jG(o);if(null!==t&&hQ(r)){if(t===XZ&&n){const e=n.length;t=n,i=e,a=e}null!==t&&QG(r,t,i,a,e)}}}function QG(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===XZ&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(IG(null),NZ||DZ||zZ)i.remove();else{const e=t0();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const t=i.getParent(),o=$Q(),l=i.getTextContentSize(),c=zG(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||SQ(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const d=RQ();if(!SQ(d)||null===n||null===r)return void i.setTextContent(s);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=dQ(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function eK(e){return"ArrowLeft"===e}function tK(e){return"ArrowRight"===e}function nK(e,t){return PZ?e:t}function rK(e){return"Enter"===e}function oK(e){return"Backspace"===e}function iK(e){return"Delete"===e}function aK(e,t,n){return"a"===e.toLowerCase()&&nK(t,n)}function sK(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=aG(o);return n[t]=e,e}return o}function lK(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&iG(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(a,d?"updated":o)}function cK(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function uK(e,t){const n=e.offset;if("element"===e.type)return cK(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?cK(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function dK(e){const t=bK(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function hK(e,t,n){return d0(e,t,n)}function pK(e){return!S0(e)&&!e.isLastChild()&&!e.isInline()}function fK(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&iG(75,t),n}function mK(e){const t=e.assignedSlot||e.parentElement;return OK(t)?t.host:t}function gK(e){return function(e){return PK(e)&&9===e.nodeType}(e)?e:MK(e)?e.ownerDocument:null}function vK(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function yK(e){const t=gK(e);return t?t.defaultView:null}function bK(e){const t=e._window;return null===t&&iG(78),t}function _K(e){return S0(e)||y0(e)&&e.isShadowRoot()}function xK(e){const t=t0(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&iG(200,e.constructor.name,n);const{replace:o,replaceWithKlass:i}=r;if(null!==o){const t=o(e),r=t.constructor;return null!==i?t instanceof i||iG(201,i.name,i.getType(),r.name,r.getType(),e.constructor.name,n):t instanceof e.constructor&&r!==e.constructor||iG(202,r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&iG(203,e.constructor.name,n,r.name,r.getType()),t}return e}function wK(e,t){!S0(e.getParent())||y0(t)||x0(t)||iG(99)}function SK(e){return(x0(e)||y0(e)&&!e.canBeEmpty())&&!e.isInline()}function kK(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function CK(e){return EZ?(e||window).getSelection():null}function EK(e){return MK(e)&&"A"===e.tagName}function MK(e){return PK(e)&&1===e.nodeType}function PK(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function OK(e){return PK(e)&&11===e.nodeType}function TK(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function NK(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function DK(e){if(x0(e)&&!e.isInline())return!0;if(!y0(e)||_K(e))return!1;const t=e.getFirstChild(),n=null===t||UJ(t)||hQ(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function AK(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const LK=new WeakMap,IK=new Map;function zK(e){if(!e._readOnly&&e.isEmpty())return IK;e._readOnly||iG(192);let t=LK.get(e);return t||(t=function(e){const t=new Map;for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}return t}(e),LK.set(e,t)),t}function RK(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function $K(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function FK(e){return!0===e.__lexicalUnmanaged}function jK(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(y0(a)&&jK(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let BK,HK,WK,VK,YK,XK,qK,UK,ZK,GK,KK="",JK="",QK=null,eJ="",tJ="",nJ=!1,rJ=!1,oJ=null;function iJ(e,t){const n=qK.get(e);if(null!==t){const n=_J(e);n.parentNode===t&&t.removeChild(n)}if(UK.has(e)||HK._keyToDOMMap.delete(e),y0(n)){const e=gJ(n,qK);aJ(e,0,e.length-1,null)}void 0!==n&&lK(GK,WK,VK,n,"destroyed")}function aJ(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&iJ(t,r)}}function sJ(e,t){e.setProperty("text-align",t)}const lJ="40px";function cJ(e,t){const n=BK.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||lJ;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function uJ(e,t){const n=e.style;0===t?sJ(n,""):1===t?sJ(n,"left"):2===t?sJ(n,"center"):3===t?sJ(n,"right"):4===t?sJ(n,"justify"):5===t?sJ(n,"start"):6===t&&sJ(n,"end")}function dJ(e,t){const n=UK.get(e);void 0===n&&iG(60);const r=n.createDOM(BK,HK);if(function(e,t,n){const r=n._keyToDOMMap;(function(e,t,n){e[`__lexicalKey_${t._key}`]=n})(t,n,e),r.set(e,t)}(e,r,HK),hQ(n)?r.setAttribute("data-lexical-text","true"):x0(n)&&r.setAttribute("data-lexical-decorator","true"),y0(n)){const e=n.__indent,t=n.__size;if(0!==e&&cJ(r,e),0!==t){const e=t-1;!function(e,t,n,r){const o=JK;JK="",hJ(e,n,0,t,n.getDOMSlot(r)),mJ(n,r),JK=o}(gJ(n,UK),e,n,r)}const o=n.__format;0!==o&&uJ(r,o),n.isInline()||fJ(null,n,r),pK(n)&&(KK+=qZ,tJ+=qZ)}else{const t=n.getTextContent();if(x0(n)){const t=n.decorate(HK,BK);null!==t&&yJ(e,t),r.contentEditable="false"}else hQ(n)&&(n.isDirectionless()||(JK+=t));KK+=t,tJ+=t}return null!==t&&t.insertChild(r),lK(GK,WK,VK,n,"created"),r}function hJ(e,t,n,r,o){const i=KK;KK="";let a=n;for(;a<=r;++a){dJ(e[a],o);const t=UK.get(e[a]);null!==t&&hQ(t)&&(null===QK&&(QK=t.getFormat()),""===eJ&&(eJ=t.getStyle()))}pK(t)&&(KK+=qZ),o.element.__lexicalTextContent=KK,KK=i+KK}function pJ(e,t){if(e){const n=e.__last;if(n){const e=t.get(n);if(e)return UJ(e)?"line-break":x0(e)&&e.isInline()?"decorator":null}return"empty"}return null}function fJ(e,t,n){const r=pJ(e,qK),o=pJ(t,UK);r!==o&&t.getDOMSlot(n).setManagedLineBreak(o)}function mJ(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==JK||r!==oJ){const n=""===JK,i=n?oJ:(o=JK,KZ.test(o)?"rtl":JZ.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=BK.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=aG(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=aG(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}rJ||(e.getWritable().__dir=i)}oJ=i,t.__lexicalDirTextContent=JK,t.__lexicalDir=i}var o}function gJ(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&iG(101),n.push(r),r=e.__next}return n}function vJ(e,t){const n=qK.get(e);let r=UK.get(e);void 0!==n&&void 0!==r||iG(61);const o=nJ||XK.has(e)||YK.has(e),i=fK(HK,e);if(n===r&&!o){if(y0(n)){const e=i.__lexicalTextContent;void 0!==e&&(KK+=e,tJ+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(JK+=t)}else{const e=n.getTextContent();hQ(n)&&!n.isDirectionless()&&(JK+=e),tJ+=e,KK+=e}return i}if(n!==r&&o&&lK(GK,WK,VK,r,"updated"),r.updateDOM(n,i,BK)){const n=dJ(e,null);return null===t&&iG(62),t.replaceChild(n,i),iJ(e,null),n}if(y0(n)&&y0(r)){const e=r.__indent;e!==n.__indent&&cJ(i,e);const t=r.__format;t!==n.__format&&uJ(i,t),o&&(function(e,t,n){const r=JK;var o;JK="",QK=null,eJ="",function(e,t,n){const r=KK,o=e.__size,i=t.__size;KK="";const a=n.element;if(1===o&&1===i){const n=e.__first,r=t.__first;if(n===r)vJ(n,a);else{const e=_J(n),t=dJ(r,null);try{a.replaceChild(t,e)}catch(o){if("object"==typeof o&&null!=o){const i=`${o.toString()} Parent: ${a.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw new Error(i)}throw o}iJ(n,null)}const i=UK.get(r);hQ(i)&&(null===QK&&(QK=i.getFormat()),""===eJ&&(eJ=i.getStyle()))}else{const r=gJ(e,qK),s=gJ(t,UK);if(r.length!==o&&iG(227),s.length!==i&&iG(228),0===o)0!==i&&hJ(s,t,0,i-1,n);else if(0===i){if(0!==o){const e=null==n.after&&null==n.before&&null==n.element.__lexicalLineBreak;aJ(r,0,o-1,e?null:a),e&&(a.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.getFirstChild(),d=0,h=0;for(;d<=a&&h<=s;){const e=t[d],r=n[h];if(e===r)u=bJ(vJ(r,i.element)),d++,h++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=fK(HK,r);e===u?u=bJ(vJ(r,i.element)):(i.withBefore(u).insertChild(e),vJ(r,i.element)),d++,h++}else dJ(r,i.withBefore(u)),h++;else u=bJ(_J(e)),iJ(e,i.element),d++}const o=UK.get(r);null!==o&&hQ(o)&&(null===QK&&(QK=o.getFormat()),""===eJ&&(eJ=o.getStyle()))}const p=d>a,f=h>s;if(p&&!f){const t=n[s+1],r=void 0===t?null:HK.getElementByKey(t);hJ(n,e,h,s,i.withBefore(r))}else f&&!p&&aJ(t,d,a,i.element)}(t,r,s,o,i,n)}pK(t)&&(KK+=qZ),a.__lexicalTextContent=KK,KK=r+KK}(e,t,t.getDOMSlot(n)),mJ(t,n),o=t,null==QK||QK===o.__textFormat||rJ||(o.setTextFormat(QK),o.setTextStyle(eJ)),function(e){""===eJ||eJ===e.__textStyle||rJ||e.setTextStyle(eJ)}(t),JK=r}(n,r,i),S0(r)||r.isInline()||fJ(n,r,i)),pK(r)&&(KK+=qZ,tJ+=qZ)}else{const t=r.getTextContent();if(x0(r)){const t=r.decorate(HK,BK);null!==t&&yJ(e,t)}else hQ(r)&&!r.isDirectionless()&&(JK+=t);KK+=t,tJ+=t}if(!rJ&&S0(r)&&r.__cachedText!==tJ){const e=r.getWritable();e.__cachedText=tJ,r=e}return i}function yJ(e,t){let n=HK._pendingDecorators;const r=HK._decorators;if(null===n){if(r[e]===t)return;n=BG(HK)}n[e]=t}function bJ(e){let t=e.nextSibling;return null!==t&&t===HK._blockCursorElement&&(t=t.nextSibling),t}function _J(e){const t=ZK.get(e);return void 0===t&&iG(75,e),t}const xJ=Object.freeze({}),wJ=[["keydown",function(e,t){if(SJ=e.timeStamp,kJ=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;if(!hK(t,ZU,e)&&null!=n){if(function(e,t,n,r){return tK(e)&&!t&&!r&&!n}(n,o,a,i))hK(t,GU,e);else if(function(e,t,n,r,o){return tK(e)&&!r&&!n&&(t||o)}(n,o,r,a,i))hK(t,KU,e);else if(function(e,t,n,r){return eK(e)&&!t&&!r&&!n}(n,o,a,i))hK(t,JU,e);else if(function(e,t,n,r,o){return eK(e)&&!r&&!n&&(t||o)}(n,o,r,a,i))hK(t,QU,e);else if(function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i))hK(t,eZ,e);else if(function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i))hK(t,tZ,e);else if(function(e,t){return rK(e)&&t}(n,r))TJ=!0,hK(t,nZ,e);else if(function(e){return" "===e}(n))hK(t,rZ,e);else if(function(e,t){return PZ&&t&&"o"===e.toLowerCase()}(n,o))e.preventDefault(),TJ=!0,hK(t,FU,!0);else if(function(e,t){return rK(e)&&!t}(n,r))TJ=!1,hK(t,nZ,e);else if(function(e,t,n,r){return PZ?!t&&!n&&(oK(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&oK(e)}(n,a,i,o))oK(n)?hK(t,oZ,e):(e.preventDefault(),hK(t,$U,!0));else if(function(e){return"Escape"===e}(n))hK(t,iZ,e);else if(function(e,t,n,r,o){return PZ?!(n||r||o)&&(iK(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&iK(e)}(n,o,r,a,i))iK(n)?hK(t,aZ,e):(e.preventDefault(),hK(t,$U,!1));else if(function(e,t,n){return oK(e)&&(PZ?t:n)}(n,a,o))e.preventDefault(),hK(t,VU,!0);else if(function(e,t,n){return iK(e)&&(PZ?t:n)}(n,a,o))e.preventDefault(),hK(t,VU,!1);else if(function(e,t){return PZ&&t&&oK(e)}(n,i))e.preventDefault(),hK(t,YU,!0);else if(function(e,t){return PZ&&t&&iK(e)}(n,i))e.preventDefault(),hK(t,YU,!1);else if(function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&nK(n,r)}(n,a,i,o))e.preventDefault(),hK(t,XU,"bold");else if(function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&nK(n,r)}(n,a,i,o))e.preventDefault(),hK(t,XU,"underline");else if(function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&nK(n,r)}(n,a,i,o))e.preventDefault(),hK(t,XU,"italic");else if(function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i))hK(t,sZ,e);else if(function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&nK(n,r)}(n,r,i,o))e.preventDefault(),hK(t,qU,void 0);else if(function(e,t,n,r){return PZ?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o))e.preventDefault(),hK(t,UU,void 0);else{const a=t._editorState._selection;null===a||SQ(a)?!OZ&&aK(n,i,o)&&(e.preventDefault(),hK(t,yZ,e)):function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(PZ?n:r)}(n,r,i,o)?(e.preventDefault(),hK(t,gZ,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(PZ?n:r)}(n,r,i,o)?(e.preventDefault(),hK(t,vZ,e)):aK(n,i,o)&&(e.preventDefault(),hK(t,yZ,e))}(function(e,t,n,r){return e||t||n||r})(o,r,a,i)&&hK(t,CZ,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;PK(n)&&"touch"!==r&&0===e.button&&f0(t,(()=>{x0(jG(n))||(OJ=!0)}))}],["compositionstart",function(e,t){f0(t,(()=>{const n=RQ();if(SQ(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();IG(r.key),(e.timeStamp<SJ+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||hQ(o)&&o.getStyle()!==n.style)&&hK(t,BU,UZ)}}))}],["compositionend",function(e,t){OZ?NJ=!0:f0(t,(()=>{RJ(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),f0(t,(()=>{const n=RQ(),r=e.data,o=zJ(e);if(null!=r&&SQ(n)&&AJ(n,o,r,e.timeStamp,!1)){NJ&&(RJ(t,r),NJ=!1);const o=n.anchor.getNode(),i=CK(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;TZ&&!n.isCollapsed()&&hQ(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===KG(i.anchorNode)||hK(t,BU,r);const c=r.length;OZ&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),NZ||DZ||zZ||!t.isComposing()||(SJ=0,IG(null))}else JG(!1,t,null!==r?r:void 0),NJ&&(RJ(t,r||void 0),NJ=!1);JQ(),mG(t0())})),EJ=null}],["click",function(e,t){f0(t,(()=>{const n=RQ(),r=CK(t._window),o=$Q();if(r)if(SQ(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!S0(i)&&1===WG().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3!==e.detail||n.isCollapsed()||i!==n.focus.getNode()&&(y0(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;(MK(n)||TG(n))&&YG(zQ(o,r,t,e))}hK(t,RU,e)}))}],["cut",xJ],["copy",xJ],["dragstart",xJ],["dragover",xJ],["dragend",xJ],["paste",xJ],["focus",xJ],["blur",xJ],["drop",xJ]];TZ&&wJ.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=zJ(e);"deleteCompositionText"===n||OZ&&dK(t)||"insertCompositionText"!==n&&f0(t,(()=>{const o=RQ();if("deleteContentBackward"===n){if(null===o){const e=$Q();if(!SQ(e))return;YG(e.clone())}if(SQ(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===kJ&&i<SJ+30&&t.isComposing()&&n){if(IG(null),SJ=0,setTimeout((()=>{f0(t,(()=>{IG(null)}))}),30),SQ(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),hQ(e)||iG(142),o.style=e.getStyle()}}else{IG(null),e.preventDefault();const r=o.anchor.getNode(),i=r.getTextContent(),a=r.canInsertTextAfter(),s=0===o.anchor.offset&&o.focus.offset===i.length;IZ&&n&&!s&&a||hK(t,$U,!0)}return}}var i;if(!SQ(o))return;const a=e.data;null!==EJ&&JG(!1,t,EJ),o.dirty&&null===EJ||!o.isCollapsed()||S0(o.anchor.getNode())||null===r||o.applyDOMRange(r),EJ=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":hK(t,BU,e);break;case"insertFromComposition":IG(null),hK(t,BU,e);break;case"insertLineBreak":IG(null),hK(t,FU,!1);break;case"insertParagraph":IG(null),TJ&&!DZ?(TJ=!1,hK(t,FU,!1)):hK(t,jU,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":hK(t,HU,e);break;case"deleteByComposition":(function(e,t){return e!==t||y0(e)||y0(t)||!e.isToken()||!t.isToken()})(c,u)&&hK(t,WU,e);break;case"deleteByDrag":case"deleteByCut":hK(t,WU,e);break;case"deleteContent":hK(t,$U,!1);break;case"deleteWordBackward":hK(t,VU,!0);break;case"deleteWordForward":hK(t,VU,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":hK(t,YU,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":hK(t,YU,!1);break;case"formatStrikeThrough":hK(t,XU,"strikethrough");break;case"formatBold":hK(t,XU,"bold");break;case"formatItalic":hK(t,XU,"italic");break;case"formatUnderline":hK(t,XU,"underline");break;case"historyUndo":hK(t,qU,void 0);break;case"historyRedo":hK(t,UU,void 0)}else{if("\n"===a)e.preventDefault(),hK(t,FU,!1);else if(a===qZ)e.preventDefault(),hK(t,jU,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&AJ(o,r,a,e.timeStamp,!0)?(e.preventDefault(),hK(t,BU,a)):EJ=a;CJ=e.timeStamp}}))}(e,t)]);let SJ=0,kJ=null,CJ=0,EJ=null;const MJ=new WeakMap;let PJ=!1,OJ=!1,TJ=!1,NJ=!1,DJ=[0,"",0,"root",0];function AJ(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=t0(),c=CK(l._window),u=null!==c?c.anchorNode:null,d=i.key,h=l.getElementByKey(d),p=n.length;return d!==a.key||!hQ(s)||(!o&&(!TZ||CJ<r+50)||s.isDirty()&&p<2||UG(n))&&i.offset!==a.offset&&!s.isComposing()||OG(s)||s.isDirty()&&p>1||(o||!TZ)&&null!==h&&!s.isComposing()&&u!==NG(h)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(hQ(t)||y0(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function LJ(e,t){return TG(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function IJ(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;PJ&&(PJ=!1,LJ(r,o)&&LJ(i,a))||f0(t,(()=>{if(!n)return void YG(null);if(!CG(t,r,i))return;const s=RQ();if(SQ(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=bK(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=DJ,h=WG(),p=!1===t.isComposing()&&""===h.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)hQ(r)||iG(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!p){y0(r)||iG(259);const e=n.getNode();s.style="",e.isEmpty()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,d=l?t:e,h=l?e:t;let p=2047,f=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(hQ(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===h&&0===u)&&(f=!0,p&=t.getFormat(),0===p))break}s.format=f?p:0}}hK(t,IU,void 0)}))}function zJ(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function RJ(e,t){const n=e._compositionKey;if(IG(null),null!==n&&null!=t){if(""===t){const t=RG(n),r=NG(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&hQ(t)&&QG(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=RQ();if(SQ(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void hK(e,nZ,null)}}}JG(!0,e,t)}function $J(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const FJ=new Map;function jJ(e){const t=function(e){const t=yK(e);return t?t.getSelection():null}(e.target);if(null===t)return;const n=MG(t.anchorNode);if(null===n)return;OJ&&(OJ=!1,f0(n,(()=>{const r=$Q(),o=t.anchorNode;(MK(o)||TG(o))&&YG(zQ(r,t,n,e))})));const r=ZG(n),o=r[r.length-1],i=o._key,a=FJ.get(i),s=a||o;s!==n&&IJ(t,s,!1),IJ(t,n,!0),n!==o?FJ.set(i,n):a&&FJ.delete(i)}function BJ(e){e._lexicalHandled=!0}function HJ(e){return!0===e._lexicalHandled}function WJ(e,t,n){JQ();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=RQ();if(!SQ(t)||!y0(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return vK(o,e)&&n.set(e.__key,0,"element"),vK(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(SQ(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(BQ(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(BQ(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else CQ(i)&&t&&e.isSelected()&&e.selectPrevious();if(SQ(i)&&t&&!a){const t=e.getIndexWithinParent();AG(e),FQ(i,o,t,-1)}else AG(e);n||_K(o)||o.canBeEmpty()||!o.isEmpty()||WJ(o,t),t&&S0(o)&&o.isEmpty()&&o.selectEnd()}class VJ{static getType(){iG(64,this.name)}static clone(e){iG(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);JQ(),QQ();const n=t0(),r=e0(),o=""+wG++;r._nodeMap.set(o,e),y0(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){iG(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=RG(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||RQ();if(null==t)return!1;const n=t.getNodes().some((e=>e.__key===this.__key));if(hQ(this))return n;if(SQ(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(x0(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:RG(e)}getParentOrThrow(){const e=this.getParent();return null===e&&iG(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(_K(t))return y0(e)||e===this&&x0(e)||iG(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&iG(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:RG(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:RG(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();y0(this)&&t.unshift(this),y0(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=y0(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&iG(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=t0()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=RG(this.__key);return null===e&&iG(113),e}getWritable(){JQ();const e=e0(),t=t0(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=RQ();if(null!==a&&a.setCachedNodes(null),i.has(r))return LG(o),o;const s=RK(o);return i.add(r),LG(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){iG(70)}updateDOM(e,t,n){iG(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){return{type:this.__type,version:1}}static importJSON(e){iG(18,this.name)}updateFromJSON(e){return this}static transform(){return null}remove(e){WJ(this,!0,e)}replace(e,t){JQ();let n=RQ();null!==n&&(n=n.clone()),wK(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;AG(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,h=r.__next,p=r.__parent;if(WJ(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=d,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=h,a.__parent=p,s.__size=l,t&&(y0(this)&&y0(a)||iG(139),this.getChildren().forEach((e=>{a.append(e)}))),SQ(n)){YG(n);const e=n.anchor,t=n.focus;e.key===o&&_Q(e,a),t.key===o&&_Q(t,a)}return zG()===o&&IG(i),a}insertAfter(e,t=!0){JQ(),wK(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=RQ();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if(AG(r),SQ(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&SQ(i)){const e=this.getIndexWithinParent();FQ(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){JQ(),wK(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;AG(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=RQ();return t&&SQ(c)&&FQ(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return N0()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){JQ();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(y0(n))return n.select();if(!hQ(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){JQ();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(y0(n))return n.select(0,0);if(!hQ(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}class YJ extends VJ{static getType(){return"linebreak"}static clone(e){return new YJ(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&NK(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&ZJ(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&ZJ(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&NK(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&ZJ(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&ZJ(r))return!0}return!1}(e)?null:{conversion:XJ,priority:0}}}static importJSON(e){return qJ().updateFromJSON(e)}}function XJ(e){return{node:qJ()}}function qJ(){return xK(new YJ)}function UJ(e){return e instanceof YJ}function ZJ(e){return TG(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function GJ(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function KJ(e,t){return 1&t?"strong":2&t?"em":"span"}function JJ(e,t,n,r,o){const i=r.classList;let a=sK(o,"base");void 0!==a&&i.add(...a),a=sK(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in QZ){const r=QZ[e];if(a=sK(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function QJ(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?XZ:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||OZ){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function eQ(e,t,n,r,o,i){QJ(o,e,t);const a=i.theme.text;void 0!==a&&JJ(0,0,r,e,a)}function tQ(e,t){const n=document.createElement(t);return n.appendChild(e),n}class nQ extends VJ{static getType(){return"text"}static clone(e){return new nQ(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return oG[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===zG()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=QZ[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return DG(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=GJ(0,n),o=KJ(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),eQ(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=GJ(0,o),s=GJ(0,i),l=KJ(0,o),c=KJ(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&iG(48);const o=document.createElement(c);return eQ(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&iG(49)),QJ(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&JJ(0,o,i,u,d);const h=e.__style,p=this.__style;return h!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:sQ,priority:0}),b:()=>({conversion:oQ,priority:0}),code:()=>({conversion:uQ,priority:0}),em:()=>({conversion:uQ,priority:0}),i:()=>({conversion:uQ,priority:0}),s:()=>({conversion:uQ,priority:0}),span:()=>({conversion:rQ,priority:0}),strong:()=>({conversion:uQ,priority:0}),sub:()=>({conversion:uQ,priority:0}),sup:()=>({conversion:uQ,priority:0}),u:()=>({conversion:uQ,priority:0})}}static importJSON(e){return dQ().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return MK(t)||iG(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=tQ(t,"b")),this.hasFormat("italic")&&(t=tQ(t,"i")),this.hasFormat("strikethrough")&&(t=tQ(t,"s")),this.hasFormat("underline")&&(t=tQ(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?QZ[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?eG[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=DG(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=rG[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){JQ();let n=e,r=t;const o=RQ(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!SQ(o))return LQ(a,n,a,r,"text","text");{const e=zG();e!==o.anchor.key&&e!==o.focus.key||IG(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=RQ();if(r&&SQ(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){JQ();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=zG(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],d=t.getParent();let h;const p=t.getFormat(),f=t.getStyle(),m=t.__detail;let g=!1;t.isSegmented()?(h=dQ(u),h.__format=p,h.__style=f,h.__detail=m,g=!0):(h=t.getWritable(),h.__text=u);const v=RQ(),y=[h];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=dQ(t).getWritable();i.__format=p,i.__style=f,i.__detail=m;const s=i.__key,l=b+n;if(SQ(v)){const e=v.anchor,t=v.focus;e.key===r&&"text"===e.type&&e.offset>b&&e.offset<=l&&(e.key=s,e.offset-=b,v.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,v.dirty=!0)}o===r&&IG(s),b=l,y.push(i)}if(null!==d){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&LG(t),null!==n&&LG(n)}(this);const e=d.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),SQ(v)&&FQ(v,d,t,c-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||iG(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;zG()===r&&IG(n);const a=RQ();if(SQ(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(HQ(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(HQ(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function rQ(e){return{forChild:pQ(e.style),node:null}}function oQ(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:pQ(t.style,n?void 0:"bold"),node:null}}const iQ=new WeakMap;function aQ(e){if(!MK(e))return!1;if("PRE"===e.nodeName)return!0;const t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}function sQ(e){const t=e;null===e.parentElement&&iG(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=iQ.get(n))&&!aQ(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)iQ.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(qJ()):"\t"===r?t.push(mQ()):""!==r&&t.push(dQ(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=lQ(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=lQ(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:dQ(n)}}function lQ(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,MK(n)){const e=n.style.display;if(""===e&&!TK(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(TG(n))return n;if("BR"===n.nodeName)return null}}const cQ={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function uQ(e){const t=cQ[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:pQ(e.style,t),node:null}}function dQ(e=""){return xK(new nQ(e))}function hQ(e){return e instanceof nQ}function pQ(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>hQ(e)?(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}class fQ extends nQ{static getType(){return"tab"}static clone(e){return new fQ(e.__key)}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),n=sK(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}static importJSON(e){return mQ().updateFromJSON(e)}setTextContent(e){return"\t"!==e&&""!==e&&iG(126),super.setTextContent(e)}setDetail(e){return 2!==e&&iG(127),this}setMode(e){return"normal"!==e&&iG(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function mQ(){return xK(new fQ)}function gQ(e){return e instanceof fQ}class vQ{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(y0(t)){const e=t.getDescendantByIndex(r);t=null!=e?e:t}if(y0(n)){const e=n.getDescendantByIndex(o);n=null!=e?e:n}return t===n?r<o:t.isBefore(n)}getNode(){const e=RG(this.key);return null===e&&iG(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,KQ()||(zG()===o&&IG(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function yQ(e,t,n){return new vQ(e,t,n)}function bQ(e,t){let n=t.__key,r=e.offset,o="element";if(hQ(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!y0(t)){const e=t.getNextSibling();if(hQ(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function _Q(e,t){if(y0(t)){const n=t.getLastDescendant();y0(n)||hQ(n)?bQ(e,n):bQ(e,t)}else bQ(e,t)}function xQ(e,t,n,r){e.key=t,e.offset=n,e.type=r}class wQ{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!CQ(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new wQ(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(hQ(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=RG(e);null!==t&&n.push(t)}return KQ()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function SQ(e){return e instanceof kQ}class kQ{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!SQ(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=y0(a)&&o.offset>0&&o.offset>=a.getChildrenSize(),c=o.offset,u=i.offset;if(y0(a)){const e=a.getDescendantByIndex(c);a=null!=e?e:a}if(y0(s)){let e=s.getDescendantByIndex(u);null!==e&&e!==a&&s.getChildAtIndex(u)===e&&(e=e.getPreviousSibling()),s=null!=e?e:s}let d;if(a.is(s))d=y0(a)&&a.getChildrenSize()>0?[]:[a];else if(d=a.getNodesBetween(s),l){const e=d.findIndex((e=>!e.is(a)&&!e.isBefore(a)));d.splice(0,e)}return KQ()||(this._cachedNodes=d),d}setTextNodeRange(e,t,n,r){xQ(this.anchor,e.__key,t,"text"),xQ(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=MQ(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(y0(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,hQ(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):d===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!x0(d)&&!UJ(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=t0(),n=t.getEditorState()._selection,r=DQ(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;xQ(this.anchor,o.key,o.offset,o.type),xQ(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new kQ(yQ(e.key,e.offset,e.type),yQ(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=DG(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=QZ[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(qJ()):"\t"===r?n.push(mQ()):n.push(dQ(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=dQ(),s=S0(o)?N0().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let d=c[0];hQ(d)||iG(26);const h=d.getTextContent().length,p=d.getParentOrThrow();let f=c[u-1];if(1===u&&"element"===a.type&&(l=h,a.set(i.key,l,"text")),this.isCollapsed()&&s===h&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(hQ(t)&&t.canInsertTextBefore()&&!OG(t)||(t=dQ(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(hQ(t)&&!OG(t)||(t=dQ(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&s!==h){const e=dQ(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=f.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||y0(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),NQ(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(d.isToken()){const t=dQ(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(s!==l||t===r&&n===o){if(gQ(d)){const t=dQ(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=dQ(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)d.insertBefore(t,!1);else{const[e]=d.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-s;d=d.spliceText(s,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...f.getParentKeys()]),n=y0(d)?d:d.getParentOrThrow();let r=y0(f)?f:f.getParentOrThrow(),o=f;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===f.getTextContent())||"element"===a.type&&f.getIndexWithinParent()<l)if(hQ(f)&&!f.isToken()&&l!==f.getTextContentSize()){if(f.isSegmented()){const e=dQ(f.getTextContent());f.replace(e),f=e}S0(a.getNode())||"text"!==a.type||(f=f.spliceText(0,l,"")),t.add(f.__key)}else{const e=f.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?f.remove():e.remove()}else t.add(f.__key);const i=r.getChildren(),p=new Set(c),m=n.is(r),g=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||y0(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(o)?m||g.insertAfter(t,!1):t.remove())}if(!m){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(d.isToken())if(s===h)d.select();else{const t=dQ(e);t.select(),d.replace(t)}else d=d.spliceText(s,h-s,e,!0),""===d.getTextContent()?d.remove():d.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){if(this.isCollapsed())return;const{anchor:e,focus:t}=this,n=this.getNodes(),r=this.isBackward()?t:e,o=this.isBackward()?e:t;let i=r.getNode(),a=o.getNode();const s=AK(i,DK),l=AK(a,DK);hQ(i)&&i.isToken()&&r.offset<i.getTextContentSize()&&(r.offset=0),o.offset>0&&hQ(a)&&a.isToken()&&(o.offset=a.getTextContentSize());for(const e of n)vK(i,e)||vK(a,e)||e.getKey()===i.getKey()||e.getKey()===a.getKey()||e.remove();const c=(e,t)=>{if(""===e.getTextContent())e.remove();else if(0!==t&&OG(e)){const t=dQ(e.getTextContent());return t.setFormat(e.getFormat()),t.setStyle(e.getStyle()),e.replace(t)}};if(i===a&&hQ(i)){const n=Math.abs(t.offset-e.offset);return i.spliceText(r.offset,n,"",!0),void c(i,n)}if(hQ(i)){const e=i.getTextContentSize()-r.offset;i.spliceText(r.offset,e,""),i=c(i,e)||i}hQ(a)&&(a.spliceText(0,o.offset,""),a=c(a,o.offset)||a),i.isAttached()&&hQ(i)?i.selectEnd():a.isAttached()&&hQ(a)&&a.selectStart(),y0(s)&&y0(l)&&s!==l&&(s.append(...l.getChildren()),l.remove(),o.set(r.key,r.offset,r.type))}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void IG(null);const n=this.getNodes(),r=[];for(const e of n)hQ(e)&&r.push(e);const o=t=>{n.forEach((n=>{if(y0(n)){const r=n.getFormatFlags(e,t);n.setTextFormat(r)}}))},i=r.length;if(0===i)return this.toggleFormat(e),IG(null),void o(t);const a=this.anchor,s=this.focus,l=this.isBackward(),c=l?s:a,u=l?a:s;let d=0,h=r[0],p="element"===c.type?0:c.offset;if("text"===c.type&&p===h.getTextContentSize()&&(d=1,h=r[1],p=0),null==h)return;const f=h.getFormatFlags(e,t);o(f);const m=i-1;let g=r[m];const v="text"===u.type?u.offset:g.getTextContentSize();if(h.is(g)){if(p===v)return;if(OG(h)||0===p&&v===h.getTextContentSize())h.setFormat(f);else{const e=h.splitText(p,v),t=0===p?e[0]:e[1];t.setFormat(f),"text"===c.type&&c.set(t.__key,0,"text"),"text"===u.type&&u.set(t.__key,v-p,"text")}return void(this.format=f)}0===p||OG(h)||([,h]=h.splitText(p),p=0),h.setFormat(f);const y=g.getFormatFlags(e,f);v>0&&(v===g.getTextContentSize()||OG(g)||([g]=g.splitText(v)),g.setFormat(y));for(let t=d+1;t<m;t++){const n=r[t],o=n.getFormatFlags(e,y);n.setFormat(o)}"text"===c.type&&c.set(h.__key,p,"text"),"text"===u.type&&u.set(g.__key,v,"text"),this.format=f|y}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=RQ();return SQ(t)||iG(134),t.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),n=AK(t,DK),r=e[e.length-1];if(y0(n)&&"__language"in n){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const t=WQ(this);n.splice(t,0,e),r.selectEnd()}return}if(!e.some((e=>(y0(e)||x0(e))&&!e.isInline()))){y0(n)||iG(211,t.constructor.name,t.getType());const o=WQ(this);return n.splice(o,0,e),void r.selectEnd()}const o=function(e){const t=N0();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=UJ(o);if(i||x0(o)&&o.isInline()||y0(o)&&o.isInline()||hQ(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),i=o.getLastDescendant(),a=o.getChildren(),s=y0(n)&&n.isEmpty()?null:this.insertParagraph(),l=a[a.length-1];let c=a[0];var u;y0(u=c)&&DK(u)&&!u.isEmpty()&&y0(n)&&(!n.isEmpty()||n.canMergeWhenEmpty())&&(y0(n)||iG(211,t.constructor.name,t.getType()),n.append(...c.getChildren()),c=a[1]),c&&(null===n&&iG(212,t.constructor.name,t.getType()),function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||iG(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(n,c));const d=AK(i,DK);s&&y0(d)&&(s.canMergeWhenEmpty()||DK(l))&&(d.append(...s.getChildren()),s.remove()),y0(n)&&n.isEmpty()&&n.remove(),i.selectEnd();const h=y0(n)?n.getLastChild():null;UJ(h)&&d!==n&&h.remove()}insertParagraph(){if("root"===this.anchor.key){const e=N0();return WG().splice(this.anchor.offset,0,[e]),e.select(),e}const e=WQ(this),t=AK(this.anchor.getNode(),DK);y0(t)||iG(213);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=qJ();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=MQ(this);if(0===t)return[];if(1===t){if(hQ(i)&&!this.isCollapsed()){const e=s>l?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(hQ(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(hQ(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=uK(r,t);if(x0(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=IQ();return e.add(a.__key),void YG(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(hQ(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return y0(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=t0(),l=CK(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!y0(a)||a.isInline()||a.canBeEmpty()||kK(c,s,u),function(e,t,n,r){e.modify(t,n,r)}(l,e,t?"backward":"forward",n),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=S0(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(_K(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e<n.length;e++){const t=n[e];vK(t,r)?o.push(t):i=!0}if(i&&o.length>0)if(t){const e=o[0];y0(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];y0(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;xQ(n,t.key,t.offset,t.type),xQ(t,r,o,i),e._cachedNodes=null}(this)}}}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&y0(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(y0(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=uK(r,e);if(x0(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&y0(n)&&0===n.getChildrenSize()){n.remove();const e=IQ();e.add(o.__key),YG(e)}else o.remove(),t0().dispatchCommand(IU,void 0);return}if(!e&&y0(o)&&y0(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void PQ(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void PQ(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(UG(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&S0(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),this.isCollapsed()&&0===this.anchor.offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function CQ(e){return e instanceof wQ}function EQ(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function MQ(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[EQ(n),EQ(r)]}function PQ(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function OQ(e,t,n,r){let o,i=t;if(MK(e)){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],d=!1;if(u===c)u=s[i+1],d=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=XG(u),hQ(o))i=qG(o,a);else{let s=XG(e);if(null===s)return null;if(y0(s)){const l=r.getElementByKey(s.getKey());null===l&&iG(214);const c=s.getDOMSlot(l);[s,i]=c.resolveChildIndex(s,l,e,t),y0(s)||iG(215),a&&i>=s.getChildrenSize()&&(i=Math.max(0,s.getChildrenSize()-1));let u=s.getChildAtIndex(i);if(y0(u)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){const e=a?u.getLastDescendant():u.getFirstDescendant();null===e?s=u:(u=e,s=y0(u)?u:u.getParentOrThrow()),i=0}hQ(u)?(o=u,s=null,i=qG(u,a)):u!==s&&a&&!d&&(y0(s)||iG(216),i=Math.min(s.getChildrenSize(),i+1))}else{const n=s.getIndexWithinParent();i=0===t&&x0(s)&&XG(e)===s?n:n+1,s=s.getParentOrThrow()}if(y0(s))return yQ(s.__key,i,"element")}}else o=XG(e);return hQ(o)?yQ(o.__key,i,"text"):null}function TQ(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&y0(i)&&i.isInline()){const t=i.getPreviousSibling();hQ(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else y0(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):hQ(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&y0(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&y0(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();hQ(t)&&(e.key=t.__key,e.offset=0)}}}function NQ(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);TQ(e,r,o),TQ(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=t0();if(i.isComposing()&&i._compositionKey!==e.key&&SQ(n)){const r=n.anchor,o=n.focus;xQ(e,r.key,r.offset,r.type),xQ(t,o.key,o.offset,o.type)}}}function DQ(e,t,n,r,o,i){if(null===e||null===n||!CG(o,e,n))return null;const a=OQ(e,t,SQ(i)?i.anchor:null,o);if(null===a)return null;const s=OQ(n,r,SQ(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=XG(e),r=XG(n);if(x0(t)&&x0(r))return null}return NQ(a,s,i),[a,s]}function AQ(e){return y0(e)&&!e.isInline()}function LQ(e,t,n,r,o,i){const a=e0(),s=new kQ(yQ(e,t,o),yQ(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function IQ(){return new wQ(new Set)}function zQ(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!sG&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,d,h;if(SQ(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,h=t.focusOffset,s&&SQ(e)&&!CG(n,c,u))return e.clone();const p=DQ(c,d,u,h,n,e);if(null===p)return null;const[f,m]=p;return new kQ(f,m,SQ(e)?e.format:0,SQ(e)?e.style:"")}function RQ(){return e0()._selection}function $Q(){return t0()._editorState._selection}function FQ(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),jQ(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,d=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}jQ(e)}function jQ(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!y0(i))return;const e=i.getChildrenSize(),o=n>=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(hQ(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(y0(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(hQ(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(y0(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(hQ(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function BQ(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,hQ(r)?(a=r.getTextContentSize(),s="text"):y0(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,hQ(o)?s="text":y0(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function HQ(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function WQ(e){let t=e;e.isCollapsed()||t.removeText();const n=RQ();SQ(n)&&(t=n),SQ(t)||iG(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!DK(o);)[o,i]=VQ(o,i);return i}function VQ(e,t){const n=e.getParent();if(!n){const e=N0();return WG().append(e),e.select(),[WG(),0]}if(hQ(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!y0(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new kQ(yQ(e.__key,t,"element"),yQ(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let YQ=null,XQ=null,qQ=!1,UQ=!1,ZQ=0;const GQ={characterData:!0,childList:!0,subtree:!0};function KQ(){return qQ||null!==YQ&&YQ._readOnly}function JQ(){qQ&&iG(13)}function QQ(){ZQ>99&&iG(14)}function e0(){return null===YQ&&iG(195,n0()),YQ}function t0(){return null===XQ&&iG(196,n0()),XQ}function n0(){let e=0;const t=new Set,n=I0.version;if("undefined"!=typeof window)for(const r of document.querySelectorAll("[contenteditable]")){const o=PG(r);if(EG(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function r0(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&iG(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e<a&&(i[e](t),t.isAttached());e++);}function o0(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function i0(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const e of r)n.add(e)}function a0(e){return s0(e,t0()._nodes)}function s0(e,t){const n=e.type,r=t.get(n);void 0===r&&iG(17,n);const o=r.klass;e.type!==o.getType()&&iG(18,o.name);const i=o.importJSON(e),a=e.children;if(y0(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=s0(a[e],t);i.append(n)}return i}function l0(e,t,n){const r=YQ,o=qQ,i=XQ;YQ=t,qQ=!0,XQ=e;try{return n()}finally{YQ=r,qQ=o,XQ=i}}function c0(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=YQ,u=qQ,d=XQ,h=e._updating,p=e._observer;let f=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){XQ=e,YQ=n,qQ=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),f=function(e,t,n,r,o,i){KK="",tJ="",JK="",nJ=2===r,oJ=null,HK=n,BK=n._config,WK=n._nodes,VK=HK._listeners.mutation,YK=o,XK=i,qK=e._nodeMap,UK=t._nodeMap,rJ=t._readOnly,ZK=new Map(n._keyToDOMMap);const a=new Map;return GK=a,vJ("root",null),HK=void 0,WK=void 0,YK=void 0,XK=void 0,qK=void 0,UK=void 0,BK=void 0,ZK=void 0,GK=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),UQ)throw t;return A0(e,null,r,n),gG(e),e._dirtyType=2,UQ=!0,c0(e,i),void(UQ=!1)}finally{p.observe(r,GQ),e._updating=h,YQ=c,qQ=u,XQ=d}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,g=e._dirtyElements,v=e._normalizedNodes,y=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=BG(e)),delete r[i])}(e,n);const _=o?null:CK(e._window);if(e._editable&&null!==_&&(l||null===s||s.dirty)&&null!==r&&!y.has("skip-dom-selection")){XQ=e,YQ=n;try{if(null!==p&&p.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&kK(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&kG(u))return;if(!SQ(t))return void(null!==e&&CG(n,a,s)&&r.removeAllRanges());const d=t.anchor,h=t.focus,p=d.key,f=h.key,m=fK(n,p),g=fK(n,f),v=d.offset,y=h.offset,b=t.format,_=t.style,x=t.isCollapsed();let w=m,S=g,k=!1;if("text"===d.type){w=NG(m);const e=d.getNode();k=e.getFormat()!==b||e.getStyle()!==_}else SQ(e)&&"text"===e.anchor.type&&(k=!0);var C,E,M,P,O;if("text"===h.type&&(S=NG(g)),null!==w&&null!==S&&(x&&(null===e||k||SQ(e)&&(e.format!==b||e.style!==_))&&(C=b,E=_,M=v,P=p,O=performance.now(),DJ=[C,E,M,P,O]),l!==v||c!==y||a!==w||s!==S||"Range"===r.type&&x||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===d.type))){try{r.setBaseAndExtent(w,v,S,y)}catch(e){}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=SQ(t)&&"element"===t.anchor.type?w.childNodes[v]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=gK(n),o=yK(r);if(null===r||null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=bK(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=mK(c)}}(n,t,i)}}PJ=!0}}(a,s,e,_,y,r)}(function(e,t,n){let r=e._blockCursorElement;if(SQ(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())SK(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(null!==t&&SK(t)){const n=t.getPreviousSibling();(null===n||SK(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=aG(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&kK(r,e,t)})(e,r,s),null!==p&&p.observe(r,GQ)}finally{XQ=d,YQ=c}}null!==f&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,f,y,m,i),SQ(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(IU,void 0);const x=e._pendingDecorators;null!==x&&(e._decorators=x,e._pendingDecorators=null,u0("decorator",e,!0,x)),function(e,t,n){const r=HG(t),o=HG(n);r!==o&&u0("textcontent",e,!0,o)}(e,t||i,n),u0("update",e,!0,{dirtyElements:g,dirtyLeaves:m,editorState:n,normalizedNodes:v,prevEditorState:t||i,tags:y}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;p0(e,t,r)}}}(e)}function u0(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function d0(e,t,n){if(!1===e._updating||XQ!==e){let r=!1;return e.update((()=>{r=d0(e,t,n)})),r}const r=ZG(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function h0(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i;if(void 0!==o){if(i=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&iG(191),t._flushSync=!0}i&&e._deferred.push(i),i0(e,o.tag)}n()}}return r}function p0(e,t,n){const r=e._updateTags;let o,i=!1,a=!1;void 0!==n&&(o=n.onUpdate,i0(e,n.tag),i=n.skipTransforms||!1,a=n.discrete||!1),o&&e._deferred.push(o);const s=e._editorState;let l=e._pendingEditorState,c=!1;(null===l||l._readOnly)&&(l=e._pendingEditorState=k0(l||s),c=!0),l._flushSync=a;const u=YQ,d=qQ,h=XQ,p=e._updating;YQ=l,qQ=!1,e._updating=!0,XQ=e;try{c&&(e._headless?null!==s._selection&&(l._selection=s._selection.clone()):l._selection=function(e){const t=e.getEditorState()._selection,n=CK(e._window);return SQ(t)||null==t?zQ(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),i=h0(e,i),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(SQ(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(l,e),0!==e._dirtyType&&(i?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);hQ(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&bG(t)}}(l,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=zG(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);hQ(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&bG(r),void 0!==r&&o0(r,i)&&r0(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){ZQ++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&o0(l,i)&&r0(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,ZQ++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),h0(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(y0(t)&&jK(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(s,l,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(l._flushSync=!0);const r=l._selection;if(SQ(r)){const e=l._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||iG(19)}else CQ(r)&&0===r._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void c0(e)}finally{YQ=u,qQ=d,XQ=h,e._updating=p,ZQ=0}const f=0!==e._dirtyType||e._deferred.length>0||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(l,e);f?l._flushSync?(l._flushSync=!1,c0(e)):c&&SG((()=>{c0(e)})):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function f0(e,t,n){e._updating?e._updates.push([t,n]):p0(e,t,n)}class m0{constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new m0(this.element,e,this.after)}withAfter(e){return new m0(this.element,this.before,e)}withElement(e){return new m0(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&iG(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&iG(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&iG(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(null===e)this.removeManagedLineBreak();else{const t="decorator"===e&&(DZ||NZ);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}const n=this.element,r=this.before,o=document.createElement("br");if(n.insertBefore(o,r),e){const e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",n.insertBefore(e,o),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){const t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}const o=g0(t,n);o.push(r);const i=g0(t,this.element);let a=e.getIndexWithinParent();for(let e=0;e<i.length;e++){const t=o[e],n=i[e];if(void 0===t||t<n)break;if(t>n){a+=1;break}}return[e.getParentOrThrow(),a]}}function g0(e,t){const n=[];let r=t;for(;r!==e&&null!==r;r=t.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=r.previousSibling)e++;n.push(e)}return r!==e&&iG(225),n.reverse()}class v0 extends VJ{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return nG[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=t0()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(hQ(t)&&e.push(t),y0(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;y0(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;y0(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return y0(e)&&e.getLastDescendant()||e||null}const r=t[e];return y0(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:RG(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&iG(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:RG(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&iG(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),y0(o)&&r!==n-1&&!o.isInline()&&(e+=qZ)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),y0(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){const t=tG[e];return!!(this.getFormat()&t)}return!1}hasTextFormat(e){const t=QZ[e];return!!(this.getTextFormat()&t)}getFormatFlags(e,t){return DG(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){JQ();const n=RQ();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(hQ(e)||y0(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(hQ(e)||y0(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return SQ(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):LQ(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?tG[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable();e+t<=o||iG(226,String(e),String(t),String(o));const a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,d=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n<t;n++){null===e&&iG(100);const t=e.getNextSibling(),n=e.__key;AG(e.getWritable()),l.push(n),e=t}}let h=u;for(let e=0;e<r;e++){const t=n[e];null!==h&&t.is(h)&&(u=h=h.getPreviousSibling());const r=t.getWritable();r.__parent===a&&d--,AG(r);const o=t.__key;if(null===h)i.__first=o,r.__prev=null;else{const e=h.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&iG(76),r.__parent=a,s.push(o),h=t}if(e+t===o)null!==h&&(h.getWritable().__next=null,i.__last=h.__key);else if(null!==c){const e=c.getWritable();if(null!==h){const t=h.getWritable();e.__prev=h.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=d,l.length){const e=RQ();if(SQ(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;b0(r,t,n)&&BQ(r,r.getNode(),this,u,c),b0(o,t,n)&&BQ(o,o.getNode(),this,u,c),0!==d||this.canBeEmpty()||_K(this)||this.remove()}}return i}getDOMSlot(e){return new m0(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(MK(t)){const e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px")}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0!==t&&(e.textFormat=t),""!==n&&(e.textStyle=n),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const n=this.getDOMSlot(e);let r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){const o=t.getElementByKey(e.getKey());null!==o&&(null==r?(n.insertChild(o),r=o):r!==o&&n.replaceChild(o,r),r=r.nextSibling)}}}function y0(e){return e instanceof v0}function b0(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class _0 extends VJ{decorate(e,t){iG(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function x0(e){return e instanceof _0}class w0 extends v0{static getType(){return"root"}static clone(){return new w0}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){iG(51)}getTextContent(){const e=this.__cachedText;return!KQ()&&0!==t0()._dirtyType||null===e?super.getTextContent():e}remove(){iG(52)}replace(e){iG(53)}insertBefore(e){iG(54)}insertAfter(e){iG(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];y0(n)||x0(n)||iG(56)}return super.append(...e)}static importJSON(e){return WG().updateFromJSON(e)}collapseAtStart(){return!0}}function S0(e){return e instanceof w0}function k0(e){return new M0(new Map(e._nodeMap))}function C0(){return new M0(new Map([["root",new w0]]))}function E0(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&iG(130,n.name),y0(e)){const r=t.children;Array.isArray(r)||iG(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=E0(o[e]);r.push(t)}}return t}class M0{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return l0(t&&t.editor||null,this,e)}clone(e){const t=new M0(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return l0(null,this,(()=>({root:E0(WG())})))}}class P0 extends v0{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class O0 extends v0{static getType(){return"paragraph"}static clone(e){return new O0(e.__key)}createDOM(e){const t=document.createElement("p"),n=sK(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:T0,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(MK(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return N0().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){const n=N0();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||hQ(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function T0(e){const t=N0();return e.style&&(t.setFormat(e.style.textAlign),$K(e,t)),{node:t}}function N0(){return xK(new O0)}function D0(e){return e instanceof O0}function A0(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=C0(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}function L0(e){const t=e||{},n=XQ,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=C0(),s=t.namespace||(null!==o?o._config.namespace:GG()),l=t.editorState,c=[w0,nQ,YJ,fQ,O0,P0,...t.nodes||[]],{onError:u,html:d}=t,h=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),p.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const f=new I0(a,o,p,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)})),t&&o(t),n}(p,d?d.import:void 0),h);return void 0!==l&&(f._pendingEditorState=l,f._dirtyType=2),f}class I0{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=GG(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&iG(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&iG(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0!==i&&i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&iG(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=zK(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}return function(e,t){const n=zK(e.getEditorState()),r=[];for(const e of t){const t=n.get(e);t&&r.push(t)}0!==r.length&&e.update((()=>{for(const e of r)for(const t of e.keys()){const e=RG(t);e&&e.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,r.map((e=>e.klass.getType()))),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return hK(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=sK(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,A0(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=MJ.get(t);void 0===n&&iG(162);const r=n-1;r>=0||iG(164),MJ.set(t,r),0===r&&t.removeEventListener("selectionchange",jJ);const o=PG(e);EG(o)?(function(e){if(null!==e._parentEditor){const t=ZG(e),n=t[t.length-1]._key;FJ.get(n)===e&&FJ.delete(n)}else FJ.delete(e._key)}(o),e.__lexicalEditor=null):o&&iG(198);const i=$J(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=yK(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,gG(this),this._updateTags.add("history-merge"),c0(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=MJ.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",jJ),MJ.set(n,(r||0)+1),e.__lexicalEditor=t;const o=$J(e);for(let n=0;n<wJ.length;n++){const[r,i]=wJ[n],a="function"==typeof i?e=>{HJ(e)||(BJ(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(HJ(e))return;BJ(e);const n=t.isEditable();switch(r){case"cut":return n&&hK(t,vZ,e);case"copy":return hK(t,gZ,e);case"paste":return n&&hK(t,HU,e);case"dragstart":return n&&hK(t,pZ,e);case"dragover":return n&&hK(t,fZ,e);case"dragend":return n&&hK(t,mZ,e);case"focus":return n&&hK(t,SZ,e);case"blur":return n&&hK(t,kZ,e);case"drop":return n&&hK(t,dZ,e)}};e.addEventListener(r,a),o.push((()=>{e.removeEventListener(r,a)}))}}(e,this),null!=n&&e.classList.add(...n)}else this._window=null,this._updateTags.add("history-merge"),c0(this);u0("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&iG(38);let n=e;n._readOnly&&(n=k0(e),n._selection=e._selection?e._selection.clone():null),mG(this);const r=this._pendingEditorState,o=this._updateTags,i=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=i&&o.add(i),c0(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=i&&o.add(i),this._updating||c0(this)}parseEditorState(e,t){return function(e,t,n){const r=C0(),o=YQ,i=qQ,a=XQ,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,YQ=r,qQ=!1,XQ=t;try{const o=t._nodes;s0(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,YQ=o,qQ=i,XQ=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return c0(this),this.getEditorState().read(e,{editor:this})}update(e,t){f0(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),f0(this,(()=>{const e=RQ(),n=WG();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=CK(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,u0("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}I0.version="0.23.1+prod.esm";class z0 extends nQ{constructor(e,t){super(e,t)}static getType(){return"extended-text"}static clone(e){return new z0(e.__text,e.__key)}static importDOM(){const e=nQ.importDOM();return{...e,code:()=>({conversion:R0(e?.code),priority:1}),em:()=>({conversion:R0(e?.em),priority:1}),span:()=>({conversion:R0(e?.span),priority:1}),strong:()=>({conversion:R0(e?.strong),priority:1}),sub:()=>({conversion:R0(e?.sub),priority:1}),sup:()=>({conversion:R0(e?.sup),priority:1})}}static importJSON(e){return nQ.importJSON(e)}isSimpleText(){return("text"===this.__type||"extended-text"===this.__type)&&0===this.__mode}exportJSON(){return{...super.exportJSON(),type:"extended-text",version:1}}}function R0(e){return t=>{const n=e?.(t);if(!n)return null;const r=n.conversion(t);if(!r)return r;const o=t.style.backgroundColor,i=t.style.color,a=t.style.fontFamily,s=t.style.fontWeight,l=t.style.fontSize,c=t.style.textDecoration;return{...r,forChild:(e,t)=>{const n=r?.forChild??(e=>e),u=n(e,t);if(hQ(u)){const e=[o?`background-color: ${o}`:null,i?`color: ${i}`:null,a?`font-family: ${a}`:null,s?`font-weight: ${s}`:null,l?`font-size: ${l}`:null,c?`text-decoration: ${c}`:null].filter((e=>null!=e)).join("; ");if(e.length)return u.setStyle(e)}return u}}}}var $0=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const F0=new Map;function j0(e){const t={};if(!e)return t;const n=e.split(";");for(const e of n)if(""!==e){const[n,r]=e.split(/:([^]+)/);n&&r&&(t[n.trim()]=r.trim())}return t}function B0(e){let t=F0.get(e);return void 0===t&&(t=j0(e),F0.set(e,t)),t}function H0(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=MQ(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,d=0;return o?(d=n>r?r:n,u=n>r?n:r):l?(d=i?r:n,u=void 0):c&&(d=0,u=i?n:r),t.__text=t.__text.slice(d,u),t}}return t}function W0(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return y0(t)||$0(177),e.offset===t.getChildrenSize()}function V0(e){const t=e.getStyle(),n=j0(t);F0.set(t,n)}function Y0(e,t){const n=B0("getStyle"in e?e.getStyle():e.style),r=Object.entries(t).reduce(((t,[r,o])=>("function"==typeof o?t[r]=o(n[r],e):null===o?delete t[r]:t[r]=o,t)),{...n}||{}),o=function(e){let t="";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}(r);e.setStyle(o),F0.set(o,r)}function X0(e,t){e.isCollapsed()&&SQ(e)?Y0(e,t):function(e){const t=RQ();if(!SQ(t))return;const n=t.getNodes(),r=n.length,{anchor:o,focus:i}=t,a=r-1;let s=n[0],l=n[a];const c=s.getTextContent().length,u=i.offset;let d=o.offset;const h=o.isBefore(i);let p=h?d:u,f=h?u:d;const m=h?o.type:i.type,g=h?i.type:o.type,v=h?i.key:o.key;if(hQ(s)&&p===c){const e=s.getNextSibling();hQ(e)&&(d=0,p=0,s=e)}if(1===n.length){if(hQ(s)&&s.canHaveFormat()){if(p="element"===m?0:d>u?u:d,f="element"===g?c:d>u?d:u,p===f)return;if(OG(s)||0===p&&f===c)e(s),s.select(p,f);else{const t=s.splitText(p,f),n=0===p?t[0]:t[1];e(n),n.select(0,f-p)}}}else{if(hQ(s)&&p<s.getTextContentSize()&&s.canHaveFormat()&&(0===p||OG(s)||(s=s.splitText(p)[1],p=0,h?o.set(s.getKey(),p,"text"):i.set(s.getKey(),p,"text")),e(s)),hQ(l)&&l.canHaveFormat()){const t=l.getTextContent().length;l.__key!==v&&0!==f&&(f=t),f===t||OG(l)||([l]=l.splitText(f)),0===f&&"element"!==g||e(l)}for(let t=1;t<a;t++){const r=n[t],o=r.getKey();hQ(r)&&r.canHaveFormat()&&o!==s.getKey()&&o!==l.getKey()&&!r.isToken()&&e(r)}}}((e=>{Y0(e,t)}))}function q0(e,t){if(null===e)return;const n=e.getStartEndPoints(),r=n?n[0]:null;if(null!==r&&"root"===r.key){const e=t(),n=WG(),r=n.getFirstChild();return void(r?r.replace(e,!0):n.append(e))}const o=e.getNodes(),i=null!==r&&function(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}(r.getNode(),J0);i&&-1===o.indexOf(i)&&o.push(i);for(let e=0;e<o.length;e++){const n=o[e];if(!J0(n))continue;y0(n)||$0(178);const r=t();r.setFormat(n.getFormatType()),r.setIndent(n.getIndent()),n.replace(r,!0)}}function U0(e,t){const n=uK(e.focus,t);return x0(n)&&!n.isIsolated()||y0(n)&&!n.isInline()&&!n.canBeEmpty()}function Z0(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(S0(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n,r){e.modify(t?"extend":"move",n,r)}(e,t,n?!r:r,"character")}function G0(e,t,n){const r=B0(e.getStyle());return null!==r&&r[t]||n}function K0(e,t,n=""){let r=null;const o=e.getNodes(),i=e.anchor,a=e.focus,s=e.isBackward(),l=s?a.offset:i.offset,c=s?a.getNode():i.getNode();if(SQ(e)&&e.isCollapsed()&&""!==e.style){const n=B0(e.style);if(null!==n&&t in n)return n[t]}for(let e=0;e<o.length;e++){const i=o[e];if((0===e||0!==l||!i.is(c))&&hQ(i)){const e=G0(i,t,n);if(null===r)r=e;else if(r!==e){r="";break}}}return null===r?n:r}function J0(e){if(x0(e))return!1;if(!y0(e)||_K(e))return!1;const t=e.getFirstChild(),n=null===t||UJ(t)||hQ(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}var Q0=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const e1="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,t1=e1&&"documentMode"in document?document.documentMode:null;e1&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);const n1=e1&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);e1&&"InputEvent"in window&&!t1&&new window.InputEvent("input"),e1&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),e1&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,e1&&/Android/.test(navigator.userAgent);e1&&/^(?=.*Chrome).*/i.test(navigator.userAgent);function r1(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}function o1(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}e1&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);function i1(e,...t){const n=r1(...t);n.length>0&&e.classList.add(...n)}function a1(e,...t){const n=r1(...t);n.length>0&&e.classList.remove(...n)}const s1=(e,t)=>{let n=e;for(;n!==WG()&&null!=n;){if(t(n))return n;n=n.getParent()}return null};function l1(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}let c1=!(n1||!e1)&&void 0;var u1,d1={exports:{}};u1||(u1=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(s)||(a[s]=i[s])}var c=r[e];return r[e]=a,o.languages.DFS(o.languages,(function(t,n){n===c&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=o.util.type(l);"Object"!==c||i[a(l)]?"Array"!==c||i[a(l)]||(i[a(l)]=!0,e(l,n,s,i)):(i[a(l)]=!0,e(l,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var l={element:t,language:i,grammar:a,code:t.textContent};function c(e){l.highlightedCode=e,o.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o.hooks.run("after-highlight",l),o.hooks.run("complete",l),r&&r.call(l.element)}if(o.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return o.hooks.run("complete",l),void(r&&r.call(l.element));if(o.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(o.highlight(l.code,l.grammar,l.language));else c(o.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new l;return c(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,l,d){for(var h in n)if(n.hasOwnProperty(h)&&n[h]){var p=n[h];p=Array.isArray(p)?p:[p];for(var f=0;f<p.length;++f){if(d&&d.cause==h+","+f)return;var m=p[f],g=m.inside,v=!!m.lookbehind,y=!!m.greedy,b=m.alias;if(y&&!m.pattern.global){var _=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,_+"g")}for(var x=m.pattern||m,w=r.next,S=l;w!==t.tail&&!(d&&S>=d.reach);S+=w.value.length,w=w.next){var k=w.value;if(t.length>e.length)return;if(!(k instanceof i)){var C,E=1;if(y){if(!(C=a(x,S,e,v))||C.index>=e.length)break;var M=C.index,P=C.index+C[0].length,O=S;for(O+=w.value.length;M>=O;)O+=(w=w.next).value.length;if(S=O-=w.value.length,w.value instanceof i)continue;for(var T=w;T!==t.tail&&(O<P||"string"==typeof T.value);T=T.next)E++,O+=T.value.length;E--,k=e.slice(S,O),C.index-=S}else if(!(C=a(x,0,k,v)))continue;M=C.index;var N=C[0],D=k.slice(0,M),A=k.slice(M+N.length),L=S+k.length;d&&L>d.reach&&(d.reach=L);var I=w.prev;if(D&&(I=c(t,I,D),S+=D.length),u(t,I,E),w=c(t,I,new i(h,g?o.tokenize(N,g):N,b,N)),A&&c(t,w,A),E>1){var z={cause:h+","+f,reach:L};s(e,t,n,w.prev,S,z),d&&z.reach>d.reach&&(d.reach=z.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var l in i.attributes)s+=" "+l+'="'+(i.attributes[l]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()}),!1),o):o;var d=o.util.currentScript();function h(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
91
|
+
*/(0,o))return NaN;return n*(r*tH+o*eH)}(o.timezone),isNaN(s)?n():oH(a+l+s,t?.in)}const uV={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},dV=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,hV=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,pV=/^([+-])(\d{2})(?::?(\d{2}))?$/;function fV(e){return e?parseInt(e):1}function mV(e){return e&&parseFloat(e.replace(",","."))||0}const gV=[31,null,31,30,31,30,31,31,30,31,30,31];function vV(e){return e%400==0||e%4==0&&e%100!=0}const yV={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};var bV;xd._date.override({_id:"date-fns",formats:function(){return yV},parse:function(e,t){if(null==e)return null;const n=typeof e;return"number"===n||e instanceof Date?e=oH(e):"string"===n&&(e="string"==typeof t?lV(e,t,new Date,this.options):cV(e,this.options)),yH(e)?e.getTime():null},format:function(e,t){return function(e,t,n){const r=cH(),o=n?.locale??r.locale??RH,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=oH(e,n?.in);if(!yH(s))throw new RangeError("Invalid time value");let l=t.match(cW).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,tW[t])(e,o.formatLong):e})).join("").match(lW).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:pW(e)};if(ZH[t])return{isToken:!0,value:e};if(t.match(hW))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;return(!n?.useAdditionalWeekYearTokens&&aW(i)||!n?.useAdditionalDayOfYearTokens&&iW(i))&&sW(i,t,String(e)),(0,ZH[i[0]])(s,i,o.localize,c)})).join("")}(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return sH(e,t);case"second":return function(e,t,n){return sH(e,1e3*t,n)}(e,t);case"minute":return function(e,t,n){const r=oH(e,n?.in);return r.setTime(r.getTime()+t*eH),r}(e,t);case"hour":return function(e,t,n){return sH(e,t*tH,n)}(e,t);case"day":return iH(e,t);case"week":return function(e,t,n){return iH(e,7*t,n)}(e,t);case"month":return aH(e,t);case"quarter":return function(e,t,n){return aH(e,3*t,n)}(e,t);case"year":return function(e,t,n){return aH(e,12*t,n)}(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return wH(e,t);case"second":return function(e,t,n){const r=wH(e,t)/1e3;return xH(n?.roundingMethod)(r)}(e,t);case"minute":return function(e,t,n){const r=wH(e,t)/eH;return xH(n?.roundingMethod)(r)}(e,t);case"hour":return function(e,t,n){const[r,o]=fH(n?.in,e,t),i=(+r-+o)/tH;return xH(n?.roundingMethod)(i)}(e,t);case"day":return bH(e,t);case"week":return function(e,t,n){const r=bH(e,t,n)/7;return xH(n?.roundingMethod)(r)}(e,t);case"month":return CH(e,t);case"quarter":return function(e,t,n){const r=CH(e,t,n)/3;return xH(n?.roundingMethod)(r)}(e,t);case"year":return EH(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return function(e,t){const n=oH(e,t?.in);return n.setMilliseconds(0),n}(e);case"minute":return function(e,t){const n=oH(e,t?.in);return n.setSeconds(0,0),n}(e);case"hour":return function(e,t){const n=oH(e,t?.in);return n.setMinutes(0,0,0),n}(e);case"day":return mH(e);case"week":return uH(e);case"isoWeek":return uH(e,{weekStartsOn:+n});case"month":return function(e,t){const n=oH(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e);case"quarter":return function(e,t){const n=oH(e,t?.in),r=n.getMonth(),o=r-r%3;return n.setMonth(o,1),n.setHours(0,0,0,0),n}(e);case"year":return MH(e);default:return e}},endOf:function(e,t){switch(t){case"second":return function(e,t){const n=oH(e,t?.in);return n.setMilliseconds(999),n}(e);case"minute":return function(e,t){const n=oH(e,t?.in);return n.setSeconds(59,999),n}(e);case"hour":return function(e,t){const n=oH(e,t?.in);return n.setMinutes(59,59,999),n}(e);case"day":return SH(e);case"week":return function(e,t){const n=cH(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=oH(e,t?.in),i=o.getDay(),a=6+(i<r?-7:0)-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}(e);case"month":return kH(e);case"quarter":return function(e,t){const n=oH(e,t?.in),r=n.getMonth(),o=r-r%3+3;return n.setMonth(o,0),n.setHours(23,59,59,999),n}(e);case"year":return function(e,t){const n=oH(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e);default:return e}}}),function(e){!function(e){e.isTypeLocation=e=>"object"==typeof e&&null!==e&&"string"==typeof e.type&&Array.isArray(e.coordinates)&&2===e.coordinates.length&&e.coordinates.every((e=>"number"==typeof e))}(e.api||(e.api={})),function(e){e.timeUnitsInSeconds={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3},e.unitMapper=e=>e<=10?"second":e<=120?"minute":e<=2160?"hour":e<=43200?"day":e<=50400?"week":e<=1296e3?"month":e<=9331200?"quarter":"year",e.getDiffInMinutes=(e,t)=>Math.abs(t.getTime()-e.getTime())/6e4,e.formatDateToEnUs=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0}).format(e)}(e.time||(e.time={})),function(e){e.hexToHSL=e=>{let t=0,n=0,r=0;if(4===e.length)t=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16);else{if(7!==e.length)throw new Error("Invalid HEX format");t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)}t/=255,n/=255,r/=255;const o=Math.max(t,n,r),i=Math.min(t,n,r);let a=0,s=0,l=(o+i)/2;if(o!==i){const e=o-i;switch(s=l>.5?e/(2-o-i):e/(o+i),o){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return{h:a,s:s,l:l}},e.hslToHex=(e,t,n)=>{const r=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e);let o,i,a;if(0===t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=r(l,s,e+1/3),i=r(l,s,e),a=r(l,s,e-1/3)}return`#${Math.round(255*o).toString(16).padStart(2,"0")}${Math.round(255*i).toString(16).padStart(2,"0")}${Math.round(255*a).toString(16).padStart(2,"0")}`},e.hexToRgb=e=>{let t=0,n=0,r=0;return 7===e.length&&(t=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),`${t}, ${n}, ${r}`}}(e.color||(e.color={}))}(bV||(bV={}));var _V="DraggableBar-module_bar__TpW1R";const xV=({x:t,y:n,maxX:r,minX:o,maxY:i,minY:a,height:l,style:c,onChange:u,onDown:d,onUp:h})=>{const p=s(null),f=s(!1),m=s(0),g=s(0),v=e=>{if(!f.current)return;const t=e.clientX-m.current,i=g.current+t;(!o||i>=o)&&(!r||i<=r)&&u?.({x:i,y:n})},y=()=>{f.current=!1,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",y),h?.()};return e("div",{ref:p,onMouseDown:e=>{f.current=!0,m.current=e.clientX,g.current=t,document.addEventListener("mousemove",v),document.addEventListener("mouseup",y),d?.()},className:_V,style:{...c,left:`${t}px`,bottom:`${n}px`,height:`${l}px`}})};qh.register(vf,xf,mp,Vf,Zp,pf,qp,QF,GB);var wV=a((({dateRange:n,annotationRange:r,data:o,showArrows:i=!0,onPan:a,onClickBar:c,onChangeDateRange:d,...h})=>{const p=s(null),[f,m]=u(null),[g,v]=u(null),y=()=>{const e=bV.time.getDiffInMinutes(n.from,n.to);return bV.time.unitMapper(e)},b=e=>{const t=p?.current?.scales.x.ticks;if(!t)return;const n=.1*t.length,r=y(),o=n*bV.time.timeUnitsInSeconds[r];a?.(e,o)},_={responsive:!0,onClick:e=>{const t=p.current;if(!t)return;const n=t.getElementsAtEventForMode(e,"nearest",{intersect:!0},!1);if(!n.length)return;const r=n[0],o=t.data?.labels?.[r.index];o&&c?.(new Date(o))},scales:{x:{type:"time",time:{unit:y(),displayFormats:{[y()]:"p"}},title:{display:!1},grid:{display:!1},border:{width:3,color:"#d5e3fa"}},y:{title:{display:!1},grid:{display:!1},border:{width:0},ticks:{padding:10},offset:!0,beginAtZero:!0}},plugins:{legend:{display:!1},annotation:{annotations:r?{selectedBox:{type:"box",drawTime:"beforeDraw",xMin:r?.from.toISOString(),xMax:r?.to.toISOString(),backgroundColor:"#eaf0fd",borderWidth:0}}:{}}}};l((()=>{p.current?.scales.y.right&&(m({x:p.current?.scales.y.right,y:30}),v({x:p.current?.width,y:30}))}),[]);const x=(e,t)=>{const r=p?.current?.scales?.x,o=r?.getValueForPixel(e?.x||0);o&&d?.({...n,[t]:new Date(o)})};return e(H,{dimensionX:"fill",alignment:"top",gap:0,prefix:{children:i&&e(_s,{variant:"filled",color:"transparent",className:z$,onClick:()=>b("left"),children:e(Za,{name:"chevronLeft",size:32})})},root:{dimensionX:"fill",dimensionY:"fill",children:t(B,{className:R$,dimensionX:"fill",dimensionY:"fill",children:[e(V,{className:`${$$} ${F$}`,children:bV.time.formatDateToEnUs(n.from)}),f&&e(xV,{x:f.x,y:f.y,minX:p.current?.scales.y.right,maxX:g?.x,height:p.current?.scales.y.height,onChange:m,onUp:()=>x(f,"from")}),e(Z$,{ref:p,options:_,data:o}),g&&e(xV,{x:g.x,y:g.y,minX:f?.x,maxX:p.current?.width,height:p.current?.scales.y.height,onChange:v,onUp:()=>x(g,"to")}),e(V,{className:`${$$} ${j$}`,children:bV.time.formatDateToEnUs(n.to)})]})},suffix:{children:i&&e(_s,{variant:"filled",color:"transparent",className:z$,onClick:()=>b("right"),children:e(Za,{name:"chevronRight",size:32})})},...h})})),SV={exports:{}},kV={};function CV(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function EV(e){return function(t,n,r,o){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r,o);var i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var s=e(t,n,r,o);return o.delete(t),o.delete(n),s}}function MV(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function PV(e){return e.constructor===Object||null==e.constructor}function OV(e){return"function"==typeof e.then}function TV(e,t){return e===t||e!=e&&t!=t}var NV=Object.prototype.toString;function DV(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.areRegExpsEqual,a=e.areSetsEqual,s=(0,e.createIsNestedEqual)(l);function l(e,l,c){if(e===l)return!0;if(!e||!l||"object"!=typeof e||"object"!=typeof l)return e!=e&&l!=l;if(PV(e)&&PV(l))return o(e,l,s,c);var u=Array.isArray(e),d=Array.isArray(l);if(u||d)return u===d&&t(e,l,s,c);var h=NV.call(e);return h===NV.call(l)&&("[object Date]"===h?n(e,l,s,c):"[object RegExp]"===h?i(e,l,s,c):"[object Map]"===h?r(e,l,s,c):"[object Set]"===h?a(e,l,s,c):"[object Object]"===h||"[object Arguments]"===h?!OV(e)&&!OV(l)&&o(e,l,s,c):("[object Boolean]"===h||"[object Number]"===h||"[object String]"===h)&&TV(e.valueOf(),l.valueOf()))}return l}function AV(e,t,n,r){var o=e.length;if(t.length!==o)return!1;for(;o-- >0;)if(!n(e[o],t[o],o,o,e,t,r))return!1;return!0}var LV=EV(AV);function IV(e,t){return TV(e.valueOf(),t.valueOf())}function zV(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={},a=0;return e.forEach((function(s,l){if(o){var c=!1,u=0;t.forEach((function(o,d){c||i[u]||!(c=n(l,d,a,u,e,t,r)&&n(s,o,l,d,e,t,r))||(i[u]=!0),u++})),a++,o=c}})),o}var RV=EV(zV),$V=Object.prototype.hasOwnProperty;function FV(e,t,n,r){var o,i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(;a-- >0;){if("_owner"===(o=i[a])){var s=!!e.$$typeof,l=!!t.$$typeof;if((s||l)&&s!==l)return!1}if(!$V.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var jV=EV(FV);function BV(e,t){return e.source===t.source&&e.flags===t.flags}function HV(e,t,n,r){var o=e.size===t.size;if(!o)return!1;if(!e.size)return!0;var i={};return e.forEach((function(a,s){if(o){var l=!1,c=0;t.forEach((function(o,u){l||i[c]||!(l=n(a,o,s,u,e,t,r))||(i[c]=!0),c++})),o=l}})),o}var WV=EV(HV),VV=Object.freeze({areArraysEqual:AV,areDatesEqual:IV,areMapsEqual:zV,areObjectsEqual:FV,areRegExpsEqual:BV,areSetsEqual:HV,createIsNestedEqual:CV}),YV=Object.freeze({areArraysEqual:LV,areDatesEqual:IV,areMapsEqual:RV,areObjectsEqual:jV,areRegExpsEqual:BV,areSetsEqual:WV,createIsNestedEqual:CV}),XV=DV(VV);var qV=DV(MV(VV,{createIsNestedEqual:function(){return TV}}));var UV=DV(YV);var ZV=DV(MV(YV,{createIsNestedEqual:function(){return TV}}));var GV,KV=Object.freeze({__proto__:null,circularDeepEqual:function(e,t){return UV(e,t,new WeakMap)},circularShallowEqual:function(e,t){return ZV(e,t,new WeakMap)},createCustomCircularEqual:function(e){var t=DV(MV(YV,e(YV)));return function(e,n,r){return void 0===r&&(r=new WeakMap),t(e,n,r)}},createCustomEqual:function(e){return DV(MV(VV,e(VV)))},deepEqual:function(e,t){return XV(e,t,void 0)},sameValueZeroEqual:TV,shallowEqual:function(e,t){return qV(e,t,void 0)}}),JV=be(KV),QV={exports:{}};function eY(){if(GV)return QV.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return GV=1,QV.exports=t,QV.exports.clsx=t,QV.exports}var tY,nY,rY,oY={};function iY(){if(rY)return oY;rY=1,Object.defineProperty(oY,"__esModule",{value:!0}),oY.bottom=i,oY.childrenEqual=function(e,r){return(0,t.deepEqual)(n.default.Children.map(e,(e=>e?.key)),n.default.Children.map(r,(e=>e?.key)))&&(0,t.deepEqual)(n.default.Children.map(e,(e=>e?.props["data-grid"])),n.default.Children.map(r,(e=>e?.props["data-grid"])))},oY.cloneLayout=a,oY.cloneLayoutItem=l,oY.collides=c,oY.compact=u,oY.compactItem=p,oY.compactType=function(e){const{verticalCompact:t,compactType:n}=e||{};return!1===t?null:n},oY.correctBounds=f,oY.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},oY.fastRGLPropsEqual=void 0,oY.getAllCollisions=v,oY.getFirstCollision=g,oY.getLayoutItem=m,oY.getStatics=y,oY.modifyLayout=s,oY.moveElement=b,oY.moveElementAwayFromCollision=_,oY.noop=void 0,oY.perc=function(e){return 100*e+"%"},oY.resizeItemInDirection=function(e,t,n,r){const o=O[e];return o?o(t,{...t,...n},r):n},oY.setTopLeft=function(e){let{top:t,left:n,width:r,height:o}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${o}px`,position:"absolute"}},oY.setTransform=function(e){let{top:t,left:n,width:r,height:o}=e;const i=`translate(${n}px,${t}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${r}px`,height:`${o}px`,position:"absolute"}},oY.sortLayoutItems=T,oY.sortLayoutItemsByColRow=D,oY.sortLayoutItemsByRowCol=N,oY.synchronizeLayoutWithChildren=function(e,t,o,a,s){e=e||[];const c=[];n.default.Children.forEach(t,(t=>{if(null==t?.key)return;const n=m(e,String(t.key)),o=t.props["data-grid"];n&&null==o?c.push(l(n)):o?(r||A([o],"ReactGridLayout.children"),c.push(l({...o,i:t.key}))):c.push(l({w:1,h:1,x:0,y:i(c),i:String(t.key)}))}));const d=f(c,{cols:o});return s?d:u(d,a,o)},oY.validateLayout=A,oY.withLayoutItem=function(e,t,n){let r=m(e,t);return r?(r=n(l(r)),[e=s(e,r),r]):[e,null]};var e,t=JV,n=(e=o)&&e.__esModule?e:{default:e};const r="production"===process.env.NODE_ENV;function i(e){let t,n=0;for(let r=0,o=e.length;r<o;r++)t=e[r].y+e[r].h,t>n&&(n=t);return n}function a(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=l(e[n]);return t}function s(e,t){const n=Array(e.length);for(let r=0,o=e.length;r<o;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function l(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function c(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function u(e,t,n,r){const o=y(e),i=T(e,t),a=Array(e.length);for(let s=0,c=i.length;s<c;s++){let c=l(i[s]);c.static||(c=p(o,c,t,n,i,r),o.push(c)),a[e.indexOf(i[s])]=c,c.moved=!1}return a}oY.fastRGLPropsEqual=(nY||(nY=1,tY=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}),tY);const d={x:"w",y:"h"};function h(e,t,n,r){const o=d[r];t[r]+=1;for(let i=e.map((e=>e.i)).indexOf(t.i)+1;i<e.length;i++){const a=e[i];if(!a.static){if(a.y>t.y+t.h)break;c(t,a)&&h(e,a,n+t[o],r)}}t[r]=n}function p(e,t,n,r,o,a){const s="horizontal"===n;if("vertical"===n)for(t.y=Math.min(i(e),t.y);t.y>0&&!g(e,t);)t.y--;else if(s)for(;t.x>0&&!g(e,t);)t.x--;let l;for(;(l=g(e,t))&&(null!==n||!a);)if(s?h(o,t,l.x+l.w,"x"):h(o,t,l.y+l.h,"y"),s&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!g(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function f(e,t){const n=y(e);for(let r=0,o=e.length;r<o;r++){const o=e[r];if(o.x+o.w>t.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),o.static)for(;g(n,o);)o.y++;else n.push(o)}return e}function m(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function g(e,t){for(let n=0,r=e.length;n<r;n++)if(c(e[n],t))return e[n]}function v(e,t){return e.filter((e=>c(e,t)))}function y(e){return e.filter((e=>e.static))}function b(e,t,n,r,o,i,s,l,c){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;t.i,String(n),String(r),t.x,t.y;const u=t.x,d=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;let h=T(e,s);("vertical"===s&&"number"==typeof r?d>=r:"horizontal"===s&&"number"==typeof n&&u>=n)&&(h=h.reverse());const p=v(h,t),f=p.length>0;if(f&&c)return a(e);if(f&&i)return t.i,t.x=u,t.y=d,t.moved=!1,e;for(let n=0,r=p.length;n<r;n++){const r=p[n];t.i,t.x,t.y,r.i,r.x,r.y,r.moved||(e=r.static?_(e,r,t,o,s):_(e,t,r,o,s))}return e}function _(e,t,n,r,o,i){const a="horizontal"===o,s="vertical"===o,l=t.static;if(r){r=!1;const i={x:a?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},c=g(e,i),u=c&&c.y+c.h>t.y,d=c&&t.x+t.w>c.x;if(!c)return n.i,i.x,i.y,b(e,n,a?i.x:void 0,s?i.y:void 0,r,l,o);if(u&&s)return b(e,n,void 0,t.y+1,r,l,o);if(u&&null==o)return t.y=n.y,n.y=n.y+n.h,e;if(d&&a)return b(e,t,n.x,void 0,r,l,o)}const c=a?n.x+1:void 0,u=s?n.y+1:void 0;return null==c&&null==u?e:b(e,n,a?n.x+1:void 0,s?n.y+1:void 0,r,l,o)}const x=(e,t,n,r)=>e+n>r?t:n,w=(e,t,n)=>e<0?t:n,S=e=>Math.max(0,e),k=e=>Math.max(0,e),C=(e,t,n)=>{let{left:r,height:o,width:i}=t;const a=e.top-(o-e.height);return{left:r,width:i,height:w(a,e.height,o),top:k(a)}},E=(e,t,n)=>{let{top:r,left:o,height:i,width:a}=t;return{top:r,height:i,width:x(e.left,e.width,a,n),left:S(o)}},M=(e,t,n)=>{let{top:r,height:o,width:i}=t;const a=e.left-(i-e.width);return{height:o,width:a<0?e.width:x(e.left,e.width,i,n),top:k(r),left:S(a)}},P=(e,t,n)=>{let{top:r,left:o,height:i,width:a}=t;return{width:a,left:o,height:w(r,e.height,i),top:k(r)}},O={n:C,ne:function(){return C(arguments.length<=0?void 0:arguments[0],E(...arguments))},e:E,se:function(){return P(arguments.length<=0?void 0:arguments[0],E(...arguments))},s:P,sw:function(){return P(arguments.length<=0?void 0:arguments[0],M(...arguments))},w:M,nw:function(){return C(arguments.length<=0?void 0:arguments[0],M(...arguments))}};function T(e,t){return"horizontal"===t?D(e):"vertical"===t?N(e):e}function N(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function D(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let r=0,o=e.length;r<o;r++){const o=e[r];for(let e=0;e<n.length;e++)if("number"!=typeof o[n[e]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[e]+" must be a number!")}}return oY.noop=()=>{},oY}var aY,sY={};function lY(){if(aY)return sY;function e(e){const{margin:t,containerPadding:n,containerWidth:r,cols:o}=e;return(r-t[0]*(o-1)-2*n[0])/o}function t(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function n(e,t,n){return Math.max(Math.min(e,n),t)}return aY=1,Object.defineProperty(sY,"__esModule",{value:!0}),sY.calcGridColWidth=e,sY.calcGridItemPosition=function(n,r,o,i,a,s){const{margin:l,containerPadding:c,rowHeight:u}=n,d=e(n),h={};s&&s.resizing?(h.width=Math.round(s.resizing.width),h.height=Math.round(s.resizing.height)):(h.width=t(i,d,l[0]),h.height=t(a,u,l[1]));s&&s.dragging?(h.top=Math.round(s.dragging.top),h.left=Math.round(s.dragging.left)):s&&s.resizing&&"number"==typeof s.resizing.top&&"number"==typeof s.resizing.left?(h.top=Math.round(s.resizing.top),h.left=Math.round(s.resizing.left)):(h.top=Math.round((u+l[1])*o+c[1]),h.left=Math.round((d+l[0])*r+c[0]));return h},sY.calcGridItemWHPx=t,sY.calcWH=function(t,r,o,i,a,s){const{margin:l,maxRows:c,cols:u,rowHeight:d}=t,h=e(t);let p=Math.round((r+l[0])/(h+l[0])),f=Math.round((o+l[1])/(d+l[1])),m=n(p,0,u-i),g=n(f,0,c-a);-1!==["sw","w","nw"].indexOf(s)&&(m=n(p,0,u));-1!==["nw","n","ne"].indexOf(s)&&(g=n(f,0,c));return{w:m,h:g}},sY.calcXY=function(t,r,o,i,a){const{margin:s,cols:l,rowHeight:c,maxRows:u}=t,d=e(t);let h=Math.round((o-s[0])/(d+s[0])),p=Math.round((r-s[1])/(c+s[1]));return h=n(h,0,l-i),p=n(p,0,u-a),{x:h,y:p}},sY.clamp=n,sY}var cY={},uY={exports:{}},dY={};function hY(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=hY(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function pY(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=hY(e))&&(r&&(r+=" "),r+=t);return r}var fY,mY=be(Object.freeze({__proto__:null,clsx:pY,default:pY})),gY={},vY={};function yY(){if(fY)return vY;return fY=1,Object.defineProperty(vY,"__esModule",{value:!0}),vY.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},vY.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},vY.int=function(e){return parseInt(e,10)},vY.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},vY.isNum=function(e){return"number"==typeof e&&!isNaN(e)},vY}var bY,_Y,xY={};function wY(){if(_Y)return gY;_Y=1,Object.defineProperty(gY,"__esModule",{value:!0}),gY.addClassName=a,gY.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},gY.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&a(e.body,"react-draggable-transparent-selection")},gY.createCSSTransform=function(e,n){const r=i(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},gY.createSVGTransform=function(e,t){return i(e,t,"")},gY.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},gY.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},gY.getTranslation=i,gY.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},gY.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},gY.matchesSelector=o,gY.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(o(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},gY.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},gY.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},gY.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},gY.removeClassName=s,gY.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},gY.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&s(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var e=yY(),t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,r&&r.set(e,o);return o}(function(){if(bY)return xY;bY=1,Object.defineProperty(xY,"__esModule",{value:!0}),xY.browserPrefixToKey=n,xY.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},xY.default=void 0,xY.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const o=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!o)return"";if(r in o)return"";for(let t=0;t<e.length;t++)if(n(r,e[t])in o)return e[t];return""}function n(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}return xY.default=t(),xY}());function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}let r="";function o(t,n){return r||(r=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[r])&&t[r](n)}function i(e,t,n){let{x:r,y:o}=e,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(e,", ").concat(r,")")+i}return i}function a(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function s(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}return gY}var SY,kY={};function CY(){if(SY)return kY;SY=1,Object.defineProperty(kY,"__esModule",{value:!0}),kY.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},kY.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},kY.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),a=n(t);return i?{node:a,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:a,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},kY.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},kY.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:a}=r.props;a="string"==typeof a?a:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(a);const s=n(r);if("string"==typeof a){const{ownerDocument:n}=s,r=n.defaultView;let o;if(o="parent"===a?s.parentNode:n.querySelector(a),!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+a+'" could not find an element.');const i=o,l=r.getComputedStyle(s),c=r.getComputedStyle(i);a={left:-s.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-s.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(s)-s.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(s)-s.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(a.right)&&(o=Math.min(o,a.right));(0,e.isNum)(a.bottom)&&(i=Math.min(i,a.bottom));(0,e.isNum)(a.left)&&(o=Math.max(o,a.left));(0,e.isNum)(a.top)&&(i=Math.max(i,a.top));return[o,i]},kY.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const a=n(o),s=o.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,s,o.props.scale)},kY.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=yY(),t=wY();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return kY}var EY,MY,PY,OY,TY={},NY={};function DY(){if(EY)return NY;return EY=1,Object.defineProperty(NY,"__esModule",{value:!0}),NY.default=function(){},NY}function AY(){if(MY)return TY;MY=1,Object.defineProperty(TY,"__esModule",{value:!0}),TY.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=l(qe()),n=l(M),r=wY(),i=CY(),a=yY(),s=l(DY());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h;class f extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const o=(0,r.getTouchIdentifier)(e);this.touchIdentifier=o;const a=(0,i.getControlPosition)(e,o,this);if(null==a)return;const{x:l,y:c}=a,u=(0,i.createCoreData)(this,l,c);(0,s.default)("DraggableCore: handleDragStart: %j",u),(0,s.default)("calling",this.props.onStart);!1!==this.props.onStart(e,u)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=c,(0,r.addEvent)(n,p.move,this.handleDrag),(0,r.addEvent)(n,p.stop,this.handleDragStop))})),u(this,"handleDrag",(e=>{const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,i.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,i.createCoreData)(this,n,r);(0,s.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),u(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,i.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:o}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=o-this.lastY||0;[e,t]=(0,i.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,o=this.lastY+t}const a=(0,i.createCoreData)(this,n,o);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(l.ownerDocument),(0,s.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,s.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(l.ownerDocument,p.move,this.handleDrag),(0,r.removeEvent)(l.ownerDocument,p.stop,this.handleDragStop))})),u(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),u(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),u(this,"onTouchStart",(e=>(p=d,this.handleDragStart(e)))),u(this,"onTouchEnd",(e=>(p=d,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,d.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,h.move,this.handleDrag),(0,r.removeEvent)(t,d.move,this.handleDrag),(0,r.removeEvent)(t,h.stop,this.handleDragStop),(0,r.removeEvent)(t,d.stop,this.handleDragStop),(0,r.removeEvent)(e,d.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}return TY.default=f,u(f,"displayName","DraggableCore"),u(f,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),u(f,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),TY}function LY(){return PY||(PY=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),n=d(qe()),r=d(M),i=d(mY),a=wY(),s=CY(),l=yY(),c=d(AY()),u=d(DY());function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function p(){return p=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},p.apply(this,arguments)}function f(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,s.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,s.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,s.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,s.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:l,defaultClassNameDragging:u,defaultClassNameDragged:d,position:h,positionOffset:f,scale:m,...g}=this.props;let v={},y=null;const b=!Boolean(h)||this.state.dragging,_=h||o,x={x:(0,s.canDragX)(this)&&b?this.state.x:_.x,y:(0,s.canDragY)(this)&&b?this.state.y:_.y};this.state.isElementSVG?y=(0,a.createSVGTransform)(x,f):v=(0,a.createCSSTransform)(x,f);const w=(0,i.default)(r.props.className||"",l,{[u]:this.state.dragging,[d]:this.state.dragged});return t.createElement(c.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:w,style:{...r.props.style,...v},transform:y}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...c.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(m,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(dY)),dY}function IY(){if(OY)return uY.exports;OY=1;const{default:e,DraggableCore:t}=LY();return uY.exports=e,uY.exports.default=e,uY.exports.DraggableCore=t,uY.exports}var zY,RY={exports:{}},$Y={},FY={};function jY(){if(zY)return FY;zY=1,FY.__esModule=!0,FY.cloneElement=function(e,n){n.style&&e.props.style&&(n.style=r(r({},e.props.style),n.style));n.className&&e.props.className&&(n.className=e.props.className+" "+n.className);return t.default.cloneElement(e,n)};var e,t=(e=o)&&e.__esModule?e:{default:e};function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}return FY}var BY,HY,WY={};function VY(){if(BY)return WY;BY=1,WY.__esModule=!0,WY.resizableProps=void 0;var e,t=(e=qe())&&e.__esModule?e:{default:e};IY();var n={axis:t.default.oneOf(["both","x","y","none"]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o,i=n[0];return"both"===i.axis||"y"===i.axis?(o=t.default.number).isRequired.apply(o,n):t.default.number.apply(t.default,n)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:t.default.number,width:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o,i=n[0];return"both"===i.axis||"x"===i.axis?(o=t.default.number).isRequired.apply(o,n):t.default.number.apply(t.default,n)}};return WY.resizableProps=n,WY}function YY(){if(HY)return $Y;HY=1,$Y.__esModule=!0,$Y.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=IY(),n=jY(),r=VY(),i=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return s=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},s.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var h=function(r){var o,a;function l(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=r.call.apply(r,[this].concat(n))||this).handleRefs={},e.lastHandleRect=null,e.slack=null,e}a=r,(o=l).prototype=Object.create(a.prototype),o.prototype.constructor=o,d(o,a);var u=l.prototype;return u.componentWillUnmount=function(){this.resetData()},u.resetData=function(){this.lastHandleRect=this.slack=null},u.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,o=n.maxConstraints,i=n.lockAspectRatio;if(!r&&!o&&!i)return[e,t];if(i){var a=this.props.width/this.props.height,s=e-this.props.width,l=t-this.props.height;Math.abs(s)>Math.abs(l*a)?t=e/a:e=t*a}var c=e,u=t,d=this.slack||[0,0],h=d[0],p=d[1];return e+=h,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),o&&(e=Math.min(o[0],e),t=Math.min(o[1],t)),this.slack=[h+(c-e),p+(u-t)],[e,t]},u.resizeHandler=function(e,t){var n=this;return function(r,o){var i=o.node,a=o.deltaX,s=o.deltaY;"onResizeStart"===e&&n.resetData();var l=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,c=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(l||c){var u=t[0],d=t[t.length-1],h=i.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===d)a+=h.left-n.lastHandleRect.left;if("n"===u)s+=h.top-n.lastHandleRect.top}n.lastHandleRect=h,"w"===d&&(a=-a),"n"===u&&(s=-s);var p=n.props.width+(l?a/n.props.transformScale:0),f=n.props.height+(c?s/n.props.transformScale:0),m=n.runConstraints(p,f);p=m[0],f=m[1];var g=p!==n.props.width||f!==n.props.height,v="function"==typeof n.props[e]?n.props[e]:null;v&&!("onResize"===e&&!g)&&(null==r.persist||r.persist(),v(r,{node:i,size:{width:p,height:f},handle:t})),"onResizeStop"===e&&n.resetData()}}},u.renderResizeHandle=function(t,n){var r=this.props.handle;if(!r)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t,ref:n});if("function"==typeof r)return r(t,n);var o=c({ref:n},"string"==typeof r.type?{}:{handleAxis:t});return e.cloneElement(r,o)},u.render=function(){var r=this,o=this.props,a=o.children,l=o.className,u=o.draggableOpts;o.width,o.height,o.handle,o.handleSize,o.lockAspectRatio,o.axis,o.minConstraints,o.maxConstraints,o.onResize,o.onResizeStop,o.onResizeStart;var d=o.resizeHandles;o.transformScale;var h=function(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}(o,i);return(0,n.cloneElement)(a,c(c({},h),{},{className:(l?l+" ":"")+"react-resizable",children:[].concat(a.props.children,d.map((function(n){var o,i=null!=(o=r.handleRefs[n])?o:r.handleRefs[n]=e.createRef();return e.createElement(t.DraggableCore,s({},u,{nodeRef:i,key:"resizableHandle-"+n,onStop:r.resizeHandler("onResizeStop",n),onStart:r.resizeHandler("onResizeStart",n),onDrag:r.resizeHandler("onResize",n)}),r.renderResizeHandle(n,i))})))}))},l}(e.Component);return $Y.default=h,h.propTypes=r.resizableProps,h.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},$Y}var XY,qY,UY={};function ZY(){if(XY)return UY;XY=1,UY.__esModule=!0,UY.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(o),t=a(qe()),n=a(YY()),r=VY(),i=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function a(e){return e&&e.__esModule?e:{default:e}}function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(){return l=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},l.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}var p=function(t){var r,o;function a(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).state={width:e.props.width,height:e.props.height,propsWidth:e.props.width,propsHeight:e.props.height},e.onResize=function(t,n){var r=n.size;e.props.onResize?(null==t.persist||t.persist(),e.setState(r,(function(){return e.props.onResize&&e.props.onResize(t,n)}))):e.setState(r)},e}return o=t,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,h(r,o),a.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},a.prototype.render=function(){var t=this.props,r=t.handle,o=t.handleSize;t.onResize;var a=t.onResizeStart,s=t.onResizeStop,c=t.draggableOpts,d=t.minConstraints,h=t.maxConstraints,p=t.lockAspectRatio,f=t.axis;t.width,t.height;var m=t.resizeHandles,g=t.style,v=t.transformScale,y=function(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}(t,i);return e.createElement(n.default,{axis:f,draggableOpts:c,handle:r,handleSize:o,height:this.state.height,lockAspectRatio:p,maxConstraints:h,minConstraints:d,onResizeStart:a,onResize:this.onResize,onResizeStop:s,resizeHandles:m,transformScale:v,width:this.state.width},e.createElement("div",l({},y,{style:u(u({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},a}(e.Component);return UY.default=p,p.propTypes=u(u({},r.resizableProps),{},{children:t.default.element}),UY}var GY,KY,JY,QY={};function eX(){if(GY)return QY;GY=1,Object.defineProperty(QY,"__esModule",{value:!0}),QY.resizeHandleType=QY.resizeHandleAxesType=QY.default=void 0;var e=n(qe()),t=n(o);function n(e){return e&&e.__esModule?e:{default:e}}const r=QY.resizeHandleAxesType=e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),i=QY.resizeHandleType=e.default.oneOfType([e.default.node,e.default.func]);return QY.default={className:e.default.string,style:e.default.object,width:e.default.number,autoSize:e.default.bool,cols:e.default.number,draggableCancel:e.default.string,draggableHandle:e.default.string,verticalCompact:function(e){!1===e.verticalCompact&&"production"!==process.env.NODE_ENV&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:e.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&iY().validateLayout(t,"layout")},margin:e.default.arrayOf(e.default.number),containerPadding:e.default.arrayOf(e.default.number),rowHeight:e.default.number,maxRows:e.default.number,isBounded:e.default.bool,isDraggable:e.default.bool,isResizable:e.default.bool,allowOverlap:e.default.bool,preventCollision:e.default.bool,useCSSTransforms:e.default.bool,transformScale:e.default.number,isDroppable:e.default.bool,resizeHandles:r,resizeHandle:i,onLayoutChange:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onDragStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,onResizeStop:e.default.func,onDrop:e.default.func,droppingItem:e.default.shape({i:e.default.string.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired}),children:function(e,n){const r=e[n],o={};t.default.Children.forEach(r,(function(e){if(null!=e?.key){if(o[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');o[e.key]=!0}}))},innerRef:e.default.any},QY}function tX(){if(KY)return cY;KY=1,Object.defineProperty(cY,"__esModule",{value:!0}),cY.default=void 0;var e=c(o),t=c(qe()),n=IY(),r=(qY||(qY=1,RY.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},RY.exports.Resizable=YY().default,RY.exports.ResizableBox=ZY().default),RY.exports),i=iY(),a=lY(),s=eX(),l=c(eY());function c(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d extends e.default.Component{constructor(){super(...arguments),u(this,"state",{resizing:null,dragging:null,className:""}),u(this,"elementRef",e.default.createRef()),u(this,"onDragStart",((e,t)=>{let{node:n}=t;const{onDragStart:r,transformScale:o}=this.props;if(!r)return;const i={top:0,left:0},{offsetParent:s}=n;if(!s)return;const l=s.getBoundingClientRect(),c=n.getBoundingClientRect(),u=c.left/o,d=l.left/o,h=c.top/o,p=l.top/o;i.left=u-d+s.scrollLeft,i.top=h-p+s.scrollTop,this.setState({dragging:i});const{x:f,y:m}=(0,a.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return r.call(this,this.props.i,f,m,{e:e,node:n,newPosition:i})})),u(this,"onDrag",((e,t)=>{let{node:n,deltaX:r,deltaY:o}=t;const{onDrag:i}=this.props;if(!i)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let s=this.state.dragging.top+o,l=this.state.dragging.left+r;const{isBounded:c,i:u,w:d,h:h,containerWidth:p}=this.props,f=this.getPositionParams();if(c){const{offsetParent:e}=n;if(e){const{margin:t,rowHeight:n,containerPadding:r}=this.props,o=e.clientHeight-(0,a.calcGridItemWHPx)(h,n,t[1]);s=(0,a.clamp)(s-r[1],0,o);const i=(0,a.calcGridColWidth)(f),c=p-(0,a.calcGridItemWHPx)(d,i,t[0]);l=(0,a.clamp)(l-r[0],0,c)}}const m={top:s,left:l};this.setState({dragging:m});const{containerPadding:g}=this.props,{x:v,y:y}=(0,a.calcXY)(f,s-g[1],l-g[0],d,h);return i.call(this,u,v,y,{e:e,node:n,newPosition:m})})),u(this,"onDragStop",((e,t)=>{let{node:n}=t;const{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:o,h:i,i:s,containerPadding:l}=this.props,{left:c,top:u}=this.state.dragging,d={top:u,left:c};this.setState({dragging:null});const{x:h,y:p}=(0,a.calcXY)(this.getPositionParams(),u-l[1],c-l[0],o,i);return r.call(this,s,h,p,{e:e,node:n,newPosition:d})})),u(this,"onResizeStop",((e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStop"))),u(this,"onResizeStart",((e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStart"))),u(this,"onResize",((e,t,n)=>this.onResizeHandler(e,t,n,"onResize")))}shouldComponentUpdate(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;const n=(0,a.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,a.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,i.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const n=this.elementRef.current;if(!n)return;const r=e.droppingPosition||{left:0,top:0},{dragging:o}=this.state,i=o&&t.left!==r.left||t.top!==r.top;if(o){if(i){const e=t.left-o.left,r=t.top-o.top;this.onDrag(t.e,{node:n,deltaX:e,deltaY:r})}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}getPositionParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:n,useCSSTransforms:r}=this.props;let o;return r?o=(0,i.setTransform)(e):(o=(0,i.setTopLeft)(e),t&&(o.left=(0,i.perc)(e.left/n),o.width=(0,i.perc)(e.width/n))),o}mixinDraggable(t,r){return e.default.createElement(n.DraggableCore,{disabled:!r,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},t)}curryResizeHandler(e,t){return(n,r)=>t(n,r,e)}mixinResizable(t,n,o){const{cols:i,minW:s,minH:l,maxW:c,maxH:u,transformScale:d,resizeHandles:h,resizeHandle:p}=this.props,f=this.getPositionParams(),m=(0,a.calcGridItemPosition)(f,0,0,i,0).width,g=(0,a.calcGridItemPosition)(f,0,0,s,l),v=(0,a.calcGridItemPosition)(f,0,0,c,u),y=[g.width,g.height],b=[Math.min(v.width,m),Math.min(v.height,1/0)];return e.default.createElement(r.Resizable,{draggableOpts:{disabled:!o},className:o?void 0:"react-resizable-hide",width:n.width,height:n.height,minConstraints:y,maxConstraints:b,onResizeStop:this.curryResizeHandler(n,this.onResizeStop),onResizeStart:this.curryResizeHandler(n,this.onResizeStart),onResize:this.curryResizeHandler(n,this.onResize),transformScale:d,resizeHandles:h,handle:p},t)}onResizeHandler(e,t,n,r){let{node:o,size:s,handle:l}=t;const c=this.props[r];if(!c)return;const{x:u,y:d,i:h,maxH:p,minH:f,containerWidth:m}=this.props,{minW:g,maxW:v}=this.props;let y=s;o&&(y=(0,i.resizeItemInDirection)(l,n,s,m),this.setState({resizing:"onResizeStop"===r?null:y}));let{w:b,h:_}=(0,a.calcWH)(this.getPositionParams(),y.width,y.height,u,d,l);b=(0,a.clamp)(b,Math.max(g,1),v),_=(0,a.clamp)(_,f,p),c.call(this,h,b,_,{e:e,node:o,size:y,handle:l})}render(){const{x:t,y:n,w:r,h:o,isDraggable:i,isResizable:s,droppingPosition:c,useCSSTransforms:u}=this.props,d=(0,a.calcGridItemPosition)(this.getPositionParams(),t,n,r,o,this.state),h=e.default.Children.only(this.props.children);let p=e.default.cloneElement(h,{ref:this.elementRef,className:(0,l.default)("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":i,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(c),cssTransforms:u}),style:{...this.props.style,...h.props.style,...this.createStyle(d)}});return p=this.mixinResizable(p,d,s),p=this.mixinDraggable(p,i),p}}return cY.default=d,u(d,"propTypes",{children:t.default.element,cols:t.default.number.isRequired,containerWidth:t.default.number.isRequired,rowHeight:t.default.number.isRequired,margin:t.default.array.isRequired,maxRows:t.default.number.isRequired,containerPadding:t.default.array.isRequired,x:t.default.number.isRequired,y:t.default.number.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired,minW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:t.default.string.isRequired,resizeHandles:s.resizeHandleAxesType,resizeHandle:s.resizeHandleType,onDragStop:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,isDraggable:t.default.bool.isRequired,isResizable:t.default.bool.isRequired,isBounded:t.default.bool.isRequired,static:t.default.bool,useCSSTransforms:t.default.bool.isRequired,transformScale:t.default.number,className:t.default.string,handle:t.default.string,cancel:t.default.string,droppingPosition:t.default.shape({e:t.default.object.isRequired,left:t.default.number.isRequired,top:t.default.number.isRequired})}),u(d,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),cY}function nX(){if(JY)return kV;JY=1,Object.defineProperty(kV,"__esModule",{value:!0}),kV.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=JV,n=l(eY()),r=iY(),i=lY(),a=l(tX()),s=l(eX());function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d="react-grid-layout";let h=!1;try{h=/firefox/i.test(navigator.userAgent)}catch(e){}class p extends e.Component{constructor(){super(...arguments),u(this,"state",{activeDrag:null,layout:(0,r.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,r.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),u(this,"dragEnterCounter",0),u(this,"onDragStart",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s}=this.state,l=(0,r.getLayoutItem)(s,e);if(!l)return;const c={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,r.cloneLayoutItem)(l),oldLayout:s,activeDrag:c}),this.props.onDragStart(s,l,l,null,i,a)})),u(this,"onDrag",((e,t,n,o)=>{let{e:i,node:a}=o;const{oldDragItem:s}=this.state;let{layout:l}=this.state;const{cols:c,allowOverlap:u,preventCollision:d}=this.props,h=(0,r.getLayoutItem)(l,e);if(!h)return;const p={w:h.w,h:h.h,x:h.x,y:h.y,placeholder:!0,i:e};l=(0,r.moveElement)(l,h,t,n,!0,d,(0,r.compactType)(this.props),c,u),this.props.onDrag(l,s,h,p,i,a),this.setState({layout:u?l:(0,r.compact)(l,(0,r.compactType)(this.props),c),activeDrag:p})})),u(this,"onDragStop",((e,t,n,o)=>{let{e:i,node:a}=o;if(!this.state.activeDrag)return;const{oldDragItem:s}=this.state;let{layout:l}=this.state;const{cols:c,preventCollision:u,allowOverlap:d}=this.props,h=(0,r.getLayoutItem)(l,e);if(!h)return;l=(0,r.moveElement)(l,h,t,n,!0,u,(0,r.compactType)(this.props),c,d);const p=d?l:(0,r.compact)(l,(0,r.compactType)(this.props),c);this.props.onDragStop(p,s,h,null,i,a);const{oldLayout:f}=this.state;this.setState({activeDrag:null,layout:p,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(p,f)})),u(this,"onResizeStart",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s}=this.state,l=(0,r.getLayoutItem)(s,e);l&&(this.setState({oldResizeItem:(0,r.cloneLayoutItem)(l),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,l,l,null,i,a))})),u(this,"onResize",((e,t,n,o)=>{let{e:i,node:a,size:s,handle:l}=o;const{oldResizeItem:c}=this.state,{layout:u}=this.state,{cols:d,preventCollision:h,allowOverlap:p}=this.props;let f,m,g,v=!1;const[y,b]=(0,r.withLayoutItem)(u,e,(e=>{let o;if(m=e.x,g=e.y,-1!==["sw","w","nw","n","ne"].indexOf(l)&&(-1!==["sw","nw","w"].indexOf(l)&&(m=e.x+(e.w-t),t=e.x!==m&&m<0?e.w:t,m=m<0?0:m),-1!==["ne","n","nw"].indexOf(l)&&(g=e.y+(e.h-n),n=e.y!==g&&g<0?e.h:n,g=g<0?0:g),v=!0),h&&!p){o=(0,r.getAllCollisions)(u,{...e,w:t,h:n,x:m,y:g}).filter((t=>t.i!==e.i)).length>0,o&&(g=e.y,n=e.h,m=e.x,t=e.w,v=!1)}return e.w=t,e.h=n,e}));if(!b)return;if(f=y,v){const e=!0;f=(0,r.moveElement)(y,b,m,g,e,this.props.preventCollision,(0,r.compactType)(this.props),d,p)}const _={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(f,c,b,_,i,a),this.setState({layout:p?f:(0,r.compact)(f,(0,r.compactType)(this.props),d),activeDrag:_})})),u(this,"onResizeStop",((e,t,n,o)=>{let{e:i,node:a}=o;const{layout:s,oldResizeItem:l}=this.state,{cols:c,allowOverlap:u}=this.props,d=(0,r.getLayoutItem)(s,e),h=u?s:(0,r.compact)(s,(0,r.compactType)(this.props),c);this.props.onResizeStop(h,l,d,null,i,a);const{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(h,p)})),u(this,"onDragOver",(t=>{if(t.preventDefault(),t.stopPropagation(),h&&!t.nativeEvent.target?.classList.contains(d))return!1;const{droppingItem:n,onDropDragOver:r,margin:o,cols:a,rowHeight:s,maxRows:l,width:c,containerPadding:u,transformScale:p}=this.props,f=r?.(t);if(!1===f)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const m={...n,...f},{layout:g}=this.state,v=t.currentTarget.getBoundingClientRect(),y=t.clientX-v.left,b=t.clientY-v.top,_={left:y/p,top:b/p,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:e,top:t}=this.state.droppingPosition;(e!=y||t!=b)&&this.setState({droppingPosition:_})}}else{const t={cols:a,margin:o,maxRows:l,rowHeight:s,containerWidth:c,containerPadding:u||o},n=(0,i.calcXY)(t,b,y,m.w,m.h);this.setState({droppingDOMNode:e.createElement("div",{key:m.i}),droppingPosition:_,layout:[...g,{...m,x:n.x,y:n.y,static:!1,isDraggable:!0}]})}})),u(this,"removeDroppingPlaceholder",(()=>{const{droppingItem:e,cols:t}=this.props,{layout:n}=this.state,o=(0,r.compact)(n.filter((t=>t.i!==e.i)),(0,r.compactType)(this.props),t,this.props.allowOverlap);this.setState({layout:o,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),u(this,"onDragLeave",(e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,0===this.dragEnterCounter&&this.removeDroppingPlaceholder()})),u(this,"onDragEnter",(e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++})),u(this,"onDrop",(e=>{e.preventDefault(),e.stopPropagation();const{droppingItem:t}=this.props,{layout:n}=this.state,r=n.find((e=>e.i===t.i));this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,e)}))}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,n){let o;if(n.activeDrag)return null;if((0,t.deepEqual)(e.layout,n.propsLayout)&&e.compactType===n.compactType?(0,r.childrenEqual)(e.children,n.children)||(o=n.layout):o=e.layout,o){return{layout:(0,r.synchronizeLayoutWithChildren)(o,e.children,e.cols,(0,r.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}}return null}shouldComponentUpdate(e,n){return this.props.children!==e.children||!(0,r.fastRGLPropsEqual)(this.props,e,t.deepEqual)||this.state.activeDrag!==n.activeDrag||this.state.mounted!==n.mounted||this.state.droppingPosition!==n.droppingPosition}componentDidUpdate(e,t){if(!this.state.activeDrag){const e=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(e,n)}}containerHeight(){if(!this.props.autoSize)return;const e=(0,r.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}onLayoutMaybeChanged(e,n){n||(n=this.state.layout),(0,t.deepEqual)(n,e)||this.props.onLayoutChange(e)}placeholder(){const{activeDrag:t}=this.state;if(!t)return null;const{width:n,cols:r,margin:o,containerPadding:i,rowHeight:s,maxRows:l,useCSSTransforms:c,transformScale:u}=this.props;return e.createElement(a.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder "+(this.state.resizing?"placeholder-resizing":""),containerWidth:n,cols:r,margin:o,containerPadding:i||o,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:u},e.createElement("div",null))}processGridItem(t,n){if(!t||!t.key)return;const o=(0,r.getLayoutItem)(this.state.layout,String(t.key));if(!o)return null;const{width:i,cols:s,margin:l,containerPadding:c,rowHeight:u,maxRows:d,isDraggable:h,isResizable:p,isBounded:f,useCSSTransforms:m,transformScale:g,draggableCancel:v,draggableHandle:y,resizeHandles:b,resizeHandle:_}=this.props,{mounted:x,droppingPosition:w}=this.state,S="boolean"==typeof o.isDraggable?o.isDraggable:!o.static&&h,k="boolean"==typeof o.isResizable?o.isResizable:!o.static&&p,C=o.resizeHandles||b,E=S&&f&&!1!==o.isBounded;return e.createElement(a.default,{containerWidth:i,cols:s,margin:l,containerPadding:c||l,maxRows:d,rowHeight:u,cancel:v,handle:y,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:S,isResizable:k,isBounded:E,useCSSTransforms:m&&x,usePercentages:!x,transformScale:g,w:o.w,h:o.h,x:o.x,y:o.y,i:o.i,minH:o.minH,minW:o.minW,maxH:o.maxH,maxW:o.maxW,static:o.static,droppingPosition:n?w:void 0,resizeHandles:C,resizeHandle:_},t)}render(){const{className:t,style:o,isDroppable:i,innerRef:a}=this.props,s=(0,n.default)(d,t),l={height:this.containerHeight(),...o};return e.createElement("div",{ref:a,className:s,style:l,onDrop:i?this.onDrop:r.noop,onDragLeave:i?this.onDragLeave:r.noop,onDragEnter:i?this.onDragEnter:r.noop,onDragOver:i?this.onDragOver:r.noop},e.Children.map(this.props.children,(e=>this.processGridItem(e))),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}return kV.default=p,u(p,"displayName","ReactGridLayout"),u(p,"propTypes",s.default),u(p,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:r.noop,onDragStart:r.noop,onDrag:r.noop,onDragStop:r.noop,onResizeStart:r.noop,onResize:r.noop,onResizeStop:r.noop,onDrop:r.noop,onDropDragOver:r.noop}),kV}var rX,oX,iX={},aX={};function sX(){if(rX)return aX;rX=1,Object.defineProperty(aX,"__esModule",{value:!0}),aX.findOrGenerateResponsiveLayout=function(n,r,o,i,a,s){if(n[o])return(0,e.cloneLayout)(n[o]);let l=n[i];const c=t(r),u=c.slice(c.indexOf(o));for(let e=0,t=u.length;e<t;e++){const t=u[e];if(n[t]){l=n[t];break}}return l=(0,e.cloneLayout)(l||[]),(0,e.compact)((0,e.correctBounds)(l,{cols:a}),s,a)},aX.getBreakpointFromWidth=function(e,n){const r=t(e);let o=r[0];for(let t=1,i=r.length;t<i;t++){const i=r[t];n>e[i]&&(o=i)}return o},aX.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},aX.sortBreakpoints=t;var e=iY();function t(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}return aX}function lX(){if(oX)return iX;oX=1,Object.defineProperty(iX,"__esModule",{value:!0}),iX.default=void 0;var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=s(qe()),n=JV,r=iY(),i=sX(),a=s(nX());function s(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function c(){return c=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},c.apply(this,arguments)}function u(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=e=>Object.prototype.toString.call(e);function h(e,t){return null==e?null:Array.isArray(e)?e:e[t]}class p extends e.Component{constructor(){super(...arguments),u(this,"state",this.generateInitialState()),u(this,"onLayoutChange",(e=>{this.props.onLayoutChange(e,{...this.props.layouts,[this.state.breakpoint]:e})}))}generateInitialState(){const{width:e,breakpoints:t,layouts:n,cols:r}=this.props,o=(0,i.getBreakpointFromWidth)(t,e),a=(0,i.getColsFromBreakpoint)(o,r),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,i.findOrGenerateResponsiveLayout)(n,t,o,o,a,s),breakpoint:o,cols:a}}static getDerivedStateFromProps(e,t){if(!(0,n.deepEqual)(e.layouts,t.layouts)){const{breakpoint:n,cols:r}=t;return{layout:(0,i.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,n.deepEqual)(this.props.breakpoints,e.breakpoints)&&(0,n.deepEqual)(this.props.cols,e.cols)||this.onWidthChange(e)}onWidthChange(e){const{breakpoints:t,cols:n,layouts:o,compactType:a}=this.props,s=this.props.breakpoint||(0,i.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),l=this.state.breakpoint,c=(0,i.getColsFromBreakpoint)(s,n),u={...o};if(l!==s||e.breakpoints!==t||e.cols!==n){l in u||(u[l]=(0,r.cloneLayout)(this.state.layout));let e=(0,i.findOrGenerateResponsiveLayout)(u,t,s,l,c,a);e=(0,r.synchronizeLayoutWithChildren)(e,this.props.children,c,a,this.props.allowOverlap),u[s]=e,this.props.onLayoutChange(e,u),this.props.onBreakpointChange(s,c),this.setState({breakpoint:s,layout:e,cols:c})}const d=h(this.props.margin,s),p=h(this.props.containerPadding,s);this.props.onWidthChange(this.props.width,d,c,p)}render(){const{breakpoint:t,breakpoints:n,cols:r,layouts:o,margin:i,containerPadding:s,onBreakpointChange:l,onLayoutChange:u,onWidthChange:d,...p}=this.props;return e.createElement(a.default,c({},p,{margin:h(i,this.state.breakpoint),containerPadding:h(s,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}return iX.default=p,u(p,"propTypes",{breakpoint:t.default.string,breakpoints:t.default.object,allowOverlap:t.default.bool,cols:t.default.object,margin:t.default.oneOfType([t.default.array,t.default.object]),containerPadding:t.default.oneOfType([t.default.array,t.default.object]),layouts(e,t){if("[object Object]"!==d(e[t]))throw new Error("Layout property must be an object. Received: "+d(e[t]));Object.keys(e[t]).forEach((t=>{if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,r.validateLayout)(e.layouts[t],"layouts."+t)}))},width:t.default.number.isRequired,onBreakpointChange:t.default.func,onLayoutChange:t.default.func,onWidthChange:t.default.func}),u(p,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:r.noop,onLayoutChange:r.noop,onWidthChange:r.noop}),iX}var cX,uX,dX={},hX=be(gv);function pX(){if(cX)return dX;cX=1,Object.defineProperty(dX,"__esModule",{value:!0}),dX.default=function(o){var i;return i=class extends e.Component{constructor(){super(...arguments),l(this,"state",{width:1280}),l(this,"elementRef",e.createRef()),l(this,"mounted",!1),l(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new n.default((e=>{if(this.elementRef.current instanceof HTMLElement){const t=e[0].contentRect.width;this.setState({width:t})}}));const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.observe(e)}componentWillUnmount(){this.mounted=!1;const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.unobserve(e),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:t,...n}=this.props;return t&&!this.mounted?e.createElement("div",{className:(0,r.default)(this.props.className,c),style:this.props.style,ref:this.elementRef}):e.createElement(o,s({innerRef:this.elementRef},n,this.state))}},l(i,"defaultProps",{measureBeforeMount:!1}),l(i,"propTypes",{measureBeforeMount:t.default.bool}),i};var e=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(o),t=i(qe()),n=i(hX),r=i(eY());function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function s(){return s=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},s.apply(this,arguments)}function l(e,t,n){return t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c="react-grid-layout";return dX}var fX=ye((uX||(uX=1,function(e){e.exports=nX().default,e.exports.utils=iY(),e.exports.calculateUtils=lY(),e.exports.Responsive=lX().default,e.exports.Responsive.utils=sX(),e.exports.WidthProvider=pX().default}(SV)),SV.exports)),mX={layoutContainer:"DashboardLayout-module_layoutContainer__wOGEu",addNewComponent:"DashboardLayout-module_addNewComponent__Gan9z",plusIcon:"DashboardLayout-module_plusIcon__yQQHP",gridItem:"DashboardLayout-module_gridItem__NtXI-"};const gX=({dashboards:n})=>{const[r,i]=o.useState(window.innerWidth),[a,s]=o.useState([]),[c,u]=o.useState(n||[]);l((()=>{const e=()=>i(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),l((()=>{const e=JSON.parse(localStorage.getItem("dashboardLayout")||"[]"),t=c.map((e=>e.id)),n=e.filter((e=>t.includes(e.i)));if(console.log("existDashboardItems",n),n.length>0)return s(n)}),[c]);const d=e=>{localStorage.setItem("dashboardLayout",JSON.stringify(e))};return e("div",{className:mX.layoutContainer,children:e(fX,{className:mX.gridLayout,layout:a,width:r,cols:8,onLayoutChange:e=>{d(e)},draggableHandle:".dragHandle",children:a.map((n=>e("div",{className:mX.gridItem,onClick:()=>{console.log(n)},children:"addNewComponent"!==n.i?e(ag,{chartProps:{type:"bar",data:c.find((e=>e.id===n.i))?.data,options:c.find((e=>e.id===n.i))?.options},headerProps:{content:"Title",suffix:e(Za,{name:"cog",className:mX.dragHandle})}}):t(B,{className:mX.addNewComponent,direction:"vertical",alignment:"center",dimensionX:"fill",gap:15,dimensionY:"fill",children:[e(Za,{name:"plus",className:mX.plusIcon}),e(V,{size:"xlarge",children:" New Component"})]})},n.i)))})})};var vX="MenuGroup-module_container__VQaFb",yX="MenuGroup-module_menuSection__Nfvar",bX="MenuGroup-module_label__5skIC",_X="MenuGroup-module_noDivider__7fIo3";var xX=a((({options:n={},showDivider:r=!0,className:o,...i})=>e(B,{dimensionX:160,direction:"vertical",gap:0,alignment:"leftCenter",className:`${vX} ${o||""}`,...i,children:Object.entries(n).map((([n,o],i,a)=>{const{label:s,value:l,className:c,...u}=o;return t(B,{dimensionX:"fill",direction:"vertical",gap:10,alignment:"leftCenter",...u,className:`${yX} ${r&&i!==a.length-1?"":_X} ${o.className||""}`,children:[s&&e(V,{className:bX,children:s}),l]},n)}))}))),wX="Table-module_table__7BBwk",SX="Table-module_fixedColumns__fjVOb",kX="Table-module_scrollableColumns__PzDZ9",CX="Table-module_column__daVNe",EX="Table-module_header__w6wP3",MX="Table-module_border__ise22",PX="Table-module_cell__K--55",OX="Table-module_resizer__PTgL3",TX="Table-module_focusedCell__-1YzJ";const NX=a((({columns:n,data:r,saveToLocalStorage:o={id:"table",save:!1},fixedColumns:i=[],noResizeableColumns:a=[],onCellKeyDown:s,tableClassName:c="",columnClassName:d="",headerClassName:h="",cellClassName:p=""})=>{const[f,m]=u((()=>n.map((e=>{const t=o?.save?localStorage.getItem(`${o?.id}-${e.key}`):null;return{...e,width:t||e.width||"300px"}})))),[g,v]=u(null),y=(e,t)=>{m((n=>n.map((n=>n.key===e?{...n,width:t}:n))))};l((()=>{((e,t)=>{e.forEach((e=>{localStorage.setItem(`${t}-${e.key}`,e.width||"")}))})(f,o.id)}),[f,o.save]);return l((()=>{if(!g)return;const e=["ArrowRight","ArrowLeft","ArrowDown","ArrowUp"],t=(e,t)=>{const o=n.findIndex((e=>e.key===t.column)),i=t.row;switch(e.key){case"ArrowRight":((e,t)=>{e<n.length-1&&v({column:n[e+1].key,row:t})})(o,i);break;case"ArrowLeft":((e,t)=>{e>0&&v({column:n[e-1].key,row:t})})(o,i);break;case"ArrowDown":((e,t)=>{t<r.length-1&&v({column:e,row:t+1})})(t.column,i);break;case"ArrowUp":((e,t)=>{t>0&&v({column:e,row:t-1})})(t.column,i)}},o=n=>{var r;r=n.key,e.includes(r)?(n.preventDefault(),t(n,g)):s?.({columnKey:g.column,rowIndex:g.row,event:n})};return globalThis.addEventListener("keydown",o),()=>{globalThis.removeEventListener("keydown",o)}}),[g,n,r,s]),e("div",{className:`${wX} ${c}`,children:f.map(((n,o)=>{const s=i.includes(n.key),l=s?i.slice(0,i.indexOf(n.key)).reduce(((e,t)=>e+Number.parseInt(f.find((e=>e.key===t))?.width||"300px")),0)+"px":"unset";return t(DX,{columnKey:n.key,className:`${CX} ${s?SX:kX} ${d}`,style:{left:l},width:n.width,updateColumnWidth:y,noResizeable:a.includes(n.key),children:[e(DX.Header,{className:h,children:n.header}),r.map(((t,r)=>{const o=g?.column===n.key&&g?.row===r,i=`${n.key}-${r}`;return e(DX.Cell,{focused:o,onClick:()=>((e,t)=>{v({column:e,row:t})})(n.key,r),"data-cell-key":i,className:p,children:n.renderCell({row:t,rowIndex:r,isFocused:o,columnKey:n.key})},i)}))]},n.key)}))})})),DX=a((({columnKey:n,children:r,ref:o,className:i,width:a,updateColumnWidth:c,noResizeable:d,style:h})=>{const[p,f]=u(a),[m,g]=u(!1),v=s(null);l((()=>{const e=e=>{if(m&&v.current){const t=e.clientX-v.current.getBoundingClientRect().left;f(`${t}px`)}},t=()=>{if(g(!1),v.current){const e=v.current.style.minWidth;c?.(n,e)}};return m&&(globalThis.addEventListener("mousemove",e),globalThis.addEventListener("mouseup",t)),()=>{globalThis.removeEventListener("mousemove",e),globalThis.removeEventListener("mouseup",t)}}),[m,n,c]);return t("div",{ref:v,className:i,style:{...h,minWidth:p},children:[r,!d&&e("button",{type:"button",className:OX,"aria-label":"Resize column",onMouseDown:e=>{e.preventDefault(),g(!0)},onClick:e=>{e.preventDefault()}})]})}));DX.Header=({border:t=!0,headerAlign:n="center",children:r,...o})=>e(B,{dimensionX:"fill",alignment:{left:"leftTop",center:"center",right:"rightTop"}[n],...o,className:`${EX} ${t?MX:""} ${o.className||""}`,children:r}),DX.Cell=({children:t,focused:n,...r})=>e("div",{...r,className:`${PX} ${n?TX:""} ${r.className||""}`,children:t});var AX={notificationContainer:"Notification-module_notificationContainer__AQGHi",notificationItem:"Notification-module_notificationItem__a97Y1",enter:"Notification-module_enter__QJYI5",exit:"Notification-module_exit__7-eTw",notificationIcon:"Notification-module_notificationIcon__GfxMq",spin:"Notification-module_spin__NnI0P",notificationContent:"Notification-module_notificationContent__dL0yz",notificationMessage:"Notification-module_notificationMessage__9YbKE",notificationDescription:"Notification-module_notificationDescription__1r9AU",notificationAction:"Notification-module_notificationAction__SrLVH",notificationClose:"Notification-module_notificationClose__1xqz9",notificationProgressContainer:"Notification-module_notificationProgressContainer__FXOGc",notificationProgress:"Notification-module_notificationProgress__lWMoZ",notificationPortal:"Notification-module_notificationPortal__hmII4"};function LX({notification:n,onClose:r,stackGap:i,rtl:a,duration:d,style:h,animationDuration:p=300}){const[f,m]=u(!1),[g,v]=u(!1),[y,b]=u(!1),[_,x]=u(0),w=s(null),S=s(null),k=s(null),C=s(0),E=s(!1),M=s(null),{config:P}=n,O=void 0!==P.duration?P.duration:d,T=c((()=>{g||(v(!0),P.onClose?.(),r(n.id),setTimeout((()=>{}),p))}),[P,n.id,r,p]),N=c(((e=!1)=>{if(null===O||O<=0||g)return;const t=e?Math.max(0,O-C.current):O;if(t<=0)return void T();k.current=Date.now()-(e?C.current:0),e||(x(0),C.current=0),w.current=setTimeout((()=>{T()}),t);const n=()=>{if(null===k.current||g)return;const e=Date.now()-k.current,t=Math.min(e/O*100,100);x(t),t<100&&!g&&(S.current=setTimeout(n,16))};S.current=setTimeout(n,16)}),[O,T,g]),D=c(((e=!1)=>{e&&null!==k.current&&(C.current=Date.now()-k.current),w.current&&(clearTimeout(w.current),w.current=null),S.current&&(clearTimeout(S.current),S.current=null),e||(k.current=null,C.current=0,E.current=!1)}),[]),A=c((()=>{P.onClick?.()}),[P]),L=c((()=>{b(!0),D(!0)}),[D]),I=c((()=>{b(!1),!g&&null!==O&&O>0&&N(!0)}),[N,g,O]),z=c((e=>{"Escape"===e.key&&!1!==P.closable&&(e.preventDefault(),T())}),[P.closable,T]);l((()=>{const e=setTimeout((()=>{m(!0)}),10);return()=>clearTimeout(e)}),[]),l((()=>(!f||y||g||E.current||(E.current=!0,N(!1)),()=>D(!1))),[f,y,g]),l((()=>()=>{D(!1)}),[D]);const R=!1!==P.closable,$=`\n ${AX.notificationItem}\n ${f?AX.enter:""}\n ${g?AX.exit:""}\n ${P.className||""}\n `.trim();return t("div",{ref:M,className:$,style:{pointerEvents:"auto",...P.style,...h},onMouseEnter:L,onMouseLeave:I,onClick:A,onKeyDown:z,tabIndex:P.btn?0:-1,role:o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className&&P.icon.props.className.includes("error")?"alert":"status","aria-live":o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className&&P.icon.props.className.includes("error")?"assertive":"polite","data-placement":n.placement,"data-type":(()=>{if(o.isValidElement(P.icon)&&"object"==typeof P.icon.props&&P.icon.props&&"className"in P.icon.props&&"string"==typeof P.icon.props.className){const e=P.icon.props.className;if(e.includes("success"))return"success";if(e.includes("error"))return"error";if(e.includes("warning"))return"warning";if(e.includes("info"))return"info";if(e.includes("loading"))return"loading"}return"default"})(),"data-rtl":a,children:[P.icon&&e("div",{className:AX.notificationIcon,children:P.icon}),t("div",{className:AX.notificationContent,children:[e("div",{className:AX.notificationMessage,children:P.message}),P.description&&e("div",{className:AX.notificationDescription,children:P.description}),P.btn&&e("div",{className:AX.notificationAction,children:P.btn})]}),R&&e("button",{className:AX.notificationClose,onClick:e=>{e.stopPropagation(),T()},"aria-label":"Close notification",tabIndex:0,children:P.closeIcon||e(Za,{name:"close",size:"sm"})}),null!==O&&O>0&&e("div",{className:AX.notificationProgressContainer,children:e("div",{className:AX.notificationProgress,style:{width:`${_}%`,opacity:y?.3:1}})})]})}const IX=({placement:t,notifications:n,onRemove:r,stackGap:o,rtl:i,duration:a,zIndex:s,top:l,bottom:c,animationDuration:u=300})=>{if(0===n.length)return null;const d=e=>{switch(e){case"topLeft":return"topRight";case"topRight":return"topLeft";case"bottomLeft":return"bottomRight";case"bottomRight":return"bottomLeft";default:return e}};return e("div",{className:`${AX.notificationContainer} ${AX[t]}`,style:(()=>{const e={position:"fixed",zIndex:s,display:"flex",flexDirection:"column",gap:o,pointerEvents:"none"};switch(i?d(t):t){case"topLeft":return{...e,top:l,left:24,alignItems:"flex-start"};case"topRight":return{...e,top:l,right:24,alignItems:"flex-end"};case"bottomLeft":return{...e,bottom:c,left:24,alignItems:"flex-start",flexDirection:"column-reverse"};case"bottomRight":return{...e,bottom:c,right:24,alignItems:"flex-end",flexDirection:"column-reverse"};default:return e}})(),children:n.sort(((e,t)=>e.createdAt-t.createdAt)).map(((t,n)=>e(LX,{notification:t,onClose:r,stackGap:o,rtl:i,duration:a,animationDuration:u,style:{zIndex:s+n}},t.id)))})},zX=y(null),RX=({children:n,maxCount:r=5,top:o=24,bottom:a=24,rtl:s=!1,zIndexBase:l=1e3,duration:d=4500,stackGap:h=12,placementDefaults:p={},concurrent:f=!0,animationDuration:m=300})=>{const[g,v]=u([]),y=c(((e,t)=>{const n=e.placement||"topRight",o={id:e.key||`notification-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,config:{...p[n],...e,placement:n},placement:n,instanceId:t,createdAt:Date.now()};v((i=>{if(e.key){const n=i.findIndex((n=>n.config.key===e.key&&n.instanceId===t));if(-1!==n){const e=[...i];return e[n]={...e[n],config:o.config,createdAt:Date.now()},e}}const a=[...i,o],s=a.filter((e=>e.placement===n&&e.instanceId===t));if(s.length>r){const e=s.sort(((e,t)=>e.createdAt-t.createdAt)),t=e.slice(0,s.length-r);return t.forEach((e=>{setTimeout((()=>e.config.onClose?.()),0)})),a.filter((e=>!t.some((t=>t.id===e.id))))}return a}))}),[r,p]),b=c(((e,t)=>{v((n=>n.filter((n=>!(n.id===e&&n.instanceId===t)))))}),[]),_=c(((e,t,n)=>{v((r=>r.map((r=>r.config.key===e&&r.instanceId===n?{...r,config:{...r.config,...t}}:r))))}),[]),x=c(((e,t)=>{v((n=>{if(!e&&!t)return n.forEach((e=>e.config.onClose?.())),[];if(e&&t){const r=n.filter((n=>n.config.key===e&&n.instanceId===t));return r.forEach((e=>e.config.onClose?.())),n.filter((n=>!(n.config.key===e&&n.instanceId===t)))}if(t){const e=n.filter((e=>e.instanceId===t));return e.forEach((e=>e.config.onClose?.())),n.filter((e=>e.instanceId!==t))}if(e){const t=n.filter((t=>t.config.key===e));return t.forEach((e=>e.config.onClose?.())),n.filter((t=>t.config.key!==e))}return n}))}),[]),w=i((()=>({addNotification:y,removeNotification:b,updateNotification:_,destroyNotifications:x})),[y,b,_,x]),S=i((()=>{const e={};return g.forEach((t=>{const n=t.placement;e[n]||(e[n]=[]),e[n].push(t)})),e}),[g]);return t(zX.Provider,{value:w,children:[n,["topLeft","topRight","bottomLeft","bottomRight"].map((t=>{const n=S[t]||[];return 0===n.length?null:e(Wm,{className:AX.notificationPortal,children:e(IX,{placement:t,notifications:n,onRemove:e=>{const t=n.find((t=>t.id===e));t&&b(e,t.instanceId)},stackGap:h,rtl:s,duration:d,zIndex:l,top:o,bottom:a,animationDuration:m})},t)}))]})},$X=()=>{const t=f(),n=(()=>{const e=p(zX);if(!e)throw new Error("useNotificationContext must be used within NotificationProvider");return e})();return[i((()=>{const r=e=>{n.addNotification(e,t)};return{open:r,info:t=>{r({...t,icon:e(Za,{name:"help",className:"notification-icon-info"})})},success:t=>{r({...t,icon:e(Za,{name:"check",className:"notification-icon-success"})})},error:t=>{r({...t,icon:e(Za,{name:"close",className:"notification-icon-error"})})},warning:t=>{r({...t,icon:e(Za,{name:"notificationClearAll",className:"notification-icon-warning"})})},loading:t=>{r({...t,icon:e(Za,{name:"refresh",className:"notification-icon-loading"}),duration:null})},destroy:e=>{n.destroyNotifications(e,t)}}}),[n,t]),c((()=>null),[])]};var FX="Array-module_inputMinimized__N3CzD",jX="Array-module_contentContainer__Nf98X",BX="Array-module_value__X6PGp",HX={container:"ArrayInput-module_container__pCN6T",header:"ArrayInput-module_header__v88Lg",inputHeader:"ArrayInput-module_inputHeader__YhlBU",emptyStateText:"ArrayInput-module_emptyStateText__ZHJbR"},WX="String-module_icon__pKB1k",VX="String-module_text__-rE-j",YX="String-module_select__G6d9c",XX="String-module_baseInput__ieBad",qX="String-module_input__sXbRz";var UX=a((({label:t,description:n,value:r,options:o,onChange:i,selectProps:a,inputProps:l,inputContainerClassName:c,iconName:d="formatQuoteClose",...h})=>{const p=s(null),f=s(null),m=s(null),[g,v]=u(!1);return e(he,{dimensionX:"fill",description:n,forceFocus:g,dropDownRef:m,onFocusChange:e=>(e=>{p?.current?.toggleDropdown(e),v(e),e&&!o&&f.current?.focus()})(e),labelProps:{dimensionX:"hug",divider:!!t?.trim(),prefix:{children:e(Za,{className:WX,name:d})},root:t?{dimensionX:"hug",children:e(V,{className:VX,size:"medium",children:t})}:void 0},inputContainerProps:{className:`${XX} ${c}`},...h,children:o?e(Zm,{selectRef:p,externalDropdownRef:m,disableClick:!0,options:o,value:r,placeholder:"",onChange:e=>{i?.(e),v(!1)},...a,className:`${YX} ${a?.className}`}):e(G,{ref:f,value:r,onChange:e=>i?.(e.target.value),...l,className:`${qX} ${l?.className}`})})})),ZX="Number-module_icon__o1inF",GX="Number-module_text__S4l2F",KX="Number-module_select__NRfCp",JX="Number-module_baseInput__uueTo",QX="Number-module_input__m1vMZ";var eq=a((({label:t,description:n,value:r,options:o,onChange:i,selectProps:a,inputProps:l,inputContainerClassName:c,iconName:d="numericBox",...h})=>{const p=s(null),f=s(null),[m,g]=u(!1),v=s(null);return e(he,{dimensionX:"fill",description:n,forceFocus:m,dropDownRef:v,onFocusChange:e=>(e=>{p?.current?.toggleDropdown(e),g(e),e&&!o&&f.current?.focus()})(e),labelProps:{dimensionX:"hug",divider:!!t?.trim(),prefix:{children:e(Za,{className:ZX,name:d})},root:t?{dimensionX:"hug",children:e(V,{className:GX,size:"medium",children:t})}:void 0},inputContainerProps:{className:`${JX} ${c}`},...h,children:o?e(Zm,{selectRef:p,externalDropdownRef:v,disableClick:!0,options:o,value:r,placeholder:"",onChange:e=>{i?.(e),g(!1)},...a,className:`${KX} ${a?.className}`}):e(G,{ref:f,value:r,type:"number",onChange:e=>{const t=e.target.value,n=""===t;i?.(n?void 0:Number(t))},...l,className:`${QX} ${l?.className}`})})})),tq="TextArea-module_container__VXi9C",nq="TextArea-module_titleContainer__l1CD0",rq="TextArea-module_textAreaInput__iYLK4",oq="TextArea-module_description__VEpUG",iq="TextArea-module_icon__iVGeQ";var aq=a((({value:r,title:o="",icon:i,textAreaProps:a,textAreaContainerProps:l,titleContainerProps:c,titlePrefixProps:u,titleRootProps:d,titleSuffixProps:h,containerProps:p,description:f,placeholder:g,onChange:v})=>{const y=s(null);return m(a?.ref??{current:null},(()=>y.current)),t(B,{dimensionX:"fill",alignment:"leftCenter",direction:"vertical",...p,className:`${tq} ${p?.className||""}`,children:[t(n,{children:[(o||i||u||h)&&e(WA,{dimensionX:"fill",dimensionY:36,alignment:"leftCenter",...c,className:`${nq} ${c?.className||""}`,prefix:{children:i?e(Za,{name:i,className:iq}):null,dimensionX:"hug",alignment:"leftCenter",...u},root:{children:o,dimensionX:"fill",alignment:"leftCenter",...d},suffix:{children:h?.children,dimensionX:"hug",alignment:"rightCenter",...h},onClick:e=>{y.current?.focus();try{c?.onClick?.(e)}catch(e){console.error("Error in titleContainerProps.onClick:",e)}}}),e(B,{dimensionX:"fill",alignment:"leftCenter",...l,className:`${l?.className||""}`,children:e("textarea",{className:rq,value:r,onChange:v,placeholder:g||"",ref:y,...a})})]}),e(V,{size:"xsmall",className:`${oq}`,children:f})]})})),sq="Date-module_text__eXWDJ",lq="Date-module_dateInput__hx3cC",cq="Date-module_stringValueWrapper__XM06v",uq="Date-module_iconGroup__W1sPW",dq="Date-module_clearIcon__rTC7y",hq="Date-module_stringValue__eJN9C";var pq=a((({label:n,description:r,onChange:o,value:i,placeholder:a="",inputContainerClassName:s,datePickerProps:l})=>{const c=e=>{o?.(new Date(e))};return e(he,{dimensionX:"fill",alignment:"leftCenter",description:r,labelProps:{prefix:{children:e(Za,{name:"calendarBlank"})},root:{children:e(V,{className:sq,children:n})}},inputContainerProps:{dimensionX:"fill",alignment:"leftCenter",className:`${s} ${lq}`},children:e(wA,{placeholder:a,suffixIcon:null,onChange:c,value:i,renderLabel:n=>t("div",{className:cq,children:[e(vA,{color:"default",className:hq,children:n}),e("div",{className:uq,children:e(FS,{className:dq,onClick:()=>c("")})})]}),...l})})})),fq="Boolean-module_container__RN4yt",mq="Boolean-module_description__v3iuY";var gq=a((({checked:n=!1,disabled:r=!1,label:o,containerProps:i,switchContainerProps:a,suffixProps:s,rootProps:l,labelProps:c,description:u,onChange:d,size:h,className:p})=>t(B,{dimensionX:"fill",alignment:"leftCenter",direction:"vertical",className:p||"",children:[e(H,{dimensionY:36,dimensionX:"fill",root:{children:e(NL,{checked:n,disabled:r,...a,onChange:d,size:h}),...l},suffix:{children:o&&e(V,{...c,children:o}),...s},className:`${i?.className} ${fq}`,...i}),u&&e(V,{size:"xsmall",className:`${mq}`,children:u})]}))),vq={baseInput:"Color-module_baseInput__gWvlQ"};var yq=a((({label:t,description:n,value:r="#000000",labelProps:o,colorContainerProps:i,inputContainerClassName:a,onChange:s,...l})=>e(he,{dimensionX:"fill",description:n,labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Za,{className:vq.icon,name:"invertColors"})},root:{dimensionX:"hug",children:e(V,{className:vq.text,size:"medium",children:t})},...o},inputContainerProps:{className:`${vq.baseInput} ${a}`},...l,children:e(rm,{dimensionX:"fill",value:r,onChange:e=>{s?.(e)},...i})}))),bq={container:"Storage-module_container__jdMaj",top:"Storage-module_top__vhJmX",storage:"Storage-module_storage__aXBhd",previewIcon:"Storage-module_previewIcon__zNCCM",text:"Storage-module_text__8eR8V"};function _q(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const xq=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function wq(e,t,n){const r=function(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const n=t.split(".").pop().toLowerCase(),r=xq.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e),{webkitRelativePath:o}=e,i="string"==typeof t?t:"string"==typeof o&&o.length>0?o:`./${e.name}`;return"string"!=typeof r.path&&Sq(r,"path",i),void 0!==n&&Object.defineProperty(r,"handle",{value:n,writable:!1,configurable:!1,enumerable:!0}),Sq(r,"relativePath",i),r}function Sq(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const kq=[".DS_Store","Thumbs.db"];function Cq(e){return"object"==typeof e&&null!==e}function Eq(e){return e.filter((e=>-1===kq.indexOf(e.name)))}function Mq(e){if(null===e)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function Pq(e){if("function"!=typeof e.webkitGetAsEntry)return Tq(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Dq(t):Tq(e,t)}function Oq(e){return e.reduce(((e,t)=>[...e,...Array.isArray(t)?Oq(t):[t]]),[])}function Tq(e,t){return _q(this,void 0,void 0,(function*(){var n;if(globalThis.isSecureContext&&"function"==typeof e.getAsFileSystemHandle){const t=yield e.getAsFileSystemHandle();if(null===t)throw new Error(`${e} is not a File`);if(void 0!==t){const e=yield t.getFile();return e.handle=t,wq(e)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return wq(r,null!==(n=null==t?void 0:t.fullPath)&&void 0!==n?n:void 0)}))}function Nq(e){return _q(this,void 0,void 0,(function*(){return e.isDirectory?Dq(e):function(e){return _q(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{e.file((n=>{const r=wq(n,e.fullPath);t(r)}),(e=>{n(e)}))}))}))}(e)}))}function Dq(e){const t=e.createReader();return new Promise(((e,n)=>{const r=[];!function o(){t.readEntries((t=>_q(this,void 0,void 0,(function*(){if(t.length){const e=Promise.all(t.map(Nq));r.push(e),o()}else try{const t=yield Promise.all(r);e(t)}catch(e){n(e)}}))),(e=>{n(e)}))}()}))}var Aq,Lq={};var Iq=(Aq||(Aq=1,Lq.__esModule=!0,Lq.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(0===n.length)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0}),Lq),zq=ye(Iq);function Rq(e){return function(e){if(Array.isArray(e))return Wq(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Hq(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$q(Object(n),!0).forEach((function(t){jq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||Hq(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hq(e,t){if(e){if("string"==typeof e)return Wq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wq(e,t):void 0}}function Wq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Vq="function"==typeof zq?zq:zq.default,Yq=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(","),t=e.length>1?"one of ".concat(e.join(", ")):e[0];return{code:"file-invalid-type",message:"File type must be ".concat(t)}},Xq=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},qq=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},Uq={code:"too-many-files",message:"Too many files"};function Zq(e,t){var n="application/x-moz-file"===e.type||Vq(e,t);return[n,n?null:Yq(t)]}function Gq(e,t,n){if(Kq(e.size))if(Kq(t)&&Kq(n)){if(e.size>n)return[!1,Xq(n)];if(e.size<t)return[!1,qq(t)]}else{if(Kq(t)&&e.size<t)return[!1,qq(t)];if(Kq(n)&&e.size>n)return[!1,Xq(n)]}return[!0,null]}function Kq(e){return null!=e}function Jq(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function Qq(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function eU(e){e.preventDefault()}function tU(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!Jq(e)&&t&&t.apply(void 0,[e].concat(r)),Jq(e)}))}}function nU(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||"application/*"===e||/\w+\/[-+.\w]+/g.test(e)}function rU(e){return/^.*\.[\w]+$/.test(e)}var oU=["children"],iU=["open"],aU=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],sU=["refKey","onChange","onClick"];function lU(e){return function(e){if(Array.isArray(e))return dU(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||uU(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cU(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||uU(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uU(e,t){if(e){if("string"==typeof e)return dU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dU(e,t):void 0}}function dU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hU(Object(n),!0).forEach((function(t){fU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mU(e,t){if(null==e)return{};var n,r,o=function(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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gU=h((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=pU(pU({},vU),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,u=t.minSize,d=t.multiple,h=t.maxFiles,p=t.onDragEnter,f=t.onDragLeave,m=t.onDragOver,g=t.onDrop,v=t.onDropAccepted,y=t.onDropRejected,b=t.onFileDialogCancel,_=t.onFileDialogOpen,x=t.useFsAccessApi,w=t.autoFocus,S=t.preventDropOnDocument,C=t.noClick,E=t.noKeyboard,M=t.noDrag,P=t.noDragEventsBubbling,O=t.onError,T=t.validator,N=i((function(){return function(e){if(Kq(e))return Object.entries(e).reduce((function(e,t){var n=Bq(t,2),r=n[0],o=n[1];return[].concat(Rq(e),[r],Rq(o))}),[]).filter((function(e){return nU(e)||rU(e)})).join(",")}(n)}),[n]),D=i((function(){return function(e){return Kq(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=Bq(e,2),n=t[0],r=t[1],o=!0;return nU(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(rU)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=Bq(t,2),r=n[0],o=n[1];return Fq(Fq({},e),{},jq({},r,o))}),{})}]:e}(n)}),[n]),A=i((function(){return"function"==typeof _?_:xU}),[_]),L=i((function(){return"function"==typeof b?b:xU}),[b]),I=s(null),z=s(null),R=cU(k(_U,bU),2),$=R[0],F=R[1],j=$.isFocused,B=$.isFileDialogActive,H=s("undefined"!=typeof window&&window.isSecureContext&&x&&"showOpenFilePicker"in window),W=function(){!H.current&&B&&setTimeout((function(){z.current&&(z.current.files.length||(F({type:"closeDialog"}),L()))}),300)};l((function(){return window.addEventListener("focus",W,!1),function(){window.removeEventListener("focus",W,!1)}}),[z,B,L,H]);var V=s([]),Y=function(e){I.current&&I.current.contains(e.target)||(e.preventDefault(),V.current=[])};l((function(){return S&&(document.addEventListener("dragover",eU,!1),document.addEventListener("drop",Y,!1)),function(){S&&(document.removeEventListener("dragover",eU),document.removeEventListener("drop",Y))}}),[I,S]),l((function(){return!r&&w&&I.current&&I.current.focus(),function(){}}),[I,w,r]);var X=c((function(e){O?O(e):console.error(e)}),[O]),q=c((function(e){e.preventDefault(),e.persist(),ae(e),V.current=[].concat(lU(V.current),[e.target]),Qq(e)&&Promise.resolve(o(e)).then((function(t){if(!Jq(e)||P){var n=t.length,r=n>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!(!i&&t.length>1||i&&a>=1&&t.length>a)&&t.every((function(e){var t=Bq(Zq(e,n),1)[0],i=Bq(Gq(e,r,o),1)[0],a=s?s(e):null;return t&&i&&!a}))}({files:t,accept:N,minSize:u,maxSize:a,multiple:d,maxFiles:h,validator:T});F({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),p&&p(e)}})).catch((function(e){return X(e)}))}),[o,p,X,P,N,u,a,d,h,T]),U=c((function(e){e.preventDefault(),e.persist(),ae(e);var t=Qq(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&m&&m(e),!1}),[m,P]),Z=c((function(e){e.preventDefault(),e.persist(),ae(e);var t=V.current.filter((function(e){return I.current&&I.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),V.current=t,t.length>0||(F({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Qq(e)&&f&&f(e))}),[I,f,P]),G=c((function(e,t){var n=[],r=[];e.forEach((function(e){var t=cU(Zq(e,N),2),o=t[0],i=t[1],s=cU(Gq(e,u,a),2),l=s[0],c=s[1],d=T?T(e):null;if(o&&l&&!d)n.push(e);else{var h=[i,c];d&&(h=h.concat(d)),r.push({file:e,errors:h.filter((function(e){return e}))})}})),(!d&&n.length>1||d&&h>=1&&n.length>h)&&(n.forEach((function(e){r.push({file:e,errors:[Uq]})})),n.splice(0)),F({acceptedFiles:n,fileRejections:r,isDragReject:r.length>0,type:"setFiles"}),g&&g(n,r,t),r.length>0&&y&&y(r,t),n.length>0&&v&&v(n,t)}),[F,d,N,u,a,h,g,v,y,T]),K=c((function(e){e.preventDefault(),e.persist(),ae(e),V.current=[],Qq(e)&&Promise.resolve(o(e)).then((function(t){Jq(e)&&!P||G(t,e)})).catch((function(e){return X(e)})),F({type:"reset"})}),[o,G,X,P]),J=c((function(){if(H.current){F({type:"openDialog"}),A();var e={multiple:d,types:D};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){G(e,null),F({type:"closeDialog"})})).catch((function(e){!function(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}(e)?!function(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}(e)?X(e):(H.current=!1,z.current?(z.current.value=null,z.current.click()):X(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):(L(e),F({type:"closeDialog"}))}))}else z.current&&(F({type:"openDialog"}),A(),z.current.value=null,z.current.click())}),[F,A,L,x,G,X,D,d]),Q=c((function(e){I.current&&I.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),J()))}),[I,J]),ee=c((function(){F({type:"focus"})}),[]),te=c((function(){F({type:"blur"})}),[]),ne=c((function(){C||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?J():setTimeout(J,0))}),[C,J]),re=function(e){return r?null:e},oe=function(e){return E?null:re(e)},ie=function(e){return M?null:re(e)},ae=function(e){P&&e.stopPropagation()},se=i((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,i=e.onKeyDown,a=e.onFocus,s=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,h=e.onDrop,p=mU(e,aU);return pU(pU(fU({onKeyDown:oe(tU(i,Q)),onFocus:oe(tU(a,ee)),onBlur:oe(tU(s,te)),onClick:re(tU(l,ne)),onDragEnter:ie(tU(c,q)),onDragOver:ie(tU(u,U)),onDragLeave:ie(tU(d,Z)),onDrop:ie(tU(h,K)),role:"string"==typeof o&&""!==o?o:"presentation"},n,I),r||E?{}:{tabIndex:0}),p)}}),[I,Q,ee,te,ne,q,U,Z,K,E,M,r]),le=c((function(e){e.stopPropagation()}),[]),ce=i((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,i=mU(e,sU);return pU(pU({},fU({accept:N,multiple:d,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:re(tU(r,K)),onClick:re(tU(o,le)),tabIndex:-1},n,z)),i)}}),[z,n,d,K,r]);return pU(pU({},$),{},{isFocused:j&&!r,getRootProps:se,getInputProps:ce,rootRef:I,inputRef:z,open:re(J)})}(mU(e,oU)),a=r.open,u=mU(r,iU);return m(t,(function(){return{open:a}}),[a]),o.createElement(_,null,n(pU(pU({},u),{},{open:a})))}));gU.displayName="Dropzone";var vU={disabled:!1,getFilesFromEvent:function(e){return _q(this,void 0,void 0,(function*(){return Cq(e)&&Cq(e.dataTransfer)?function(e,t){return _q(this,void 0,void 0,(function*(){if(e.items){const n=Mq(e.items).filter((e=>"file"===e.kind));if("drop"!==t)return n;return Eq(Oq(yield Promise.all(n.map(Pq))))}return Eq(Mq(e.files).map((e=>wq(e))))}))}(e.dataTransfer,e.type):function(e){return Cq(e)&&Cq(e.target)}(e)?function(e){return Mq(e.target.files).map((e=>wq(e)))}(e):Array.isArray(e)&&e.every((e=>"getFile"in e&&"function"==typeof e.getFile))?function(e){return _q(this,void 0,void 0,(function*(){const t=yield Promise.all(e.map((e=>e.getFile())));return t.map((e=>wq(e)))}))}(e):[]}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};gU.defaultProps=vU,gU.propTypes={children:Ue.func,accept:Ue.objectOf(Ue.arrayOf(Ue.string)),multiple:Ue.bool,preventDropOnDocument:Ue.bool,noClick:Ue.bool,noKeyboard:Ue.bool,noDrag:Ue.bool,noDragEventsBubbling:Ue.bool,minSize:Ue.number,maxSize:Ue.number,maxFiles:Ue.number,disabled:Ue.bool,getFilesFromEvent:Ue.func,onFileDialogCancel:Ue.func,onFileDialogOpen:Ue.func,useFsAccessApi:Ue.bool,autoFocus:Ue.bool,onDragEnter:Ue.func,onDragLeave:Ue.func,onDragOver:Ue.func,onDrop:Ue.func,onDropAccepted:Ue.func,onDropRejected:Ue.func,onError:Ue.func,validator:Ue.func};var yU=gU,bU={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function _U(e,t){switch(t.type){case"focus":return pU(pU({},e),{},{isFocused:!0});case"blur":return pU(pU({},e),{},{isFocused:!1});case"openDialog":return pU(pU({},bU),{},{isFileDialogActive:!0});case"closeDialog":return pU(pU({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return pU(pU({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return pU(pU({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return pU({},bU);default:return e}}function xU(){}var wU=a((({file:r,label:o,containerProps:i,topContainerProps:a,dropzoneContainerProps:s,description:l,errorMessage:c,helperTextContainerProps:u,helperTextProps:d,onClickShowFileSelect:h,onUpload:p,onDelete:f,onPreview:m})=>{const g={position:"absolute",height:"100%",width:"100%",objectFit:"contain"},v=CL({file:r,styles:{img:g,embed:g}});return t(B,{direction:"vertical",dimensionX:"fill",dimensionY:472,alignment:"top",gap:10,className:`${i?.className}`,children:[t(B,{direction:"vertical",dimensionX:"fill",gap:10,className:`${i?.className} ${bq.container}`,children:[e(WA,{prefix:{children:e(Za,{name:"storage",className:bq.icon})},root:{children:e(V,{variant:"secondary",children:o})},suffix:{children:a?.hideActions?null:t(n,{children:[e(_s,{variant:"icon",onClick:h,disabled:a?.disableEditIcon,children:a?.editIcon||e(Za,{name:"pencil"})}),e(_s,{variant:"icon",color:"danger",onClick:e=>{f?.(e)},disabled:a?.disableDeleteIcon,children:a?.deleteIcon||e(Za,{name:"delete"})})]}),gap:0,...a?.suffix},...a?.container}),e(yU,{multiple:!1,onDrop:e=>{e.length&&p?.(e[0])},children:({getRootProps:o,getInputProps:i})=>e(B,{className:`${s?.container?.className} ${bq.storage}`,alignment:"center",dimensionX:"fill",dimensionY:407,direction:"vertical",gap:10,...o(),...s?.container,onClick:e=>{r?.url?m?.():h?.()},children:t(n,{children:[t(n,r?{children:[v,e(Za,{name:s?.previewIcon||"filterCenterFocus",size:32,className:bq.previewIcon})]}:{children:[e(Za,{name:s?.uploadIcon||"storage",size:80}),e(V,{className:bq.text,children:s?.description||t("span",{children:["Upload your file or ",e("br",{})," pick an file from storage"]})})]}),e("input",{...i()})]})})})]}),(c||l)&&e(ae.HelperText,{alignment:"leftCenter",dimensionX:"fill",...u,className:`${bq.helperText} ${u?.className}`,children:e(V,{...d,size:"small",variant:c?"danger":"secondary",className:`${d?.className}`,children:c||l})})]})})),SU="MultipleSelection-module_icon__ewhbs",kU="MultipleSelection-module_text__G5mEr",CU="MultipleSelection-module_select__YXbPL",EU="MultipleSelection-module_baseInput__eUWHB";var MU=a((({label:t,description:n,value:r=[],options:o,onChange:i,selectProps:a,inputContainerClassName:l,...c})=>{const d=s(null),[h,p]=u(!1),f=s(null);return e(he,{dimensionX:"fill",description:n,dropDownRef:f,forceFocus:h,onFocusChange:e=>(e=>{d?.current?.toggleDropdown(e),p(e)})(e),labelProps:{dimensionX:"hug",divider:!0,prefix:{children:e(Za,{className:SU,name:"formatListChecks"})},root:{dimensionX:"hug",children:e(V,{className:kU,size:"medium",children:t})}},inputContainerProps:{className:`${EU} ${l}`},...c,children:e(Zm,{selectRef:d,externalDropdownRef:f,disableClick:!0,options:o||[],value:r,placeholder:"",multiple:!0,onChange:e=>{i?.(e)},...a,className:`${CU} ${a?.className}`})})})),PU="Location-module_location__ix8Fi",OU="Location-module_icon__a3NfC",TU="Location-module_mapMarker__J3aE2",NU="Location-module_description__mG0kX";var DU=a((({coordinates:n,title:r,onChange:o,description:i,...a})=>t(B,{dimensionX:500,dimensionY:500,gap:10,direction:"vertical",alignment:"leftCenter",...a,className:`${a.className} ${PU}`,children:[e(WA,{prefix:{children:e(Za,{name:"mapMarker",className:OU})},root:{children:e(V,{variant:"secondary",children:r})}}),e(hL,{coordinates:n,markerIcon:{icon:e(Za,{name:"mapMarker",size:"lg",className:TU})},onChange:o}),e(V,{size:"xsmall",className:`${NU}`,children:i})]}))),AU="RichText-module_container__MIFsF",LU="RichText-module_description__-uZpI";const IU={},zU={},RU={},$U={},FU={},jU={},BU={},HU={},WU={},VU={},YU={},XU={},qU={},UU={},ZU={},GU={},KU={},JU={},QU={},eZ={},tZ={},nZ={},rZ={},oZ={},iZ={},aZ={},sZ={},lZ={},cZ={},uZ={},dZ={},hZ={},pZ={},fZ={},mZ={},gZ={},vZ={},yZ={},bZ={},_Z={},xZ={},wZ={},SZ={},kZ={},CZ={},EZ="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,MZ=EZ&&"documentMode"in document?document.documentMode:null,PZ=EZ&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),OZ=EZ&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),TZ=!(!EZ||!("InputEvent"in window)||MZ)&&"getTargetRanges"in new window.InputEvent("input"),NZ=EZ&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),DZ=EZ&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,AZ=EZ&&/Android/.test(navigator.userAgent),LZ=EZ&&/^(?=.*Chrome).*/i.test(navigator.userAgent),IZ=EZ&&AZ&&LZ,zZ=EZ&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!LZ,RZ=0,$Z=1,FZ=2,jZ=1,BZ=2,HZ=3,WZ=4,VZ=5,YZ=6,XZ=NZ||DZ||zZ?" ":"",qZ="\n\n",UZ=OZ?" ":XZ,ZZ="֑-߿יִ-﷽ﹰ-ﻼ",GZ="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",KZ=new RegExp("^[^"+GZ+"]*["+ZZ+"]"),JZ=new RegExp("^[^"+ZZ+"]*["+GZ+"]"),QZ={bold:1,capitalize:1024,code:16,highlight:128,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},eG={directionless:1,unmergeable:2},tG={center:2,end:6,justify:4,left:1,right:3,start:5},nG={[BZ]:"center",[YZ]:"end",[WZ]:"justify",[jZ]:"left",[HZ]:"right",[VZ]:"start"},rG={normal:0,segmented:2,token:1},oG={[RZ]:"normal",[FZ]:"segmented",[$Z]:"token"};var iG=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function aG(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let sG=!1,lG=0;function cG(e){lG=e.timeStamp}function uG(e,t,n){const r="BR"===e.nodeName,o=t.__lexicalLineBreak;return o&&(e===o||r&&e.previousSibling===o)||r&&void 0!==FG(e,n)}function dG(e,t,n){const r=CK(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&QG(t,a,o,i,!1)}function hG(e,t,n){if(SQ(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return TG(t)&&n.isAttached()}function pG(e,t,n,r){for(let o=e;o&&!FK(o);o=mK(o)){const e=FG(o,t);if(void 0!==e){const t=RG(e,n);if(t)return x0(t)||!MK(o)?void 0:[o,t]}else if(o===r)return[r,VG(n)]}}function fG(e,t,n){sG=!0;const r=performance.now()-lG>100;try{f0(e,(()=>{const o=RQ()||function(e){return e.getEditorState().read((()=>{const e=RQ();return null!==e?e.clone():null}))}(e),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],h=d.type,p=d.target,f=pG(p,e,s,a);if(!f)continue;const[m,g]=f;if("characterData"===h)r&&hQ(g)&&TG(p)&&hG(o,p,g)&&dG(p,g,e);else if("childList"===h){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=$G(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&!uG(r,i,e)){if(OZ){const e=(MK(r)?r.innerText:null)||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];(uG(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&i.set(m,g)}}}if(i.size>0)for(const[t,n]of i)n.reconcileObservedMutation(t,e);const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||uG(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,YG(o)),OZ&&dK(e)&&o.insertRawText(u))}))}finally{sG=!1}}function mG(e){const t=e._observer;null!==t&&fG(e,t.takeRecords(),t)}function gG(e){!function(e){0===lG&&bK(e).addEventListener("textInput",cG,!0)}(e),e._observer=new MutationObserver(((t,n)=>{fG(e,t,n)}))}function vG(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function yG(e,t){const n=e.mergeWithSibling(t),r=t0()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function bG(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&hQ(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(vG(t,r)){r=yG(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&hQ(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(vG(r,n)){r=yG(r,n);break}break}n.remove()}}else r.remove()}function _G(e){return xG(e.anchor),xG(e.focus),e}function xG(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),hQ(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!y0(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let wG=1;const SG="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function kG(e){const t=document.activeElement;if(!MK(t))return!1;const n=t.nodeName;return x0(jG(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==PG(t))}function CG(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!kG(t)&&MG(t)===e}catch(e){return!1}}function EG(e){return e instanceof I0}function MG(e){let t=e;for(;null!=t;){const e=PG(t);if(EG(e))return e;t=mK(t)}return null}function PG(e){return e?e.__lexicalEditor:null}function OG(e){return e.isToken()||e.isSegmented()}function TG(e){return PK(e)&&3===e.nodeType}function NG(e){let t=e;for(;null!=t;){if(TG(t))return t;t=t.firstChild}return null}function DG(e,t,n){const r=QZ[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~QZ.superscript:"superscript"===t?o&=~QZ.subscript:"lowercase"===t?(o&=~QZ.uppercase,o&=~QZ.capitalize):"uppercase"===t?(o&=~QZ.lowercase,o&=~QZ.capitalize):"capitalize"===t&&(o&=~QZ.lowercase,o&=~QZ.uppercase),o}function AG(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function LG(e){QQ();const t=e.getLatest(),n=t.__parent,r=e0(),o=t0(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,y0(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function IG(e){JQ();const t=t0(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=RG(n);null!==e&&e.getWritable()}if(null!==e){const t=RG(e);null!==t&&t.getWritable()}}}function zG(){return KQ()?null:t0()._compositionKey}function RG(e,t){const n=(t||e0())._nodeMap.get(e);return void 0===n?null:n}function $G(e,t){const n=FG(e,t0());return void 0!==n?RG(n,t):null}function FG(e,t){return e[`__lexicalKey_${t._key}`]}function jG(e,t){let n=e;for(;null!=n;){const e=$G(n,t);if(null!==e)return e;n=mK(n)}return null}function BG(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function HG(e){return e.read((()=>WG().getTextContent()))}function WG(){return VG(e0())}function VG(e){return e._nodeMap.get("root")}function YG(e){JQ();const t=e0();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function XG(e){const t=t0(),n=function(e,t){let n=e;for(;null!=n;){const e=FG(n,t);if(void 0!==e)return e;n=mK(n)}return null}(e,t);return null===n?e===t.getRootElement()?RG("root"):null:RG(n)}function qG(e,t){return t?e.getTextContentSize():0}function UG(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ZG(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function GG(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function KG(e){return TG(e)?e.nodeValue:null}function JG(e,t,n){const r=CK(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=KG(o);const r=jG(o);if(null!==t&&hQ(r)){if(t===XZ&&n){const e=n.length;t=n,i=e,a=e}null!==t&&QG(r,t,i,a,e)}}}function QG(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===XZ&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(IG(null),NZ||DZ||zZ)i.remove();else{const e=t0();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const t=i.getParent(),o=$Q(),l=i.getTextContentSize(),c=zG(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||SQ(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const d=RQ();if(!SQ(d)||null===n||null===r)return void i.setTextContent(s);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=dQ(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function eK(e){return"ArrowLeft"===e}function tK(e){return"ArrowRight"===e}function nK(e,t){return PZ?e:t}function rK(e){return"Enter"===e}function oK(e){return"Backspace"===e}function iK(e){return"Delete"===e}function aK(e,t,n){return"a"===e.toLowerCase()&&nK(t,n)}function sK(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=aG(o);return n[t]=e,e}return o}function lK(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&iG(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(a,d?"updated":o)}function cK(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function uK(e,t){const n=e.offset;if("element"===e.type)return cK(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?cK(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function dK(e){const t=bK(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function hK(e,t,n){return d0(e,t,n)}function pK(e){return!S0(e)&&!e.isLastChild()&&!e.isInline()}function fK(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&iG(75,t),n}function mK(e){const t=e.assignedSlot||e.parentElement;return OK(t)?t.host:t}function gK(e){return function(e){return PK(e)&&9===e.nodeType}(e)?e:MK(e)?e.ownerDocument:null}function vK(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function yK(e){const t=gK(e);return t?t.defaultView:null}function bK(e){const t=e._window;return null===t&&iG(78),t}function _K(e){return S0(e)||y0(e)&&e.isShadowRoot()}function xK(e){const t=t0(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&iG(200,e.constructor.name,n);const{replace:o,replaceWithKlass:i}=r;if(null!==o){const t=o(e),r=t.constructor;return null!==i?t instanceof i||iG(201,i.name,i.getType(),r.name,r.getType(),e.constructor.name,n):t instanceof e.constructor&&r!==e.constructor||iG(202,r.name,r.getType(),e.constructor.name,n),t.__key===e.__key&&iG(203,e.constructor.name,n,r.name,r.getType()),t}return e}function wK(e,t){!S0(e.getParent())||y0(t)||x0(t)||iG(99)}function SK(e){return(x0(e)||y0(e)&&!e.canBeEmpty())&&!e.isInline()}function kK(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function CK(e){return EZ?(e||window).getSelection():null}function EK(e){return MK(e)&&"A"===e.tagName}function MK(e){return PK(e)&&1===e.nodeType}function PK(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function OK(e){return PK(e)&&11===e.nodeType}function TK(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function NK(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function DK(e){if(x0(e)&&!e.isInline())return!0;if(!y0(e)||_K(e))return!1;const t=e.getFirstChild(),n=null===t||UJ(t)||hQ(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function AK(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const LK=new WeakMap,IK=new Map;function zK(e){if(!e._readOnly&&e.isEmpty())return IK;e._readOnly||iG(192);let t=LK.get(e);return t||(t=function(e){const t=new Map;for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}return t}(e),LK.set(e,t)),t}function RK(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function $K(e,t){const n=(parseInt(e.style.paddingInlineStart,10)||0)/40;t.setIndent(n)}function FK(e){return!0===e.__lexicalUnmanaged}function jK(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(y0(a)&&jK(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let BK,HK,WK,VK,YK,XK,qK,UK,ZK,GK,KK="",JK="",QK=null,eJ="",tJ="",nJ=!1,rJ=!1,oJ=null;function iJ(e,t){const n=qK.get(e);if(null!==t){const n=_J(e);n.parentNode===t&&t.removeChild(n)}if(UK.has(e)||HK._keyToDOMMap.delete(e),y0(n)){const e=gJ(n,qK);aJ(e,0,e.length-1,null)}void 0!==n&&lK(GK,WK,VK,n,"destroyed")}function aJ(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&iJ(t,r)}}function sJ(e,t){e.setProperty("text-align",t)}const lJ="40px";function cJ(e,t){const n=BK.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||lJ;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function uJ(e,t){const n=e.style;0===t?sJ(n,""):1===t?sJ(n,"left"):2===t?sJ(n,"center"):3===t?sJ(n,"right"):4===t?sJ(n,"justify"):5===t?sJ(n,"start"):6===t&&sJ(n,"end")}function dJ(e,t){const n=UK.get(e);void 0===n&&iG(60);const r=n.createDOM(BK,HK);if(function(e,t,n){const r=n._keyToDOMMap;(function(e,t,n){e[`__lexicalKey_${t._key}`]=n})(t,n,e),r.set(e,t)}(e,r,HK),hQ(n)?r.setAttribute("data-lexical-text","true"):x0(n)&&r.setAttribute("data-lexical-decorator","true"),y0(n)){const e=n.__indent,t=n.__size;if(0!==e&&cJ(r,e),0!==t){const e=t-1;!function(e,t,n,r){const o=JK;JK="",hJ(e,n,0,t,n.getDOMSlot(r)),mJ(n,r),JK=o}(gJ(n,UK),e,n,r)}const o=n.__format;0!==o&&uJ(r,o),n.isInline()||fJ(null,n,r),pK(n)&&(KK+=qZ,tJ+=qZ)}else{const t=n.getTextContent();if(x0(n)){const t=n.decorate(HK,BK);null!==t&&yJ(e,t),r.contentEditable="false"}else hQ(n)&&(n.isDirectionless()||(JK+=t));KK+=t,tJ+=t}return null!==t&&t.insertChild(r),lK(GK,WK,VK,n,"created"),r}function hJ(e,t,n,r,o){const i=KK;KK="";let a=n;for(;a<=r;++a){dJ(e[a],o);const t=UK.get(e[a]);null!==t&&hQ(t)&&(null===QK&&(QK=t.getFormat()),""===eJ&&(eJ=t.getStyle()))}pK(t)&&(KK+=qZ),o.element.__lexicalTextContent=KK,KK=i+KK}function pJ(e,t){if(e){const n=e.__last;if(n){const e=t.get(n);if(e)return UJ(e)?"line-break":x0(e)&&e.isInline()?"decorator":null}return"empty"}return null}function fJ(e,t,n){const r=pJ(e,qK),o=pJ(t,UK);r!==o&&t.getDOMSlot(n).setManagedLineBreak(o)}function mJ(e,t){const n=t.__lexicalDirTextContent||"",r=t.__lexicalDir||"";if(n!==JK||r!==oJ){const n=""===JK,i=n?oJ:(o=JK,KZ.test(o)?"rtl":JZ.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=BK.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=aG(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=aG(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}rJ||(e.getWritable().__dir=i)}oJ=i,t.__lexicalDirTextContent=JK,t.__lexicalDir=i}var o}function gJ(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&iG(101),n.push(r),r=e.__next}return n}function vJ(e,t){const n=qK.get(e);let r=UK.get(e);void 0!==n&&void 0!==r||iG(61);const o=nJ||XK.has(e)||YK.has(e),i=fK(HK,e);if(n===r&&!o){if(y0(n)){const e=i.__lexicalTextContent;void 0!==e&&(KK+=e,tJ+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(JK+=t)}else{const e=n.getTextContent();hQ(n)&&!n.isDirectionless()&&(JK+=e),tJ+=e,KK+=e}return i}if(n!==r&&o&&lK(GK,WK,VK,r,"updated"),r.updateDOM(n,i,BK)){const n=dJ(e,null);return null===t&&iG(62),t.replaceChild(n,i),iJ(e,null),n}if(y0(n)&&y0(r)){const e=r.__indent;e!==n.__indent&&cJ(i,e);const t=r.__format;t!==n.__format&&uJ(i,t),o&&(function(e,t,n){const r=JK;var o;JK="",QK=null,eJ="",function(e,t,n){const r=KK,o=e.__size,i=t.__size;KK="";const a=n.element;if(1===o&&1===i){const n=e.__first,r=t.__first;if(n===r)vJ(n,a);else{const e=_J(n),t=dJ(r,null);try{a.replaceChild(t,e)}catch(o){if("object"==typeof o&&null!=o){const i=`${o.toString()} Parent: ${a.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${n}}.`;throw new Error(i)}throw o}iJ(n,null)}const i=UK.get(r);hQ(i)&&(null===QK&&(QK=i.getFormat()),""===eJ&&(eJ=i.getStyle()))}else{const r=gJ(e,qK),s=gJ(t,UK);if(r.length!==o&&iG(227),s.length!==i&&iG(228),0===o)0!==i&&hJ(s,t,0,i-1,n);else if(0===i){if(0!==o){const e=null==n.after&&null==n.before&&null==n.element.__lexicalLineBreak;aJ(r,0,o-1,e?null:a),e&&(a.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.getFirstChild(),d=0,h=0;for(;d<=a&&h<=s;){const e=t[d],r=n[h];if(e===r)u=bJ(vJ(r,i.element)),d++,h++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=fK(HK,r);e===u?u=bJ(vJ(r,i.element)):(i.withBefore(u).insertChild(e),vJ(r,i.element)),d++,h++}else dJ(r,i.withBefore(u)),h++;else u=bJ(_J(e)),iJ(e,i.element),d++}const o=UK.get(r);null!==o&&hQ(o)&&(null===QK&&(QK=o.getFormat()),""===eJ&&(eJ=o.getStyle()))}const p=d>a,f=h>s;if(p&&!f){const t=n[s+1],r=void 0===t?null:HK.getElementByKey(t);hJ(n,e,h,s,i.withBefore(r))}else f&&!p&&aJ(t,d,a,i.element)}(t,r,s,o,i,n)}pK(t)&&(KK+=qZ),a.__lexicalTextContent=KK,KK=r+KK}(e,t,t.getDOMSlot(n)),mJ(t,n),o=t,null==QK||QK===o.__textFormat||rJ||(o.setTextFormat(QK),o.setTextStyle(eJ)),function(e){""===eJ||eJ===e.__textStyle||rJ||e.setTextStyle(eJ)}(t),JK=r}(n,r,i),S0(r)||r.isInline()||fJ(n,r,i)),pK(r)&&(KK+=qZ,tJ+=qZ)}else{const t=r.getTextContent();if(x0(r)){const t=r.decorate(HK,BK);null!==t&&yJ(e,t)}else hQ(r)&&!r.isDirectionless()&&(JK+=t);KK+=t,tJ+=t}if(!rJ&&S0(r)&&r.__cachedText!==tJ){const e=r.getWritable();e.__cachedText=tJ,r=e}return i}function yJ(e,t){let n=HK._pendingDecorators;const r=HK._decorators;if(null===n){if(r[e]===t)return;n=BG(HK)}n[e]=t}function bJ(e){let t=e.nextSibling;return null!==t&&t===HK._blockCursorElement&&(t=t.nextSibling),t}function _J(e){const t=ZK.get(e);return void 0===t&&iG(75,e),t}const xJ=Object.freeze({}),wJ=[["keydown",function(e,t){if(SJ=e.timeStamp,kJ=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;if(!hK(t,ZU,e)&&null!=n){if(function(e,t,n,r){return tK(e)&&!t&&!r&&!n}(n,o,a,i))hK(t,GU,e);else if(function(e,t,n,r,o){return tK(e)&&!r&&!n&&(t||o)}(n,o,r,a,i))hK(t,KU,e);else if(function(e,t,n,r){return eK(e)&&!t&&!r&&!n}(n,o,a,i))hK(t,JU,e);else if(function(e,t,n,r,o){return eK(e)&&!r&&!n&&(t||o)}(n,o,r,a,i))hK(t,QU,e);else if(function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i))hK(t,eZ,e);else if(function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i))hK(t,tZ,e);else if(function(e,t){return rK(e)&&t}(n,r))TJ=!0,hK(t,nZ,e);else if(function(e){return" "===e}(n))hK(t,rZ,e);else if(function(e,t){return PZ&&t&&"o"===e.toLowerCase()}(n,o))e.preventDefault(),TJ=!0,hK(t,FU,!0);else if(function(e,t){return rK(e)&&!t}(n,r))TJ=!1,hK(t,nZ,e);else if(function(e,t,n,r){return PZ?!t&&!n&&(oK(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&oK(e)}(n,a,i,o))oK(n)?hK(t,oZ,e):(e.preventDefault(),hK(t,$U,!0));else if(function(e){return"Escape"===e}(n))hK(t,iZ,e);else if(function(e,t,n,r,o){return PZ?!(n||r||o)&&(iK(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&iK(e)}(n,o,r,a,i))iK(n)?hK(t,aZ,e):(e.preventDefault(),hK(t,$U,!1));else if(function(e,t,n){return oK(e)&&(PZ?t:n)}(n,a,o))e.preventDefault(),hK(t,VU,!0);else if(function(e,t,n){return iK(e)&&(PZ?t:n)}(n,a,o))e.preventDefault(),hK(t,VU,!1);else if(function(e,t){return PZ&&t&&oK(e)}(n,i))e.preventDefault(),hK(t,YU,!0);else if(function(e,t){return PZ&&t&&iK(e)}(n,i))e.preventDefault(),hK(t,YU,!1);else if(function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&nK(n,r)}(n,a,i,o))e.preventDefault(),hK(t,XU,"bold");else if(function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&nK(n,r)}(n,a,i,o))e.preventDefault(),hK(t,XU,"underline");else if(function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&nK(n,r)}(n,a,i,o))e.preventDefault(),hK(t,XU,"italic");else if(function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i))hK(t,sZ,e);else if(function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&nK(n,r)}(n,r,i,o))e.preventDefault(),hK(t,qU,void 0);else if(function(e,t,n,r){return PZ?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o))e.preventDefault(),hK(t,UU,void 0);else{const a=t._editorState._selection;null===a||SQ(a)?!OZ&&aK(n,i,o)&&(e.preventDefault(),hK(t,yZ,e)):function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(PZ?n:r)}(n,r,i,o)?(e.preventDefault(),hK(t,gZ,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(PZ?n:r)}(n,r,i,o)?(e.preventDefault(),hK(t,vZ,e)):aK(n,i,o)&&(e.preventDefault(),hK(t,yZ,e))}(function(e,t,n,r){return e||t||n||r})(o,r,a,i)&&hK(t,CZ,e)}}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;PK(n)&&"touch"!==r&&0===e.button&&f0(t,(()=>{x0(jG(n))||(OJ=!0)}))}],["compositionstart",function(e,t){f0(t,(()=>{const n=RQ();if(SQ(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();IG(r.key),(e.timeStamp<SJ+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||hQ(o)&&o.getStyle()!==n.style)&&hK(t,BU,UZ)}}))}],["compositionend",function(e,t){OZ?NJ=!0:f0(t,(()=>{RJ(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),f0(t,(()=>{const n=RQ(),r=e.data,o=zJ(e);if(null!=r&&SQ(n)&&AJ(n,o,r,e.timeStamp,!1)){NJ&&(RJ(t,r),NJ=!1);const o=n.anchor.getNode(),i=CK(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;TZ&&!n.isCollapsed()&&hQ(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===KG(i.anchorNode)||hK(t,BU,r);const c=r.length;OZ&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),NZ||DZ||zZ||!t.isComposing()||(SJ=0,IG(null))}else JG(!1,t,null!==r?r:void 0),NJ&&(RJ(t,r||void 0),NJ=!1);JQ(),mG(t0())})),EJ=null}],["click",function(e,t){f0(t,(()=>{const n=RQ(),r=CK(t._window),o=$Q();if(r)if(SQ(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!S0(i)&&1===WG().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3!==e.detail||n.isCollapsed()||i!==n.focus.getNode()&&(y0(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;(MK(n)||TG(n))&&YG(zQ(o,r,t,e))}hK(t,RU,e)}))}],["cut",xJ],["copy",xJ],["dragstart",xJ],["dragover",xJ],["dragend",xJ],["paste",xJ],["focus",xJ],["blur",xJ],["drop",xJ]];TZ&&wJ.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=zJ(e);"deleteCompositionText"===n||OZ&&dK(t)||"insertCompositionText"!==n&&f0(t,(()=>{const o=RQ();if("deleteContentBackward"===n){if(null===o){const e=$Q();if(!SQ(e))return;YG(e.clone())}if(SQ(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===kJ&&i<SJ+30&&t.isComposing()&&n){if(IG(null),SJ=0,setTimeout((()=>{f0(t,(()=>{IG(null)}))}),30),SQ(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),hQ(e)||iG(142),o.style=e.getStyle()}}else{IG(null),e.preventDefault();const r=o.anchor.getNode(),i=r.getTextContent(),a=r.canInsertTextAfter(),s=0===o.anchor.offset&&o.focus.offset===i.length;IZ&&n&&!s&&a||hK(t,$U,!0)}return}}var i;if(!SQ(o))return;const a=e.data;null!==EJ&&JG(!1,t,EJ),o.dirty&&null===EJ||!o.isCollapsed()||S0(o.anchor.getNode())||null===r||o.applyDOMRange(r),EJ=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":hK(t,BU,e);break;case"insertFromComposition":IG(null),hK(t,BU,e);break;case"insertLineBreak":IG(null),hK(t,FU,!1);break;case"insertParagraph":IG(null),TJ&&!DZ?(TJ=!1,hK(t,FU,!1)):hK(t,jU,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":hK(t,HU,e);break;case"deleteByComposition":(function(e,t){return e!==t||y0(e)||y0(t)||!e.isToken()||!t.isToken()})(c,u)&&hK(t,WU,e);break;case"deleteByDrag":case"deleteByCut":hK(t,WU,e);break;case"deleteContent":hK(t,$U,!1);break;case"deleteWordBackward":hK(t,VU,!0);break;case"deleteWordForward":hK(t,VU,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":hK(t,YU,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":hK(t,YU,!1);break;case"formatStrikeThrough":hK(t,XU,"strikethrough");break;case"formatBold":hK(t,XU,"bold");break;case"formatItalic":hK(t,XU,"italic");break;case"formatUnderline":hK(t,XU,"underline");break;case"historyUndo":hK(t,qU,void 0);break;case"historyRedo":hK(t,UU,void 0)}else{if("\n"===a)e.preventDefault(),hK(t,FU,!1);else if(a===qZ)e.preventDefault(),hK(t,jU,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&AJ(o,r,a,e.timeStamp,!0)?(e.preventDefault(),hK(t,BU,a)):EJ=a;CJ=e.timeStamp}}))}(e,t)]);let SJ=0,kJ=null,CJ=0,EJ=null;const MJ=new WeakMap;let PJ=!1,OJ=!1,TJ=!1,NJ=!1,DJ=[0,"",0,"root",0];function AJ(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=t0(),c=CK(l._window),u=null!==c?c.anchorNode:null,d=i.key,h=l.getElementByKey(d),p=n.length;return d!==a.key||!hQ(s)||(!o&&(!TZ||CJ<r+50)||s.isDirty()&&p<2||UG(n))&&i.offset!==a.offset&&!s.isComposing()||OG(s)||s.isDirty()&&p>1||(o||!TZ)&&null!==h&&!s.isComposing()&&u!==NG(h)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(hQ(t)||y0(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function LJ(e,t){return TG(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function IJ(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;PJ&&(PJ=!1,LJ(r,o)&&LJ(i,a))||f0(t,(()=>{if(!n)return void YG(null);if(!CG(t,r,i))return;const s=RQ();if(SQ(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=bK(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=DJ,h=WG(),p=!1===t.isComposing()&&""===h.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)hQ(r)||iG(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!p){y0(r)||iG(259);const e=n.getNode();s.style="",e.isEmpty()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,d=l?t:e,h=l?e:t;let p=2047,f=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(hQ(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===h&&0===u)&&(f=!0,p&=t.getFormat(),0===p))break}s.format=f?p:0}}hK(t,IU,void 0)}))}function zJ(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function RJ(e,t){const n=e._compositionKey;if(IG(null),null!==n&&null!=t){if(""===t){const t=RG(n),r=NG(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&hQ(t)&&QG(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=RQ();if(SQ(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void hK(e,nZ,null)}}}JG(!0,e,t)}function $J(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const FJ=new Map;function jJ(e){const t=function(e){const t=yK(e);return t?t.getSelection():null}(e.target);if(null===t)return;const n=MG(t.anchorNode);if(null===n)return;OJ&&(OJ=!1,f0(n,(()=>{const r=$Q(),o=t.anchorNode;(MK(o)||TG(o))&&YG(zQ(r,t,n,e))})));const r=ZG(n),o=r[r.length-1],i=o._key,a=FJ.get(i),s=a||o;s!==n&&IJ(t,s,!1),IJ(t,n,!0),n!==o?FJ.set(i,n):a&&FJ.delete(i)}function BJ(e){e._lexicalHandled=!0}function HJ(e){return!0===e._lexicalHandled}function WJ(e,t,n){JQ();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=RQ();if(!SQ(t)||!y0(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return vK(o,e)&&n.set(e.__key,0,"element"),vK(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(SQ(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(BQ(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(BQ(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else CQ(i)&&t&&e.isSelected()&&e.selectPrevious();if(SQ(i)&&t&&!a){const t=e.getIndexWithinParent();AG(e),FQ(i,o,t,-1)}else AG(e);n||_K(o)||o.canBeEmpty()||!o.isEmpty()||WJ(o,t),t&&S0(o)&&o.isEmpty()&&o.selectEnd()}class VJ{static getType(){iG(64,this.name)}static clone(e){iG(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);JQ(),QQ();const n=t0(),r=e0(),o=""+wG++;r._nodeMap.set(o,e),y0(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){iG(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=RG(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||RQ();if(null==t)return!1;const n=t.getNodes().some((e=>e.__key===this.__key));if(hQ(this))return n;if(SQ(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(x0(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:RG(e)}getParentOrThrow(){const e=this.getParent();return null===e&&iG(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(_K(t))return y0(e)||e===this&&x0(e)||iG(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&iG(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:RG(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:RG(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();y0(this)&&t.unshift(this),y0(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=y0(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&iG(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=t0()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=RG(this.__key);return null===e&&iG(113),e}getWritable(){JQ();const e=e0(),t=t0(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=RQ();if(null!==a&&a.setCachedNodes(null),i.has(r))return LG(o),o;const s=RK(o);return i.add(r),LG(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){iG(70)}updateDOM(e,t,n){iG(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){return{type:this.__type,version:1}}static importJSON(e){iG(18,this.name)}updateFromJSON(e){return this}static transform(){return null}remove(e){WJ(this,!0,e)}replace(e,t){JQ();let n=RQ();null!==n&&(n=n.clone()),wK(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;AG(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,h=r.__next,p=r.__parent;if(WJ(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=d,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=h,a.__parent=p,s.__size=l,t&&(y0(this)&&y0(a)||iG(139),this.getChildren().forEach((e=>{a.append(e)}))),SQ(n)){YG(n);const e=n.anchor,t=n.focus;e.key===o&&_Q(e,a),t.key===o&&_Q(t,a)}return zG()===o&&IG(i),a}insertAfter(e,t=!0){JQ(),wK(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=RQ();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if(AG(r),SQ(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&SQ(i)){const e=this.getIndexWithinParent();FQ(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){JQ(),wK(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;AG(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=RQ();return t&&SQ(c)&&FQ(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return N0()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){JQ();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(y0(n))return n.select();if(!hQ(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){JQ();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(y0(n))return n.select(0,0);if(!hQ(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}class YJ extends VJ{static getType(){return"linebreak"}static clone(e){return new YJ(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&NK(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&ZJ(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&ZJ(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&NK(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&ZJ(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&ZJ(r))return!0}return!1}(e)?null:{conversion:XJ,priority:0}}}static importJSON(e){return qJ().updateFromJSON(e)}}function XJ(e){return{node:qJ()}}function qJ(){return xK(new YJ)}function UJ(e){return e instanceof YJ}function ZJ(e){return TG(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function GJ(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function KJ(e,t){return 1&t?"strong":2&t?"em":"span"}function JJ(e,t,n,r,o){const i=r.classList;let a=sK(o,"base");void 0!==a&&i.add(...a),a=sK(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in QZ){const r=QZ[e];if(a=sK(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function QJ(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?XZ:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||OZ){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function eQ(e,t,n,r,o,i){QJ(o,e,t);const a=i.theme.text;void 0!==a&&JJ(0,0,r,e,a)}function tQ(e,t){const n=document.createElement(t);return n.appendChild(e),n}class nQ extends VJ{static getType(){return"text"}static clone(e){return new nQ(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return oG[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===zG()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=QZ[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return DG(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=GJ(0,n),o=KJ(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),eQ(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=GJ(0,o),s=GJ(0,i),l=KJ(0,o),c=KJ(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&iG(48);const o=document.createElement(c);return eQ(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&iG(49)),QJ(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&JJ(0,o,i,u,d);const h=e.__style,p=this.__style;return h!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:sQ,priority:0}),b:()=>({conversion:oQ,priority:0}),code:()=>({conversion:uQ,priority:0}),em:()=>({conversion:uQ,priority:0}),i:()=>({conversion:uQ,priority:0}),s:()=>({conversion:uQ,priority:0}),span:()=>({conversion:rQ,priority:0}),strong:()=>({conversion:uQ,priority:0}),sub:()=>({conversion:uQ,priority:0}),sup:()=>({conversion:uQ,priority:0}),u:()=>({conversion:uQ,priority:0})}}static importJSON(e){return dQ().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return MK(t)||iG(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=tQ(t,"b")),this.hasFormat("italic")&&(t=tQ(t,"i")),this.hasFormat("strikethrough")&&(t=tQ(t,"s")),this.hasFormat("underline")&&(t=tQ(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?QZ[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?eG[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=DG(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=rG[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){JQ();let n=e,r=t;const o=RQ(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!SQ(o))return LQ(a,n,a,r,"text","text");{const e=zG();e!==o.anchor.key&&e!==o.focus.key||IG(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=RQ();if(r&&SQ(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){JQ();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=zG(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],d=t.getParent();let h;const p=t.getFormat(),f=t.getStyle(),m=t.__detail;let g=!1;t.isSegmented()?(h=dQ(u),h.__format=p,h.__style=f,h.__detail=m,g=!0):(h=t.getWritable(),h.__text=u);const v=RQ(),y=[h];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=dQ(t).getWritable();i.__format=p,i.__style=f,i.__detail=m;const s=i.__key,l=b+n;if(SQ(v)){const e=v.anchor,t=v.focus;e.key===r&&"text"===e.type&&e.offset>b&&e.offset<=l&&(e.key=s,e.offset-=b,v.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,v.dirty=!0)}o===r&&IG(s),b=l,y.push(i)}if(null!==d){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&LG(t),null!==n&&LG(n)}(this);const e=d.getWritable(),t=this.getIndexWithinParent();g?(e.splice(t,0,y),this.remove()):e.splice(t,1,y),SQ(v)&&FQ(v,d,t,c-1)}return y}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||iG(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;zG()===r&&IG(n);const a=RQ();if(SQ(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(HQ(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(HQ(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function rQ(e){return{forChild:pQ(e.style),node:null}}function oQ(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:pQ(t.style,n?void 0:"bold"),node:null}}const iQ=new WeakMap;function aQ(e){if(!MK(e))return!1;if("PRE"===e.nodeName)return!0;const t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}function sQ(e){const t=e;null===e.parentElement&&iG(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=iQ.get(n))&&!aQ(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)iQ.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(qJ()):"\t"===r?t.push(mQ()):""!==r&&t.push(dQ(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=lQ(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=lQ(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:dQ(n)}}function lQ(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,MK(n)){const e=n.style.display;if(""===e&&!TK(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(TG(n))return n;if("BR"===n.nodeName)return null}}const cQ={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function uQ(e){const t=cQ[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:pQ(e.style,t),node:null}}function dQ(e=""){return xK(new nQ(e))}function hQ(e){return e instanceof nQ}function pQ(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>hQ(e)?(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t),e):e}class fQ extends nQ{static getType(){return"tab"}static clone(e){return new fQ(e.__key)}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),n=sK(e.theme,"tab");return void 0!==n&&t.classList.add(...n),t}static importJSON(e){return mQ().updateFromJSON(e)}setTextContent(e){return"\t"!==e&&""!==e&&iG(126),super.setTextContent(e)}setDetail(e){return 2!==e&&iG(127),this}setMode(e){return"normal"!==e&&iG(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function mQ(){return xK(new fQ)}function gQ(e){return e instanceof fQ}class vQ{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(y0(t)){const e=t.getDescendantByIndex(r);t=null!=e?e:t}if(y0(n)){const e=n.getDescendantByIndex(o);n=null!=e?e:n}return t===n?r<o:t.isBefore(n)}getNode(){const e=RG(this.key);return null===e&&iG(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,KQ()||(zG()===o&&IG(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function yQ(e,t,n){return new vQ(e,t,n)}function bQ(e,t){let n=t.__key,r=e.offset,o="element";if(hQ(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!y0(t)){const e=t.getNextSibling();if(hQ(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function _Q(e,t){if(y0(t)){const n=t.getLastDescendant();y0(n)||hQ(n)?bQ(e,n):bQ(e,t)}else bQ(e,t)}function xQ(e,t,n,r){e.key=t,e.offset=n,e.type=r}class wQ{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!CQ(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new wQ(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(hQ(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=RG(e);null!==t&&n.push(t)}return KQ()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function SQ(e){return e instanceof kQ}class kQ{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!SQ(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=y0(a)&&o.offset>0&&o.offset>=a.getChildrenSize(),c=o.offset,u=i.offset;if(y0(a)){const e=a.getDescendantByIndex(c);a=null!=e?e:a}if(y0(s)){let e=s.getDescendantByIndex(u);null!==e&&e!==a&&s.getChildAtIndex(u)===e&&(e=e.getPreviousSibling()),s=null!=e?e:s}let d;if(a.is(s))d=y0(a)&&a.getChildrenSize()>0?[]:[a];else if(d=a.getNodesBetween(s),l){const e=d.findIndex((e=>!e.is(a)&&!e.isBefore(a)));d.splice(0,e)}return KQ()||(this._cachedNodes=d),d}setTextNodeRange(e,t,n,r){xQ(this.anchor,e.__key,t,"text"),xQ(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=MQ(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(y0(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,hQ(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):d===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!x0(d)&&!UJ(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=t0(),n=t.getEditorState()._selection,r=DQ(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;xQ(this.anchor,o.key,o.offset,o.type),xQ(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new kQ(yQ(e.key,e.offset,e.type),yQ(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=DG(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=QZ[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(qJ()):"\t"===r?n.push(mQ()):n.push(dQ(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=dQ(),s=S0(o)?N0().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let d=c[0];hQ(d)||iG(26);const h=d.getTextContent().length,p=d.getParentOrThrow();let f=c[u-1];if(1===u&&"element"===a.type&&(l=h,a.set(i.key,l,"text")),this.isCollapsed()&&s===h&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(hQ(t)&&t.canInsertTextBefore()&&!OG(t)||(t=dQ(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(hQ(t)&&!OG(t)||(t=dQ(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&s!==h){const e=dQ(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=f.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||y0(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),NQ(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(d.isToken()){const t=dQ(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(s!==l||t===r&&n===o){if(gQ(d)){const t=dQ(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=dQ(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)d.insertBefore(t,!1);else{const[e]=d.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-s;d=d.spliceText(s,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...f.getParentKeys()]),n=y0(d)?d:d.getParentOrThrow();let r=y0(f)?f:f.getParentOrThrow(),o=f;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===f.getTextContent())||"element"===a.type&&f.getIndexWithinParent()<l)if(hQ(f)&&!f.isToken()&&l!==f.getTextContentSize()){if(f.isSegmented()){const e=dQ(f.getTextContent());f.replace(e),f=e}S0(a.getNode())||"text"!==a.type||(f=f.spliceText(0,l,"")),t.add(f.__key)}else{const e=f.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?f.remove():e.remove()}else t.add(f.__key);const i=r.getChildren(),p=new Set(c),m=n.is(r),g=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||y0(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(o)?m||g.insertAfter(t,!1):t.remove())}if(!m){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(d.isToken())if(s===h)d.select();else{const t=dQ(e);t.select(),d.replace(t)}else d=d.spliceText(s,h-s,e,!0),""===d.getTextContent()?d.remove():d.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){if(this.isCollapsed())return;const{anchor:e,focus:t}=this,n=this.getNodes(),r=this.isBackward()?t:e,o=this.isBackward()?e:t;let i=r.getNode(),a=o.getNode();const s=AK(i,DK),l=AK(a,DK);hQ(i)&&i.isToken()&&r.offset<i.getTextContentSize()&&(r.offset=0),o.offset>0&&hQ(a)&&a.isToken()&&(o.offset=a.getTextContentSize());for(const e of n)vK(i,e)||vK(a,e)||e.getKey()===i.getKey()||e.getKey()===a.getKey()||e.remove();const c=(e,t)=>{if(""===e.getTextContent())e.remove();else if(0!==t&&OG(e)){const t=dQ(e.getTextContent());return t.setFormat(e.getFormat()),t.setStyle(e.getStyle()),e.replace(t)}};if(i===a&&hQ(i)){const n=Math.abs(t.offset-e.offset);return i.spliceText(r.offset,n,"",!0),void c(i,n)}if(hQ(i)){const e=i.getTextContentSize()-r.offset;i.spliceText(r.offset,e,""),i=c(i,e)||i}hQ(a)&&(a.spliceText(0,o.offset,""),a=c(a,o.offset)||a),i.isAttached()&&hQ(i)?i.selectEnd():a.isAttached()&&hQ(a)&&a.selectStart(),y0(s)&&y0(l)&&s!==l&&(s.append(...l.getChildren()),l.remove(),o.set(r.key,r.offset,r.type))}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void IG(null);const n=this.getNodes(),r=[];for(const e of n)hQ(e)&&r.push(e);const o=t=>{n.forEach((n=>{if(y0(n)){const r=n.getFormatFlags(e,t);n.setTextFormat(r)}}))},i=r.length;if(0===i)return this.toggleFormat(e),IG(null),void o(t);const a=this.anchor,s=this.focus,l=this.isBackward(),c=l?s:a,u=l?a:s;let d=0,h=r[0],p="element"===c.type?0:c.offset;if("text"===c.type&&p===h.getTextContentSize()&&(d=1,h=r[1],p=0),null==h)return;const f=h.getFormatFlags(e,t);o(f);const m=i-1;let g=r[m];const v="text"===u.type?u.offset:g.getTextContentSize();if(h.is(g)){if(p===v)return;if(OG(h)||0===p&&v===h.getTextContentSize())h.setFormat(f);else{const e=h.splitText(p,v),t=0===p?e[0]:e[1];t.setFormat(f),"text"===c.type&&c.set(t.__key,0,"text"),"text"===u.type&&u.set(t.__key,v-p,"text")}return void(this.format=f)}0===p||OG(h)||([,h]=h.splitText(p),p=0),h.setFormat(f);const y=g.getFormatFlags(e,f);v>0&&(v===g.getTextContentSize()||OG(g)||([g]=g.splitText(v)),g.setFormat(y));for(let t=d+1;t<m;t++){const n=r[t],o=n.getFormatFlags(e,y);n.setFormat(o)}"text"===c.type&&c.set(h.__key,p,"text"),"text"===u.type&&u.set(g.__key,v,"text"),this.format=f|y}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=RQ();return SQ(t)||iG(134),t.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),n=AK(t,DK),r=e[e.length-1];if(y0(n)&&"__language"in n){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const t=WQ(this);n.splice(t,0,e),r.selectEnd()}return}if(!e.some((e=>(y0(e)||x0(e))&&!e.isInline()))){y0(n)||iG(211,t.constructor.name,t.getType());const o=WQ(this);return n.splice(o,0,e),void r.selectEnd()}const o=function(e){const t=N0();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=UJ(o);if(i||x0(o)&&o.isInline()||y0(o)&&o.isInline()||hQ(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),i=o.getLastDescendant(),a=o.getChildren(),s=y0(n)&&n.isEmpty()?null:this.insertParagraph(),l=a[a.length-1];let c=a[0];var u;y0(u=c)&&DK(u)&&!u.isEmpty()&&y0(n)&&(!n.isEmpty()||n.canMergeWhenEmpty())&&(y0(n)||iG(211,t.constructor.name,t.getType()),n.append(...c.getChildren()),c=a[1]),c&&(null===n&&iG(212,t.constructor.name,t.getType()),function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||iG(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(n,c));const d=AK(i,DK);s&&y0(d)&&(s.canMergeWhenEmpty()||DK(l))&&(d.append(...s.getChildren()),s.remove()),y0(n)&&n.isEmpty()&&n.remove(),i.selectEnd();const h=y0(n)?n.getLastChild():null;UJ(h)&&d!==n&&h.remove()}insertParagraph(){if("root"===this.anchor.key){const e=N0();return WG().splice(this.anchor.offset,0,[e]),e.select(),e}const e=WQ(this),t=AK(this.anchor.getNode(),DK);y0(t)||iG(213);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=qJ();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=MQ(this);if(0===t)return[];if(1===t){if(hQ(i)&&!this.isCollapsed()){const e=s>l?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(hQ(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(hQ(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=uK(r,t);if(x0(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=IQ();return e.add(a.__key),void YG(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(hQ(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return y0(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=t0(),l=CK(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!y0(a)||a.isInline()||a.canBeEmpty()||kK(c,s,u),function(e,t,n,r){e.modify(t,n,r)}(l,e,t?"backward":"forward",n),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=S0(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(_K(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e<n.length;e++){const t=n[e];vK(t,r)?o.push(t):i=!0}if(i&&o.length>0)if(t){const e=o[0];y0(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];y0(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;xQ(n,t.key,t.offset,t.type),xQ(t,r,o,i),e._cachedNodes=null}(this)}}}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&y0(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(y0(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=uK(r,e);if(x0(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&y0(n)&&0===n.getChildrenSize()){n.remove();const e=IQ();e.add(o.__key),YG(e)}else o.remove(),t0().dispatchCommand(IU,void 0);return}if(!e&&y0(o)&&y0(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void PQ(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void PQ(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(UG(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&S0(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),this.isCollapsed()&&0===this.anchor.offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function CQ(e){return e instanceof wQ}function EQ(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function MQ(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[EQ(n),EQ(r)]}function PQ(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function OQ(e,t,n,r){let o,i=t;if(MK(e)){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],d=!1;if(u===c)u=s[i+1],d=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=XG(u),hQ(o))i=qG(o,a);else{let s=XG(e);if(null===s)return null;if(y0(s)){const l=r.getElementByKey(s.getKey());null===l&&iG(214);const c=s.getDOMSlot(l);[s,i]=c.resolveChildIndex(s,l,e,t),y0(s)||iG(215),a&&i>=s.getChildrenSize()&&(i=Math.max(0,s.getChildrenSize()-1));let u=s.getChildAtIndex(i);if(y0(u)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(u,0,n)){const e=a?u.getLastDescendant():u.getFirstDescendant();null===e?s=u:(u=e,s=y0(u)?u:u.getParentOrThrow()),i=0}hQ(u)?(o=u,s=null,i=qG(u,a)):u!==s&&a&&!d&&(y0(s)||iG(216),i=Math.min(s.getChildrenSize(),i+1))}else{const n=s.getIndexWithinParent();i=0===t&&x0(s)&&XG(e)===s?n:n+1,s=s.getParentOrThrow()}if(y0(s))return yQ(s.__key,i,"element")}}else o=XG(e);return hQ(o)?yQ(o.__key,i,"text"):null}function TQ(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&y0(i)&&i.isInline()){const t=i.getPreviousSibling();hQ(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else y0(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):hQ(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&y0(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&y0(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();hQ(t)&&(e.key=t.__key,e.offset=0)}}}function NQ(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);TQ(e,r,o),TQ(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=t0();if(i.isComposing()&&i._compositionKey!==e.key&&SQ(n)){const r=n.anchor,o=n.focus;xQ(e,r.key,r.offset,r.type),xQ(t,o.key,o.offset,o.type)}}}function DQ(e,t,n,r,o,i){if(null===e||null===n||!CG(o,e,n))return null;const a=OQ(e,t,SQ(i)?i.anchor:null,o);if(null===a)return null;const s=OQ(n,r,SQ(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=XG(e),r=XG(n);if(x0(t)&&x0(r))return null}return NQ(a,s,i),[a,s]}function AQ(e){return y0(e)&&!e.isInline()}function LQ(e,t,n,r,o,i){const a=e0(),s=new kQ(yQ(e,t,o),yQ(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function IQ(){return new wQ(new Set)}function zQ(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!sG&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,d,h;if(SQ(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,h=t.focusOffset,s&&SQ(e)&&!CG(n,c,u))return e.clone();const p=DQ(c,d,u,h,n,e);if(null===p)return null;const[f,m]=p;return new kQ(f,m,SQ(e)?e.format:0,SQ(e)?e.style:"")}function RQ(){return e0()._selection}function $Q(){return t0()._editorState._selection}function FQ(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),jQ(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,d=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}jQ(e)}function jQ(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!y0(i))return;const e=i.getChildrenSize(),o=n>=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(hQ(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(y0(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(hQ(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(y0(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(hQ(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function BQ(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,hQ(r)?(a=r.getTextContentSize(),s="text"):y0(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,hQ(o)?s="text":y0(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function HQ(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function WQ(e){let t=e;e.isCollapsed()||t.removeText();const n=RQ();SQ(n)&&(t=n),SQ(t)||iG(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!DK(o);)[o,i]=VQ(o,i);return i}function VQ(e,t){const n=e.getParent();if(!n){const e=N0();return WG().append(e),e.select(),[WG(),0]}if(hQ(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!y0(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new kQ(yQ(e.__key,t,"element"),yQ(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let YQ=null,XQ=null,qQ=!1,UQ=!1,ZQ=0;const GQ={characterData:!0,childList:!0,subtree:!0};function KQ(){return qQ||null!==YQ&&YQ._readOnly}function JQ(){qQ&&iG(13)}function QQ(){ZQ>99&&iG(14)}function e0(){return null===YQ&&iG(195,n0()),YQ}function t0(){return null===XQ&&iG(196,n0()),XQ}function n0(){let e=0;const t=new Set,n=I0.version;if("undefined"!=typeof window)for(const r of document.querySelectorAll("[contenteditable]")){const o=PG(r);if(EG(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function r0(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&iG(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e<a&&(i[e](t),t.isAttached());e++);}function o0(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function i0(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const e of r)n.add(e)}function a0(e){return s0(e,t0()._nodes)}function s0(e,t){const n=e.type,r=t.get(n);void 0===r&&iG(17,n);const o=r.klass;e.type!==o.getType()&&iG(18,o.name);const i=o.importJSON(e),a=e.children;if(y0(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=s0(a[e],t);i.append(n)}return i}function l0(e,t,n){const r=YQ,o=qQ,i=XQ;YQ=t,qQ=!0,XQ=e;try{return n()}finally{YQ=r,qQ=o,XQ=i}}function c0(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=YQ,u=qQ,d=XQ,h=e._updating,p=e._observer;let f=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){XQ=e,YQ=n,qQ=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),f=function(e,t,n,r,o,i){KK="",tJ="",JK="",nJ=2===r,oJ=null,HK=n,BK=n._config,WK=n._nodes,VK=HK._listeners.mutation,YK=o,XK=i,qK=e._nodeMap,UK=t._nodeMap,rJ=t._readOnly,ZK=new Map(n._keyToDOMMap);const a=new Map;return GK=a,vJ("root",null),HK=void 0,WK=void 0,YK=void 0,XK=void 0,qK=void 0,UK=void 0,BK=void 0,ZK=void 0,GK=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),UQ)throw t;return A0(e,null,r,n),gG(e),e._dirtyType=2,UQ=!0,c0(e,i),void(UQ=!1)}finally{p.observe(r,GQ),e._updating=h,YQ=c,qQ=u,XQ=d}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,g=e._dirtyElements,v=e._normalizedNodes,y=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=BG(e)),delete r[i])}(e,n);const _=o?null:CK(e._window);if(e._editable&&null!==_&&(l||null===s||s.dirty)&&null!==r&&!y.has("skip-dom-selection")){XQ=e,YQ=n;try{if(null!==p&&p.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&kK(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&kG(u))return;if(!SQ(t))return void(null!==e&&CG(n,a,s)&&r.removeAllRanges());const d=t.anchor,h=t.focus,p=d.key,f=h.key,m=fK(n,p),g=fK(n,f),v=d.offset,y=h.offset,b=t.format,_=t.style,x=t.isCollapsed();let w=m,S=g,k=!1;if("text"===d.type){w=NG(m);const e=d.getNode();k=e.getFormat()!==b||e.getStyle()!==_}else SQ(e)&&"text"===e.anchor.type&&(k=!0);var C,E,M,P,O;if("text"===h.type&&(S=NG(g)),null!==w&&null!==S&&(x&&(null===e||k||SQ(e)&&(e.format!==b||e.style!==_))&&(C=b,E=_,M=v,P=p,O=performance.now(),DJ=[C,E,M,P,O]),l!==v||c!==y||a!==w||s!==S||"Range"===r.type&&x||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===d.type))){try{r.setBaseAndExtent(w,v,S,y)}catch(e){}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=SQ(t)&&"element"===t.anchor.type?w.childNodes[v]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=gK(n),o=yK(r);if(null===r||null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=bK(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=mK(c)}}(n,t,i)}}PJ=!0}}(a,s,e,_,y,r)}(function(e,t,n){let r=e._blockCursorElement;if(SQ(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())SK(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(null!==t&&SK(t)){const n=t.getPreviousSibling();(null===n||SK(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=aG(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&kK(r,e,t)})(e,r,s),null!==p&&p.observe(r,GQ)}finally{XQ=d,YQ=c}}null!==f&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,f,y,m,i),SQ(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(IU,void 0);const x=e._pendingDecorators;null!==x&&(e._decorators=x,e._pendingDecorators=null,u0("decorator",e,!0,x)),function(e,t,n){const r=HG(t),o=HG(n);r!==o&&u0("textcontent",e,!0,o)}(e,t||i,n),u0("update",e,!0,{dirtyElements:g,dirtyLeaves:m,editorState:n,normalizedNodes:v,prevEditorState:t||i,tags:y}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;p0(e,t,r)}}}(e)}function u0(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function d0(e,t,n){if(!1===e._updating||XQ!==e){let r=!1;return e.update((()=>{r=d0(e,t,n)})),r}const r=ZG(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function h0(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i;if(void 0!==o){if(i=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&iG(191),t._flushSync=!0}i&&e._deferred.push(i),i0(e,o.tag)}n()}}return r}function p0(e,t,n){const r=e._updateTags;let o,i=!1,a=!1;void 0!==n&&(o=n.onUpdate,i0(e,n.tag),i=n.skipTransforms||!1,a=n.discrete||!1),o&&e._deferred.push(o);const s=e._editorState;let l=e._pendingEditorState,c=!1;(null===l||l._readOnly)&&(l=e._pendingEditorState=k0(l||s),c=!0),l._flushSync=a;const u=YQ,d=qQ,h=XQ,p=e._updating;YQ=l,qQ=!1,e._updating=!0,XQ=e;try{c&&(e._headless?null!==s._selection&&(l._selection=s._selection.clone()):l._selection=function(e){const t=e.getEditorState()._selection,n=CK(e._window);return SQ(t)||null==t?zQ(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),i=h0(e,i),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(SQ(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(l,e),0!==e._dirtyType&&(i?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);hQ(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&bG(t)}}(l,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=zG(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);hQ(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&bG(r),void 0!==r&&o0(r,i)&&r0(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){ZQ++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&o0(l,i)&&r0(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,ZQ++}t._dirtyLeaves=n,t._dirtyElements=r}(l,e),h0(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(y0(t)&&jK(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(s,l,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(l._flushSync=!0);const r=l._selection;if(SQ(r)){const e=l._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||iG(19)}else CQ(r)&&0===r._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=s,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void c0(e)}finally{YQ=u,qQ=d,XQ=h,e._updating=p,ZQ=0}const f=0!==e._dirtyType||e._deferred.length>0||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(l,e);f?l._flushSync?(l._flushSync=!1,c0(e)):c&&SG((()=>{c0(e)})):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function f0(e,t,n){e._updating?e._updates.push([t,n]):p0(e,t,n)}class m0{constructor(e,t,n){this.element=e,this.before=t||null,this.after=n||null}withBefore(e){return new m0(this.element,e,this.after)}withAfter(e){return new m0(this.element,this.before,e)}withElement(e){return new m0(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&iG(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&iG(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&iG(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(null===e)this.removeManagedLineBreak();else{const t="decorator"===e&&(DZ||NZ);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,n="IMG"===e.nodeName?e.nextSibling:null;n&&t.removeChild(n),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}const n=this.element,r=this.before,o=document.createElement("br");if(n.insertBefore(o,r),e){const e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",n.insertBefore(e,o),n.__lexicalLineBreak=e}else n.__lexicalLineBreak=o}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,n,r){if(n===this.element){const t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}const o=g0(t,n);o.push(r);const i=g0(t,this.element);let a=e.getIndexWithinParent();for(let e=0;e<i.length;e++){const t=o[e],n=i[e];if(void 0===t||t<n)break;if(t>n){a+=1;break}}return[e.getParentOrThrow(),a]}}function g0(e,t){const n=[];let r=t;for(;r!==e&&null!==r;r=t.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=r.previousSibling)e++;n.push(e)}return r!==e&&iG(225),n.reverse()}class v0 extends VJ{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return nG[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=t0()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(hQ(t)&&e.push(t),y0(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;y0(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;y0(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return y0(e)&&e.getLastDescendant()||e||null}const r=t[e];return y0(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:RG(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&iG(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:RG(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&iG(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),y0(o)&&r!==n-1&&!o.isInline()&&(e+=qZ)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),y0(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){const t=tG[e];return!!(this.getFormat()&t)}return!1}hasTextFormat(e){const t=QZ[e];return!!(this.getTextFormat()&t)}getFormatFlags(e,t){return DG(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){JQ();const n=RQ();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(hQ(e)||y0(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(hQ(e)||y0(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return SQ(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):LQ(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?tG[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable();e+t<=o||iG(226,String(e),String(t),String(o));const a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,d=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n<t;n++){null===e&&iG(100);const t=e.getNextSibling(),n=e.__key;AG(e.getWritable()),l.push(n),e=t}}let h=u;for(let e=0;e<r;e++){const t=n[e];null!==h&&t.is(h)&&(u=h=h.getPreviousSibling());const r=t.getWritable();r.__parent===a&&d--,AG(r);const o=t.__key;if(null===h)i.__first=o,r.__prev=null;else{const e=h.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&iG(76),r.__parent=a,s.push(o),h=t}if(e+t===o)null!==h&&(h.getWritable().__next=null,i.__last=h.__key);else if(null!==c){const e=c.getWritable();if(null!==h){const t=h.getWritable();e.__prev=h.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=d,l.length){const e=RQ();if(SQ(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;b0(r,t,n)&&BQ(r,r.getNode(),this,u,c),b0(o,t,n)&&BQ(o,o.getNode(),this,u,c),0!==d||this.canBeEmpty()||_K(this)||this.remove()}}return i}getDOMSlot(e){return new m0(e)}exportDOM(e){const{element:t}=super.exportDOM(e);if(MK(t)){const e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px")}return{element:t}}exportJSON(){const e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),n=this.getTextStyle();return 0!==t&&(e.textFormat=t),""!==n&&(e.textStyle=n),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){const n=this.getDOMSlot(e);let r=n.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){const o=t.getElementByKey(e.getKey());null!==o&&(null==r?(n.insertChild(o),r=o):r!==o&&n.replaceChild(o,r),r=r.nextSibling)}}}function y0(e){return e instanceof v0}function b0(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class _0 extends VJ{decorate(e,t){iG(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function x0(e){return e instanceof _0}class w0 extends v0{static getType(){return"root"}static clone(){return new w0}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){iG(51)}getTextContent(){const e=this.__cachedText;return!KQ()&&0!==t0()._dirtyType||null===e?super.getTextContent():e}remove(){iG(52)}replace(e){iG(53)}insertBefore(e){iG(54)}insertAfter(e){iG(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];y0(n)||x0(n)||iG(56)}return super.append(...e)}static importJSON(e){return WG().updateFromJSON(e)}collapseAtStart(){return!0}}function S0(e){return e instanceof w0}function k0(e){return new M0(new Map(e._nodeMap))}function C0(){return new M0(new Map([["root",new w0]]))}function E0(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&iG(130,n.name),y0(e)){const r=t.children;Array.isArray(r)||iG(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=E0(o[e]);r.push(t)}}return t}class M0{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return l0(t&&t.editor||null,this,e)}clone(e){const t=new M0(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return l0(null,this,(()=>({root:E0(WG())})))}}class P0 extends v0{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class O0 extends v0{static getType(){return"paragraph"}static clone(e){return new O0(e.__key)}createDOM(e){const t=document.createElement("p"),n=sK(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:T0,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(MK(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n)}return{element:t}}static importJSON(e){return N0().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){const n=N0();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||hQ(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function T0(e){const t=N0();return e.style&&(t.setFormat(e.style.textAlign),$K(e,t)),{node:t}}function N0(){return xK(new O0)}function D0(e){return e instanceof O0}function A0(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=C0(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}function L0(e){const t=e||{},n=XQ,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=C0(),s=t.namespace||(null!==o?o._config.namespace:GG()),l=t.editorState,c=[w0,nQ,YJ,fQ,O0,P0,...t.nodes||[]],{onError:u,html:d}=t,h=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),p.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const f=new I0(a,o,p,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)})),t&&o(t),n}(p,d?d.import:void 0),h);return void 0!==l&&(f._pendingEditorState=l,f._dirtyType=2),f}class I0{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=GG(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&iG(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&iG(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0!==i&&i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&iG(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=zK(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}return function(e,t){const n=zK(e.getEditorState()),r=[];for(const e of t){const t=n.get(e);t&&r.push(t)}0!==r.length&&e.update((()=>{for(const e of r)for(const t of e.keys()){const e=RG(t);e&&e.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,r.map((e=>e.klass.getType()))),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return hK(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=sK(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,A0(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=MJ.get(t);void 0===n&&iG(162);const r=n-1;r>=0||iG(164),MJ.set(t,r),0===r&&t.removeEventListener("selectionchange",jJ);const o=PG(e);EG(o)?(function(e){if(null!==e._parentEditor){const t=ZG(e),n=t[t.length-1]._key;FJ.get(n)===e&&FJ.delete(n)}else FJ.delete(e._key)}(o),e.__lexicalEditor=null):o&&iG(198);const i=$J(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=yK(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,gG(this),this._updateTags.add("history-merge"),c0(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=MJ.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",jJ),MJ.set(n,(r||0)+1),e.__lexicalEditor=t;const o=$J(e);for(let n=0;n<wJ.length;n++){const[r,i]=wJ[n],a="function"==typeof i?e=>{HJ(e)||(BJ(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(HJ(e))return;BJ(e);const n=t.isEditable();switch(r){case"cut":return n&&hK(t,vZ,e);case"copy":return hK(t,gZ,e);case"paste":return n&&hK(t,HU,e);case"dragstart":return n&&hK(t,pZ,e);case"dragover":return n&&hK(t,fZ,e);case"dragend":return n&&hK(t,mZ,e);case"focus":return n&&hK(t,SZ,e);case"blur":return n&&hK(t,kZ,e);case"drop":return n&&hK(t,dZ,e)}};e.addEventListener(r,a),o.push((()=>{e.removeEventListener(r,a)}))}}(e,this),null!=n&&e.classList.add(...n)}else this._window=null,this._updateTags.add("history-merge"),c0(this);u0("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&iG(38);let n=e;n._readOnly&&(n=k0(e),n._selection=e._selection?e._selection.clone():null),mG(this);const r=this._pendingEditorState,o=this._updateTags,i=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=i&&o.add(i),c0(this)),this._pendingEditorState=n,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=i&&o.add(i),this._updating||c0(this)}parseEditorState(e,t){return function(e,t,n){const r=C0(),o=YQ,i=qQ,a=XQ,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,YQ=r,qQ=!1,XQ=t;try{const o=t._nodes;s0(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,YQ=o,qQ=i,XQ=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return c0(this),this.getEditorState().read(e,{editor:this})}update(e,t){f0(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),f0(this,(()=>{const e=RQ(),n=WG();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=CK(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,u0("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}I0.version="0.23.1+prod.esm";class z0 extends nQ{constructor(e,t){super(e,t)}static getType(){return"extended-text"}static clone(e){return new z0(e.__text,e.__key)}static importDOM(){const e=nQ.importDOM();return{...e,code:()=>({conversion:R0(e?.code),priority:1}),em:()=>({conversion:R0(e?.em),priority:1}),span:()=>({conversion:R0(e?.span),priority:1}),strong:()=>({conversion:R0(e?.strong),priority:1}),sub:()=>({conversion:R0(e?.sub),priority:1}),sup:()=>({conversion:R0(e?.sup),priority:1})}}static importJSON(e){return nQ.importJSON(e)}isSimpleText(){return("text"===this.__type||"extended-text"===this.__type)&&0===this.__mode}exportJSON(){return{...super.exportJSON(),type:"extended-text",version:1}}}function R0(e){return t=>{const n=e?.(t);if(!n)return null;const r=n.conversion(t);if(!r)return r;const o=t.style.backgroundColor,i=t.style.color,a=t.style.fontFamily,s=t.style.fontWeight,l=t.style.fontSize,c=t.style.textDecoration;return{...r,forChild:(e,t)=>{const n=r?.forChild??(e=>e),u=n(e,t);if(hQ(u)){const e=[o?`background-color: ${o}`:null,i?`color: ${i}`:null,a?`font-family: ${a}`:null,s?`font-weight: ${s}`:null,l?`font-size: ${l}`:null,c?`text-decoration: ${c}`:null].filter((e=>null!=e)).join("; ");if(e.length)return u.setStyle(e)}return u}}}}var $0=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const F0=new Map;function j0(e){const t={};if(!e)return t;const n=e.split(";");for(const e of n)if(""!==e){const[n,r]=e.split(/:([^]+)/);n&&r&&(t[n.trim()]=r.trim())}return t}function B0(e){let t=F0.get(e);return void 0===t&&(t=j0(e),F0.set(e,t)),t}function H0(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=MQ(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,d=0;return o?(d=n>r?r:n,u=n>r?n:r):l?(d=i?r:n,u=void 0):c&&(d=0,u=i?n:r),t.__text=t.__text.slice(d,u),t}}return t}function W0(e){if("text"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return y0(t)||$0(177),e.offset===t.getChildrenSize()}function V0(e){const t=e.getStyle(),n=j0(t);F0.set(t,n)}function Y0(e,t){const n=B0("getStyle"in e?e.getStyle():e.style),r=Object.entries(t).reduce(((t,[r,o])=>("function"==typeof o?t[r]=o(n[r],e):null===o?delete t[r]:t[r]=o,t)),{...n}||{}),o=function(e){let t="";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}(r);e.setStyle(o),F0.set(o,r)}function X0(e,t){e.isCollapsed()&&SQ(e)?Y0(e,t):function(e){const t=RQ();if(!SQ(t))return;const n=t.getNodes(),r=n.length,{anchor:o,focus:i}=t,a=r-1;let s=n[0],l=n[a];const c=s.getTextContent().length,u=i.offset;let d=o.offset;const h=o.isBefore(i);let p=h?d:u,f=h?u:d;const m=h?o.type:i.type,g=h?i.type:o.type,v=h?i.key:o.key;if(hQ(s)&&p===c){const e=s.getNextSibling();hQ(e)&&(d=0,p=0,s=e)}if(1===n.length){if(hQ(s)&&s.canHaveFormat()){if(p="element"===m?0:d>u?u:d,f="element"===g?c:d>u?d:u,p===f)return;if(OG(s)||0===p&&f===c)e(s),s.select(p,f);else{const t=s.splitText(p,f),n=0===p?t[0]:t[1];e(n),n.select(0,f-p)}}}else{if(hQ(s)&&p<s.getTextContentSize()&&s.canHaveFormat()&&(0===p||OG(s)||(s=s.splitText(p)[1],p=0,h?o.set(s.getKey(),p,"text"):i.set(s.getKey(),p,"text")),e(s)),hQ(l)&&l.canHaveFormat()){const t=l.getTextContent().length;l.__key!==v&&0!==f&&(f=t),f===t||OG(l)||([l]=l.splitText(f)),0===f&&"element"!==g||e(l)}for(let t=1;t<a;t++){const r=n[t],o=r.getKey();hQ(r)&&r.canHaveFormat()&&o!==s.getKey()&&o!==l.getKey()&&!r.isToken()&&e(r)}}}((e=>{Y0(e,t)}))}function q0(e,t){if(null===e)return;const n=e.getStartEndPoints(),r=n?n[0]:null;if(null!==r&&"root"===r.key){const e=t(),n=WG(),r=n.getFirstChild();return void(r?r.replace(e,!0):n.append(e))}const o=e.getNodes(),i=null!==r&&function(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}(r.getNode(),J0);i&&-1===o.indexOf(i)&&o.push(i);for(let e=0;e<o.length;e++){const n=o[e];if(!J0(n))continue;y0(n)||$0(178);const r=t();r.setFormat(n.getFormatType()),r.setIndent(n.getIndent()),n.replace(r,!0)}}function U0(e,t){const n=uK(e.focus,t);return x0(n)&&!n.isIsolated()||y0(n)&&!n.isInline()&&!n.canBeEmpty()}function Z0(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(S0(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n,r){e.modify(t?"extend":"move",n,r)}(e,t,n?!r:r,"character")}function G0(e,t,n){const r=B0(e.getStyle());return null!==r&&r[t]||n}function K0(e,t,n=""){let r=null;const o=e.getNodes(),i=e.anchor,a=e.focus,s=e.isBackward(),l=s?a.offset:i.offset,c=s?a.getNode():i.getNode();if(SQ(e)&&e.isCollapsed()&&""!==e.style){const n=B0(e.style);if(null!==n&&t in n)return n[t]}for(let e=0;e<o.length;e++){const i=o[e];if((0===e||0!==l||!i.is(c))&&hQ(i)){const e=G0(i,t,n);if(null===r)r=e;else if(r!==e){r="";break}}}return null===r?n:r}function J0(e){if(x0(e))return!1;if(!y0(e)||_K(e))return!1;const t=e.getFirstChild(),n=null===t||UJ(t)||hQ(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}var Q0=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const e1="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,t1=e1&&"documentMode"in document?document.documentMode:null;e1&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);const n1=e1&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);e1&&"InputEvent"in window&&!t1&&new window.InputEvent("input"),e1&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),e1&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,e1&&/Android/.test(navigator.userAgent);e1&&/^(?=.*Chrome).*/i.test(navigator.userAgent);function r1(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}function o1(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}e1&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);function i1(e,...t){const n=r1(...t);n.length>0&&e.classList.add(...n)}function a1(e,...t){const n=r1(...t);n.length>0&&e.classList.remove(...n)}const s1=(e,t)=>{let n=e;for(;n!==WG()&&null!=n;){if(t(n))return n;n=n.getParent()}return null};function l1(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}let c1=!(n1||!e1)&&void 0;var u1,d1={exports:{}};u1||(u1=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(s)||(a[s]=i[s])}var c=r[e];return r[e]=a,o.languages.DFS(o.languages,(function(t,n){n===c&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=o.util.type(l);"Object"!==c||i[a(l)]?"Array"!==c||i[a(l)]||(i[a(l)]=!0,e(l,n,s,i)):(i[a(l)]=!0,e(l,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var l={element:t,language:i,grammar:a,code:t.textContent};function c(e){l.highlightedCode=e,o.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,o.hooks.run("after-highlight",l),o.hooks.run("complete",l),r&&r.call(l.element)}if(o.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return o.hooks.run("complete",l),void(r&&r.call(l.element));if(o.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(o.highlight(l.code,l.grammar,l.language));else c(o.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new l;return c(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,l,d){for(var h in n)if(n.hasOwnProperty(h)&&n[h]){var p=n[h];p=Array.isArray(p)?p:[p];for(var f=0;f<p.length;++f){if(d&&d.cause==h+","+f)return;var m=p[f],g=m.inside,v=!!m.lookbehind,y=!!m.greedy,b=m.alias;if(y&&!m.pattern.global){var _=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,_+"g")}for(var x=m.pattern||m,w=r.next,S=l;w!==t.tail&&!(d&&S>=d.reach);S+=w.value.length,w=w.next){var k=w.value;if(t.length>e.length)return;if(!(k instanceof i)){var C,E=1;if(y){if(!(C=a(x,S,e,v))||C.index>=e.length)break;var M=C.index,P=C.index+C[0].length,O=S;for(O+=w.value.length;M>=O;)O+=(w=w.next).value.length;if(S=O-=w.value.length,w.value instanceof i)continue;for(var T=w;T!==t.tail&&(O<P||"string"==typeof T.value);T=T.next)E++,O+=T.value.length;E--,k=e.slice(S,O),C.index-=S}else if(!(C=a(x,0,k,v)))continue;M=C.index;var N=C[0],D=k.slice(0,M),A=k.slice(M+N.length),L=S+k.length;d&&L>d.reach&&(d.reach=L);var I=w.prev;if(D&&(I=c(t,I,D),S+=D.length),u(t,I,E),w=c(t,I,new i(h,g?o.tokenize(N,g):N,b,N)),A&&c(t,w,A),E>1){var z={cause:h+","+f,reach:L};s(e,t,n,w.prev,S,z),d&&z.reach>d.reach&&(d.reach=z.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var l in i.attributes)s+=" "+l+'="'+(i.attributes[l]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()}),!1),o):o;var d=o.util.currentScript();function h(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
92
92
|
/**
|
|
93
93
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
94
94
|
*
|