@oliasoft-open-source/react-ui-library 5.6.0-beta-15 → 5.6.0-beta-16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +359 -0
- package/dist/index.js +16056 -10226
- package/package.json +4 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>l(t({},`__esModule`,{value:!0}),e);const f=u(require(`react`)),p=u(require(`react/jsx-runtime`)),m=u(require(`react-dom`));var h=s(((exports,t)=>{
|
|
2
|
+
/*!
|
|
3
|
+
Copyright (c) 2018 Jed Watson.
|
|
4
|
+
Licensed under the MIT License (MIT), see
|
|
5
|
+
http://jedwatson.github.io/classnames
|
|
6
|
+
*/
|
|
7
|
+
(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),g=u(h());let _=function(e){return e.TEXT=`Text`,e.BUTTON=`Button`,e.DROP_DOWN_BUTTON=`DropDownButton`,e.COMPONENT=`Component`,e}({}),v=function(e){return e.FIRST=`first`,e.MIDDLE=`middle`,e.LAST=`last`,e}({}),y=function(e){return e.DANGER=`danger`,e.RED=`red`,e.WHITE=`white`,e.SUCCESS=`success`,e.GREEN=`green`,e.MUTED=`muted`,e}({}),b=function(e){return e.LEFT=`left`,e.RIGHT=`right`,e.CENTER=`center`,e}({}),x=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e}({}),S=function(e){return e.LIBRARY=`library`,e.ADD=`add`,e.DRAG=`drag`,e.HELP=`help`,e.NOTIFICATION=`notification`,e.MENU=`menu`,e.EDIT=`edit`,e.FAST_FORWARD=`fast forward`,e.INDENT=`indent`,e.STAR=`star`,e.LIST=`list`,e.SETTINGS=`settings`,e.CHECK=`check`,e.LOCK=`lock`,e.UNLOCK=`unlock`,e.CLOSE=`close`,e.SUCCESS=`success`,e.WARNING=`warning`,e.ERROR=`error`,e.INFO=`info`,e.LEFT=`left`,e.COLLAPSE=`collapse`,e.EXPAND=`expand`,e.SORT_ASCENDING=`sort ascending`,e.SORT_DESCENDING=`sort descending`,e.FAST_BACKWARD=`fast backward`,e.CHEVRON_DOWN=`chevron down`,e.CHEVRON_RIGHT=`chevron right`,e.CHEVRON_LEFT=`chevron left`,e.CHEVRON_DOUBLE_LEFT=`chevron double left`,e.CHEVRON_DOUBLE_RIGHT=`chevron double right`,e}({}),C=function(e){return e.DARK=`dark`,e.WHITE=`white`,e.LIGHT=`light`,e.INHERIT=`inherit`,e}({}),w=function(e){return e.TEXT=`text`,e.RADIO=`radio`,e.CHECKBOX=`checkbox`,e}({});const T=`_chevron_1kw4m_1`,E=`_expanded_1kw4m_9`;var D={chevron:`_chevron_1kw4m_1`,expanded:`_expanded_1kw4m_9`};function O(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var k=o((()=>{}));function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(null,arguments)}var j=o((()=>{}));j(),k();function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}function N(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,M(e,t)}function P(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var ee=s((exports=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;exports.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}})),te=u(ee()),ne=new Map,re=function(e){return e.cloneNode(!0)},ie=function(){return window.location.protocol===`file:`},ae=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&r.readyState===2){var t=r.getResponseHeader(`Content-Type`);if(!t)throw Error(`Content type not found`);var i=(0,te.parse)(t).type;if(!(i===`image/svg+xml`||i===`text/plain`))throw Error(`Invalid content type: ${i}`)}if(r.readyState===4){if(r.status===404||r.responseXML===null)throw Error(ie()?`Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.`:`Unable to load SVG file: `+e);if(r.status===200||ie()&&r.status===0)n(null,r);else throw Error(`There was a problem injecting the SVG: `+r.status+` `+r.statusText)}}catch(e){if(r.abort(),e instanceof Error)n(e,r);else throw e}},r.open(`GET`,e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType(`text/xml`),r.send()},oe={},se=function(e,t){oe[e]=oe[e]||[],oe[e].push(t)},ce=function(e){for(var t=function(t,n){setTimeout(function(){if(Array.isArray(oe[e])){var n=ne.get(e),r=oe[e][t];n instanceof SVGSVGElement&&r(null,re(n)),n instanceof Error&&r(n),t===oe[e].length-1&&delete oe[e]}},0)},n=0,r=oe[e].length;n<r;n++)t(n)},le=function(e,t,n){if(ne.has(e)){var r=ne.get(e);if(r===void 0){se(e,n);return}if(r instanceof SVGSVGElement){n(null,re(r));return}}ne.set(e,void 0),se(e,n),ae(e,t,function(t,n){var r;t?ne.set(e,t):(r=n.responseXML)?.documentElement instanceof SVGSVGElement&&ne.set(e,n.responseXML.documentElement),ce(e)})},ue=function(e,t,n){ae(e,t,function(e,t){var r;e?n(e):(r=t.responseXML)?.documentElement instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)})},de=0,fe=function(){return++de},pe=[],me={},he=`http://www.w3.org/2000/svg`,ge=`http://www.w3.org/1999/xlink`,_e=function(e,t,n,r,i,a,o){var s=e.getAttribute(`data-src`)||e.getAttribute(`src`);if(!s){o(Error(`Invalid data-src or src attribute`));return}if(pe.indexOf(e)!==-1){pe.splice(pe.indexOf(e),1),e=null;return}pe.push(e),e.setAttribute(`src`,``);var c=r?le:ue;c(s,i,function(r,i){if(!i){pe.splice(pe.indexOf(e),1),e=null,o(r);return}var c=e.getAttribute(`id`);c&&i.setAttribute(`id`,c);var l=e.getAttribute(`title`);l&&i.setAttribute(`title`,l);var u=e.getAttribute(`width`);u&&i.setAttribute(`width`,u);var d=e.getAttribute(`height`);d&&i.setAttribute(`height`,d);var f=Array.from(new Set(P(P(P([],(i.getAttribute(`class`)||``).split(` `),!0),[`injected-svg`],!1),(e.getAttribute(`class`)||``).split(` `),!0))).join(` `).trim();i.setAttribute(`class`,f);var p=e.getAttribute(`style`);p&&i.setAttribute(`style`,p),i.setAttribute(`data-src`,s);var m=[].filter.call(e.attributes,function(e){return/^data-\w[\w-]*$/.test(e.name)});if(Array.prototype.forEach.call(m,function(e){e.name&&e.value&&i.setAttribute(e.name,e.value)}),n){var h={clipPath:[`clip-path`],"color-profile":[`color-profile`],cursor:[`cursor`],filter:[`filter`],linearGradient:[`fill`,`stroke`],marker:[`marker`,`marker-start`,`marker-mid`,`marker-end`],mask:[`mask`],path:[],pattern:[`fill`,`stroke`],radialGradient:[`fill`,`stroke`]},g,_,v,y,b;Object.keys(h).forEach(function(e){g=e,v=h[e],_=i.querySelectorAll(g+`[id]`);for(var t=function(e,t){y=_[e].id,b=y+`-`+fe();var n;Array.prototype.forEach.call(v,function(e){n=i.querySelectorAll(`[`+e+`*="`+y+`"]`);for(var t=0,r=n.length;t<r;t++){var a=n[t].getAttribute(e);a&&!a.match(RegExp(`url\\("?#`+y+`"?\\)`))||n[t].setAttribute(e,`url(#`+b+`)`)}});for(var r=i.querySelectorAll(`[*|href]`),a=[],o=0,s=r.length;o<s;o++){var c=r[o].getAttributeNS(ge,`href`);c&&c.toString()===`#`+_[e].id&&a.push(r[o])}for(var l=0,u=a.length;l<u;l++)a[l].setAttributeNS(ge,`href`,`#`+b);_[e].id=b},n=0,r=_.length;n<r;n++)t(n)})}i.removeAttribute(`xmlns:a`);for(var x=i.querySelectorAll(`script`),S=[],C,w,T=0,E=x.length;T<E;T++)w=x[T].getAttribute(`type`),(!w||w===`application/ecmascript`||w===`application/javascript`||w===`text/javascript`)&&(C=x[T].innerText||x[T].textContent,C&&S.push(C),i.removeChild(x[T]));if(S.length>0&&(t===`always`||t===`once`&&!me[s])){for(var D=0,O=S.length;D<O;D++)Function(S[D])(window);me[s]=!0}var k=i.querySelectorAll(`style`);if(Array.prototype.forEach.call(k,function(e){e.textContent+=``}),i.setAttribute(`xmlns`,he),i.setAttribute(`xmlns:xlink`,ge),a(i),!e.parentNode){pe.splice(pe.indexOf(e),1),e=null,o(Error(`Parent node is null`));return}e.parentNode.replaceChild(i,e),pe.splice(pe.indexOf(e),1),e=null,o(null,i)})},ve=function(e,t){var n=t===void 0?{}:t,r=n.afterAll,i=r===void 0?function(){}:r,a=n.afterEach,o=a===void 0?function(){}:a,s=n.beforeEach,c=s===void 0?function(){}:s,l=n.cacheRequests,u=l===void 0?!0:l,d=n.evalScripts,f=d===void 0?`never`:d,p=n.httpRequestWithCredentials,m=p===void 0?!1:p,h=n.renumerateIRIElements,g=h===void 0?!0:h;if(e&&`length`in e)for(var _=0,v=0,y=e.length;v<y;v++)_e(e[v],f,g,u,m,c,function(t,n){o(t,n),e&&`length`in e&&e.length===++_&&i(_)});else e?_e(e,f,g,u,m,c,function(t,n){o(t,n),i(1),e=null}):i(0)},ye=s((exports=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}exports.AsyncMode=l,exports.ConcurrentMode=u,exports.ContextConsumer=c,exports.ContextProvider=s,exports.Element=n,exports.ForwardRef=d,exports.Fragment=i,exports.Lazy=h,exports.Memo=m,exports.Portal=r,exports.Profiler=o,exports.StrictMode=a,exports.Suspense=f,exports.isAsyncMode=function(e){return x(e)||b(e)===l},exports.isConcurrentMode=x,exports.isContextConsumer=function(e){return b(e)===c},exports.isContextProvider=function(e){return b(e)===s},exports.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},exports.isForwardRef=function(e){return b(e)===d},exports.isFragment=function(e){return b(e)===i},exports.isLazy=function(e){return b(e)===h},exports.isMemo=function(e){return b(e)===m},exports.isPortal=function(e){return b(e)===r},exports.isProfiler=function(e){return b(e)===o},exports.isStrictMode=function(e){return b(e)===a},exports.isSuspense=function(e){return b(e)===f},exports.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},exports.typeOf=b})),be=s((exports=>{process.env.NODE_ENV!==`production`&&(function(){var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,D=d,O=i,k=h,A=m,j=r,M=o,N=a,P=f,ee=!1;function te(e){return ee||(ee=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),ne(e)||x(e)===l}function ne(e){return x(e)===u}function re(e){return x(e)===c}function ie(e){return x(e)===s}function ae(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function oe(e){return x(e)===d}function se(e){return x(e)===i}function ce(e){return x(e)===h}function le(e){return x(e)===m}function ue(e){return x(e)===r}function de(e){return x(e)===o}function fe(e){return x(e)===a}function pe(e){return x(e)===f}exports.AsyncMode=S,exports.ConcurrentMode=C,exports.ContextConsumer=w,exports.ContextProvider=T,exports.Element=E,exports.ForwardRef=D,exports.Fragment=O,exports.Lazy=k,exports.Memo=A,exports.Portal=j,exports.Profiler=M,exports.StrictMode=N,exports.Suspense=P,exports.isAsyncMode=te,exports.isConcurrentMode=ne,exports.isContextConsumer=re,exports.isContextProvider=ie,exports.isElement=ae,exports.isForwardRef=oe,exports.isFragment=se,exports.isLazy=ce,exports.isMemo=le,exports.isPortal=ue,exports.isProfiler=de,exports.isStrictMode=fe,exports.isSuspense=pe,exports.isValidElementType=b,exports.typeOf=x})()})),xe=s(((exports,t)=>{process.env.NODE_ENV===`production`?t.exports=ye():t.exports=be()})),Se=s(((exports,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if(r.join(``)!==`0123456789`)return!1;var i={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){i[e]=e}),Object.keys(Object.assign({},i)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),Ce=s(((exports,t)=>{var n=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`;t.exports=n})),we=s(((exports,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),Te=s(((exports,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=Ce(),i={},a=we();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),Ee=s(((exports,t)=>{var n=xe(),r=Se(),i=Ce(),a=we(),o=Te(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:E(),objectOf:w,oneOf:C,oneOfType:T,shape:O,exact:k};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l||=f,d||=c,p!==i){if(t){var m=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n],c=M(s);if(c!==e){var l=N(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=M(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=ee(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`Invalid arguments supplied to oneOf, expected an array, got `+arguments.length+` arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){var n=N(t);return n===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function w(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=M(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function T(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+P(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function E(){function e(e,t,n,r,i){return A(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function D(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function O(e){function t(t,n,r,a,o){var s=t[n],c=M(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return D(r,a,o,l,N(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function k(e){function t(t,n,o,s,c){var l=t[n],u=M(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));var d=r({},t[n],e);for(var f in d){var p=e[f];if(a(e,f)&&typeof p!=`function`)return D(o,s,c,f,N(p));if(!p)return new h(`Invalid `+s+" `"+c+"` key `"+f+"` supplied to `"+o+`\`.
|
|
8
|
+
Bad object: `+JSON.stringify(t[n],null,` `)+`
|
|
9
|
+
Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var m=p(l,f,o,s,c+`.`+f,i);if(m)return m}return null}return g(t)}function A(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(A);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!A(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!A(a[1]))return!1}}else return!1;return!0;default:return!1}}function j(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function M(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:j(t,e)?`symbol`:t}function N(e){if(e==null)return``+e;var t=M(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function P(e){var t=N(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function ee(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),De=s(((exports,t)=>{var n=Ce();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Oe=s(((exports,t)=>{if(process.env.NODE_ENV!==`production`){var n=xe(),r=!0;t.exports=Ee()(n.isElement,r)}else t.exports=De()()})),ke=u(Oe()),Ae=function(e){var t=e?.ownerDocument||document;return t.defaultView||window},je=function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1},Me=[`afterInjection`,`beforeInjection`,`desc`,`evalScripts`,`fallback`,`httpRequestWithCredentials`,`loading`,`renumerateIRIElements`,`src`,`title`,`useRequestCache`,`wrapper`],Ne=`http://www.w3.org/2000/svg`,Pe=`http://www.w3.org/1999/xlink`,Fe=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}N(t,e);var n=t.prototype;return n.renderSVG=function(){var e=this;if(this.reactWrapper instanceof Ae(this.reactWrapper).Node){var t=this.props,n=t.desc,r=t.evalScripts,i=t.httpRequestWithCredentials,a=t.renumerateIRIElements,o=t.src,s=t.title,c=t.useRequestCache,l=this.props.onError,u=this.props.beforeInjection,d=this.props.afterInjection,f=this.props.wrapper,p,m;f===`svg`?(p=document.createElementNS(Ne,f),p.setAttribute(`xmlns`,Ne),p.setAttribute(`xmlns:xlink`,Pe),m=document.createElementNS(Ne,f)):(p=document.createElement(f),m=document.createElement(f)),p.appendChild(m),m.dataset.src=o,this.nonReactWrapper=this.reactWrapper.appendChild(p);var h=function(t){if(e.removeSVG(),!e._isMounted){l(t);return}e.setState(function(){return{hasError:!0,isLoading:!1}},function(){l(t)})},g=function(t,n){if(t){h(t);return}e._isMounted&&e.setState(function(){return{isLoading:!1}},function(){try{d(n)}catch(e){h(e)}})},_=function(e){if(e.setAttribute(`role`,`img`),n){var t=e.querySelector(`:scope > desc`);t&&e.removeChild(t);var r=document.createElement(`desc`);r.innerHTML=n,e.prepend(r)}if(s){var i=e.querySelector(`:scope > title`);i&&e.removeChild(i);var a=document.createElement(`title`);a.innerHTML=s,e.prepend(a)}try{u(e)}catch(e){h(e)}};ve(m,{afterEach:g,beforeEach:_,cacheRequests:c,evalScripts:r,httpRequestWithCredentials:i,renumerateIRIElements:a})}},n.removeSVG=function(){var e;(e=this.nonReactWrapper)!=null&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(e){var t=this;je(A({},e),this.props)&&this.setState(function(){return t.initialState},function(){t.removeSVG(),t.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var e=this.props;e.afterInjection,e.beforeInjection,e.desc,e.evalScripts;var t=e.fallback;e.httpRequestWithCredentials;var n=e.loading;e.renumerateIRIElements,e.src,e.title,e.useRequestCache;var r=e.wrapper,i=O(e,Me),a=r;return f.createElement(a,A({},i,{ref:this.refCallback},r===`svg`?{xmlns:Ne,xmlnsXlink:Pe}:{}),this.state.isLoading&&n&&f.createElement(n,null),this.state.hasError&&t&&f.createElement(t,null))},t}(f.Component);Fe.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:``,evalScripts:`never`,fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:``,useRequestCache:!0,wrapper:`div`},Fe.propTypes={afterInjection:ke.func,beforeInjection:ke.func,desc:ke.string,evalScripts:ke.oneOf([`always`,`once`,`never`]),fallback:ke.oneOfType([ke.func,ke.object,ke.string]),httpRequestWithCredentials:ke.bool,loading:ke.oneOfType([ke.func,ke.object,ke.string]),onError:ke.func,renumerateIRIElements:ke.bool,src:ke.string.isRequired,title:ke.string,useRequestCache:ke.bool,wrapper:ke.oneOf([`div`,`span`,`svg`])};const Ie=f.default.createContext(!1),Le=`_wrapper_18jt2_1`,Re=`_customSvg_18jt2_8`,ze=`_customPng_18jt2_11`,Be=`_clickable_18jt2_16`;var Ve={wrapper:`_wrapper_18jt2_1`,customSvg:`_customSvg_18jt2_8`,customPng:`_customPng_18jt2_11`,clickable:`_clickable_18jt2_16`},He={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ue=f.default.createContext&&f.default.createContext(He),We=function(){return We=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},We.apply(this,arguments)},Ge=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Ke(e){return e&&e.map(function(e,t){return f.default.createElement(e.tag,We({key:t},e.attr),Ke(e.child))})}function F(e){return function(t){return f.default.createElement(qe,We({attr:We({},e.attr)},t),Ke(e.child))}}function qe(e){var t=function(t){var n=e.attr,r=e.size,i=e.title,a=Ge(e,[`attr`,`size`,`title`]),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),f.default.createElement(`svg`,We({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:We(We({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&f.default.createElement(`title`,null,i),e.children)};return Ue===void 0?t(He):f.default.createElement(Ue.Consumer,null,function(e){return t(e)})}function Je(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 9v4`}},{tag:`path`,attr:{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z`}},{tag:`path`,attr:{d:`M12 16h.01`}}]})(e)}function Ye(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 5l0 14`}},{tag:`path`,attr:{d:`M18 13l-6 6`}},{tag:`path`,attr:{d:`M6 13l6 6`}}]})(e)}function Xe(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 12l14 0`}},{tag:`path`,attr:{d:`M5 12l6 6`}},{tag:`path`,attr:{d:`M5 12l6 -6`}}]})(e)}function Ze(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 12l14 0`}},{tag:`path`,attr:{d:`M13 18l6 -6`}},{tag:`path`,attr:{d:`M13 6l6 6`}}]})(e)}function Qe(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 5l0 14`}},{tag:`path`,attr:{d:`M18 11l-6 -6`}},{tag:`path`,attr:{d:`M6 11l6 -6`}}]})(e)}function $e(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M16 4l4 0l0 4`}},{tag:`path`,attr:{d:`M14 10l6 -6`}},{tag:`path`,attr:{d:`M8 20l-4 0l0 -4`}},{tag:`path`,attr:{d:`M4 20l6 -6`}}]})(e)}function et(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M16 4l4 0l0 4`}},{tag:`path`,attr:{d:`M14 10l6 -6`}},{tag:`path`,attr:{d:`M8 20l-4 0l0 -4`}},{tag:`path`,attr:{d:`M4 20l6 -6`}},{tag:`path`,attr:{d:`M16 20l4 0l0 -4`}},{tag:`path`,attr:{d:`M14 14l6 6`}},{tag:`path`,attr:{d:`M8 4l-4 0l0 4`}},{tag:`path`,attr:{d:`M4 4l6 6`}}]})(e)}function tt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 9l4 0l0 -4`}},{tag:`path`,attr:{d:`M3 3l6 6`}},{tag:`path`,attr:{d:`M5 15l4 0l0 4`}},{tag:`path`,attr:{d:`M3 21l6 -6`}},{tag:`path`,attr:{d:`M19 9l-4 0l0 -4`}},{tag:`path`,attr:{d:`M15 9l6 -6`}},{tag:`path`,attr:{d:`M19 15l-4 0l0 4`}},{tag:`path`,attr:{d:`M15 15l6 6`}}]})(e)}function nt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M18 9l3 3l-3 3`}},{tag:`path`,attr:{d:`M15 12h6`}},{tag:`path`,attr:{d:`M6 9l-3 3l3 3`}},{tag:`path`,attr:{d:`M3 12h6`}},{tag:`path`,attr:{d:`M9 18l3 3l3 -3`}},{tag:`path`,attr:{d:`M12 15v6`}},{tag:`path`,attr:{d:`M15 6l-3 -3l-3 3`}},{tag:`path`,attr:{d:`M12 3v6`}}]})(e)}function rt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M21 17h-8l-3.5 -5h-6.5`}},{tag:`path`,attr:{d:`M21 7h-8l-3.495 5`}},{tag:`path`,attr:{d:`M18 10l3 -3l-3 -3`}},{tag:`path`,attr:{d:`M18 20l3 -3l-3 -3`}}]})(e)}function it(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6`}},{tag:`path`,attr:{d:`M9 17v1a3 3 0 0 0 6 0v-1`}}]})(e)}function at(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M7 5h6a3.5 3.5 0 0 1 0 7h-6z`}},{tag:`path`,attr:{d:`M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7`}}]})(e)}function ot(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`}}]})(e)}function st(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12z`}},{tag:`path`,attr:{d:`M19 16h-12a2 2 0 0 0 -2 2`}},{tag:`path`,attr:{d:`M9 8h6`}}]})(e)}function ct(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 21l18 0`}},{tag:`path`,attr:{d:`M5 21v-14l8 -4v18`}},{tag:`path`,attr:{d:`M19 21v-10l-6 -4`}},{tag:`path`,attr:{d:`M9 9l0 .01`}},{tag:`path`,attr:{d:`M9 12l0 .01`}},{tag:`path`,attr:{d:`M9 15l0 .01`}},{tag:`path`,attr:{d:`M9 18l0 .01`}}]})(e)}function lt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2`}},{tag:`path`,attr:{d:`M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`}}]})(e)}function ut(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z`}},{tag:`path`,attr:{d:`M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z`}},{tag:`path`,attr:{d:`M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z`}},{tag:`path`,attr:{d:`M4 20l14 0`}}]})(e)}function dt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 19l16 0`}},{tag:`path`,attr:{d:`M4 15l4 -6l4 2l4 -5l4 4`}}]})(e)}function ft(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 3v9h9`}},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}}]})(e)}function pt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 12l5 5l10 -10`}}]})(e)}function mt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M6 9l6 6l6 -6`}}]})(e)}function ht(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M15 6l-6 6l6 6`}}]})(e)}function gt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 6l6 6l-6 6`}}]})(e)}function _t(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M6 15l6 -6l6 6`}}]})(e)}function vt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M11 7l-5 5l5 5`}},{tag:`path`,attr:{d:`M17 7l-5 5l5 5`}}]})(e)}function yt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M7 7l5 5l-5 5`}},{tag:`path`,attr:{d:`M13 7l5 5l-5 5`}}]})(e)}function bt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}},{tag:`path`,attr:{d:`M9 12l2 2l4 -4`}}]})(e)}function xt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}},{tag:`path`,attr:{d:`M10 10l4 4m0 -4l-4 4`}}]})(e)}function St(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}}]})(e)}function Ct(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2`}},{tag:`path`,attr:{d:`M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z`}}]})(e)}function wt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`}},{tag:`path`,attr:{d:`M12 7v5l3 3`}}]})(e)}function Tt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M7 8l-4 4l4 4`}},{tag:`path`,attr:{d:`M17 8l4 4l-4 4`}},{tag:`path`,attr:{d:`M14 4l-4 16`}}]})(e)}function Et(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z`}},{tag:`path`,attr:{d:`M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2`}}]})(e)}function Dt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M6 6v6a3 3 0 0 0 3 3h10l-4 -4m0 8l4 -4`}}]})(e)}function Ot(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2`}},{tag:`path`,attr:{d:`M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}},{tag:`path`,attr:{d:`M14 4l0 4l-6 0l0 -4`}}]})(e)}function kt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 19l18 0`}},{tag:`path`,attr:{d:`M5 6m0 1a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1z`}}]})(e)}function At(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}}]})(e)}function jt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`}},{tag:`path`,attr:{d:`M7 11l5 5l5 -5`}},{tag:`path`,attr:{d:`M12 4l0 12`}}]})(e)}function Mt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M7.502 19.423c2.602 2.105 6.395 2.105 8.996 0c2.602 -2.105 3.262 -5.708 1.566 -8.546l-4.89 -7.26c-.42 -.625 -1.287 -.803 -1.936 -.397a1.376 1.376 0 0 0 -.41 .397l-4.893 7.26c-1.695 2.838 -1.035 6.441 1.567 8.546z`}}]})(e)}function Nt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 19v.01`}},{tag:`path`,attr:{d:`M12 15v-10`}}]})(e)}function Pt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`}},{tag:`path`,attr:{d:`M11 13l9 -9`}},{tag:`path`,attr:{d:`M15 4h5v5`}}]})(e)}function Ft(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`}},{tag:`path`,attr:{d:`M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87`}},{tag:`path`,attr:{d:`M3 3l18 18`}}]})(e)}function It(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`}},{tag:`path`,attr:{d:`M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6`}}]})(e)}function Lt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M14 3v4a1 1 0 0 0 1 1h4`}},{tag:`path`,attr:{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z`}}]})(e)}function Rt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`}},{tag:`path`,attr:{d:`M3 3l18 18`}}]})(e)}function zt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z`}}]})(e)}function Bt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M4 8v-2a2 2 0 0 1 2 -2h2`}},{tag:`path`,attr:{d:`M4 16v2a2 2 0 0 0 2 2h2`}},{tag:`path`,attr:{d:`M16 4h2a2 2 0 0 1 2 2v2`}},{tag:`path`,attr:{d:`M16 20h2a2 2 0 0 0 2 -2v-2`}}]})(e)}function Vt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2.5`}},{tag:`path`,attr:{d:`M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`}},{tag:`path`,attr:{d:`M20.2 20.2l1.8 1.8`}}]})(e)}function Ht(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2`}}]})(e)}function Ut(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}},{tag:`path`,attr:{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M13.41 10.59l2.59 -2.59`}},{tag:`path`,attr:{d:`M7 12a5 5 0 0 1 5 -5`}}]})(e)}function Wt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}},{tag:`path`,attr:{d:`M7 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}},{tag:`path`,attr:{d:`M17 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`}},{tag:`path`,attr:{d:`M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2`}},{tag:`path`,attr:{d:`M12 12l0 4`}}]})(e)}function Gt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}}]})(e)}function Kt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}},{tag:`path`,attr:{d:`M12 17l0 .01`}},{tag:`path`,attr:{d:`M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4`}}]})(e)}function qt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`}},{tag:`path`,attr:{d:`M12 9h.01`}},{tag:`path`,attr:{d:`M11 12h1v4h1`}}]})(e)}function Jt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M11 5l6 0`}},{tag:`path`,attr:{d:`M7 19l6 0`}},{tag:`path`,attr:{d:`M14 5l-4 14`}}]})(e)}function Yt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z`}},{tag:`path`,attr:{d:`M15 9h.01`}}]})(e)}function Xt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z`}},{tag:`path`,attr:{d:`M12 4l0 16`}}]})(e)}function Zt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z`}},{tag:`path`,attr:{d:`M4 12l16 0`}}]})(e)}function Qt(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 15l3 -3m2 -2l1 -1`}},{tag:`path`,attr:{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`}},{tag:`path`,attr:{d:`M3 3l18 18`}},{tag:`path`,attr:{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`}}]})(e)}function $t(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 15l6 -6`}},{tag:`path`,attr:{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`}},{tag:`path`,attr:{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`}}]})(e)}function en(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M11 6h9`}},{tag:`path`,attr:{d:`M11 12h9`}},{tag:`path`,attr:{d:`M12 18h8`}},{tag:`path`,attr:{d:`M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4`}},{tag:`path`,attr:{d:`M6 10v-6l-2 2`}}]})(e)}function tn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 6l11 0`}},{tag:`path`,attr:{d:`M9 12l11 0`}},{tag:`path`,attr:{d:`M9 18l11 0`}},{tag:`path`,attr:{d:`M5 6l0 .01`}},{tag:`path`,attr:{d:`M5 12l0 .01`}},{tag:`path`,attr:{d:`M5 18l0 .01`}}]})(e)}function nn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 3a9 9 0 1 0 9 9`}}]})(e)}function rn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 11m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z`}},{tag:`path`,attr:{d:`M12 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M8 11v-5a4 4 0 0 1 8 0`}}]})(e)}function an(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z`}},{tag:`path`,attr:{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`}},{tag:`path`,attr:{d:`M8 11v-4a4 4 0 1 1 8 0v4`}}]})(e)}function on(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`}},{tag:`path`,attr:{d:`M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z`}}]})(e)}function sn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1`}}]})(e)}function cn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 12l14 0`}}]})(e)}function ln(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z`}}]})(e)}function un(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z`}},{tag:`path`,attr:{d:`M8 4l0 16`}},{tag:`path`,attr:{d:`M16 4l0 16`}},{tag:`path`,attr:{d:`M4 8l4 0`}},{tag:`path`,attr:{d:`M4 16l4 0`}},{tag:`path`,attr:{d:`M4 12l16 0`}},{tag:`path`,attr:{d:`M16 8l4 0`}},{tag:`path`,attr:{d:`M16 16l4 0`}}]})(e)}function dn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M13 20l7 -7`}},{tag:`path`,attr:{d:`M13 20v-6a1 1 0 0 1 1 -1h6v-7a2 2 0 0 0 -2 -2h-12a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7`}}]})(e)}function fn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4`}},{tag:`path`,attr:{d:`M13.5 6.5l4 4`}}]})(e)}function pn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z`}},{tag:`path`,attr:{d:`M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z`}}]})(e)}function mn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M7 4v16l13 -8z`}}]})(e)}function hn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M20 5v14l-12 -7z`}},{tag:`path`,attr:{d:`M4 5l0 14`}}]})(e)}function gn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 5v14l12 -7z`}},{tag:`path`,attr:{d:`M20 5l0 14`}}]})(e)}function _n(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M5 5m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z`}}]})(e)}function vn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 5v14l8 -7z`}},{tag:`path`,attr:{d:`M14 5v14l8 -7z`}}]})(e)}function yn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M21 5v14l-8 -7z`}},{tag:`path`,attr:{d:`M10 5v14l-8 -7z`}}]})(e)}function bn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 5l0 14`}},{tag:`path`,attr:{d:`M5 12l14 0`}}]})(e)}function xn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4`}},{tag:`path`,attr:{d:`M12 19l0 .01`}}]})(e)}function Sn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`}},{tag:`path`,attr:{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`}}]})(e)}function Cn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M19.933 13.041a8 8 0 1 1 -9.925 -8.788c3.899 -1 7.935 1.007 9.425 4.747`}},{tag:`path`,attr:{d:`M20 4v5h-5`}}]})(e)}function wn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M19.95 11a8 8 0 1 0 -.5 4m.5 5v-5h-5`}}]})(e)}function Tn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1z`}},{tag:`path`,attr:{d:`M12 15l0 4`}},{tag:`path`,attr:{d:`M14 17l-4 0`}}]})(e)}function En(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 18v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1z`}},{tag:`path`,attr:{d:`M12 9v-4`}},{tag:`path`,attr:{d:`M10 7l4 0`}}]})(e)}function Dn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M19.875 8c.621 0 1.125 .512 1.125 1.143v5.714c0 .631 -.504 1.143 -1.125 1.143h-15.875a1 1 0 0 1 -1 -1v-5.857c0 -.631 .504 -1.143 1.125 -1.143h15.75z`}},{tag:`path`,attr:{d:`M9 8v2`}},{tag:`path`,attr:{d:`M6 8v3`}},{tag:`path`,attr:{d:`M12 8v3`}},{tag:`path`,attr:{d:`M18 8v3`}},{tag:`path`,attr:{d:`M15 8v2`}}]})(e)}function On(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M7 20l10 0`}},{tag:`path`,attr:{d:`M6 6l6 -1l6 1`}},{tag:`path`,attr:{d:`M12 3l0 17`}},{tag:`path`,attr:{d:`M9 12l-3 -6l-3 6a3 3 0 0 0 6 0`}},{tag:`path`,attr:{d:`M21 12l-3 -6l-3 6a3 3 0 0 0 6 0`}}]})(e)}function kn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`}},{tag:`path`,attr:{d:`M21 21l-6 -6`}}]})(e)}function An(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z`}},{tag:`path`,attr:{d:`M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z`}},{tag:`path`,attr:{d:`M7 8l0 .01`}},{tag:`path`,attr:{d:`M7 16l0 .01`}}]})(e)}function jn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z`}},{tag:`path`,attr:{d:`M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`}}]})(e)}function Mn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 6l7 0`}},{tag:`path`,attr:{d:`M4 12l7 0`}},{tag:`path`,attr:{d:`M4 18l9 0`}},{tag:`path`,attr:{d:`M15 9l3 -3l3 3`}},{tag:`path`,attr:{d:`M18 6l0 12`}}]})(e)}function Nn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 6l9 0`}},{tag:`path`,attr:{d:`M4 12l7 0`}},{tag:`path`,attr:{d:`M4 18l7 0`}},{tag:`path`,attr:{d:`M15 15l3 3l3 -3`}},{tag:`path`,attr:{d:`M18 6l0 12`}}]})(e)}function Pn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z`}}]})(e)}function Fn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`}},{tag:`path`,attr:{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`}}]})(e)}function In(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z`}},{tag:`path`,attr:{d:`M3 10h18`}},{tag:`path`,attr:{d:`M10 3v18`}}]})(e)}function Ln(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`}},{tag:`path`,attr:{d:`M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0`}},{tag:`path`,attr:{d:`M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`}}]})(e)}function Rn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 7l16 0`}},{tag:`path`,attr:{d:`M10 11l0 6`}},{tag:`path`,attr:{d:`M14 11l0 6`}},{tag:`path`,attr:{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`}},{tag:`path`,attr:{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`}}]})(e)}function zn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`}},{tag:`path`,attr:{d:`M7 9l5 -5l5 5`}},{tag:`path`,attr:{d:`M12 4l0 12`}}]})(e)}function Bn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0`}},{tag:`path`,attr:{d:`M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2`}}]})(e)}function Vn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`}},{tag:`path`,attr:{d:`M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2`}},{tag:`path`,attr:{d:`M16 3.13a4 4 0 0 1 0 7.75`}},{tag:`path`,attr:{d:`M21 21v-2a4 4 0 0 0 -3 -3.85`}}]})(e)}function Hn(e){return F({tag:`svg`,attr:{viewBox:`0 0 24 24`,strokeWidth:`2`,stroke:`currentColor`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`},child:[{tag:`path`,attr:{stroke:`none`,d:`M0 0h24v24H0z`,fill:`none`}},{tag:`path`,attr:{d:`M18 6l-12 12`}},{tag:`path`,attr:{d:`M6 6l12 12`}}]})(e)}function Un(e){return F({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M9 9H4v1h5V9z`}},{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M5 3l1-1h7l1 1v7l-1 1h-2v2l-1 1H3l-1-1V6l1-1h2V3zm1 2h4l1 1v4h2V3H6v2zm4 1H3v7h7V6z`}}]})(e)}function Wn(e){return F({tag:`svg`,attr:{viewBox:`0 0 16 16`,fill:`currentColor`},child:[{tag:`path`,attr:{d:`M9 9H4v1h5V9z`}},{tag:`path`,attr:{d:`M7 12V7H6v5h1z`}},{tag:`path`,attr:{fillRule:`evenodd`,clipRule:`evenodd`,d:`M5 3l1-1h7l1 1v7l-1 1h-2v2l-1 1H3l-1-1V6l1-1h2V3zm1 2h4l1 1v4h2V3H6v2zm4 1H3v7h7V6z`}}]})(e)}function Gn(e){return F({tag:`svg`,attr:{viewBox:`0 0 1024 1024`},child:[{tag:`path`,attr:{d:`M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attr:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]})(e)}function Kn(e){return F({tag:`svg`,attr:{viewBox:`0 0 1024 1024`},child:[{tag:`path`,attr:{d:`M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z`}},{tag:`path`,attr:{d:`M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z`}}]})(e)}var qn=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%204H6C4.89543%204%204%204.89543%204%206V18C4%2019.1046%204.89543%2020%206%2020H18C19.1046%2020%2020%2019.1046%2020%2018V6C20%204.89543%2019.1046%204%2018%204Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Jn=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2012H20M12%204V12M18%2020H6C4.89543%2020%204%2019.1046%204%2018V6C4%204.8954%204.89543%204%206%204H18C19.1046%204%2020%204.8954%2020%206V18C20%2019.1046%2019.1046%2020%2018%2020Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Yn=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2012H20M12%2020V12M18%204H6C4.89543%204%204%204.89543%204%206V18C4%2019.1046%204.89543%2020%206%2020H18C19.1046%2020%2020%2019.1046%2020%2018V6C20%204.89543%2019.1046%204%2018%204Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Xn=`data:image/svg+xml,%3csvg%20fill='none'%20height='1em'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m12%2020v-16m-8%208h8m8-6v12c0%201.1046-.8954%202-2%202h-12c-1.1046%200-2-.8954-2-2v-12c0-1.1046.8954-2%202-2h12c1.1046%200%202%20.8954%202%202z'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'/%3e%3c/svg%3e`,Zn=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12%204L12%2020M20%2012H12M4%2018L4%206C4%204.89543%204.89543%204%206%204L18%204C19.1046%204%2020%204.89543%2020%206V18C20%2019.1046%2019.1046%2020%2018%2020H6C4.89543%2020%204%2019.1046%204%2018Z'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`,Qn=`data:image/svg+xml,%3csvg%20width='1em'%20height='1em'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%204C4.89543%204%204%204.89543%204%206V18C4%2019.1046%204.89543%2020%206%2020H18C19.1046%2020%2020%2019.1046%2020%2018V6C20%204.89543%2019.1046%204%2018%204M6%204H18M6%204H12M18%204H12M4%2012H20M12%204V20'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e`;const $n=({icon:e})=>{switch(e){case`add`:case`plus`:return(0,p.jsx)(bn,{});case`add above`:return(0,p.jsx)(En,{});case`add below`:return(0,p.jsx)(Tn,{});case`arrow down`:case`down`:return(0,p.jsx)(Ye,{});case`arrow left`:case`left`:return(0,p.jsx)(Xe,{});case`arrow right`:case`right`:return(0,p.jsx)(Ze,{});case`arrow up`:case`up`:return(0,p.jsx)(Qe,{});case`bold`:return(0,p.jsx)(at,{});case`book`:case`library`:return(0,p.jsx)(st,{});case`camera`:return(0,p.jsx)(lt,{});case`close`:case`clear`:case`times`:return(0,p.jsx)(Hn,{});case`chart`:case`chart line`:return(0,p.jsx)(dt,{});case`chart bar`:return(0,p.jsx)(ut,{});case`chart pie`:return(0,p.jsx)(ft,{});case`chat`:return(0,p.jsx)(sn,{});case`check`:case`checkmark`:return(0,p.jsx)(pt,{});case`chevron up`:return(0,p.jsx)(_t,{});case`chevron down`:return(0,p.jsx)(mt,{});case`chevron left`:return(0,p.jsx)(ht,{});case`chevron right`:return(0,p.jsx)(gt,{});case`chevron double left`:return(0,p.jsx)(vt,{});case`chevron double right`:return(0,p.jsx)(yt,{});case`clock`:return(0,p.jsx)(wt,{});case`clone`:case`copy`:case`duplicate`:return(0,p.jsx)(Et,{});case`code`:return(0,p.jsx)(Tt,{});case`collapse`:return(0,p.jsx)(Gn,{});case`collapse all`:return(0,p.jsx)(Un,{});case`company`:return(0,p.jsx)(ct,{});case`compare`:return(0,p.jsx)(On,{});case`delete`:case`trash`:return(0,p.jsx)(Rn,{});case`depth`:return(0,p.jsx)(Dn,{style:{transform:`rotate(-90deg)`}});case`download`:case`export`:return(0,p.jsx)(jt,{});case`drag`:return(0,p.jsx)(Gt,{});case`edit`:case`pencil`:case`rename`:return(0,p.jsx)(fn,{});case`electricity`:return(0,p.jsx)(ot,{});case`error`:return(0,p.jsx)(xt,{});case`exclamation`:return(0,p.jsx)(Nt,{});case`expand`:return(0,p.jsx)(Kn,{});case`expand all`:return(0,p.jsx)(Wn,{});case`external`:return(0,p.jsx)(Pt,{});case`fast forward`:return(0,p.jsx)(vn,{});case`fast backward`:return(0,p.jsx)(yn,{});case`file`:return(0,p.jsx)(Lt,{});case`filter`:return(0,p.jsx)(zt,{});case`focus`:return(0,p.jsx)(Bt,{});case`folder`:return(0,p.jsx)(Ht,{});case`folder search`:return(0,p.jsx)(Vt,{});case`fork`:return(0,p.jsx)(Wt,{});case`gauge`:return(0,p.jsx)(Ut,{});case`help`:return(0,p.jsx)(Kt,{});case`hide`:return(0,p.jsx)(Ft,{});case`indent`:return(0,p.jsx)(Dt,{});case`info`:return(0,p.jsx)(qt,{});case`italic`:return(0,p.jsx)(Jt,{});case`key`:return(0,p.jsx)(Yt,{});case`laptop`:return(0,p.jsx)(kt,{});case`layout columns`:case`columns`:return(0,p.jsx)(Xt,{});case`layout grid`:case`grid`:return(0,p.jsx)(Fe,{src:Qn});case`layout rows`:case`rows`:return(0,p.jsx)(Zt,{});case`layout single`:case`square`:return(0,p.jsx)(Fe,{src:qn});case`layout 3 split top`:return(0,p.jsx)(Fe,{src:Jn});case`layout 3 split bottom`:return(0,p.jsx)(Fe,{src:Yn});case`layout 3 split left`:return(0,p.jsx)(Fe,{src:Xn});case`layout 3 split right`:return(0,p.jsx)(Fe,{src:Zn});case`link`:return(0,p.jsx)($t,{});case`list`:case`legend`:case`ul`:return(0,p.jsx)(tn,{});case`list numbers`:case`ol`:return(0,p.jsx)(en,{});case`location`:return(0,p.jsx)(on,{});case`lock`:return(0,p.jsx)(an,{});case`maximize`:return(0,p.jsx)(et,{});case`menu`:return(0,p.jsx)(At,{});case`minimize`:return(0,p.jsx)(tt,{});case`minus`:return(0,p.jsx)(cn,{});case`moon`:return(0,p.jsx)(ln,{});case`move`:return(0,p.jsx)(nt,{});case`note`:return(0,p.jsx)(dn,{});case`notification`:case`bell`:return(0,p.jsx)(it,{});case`paste`:return(0,p.jsx)(Ct,{});case`pause`:return(0,p.jsx)(pn,{});case`play`:return(0,p.jsx)(mn,{});case`question`:return(0,p.jsx)(xn,{});case`redo`:case`rotate`:case`rotate right`:return(0,p.jsx)(Cn,{});case`refresh`:case`sync`:return(0,p.jsx)(Sn,{});case`save`:return(0,p.jsx)(Ot,{});case`scale`:return(0,p.jsx)($e,{});case`search`:return(0,p.jsx)(kn,{});case`server`:return(0,p.jsx)(An,{});case`settings`:return(0,p.jsx)(jn,{});case`show`:case`eye`:return(0,p.jsx)(It,{});case`sort`:case`sort descending`:case`sort down`:case`sort amount down`:return(0,p.jsx)(Nn,{});case`sort ascending`:case`sort up`:case`sort amount up`:return(0,p.jsx)(Mn,{});case`spinner`:return(0,p.jsx)(nn,{});case`split`:return(0,p.jsx)(rt,{});case`star`:return(0,p.jsx)(Pn,{});case`step backward`:return(0,p.jsx)(hn,{});case`step forward`:return(0,p.jsx)(gn,{});case`stop`:return(0,p.jsx)(_n,{});case`success`:return(0,p.jsx)(bt,{});case`sun`:return(0,p.jsx)(Fn,{});case`table`:return(0,p.jsx)(In,{});case`target`:return(0,p.jsx)(Ln,{});case`undo`:case`rotate left`:return(0,p.jsx)(wn,{});case`unfilter`:return(0,p.jsx)(Rt,{});case`unlink`:return(0,p.jsx)(Qt,{});case`unlock`:return(0,p.jsx)(rn,{});case`upload`:case`import`:return(0,p.jsx)(zn,{});case`user`:return(0,p.jsx)(Bn,{});case`users`:case`group`:return(0,p.jsx)(Vn,{});case`video`:return(0,p.jsx)(un,{});case`warning`:case`alert`:return(0,p.jsx)(Je,{});case`water`:case`droplet`:return(0,p.jsx)(Mt,{});case``:return null;default:return(0,p.jsx)(St,{})}},er=({icon:e,onClick:t,clickable:n=!1,color:r,size:i,testId:a})=>{let o=(0,f.useContext)(Ie),s={color:r,fill:r,fontSize:i||`inherit`,width:i||`auto`,height:i||`auto`};return(0,p.jsx)(`div`,{className:(0,g.default)(Ve.wrapper,(n||t)&&!o?Ve.clickable:``),style:s,onClick:e=>t&&!o?t(e):void 0,"data-testid":a,children:(0,f.isValidElement)(e)?e:typeof e==`string`&&(e.includes(`.svg`)||e.includes(`image/svg`))?(0,p.jsx)(Fe,{className:Ve.customSvg,beforeInjection:e=>{i&&(e.setAttribute(`width`,String(i)),e.setAttribute(`height`,String(i)))},src:e}):typeof e==`string`&&(e.includes(`.png`)||e.includes(`image/png`))?(0,p.jsx)(`img`,{alt:`icon`,className:Ve.customPng,src:e}):typeof e==`string`?(0,p.jsx)($n,{icon:e}):null})};var tr=u(h());const nr=({expanded:e})=>(0,p.jsx)(`span`,{className:(0,tr.default)(D.chevron,e?D.expanded:``),children:(0,p.jsx)(er,{icon:S.CHEVRON_RIGHT})}),rr=`_accordion_15p8j_1`,ir=`_accordionHeader_15p8j_5`,ar=`_heading_15p8j_9`,or=`_clickable_15p8j_12`,sr=`_bordered_15p8j_18`,cr=`_accordionContent_15p8j_18`,lr=`_expanded_15p8j_36`,ur=`_padding_15p8j_44`,dr=`_squareBottom_15p8j_47`;var fr={accordion:`_accordion_15p8j_1`,accordionHeader:`_accordionHeader_15p8j_5`,heading:`_heading_15p8j_9`,clickable:`_clickable_15p8j_12`,bordered:`_bordered_15p8j_18`,accordionContent:`_accordionContent_15p8j_18`,expanded:`_expanded_15p8j_36`,padding:`_padding_15p8j_44`,squareBottom:`_squareBottom_15p8j_47`},pr=u(h());const mr=({heading:e,expanded:t=!1,bordered:n=!1,padding:r=!0,children:i,squareBottom:a=!1,onClick:o,testId:s})=>(0,p.jsxs)(`div`,{className:(0,pr.default)(fr.accordion,n?fr.bordered:``,t?fr.expanded:``,a?fr.squareBottom:``),children:[(0,p.jsxs)(`div`,{className:(0,pr.default)(fr.accordionHeader,o?fr.clickable:``),onClick:o,"data-testid":s,children:[(0,p.jsx)(nr,{expanded:t}),(0,p.jsx)(`div`,{className:fr.heading,children:e})]}),t&&i&&(0,p.jsx)(`div`,{className:(0,pr.default)(fr.accordionContent,n&&r?fr.padding:``),children:i})]}),hr=({heading:e,bordered:t,padding:n,expanded:r=!1,children:i,testId:a})=>{let[o,s]=f.default.useState(r);return(0,p.jsx)(mr,{heading:e,bordered:t,padding:n,expanded:o,onClick:()=>{s(!o)},testId:a,children:i})},gr=({heading:e,expanded:t=!1,managed:n=!1,bordered:r=!1,padding:i=!0,children:a,onClick:o,squareBottom:s=!1,testId:c})=>n?(0,p.jsx)(hr,{heading:e,expanded:t,bordered:r,padding:i,squareBottom:s,onClick:o,testId:c,children:a}):(0,p.jsx)(mr,{heading:e,expanded:t,bordered:r,padding:i,squareBottom:s,onClick:o,testId:c,children:a}),eee=`_checkbox_oo4mp_1`,tee=`_noLabel_oo4mp_17`,_r=`_small_oo4mp_20`,vr=`_checkmark_oo4mp_43`,yr=`_disabled_oo4mp_82`,br=`_noMargin_oo4mp_96`,xr=`_isInTable_oo4mp_99`,Sr=`_helpIconEnabled_oo4mp_102`;var Cr={checkbox:`_checkbox_oo4mp_1`,noLabel:`_noLabel_oo4mp_17`,small:`_small_oo4mp_20`,checkmark:`_checkmark_oo4mp_43`,disabled:`_disabled_oo4mp_82`,noMargin:`_noMargin_oo4mp_96`,isInTable:`_isInTable_oo4mp_99`,helpIconEnabled:`_helpIconEnabled_oo4mp_102`},wr=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t?(n=r,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,`size`,{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),Tr=typeof window<`u`&&typeof document<`u`&&window.document===document,Er=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),Dr=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(Er):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Or=2;function kr(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){Dr(a)}function s(){var e=Date.now();if(n){if(e-i<Or)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var Ar=20,jr=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],Mr=typeof MutationObserver<`u`,Nr=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=kr(this.refresh.bind(this),Ar)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){!Tr||this.connected_||(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),Mr?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Tr||!this.connected_||(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t,r=jr.some(function(e){return!!~n.indexOf(e)});r&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),Pr=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Fr=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Er}),Ir=Gr(0,0,0,0);function Lr(e){return parseFloat(e)||0}function Rr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){var r=e[`border-`+n+`-width`];return t+Lr(r)},0)}function I(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r],o=e[`padding-`+a];n[a]=Lr(o)}return n}function zr(e){var t=e.getBBox();return Gr(0,0,t.width,t.height)}function Br(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Ir;var r=Fr(e).getComputedStyle(e),i=I(r),a=i.left+i.right,o=i.top+i.bottom,s=Lr(r.width),c=Lr(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=Rr(r,`left`,`right`)+a),Math.round(c+o)!==n&&(c-=Rr(r,`top`,`bottom`)+o)),!Hr(e)){var l=Math.round(s+a)-t,u=Math.round(c+o)-n;Math.abs(l)!==1&&(s-=l),Math.abs(u)!==1&&(c-=u)}return Gr(i.left,i.top,s,c)}var Vr=(function(){return typeof SVGGraphicsElement<`u`?function(e){return e instanceof Fr(e).SVGGraphicsElement}:function(e){return e instanceof Fr(e).SVGElement&&typeof e.getBBox==`function`}})();function Hr(e){return e===Fr(e).document.documentElement}function Ur(e){return Tr?Vr(e)?zr(e):Br(e):Ir}function Wr(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=typeof DOMRectReadOnly<`u`?DOMRectReadOnly:Object,o=Object.create(a.prototype);return Pr(o,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),o}function Gr(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Kr=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Gr(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Ur(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),qr=function(){function e(e,t){var n=Wr(t);Pr(this,{target:e,contentRect:n})}return e}(),Jr=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new wr,typeof e!=`function`)throw TypeError(`The callback provided as parameter 1 is not a function.`);this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof Fr(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new Kr(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(!(typeof Element>`u`||!(Element instanceof Object))){if(!(e instanceof Fr(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new qr(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Yr=typeof WeakMap<`u`?new WeakMap:new wr,Xr=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=Nr.getInstance(),r=new Jr(t,n,this);Yr.set(this,r)}return e}();[`observe`,`unobserve`,`disconnect`].forEach(function(e){Xr.prototype[e]=function(){var t;return(t=Yr.get(this))[e].apply(t,arguments)}});var Zr=(function(){return Er.ResizeObserver===void 0?Xr:Er.ResizeObserver})(),Qr=Zr,$r=process.env.NODE_ENV===`production`;function ei(e,t){if(!$r){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}var ti=ei;function ni(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ri(e,t,n){return t&&ni(e.prototype,t),n&&ni(e,n),e}function ii(){return ii=Object.assign||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},ii.apply(this,arguments)}function ai(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oi(e,t)}function oi(e,t){return oi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},oi(e,t)}function si(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ci(e,t){if(e){if(typeof e==`string`)return li(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return li(e,t)}}function li(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ui(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=ci(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function di(e){var t=(0,f.useRef)(null);function n(n){!n||n===t.current||(t.current=n,e(n))}return n}function fi(e){var t=(0,f.useRef)(e);return(0,f.useMemo)(function(){function e(e){typeof e==`function`?t.current=e(t.current):t.current=e}function n(){return t.current}return[n,e]},[])}function pi(){var e=(0,f.useRef)([]);return(0,f.useMemo)(function(){function t(){return e.current.length>0}function n(){for(var t=ui(e.current),n;!(n=t()).done;){var r=n.value;r()}e.current=[]}function r(t){e.current.push(t)}return{hasEventSubscriptions:t,removeAllEventSubscriptions:n,addEventSubscription:r}},[])}var mi=typeof window<`u`?f.useLayoutEffect:f.useEffect;function hi(e,t){var n=(0,f.useRef)(e);return t?(n.current=e,n):(n.current=null,n)}var gi={top:0,left:0,right:1,bottom:1,width:1,height:1};function _i(e){var t=e===void 0?{}:e,n=t.enabled,r=n===void 0?!0:n,i=t.preventDefault,a=i===void 0?!0:i,o=(0,f.useRef)(null),s=(0,f.useState)(gi),c=s[0],l=s[1];function u(){l(gi)}var d=c!==gi;function p(e){if(r){a&&e.preventDefault();var t=e.clientX,n=e.clientY;l({top:n,left:t,width:1,height:1,right:t+1,bottom:n+1})}}return{hasMousePosition:d,resetMousePosition:u,handleMouseEvent:p,trigger:{getBounds:function(){return c},getParent:o.current?function(){return o.current}:void 0},parentRef:o}}function vi(e){return parseFloat(e.replace(`px`,``))}function yi(e,t,n){return e<t?t:e>n?n:e}function bi(e){return e!=null}function xi(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=ui(t),r;!(r=n()).done;){var i=r.value;i&&(typeof i==`function`?i(e):i.current=e)}}}function Si(e,t){if(e!==void 0)return t||e.ResizeObserver}function Ci(e,t){var n=[];if(!e||!t||e===document.body)return n;var r=t.getComputedStyle(e),i=r.overflow,a=r.overflowX,o=r.overflowY;return[i,a,o].some(function(e){return[`auto`,`scroll`].includes(e)})&&n.push(e),[].concat(n,Ci(e.parentElement,t))}function wi(e){return`react-laag: Could not find a valid reference for the `+e+` element. There might be 2 causes:
|
|
11
|
+
- Make sure that the 'ref' is set correctly on the `+e+` element when isOpen: true. Also make sure your component forwards the ref with "forwardRef()".
|
|
12
|
+
- Make sure that you are actually rendering the `+e+` when the isOpen prop is set to true`}function Ti(e){var t=e.enabled,n=e.onChange,r=e.environment,i=e.ResizeObserverPolyfill,a=e.overflowContainer,o=e.triggerOption,s=Si(r,i);(0,f.useEffect)(function(){process.env.NODE_ENV!==`production`&&ti(s,`This browser does not support ResizeObserver out of the box. We recommend to add a polyfill in order to utilize the full capabilities of react-laag. See: https://github.com/everweij/react-laag#resize-observer`)},[s]);var c=(0,f.useRef)(null),l=!!o,u=fi({scrollContainers:[],trigger:null,layer:null}),d=u[0],p=u[1],m=pi(),h=m.hasEventSubscriptions,g=m.addEventSubscription,_=m.removeAllEventSubscriptions,v=(0,f.useCallback)(function(){var e=d(),t=e.layer,i=e.trigger,a=e.scrollContainers,o=a[0];if(!t)throw Error(wi(`layer`));if(!i&&!l)throw Error(wi(`trigger`));var s={top:0,left:0};if(o){var u=o.scrollLeft,f=o.scrollTop;s={top:f,left:u}}else{var p=r.scrollX,m=r.scrollY;s={top:m,left:p}}var h={left:0,top:0};if(o){var g=r.getComputedStyle(o),_=g.borderLeftWidth,v=g.borderTopWidth;h={left:vi(_)||0,top:vi(v)||0}}n({layer:t,trigger:i,scrollContainers:a,arrow:c.current},s,h)},[d,n,r,c,l]),y=(0,f.useCallback)(function(){var e=d(),t=e.trigger,n=e.layer,i=e.scrollContainers;if(!n)throw Error(wi(`layer`));if(!t&&!l)throw Error(wi(`trigger`));if(s){for(var a=!1,o=function(){if(!a){a=!0;return}v()},c=new s(o),u=0,f=[t,n,document.body];u<f.length;u++){var p=f[u];p&&c.observe(p)}g(function(){for(var e=0,r=[t,n,document.body];e<r.length;e++){var i=r[e];i&&c.unobserve(i)}c.disconnect()})}for(var m=[r].concat(i),h=function(){var e=y.value;e.addEventListener(`scroll`,v),g(function(){return e.removeEventListener(`scroll`,v)})},_=ui(m),y;!(y=_()).done;)h()},[d,g,v,r,s,l]),b=(0,f.useCallback)(function(e,n){t&&e&&e!==n&&(_(),y(),v())},[_,y,v,t]),x=di((0,f.useCallback)(function(e){var t=d(),n=t.layer;p(function(t){return ii({},t,{layer:e})}),b(n,e)},[d,p,b])),S=(0,f.useCallback)(function(e){var t=Ci(e,r),n=t[0];if(n){var i=r.getComputedStyle(n).position,o=[`relative`,`absolute`,`fixed`].includes(i)||a;o||(n.style.position=`relative`),process.env.NODE_ENV!==`production`&&ti(o,`react-laag: Set the 'position' style of the nearest scroll-container to 'relative', 'absolute' or 'fixed', or set the 'overflowContainer' prop to true. This is needed in order to position the layer properly. Currently the scroll-container is positioned: "`+i+`". For now, "position: relative;" is added for you, but this behavior might be removed in the future. Visit https://react-laag.com/docs/#position-relative for more info.`)}return t},[r,a]),C=di((0,f.useCallback)(function(e){var t=S(e),n=d(),r=n.trigger;p(function(n){return ii({},n,{trigger:e,scrollContainers:t})}),b(r,e)},[d,p,b,S])),w=o==null||o.getParent==null?void 0:o.getParent();return mi(function(){w&&p(function(e){return ii({},e,{scrollContainers:S(w)})})},[w,p,S]),mi(function(){return t&&(h()||y()),function(){h()&&_()}},[t,h,y,_]),mi(function(){t&&v()}),{triggerRef:C,layerRef:x,arrowRef:c,closestScrollContainer:d().scrollContainers[0]||null}}var Ei=(0,f.createContext)({});function Di(e){var t=e.children,n=e.registrations,r=(0,f.useCallback)(function(e){return n.current.add(e),function(){return n.current.delete(e)}},[n]);return(0,f.createElement)(Ei.Provider,{value:r},t)}function Oi(e,t){for(var n=ui(e),r;!(r=n()).done;){var i=r.value.shouldCloseWhenClickedOutside;if(!i(t))return!1}return!0}function ki(e){var t=e.isOpen,n=e.onOutsideClick,r=e.onParentClose,i=(0,f.useRef)(null),a=(0,f.useRef)(null),o=(0,f.useRef)(new Set),s=(0,f.useContext)(Ei),c=(0,f.useCallback)(function(e){var t=e.target,n=i.current&&i.current.contains(t),r=a.current&&a.current.contains(t),s=Oi(o.current,e);return r&&s&&o.current.forEach(function(e){var t=e.closeChild;return t()}),!n&&!r&&s},[i,a,o]);return(0,f.useEffect)(function(){if(typeof s==`function`)return s({shouldCloseWhenClickedOutside:c,closeChild:function(){process.env.NODE_ENV!==`production`&&ti(r,`react-laag: You are using useLayer() in a nested setting but forgot to set the 'onParentClose()' callback in the options. This could lead to unexpected behavior.`),r&&r()}})},[s,c,r,o]),(0,f.useEffect)(function(){var e=typeof s==`function`,r=!t||!n||e;if(r)return;function i(e){c(e)&&n()}return document.addEventListener(`click`,i,!0),function(){return document.removeEventListener(`click`,i,!0)}},[t,n,c,s]),(0,f.useEffect)(function(){t||o.current.forEach(function(e){var t=e.closeChild;return t()})},[t]),{closeOnOutsideClickRefs:{trigger:i,layer:a},registrations:o}}var Ai=[`bottom-start`,`bottom-end`,`bottom-center`,`top-start`,`top-center`,`top-end`,`left-end`,`left-center`,`left-start`,`right-end`,`right-center`,`right-start`,`center`],ji={top:`bottom`,left:`right`,bottom:`top`,right:`left`,center:`center`},Mi=function(){function e(e,t,n,r,i,a,o,s,c){this.prop=void 0,this.opposite=void 0,this.isHorizontal=void 0,this.sizeProp=void 0,this.oppositeSizeProp=void 0,this.cssProp=void 0,this.oppositeCssProp=void 0,this.isCenter=void 0,this.isPush=void 0,this.prop=e,this.opposite=t,this.isHorizontal=n,this.sizeProp=r,this.oppositeSizeProp=i,this.cssProp=a,this.oppositeCssProp=o,this.isCenter=s,this.isPush=c}var t=e.prototype;return t.factor=function(e){return e*(this.isPush?1:-1)},t.isOppositeDirection=function(e){return this.isHorizontal!==e.isHorizontal},e}();function Ni(e,t){t===void 0&&(t=!0);var n=[`left`,`right`].includes(e);return new Mi(e,t?Ni(ji[e],!1):null,n,n?`width`:`height`,n?`height`:`width`,n?`left`:`top`,n?`top`:`left`,e===`center`,![`right`,`bottom`].includes(e))}var Pi={top:Ni(`top`),bottom:Ni(`bottom`),left:Ni(`left`),right:Ni(`right`)},Fi=ii({},Pi,{center:Ni(`center`)}),Ii=[`top`,`left`,`bottom`,`right`],Li=function(){function e(e){return this.top=void 0,this.left=void 0,this.right=void 0,this.bottom=void 0,Object.assign(this,e)}return e.mergeSmallestSides=function(t){var n=t[0],r=t.slice(1);if(!n)throw Error(`Please provide at least 1 bounds objects in order to merge`);for(var i=Object.fromEntries(Ii.map(function(e){return[e,n[e]]})),a=ui(r),o;!(o=a()).done;)for(var s=o.value,c=ui(Ii),l;!(l=c()).done;){var u=l.value;i[u]=Math.min(i[u],s[u])}return new e(i)},ri(e,[{key:`allSidesArePositive`,get:function(){var e=this;return Ii.every(function(t){return e[t]>=0})}},{key:`negativeSides`,get:function(){var e=this;return Object.fromEntries(Ii.filter(function(t){return e[t]<0}).map(function(t){return[t,e[t]]}))}}]),e}();function Ri(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){return e+(t?vi(t):0)},0)}function zi(e){var t=e.top,n=e.left,r=e.right,i=e.bottom,a=e.width,o=e.height;return{top:t,left:n,right:r,bottom:i,width:a,height:o}}var Bi={top:0,left:0,right:0,bottom:0,width:0,height:0},Vi=function(){e.create=function(t){return new e(t)},e.fromElement=function(t,n){n===void 0&&(n={});var r=n,i=r.withTransform,a=i===void 0?!0:i,o=r.environment,s=o===void 0?window:o,c=r.withScrollbars,l=c===void 0?!0:c,u=zi(t.getBoundingClientRect()),d=new e(u);if(!a){var f=s.getComputedStyle(t),p=f.width,m=f.height,h=f.boxSizing,g=f.borderLeft,_=f.borderRight,v=f.borderTop,y=f.borderBottom,b=f.paddingLeft,x=f.paddingRight,S=f.paddingTop,C=f.paddingBottom,w=h===`border-box`?vi(p):Ri(p,g,_,b,x),T=h===`border-box`?vi(m):Ri(m,v,y,S,C);d=new e(ii({},d,{width:w,height:T}))}if(!l){var E=d.width-t.clientWidth,D=d.height-t.clientHeight;return d.substract({right:E,bottom:D})}return d},e.empty=function(){return new e},e.fromWindow=function(t){var n,r=(n=t?.document.scrollingElement)??t?.document.documentElement,i=r??{},a=i.clientWidth,o=a===void 0?0:a,s=i.clientHeight,c=s===void 0?0:s;return new e({width:o,height:c,right:o,bottom:c})};function e(e){return e===void 0&&(e={}),this.top=void 0,this.left=void 0,this.right=void 0,this.bottom=void 0,this.width=void 0,this.height=void 0,Object.assign(this,Bi,e)}var t=e.prototype;return t.toObject=function(){return zi(this)},t.merge=function(t){var n=this.toObject();return new e(ii({},n,typeof t==`function`?t(n):t))},t.substract=function(t){for(var n=this.toObject(),r=Object.entries(t),i=0,a=r;i<a.length;i++){var o=a[i],s=o[0],c=o[1];if(s in Pi){var l=Pi[s];n[s]+=l.factor(c),n[l.isHorizontal?`width`:`height`]-=c}else n[s]-=c||0}return new e(n)},t.offsetsTo=function(e){return new Li({top:e.top-this.top,bottom:this.bottom-e.bottom,left:e.left-this.left,right:this.right-e.right})},t.mapSides=function(t){for(var n=this.toObject(),r=Object.values(Pi),i=0,a=r;i<a.length;i++){var o=a[i];n[o.prop]=t(o,n[o.prop])}return new e(n)},ri(e,[{key:`surface`,get:function(){return this.width*this.height}}]),e}(),Hi=function(){function e(e,t,n,r,i){this.primary=void 0,this.secondary=void 0,this.offsets=void 0,this.subjectsBounds=void 0,this._cachedLayerBounds=null,this._cachedContainerOffsets=null,this.primary=e,this.secondary=t,this.offsets=i,this.setSubjectsBounds(n,r)}var t=e.prototype;return t.setSubjectsBounds=function(e,t){if(!t){this.subjectsBounds=e;return}var n=typeof t==`function`?t(this.primary.prop):t;this.subjectsBounds=e.merge({layer:ii({},e.layer,n)})},t.getLayerBounds=function(e){if(e===void 0&&(e=0),this._cachedLayerBounds&&e===0)return this._cachedLayerBounds;var t=this.primary,n=this.secondary,r=this.subjectsBounds,i=r.trigger,a=r.layer,o=r.arrow,s=t.isHorizontal,c=t.oppositeCssProp,l=t.oppositeSizeProp,u=t.prop,d=t.opposite,f=Vi.empty();f[d.prop]=i[u]-t.factor(this.offsets.trigger),f[u]=f[d.prop]-t.factor(a[t.sizeProp]);var p=this.offsets.arrow*2,m=i[c]-(a[l]-o[l])+p,h=i[c]+(i[l]-o[l])-p;if(n.isPush||(m+=a[l],h+=a[l]),n.isCenter){var g=(s?Pi.top:Pi.left).prop,_=(s?Pi.bottom:Pi.right).prop;f[g]=yi(i[g]+i[l]/2-a[l]/2+e,m,h),f[_]=f[g]+a[l]}else{var v=n,y=i[v.prop],b=y<m?m-y:y>h?h-y:0;f[v.prop]=yi(y+e+b,m,h),f[v.opposite.prop]=f[v.prop]+n.factor(a[l])}f.width=f.right-f.left,f.height=f.bottom-f.top;var x=Vi.create(f);return e===0&&(this._cachedLayerBounds=x),x},t.getLayerCollisionBounds=function(){var e=this.offsets.container;return this.getLayerBounds().mapSides(function(t,n){return n-=t.factor(e)}).merge(function(t){var n=t.width,r=t.height;return{width:n+e*2,height:r+e*2}})},t.getContainerOffsets=function(e){if(this._cachedContainerOffsets&&!e)return this._cachedContainerOffsets;var t=this.subjectsBounds.merge({layer:e||this.getLayerCollisionBounds()}),n=Li.mergeSmallestSides(t.layerOffsetsToScrollContainers);return e||(this._cachedContainerOffsets=n),n},ri(e,[{key:`type`,get:function(){return this.primary.prop+`-`+(this.secondary.prop===`center`?`center`:[`bottom`,`right`].includes(this.secondary.prop)?`end`:`start`)}},{key:`triggerIsBigger`,get:function(){var e=this.secondary.isHorizontal,t=this.subjectsBounds,n=t.triggerHasBiggerWidth,r=t.triggerHasBiggerHeight;return e&&n||!e&&r}},{key:`fitsContainer`,get:function(){return this.getContainerOffsets().allSidesArePositive}},{key:`visibleSurface`,get:function(){var e=this.getLayerBounds(),t=this.getContainerOffsets(e),n=t.negativeSides;for(var r in n)n[r]=-n[r];return e.substract(n).surface}},{key:`secondaryOffsetSide`,get:function(){var e,t,n=this,r=this.getContainerOffsets(),i=(e=(t=Object.entries(r.negativeSides).map(function(e){var t=e[0],n=e[1];return[Pi[t],n]}).filter(function(e){var t=e[0];return n.primary.isOppositeDirection(t)}).sort(function(e,t){var n=e[1],r=t[1];return r-n}))?.[0])??[],a=i[0];return a||null}}]),e}(),Ui=function(e){ai(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.getLayerBounds=function(){var e=this.subjectsBounds,t=e.trigger,n=e.layer,r=Vi.empty();return r.top=t.top+t.height/2-n.height/2,r.bottom=r.top+n.height,r.left=t.left+t.width/2-n.width/2,r.right=r.left+n.width,r.width=r.right-r.left,r.height=r.bottom-r.top,r},t}(Hi);function Wi(e,t,n){var r=e.layer,i=e.trigger,a=e.arrow,o=t.primary.oppositeSizeProp,s=t.primary.isHorizontal?[`top`,`bottom`]:[`left`,`right`],c=s[0],l=s[1],u=r[c]+r[o]/2-i[c]-a[o]/2-n,d=r[l]-r[o]/2-i[l]+a[o]/2+n;return(u<0?-u:0)+(d>0?-d:0)}var Gi={position:`absolute`,willChange:`top, left`,left:null,right:null,top:null,bottom:null};function Ki(e,t,n){var r;if(t.primary.isCenter)return Gi;var i=e.layer,a=e.trigger,o=e.arrow,s=t.primary.oppositeSizeProp,c=a[s]>i[s],l=n+o[s]/2,u=i[s]-o[s]/2-n,d=Wi(e,t,n),f=t.primary.prop,p=t.primary.oppositeCssProp,m=c?i[s]/2+d:a[p]+a[s]/2-i[p];return ii({},Gi,(r={},r[f]=`100%`,r[p]=yi(m,l,u),r))}var qi=function(){function e(e,t,n){this.placements=void 0,this.config=void 0,this.subjectsBounds=void 0,this.placements=e,this.config=t,this.subjectsBounds=n}e.getSidesFromPlacementType=function(e){var t=e.split(`-`),n=t[0],r=t[1],i=Pi[n],a;return a=r===`center`?Fi.center:i.isHorizontal?r===`start`?Fi.top:Fi.bottom:r===`start`?Fi.left:Fi.right,[i,a]},e.create=function(t,n){var r={arrow:n.arrowOffset,container:n.containerOffset,trigger:n.triggerOffset};function i(i){i===void 0&&(i=n.placement);var a=e.getSidesFromPlacementType(i),o=a[0],s=a[1],c=Pi[o.isHorizontal?n.preferY:n.preferX],l=!o.isHorizontal&&t.triggerHasBiggerWidth||o.isHorizontal&&t.triggerHasBiggerHeight;function u(e,i){return new Hi(e,i,t,n.layerDimensions,r)}var d=[];return d[0]=u(o,s),d[1]=u(o,s.isCenter?c:Fi.center),d[2]=u(o,Fi[(s.opposite.isCenter?c.opposite:s.opposite).prop]),d[3]=u(c,l?o:Fi[o.opposite.prop]),d[4]=u(c,Fi.center),d[5]=u(c,l?Fi[o.opposite.prop]:o),d[6]=u(Pi[c.opposite.prop],l?o:Fi[o.opposite.prop]),d[7]=u(Pi[c.opposite.prop],Fi.center),d[8]=u(Pi[c.opposite.prop],l?Fi[o.opposite.prop]:o),d[9]=u(Pi[o.opposite.prop],s),d[10]=u(Pi[o.opposite.prop],s.isCenter?c:Fi.center),d[11]=u(Pi[o.opposite.prop],Fi[(s.opposite.isCenter?c.opposite:s.opposite).prop]),d=d.filter(function(e){return e.type===n.placement||n.possiblePlacements.includes(e.type)}),d}return n.placement===`center`?new e([new Ui(Fi.center,Fi.center,t,n.layerDimensions,r)].concat(i(n.preferY+`-`+n.preferX)),n,t):new e(i(),n,t)};var t=e.prototype;return t.filterPlacementsBySide=function(e){return this.placements.filter(function(t){return t.primary===e})},t.findFirstPlacementThatFits=function(){return this.placements.find(function(e){return e.fitsContainer})},t.placementWithBiggestVisibleSurface=function(){var e=this.placements.map(function(e){return{placement:e,surface:e.visibleSurface}}).sort(function(e,t){return t.surface-e.surface}),t=e[0].placement;return t},t.findSuitablePlacement=function(){return this.config.auto?this.findFirstPlacementThatFits()||this.placementWithBiggestVisibleSurface():this.placements[0]},t.getSecondaryOffset=function(e){var t=this.config,n=t.auto,r=t.snap;if(!n||r||e instanceof Ui)return 0;var i=this.filterPlacementsBySide(e.primary),a=i.indexOf(e)===0;if(a&&e.fitsContainer)return 0;var o=i.find(function(e){return!e.fitsContainer});if(!o)return 0;var s=o.secondaryOffsetSide;if(!s)return 0;var c=e.getContainerOffsets(),l=e.secondary,u;u=e.triggerIsBigger||o===e?s.isPush?-1:1:l===Fi.left||[Fi.top,Fi.center].includes(l)&&s.isPush?-1:1;var d=c[s.prop];return d*u},t.getStyles=function(e,t,n,r){var i={willChange:`top, left, width, height`},a=Ki(this.subjectsBounds.merge({layer:e}),t,this.config.arrowOffset),o=this.config.overflowContainer?ii({},i,{position:`fixed`,top:e.top,left:e.left}):ii({},i,{position:`absolute`,top:e.top-this.subjectsBounds.parent.top+n.top-r.top,left:e.left-this.subjectsBounds.parent.left+n.left-r.left});return{arrow:a,layer:o}},t.getHasDisappeared=function(e){var t=this.config.overflowContainer?this.subjectsBounds.trigger:e,n=Li.mergeSmallestSides(this.subjectsBounds.offsetsToScrollContainers(t,!0)),r=Object.entries(n.negativeSides),i=r.some(function(e){var n=e[0],r=e[1],i=Pi[n];return r<=-t[i.sizeProp]});return i?`full`:n.allSidesArePositive?null:`partial`},t.result=function(e,t){var n=this.findSuitablePlacement(),r=this.getSecondaryOffset(n),i=n.getLayerBounds(r),a=this.getStyles(i,n,e,t),o=n.primary.prop;return{styles:a,layerSide:o,placement:n,layerBounds:i,hasDisappeared:this.getHasDisappeared(i)}},e}(),Ji=function(){function e(e,t){this.overflowContainer=void 0,this.trigger=void 0,this.layer=void 0,this.arrow=void 0,this.parent=void 0,this.window=void 0,this.scrollContainers=void 0,this.overflowContainer=t,Object.assign(this,e)}e.create=function(t,n,r,i,a,o,s,c){var l=Vi.fromWindow(t);return new e({layer:Vi.fromElement(n,{environment:t,withTransform:!1}),trigger:c?Vi.create(zi(c())):Vi.fromElement(r),arrow:a?Vi.fromElement(a):Vi.empty(),parent:i?Vi.fromElement(i):l,window:l,scrollContainers:[l].concat(o.map(function(e){return Vi.fromElement(e,{withScrollbars:!1})}))},s)};var t=e.prototype;return t.merge=function(t){return new e(ii({},this,t),this.overflowContainer)},t.offsetsToScrollContainers=function(e,t){t===void 0&&(t=!1);var n=this.overflowContainer&&!t?[this.window]:this.scrollContainers;return n.map(function(t){return t.offsetsTo(e)})},ri(e,[{key:`layerOffsetsToScrollContainers`,get:function(){return this.offsetsToScrollContainers(this.layer)}},{key:`triggerHasBiggerWidth`,get:function(){return this.trigger.width>this.layer.width}},{key:`triggerHasBiggerHeight`,get:function(){return this.trigger.height>this.layer.height}}]),e}(),Yi=null,Xi={auto:!1,arrowOffset:0,containerOffset:10,triggerOffset:0,overflowContainer:!0,placement:`top-center`,possiblePlacements:Ai,preferX:`right`,preferY:`bottom`,snap:!1,container:void 0,trigger:void 0};function Zi(e){var t,n=e.isOpen,r=n===void 0?!1:n,i=e.overflowContainer,a=i===void 0?Xi.overflowContainer:i,o=e.environment,s=o===void 0?typeof window<`u`?window:void 0:o,c=e.ResizeObserver,l=e.placement,u=l===void 0?Xi.placement:l,d=e.possiblePlacements,p=d===void 0?Xi.possiblePlacements:d,h=e.preferX,g=h===void 0?Xi.preferX:h,_=e.preferY,v=_===void 0?Xi.preferY:_,y=e.auto,b=y===void 0?Xi.auto:y,x=e.snap,S=x===void 0?Xi.snap:x,C=e.triggerOffset,w=C===void 0?Xi.triggerOffset:C,T=e.containerOffset,E=T===void 0?Xi.containerOffset:T,D=e.arrowOffset,O=D===void 0?Xi.arrowOffset:D,k=e.container,A=k===void 0?Xi.container:k,j=e.layerDimensions,M=j===void 0?null:j,N=e.onDisappear,P=e.onOutsideClick,ee=e.onParentClose,te=e.trigger,ne=(0,f.useState)(function(){return{layerSide:u===`center`?`center`:qi.getSidesFromPlacementType(u)[0].prop,styles:{layer:{position:a?`fixed`:`absolute`,top:0,left:0},arrow:{position:`absolute`,top:0,left:0}}}}),re=ne[0],ie=ne[1],ae=(0,f.useRef)(null),oe=hi(re,r),se=(0,f.useRef)({cancelled:!1});(0,f.useEffect)(function(){return function(){se.current.cancelled=!0}},[]);var ce=(0,f.useCallback)(function(e,t,n){var r=e.arrow,i=e.layer,o=e.scrollContainers,c=e.trigger,l=o[0],d=Ji.create(s,i,c,l,r,o,a,te?.getBounds),f={placement:u,possiblePlacements:p,auto:b,layerDimensions:M,arrowOffset:O,containerOffset:E,triggerOffset:w,preferX:g,preferY:v,snap:S,overflowContainer:a},m=qi.create(d,f).result(t,n),h=m.hasDisappeared,_=m.layerSide,y=m.styles,x={layerSide:_,styles:y};if(!oe.current||Qi(oe.current,x)){oe.current=x,se.current.cancelled=!0;var C={cancelled:!1};se.current=C,Promise.resolve().then(function(){C.cancelled||ie(x)})}bi(h)&&bi(N)&&N(h)},[O,b,E,s,M,N,a,u,p,g,v,S,w,oe,te]),le=Ti({ResizeObserverPolyfill:c,environment:s,enabled:r,overflowContainer:a,onChange:ce,triggerOption:te}),ue=le.triggerRef,de=le.layerRef,fe=le.arrowRef,pe=le.closestScrollContainer,me=ki({isOpen:r,onOutsideClick:P,onParentClose:ee}),he=me.closeOnOutsideClickRefs,ge=me.registrations,_e={triggerProps:te?{}:{ref:xi(ue,he.trigger,ae)},layerProps:{ref:xi(de,he.layer),style:re.styles.layer},arrowProps:{ref:fe,style:re.styles.arrow,layerSide:re.layerSide},layerSide:re.layerSide,triggerBounds:r?te?te.getBounds():(t=ae.current)?.getBoundingClientRect():null,renderLayer:function(e){return typeof document<`u`?(0,m.createPortal)((0,f.createElement)(Di,{registrations:ge,children:e}),a||!pe?ea(A):pe):null}};return _e}function Qi(e,t){if(e.layerSide!==t.layerSide)return!0;for(var n=[`position`,`top`,`left`,`right`,`bottom`],r=0,i=n;r<i.length;r++){var a=i[r];if(e.styles.layer[a]!==t.styles.layer[a]||e.styles.arrow[a]!==t.styles.arrow[a])return!0}return!1}var $i=`layers`;function ea(e){var t;if(typeof e==`function`){if(t=e(),!t||!(t instanceof HTMLElement))throw Error(`react-laag: You've passed a function to the 'container' prop, but it returned no valid HTMLElement`)}else if(e instanceof HTMLElement)t=e;else if(typeof e==`string`){if(t=document.getElementById(e),!t)throw Error(`react-laag: You've passed element with id '`+e+`' to the 'container' prop, but it returned no valid HTMLElement`)}else if(Yi instanceof HTMLElement)return Yi;else t=document.getElementById($i),t||(t=document.createElement(`div`),t.id=$i,t.style.cssText=`
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0px;
|
|
15
|
+
left: 0px;
|
|
16
|
+
right: 0px;
|
|
17
|
+
`,document.body.appendChild(t));return t}var ta=[`size`,`angle`,`borderWidth`,`borderColor`,`roundness`,`backgroundColor`,`layerSide`,`style`],na=`left`,ra=`top`,ia=`bottom`,aa=`right`;function oa(e,t){return Math.tan(e*(Math.PI/180))*t}function sa(e,t,n,r){var i,a=(i={},i[ia]=`0 `+-r+` `+t+` `+e,i[ra]=`0 0 `+t+` `+(e+r),i[aa]=-r+` 0 `+e+` `+t,i[na]=`0 0 `+(e+r)+` `+t,i);return a[n.prop]}function ca(e,t,n,r,i){var a,o,s,c=r/10*e*2,l=(a={},a[ia]=[0,e],a[ra]=[0,0],a[aa]=[e,t],a[na]=[0,t],a)[n.prop].join(` `),u=n.isHorizontal?`V 0`:`H `+t,d=t/2,f=t/2+oa(i,e/8),p=e/8,m=(o={},o[ia]=[`C`,f,p,d+c,0,d,0],o[ra]=[`C`,f,e-p,d+c,e,d,e],o[aa]=[`C`,p,t-f,0,d-c,0,d],o[na]=[`C`,e-p,t-f,e,d-c,e,d],o)[n.prop].join(` `),h=t/2-oa(i,e/8),g=e/8,_=(s={},s[ia]=[`C`,d-c,0,h,g,l],s[ra]=[`C`,d-c,e,h,e-g,l],s[aa]=[`C`,0,d+c,g,t-h,l],s[na]=[`C`,e,d+c,e-g,t-h,l],s)[n.prop].join(` `);return[`M`,l,u,m,_].join(` `)}function la(e,t,n,r,i){var a=oa(i,n),o=r.isPush?[0,n]:[e,e-n],s=o[0],c=o[1];return r.isHorizontal?[`M`,s,n,`V`,t-n,`L`,c,t-n-a,`V`,a+n,`Z`].join(` `):[`M`,n,s,`H`,t-n,`L`,t-n-a,c,`H`,a+n,`Z`].join(` `)}var ua=(0,f.forwardRef)(function(e,t){var n=e.size,r=n===void 0?8:n,i=e.angle,a=i===void 0?45:i,o=e.borderWidth,s=o===void 0?0:o,c=e.borderColor,l=c===void 0?`black`:c,u=e.roundness,d=u===void 0?0:u,p=e.backgroundColor,m=p===void 0?`white`:p,h=e.layerSide,g=h===void 0?`top`:h,_=e.style,v=_===void 0?{}:_,y=si(e,ta);if(g===`center`)return null;var b=Pi[g],x=r,S=oa(a,r)*2,C=Math.max(x,S);return(0,f.createElement)(`svg`,ii({ref:t},y,{style:ii({},v,{transform:`translate`+(b.isHorizontal?`Y`:`X`)+`(-50%)`}),width:C,height:C,preserveAspectRatio:b.isPush?`xMinYMin`:`xMaxYMax`,viewBox:sa(x,S,b,s)}),(0,f.createElement)(`path`,{fill:m,strokeWidth:s,stroke:l,d:ca(x,S,b,d,a)}),(0,f.createElement)(`path`,{fill:m,d:la(x,S,s,b,a)}))}),da;(function(e){e[e.ENTERING=0]=`ENTERING`,e[e.LEAVING=1]=`LEAVING`,e[e.IDLE=2]=`IDLE`})(da||={});function fa(e){var t=e===void 0?{}:e,n=t.delayEnter,r=n===void 0?0:n,i=t.delayLeave,a=i===void 0?0:i,o=t.hideOnScroll,s=o===void 0?!0:o,c=(0,f.useState)(!1),l=c[0],u=c[1],d=(0,f.useRef)(null),p=(0,f.useRef)(da.IDLE),m=(0,f.useRef)(!1),h=(0,f.useCallback)(function(){clearTimeout(d.current),d.current=null,p.current=da.IDLE},[]);function g(){p.current===da.LEAVING&&d.current&&h(),!l&&(p.current=da.ENTERING,d.current=window.setTimeout(function(){u(!0),d.current=null,p.current=da.IDLE},r))}function _(e,t){if(p.current===da.ENTERING&&d.current&&h(),l){if(t){u(!1),d.current=null,p.current=da.IDLE;return}p.current=da.LEAVING,d.current=window.setTimeout(function(){u(!1),d.current=null,p.current=da.IDLE},a)}}(0,f.useEffect)(function(){function e(){l&&s&&(h(),u(!1))}return window.addEventListener(`scroll`,e,!0),function(){window.removeEventListener(`scroll`,e,!0),d.current&&clearTimeout(d.current)}},[l,s,h]);var v={onMouseEnter:g,onMouseLeave:_,onTouchStart:function(){m.current=!1},onTouchMove:function(){m.current=!0},onTouchEnd:function(){!m.current&&!l&&u(!0),m.current=!1}};return[l,v,function(){return _(null,!0)}]}const pa=`_tooltip_wli9z_1`,ma=`_error_wli9z_15`,ha=`_warning_wli9z_19`;var ga={tooltip:`_tooltip_wli9z_1`,error:`_error_wli9z_15`,warning:`_warning_wli9z_19`},_a=u(h());const va=({text:e=``,error:t=!1,warning:n=!1,maxWidth:r=`none`,fontSize:i=`inherit`,padding:a=`var(--padding-xxs) var(--padding-xs)`,layerProps:o={style:{position:`fixed`}},arrowProps:s={style:{top:`100%`,bottom:void 0,left:`50%`,right:void 0,position:`absolute`}}})=>(0,p.jsxs)(`div`,{className:(0,_a.default)(ga.tooltip,t?ga.error:n?ga.warning:``),...o,children:[(0,p.jsx)(`div`,{style:{maxWidth:r,fontSize:i,padding:a},children:e}),(0,p.jsx)(ua,{...s,size:6})]}),ya=({children:e,text:t=``,error:n=!1,placement:r=`top-center`,possiblePlacements:i=[`top-center`,`left-center`,`bottom-center`,`right-center`],enabled:a=!0,warning:o=!1,maxWidth:s=`40em`,triggerOffset:c=12,fontSize:l=`inherit`,padding:u=`var(--padding-xxs) var(--padding-xs)`,display:d=`inline`,flex:m=`none`,forceOpen:h=!1})=>{let g=a&&((0,f.isValidElement)(t)||typeof t==`string`&&t.length>0||typeof t==`number`),[_,v,y]=fa({delayEnter:100,delayLeave:0}),b=g?h?!0:_:!1,{renderLayer:x,triggerProps:S,layerProps:C,arrowProps:w}=Zi({isOpen:b,overflowContainer:!0,ResizeObserver:Qr,auto:!0,triggerOffset:c,placement:r,possiblePlacements:i,onParentClose:y});return(0,p.jsxs)(p.Fragment,{children:[b&&x((0,p.jsx)(va,{text:t,error:n,warning:o,padding:u,maxWidth:s,fontSize:l,layerProps:C,arrowProps:w})),(0,p.jsx)(`span`,{...S,...v,style:{display:d,flex:m},onClick:()=>y(),children:e})]})},ba=`_helpIcon_hd0z2_1`,xa=`_active_hd0z2_9`,Sa=`_clickable_hd0z2_12`;var Ca={helpIcon:`_helpIcon_hd0z2_1`,active:`_active_hd0z2_9`,clickable:`_clickable_hd0z2_12`},wa=u(h());const Ta=({children:e,text:t,maxWidth:n})=>{let r=!!t;return r?(0,p.jsx)(ya,{text:t,display:`inline-flex`,maxWidth:n,children:e}):(0,p.jsx)(p.Fragment,{children:e})},Ea=({text:e,onClick:t,icon:n=`help`,active:r=!1,maxWidth:i=`300px`,testId:a})=>{let o=e=>{t&&(e.stopPropagation(),t())};return(0,p.jsx)(`div`,{className:(0,wa.default)(Ca.helpIcon,t?Ca.clickable:``,r?Ca.active:``),onClick:o,"data-testid":a,children:(0,p.jsx)(Ta,{text:e,maxWidth:i,children:(0,p.jsx)(er,{icon:n})})})};var Da=u(h());const Oa=({noMargin:e=!1,dataix:t=0,isInTable:n=!1,tabIndex:r=0,checked:i=!1,indeterminate:a=!1,name:o,label:s=``,disabled:c=!1,small:l=!1,onChange:u,testId:d,value:m,helpText:h,onClickHelp:g})=>{let _=(0,f.useContext)(Ie),v=h||g,y=c||_,b=(0,f.useRef)(null);return(0,f.useEffect)(()=>{b.current&&(b.current.indeterminate=a)},[a]),(0,p.jsxs)(`div`,{className:(0,Da.default)(Cr.checkbox,e&&Cr.noMargin,n&&Cr.isInTable,y&&Cr.disabled,l&&Cr.small,!s&&Cr.noLabel),"data-ix":t,onClick:e=>{if(!y){let t=e.target;t.name=o,t.checked=!i,u({...e,target:{...t,value:t.checked}})}},"data-testid":d,children:[(0,p.jsx)(`input`,{ref:b,type:`checkbox`,tabIndex:r,checked:i,name:o,onChange:()=>{},disabled:y,"data-indeterminate":a}),(0,p.jsxs)(`label`,{htmlFor:o,children:[(0,p.jsx)(`span`,{className:Cr.checkmark,children:(0,p.jsx)(er,{icon:S.CHECK})}),s]}),v&&(0,p.jsx)(`div`,{className:Cr.helpIconEnabled,onClick:g,children:(0,p.jsx)(Ea,{text:h})})]})},ka=`_bordered_1cgsf_1`,Aa=`_checkboxWrapper_1cgsf_7`,ja=`_padding_1cgsf_13`,Ma=`_contentWrapper_1cgsf_16`;var Na={bordered:`_bordered_1cgsf_1`,checkboxWrapper:`_checkboxWrapper_1cgsf_7`,padding:`_padding_1cgsf_13`,contentWrapper:`_contentWrapper_1cgsf_16`};let Pa=function(e){return e.TOGGLE_ACCORDION=`TOGGLE_ACCORDION`,e.TOGGLE_ENABLE=`TOGGLE_ENABLE`,e}({});var Fa=u(h());const Ia=(e,t)=>{switch(t.type){case Pa.TOGGLE_ACCORDION:return{...e,accordionExpanded:!e.accordionExpanded};case Pa.TOGGLE_ENABLE:return{...e,defaultEnabled:!e.defaultEnabled,accordionExpanded:e.defaultEnabled};default:return e}},La=({heading:e,toggleLabel:t,onClickDefaultToggle:n,expanded:r=!1,defaultEnabled:i=!0,padding:a=!0,children:o})=>{let[s,c]=(0,f.useReducer)(Ia,{accordionExpanded:r,defaultEnabled:i}),l=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{className:Na.checkboxWrapper,children:(0,p.jsx)(Oa,{label:t,onChange:e=>{c({type:Pa.TOGGLE_ENABLE}),n?.(e)},checked:s.defaultEnabled})}),s.accordionExpanded&&(0,p.jsx)(`div`,{className:Na.contentWrapper,children:o})]});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(gr,{heading:e,bordered:!0,expanded:s.accordionExpanded,squareBottom:!0,onClick:()=>c({type:Pa.TOGGLE_ACCORDION})}),(0,p.jsx)(`div`,{className:(0,Fa.default)(Na.bordered,a?Na.padding:``),children:l})]})};var Ra=s(((exports,t)=>{(function(){var n,r=`4.17.21`,i=200,a=`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`,o=`Expected a function`,s="Invalid `variable` option passed into `_.template`",c=`__lodash_hash_undefined__`,l=500,u=`__lodash_placeholder__`,d=1,f=2,p=4,m=1,h=2,g=1,_=2,v=4,y=8,b=16,x=32,S=64,C=128,w=256,T=512,E=30,D=`...`,O=800,k=16,A=1,j=2,M=3,N=1/0,P=9007199254740991,ee=17976931348623157e292,te=NaN,ne=4294967295,re=ne-1,ie=ne>>>1,ae=[[`ary`,C],[`bind`,g],[`bindKey`,_],[`curry`,y],[`curryRight`,b],[`flip`,T],[`partial`,x],[`partialRight`,S],[`rearg`,w]],oe=`[object Arguments]`,se=`[object Array]`,ce=`[object AsyncFunction]`,le=`[object Boolean]`,ue=`[object Date]`,de=`[object DOMException]`,fe=`[object Error]`,pe=`[object Function]`,me=`[object GeneratorFunction]`,he=`[object Map]`,ge=`[object Number]`,_e=`[object Null]`,ve=`[object Object]`,ye=`[object Promise]`,be=`[object Proxy]`,xe=`[object RegExp]`,Se=`[object Set]`,Ce=`[object String]`,we=`[object Symbol]`,Te=`[object Undefined]`,Ee=`[object WeakMap]`,De=`[object WeakSet]`,Oe=`[object ArrayBuffer]`,ke=`[object DataView]`,Ae=`[object Float32Array]`,je=`[object Float64Array]`,Me=`[object Int8Array]`,Ne=`[object Int16Array]`,Pe=`[object Int32Array]`,Fe=`[object Uint8Array]`,Ie=`[object Uint8ClampedArray]`,Le=`[object Uint16Array]`,Re=`[object Uint32Array]`,ze=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,Ve=/(__e\(.*?\)|\b__t\)) \+\n'';/g,He=/&(?:amp|lt|gt|quot|#39);/g,Ue=/[&<>"']/g,We=RegExp(He.source),Ge=RegExp(Ue.source),Ke=/<%-([\s\S]+?)%>/g,F=/<%([\s\S]+?)%>/g,qe=/<%=([\s\S]+?)%>/g,Je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ye=/^\w*$/,Xe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ze=/[\\^$.*+?()[\]{}|]/g,Qe=RegExp(Ze.source),$e=/^\s+/,et=/\s/,tt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,nt=/\{\n\/\* \[wrapped with (.+)\] \*/,rt=/,? & /,it=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,at=/[()=,{}\[\]\/\s]/,ot=/\\(\\)?/g,st=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ct=/\w*$/,lt=/^[-+]0x[0-9a-f]+$/i,ut=/^0b[01]+$/i,dt=/^\[object .+?Constructor\]$/,ft=/^0o[0-7]+$/i,pt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ht=/($^)/,gt=/['\n\r\u2028\u2029\\]/g,_t=`\\ud800-\\udfff`,vt=`\\u0300-\\u036f`,yt=`\\ufe20-\\ufe2f`,bt=`\\u20d0-\\u20ff`,xt=vt+yt+bt,St=`\\u2700-\\u27bf`,Ct=`a-z\\xdf-\\xf6\\xf8-\\xff`,wt=`\\xac\\xb1\\xd7\\xf7`,Tt=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,Et=`\\u2000-\\u206f`,Dt=` \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000`,Ot=`A-Z\\xc0-\\xd6\\xd8-\\xde`,kt=`\\ufe0e\\ufe0f`,At=wt+Tt+Et+Dt,jt=`['’]`,Mt=`[`+_t+`]`,Nt=`[`+At+`]`,Pt=`[`+xt+`]`,Ft=`\\d+`,It=`[`+St+`]`,Lt=`[`+Ct+`]`,Rt=`[^`+_t+At+Ft+St+Ct+Ot+`]`,zt=`\\ud83c[\\udffb-\\udfff]`,Bt=`(?:`+Pt+`|`+zt+`)`,Vt=`[^`+_t+`]`,Ht=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Ut=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Wt=`[`+Ot+`]`,Gt=`\\u200d`,Kt=`(?:`+Lt+`|`+Rt+`)`,qt=`(?:`+Wt+`|`+Rt+`)`,Jt=`(?:`+jt+`(?:d|ll|m|re|s|t|ve))?`,Yt=`(?:`+jt+`(?:D|LL|M|RE|S|T|VE))?`,Xt=Bt+`?`,Zt=`[`+kt+`]?`,Qt=`(?:`+Gt+`(?:`+[Vt,Ht,Ut].join(`|`)+`)`+Zt+Xt+`)*`,$t=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,en=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,tn=Zt+Xt+Qt,nn=`(?:`+[It,Ht,Ut].join(`|`)+`)`+tn,rn=`(?:`+[Vt+Pt+`?`,Pt,Ht,Ut,Mt].join(`|`)+`)`,an=RegExp(jt,`g`),on=RegExp(Pt,`g`),sn=RegExp(zt+`(?=`+zt+`)|`+rn+tn,`g`),cn=RegExp([Wt+`?`+Lt+`+`+Jt+`(?=`+[Nt,Wt,`$`].join(`|`)+`)`,qt+`+`+Yt+`(?=`+[Nt,Wt+Kt,`$`].join(`|`)+`)`,Wt+`?`+Kt+`+`+Jt,Wt+`+`+Yt,en,$t,Ft,nn].join(`|`),`g`),ln=RegExp(`[`+Gt+_t+xt+kt+`]`),un=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dn=`Array.Buffer.DataView.Date.Error.Float32Array.Float64Array.Function.Int8Array.Int16Array.Int32Array.Map.Math.Object.Promise.RegExp.Set.String.Symbol.TypeError.Uint8Array.Uint8ClampedArray.Uint16Array.Uint32Array.WeakMap._.clearTimeout.isFinite.parseInt.setTimeout`.split(`.`),fn=-1,pn={};pn[Ae]=pn[je]=pn[Me]=pn[Ne]=pn[Pe]=pn[Fe]=pn[Ie]=pn[Le]=pn[Re]=!0,pn[oe]=pn[se]=pn[Oe]=pn[le]=pn[ke]=pn[ue]=pn[fe]=pn[pe]=pn[he]=pn[ge]=pn[ve]=pn[xe]=pn[Se]=pn[Ce]=pn[Ee]=!1;var mn={};mn[oe]=mn[se]=mn[Oe]=mn[ke]=mn[le]=mn[ue]=mn[Ae]=mn[je]=mn[Me]=mn[Ne]=mn[Pe]=mn[he]=mn[ge]=mn[ve]=mn[xe]=mn[Se]=mn[Ce]=mn[we]=mn[Fe]=mn[Ie]=mn[Le]=mn[Re]=!0,mn[fe]=mn[pe]=mn[Ee]=!1;var hn={À:`A`,Á:`A`,Â:`A`,Ã:`A`,Ä:`A`,Å:`A`,à:`a`,á:`a`,â:`a`,ã:`a`,ä:`a`,å:`a`,Ç:`C`,ç:`c`,Ð:`D`,ð:`d`,È:`E`,É:`E`,Ê:`E`,Ë:`E`,è:`e`,é:`e`,ê:`e`,ë:`e`,Ì:`I`,Í:`I`,Î:`I`,Ï:`I`,ì:`i`,í:`i`,î:`i`,ï:`i`,Ñ:`N`,ñ:`n`,Ò:`O`,Ó:`O`,Ô:`O`,Õ:`O`,Ö:`O`,Ø:`O`,ò:`o`,ó:`o`,ô:`o`,õ:`o`,ö:`o`,ø:`o`,Ù:`U`,Ú:`U`,Û:`U`,Ü:`U`,ù:`u`,ú:`u`,û:`u`,ü:`u`,Ý:`Y`,ý:`y`,ÿ:`y`,Æ:`Ae`,æ:`ae`,Þ:`Th`,þ:`th`,ß:`ss`,Ā:`A`,Ă:`A`,Ą:`A`,ā:`a`,ă:`a`,ą:`a`,Ć:`C`,Ĉ:`C`,Ċ:`C`,Č:`C`,ć:`c`,ĉ:`c`,ċ:`c`,č:`c`,Ď:`D`,Đ:`D`,ď:`d`,đ:`d`,Ē:`E`,Ĕ:`E`,Ė:`E`,Ę:`E`,Ě:`E`,ē:`e`,ĕ:`e`,ė:`e`,ę:`e`,ě:`e`,Ĝ:`G`,Ğ:`G`,Ġ:`G`,Ģ:`G`,ĝ:`g`,ğ:`g`,ġ:`g`,ģ:`g`,Ĥ:`H`,Ħ:`H`,ĥ:`h`,ħ:`h`,Ĩ:`I`,Ī:`I`,Ĭ:`I`,Į:`I`,İ:`I`,ĩ:`i`,ī:`i`,ĭ:`i`,į:`i`,ı:`i`,Ĵ:`J`,ĵ:`j`,Ķ:`K`,ķ:`k`,ĸ:`k`,Ĺ:`L`,Ļ:`L`,Ľ:`L`,Ŀ:`L`,Ł:`L`,ĺ:`l`,ļ:`l`,ľ:`l`,ŀ:`l`,ł:`l`,Ń:`N`,Ņ:`N`,Ň:`N`,Ŋ:`N`,ń:`n`,ņ:`n`,ň:`n`,ŋ:`n`,Ō:`O`,Ŏ:`O`,Ő:`O`,ō:`o`,ŏ:`o`,ő:`o`,Ŕ:`R`,Ŗ:`R`,Ř:`R`,ŕ:`r`,ŗ:`r`,ř:`r`,Ś:`S`,Ŝ:`S`,Ş:`S`,Š:`S`,ś:`s`,ŝ:`s`,ş:`s`,š:`s`,Ţ:`T`,Ť:`T`,Ŧ:`T`,ţ:`t`,ť:`t`,ŧ:`t`,Ũ:`U`,Ū:`U`,Ŭ:`U`,Ů:`U`,Ű:`U`,Ų:`U`,ũ:`u`,ū:`u`,ŭ:`u`,ů:`u`,ű:`u`,ų:`u`,Ŵ:`W`,ŵ:`w`,Ŷ:`Y`,ŷ:`y`,Ÿ:`Y`,Ź:`Z`,Ż:`Z`,Ž:`Z`,ź:`z`,ż:`z`,ž:`z`,IJ:`IJ`,ij:`ij`,Œ:`Oe`,œ:`oe`,ʼn:`'n`,ſ:`s`},gn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},_n={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`},vn={"\\":`\\`,"'":`'`,"\n":`n`,"\r":`r`,"\u2028":`u2028`,"\u2029":`u2029`},yn=parseFloat,bn=parseInt,xn=typeof global==`object`&&global&&global.Object===Object&&global,Sn=typeof self==`object`&&self&&self.Object===Object&&self,Cn=xn||Sn||Function(`return this`)(),wn=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Tn=wn&&typeof t==`object`&&t&&!t.nodeType&&t,En=Tn&&Tn.exports===wn,Dn=En&&xn.process,On=function(){try{var e=Tn&&Tn.require&&Tn.require(`util`).types;return e||Dn&&Dn.binding&&Dn.binding(`util`)}catch{}}(),kn=On&&On.isArrayBuffer,An=On&&On.isDate,jn=On&&On.isMap,Mn=On&&On.isRegExp,Nn=On&&On.isSet,Pn=On&&On.isTypedArray;function Fn(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function In(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function Ln(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Rn(e,t){for(var n=e==null?0:e.length;n--&&t(e[n],n,e)!==!1;);return e}function zn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Bn(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Vn(e,t){var n=e==null?0:e.length;return!!n&&$n(e,t,0)>-1}function Hn(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Un(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Wn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Gn(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Kn(e,t,n,r){var i=e==null?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function qn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Jn=rr(`length`);function Yn(e){return e.split(``)}function Xn(e){return e.match(it)||[]}function Zn(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Qn(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function $n(e,t,n){return t===t?Dr(e,t,n):Qn(e,tr,n)}function er(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function tr(e){return e!==e}function nr(e,t){var n=e==null?0:e.length;return n?sr(e,t)/n:te}function rr(e){return function(t){return t==null?n:t[e]}}function ir(e){return function(t){return e==null?n:e[t]}}function ar(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function or(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function sr(e,t){for(var r,i=-1,a=e.length;++i<a;){var o=t(e[i]);o!==n&&(r=r===n?o:r+o)}return r}function cr(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function lr(e,t){return Un(t,function(t){return[t,e[t]]})}function ur(e){return e&&e.slice(0,jr(e)+1).replace($e,``)}function dr(e){return function(t){return e(t)}}function fr(e,t){return Un(t,function(t){return e[t]})}function pr(e,t){return e.has(t)}function mr(e,t){for(var n=-1,r=e.length;++n<r&&$n(t,e[n],0)>-1;);return n}function hr(e,t){for(var n=e.length;n--&&$n(t,e[n],0)>-1;);return n}function gr(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var eee=ir(hn),tee=ir(gn);function _r(e){return`\\`+vn[e]}function vr(e,t){return e==null?n:e[t]}function yr(e){return ln.test(e)}function br(e){return un.test(e)}function xr(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Sr(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Cr(e,t){return function(n){return e(t(n))}}function wr(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];(o===t||o===u)&&(e[n]=u,a[i++]=n)}return a}function Tr(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function Er(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Dr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Or(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function kr(e){return yr(e)?Nr(e):Jn(e)}function Ar(e){return yr(e)?Pr(e):Yn(e)}function jr(e){for(var t=e.length;t--&&et.test(e.charAt(t)););return t}var Mr=ir(_n);function Nr(e){for(var t=sn.lastIndex=0;sn.test(e);)++t;return t}function Pr(e){return e.match(sn)||[]}function Fr(e){return e.match(cn)||[]}var Ir=(function e(t){t=t==null?Cn:Lr.defaults(Cn.Object(),t,Lr.pick(Cn,dn));var et=t.Array,it=t.Date,_t=t.Error,vt=t.Function,yt=t.Math,bt=t.Object,xt=t.RegExp,St=t.String,Ct=t.TypeError,wt=et.prototype,Tt=vt.prototype,Et=bt.prototype,Dt=t[`__core-js_shared__`],Ot=Tt.toString,kt=Et.hasOwnProperty,At=0,jt=function(){var e=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),Mt=Et.toString,Nt=Ot.call(bt),Pt=Cn._,Ft=xt(`^`+Ot.call(kt).replace(Ze,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),It=En?t.Buffer:n,Lt=t.Symbol,Rt=t.Uint8Array,zt=It?It.allocUnsafe:n,Bt=Cr(bt.getPrototypeOf,bt),Vt=bt.create,Ht=Et.propertyIsEnumerable,Ut=wt.splice,Wt=Lt?Lt.isConcatSpreadable:n,Gt=Lt?Lt.iterator:n,Kt=Lt?Lt.toStringTag:n,qt=function(){try{var e=rs(bt,`defineProperty`);return e({},``,{}),e}catch{}}(),Jt=t.clearTimeout!==Cn.clearTimeout&&t.clearTimeout,Yt=it&&it.now!==Cn.Date.now&&it.now,Xt=t.setTimeout!==Cn.setTimeout&&t.setTimeout,Zt=yt.ceil,Qt=yt.floor,$t=bt.getOwnPropertySymbols,en=It?It.isBuffer:n,tn=t.isFinite,nn=wt.join,rn=Cr(bt.keys,bt),sn=yt.max,cn=yt.min,ln=it.now,un=t.parseInt,hn=yt.random,gn=wt.reverse,_n=rs(t,`DataView`),vn=rs(t,`Map`),xn=rs(t,`Promise`),Sn=rs(t,`Set`),wn=rs(t,`WeakMap`),Tn=rs(bt,`create`),Dn=wn&&new wn,On={},Jn=Gs(_n),Yn=Gs(vn),ir=Gs(xn),Dr=Gs(Sn),Nr=Gs(wn),Pr=Lt?Lt.prototype:n,Ir=Pr?Pr.valueOf:n,Rr=Pr?Pr.toString:n;function I(e){if(Pu(e)&&!_u(e)&&!(e instanceof Hr)){if(e instanceof Vr)return e;if(kt.call(e,`__wrapped__`))return qs(e)}return new Vr(e)}var zr=function(){function e(){}return function(t){if(!Nu(t))return{};if(Vt)return Vt(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Br(){}function Vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}I.templateSettings={escape:Ke,evaluate:F,interpolate:qe,variable:``,imports:{_:I}},I.prototype=Br.prototype,I.prototype.constructor=I,Vr.prototype=zr(Br.prototype),Vr.prototype.constructor=Vr;function Hr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ne,this.__views__=[]}function Ur(){var e=new Hr(this.__wrapped__);return e.__actions__=vo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=vo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=vo(this.__views__),e}function Wr(){if(this.__filtered__){var e=new Hr(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Gr(){var e=this.__wrapped__.value(),t=this.__dir__,n=_u(e),r=t<0,i=n?e.length:0,a=ds(0,i,this.__views__),o=a.start,s=a.end,c=s-o,l=r?s:o-1,u=this.__iteratees__,d=u.length,f=0,p=cn(c,this.__takeCount__);if(!n||!r&&i==c&&p==c)return $a(e,this.__actions__);var m=[];outer:for(;c--&&f<p;){l+=t;for(var h=-1,g=e[l];++h<d;){var _=u[h],v=_.iteratee,y=_.type,b=v(g);if(y==j)g=b;else if(!b){if(y==A)continue outer;break outer}}m[f++]=g}return m}Hr.prototype=zr(Br.prototype),Hr.prototype.constructor=Hr;function Kr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qr(){this.__data__=Tn?Tn(null):{},this.size=0}function Jr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Yr(e){var t=this.__data__;if(Tn){var r=t[e];return r===c?n:r}return kt.call(t,e)?t[e]:n}function Xr(e){var t=this.__data__;return Tn?t[e]!==n:kt.call(t,e)}function Zr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tn&&t===n?c:t,this}Kr.prototype.clear=qr,Kr.prototype.delete=Jr,Kr.prototype.get=Yr,Kr.prototype.has=Xr,Kr.prototype.set=Zr;function Qr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $r(){this.__data__=[],this.size=0}function ei(e){var t=this.__data__,n=Ti(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ut.call(t,n,1),--this.size,!0}function ti(e){var t=this.__data__,r=Ti(t,e);return r<0?n:t[r][1]}function ni(e){return Ti(this.__data__,e)>-1}function ri(e,t){var n=this.__data__,r=Ti(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Qr.prototype.clear=$r,Qr.prototype.delete=ei,Qr.prototype.get=ti,Qr.prototype.has=ni,Qr.prototype.set=ri;function ii(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ai(){this.size=0,this.__data__={hash:new Kr,map:new(vn||Qr),string:new Kr}}function oi(e){var t=ts(this,e).delete(e);return this.size-=t?1:0,t}function si(e){return ts(this,e).get(e)}function ci(e){return ts(this,e).has(e)}function li(e,t){var n=ts(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}ii.prototype.clear=ai,ii.prototype.delete=oi,ii.prototype.get=si,ii.prototype.has=ci,ii.prototype.set=li;function ui(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ii;++t<n;)this.add(e[t])}function di(e){return this.__data__.set(e,c),this}function fi(e){return this.__data__.has(e)}ui.prototype.add=ui.prototype.push=di,ui.prototype.has=fi;function pi(e){var t=this.__data__=new Qr(e);this.size=t.size}function mi(){this.__data__=new Qr,this.size=0}function hi(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function gi(e){return this.__data__.get(e)}function _i(e){return this.__data__.has(e)}function vi(e,t){var n=this.__data__;if(n instanceof Qr){var r=n.__data__;if(!vn||r.length<i-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ii(r)}return n.set(e,t),this.size=n.size,this}pi.prototype.clear=mi,pi.prototype.delete=hi,pi.prototype.get=gi,pi.prototype.has=_i,pi.prototype.set=vi;function yi(e,t){var n=_u(e),r=!n&&gu(e),i=!n&&!r&&Su(e),a=!n&&!r&&!i&&Yu(e),o=n||r||i||a,s=o?cr(e.length,St):[],c=s.length;for(var l in e)(t||kt.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||ys(l,c)))&&s.push(l);return s}function bi(e){var t=e.length;return t?e[Ma(0,t-1)]:n}function xi(e,t){return Hs(vo(e),ji(t,0,e.length))}function Si(e){return Hs(vo(e))}function Ci(e,t,r){(r!==n&&!pu(e[t],r)||r===n&&!(t in e))&&ki(e,t,r)}function wi(e,t,r){var i=e[t];(!(kt.call(e,t)&&pu(i,r))||r===n&&!(t in e))&&ki(e,t,r)}function Ti(e,t){for(var n=e.length;n--;)if(pu(e[n][0],t))return n;return-1}function Ei(e,t,n,r){return Li(e,function(e,i,a){t(r,e,n(e),a)}),r}function Di(e,t){return e&&yo(t,Ad(t),e)}function Oi(e,t){return e&&yo(t,jd(t),e)}function ki(e,t,n){t==`__proto__`&&qt?qt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ai(e,t){for(var r=-1,i=t.length,a=et(i),o=e==null;++r<i;)a[r]=o?n:wd(e,t[r]);return a}function ji(e,t,r){return e===e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function Mi(e,t,r,i,a,o){var s,c=t&d,l=t&f,u=t&p;if(r&&(s=a?r(e,i,a,o):r(e)),s!==n)return s;if(!Nu(e))return e;var m=_u(e);if(m){if(s=ms(e),!c)return vo(e,s)}else{var h=us(e),g=h==pe||h==me;if(Su(e))return co(e,c);if(h==ve||h==oe||g&&!a){if(s=l||g?{}:hs(e),!c)return l?xo(e,Oi(s,e)):bo(e,Di(s,e))}else{if(!mn[h])return a?e:{};s=gs(e,h,c)}}o||=new pi;var _=o.get(e);if(_)return _;o.set(e,s),Ku(e)?e.forEach(function(n){s.add(Mi(n,t,r,n,e,o))}):Fu(e)&&e.forEach(function(n,i){s.set(i,Mi(n,t,r,i,e,o))});var v=u?l?Zo:Xo:l?jd:Ad,y=m?n:v(e);return Ln(y||e,function(n,i){y&&(i=n,n=e[i]),wi(s,i,Mi(n,t,r,i,e,o))}),s}function Ni(e){var t=Ad(e);return function(n){return Pi(n,e,t)}}function Pi(e,t,r){var i=r.length;if(e==null)return!i;for(e=bt(e);i--;){var a=r[i],o=t[a],s=e[a];if(s===n&&!(a in e)||!o(s))return!1}return!0}function Fi(e,t,r){if(typeof e!=`function`)throw new Ct(o);return Rs(function(){e.apply(n,r)},t)}function Ii(e,t,n,r){var a=-1,o=Vn,s=!0,c=e.length,l=[],u=t.length;if(!c)return l;n&&(t=Un(t,dr(n))),r?(o=Hn,s=!1):t.length>=i&&(o=pr,s=!1,t=new ui(t));outer:for(;++a<c;){var d=e[a],f=n==null?d:n(d);if(d=r||d!==0?d:0,s&&f===f){for(var p=u;p--;)if(t[p]===f)continue outer;l.push(d)}else o(t,f,r)||l.push(d)}return l}var Li=wo(Ki),Ri=wo(qi,!0);function zi(e,t){var n=!0;return Li(e,function(e,r,i){return n=!!t(e,r,i),n}),n}function Bi(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===n?s===s&&!Ju(s):r(s,c)))var c=s,l=o}return l}function Vi(e,t,r,i){var a=e.length;for(r=rd(r),r<0&&(r=-r>a?0:a+r),i=i===n||i>a?a:rd(i),i<0&&(i+=a),i=r>i?0:id(i);r<i;)e[r++]=t;return e}function Hi(e,t){var n=[];return Li(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Ui(e,t,n,r,i){var a=-1,o=e.length;for(n||=vs,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Ui(s,t-1,n,r,i):Wn(i,s):r||(i[i.length]=s)}return i}var Wi=To(),Gi=To(!0);function Ki(e,t){return e&&Wi(e,t,Ad)}function qi(e,t){return e&&Gi(e,t,Ad)}function Ji(e,t){return Bn(t,function(t){return Au(e[t])})}function Yi(e,t){t=io(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Ws(t[r++])];return r&&r==i?e:n}function Xi(e,t,n){var r=t(e);return _u(e)?r:Wn(r,n(e))}function Zi(e){return e==null?e===n?Te:_e:Kt&&Kt in bt(e)?ss(e):Ms(e)}function Qi(e,t){return e>t}function $i(e,t){return e!=null&&kt.call(e,t)}function ea(e,t){return e!=null&&t in bt(e)}function ta(e,t,n){return e>=cn(t,n)&&e<sn(t,n)}function na(e,t,r){for(var i=r?Hn:Vn,a=e[0].length,o=e.length,s=o,c=et(o),l=1/0,u=[];s--;){var d=e[s];s&&t&&(d=Un(d,dr(t))),l=cn(d.length,l),c[s]=!r&&(t||a>=120&&d.length>=120)?new ui(s&&d):n}d=e[0];var f=-1,p=c[0];outer:for(;++f<a&&u.length<l;){var m=d[f],h=t?t(m):m;if(m=r||m!==0?m:0,!(p?pr(p,h):i(u,h,r))){for(s=o;--s;){var g=c[s];if(!(g?pr(g,h):i(e[s],h,r)))continue outer}p&&p.push(h),u.push(m)}}return u}function ra(e,t,n,r){return Ki(e,function(e,i,a){t(r,n(e),i,a)}),r}function ia(e,t,r){t=io(t,e),e=Ps(e,t);var i=e==null?e:e[Ws(mc(t))];return i==null?n:Fn(i,e,r)}function aa(e){return Pu(e)&&Zi(e)==oe}function oa(e){return Pu(e)&&Zi(e)==Oe}function sa(e){return Pu(e)&&Zi(e)==ue}function ca(e,t,n,r,i){return e===t?!0:e==null||t==null||!Pu(e)&&!Pu(t)?e!==e&&t!==t:la(e,t,n,r,ca,i)}function la(e,t,n,r,i,a){var o=_u(e),s=_u(t),c=o?se:us(e),l=s?se:us(t);c=c==oe?ve:c,l=l==oe?ve:l;var u=c==ve,d=l==ve,f=c==l;if(f&&Su(e)){if(!Su(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new pi,o||Yu(e)?qo(e,t,n,r,i,a):aee(e,t,c,n,r,i,a);if(!(n&m)){var p=u&&kt.call(e,`__wrapped__`),h=d&&kt.call(t,`__wrapped__`);if(p||h){var g=p?e.value():e,_=h?t.value():t;return a||=new pi,i(g,_,n,r,a)}}return f?(a||=new pi,Jo(e,t,n,r,i,a)):!1}function ua(e){return Pu(e)&&us(e)==he}function da(e,t,r,i){var a=r.length,o=a,s=!i;if(e==null)return!o;for(e=bt(e);a--;){var c=r[a];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<o;){c=r[a];var l=c[0],u=e[l],d=c[1];if(s&&c[2]){if(u===n&&!(l in e))return!1}else{var f=new pi;if(i)var p=i(u,d,l,e,t,f);if(!(p===n?ca(d,u,m|h,i,f):p))return!1}}return!0}function fa(e){if(!Nu(e)||ws(e))return!1;var t=Au(e)?Ft:dt;return t.test(Gs(e))}function pa(e){return Pu(e)&&Zi(e)==xe}function ma(e){return Pu(e)&&us(e)==Se}function ha(e){return Pu(e)&&Mu(e.length)&&!!pn[Zi(e)]}function ga(e){return typeof e==`function`?e:e==null?Cf:typeof e==`object`?_u(e)?Sa(e[0],e[1]):xa(e):Nf(e)}function _a(e){if(!Es(e))return rn(e);var t=[];for(var n in bt(e))kt.call(e,n)&&n!=`constructor`&&t.push(n);return t}function va(e){if(!Nu(e))return js(e);var t=Es(e),n=[];for(var r in e)r==`constructor`&&(t||!kt.call(e,r))||n.push(r);return n}function ya(e,t){return e<t}function ba(e,t){var n=-1,r=yu(e)?et(e.length):[];return Li(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function xa(e){var t=ns(e);return t.length==1&&t[0][2]?Os(t[0][0],t[0][1]):function(n){return n===e||da(n,e,t)}}function Sa(e,t){return xs(e)&&Ds(t)?Os(Ws(e),t):function(r){var i=wd(r,e);return i===n&&i===t?Ed(r,e):ca(t,i,m|h)}}function Ca(e,t,r,i,a){e!==t&&Wi(t,function(o,s){if(a||=new pi,Nu(o))wa(e,t,s,r,Ca,i,a);else{var c=i?i(Is(e,s),o,s+``,e,t,a):n;c===n&&(c=o),Ci(e,s,c)}},jd)}function wa(e,t,r,i,a,o,s){var c=Is(e,r),l=Is(t,r),u=s.get(l);if(u){Ci(e,r,u);return}var d=o?o(c,l,r+``,e,t,s):n,f=d===n;if(f){var p=_u(l),m=!p&&Su(l),h=!p&&!m&&Yu(l);d=l,p||m||h?_u(c)?d=c:bu(c)?d=vo(c):m?(f=!1,d=co(l,!0)):h?(f=!1,d=po(l,!0)):d=[]:Uu(l)||gu(l)?(d=c,gu(c)?d=od(c):(!Nu(c)||Au(c))&&(d=hs(l))):f=!1}f&&(s.set(l,d),a(d,l,i,o,s),s.delete(l)),Ci(e,r,d)}function Ta(e,t){var r=e.length;if(r)return t+=t<0?r:0,ys(t,r)?e[t]:n}function Ea(e,t,n){t=t.length?Un(t,function(e){return _u(e)?function(t){return Yi(t,e.length===1?e[0]:e)}:e}):[Cf];var r=-1;t=Un(t,dr(L()));var i=ba(e,function(e,n,i){var a=Un(t,function(t){return t(e)});return{criteria:a,index:++r,value:e}});return or(i,function(e,t){return ho(e,t,n)})}function Da(e,t){return Oa(e,t,function(t,n){return Ed(e,n)})}function Oa(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Yi(e,o);n(s,o)&&Ra(a,io(o,e),s)}return a}function ka(e){return function(t){return Yi(t,e)}}function Aa(e,t,n,r){var i=r?er:$n,a=-1,o=t.length,s=e;for(e===t&&(t=vo(t)),n&&(s=Un(e,dr(n)));++a<o;)for(var c=0,l=t[a],u=n?n(l):l;(c=i(s,u,c,r))>-1;)s!==e&&Ut.call(s,c,1),Ut.call(e,c,1);return e}function ja(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;ys(i)?Ut.call(e,i,1):Xa(e,i)}}return e}function Ma(e,t){return e+Qt(hn()*(t-e+1))}function Na(e,t,n,r){for(var i=-1,a=sn(Zt((t-e)/(n||1)),0),o=et(a);a--;)o[r?a:++i]=e,e+=n;return o}function Pa(e,t){var n=``;if(!e||t<1||t>P)return n;do t%2&&(n+=e),t=Qt(t/2),t&&(e+=e);while(t);return n}function Fa(e,t){return zs(Ns(e,t,Cf),e+``)}function Ia(e){return bi(Jd(e))}function La(e,t){var n=Jd(e);return Hs(n,ji(t,0,n.length))}function Ra(e,t,r,i){if(!Nu(e))return e;t=io(t,e);for(var a=-1,o=t.length,s=o-1,c=e;c!=null&&++a<o;){var l=Ws(t[a]),u=r;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(a!=s){var d=c[l];u=i?i(d,l,c):n,u===n&&(u=Nu(d)?d:ys(t[a+1])?[]:{})}wi(c,l,u),c=c[l]}return e}var za=Dn?function(e,t){return Dn.set(e,t),e}:Cf,Ba=qt?function(e,t){return qt(e,`toString`,{configurable:!0,enumerable:!1,value:Sf(t),writable:!0})}:Cf;function Va(e){return Hs(Jd(e))}function Ha(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=et(i);++r<i;)a[r]=e[r+t];return a}function Ua(e,t){var n;return Li(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function Wa(e,t,n){var r=0,i=e==null?r:e.length;if(typeof t==`number`&&t===t&&i<=ie){for(;r<i;){var a=r+i>>>1,o=e[a];o!==null&&!Ju(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return Ga(e,t,Cf,n)}function Ga(e,t,r,i){var a=0,o=e==null?0:e.length;if(o===0)return 0;t=r(t);for(var s=t!==t,c=t===null,l=Ju(t),u=t===n;a<o;){var d=Qt((a+o)/2),f=r(e[d]),p=f!==n,m=f===null,h=f===f,g=Ju(f);if(s)var _=i||h;else _=u?h&&(i||p):c?h&&p&&(i||!m):l?h&&p&&!m&&(i||!g):m||g?!1:i?f<=t:f<t;_?a=d+1:o=d}return cn(o,re)}function Ka(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!pu(s,c)){var c=s;a[i++]=o===0?0:o}}return a}function qa(e){return typeof e==`number`?e:Ju(e)?te:+e}function Ja(e){if(typeof e==`string`)return e;if(_u(e))return Un(e,Ja)+``;if(Ju(e))return Rr?Rr.call(e):``;var t=e+``;return t==`0`&&1/e==-N?`-0`:t}function Ya(e,t,n){var r=-1,a=Vn,o=e.length,s=!0,c=[],l=c;if(n)s=!1,a=Hn;else if(o>=i){var u=t?null:ree(e);if(u)return Tr(u);s=!1,a=pr,l=new ui}else l=t?[]:c;outer:for(;++r<o;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,s&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue outer;t&&l.push(f),c.push(d)}else a(l,f,n)||(l!==c&&l.push(f),c.push(d))}return c}function Xa(e,t){return t=io(t,e),e=Ps(e,t),e==null||delete e[Ws(mc(t))]}function Za(e,t,n,r){return Ra(e,t,n(Yi(e,t)),r)}function Qa(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?Ha(e,r?0:a,r?a+1:i):Ha(e,r?a+1:0,r?i:a)}function $a(e,t){var n=e;return n instanceof Hr&&(n=n.value()),Gn(t,function(e,t){return t.func.apply(t.thisArg,Wn([e],t.args))},n)}function eo(e,t,n){var r=e.length;if(r<2)return r?Ya(e[0]):[];for(var i=-1,a=et(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=Ii(a[i]||o,e[s],t,n));return Ya(Ui(a,1),t,n)}function to(e,t,r){for(var i=-1,a=e.length,o=t.length,s={};++i<a;){var c=i<o?t[i]:n;r(s,e[i],c)}return s}function no(e){return bu(e)?e:[]}function ro(e){return typeof e==`function`?e:Cf}function io(e,t){return _u(e)?e:xs(e,t)?[e]:Us(cd(e))}var ao=Fa;function oo(e,t,r){var i=e.length;return r=r===n?i:r,!t&&r>=i?e:Ha(e,t,r)}var so=Jt||function(e){return Cn.clearTimeout(e)};function co(e,t){if(t)return e.slice();var n=e.length,r=zt?zt(n):new e.constructor(n);return e.copy(r),r}function lo(e){var t=new e.constructor(e.byteLength);return new Rt(t).set(new Rt(e)),t}function uo(e,t){var n=t?lo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function nee(e){var t=new e.constructor(e.source,ct.exec(e));return t.lastIndex=e.lastIndex,t}function fo(e){return Ir?bt(Ir.call(e)):{}}function po(e,t){var n=t?lo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function mo(e,t){if(e!==t){var r=e!==n,i=e===null,a=e===e,o=Ju(e),s=t!==n,c=t===null,l=t===t,u=Ju(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function ho(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=mo(i[r],a[r]);if(c){if(r>=s)return c;var l=n[r];return c*(l==`desc`?-1:1)}}return e.index-t.index}function go(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=sn(a-o,0),u=et(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function _o(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=sn(a-s,0),d=et(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d}function vo(e,t){var n=-1,r=e.length;for(t||=et(r);++n<r;)t[n]=e[n];return t}function yo(e,t,r,i){var a=!r;r||={};for(var o=-1,s=t.length;++o<s;){var c=t[o],l=i?i(r[c],e[c],c,r,e):n;l===n&&(l=e[c]),a?ki(r,c,l):wi(r,c,l)}return r}function bo(e,t){return yo(e,cs(e),t)}function xo(e,t){return yo(e,ls(e),t)}function So(e,t){return function(n,r){var i=_u(n)?In:Ei,a=t?t():{};return i(n,e,L(r,2),a)}}function Co(e){return Fa(function(t,r){var i=-1,a=r.length,o=a>1?r[a-1]:n,s=a>2?r[2]:n;for(o=e.length>3&&typeof o==`function`?(a--,o):n,s&&bs(r[0],r[1],s)&&(o=a<3?n:o,a=1),t=bt(t);++i<a;){var c=r[i];c&&e(t,c,i,o)}return t})}function wo(e,t){return function(n,r){if(n==null)return n;if(!yu(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=bt(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function To(e){return function(t,n,r){for(var i=-1,a=bt(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}function Eo(e,t,n){var r=t&g,i=ko(e);function a(){var t=this&&this!==Cn&&this instanceof a?i:e;return t.apply(r?n:this,arguments)}return a}function Do(e){return function(t){t=cd(t);var r=yr(t)?Ar(t):n,i=r?r[0]:t.charAt(0),a=r?oo(r,1).join(``):t.slice(1);return i[e]()+a}}function Oo(e){return function(t){return Gn(bf(tf(t).replace(an,``)),e,``)}}function ko(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zr(e.prototype),r=e.apply(n,t);return Nu(r)?r:n}}function Ao(e,t,r){var i=ko(e);function a(){for(var o=arguments.length,s=et(o),c=o,l=es(a);c--;)s[c]=arguments[c];var u=o<3&&s[0]!==l&&s[o-1]!==l?[]:wr(s,l);if(o-=u.length,o<r)return Vo(e,t,No,a.placeholder,n,s,u,n,n,r-o);var d=this&&this!==Cn&&this instanceof a?i:e;return Fn(d,this,s)}return a}function jo(e){return function(t,r,i){var a=bt(t);if(!yu(t)){var o=L(r,3);t=Ad(t),r=function(e){return o(a[e],e,a)}}var s=e(t,r,i);return s>-1?a[o?t[s]:s]:n}}function Mo(e){return Yo(function(t){var r=t.length,i=r,a=Vr.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if(typeof s!=`function`)throw new Ct(o);if(a&&!c&&$o(s)==`wrapper`)var c=new Vr([],!0)}for(i=c?i:r;++i<r;){s=t[i];var l=$o(s),u=l==`wrapper`?Qo(s):n;c=u&&Cs(u[0])&&u[1]==(C|y|x|w)&&!u[4].length&&u[9]==1?c[$o(u[0])].apply(c,u[3]):s.length==1&&Cs(s)?c[l]():c.thru(s)}return function(){var e=arguments,n=e[0];if(c&&e.length==1&&_u(n))return c.plant(n).value();for(var i=0,a=r?t[i].apply(this,e):n;++i<r;)a=t[i].call(this,a);return a}})}function No(e,t,r,i,a,o,s,c,l,u){var d=t&C,f=t&g,p=t&_,m=t&(y|b),h=t&T,v=p?n:ko(e);function x(){for(var n=arguments.length,g=et(n),_=n;_--;)g[_]=arguments[_];if(m)var y=es(x),b=gr(g,y);if(i&&(g=go(g,i,a,m)),o&&(g=_o(g,o,s,m)),n-=b,m&&n<u){var S=wr(g,y);return Vo(e,t,No,x.placeholder,r,g,S,c,l,u-n)}var C=f?r:this,w=p?C[e]:e;return n=g.length,c?g=Fs(g,c):h&&n>1&&g.reverse(),d&&l<n&&(g.length=l),this&&this!==Cn&&this instanceof x&&(w=v||ko(w)),w.apply(C,g)}return x}function Po(e,t){return function(n,r){return ra(n,e,t(r),{})}}function Fo(e,t){return function(r,i){var a;if(r===n&&i===n)return t;if(r!==n&&(a=r),i!==n){if(a===n)return i;typeof r==`string`||typeof i==`string`?(r=Ja(r),i=Ja(i)):(r=qa(r),i=qa(i)),a=e(r,i)}return a}}function Io(e){return Yo(function(t){return t=Un(t,dr(L())),Fa(function(n){var r=this;return e(t,function(e){return Fn(e,r,n)})})})}function Lo(e,t){t=t===n?` `:Ja(t);var r=t.length;if(r<2)return r?Pa(t,e):t;var i=Pa(t,Zt(e/kr(t)));return yr(t)?oo(Ar(i),0,e).join(``):i.slice(0,e)}function Ro(e,t,n,r){var i=t&g,a=ko(e);function o(){for(var t=-1,s=arguments.length,c=-1,l=r.length,u=et(l+s),d=this&&this!==Cn&&this instanceof o?a:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++t];return Fn(d,i?n:this,u)}return o}function zo(e){return function(t,r,i){return i&&typeof i!=`number`&&bs(t,r,i)&&(r=i=n),t=nd(t),r===n?(r=t,t=0):r=nd(r),i=i===n?t<r?1:-1:nd(i),Na(t,r,i,e)}}function Bo(e){return function(t,n){return typeof t==`string`&&typeof n==`string`||(t=ad(t),n=ad(n)),e(t,n)}}function Vo(e,t,r,i,a,o,s,c,l,u){var d=t&y,f=d?s:n,p=d?n:s,m=d?o:n,h=d?n:o;t|=d?x:S,t&=~(d?S:x),t&v||(t&=~(g|_));var b=[e,t,a,m,f,h,p,c,l,u],C=r.apply(n,b);return Cs(e)&&Ls(C,b),C.placeholder=i,Bs(C,e,t)}function Ho(e){var t=yt[e];return function(e,n){if(e=ad(e),n=n==null?0:cn(rd(n),292),n&&tn(e)){var r=(cd(e)+`e`).split(`e`),i=t(r[0]+`e`+(+r[1]+n));return r=(cd(i)+`e`).split(`e`),+(r[0]+`e`+(+r[1]-n))}return t(e)}}var ree=Sn&&1/Tr(new Sn([,-0]))[1]==N?function(e){return new Sn(e)}:Of;function Uo(e){return function(t){var n=us(t);return n==he?Sr(t):n==Se?Er(t):lr(t,e(t))}}function Wo(e,t,r,i,a,s,c,l){var u=t&_;if(!u&&typeof e!=`function`)throw new Ct(o);var d=i?i.length:0;if(d||(t&=~(x|S),i=a=n),c=c===n?c:sn(rd(c),0),l=l===n?l:rd(l),d-=a?a.length:0,t&S){var f=i,p=a;i=a=n}var m=u?n:Qo(e),h=[e,t,r,i,a,f,p,s,c,l];if(m&&As(h,m),e=h[0],t=h[1],r=h[2],i=h[3],a=h[4],l=h[9]=h[9]===n?u?0:e.length:sn(h[9]-d,0),!l&&t&(y|b)&&(t&=~(y|b)),!t||t==g)var v=Eo(e,t,r);else v=t==y||t==b?Ao(e,t,l):(t==x||t==(g|x))&&!a.length?Ro(e,t,r,i):No.apply(n,h);var C=m?za:Ls;return Bs(C(v,h),e,t)}function Go(e,t,r,i){return e===n||pu(e,Et[r])&&!kt.call(i,r)?t:e}function Ko(e,t,r,i,a,o){return Nu(e)&&Nu(t)&&(o.set(t,e),Ca(e,t,n,Ko,o),o.delete(t)),e}function iee(e){return Uu(e)?n:e}function qo(e,t,r,i,a,o){var s=r&m,c=e.length,l=t.length;if(c!=l&&!(s&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,g=r&h?new ui:n;for(o.set(e,t),o.set(t,e);++f<c;){var _=e[f],v=t[f];if(i)var y=s?i(v,_,f,t,e,o):i(_,v,f,e,t,o);if(y!==n){if(y)continue;p=!1;break}if(g){if(!qn(t,function(e,t){if(!pr(g,t)&&(_===e||a(_,e,r,i,o)))return g.push(t)})){p=!1;break}}else if(!(_===v||a(_,v,r,i,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function aee(e,t,n,r,i,a,o){switch(n){case ke:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Oe:return!(e.byteLength!=t.byteLength||!a(new Rt(e),new Rt(t)));case le:case ue:case ge:return pu(+e,+t);case fe:return e.name==t.name&&e.message==t.message;case xe:case Ce:return e==t+``;case he:var s=Sr;case Se:var c=r&m;if(s||=Tr,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=h,o.set(e,t);var u=qo(s(e),s(t),r,i,a,o);return o.delete(e),u;case we:if(Ir)return Ir.call(e)==Ir.call(t)}return!1}function Jo(e,t,r,i,a,o){var s=r&m,c=Xo(e),l=c.length,u=Xo(t),d=u.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var p=c[f];if(!(s?p in t:kt.call(t,p)))return!1}var h=o.get(e),g=o.get(t);if(h&&g)return h==t&&g==e;var _=!0;o.set(e,t),o.set(t,e);for(var v=s;++f<l;){p=c[f];var y=e[p],b=t[p];if(i)var x=s?i(b,y,p,t,e,o):i(y,b,p,e,t,o);if(!(x===n?y===b||a(y,b,r,i,o):x)){_=!1;break}v||=p==`constructor`}if(_&&!v){var S=e.constructor,C=t.constructor;S!=C&&`constructor`in e&&`constructor`in t&&!(typeof S==`function`&&S instanceof S&&typeof C==`function`&&C instanceof C)&&(_=!1)}return o.delete(e),o.delete(t),_}function Yo(e){return zs(Ns(e,n,sc),e+``)}function Xo(e){return Xi(e,Ad,cs)}function Zo(e){return Xi(e,jd,ls)}var Qo=Dn?function(e){return Dn.get(e)}:Of;function $o(e){for(var t=e.name+``,n=On[t],r=kt.call(On,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t}function es(e){var t=kt.call(I,`placeholder`)?I:e;return t.placeholder}function L(){var e=I.iteratee||wf;return e=e===wf?ga:e,arguments.length?e(arguments[0],arguments[1]):e}function ts(e,t){var n=e.__data__;return Ss(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function ns(e){for(var t=Ad(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ds(i)]}return t}function rs(e,t){var r=vr(e,t);return fa(r)?r:n}function ss(e){var t=kt.call(e,Kt),r=e[Kt];try{e[Kt]=n;var i=!0}catch{}var a=Mt.call(e);return i&&(t?e[Kt]=r:delete e[Kt]),a}var cs=$t?function(e){return e==null?[]:(e=bt(e),Bn($t(e),function(t){return Ht.call(e,t)}))}:Lf,ls=$t?function(e){for(var t=[];e;)Wn(t,cs(e)),e=Bt(e);return t}:Lf,us=Zi;(_n&&us(new _n(new ArrayBuffer(1)))!=ke||vn&&us(new vn)!=he||xn&&us(xn.resolve())!=ye||Sn&&us(new Sn)!=Se||wn&&us(new wn)!=Ee)&&(us=function(e){var t=Zi(e),r=t==ve?e.constructor:n,i=r?Gs(r):``;if(i)switch(i){case Jn:return ke;case Yn:return he;case ir:return ye;case Dr:return Se;case Nr:return Ee}return t});function ds(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case`drop`:e+=o;break;case`dropRight`:t-=o;break;case`take`:t=cn(t,e+o);break;case`takeRight`:e=sn(e,t-o);break}}return{start:e,end:t}}function fs(e){var t=e.match(nt);return t?t[1].split(rt):[]}function ps(e,t,n){t=io(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Ws(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Mu(i)&&ys(o,i)&&(_u(e)||gu(e)))}function ms(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&kt.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function hs(e){return typeof e.constructor==`function`&&!Es(e)?zr(Bt(e)):{}}function gs(e,t,n){var r=e.constructor;switch(t){case Oe:return lo(e);case le:case ue:return new r(+e);case ke:return uo(e,n);case Ae:case je:case Me:case Ne:case Pe:case Fe:case Ie:case Le:case Re:return po(e,n);case he:return new r;case ge:case Ce:return new r(e);case xe:return nee(e);case Se:return new r;case we:return fo(e)}}function _s(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(tt,`{
|
|
18
|
+
/* [wrapped with `+t+`] */
|
|
19
|
+
`)}function vs(e){return _u(e)||gu(e)||!!(Wt&&e&&e[Wt])}function ys(e,t){var n=typeof e;return t??=P,!!t&&(n==`number`||n!=`symbol`&&pt.test(e))&&e>-1&&e%1==0&&e<t}function bs(e,t,n){if(!Nu(n))return!1;var r=typeof t;return(r==`number`?yu(n)&&ys(t,n.length):r==`string`&&t in n)?pu(n[t],e):!1}function xs(e,t){if(_u(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||Ju(e)?!0:Ye.test(e)||!Je.test(e)||t!=null&&e in bt(t)}function Ss(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Cs(e){var t=$o(e),n=I[t];if(typeof n!=`function`||!(t in Hr.prototype))return!1;if(e===n)return!0;var r=Qo(n);return!!r&&e===r[0]}function ws(e){return!!jt&&jt in e}var Ts=Dt?Au:Rf;function Es(e){var t=e&&e.constructor,n=typeof t==`function`&&t.prototype||Et;return e===n}function Ds(e){return e===e&&!Nu(e)}function Os(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==n||e in bt(r))}}function ks(e){var t=Yl(e,function(e){return n.size===l&&n.clear(),e}),n=t.cache;return t}function As(e,t){var n=e[1],r=t[1],i=n|r,a=i<(g|_|C),o=r==C&&n==y||r==C&&n==w&&e[7].length<=t[8]||r==(C|w)&&t[7].length<=t[8]&&n==y;if(!(a||o))return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var s=t[3];if(s){var c=e[3];e[3]=c?go(c,s,t[4]):s,e[4]=c?wr(e[3],u):t[4]}return s=t[5],s&&(c=e[5],e[5]=c?_o(c,s,t[6]):s,e[6]=c?wr(e[5],u):t[6]),s=t[7],s&&(e[7]=s),r&C&&(e[8]=e[8]==null?t[8]:cn(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e}function js(e){var t=[];if(e!=null)for(var n in bt(e))t.push(n);return t}function Ms(e){return Mt.call(e)}function Ns(e,t,r){return t=sn(t===n?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=sn(n.length-t,0),o=et(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=et(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),Fn(e,this,s)}}function Ps(e,t){return t.length<2?e:Yi(e,Ha(t,0,-1))}function Fs(e,t){for(var r=e.length,i=cn(t.length,r),a=vo(e);i--;){var o=t[i];e[i]=ys(o,r)?a[o]:n}return e}function Is(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}var Ls=Vs(za),Rs=Xt||function(e,t){return Cn.setTimeout(e,t)},zs=Vs(Ba);function Bs(e,t,n){var r=t+``;return zs(e,_s(r,Ks(fs(r),n)))}function Vs(e){var t=0,r=0;return function(){var i=ln(),a=k-(i-r);if(r=i,a>0){if(++t>=O)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Hs(e,t){var r=-1,i=e.length,a=i-1;for(t=t===n?i:t;++r<t;){var o=Ma(r,a),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}var Us=ks(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Xe,function(e,n,r,i){t.push(r?i.replace(ot,`$1`):n||e)}),t});function Ws(e){if(typeof e==`string`||Ju(e))return e;var t=e+``;return t==`0`&&1/e==-N?`-0`:t}function Gs(e){if(e!=null){try{return Ot.call(e)}catch{}try{return e+``}catch{}}return``}function Ks(e,t){return Ln(ae,function(n){var r=`_.`+n[0];t&n[1]&&!Vn(e,r)&&e.push(r)}),e.sort()}function qs(e){if(e instanceof Hr)return e.clone();var t=new Vr(e.__wrapped__,e.__chain__);return t.__actions__=vo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Js(e,t,r){t=(r?bs(e,t,r):t===n)?1:sn(rd(t),0);var i=e==null?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,s=et(Zt(i/t));a<i;)s[o++]=Ha(e,a,a+=t);return s}function Ys(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}function Xs(){var e=arguments.length;if(!e)return[];for(var t=et(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Wn(_u(n)?vo(n):[n],Ui(t,1))}var Zs=Fa(function(e,t){return bu(e)?Ii(e,Ui(t,1,bu,!0)):[]}),Qs=Fa(function(e,t){var r=mc(t);return bu(r)&&(r=n),bu(e)?Ii(e,Ui(t,1,bu,!0),L(r,2)):[]}),$s=Fa(function(e,t){var r=mc(t);return bu(r)&&(r=n),bu(e)?Ii(e,Ui(t,1,bu,!0),n,r):[]});function ec(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:rd(t),Ha(e,t<0?0:t,i)):[]}function tc(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:rd(t),t=i-t,Ha(e,0,t<0?0:t)):[]}function nc(e,t){return e&&e.length?Qa(e,L(t,3),!0,!0):[]}function rc(e,t){return e&&e.length?Qa(e,L(t,3),!0):[]}function ic(e,t,n,r){var i=e==null?0:e.length;return i?(n&&typeof n!=`number`&&bs(e,t,n)&&(n=0,r=i),Vi(e,t,n,r)):[]}function ac(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:rd(n);return i<0&&(i=sn(r+i,0)),Qn(e,L(t,3),i)}function oc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i-1;return r!==n&&(a=rd(r),a=r<0?sn(i+a,0):cn(a,i-1)),Qn(e,L(t,3),a,!0)}function sc(e){var t=e==null?0:e.length;return t?Ui(e,1):[]}function cc(e){var t=e==null?0:e.length;return t?Ui(e,N):[]}function lc(e,t){var r=e==null?0:e.length;return r?(t=t===n?1:rd(t),Ui(e,t)):[]}function oee(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function uc(e){return e&&e.length?e[0]:n}function see(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:rd(n);return i<0&&(i=sn(r+i,0)),$n(e,t,i)}function cee(e){var t=e==null?0:e.length;return t?Ha(e,0,-1):[]}var lee=Fa(function(e){var t=Un(e,no);return t.length&&t[0]===e[0]?na(t):[]}),dc=Fa(function(e){var t=mc(e),r=Un(e,no);return t===mc(r)?t=n:r.pop(),r.length&&r[0]===e[0]?na(r,L(t,2)):[]}),fc=Fa(function(e){var t=mc(e),r=Un(e,no);return t=typeof t==`function`?t:n,t&&r.pop(),r.length&&r[0]===e[0]?na(r,n,t):[]});function pc(e,t){return e==null?``:nn.call(e,t)}function mc(e){var t=e==null?0:e.length;return t?e[t-1]:n}function hc(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var a=i;return r!==n&&(a=rd(r),a=a<0?sn(i+a,0):cn(a,i-1)),t===t?Or(e,t,a):Qn(e,tr,a,!0)}function gc(e,t){return e&&e.length?Ta(e,rd(t)):n}var _c=Fa(vc);function vc(e,t){return e&&e.length&&t&&t.length?Aa(e,t):e}function yc(e,t,n){return e&&e.length&&t&&t.length?Aa(e,t,L(n,2)):e}function bc(e,t,r){return e&&e.length&&t&&t.length?Aa(e,t,n,r):e}var xc=Yo(function(e,t){var n=e==null?0:e.length,r=Ai(e,t);return ja(e,Un(t,function(e){return ys(e,n)?+e:e}).sort(mo)),r});function Sc(e,t){var n=[];if(!(e&&e.length))return n;var r=-1,i=[],a=e.length;for(t=L(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return ja(e,i),n}function Cc(e){return e==null?e:gn.call(e)}function wc(e,t,r){var i=e==null?0:e.length;return i?(r&&typeof r!=`number`&&bs(e,t,r)?(t=0,r=i):(t=t==null?0:rd(t),r=r===n?i:rd(r)),Ha(e,t,r)):[]}function Tc(e,t){return Wa(e,t)}function Ec(e,t,n){return Ga(e,t,L(n,2))}function Dc(e,t){var n=e==null?0:e.length;if(n){var r=Wa(e,t);if(r<n&&pu(e[r],t))return r}return-1}function Oc(e,t){return Wa(e,t,!0)}function kc(e,t,n){return Ga(e,t,L(n,2),!0)}function Ac(e,t){var n=e==null?0:e.length;if(n){var r=Wa(e,t,!0)-1;if(pu(e[r],t))return r}return-1}function jc(e){return e&&e.length?Ka(e):[]}function Mc(e,t){return e&&e.length?Ka(e,L(t,2)):[]}function Nc(e){var t=e==null?0:e.length;return t?Ha(e,1,t):[]}function Pc(e,t,r){return e&&e.length?(t=r||t===n?1:rd(t),Ha(e,0,t<0?0:t)):[]}function Fc(e,t,r){var i=e==null?0:e.length;return i?(t=r||t===n?1:rd(t),t=i-t,Ha(e,t<0?0:t,i)):[]}function Ic(e,t){return e&&e.length?Qa(e,L(t,3),!1,!0):[]}function Lc(e,t){return e&&e.length?Qa(e,L(t,3)):[]}var Rc=Fa(function(e){return Ya(Ui(e,1,bu,!0))}),zc=Fa(function(e){var t=mc(e);return bu(t)&&(t=n),Ya(Ui(e,1,bu,!0),L(t,2))}),Bc=Fa(function(e){var t=mc(e);return t=typeof t==`function`?t:n,Ya(Ui(e,1,bu,!0),n,t)});function Vc(e){return e&&e.length?Ya(e):[]}function Hc(e,t){return e&&e.length?Ya(e,L(t,2)):[]}function Uc(e,t){return t=typeof t==`function`?t:n,e&&e.length?Ya(e,n,t):[]}function Wc(e){if(!(e&&e.length))return[];var t=0;return e=Bn(e,function(e){if(bu(e))return t=sn(e.length,t),!0}),cr(t,function(t){return Un(e,rr(t))})}function Gc(e,t){if(!(e&&e.length))return[];var r=Wc(e);return t==null?r:Un(r,function(e){return Fn(t,n,e)})}var Kc=Fa(function(e,t){return bu(e)?Ii(e,t):[]}),qc=Fa(function(e){return eo(Bn(e,bu))}),Jc=Fa(function(e){var t=mc(e);return bu(t)&&(t=n),eo(Bn(e,bu),L(t,2))}),Yc=Fa(function(e){var t=mc(e);return t=typeof t==`function`?t:n,eo(Bn(e,bu),n,t)}),Xc=Fa(Wc);function Zc(e,t){return to(e||[],t||[],wi)}function Qc(e,t){return to(e||[],t||[],Ra)}var $c=Fa(function(e){var t=e.length,r=t>1?e[t-1]:n;return r=typeof r==`function`?(e.pop(),r):n,Gc(e,r)});function el(e){var t=I(e);return t.__chain__=!0,t}function tl(e,t){return t(e),e}function nl(e,t){return t(e)}var rl=Yo(function(e){var t=e.length,r=t?e[0]:0,i=this.__wrapped__,a=function(t){return Ai(t,e)};return t>1||this.__actions__.length||!(i instanceof Hr)||!ys(r)?this.thru(a):(i=i.slice(r,+r+(t?1:0)),i.__actions__.push({func:nl,args:[a],thisArg:n}),new Vr(i,this.__chain__).thru(function(e){return t&&!e.length&&e.push(n),e}))});function il(){return el(this)}function al(){return new Vr(this.value(),this.__chain__)}function ol(){this.__values__===n&&(this.__values__=td(this.value()));var e=this.__index__>=this.__values__.length,t=e?n:this.__values__[this.__index__++];return{done:e,value:t}}function sl(){return this}function cl(e){for(var t,r=this;r instanceof Br;){var i=qs(r);i.__index__=0,i.__values__=n,t?a.__wrapped__=i:t=i;var a=i;r=r.__wrapped__}return a.__wrapped__=e,t}function ll(){var e=this.__wrapped__;if(e instanceof Hr){var t=e;return this.__actions__.length&&(t=new Hr(this)),t=t.reverse(),t.__actions__.push({func:nl,args:[Cc],thisArg:n}),new Vr(t,this.__chain__)}return this.thru(Cc)}function ul(){return $a(this.__wrapped__,this.__actions__)}var dl=So(function(e,t,n){kt.call(e,n)?++e[n]:ki(e,n,1)});function fl(e,t,r){var i=_u(e)?zn:zi;return r&&bs(e,t,r)&&(t=n),i(e,L(t,3))}function pl(e,t){var n=_u(e)?Bn:Hi;return n(e,L(t,3))}var ml=jo(ac),hl=jo(oc);function gl(e,t){return Ui(Tl(e,t),1)}function _l(e,t){return Ui(Tl(e,t),N)}function vl(e,t,r){return r=r===n?1:rd(r),Ui(Tl(e,t),r)}function yl(e,t){var n=_u(e)?Ln:Li;return n(e,L(t,3))}function bl(e,t){var n=_u(e)?Rn:Ri;return n(e,L(t,3))}var xl=So(function(e,t,n){kt.call(e,n)?e[n].push(t):ki(e,n,[t])});function Sl(e,t,n,r){e=yu(e)?e:Jd(e),n=n&&!r?rd(n):0;var i=e.length;return n<0&&(n=sn(i+n,0)),qu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&$n(e,t,n)>-1}var Cl=Fa(function(e,t,n){var r=-1,i=typeof t==`function`,a=yu(e)?et(e.length):[];return Li(e,function(e){a[++r]=i?Fn(t,e,n):ia(e,t,n)}),a}),wl=So(function(e,t,n){ki(e,n,t)});function Tl(e,t){var n=_u(e)?Un:ba;return n(e,L(t,3))}function El(e,t,r,i){return e==null?[]:(_u(t)||(t=t==null?[]:[t]),r=i?n:r,_u(r)||(r=r==null?[]:[r]),Ea(e,t,r))}var Dl=So(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Ol(e,t,n){var r=_u(e)?Gn:ar,i=arguments.length<3;return r(e,L(t,4),n,i,Li)}function kl(e,t,n){var r=_u(e)?Kn:ar,i=arguments.length<3;return r(e,L(t,4),n,i,Ri)}function Al(e,t){var n=_u(e)?Bn:Hi;return n(e,Xl(L(t,3)))}function jl(e){var t=_u(e)?bi:Ia;return t(e)}function Ml(e,t,r){t=(r?bs(e,t,r):t===n)?1:rd(t);var i=_u(e)?xi:La;return i(e,t)}function Nl(e){var t=_u(e)?Si:Va;return t(e)}function Pl(e){if(e==null)return 0;if(yu(e))return qu(e)?kr(e):e.length;var t=us(e);return t==he||t==Se?e.size:_a(e).length}function Fl(e,t,r){var i=_u(e)?qn:Ua;return r&&bs(e,t,r)&&(t=n),i(e,L(t,3))}var Il=Fa(function(e,t){if(e==null)return[];var n=t.length;return n>1&&bs(e,t[0],t[1])?t=[]:n>2&&bs(t[0],t[1],t[2])&&(t=[t[0]]),Ea(e,Ui(t,1),[])}),Ll=Yt||function(){return Cn.Date.now()};function Rl(e,t){if(typeof t!=`function`)throw new Ct(o);return e=rd(e),function(){if(--e<1)return t.apply(this,arguments)}}function zl(e,t,r){return t=r?n:t,t=e&&t==null?e.length:t,Wo(e,C,n,n,n,n,t)}function Bl(e,t){var r;if(typeof t!=`function`)throw new Ct(o);return e=rd(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var Vl=Fa(function(e,t,n){var r=g;if(n.length){var i=wr(n,es(Vl));r|=x}return Wo(e,r,t,n,i)}),Hl=Fa(function(e,t,n){var r=g|_;if(n.length){var i=wr(n,es(Hl));r|=x}return Wo(t,r,e,n,i)});function Ul(e,t,r){t=r?n:t;var i=Wo(e,y,n,n,n,n,n,t);return i.placeholder=Ul.placeholder,i}function Wl(e,t,r){t=r?n:t;var i=Wo(e,b,n,n,n,n,n,t);return i.placeholder=Wl.placeholder,i}function Gl(e,t,r){var i,a,s,c,l,u,d=0,f=!1,p=!1,m=!0;if(typeof e!=`function`)throw new Ct(o);t=ad(t)||0,Nu(r)&&(f=!!r.leading,p=`maxWait`in r,s=p?sn(ad(r.maxWait)||0,t):s,m=`trailing`in r?!!r.trailing:m);function h(t){var r=i,o=a;return i=a=n,d=t,c=e.apply(o,r),c}function g(e){return d=e,l=Rs(y,t),f?h(e):c}function _(e){var n=e-u,r=e-d,i=t-n;return p?cn(i,s-r):i}function v(e){var r=e-u,i=e-d;return u===n||r>=t||r<0||p&&i>=s}function y(){var e=Ll();if(v(e))return b(e);l=Rs(y,_(e))}function b(e){return l=n,m&&i?h(e):(i=a=n,c)}function x(){l!==n&&so(l),d=0,i=u=a=l=n}function S(){return l===n?c:b(Ll())}function C(){var e=Ll(),r=v(e);if(i=arguments,a=this,u=e,r){if(l===n)return g(u);if(p)return so(l),l=Rs(y,t),h(u)}return l===n&&(l=Rs(y,t)),c}return C.cancel=x,C.flush=S,C}var Kl=Fa(function(e,t){return Fi(e,1,t)}),ql=Fa(function(e,t,n){return Fi(e,ad(t)||0,n)});function Jl(e){return Wo(e,T)}function Yl(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw new Ct(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Yl.Cache||ii),n}Yl.Cache=ii;function Xl(e){if(typeof e!=`function`)throw new Ct(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Zl(e){return Bl(2,e)}var Ql=ao(function(e,t){t=t.length==1&&_u(t[0])?Un(t[0],dr(L())):Un(Ui(t,1),dr(L()));var n=t.length;return Fa(function(r){for(var i=-1,a=cn(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return Fn(e,this,r)})}),$l=Fa(function(e,t){var r=wr(t,es($l));return Wo(e,x,n,t,r)}),eu=Fa(function(e,t){var r=wr(t,es(eu));return Wo(e,S,n,t,r)}),tu=Yo(function(e,t){return Wo(e,w,n,n,n,t)});function nu(e,t){if(typeof e!=`function`)throw new Ct(o);return t=t===n?t:rd(t),Fa(e,t)}function ru(e,t){if(typeof e!=`function`)throw new Ct(o);return t=t==null?0:sn(rd(t),0),Fa(function(n){var r=n[t],i=oo(n,0,t);return r&&Wn(i,r),Fn(e,this,i)})}function iu(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw new Ct(o);return Nu(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Gl(e,t,{leading:r,maxWait:t,trailing:i})}function au(e){return zl(e,1)}function ou(e,t){return $l(ro(t),e)}function su(){if(!arguments.length)return[];var e=arguments[0];return _u(e)?e:[e]}function cu(e){return Mi(e,p)}function lu(e,t){return t=typeof t==`function`?t:n,Mi(e,p,t)}function uu(e){return Mi(e,d|p)}function du(e,t){return t=typeof t==`function`?t:n,Mi(e,d|p,t)}function fu(e,t){return t==null||Pi(e,t,Ad(t))}function pu(e,t){return e===t||e!==e&&t!==t}var mu=Bo(Qi),hu=Bo(function(e,t){return e>=t}),gu=aa(function(){return arguments}())?aa:function(e){return Pu(e)&&kt.call(e,`callee`)&&!Ht.call(e,`callee`)},_u=et.isArray,vu=kn?dr(kn):oa;function yu(e){return e!=null&&Mu(e.length)&&!Au(e)}function bu(e){return Pu(e)&&yu(e)}function xu(e){return e===!0||e===!1||Pu(e)&&Zi(e)==le}var Su=en||Rf,Cu=An?dr(An):sa;function wu(e){return Pu(e)&&e.nodeType===1&&!Uu(e)}function Tu(e){if(e==null)return!0;if(yu(e)&&(_u(e)||typeof e==`string`||typeof e.splice==`function`||Su(e)||Yu(e)||gu(e)))return!e.length;var t=us(e);if(t==he||t==Se)return!e.size;if(Es(e))return!_a(e).length;for(var n in e)if(kt.call(e,n))return!1;return!0}function Eu(e,t){return ca(e,t)}function Du(e,t,r){r=typeof r==`function`?r:n;var i=r?r(e,t):n;return i===n?ca(e,t,n,r):!!i}function Ou(e){if(!Pu(e))return!1;var t=Zi(e);return t==fe||t==de||typeof e.message==`string`&&typeof e.name==`string`&&!Uu(e)}function ku(e){return typeof e==`number`&&tn(e)}function Au(e){if(!Nu(e))return!1;var t=Zi(e);return t==pe||t==me||t==ce||t==be}function ju(e){return typeof e==`number`&&e==rd(e)}function Mu(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=P}function Nu(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function Pu(e){return typeof e==`object`&&!!e}var Fu=jn?dr(jn):ua;function Iu(e,t){return e===t||da(e,t,ns(t))}function Lu(e,t,r){return r=typeof r==`function`?r:n,da(e,t,ns(t),r)}function Ru(e){return Hu(e)&&e!=+e}function zu(e){if(Ts(e))throw new _t(a);return fa(e)}function Bu(e){return e===null}function Vu(e){return e==null}function Hu(e){return typeof e==`number`||Pu(e)&&Zi(e)==ge}function Uu(e){if(!Pu(e)||Zi(e)!=ve)return!1;var t=Bt(e);if(t===null)return!0;var n=kt.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Ot.call(n)==Nt}var Wu=Mn?dr(Mn):pa;function Gu(e){return ju(e)&&e>=-P&&e<=P}var Ku=Nn?dr(Nn):ma;function qu(e){return typeof e==`string`||!_u(e)&&Pu(e)&&Zi(e)==Ce}function Ju(e){return typeof e==`symbol`||Pu(e)&&Zi(e)==we}var Yu=Pn?dr(Pn):ha;function Xu(e){return e===n}function Zu(e){return Pu(e)&&us(e)==Ee}function Qu(e){return Pu(e)&&Zi(e)==De}var $u=Bo(ya),ed=Bo(function(e,t){return e<=t});function td(e){if(!e)return[];if(yu(e))return qu(e)?Ar(e):vo(e);if(Gt&&e[Gt])return xr(e[Gt]());var t=us(e),n=t==he?Sr:t==Se?Tr:Jd;return n(e)}function nd(e){if(!e)return e===0?e:0;if(e=ad(e),e===N||e===-N){var t=e<0?-1:1;return t*ee}return e===e?e:0}function rd(e){var t=nd(e),n=t%1;return t===t?n?t-n:t:0}function id(e){return e?ji(rd(e),0,ne):0}function ad(e){if(typeof e==`number`)return e;if(Ju(e))return te;if(Nu(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=Nu(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=ur(e);var n=ut.test(e);return n||ft.test(e)?bn(e.slice(2),n?2:8):lt.test(e)?te:+e}function od(e){return yo(e,jd(e))}function sd(e){return e?ji(rd(e),-P,P):e===0?e:0}function cd(e){return e==null?``:Ja(e)}var ld=Co(function(e,t){if(Es(t)||yu(t)){yo(t,Ad(t),e);return}for(var n in t)kt.call(t,n)&&wi(e,n,t[n])}),ud=Co(function(e,t){yo(t,jd(t),e)}),dd=Co(function(e,t,n,r){yo(t,jd(t),e,r)}),fd=Co(function(e,t,n,r){yo(t,Ad(t),e,r)}),pd=Yo(Ai);function md(e,t){var n=zr(e);return t==null?n:Di(n,t)}var hd=Fa(function(e,t){e=bt(e);var r=-1,i=t.length,a=i>2?t[2]:n;for(a&&bs(t[0],t[1],a)&&(i=1);++r<i;)for(var o=t[r],s=jd(o),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(d===n||pu(d,Et[u])&&!kt.call(e,u))&&(e[u]=o[u])}return e}),gd=Fa(function(e){return e.push(n,Ko),Fn(Fd,n,e)});function _d(e,t){return Zn(e,L(t,3),Ki)}function vd(e,t){return Zn(e,L(t,3),qi)}function uee(e,t){return e==null?e:Wi(e,L(t,3),jd)}function yd(e,t){return e==null?e:Gi(e,L(t,3),jd)}function bd(e,t){return e&&Ki(e,L(t,3))}function xd(e,t){return e&&qi(e,L(t,3))}function Sd(e){return e==null?[]:Ji(e,Ad(e))}function Cd(e){return e==null?[]:Ji(e,jd(e))}function wd(e,t,r){var i=e==null?n:Yi(e,t);return i===n?r:i}function Td(e,t){return e!=null&&ps(e,t,$i)}function Ed(e,t){return e!=null&&ps(e,t,ea)}var Dd=Po(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=Mt.call(t)),e[t]=n},Sf(Cf)),Od=Po(function(e,t,n){t!=null&&typeof t.toString!=`function`&&(t=Mt.call(t)),kt.call(e,t)?e[t].push(n):e[t]=[n]},L),kd=Fa(ia);function Ad(e){return yu(e)?yi(e):_a(e)}function jd(e){return yu(e)?yi(e,!0):va(e)}function Md(e,t){var n={};return t=L(t,3),Ki(e,function(e,r,i){ki(n,t(e,r,i),e)}),n}function Nd(e,t){var n={};return t=L(t,3),Ki(e,function(e,r,i){ki(n,r,t(e,r,i))}),n}var Pd=Co(function(e,t,n){Ca(e,t,n)}),Fd=Co(function(e,t,n,r){Ca(e,t,n,r)}),Id=Yo(function(e,t){var n={};if(e==null)return n;var r=!1;t=Un(t,function(t){return t=io(t,e),r||=t.length>1,t}),yo(e,Zo(e),n),r&&(n=Mi(n,d|f|p,iee));for(var i=t.length;i--;)Xa(n,t[i]);return n});function dee(e,t){return Rd(e,Xl(L(t)))}var Ld=Yo(function(e,t){return e==null?{}:Da(e,t)});function Rd(e,t){if(e==null)return{};var n=Un(Zo(e),function(e){return[e]});return t=L(t),Oa(e,n,function(e,n){return t(e,n[0])})}function zd(e,t,r){t=io(t,e);var i=-1,a=t.length;for(a||(a=1,e=n);++i<a;){var o=e==null?n:e[Ws(t[i])];o===n&&(i=a,o=r),e=Au(o)?o.call(e):o}return e}function Bd(e,t,n){return e==null?e:Ra(e,t,n)}function Vd(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:Ra(e,t,r,i)}var Hd=Uo(Ad),Ud=Uo(jd);function Wd(e,t,n){var r=_u(e),i=r||Su(e)||Yu(e);if(t=L(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:Nu(e)&&Au(a)?zr(Bt(e)):{}}return(i?Ln:Ki)(e,function(e,r,i){return t(n,e,r,i)}),n}function Gd(e,t){return e==null?!0:Xa(e,t)}function Kd(e,t,n){return e==null?e:Za(e,t,ro(n))}function qd(e,t,r,i){return i=typeof i==`function`?i:n,e==null?e:Za(e,t,ro(r),i)}function Jd(e){return e==null?[]:fr(e,Ad(e))}function Yd(e){return e==null?[]:fr(e,jd(e))}function Xd(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=ad(r),r=r===r?r:0),t!==n&&(t=ad(t),t=t===t?t:0),ji(ad(e),t,r)}function Zd(e,t,r){return t=nd(t),r===n?(r=t,t=0):r=nd(r),e=ad(e),ta(e,t,r)}function Qd(e,t,r){if(r&&typeof r!=`boolean`&&bs(e,t,r)&&(t=r=n),r===n&&(typeof t==`boolean`?(r=t,t=n):typeof e==`boolean`&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=nd(e),t===n?(t=e,e=0):t=nd(t)),e>t){var i=e;e=t,t=i}if(r||e%1||t%1){var a=hn();return cn(e+a*(t-e+yn(`1e-`+((a+``).length-1))),t)}return Ma(e,t)}var $d=Oo(function(e,t,n){return t=t.toLowerCase(),e+(n?ef(t):t)});function ef(e){return yf(cd(e).toLowerCase())}function tf(e){return e=cd(e),e&&e.replace(mt,eee).replace(on,``)}function nf(e,t,r){e=cd(e),t=Ja(t);var i=e.length;r=r===n?i:ji(rd(r),0,i);var a=r;return r-=t.length,r>=0&&e.slice(r,a)==t}function rf(e){return e=cd(e),e&&Ge.test(e)?e.replace(Ue,tee):e}function af(e){return e=cd(e),e&&Qe.test(e)?e.replace(Ze,`\\$&`):e}var sf=Oo(function(e,t,n){return e+(n?`-`:``)+t.toLowerCase()}),cf=Oo(function(e,t,n){return e+(n?` `:``)+t.toLowerCase()}),lf=Do(`toLowerCase`);function uf(e,t,n){e=cd(e),t=rd(t);var r=t?kr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Lo(Qt(i),n)+e+Lo(Zt(i),n)}function df(e,t,n){e=cd(e),t=rd(t);var r=t?kr(e):0;return t&&r<t?e+Lo(t-r,n):e}function ff(e,t,n){e=cd(e),t=rd(t);var r=t?kr(e):0;return t&&r<t?Lo(t-r,n)+e:e}function pf(e,t,n){return n||t==null?t=0:t&&=+t,un(cd(e).replace($e,``),t||0)}function mf(e,t,r){return t=(r?bs(e,t,r):t===n)?1:rd(t),Pa(cd(e),t)}function hf(){var e=arguments,t=cd(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var gf=Oo(function(e,t,n){return e+(n?`_`:``)+t.toLowerCase()});function _f(e,t,r){return r&&typeof r!=`number`&&bs(e,t,r)&&(t=r=n),r=r===n?ne:r>>>0,r?(e=cd(e),e&&(typeof t==`string`||t!=null&&!Wu(t))&&(t=Ja(t),!t&&yr(e))?oo(Ar(e),0,r):e.split(t,r)):[]}var vf=Oo(function(e,t,n){return e+(n?` `:``)+yf(t)});function fee(e,t,n){return e=cd(e),n=n==null?0:ji(rd(n),0,e.length),t=Ja(t),e.slice(n,n+t.length)==t}function pee(e,t,r){var i=I.templateSettings;r&&bs(e,t,r)&&(t=n),e=cd(e),t=dd({},t,i,Go);var a=dd({},t.imports,i.imports,Go),o=Ad(a),c=fr(a,o),l,u,d=0,f=t.interpolate||ht,p=`__p += '`,m=xt((t.escape||ht).source+`|`+f.source+`|`+(f===qe?st:ht).source+`|`+(t.evaluate||ht).source+`|$`,`g`),h=`//# sourceURL=`+(kt.call(t,`sourceURL`)?(t.sourceURL+``).replace(/\s/g,` `):`lodash.templateSources[`+ ++fn+`]`)+`
|
|
20
|
+
`;e.replace(m,function(t,n,r,i,a,o){return r||=i,p+=e.slice(d,o).replace(gt,_r),n&&(l=!0,p+=`' +
|
|
21
|
+
__e(`+n+`) +
|
|
22
|
+
'`),a&&(u=!0,p+=`';
|
|
23
|
+
`+a+`;
|
|
24
|
+
__p += '`),r&&(p+=`' +
|
|
25
|
+
((__t = (`+r+`)) == null ? '' : __t) +
|
|
26
|
+
'`),d=o+t.length,t}),p+=`';
|
|
27
|
+
`;var g=kt.call(t,`variable`)&&t.variable;if(!g)p=`with (obj) {
|
|
28
|
+
`+p+`
|
|
29
|
+
}
|
|
30
|
+
`;else if(at.test(g))throw new _t(s);p=(u?p.replace(ze,``):p).replace(Be,`$1`).replace(Ve,`$1;`),p=`function(`+(g||`obj`)+`) {
|
|
31
|
+
`+(g?``:`obj || (obj = {});
|
|
32
|
+
`)+`var __t, __p = ''`+(l?`, __e = _.escape`:``)+(u?`, __j = Array.prototype.join;
|
|
33
|
+
function print() { __p += __j.call(arguments, '') }
|
|
34
|
+
`:`;
|
|
35
|
+
`)+p+`return __p
|
|
36
|
+
}`;var _=xf(function(){return vt(o,h+`return `+p).apply(n,c)});if(_.source=p,Ou(_))throw _;return _}function mee(e){return cd(e).toLowerCase()}function hee(e){return cd(e).toUpperCase()}function gee(e,t,r){if(e=cd(e),e&&(r||t===n))return ur(e);if(!e||!(t=Ja(t)))return e;var i=Ar(e),a=Ar(t),o=mr(i,a),s=hr(i,a)+1;return oo(i,o,s).join(``)}function _ee(e,t,r){if(e=cd(e),e&&(r||t===n))return e.slice(0,jr(e)+1);if(!e||!(t=Ja(t)))return e;var i=Ar(e),a=hr(i,Ar(t))+1;return oo(i,0,a).join(``)}function vee(e,t,r){if(e=cd(e),e&&(r||t===n))return e.replace($e,``);if(!e||!(t=Ja(t)))return e;var i=Ar(e),a=mr(i,Ar(t));return oo(i,a).join(``)}function yee(e,t){var r=E,i=D;if(Nu(t)){var a=`separator`in t?t.separator:a;r=`length`in t?rd(t.length):r,i=`omission`in t?Ja(t.omission):i}e=cd(e);var o=e.length;if(yr(e)){var s=Ar(e);o=s.length}if(r>=o)return e;var c=r-kr(i);if(c<1)return i;var l=s?oo(s,0,c).join(``):e.slice(0,c);if(a===n)return l+i;if(s&&(c+=l.length-c),Wu(a)){if(e.slice(c).search(a)){var u,d=l;for(a.global||(a=xt(a.source,cd(ct.exec(a))+`g`)),a.lastIndex=0;u=a.exec(d);)var f=u.index;l=l.slice(0,f===n?c:f)}}else if(e.indexOf(Ja(a),c)!=c){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+i}function bee(e){return e=cd(e),e&&We.test(e)?e.replace(He,Mr):e}var xee=Oo(function(e,t,n){return e+(n?` `:``)+t.toUpperCase()}),yf=Do(`toUpperCase`);function bf(e,t,r){return e=cd(e),t=r?n:t,t===n?br(e)?Fr(e):Xn(e):e.match(t)||[]}var xf=Fa(function(e,t){try{return Fn(e,n,t)}catch(e){return Ou(e)?e:new _t(e)}}),See=Yo(function(e,t){return Ln(t,function(t){t=Ws(t),ki(e,t,Vl(e[t],e))}),e});function Cee(e){var t=e==null?0:e.length,n=L();return e=t?Un(e,function(e){if(typeof e[1]!=`function`)throw new Ct(o);return[n(e[0]),e[1]]}):[],Fa(function(n){for(var r=-1;++r<t;){var i=e[r];if(Fn(i[0],this,n))return Fn(i[1],this,n)}})}function wee(e){return Ni(Mi(e,d))}function Sf(e){return function(){return e}}function Tee(e,t){return e==null||e!==e?t:e}var Eee=Mo(),Dee=Mo(!0);function Cf(e){return e}function wf(e){return ga(typeof e==`function`?e:Mi(e,d))}function Oee(e){return xa(Mi(e,d))}function kee(e,t){return Sa(e,Mi(t,d))}var Aee=Fa(function(e,t){return function(n){return ia(n,e,t)}}),Tf=Fa(function(e,t){return function(n){return ia(e,n,t)}});function Ef(e,t,n){var r=Ad(t),i=Ji(t,r);n==null&&!(Nu(t)&&(i.length||!r.length))&&(n=t,t=e,e=this,i=Ji(t,Ad(t)));var a=!(Nu(n)&&`chain`in n)||!!n.chain,o=Au(e);return Ln(i,function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),i=n.__actions__=vo(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Wn([this.value()],arguments))})}),e}function Df(){return Cn._===this&&(Cn._=Pt),this}function Of(){}function kf(e){return e=rd(e),Fa(function(t){return Ta(t,e)})}var Af=Io(Un),jf=Io(zn),Mf=Io(qn);function Nf(e){return xs(e)?rr(Ws(e)):ka(e)}function Pf(e){return function(t){return e==null?n:Yi(e,t)}}var Ff=zo(),If=zo(!0);function Lf(){return[]}function Rf(){return!1}function zf(){return{}}function Bf(){return``}function Vf(){return!0}function Hf(e,t){if(e=rd(e),e<1||e>P)return[];var n=ne,r=cn(e,ne);t=L(t),e-=ne;for(var i=cr(r,t);++n<e;)t(n);return i}function Uf(e){return _u(e)?Un(e,Ws):Ju(e)?[e]:vo(Us(cd(e)))}function Wf(e){var t=++At;return cd(e)+t}var Gf=Fo(function(e,t){return e+t},0),Kf=Ho(`ceil`),qf=Fo(function(e,t){return e/t},1),Jf=Ho(`floor`);function Yf(e){return e&&e.length?Bi(e,Cf,Qi):n}function Xf(e,t){return e&&e.length?Bi(e,L(t,2),Qi):n}function Zf(e){return nr(e,Cf)}function Qf(e,t){return nr(e,L(t,2))}function $f(e){return e&&e.length?Bi(e,Cf,ya):n}function ep(e,t){return e&&e.length?Bi(e,L(t,2),ya):n}var tp=Fo(function(e,t){return e*t},1),np=Ho(`round`),rp=Fo(function(e,t){return e-t},0);function ip(e){return e&&e.length?sr(e,Cf):0}function ap(e,t){return e&&e.length?sr(e,L(t,2)):0}return I.after=Rl,I.ary=zl,I.assign=ld,I.assignIn=ud,I.assignInWith=dd,I.assignWith=fd,I.at=pd,I.before=Bl,I.bind=Vl,I.bindAll=See,I.bindKey=Hl,I.castArray=su,I.chain=el,I.chunk=Js,I.compact=Ys,I.concat=Xs,I.cond=Cee,I.conforms=wee,I.constant=Sf,I.countBy=dl,I.create=md,I.curry=Ul,I.curryRight=Wl,I.debounce=Gl,I.defaults=hd,I.defaultsDeep=gd,I.defer=Kl,I.delay=ql,I.difference=Zs,I.differenceBy=Qs,I.differenceWith=$s,I.drop=ec,I.dropRight=tc,I.dropRightWhile=nc,I.dropWhile=rc,I.fill=ic,I.filter=pl,I.flatMap=gl,I.flatMapDeep=_l,I.flatMapDepth=vl,I.flatten=sc,I.flattenDeep=cc,I.flattenDepth=lc,I.flip=Jl,I.flow=Eee,I.flowRight=Dee,I.fromPairs=oee,I.functions=Sd,I.functionsIn=Cd,I.groupBy=xl,I.initial=cee,I.intersection=lee,I.intersectionBy=dc,I.intersectionWith=fc,I.invert=Dd,I.invertBy=Od,I.invokeMap=Cl,I.iteratee=wf,I.keyBy=wl,I.keys=Ad,I.keysIn=jd,I.map=Tl,I.mapKeys=Md,I.mapValues=Nd,I.matches=Oee,I.matchesProperty=kee,I.memoize=Yl,I.merge=Pd,I.mergeWith=Fd,I.method=Aee,I.methodOf=Tf,I.mixin=Ef,I.negate=Xl,I.nthArg=kf,I.omit=Id,I.omitBy=dee,I.once=Zl,I.orderBy=El,I.over=Af,I.overArgs=Ql,I.overEvery=jf,I.overSome=Mf,I.partial=$l,I.partialRight=eu,I.partition=Dl,I.pick=Ld,I.pickBy=Rd,I.property=Nf,I.propertyOf=Pf,I.pull=_c,I.pullAll=vc,I.pullAllBy=yc,I.pullAllWith=bc,I.pullAt=xc,I.range=Ff,I.rangeRight=If,I.rearg=tu,I.reject=Al,I.remove=Sc,I.rest=nu,I.reverse=Cc,I.sampleSize=Ml,I.set=Bd,I.setWith=Vd,I.shuffle=Nl,I.slice=wc,I.sortBy=Il,I.sortedUniq=jc,I.sortedUniqBy=Mc,I.split=_f,I.spread=ru,I.tail=Nc,I.take=Pc,I.takeRight=Fc,I.takeRightWhile=Ic,I.takeWhile=Lc,I.tap=tl,I.throttle=iu,I.thru=nl,I.toArray=td,I.toPairs=Hd,I.toPairsIn=Ud,I.toPath=Uf,I.toPlainObject=od,I.transform=Wd,I.unary=au,I.union=Rc,I.unionBy=zc,I.unionWith=Bc,I.uniq=Vc,I.uniqBy=Hc,I.uniqWith=Uc,I.unset=Gd,I.unzip=Wc,I.unzipWith=Gc,I.update=Kd,I.updateWith=qd,I.values=Jd,I.valuesIn=Yd,I.without=Kc,I.words=bf,I.wrap=ou,I.xor=qc,I.xorBy=Jc,I.xorWith=Yc,I.zip=Xc,I.zipObject=Zc,I.zipObjectDeep=Qc,I.zipWith=$c,I.entries=Hd,I.entriesIn=Ud,I.extend=ud,I.extendWith=dd,Ef(I,I),I.add=Gf,I.attempt=xf,I.camelCase=$d,I.capitalize=ef,I.ceil=Kf,I.clamp=Xd,I.clone=cu,I.cloneDeep=uu,I.cloneDeepWith=du,I.cloneWith=lu,I.conformsTo=fu,I.deburr=tf,I.defaultTo=Tee,I.divide=qf,I.endsWith=nf,I.eq=pu,I.escape=rf,I.escapeRegExp=af,I.every=fl,I.find=ml,I.findIndex=ac,I.findKey=_d,I.findLast=hl,I.findLastIndex=oc,I.findLastKey=vd,I.floor=Jf,I.forEach=yl,I.forEachRight=bl,I.forIn=uee,I.forInRight=yd,I.forOwn=bd,I.forOwnRight=xd,I.get=wd,I.gt=mu,I.gte=hu,I.has=Td,I.hasIn=Ed,I.head=uc,I.identity=Cf,I.includes=Sl,I.indexOf=see,I.inRange=Zd,I.invoke=kd,I.isArguments=gu,I.isArray=_u,I.isArrayBuffer=vu,I.isArrayLike=yu,I.isArrayLikeObject=bu,I.isBoolean=xu,I.isBuffer=Su,I.isDate=Cu,I.isElement=wu,I.isEmpty=Tu,I.isEqual=Eu,I.isEqualWith=Du,I.isError=Ou,I.isFinite=ku,I.isFunction=Au,I.isInteger=ju,I.isLength=Mu,I.isMap=Fu,I.isMatch=Iu,I.isMatchWith=Lu,I.isNaN=Ru,I.isNative=zu,I.isNil=Vu,I.isNull=Bu,I.isNumber=Hu,I.isObject=Nu,I.isObjectLike=Pu,I.isPlainObject=Uu,I.isRegExp=Wu,I.isSafeInteger=Gu,I.isSet=Ku,I.isString=qu,I.isSymbol=Ju,I.isTypedArray=Yu,I.isUndefined=Xu,I.isWeakMap=Zu,I.isWeakSet=Qu,I.join=pc,I.kebabCase=sf,I.last=mc,I.lastIndexOf=hc,I.lowerCase=cf,I.lowerFirst=lf,I.lt=$u,I.lte=ed,I.max=Yf,I.maxBy=Xf,I.mean=Zf,I.meanBy=Qf,I.min=$f,I.minBy=ep,I.stubArray=Lf,I.stubFalse=Rf,I.stubObject=zf,I.stubString=Bf,I.stubTrue=Vf,I.multiply=tp,I.nth=gc,I.noConflict=Df,I.noop=Of,I.now=Ll,I.pad=uf,I.padEnd=df,I.padStart=ff,I.parseInt=pf,I.random=Qd,I.reduce=Ol,I.reduceRight=kl,I.repeat=mf,I.replace=hf,I.result=zd,I.round=np,I.runInContext=e,I.sample=jl,I.size=Pl,I.snakeCase=gf,I.some=Fl,I.sortedIndex=Tc,I.sortedIndexBy=Ec,I.sortedIndexOf=Dc,I.sortedLastIndex=Oc,I.sortedLastIndexBy=kc,I.sortedLastIndexOf=Ac,I.startCase=vf,I.startsWith=fee,I.subtract=rp,I.sum=ip,I.sumBy=ap,I.template=pee,I.times=Hf,I.toFinite=nd,I.toInteger=rd,I.toLength=id,I.toLower=mee,I.toNumber=ad,I.toSafeInteger=sd,I.toString=cd,I.toUpper=hee,I.trim=gee,I.trimEnd=_ee,I.trimStart=vee,I.truncate=yee,I.unescape=bee,I.uniqueId=Wf,I.upperCase=xee,I.upperFirst=yf,I.each=yl,I.eachRight=bl,I.first=uc,Ef(I,function(){var e={};return Ki(I,function(t,n){kt.call(I.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),I.VERSION=r,Ln([`bind`,`bindKey`,`curry`,`curryRight`,`partial`,`partialRight`],function(e){I[e].placeholder=I}),Ln([`drop`,`take`],function(e,t){Hr.prototype[e]=function(r){r=r===n?1:sn(rd(r),0);var i=this.__filtered__&&!t?new Hr(this):this.clone();return i.__filtered__?i.__takeCount__=cn(r,i.__takeCount__):i.__views__.push({size:cn(r,ne),type:e+(i.__dir__<0?`Right`:``)}),i},Hr.prototype[e+`Right`]=function(t){return this.reverse()[e](t).reverse()}}),Ln([`filter`,`map`,`takeWhile`],function(e,t){var n=t+1,r=n==A||n==M;Hr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:L(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Ln([`head`,`last`],function(e,t){var n=`take`+(t?`Right`:``);Hr.prototype[e]=function(){return this[n](1).value()[0]}}),Ln([`initial`,`tail`],function(e,t){var n=`drop`+(t?``:`Right`);Hr.prototype[e]=function(){return this.__filtered__?new Hr(this):this[n](1)}}),Hr.prototype.compact=function(){return this.filter(Cf)},Hr.prototype.find=function(e){return this.filter(e).head()},Hr.prototype.findLast=function(e){return this.reverse().find(e)},Hr.prototype.invokeMap=Fa(function(e,t){return typeof e==`function`?new Hr(this):this.map(function(n){return ia(n,e,t)})}),Hr.prototype.reject=function(e){return this.filter(Xl(L(e)))},Hr.prototype.slice=function(e,t){e=rd(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Hr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(t=rd(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},Hr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hr.prototype.toArray=function(){return this.take(ne)},Ki(Hr.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),a=I[i?`take`+(t==`last`?`Right`:``):t],o=i||/^find/.test(t);a&&(I.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,c=t instanceof Hr,l=s[0],u=c||_u(t),d=function(e){var t=a.apply(I,Wn([e],s));return i&&f?t[0]:t};u&&r&&typeof l==`function`&&l.length!=1&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,m=o&&!f,h=c&&!p;if(!o&&u){t=h?t:new Hr(this);var g=e.apply(t,s);return g.__actions__.push({func:nl,args:[d],thisArg:n}),new Vr(g,f)}return m&&h?e.apply(this,s):(g=this.thru(d),m?i?g.value()[0]:g.value():g)})}),Ln([`pop`,`push`,`shift`,`sort`,`splice`,`unshift`],function(e){var t=wt[e],n=/^(?:push|sort|unshift)$/.test(e)?`tap`:`thru`,r=/^(?:pop|shift)$/.test(e);I.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(_u(i)?i:[],e)}return this[n](function(n){return t.apply(_u(n)?n:[],e)})}}),Ki(Hr.prototype,function(e,t){var n=I[t];if(n){var r=n.name+``;kt.call(On,r)||(On[r]=[]),On[r].push({name:t,func:n})}}),On[No(n,_).name]=[{name:`wrapper`,func:n}],Hr.prototype.clone=Ur,Hr.prototype.reverse=Wr,Hr.prototype.value=Gr,I.prototype.at=rl,I.prototype.chain=il,I.prototype.commit=al,I.prototype.next=ol,I.prototype.plant=cl,I.prototype.reverse=ll,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=ul,I.prototype.first=I.prototype.head,Gt&&(I.prototype[Gt]=sl),I}),Lr=Ir();typeof define==`function`&&typeof define.amd==`object`&&define.amd?(Cn._=Lr,define(function(){return Lr})):Tn?((Tn.exports=Lr)._=Lr,wn._=Lr):Cn._=Lr}).call(exports)})),za=u(Ra());const Ba=`_inputInTable_1vpoe_1`,Va=`_inputHover_1vpoe_13`,Ha=`_inputFocus_1vpoe_18`,Ua=`_inputError_1vpoe_25`,Wa=`_inputWarning_1vpoe_26`,Ga=`_inputDisabled_1vpoe_61`,Ka=`_hideScrollbars_1vpoe_67`,qa=`_button_1vpoe_100`,Ja=`_active_1vpoe_135`,Ya=`_green_1vpoe_135`,Xa=`_red_1vpoe_135`,Za=`_orange_1vpoe_135`,Qa=`_icon_1vpoe_147`,$a=`_iconOnly_1vpoe_153`,eo=`_basic_1vpoe_163`,to=`_muted_1vpoe_169`,no=`_disabled_1vpoe_188`,ro=`_small_1vpoe_197`,io=`_pill_1vpoe_202`,ao=`_round_1vpoe_203`,oo=`_inverted_1vpoe_309`,so=`_groupOrderFirst_1vpoe_339`,co=`_groupOrderMiddle_1vpoe_340`,lo=`_groupOrderLast_1vpoe_341`;var uo={inputInTable:`_inputInTable_1vpoe_1`,inputHover:`_inputHover_1vpoe_13`,inputFocus:`_inputFocus_1vpoe_18`,inputError:`_inputError_1vpoe_25`,inputWarning:`_inputWarning_1vpoe_26`,inputDisabled:`_inputDisabled_1vpoe_61`,hideScrollbars:`_hideScrollbars_1vpoe_67`,button:`_button_1vpoe_100`,active:`_active_1vpoe_135`,green:`_green_1vpoe_135`,red:`_red_1vpoe_135`,orange:`_orange_1vpoe_135`,icon:`_icon_1vpoe_147`,iconOnly:`_iconOnly_1vpoe_153`,basic:`_basic_1vpoe_163`,muted:`_muted_1vpoe_169`,disabled:`_disabled_1vpoe_188`,small:`_small_1vpoe_197`,pill:`_pill_1vpoe_202`,round:`_round_1vpoe_203`,inverted:`_inverted_1vpoe_309`,groupOrderFirst:`_groupOrderFirst_1vpoe_339`,groupOrderMiddle:`_groupOrderMiddle_1vpoe_340`,groupOrderLast:`_groupOrderLast_1vpoe_341`};const nee=`_spinner_156m4_1`;var fo={spinner:`_spinner_156m4_1`};const po=({small:e=!1,colored:t=!1,dark:n=!1,tiny:r=!1})=>{let i=t?`var(--color-text-primary)`:n?`var(--color-text-muted)`:`white`,a=e?`var(--font-size)`:r?`var(--font-size-xs)`:`var(--size)`;return(0,p.jsx)(`div`,{className:fo.spinner,style:{color:i,fontSize:a}})};let mo=function(e){return e.SUBMIT=`submit`,e.BUTTON=`button`,e.RESET=`reset`,e}({});var ho=u(h());const go=({children:e,tooltip:t=null})=>t?(0,p.jsx)(ya,{text:t,display:`inline-flex`,children:e}):(0,p.jsx)(p.Fragment,{children:e}),_o=({active:e=!1,basic:t=!1,colored:n=!1,disabled:r=!1,ignoreDisabledContext:i=!1,groupOrder:a,icon:o=null,label:s=``,loading:c=!1,name:l,pill:u=!1,round:d=!1,small:m=!1,styles:h=``,width:g=``,title:_=``,type:b=mo.BUTTON,onClick:x=()=>{},error:S,warning:C,testId:w,tooltip:T,inverted:E=!1,component:D=`button`,url:O,tabIndex:k})=>{let A=(0,f.useContext)(Ie),j=(()=>{if(n)switch(n){case y.DANGER:case y.RED:return uo.red;case y.SUCCESS:case y.GREEN:return uo.green;case y.MUTED:return uo.muted;default:return uo.orange}return``})(),M=(()=>{if(a)switch(a){case v.FIRST:return uo.groupOrderFirst;case v.LAST:return uo.groupOrderLast;default:return uo.groupOrderMiddle}return``})(),N=r||A&&!i;return(0,p.jsx)(go,{tooltip:T,children:(0,p.jsxs)(D,{type:b===mo.SUBMIT?mo.SUBMIT:mo.BUTTON,className:(0,ho.default)(uo.button,e?uo.active:``,t?uo.basic:``,j,N?uo.disabled:``,(o||c)&&!s?uo.iconOnly:``,E?uo.inverted:``,M,u?uo.pill:``,d?uo.round:``,m?uo.small:``,h),disabled:N,name:l??``,onClick:x,..._?{title:_}:{},style:{width:g},"data-error":S||null,"data-warning":C||null,"data-testid":w,to:O,tabIndex:k,children:[o&&(0,p.jsx)(`span`,{className:uo.icon,children:(0,p.jsx)(er,{icon:o})}),c&&(0,p.jsx)(`span`,{className:uo.icon,children:(0,p.jsx)(po,{small:!m,tiny:m,dark:!n&&!t,colored:t})}),s]})})},vo=`_actions_1t7vd_1`,yo=`_childComponent_1t7vd_11`,bo=`_actionComponentContainer_1t7vd_14`,xo=`_active_1t7vd_36`;var So={actions:`_actions_1t7vd_1`,childComponent:`_childComponent_1t7vd_11`,actionComponentContainer:`_actionComponentContainer_1t7vd_14`,active:`_active_1t7vd_36`};const Co=`_wrapper_9g7i6_1`,wo=`_layer_9g7i6_5`,To=`_layerContainer_9g7i6_8`,Eo=`_nested_9g7i6_24`,Do=`_fileInput_9g7i6_36`,Oo=`_trigger_9g7i6_41`,ko=`_middleAlignedInline_9g7i6_50`,Ao=`_heading_9g7i6_56`,jo=`_headingIcon_9g7i6_62`,Mo=`_clickable_9g7i6_69`,No=`_option_9g7i6_73`,Po=`_active_9g7i6_92`,Fo=`_disabled_9g7i6_97`,Io=`_selected_9g7i6_101`,Lo=`_optionContent_9g7i6_108`,Ro=`_inline_9g7i6_112`,zo=`_icon_9g7i6_117`,Bo=`_check_9g7i6_118`,Vo=`_text_9g7i6_144`,Ho=`_label_9g7i6_149`,ree=`_description_9g7i6_160`,Uo=`_arrow_9g7i6_164`,Wo=`_divider_9g7i6_168`,Go=`_deprecatedSemanticIcon_9g7i6_172`,Ko=`_buttonLabel_9g7i6_180`,iee=`_buttonCaret_9g7i6_186`,qo=`_component_9g7i6_190`,aee=`_right_9g7i6_196`,Jo=`_actions_9g7i6_201`;var Yo={wrapper:`_wrapper_9g7i6_1`,layer:`_layer_9g7i6_5`,layerContainer:`_layerContainer_9g7i6_8`,nested:`_nested_9g7i6_24`,fileInput:`_fileInput_9g7i6_36`,trigger:`_trigger_9g7i6_41`,middleAlignedInline:`_middleAlignedInline_9g7i6_50`,heading:`_heading_9g7i6_56`,headingIcon:`_headingIcon_9g7i6_62`,clickable:`_clickable_9g7i6_69`,option:`_option_9g7i6_73`,active:`_active_9g7i6_92`,disabled:`_disabled_9g7i6_97`,selected:`_selected_9g7i6_101`,optionContent:`_optionContent_9g7i6_108`,inline:`_inline_9g7i6_112`,icon:`_icon_9g7i6_117`,check:`_check_9g7i6_118`,text:`_text_9g7i6_144`,label:`_label_9g7i6_149`,description:`_description_9g7i6_160`,arrow:`_arrow_9g7i6_164`,divider:`_divider_9g7i6_168`,deprecatedSemanticIcon:`_deprecatedSemanticIcon_9g7i6_172`,buttonLabel:`_buttonLabel_9g7i6_180`,buttonCaret:`_buttonCaret_9g7i6_186`,component:`_component_9g7i6_190`,right:`_right_9g7i6_196`,actions:`_actions_9g7i6_201`},Xo=u(h());const Zo=({label:e,onClick:t,icon:n,testId:r})=>(0,p.jsxs)(`div`,{onClick:e=>e.stopPropagation(),className:Yo.heading,"data-testid":r,children:[e,!!n&&(0,p.jsx)(`span`,{className:(0,Xo.default)(Yo.headingIcon,t?Yo.clickable:``),onClick:t,children:(0,p.jsx)(er,{icon:n})})]}),Qo=()=>(0,p.jsx)(`hr`,{className:Yo.divider});var $o=u(h());const es=({actions:e,label:t,url:n,onClick:r,description:i,icon:a,selected:o,closeOnOptionClick:s,close:c,disabled:l,inline:u,title:d,upload:f,uploadType:m,onChange:h=za.noop,testId:g,component:_=`a`})=>{let v=e=>{if(e.stopPropagation(),l){e.preventDefault();return}f||(s&&c?.(),r?.(e))},y=e=>{let{files:t}=e?.target??{};if(t){let n={...e,target:{...e.target,value:t,name:e.target.name,files:t}};h?.(n),c?.()}};return(0,p.jsxs)(_,{href:n,to:n,className:(0,$o.default)(Yo.option,l?Yo.disabled:``,u?Yo.inline:``,o?Yo?.selected:``),onClick:v,"data-testid":g,children:[a?(0,p.jsx)(`span`,{className:Yo.icon,children:(0,p.jsx)(er,{icon:a})}):null,(0,p.jsxs)(`div`,{className:Yo.optionContent,children:[f&&(0,p.jsx)(`input`,{type:`file`,accept:m,className:Yo.fileInput,onChange:y}),(0,p.jsx)(`span`,{className:Yo.label,title:`${d||t}`,children:t}),(0,p.jsx)(`span`,{className:Yo.description,children:i})]}),(0,p.jsxs)(`div`,{className:Yo.right,children:[o&&(0,p.jsx)(`span`,{className:Yo.check,children:(0,p.jsx)(er,{icon:S.CHECK})}),!!e?.length&&(0,p.jsx)(`div`,{className:Yo.actions,children:(0,p.jsx)(qs,{actions:e})})]})]})};let L=function(e){return e.HEADING=`Heading`,e.DIVIDER=`Divider`,e.OPTION=`Option`,e.MENU=`Menu`,e}({}),ts=function(e){return e.FALSE=`false`,e.RIGHT=`right`,e.DOWN=`down`,e}({});const ns=({section:e,closeOnOptionClick:t,close:n,tree:r,path:i,maxHeight:a})=>{let o=(0,f.useContext)(Ie);switch(e.type){case L.HEADING:return(0,p.jsx)(Zo,{label:e?.label??``,onClick:e.onClick,icon:e.icon,testId:e.testId});case L.DIVIDER:return(0,p.jsx)(Qo,{});case L.OPTION:return(0,p.jsx)(es,{actions:e?.actions,label:e?.label??``,url:e?.url,onClick:e?.onClick,description:e?.description,icon:e?.icon,selected:e?.selected,closeOnOptionClick:t,close:n,disabled:e?.disabled||o,inline:e?.inline,title:e?.title,upload:e?.upload,uploadType:e?.uploadType,onChange:e?.onChange,testId:e?.testId,component:e?.component});case L.MENU:let s=!!e?.menu?.sections?.find(e=>e?.selected);return(0,p.jsx)(Hs,{menu:e.menu,selected:s,title:e.title,closeOnOptionClick:t,isNested:!0,closeParent:n,tree:r,path:i,maxHeight:a,testId:e.testId});default:return null}};var rs=u(Ra());const ss=e=>e.includes(`[`)?e.substr(0,e.lastIndexOf(`[`)):e,cs=(e,t)=>`${e}.sections[${t}]`.replace(/^\./,``),ls=e=>`${e}.close`.replace(/^\./,``),us=(e,t)=>(0,rs.get)(e,ss(t),[]),ds=(e,t,n)=>(0,rs.set)(e,ls(t),n);var fs=u(h());const ps=({sections:e,isNested:t,width:n,closeOnOptionClick:r,close:i=()=>{},tree:a,path:o,maxHeight:s,showAllButton:c,testId:l})=>{if((0,f.isValidElement)(e))return(0,p.jsx)(p.Fragment,{children:e});let[u,d]=(0,f.useState)(!c?.visible),m=e,h=c?.additionalSections?.map(e=>({...e,closeOnOptionClick:r,visible:!0}))??[],g=m.length>4?[{type:L.OPTION,label:u?c?.showLessTitle||`Show less`:c?.showAllTitle||`Show all`,onClick:()=>d(!u),visible:!0,closeOnOptionClick:!1}]:[],_=c?.visible?m.map((e,t)=>u||t<=3?{...e,visible:!0,closeOnOptionClick:r}:e).concat(g,h).filter(e=>e?.visible):m.map(e=>({...e,closeOnOptionClick:r}));return(0,p.jsx)(`div`,{className:(0,fs.default)(Yo.layer,t?Yo.nested:null),style:{maxWidth:n,maxHeight:s},"data-testid":l,children:(0,p.jsx)(`ul`,{children:_.map((e,t)=>(0,p.jsx)(`li`,{children:(0,p.jsx)(ns,{section:e,closeOnOptionClick:e.closeOnOptionClick,close:i,tree:a,path:cs(o,t),maxHeight:s})},t))})})},ms=(e,t=!1)=>({auto:!0,preferX:`right`,preferY:`bottom`,placement:e||(t?`right-start`:`bottom-start`)});var hs=u(Ra());const gs=e=>(0,hs.isString)(e)||(0,hs.isNumber)(e)||(0,f.isValidElement)(e),_s=e=>Array.isArray(e)?`array`:typeof e,vs=`_wrapper_nwprz_1`,ys=`_badge_nwprz_5`,bs=`_label_nwprz_11`,xs=`_dark_nwprz_23`,Ss=`_light_nwprz_26`,Cs=`_small_nwprz_29`,ws=`_dot_nwprz_33`,Ts=`_hasChildren_nwprz_39`;var Es={wrapper:`_wrapper_nwprz_1`,badge:`_badge_nwprz_5`,label:`_label_nwprz_11`,dark:`_dark_nwprz_23`,light:`_light_nwprz_26`,small:`_small_nwprz_29`,dot:`_dot_nwprz_33`,hasChildren:`_hasChildren_nwprz_39`},Ds=u(h());const Os=e=>{let t=e.substring(1),n=parseInt(t,16),r=n>>16&255,i=n>>8&255,a=n>>0&255,o=.2126*r+.7152*i+.0722*a;return o<128},ks=({children:e,color:t=``,title:n=null,dot:r=!1,margin:i=null,small:a=!1})=>{let o=!(n===null&&r===!1);return(0,p.jsxs)(`div`,{className:Es.wrapper,children:[o&&(0,p.jsx)(`sup`,{className:(0,Ds.default)(Es.badge,Os(t)?Es.dark:Es.light,n===null?Es.dot:Es.label,a?Es.small:``,e?Es.hasChildren:``),style:{background:t||void 0,margin:i||void 0},children:n}),e]})};var As=u(h());const js=({trigger:e,label:t,colored:n,small:r,width:i,disabled:a,groupOrder:o,loading:s,error:c,warning:l,active:u,tabIndex:d})=>{let m=(0,f.useContext)(Ie),h=e===_.BUTTON?t:e===_.DROP_DOWN_BUTTON?(0,p.jsxs)(`span`,{className:Yo.middleAlignedInline,children:[(0,p.jsx)(`span`,{className:Yo.buttonLabel,children:t}),(0,p.jsx)(`span`,{className:Yo.buttonCaret,children:(0,p.jsx)(er,{icon:S.CHEVRON_DOWN})})]}):null;return(0,p.jsx)(`div`,{className:(0,As.default)(Yo.trigger,a||m?Yo.disabled:null),style:{width:i},children:(0,p.jsx)(_o,{label:h,colored:n,small:r,width:i,groupOrder:o,onClick:()=>{},loading:s,disabled:a,error:c,warning:l,active:u,tabIndex:d})})};var Ms=u(h());const Ns=({label:e,title:t,carat:n,disabled:r,isOpen:i,selected:a})=>{let o;return t?o=t:(typeof e==`string`||typeof e==`number`)&&(o=String(e)),(0,p.jsxs)(`div`,{className:(0,Ms.default)(Yo.trigger,r?Yo.disabled:null,i?Yo.active:null,a?Yo?.selected:null),children:[(0,p.jsx)(`span`,{className:Yo.label,title:o,children:e}),n&&n===ts.RIGHT?(0,p.jsx)(`span`,{className:Yo.arrow,children:(0,p.jsx)(er,{icon:S.CHEVRON_RIGHT})}):n&&n===ts.DOWN?(0,p.jsx)(`span`,{className:Yo.arrow,children:(0,p.jsx)(er,{icon:S.CHEVRON_DOWN})}):null]})};var Ps=u(h());const Fs=({component:e,disabled:t,testId:n})=>(0,p.jsx)(`div`,{className:(0,Ps.default)(Yo.component,t?Yo.disabled:null),"data-testid":n,children:e}),Is=({tooltip:e,error:t,warning:n,children:r})=>!gs(e)&&!gs(t)&&!gs(n)?(0,p.jsx)(p.Fragment,{children:r}):(0,p.jsx)(ya,{error:!!t,warning:!!n,text:e||t||n,display:`inline-block`,children:r}),Ls=f.default.forwardRef(({active:e,isDisabled:t,badgeTitle:n,badgeDot:r,loading:i,width:a,trigger:o,label:s,title:c,onClickTrigger:l,colored:u,small:d,isNested:f,contextMenu:m,component:h,groupOrder:g,fullHeight:v,isOpen:y,error:b,warning:x,tooltip:S,testId:C,selected:w,tabIndex:T,...E},D)=>{let O=o===_.BUTTON||o===_.DROP_DOWN_BUTTON?(0,p.jsx)(js,{trigger:o,label:s??``,colored:u,small:d,width:a,disabled:t,groupOrder:g,loading:i,error:b,warning:x,active:y||e,tabIndex:T}):o===_.TEXT?(0,p.jsx)(Ns,{label:s??``,title:c,disabled:t,carat:m?void 0:f?ts.RIGHT:ts.DOWN,isOpen:y,selected:w}):o===_.COMPONENT?(0,p.jsx)(Fs,{component:h,disabled:t}):null,k=!f&&(n||r)?(0,p.jsx)(ks,{title:n,dot:r,small:!r,children:O}):O;return(0,p.jsx)(`div`,{ref:D,className:Yo.wrapper,style:a?{width:a}:{...v&&{height:`100%`,display:`flex`}},onClick:e=>{e.stopPropagation(),e.preventDefault(),l()},"data-error":b||null,"data-warning":x||null,"data-testid":C,children:(0,p.jsx)(Is,{tooltip:S,error:b,warning:x,children:k})})});var Rs=u(Ra());const zs=e=>{let{sections:t}=e;return!(0,f.isValidElement)(t)&&(!Array.isArray(t)||t.every(e=>(0,Rs.isEmpty)(e)))},Bs=({sections:e,width:t,placement:n,possiblePlacements:r,closeOnOptionClick:i,closeParent:a,tree:o,path:s,groupOrder:c,overflowContainer:l,maxHeight:u,testId:d})=>{let{hasMousePosition:f,resetMousePosition:m,handleMouseEvent:h,trigger:g}=_i(),_=m,v=f,{layerProps:y,renderLayer:b}=Zi({isOpen:v,trigger:g,...ms(n),possiblePlacements:r,ResizeObserver:Qr,onOutsideClick:_,overflowContainer:l}),x=v&&b((0,p.jsx)(`div`,{...y,children:(0,p.jsx)(ps,{isNested:!1,width:t,sections:e,closeOnOptionClick:i,close:a||_,tree:o,path:s,maxHeight:u,testId:d&&`${d}-layer`})}));return[x,h]},Vs=({menu:e,width:t,disabled:n=!1,closeOnOptionClick:r=!0,closeParent:i,tree:a,path:o,groupOrder:s,testId:c})=>{let l=(0,f.useContext)(Ie),{label:u,trigger:d,fullHeightTrigger:m,colored:h,small:g,component:_,placement:v,possiblePlacements:y=[`bottom-start`,`top-start`]}=e,[b,x]=Bs({sections:e.sections,width:t,placement:v,possiblePlacements:y,closeOnOptionClick:r,closeParent:i,tree:a,path:o,groupOrder:s,overflowContainer:!0,maxHeight:void 0,testId:c}),S=n||zs(e)||l;return(0,p.jsxs)(`div`,{onContextMenu:x,"data-testid":c,children:[(0,p.jsx)(Ls,{width:t,fullHeight:m,isDisabled:S,trigger:d,label:u,onClickTrigger:()=>{},colored:h,small:g,isNested:!0,component:_,contextMenu:!0,groupOrder:s}),b]})},Hs=({menu:e,width:t,disabled:n=!1,badgeTitle:r,badgeDot:i=!1,loading:a=!1,isNested:o=!1,closeOnOptionClick:s=!0,closeParent:c,tree:l,path:u,groupOrder:d,overflowContainer:m=!0,maxHeight:h,testId:g,open:_,setOpen:v,tooltip:y,error:b,warning:x,selected:S,tabIndex:C,active:w})=>{let T=(0,f.useContext)(Ie),{label:E,title:D,trigger:O,fullHeightTrigger:k,colored:A,small:j,sections:M,component:N,placement:P,showAllButton:ee,possiblePlacements:te=[`bottom-start`,`top-start`]}=e,[ne,re]=(0,Rs.isBoolean)(_)&&(0,Rs.isFunction)(v)?[_,v]:(0,f.useState)(!1),ie=()=>re(!1),ae=()=>re(!0),{triggerProps:oe,layerProps:se,renderLayer:ce}=Zi({isOpen:ne,...ms(P,o),possiblePlacements:te,ResizeObserver:Qr,onOutsideClick:ie,overflowContainer:m,onParentClose:ie}),le=n||zs(e)||T;ds(l,u,ie);let ue=()=>{if(!le){if(ne){ie();return}us(l,u).forEach(e=>{e.close&&e.close()}),ae()}};return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ls,{ref:oe.ref,isDisabled:le,badgeTitle:r,badgeDot:i,loading:a,width:t,fullHeight:k,trigger:O,label:E,title:D,onClickTrigger:ue,colored:A,small:j,isNested:o,component:N,groupOrder:d,isOpen:ne,active:w,tooltip:y,error:b,warning:x,testId:g,selected:S,tabIndex:C}),ne&&ce((0,p.jsx)(`div`,{...se,className:Yo.layerContainer,"data-testid":e.testId,onClick:e=>e.stopPropagation(),children:(0,p.jsx)(ps,{sections:M,isNested:o,width:t,closeOnOptionClick:s,close:c||ie,tree:l,path:u,maxHeight:h,showAllButton:ee,testId:g&&`${g}-layer`})}))]})},Us=e=>e.contextMenu?(0,p.jsx)(Vs,{...e,tree:{},path:``,testId:e.testId}):(0,p.jsx)(Hs,{...e,tree:{},path:``,testId:e.testId});var Ws=u(h()),Gs=u(Ra());const Ks=e=>{let{subActions:t,subMenuIcon:n,primary:r,testId:i,tooltip:a}=e,o=(0,p.jsx)(_o,{colored:r?!0:y.MUTED,basic:!r,round:!0,small:!0,icon:n||S.MENU,testId:i,tooltip:a});if(t.length){let e={trigger:_.COMPONENT,component:o,sections:t.map(e=>({type:e.type??`Option`,label:e.label,icon:e.icon,testId:e.testId,disabled:e.disabled,menu:e.menu,onClick:t=>{t.stopPropagation(),t.preventDefault(),(0,Gs.isFunction)(e.onClick)&&e.onClick(t)}}))};return(0,p.jsx)(Us,{menu:e})}return null},qs=e=>{let t=(0,f.useContext)(Ie),{actions:n=[],closeLayer:r}=e;return(0,p.jsx)(`div`,{className:(0,Ws.default)(So.actions),children:n.map((e,n)=>{let i=e?.hidden||!e||!Object.keys(e).length;if(!i)return e.childComponent&&f.default.isValidElement(e.childComponent)?(0,p.jsx)(`div`,{"data-testid":e.testId,className:So.childComponent,children:e.childComponent},n):e.subActions?(0,p.jsx)(Ks,{subActions:e.subActions,primary:e.primary,subMenuIcon:e.icon,testId:e.testId,tooltip:e.tooltip},n):(0,p.jsx)(_o,{colored:e.primary?!0:`muted`,round:!0,basic:!e.primary,disabled:e.disabled,small:!0,name:String(e.label),icon:e.icon?e.icon:null,onClick:n=>{r&&r(),n.stopPropagation(),n.preventDefault(),!(e.disabled||t)&&(0,Gs.isFunction)(e.onClick)&&e.onClick(n)},testId:e.testId,tooltip:e.tooltip},n)})})},Js=`_breadcrumb_2k0cd_1`,Ys=`_small_2k0cd_4`,Xs=`_labelContainer_2k0cd_7`,Zs=`_active_2k0cd_17`,Qs=`_disabled_2k0cd_22`,$s=`_separator_2k0cd_27`;var ec={breadcrumb:`_breadcrumb_2k0cd_1`,small:`_small_2k0cd_4`,labelContainer:`_labelContainer_2k0cd_7`,active:`_active_2k0cd_17`,disabled:`_disabled_2k0cd_22`,separator:`_separator_2k0cd_27`};let tc=function(e){return e.LABEL=`label`,e.LINK=`link`,e.CUSTOM=`custom`,e}({});var nc=u(h());const rc=({type:e=tc.LABEL,label:t,url:n,onClick:r,active:i,disabled:a,element:o})=>{let s=(0,f.useContext)(Ie),c=e===tc.LINK&&n!==void 0,l=e===tc.CUSTOM&&(0,f.isValidElement)(o);return(0,p.jsx)(`span`,{onClick:r,className:(0,nc.default)(ec.labelContainer,i&&ec.active,(a||s)&&ec.disabled),children:c?(0,p.jsx)(`a`,{href:n,children:t}):l?o:t})};var ic=u(h());const ac=({links:e,small:t=!1})=>(0,p.jsx)(`div`,{className:(0,ic.default)(ec.breadcrumb,t&&ec.small),children:e.map((t,n)=>{let r=e.length===n+1,{type:i,label:a,url:o,onClick:s,active:c,disabled:l,element:u}=t;return(0,p.jsxs)(`span`,{children:[(0,p.jsx)(rc,{type:i,label:a,url:o,onClick:s,active:c,disabled:l,element:u}),!r&&(0,p.jsx)(`span`,{className:ec.separator,children:`/`})]},n)})}),oc=`_label_iu2wi_1`,sc=`_buttonGroup_iu2wi_11`;var cc={label:`_label_iu2wi_1`,buttonGroup:`_buttonGroup_iu2wi_11`};const lc=e=>{let{basic:t=!1,items:n=[],header:r=``,onSelected:i=()=>{},small:a=!1,value:o=``,testId:s=void 0,disabled:c}=e,l=(0,f.useContext)(Ie),u=(e,t,n,r,a)=>{e.preventDefault(),e.stopPropagation(),!(c||a||l)&&i(t,n,r)},d=(e,t)=>t===`string`?e:t===`object`?e.label:t===`array`?e[1]:null,m=(e,t)=>t===`string`?e:t===`object`?e.value??``:t===`array`?e[0]??``:``,h=(e,t,n)=>t===`object`&&`key`in e?e.key:n,g=(e,t)=>t===`object`?e.hidden:!1,_=(e,t)=>t===`object`?e.icon:void 0,y=(e,t,n)=>e===`object`?String(t)===String(o):n===o,b=()=>{if(r)return(0,p.jsx)(`label`,{className:cc.label,children:r})},x=()=>n.map((e,r)=>{let i=_s(e),o=r===0?v.FIRST:r===n.length-1?v.LAST:v.MIDDLE,s=d(e,i),l=m(e,i),f=h(e,i,l),b=g(e,i),x=_(e,i),S=y(i,f,l),{error:C,maxTooltipWidth:w,testId:T,tooltip:E,warning:D}=e;return b?null:(0,p.jsx)(ya,{error:!!C,warning:!!D,text:E||C||D,maxWidth:w,display:`block`,enabled:E&&gs(E)||C&&gs(C)||D&&gs(D)||!1,children:(0,p.jsx)(_o,{active:S,basic:t,disabled:c||e.disabled,groupOrder:o,icon:x,label:s,onClick:t=>{let n=typeof s==`string`?s:``;u(t,f,l,n,e.disabled||!1)},small:a,testId:T})},r)});return(0,p.jsx)(`div`,{children:(0,p.jsxs)(`div`,{children:[b(),(0,p.jsx)(`div`,{className:cc.buttonGroup,"data-testid":s,children:x()})]})})},oee=`_card_ucdeu_1`,uc=`_bordered_ucdeu_4`,see=`_raised_ucdeu_10`,cee=`_cardHeader_ucdeu_13`,lee=`_cardContentBorderTop_ucdeu_19`,dc=`_padding_ucdeu_22`,fc=`_cardContent_ucdeu_19`;var pc={card:`_card_ucdeu_1`,bordered:`_bordered_ucdeu_4`,raised:`_raised_ucdeu_10`,cardHeader:`_cardHeader_ucdeu_13`,cardContentBorderTop:`_cardContentBorderTop_ucdeu_19`,padding:`_padding_ucdeu_22`,cardContent:`_cardContent_ucdeu_19`},mc=u(h());const hc=({bordered:e=!0,heading:t=null,children:n,margin:r=`0`,padding:i=!0,raised:a=!1})=>(0,p.jsxs)(`div`,{className:(0,mc.default)(pc.card,e?pc.bordered:``,a?pc.raised:``),style:{margin:r},children:[t?(0,p.jsx)(`div`,{className:(0,mc.default)(pc.cardHeader),children:t}):null,(0,p.jsx)(`div`,{className:(0,mc.default)(pc.cardContent,t?pc.cardContentBorderTop:``,i?pc.padding:``),children:n})]});var gc=function(){return gc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},gc.apply(this,arguments)};function _c(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function vc(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var yc=o((()=>{})),bc={};c(bc,{default:()=>Sc});var xc,Sc,Cc=o((()=>{yc(),xc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Sc=vc(function(e){return xc.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})})),wc=s(((exports,t)=>{t.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}})),Tc=`-ms-`,Ec=`-moz-`,Dc=`-webkit-`,Oc=`comm`,kc=`rule`,Ac=`decl`,jc=`@import`,Mc=`@keyframes`,Nc=`@layer`,Pc=Math.abs,Fc=String.fromCharCode,Ic=Object.assign;function Lc(e,t){return Hc(e,0)^45?(((t<<2^Hc(e,0))<<2^Hc(e,1))<<2^Hc(e,2))<<2^Hc(e,3):0}function Rc(e){return e.trim()}function zc(e,t){return(e=t.exec(e))?e[0]:e}function Bc(e,t,n){return e.replace(t,n)}function Vc(e,t,n){return e.indexOf(t,n)}function Hc(e,t){return e.charCodeAt(t)|0}function Uc(e,t,n){return e.slice(t,n)}function Wc(e){return e.length}function Gc(e){return e.length}function Kc(e,t){return t.push(e),e}function qc(e,t){return e.map(t).join(``)}function Jc(e,t){return e.filter(function(e){return!zc(e,t)})}var Yc=1,Xc=1,Zc=0,Qc=0,$c=0,el=``;function tl(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Yc,column:Xc,length:o,return:``,siblings:s}}function nl(e,t){return Ic(tl(``,null,null,``,null,null,0,e.siblings),e,{length:-e.length},t)}function rl(e){for(;e.root;)e=nl(e.root,{children:[e]});Kc(e,e.siblings)}function il(){return $c}function al(){return $c=Qc>0?Hc(el,--Qc):0,Xc--,$c===10&&(Xc=1,Yc--),$c}function ol(){return $c=Qc<Zc?Hc(el,Qc++):0,Xc++,$c===10&&(Xc=1,Yc++),$c}function sl(){return Hc(el,Qc)}function cl(){return Qc}function ll(e,t){return Uc(el,e,t)}function ul(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function dl(e){return Yc=Xc=1,Zc=Wc(el=e),Qc=0,[]}function fl(e){return el=``,e}function pl(e){return Rc(ll(Qc-1,gl(e===91?e+2:e===40?e+1:e)))}function ml(e){for(;($c=sl())&&$c<33;)ol();return ul(e)>2||ul($c)>3?``:` `}function hl(e,t){for(;--t&&ol()&&!($c<48||$c>102||$c>57&&$c<65||$c>70&&$c<97););return ll(e,cl()+(t<6&&sl()==32&&ol()==32))}function gl(e){for(;ol();)switch($c){case e:return Qc;case 34:case 39:e!==34&&e!==39&&gl($c);break;case 40:e===41&&gl(e);break;case 92:ol();break}return Qc}function _l(e,t){for(;ol()&&e+$c!==57&&!(e+$c===84&&sl()===47););return`/*`+ll(t,Qc-1)+`*`+Fc(e===47?e:ol())}function vl(e){for(;!ul(sl());)ol();return ll(e,Qc)}function yl(e){return fl(bl(``,null,null,null,[``],e=dl(e),0,[0],e))}function bl(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=ol()){case 40:if(m!=108&&Hc(C,d-1)==58){Vc(C+=Bc(pl(v),`&`,`&\f`),`&\f`,Pc(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=pl(v);break;case 9:case 10:case 13:case 32:C+=ml(m);break;case 92:C+=hl(cl()-1,7);continue;case 47:switch(sl()){case 42:case 47:Kc(Sl(_l(ol(),cl()),t,n,c),c);break;default:C+=`/`}break;case 123*h:s[l++]=Wc(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=Bc(C,/\f/g,``)),p>0&&Wc(C)-d&&Kc(p>32?Cl(C+`;`,r,n,d-1,c):Cl(Bc(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(Kc(S=xl(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)bl(C,t,S,S,b,a,d,s,x);else switch(f===99&&Hc(C,3)===110?100:f){case 100:case 108:case 109:case 115:bl(e,S,S,r&&Kc(xl(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x);break;default:bl(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Wc(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&al()==125)continue}switch(C+=Fc(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Wc(C)-1)*_,_=1;break;case 64:sl()===45&&(C+=pl(ol())),f=sl(),u=d=Wc(y=C+=vl(cl())),v++;break;case 45:m===45&&Wc(C)==2&&(h=0)}}return a}function xl(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=Gc(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=Uc(e,f+1,f=Pc(g=o[h])),b=e;v<m;++v)(b=Rc(g>0?p[v]+` `+y:Bc(y,/&\f/g,p[v])))&&(c[_++]=b);return tl(e,t,n,i===0?kc:s,c,l,u,d)}function Sl(e,t,n,r){return tl(e,t,n,Oc,Fc(il()),Uc(e,2,-2),0,r)}function Cl(e,t,n,r,i){return tl(e,t,n,Ac,Uc(e,0,r),Uc(e,r+1,-1),r,i)}function wl(e,t,n){switch(Lc(e,t)){case 5103:return Dc+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Dc+e+e;case 4789:return Ec+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Dc+e+Ec+e+Tc+e+e;case 5936:switch(Hc(e,t+11)){case 114:return Dc+e+Tc+Bc(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return Dc+e+Tc+Bc(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return Dc+e+Tc+Bc(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}case 6828:case 4268:case 2903:return Dc+e+Tc+e+e;case 6165:return Dc+e+Tc+`flex-`+e+e;case 5187:return Dc+e+Bc(e,/(\w+).+(:[^]+)/,Dc+`box-$1$2`+Tc+`flex-$1$2`)+e;case 5443:return Dc+e+Tc+`flex-item-`+Bc(e,/flex-|-self/g,``)+(zc(e,/flex-|baseline/)?``:Tc+`grid-row-`+Bc(e,/flex-|-self/g,``))+e;case 4675:return Dc+e+Tc+`flex-line-pack`+Bc(e,/align-content|flex-|-self/g,``)+e;case 5548:return Dc+e+Tc+Bc(e,`shrink`,`negative`)+e;case 5292:return Dc+e+Tc+Bc(e,`basis`,`preferred-size`)+e;case 6060:return Dc+`box-`+Bc(e,`-grow`,``)+Dc+e+Tc+Bc(e,`grow`,`positive`)+e;case 4554:return Dc+Bc(e,/([^-])(transform)/g,`$1`+Dc+`$2`)+e;case 6187:return Bc(Bc(Bc(e,/(zoom-|grab)/,Dc+`$1`),/(image-set)/,Dc+`$1`),e,``)+e;case 5495:case 3959:return Bc(e,/(image-set\([^]*)/,Dc+"$1$`$1");case 4968:return Bc(Bc(e,/(.+:)(flex-)?(.*)/,Dc+`box-pack:$3`+Tc+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+Dc+e+e;case 4200:if(!zc(e,/flex-|baseline/))return Tc+`grid-column-align`+Uc(e,t)+e;break;case 2592:case 3360:return Tc+Bc(e,`template-`,``)+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,zc(e.props,/grid-\w+-end/)})?~Vc(e+(n=n[t].value),`span`,0)?e:Tc+Bc(e,`-start`,``)+e+Tc+`grid-row-span:`+(~Vc(n,`span`,0)?zc(n,/\d+/):zc(n,/\d+/)-+zc(e,/\d+/))+`;`:Tc+Bc(e,`-start`,``)+e;case 4896:case 4128:return n&&n.some(function(e){return zc(e.props,/grid-\w+-start/)})?e:Tc+Bc(Bc(e,`-end`,`-span`),`span `,``)+e;case 4095:case 3583:case 4068:case 2532:return Bc(e,/(.+)-inline(.+)/,Dc+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Wc(e)-1-t>6)switch(Hc(e,t+1)){case 109:if(Hc(e,t+4)!==45)break;case 102:return Bc(e,/(.+:)(.+)-([^]+)/,`$1`+Dc+`$2-$3$1`+Ec+(Hc(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Vc(e,`stretch`,0)?wl(Bc(e,`stretch`,`fill-available`),t,n)+e:e}break;case 5152:case 5920:return Bc(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,i,a,o,s){return Tc+n+`:`+r+s+(i?Tc+n+`-span:`+(a?o:o-+r)+s:``)+e});case 4949:if(Hc(e,t+6)===121)return Bc(e,`:`,`:`+Dc)+e;break;case 6444:switch(Hc(e,Hc(e,14)===45?18:11)){case 120:return Bc(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,`$1`+Dc+(Hc(e,14)===45?`inline-`:``)+`box$3$1`+Dc+`$2$3$1`+Tc+`$2box$3`)+e;case 100:return Bc(e,`:`,`:`+Tc)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Bc(e,`scroll-`,`scroll-snap-`)+e}return e}function Tl(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function El(e,t,n,r){switch(e.type){case Nc:if(e.children.length)break;case jc:case Ac:return e.return=e.return||e.value;case Oc:return``;case Mc:return e.return=e.value+`{`+Tl(e.children,r)+`}`;case kc:if(!Wc(e.value=e.props.join(`,`)))return``}return Wc(n=Tl(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Dl(e){var t=Gc(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Ol(e){return function(t){t.root||(t=t.return)&&e(t)}}function kl(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Ac:e.return=wl(e.value,e.length,n);return;case Mc:return Tl([nl(e,{value:Bc(e.value,`@`,`@`+Dc)})],r);case kc:if(e.length)return qc(n=e.props,function(t){switch(zc(t,r=/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:rl(nl(e,{props:[Bc(t,/:(read-\w+)/,`:`+Ec+`$1`)]})),rl(nl(e,{props:[t]})),Ic(e,{props:Jc(n,r)});break;case`::placeholder`:rl(nl(e,{props:[Bc(t,/:(plac\w+)/,`:`+Dc+`input-$1`)]})),rl(nl(e,{props:[Bc(t,/:(plac\w+)/,`:`+Ec+`$1`)]})),rl(nl(e,{props:[Bc(t,/:(plac\w+)/,Tc+`input-$1`)]})),rl(nl(e,{props:[t]})),Ic(e,{props:Jc(n,r)});break}return``})}}var Al=u(wc());Cc();var jl={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ml=typeof process<`u`&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||`data-styled`,Nl=`active`,Pl=`data-styled-version`,Fl=`6.1.15`,Il=`/*!sc*/
|
|
37
|
+
`,Ll=typeof window<`u`&&`HTMLElement`in window,Rl=!!(typeof SC_DISABLE_SPEEDY==`boolean`?SC_DISABLE_SPEEDY:typeof process<`u`&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==``?process.env.REACT_APP_SC_DISABLE_SPEEDY!==`false`&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<`u`&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==``?process.env.SC_DISABLE_SPEEDY!==`false`&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!==`production`),zl={},Bl=/invalid hook call/i,Vl=new Set,Hl=function(e,t){if(process.env.NODE_ENV!==`production`){var n=t?` with the id of "${t}"`:``,r=`The component ${e}${n} has been created dynamically.
|
|
38
|
+
You may see this warning because you've called styled inside another component.
|
|
39
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`,i=console.error;try{var a=!0;console.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Bl.test(e)?(a=!1,Vl.delete(r)):i.apply(void 0,_c([e],t,!1))},(0,f.useRef)(),a&&!Vl.has(r)&&(console.warn(r),Vl.add(r))}catch(e){Bl.test(e.message)&&Vl.delete(r)}finally{console.error=i}}},Ul=Object.freeze([]),Wl=Object.freeze({});function Gl(e,t,n){return n===void 0&&(n=Wl),e.theme!==n.theme&&e.theme||t||n.theme}var Kl=new Set(`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.track.u.ul.use.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`)),ql=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Jl=/(^-|-$)/g;function Yl(e){return e.replace(ql,`-`).replace(Jl,``)}var Xl=/(a)(d)/gi,Zl=52,Ql=function(e){return String.fromCharCode(e+(e>25?39:97))};function $l(e){var t,n=``;for(t=Math.abs(e);t>Zl;t=t/Zl|0)n=Ql(t%Zl)+n;return(Ql(t%Zl)+n).replace(Xl,`$1-$2`)}var eu,tu=5381,nu=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ru=function(e){return nu(tu,e)};function iu(e){return $l(ru(e)>>>0)}function au(e){return process.env.NODE_ENV!==`production`&&typeof e==`string`&&e||e.displayName||e.name||`Component`}function ou(e){return typeof e==`string`&&(process.env.NODE_ENV===`production`||e.charAt(0)===e.charAt(0).toLowerCase())}var su=typeof Symbol==`function`&&Symbol.for,cu=su?Symbol.for(`react.memo`):60115,lu=su?Symbol.for(`react.forward_ref`):60112,uu={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},du={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fu={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},pu=((eu={})[lu]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},eu[cu]=fu,eu);function mu(e){return(`type`in(t=e)&&t.type.$$typeof)===cu?fu:`$$typeof`in e?pu[e.$$typeof]:uu;var t}var hu=Object.defineProperty,gu=Object.getOwnPropertyNames,_u=Object.getOwnPropertySymbols,vu=Object.getOwnPropertyDescriptor,yu=Object.getPrototypeOf,bu=Object.prototype;function xu(e,t,n){if(typeof t!=`string`){if(bu){var r=yu(t);r&&r!==bu&&xu(e,r,n)}var i=gu(t);_u&&(i=i.concat(_u(t)));for(var a=mu(e),o=mu(t),s=0;s<i.length;++s){var c=i[s];if(!(c in du||n&&n[c]||o&&c in o||a&&c in a)){var l=vu(t,c);try{hu(e,c,l)}catch{}}}}return e}function Su(e){return typeof e==`function`}function Cu(e){return typeof e==`object`&&`styledComponentId`in e}function wu(e,t){return e&&t?`${e} ${t}`:e||t||``}function Tu(e,t){if(e.length===0)return``;for(var n=e[0],r=1;r<e.length;r++)n+=t?t+e[r]:e[r];return n}function Eu(e){return typeof e==`object`&&!!e&&e.constructor.name===Object.name&&!(`props`in e&&e.$$typeof)}function Du(e,t,n){if(n===void 0&&(n=!1),!n&&!Eu(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=Du(e[r],t[r]);else if(Eu(t))for(var r in t)e[r]=Du(e[r],t[r]);return e}function Ou(e,t){Object.defineProperty(e,`toString`,{value:t})}var ku=process.env.NODE_ENV===`production`?{}:{1:`Cannot create styled-component for component: %s.
|
|
40
|
+
|
|
41
|
+
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
42
|
+
|
|
43
|
+
- Are you trying to reuse it across renders?
|
|
44
|
+
- Are you accidentally calling collectStyles twice?
|
|
45
|
+
|
|
46
|
+
`,3:`Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
|
|
47
|
+
|
|
48
|
+
`,4:`The \`StyleSheetManager\` expects a valid target or sheet prop!
|
|
49
|
+
|
|
50
|
+
- Does this error occur on the client and is your target falsy?
|
|
51
|
+
- Does this error occur on the server and is the sheet falsy?
|
|
52
|
+
|
|
53
|
+
`,5:`The clone method cannot be used on the client!
|
|
54
|
+
|
|
55
|
+
- Are you running in a client-like environment on the server?
|
|
56
|
+
- Are you trying to run SSR on the client?
|
|
57
|
+
|
|
58
|
+
`,6:`Trying to insert a new style tag, but the given Node is unmounted!
|
|
59
|
+
|
|
60
|
+
- Are you using a custom target that isn't mounted?
|
|
61
|
+
- Does your document not have a valid head element?
|
|
62
|
+
- Have you accidentally removed a style tag manually?
|
|
63
|
+
|
|
64
|
+
`,7:`ThemeProvider: Please return an object from your "theme" prop function, e.g.
|
|
65
|
+
|
|
66
|
+
\`\`\`js
|
|
67
|
+
theme={() => ({})}
|
|
68
|
+
\`\`\`
|
|
69
|
+
|
|
70
|
+
`,8:`ThemeProvider: Please make your "theme" prop an object.
|
|
71
|
+
|
|
72
|
+
`,9:`Missing document \`<head>\`
|
|
73
|
+
|
|
74
|
+
`,10:`Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
|
|
75
|
+
|
|
76
|
+
`,11:`_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
|
|
77
|
+
|
|
78
|
+
`,12:`It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\`\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css
|
|
79
|
+
|
|
80
|
+
`,13:`%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
|
|
81
|
+
|
|
82
|
+
`,14:`ThemeProvider: "theme" prop is required.
|
|
83
|
+
|
|
84
|
+
`,15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:`Reached the limit of how many styled components may be created at group %s.
|
|
85
|
+
You may only create up to 1,073,741,824 components. If you're creating components dynamically,
|
|
86
|
+
as for instance in your render method then you may be running into this limitation.
|
|
87
|
+
|
|
88
|
+
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
89
|
+
Has styled-components' style tag been unmounted or altered by another script?
|
|
90
|
+
`,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"};function Au(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],i=1,a=e.length;i<a;i+=1)r.push(e[i]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e)}),n}function ju(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return process.env.NODE_ENV===`production`?Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(`, `)}`:``}`):Error(Au.apply(void 0,_c([ku[e]],t,!1)).trim())}var Mu=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)if((i<<=1)<0)throw ju(16,`${e}`);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var a=r;a<i;a++)this.groupSizes[a]=0}for(var o=this.indexOfGroup(e+1),s=(a=0,t.length);a<s;a++)this.tag.insertRule(o,t[a])&&(this.groupSizes[e]++,o++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var i=n;i<r;i++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t=``;if(e>=this.length||this.groupSizes[e]===0)return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,a=r;a<i;a++)t+=`${this.tag.getRule(a)}${Il}`;return t},e}(),Nu=1<<30,Pu=new Map,Fu=new Map,Iu=1,Lu=function(e){if(Pu.has(e))return Pu.get(e);for(;Fu.has(Iu);)Iu++;var t=Iu++;if(process.env.NODE_ENV!==`production`&&((0|t)<0||t>Nu))throw ju(16,`${t}`);return Pu.set(e,t),Fu.set(t,e),t},Ru=function(e,t){Iu=t+1,Pu.set(e,t),Fu.set(t,e)},zu=`style[${Ml}][${Pl}="${Fl}"]`,Bu=RegExp(`^${Ml}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Vu=function(e,t,n){for(var r,i=n.split(`,`),a=0,o=i.length;a<o;a++)(r=i[a])&&e.registerName(t,r)},Hu=function(e,t){for(var n,r=((n=t.textContent)??``).split(Il),i=[],a=0,o=r.length;a<o;a++){var s=r[a].trim();if(s){var c=s.match(Bu);if(c){var l=0|parseInt(c[1],10),u=c[2];l!==0&&(Ru(u,l),Vu(e,u,c[3]),e.getTag().insertRules(l,i)),i.length=0}else i.push(s)}}},Uu=function(e){for(var t=document.querySelectorAll(zu),n=0,r=t.length;n<r;n++){var i=t[n];i&&i.getAttribute(Ml)!==Nl&&(Hu(e,i),i.parentNode&&i.parentNode.removeChild(i))}};function Wu(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:null}var Gu=function(e){var t=document.head,n=e||t,r=document.createElement(`style`),i=function(e){var t=Array.from(e.querySelectorAll(`style[${Ml}]`));return t[t.length-1]}(n),a=i===void 0?null:i.nextSibling;r.setAttribute(Ml,Nl),r.setAttribute(Pl,Fl);var o=Wu();return o&&r.setAttribute(`nonce`,o),n.insertBefore(r,a),r},Ku=function(){function e(e){this.element=Gu(e),this.element.appendChild(document.createTextNode(``)),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var i=t[n];if(i.ownerNode===e)return i}throw ju(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:``},e}(),qu=function(){function e(e){this.element=Gu(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:``},e}(),Ju=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:``},e}(),Yu=Ll,Xu={isServer:!Ll,useCSSOMInjection:!Rl},Zu=function(){function e(e,t,n){e===void 0&&(e=Wl),t===void 0&&(t={});var r=this;this.options=gc(gc({},Xu),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&Ll&&Yu&&(Yu=!1,Uu(this)),Ou(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r=``,i=function(n){var i=function(e){return Fu.get(e)}(n);if(i===void 0)return`continue`;var a=e.names.get(i),o=t.getGroup(n);if(a===void 0||!a.size||o.length===0)return`continue`;var s=`${Ml}.g${n}[id="${i}"]`,c=``;a!==void 0&&a.forEach(function(e){e.length>0&&(c+=`${e},`)}),r+=`${o}${s}{content:"${c}"}${Il}`},a=0;a<n;a++)i(a);return r}(r)})}return e.registerId=function(e){return Lu(e)},e.prototype.rehydrate=function(){!this.server&&Ll&&Uu(this)},e.prototype.reconstructWithOptions=function(t,n){return n===void 0&&(n=!0),new e(gc(gc({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new Ju(n):t?new Ku(n):new qu(n)}(this.options),new Mu(e));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(Lu(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Lu(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(Lu(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),Qu=/&/g,$u=/^\s*\/\/.*$/gm;function ed(e,t){return e.map(function(e){return e.type===`rule`&&(e.value=`${t} ${e.value}`,e.value=e.value.replaceAll(`,`,`,${t} `),e.props=e.props.map(function(e){return`${t} ${e}`})),Array.isArray(e.children)&&e.type!==`@keyframes`&&(e.children=ed(e.children,t)),e})}function td(e){var t,n,r,i=e===void 0?Wl:e,a=i.options,o=a===void 0?Wl:a,s=i.plugins,c=s===void 0?Ul:s,l=function(e,r,i){return i.startsWith(n)&&i.endsWith(n)&&i.replaceAll(n,``).length>0?`.${t}`:e},u=c.slice();u.push(function(e){e.type===kc&&e.value.includes(`&`)&&(e.props[0]=e.props[0].replace(Qu,n).replace(r,l))}),o.prefix&&u.push(kl),u.push(El);var d=function(e,i,a,s){i===void 0&&(i=``),a===void 0&&(a=``),s===void 0&&(s=`&`),t=s,n=i,r=RegExp(`\\${n}\\b`,`g`);var c=e.replace($u,``),l=yl(a||i?`${a} ${i} { ${c} }`:c);o.namespace&&(l=ed(l,o.namespace));var d=[];return Tl(l,Dl(u.concat(Ol(function(e){return d.push(e)})))),d};return d.hash=c.length?c.reduce(function(e,t){return t.name||ju(15),nu(e,t.name)},tu).toString():``,d}var nd=new Zu,rd=td(),id=f.default.createContext({shouldForwardProp:void 0,styleSheet:nd,stylis:rd}),ad=id.Consumer,od=f.default.createContext(void 0);function sd(){return(0,f.useContext)(id)}function cd(e){var t=(0,f.useState)(e.stylisPlugins),n=t[0],r=t[1],i=sd().styleSheet,a=(0,f.useMemo)(function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target,i]),o=(0,f.useMemo)(function(){return td({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})},[e.enableVendorPrefixes,e.namespace,n]);(0,f.useEffect)(function(){(0,Al.default)(n,e.stylisPlugins)||r(e.stylisPlugins)},[e.stylisPlugins]);var s=(0,f.useMemo)(function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:a,stylis:o}},[e.shouldForwardProp,a,o]);return f.default.createElement(id.Provider,{value:s},f.default.createElement(od.Provider,{value:o},e.children))}var ld=function(){function e(e,t){var n=this;this.inject=function(e,t){t===void 0&&(t=rd);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,`@keyframes`))},this.name=e,this.id=`sc-keyframes-${e}`,this.rules=t,Ou(this,function(){throw ju(12,String(n.name))})}return e.prototype.getName=function(e){return e===void 0&&(e=rd),this.name+e.hash},e}(),ud=function(e){return e>=`A`&&e<=`Z`};function dd(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];if(n===1&&r===`-`&&e[0]===`-`)return e;ud(r)?t+=`-`+r.toLowerCase():t+=r}return t.startsWith(`ms-`)?`-`+t:t}var fd=function(e){return e==null||!1===e||e===``},pd=function(e){var t,n,r=[];for(var i in e){var a=e[i];e.hasOwnProperty(i)&&!fd(a)&&(Array.isArray(a)&&a.isCss||Su(a)?r.push(`${dd(i)}:`,a,`;`):Eu(a)?r.push.apply(r,_c(_c([`${i} {`],pd(a),!1),[`}`],!1)):r.push(`${dd(i)}: ${t=i,(n=a)==null||typeof n==`boolean`||n===``?``:typeof n!=`number`||n===0||t in jl||t.startsWith(`--`)?String(n).trim():`${n}px`};`))}return r};function md(e,t,n,r){if(fd(e))return[];if(Cu(e))return[`.${e.styledComponentId}`];if(Su(e)){if(!Su(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var i=e(t);return process.env.NODE_ENV===`production`||typeof i!=`object`||Array.isArray(i)||i instanceof ld||Eu(i)||i===null||console.error(`${au(e)} is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.`),md(i,t,n,r)}var a;return e instanceof ld?n?(e.inject(n,r),[e.getName(r)]):[e]:Eu(e)?pd(e):Array.isArray(e)?Array.prototype.concat.apply(Ul,e.map(function(e){return md(e,t,n,r)})):[e.toString()]}function hd(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Su(n)&&!Cu(n))return!1}return!0}var gd=ru(Fl),_d=function(){function e(e,t,n){this.rules=e,this.staticRulesId=``,this.isStatic=process.env.NODE_ENV===`production`&&(n===void 0||n.isStatic)&&hd(e),this.componentId=t,this.baseHash=nu(gd,t),this.baseStyle=n,Zu.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):``;if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=wu(r,this.staticRulesId);else{var i=Tu(md(this.rules,e,t,n)),a=$l(nu(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,a)){var o=n(i,`.${a}`,void 0,this.componentId);t.insertRules(this.componentId,a,o)}r=wu(r,a),this.staticRulesId=a}else{for(var s=nu(this.baseHash,n.hash),c=``,l=0;l<this.rules.length;l++){var u=this.rules[l];if(typeof u==`string`)c+=u,process.env.NODE_ENV!==`production`&&(s=nu(s,u));else if(u){var d=Tu(md(u,e,t,n));s=nu(s,d+l),c+=d}}if(c){var f=$l(s>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(c,`.${f}`,void 0,this.componentId)),r=wu(r,f)}}return r},e}(),vd=f.default.createContext(void 0),uee=vd.Consumer,yd={},bd=new Set;function xd(e,t,n){var r=Cu(e),i=e,a=!ou(e),o=t.attrs,s=o===void 0?Ul:o,c=t.componentId,l=c===void 0?function(e,t){var n=typeof e==`string`?Yl(e):`sc`;yd[n]=(yd[n]||0)+1;var r=`${n}-${iu(Fl+n+yd[n])}`;return t?`${t}-${r}`:r}(t.displayName,t.parentComponentId):c,u=t.displayName,d=u===void 0?function(e){return ou(e)?`styled.${e}`:`Styled(${au(e)})`}(e):u,p=t.displayName&&t.componentId?`${Yl(t.displayName)}-${t.componentId}`:t.componentId||l,m=r&&i.attrs?i.attrs.concat(s).filter(Boolean):s,h=t.shouldForwardProp;if(r&&i.shouldForwardProp){var g=i.shouldForwardProp;if(t.shouldForwardProp){var _=t.shouldForwardProp;h=function(e,t){return g(e,t)&&_(e,t)}}else h=g}var v=new _d(n,p,r?i.componentStyle:void 0);function y(e,t){return function(e,t,n){var r=e.attrs,i=e.componentStyle,a=e.defaultProps,o=e.foldedComponentIds,s=e.styledComponentId,c=e.target,l=f.default.useContext(vd),u=sd(),d=e.shouldForwardProp||u.shouldForwardProp;process.env.NODE_ENV!==`production`&&(0,f.useDebugValue)(s);var p=Gl(t,l,a)||Wl,m=function(e,t,n){for(var r,i=gc(gc({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var o=Su(r=e[a])?r(i):r;for(var s in o)i[s]=s===`className`?wu(i[s],o[s]):s===`style`?gc(gc({},i[s]),o[s]):o[s]}return t.className&&(i.className=wu(i.className,t.className)),i}(r,t,p),h=m.as||c,g={};for(var _ in m)m[_]===void 0||_[0]===`$`||_===`as`||_===`theme`&&m.theme===p||(_===`forwardedAs`?g.as=m.forwardedAs:d&&!d(_,h)||(g[_]=m[_],d||process.env.NODE_ENV!==`development`||Sc(_)||bd.has(_)||!Kl.has(h)||(bd.add(_),console.warn(`styled-components: it looks like an unknown prop "${_}" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via \`<StyleSheetManager shouldForwardProp={...}>\` (connect an API like \`@emotion/is-prop-valid\`) or consider using transient props (\`\$\` prefix for automatic filtering.)`))));var v=function(e,t){var n=sd(),r=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return process.env.NODE_ENV!==`production`&&(0,f.useDebugValue)(r),r}(i,m);process.env.NODE_ENV!==`production`&&e.warnTooManyClasses&&e.warnTooManyClasses(v);var y=wu(o,s);return v&&(y+=` `+v),m.className&&(y+=` `+m.className),g[ou(h)&&!Kl.has(h)?`class`:`className`]=y,n&&(g.ref=n),(0,f.createElement)(h,g)}(b,e,t)}y.displayName=d;var b=f.default.forwardRef(y);return b.attrs=m,b.componentStyle=v,b.displayName=d,b.shouldForwardProp=h,b.foldedComponentIds=r?wu(i.foldedComponentIds,i.styledComponentId):``,b.styledComponentId=p,b.target=r?i.target:e,Object.defineProperty(b,`defaultProps`,{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=r?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=t;r<i.length;r++)Du(e,i[r],!0);return e}({},i.defaultProps,e):e}}),process.env.NODE_ENV!==`production`&&(Hl(d,p),b.warnTooManyClasses=function(e,t){var n={},r=!1;return function(i){if(!r&&(n[i]=!0,Object.keys(n).length>=200)){var a=t?` with the id of "${t}"`:``;console.warn(`Over 200 classes were generated for component ${e}${a}.
|
|
91
|
+
Consider using the attrs method, together with a style object for frequently changed styles.
|
|
92
|
+
Example:
|
|
93
|
+
const Component = styled.div.attrs(props => ({
|
|
94
|
+
style: {
|
|
95
|
+
background: props.background,
|
|
96
|
+
},
|
|
97
|
+
}))\`width: 100%;\`
|
|
98
|
+
|
|
99
|
+
<Component />`),r=!0,n={}}}}(d,p)),Ou(b,function(){return`.${b.styledComponentId}`}),a&&xu(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function Sd(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}var Cd=function(e){return Object.assign(e,{isCss:!0})};function wd(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(Su(e)||Eu(e))return Cd(md(Sd(Ul,_c([e],t,!0))));var r=e;return t.length===0&&r.length===1&&typeof r[0]==`string`?md(r):Cd(md(Sd(r,t)))}function Td(e,t,n){if(n===void 0&&(n=Wl),!t)throw ju(1,t);var r=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];return e(t,n,wd.apply(void 0,_c([r],i,!1)))};return r.attrs=function(r){return Td(e,t,gc(gc({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return Td(e,t,gc(gc({},n),r))},r}var Ed=function(e){return Td(xd,e)},Dd=Ed;Kl.forEach(function(e){Dd[e]=Ed(e)});var Od=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=hd(e),Zu.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,n,r){var i=r(Tu(md(this.rules,t,n,r)),``),a=this.componentId+e;n.insertRules(a,a,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,n,r){e>2&&Zu.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),kd=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return``;var n=Wu(),r=Tu([n&&`nonce="${n}"`,`${Ml}="true"`,`${Pl}="${Fl}"`].filter(Boolean),` `);return`<style ${r}>${t}</style>`},this.getStyleTags=function(){if(e.sealed)throw ju(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw ju(2);var n=e.instance.toString();if(!n)return[];var r=((t={})[Ml]=``,t[Pl]=Fl,t.dangerouslySetInnerHTML={__html:n},t),i=Wu();return i&&(r.nonce=i),[f.default.createElement(`style`,gc({},r,{key:`sc-0-0`}))]},this.seal=function(){e.sealed=!0},this.instance=new Zu({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw ju(2);return f.default.createElement(cd,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw ju(3)},e}(),Ad={StyleSheet:Zu,mainSheet:nd};process.env.NODE_ENV!==`production`&&typeof navigator<`u`&&navigator.product===`ReactNative`&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
100
|
+
Perhaps you're looking to import 'styled-components/native'?
|
|
101
|
+
Read more about this at https://www.styled-components.com/docs/basics#react-native`);var jd=`__sc-${Ml}__`;process.env.NODE_ENV!==`production`&&process.env.NODE_ENV!==`test`&&typeof window<`u`&&(window[jd]||(window[jd]=0),window[jd]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
102
|
+
|
|
103
|
+
See https://s-c.sh/2BAXzed for more info.`),window[jd]+=1);const Md=wd`
|
|
104
|
+
scrollbar-width: none;
|
|
105
|
+
-ms-overflow-style: none;
|
|
106
|
+
&::-webkit-scrollbar {
|
|
107
|
+
display: none;
|
|
108
|
+
}
|
|
109
|
+
`,Nd=Dd.div`
|
|
110
|
+
position: relative; // for react-laag
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
min-width: 0;
|
|
114
|
+
flex-basis: ${e=>e.$width||`auto`};
|
|
115
|
+
flex-grow: ${e=>!e.$width&&e.$flex?`1`:`0`};
|
|
116
|
+
flex-shrink: ${e=>e.$width||!e.$flex?`0`:`1`};
|
|
117
|
+
overflow: ${e=>e.$scroll?`auto`:`initial`};
|
|
118
|
+
background: ${e=>e.$background};
|
|
119
|
+
border-left: ${e=>e.$borderLeft===!0?`1px solid var(--color-border)`:e.$borderLeft};
|
|
120
|
+
border-right: ${e=>e.$borderRight===!0?`1px solid var(--color-border)`:e.$borderRight};
|
|
121
|
+
padding: ${e=>e.$spacing?`0 calc(${e.$spacing} / 2)`:`0`};
|
|
122
|
+
${e=>!e.$showScrollbar&&Md}
|
|
123
|
+
|
|
124
|
+
@media (max-width: 992px) {
|
|
125
|
+
${e=>e.$widthTablet&&`flex-basis: ${e.$widthTablet};`}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (max-width: 575px) {
|
|
129
|
+
${e=>e.$widthMobile&&`flex-basis: ${e.$widthMobile};`}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
> .inner {
|
|
133
|
+
flex-basis: 100%;
|
|
134
|
+
position: relative;
|
|
135
|
+
z-index: 0;
|
|
136
|
+
min-height: 0;
|
|
137
|
+
display: ${e=>e.$flexbox&&!e.$scroll?`flex`:`block`};
|
|
138
|
+
${e=>e.$flexbox&&`flex-direction: column;`}
|
|
139
|
+
padding: ${e=>e.$padding===!0?`var(--padding)`:e.$padding};
|
|
140
|
+
}
|
|
141
|
+
`,Pd=({background:e=`transparent`,borderLeft:t,borderRight:n,children:r=null,flex:i=!0,flexbox:a=!1,padding:o=!1,scroll:s=!1,showScrollbar:c=!0,spacing:l=`var(--padding)`,width:u,widthMobile:d,widthTablet:f,testId:m})=>{let h=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:void 0,g=Nd;return(0,p.jsx)(g,{$background:e,$borderLeft:t,$borderRight:n,$flex:i,$flexbox:a,$padding:o,$scroll:s,$showScrollbar:c,$spacing:l,$width:h(u),$widthTablet:h(f),$widthMobile:h(d),children:(0,p.jsx)(`div`,{className:`inner`,"data-testid":m,children:r})})},Fd=`_divider_2bfzh_1`,Id=`_alignLeft_2bfzh_12`,dee=`_alignRight_2bfzh_15`;var Ld={divider:`_divider_2bfzh_1`,alignLeft:`_alignLeft_2bfzh_12`,alignRight:`_alignRight_2bfzh_15`};const Rd=`_bold_11ofj_1`,zd=`_center_11ofj_4`,Bd=`_muted_11ofj_7`,Vd=`_faint_11ofj_10`,Hd=`_success_11ofj_13`,Ud=`_warning_11ofj_16`,Wd=`_error_11ofj_19`,Gd=`_small_11ofj_22`,Kd=`_link_11ofj_25`;var qd={bold:`_bold_11ofj_1`,center:`_center_11ofj_4`,muted:`_muted_11ofj_7`,faint:`_faint_11ofj_10`,success:`_success_11ofj_13`,warning:`_warning_11ofj_16`,error:`_error_11ofj_19`,small:`_small_11ofj_22`,link:`_link_11ofj_25`},Jd=u(h());const Yd=({children:e,bold:t=!1,center:n=!1,error:r=!1,faint:i=!1,link:a=!1,muted:o=!1,onClick:s,small:c=!1,success:l=!1,warning:u=!1})=>(0,p.jsx)(`span`,{className:(0,Jd.default)(t&&qd.bold,n&&qd.center,r&&qd.error,i&&qd.faint,a&&qd.link,o&&qd.muted,s&&qd.clickable,c&&qd.small,l&&qd.success,u&&qd.warning),onClick:s,children:e}),Xd=e=>{switch(e){case b.LEFT:return Ld.alignLeft;case b.RIGHT:return Ld.alignRight;default:return``}},Zd=({children:e,margin:t=`var(--padding)`,color:n=`var(--color-border)`,align:r=b.CENTER})=>(0,p.jsx)(`div`,{className:`${Ld.divider} ${Xd(r)}`,style:{marginTop:t,marginBottom:t,"--color":n},children:typeof e==`string`?(0,p.jsx)(Yd,{muted:!0,children:e}):e}),Qd=`_heading_yhdiy_1`,$d=`_top_yhdiy_10`,ef=`_icons_yhdiy_20`;var tf={heading:`_heading_yhdiy_1`,top:`_top_yhdiy_10`,icons:`_icons_yhdiy_20`},nf=u(h());const rf=({children:e,helpText:t,onClick:n,onClickHelp:r,onIconClick:i,icon:a,libraryIcon:o,marginBottom:s,top:c=!1,testId:l})=>{let u=!!t||!!r;return(0,p.jsxs)(`div`,{className:(0,nf.default)(tf.heading,c?tf.top:``),style:{marginBottom:s},onClick:n,"data-testid":l,children:[e,(0,p.jsxs)(`div`,{className:tf.icons,children:[a&&(0,p.jsx)(Ea,{onClick:i,icon:a}),u&&(0,p.jsx)(Ea,{text:t,onClick:r}),o&&(0,p.jsx)(Ea,{text:o?.tooltip??``,onClick:o.onClick,icon:S.LIBRARY})]})]})},af=`_dialog_xouqi_1`,sf=`_inline_xouqi_18`,cf=`_scroll_xouqi_21`,lf=`_header_xouqi_24`,uf=`_dismiss_xouqi_33`,df=`_subheading_xouqi_38`,ff=`_content_xouqi_41`,pf=`_footer_xouqi_50`;var mf={dialog:`_dialog_xouqi_1`,inline:`_inline_xouqi_18`,scroll:`_scroll_xouqi_21`,header:`_header_xouqi_24`,dismiss:`_dismiss_xouqi_33`,subheading:`_subheading_xouqi_38`,content:`_content_xouqi_41`,footer:`_footer_xouqi_50`},hf=u(h()),gf=u(Ra());const _f=e=>(0,gf.isArray)(e)?e.map((e,t)=>(0,p.jsxs)(f.Fragment,{children:[e,` `,(0,p.jsx)(`br`,{})]},t)):e,vf=({dialog:e})=>{let{heading:t,subheading:n,content:r,contentPadding:i=`var(--padding)`,footer:a,scroll:o,width:s,height:c,onClose:l,testId:u}=e;return(0,p.jsxs)(`div`,{className:(0,hf.default)(mf.dialog,s?mf.inline:null,o?mf.scroll:null),style:{width:s,height:c},"data-testid":u??null,children:[(0,p.jsxs)(`div`,{className:mf.header,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(rf,{testId:u&&`${u}-heading`,top:!0,marginBottom:0,children:t}),(0,p.jsx)(`div`,{className:mf.subheading,children:n})]}),l?(0,p.jsx)(`div`,{className:mf.dismiss,children:(0,p.jsx)(_o,{icon:S.CLOSE,round:!0,basic:!0,small:!0,colored:`muted`,onClick:l,testId:u&&`${u}-dismiss`,ignoreDisabledContext:!0})}):null]}),(0,p.jsx)(`div`,{"data-testid":u&&`${u}-content`,className:mf.content,style:{padding:i},children:_f(r)}),a&&(0,p.jsx)(`div`,{"data-testid":u&&`${u}-footer`,className:mf.footer,children:a})]})},fee=`_inputInTable_1f40p_1`,pee=`_inputHover_1f40p_13`,mee=`_inputFocus_1f40p_18`,hee=`_inputError_1f40p_25`,gee=`_inputWarning_1f40p_26`,_ee=`_inputDisabled_1f40p_61`,vee=`_hideScrollbars_1f40p_67`,yee=`_inline_1f40p_90`,bee=`_left_1f40p_93`,xee=`_right_1f40p_96`,yf=`_fixed_1f40p_99`,bf=`_border_1f40p_111`,xf=`_shadow_1f40p_117`,See=`_drawerContent_1f40p_120`,Cee=`_isResizing_1f40p_132`,wee=`_toggleButton_1f40p_143`,Sf=`_top_1f40p_156`,Tee=`_bottom_1f40p_159`,Eee=`_toggleButtonOpen_1f40p_162`,Dee=`_tabs_1f40p_165`,Cf=`_tab_1f40p_165`,wf=`_active_1f40p_197`,Oee=`_disabled_1f40p_222`,kee=`_tabsContent_1f40p_229`,Aee=`_resizeHandle_1f40p_235`;var Tf={inputInTable:`_inputInTable_1f40p_1`,inputHover:`_inputHover_1f40p_13`,inputFocus:`_inputFocus_1f40p_18`,inputError:`_inputError_1f40p_25`,inputWarning:`_inputWarning_1f40p_26`,inputDisabled:`_inputDisabled_1f40p_61`,hideScrollbars:`_hideScrollbars_1f40p_67`,inline:`_inline_1f40p_90`,left:`_left_1f40p_93`,right:`_right_1f40p_96`,fixed:`_fixed_1f40p_99`,border:`_border_1f40p_111`,shadow:`_shadow_1f40p_117`,drawerContent:`_drawerContent_1f40p_120`,isResizing:`_isResizing_1f40p_132`,toggleButton:`_toggleButton_1f40p_143`,top:`_top_1f40p_156`,bottom:`_bottom_1f40p_159`,toggleButtonOpen:`_toggleButtonOpen_1f40p_162`,tabs:`_tabs_1f40p_165`,tab:`_tab_1f40p_165`,active:`_active_1f40p_197`,disabled:`_disabled_1f40p_222`,tabsContent:`_tabsContent_1f40p_229`,resizeHandle:`_resizeHandle_1f40p_235`},Ef=u(h()),Df=u(Ra());const Of=({badge:e,children:t})=>e?(0,p.jsx)(ks,{small:!0,margin:4,title:e.toString(),children:t}):(0,p.jsx)(p.Fragment,{children:t}),kf=({tabs:e,activeTab:t,open:n,background:r,handleTabClick:i,width:a,testId:o})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{className:Tf.tabs,children:e.map((e,a)=>(0,Df.isNil)(e)||(0,Df.isEmpty)(e)?null:(0,p.jsx)(`div`,{className:(0,Ef.default)(Tf.tab,t===a&&n?Tf.active:``,e.disabled?Tf.disabled:``),style:{background:r},onClick:e.disabled?void 0:()=>i(a),"data-testid":o&&`${o}-icon-${a}`,children:(0,p.jsx)(Of,{badge:e.badge,children:e.icon})},a))}),e.map((e,r)=>{if((0,Df.isNil)(e)||(0,Df.isEmpty)(e))return null;let i=t===r;return(0,p.jsx)(`div`,{style:{width:typeof a==`number`?`${a}px`:a},className:Tf.tabsContent,"data-testid":o&&`${o}-content-${r}`,children:i&&n&&e.content},r)})]});var Af={};c(Af,{clsx:()=>Mf,default:()=>Nf});function jf(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=jf(e[t]))&&(r&&(r+=` `),r+=n);else for(t in e)e[t]&&(r&&(r+=` `),r+=t);return r}function Mf(){for(var e,t,n=0,r=``;n<arguments.length;)(e=arguments[n++])&&(t=jf(e))&&(r&&(r+=` `),r+=t);return r}var Nf,Pf=o((()=>{Nf=Mf})),Ff=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.dontSetMe=a,exports.findInArray=t,exports.int=i,exports.isFunction=n,exports.isNum=r;function t(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function n(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Function]`}function r(e){return typeof e==`number`&&!isNaN(e)}function i(e){return parseInt(e,10)}function a(e,t,n){if(e[t])return Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}})),If=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.browserPrefixToKey=r,exports.browserPrefixToStyle=i,exports.getPrefix=n;let t=[`Moz`,`Webkit`,`O`,`ms`];function n(){var e;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`transform`;if(typeof window>`u`)return``;let i=(e=window.document)==null||(e=e.documentElement)==null?void 0:e.style;if(!i||n in i)return``;for(let e=0;e<t.length;e++)if(r(n,t[e])in i)return t[e];return``}function r(e,t){return t?`${t}${a(e)}`:e}function i(e,t){return t?`-${t.toLowerCase()}-${e}`:e}function a(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}exports.default=n()})),Lf=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.addClassName=S,exports.addEvent=c,exports.addUserSelectStyles=b,exports.createCSSTransform=h,exports.createSVGTransform=g,exports.getTouch=v,exports.getTouchIdentifier=y,exports.getTranslation=_,exports.innerHeight=f,exports.innerWidth=p,exports.matchesSelector=o,exports.matchesSelectorAndParentsTo=s,exports.offsetXYFromParent=m,exports.outerHeight=u,exports.outerWidth=d,exports.removeClassName=C,exports.removeEvent=l,exports.removeUserSelectStyles=x;var t=Ff(),n=i(If());function r(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function i(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!==`default`&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}let a=``;function o(e,n){return a||=(0,t.findInArray)([`matches`,`webkitMatchesSelector`,`mozMatchesSelector`,`msMatchesSelector`,`oMatchesSelector`],function(n){return(0,t.isFunction)(e[n])}),(0,t.isFunction)(e[a])?e[a](n):!1}function s(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}function c(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent(`on`+t,n):e[`on`+t]=n}function l(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent(`on`+t,n):e[`on`+t]=null}function u(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderTopWidth),n+=(0,t.int)(r.borderBottomWidth),n}function d(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderLeftWidth),n+=(0,t.int)(r.borderRightWidth),n}function f(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingTop),n-=(0,t.int)(r.paddingBottom),n}function p(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingLeft),n-=(0,t.int)(r.paddingRight),n}function m(e,t,n){let r=t===t.ownerDocument.body,i=r?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-i.left)/n,o=(e.clientY+t.scrollTop-i.top)/n;return{x:a,y:o}}function h(e,t){let r=_(e,t,`px`);return{[(0,n.browserPrefixToKey)(`transform`,n.default)]:r}}function g(e,t){let n=_(e,t,``);return n}function _(e,t,n){let{x:r,y:i}=e,a=`translate(${r}${n},${i}${n})`;if(t){let e=`${typeof t.x==`string`?t.x:t.x+n}`,r=`${typeof t.y==`string`?t.y:t.y+n}`;a=`translate(${e}, ${r})`+a}return a}function v(e,n){return e.targetTouches&&(0,t.findInArray)(e.targetTouches,e=>n===e.identifier)||e.changedTouches&&(0,t.findInArray)(e.changedTouches,e=>n===e.identifier)}function y(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function b(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;}
|
|
142
|
+
`,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
143
|
+
`,e.getElementsByTagName(`head`)[0].appendChild(t)),e.body&&S(e.body,`react-draggable-transparent-selection`)}function x(e){if(e)try{if(e.body&&C(e.body,`react-draggable-transparent-selection`),e.selection)e.selection.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function S(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function C(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}})),Rf=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.canDragX=a,exports.canDragY=o,exports.createCoreData=c,exports.createDraggableData=l,exports.getBoundPosition=r,exports.getControlPosition=s,exports.snapToGrid=i;var t=Ff(),n=Lf();function r(e,r,i){if(!e.props.bounds)return[r,i];let{bounds:a}=e.props;a=typeof a==`string`?a:u(a);let o=d(e);if(typeof a==`string`){let{ownerDocument:e}=o,r=e.defaultView,i;if(i=a===`parent`?o.parentNode:e.querySelector(a),!(i instanceof r.HTMLElement))throw Error(`Bounds selector "`+a+`" could not find an element.`);let s=i,c=r.getComputedStyle(o),l=r.getComputedStyle(s);a={left:-o.offsetLeft+(0,t.int)(l.paddingLeft)+(0,t.int)(c.marginLeft),top:-o.offsetTop+(0,t.int)(l.paddingTop)+(0,t.int)(c.marginTop),right:(0,n.innerWidth)(s)-(0,n.outerWidth)(o)-o.offsetLeft+(0,t.int)(l.paddingRight)-(0,t.int)(c.marginRight),bottom:(0,n.innerHeight)(s)-(0,n.outerHeight)(o)-o.offsetTop+(0,t.int)(l.paddingBottom)-(0,t.int)(c.marginBottom)}}return(0,t.isNum)(a.right)&&(r=Math.min(r,a.right)),(0,t.isNum)(a.bottom)&&(i=Math.min(i,a.bottom)),(0,t.isNum)(a.left)&&(r=Math.max(r,a.left)),(0,t.isNum)(a.top)&&(i=Math.max(i,a.top)),[r,i]}function i(e,t,n){let r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]}function a(e){return e.props.axis===`both`||e.props.axis===`x`}function o(e){return e.props.axis===`both`||e.props.axis===`y`}function s(e,t,r){let i=typeof t==`number`?(0,n.getTouch)(e,t):null;if(typeof t==`number`&&!i)return null;let a=d(r),o=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,n.offsetXYFromParent)(i||e,o,r.props.scale)}function c(e,n,r){let i=!(0,t.isNum)(e.lastX),a=d(e);return i?{node:a,deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}:{node:a,deltaX:n-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:n,y:r}}function l(e,t){let 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}}function u(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function d(e){let t=e.findDOMNode();if(!t)throw Error(`<DraggableCore>: Unmounted during event!`);return t}})),zf=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.default=t;function t(){}})),Bf=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0});var t=u(require(`react`)),n=c(Oe()),r=c(require(`react-dom`)),i=Lf(),a=Rf(),o=Ff(),s=c(zf());function c(e){return e&&e.__esModule?e:{default:e}}function l(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!==`default`&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function d(e,t,n){return t=f(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=p(e,`string`);return typeof t==`symbol`?t:String(t)}function p(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}let m={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},h=m.mouse;var g=class extends t.Component{constructor(){super(...arguments),d(this,`dragging`,!1),d(this,`lastX`,NaN),d(this,`lastY`,NaN),d(this,`touchIdentifier`,null),d(this,`mounted`,!1),d(this,`handleDragStart`,e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&typeof e.button==`number`&&e.button!==0)return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(`<DraggableCore> not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;e.type===`touchstart`&&e.preventDefault();let r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;let o=(0,a.getControlPosition)(e,r,this);if(o==null)return;let{x:c,y:l}=o,u=(0,a.createCoreData)(this,c,l);(0,s.default)(`DraggableCore: handleDragStart: %j`,u),(0,s.default)(`calling`,this.props.onStart);let d=this.props.onStart(e,u);d===!1||this.mounted===!1||(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=c,this.lastY=l,(0,i.addEvent)(n,h.move,this.handleDrag),(0,i.addEvent)(n,h.stop,this.handleDragStop))}),d(this,`handleDrag`,e=>{let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)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,a.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=(0,a.createCoreData)(this,n,r);(0,s.default)(`DraggableCore: handleDrag: %j`,i);let o=this.props.onDrag(e,i);if(o===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r}),d(this,`handleDragStop`,e=>{if(!this.dragging)return;let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,a.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let o=(0,a.createCoreData)(this,n,r),c=this.props.onStop(e,o);if(c===!1||this.mounted===!1)return!1;let l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(l.ownerDocument),(0,s.default)(`DraggableCore: handleDragStop: %j`,o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,s.default)(`DraggableCore: Removing handlers`),(0,i.removeEvent)(l.ownerDocument,h.move,this.handleDrag),(0,i.removeEvent)(l.ownerDocument,h.stop,this.handleDragStop))}),d(this,`onMouseDown`,e=>(h=m.mouse,this.handleDragStart(e))),d(this,`onMouseUp`,e=>(h=m.mouse,this.handleDragStop(e))),d(this,`onTouchStart`,e=>(h=m.touch,this.handleDragStart(e))),d(this,`onTouchEnd`,e=>(h=m.touch,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&(0,i.addEvent)(e,m.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;(0,i.removeEvent)(t,m.mouse.move,this.handleDrag),(0,i.removeEvent)(t,m.touch.move,this.handleDrag),(0,i.removeEvent)(t,m.mouse.stop,this.handleDragStop),(0,i.removeEvent)(t,m.touch.stop,this.handleDragStop),(0,i.removeEvent)(e,m.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return(e=this.props)!=null&&e.nodeRef?(t=this.props)==null||(t=t.nodeRef)==null?void 0:t.current:r.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};exports.default=g,d(g,`displayName`,`DraggableCore`),d(g,`propTypes`,{allowAnyClick:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),d(g,`defaultProps`,{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})})),Vf=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),Object.defineProperty(exports,`DraggableCore`,{enumerable:!0,get:function(){return c.default}}),exports.default=void 0;var t=p(require(`react`)),n=u(Oe()),r=u(require(`react-dom`)),i=u((Pf(),d(Af))),a=Lf(),o=Rf(),s=Ff(),c=u(Bf()),l=u(zf());function u(e){return e&&e.__esModule?e:{default:e}}function f(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}function p(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!==`default`&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function m(){return m=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},m.apply(this,arguments)}function h(e,t,n){return t=g(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=_(e,`string`);return typeof t==`symbol`?t:String(t)}function _(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var v=class 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)?((0,l.default)(`Draggable: getDerivedStateFromProps %j`,{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}}):null}constructor(e){super(e),h(this,`onDragStart`,(e,t)=>{(0,l.default)(`Draggable: onDragStart: %j`,t);let n=this.props.onStart(e,(0,o.createDraggableData)(this,t));if(n===!1)return!1;this.setState({dragging:!0,dragged:!0})}),h(this,`onDrag`,(e,t)=>{if(!this.state.dragging)return!1;(0,l.default)(`Draggable: onDrag: %j`,t);let n=(0,o.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=(0,o.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=a,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}let i=this.props.onDrag(e,n);if(i===!1)return!1;this.setState(r)}),h(this,`onDragStop`,(e,t)=>{if(!this.state.dragging)return!1;let n=this.props.onStop(e,(0,o.createDraggableData)(this,t));if(n===!1)return!1;(0,l.default)(`Draggable: onDragStop: %j`,t);let r={dragging:!1,slackX:0,slackY:0},i=!!this.props.position;if(i){let{x:e,y:t}=this.props.position;r.x=e,r.y=t}this.setState(r)}),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(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return(e=(t=this.props)==null||(t=t.nodeRef)==null?void 0:t.current)??r.default.findDOMNode(this)}render(){let{axis:e,bounds:n,children:r,defaultPosition:s,defaultClassName:l,defaultClassNameDragging:u,defaultClassNameDragged:d,position:f,positionOffset:p,scale:h,...g}=this.props,_={},v=null,y=!!f,b=!y||this.state.dragging,x=f||s,S={x:(0,o.canDragX)(this)&&b?this.state.x:x.x,y:(0,o.canDragY)(this)&&b?this.state.y:x.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(S,p):_=(0,a.createCSSTransform)(S,p);let C=(0,i.default)(r.props.className||``,l,{[u]:this.state.dragging,[d]:this.state.dragged});return t.createElement(c.default,m({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,..._},transform:v}))}};exports.default=v,h(v,`displayName`,`Draggable`),h(v,`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:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),h(v,`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})})),Hf=s(((exports,t)=>{let{default:n,DraggableCore:r}=Vf();t.exports=n,t.exports.default=n,t.exports.DraggableCore=r})),Uf=s((exports=>{exports.__esModule=!0,exports.cloneElement=c;var t=n(require(`react`));function n(e){return e&&e.__esModule?e:{default:e}}function r(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 i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?r(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t,n){return t=o(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=s(e,`string`);return typeof t==`symbol`?t:String(t)}function s(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function c(e,n){return n.style&&e.props.style&&(n.style=i(i({},e.props.style),n.style)),n.className&&e.props.className&&(n.className=e.props.className+` `+n.className),t.default.cloneElement(e,n)}})),Wf=s((exports=>{exports.__esModule=!0;var t=n(Oe());Hf();function n(e){return e&&e.__esModule?e:{default:e}}var r={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=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0];if(i.axis===`both`||i.axis===`y`){var a;return(a=t.default.number).isRequired.apply(a,n)}return 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=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0];if(i.axis===`both`||i.axis===`x`){var a;return(a=t.default.number).isRequired.apply(a,n)}return t.default.number.apply(t.default,n)}};exports.resizableProps=r})),Gf=s((exports=>{exports.__esModule=!0;var t=s(require(`react`)),n=Hf(),r=Uf(),i=Wf(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!==`default`&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}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 l(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function u(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 d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?u(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t,n){return t=p(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=m(e,`string`);return typeof t==`symbol`?t:String(t)}function m(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,g(e,t)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var _=function(e){h(i,e);function i(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.handleRefs={},t.lastHandleRect=null,t.slack=null,t}var o=i.prototype;return o.componentWillUnmount=function(){this.resetData()},o.resetData=function(){this.lastHandleRect=this.slack=null},o.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,i=n.maxConstraints,a=n.lockAspectRatio;if(!r&&!i&&!a)return[e,t];if(a){var o=this.props.width/this.props.height,s=e-this.props.width,c=t-this.props.height;Math.abs(s)>Math.abs(c*o)?t=e/o:e=t*o}var l=e,u=t,d=this.slack||[0,0],f=d[0],p=d[1];return e+=f,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[f+(l-e),p+(u-t)],[e,t]},o.resizeHandler=function(e,t){var n=this;return function(r,i){var a=i.node,o=i.deltaX,s=i.deltaY;e===`onResizeStart`&&n.resetData();var c=(n.props.axis===`both`||n.props.axis===`x`)&&t!==`n`&&t!==`s`,l=(n.props.axis===`both`||n.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!(!c&&!l)){var u=t[0],d=t[t.length-1],f=a.getBoundingClientRect();if(n.lastHandleRect!=null){if(d===`w`){var p=f.left-n.lastHandleRect.left;o+=p}if(u===`n`){var m=f.top-n.lastHandleRect.top;s+=m}}n.lastHandleRect=f,d===`w`&&(o=-o),u===`n`&&(s=-s);var h=n.props.width+(c?o/n.props.transformScale:0),g=n.props.height+(l?s/n.props.transformScale:0),_=n.runConstraints(h,g);h=_[0],g=_[1];var v=h!==n.props.width||g!==n.props.height,y=typeof n.props[e]==`function`?n.props[e]:null,b=e===`onResize`&&!v;y&&!b&&(r.persist==null||r.persist(),y(r,{node:a,size:{width:h,height:g},handle:t})),e===`onResizeStop`&&n.resetData()}}},o.renderResizeHandle=function(e,n){var r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);var i=typeof r.type==`string`,a=d({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)},o.render=function(){var e=this,i=this.props,o=i.children,s=i.className,u=i.draggableOpts;i.width,i.height,i.handle,i.handleSize,i.lockAspectRatio,i.axis,i.minConstraints,i.maxConstraints,i.onResize,i.onResizeStop,i.onResizeStart;var f=i.resizeHandles;i.transformScale;var p=l(i,a);return(0,r.cloneElement)(o,d(d({},p),{},{className:(s?s+` `:``)+`react-resizable`,children:[].concat(o.props.children,f.map(function(r){var i,a=(i=e.handleRefs[r])??(e.handleRefs[r]=t.createRef());return t.createElement(n.DraggableCore,c({},u,{nodeRef:a,key:`resizableHandle-`+r,onStop:e.resizeHandler(`onResizeStop`,r),onStart:e.resizeHandler(`onResizeStart`,r),onDrag:e.resizeHandler(`onResize`,r)}),e.renderResizeHandle(r,a))}))}))},i}(t.Component);exports.default=_,_.propTypes=i.resizableProps,_.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Kf=s((exports=>{exports.__esModule=!0;var t=c(require(`react`)),n=o(Oe()),r=o(Gf()),i=Wf(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!==`default`&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}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 u(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 d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?u(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t,n){return t=p(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=m(e,`string`);return typeof t==`symbol`?t:String(t)}function m(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function h(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_(e,t)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}var v=function(e){g(n,e);function n(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.state={width:t.props.width,height:t.props.height,propsWidth:t.props.width,propsHeight:t.props.height},t.onResize=function(e,n){var r=n.size;t.props.onResize?(e.persist==null||e.persist(),t.setState(r,function(){return t.props.onResize&&t.props.onResize(e,n)})):t.setState(r)},t}n.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};var i=n.prototype;return i.render=function(){var e=this.props,n=e.handle,i=e.handleSize;e.onResize;var o=e.onResizeStart,s=e.onResizeStop,c=e.draggableOpts,u=e.minConstraints,f=e.maxConstraints,p=e.lockAspectRatio,m=e.axis;e.width,e.height;var g=e.resizeHandles,_=e.style,v=e.transformScale,y=h(e,a);return t.createElement(r.default,{axis:m,draggableOpts:c,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:u,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:g,transformScale:v,width:this.state.width},t.createElement(`div`,l({},y,{style:d(d({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))},n}(t.Component);exports.default=v,v.propTypes=d(d({},i.resizableProps),{},{children:n.default.element})})),qf=s(((exports,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Gf().default,t.exports.ResizableBox=Kf().default})),Jf=u(qf());const Yf=35,Xf=240;var Zf=u(Ra());const Qf=(0,f.forwardRef)((e,t)=>{let{handleAxis:n,...r}=e;return(0,p.jsx)(`div`,{ref:t,className:Tf.resizeHandle,...r,children:(0,p.jsx)(er,{icon:S.DRAG})})}),$f=Jf.Resizable,ep=({children:e=null,width:t=400,right:n=!1,onResize:r,setOpen:i,maxOpenWidth:a})=>{let[o,s]=(0,f.useState)(!1),c=a??window.innerWidth/2,l=(e,{size:t})=>{r&&r(t.width)};return r?(0,p.jsx)($f,{width:(0,Zf.toNumber)(t),height:100,minConstraints:[35,1/0],maxConstraints:[c,1/0],onResize:l,handle:(0,p.jsx)(Qf,{}),resizeHandles:n?[`w`]:[`e`],axis:`x`,className:o?Tf.isResizing:``,onResizeStart:()=>{i&&i(!0),r&&r(t),s(!0)},onResizeStop:()=>{s(!1),typeof t==`number`&&t<85&&i&&i(!1)},children:e}):(0,p.jsx)(p.Fragment,{children:e})};var tp=u(h());const np=({background:e=`var(--color-background-raised)`,fixed:t=!1,open:n=!1,setOpen:r,right:i=!1,width:a=400,closedWidth:o=0,shadow:s=!1,top:c=0,button:l=null,buttonAnimate:u=!0,buttonPosition:d=x.BOTTOM,border:m=!1,children:h=null,tabs:g,defaultTabIndex:_=0,activeTab:v,setActiveTab:y,testId:b,onResize:C,getActiveTab:w,onClose:T,onOpen:E,maxOpenWidth:D})=>{let O=l===!0,k=!O&&(0,f.isValidElement)(l),[A,j]=r?[n,r]:O||g?(0,f.useState)(n):[n,()=>{}],[M,N]=(0,f.useState)(_),P=r?n:A,ee=r||j,te=y===void 0?M:v,ne=y||N,re=Array.isArray(a)?a[te||0]:a,ie=P?re:g?35:o,ae=e=>{let t=t=>{g&&t&&t(g[e])};if(te===e&&P&&ee)t(T),ee(!1);else if(!P&&ee&&(t(E),ee(!0),C)){let e=e=>{let t;if(t=Array.isArray(e)?e[te||0]:e,typeof t==`number`&&t<240)C(240);else if(typeof t==`string`){let e=parseInt(t,10);!isNaN(e)&&e<240&&C(240)}};e(a)}ne(e),t(w)};return(0,p.jsx)(ep,{width:ie,onResize:C,setOpen:ee,right:i,maxOpenWidth:D,children:(0,p.jsxs)(`div`,{className:(0,tp.default)(Tf.drawer,s?Tf.shadow:``,t?Tf.fixed:Tf.inline,i?Tf.right:Tf.left),style:{top:c},children:[(0,p.jsx)(`div`,{className:(0,tp.default)(Tf.drawerContent,m&&Tf.border),style:{background:e,borderColor:typeof m==`string`?m:void 0,width:ie},children:g?(0,p.jsx)(kf,{width:re,testId:b,tabs:g,open:P,activeTab:te||0,background:e,handleTabClick:ae}):(0,p.jsx)(`div`,{style:{width:re},children:h})}),l&&(0,p.jsx)(`span`,{className:(0,tp.default)(Tf.toggleButton,A&&(O||k&&u)?Tf.toggleButtonOpen:``,d===`top`?Tf.top:Tf.bottom),children:k?l:(0,p.jsx)(_o,{onClick:ee?()=>ee(!P):void 0,round:!0,icon:i?S.CHEVRON_RIGHT:S.CHEVRON_LEFT})})]})})},rp=`_inputGroup_biuoa_1`;var ip={inputGroup:`_inputGroup_biuoa_1`},ap=u(h());const op=e=>(0,f.isValidElement)(e)&&typeof e.type==`string`,sp=({children:e,small:t=!1,width:n=`100%`})=>{let r=Array.isArray(e)?e.filter(e=>(0,f.isValidElement)(e)):[e],i=r.map((e,n)=>{let i=op(e),{groupOrder:a}=i?{groupOrder:null}:e.props,o=r.length,s=n===0,c=n===o-1,l=!o||o===1,u=a||(l?null:s?v.FIRST:c?v.LAST:v.MIDDLE);return i?e:(0,p.jsx)(f.Fragment,{children:f.default.cloneElement(e,{groupOrder:u,small:t})},n)});return(0,p.jsx)(`div`,{className:(0,ap.default)(ip.inputGroup),style:{width:n},children:i})},jee=`_inputInTable_1285q_1`,Mee=`_inputHover_1285q_13`,Nee=`_inputFocus_1285q_18`,Pee=`_inputError_1285q_25`,Fee=`_inputWarning_1285q_26`,Iee=`_inputDisabled_1285q_61`,Lee=`_hideScrollbars_1285q_67`,Ree=`_input_1285q_1`,zee=`_isInTable_1285q_100`,Bee=`_small_1285q_124`,Vee=`_right_1285q_170`,Hee=`_groupOrderFirst_1285q_173`,Uee=`_groupOrderMiddle_1285q_174`,Wee=`_groupOrderLast_1285q_175`;var cp={inputInTable:`_inputInTable_1285q_1`,inputHover:`_inputHover_1285q_13`,inputFocus:`_inputFocus_1285q_18`,inputError:`_inputError_1285q_25`,inputWarning:`_inputWarning_1285q_26`,inputDisabled:`_inputDisabled_1285q_61`,hideScrollbars:`_hideScrollbars_1285q_67`,input:`_input_1285q_1`,isInTable:`_isInTable_1285q_100`,small:`_small_1285q_124`,right:`_right_1285q_170`,groupOrderFirst:`_groupOrderFirst_1285q_173`,groupOrderMiddle:`_groupOrderMiddle_1285q_174`,groupOrderLast:`_groupOrderLast_1285q_175`},lp=u(h()),up=u(Ra());const dp=(0,f.forwardRef)(({error:e=null,tooltip:t=null,isInTable:n,width:r=void 0,small:i=!1,onChange:a=up.noop,placeholder:o=``,value:s=``,onKeyPress:c=()=>{},onFocus:l=()=>{},onBlur:u=()=>{},onPaste:d=()=>{},onKeyDown:m=()=>{},selectOnFocus:h=!0,name:g=void 0,type:_=`text`,tabIndex:y=0,disabled:b=!1,right:x=!1,warning:S=null,groupOrder:C=null,maxTooltipWidth:w=void 0,testId:T=void 0,size:E=null},D)=>{let O=(0,f.useContext)(Ie),k=(()=>{if(C)switch(C){case v.FIRST:return cp.groupOrderFirst;case v.LAST:return cp.groupOrderLast;default:return cp.groupOrderMiddle}return``})(),A=r||(E?`auto`:`100%`),j=e=>{l(e),h&&setTimeout(()=>{e.target===document.activeElement&&e.target.select()},0)};return(0,p.jsx)(`div`,{style:{width:A},className:k,children:(0,p.jsx)(ya,{error:!!e,warning:!!S,text:t||e||S,enabled:t&&gs(t)||e&&gs(e)||S&&gs(S)||!1,maxWidth:w,display:`block`,children:(0,p.jsx)(`input`,{ref:D,type:_||`text`,size:E||20,placeholder:o??``,value:s??``,onChange:a,onKeyPress:c,onKeyDown:m,onFocus:j,onBlur:u,onPaste:d,name:g,tabIndex:y,autoComplete:`off`,disabled:b||O,className:(0,lp.default)(cp.input,x?cp.right:``,i?cp.small:``,n?cp.isInTable:``),style:{width:A},"data-error":e||null,"data-warning":S||null,"data-testid":T})})})}),Gee=`_fileInput_1elar_1`;var fp={fileInput:`_fileInput_1elar_1`};let pp=function(e){return e.READ_AS_TEXT=`readAsText`,e.READ_AS_ARRAY_BUFFER=`readAsArrayBuffer`,e.READ_AS_DATA_URL=`readAsDataURL`,e.READ_AS_BINARY_STRING=`readAsBinaryString`,e}({});var mp=u(Ra());const hp=(e=new Blob,t=pp.READ_AS_TEXT)=>{let n=new FileReader;return new Promise((r,i)=>{if(t in n)n[t](e);else{i(Error(`Invalid FileReader method`));return}n.onload=()=>{n.result===null?i(Error(`File reading resulted in null`)):r(n.result)},n.onerror=e=>i(e)})},gp=(e,t)=>{let n;return e?(n=t?`Selected - ${Object.keys(e)?.length} files`:e?.name,n||null):null},_p=({label:e=`Select`,loading:t=!1,placeholder:n=`No file selected`,disabled:r=!1,file:i,accept:a,multi:o,name:s,width:c,onChange:l=mp.noop,testId:u})=>{let d=(0,f.useContext)(Ie),m=(0,f.useRef)(null),h=gp(i,o),g=()=>{r||d||m.current?.click()},_=e=>{let{files:t}=e.target,n=o?t?[...t]:null:t?.[0],r={...e,target:{...e.target,value:n,name:e.target.name}};l(r),m.current&&(m.current.value=``)};return(0,p.jsxs)(`div`,{onClick:g,style:{width:c},children:[(0,p.jsxs)(sp,{children:[(0,p.jsx)(dp,{value:h||``,placeholder:n,disabled:!0}),(0,p.jsx)(_o,{label:e,loading:t,disabled:t||r||d,groupOrder:`last`})]}),(0,p.jsx)(`input`,{name:s,ref:m,className:fp.fileInput,type:`file`,accept:a,multiple:o,onChange:_,"data-testid":u})]})},vp=({height:e=`var(--padding)`,width:t=null,flex:n=!1})=>(0,p.jsx)(`div`,{style:{height:e,width:t||`auto`,flexGrow:n?1:0,flexShrink:0,display:t?`inline-block`:`block`}}),yp=(e,t,n=[],r)=>{(0,f.useEffect)(()=>{let n=n=>{let i=n?.key?.toLowerCase()===e?.toLowerCase(),a=r?.ctrl??!1,o=r?.meta??!1,s=n?.ctrlKey,c=n?.metaKey,l=!a&&!o||a&&s||o&&c;i&&l&&t()};return window.addEventListener(`keydown`,n),()=>{window.removeEventListener(`keydown`,n)}},n)},bp=({id:e,children:t})=>{let n=document.querySelector(`#${e}`),[r,i]=(0,f.useState)(!1);return(0,f.useLayoutEffect)(()=>{r||i(!0)},[e]),n?(0,m.createPortal)(t,n):null},Kee=`_wrapper_sb0hc_1`,qee=`_contentContainer_sb0hc_15`,Jee=`_centered_sb0hc_24`,Yee=`_newLine_sb0hc_28`;var xp={wrapper:`_wrapper_sb0hc_1`,contentContainer:`_contentContainer_sb0hc_15`,centered:`_centered_sb0hc_24`,newLine:`_newLine_sb0hc_28`},Sp=u(h());const Cp=({children:e})=>{let t=(0,f.useRef)(null);return(0,f.useEffect)(()=>{if(t.current){let e=t.current.querySelector(`[tabindex="0"]`);e?e.focus():t.current.focus()}},[]),(0,p.jsx)(`div`,{ref:t,tabIndex:-1,className:(0,Sp.default)(xp.wrapper),children:e})},wp=({children:e,width:t,centered:n})=>(0,p.jsx)(`div`,{className:(0,Sp.default)(xp.contentContainer,n?xp.centered:``),style:{maxWidth:t},children:e}),Tp=({children:e,visible:t=!1,centered:n=!1,width:r=`100%`,onEnter:i,onEscape:a})=>{let o=`modalContainer`;return(0,f.useEffect)(()=>{if(document.getElementById(o))return;let e=document.createElement(`div`);return e.id=o,document.body.insertBefore(e,document.body.firstChild),()=>{document.body.removeChild(e)}},[]),yp(`Enter`,()=>{t&&i&&i()},[t,i]),yp(`Escape`,()=>{t&&a&&a()},[t,a]),(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(bp,{id:o,children:t?(0,p.jsx)(Cp,{children:(0,p.jsx)(wp,{width:r,centered:n,children:e})}):null})})},Xee=`_progress_23ror_1`,Zee=`_inverted_23ror_9`,Qee=`_bar_23ror_12`,$ee=`_grey_23ror_23`,ete=`_red_23ror_26`,tte=`_colored_23ror_29`,nte=`_orange_23ror_30`,rte=`_yellow_23ror_33`,ite=`_green_23ror_36`,ate=`_label_23ror_39`;var Ep={progress:`_progress_23ror_1`,inverted:`_inverted_23ror_9`,bar:`_bar_23ror_12`,grey:`_grey_23ror_23`,red:`_red_23ror_26`,colored:`_colored_23ror_29`,orange:`_orange_23ror_30`,yellow:`_yellow_23ror_33`,green:`_green_23ror_36`,label:`_label_23ror_39`},Dp=u(h());const Op=e=>e<20?Ep.grey:e<40?Ep.red:e<60?Ep.orange:e<80?Ep.yellow:Ep.green,kp=({width:e=`auto`,inverted:t=!1,colored:n=!0,showProgressColors:r=!1,percentage:i=0,noLabel:a=!1})=>(0,p.jsx)(`div`,{style:{width:e},"data-percent":i,children:(0,p.jsxs)(`div`,{className:(0,Dp.default)(Ep.progress,t?Ep.inverted:``),style:{width:e},children:[(0,p.jsx)(`div`,{className:(0,Dp.default)(Ep.bar,r?Op(i):n?Ep.colored:``),style:{width:`${i}%`},children:(0,p.jsx)(`div`,{className:Ep.label,children:!a&&`${i}%`})}),(0,p.jsx)(`div`,{className:Ep.label,children:!a&&`${i}%`})]})});typeof BigInt>`u`&&(BigInt=function(e){if(isNaN(e))throw Error(``);return e});const R=BigInt(0),Ap=BigInt(1),jp=BigInt(2),Mp=BigInt(5),Np=BigInt(10),ote=2e3,z={s:Ap,n:R,d:Ap};function Pp(e,t){try{e=BigInt(e)}catch{throw Gp()}return e*t}function Fp(e){return typeof e==`bigint`?e:Math.floor(e)}function Ip(e,t){if(t===R)throw Wp();let n=Object.create(Up.prototype);n.s=e<R?-Ap:Ap,e=e<R?-e:e;let r=Hp(e,t);return n.n=e/r,n.d=t/r,n}function Lp(e){let t={},n=e,r=jp,i=Mp-Ap;for(;i<=n;){for(;n%r===R;)n/=r,t[r]=(t[r]||R)+Ap;i+=Ap+jp*r++}return n===e?t[e]=(t[e]||R)+Ap:n>1&&(t[n]=(t[n]||R)+Ap),t}const Rp=function(e,t){let n=R,r=Ap,i=Ap;if(e!=null)if(t!==void 0){if(typeof e==`bigint`)n=e;else if(isNaN(e))throw Gp();else if(e%1!=0)throw Kp();else n=BigInt(e);if(typeof t==`bigint`)r=t;else if(isNaN(t))throw Gp();else if(t%1!=0)throw Kp();else r=BigInt(t);i=n*r}else if(typeof e==`object`){if(`d`in e&&`n`in e)n=BigInt(e.n),r=BigInt(e.d),`s`in e&&(n*=BigInt(e.s));else if(0 in e)n=BigInt(e[0]),1 in e&&(r=BigInt(e[1]));else if(typeof e==`bigint`)n=e;else throw Gp();i=n*r}else if(typeof e==`number`){if(isNaN(e))throw Gp();if(e<0&&(i=-Ap,e=-e),e%1==0)n=BigInt(e);else if(e>0){let t=1,i=0,a=1,o=1,s=1,c=1e7;for(e>=1&&(t=10**Math.floor(1+Math.log10(e)),e/=t);a<=c&&s<=c;){let t=(i+o)/(a+s);if(e===t){a+s<=c?(n=i+o,r=a+s):s>a?(n=o,r=s):(n=i,r=a);break}else e>t?(i+=o,a+=s):(o+=i,s+=a),a>c?(n=o,r=s):(n=i,r=a)}n=BigInt(n)*BigInt(t),r=BigInt(r)}}else if(typeof e==`string`){let t=0,a=R,o=R,s=R,c=Ap,l=Ap,u=e.replace(/_/g,``).match(/\d+|./g);if(u===null)throw Gp();if(u[t]===`-`?(i=-Ap,t++):u[t]===`+`&&t++,u.length===t+1?o=Pp(u[t++],i):u[t+1]===`.`||u[t]===`.`?(u[t]!==`.`&&(a=Pp(u[t++],i)),t++,(t+1===u.length||u[t+1]===`(`&&u[t+3]===`)`||u[t+1]===`'`&&u[t+3]===`'`)&&(o=Pp(u[t],i),c=Np**BigInt(u[t].length),t++),(u[t]===`(`&&u[t+2]===`)`||u[t]===`'`&&u[t+2]===`'`)&&(s=Pp(u[t+1],i),l=Np**BigInt(u[t+1].length)-Ap,t+=3)):u[t+1]===`/`||u[t+1]===`:`?(o=Pp(u[t],i),c=Pp(u[t+2],Ap),t+=3):u[t+3]===`/`&&u[t+1]===` `&&(a=Pp(u[t],i),o=Pp(u[t+2],i),c=Pp(u[t+4],Ap),t+=5),u.length<=t)r=c*l,i=n=s+r*a+l*o;else throw Gp()}else if(typeof e==`bigint`)n=e,i=e,r=Ap;else throw Gp();if(r===R)throw Wp();z.s=i<R?-Ap:Ap,z.n=n<R?-n:n,z.d=r<R?-r:r};function zp(e,t,n){let r=Ap;for(;t>R;e=e*e%n,t>>=Ap)t&Ap&&(r=r*e%n);return r}function Bp(e,t){for(;t%jp===R;t/=jp);for(;t%Mp===R;t/=Mp);if(t===Ap)return R;let n=Np%t,r=1;for(;n!==Ap;r++)if(n=n*Np%t,r>2e3)return R;return BigInt(r)}function Vp(e,t,n){let r=Ap,i=zp(Np,n,t);for(let e=0;e<300;e++){if(r===i)return BigInt(e);r=r*Np%t,i=i*Np%t}return 0}function Hp(e,t){if(!e)return t;if(!t)return e;for(;;){if(e%=t,!e)return t;if(t%=e,!t)return e}}function Up(e,t){if(Rp(e,t),this instanceof Up)e=Hp(z.d,z.n),this.s=z.s,this.n=z.n/e,this.d=z.d/e;else return Ip(z.s*z.n,z.d)}var Wp=function(){return Error(`Division by Zero`)},Gp=function(){return Error(`Invalid argument`)},Kp=function(){return Error(`Parameters must be integer`)};Up.prototype={s:Ap,n:R,d:Ap,abs:function(){return Ip(this.n,this.d)},neg:function(){return Ip(-this.s*this.n,this.d)},add:function(e,t){return Rp(e,t),Ip(this.s*this.n*z.d+z.s*this.d*z.n,this.d*z.d)},sub:function(e,t){return Rp(e,t),Ip(this.s*this.n*z.d-z.s*this.d*z.n,this.d*z.d)},mul:function(e,t){return Rp(e,t),Ip(this.s*z.s*this.n*z.n,this.d*z.d)},div:function(e,t){return Rp(e,t),Ip(this.s*z.s*this.n*z.d,this.d*z.n)},clone:function(){return Ip(this.s*this.n,this.d)},mod:function(e,t){if(e===void 0)return Ip(this.s*this.n%this.d,Ap);if(Rp(e,t),R===z.n*this.d)throw Wp();return Ip(this.s*(z.d*this.n)%(z.n*this.d),z.d*this.d)},gcd:function(e,t){return Rp(e,t),Ip(Hp(z.n,this.n)*Hp(z.d,this.d),z.d*this.d)},lcm:function(e,t){return Rp(e,t),z.n===R&&this.n===R?Ip(R,Ap):Ip(z.n*this.n,Hp(z.n,this.n)*Hp(z.d,this.d))},inverse:function(){return Ip(this.s*this.d,this.n)},pow:function(e,t){if(Rp(e,t),z.d===Ap)return z.s<R?Ip((this.s*this.d)**z.n,this.n**z.n):Ip((this.s*this.n)**z.n,this.d**z.n);if(this.s<R)return null;let n=Lp(this.n),r=Lp(this.d),i=Ap,a=Ap;for(let e in n){if(e===`1`)continue;if(e===`0`){i=R;break}if(n[e]*=z.n,n[e]%z.d===R)n[e]/=z.d;else return null;i*=BigInt(e)**n[e]}for(let e in r){if(e===`1`)continue;if(r[e]*=z.n,r[e]%z.d===R)r[e]/=z.d;else return null;a*=BigInt(e)**r[e]}return z.s<R?Ip(a,i):Ip(i,a)},log:function(e,t){if(Rp(e,t),this.s<=R||z.s<=R)return null;let n={},r=Lp(z.n),i=Lp(z.d),a=Lp(this.n),o=Lp(this.d);for(let e in i)r[e]=(r[e]||R)-i[e];for(let e in o)a[e]=(a[e]||R)-o[e];for(let e in r){if(e===`1`)continue;n[e]=!0}for(let e in a){if(e===`1`)continue;n[e]=!0}let s=null,c=null;for(let e in n){let t=r[e]||R,n=a[e]||R;if(t===R){if(n!==R)return null;continue}let i=n,o=t,l=Hp(i,o);if(i/=l,o/=l,s===null&&c===null)s=i,c=o;else if(i*c!==s*o)return null}return s!==null&&c!==null?Ip(s,c):null},equals:function(e,t){return Rp(e,t),this.s*this.n*z.d===z.s*z.n*this.d},lt:function(e,t){return Rp(e,t),this.s*this.n*z.d<z.s*z.n*this.d},lte:function(e,t){return Rp(e,t),this.s*this.n*z.d<=z.s*z.n*this.d},gt:function(e,t){return Rp(e,t),this.s*this.n*z.d>z.s*z.n*this.d},gte:function(e,t){return Rp(e,t),this.s*this.n*z.d>=z.s*z.n*this.d},compare:function(e,t){Rp(e,t);let n=this.s*this.n*z.d-z.s*z.n*this.d;return(R<n)-(n<R)},ceil:function(e){return e=Np**BigInt(e||0),Ip(Fp(this.s*e*this.n/this.d)+(e*this.n%this.d>R&&this.s>=R?Ap:R),e)},floor:function(e){return e=Np**BigInt(e||0),Ip(Fp(this.s*e*this.n/this.d)-(e*this.n%this.d>R&&this.s<R?Ap:R),e)},round:function(e){return e=Np**BigInt(e||0),Ip(Fp(this.s*e*this.n/this.d)+this.s*((this.s>=R?Ap:R)+jp*(e*this.n%this.d)>this.d?Ap:R),e)},roundTo:function(e,t){Rp(e,t);let n=this.n*z.d,r=this.d*z.n,i=n%r,a=Fp(n/r);return i+i>=r&&a++,Ip(this.s*a*z.n,z.d)},divisible:function(e,t){return Rp(e,t),!(!(z.n*this.d)||this.n*z.d%(z.n*this.d))},valueOf:function(){return Number(this.s*this.n)/Number(this.d)},toString:function(e){let t=this.n,n=this.d;e||=15;let r=Bp(t,n),i=Vp(t,n,r),a=this.s<R?`-`:``;if(a+=Fp(t/n),t%=n,t*=Np,t&&(a+=`.`),r){for(let e=i;e--;)a+=Fp(t/n),t%=n,t*=Np;a+=`(`;for(let e=r;e--;)a+=Fp(t/n),t%=n,t*=Np;a+=`)`}else for(let r=e;t&&r--;)a+=Fp(t/n),t%=n,t*=Np;return a},toFraction:function(e){let t=this.n,n=this.d,r=this.s<R?`-`:``;if(n===Ap)r+=t;else{let i=Fp(t/n);e&&i>R&&(r+=i,r+=` `,t%=n),r+=t,r+=`/`,r+=n}return r},toLatex:function(e){let t=this.n,n=this.d,r=this.s<R?`-`:``;if(n===Ap)r+=t;else{let i=Fp(t/n);e&&i>R&&(r+=i,t%=n),r+=`\\frac{`,r+=t,r+=`}{`,r+=n,r+=`}`}return r},toContinued:function(){let e=this.n,t=this.d,n=[];do{n.push(Fp(e/t));let r=e%t;e=t,t=r}while(e!==Ap);return n},simplify:function(e){let t=BigInt(1/(e||.001)|0),n=this.abs(),r=n.toContinued();for(let e=1;e<r.length;e++){let i=Ip(r[e-1],Ap);for(let t=e-2;t>=0;t--)i=i.inverse().add(r[t]);let a=i.sub(n);if(a.n*t<a.d)return i.mul(this.s)}return this}};const qp={maximumFractionDigits:20};function Jp(e,t){let n;try{t&&(n=new Intl.NumberFormat(t,qp))}catch{n=new Intl.NumberFormat(void 0,qp)}return n.format(e)}const Yp=e=>{let t=typeof e==`string`,n=t&&Wm(e);return n?Vm(e):e},Xp=e=>{let t=Yp(e);if(Cte(t)||Number.isNaN(t)||t===1/0||t===-1/0)return!0;if(!(yte(t)||bte(t)||wte(t)||Tte(t)||xte(t)||Ste(t))){let e=fm(String(t));if(e.includes(km))return!1;let n=sm(e)?um(e):cm(e)?parseFloat(e):e;if(n===1/0||n===-1/0)return!0;if(!cm(n))return!1;if(!Number.isNaN(n))return!0}return!1},Zp=e=>typeof e==`string`?Xp(e)&&e.toLowerCase().includes(`e`):!1,Qp=(e,t,n)=>{let r=t??e,i=Yp(e);if(Xp(i)){let e=fm(String(i)),t=sm(e)?um(e):cm(e)?parseFloat(e):e;return t===1/0||t===-1/0?t:Number.isNaN(t)||!cm(t)?r:n&&t<n?n:t}else return r},$p=e=>{if(Xp(e)){if(typeof e==`string`)return e;if(typeof e==`number`)return Number.isNaN(e)||!Number.isFinite(e)?String(e):vte(e,{noThousandsSeparator:!0})}return e},em=(e,t=!1)=>{let n=t?/0+((?=[|eE])|$)/:/(0+|0+\.0+)((?=[|eE])|$)/;return typeof e==`string`&&(!t||e.includes(`.`)||e.includes(`,`))?e?.match(n)?.[0]?.replaceAll(/[.,]/g,``)?.length??0:0},ste=e=>em(e)>0,tm=(e,t=!1)=>{let n=typeof e==`string`,r=n&&Wm(e),i=r?Hm(e):null,a=fm(r?Vm(e):e),o=t&&ste(e)?a:Qp(a);return{number:o,unit:i,isString:n}},cte=(e,t)=>t?String(e):String($p(e)),nm=({value:e,unit:t,isString:n,isScientific:r})=>{let i=typeof e==`number`&&n?cte(e,r):e;return t?Km(i,t):i},lte=2**-52,ute=4,dte=(e,t=4)=>{let n=10**t;return Math.round(e*n)/n},rm=(e,t=4)=>Number(e.toPrecision(t)),fte=(e,t=4)=>{let n=Qp(e).toPrecision(t),[r,i]=n.split(`.`);if(i){let e=t-r.length;return`${r}.${i.padEnd(e,`0`)}`}else return r},pte=(e,t=4)=>{if(typeof e==`number`)return rm(e,t);if(e===null||Number.isNaN(e)||e===1/0||e===-1/0||e===void 0)return e;let{number:n,unit:r,isString:i}=tm(e),a=!cm(n)||typeof n==`string`&&n.endsWith(`.`)?e:rm(n,t);return nm({value:a,unit:r,isString:i,isScientific:Zp(e)})},im=(e,t=4,n=!1)=>{let r=10**t,i=r&&e>r?dte(e,0):n?fte(e,t):rm(e,t);return n?String(i):i},am=(e,t=4)=>{if(typeof e==`number`)return im(e,t);if(e===null||Number.isNaN(e)||e===1/0||e===-1/0||e===void 0)return e;let{number:n,unit:r,isString:i}=tm(e),a=!cm(n)||typeof n==`string`&&n.endsWith(`.`)?e:im(n,t);return nm({value:a,unit:r,isString:i,isScientific:Zp(e)})},mte=(e,t=4)=>{if(e===null||Number.isNaN(e)||e===1/0||e===-1/0||e===void 0)return e;if(typeof e==`number`)return im(e,t,!0);let{number:n,unit:r}=tm(e,!0),i=!cm(n)||typeof n==`string`&&n.endsWith(`.`)?e:im(n,t,!0);return nm({value:i,unit:r,isString:!0,isScientific:Zp(e)})},hte=(e,t=4)=>{if(e===null||Number.isNaN(e)||e===1/0||e===-1/0||e===void 0)return e;if(typeof e==`number`)return e.toFixed(t);let{number:n,unit:r,isString:i}=tm(e),a=!cm(n)||typeof n==`string`&&n.endsWith(`.`)?e:n.toFixed(t);return nm({value:a,unit:r,isString:i,isScientific:Zp(e)})},gte=(e,t)=>{let n=`0`.repeat(t);return t>0&&e!==`0`?e.includes(`.`)?`${e}${n}`:`${e}.${n}`:e},_te=(e,t,n=!1)=>{let r=Jp(Qp(e),`en-US`).replaceAll(`,`,t);return n?gte(r,em(e,!0)):r},vte=(e,t)=>{let{nonBreakingSpace:n}=t??{};if(e===``)return e;if(e==null)return``;if(!Xp(e))return dm(e.toString());let r=t?.noThousandsSeparator?``:n?` `:` `;return _te(e,r,t?.preserveTrailingZeros)},yte=e=>e===null,bte=e=>e===void 0,xte=e=>e&&e.constructor===Array,Ste=e=>e&&e.constructor===Object,Cte=e=>e===``,wte=e=>e&&e[e.length-1]===`.`,Tte=e=>e&&e[e.length-1]===`,`,om=e=>e.trim().replace(/\s+/g,` `),sm=e=>{if(typeof e!=`string`||!e.includes(`/`))return!1;try{return new Up(om(e)),!0}catch(e){return e.message===`Division by Zero`}};function cm(e){if(e==null||Array.isArray(e)||typeof e==`object`||Number.isNaN(e)||e===`NaN`||e===1/0||e===-1/0||e===`Infinity`||e===`-Infinity`)return!1;if(sm(e))return!0;let t=parseFloat(e);return typeof e==`string`?!isNaN(t)&&(jm.test(e)||isFinite(e)):isFinite(e)}function lm(e,t){let n=(e+``)[0],r=0,i=t.indexOf(n,0)+1;for(;i>0;)i=t.indexOf(n,i)+1,r+=1;return r}function um(e){if(e instanceof Array||e==null||e===``||e===1/0||e===-1/0||e===`Infinity`||e===`-Infinity`||Number.isNaN(e)||e===`NaN`)return e;typeof e==`string`&&(e=om(e));let t=e;try{let n=new Up(e);n!==void 0&&(t=n.valueOf())}catch(t){if(t.message===`Division by Zero`){let t=e.charAt(0)===`-`;return t?-1/0:1/0}console.warn(`Error in numFraction() method: `,e)}return t.valueOf()}const dm=e=>e.trim().replace(/[\t\r\n]/g,``);function fm(e){let t=dm(e+``),n=lm(`/`,t),r=lm(` `,t)+lm(`\xA0`,t),i=lm(`.`,t),a=lm(`,`,t);return n===0&&r>0&&(t=t.replace(/\s/g,``)),a>1&&(t=t.replace(/,/g,``)),i>1&&(t=t.replace(/\./g,``)),a=lm(`,`,t),i=lm(`.`,t),i===1&&a===1?(t.indexOf(`,`)>t.indexOf(`.`)?(t=t.replace(`.`,``),t=t.replace(`,`,`.`)):t=t.replace(`,`,``),t.indexOf(`.`)===0&&(t=0+t),t):(!i&&a&&(t=t.replace(`,`,`.`)),t.indexOf(`.`)===0&&(t=0+t),t)}const Ete=e=>{let t=e?.[0]===`-`,n=/^-/gm,r=/^(?:0+(?=[1-9])|0+(?=0))/gm,i=e.replace(n,``).replace(r,``);return t?`-${i}`:i};function Dte(e){return typeof e==`number`?e:parseFloat(fm(e))}const Ote=e=>!cm(e),{abs:pm,exp:mm,sqrt:hm}=Math;function kte(e,t,n,r=1e-8,i=30){let a=n,o=0,s=1;for(;s>r&&o<i;){let n=a-e(a)/t(a);if(s=pm(e(n)-e(a)),s<r)return[n,!0,o];a=n,o++}return[n,!1,o]}function gm(e){let t=1/(1+.5*pm(e)),n=1-t*mm(-(e**2)-1.26551223+t*(1.00002368+t*(.37409196+t*(.09678418+t*(-.18628806+t*(.27886807+t*(-1.13520398+t*(1.48851587+t*(-.82215223+t*.17087277)))))))));return e>=0?n:-n}function Ate(e){let t=t=>e-gm(t/hm(2)),n=e=>-hm(2/Math.PI)*mm(-.5*e**2),[r]=kte(t,n,1);return r}function jte(e){return gm(e/hm(2))}const _m=Object.freeze({in:`in`,mm:`mm`,cm:`cm`,m:`m`,microM:`μm`,km:`km`,ft:`ft`,usft:`usft`,in2:`in²`,cm2:`cm²`,m2:`m²`,kg:`kg`,tonnes:`t`,mt:`mt`,kip:`kip`,bbl:`bbl`,m3:`m³`,Mm3:`Mm³`,MMSCF:`MMSCF`,lbm:`lbm`,"kg/mol":`kg/mol`,"lbf/mol":`lbf/mol`,sg:`sg`,ppg:`ppg`,"kg/m3":`kg/m³`,"lbm/ft3":`lbm/ft³`,s:`s`,min:`min`,h:`h`,d:`d`,month:`month`,year:`year`,"bbl/ft":`bbl/ft`,lpm:`L/min`,lps:`L/s`,bpm:`bbl/min`,"m3/min":`m³/min`,"m3/s":`m³/s`,MMSCFD:`MMSCFD`,bar:`Bar`,Pa:`Pa`,kPa:`kPa`,MPa:`MPa`,GPa:`GPa`,kPsi:`Psi`,ksi:`ksi`,"lbf/100ft2":`lbf/100ft²`,"1/Pa":`Pa⁻¹`,"1/kPa":`kPa⁻¹`,"1/MPa":`MPa⁻¹`,"1/GPa":`GPa⁻¹`,"1/psi":`psi⁻¹`,"kPa/m":`kPa/m`,"1/bar":`bar⁻¹`,klbf:`klbf`,"psi/ft":`Psi/ft`,"bar/100m":`bar/100m`,"psi/100ft":`psi/100ft`,"kPa/100m":`kPa/100m`,C:`°C`,F:`°F`,K:`K`,"C/100m":`°C/100m`,"C/m":`°C/m`,"Pa/C":`Pa/°C`,"Bar/C":`Bar/°C`,"psi/F":`psi/°F`,"psi/C":`psi/°C`,"F/100ft":`°F/100ft`,"F/ft":`°F/ft`,"K/100m":`K/100m`,"K/m":`K/m`,"lbf/ft":`lbf/ft`,N:`N`,kN:`kN`,"N/m":`N/m`,"daN/m":`daN/m`,lbf:`lbf`,kgf:`kgf`,rad:`rad`,"BTU/lbm":`BTU/lbm`,ppf:`ppf`,"kg/m":`kg/m`,"E-06/degC":`10⁻⁶/°C`,"E-06/degF":`10⁻⁶/°F`,"1/K":`K⁻¹`,km2:`km²`,ft2:`ft²`,mm2:`mm²`,mile2:`mile²`,ft3:`ft³`,"g/cm3":`g/cm³`,Sm3:`Sm³`,"ft3/s":`ft³/s`,"ft3/d":`ft³/d`,"m3/d":`m³/d`,"1/m3/d":`1/m³/d`,"s/m3":`s/m³`,"1/MMSCFD":`1/MMSCFD`,"bbl/d":`bbl/d`,tonneForce:`tonne-force`,USGal:`US gal`,"g/mol":`g/mol`,Nm:`N⋅m`,kNm:`kN⋅m`,ftlbf:`ft⋅lbf`,"J/(kg*degC)":`J/(kg⋅°C)`,"J/(kg*degK)":`J/(kg⋅K)`,"J/(s*m*degK)":`J/(s⋅m⋅K)`,"BTU/(lbm*degF)":`BTU/(lbm⋅°F)`,"BTU/(h*ft*degF)":`BTU/(h⋅ft⋅°F)`,l:`L`,"l/m":`L/m`,"kJ/kg":`kJ/kg`,"J/kg":`J/kg`,deg:`°`,"W/(mK)":`W/(m⋅K)`,psi:`psi`,"deg/100ft":`°/100ft`,"deg/30m":`°/30m`,"deg/10m":`°/10m`,"%":`%`,Hz:`Hz`,"1/s":`1/s`,rpm:`rpm`,"Pa/m":`Pa/m`,"bar/m":`bar/m`,gpm:`gpm`,"kg/s":`kg/s`,"lbm/s":`lbm/s`,"deg/m":`°/m`,"deg/ft":`°/ft`,"rad/m":`rad/m`,"rad/ft":`rad/ft`,"dyn/cm":`dyn/cm`,"mN/m":`mN/m`,"m/s":`m/s`,"ft/s":`ft/s`,"m/min":`m/min`,"ft/min":`ft/min`,"m/h":`m/h`,"ft/h":`ft/h`,mph:`mph`,"km/h":`km/h`,"m/s2":`m/s²`,"ft/s2":`ft/s²`,"Pa*s":`Pa⋅s`,P:`P`,"mPa*s":`mPa⋅s`,cP:`cP`,W:`W`,hhp:`hhp`,hp:`hp`,kW:`kW`,MW:`MW`,"BTU/h":`BTU/h`,"W/m2":`W/m²`,"hhp/in2":`hhp/in²`,"hhp/ft2":`hhp/ft²`,"Mm3/d":`Mm³/d`,"STB/d":`STB/d`,"Sm3/d":`Sm³/d`,"MSm3/d":`MSm³/d`,"SCF/STB":`SCF / STB`,"Sm3/Sm3":`Sm³ / Sm³`,"SCF/d":`SCF/d`,STB:`STB`,SCF:`SCF`,MSm3:`MSm³`,Gsg:`sg`,Gppg:`ppg`,"Gkg/m3":`kg/m³`,"Glbm/ft3":`lbm/ft³`,"lb/ft3":`lb/ft³`,"°N":`°N`,"°S":`°S`,"°W":`°W`,"°E":`°E`,fr:` `,mD:`mD`,CI:`CI`,Sigma:`σ`,"Sm3/d/bar":`Sm³/d/bar`,"STB/d/psi":`STB/d/psi`,"m3/s/bar":`m³/s/bar`,"lb/ft":`lb/ft`,"E-09/bar":`10⁻⁹/bar`,"E-10/psi":`10⁻¹⁰/psi`,"E-14/pa":`10⁻¹⁴/pa`,"m3/m":` m³/m`,"cm3/m":`cm³/m`,"mm3/m":`mm³/m`,"ft3/ft":`ft³/ft`,"in3/ft":`in³/ft`,lk:`lk`,ftCla:`ftCla`,lkCla:`lkCla`,ftSe:`ftSe`,ydSe:`ydSe`,chSe:`chSe`,"chSe(T)":`chSe(T)`,ftGC:`ftGC`,ydInd:`ydInd`,"d/stand":`d/stand`,"h/stand":`h/stand`,"min/stand":`min/stand`,"s/stand":`s/stand`,"m3/t":`m3/t`,"L/100kg":`L/100kg`}),vm=Object.freeze({acceleration:[`ft/s2`,`m/s2`],angleGradient:[`deg/30m`,`rad/m`,`deg/m`,`deg/ft`,`rad/ft`,`deg/100ft`,`deg/10m`],angles:[`deg`,`rad`],areaOther:[`in2`,`ft2`,`mm2`,`cm2`,`m2`,`mile2`,`km2`],areaTubular:[`in2`,`cm2`,`ft2`,`m2`],blowoutFlowRate:[`lpm`,`bpm`,`m3/min`,`ft3/s`,`m3/s`,`MMSCFD`,`ft3/d`,`m3/d`,`bbl/d`,`Mm3/d`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],blowoutGasFlowRate:[`MMSCFD`,`Sm3/d`,`MSm3/d`,`SCF/d`],blowoutOilFlowRate:[`Sm3/d`,`STB/d`],deg:[`deg`,`rad`],density:[`sg`,`ppg`,`kg/m3`,`lbm/ft3`,`g/cm3`,`lb/ft3`,`kPa/m`],densityGas:[`Gsg`,`Gppg`,`Gkg/m3`,`Glbm/ft3`],densityOil:[`sg`,`ppg`,`kg/m3`,`lbm/ft3`],densityOilGas:[`ppg`,`kg/m3`,`lbm/ft3`],densitySolid:[`sg`,`ppg`,`kg/m3`,`lbm/ft3`],depth:[`m`,`ft`],diameters:[`in`,`m`,`cm`,`ft`,`mm`],distance:[`m`,`ft`],dls:[`deg/10m`,`deg/30m`,`deg/100ft`],doglegSeverity:[`deg/10m`,`deg/30m`,`deg/100ft`],duration:[`s`,`h`,`d`,`min`],durationShort:[`s`,`min`,`h`,`d`],durationLong:[`min`,`h`,`d`,`month`,`year`],flowrate:[`lpm`,`gpm`,`bpm`,`ft3/d`,`ft3/s`,`m3/s`,`m3/d`,`m3/min`,`Mm3/d`,`bbl/d`,`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],fluidCompressibility:[`1/bar`,`1/psi`,`1/Pa`,`1/kPa`,`1/MPa`,`1/GPa`],force:[`tonnes`,`lbf`,`kgf`,`N`,`kN`,`tonneForce`,`klbf`],forceGradient:[`lbf/ft`,`N/m`],frequency:[`Hz`],gasVolume:[`MMSCF`,`Sm3`,`MSm3`,`SCF`],gor:[`Sm3/Sm3`,`SCF/STB`],height:[`m`,`ft`],intensity:[`W/m2`,`hhp/in2`,`hhp/ft2`],interfacialTension:[`dyn/cm`,`N/m`,`lbf/ft`,`mN/m`],latitude:[`°N`,`°S`],length:[`m`,`cm`,`ft`,`km`,`in`,`mm`],linearCapacity:[`l/m`,`bbl/ft`],longitude:[`°E`,`°W`],massFlowRate:[`kg/s`,`lbm/s`],moleWeight:[`kg/mol`,`lbf/mol`,`g/mol`],oilVolume:[`STB`,`Sm3`],percentage:[`%`,`fr`],permeability:[`mD`,`m2`],power:[`hp`,`W`,`hhp`,`MW`,`kW`,`BTU/h`],pressure:[`bar`,`psi`,`Pa`,`kPa`,`MPa`,`ksi`,`GPa`,`lbf/100ft2`],pressureGradient:[`bar/100m`,`Pa/m`,`bar/m`,`psi/100ft`,`psi/ft`,`kPa/m`],pressurechange:[`bar`,`psi`,`Pa`,`MPa`,`kPa`],gasliftFlowRate:[`STB/d`,`Sm3/d`,`SCF/d`],productionFlowRate:[`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],productionFlowRateOil:[`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],productionFlowRateGas:[`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],injectionFlowRate:[`lpm`,`lps`,`bpm`,`gpm`,`MMSCFD`,`STB/d`,`Sm3/d`,`MSm3/d`,`SCF/d`],pumpRate:[`lpm`,`lps`,`bpm`,`m3/s`,`ft3/s`,`gpm`],rotationalSpeed:[`rpm`,`Hz`],roughness:[`m`,`microM`,`in`],rpm:[`rpm`,`Hz`],sdstats:[`CI`,`Sigma`],specificHeatCapacity:[`J/(kg*degC)`,`J/(kg*degK)`,`BTU/(lbm*degF)`],speed:[`km/h`,`ft/min`,`mph`,`ft/h`,`ft/s`,`m/min`,`m/s`,`m/h`],inverseStandSpeed:[`d/stand`,`h/stand`,`min/stand`,`s/stand`],rop:[`ft/h`,`ft/min`,`ft/s`,`km/h`,`m/h`,`m/min`,`m/s`,`mph`],stress:[`MPa`,`kPa`,`psi`,`bar`,`Pa`,`ksi`,`lbf/100ft2`],temperature:[`C`,`F`,`K`],pressurePerTemperature:[`Pa/C`,`Bar/C`,`psi/F`,`psi/C`],tempgrad:[`C/100m`,`F/100ft`,`K/100m`,`C/m`,`F/ft`,`K/m`],thermalConductivity:[`BTU/(h*ft*degF)`,`W/(mK)`],thermalExpansionCoefficient:[`E-06/degC`,`E-06/degF`,`1/K`],torque:[`Nm`,`ftlbf`,`kNm`],torqueGradient:[`N`,`lbf`,`tonnes`],turbulentSkin:[`s/m3`,`1/m3/d`,`1/MMSCFD`],viscosity:[`Pa*s`,`P`,`mPa*s`,`cP`],inflowProductivityIndex:[`Sm3/d/bar`,`STB/d/psi`,`m3/s/bar`],volume:[`m3`,`bbl`,`Mm3`,`l`,`USGal`,`ft3`,`STB`,`Sm3`,`MMSCF`,`MSm3`,`SCF`],kickToleranceVolume:[`m3`,`bbl`,`USGal`,`ft3`,`STB`,`Sm3`,`SCF`],weight:[`tonnes`,`kg`,`lbf`,`mt`,`kip`,`N`],weightGradient:[`ppf`,`kg/m`],wgrad:[`sg`,`ppg`],wltubulars:[`ppf`,`kg/m`],youngsModulus:[`Pa`,`psi`],massPerLength:[`kg/m`,`lb/ft`],wearFactor:[`E-09/bar`,`E-10/psi`,`E-14/pa`],volumeGradient:[`m3/m`,`cm3/m`,`mm3/m`,`ft3/ft`,`in3/ft`],shearStress:[`Pa`,`lbf/100ft2`],location:[`lk`,`ftCla`,`lkCla`,`ftSe`,`ydSe`,`chSe`,`chSe(T)`,`ftGC`,`ydInd`,`ft`,`m`,`usft`],mixingRequirements:[`m3/t`,`L/100kg`],entalphy:[`J/kg`,`kJ/kg`,`BTU/lbm`]}),Mte=Object.freeze({density:`sg`,densityGas:`Gsg`,densityOil:`sg`,densityOilGas:`kg/m3`,densitySolid:`kg/m3`,length:`m`,roughness:`m`,speed:`m/s`,diameters:`in`,duration:`s`,durationShort:`h`,durationLong:`d`,pressurechange:`bar`,temperature:`C`,tempgrad:`C/100m`,volume:`m3`,kickToleranceVolume:`m3`,weight:`kg`,force:`N`,wgrad:`sg`,wltubulars:`ppf`,flowrate:`lpm`,permeability:`mD`,interfacialTension:`dyn/cm`,deg:`deg`,dls:`deg/30m`,percentage:`%`,latitude:`°N`,longitude:`°E`,torque:`Nm`,rpm:`rpm`,testSingleUnit:`m`,turbulentSkin:`1/m3/d`,pressurePerTemperature:`Pa/C`,sdstats:`Sigma`,acceleration:`m/s2`,massFlowRate:`kg/s`,angleGradient:`deg/m`,viscosity:`Pa*s`,weightGradient:`kg/m`,intensity:`W/m2`,gor:`Sm3/Sm3`,inflowProductivityIndex:`Sm3/d/bar`,wearFactor:`E-09/psi`,location:`m`,inverseStandSpeed:`s/stand`,mixingRequirements:`m3/t`,entalphy:`J/kg`,shearStress:`Pa`,volumeGradient:`m3/m`}),B=Object.freeze({g:.0980665175317196,ft_to_m:.3048,inch_to_m:.0254,lbf_to_kg:.45359237,kg_to_lbf:2.20462262184877,ppf_to_kgm:.45359237/.3048,kg_cm3:.0293984025938081,bar_to_psi:14.503773773022,bar_to_pascal:1e5,sg_to_ppg:8.345404265,bbl_to_m3:.158987294928,USGal_to_m3:.003785411784,kelvin_to_degrees:273.15,tonnes_to_pascal:9806.65,therm_exp_coeff:1242e-8,psi_to_pascal:6894.757293168361,ft3_to_m3:.028316846592,ft3_to_in3:1728,day_to_second:3600*24,m3_per_m_to_ft3_per_ft:10.763910416709722,in3_per_ft_to_m3_per_m:537633333333e-16}),Nte=Object.freeze({"m|mm":e=>e*1e3,"m|cm":e=>e*100,"m|km":e=>e/1e3,"m|ft":e=>e/B.ft_to_m,"m|in":e=>e/B.inch_to_m,"m|microM":e=>e*1e6,"mm|m":e=>e/1e3,"cm|m":e=>e/100,"km|m":e=>e*1e3,"ft|m":e=>e*B.ft_to_m,"in|m":e=>e*B.inch_to_m,"microM|m":e=>e/1e6,"m2|mm2":e=>e*1e6,"m2|cm2":e=>e*1e4,"m2|km2":e=>e/1e6,"m2|in2":e=>e*1550.0031,"m2|ft2":e=>e*10.76391,"m2|mile2":e=>e*3.861022e-7,"mm2|m2":e=>e/1e6,"cm2|m2":e=>e/1e4,"km2|m2":e=>e*1e6,"in2|m2":e=>e/1550.0031,"ft2|m2":e=>e/10.76391,"mile2|m2":e=>e/3.861022e-7,"m3|bbl":e=>e/B.bbl_to_m3,"m3|ft3":e=>e/B.ft3_to_m3,"m3|l":e=>e*1e3,"m3|Mm3":e=>e/1e6,"m3|USGal":e=>e/B.USGal_to_m3,"bbl|m3":e=>e*B.bbl_to_m3,"ft3|m3":e=>e*B.ft3_to_m3,"Mm3|m3":e=>e*1e6,"l|m3":e=>e/1e3,"USGal|m3":e=>e*B.USGal_to_m3,"m3|Sm3":e=>e*1,"m3|STB":e=>e*6.289512957422142,"Sm3|m3":e=>e*1,"STB|m3":e=>e*.1589948230919721,"m3|MMSCF":e=>e*1e6/B.ft3_to_m3,"m3|MSm3":e=>e*1e-6,"m3|SCF":e=>e/B.ft3_to_m3,"MMSCF|m3":e=>e*1e-6*B.ft3_to_m3,"MSm3|m3":e=>e*1e6,"SCF|m3":e=>e*B.ft3_to_m3,"kg/m3|sg":e=>e*.001,"kg/m3|g/cm3":e=>e*.001,"kg/m3|lbm/ft3":e=>e/16.01846337,"kg/m3|lb/ft3":e=>e/16.01846337,"kg/m3|ppg":e=>e*.008345404265,"sg|kg/m3":e=>e*1e3,"g/cm3|kg/m3":e=>e*1e3,"lbm/ft3|kg/m3":e=>e*16.01846337,"lb/ft3|kg/m3":e=>e*16.01846337,"ppg|kg/m3":e=>e/.008345404265,"sg|kPa/m":e=>e*9.81,"kPa/m|sg":e=>e/9.81,"Gkg/m3|Gsg":e=>e/1.225,"Gkg/m3|Glbm/ft3":e=>e/16.0176516725,"Gkg/m3|Gppg":e=>e/119.8659491193,"Gsg|Gkg/m3":e=>e*1.225,"Glbm/ft3|Gkg/m3":e=>e*16.0176516725,"Gppg|Gkg/m3":e=>e*119.8659491193,"ppf|kg/m":e=>e*.45359237/.3048,"kg/m|ppf":e=>e*1/(.45359237/.3048),"kg/m|lbf/ft":e=>e/.67196897675131,"lbf/ft|kg/m":e=>e*.67196897675131,"Pa|psi":e=>e/B.psi_to_pascal,"psi|Pa":e=>e*B.psi_to_pascal,"Pa|bar":e=>e*1e-5,"Pa|kPa":e=>e*.001,"Pa|MPa":e=>e*1e-6,"Pa|GPa":e=>e*1e-9,"bar|Pa":e=>e*1e5,"kPa|Pa":e=>e*1e3,"MPa|Pa":e=>e*1e6,"GPa|Pa":e=>e*1e9,"psi|ksi":e=>e/1e3,"ksi|psi":e=>e*1e3,"psi|lbf/100ft2":e=>e*14400,"lbf/100ft2|psi":e=>e/14400,"1/psi|1/Pa":e=>e/B.psi_to_pascal,"1/bar|1/Pa":e=>e*1e-5,"1/kPa|1/Pa":e=>e*.001,"1/MPa|1/Pa":e=>e*1e-6,"1/GPa|1/Pa":e=>e*1e-9,"1/Pa|1/psi":e=>e*B.psi_to_pascal,"1/Pa|1/bar":e=>e*1e5,"1/Pa|1/kPa":e=>e*1e3,"1/Pa|1/MPa":e=>e*1e6,"1/Pa|1/GPa":e=>e*1e9,"C|F":e=>e*1.8+32,"F|C":e=>(e-32)*5/9,"K|C":e=>e-B.kelvin_to_degrees,"C|K":e=>e+B.kelvin_to_degrees,"C/100m|F/100ft":e=>e*1.8*B.ft_to_m,"F/100ft|C/100m":e=>e*5/9/B.ft_to_m,"C/100m|C/m":e=>e/100,"C/m|C/100m":e=>e*100,"C/100m|F/ft":e=>e*1.8/100*B.ft_to_m,"F/ft|C/100m":e=>e*5/9*100/B.ft_to_m,"C/100m|K/m":e=>e/100,"K/m|C/100m":e=>e*100,"K/100m|C/100m":e=>e,"C/100m|K/100m":e=>e,"Pa/C|Bar/C":e=>e*1e-5,"Pa/C|psi/F":e=>e/1.8/B.psi_to_pascal,"Pa/C|psi/C":e=>e/B.psi_to_pascal,"Bar/C|Pa/C":e=>e*1e5,"psi/F|Pa/C":e=>e*1.8*B.psi_to_pascal,"psi/C|Pa/C":e=>e*B.psi_to_pascal,"psi/F|psi/C":e=>e*1.8,"psi/C|psi/F":e=>e/1.8,"kg|kgf":e=>e,"kg|lbf":e=>e*B.kg_to_lbf,"kg|t":e=>e/1e3,"kg|tonnes":e=>e/1e3,"kg|mt":e=>e/1e3,"kg|kip":e=>e*B.kg_to_lbf*.001,"kgf|kg":e=>e,"lbf|kg":e=>e*B.lbf_to_kg,"t|kg":e=>e*1e3,"tonnes|kg":e=>e*1e3,"mt|kg":e=>e*1e3,"kip|kg":e=>e*1e3*B.lbf_to_kg,"tonnes|lbf":e=>e*1e3*B.kg_to_lbf,"lbf|tonnes":e=>e*B.lbf_to_kg/1e3,"t|lbf":e=>e*1e3*B.kg_to_lbf,"lbf|t":e=>e*B.lbf_to_kg/1e3,"mt|lbf":e=>e*1e3*B.kg_to_lbf,"lbf|mt":e=>e/(1e3*B.kg_to_lbf),"kgf|lbf":e=>e*B.kg_to_lbf,"lbf|kgf":e=>e*B.lbf_to_kg,"kg|g":e=>e*1e3,"g|kg":e=>e/1e3,"kgf|t":e=>e/1e3,"t|kgf":e=>e*1e3,"kgf|tonnes":e=>e/1e3,"tonnes|kgf":e=>e*1e3,"kg/m|lb/ft":e=>e*1.4881639435695537,"lb/ft|kg/m":e=>e*.6719689751395069,"kg|N":e=>e*B.g*100,"N|kg":e=>e/(B.g*100),"m/s|km/h":e=>e*3.6,"km/h|m/s":e=>e/3.6,"m/s|ft/s":e=>e/B.ft_to_m,"m/s|ft/min":e=>e*60/B.ft_to_m,"m/s|ft/h":e=>e*3600/B.ft_to_m,"m/s|m/min":e=>e*60,"m/s|m/h":e=>e*3600,"ft/s|m/s":e=>e*B.ft_to_m,"ft/min|m/s":e=>e*B.ft_to_m/60,"ft/h|m/s":e=>e*B.ft_to_m/3600,"m/min|m/s":e=>e/60,"m/h|m/s":e=>e/3600,"m/s|mph":e=>e*2.2369362920544,"mph|m/s":e=>e/2.2369362920544,"ft/h|ft/d":e=>e*24,"ft/d|ft/h":e=>e/24,"ft/h|m/h":e=>e*B.ft_to_m,"m/h|ft/h":e=>e/B.ft_to_m,"ft/d|m/h":e=>e*B.ft_to_m/24,"m/h|ft/d":e=>e*24/B.ft_to_m,"ft/d|m/d":e=>e*B.ft_to_m,"m/d|ft/d":e=>e/B.ft_to_m,"m/h|m/d":e=>e*24,"m/d|m/h":e=>e/24,"l/m|bbl/ft":e=>e*.0019171343228277056,"bbl/ft|l/m":e=>e/.0019171343228277056,"m3/s|ft3/s":e=>e/B.ft3_to_m3,"m3/s|lpm":e=>e*6e4,"m3/s|bpm":e=>e*377.388646,"m3/s|m3/min":e=>e*60,"m3/s|m3/d":e=>e*B.day_to_second,"m3/s|bbl/d":e=>e*543439.6505653338,"m3/s|ft3/d":e=>e*B.day_to_second/B.ft3_to_m3,"m3/s|gpm":e=>e*25e11/157725491,"m3/s|MMSCFD":e=>e/.32774128,"m3/s|STB/d":e=>e*1346875e8/247854343,"m3/s|Sm3/d":e=>e*B.day_to_second,"m3/s|MSm3/d":e=>e/11.59722222222222,"m3/s|SCF/d":e=>e*3051187.2047366146,"ft3/s|m3/s":e=>e*B.ft3_to_m3,"lpm|m3/s":e=>e/6e4,"lps|lpm":e=>e*60,"lpm|lps":e=>e/60,"bpm|m3/s":e=>e/377.388646,"m3/d|m3/s":e=>e/B.day_to_second,"m3/min|m3/s":e=>e/60,"bbl/d|m3/s":e=>e/B.day_to_second*B.bbl_to_m3,"ft3/d|m3/s":e=>e/B.day_to_second*B.ft3_to_m3,"ft3/d|m3/d":e=>e*B.ft3_to_m3,"m3/d|ft3/d":e=>e/B.ft3_to_m3,"m3/d|ft3/s":e=>e/B.ft3_to_m3/B.day_to_second,"gpm|m3/s":e=>e*157725491/25e11,"MMSCFD|m3/s":e=>e*.32774128,"Mm3/d|m3/d":e=>e*1e6,"m3/d|Mm3/d":e=>e*1e-6,"STB/d|m3/s":e=>e*184021785986e-17,"Sm3/d|m3/d":e=>e,"m3/d|Sm3/d":e=>e,"Sm3/d|m3/s":e=>e/B.day_to_second,"MSm3/d|Sm3/d":e=>e*1e6,"Sm3/d|MSm3/d":e=>e*1e-6,"MSm3/d|m3/s":e=>e*11.59722222222222,"SCF/d|m3/s":e=>e*3.2774128e-7,"1/m3/d|1/MMSCFD":e=>e*28316.85,"1/MMSCFD|1/m3/d":e=>e/28316.85,"s/m3|1/m3/d":e=>e/86400,"1/m3/d|s/m3":e=>e*86400,"kg/s|lbm/s":e=>e*2.20462262,"lbm/s|kg/s":e=>e/2.20462262,"mD|m2":e=>e*9869233e-19,"m2|mD":e=>e/9869233e-19,"N/m|lbf/ft":e=>e*.22480894387096*B.ft_to_m,"lbf/ft|N/m":e=>e/.22480894387096/B.ft_to_m,"dyn/cm|mN/m":e=>e,"mN/m|dyn/cm":e=>e,"dyn/cm|N/m":e=>e*.001,"N/m|dyn/cm":e=>e*1e3,"mN/m|N/m":e=>e*.001,"N/m|mN/m":e=>e*1e3,"Nm|ftlbf":e=>e*.737562058700684,"Nm|kNm":e=>e/1e3,"kNm|Nm":e=>e*1e3,"ftlbf|Nm":e=>e/.737562058700684,"N|kN":e=>e*.001,"N|kgf":e=>e*2e4/196133,"N|lbf":e=>e*2e12/8896443230521,"kN|lbf":e=>e*1e3*2e12/8896443230521,"N|tonneForce":e=>e*20/196133,"kN|N":e=>e/.001,"kgf|N":e=>e*196133/2e4,"lbf|N":e=>e*8896443230521/2e12,"lbf|kN":e=>e*8896443230521/(2e12*1e3),"lbf|tonneForce":e=>e*45359237/1e11,"klbf|tonneForce":e=>e*45359237/(1e11*.001),"tonneForce|N":e=>e*196133/20,"tonneForce|lbf":e=>e*1e11/45359237,"tonneForce|klbf":e=>e*1e11/(45359237*1e3),"klbf|lbf":e=>e*1e3,"lbf|klbf":e=>e/1e3,"s|min":e=>e/60,"s|h":e=>e/3600,"s|d":e=>e/(24*3600),"min|s":e=>e*60,"h|s":e=>e*3600,"d|s":e=>e*24*3600,"year|d":e=>e*365.25,"d|year":e=>e/365.25,"year|month":e=>e*12,"month|year":e=>e/12,"month|d":e=>e*30.4375,"d|month":e=>e/30.4375,"s/stand|min/stand":e=>e/60,"s/stand|h/stand":e=>e/3600,"s/stand|d/stand":e=>e/86400,"min/stand|s/stand":e=>e*60,"h/stand|s/stand":e=>e*3600,"d/stand|s/stand":e=>e*86400,"min/stand|h/stand":e=>e/60,"min/stand|d/stand":e=>e/1440,"h/stand|min/stand":e=>e*60,"h/stand|d/stand":e=>e/24,"d/stand|min/stand":e=>e*1440,"d/stand|h/stand":e=>e*24,"%|fr":e=>e*.01,"fr|%":e=>e/.01,"deg|rad":e=>e*Math.PI/180,"rad|deg":e=>e*180/Math.PI,"W|hp":e=>e/745.699872,"hp|W":e=>e*745.699872,"W|kW":e=>e/1e3,"W|MW":e=>e/1e6,"kW|W":e=>e*1e3,"MW|W":e=>e*1e6,"W|BTU/h":e=>e*3.4121416351331,"BTU/h|W":e=>e/3.4121416351331,"hhp|hp":e=>e,"hp|hhp":e=>e,"°N|°S":e=>e,"°S|°N":e=>e,"°W|°E":e=>e,"°E|°W":e=>e,"BTU/(Kg*K)|BTU/(lbm*degF)":e=>e/4186.798188,"BTU/(lbm*degF)|J/(kg*degC)":e=>e*4186.798188,"BTU/(lbm*degF)|BTU/(Kg*K)":e=>e*4186.798188,"J/(kg*degK)|J/(kg*degC)":e=>e,"J/(kg*degC)|BTU/(lbm*degF)":e=>e/4186.798188,"J/(kg*degC)|J/(kg*degK)":e=>e,"J/(kg*degC)|J/(s*m*degK)":e=>e,"BTU/(h*ft*degF)|W/(mK)":e=>e*1.7295772056,"BTU/(h*ft*degF)|J/(s*m*degK)":e=>e*1.7295772056,"W/(mK)|BTU/(h*ft*degF)":e=>e/1.7295772056,"W/(mK)|J/(s*m*degK)":e=>e,"W/(m*degK)|J/(s*m*degK)":e=>e,"W/(m*degK)|BTU/(h*ft*degF)":e=>e/1.7295772056,"J/(s*m*degK)|BTU/(h*ft*degF)":e=>e/1.7295772056,"J/(s*m*degK)|W/(m*degK)":e=>e,"J/(s*m*degK)|W/(mK)":e=>e,"J/(s*m*degK)|J/(kg*degC)":e=>e,"E-06/degF|E-06/degC":e=>e*1.8,"E-06/degC|E-06/degF":e=>e/1.8,"E-06/degC|1/K":e=>e/1e6,"1/K|E-06/degC":e=>e*1e6,"rpm|Hz":e=>e/60,"Hz|rpm":e=>e*60,"CI|Sigma":e=>Ate(e),"Sigma|CI":e=>jte(e),"g/mol|kg/mol":e=>e/1e3,"kg/mol|g/mol":e=>e*1e3,"lbf/mol|kg/mol":e=>e/B.kg_to_lbf,"kg/mol|lbf/mol":e=>e*B.kg_to_lbf,"m/s2|ft/s2":e=>e/B.ft_to_m,"ft/s2|m/s2":e=>e*B.ft_to_m,"Pa*s|P":e=>e*10,"P|Pa*s":e=>e/10,"mPa*s|Pa*s":e=>e/1e3,"Pa*s|mPa*s":e=>e*1e3,"cP|Pa*s":e=>e*.001,"Pa*s|cP":e=>e/.001,"Pa/m|bar/m":e=>e*1e-5,"bar/m|Pa/m":e=>e*1e5,"Pa/m|kPa/m":e=>e/1e3,"kPa/m|Pa/m":e=>e*1e3,"Pa/m|bar/100m":e=>e*.001,"bar/100m|Pa/m":e=>e*1e3,"bar/m|bar/100m":e=>e*100,"bar/100m|bar/m":e=>e/100,"psi/ft|Pa/m":e=>e*B.psi_to_pascal/B.ft_to_m,"Pa/m|psi/ft":e=>e/B.psi_to_pascal*B.ft_to_m,"psi/100ft|Pa/m":e=>e*68.9475729/B.ft_to_m,"Pa/m|psi/100ft":e=>e/68.9475729*B.ft_to_m,"deg/30m|deg/100ft":e=>e*(100*B.ft_to_m/30),"deg/100ft|deg/30m":e=>e/(100*B.ft_to_m/30),"deg/30m|deg/m":e=>e/30,"deg/m|deg/30m":e=>e*30,"deg/100ft|deg/ft":e=>e/100,"deg/ft|deg/100ft":e=>e*100,"deg/100ft|deg/m":e=>e/(100*B.ft_to_m),"deg/m|deg/100ft":e=>e*(100*B.ft_to_m),"deg/ft|deg/m":e=>e/B.ft_to_m,"deg/m|deg/ft":e=>e*B.ft_to_m,"deg/m|rad/m":e=>e*Math.PI/180,"rad/m|deg/m":e=>e*180/Math.PI,"rad/ft|deg/m":e=>e*180/Math.PI/B.ft_to_m,"deg/m|rad/ft":e=>e*Math.PI/180*B.ft_to_m,"deg/10m|deg/100ft":e=>e*(10*B.ft_to_m),"deg/100ft|deg/10m":e=>e/(10*B.ft_to_m),"deg/10m|deg/m":e=>e/10,"deg/m|deg/10m":e=>e*10,"deg/30m|deg/10m":e=>e/3,"deg/10m|deg/30m":e=>e*3,"deg/10m|rad/m":e=>e*Math.PI/180/10,"rad/m|deg/10m":e=>e*180/Math.PI*10,"W/m2|hhp/in2":e=>e*(1/745.699872/1550.0031),"W/m2|hhp/ft2":e=>e*(1/745.699872/10.76391),"hhp/in2|W/m2":e=>e/(1/745.699872/1550.0031),"hhp/ft2|W/m2":e=>e/(1/745.699872/10.76391),"SCF/STB|Sm3/Sm3":e=>e*.178099173553719,"Sm3/Sm3|SCF/STB":e=>e*5.614849187935035,"Sm3/d/bar|m3/s/bar":e=>e/86400,"STB/d/psi|m3/s/bar":e=>e/37468.77736,"m3/s/bar|Sm3/d/bar":e=>e*86400,"m3/s/bar|STB/d/psi":e=>e*37468.77736,"E-10/psi|E-09/bar":e=>e*1.450377378,"E-10/psi|E-14/pa":e=>e*1.450377378,"E-14/pa|E-10/psi":e=>e/1.450377378,"E-09/bar|E-10/psi":e=>e/1.450377378,"E-14/pa|1/Pa":e=>e/10**14,"E-09/bar|1/bar":e=>e/10**9,"E-10/psi|1/psi":e=>e/10**10,"1/Pa|E-14/pa":e=>e*10**14,"1/bar|E-09/bar":e=>e*10**9,"1/psi|E-10/psi":e=>e*10**10,"m3/m|cm3/m":e=>e*10**6,"m3/m|mm3/m":e=>e*10**9,"m3/m|ft3/ft":e=>e*B.m3_per_m_to_ft3_per_ft,"m3/m|in3/ft":e=>e*B.m3_per_m_to_ft3_per_ft*B.ft3_to_in3,"cm3/m|m3/m":e=>e*1e-6,"cm3/m|mm3/m":e=>e*1e3,"cm3/m|ft3/ft":e=>e*B.m3_per_m_to_ft3_per_ft*1e-6,"cm3/m|in3/ft":e=>e*B.m3_per_m_to_ft3_per_ft*1e-6*B.ft3_to_in3,"mm3/m|m3/m":e=>e*1e-9,"mm3/m|cm3/m":e=>e*.001,"mm3/m|ft3/ft":e=>e*B.m3_per_m_to_ft3_per_ft*1e-9,"mm3/m|in3/ft":e=>e*B.m3_per_m_to_ft3_per_ft*1e-9*B.ft3_to_in3,"ft3/ft|m3/m":e=>e*.09290304,"ft3/ft|cm3/m":e=>e*92903.04,"ft3/ft|mm3/m":e=>e*92903040,"ft3/ft|in3/ft":e=>e*1728,"in3/ft|m3/m":e=>e*B.in3_per_ft_to_m3_per_m,"in3/ft|cm3/m":e=>e*B.in3_per_ft_to_m3_per_m*1e6,"in3/ft|mm3/m":e=>e*B.in3_per_ft_to_m3_per_m*1e9,"in3/ft|ft3/ft":e=>e/B.ft3_to_in3,"Pa|lbf/100ft2":e=>e*2.088543423315013,"lbf/100ft2|Pa":e=>e*.4788025898033584,"usft|m":e=>e*.30480060960121924,"lk|m":e=>e*.201168,"ftCla|m":e=>e*.3047972651151,"lkCla|m":e=>e*.2011057269733667,"ftGC|m":e=>e*.30479971018150875,"ydInd|m":e=>e*.9143985307444408,"ftSe|m":e=>e*(12/39.370147),"ydSe|m":e=>e*.9143991154275526,"chSe|m":e=>e*20.11676512155263,"chSe(T)|m":e=>e*20.116756,"m|usft":e=>e/.30480060960121924,"m|lk":e=>e/.201168,"m|ftCla":e=>e/.3047972651151,"m|lkCla":e=>e/.2011057269733667,"m|ftGC":e=>e/.30479971018150875,"m|ydInd":e=>e/.9143985307444408,"m|ftSe":e=>e/(12/39.370147),"m|ydSe":e=>e/.9143991154275526,"m|chSe":e=>e/20.11676512155263,"m|chSe(T)":e=>e/20.116756,"m3/t|L/100kg":e=>e*100,"L/100kg|m3/t":e=>e*.01,"kJ/kg|J/kg":e=>e*1e3,"J/kg|kJ/kg":e=>e/1e3,"BTU/lbm|J/kg":e=>e*2326,"J/kg|BTU/lbm":e=>e/2326}),ym=Object.freeze({"N-m":`Nm`,"ft-lbf":`ftlbf`,"BTU/hr":`BTU/h`,"BTU/(htf*degF)":`BTU/(h*ft*degF)`,"BTU/(hft*degF)":`BTU/(h*ft*degF)`}),bm=Object.freeze({"lbs/ft":`lb/ft`,"lbm/ft":`lb/ft`,ftUS:`usft`}),xm=Object.freeze({mm:`m`,cm:`m`,km:`m`,ft:`m`,in:`m`,microM:`m`,lbf:`kg`,t:`kg`,tonnes:`kg`,mt:`kg`,kip:`kg`,kW:`W`,MW:`W`,hp:`W`,hhp:`hp`,mm2:`m2`,cm2:`m2`,km2:`m2`,in2:`m2`,ft2:`m2`,mile2:`m2`,bbl:`m3`,ft3:`m3`,Mm3:`m3`,l:`m3`,USGal:`m3`,Sm3:`m3`,STB:`m3`,MMSCF:`m3`,MSm3:`m3`,SCF:`m3`,kN:`N`,kgf:`N`,tonneForce:`N`,klbf:`lbf`,psi:`Pa`,bar:`Pa`,kPa:`Pa`,MPa:`Pa`,ksi:`psi`,"lbf/100ft2":`psi`,"psi/100ft":`Pa/m`,"psi/ft":`Pa/m`,"bar/100m":`Pa/m`,"bar/m":`Pa/m`,"Pa/m":`kPa/m`,sg:`kg/m3`,"g/cm3":`kg/m3`,"lbm/ft3":`kg/m3`,"lb/ft3":`kg/m3`,ppg:`kg/m3`,"kPa/m":`sg`,Gsg:`Gkg/m3`,Gppg:`Gkg/m3`,"Glbm/ft3":`Gkg/m3`,"1/psi":`1/Pa`,"1/bar":`1/Pa`,"1/kPa":`1/Pa`,"1/MPa":`1/Pa`,"1/GPa":`1/Pa`,"ft/s":`m/s`,"ft/min":`m/s`,"ft/h":`m/s`,"m/min":`m/s`,"m/h":`m/s`,mph:`m/s`,"ft3/s":`m3/s`,lpm:`m3/s`,lps:`lpm`,bpm:`m3/s`,"m3/d":`m3/s`,"bbl/d":`m3/s`,"ft3/d":`m3/s`,"STB/d":`m3/s`,"Sm3/d":`m3/s`,gpm:`m3/s`,MMSCFD:`m3/s`,"Mm3/d":`m3/d`,"m3/min":`m3/s`,"MSm3/d":`m3/s`,"lbf/ft":`N/m`,min:`s`,h:`s`,d:`s`,month:`d`,year:`d`,"J/(kg*degK)":`J/(kg*degC)`,"BTU/(lbm*degF)":`J/(kg*degC)`,"BTU/(Kg*K)":`J/(kg*degC)`,"BTU/(h*ft*degF)":`J/(s*m*degK)`,"W/(m*degK)":`J/(s*m*degK)`,"W/(mK)":`J/(s*m*degK)`,K:`C`,"C/m":`C/100m`,"F/ft":`C/100m`,"K/m":`C/100m`,"F/100ft":`C/100m`,"K/100m":`C/100m`,"Bar/C":`Pa/C`,"s/m3":`1/m3/d`,"1/MMSCFD":`1/m3/d`,P:`Pa*s`,"mPa*s":`Pa*s`,cP:`Pa*s`,"hhp/in2":`W/m2`,"hhp/ft2":`W/m2`,"Sm3/d/bar":`m3/s/bar`,"STB/d/psi":`m3/s/bar`,"deg/100ft":`deg/m`,"deg/30m":`deg/m`,"deg/10m":`deg/m`,"deg/ft":`deg/m`,"rad/ft":`deg/m`,"lbf/mol":`kg/mol`,"g/mol":`kg/mol`,"1/K":`E-06/degC`,"E-09/bar":`E-10/psi`,"E-14/pa":`E-10/psi`,"1/Pa":`E-14/pa`,kNm:`Nm`,ftlbf:`Nm`,lk:`m`,ftCla:`m`,lkCla:`m`,ftSe:`m`,ydSe:`m`,chSe:`m`,"chSe(T)":`m`,ftGC:`m`,ydInd:`m`,"BTU/lbm":`J/kg`}),Sm=Object.freeze(Array.from(new Set(Object.values(vm).flat()))),Pte=[NaN,-1/0,1/0],Fte=Pte.map(e=>e.toString());var Cm={},wm;function Tm(){if(wm)return Cm;wm=1,Object.defineProperty(Cm,`__esModule`,{value:!0});function e(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}return Cm.default=e,e.code=`require("ajv/dist/runtime/ucs2length").default`,Cm}const Em=Dm;function Dm(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){let a=null,o=0;if(!(typeof e==`number`&&isFinite(e))){let e={instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`number`},message:`must be number`};a===null?a=[e]:a.push(e),o++}if(o>0){let e=[];for(let n of a)n.keyword!==`errorMessage`&&!n.emUsed&&(n.instancePath===t||n.instancePath.indexOf(t)===0&&n.instancePath[t.length]===`/`)&&n.schemaPath.indexOf(`#`)===0&&n.schemaPath[1]===`/`&&(e.push(n),n.emUsed=!0);if(e.length){let n={instancePath:t,schemaPath:`#/errorMessage`,keyword:`errorMessage`,params:{errors:e},message:`Must be a numerical value`};a===null?a=[n]:a.push(n),o++}let n=[];for(let e of a)e.emUsed||n.push(e);a=n,o=n.length}return Dm.errors=a,o===0}Tm().default;const Om=e=>e?.map(({message:e})=>e),km=`|`,Am=/^(-?[0-9., /]*?(?:e[-+]?[0-9]+)?)([^0-9-., /].*)?$/,jm=/^[-+]?[0-9]*\.?[0-9]+(?:\/[0-9]*\.?[0-9]+)?(?:[eE][-+]?[0-9]+)?$/;function Mm(e){return vm[e]}function Nm(e){return Mm(e)}function Pm(e){return _m[e]}function Fm(e){return Mte[e]}function Im(e){return Fm(e)}function Lm(e){let t=Mm(e);return t?t.map(e=>({unit:e,label:Pm(e)})):void 0}function Rm(e){let t=/\.{2,}/,n=/,/;if(typeof e==`string`)for(;t.test(e)||n.test(e);)e=e.replace(t,`.`),e=e.replace(n,`.`);return e}function zm(e,t,n){if(e=Rm(e),n===`undefined`&&console.warn(`Inconsistent "to unit" - debug call to "Units.to()"`),t===`undefined`&&(t=n,console.warn(`Inconsistent "from unit" - debug call to "Units.to()"`)),t===n)return Qp(e);if(e===1/0||e===`Infinity`)return 1/0;if(e===-1/0||e===`-Infinity`)return-1/0;if(Ote(e)&&e!==``)return NaN;let r=Nte[t+`|`+n];if(r)return r(Qp(e));if(ym[t])return console.warn(`Unit '${t}' is deprecated - use '${ym[t]}' instead.`),zm(e,ym[t],n);if(ym[n])return console.warn(`Unit '${n}' is deprecated - use '${ym[n]}' instead.`),zm(e,t,ym[n]);if(bm[n])return zm(e,t,bm[n]);if(bm[t])return zm(e,bm[t],n);let i=xm[t];if(i){let r=zm(e,t,i);return zm(r,i,n)}else{let r=xm[n];if(n&&r&&r!==n){let i=zm(e,t,r);return zm(i,r,n)}}throw console.error(`no conversions found`,e,t,`->`,n),Error(`No conversions found: `+e+` `+t+` -> `+n)}function Bm(e){let t,n=e==null?``:String(e);return lm(`|`,n)>1&&(t=n.split(`|`),n=t.slice(0,-1).join(``)+`|`+t.slice(-1)),n.indexOf(`|`)>=0?t=n.split(`|`):Fte.includes(n)?t=[n,``]:(t=fm(n).match(Am),t&&=t.slice(1)),t||=[`0`,``],t[1]??=``,[t[0],t[1]]}function Vm(e){return Bm(e)[0]}function Hm(e){return Bm(e)[1]}function Um(e,t,n){if(e==null||e===``)return 0;if(typeof e==`string`&&e.startsWith(`NaN`)||typeof e==`number`&&isNaN(e))return NaN;let r=fm(e).replaceAll(`+`,``),i=Bm(r);if(!i){if(t&&n)return Um(e+n,t);throw Error(`unum: invalid number: `+e)}if(i[0]??=`0`,i[1]&&(n=i[1]),!n&&t!==n)throw Error(`unum: unable to figure out unit: ${e} fromUnit ${n}`);if(t===n){let e=i[0]?Qp(i[0]):0;if(e===1/0||e===`Infinity`)return 1/0;if(e===-1/0||e===`-Infinity`)return-1/0;if(typeof e==`string`&&jm.test(e))return parseFloat(e);if(!cm(e)&&e!==1/0&&e!==-1/0)throw Error(`unum: invalid number: `+e+`, `+typeof e);return Dte(e)}return zm(i[0],n,t)}function Wm(e){if(!e)return!1;let t=String(e).split(`|`);return t.length===2&&Sm.includes(t[1])}function Gm(e,t,n){return Um(e,t,n)}function Km(e,t,n=``){if((e===null||e===``||e===void 0)&&(e=n),t===null)return String(e);let[r,i]=String(e).includes(`|`)?Bm(String(e)):[e,t];return i||=t,[r,i].join(`|`)}function qm(e,t,n){let r=String(e),i=Bm(r),a=!i[1]||i[1]==t?Number(i[0]):zm(i[0],String(i[1]),t),o=`0`,s=n;if(a!==0){if(!s){if(i[1]===t)return r;let e=String(i[0]).match(/^[-+.,0]*(\d*)[.,]?(\d*)/);s=e?Math.max(3,e[1].length+e[2].length):3}let e=10**--s,n=Math.abs(a);if(n>=1e5*e||n*1e4*(1+e)<e)o=a.toExponential(s);else if(n>=e)o=a.toFixed();else{let e=Math.floor(Math.log10(n));o=a.toFixed(s-e);let t=o.length;if(o[--t]==`0`){for(;o[--t]==`0`;);o=o.slice(0,t+(o[t]==`.`?0:1))}}}return Km(o,t)}function Jm(e,t){let n=e;Hm(e)||(n=Km(e,Im(t)??``));let r=vm[t]??[];return r.map(e=>[...Bm(qm(n,e)),Pm(e)])}function Ym(e){let[t,n]=Bm(e),r=_m[n]??``;return`${t} ${r}`}function Xm(e){let t=e;if(typeof e==`string`&&Wm(e)&&(t=Vm(e)),t=Rm(t),cm(t)){let e=Em(Qp(t));return{valid:e,errors:Om(Em.errors)}}let n=Em(t);return{valid:n,errors:Om(Em.errors)}}const Ite=250,Zm=4e4,Lte=20,Rte=500,Qm=({visible:e,prompt:t,onCloseModal:n,onUpload:r,onComplete:i,onFailed:a,onError:o,width:s,heading:c,dialogText:l,fileInputText:u,fileInputPlaceholder:d,uploadText:m,cancelText:h,testId:g})=>{let[_,v]=(0,f.useState)(null),[y,b]=(0,f.useState)(!1),[x,S]=(0,f.useState)(0),C=0,w=()=>{let e=C+250;C=e,S(C)},T=e=>{let t=C+e;t>=.99*Zm&&(t=Zm),C=t,S(C)};(0,f.useEffect)(()=>{v(null)},[e]);let E=e=>{e.target.value&&v(e.target.value)},D=async()=>{S(0);let n=setInterval(w,250);try{if(!_)return;b(!0);let o=await r(t,_);if(!e)return;if(o){clearInterval(n);let e=setInterval(T,500/20,(Zm-C)/19);setTimeout(()=>{i(o),clearInterval(e),b(!1)},500)}else a?.(),b(!1)}catch(e){o?.(e),b(!1)}finally{clearInterval(n)}},O=()=>{D()},k=()=>{n()},A=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Yd,{children:l||`Upload file and extract data using a LLM`}),(0,p.jsx)(vp,{}),(0,p.jsx)(_p,{placeholder:d||`No file`,label:u||`Select`,file:_||void 0,onChange:E,testId:`${g}-file-input`,accept:`image/*`}),y&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(vp,{}),(0,p.jsx)(kp,{percentage:mte(100*x/Zm,3)})]})]}),j=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(_o,{label:m||`Upload`,colored:!0,onClick:O,disabled:!_||y,testId:`${g}-button-upload`}),(0,p.jsx)(_o,{label:h||`Cancel`,onClick:k,testId:`${g}-button-cancel`})]});return yp(`Escape`,()=>k()),(0,p.jsx)(Tp,{visible:e,centered:!0,children:(0,p.jsx)(vf,{dialog:{scroll:!0,heading:c||`Smart Upload`,content:A,footer:j,onClose:k,width:s||350,testId:g}})})},zte=`_helpContainer_1pgey_1`,Bte=`_codeBlockStyle_1pgey_8`,Vte=`_listStyle_1pgey_15`;var $m={helpContainer:`_helpContainer_1pgey_1`,codeBlockStyle:`_codeBlockStyle_1pgey_8`,listStyle:`_listStyle_1pgey_15`};const eh=({validationRules:e,t})=>{let n=t=>{let n=e.filter(e=>!e.optionalColumn);return[1,2,3].map((e,r)=>n.map(()=>r*10).join(t)).join(`
|
|
144
|
+
`)};return(0,p.jsxs)(`div`,{className:$m.helpContainer,children:[(0,p.jsx)(`p`,{children:t(`youCanImportDataByPastingOrByMessage`)}),(0,p.jsxs)(`p`,{children:[t(`theValuesCanBeSeparatedByDifferentDelimiters`),`:`]}),(0,p.jsxs)(`ul`,{className:$m.listStyle,children:[(0,p.jsx)(`li`,{children:t(`tabSeparatedValues`)}),(0,p.jsx)(`li`,{children:t(`semicolonSeparatedValues`)})]}),(0,p.jsxs)(`p`,{children:[t(`toUploadOrImportFromClipboardMessage`),`:`]}),(0,p.jsx)(`p`,{children:(0,p.jsxs)(`strong`,{children:[t(`examples`),`:`]})}),(0,p.jsx)(`div`,{children:(0,p.jsx)(`pre`,{className:$m.codeBlockStyle,children:(0,p.jsx)(`code`,{children:n(`;`)})})}),(0,p.jsx)(`div`,{children:(0,p.jsx)(`pre`,{className:$m.codeBlockStyle,children:(0,p.jsx)(`code`,{children:n(` `)})})})]})},th=({visible:e,setModalVisibility:t,validationRules:n=[],t:r})=>(0,p.jsx)(Tp,{visible:e,centered:!0,children:(0,p.jsx)(vf,{dialog:{heading:r(`importingData`),content:(0,p.jsx)(eh,{validationRules:n,t:r}),footer:(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(_o,{label:r(`cancel`),onClick:()=>t(`helpModal`,!1)})}),onClose:()=>t(`helpModal`,!1),width:`95%`}})}),Hte=`_headerContainer_esg1i_1`,Ute=`_modalContent_esg1i_10`,Wte=`_resultContainer_esg1i_17`,Gte=`_messagesContainer_esg1i_30`,Kte=`_emptyState_esg1i_39`,qte=`_emptyMainText_esg1i_47`,Jte=`_emptyHint_esg1i_51`;var nh={headerContainer:`_headerContainer_esg1i_1`,modalContent:`_modalContent_esg1i_10`,resultContainer:`_resultContainer_esg1i_17`,messagesContainer:`_messagesContainer_esg1i_30`,emptyState:`_emptyState_esg1i_39`,emptyMainText:`_emptyMainText_esg1i_47`,emptyHint:`_emptyHint_esg1i_51`};const Yte=`_inputInTable_1okhq_1`,Xte=`_inputHover_1okhq_13`,Zte=`_inputFocus_1okhq_18`,Qte=`_inputError_1okhq_25`,$te=`_inputWarning_1okhq_26`,ene=`_inputDisabled_1okhq_61`,tne=`_hideScrollbars_1okhq_67`,nne=`_container_1okhq_83`,rne=`_block_1okhq_101`,ine=`_info_1okhq_104`,ane=`_success_1okhq_108`,one=`_warning_1okhq_112`,sne=`_error_1okhq_116`,cne=`_content_1okhq_120`,lne=`_heading_1okhq_124`,une=`_icon_1okhq_131`,dne=`_dismiss_1okhq_139`,fne=`_absolute_1okhq_143`,pne=`_legendToggle_1okhq_155`,mne=`_detailsText_1okhq_165`,hne=`_footer_1okhq_169`;var rh={inputInTable:`_inputInTable_1okhq_1`,inputHover:`_inputHover_1okhq_13`,inputFocus:`_inputFocus_1okhq_18`,inputError:`_inputError_1okhq_25`,inputWarning:`_inputWarning_1okhq_26`,inputDisabled:`_inputDisabled_1okhq_61`,hideScrollbars:`_hideScrollbars_1okhq_67`,container:`_container_1okhq_83`,block:`_block_1okhq_101`,info:`_info_1okhq_104`,success:`_success_1okhq_108`,warning:`_warning_1okhq_112`,error:`_error_1okhq_116`,content:`_content_1okhq_120`,heading:`_heading_1okhq_124`,icon:`_icon_1okhq_131`,dismiss:`_dismiss_1okhq_139`,absolute:`_absolute_1okhq_143`,legendToggle:`_legendToggle_1okhq_155`,detailsText:`_detailsText_1okhq_165`,footer:`_footer_1okhq_169`};let ih=function(e){return e.INFO=`Info`,e.SUCCESS=`Success`,e.WARNING=`Warning`,e.ERROR=`Error`,e}({}),ah=function(e){return e.TOGGLE_DETAILS=`TOGGLE_DETAILS`,e}({});var oh=u(h());const sh=({type:e,onClose:t,isInToast:n,testId:r})=>(0,p.jsx)(`div`,{className:(0,oh.default)(rh.dismiss,n?rh.absolute:``,e===ih.INFO?rh.info:e===ih.SUCCESS?rh.success:e===ih.WARNING?rh.warning:e===ih.ERROR?rh.error:null),children:(0,p.jsx)(er,{icon:S.CLOSE,onClick:t,testId:r})});var ch=u(h());const lh=(e,t)=>{switch(t.type){case ah.TOGGLE_DETAILS:return{...e,detailsVisible:!e.detailsVisible};default:return e}},uh=({details:e,visible:t,dispatch:n})=>(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`div`,{className:(0,ch.default)(rh.legendToggle),onClick:n,children:t?`Hide details`:`Show details`}),t?(0,p.jsx)(`div`,{className:rh.detailsText,children:e}):null]}),dh=({type:e})=>{switch(e){case ih.SUCCESS:return(0,p.jsx)(er,{icon:S.SUCCESS,size:16});case ih.WARNING:return(0,p.jsx)(er,{icon:S.WARNING,size:16});case ih.ERROR:return(0,p.jsx)(er,{icon:S.ERROR,size:16});default:return(0,p.jsx)(er,{icon:S.INFO,size:16})}},fh=({message:e})=>{let{visible:t,type:n=ih.INFO,icon:r,heading:i,content:a,details:o,detailsVisible:s=!1,footer:c,withDismiss:l,onClose:u,width:d,maxHeight:m}=e,h={detailsVisible:s},[g,_]=(0,f.useReducer)(lh,h);return(0,p.jsx)(p.Fragment,{children:t?(0,p.jsxs)(`div`,{className:(0,ch.default)(rh.container,d?rh.block:null,n===ih.SUCCESS?rh.success:n===ih.WARNING?rh.warning:n===ih.ERROR?rh.error:rh.info),style:{width:d,maxHeight:m},children:[(0,p.jsx)(`div`,{children:r?(0,p.jsx)(`div`,{className:rh.icon,children:(0,p.jsx)(dh,{type:n})}):null}),(0,p.jsxs)(`div`,{className:rh.content,children:[i?(0,p.jsx)(`div`,{className:rh.heading,children:i}):null,(0,p.jsx)(`div`,{children:a}),o?(0,p.jsx)(uh,{details:o,visible:g.detailsVisible,dispatch:()=>_({type:ah.TOGGLE_DETAILS})}):null,!!c&&(0,p.jsx)(`div`,{className:rh.footer,children:c})]}),l?(0,p.jsx)(sh,{type:n,onClose:u}):null]}):null})},gne=`_inputInTable_kaesl_1`,_ne=`_inputHover_kaesl_13`,vne=`_inputFocus_kaesl_18`,yne=`_inputError_kaesl_25`,bne=`_inputWarning_kaesl_26`,xne=`_inputDisabled_kaesl_61`,Sne=`_hideScrollbars_kaesl_67`,Cne=`_wrapper_kaesl_85`,wne=`_bordered_kaesl_93`,Tne=`_scroll_kaesl_98`,Ene=`_table_kaesl_109`,Dne=`_dragOverlay_kaesl_145`,One=`_virtualScroll_kaesl_182`,kne=`_striped_kaesl_202`;var ph={inputInTable:`_inputInTable_kaesl_1`,inputHover:`_inputHover_kaesl_13`,inputFocus:`_inputFocus_kaesl_18`,inputError:`_inputError_kaesl_25`,inputWarning:`_inputWarning_kaesl_26`,inputDisabled:`_inputDisabled_kaesl_61`,hideScrollbars:`_hideScrollbars_kaesl_67`,wrapper:`_wrapper_kaesl_85`,bordered:`_bordered_kaesl_93`,scroll:`_scroll_kaesl_98`,table:`_table_kaesl_109`,dragOverlay:`_dragOverlay_kaesl_145`,virtualScroll:`_virtualScroll_kaesl_182`,striped:`_striped_kaesl_202`};const Ane=`_title_zn5s7_1`;var mh={title:`_title_zn5s7_1`};const hh=({name:e=null,actions:t=null,actionsRight:n=!1,testId:r})=>{let i=e!==null,a=t!==null;if(!i&&!a)return null;let o=()=>{if(!a)return null;let e=(0,p.jsx)(qs,{actions:t});return n?e:(0,p.jsx)(`div`,{children:e})};return(0,p.jsxs)(`div`,{className:mh.title,children:[i?(0,p.jsx)(rf,{children:(0,p.jsx)(`span`,{"data-testid":r,children:e})}):null,o()]})},jne=`_footer_4sumy_1`,Mne=`_section_4sumy_7`;var gh={footer:`_footer_4sumy_1`,section:`_section_4sumy_7`};const Nne=`_inputInTable_sl2b5_1`,Pne=`_inputHover_sl2b5_13`,Fne=`_inputFocus_sl2b5_18`,Ine=`_inputError_sl2b5_25`,Lne=`_inputWarning_sl2b5_26`,Rne=`_inputDisabled_sl2b5_61`,zne=`_hideScrollbars_sl2b5_67`,Bne=`_select_sl2b5_77`,Vne=`_isInTable_sl2b5_121`,Hne=`_unSelected_sl2b5_133`,Une=`_small_sl2b5_174`,Wne=`_right_sl2b5_182`,Gne=`_groupOrderFirst_sl2b5_193`,Kne=`_groupOrderMiddle_sl2b5_194`,qne=`_groupOrderLast_sl2b5_198`;var _h={inputInTable:`_inputInTable_sl2b5_1`,inputHover:`_inputHover_sl2b5_13`,inputFocus:`_inputFocus_sl2b5_18`,inputError:`_inputError_sl2b5_25`,inputWarning:`_inputWarning_sl2b5_26`,inputDisabled:`_inputDisabled_sl2b5_61`,hideScrollbars:`_hideScrollbars_sl2b5_67`,select:`_select_sl2b5_77`,isInTable:`_isInTable_sl2b5_121`,unSelected:`_unSelected_sl2b5_133`,small:`_small_sl2b5_174`,right:`_right_sl2b5_182`,groupOrderFirst:`_groupOrderFirst_sl2b5_193`,groupOrderMiddle:`_groupOrderMiddle_sl2b5_194`,groupOrderLast:`_groupOrderLast_sl2b5_198`},vh=u(h()),yh=u(Ra());const bh=({disabled:e=!1,error:t=null,warning:n=null,tooltip:r=null,options:i,onChange:a=yh.noop,onFocus:o=yh.noop,onBlur:s=yh.noop,right:c=!1,small:l=!1,tabIndex:u=0,selectedOption:d,width:m=null,groupOrder:h,testId:g,isInTable:_=!1,clearable:y,placeholder:b,hasNonExistentValue:x,maxTooltipWidth:S,borderRadius:C})=>{let w=(0,f.useContext)(Ie),T=d===null||d?.value===null?`unselected`:d?.value,E=T===`unselected`,D=(T===`unselected`||y?[(0,p.jsx)(`option`,{value:`unselected`,disabled:!y,hidden:!y,children:b||`Select...`},`unselected`)]:[]).concat(x?[(0,p.jsx)(`option`,{value:d?.value,disabled:e||w,children:d?.label},`selectedNonExistentValue`)]:[]).concat(i.map((e,t)=>(0,p.jsx)(`option`,{value:e.value,"data-testid":e.testId,children:e.label},t))),O=(()=>{if(h)switch(h){case v.FIRST:return _h.groupOrderFirst;case v.LAST:return _h.groupOrderLast;default:return _h.groupOrderMiddle}return``})();return(0,p.jsx)(ya,{error:!!t,warning:!!n,text:r||t||n,enabled:r&&gs(r)||t&&gs(t)||n&&gs(n)||!1,maxWidth:S,children:(0,p.jsx)(`select`,{className:(0,vh.default)(_h.select,E?_h.unSelected:``,c?_h.right:``,l?_h.small:``,_?_h.isInTable:``,O),style:{width:m||``,borderRadius:C||``},onChange:e=>{let{value:t}=e.target,n;if(t===`unselected`)n={value:null};else{let e=i.find(e=>String(e.value)===String(t));n=e||{value:null}}a(e,n)},onFocus:o,onBlur:s,tabIndex:u,value:T,disabled:e||w,"data-error":t||null,"data-warning":n||null,"data-testid":g,children:D})})},xh=()=>{let e=(0,f.useRef)(null),t=()=>{e.current&&e.current.focus()};return[e,t]},Sh=()=>{let[e,t]=(0,f.useState)(!1),n=(0,f.useRef)(!0);return(0,f.useEffect)(()=>()=>{n.current=!1},[]),(0,f.useEffect)(()=>{let e=async()=>{document.fonts&&await document.fonts.ready.then(()=>{n.current&&t(!0)})};e()},[]),e};var Ch=u(Ra());const wh=()=>window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,Th=()=>{let[e,t]=(0,f.useState)(wh()),n=(0,Ch.debounce)(()=>t(wh()),150);return(0,f.useEffect)(()=>(window.addEventListener(`resize`,n),()=>{window.removeEventListener(`resize`,n)}),[]),e};function Eh(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Dh=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function Oh(e,t){return!!(e===t||Dh(e)&&Dh(t))}function kh(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Oh(e[n],t[n]))return!1;return!0}function Ah(e,t){t===void 0&&(t=kh);var n,r=[],i,a=!1;function o(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];return a&&n===this&&t(o,r)?i:(i=e.apply(this,o),a=!0,n=this,r=o,i)}return o}var jh=Ah;j();var Mh=typeof performance==`object`&&typeof performance.now==`function`,Nh=Mh?function(){return performance.now()}:function(){return Date.now()};function Ph(e){cancelAnimationFrame(e.id)}function Fh(e,t){var n=Nh();function r(){Nh()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var Ih=-1;function Lh(e){if(e===void 0&&(e=!1),Ih===-1||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,document.body.appendChild(t),Ih=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ih}var Rh=null;function zh(e){if(e===void 0&&(e=!1),Rh===null||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,n.direction=`rtl`;var r=document.createElement(`div`),i=r.style;return i.width=`100px`,i.height=`100px`,t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?Rh=`positive-descending`:(t.scrollLeft=1,Rh=t.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(t),Rh}return Rh}var Bh=null,Vh=null,Hh=null;process.env.NODE_ENV!==`production`&&typeof window<`u`&&window.WeakSet!==void 0&&(Bh=new WeakSet,Vh=new WeakSet,Hh=new WeakSet);var Uh=150,Wh=function(e,t){return e},Gh=null,Kh=null;process.env.NODE_ENV!==`production`&&typeof window<`u`&&window.WeakSet!==void 0&&(Gh=new WeakSet,Kh=new WeakSet);function qh(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,c=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){N(t,e);function t(t){var r;return r=e.call(this,t)||this,r._instanceProps=c(r.props,Eh(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Eh(r),isScrolling:!1,scrollDirection:`forward`,scrollOffset:typeof r.props.initialScrollOffset==`number`?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=jh(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=jh(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t=r.props,a=t.direction,o=t.itemSize,s=t.layout,c=r._getItemStyleCache(l&&o,l&&s,l&&a),u;if(c.hasOwnProperty(e))u=c[e];else{var d=n(r.props,e,r._instanceProps),f=i(r.props,e,r._instanceProps),p=a===`horizontal`||s===`horizontal`,m=a===`rtl`,h=p?d:0;c[e]=u={position:`absolute`,left:m?void 0:h,right:m?h:void 0,top:p?0:d,height:p?`100%`:f,width:p?f:`100%`}}return u},r._getItemStyleCache=void 0,r._getItemStyleCache=jh(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,a=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,o=i;if(t===`rtl`)switch(zh()){case`negative`:o=-i;break;case`positive-descending`:o=a-n-i;break}return o=Math.max(0,Math.min(o,a-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?`forward`:`backward`,scrollOffset:o,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,a=t.scrollTop;r.setState(function(e){if(e.scrollOffset===a)return null;var t=Math.max(0,Math.min(a,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?`forward`:`backward`,scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,typeof t==`function`?t(e):typeof t==`object`&&t&&t.hasOwnProperty(`current`)&&(t.current=e)},r._resetIsScrollingDebounced=function(){r._resetIsScrollingTimeoutId!==null&&Ph(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=Fh(r._resetIsScrolling,Uh)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}t.getDerivedStateFromProps=function(e,t){return Jh(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?`forward`:`backward`,scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){t===void 0&&(t=`auto`);var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var c=this._outerRef;s=i===`vertical`?c.scrollWidth>c.clientWidth?Lh():0:c.scrollHeight>c.clientHeight?Lh():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if(typeof n==`number`&&this._outerRef!=null){var i=this._outerRef;t===`horizontal`||r===`horizontal`?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset,a=r.scrollUpdateWasRequested;if(a&&this._outerRef!=null){var o=this._outerRef;if(t===`horizontal`||n===`horizontal`)if(t===`rtl`)switch(zh()){case`negative`:o.scrollLeft=-i;break;case`positive-ascending`:o.scrollLeft=i;break;default:var s=o.clientWidth,c=o.scrollWidth;o.scrollLeft=c-s-i;break}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Ph(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,o=e.innerRef,s=e.innerElementType,c=e.innerTagName,l=e.itemCount,u=e.itemData,d=e.itemKey,p=d===void 0?Wh:d,m=e.layout,h=e.outerElementType,g=e.outerTagName,_=e.style,v=e.useIsScrolling,y=e.width,b=this.state.isScrolling,x=i===`horizontal`||m===`horizontal`,S=x?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),w=C[0],T=C[1],E=[];if(l>0)for(var D=w;D<=T;D++)E.push((0,f.createElement)(t,{data:u,key:p(D,u),index:D,isScrolling:v?b:void 0,style:this._getItemStyle(D)}));var O=r(this.props,this._instanceProps);return(0,f.createElement)(h||g||`div`,{className:n,onScroll:S,ref:this._outerRefSetter,style:A({position:`relative`,height:a,width:y,overflow:`auto`,WebkitOverflowScrolling:`touch`,willChange:`transform`,direction:i},_)},(0,f.createElement)(s||c||`div`,{children:E,ref:o,style:{height:x?`100%`:O,pointerEvents:b?`none`:void 0,width:x?O:`100%`}}))},d._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered==`function`){var e=this.props.itemCount;if(e>0){var t=this._getRangeToRender(),n=t[0],r=t[1],i=t[2],a=t[3];this._callOnItemsRendered(n,r,i,a)}}if(typeof this.props.onScroll==`function`){var o=this.state,s=o.scrollDirection,c=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(s,c,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,a=r.scrollDirection,c=r.scrollOffset;if(t===0)return[0,0,0,0];var l=o(this.props,c,this._instanceProps),u=s(this.props,l,c,this._instanceProps),d=!i||a===`backward`?Math.max(1,n):1,f=!i||a===`forward`?Math.max(1,n):1;return[Math.max(0,l-d),Math.max(0,Math.min(t-1,u+f)),l,u]},t}(f.PureComponent),t.defaultProps={direction:`ltr`,itemData:void 0,layout:`vertical`,overscanCount:2,useIsScrolling:!1},t}var Jh=function(e,t){var n=e.children,r=e.direction,i=e.height,a=e.layout,o=e.innerTagName,s=e.outerTagName,c=e.width,l=t.instance;if(process.env.NODE_ENV!==`production`){(o!=null||s!=null)&&Kh&&!Kh.has(l)&&(Kh.add(l),console.warn(`The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.`));var u=r===`horizontal`||a===`horizontal`;switch(r){case`horizontal`:case`vertical`:Gh&&!Gh.has(l)&&(Gh.add(l),console.warn(`The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.`));break;case`ltr`:case`rtl`:break;default:throw Error(`An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". `+(`"`+r+`" was specified.`))}switch(a){case`horizontal`:case`vertical`:break;default:throw Error(`An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". `+(`"`+a+`" was specified.`))}if(n==null)throw Error(`An invalid "children" prop has been specified. Value should be a React component. `+(`"`+(n===null?`null`:typeof n)+`" was specified.`));if(u&&typeof c!=`number`)throw Error(`An invalid "width" prop has been specified. Horizontal lists must specify a number for width. `+(`"`+(c===null?`null`:typeof c)+`" was specified.`));if(!u&&typeof i!=`number`)throw Error(`An invalid "height" prop has been specified. Vertical lists must specify a number for height. `+(`"`+(i===null?`null`:typeof i)+`" was specified.`))}},Yh=qh({getItemOffset:function(e,t){var n=e.itemSize;return t*n},getItemSize:function(e,t){var n=e.itemSize;return n},getEstimatedTotalSize:function(e){var t=e.itemCount,n=e.itemSize;return n*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,a){var o=e.direction,s=e.height,c=e.itemCount,l=e.itemSize,u=e.layout,d=e.width,f=o===`horizontal`||u===`horizontal`,p=f?d:s,m=Math.max(0,c*l-p),h=Math.min(m,t*l),g=Math.max(0,t*l-p+l+a);switch(n===`smart`&&(n=r>=g-p&&r<=h+p?`auto`:`center`),n){case`start`:return h;case`end`:return g;case`center`:var _=Math.round(g+(h-g)/2);return _<Math.ceil(p/2)?0:_>m+Math.floor(p/2)?m:_;case`auto`:default:return r>=g&&r<=h?r:r<g?g:h}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,a=e.itemCount,o=e.itemSize,s=e.layout,c=e.width,l=r===`horizontal`||s===`horizontal`,u=t*o,d=l?c:i,f=Math.ceil((d+n-u)/o);return Math.max(0,Math.min(a-1,t+f-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var t=e.itemSize;if(process.env.NODE_ENV!==`production`&&typeof t!=`number`)throw Error(`An invalid "itemSize" prop has been specified. Value should be a number. `+(`"`+(t===null?`null`:typeof t)+`" was specified.`))}});const Jne=`_layerContainer_41zze_1`,Yne=`_layer_41zze_1`,Xne=`_small_41zze_23`,Zne=`_heading_41zze_26`,Qne=`_option_41zze_27`,$ne=`_message_41zze_28`,ere=`_focused_41zze_67`,tre=`_selected_41zze_71`,nre=`_disabled_41zze_74`,rre=`_check_41zze_78`,ire=`_optionContent_41zze_95`,are=`_label_41zze_100`,ore=`_icon_41zze_107`,sre=`_details_41zze_112`;var Xh={layerContainer:`_layerContainer_41zze_1`,layer:`_layer_41zze_1`,small:`_small_41zze_23`,heading:`_heading_41zze_26`,option:`_option_41zze_27`,message:`_message_41zze_28`,focused:`_focused_41zze_67`,selected:`_selected_41zze_71`,disabled:`_disabled_41zze_74`,check:`_check_41zze_78`,optionContent:`_optionContent_41zze_95`,label:`_label_41zze_100`,icon:`_icon_41zze_107`,details:`_details_41zze_112`};const Zh=({label:e})=>(0,p.jsx)(`div`,{onClick:e=>e.stopPropagation(),className:Xh.heading,children:e});var Qh=u(h());const $h=({details:e,label:t,icon:n,disabled:r=!1,selected:i=!1,focused:a=!1,onSelectOption:o,actions:s,closeLayer:c,testId:l})=>(0,p.jsxs)(`div`,{className:(0,Qh.default)(Xh.option,r?Xh.disabled:``,i?Xh?.selected:``,a?Xh.focused:``),onClick:!r&&o?o:void 0,"data-testid":l,children:[(0,p.jsx)(`div`,{className:Xh.optionContent,children:(0,p.jsxs)(`span`,{className:Xh.label,title:t,children:[t,n&&(0,p.jsx)(`span`,{className:Xh.icon,children:n})]})}),e&&(0,p.jsx)(`div`,{className:(0,Qh.default)(Xh.details),children:(0,p.jsx)(Yd,{faint:!0,children:e})}),!!s?.length&&(0,p.jsx)(`div`,{className:(0,Qh.default)(Xh.actions),children:(0,p.jsx)(qs,{actions:s,closeLayer:c})}),(0,p.jsx)(`span`,{className:Xh.check,children:i?(0,p.jsx)(er,{icon:S.CHECK}):null})]}),eg=({section:e,selected:t,focused:n,onSelectOption:r,closeLayer:i})=>{let a=(0,f.useContext)(Ie);switch(e.type){case L.HEADING:return(0,p.jsx)(Zh,{label:e.label});case L.OPTION:default:return(0,p.jsx)($h,{closeLayer:i,actions:e.actions,label:e.label,details:e.details,icon:e.icon,disabled:e.disabled||a,selected:t,focused:n,onSelectOption:r,testId:e.testId})}},tg=(e,t)=>{let n=document.createElement(`canvas`),r=n.getContext(`2d`);return r?(r.font=t,r.measureText(e).width):0},ng=`13px`,rg=`12px`,cre=`Roobert`,lre=`sans-serif`,ure=12,dre=8,fre=30,pre=24,mre=5,hre=3,gre=1,_re=2,vre=10,ig=(e=!1,t=!1)=>{let n=e?rg:ng,r=t?`Roobert`:`sans-serif`;return`${n} ${r}`},ag=(e=!1,t=!1)=>(e?8:12)+(e?24:30)+(t?17:0),og=(e,t,n,r)=>{let i=ig(t,n),a=r?tg(r,i):0,o=Math.ceil(e.reduce((e,n)=>{let r=(n?.actions?.length??0)*24,a=n.icon?(t?parseInt(rg):parseInt(ng))+7:0,o=`${n.label} ${n.details||``}`,s=tg(o,i)+r+a;return e=s>e?s:e,e},a)),s=ag(t,!0);return o+s},sg=(e,t,n)=>{let r=ig(!0,n),i=tg(e.label,r),a=(t?3:5)*2+2+2;return Math.ceil(i+a)};var cg=u(h());const lg=Yh,ug=({listRef:e,isMulti:t,sections:n,selectedOptions:r,onSelectOption:i,focusedOptionIndex:a,width:o,small:s,firstSelectedOptionIndex:c,closeLayer:l,testId:u})=>{(0,f.useEffect)(()=>{c!=null&&e.current!==null&&typeof e.current.scrollToItem==`function`&&e.current.scrollToItem(c,`start`)},[c,e]);let d=s?24:30;return(0,p.jsx)(`div`,{"data-testid":u,className:(0,cg.default)(Xh.layer,s&&Xh.small),children:n.length?(0,p.jsx)(lg,{ref:e,height:n.length<10?d*n.length:d*10,itemCount:n.length,itemSize:d,width:o,children:({index:e,style:o})=>(0,p.jsx)(`div`,{style:o,children:(0,p.jsx)(eg,{closeLayer:l,section:n[e],selected:t&&n[e].type!==L.HEADING&&Array.isArray(r)?r?.some(t=>t&&t?.value===n?.[e]?.value):!Array.isArray(r)&&n?.[e]?.value===r?.value,focused:a===e,onSelectOption:t=>i(t,n[e])})})}):(0,p.jsx)(`ul`,{children:(0,p.jsx)(`li`,{children:(0,p.jsx)(`div`,{className:Xh.message,style:{width:o},children:`No matches`})})})})},yre=`_inputInTable_7uwhv_1`,bre=`_inputHover_7uwhv_13`,xre=`_inputFocus_7uwhv_18`,Sre=`_inputError_7uwhv_25`,Cre=`_inputWarning_7uwhv_26`,wre=`_inputDisabled_7uwhv_61`,Tre=`_hideScrollbars_7uwhv_67`,Ere=`_trigger_7uwhv_77`,Dre=`_isInTable_7uwhv_93`,Ore=`_input_7uwhv_1`,kre=`_isOpen_7uwhv_114`,Are=`_disabled_7uwhv_156`,jre=`_icons_7uwhv_162`,Mre=`_clearAll_7uwhv_169`,Nre=`_iconOpen_7uwhv_170`,Pre=`_small_7uwhv_181`,Fre=`_triggerInputContainer_7uwhv_189`,Ire=`_right_7uwhv_198`,Lre=`_multiOptions_7uwhv_211`,Rre=`_multiOption_7uwhv_211`,zre=`_label_7uwhv_239`,Bre=`_closeMultiOption_7uwhv_242`,Vre=`_focus_7uwhv_253`,Hre=`_selectedSingleValue_7uwhv_257`,Ure=`_placeHolder_7uwhv_258`,Wre=`_groupOrderFirst_7uwhv_297`,Gre=`_groupOrderMiddle_7uwhv_298`,Kre=`_groupOrderLast_7uwhv_302`,qre=`_detailedLabel_7uwhv_307`;var dg={inputInTable:`_inputInTable_7uwhv_1`,inputHover:`_inputHover_7uwhv_13`,inputFocus:`_inputFocus_7uwhv_18`,inputError:`_inputError_7uwhv_25`,inputWarning:`_inputWarning_7uwhv_26`,inputDisabled:`_inputDisabled_7uwhv_61`,hideScrollbars:`_hideScrollbars_7uwhv_67`,trigger:`_trigger_7uwhv_77`,isInTable:`_isInTable_7uwhv_93`,input:`_input_7uwhv_1`,isOpen:`_isOpen_7uwhv_114`,disabled:`_disabled_7uwhv_156`,icons:`_icons_7uwhv_162`,clearAll:`_clearAll_7uwhv_169`,iconOpen:`_iconOpen_7uwhv_170`,small:`_small_7uwhv_181`,triggerInputContainer:`_triggerInputContainer_7uwhv_189`,right:`_right_7uwhv_198`,multiOptions:`_multiOptions_7uwhv_211`,multiOption:`_multiOption_7uwhv_211`,label:`_label_7uwhv_239`,closeMultiOption:`_closeMultiOption_7uwhv_242`,focus:`_focus_7uwhv_253`,selectedSingleValue:`_selectedSingleValue_7uwhv_257`,placeHolder:`_placeHolder_7uwhv_258`,groupOrderFirst:`_groupOrderFirst_7uwhv_297`,groupOrderMiddle:`_groupOrderMiddle_7uwhv_298`,groupOrderLast:`_groupOrderLast_7uwhv_302`,detailedLabel:`_detailedLabel_7uwhv_307`};const fg=({selectedOptions:e,small:t,width:n,testId:r})=>{let i=Sh(),[a,o]=(0,f.useState)([]),[s,c]=(0,f.useState)([]);return(0,f.useEffect)(()=>{let r=[],a=[],s=0;e.forEach((o,c)=>{s+=sg(o,t,i),c===e.length-1&&s<n||s<n-24?r.push(o):a.push(o)}),o(r),c(a)},[e,i,n]),(0,p.jsxs)(`div`,{className:dg.multiOptions,"data-testid":r&&`${r}-value`,children:[a.filter(e=>e&&e.label).map((e,t)=>(0,p.jsx)(`span`,{className:dg.multiOption,onClick:e=>{e.stopPropagation()},children:e.label},t)),s.length>0&&(0,p.jsx)(ya,{text:s.map((e,t)=>(0,p.jsx)(`div`,{children:e.label},t)),display:`inline-flex`,children:(0,p.jsx)(`span`,{className:dg.multiOption,children:a.length?`+${s.length}`:`${s.length} items`})})]})};var pg=u(Ra());const mg=({selectedOptions:e,searchable:t=!1,searchValue:n,onChange:r=pg.noop,inputRef:i,error:a,placeholder:o=`Select...`,small:s,testId:c})=>{let l=(0,f.useRef)(null),u=Array.isArray(e),d=u?e.length>0:!!e,m=n?n.length+1:1,h=()=>{let e=l.current?.offsetWidth||0,t=i.current?.offsetWidth||0;return e-t};return(0,p.jsxs)(`div`,{className:dg.triggerInputContainer,ref:l,children:[d?u?(0,p.jsx)(fg,{selectedOptions:e,small:s,width:h(),testId:c}):(0,p.jsx)(`span`,{className:dg.selectedSingleValue,"data-testid":c&&`${c}-value`,children:n?.length?``:e?.label}):(0,p.jsx)(`span`,{className:dg.placeHolder,children:n?.length?``:o}),t?(0,p.jsx)(`input`,{tabIndex:-1,ref:i,size:m,className:dg.input,value:n,onChange:e=>r(e.target.value),"data-error":a||null,"data-testid":c&&`${c}-input`}):null]})};var hg=u(h());const gg=({selectedOptions:e,searchValue:t,searchable:n,clearable:r,onClickTrigger:i,element:a,error:o,warning:s,tooltip:c,small:l,isInTable:u,disabled:d,onChangeSearch:f,onClickDeselect:m,onClickClear:h,tabIndex:g,isOpen:_,triggerRef:y,clearAllIsFocused:b,focusedSelectedOptionIndex:x,onFocus:C,onBlur:w,groupOrder:T,maxTooltipWidth:E,placeholder:D,right:O,testId:k})=>{let[A,j]=xh(),M=Array.isArray(e)?e.length>0&&e[0]?.value:e?.value,N=r&&M,P=(()=>{if(T)switch(T){case v.FIRST:return dg.groupOrderFirst;case v.LAST:return dg.groupOrderLast;default:return dg.groupOrderMiddle}return``})(),ee=!Array.isArray(e)&&e?.details?{...e,label:(0,p.jsxs)(`div`,{className:(0,hg.default)(dg.detailedLabel),children:[(0,p.jsx)(Yd,{children:e.label}),(0,p.jsx)(Yd,{muted:!0,children:e.details})]})}:e,te=(0,p.jsxs)(p.Fragment,{children:[a,(0,p.jsxs)(`div`,{ref:y,tabIndex:g,className:(0,hg.default)(dg.trigger,_?dg.isOpen:``,d?dg.disabled:``,l?dg.small:``,u?dg.isInTable:``,O?dg.right:``,P),onClick:e=>{e.stopPropagation(),requestAnimationFrame(()=>{i(e),typeof j==`function`&&j()})},onFocus:C,onBlur:w,"data-error":o||null,"data-warning":s||null,"data-testid":k,children:[(0,p.jsx)(mg,{selectedOptions:ee,placeholder:D,searchable:n,searchValue:t,inputRef:A,onChange:f,error:o,small:l,testId:k}),(0,p.jsx)(`span`,{className:dg.icons,children:N?(0,p.jsx)(`span`,{className:(0,hg.default)(dg.clearAll,b?dg.focus:``),onClick:e=>{e.stopPropagation(),h&&h(e)},"data-testid":k&&`${k}-clear`,children:(0,p.jsx)(er,{icon:S.CLOSE})}):(0,p.jsx)(`span`,{className:(0,hg.default)(dg.iconOpen),children:(0,p.jsx)(er,{icon:`chevron down`})})})]})]});return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(ya,{error:!!o,warning:!!s,text:c||o||s,enabled:c&&gs(c)||o&&gs(o)||s&&gs(s)||!1,maxWidth:E,children:te})})};let _g=function(e){return e.SET_VISIBLE_OPTIONS=`SET_VISIBLE_OPTIONS`,e.RESET_LAYER_FOCUS=`RESET_LAYER_FOCUS`,e.CLEAR_SEARCH=`CLEAR_SEARCH`,e.ON_CHANGE_SEARCH=`ON_CHANGE_SEARCH`,e.FOCUS_TRIGGER_INPUTS=`FOCUS_TRIGGER_INPUTS`,e.BLUR_TRIGGER_INPUTS=`BLUR_TRIGGER_INPUTS`,e.FOCUS_LAYER_OPTIONS=`FOCUS_LAYER_OPTIONS`,e.OPEN_LAYER=`OPEN_LAYER`,e.CLOSE_LAYER=`CLOSE_LAYER`,e}({});const vg={options:[`none`,`clearAll`],currentIndex:0,currentOption:!1,clearAll:!1},yg=e=>e===null?0:e+1,bg=(e,t)=>{let n=[`none`,...e.map((e,t)=>e.type===L.HEADING?null:t).filter(e=>e!==null)],r=yg(t);return{options:n,currentIndex:r,current:n[r]}},xg=(e,t)=>{let n=e===`up`?-1:1,r=t.currentIndex+n,i=(r<0?t.options.length-1:r)%t.options.length,a=t.options[i];return{...t,currentIndex:i,current:a}},Sg=(e,t,n)=>{let r=e===`left`?-1:1,i=t&&t.length?[`none`,...Array.from({length:t.length},(e,t)=>t),`clearAll`]:[`none`,`clearAll`],a=n.currentIndex+r,o=(a<0?i.length-1:a)%i.length,s=i[o],c=s===`clearAll`;return{options:i,currentIndex:o,currentOption:s,clearAll:c}},Cg=()=>vg,wg=e=>({...e,currentIndex:0,current:`none`}),Tg=(e,t)=>{switch(t.type){case _g.SET_VISIBLE_OPTIONS:return{...e,visibleOptions:t.options||[]};case _g.RESET_LAYER_FOCUS:return{...e,layerFocus:bg(t.options||[],t.firstSelectedOptionIndex||0)};case _g.CLEAR_SEARCH:return{...e,visibleOptions:t.options||[],searchValue:``};case _g.ON_CHANGE_SEARCH:{let n=(t.options||[]).filter(e=>(String(e.label)+(e.details?String(e.details):``)).toLowerCase().includes(String(t.value||``).toLowerCase())),r=[...n];return t.createAble&&t.value&&t.value!==``&&r.push({label:`Create "${t.value}"`,value:t.value,createAble:!0}),{...e,searchValue:t.value,visibleOptions:r,layerFocus:wg(e.layerFocus)}}case _g.FOCUS_TRIGGER_INPUTS:return{...e,triggerFocus:Sg(t.direction||`right`,t.selectedOptions||[],e.triggerFocus),layerFocus:wg(e.layerFocus)};case _g.BLUR_TRIGGER_INPUTS:return{...e,triggerFocus:Cg()};case _g.FOCUS_LAYER_OPTIONS:return t.nextLayerFocus?{...e,layerFocus:t.nextLayerFocus,triggerFocus:Cg()}:e;case _g.OPEN_LAYER:return{...e,isLayerOpen:!0};case _g.CLOSE_LAYER:return{...e,isLayerOpen:!1};default:return e}},Eg={auto:!0,possiblePlacements:[`bottom-start`,`top-start`],placement:`bottom-start`,preferX:`right`,preferY:`bottom`};let Dg=function(e){return e.CLOSE_LAYER=`CLOSE_LAYER`,e.OPEN_LAYER=`OPEN_LAYER`,e.SET_VISIBLE_OPTIONS=`SET_VISIBLE_OPTIONS`,e.CLEAR_SEARCH=`CLEAR_SEARCH`,e.RESET_LAYER_FOCUS=`RESET_LAYER_FOCUS`,e.FOCUS_LAYER_OPTIONS=`FOCUS_LAYER_OPTIONS`,e.BLUR_TRIGGER_INPUTS=`BLUR_TRIGGER_INPUTS`,e.FOCUS_TRIGGER_INPUTS=`FOCUS_TRIGGER_INPUTS`,e.ON_CHANGE_SEARCH=`ON_CHANGE_SEARCH`,e}({}),Og=function(e){return e.RIGHT=`ArrowRight`,e.LEFT=`ArrowLeft`,e.UP=`ArrowUp`,e.DOWN=`ArrowDown`,e.ENTER=`Enter`,e.ESC=`Escape`,e.TAB=`Tab`,e}({});const kg=({state:e,dispatch:t,options:n,setTriggerFocus:r,disabled:i,disabledContext:a,onCreate:o,onChange:s,selectedOptions:c,width:l,small:u,isFontLoaded:d,placeholder:p,firstSelectedOptionIndex:m,createAble:h,listRef:g,autoLayerWidth:_})=>{let v=()=>{e.isLayerOpen&&t({type:Dg.CLOSE_LAYER}),r()},y=()=>t({type:Dg.OPEN_LAYER}),b=(0,f.useRef)(!0);(0,f.useEffect)(()=>{b.current?b.current=!1:t({type:Dg.SET_VISIBLE_OPTIONS,options:n})},[n]);let x=(e,l,u)=>{if(!(i||a)){if(u&&u(),l){if(l.createAble&&o)o(l.value);else if(!l.disabled)if(Array.isArray(c)){let t=c.some(e=>String(e.value)===String(l.value)),n=t?c.filter(e=>String(e.value)!==String(l.value)):[...c,l];s&&s(e,n)}else s&&s(e,l)}t({type:Dg.CLEAR_SEARCH,options:n}),r()}},S=(0,f.useCallback)(()=>l?l===`auto`?og(n,u,d,p):l:`100%`,[n,d]),C=(0,f.useCallback)(e=>{if(!_)return e?.width;let t=Math.max(og(n,u,d,p),e?.width);return t},[n,d]),{renderLayer:w,layerProps:T,triggerProps:E,triggerBounds:D}=Zi({isOpen:e?.isLayerOpen??!1,overflowContainer:!0,...Eg,ResizeObserver,onOutsideClick:v,onParentClose:v}),O=()=>{if(!(i||a)){if(e.isLayerOpen){v();return}r(),t({type:Dg.RESET_LAYER_FOCUS,options:n,firstSelectedOptionIndex:m}),y()}},k=(0,f.useRef)(!0);(0,f.useEffect)(()=>{k.current?k.current=!1:e.isLayerOpen||t({type:Dg.CLEAR_SEARCH,options:n})},[e.isLayerOpen]);let A=(e,t)=>{let n=c instanceof Array?c.filter(e=>e.value!==t.value):null;s&&s(e,n)},j=e=>{let t=c instanceof Array?[]:{value:null};s&&s(e,t)},M=e=>t({type:Dg.ON_CHANGE_SEARCH,options:n,value:e,createAble:h}),N=()=>{y(),t({type:Dg.BLUR_TRIGGER_INPUTS})},P=e=>{g.current&&Number.isInteger(e)&&g.current.scrollToItem(e)},ee=n=>{let r=xg(n,e.layerFocus);t({type:Dg.FOCUS_LAYER_OPTIONS,nextLayerFocus:r}),P(r.current)},te=e=>{t({type:Dg.FOCUS_TRIGGER_INPUTS,ICustomSelectDirection:e,selectedOptions:c})},ne=e=>j(e),re=c&&c[e.triggerFocus.currentOption],ie=t=>{A(t,c[e.triggerFocus.currentOption])},ae=t=>{x(t,e?.visibleOptions?.[e.layerFocus.current],v)},oe=e.triggerFocus.clearAll,se=(n,r)=>{switch(n){case Og.UP:ee(`up`);break;case Og.DOWN:e.isLayerOpen?ee(`down`):N();break;case Og.LEFT:te(`left`);break;case Og.RIGHT:te(`right`);break;case Og.ENTER:oe?ne(r):re?ie(r):ae(r);break;case Og.ESC:v();break;case Og.TAB:t({type:Dg.CLOSE_LAYER});break;default:}};return{getTriggerWidth:S,onKeyEvent:se,clearAllIsFocused:oe,triggerProps:E,onClickTrigger:O,onChangeSearch:M,onClickDeselectOption:A,onClickClearAll:j,renderLayer:w,layerProps:T,closeLayer:v,onSelectOption:x,getLayerWidth:C,triggerBounds:D}},Ag=e=>{let{multi:t=!1,disabled:n=!1,error:r=null,warning:i=null,tooltip:a=null,options:o,selectedOptions:s,onCreate:c=null,placeholder:l=``,small:u=!1,tabIndex:d=0,onFocus:m=()=>{},onBlur:h=()=>{},searchable:g=!0,clearable:_=!1,maxTooltipWidth:v,closeOnOptionActionClick:y,isInTable:b=!1,groupOrder:x,firstSelectedOptionIndex:S=0,right:C=!1,testId:w=void 0}=e,T=(0,f.useContext)(Ie),E=c!==null,D=(0,f.useRef)(null),[O,k]=xh(),A=Sh(),[j,M]=(0,f.useReducer)(Tg,{options:o,firstSelectedOptionIndex:S},({options:e})=>({searchValue:``,visibleOptions:e,layerFocus:bg(e,S??0),triggerFocus:vg,isLayerOpen:!1})),{getTriggerWidth:N,onKeyEvent:P,clearAllIsFocused:ee,triggerProps:te,onClickTrigger:ne,onChangeSearch:re,onClickDeselectOption:ie,onClickClearAll:ae,renderLayer:oe,layerProps:se,closeLayer:ce,onSelectOption:le,getLayerWidth:ue,triggerBounds:de}=kg({...e,state:j,dispatch:M,setTriggerFocus:k,disabledContext:T,isFontLoaded:A,createAble:E,listRef:D}),fe=e=>{Object.values(Og).includes(e.key)&&P(e.key,e)};return(0,p.jsxs)(`div`,{style:{width:N()},onKeyDown:fe,children:[(0,p.jsx)(gg,{selectedOptions:s,searchValue:j.searchValue,isOpen:j.isLayerOpen,focusedSelectedOptionIndex:j.triggerFocus.currentOption,clearAllIsFocused:ee,searchable:g,triggerRef:xi(O,te.ref),error:r,warning:i,tooltip:a,small:u,isInTable:b,disabled:n||T,clearable:_,tabIndex:d,onClickTrigger:ne,onChangeSearch:re,onClickDeselect:ie,onClickClear:ae,onFocus:m,onBlur:h,groupOrder:x,maxTooltipWidth:v,placeholder:l,right:C,testId:w}),j.isLayerOpen&&oe((0,p.jsx)(`div`,{...se,className:Xh.layerContainer,children:(0,p.jsx)(ug,{listRef:D,isMulti:t,sections:j.visibleOptions,selectedOptions:s,onSelectOption:(e,n)=>{let r=t?void 0:ce;le(e,n,r)},closeLayer:()=>{y&&ce()},width:ue(de),small:u,focusedOptionIndex:j.layerFocus.current,firstSelectedOptionIndex:S??0,testId:w&&`${w}-layer`})}))]})},jg=e=>e==null||e===``,Mg=e=>/^-?\d+(\.\d+)?$/.test(e.trim()),Ng=e=>e instanceof Array,Pg=(e,t)=>t&&Array.isArray(e)?e.map(e=>typeof e==`string`||typeof e==`number`?{label:e,value:e}:e):e,Fg=(e,t)=>{if(typeof t==`object`&&t&&t.hasOwnProperty(`label`)&&t.hasOwnProperty(`value`))return t;{let n=typeof t==`object`&&t&&t.hasOwnProperty(`value`)?t.value:t,r=Array.isArray(e)?e.filter(e=>e.type!==L.HEADING).find(e=>e.value==n):void 0;return r||(jg(n)?void 0:{value:n,label:n})}},Ig=(e,t)=>{let n=Ng(t);return n?t.map(t=>Fg(e,t)).filter(e=>e!==void 0):t===null?void 0:Fg(e,t)},Lg=e=>Array.isArray(e)&&e.some(e=>typeof e==`string`||typeof e==`number`),Rg=(e,t)=>{let n=t instanceof Array?t.length?t[0]:null:t,r=n==null?null:typeof n==`string`||typeof n==`number`||typeof n==`boolean`?n:n.value,i=e.filter(e=>e.type!==L.HEADING).findIndex(e=>typeof e==`string`||typeof e==`number`?e==r:e.value==r);return i===-1?null:i},zg=(e,t)=>{let n=Ng(t),r=n?t:jg(t)?[]:[t];return!r?.every(t=>{let n=e?.find(e=>e?.value===t?.value);return n!==void 0})},Bg=(e,t,n,r)=>{let i=Array.isArray(e)?e:[],a=Ng(t),o=Lg(i),s=Pg(i,o),c=n?Rg(i,t):null,l=Ig(s,t),u=r&&l!==void 0?zg(s,l):!1;return{options:s,selectedOptions:l,multi:a,simpleInputs:o,firstSelectedOptionIndex:c,hasNonExistentValue:u}};var Vg=u(Ra());const Hg=e=>{let{name:t=``,options:n=[],value:r,native:i=!1,onChange:a=Vg.noop,deprecatedEventHandler:o=!1,autoScroll:s=!0,warning:c,error:l,checkNonExistentValues:u=!0,closeOnOptionActionClick:d=!0,testId:f,disabled:m}=e,h=!i&&s===!0,{multi:g,simpleInputs:_,options:v,selectedOptions:y,firstSelectedOptionIndex:b,hasNonExistentValue:x}=Bg(n,r,h,u),S=!g,C=i&&S;i&&!S&&console.warn(`Native select does not support provided props (see stories)`);let w=`Value no longer available for re-selection`,T=x&&!m?c?(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`div`,{children:w}),(0,p.jsx)(`div`,{children:c})]}):w:c,E=x&&l&&!m?(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`div`,{children:w}),(0,p.jsx)(`div`,{children:l})]}):l,D=(e,n)=>{if(o){let e=g?n.map(e=>_?e.value:e):_?n.value:n;e&&a(e)}else{let r=!(e instanceof Event),i=g?n:n.value;if(r)e.target.name=t,e.target.value=i,g||(e.target.label=n.label),a(e);else{let r={...e,target:{...e.target,name:t,value:i,label:g?void 0:n.label}};a(r)}}};return C?(0,p.jsx)(bh,{...e,options:v,selectedOption:y,onChange:D,hasNonExistentValue:x,warning:T,error:E,testId:f}):(0,p.jsx)(Ag,{...e,options:v,selectedOptions:y,onChange:D,multi:g,firstSelectedOptionIndex:b,warning:T,error:E,testId:f,closeOnOptionActionClick:d})},Ug=(e,t)=>t||e&&e.reduce((e,t)=>t?.selected?Number(t?.value):e,10)||10,Wg=(e,t)=>{if(!t||!e)return 10;let{options:n,value:r}=t,i=Number(r);return i===0?1:Math.ceil(e/Ug(n,i))},Gg=(e,t,n=`Selected page must be a positive whole number between 1 and`)=>{let r=`${n} ${t}`,i={valid:!0,error:null};return e===``?i:!e.match(/^\d+$/g)||parseInt(e)<=0||parseInt(e)>t?{valid:!1,error:r}:i},Jre=`_paginationContainer_1tmz4_1`;var Kg={paginationContainer:`_paginationContainer_1tmz4_1`};const Yre=`_addon_b4w53_1`,Xre=`_small_b4w53_12`,Zre=`_groupOrderFirst_b4w53_16`,Qre=`_groupOrderMiddle_b4w53_17`,$re=`_groupOrderLast_b4w53_21`;var qg={addon:`_addon_b4w53_1`,small:`_small_b4w53_12`,groupOrderFirst:`_groupOrderFirst_b4w53_16`,groupOrderMiddle:`_groupOrderMiddle_b4w53_17`,groupOrderLast:`_groupOrderLast_b4w53_21`},Jg=u(h());const Yg=({children:e,groupOrder:t,small:n=!1})=>{let r=(()=>{if(t)switch(t){case v.FIRST:return qg.groupOrderFirst;case v.LAST:return qg.groupOrderLast;default:return qg.groupOrderMiddle}return``})();return(0,p.jsx)(`span`,{className:(0,Jg.default)(qg.addon,r,n?qg.small:``),children:e})},Xg=({pagination:e})=>{let{rowCount:t,selectedPage:n,small:r,onSelectPage:i,rowsPerPage:a,errorMessageTemplate:o,testIds:s}=e,c=Number(a?.value)===0,l=Wg(t,a),[u,d]=(0,f.useState)(String(n));(0,f.useEffect)(()=>{d(String(n))},[n]);let{error:m}=Gg(u,l,o),h=e=>{let{valid:t}=Gg(e,l,o);d(e),t&&e!==``&&i&&i(Number(e))};return(0,p.jsxs)(`div`,{className:Kg.paginationContainer,children:[a&&(0,p.jsx)(`div`,{style:{flexShrink:0},children:(0,p.jsx)(Hg,{onChange:e=>{a.onChange&&a.onChange(e),h(`1`)},options:a.options,native:!!a.options,small:r,width:`auto`,value:a.value})}),(0,p.jsx)(_o,{small:r,round:!0,basic:!0,icon:S.CHEVRON_DOUBLE_LEFT,onClick:()=>h(`1`),disabled:c||n===1}),(0,p.jsx)(_o,{small:r,round:!0,basic:!0,icon:S.CHEVRON_LEFT,onClick:()=>h(String(Number(n)-1)),disabled:c||n===1}),(0,p.jsxs)(sp,{small:r,width:`auto`,children:[(0,p.jsx)(dp,{right:!0,value:u,placeholder:String(n),onChange:e=>h(e.target.value),width:`50px`,disabled:c||l<=1,error:m}),(0,p.jsxs)(Yg,{children:[`of `,l]})]}),(0,p.jsx)(_o,{small:r,round:!0,basic:!0,icon:S.CHEVRON_RIGHT,onClick:()=>h(String(Number(n)+1)),disabled:c||n===l}),(0,p.jsx)(_o,{small:r,round:!0,basic:!0,icon:S.CHEVRON_DOUBLE_RIGHT,onClick:()=>h(String(l)),disabled:c||n===l,testId:s?.doubleRightBtn})]})},Zg=({colSpan:e,pagination:t,actions:n,content:r,testId:i})=>{let a=n&&n.length,o=r!=null,s=()=>{if(t){let{rowCount:e,rowsPerPage:n}=t,r=Number(n?.options?.[0]?.value);return e>r}return!1},c=a||o||s();return c?(0,p.jsxs)(`div`,{className:gh.footer,"data-testid":`${i??`pagination`}-footer`,children:[o?(0,p.jsx)(`div`,{className:gh.section,children:(0,p.jsx)(`div`,{children:r})}):null,a||s()?(0,p.jsxs)(`div`,{className:gh.section,children:[t&&s()?(0,p.jsx)(Xg,{pagination:t}):(0,p.jsx)(`div`,{}),a&&(0,p.jsx)(`div`,{children:(0,p.jsx)(qs,{actions:n})})]}):null]}):null},Qg=e=>{let t=Math.max(...e.reduce((e,t)=>{let n=t.cells.map(e=>e.colSpan?e.colSpan:1).reduce((e,t)=>e+t,0);return e.concat(n)},[]));return isNaN(t)?0:t},$g=(e,t)=>{let n=[Qg(t),Qg(e)];return Math.max(...n)},e_=e=>e.reduce((e,t)=>t.actions&&t.actions.length>0?1:e,0),t_=(e,t)=>e_(t)>0||e_(e)>0;function n_(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,f.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}const r_=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function i_(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function a_(e){return`nodeType`in e}function o_(e){var t,n;return e?i_(e)?e:a_(e)?(t=(n=e.ownerDocument)?.defaultView)??window:window:window}function s_(e){let{Document:t}=o_(e);return e instanceof t}function c_(e){return i_(e)?!1:e instanceof o_(e).HTMLElement}function l_(e){return e instanceof o_(e).SVGElement}function u_(e){return e?i_(e)?e.document:a_(e)?s_(e)?e:c_(e)||l_(e)?e.ownerDocument:document:document:document}const d_=r_?f.useLayoutEffect:f.useEffect;function f_(e){let t=(0,f.useRef)(e);return d_(()=>{t.current=e}),(0,f.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}function p_(){let e=(0,f.useRef)(null),t=(0,f.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),n=(0,f.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function m_(e,t){t===void 0&&(t=[e]);let n=(0,f.useRef)(e);return d_(()=>{n.current!==e&&(n.current=e)},t),n}function h_(e,t){let n=(0,f.useRef)();return(0,f.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function g_(e){let t=f_(e),n=(0,f.useRef)(null),r=(0,f.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[]);return[n,r]}function __(e){let t=(0,f.useRef)();return(0,f.useEffect)(()=>{t.current=e},[e]),t.current}let v_={};function y_(e,t){return(0,f.useMemo)(()=>{if(t)return t;let n=v_[e]==null?0:v_[e]+1;return v_[e]=n,e+`-`+n},[e,t])}function b_(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}const x_=b_(1),S_=b_(-1);function C_(e){return`clientX`in e&&`clientY`in e}function w_(e){if(!e)return!1;let{KeyboardEvent:t}=o_(e.target);return t&&e instanceof t}function T_(e){if(!e)return!1;let{TouchEvent:t}=o_(e.target);return t&&e instanceof t}function E_(e){if(T_(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return C_(e)?{x:e.clientX,y:e.clientY}:null}const D_=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[D_.Translate.toString(e),D_.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),O_=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function k_(e){return e.matches(O_)?e:e.querySelector(O_)}const A_={display:`none`};function j_(e){let{id:t,value:n}=e;return f.default.createElement(`div`,{id:t,style:A_},n)}function M_(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e,i={position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`};return f.default.createElement(`div`,{id:t,style:i,role:`status`,"aria-live":r,"aria-atomic":!0},n)}function N_(){let[e,t]=(0,f.useState)(``),n=(0,f.useCallback)(e=>{e!=null&&t(e)},[]);return{announce:n,announcement:e}}const P_=(0,f.createContext)(null);function F_(e){let t=(0,f.useContext)(P_);(0,f.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);let n=t(e);return n},[e,t])}function I_(){let[e]=(0,f.useState)(()=>new Set),t=(0,f.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]),n=(0,f.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return(t=e[n])?.call(e,r)})},[e]);return[n,t]}const L_={draggable:`
|
|
145
|
+
To pick up a draggable item, press the space bar.
|
|
146
|
+
While dragging, use the arrow keys to move the item.
|
|
147
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
148
|
+
`},R_={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function z_(e){let{announcements:t=R_,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=L_}=e,{announce:a,announcement:o}=N_(),s=y_(`DndLiveRegion`),[c,l]=(0,f.useState)(!1);if((0,f.useEffect)(()=>{l(!0)},[]),F_((0,f.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=f.default.createElement(f.default.Fragment,null,f.default.createElement(j_,{id:r,value:i.draggable}),f.default.createElement(M_,{id:s,announcement:o}));return n?(0,m.createPortal)(u,n):u}var B_;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(B_||={});function V_(){}const H_=Object.freeze({x:0,y:0});function U_(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function W_(e,t){let n=E_(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function G_(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function K_(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function q_(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function J_(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Y_=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=J_(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=U_(J_(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(G_)};function X_(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}const Z_=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=X_(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(K_)};function Q_(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function $_(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:H_}function ev(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const tv=ev(1);function nv(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function rv(e,t,n){let r=nv(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}const iv={ignoreTransform:!1};function av(e,t){t===void 0&&(t=iv);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=o_(e).getComputedStyle(e);t&&(n=rv(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function ov(e){return av(e,{ignoreTransform:!0})}function sv(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function cv(e,t){return t===void 0&&(t=o_(e).getComputedStyle(e)),t.position===`fixed`}function lv(e,t){t===void 0&&(t=o_(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/,r=[`overflow`,`overflowX`,`overflowY`];return r.some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function uv(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(s_(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!c_(i)||l_(i)||n.includes(i))return n;let a=o_(e).getComputedStyle(i);return i!==e&&lv(i,a)&&n.push(i),cv(i,a)?n:r(i.parentNode)}return e?r(e):n}function dv(e){let[t]=uv(e,1);return t??null}function fv(e){return!r_||!e?null:i_(e)?e:a_(e)?s_(e)||e===u_(e).scrollingElement?window:c_(e)?e:null:null}function pv(e){return i_(e)?e.scrollX:e.scrollLeft}function mv(e){return i_(e)?e.scrollY:e.scrollTop}function hv(e){return{x:pv(e),y:mv(e)}}var gv;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(gv||={});function _v(e){return!r_||!e?!1:e===document.scrollingElement}function vv(e){let t={x:0,y:0},n=_v(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,o=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:a,isBottom:o,isRight:s,maxScroll:r,minScroll:t}}const yv={x:.2,y:.2};function bv(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=yv);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=vv(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=gv.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=gv.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=gv.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=gv.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function xv(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Sv(e){return e.reduce((e,t)=>x_(e,hv(t)),H_)}function Cv(e){return e.reduce((e,t)=>e+pv(t),0)}function wv(e){return e.reduce((e,t)=>e+mv(t),0)}function Tv(e,t){if(t===void 0&&(t=av),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e),o=dv(e);o&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}const Ev=[[`x`,[`left`,`right`],Cv],[`y`,[`top`,`bottom`],wv]];var Dv=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=uv(t),r=Sv(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Ev)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},Ov=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return(t=this.target)?.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function kv(e){let{EventTarget:t}=o_(e);return e instanceof t?e:u_(e)}function Av(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var jv;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(jv||={});function Mv(e){e.preventDefault()}function Nv(e){e.stopPropagation()}var Pv;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Pv||={});const Fv={start:[Pv.Space,Pv.Enter],cancel:[Pv.Esc],end:[Pv.Space,Pv.Enter,Pv.Tab]},Iv=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Pv.Right:return{...n,x:n.x+25};case Pv.Left:return{...n,x:n.x-25};case Pv.Down:return{...n,y:n.y+25};case Pv.Up:return{...n,y:n.y-25}}};var Lv=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Ov(u_(t)),this.windowListeners=new Ov(o_(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(jv.Resize,this.handleCancel),this.windowListeners.add(jv.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(jv.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Tv(n),t(H_)}handleKeyDown(e){if(w_(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Fv,coordinateGetter:a=Iv,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:H_;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=S_(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=vv(n),p=xv(n),m={x:Math.min(i===Pv.Right?p.right-p.width/2:p.right,Math.max(i===Pv.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Pv.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Pv.Down?p.top:p.top+p.height/2,u.y))},h=i===Pv.Right&&!s||i===Pv.Left&&!c,g=i===Pv.Down&&!l||i===Pv.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Pv.Right&&e<=d.x||i===Pv.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Pv.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Pv.Down&&e<=d.y||i===Pv.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Pv.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,x_(S_(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Lv.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=Fv,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Rv(e){return!!(e&&`distance`in e)}function zv(e){return!!(e&&`delay`in e)}var Bv=class{constructor(e,t,n){var r;n===void 0&&(n=kv(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:i}=e,{target:a}=i;this.props=e,this.events=t,this.document=u_(a),this.documentListeners=new Ov(this.document),this.listeners=new Ov(n),this.windowListeners=new Ov(o_(a)),this.initialCoordinates=(r=E_(i))??H_,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(jv.Resize,this.handleCancel),this.windowListeners.add(jv.DragStart,Mv),this.windowListeners.add(jv.VisibilityChange,this.handleCancel),this.windowListeners.add(jv.ContextMenu,Mv),this.documentListeners.add(jv.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(zv(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Rv(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(jv.Click,Nv,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(jv.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;let{activated:n,initialCoordinates:r,props:i}=this,{onMove:a,options:{activationConstraint:o}}=i;if(!r)return;let s=(t=E_(e))??H_,c=S_(r,s);if(!n&&o){if(Rv(o)){if(o.tolerance!=null&&Av(c,o.tolerance))return this.handleCancel();if(Av(c,o.distance))return this.handleStart()}if(zv(o)&&Av(c,o.tolerance))return this.handleCancel();this.handlePending(o,c);return}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Pv.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}};const Vv={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}};var Hv=class extends Bv{constructor(e){let{event:t}=e,n=u_(t.target);super(e,Vv,n)}};Hv.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Uv={move:{name:`mousemove`},end:{name:`mouseup`}};var Wv;(function(e){e[e.RightClick=2]=`RightClick`})(Wv||={});var Gv=class extends Bv{constructor(e){super(e,Uv,u_(e.event.target))}};Gv.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Wv.RightClick?!1:(r?.({event:n}),!0)}}];const Kv={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}};var qv=class extends Bv{constructor(e){super(e,Kv)}static setup(){return window.addEventListener(Kv.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Kv.move.name,e)};function e(){}}};qv.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Jv;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(Jv||={});var Yv;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(Yv||={});function eie(e){let{acceleration:t,activator:n=Jv.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=Yv.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:p}=e,m=nie({delta:d,disabled:!a}),[h,g]=p_(),_=(0,f.useRef)({x:0,y:0}),v=(0,f.useRef)({x:0,y:0}),y=(0,f.useMemo)(()=>{switch(n){case Jv.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Jv.DraggableRect:return i}},[n,i,c]),b=(0,f.useRef)(null),x=(0,f.useCallback)(()=>{let e=b.current;if(!e)return;let t=_.current.x*v.current.x,n=_.current.y*v.current.y;e.scrollBy(t,n)},[]),S=(0,f.useMemo)(()=>s===Yv.TreeOrder?[...l].reverse():l,[s,l]);(0,f.useEffect)(()=>{if(!a||!l.length||!y){g();return}for(let e of S){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=bv(e,i,y,t,p);for(let e of[`x`,`y`])m[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){g(),b.current=e,h(x,o),_.current=s,v.current=a;return}}_.current={x:0,y:0},v.current={x:0,y:0},g()},[t,x,r,g,a,o,JSON.stringify(y),JSON.stringify(m),h,l,S,u,JSON.stringify(p)])}const tie={x:{[gv.Backward]:!1,[gv.Forward]:!1},y:{[gv.Backward]:!1,[gv.Forward]:!1}};function nie(e){let{delta:t,disabled:n}=e,r=__(t);return h_(e=>{if(n||!r||!e)return tie;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[gv.Backward]:e.x[gv.Backward]||i.x===-1,[gv.Forward]:e.x[gv.Forward]||i.x===1},y:{[gv.Backward]:e.y[gv.Backward]||i.y===-1,[gv.Forward]:e.y[gv.Forward]||i.y===1}}},[n,t,r])}function rie(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return h_(e=>{var n;return t==null?null:(n=r??e)??null},[r,t])}function iie(e,t){return(0,f.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var Xv;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(Xv||={});var Zv;(function(e){e.Optimized=`optimized`})(Zv||={});const Qv=new Map;function aie(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,f.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,f.useRef)(e),d=_(),p=m_(d),m=(0,f.useCallback)(function(e){e===void 0&&(e=[]),!p.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),h=(0,f.useRef)(null),g=h_(t=>{if(d&&!n)return Qv;if(!t||t===Qv||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Dv(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,f.useEffect)(()=>{u.current=e},[e]),(0,f.useEffect)(()=>{d||m()},[n,d]),(0,f.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,f.useEffect)(()=>{d||typeof s!=`number`||h.current!==null||(h.current=setTimeout(()=>{m(),h.current=null},s))},[s,d,m,...r]),{droppableRects:g,measureDroppableContainers:m,measuringScheduled:a!=null};function _(){switch(l){case Xv.Always:return!1;case Xv.BeforeDragging:return n;default:return!n}}}function $v(e,t){return h_(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function oie(e,t){return $v(e,t)}function sie(e){let{callback:t,disabled:n}=e,r=f_(t),i=(0,f.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,f.useEffect)(()=>()=>i?.disconnect(),[i]),i}function ey(e){let{callback:t,disabled:n}=e,r=f_(t),i=(0,f.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,f.useEffect)(()=>()=>i?.disconnect(),[i]),i}function cie(e){return new Dv(av(e),e)}function ty(e,t,n){t===void 0&&(t=cie);let[r,i]=(0,f.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1){var i;return(i=r??n)??null}let a=t(e);return JSON.stringify(r)===JSON.stringify(a)?r:a})}let o=sie({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=ey({callback:a});return d_(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function lie(e){let t=$v(e);return $_(e,t)}const ny=[];function uie(e){let t=(0,f.useRef)(e),n=h_(n=>e?n&&n!==ny&&e&&t.current&&e.parentNode===t.current.parentNode?n:uv(e):ny,[e]);return(0,f.useEffect)(()=>{t.current=e},[e]),n}function die(e){let[t,n]=(0,f.useState)(null),r=(0,f.useRef)(e),i=(0,f.useCallback)(e=>{let t=fv(e.target);t&&n(e=>e?(e.set(t,hv(t)),new Map(e)):null)},[]);return(0,f.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=fv(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,hv(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{let t=fv(e);t?.removeEventListener(`scroll`,i)})}},[i,e]),(0,f.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>x_(e,t),H_):Sv(e):H_,[e,t])}function ry(e,t){t===void 0&&(t=[]);let n=(0,f.useRef)(null);return(0,f.useEffect)(()=>{n.current=null},t),(0,f.useEffect)(()=>{let t=e!==H_;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?S_(e,n.current):H_}function fie(e){(0,f.useEffect)(()=>{if(!r_)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function pie(e,t){return(0,f.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function iy(e){return(0,f.useMemo)(()=>e?sv(e):null,[e])}const ay=[];function mie(e,t){t===void 0&&(t=av);let[n]=e,r=iy(n?o_(n):null),[i,a]=(0,f.useState)(ay);function o(){a(()=>e.length?e.map(e=>_v(e)?r:new Dv(t(e),e)):ay)}let s=ey({callback:o});return d_(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function oy(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return c_(t)?t:e}function hie(e){let{measure:t}=e,[n,r]=(0,f.useState)(null),i=(0,f.useCallback)(e=>{for(let{target:n}of e)if(c_(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t]),a=ey({callback:i}),o=(0,f.useCallback)(e=>{let n=oy(e);a?.disconnect(),n&&a?.observe(n),r(n?t(n):null)},[t,a]),[s,c]=g_(o);return(0,f.useMemo)(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const gie=[{sensor:Hv,options:{}},{sensor:Lv,options:{}}],_ie={current:{}},sy={draggable:{measure:ov},droppable:{measure:ov,strategy:Xv.WhileDragging,frequency:Zv.Optimized},dragOverlay:{measure:av}};var cy=class extends Map{get(e){var t;return e==null?void 0:(t=super.get(e))??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return(t=(n=this.get(e))?.node.current)??void 0}};const vie={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new cy,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:V_},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:sy,measureDroppableContainers:V_,windowRect:null,measuringScheduled:!1},ly={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:V_,draggableNodes:new Map,over:null,measureDroppableContainers:V_},uy=(0,f.createContext)(ly),dy=(0,f.createContext)(vie);function yie(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new cy}}}function bie(e,t){switch(t.type){case B_.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case B_.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case B_.DragEnd:case B_.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case B_.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new cy(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case B_.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new cy(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case B_.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new cy(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function xie(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,f.useContext)(uy),a=__(r),o=__(n?.id);return(0,f.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!w_(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=k_(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function fy(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Sie(e){return(0,f.useMemo)(()=>({draggable:{...sy.draggable,...e?.draggable},droppable:{...sy.droppable,...e?.droppable},dragOverlay:{...sy.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Cie(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,f.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;d_(()=>{let e=!o&&!s;if(e||!t){a.current=!1;return}if(a.current||!r)return;let i=t?.node.current;if(!i||i.isConnected===!1)return;let c=n(i),l=$_(c,r);if(o||(l.x=0),s||(l.y=0),a.current=!0,Math.abs(l.x)>0||Math.abs(l.y)>0){let e=dv(i);e&&e.scrollBy({top:l.y,left:l.x})}},[t,o,s,r,n])}const py=(0,f.createContext)({...H_,scaleX:1,scaleY:1});var my;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(my||={});const hy=(0,f.memo)(function(e){var t,n,r,i;let{id:a,accessibility:o,autoScroll:s=!0,children:c,sensors:l=gie,collisionDetection:u=Z_,measuring:d,modifiers:p,...h}=e,g=(0,f.useReducer)(bie,void 0,yie),[_,v]=g,[y,b]=I_(),[x,S]=(0,f.useState)(my.Uninitialized),C=x===my.Initialized,{draggable:{active:w,nodes:T,translate:E},droppable:{containers:D}}=_,O=w==null?null:T.get(w),k=(0,f.useRef)({initial:null,translated:null}),A=(0,f.useMemo)(()=>{var e;return w==null?null:{id:w,data:(e=O?.data)??_ie,rect:k}},[w,O]),j=(0,f.useRef)(null),[M,N]=(0,f.useState)(null),[P,ee]=(0,f.useState)(null),te=m_(h,Object.values(h)),ne=y_(`DndDescribedBy`,a),re=(0,f.useMemo)(()=>D.getEnabled(),[D]),ie=Sie(d),{droppableRects:ae,measureDroppableContainers:oe,measuringScheduled:se}=aie(re,{dragging:C,dependencies:[E.x,E.y],config:ie.droppable}),ce=rie(T,w),le=(0,f.useMemo)(()=>P?E_(P):null,[P]),ue=Ue(),de=oie(ce,ie.draggable.measure);Cie({activeNode:w==null?null:T.get(w),config:ue.layoutShiftCompensation,initialRect:de,measure:ie.draggable.measure});let fe=ty(ce,ie.draggable.measure,de),pe=ty(ce?ce.parentElement:null),me=(0,f.useRef)({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),he=D.getNodeFor((t=me.current.over)?.id),ge=hie({measure:ie.dragOverlay.measure}),_e=(n=ge.nodeRef.current)??ce,ve=C?(r=ge.rect)??fe:null,ye=!!(ge.nodeRef.current&&ge.rect),be=lie(ye?null:fe),xe=iy(_e?o_(_e):null),Se=uie(C?he??ce:null),Ce=mie(Se),we=fy(p,{transform:{x:E.x-be.x,y:E.y-be.y,scaleX:1,scaleY:1},activatorEvent:P,active:A,activeNodeRect:fe,containerNodeRect:pe,draggingNodeRect:ve,over:me.current.over,overlayNodeRect:ge.rect,scrollableAncestors:Se,scrollableAncestorRects:Ce,windowRect:xe}),Te=le?x_(le,E):null,Ee=die(Se),De=ry(Ee),Oe=ry(Ee,[fe]),ke=x_(we,De),Ae=ve?tv(ve,we):null,je=A&&Ae?u({active:A,collisionRect:Ae,droppableRects:ae,droppableContainers:re,pointerCoordinates:Te}):null,Me=q_(je,`id`),[Ne,Pe]=(0,f.useState)(null),Fe=ye?we:x_(we,Oe),Ie=Q_(Fe,(i=Ne?.rect)??null,fe),Le=(0,f.useRef)(null),Re=(0,f.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(j.current==null)return;let i=T.get(j.current);if(!i)return;let a=e.nativeEvent,o=new n({active:j.current,activeNode:i,event:a,options:r,context:me,onAbort(e){let t=T.get(e);if(!t)return;let{onDragAbort:n}=te.current,r={id:e};n?.(r),y({type:`onDragAbort`,event:r})},onPending(e,t,n,r){let i=T.get(e);if(!i)return;let{onDragPending:a}=te.current,o={id:e,constraint:t,initialCoordinates:n,offset:r};a?.(o),y({type:`onDragPending`,event:o})},onStart(e){let t=j.current;if(t==null)return;let n=T.get(t);if(!n)return;let{onDragStart:r}=te.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:k}};(0,m.unstable_batchedUpdates)(()=>{r?.(i),S(my.Initializing),v({type:B_.DragStart,initialCoordinates:e,active:t}),y({type:`onDragStart`,event:i}),N(Le.current),ee(a)})},onMove(e){v({type:B_.DragMove,coordinates:e})},onEnd:s(B_.DragEnd),onCancel:s(B_.DragCancel)});Le.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=me.current,o=null;if(t&&i){let{cancelDrop:s}=te.current;if(o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===B_.DragEnd&&typeof s==`function`){let t=await Promise.resolve(s(o));t&&(e=B_.DragCancel)}}j.current=null,(0,m.unstable_batchedUpdates)(()=>{v({type:e}),S(my.Uninitialized),Pe(null),N(null),ee(null),Le.current=null;let t=e===B_.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=te.current[t];e?.(o),y({type:t,event:o})}})}}},[T]),ze=(0,f.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=T.get(r);if(j.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a},s=e(n,t.options,o);s===!0&&(i.dndKit={capturedBy:t.sensor},j.current=r,Re(n,t))},[T,Re]),Be=iie(l,ze);fie(l),d_(()=>{fe&&x===my.Initializing&&S(my.Initialized)},[fe,x]),(0,f.useEffect)(()=>{let{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:r,over:i}=me.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:ke.x,y:ke.y},over:i};(0,m.unstable_batchedUpdates)(()=>{e?.(a),y({type:`onDragMove`,event:a})})},[ke.x,ke.y]),(0,f.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=me.current;if(!e||j.current==null||!t||!i)return;let{onDragOver:a}=te.current,o=r.get(Me),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,m.unstable_batchedUpdates)(()=>{Pe(s),a?.(c),y({type:`onDragOver`,event:c})})},[Me]),d_(()=>{me.current={activatorEvent:P,active:A,activeNode:ce,collisionRect:Ae,collisions:je,droppableRects:ae,draggableNodes:T,draggingNode:_e,draggingNodeRect:ve,droppableContainers:D,over:Ne,scrollableAncestors:Se,scrollAdjustedTranslate:ke},k.current={initial:ve,translated:Ae}},[A,ce,je,Ae,T,_e,ve,ae,D,Ne,Se,ke]),eie({...ue,delta:E,draggingRect:Ae,pointerCoordinates:Te,scrollableAncestors:Se,scrollableAncestorRects:Ce});let Ve=(0,f.useMemo)(()=>{let e={active:A,activeNode:ce,activeNodeRect:fe,activatorEvent:P,collisions:je,containerNodeRect:pe,dragOverlay:ge,draggableNodes:T,droppableContainers:D,droppableRects:ae,over:Ne,measureDroppableContainers:oe,scrollableAncestors:Se,scrollableAncestorRects:Ce,measuringConfiguration:ie,measuringScheduled:se,windowRect:xe};return e},[A,ce,fe,P,je,pe,ge,T,D,ae,Ne,oe,Se,Ce,ie,se,xe]),He=(0,f.useMemo)(()=>{let e={activatorEvent:P,activators:Be,active:A,activeNodeRect:fe,ariaDescribedById:{draggable:ne},dispatch:v,draggableNodes:T,over:Ne,measureDroppableContainers:oe};return e},[P,Be,A,fe,v,ne,T,Ne,oe]);return f.default.createElement(P_.Provider,{value:b},f.default.createElement(uy.Provider,{value:He},f.default.createElement(dy.Provider,{value:Ve},f.default.createElement(py.Provider,{value:Ie},c)),f.default.createElement(xie,{disabled:o?.restoreFocus===!1})),f.default.createElement(z_,{...o,hiddenTextDescribedById:ne}));function Ue(){let e=M?.autoScrollEnabled===!1,t=typeof s==`object`?s.enabled===!1:s===!1,n=C&&!e&&!t;return typeof s==`object`?{...s,enabled:n}:{enabled:n}}}),wie=(0,f.createContext)(null),gy=`button`,Tie=`Draggable`;function Eie(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=y_(`Draggable`),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:p}=(0,f.useContext)(uy),{role:m=gy,roleDescription:h=`draggable`,tabIndex:g=0}=i??{},_=c?.id===t,v=(0,f.useContext)(_?py:wie),[y,b]=g_(),[x,S]=g_(),C=pie(o,t),w=m_(n);d_(()=>(d.set(t,{id:t,key:a,node:y,activatorNode:x,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]);let T=(0,f.useMemo)(()=>({role:m,tabIndex:g,"aria-disabled":r,"aria-pressed":_&&m===gy?!0:void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,m,g,_,h,u.draggable]);return{active:c,activatorEvent:s,activeNodeRect:l,attributes:T,isDragging:_,listeners:r?void 0:C,node:y,over:p,setNodeRef:b,setActivatorNodeRef:S,transform:v}}function _y(){return(0,f.useContext)(dy)}const Die=`Droppable`,Oie={timeout:25};function kie(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=y_(`Droppable`),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,f.useContext)(uy),u=(0,f.useRef)({disabled:n}),d=(0,f.useRef)(!1),p=(0,f.useRef)(null),m=(0,f.useRef)(null),{disabled:h,updateMeasurementsFor:g,timeout:_}={...Oie,...i},v=m_(g??r),y=(0,f.useCallback)(()=>{if(!d.current){d.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{l(Array.isArray(v.current)?v.current:[v.current]),m.current=null},_)},[_]),b=ey({callback:y,disabled:h||!o}),x=(0,f.useCallback)((e,t)=>{b&&(t&&(b.unobserve(t),d.current=!1),e&&b.observe(e))},[b]),[S,C]=g_(x),w=m_(t);return(0,f.useEffect)(()=>{!b||!S.current||(b.disconnect(),d.current=!1,b.observe(S.current))},[S,b]),(0,f.useEffect)(()=>(s({type:B_.RegisterDroppable,element:{id:r,key:a,disabled:n,node:S,rect:p,data:w}}),()=>s({type:B_.UnregisterDroppable,key:a,id:r})),[r]),(0,f.useEffect)(()=>{n!==u.current.disabled&&(s({type:B_.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:p,isOver:c?.id===r,node:S,over:c,setNodeRef:C}}function Aie(e){let{animation:t,children:n}=e,[r,i]=(0,f.useState)(null),[a,o]=(0,f.useState)(null),s=__(n);return!n&&!r&&s&&i(s),d_(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),f.default.createElement(f.default.Fragment,null,n,r?(0,f.cloneElement)(r,{ref:o}):null)}const jie={x:0,y:0,scaleX:1,scaleY:1};function Mie(e){let{children:t}=e;return f.default.createElement(uy.Provider,{value:ly},f.default.createElement(py.Provider,{value:jie},t))}const Nie={position:`fixed`,touchAction:`none`},Pie=e=>{let t=w_(e);return t?`transform 250ms ease`:void 0},Fie=(0,f.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=Pie}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},p={...Nie,width:s.width,height:s.height,top:s.top,left:s.left,transform:D_.Transform.toString(d),transformOrigin:i&&r?W_(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return f.default.createElement(n,{className:o,style:p,ref:t},a)}),Iie=e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active)){if(t===void 0)continue;i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t)}if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay)){if(t===void 0)continue;r.node.style.setProperty(e,t)}return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}},Lie=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:D_.Transform.toString(t)},{transform:D_.Transform.toString(n)}]},Rie={duration:250,easing:`ease`,keyframes:Lie,sideEffects:Iie({styles:{active:{opacity:`0`}}})};function zie(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return f_((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=oy(a);if(!c)return;let{transform:l}=o_(a).getComputedStyle(a),u=nv(l);if(!u)return;let d=typeof t==`function`?t:Bie(t);return Tv(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function Bie(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Rie,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}let vy=0;function Vie(e){return(0,f.useMemo)(()=>{if(e!=null)return vy++,vy},[e])}const yy=f.default.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:p,containerNodeRect:m,draggableNodes:h,droppableContainers:g,dragOverlay:_,over:v,measuringConfiguration:y,scrollableAncestors:b,scrollableAncestorRects:x,windowRect:S}=_y(),C=(0,f.useContext)(py),w=Vie(d?.id),T=fy(o,{activatorEvent:u,active:d,activeNodeRect:p,containerNodeRect:m,draggingNodeRect:_.rect,over:v,overlayNodeRect:_.rect,scrollableAncestors:b,scrollableAncestorRects:x,transform:C,windowRect:S}),E=$v(p),D=zie({config:r,draggableNodes:h,droppableContainers:g,measuringConfiguration:y}),O=E?_.setRef:void 0;return f.default.createElement(Mie,null,f.default.createElement(Aie,{animation:D},d&&w?f.default.createElement(Fie,{key:w,id:d.id,ref:O,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:E,style:{zIndex:l,...i},transform:T},n):null))});function by(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Hie(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function xy(e){return e!==null&&e>=0}function Uie(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Wie(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}const Sy=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=by(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},Cy={scaleX:1,scaleY:1},wy=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:a,overIndex:o}=e,s=(t=a[n])??r;if(!s)return null;if(i===n){let e=a[o];return e?{x:0,y:n<o?e.top+e.height-(s.top+s.height):e.top-s.top,...Cy}:null}let c=Gie(a,i,n);return i>n&&i<=o?{x:0,y:-s.height-c,...Cy}:i<n&&i>=o?{x:0,y:s.height+c,...Cy}:{x:0,y:0,...Cy}};function Gie(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Ty=`Sortable`,Ey=f.default.createContext({activeIndex:-1,containerId:Ty,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Sy,disabled:{draggable:!1,droppable:!1}});function Dy(e){let{children:t,id:n,items:r,strategy:i=Sy,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=_y(),d=y_(Ty,n),p=s.rect!==null,m=(0,f.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),h=o!=null,g=o?m.indexOf(o.id):-1,_=l?m.indexOf(l.id):-1,v=(0,f.useRef)(m),y=!Uie(m,v.current),b=_!==-1&&g===-1||y,x=Wie(a);d_(()=>{y&&h&&u(m)},[y,m,h,u]),(0,f.useEffect)(()=>{v.current=m},[m]);let S=(0,f.useMemo)(()=>({activeIndex:g,containerId:d,disabled:x,disableTransforms:b,items:m,overIndex:_,useDragOverlay:p,sortedRects:Hie(m,c),strategy:i}),[g,d,x.draggable,x.droppable,b,m,_,c,p,i]);return f.default.createElement(Ey.Provider,{value:S},t)}const Kie=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return by(n,r,i).indexOf(t)},qie=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Jie={duration:200,easing:`ease`},Oy=`transform`,Yie=D_.Transition.toString({property:Oy,duration:0,easing:`linear`}),Xie={roleDescription:`sortable`};function Zie(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,f.useState)(null),s=(0,f.useRef)(n);return d_(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=av(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,f.useEffect)(()=>{a&&o(null)},[a]),a}function ky(e){let{animateLayoutChanges:t=qie,attributes:n,disabled:r,data:i,getNewIndex:a=Kie,id:o,strategy:s,resizeObserverConfig:c,transition:l=Jie}=e,{items:u,containerId:d,activeIndex:p,disabled:m,disableTransforms:h,sortedRects:g,overIndex:_,useDragOverlay:v,strategy:y}=(0,f.useContext)(Ey),b=Qie(r,m),x=u.indexOf(o),S=(0,f.useMemo)(()=>({sortable:{containerId:d,index:x,items:u},...i}),[d,i,x,u]),C=(0,f.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:w,node:T,isOver:E,setNodeRef:D}=kie({id:o,data:S,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...c}}),{active:O,activatorEvent:k,activeNodeRect:A,attributes:j,setNodeRef:M,listeners:N,isDragging:P,over:ee,setActivatorNodeRef:te,transform:ne}=Eie({id:o,data:S,attributes:{...Xie,...n},disabled:b.draggable}),re=n_(D,M),ie=!!O,ae=ie&&!h&&xy(p)&&xy(_),oe=!v&&P,se=oe&&ae?ne:null,ce=s??y,le=ae?se??ce({rects:g,activeNodeRect:A,activeIndex:p,overIndex:_,index:x}):null,ue=xy(p)&&xy(_)?a({id:o,items:u,activeIndex:p,overIndex:_}):x,de=O?.id,fe=(0,f.useRef)({activeId:de,items:u,newIndex:ue,containerId:d}),pe=u!==fe.current.items,me=t({active:O,containerId:d,isDragging:P,isSorting:ie,id:o,index:x,items:u,newIndex:fe.current.newIndex,previousItems:fe.current.items,previousContainerId:fe.current.containerId,transition:l,wasDragging:fe.current.activeId!=null}),he=Zie({disabled:!me,index:x,node:T,rect:w});return(0,f.useEffect)(()=>{ie&&fe.current.newIndex!==ue&&(fe.current.newIndex=ue),d!==fe.current.containerId&&(fe.current.containerId=d),u!==fe.current.items&&(fe.current.items=u)},[ie,ue,d,u]),(0,f.useEffect)(()=>{if(de===fe.current.activeId)return;if(de&&!fe.current.activeId){fe.current.activeId=de;return}let e=setTimeout(()=>{fe.current.activeId=de},50);return()=>clearTimeout(e)},[de]),{active:O,activeIndex:p,attributes:j,data:S,rect:w,index:x,newIndex:ue,items:u,isOver:E,isSorting:ie,isDragging:P,listeners:N,node:T,overIndex:_,over:ee,setNodeRef:re,setActivatorNodeRef:te,setDroppableNodeRef:D,setDraggableNodeRef:M,transform:he??le,transition:ge()};function ge(){if(he||pe&&fe.current.newIndex===x)return Yie;if(!(oe&&!w_(k)||!l)&&(ie||me))return D_.Transition.toString({...l,property:Oy})}}function Qie(e,t){var n,r;return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)??t.draggable,droppable:(r=e?.droppable)??t.droppable}}const $ie=[Pv.Down,Pv.Right,Pv.Up,Pv.Left],eae=`_clickableRow_kqvtd_1`,tae=`_hoverableRow_kqvtd_4`,nae=`_rowActive_kqvtd_4`,rae=`_expandableRow_kqvtd_8`,iae=`_flush_kqvtd_8`,aae=`_dragIconCell_kqvtd_34`,oae=`_dragIcon_kqvtd_34`,sae=`_dragIconDisabled_kqvtd_55`;var Ay={clickableRow:`_clickableRow_kqvtd_1`,hoverableRow:`_hoverableRow_kqvtd_4`,rowActive:`_rowActive_kqvtd_4`,expandableRow:`_expandableRow_kqvtd_8`,flush:`_flush_kqvtd_8`,dragIconCell:`_dragIconCell_kqvtd_34`,dragIcon:`_dragIcon_kqvtd_34`,dragIconDisabled:`_dragIconDisabled_kqvtd_55`},cae=u(h());const jy=({colSpan:e,children:t,flush:n})=>(0,p.jsx)(`tr`,{children:(0,p.jsx)(`td`,{colSpan:e,className:(0,cae.default)(Ay.expandableRow,n?Ay.flush:``),children:t})}),My=(e,t={leftAligned:``,rightAligned:``,centerAligned:``},n=!1)=>{if(!e)return null;let{bodyAlignment:r,headerAlignment:i,isHeader:a}=e,o=a&&i?i:r;switch(o){case b.LEFT:return n?b.LEFT:t.leftAligned;case b.RIGHT:return n?b.RIGHT:t.rightAligned;case b.CENTER:return n?b.CENTER:t.centerAligned;default:return n?b.LEFT:t.leftAligned}},lae=(e,t=!1,n=0)=>{if(!e||e.length===0)return[];let r=e.every(e=>Array.isArray(e)),i=e.every(e=>typeof e==`string`);if(r&&t){let t=e[n];return t||[]}else if(i)return e;else return console.warn(`getHeaderAlignment: alignments array contains a mix of strings and arrays, returning an empty array.`),[]},uae=`_inputInTable_ie6ng_1`,dae=`_inputHover_ie6ng_13`,fae=`_inputFocus_ie6ng_18`,pae=`_inputError_ie6ng_25`,mae=`_inputWarning_ie6ng_26`,hae=`_inputDisabled_ie6ng_61`,gae=`_hideScrollbars_ie6ng_67`,_ae=`_cell_ie6ng_77`,vae=`_disabledLink_ie6ng_87`,yae=`_inputWrapper_ie6ng_91`,bae=`_numberInputWrapper_ie6ng_106`,xae=`_breakWord_ie6ng_113`,Sae=`_inputCell_ie6ng_116`,Cae=`_sliderCell_ie6ng_119`,wae=`_staticCell_ie6ng_123`,Tae=`_staticCellContent_ie6ng_126`,Eae=`_unit_ie6ng_148`,Dae=`_sortingCell_ie6ng_151`,Oae=`_sortingCellIcon_ie6ng_162`,kae=`_icon_ie6ng_173`,Aae=`_checkBoxCell_ie6ng_177`,jae=`_iconCellWrapper_ie6ng_181`,Mae=`_actionsCell_ie6ng_185`,Nae=`_rightAligned_ie6ng_193`,Pae=`_centerAligned_ie6ng_199`,Fae=`_leftAligned_ie6ng_205`,Iae=`_popover_ie6ng_208`,Lae=`_disabledPointerEvents_ie6ng_211`;var Ny={inputInTable:`_inputInTable_ie6ng_1`,inputHover:`_inputHover_ie6ng_13`,inputFocus:`_inputFocus_ie6ng_18`,inputError:`_inputError_ie6ng_25`,inputWarning:`_inputWarning_ie6ng_26`,inputDisabled:`_inputDisabled_ie6ng_61`,hideScrollbars:`_hideScrollbars_ie6ng_67`,cell:`_cell_ie6ng_77`,disabledLink:`_disabledLink_ie6ng_87`,inputWrapper:`_inputWrapper_ie6ng_91`,numberInputWrapper:`_numberInputWrapper_ie6ng_106`,breakWord:`_breakWord_ie6ng_113`,inputCell:`_inputCell_ie6ng_116`,sliderCell:`_sliderCell_ie6ng_119`,staticCell:`_staticCell_ie6ng_123`,staticCellContent:`_staticCellContent_ie6ng_126`,unit:`_unit_ie6ng_148`,sortingCell:`_sortingCell_ie6ng_151`,sortingCellIcon:`_sortingCellIcon_ie6ng_162`,icon:`_icon_ie6ng_173`,checkBoxCell:`_checkBoxCell_ie6ng_177`,iconCellWrapper:`_iconCellWrapper_ie6ng_181`,actionsCell:`_actionsCell_ie6ng_185`,rightAligned:`_rightAligned_ie6ng_193`,centerAligned:`_centerAligned_ie6ng_199`,leftAligned:`_leftAligned_ie6ng_205`,popover:`_popover_ie6ng_208`,disabledPointerEvents:`_disabledPointerEvents_ie6ng_211`};const Py=({cell:e,columnAlignment:t,testId:n,type:r})=>(0,p.jsx)(dp,{name:e.name,value:e.value,onChange:t=>e.onChange?.(t),onFocus:e.onFocus,onBlur:e.onBlur,onPaste:t=>e.onPaste?.(t),placeholder:e.placeholder,error:e.error,warning:e.warning,disabled:e.disabled,isInTable:!0,maxTooltipWidth:e.maxTooltipWidth,right:t===b.RIGHT,selectOnFocus:e.selectOnFocus,testId:n,tabIndex:e.disabled?-1:0,tooltip:e.tooltip,type:r}),Rae=14,Fy=e=>String($p(e)),zae=e=>{let t=Zp(e);return t?e:Fy(pte(Qp(e),14))};var Bae=u(Ra());const Vae=e=>e?typeof e==`string`?e:(0,Bae.isArray)(e)?e[0]:e.fieldName:``,Iy=({name:e,placeholder:t=``,disabled:n=!1,error:r=!1,left:i=!1,small:a=!1,width:o=`100%`,value:s=``,onChange:c=()=>{},onFocus:l=()=>{},onBlur:u=()=>{},selectOnFocus:d,tabIndex:m=0,testId:h,tooltip:g=null,warning:_=!1,validationCallback:v=()=>{},allowEmpty:y=!1,isInTable:b,groupOrder:x,enableCosmeticRounding:S=!0,enableDisplayRounding:C=!1,roundDisplayValue:w,disableInternalErrorValidationMessages:T=!1,disableValidationOnFocus:E=!1})=>{let D=e=>{let n=Xm(e),r=t&&jg(e),i=[1/0,-1/0].includes(Number(e));return i||r?{valid:!0,errors:[]}:y&&e===``||n.valid?{...n,valid:!0,errors:void 0}:n},O=e=>{let t=!!e?.endsWith(`0`),n=S&&e&&!t&&D(e)?.valid,r=n?zae(e):e;return Fy(r)},k=(0,f.useRef)(null),[A,j]=(0,f.useState)(O(Fy(s))),[M,N]=(0,f.useState)(!1),P=Vae(e),{valid:ee,errors:te}=D(A),ne=te&&te.length&&!T?te[0]:null;(0,f.useEffect)(()=>{let e=O(Fy(s)),t=Qp(A)!==Qp(e);t&&j(e)},[s,S,C]),(0,f.useEffect)(()=>{(E||!M)&&!ee?v(P,ne):v(P,null)},[M,ee,r]);let re=e=>{let n=`key`in e?A:e?.target?.value,r=fm(n.replaceAll(` `,``).replaceAll(`|`,``));if(j(r),D(r)?.valid||t&&jg(n)){let t={...e,target:{...e.target,value:Ete(Fy(r)),name:P}};c(t)}};(0,f.useEffect)(()=>{if(k&&k?.current&&C&&M){let e=k.current;e&&!d&&setTimeout(()=>{let{length:t}=Fy(A);e.setSelectionRange(t,t)},0)}},[M]);let ie=e=>{N(!0),l(e)},ae=e=>{N(!1),u(e)},oe=e=>b?hte(e,2):am(e,4),se=C&&!M&&ee,ce=se?w?Fy(w(A)):oe(s):A,le=e=>{e.key===Og.ENTER&&re(e)};return(0,p.jsx)(dp,{type:`text`,name:P,testId:h,disabled:n,placeholder:t,value:ce,onChange:re,onFocus:ie,onBlur:ae,onKeyDown:le,error:ne||r,warning:_,right:!i,small:a,width:o,isInTable:b,groupOrder:x,selectOnFocus:d,tabIndex:m,tooltip:g,ref:k},P)},Hae=({cell:e,columnAlignment:t,testId:n})=>(0,p.jsx)(Iy,{name:e.name,value:e.value,onChange:t=>e.onChange?.(t),onFocus:e.onFocus,onBlur:e.onBlur,placeholder:e.placeholder,error:e.error,warning:e.warning,disabled:e.disabled,isInTable:!0,left:e.left??t===b.LEFT,selectOnFocus:e.selectOnFocus,tabIndex:e.disabled?-1:0,testId:n,tooltip:e.tooltip,validationCallback:e.validationCallback,allowEmpty:e.allowEmpty,enableCosmeticRounding:e.enableCosmeticRounding,enableDisplayRounding:e.enableDisplayRounding,roundDisplayValue:e.roundDisplayValue,disableValidationOnFocus:e.disableValidationOnFocus}),Uae=({cell:e,columnAlignment:t,testId:n})=>(0,p.jsx)(Hg,{name:e.name,borderRadius:0,options:e.options,onChange:t=>e.onChange?.(t),onCreate:e.onCreate?t=>e.onCreate&&e.onCreate(t):void 0,error:e.error,warning:e.warning,disabled:e.disabled,placeholder:e.placeholder,isInTable:!0,value:e.value,native:e.native,clearable:e.clearable,searchable:e.searchable,deprecatedEventHandler:e.deprecatedEventHandler,maxTooltipWidth:e.maxTooltipWidth,width:`100%`,autoLayerWidth:e.autoLayerWidth,multi:e.multi,right:t===b.RIGHT,testId:n,tabIndex:e.disabled?-1:0});var Wae=u(h());const Gae=({cell:e,columnAlignment:t,testId:n})=>(0,p.jsx)(`div`,{className:(0,Wae.default)(Ny.inputWrapper,e.type===`NumberInput`?Ny.numberInputWrapper:``),children:e.type===`Input`?(0,p.jsx)(Py,{cell:e,columnAlignment:t,testId:n}):e.type===`NumberInput`?(0,p.jsx)(Hae,{cell:e,columnAlignment:t,testId:n}):e.type===`DateInput`?(0,p.jsx)(Py,{cell:e,testId:n,type:`date`}):e.type===`Select`?(0,p.jsx)(Uae,{cell:e,columnAlignment:t,testId:n}):null});var Kae=u(h());const qae=({cell:e,testId:t})=>{let n=(0,f.useContext)(Ie),{error:r,warning:i,tooltip:a,maxTooltipWidth:o}=e,s=e=>gs(e);return(0,p.jsx)(`div`,{className:Ny.inputWrapper,children:(0,p.jsx)(ya,{error:!!r,warning:!!i,text:a||r||i,enabled:s(a)||s(r)||s(i)||!1,maxWidth:o,children:(0,p.jsx)(`div`,{className:Ny.staticCellContent,"data-error":r||null,"data-warning":i||null,children:(0,p.jsx)(`a`,{className:(0,Kae.default)((e.disabled||n)&&Ny.disabledLink),onClick:e.disabled||n?void 0:t=>{t.stopPropagation(),e.onClick?.(t)},"data-testid":t,children:e.value})})})})},Jae=({cell:e,testId:t})=>(0,p.jsx)(Oa,{label:e.label,checked:e.checked,isInTable:!0,disabled:e.disabled,onChange:t=>e.onChange(t),testId:t,tabIndex:e.disabled?-1:0,indeterminate:e.indeterminate});function Ly(e){"@babel/helpers - typeof";return Ly=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ly(e)}function Yae(e,t){if(Ly(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ly(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Xae(e){var t=Yae(e,`string`);return Ly(t)==`symbol`?t:t+``}function Ry(e,t,n){return(t=Xae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function By(e){if(Array.isArray(e))return zy(e)}function Zae(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Vy(e,t){if(e){if(typeof e==`string`)return zy(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zy(e,t):void 0}}function Qae(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
149
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hy(e){return By(e)||Zae(e)||Vy(e)||Qae()}function Uy(e){if(Array.isArray(e))return e}function Wy(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Gy(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
150
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ky(e,t){return Uy(e)||Wy(e,t)||Vy(e,t)||Gy()}var qy={},Jy=[],Yy=function(e){Jy.push(e)};function Xy(e,t){if(process.env.NODE_ENV!==`production`&&!e&&console!==void 0){var n=Jy.reduce(function(e,t){return t(e??``,`warning`)},t);n&&console.error(`Warning: ${n}`)}}function Zy(e,t){if(process.env.NODE_ENV!==`production`&&!e&&console!==void 0){var n=Jy.reduce(function(e,t){return t(e??``,`note`)},t);n&&console.warn(`Note: ${n}`)}}function Qy(){qy={}}function $y(e,t,n){!t&&!qy[n]&&(e(!1,n),qy[n]=!0)}function eb(e,t){$y(Xy,e,t)}function tb(e,t){$y(Zy,e,t)}eb.preMessage=Yy,eb.resetWarned=Qy,eb.noteOnce=tb;var nb=eb;function rb(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=r.has(e);if(nb(!o,`Warning: There may be circular references`),o)return!1;if(e===t)return!0;if(n&&a>1)return!1;r.add(e);var s=a+1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(var c=0;c<e.length;c++)if(!i(e[c],t[c],s))return!1;return!0}if(e&&t&&Ly(e)===`object`&&Ly(t)===`object`){var l=Object.keys(e);return l.length===Object.keys(t).length?l.every(function(n){return i(e[n],t[n],s)}):!1}return!1}return i(e,t)}var ib=rb;function ab(e){var t=f.useRef();t.current=e;var n=f.useCallback(function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.current)?.call.apply(e,[t].concat(r))},[]);return n}function ob(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var sb=process.env.NODE_ENV!==`test`&&ob()?f.useLayoutEffect:f.useEffect,$ae=function(e,t){var n=f.useRef(!0);sb(function(){return e(n.current)},t),sb(function(){return n.current=!1,function(){n.current=!0}},[])},cb=function(e,t){$ae(function(t){if(!t)return e()},t)};function lb(e){var t=f.useRef(!1),n=f.useState(e),r=Ky(n,2),i=r[0],a=r[1];f.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function o(e,n){n&&t.current||a(e)}return[i,o]}function ub(e){return e!==void 0}function db(e,t){var n=t||{},r=n.defaultValue,i=n.value,a=n.onChange,o=n.postState,s=lb(function(){return ub(i)?i:ub(r)?typeof r==`function`?r():r:typeof e==`function`?e():e}),c=Ky(s,2),l=c[0],u=c[1],d=i===void 0?l:i,f=o?o(d):d,p=ab(a),m=lb([d]),h=Ky(m,2),g=h[0],_=h[1];cb(function(){var e=g[0];l!==e&&p(l,e)},[g]),cb(function(){ub(i)||u(i)},[i]);var v=ab(function(e,t){u(e,t),_([d],t)});return[f,v]}k();function fb(e,t){if(e==null)return{};var n,r,i=O(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function pb(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 mb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pb(Object(n),!0).forEach(function(t){Ry(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var hb={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=hb.F1&&t<=hb.F12)return!1;switch(t){case hb.ALT:case hb.CAPS_LOCK:case hb.CONTEXT_MENU:case hb.CTRL:case hb.DOWN:case hb.END:case hb.ESC:case hb.HOME:case hb.INSERT:case hb.LEFT:case hb.MAC_FF_META:case hb.META:case hb.NUMLOCK:case hb.NUM_CENTER:case hb.PAGE_DOWN:case hb.PAGE_UP:case hb.PAUSE:case hb.PRINT_SCREEN:case hb.RIGHT:case hb.SHIFT:case hb.UP:case hb.WIN_KEY:case hb.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=hb.ZERO&&e<=hb.NINE||e>=hb.NUM_ZERO&&e<=hb.NUM_MULTIPLY||e>=hb.A&&e<=hb.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case hb.SPACE:case hb.QUESTION_MARK:case hb.NUM_PLUS:case hb.NUM_MINUS:case hb.NUM_PERIOD:case hb.NUM_DIVISION:case hb.SEMICOLON:case hb.DASH:case hb.EQUALS:case hb.COMMA:case hb.PERIOD:case hb.SLASH:case hb.APOSTROPHE:case hb.SINGLE_QUOTE:case hb.OPEN_SQUARE_BRACKET:case hb.BACKSLASH:case hb.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},gb=hb,_b=f.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0}),vb=_b;function yb(e,t,n){return(e-t)/(n-t)}function bb(e,t,n,r){var i=yb(t,n,r),a={};switch(e){case`rtl`:a.right=`${i*100}%`,a.transform=`translateX(50%)`;break;case`btt`:a.bottom=`${i*100}%`,a.transform=`translateY(50%)`;break;case`ttb`:a.top=`${i*100}%`,a.transform=`translateY(-50%)`;break;default:a.left=`${i*100}%`,a.transform=`translateX(-50%)`;break}return a}function xb(e,t){return Array.isArray(e)?e[t]:e}j();var Sb=u(h()),Cb=[`prefixCls`,`value`,`valueIndex`,`onStartMove`,`style`,`render`,`dragging`,`onOffsetChange`],wb=f.forwardRef(function(e,t){var n,r,i=e.prefixCls,a=e.value,o=e.valueIndex,s=e.onStartMove,c=e.style,l=e.render,u=e.dragging,d=e.onOffsetChange,p=fb(e,Cb),m=f.useContext(vb),h=m.min,g=m.max,_=m.direction,v=m.disabled,y=m.keyboard,b=m.range,x=m.tabIndex,S=m.ariaLabelForHandle,C=m.ariaLabelledByForHandle,w=m.ariaValueTextFormatterForHandle,T=`${i}-handle`,E=function(e){v||s(e,o)},D=function(e){if(!v&&y){var t=null;switch(e.which||e.keyCode){case gb.LEFT:t=_===`ltr`||_===`btt`?-1:1;break;case gb.RIGHT:t=_===`ltr`||_===`btt`?1:-1;break;case gb.UP:t=_===`ttb`?-1:1;break;case gb.DOWN:t=_===`ttb`?1:-1;break;case gb.HOME:t=`min`;break;case gb.END:t=`max`;break;case gb.PAGE_UP:t=2;break;case gb.PAGE_DOWN:t=-2;break}t!==null&&(e.preventDefault(),d(t,o))}},O=bb(_,a,h,g),k=f.createElement(`div`,A({ref:t,className:(0,Sb.default)(T,(n={},Ry(n,`${T}-${o+1}`,b),Ry(n,`${T}-dragging`,u),n)),style:mb(mb({},O),c),onMouseDown:E,onTouchStart:E,onKeyDown:D,tabIndex:v?null:xb(x,o),role:`slider`,"aria-valuemin":h,"aria-valuemax":g,"aria-valuenow":a,"aria-disabled":v,"aria-label":xb(S,o),"aria-labelledby":xb(C,o),"aria-valuetext":(r=xb(w,o))?.(a),"aria-orientation":_===`ltr`||_===`rtl`?`horizontal`:`vertical`},p));return l&&(k=l(k,{index:o,prefixCls:i,value:a,dragging:u})),k});process.env.NODE_ENV!==`production`&&(wb.displayName=`Handle`);var Tb=wb;j();var Eb=[`prefixCls`,`style`,`onStartMove`,`onOffsetChange`,`values`,`handleRender`,`draggingIndex`],Db=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,a=e.onOffsetChange,o=e.values,s=e.handleRender,c=e.draggingIndex,l=fb(e,Eb),u=f.useRef({});return f.useImperativeHandle(t,function(){return{focus:function(e){var t;(t=u.current[e])==null||t.focus()}}}),f.createElement(f.Fragment,null,o.map(function(e,t){return f.createElement(Tb,A({ref:function(e){e?u.current[t]=e:delete u.current[t]},dragging:c===t,prefixCls:n,style:xb(r,t),key:t,value:e,valueIndex:t,onStartMove:i,onOffsetChange:a,render:s},l))}))});process.env.NODE_ENV!==`production`&&(Db.displayName=`Handles`);var Ob=Db;function kb(e){var t=`touches`in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function Ab(e,t,n,r,i,a,o,s,c){var l=f.useState(null),u=Ky(l,2),d=u[0],p=u[1],m=f.useState(-1),h=Ky(m,2),g=h[0],_=h[1],v=f.useState(n),y=Ky(v,2),b=y[0],x=y[1],S=f.useState(n),C=Ky(S,2),w=C[0],T=C[1],E=f.useRef(null),D=f.useRef(null);f.useEffect(function(){g===-1&&x(n)},[n,g]),f.useEffect(function(){return function(){document.removeEventListener(`mousemove`,E.current),document.removeEventListener(`mouseup`,D.current),document.removeEventListener(`touchmove`,E.current),document.removeEventListener(`touchend`,D.current)}},[]);var O=function(e,t){b.some(function(t,n){return t!==e[n]})&&(t!==void 0&&p(t),x(e),o(e))},k=function(e,t){if(e===-1){var n=w[0],o=w[w.length-1],s=r-n,l=i-o,u=t*(i-r);u=Math.max(u,s),u=Math.min(u,l);var d=a(n+u);u=d-n;var f=w.map(function(e){return e+u});O(f)}else{var p=(i-r)*t,m=Hy(b);m[e]=w[e];var h=c(m,p,e,`dist`);O(h.values,h.value)}},A=f.useRef(k);A.current=k;var j=function(r,i){r.stopPropagation();var a=n[i];_(i),p(a),T(n);var o=kb(r),c=o.pageX,l=o.pageY,u=function(n){n.preventDefault();var r=kb(n),a=r.pageX,o=r.pageY,s=a-c,u=o-l,d=e.current.getBoundingClientRect(),f=d.width,p=d.height,m;switch(t){case`btt`:m=-u/p;break;case`ttb`:m=u/p;break;case`rtl`:m=-s/f;break;default:m=s/f}A.current(i,m)},d=function e(t){t.preventDefault(),document.removeEventListener(`mouseup`,e),document.removeEventListener(`mousemove`,u),document.removeEventListener(`touchend`,e),document.removeEventListener(`touchmove`,u),E.current=null,D.current=null,_(-1),s()};document.addEventListener(`mouseup`,d),document.addEventListener(`mousemove`,u),document.addEventListener(`touchend`,d),document.addEventListener(`touchmove`,u),E.current=u,D.current=d},M=f.useMemo(function(){var e=Hy(n).sort(function(e,t){return e-t}),t=Hy(b).sort(function(e,t){return e-t});return e.every(function(e,n){return e===t[n]})?b:n},[n,b]);return[g,d,M,j]}var jb=u(h());function Mb(e){var t,n=e.prefixCls,r=e.style,i=e.start,a=e.end,o=e.index,s=e.onStartMove,c=f.useContext(vb),l=c.direction,u=c.min,d=c.max,p=c.disabled,m=c.range,h=`${n}-track`,g=yb(i,u,d),_=yb(a,u,d),v=function(e){!p&&s&&s(e,-1)},y={};switch(l){case`rtl`:y.right=`${g*100}%`,y.width=`${_*100-g*100}%`;break;case`btt`:y.bottom=`${g*100}%`,y.height=`${_*100-g*100}%`;break;case`ttb`:y.top=`${g*100}%`,y.height=`${_*100-g*100}%`;break;default:y.left=`${g*100}%`,y.width=`${_*100-g*100}%`}return f.createElement(`div`,{className:(0,jb.default)(h,(t={},Ry(t,`${h}-${o+1}`,m),Ry(t,`${n}-track-draggable`,s),t)),style:mb(mb({},y),r),onMouseDown:v,onTouchStart:v})}function Nb(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,a=e.onStartMove,o=f.useContext(vb),s=o.included,c=o.range,l=o.min,u=f.useMemo(function(){if(!c){if(r.length===0)return[];var e=i??l,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],a=0;a<r.length-1;a+=1)n.push({start:r[a],end:r[a+1]});return n},[r,c,i,l]);return s?u.map(function(e,r){var i=e.start,o=e.end;return f.createElement(Mb,{index:r,prefixCls:t,style:xb(n,r),start:i,end:o,key:r,onStartMove:a})}):null}var Pb=u(h());function Fb(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,a=e.onClick,o=f.useContext(vb),s=o.min,c=o.max,l=o.direction,u=o.includedStart,d=o.includedEnd,p=o.included,m=`${t}-text`,h=bb(l,i,s,c);return f.createElement(`span`,{className:(0,Pb.default)(m,Ry({},`${m}-active`,p&&u<=i&&i<=d)),style:mb(mb({},h),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){a(i)}},r)}function Ib(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i=`${t}-mark`;return n.length?f.createElement(`div`,{className:i},n.map(function(e){var t=e.value,n=e.style,a=e.label;return f.createElement(Fb,{key:t,prefixCls:i,style:n,value:t,onClick:r},a)})):null}var Lb=u(h());function Rb(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,a=f.useContext(vb),o=a.min,s=a.max,c=a.direction,l=a.included,u=a.includedStart,d=a.includedEnd,p=`${t}-dot`,m=l&&u<=n&&n<=d,h=mb(mb({},bb(c,n,o,s)),typeof r==`function`?r(n):r);return m&&(h=mb(mb({},h),typeof i==`function`?i(n):i)),f.createElement(`span`,{className:(0,Lb.default)(p,Ry({},`${p}-active`,m)),style:h})}function zb(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,a=e.activeStyle,o=f.useContext(vb),s=o.min,c=o.max,l=o.step,u=f.useMemo(function(){var e=new Set;if(n.forEach(function(t){e.add(t.value)}),r&&l!==null)for(var t=s;t<=c;)e.add(t),t+=l;return Array.from(e)},[s,c,l,r,n]);return f.createElement(`div`,{className:`${t}-step`},u.map(function(e){return f.createElement(Rb,{prefixCls:t,key:e,value:e,style:i,activeStyle:a})}))}function Bb(e,t,n,r,i,a){var o=f.useCallback(function(n){var r=isFinite(n)?n:e;return r=Math.min(t,n),r=Math.max(e,r),r},[e,t]),s=f.useCallback(function(r){if(n!==null){var i=e+Math.round((o(r)-e)/n)*n,a=function(e){return(String(e).split(`.`)[1]||``).length},s=Math.max(a(n),a(t),a(e)),c=Number(i.toFixed(s));return e<=c&&c<=t?c:null}return null},[n,e,t,o]),c=f.useCallback(function(i){var a=o(i),c=r.map(function(e){return e.value});n!==null&&c.push(s(i)),c.push(e,t);var l=c[0],u=t-e;return c.forEach(function(e){var t=Math.abs(a-e);t<=u&&(l=e,u=t)}),l},[e,t,r,n,o,s]),l=function i(a,o,c){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`unit`;if(typeof o==`number`){var u,d=a[c],f=d+o,p=[];r.forEach(function(e){p.push(e.value)}),p.push(e,t),p.push(s(d));var m=o>0?1:-1;l===`unit`?p.push(s(d+m*n)):p.push(s(f)),p=p.filter(function(e){return e!==null}).filter(function(e){return o<0?e<=d:e>=d}),l===`unit`&&(p=p.filter(function(e){return e!==d}));var h=l===`unit`?d:f;u=p[0];var g=Math.abs(u-h);if(p.forEach(function(e){var t=Math.abs(e-h);t<g&&(u=e,g=t)}),u===void 0)return o<0?e:t;if(l===`dist`)return u;if(Math.abs(o)>1){var _=Hy(a);return _[c]=u,i(_,o-m,c,l)}return u}else if(o===`min`)return e;else if(o===`max`)return t},u=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`unit`,i=e[n],a=l(e,t,n,r);return{value:a,changed:a!==i}},d=function(e){return a===null&&e===0||typeof a==`number`&&e<a},p=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`unit`,o=e.map(c),s=o[n],f=l(o,t,n,r);if(o[n]=f,i===!1){var p=a||0;n>0&&o[n-1]!==s&&(o[n]=Math.max(o[n],o[n-1]+p)),n<o.length-1&&o[n+1]!==s&&(o[n]=Math.min(o[n],o[n+1]-p))}else if(typeof a==`number`||a===null){for(var m=n+1;m<o.length;m+=1)for(var h=!0;d(o[m]-o[m-1])&&h;){var g=u(o,1,m);o[m]=g.value,h=g.changed}for(var _=n;_>0;--_)for(var v=!0;d(o[_]-o[_-1])&&v;){var y=u(o,-1,_-1);o[_-1]=y.value,v=y.changed}for(var b=o.length-1;b>0;--b)for(var x=!0;d(o[b]-o[b-1])&&x;){var S=u(o,-1,b-1);o[b-1]=S.value,x=S.changed}for(var C=0;C<o.length-1;C+=1)for(var w=!0;d(o[C+1]-o[C])&&w;){var T=u(o,1,C+1);o[C+1]=T.value,w=T.changed}}return{value:o[n],values:o}};return[c,p]}var Vb=u(h()),Hb=f.forwardRef(function(e,t){var n,r=e.prefixCls,i=r===void 0?`rc-slider`:r,a=e.className,o=e.style,s=e.disabled,c=s===void 0?!1:s,l=e.keyboard,u=l===void 0?!0:l,d=e.autoFocus,p=e.onFocus,m=e.onBlur,h=e.min,g=h===void 0?0:h,_=e.max,v=_===void 0?100:_,y=e.step,b=y===void 0?1:y,x=e.value,S=e.defaultValue,C=e.range,w=e.count,T=e.onChange,E=e.onBeforeChange,D=e.onAfterChange,O=e.allowCross,k=O===void 0?!0:O,A=e.pushable,j=A===void 0?!1:A,M=e.draggableTrack,N=e.reverse,P=e.vertical,ee=e.included,te=ee===void 0?!0:ee,ne=e.startPoint,re=e.trackStyle,ie=e.handleStyle,ae=e.railStyle,oe=e.dotStyle,se=e.activeDotStyle,ce=e.marks,le=e.dots,ue=e.handleRender,de=e.tabIndex,fe=de===void 0?0:de,pe=e.ariaLabelForHandle,me=e.ariaLabelledByForHandle,he=e.ariaValueTextFormatterForHandle,ge=f.useRef(),_e=f.useRef(),ve=f.useMemo(function(){return P?N?`ttb`:`btt`:N?`rtl`:`ltr`},[N,P]),ye=f.useMemo(function(){return isFinite(g)?g:0},[g]),be=f.useMemo(function(){return isFinite(v)?v:100},[v]),xe=f.useMemo(function(){return b!==null&&b<=0?1:b},[b]),Se=f.useMemo(function(){return typeof j==`boolean`?j?xe:!1:j>=0?j:!1},[j,xe]),Ce=f.useMemo(function(){var e=Object.keys(ce||{});return e.map(function(e){var t=ce[e],n={value:Number(e)};return t&&Ly(t)===`object`&&!f.isValidElement(t)&&(`label`in t||`style`in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(function(e){var t=e.label;return t||typeof t==`number`}).sort(function(e,t){return e.value-t.value})},[ce]),we=Bb(ye,be,xe,Ce,k,Se),Te=Ky(we,2),Ee=Te[0],De=Te[1],Oe=db(S,{value:x}),ke=Ky(Oe,2),Ae=ke[0],je=ke[1],Me=f.useMemo(function(){var e=Ae==null?[]:Array.isArray(Ae)?Ae:[Ae],t=Ky(e,1),n=t[0],r=n===void 0?ye:n,i=Ae===null?[]:[r];if(C){if(i=Hy(e),w||Ae===void 0){var a=w>=0?w+1:2;for(i=i.slice(0,a);i.length<a;){var o;i.push((o=i[i.length-1])??ye)}}i.sort(function(e,t){return e-t})}return i.forEach(function(e,t){i[t]=Ee(e)}),i},[Ae,C,ye,w,Ee]),Ne=f.useRef(Me);Ne.current=Me;var Pe=function(e){return C?e:e[0]},Fe=function(e){var t=Hy(e).sort(function(e,t){return e-t});T&&!ib(t,Ne.current,!0)&&T(Pe(t)),je(t)},Ie=function(e){if(!c){var t=0,n=be-ye;Me.forEach(function(r,i){var a=Math.abs(e-r);a<=n&&(n=a,t=i)});var r=Hy(Me);r[t]=e,C&&!Me.length&&w===void 0&&r.push(e),E?.(Pe(r)),Fe(r),D?.(Pe(r))}},Le=function(e){e.preventDefault();var t=_e.current.getBoundingClientRect(),n=t.width,r=t.height,i=t.left,a=t.top,o=t.bottom,s=t.right,c=e.clientX,l=e.clientY,u;switch(ve){case`btt`:u=(o-l)/r;break;case`ttb`:u=(l-a)/r;break;case`rtl`:u=(s-c)/n;break;default:u=(c-i)/n}var d=ye+u*(be-ye);Ie(Ee(d))},Re=f.useState(null),ze=Ky(Re,2),Be=ze[0],Ve=ze[1],He=function(e,t){if(!c){var n=De(Me,e,t);E?.(Pe(Me)),Fe(n.values),D?.(Pe(n.values)),Ve(n.value)}};f.useEffect(function(){if(Be!==null){var e=Me.indexOf(Be);e>=0&&ge.current.focus(e)}Ve(null)},[Be]);var Ue=f.useMemo(function(){return M&&xe===null?(process.env.NODE_ENV!==`production`&&nb(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):M},[M,xe]),We=function(){D?.(Pe(Ne.current))},Ge=Ab(_e,ve,Me,ye,be,Ee,Fe,We,De),Ke=Ky(Ge,4),F=Ke[0],qe=Ke[1],Je=Ke[2],Ye=Ke[3],Xe=function(e,t){Ye(e,t),E?.(Pe(Ne.current))},Ze=F!==-1;f.useEffect(function(){if(!Ze){var e=Me.lastIndexOf(qe);ge.current.focus(e)}},[Ze]);var Qe=f.useMemo(function(){return Hy(Je).sort(function(e,t){return e-t})},[Je]),$e=f.useMemo(function(){return C?[Qe[0],Qe[Qe.length-1]]:[ye,Qe[0]]},[Qe,C,ye]),et=Ky($e,2),tt=et[0],nt=et[1];f.useImperativeHandle(t,function(){return{focus:function(){ge.current.focus(0)},blur:function(){var e=document,t=e.activeElement;_e.current.contains(t)&&t?.blur()}}}),f.useEffect(function(){d&&ge.current.focus(0)},[]);var rt=f.useMemo(function(){return{min:ye,max:be,direction:ve,disabled:c,keyboard:u,step:xe,included:te,includedStart:tt,includedEnd:nt,range:C,tabIndex:fe,ariaLabelForHandle:pe,ariaLabelledByForHandle:me,ariaValueTextFormatterForHandle:he}},[ye,be,ve,c,u,xe,te,tt,nt,C,fe,pe,me,he]);return f.createElement(vb.Provider,{value:rt},f.createElement(`div`,{ref:_e,className:(0,Vb.default)(i,a,(n={},Ry(n,`${i}-disabled`,c),Ry(n,`${i}-vertical`,P),Ry(n,`${i}-horizontal`,!P),Ry(n,`${i}-with-marks`,Ce.length),n)),style:o,onMouseDown:Le},f.createElement(`div`,{className:`${i}-rail`,style:ae}),f.createElement(Nb,{prefixCls:i,style:re,values:Qe,startPoint:ne,onStartMove:Ue?Xe:null}),f.createElement(zb,{prefixCls:i,marks:Ce,dots:le,style:oe,activeStyle:se}),f.createElement(Ob,{ref:ge,prefixCls:i,style:ie,values:Je,draggingIndex:F,onStartMove:Xe,onOffsetChange:He,onFocus:p,onBlur:m,handleRender:ue}),f.createElement(Ib,{prefixCls:i,marks:Ce,onClick:Ie})))});process.env.NODE_ENV!==`production`&&(Hb.displayName=`Slider`);var Ub=Hb,Wb=Ub,Gb=s(((exports,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}})),Kb=s(((exports,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),qb=s(((exports,t)=>{function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Jb=s(((exports,t)=>{function n(){return t.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},t.exports.__esModule=!0,t.exports.default=t.exports,n.apply(null,arguments)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Yb=s(((exports,t)=>{var n=qb().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),Xb=s(((exports,t)=>{var n=qb().default,r=Yb();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})),Zb=s(((exports,t)=>{var n=Xb();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),eoe=s(((exports,t)=>{var n=Zb();function r(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 i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})),toe=s(((exports,t)=>{function n(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),noe=s(((exports,t)=>{var n=toe();function r(e,t){if(e==null)return{};var r,i,a=n(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})),roe=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0});var t={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var n=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||n>=t.F1&&n<=t.F12)return!1;switch(n){case t.ALT:case t.CAPS_LOCK:case t.CONTEXT_MENU:case t.CTRL:case t.DOWN:case t.END:case t.ESC:case t.HOME:case t.INSERT:case t.LEFT:case t.MAC_FF_META:case t.META:case t.NUMLOCK:case t.NUM_CENTER:case t.PAGE_DOWN:case t.PAGE_UP:case t.PAUSE:case t.PRINT_SCREEN:case t.RIGHT:case t.SHIFT:case t.UP:case t.WIN_KEY:case t.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=t.ZERO&&e<=t.NINE||e>=t.NUM_ZERO&&e<=t.NUM_MULTIPLY||e>=t.A&&e<=t.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case t.SPACE:case t.QUESTION_MARK:case t.NUM_PLUS:case t.NUM_MINUS:case t.NUM_PERIOD:case t.NUM_DIVISION:case t.SEMICOLON:case t.DASH:case t.EQUALS:case t.COMMA:case t.PERIOD:case t.SLASH:case t.APOSTROPHE:case t.SINGLE_QUOTE:case t.OPEN_SQUARE_BRACKET:case t.BACKSLASH:case t.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};exports.default=t})),ioe=s((exports=>{var t=qb();Object.defineProperty(exports,`__esModule`,{value:!0});var n=i(require(`react`));function r(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function i(e,n){if(!n&&e&&e.__esModule)return e;if(e===null||t(e)!==`object`&&typeof e!=`function`)return{default:e};var i=r(n);if(i&&i.has(e))return i.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!==`default`&&Object.prototype.hasOwnProperty.call(e,s)){var c=o?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(a,s,c):a[s]=e[s]}return a.default=e,i&&i.set(e,a),a}var a=n.createContext({min:0,max:0,direction:`ltr`,step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0}),o=a;exports.default=o})),aoe=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.getDirectionStyle=n,exports.getIndex=r,exports.getOffset=t;function t(e,t,n){return(e-t)/(n-t)}function n(e,n,r,i){var a=t(n,r,i),o={};switch(e){case`rtl`:o.right=`${a*100}%`,o.transform=`translateX(50%)`;break;case`btt`:o.bottom=`${a*100}%`,o.transform=`translateY(50%)`;break;case`ttb`:o.top=`${a*100}%`,o.transform=`translateY(-50%)`;break;default:o.left=`${a*100}%`,o.transform=`translateX(-50%)`;break}return o}function r(e,t){return Array.isArray(e)?e[t]:e}})),ooe=s((exports=>{var t=Kb(),n=qb();Object.defineProperty(exports,`__esModule`,{value:!0});var r=t(Jb()),i=t(eoe()),a=t(Zb()),o=t(noe()),s=m(require(`react`)),c=t(h()),l=t(roe()),u=t(ioe()),d=aoe(),f=[`prefixCls`,`value`,`valueIndex`,`onStartMove`,`style`,`render`,`dragging`,`onOffsetChange`];function p(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function m(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||n(e)!==`object`&&typeof e!=`function`)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!==`default`&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}return i.default=e,r&&r.set(e,i),i}var g=s.forwardRef(function(e,t){var n,p,m=e.prefixCls,h=e.value,g=e.valueIndex,_=e.onStartMove,v=e.style,y=e.render,b=e.dragging,x=e.onOffsetChange,S=(0,o.default)(e,f),C=s.useContext(u.default),w=C.min,T=C.max,E=C.direction,D=C.disabled,O=C.keyboard,k=C.range,A=C.tabIndex,j=C.ariaLabelForHandle,M=C.ariaLabelledByForHandle,N=C.ariaValueTextFormatterForHandle,P=`${m}-handle`,ee=function(e){D||_(e,g)},te=function(e){if(!D&&O){var t=null;switch(e.which||e.keyCode){case l.default.LEFT:t=E===`ltr`||E===`btt`?-1:1;break;case l.default.RIGHT:t=E===`ltr`||E===`btt`?1:-1;break;case l.default.UP:t=E===`ttb`?-1:1;break;case l.default.DOWN:t=E===`ttb`?1:-1;break;case l.default.HOME:t=`min`;break;case l.default.END:t=`max`;break;case l.default.PAGE_UP:t=2;break;case l.default.PAGE_DOWN:t=-2;break}t!==null&&(e.preventDefault(),x(t,g))}},ne=(0,d.getDirectionStyle)(E,h,w,T),re=s.createElement(`div`,(0,r.default)({ref:t,className:(0,c.default)(P,(n={},(0,a.default)(n,`${P}-${g+1}`,k),(0,a.default)(n,`${P}-dragging`,b),n)),style:(0,i.default)((0,i.default)({},ne),v),onMouseDown:ee,onTouchStart:ee,onKeyDown:te,tabIndex:D?null:(0,d.getIndex)(A,g),role:`slider`,"aria-valuemin":w,"aria-valuemax":T,"aria-valuenow":h,"aria-disabled":D,"aria-label":(0,d.getIndex)(j,g),"aria-labelledby":(0,d.getIndex)(M,g),"aria-valuetext":(p=(0,d.getIndex)(N,g))?.(h),"aria-orientation":E===`ltr`||E===`rtl`?`horizontal`:`vertical`},S));return y&&(re=y(re,{index:g,prefixCls:m,value:h,dragging:b})),re});process.env.NODE_ENV!==`production`&&(g.displayName=`Handle`);var _=g;exports.default=_})),soe=u(ooe()),coe=u(Gb());const loe=`_container_1bhdk_1`,uoe=`_small_1bhdk_7`,doe=`_vertical_1bhdk_10`,foe=`_hasArrows_1bhdk_14`,poe=`_button_1bhdk_18`,moe=`_label_1bhdk_21`,hoe=`_dot_1bhdk_29`;var Qb={container:`_container_1bhdk_1`,small:`_small_1bhdk_7`,vertical:`_vertical_1bhdk_10`,hasArrows:`_hasArrows_1bhdk_14`,button:`_button_1bhdk_18`,label:`_label_1bhdk_21`,dot:`_dot_1bhdk_29`},goe=u(Ra()),$b=u(h());const _oe=e=>e.reduce((e,{label:t,tooltip:n,value:r})=>(e[r]=(0,p.jsx)(ya,{text:(0,p.jsxs)(p.Fragment,{children:[n,n?`: `:``,t??r]}),children:(0,p.jsx)(`div`,{className:Qb.dot})}),e),{}),voe=jh(_oe,coe.default),ex=({name:e,label:t,width:n=`100%`,labelWidth:r=`auto`,value:i,min:a,max:o,step:s=1,marks:c=[],showArrows:l=!1,showTooltip:u=!1,tooltipFormatter:d=e=>e,disabled:m=!1,range:h=!1,small:g=!1,vertical:_={enabled:!1,width:`100px`,height:`400px`},onChange:v=goe.noop})=>{let y=(0,f.useContext)(Ie),b=voe(c),x=n=>{let r=typeof t==`string`?t:String(t),i=e??``;v({target:{name:i,value:n,label:r}})},C=()=>(0,p.jsx)(`div`,{className:Qb.button,children:(0,p.jsx)(_o,{basic:!0,small:!0,round:!0,onClick:()=>x(h?[a,i?.[1]]:a),disabled:m||i===a||y,icon:S.FAST_BACKWARD})}),w=()=>(0,p.jsx)(`div`,{className:Qb.button,children:(0,p.jsx)(_o,{basic:!0,small:!0,round:!0,onClick:()=>x(h?[i?.[0],o]:o),disabled:m||i===o||y,icon:S.FAST_FORWARD})}),T=(e,t)=>{let n=u&&t.dragging;return(0,p.jsx)(soe.default,{...e.props,...t,children:n&&(0,p.jsx)(ya,{display:`block`,text:d(i),forceOpen:!0,children:(0,p.jsx)(`div`,{style:{position:`absolute`,inset:0}})})})};return(0,p.jsxs)(`div`,{className:(0,$b.default)(Qb.container,g?Qb.small:``,_.enabled?Qb.vertical:``),style:_.enabled?{width:_.width,height:_.height}:{width:n},children:[l&&(_.enabled?(0,p.jsx)(w,{}):(0,p.jsx)(C,{})),(0,p.jsx)(Wb,{range:h,allowCross:!1,className:(0,$b.default)((m||y)&&Qb.rcSliderDisabled,l&&Qb.hasArrows),value:i,max:o,min:a,step:s,marks:b,onChange:e=>x(e),disabled:m||y,vertical:_.enabled,handleRender:T}),l&&(_.enabled?(0,p.jsx)(C,{}):(0,p.jsx)(w,{})),t&&(0,p.jsx)(`label`,{className:Qb.label,style:{width:r},children:t})]})},yoe=({cell:e})=>(0,p.jsx)(`div`,{className:Ny.inputWrapper,children:(0,p.jsx)(ex,{label:e.label,value:e.value,min:e.min,max:e.max,step:e.step,marks:e.marks,onChange:t=>e.onChange(t),showArrows:e.showArrows,showTooltip:e.showTooltip,tooltipFormatter:e.tooltipFormatter,disabled:e.disabled})}),boe=({cell:e})=>{let{tooltip:t,icon:n}=e;return(0,p.jsx)(`div`,{className:Ny.iconCellWrapper,children:(0,p.jsx)(ya,{text:t,enabled:!!t&&gs(t),display:`flex`,placement:`top-center`,children:(0,p.jsx)(er,{icon:n})})})},tx=({cell:e})=>(0,p.jsx)(qs,{actions:e.actions}),xoe=`_toggleBox_lhie5_1`,Soe=`_fullWidthStyleFix_lhie5_8`,Coe=`_dismiss_lhie5_13`;var nx={toggleBox:`_toggleBox_lhie5_1`,fullWidthStyleFix:`_fullWidthStyleFix_lhie5_8`,dismiss:`_dismiss_lhie5_13`},rx=u(h());const ix=({children:e,content:t,placement:n=`top-center`,closeOnOutsideClick:r=!0,fullWidth:i=!1,showCloseButton:a=!1,testId:o,disabled:s=!1,overflowContainer:c=!1,isOpen:l,onToggle:u})=>{let d=(0,f.useContext)(Ie),[m,h]=l===void 0?(0,f.useState)(!1):[l,u],g=()=>{!s&&!d&&h&&h(!1)},_=()=>{s||d||h&&h(!m)};(0,f.useEffect)(()=>{(s||d)&&g()},[s,d]);let{renderLayer:v,arrowProps:y,layerProps:b,triggerProps:x}=Zi({isOpen:m,placement:n,auto:!0,triggerOffset:6,onOutsideClick:r?g:void 0,ResizeObserver:Qr,overflowContainer:c});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{ref:x.ref,onClick:_,"data-testid":o,children:e}),m&&v((0,p.jsxs)(`div`,{className:i?(0,rx.default)(nx.toggleBox,nx.fullWidthStyleFix):(0,rx.default)(nx.toggleBox),...b,children:[(0,p.jsxs)(`div`,{children:[f.default.isValidElement(t)?f.default.cloneElement(t,{close:g}):t,a&&(0,p.jsx)(`div`,{className:nx.dismiss,children:(0,p.jsx)(_o,{small:!0,round:!0,onClick:g,icon:S.CLOSE})})]}),(0,p.jsx)(ua,{...y,backgroundColor:`var(--color-background-layer)`,borderColor:`var(--color-border)`,borderWidth:1,size:6})]}))]})},ax=({cell:e})=>{let{helpIcon:t}=e;return t?(0,p.jsx)(`div`,{className:Ny.icon,children:(0,p.jsx)(Ea,{onClick:t.onClick,text:t.tooltip})}):null},ox=({cell:e})=>{let{libraryIcon:t}=e;return t?(0,p.jsx)(`div`,{className:Ny.icon,children:(0,p.jsx)(Ea,{onClick:t.onClick,text:t.tooltip,icon:S.LIBRARY})}):null},sx=({cell:e})=>{let{hasSort:t,sort:n,sortPriority:r}=e;return t?(0,p.jsxs)(`span`,{className:Ny.sortingCellIcon,children:[n===`down`?(0,p.jsx)(Yd,{link:!0,children:(0,p.jsx)(er,{icon:S.SORT_ASCENDING})}):n===`up`?(0,p.jsx)(Yd,{link:!0,children:(0,p.jsx)(er,{icon:S.SORT_DESCENDING})}):(0,p.jsx)(Yd,{faint:!0,children:(0,p.jsx)(er,{icon:S.SORT_DESCENDING})}),r&&n?(0,p.jsx)(`sup`,{children:r}):null]}):null};var cx=u(h());const lx=({cell:e,isHeader:t,testId:n})=>{let{error:r,warning:i,tooltip:a,maxTooltipWidth:o,hasSort:s,onSort:c,type:l}=e,u=(0,p.jsxs)(`div`,{className:(0,cx.default)(Ny.staticCellContent,l===`Unit`?Ny.unit:``),onClick:s?e=>c&&c(e):()=>{},"data-error":r||null,"data-warning":i||null,"data-testid":n,children:[e.value,t?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ax,{cell:e}),(0,p.jsx)(ox,{cell:e}),(0,p.jsx)(sx,{cell:e})]}):null]});return(0,p.jsx)(`div`,{className:Ny.inputWrapper,children:(0,p.jsx)(ya,{error:!!r,warning:!!i,text:a||r||i,enabled:a&&gs(a)||r&&gs(r)||i&&gs(i)||!1,maxWidth:o,display:`block`,children:u})})},ux=({cell:e,testId:t})=>{let{content:n,fullWidth:r,closeOnOutsideClick:i,disabled:a}=e;return(0,p.jsx)(ix,{content:n,fullWidth:r,closeOnOutsideClick:i,disabled:a,children:(0,p.jsx)(`div`,{className:Ny.popover,children:(0,p.jsx)(lx,{cell:e,testId:t})})})},dx=({cell:e,isHeader:t,columnAlignment:n,testId:r})=>{if(!e)return null;switch(e.type){case`Input`:case`NumberInput`:case`DateInput`:case`Select`:return(0,p.jsx)(Gae,{cell:e,columnAlignment:n,testId:r});case`Link`:return(0,p.jsx)(qae,{cell:e,testId:r});case`CheckBox`:return(0,p.jsx)(Jae,{cell:e,testId:r});case`Slider`:return(0,p.jsx)(yoe,{cell:e});case`Icon`:return(0,p.jsx)(boe,{cell:e});case`Actions`:return(0,p.jsx)(tx,{cell:e});case`Popover`:return(0,p.jsx)(ux,{cell:e});default:return(0,p.jsx)(lx,{cell:e,isHeader:t,testId:r})}};let fx=function(e){return e.INPUT=`Input`,e.NUMBER_INPUT=`NumberInput`,e.SELECT=`Select`,e.POPOVER=`Popover`,e.SLIDER=`Slider`,e.CHECKBOX=`CheckBox`,e.ACTIONS=`Actions`,e.AUTO_UNIT=`AutoUnit`,e}({});var px=u(h());const mx=({cell:e,isHeader:t,columnHeaderAlignment:n,columnAlignment:r=b.LEFT,width:i,testId:a})=>{if(!e)return null;let{style:o,colSpan:s,rowSpan:c,width:l}=e,u=(0,f.useRef)(null),d={bodyAlignment:r,headerAlignment:n,isHeader:t},m=My(d,Ny),h=My(d,Ny,!0),g=e.type===fx.INPUT||e.type===fx.NUMBER_INPUT||e.type===fx.SELECT||e.type===fx.POPOVER?Ny.inputCell:e.type===fx.SLIDER?Ny.sliderCell:e.type===fx.CHECKBOX?Ny.checkBoxCell:e.type===fx.ACTIONS?Ny.actionsCell:Ny.staticCell,_=(0,px.default)(Ny.cell,g,e.hasSort?Ny.sortingCell:null,m,e.breakWord?Ny.breakWord:``),v=l??i??void 0,y={width:v,minWidth:v,...o},x=t?`th`:`td`;return(0,p.jsx)(x,{ref:u,className:_,style:y,colSpan:s,rowSpan:c,children:(0,p.jsx)(dx,{cell:e,columnAlignment:h??b.RIGHT,isHeader:t,testId:a})})};var hx=u(h());const gx=({row:e,rowIndex:t,isHeader:n=!1,columnCount:r,colSpan:i,columnHeaderAlignments:a=[],columnAlignment:o=[],hasRowActions:s,draggableTable:c=!1,columnWidths:l,dropDisabled:u=!1,height:d,testId:f})=>{let m=lae(a,n,t),{onRowClick:h,onRowFocus:g,onRowMouseEnter:_,onRowMouseLeave:v,expandedContent:y,error:b,warning:x,active:C}=e,w=e.cells.map((e,r)=>{let i=`${n?0:1}_${t}_${r}`;return(0,p.jsx)(mx,{cell:e,isHeader:n,columnAlignment:o[r],columnHeaderAlignment:m[r],width:l?l[r]:void 0,testId:e.testId},i)}),T=s&&(0,p.jsx)(mx,{cell:{type:fx.ACTIONS,actions:e.actions},isHeader:n},r),{attributes:E,listeners:D,setNodeRef:O,transform:k,transition:A,isDragging:j}=ky({id:t.toString(),animateLayoutChanges:()=>!1}),M={transform:u?void 0:D_.Translate.toString(k),height:d,transition:A,opacity:j?0:void 0},N=()=>e.noDrag?(0,p.jsx)(`td`,{"aria-labelledby":`unique-label-id`}):(0,p.jsx)(`td`,{className:Ay.dragIconCell,children:(0,p.jsx)(`div`,{className:(0,hx.default)(Ay.dragIcon,u?Ay.dragIconDisabled:``),...E,...D,children:(0,p.jsx)(er,{icon:S.DRAG})})});return n?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`tr`,{onClick:h,onMouseEnter:_,onMouseLeave:v,onFocus:g,className:(0,hx.default)(h?Ay.clickableRow:null,_?Ay.hoverableRow:null),children:[c?(0,p.jsx)(`th`,{}):null,w,T]},t),y&&y.content?(0,p.jsx)(jy,{colSpan:i,flush:y.flush===!0,children:y.content},`${t}_expanded_content`):null]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`tr`,{ref:e.noDrag?null:O,onClick:h,onMouseEnter:_,onMouseLeave:v,onFocus:g,className:(0,hx.default)(h&&!h.noStyle?Ay.clickableRow:null,_&&!_.noStyle?Ay.hoverableRow:null,C?Ay.rowActive:null),"data-error":b||null,"data-warning":x||null,"data-index":t,"data-even":t%2==0,style:M,children:[c?N():null,w,T]},t),y&&y.content?(0,p.jsx)(jy,{colSpan:i,flush:y.flush===!0,children:y.content},`${t}_expanded_content`):null]})};var _x=u(h());const vx=e=>{let{children:t,colSpan:n,columnAlignment:r,columnCount:i,draggable:a,onListReorder:o=()=>{},canListReorder:s=()=>!0,rowActions:c,rows:l=[],tbodyRef:u}=e,[d,h]=(0,f.useState)(null),[g,_]=(0,f.useState)(!1),v=(0,f.useMemo)(()=>l.map((e,t)=>t.toString()),[l]),y=e=>{h(e.active.id)},b=e=>{h(null),_(!1);let{active:t,over:n}=e;if(!t||!n||t.id===n.id)return;let r=Number(t.id),i=Number(n?.id);s({from:r,to:i})&&o({from:r,to:i})},x=e=>{let{active:t,over:n}=e,r=Number(t.id),i=Number(n?.id),a=r!==i&&!s({from:r,to:i});_(a)},S=()=>{if(!u?.current)return[];let e=u.current.querySelectorAll(`tr`),t=e[Number(d)],n=t?.querySelectorAll(`td`);if(!n)return[];let r=Array.from(n).map(e=>`${e.getBoundingClientRect().width}px`);return r.shift(),r};return a?(0,p.jsxs)(hy,{collisionDetection:Y_,onDragStart:y,onDragEnd:b,onDragOver:x,children:[(0,p.jsx)(Dy,{items:v,strategy:wy,children:t({dropDisabled:g})}),!!d&&(0,m.createPortal)((0,p.jsx)(yy,{dropAnimation:null,children:(0,p.jsx)(`table`,{className:(0,_x.default)(ph.table,ph.dragOverlay),children:(0,p.jsx)(`tbody`,{children:(0,p.jsx)(gx,{rowIndex:Number(d),row:l[Number(d)],columnCount:i,columnWidths:S(),colSpan:n,hasRowActions:c,columnAlignment:r,draggableTable:a,dropDisabled:g})})})}),document.body)]}):t({})};function yx(e,t,n){let r=n.initialDeps??[],i;return()=>{var a,o,s,c;let l;n.key&&(a=n.debug)?.call(n)&&(l=Date.now());let u=e(),d=u.length!==r.length||u.some((e,t)=>r[t]!==e);if(!d)return i;r=u;let f;if(n.key&&(o=n.debug)?.call(n)&&(f=Date.now()),i=t(...u),n.key&&(s=n.debug)?.call(n)){let e=Math.round((Date.now()-l)*100)/100,t=Math.round((Date.now()-f)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
|
|
151
|
+
font-size: .6rem;
|
|
152
|
+
font-weight: bold;
|
|
153
|
+
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return(c=n?.onChange)==null||c.call(n,i),i}}function bx(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}const xx=(e,t)=>Math.abs(e-t)<1,Sx=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Cx=e=>e,wx=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},Tx=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(n.getBoundingClientRect()),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(n.getBoundingClientRect())};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},Ex={passive:!0},Dx=typeof window>`u`?!0:`onscrollend`in window,Ox=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&Dx?()=>void 0:Sx(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);c(),n.addEventListener(`scroll`,s,Ex);let l=e.options.useScrollendEvent&&Dx;return l&&n.addEventListener(`scrollend`,c,Ex),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},kx=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e){let t=Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`]);return t}}return Math.round(e.getBoundingClientRect()[n.options.horizontal?`width`:`height`])},Ax=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})};var jx=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>{var n;return(n=t())?.observe(e,{box:`border-box`})},unobserve:e=>{var n;return(n=t())?.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Cx,rangeExtractor:wx,onChange:()=>{},measureElement:kx,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=yx(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!==`production`&&`maybeNotify`,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(e=this.scrollElement)?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=yx(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,n,r,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i}),{key:!1}),this.getMeasurements=yx(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let o=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let s=this.measurementsCache.slice(0,o);for(let i=o;i<e;i++){let e=r(i),o=this.options.lanes===1?s[i-1]:this.getFurthestMeasurement(s,i),c=o?o.end+this.options.gap:t+n,l=a.get(e),u=typeof l==`number`?l:this.options.estimateSize(i),d=c+u,f=o?o.lane:i%this.options.lanes;s[i]={index:i,start:c,size:u,end:d,key:e,lane:f}}return this.measurementsCache=s,s},{key:process.env.NODE_ENV!==`production`&&`getMeasurements`,debug:()=>this.options.debug}),this.calculateRange=yx(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?Nx({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:process.env.NODE_ENV!==`production`&&`calculateRange`,debug:()=>this.options.debug}),this.getVirtualIndexes=yx(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:process.env.NODE_ENV!==`production`&&`getVirtualIndexes`,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),r=this.measurementsCache[n];if(!r)return;let i=r.key,a=this.elementsCache.get(i);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=this.itemSizeCache.get(n.key)??n.size,i=t-r;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this))&&(process.env.NODE_ENV!==`production`&&this.options.debug&&console.info(`correction`,i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=yx(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=e[r],a=t[i];n.push(a)}return n},{key:process.env.NODE_ENV!==`production`&&`getVirtualItems`,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return bx(t[Mx(0,t.length-1,e=>bx(t[e]).start,e)])},this.getOffsetForAlignment=(e,t,n=0)=>{let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.options.horizontal?`scrollWidth`:`scrollHeight`,o=this.scrollElement?`document`in this.scrollElement?this.scrollElement.document.documentElement[a]:this.scrollElement[a]:0,s=o-r;return Math.max(Math.min(s,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let r=this.getSize(),i=this.getScrollOffset();if(t===`auto`)if(n.end>=i+r-this.options.scrollPaddingEnd)t=`end`;else if(n.start<=i+this.options.scrollPaddingStart)t=`start`;else return[i,t];let a=t===`end`?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t=`start`,behavior:n}={})=>{this.cancelScrollToIndex(),n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t=`auto`,behavior:n}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),n===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r;this._scrollToOffset(i,{adjustments:void 0,behavior:n}),n!==`smooth`&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{this.scrollToIndexTimeoutId=null;let t=this.elementsCache.has(this.options.getItemKey(e));if(t){let[t]=bx(this.getOffsetForIndex(e,a));xx(t,this.getScrollOffset())||this.scrollToIndex(e,{align:a,behavior:n})}else this.scrollToIndex(e,{align:a,behavior:n})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),t===`smooth`&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;let t=this.getMeasurements(),n;return n=t.length===0?this.options.paddingStart:this.options.lanes===1?(e=t[t.length-1])?.end??0:Math.max(...t.slice(-this.options.lanes).map(e=>e.end)),Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}};const Mx=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function Nx({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start,o=Mx(0,i,a,n),s=o;for(;s<i&&e[s].end<n+t;)s++;return r>1&&(o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))),{startIndex:o,endIndex:s}}const Px=typeof document<`u`?f.useLayoutEffect:f.useEffect;function Fx(e){let t=f.useReducer(()=>({}),{})[1],n={...e,onChange:(n,r)=>{var i;r?(0,m.flushSync)(t):t(),(i=e.onChange)==null||i.call(e,n,r)}},[r]=f.useState(()=>new jx(n));return r.setOptions(n),Px(()=>r._didMount(),[]),Px(()=>r._willUpdate()),r}function Ix(e){return Fx({observeElementRect:Tx,observeElementOffset:Ox,scrollToFn:Ax,...e})}var Lx=u(h());const Rx=({table:e,theadRef:t,children:n})=>{let r=(0,f.useRef)(null),i=Ix({count:e?.rowCount??e.rows?.length??0,getScrollElement:()=>r.current,estimateSize:()=>31,overscan:10}),a=()=>{let e=t.current?.clientHeight??0,n=i.getTotalSize()+e,r=i.getVirtualItems(),a=r.length>0?r[0].start:0,o=r.length>0?i.getTotalSize()-r[r.length-1].end:0;return{"--virtualPaddingTop":a+`px`,"--virtualPaddingBottom":o+`px`,height:n}};return(0,p.jsx)(`div`,{id:`scrollWrapper`,className:(0,Lx.default)(ph.scroll,ph.virtualScroll),ref:r,children:n({virtualizer:i,tableStyle:a()})})},zx=({table:e,theadRef:t,children:n})=>{let{infiniteScroll:r=!1}=e;return r?(0,p.jsx)(Rx,{table:e,theadRef:t,children:({virtualizer:e,tableStyle:t})=>n({virtualizer:e,tableStyle:t})}):(0,p.jsx)(`div`,{id:`scrollWrapper`,className:ph.scroll,children:n({})})};var Bx=u(h()),Vx=u(Ra());const Hx=e=>{let{onListReorder:t=()=>{},canListReorder:n=()=>!0,beforeRenderRow:r,table:i}=e,{columnWidths:a,footer:o,name:s,rows:c=[],actions:l,actionsRight:u,columnHeaderAlignments:d,columnAlignment:m,striped:h=!0,testId:g,draggable:_,defaultEmptyRow:v=null,onAddRow:y=null,bordered:b=!0,maxHeight:x,fixedWidth:S}=i,C=(0,f.useRef)(null),w=(0,f.useRef)(null),T=(0,Vx.get)(e,`table.headers`,[]),E=$g(c,T),D=t_(c,T),O=E+(D?1:0),k=o?o?.pagination?.rowsPerPage?.value===0||Number(o?.pagination?.selectedPage)>=Number(o?.pagination?.rowCount)/Number(o?.pagination?.rowsPerPage?.value):!0,A=v?.cells?.length&&y&&k,j=A?v.cells.map((e,t)=>e?.type===`Input`?{...e,onChange:e=>{let n=e?.target?.value,r={...v,cells:v.cells.map((e,r)=>({...e,value:r===t?n:e?.value}))};y({newRow:r})}}:{...e,disabled:!0}):null,M={cells:j,testId:g?`${g}-last-empty-row`:void 0},N=A?c.concat(M):c,P={...i,rows:N},ee=(0,Bx.default)(ph.wrapper,b?ph.bordered:``),te={maxHeight:x,width:S,display:S===`auto`?`inline-flex`:`flex`};return(0,p.jsxs)(`div`,{className:ee,style:te,children:[(0,p.jsx)(hh,{actions:l,actionsRight:u,name:s,testId:g&&`${g}-title`}),(0,p.jsx)(vx,{colSpan:O,columnAlignment:m,columnCount:E,draggable:_,onListReorder:t,rowActions:D,rows:N,tbodyRef:w,canListReorder:n,children:({dropDisabled:e})=>(0,p.jsx)(zx,{table:P,theadRef:C,children:({virtualizer:t,tableStyle:n})=>(0,p.jsxs)(`table`,{className:(0,Bx.default)(ph.table,h?ph.striped:``),"data-testid":g,style:n,children:[(0,p.jsx)(`thead`,{ref:C,children:T.map((e,t)=>(0,p.jsx)(gx,{rowIndex:t,isHeader:!0,row:e,columnCount:E,columnWidths:a,colSpan:O,hasRowActions:D,columnAlignment:m,columnHeaderAlignments:d,draggableTable:_},`0_${t}`))}),(0,p.jsx)(`tbody`,{ref:w,children:t?t.getVirtualItems().map(t=>{let n=t.index,i=N[n],o=r?r({row:i,rowIndex:n}):i;return(0,p.jsx)(gx,{rowIndex:n,row:o,columnCount:E,columnWidths:a,colSpan:O,hasRowActions:D,columnAlignment:m,draggableTable:_,height:t.size,dropDisabled:e},`1_${n}`)}):N.map((t,n)=>{let i=r?r({row:t,rowIndex:n}):t;return(0,p.jsx)(gx,{rowIndex:n,row:i,columnCount:E,columnWidths:a,colSpan:O,hasRowActions:D,columnAlignment:m,draggableTable:_,dropDisabled:e},`1_${n}`)})})]})})}),o&&(0,p.jsx)(Zg,{pagination:o.pagination,actions:o.actions,content:o.content})]})},Ux=`blank`,Wx=1e4,Gx=(e,t,n,r)=>{let i=`${t} → ${n}:`,a=e.filter(e=>!e.startsWith(i)),o=r?[...a,`${i} ${r}`]:a,s=o.length===0;return{updatedErrors:o,isValid:s}};var Kx=u(Ra());const woe=20,Toe=1,qx=({validationRules:e,parsedResult:t,updateState:n,testId:r})=>{let i=(0,f.useMemo)(()=>t.fields.map(e=>({value:e})),[t.fields]),[a,o]=(0,f.useState)(20),[s,c]=(0,f.useState)(1),l=(0,f.useRef)([]),u=(s-1)*a,d=a===0?t.rows.length:u+a,[m,h]=(0,f.useState)([]),g=(0,f.useCallback)((r,a)=>(!l.current.length&&t.rows.length&&(l.current=t.rows[0].map(e=>Mg(e)?`NumberInput`:`Input`)),{cells:r.map((r,o)=>{let{columnMessage:s={},validator:c=()=>null}=e?.[o]??{},u=i?.[o]?.value,d=`Row ${a+1}`,f=`${d} → ${u}:`,p=c(r),m=t?.errors?.find(e=>e.startsWith(f))??null,_=p||m||null;return{name:u,value:r,type:l.current[o]??`Input`,disableValidationOnFocus:!0,error:_,validationCallback:(e,r)=>{let i=`Row ${a+1}`,{updatedErrors:o,isValid:s}=Gx(t.errors,i,e,r);n({parsedResult:{...t,errors:o,isValid:s}})},onChange:e=>{let{value:r}=e?.target??{},i=`Row ${a+1}`,s=c(r),{updatedErrors:l,isValid:d}=Gx(t.errors,i,u,s),f=t.rows.map((e,t)=>t===a?e.map((e,t)=>t===o?r:e):e);n({parsedResult:{...t,rows:f,errors:l,isValid:d}}),h(e=>{let t=[...e];return t[a]=g(f[a],a),t})},...s}}),actions:[{label:`Delete`,icon:`minus`,onClick:()=>{let e=t.rows.filter((e,t)=>t!==a);n({parsedResult:{...t,rows:e}})}}]}),[i,e,t,n]);(0,f.useEffect)(()=>{h(t.rows.map((e,t)=>g(e,t)))},[t.rows.length,i,e,t.errors,t.isValid]);let _=(0,f.useMemo)(()=>t.fields.map((r,a)=>{let o=e?.[a],s=o?.validUnits??[],c=s.some(e=>(0,Kx.toLower)(e)===Ux);if(!s.length||c)return{};let l=t?.units?.[a],u=(0,Kx.toLower)(l),d=s.some(e=>(0,Kx.toLower)(e)===u),f=d?l:o?.defaultUnit??``;return{key:i?.[a]?.value,value:f,type:`Select`,disabled:!s.length||!f,options:s.map(e=>({label:e,value:e})),onChange:e=>{let{value:r}=e?.target??{},i=t.units.map((e,t)=>t===a?r:e);n({parsedResult:{...t,units:i}})}}}),[t,e,i,n]),v=(0,f.useMemo)(()=>_.some(e=>!(0,Kx.isEmpty)(e)),[_]),y=(0,f.useMemo)(()=>[{cells:i,actions:[{}]},...v?[{cells:_}]:[]],[i,v,_]),b=(0,f.useMemo)(()=>m.slice(u,d),[m,u,d]),x=(0,f.useCallback)(({rowIndex:e})=>{let n=u+e,r=t.rows[n];return r?g(r,n):{cells:[],actions:[]}},[t.rows,g,u]),S=({from:e,to:r})=>{let i=[...t.rows],[a]=i.splice(e,1);i.splice(r,0,a),n({parsedResult:{...t,rows:i}}),h(t=>{let n=[...t],[i]=n.splice(e,1);return n.splice(r,0,i),n})};return(0,p.jsx)(Hx,{beforeRenderRow:x,onListReorder:S,table:{testId:`${r}-paste-with-review-modal-table`,draggable:!0,headers:y,rows:Array.from({length:b?.length||0},()=>({cells:[],actions:[]})),rowCount:b?.length,infiniteScroll:!0,footer:{pagination:{rowCount:t.rows.length,selectedPage:s,rowsPerPage:{value:a,onChange:e=>o(Number(e?.target?.value)),options:[{label:`10 / page`,value:10},{label:`20 / page`,value:20},{label:`50 / page`,value:50},{label:`100 / page`,value:100},{label:`200 / page`,value:200},{label:`Show all`,value:0}]},onSelectPage:e=>c(e),small:!0}}}})},Eoe=`_listStyle_yjfjw_1`;var Jx={listStyle:`_listStyle_yjfjw_1`};const Yx=({errors:e,t})=>{let n=[...e]?.sort((e,t)=>{let n=e=>{let t=e.match(/^Row (\d+)/);return t?parseInt(t[1],10):1/0};return n(e)-n(t)});return{visible:!0,icon:!0,width:`100%`,content:t(`unableToImportPleaseCorrectError`,{rows:e?.length}),type:`Error`,details:(0,p.jsx)(`ul`,{className:Jx.listStyle,children:n.map((e,t)=>(0,p.jsx)(`li`,{children:e},t))})}},Xx=({errors:e,t})=>{let n=e.length;return n?(0,p.jsx)(fh,{message:Yx({errors:e,t})}):null},Doe=`_empty_fe425_1`,Ooe=`_text_fe425_11`;var Zx={empty:`_empty_fe425_1`,text:`_text_fe425_11`};const Qx=({width:e=`auto`,height:t=`auto`,text:n=`No data`,children:r,testId:i})=>(0,p.jsxs)(`div`,{className:Zx.empty,style:{width:e,height:t},"data-testid":i,children:[(0,p.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`64`,height:`41`,children:(0,p.jsxs)(`g`,{transform:`translate(0 1)`,fill:`none`,fillRule:`evenodd`,children:[(0,p.jsx)(`ellipse`,{cx:`32`,cy:`33`,rx:`32`,ry:`7`,fill:`rgba(0,0,0,0.1)`}),(0,p.jsxs)(`g`,{fillRule:`nonzero`,stroke:`var(--color-text)`,strokeOpacity:`0.2`,children:[(0,p.jsx)(`path`,{d:`M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z`,fill:`rgba(0,0,0,0.05)`}),(0,p.jsx)(`path`,{d:`M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z`,fill:`var(--color-background-raised)`})]})]})}),n!==``&&(0,p.jsx)(`div`,{className:Zx.text,children:(0,p.jsx)(Yd,{faint:!0,children:n})}),r]}),$x=e=>e?.split(/;|\t|\n/)?.some(e=>{let t=e?.match(/[.,]/g);return t&&t.length>1}),eS=e=>e?.split(/;|\t|\n/)?.some(e=>!e?.includes(`.`)&&e?.match(/,/g)?.length===1);var tS=s((exports=>{exports.__esModule=!0;function t(e,t){return e*e+t*t}function n(e,n){return t(e[0]-n[0],e[1]-n[1])}function r(e,n,r){var i=n[0],a=n[1],o=r[0]-i,s=r[1]-a;if(o!==0||s!==0){var c=((e[0]-i)*o+(e[1]-a)*s)/t(o,s);c>1?(i=r[0],a=r[1]):c>0&&(i+=o*c,a+=s*c)}return t(e[0]-i,e[1]-a)}function i(e,t){for(var r=e[0],i,a=[r],o=1,s=e.length;o<s;o++)i=e[o],n(i,r)>t&&(a.push(i),r=i);return r!==i&&a.push(i),a}function a(e,t,n,i,o){for(var s=i,c,l=t+1;l<n;l++){var u=r(e[l],e[t],e[n]);u>s&&(c=l,s=u)}s>i&&(c-t>1&&a(e,t,c,i,o),o.push(e[c]),n-c>1&&a(e,c,n,i,o))}function o(e,t){var n=e.length-1,r=[e[0]];return a(e,0,n,t,r),r.push(e[n]),r}function s(e,t,n){if(t===void 0&&(t=1),n===void 0&&(n=!1),e.length<=2)return e;var r=t*t;return e=n?e:i(e,r),e=o(e,r),e}exports.SimplifyAP=s})),nS=s((exports=>{exports.__esModule=!0;function t(e,t){return e*e+t*t}function n(e,n){return t(e.longitude-n.longitude,e.latitude-n.latitude)}function r(e,n,r){var i=n.longitude,a=n.latitude,o=r.longitude-i,s=r.latitude-a;if(o!==0||s!==0){var c=((e.longitude-i)*o+(e.latitude-a)*s)/t(o,s);c>1?(i=r.longitude,a=r.latitude):c>0&&(i+=o*c,a+=s*c)}return t(e.longitude-i,e.latitude-a)}function i(e,t){for(var r=e[0],i,a=[r],o=1,s=e.length;o<s;o++)i=e[o],n(i,r)>t&&(a.push(i),r=i);return r!==i&&a.push(i),a}function a(e,t,n,i,o){for(var s=i,c,l=t+1;l<n;l++){var u=r(e[l],e[t],e[n]);u>s&&(c=l,s=u)}s>i&&(c-t>1&&a(e,t,c,i,o),o.push(e[c]),n-c>1&&a(e,c,n,i,o))}function o(e,t){var n=e.length-1,r=[e[0]];return a(e,0,n,t,r),r.push(e[n]),r}function s(e,t,n){if(t===void 0&&(t=1),n===void 0&&(n=!1),e.length<=2)return e;var r=t*t;return e=n?e:i(e,r),e=o(e,r),e}exports.SimplifyLL=s})),rS=s((exports=>{exports.__esModule=!0;function t(e,t){return e*e+t*t}function n(e,n){return t(e.x-n.x,e.y-n.y)}function r(e,n,r){var i=n.x,a=n.y,o=r.x-i,s=r.y-a;if(o!==0||s!==0){var c=((e.x-i)*o+(e.y-a)*s)/t(o,s);c>1?(i=r.x,a=r.y):c>0&&(i+=o*c,a+=s*c)}return t(e.x-i,e.y-a)}function i(e,t){for(var r=e[0],i,a=[r],o=1,s=e.length;o<s;o++)i=e[o],n(i,r)>t&&(a.push(i),r=i);return r!==i&&a.push(i),a}function a(e,t,n,i,o){for(var s=i,c,l=t+1;l<n;l++){var u=r(e[l],e[t],e[n]);u>s&&(c=l,s=u)}s>i&&(c-t>1&&a(e,t,c,i,o),o.push(e[c]),n-c>1&&a(e,c,n,i,o))}function o(e,t){var n=e.length-1,r=[e[0]];return a(e,0,n,t,r),r.push(e[n]),r}function s(e,t,n){if(t===void 0&&(t=1),n===void 0&&(n=!1),e.length<=2)return e;var r=t*t;return e=n?e:i(e,r),e=o(e,r),e}exports.Simplify=s})),iS=s((exports=>{exports.__esModule=!0;var t=tS();exports.SimplifyAP=t.SimplifyAP;var n=nS();exports.SimplifyLL=n.SimplifyLL;var r=rS();exports.Simplify=r.Simplify})),aS=s(((exports,t)=>{
|
|
154
|
+
/* @license
|
|
155
|
+
Papa Parse
|
|
156
|
+
v5.5.2
|
|
157
|
+
https://github.com/mholt/PapaParse
|
|
158
|
+
License: MIT
|
|
159
|
+
*/
|
|
160
|
+
((n,r)=>{typeof define==`function`&&define.amd?define([],r):typeof t==`object`&&exports!==void 0?t.exports=r():n.Papa=r()})(exports,function e(){var t=typeof self<`u`?self:typeof window<`u`?window:t===void 0?{}:t,n,r=!t.document&&!!t.postMessage,i=t.IS_PAPA_WORKER||!1,a={},o=0,s={};function c(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine=``,this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=y(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||(a=this._config.quoteChar||`"`,t=this._handle.guessLineEndings(e,a)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&x(this._config.beforeFirstChunk)&&(a=this._config.beforeFirstChunk(e))!==void 0&&(e=a),this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e,a=(this._partialLine=``,this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=a.meta.cursor,r=(this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),a&&a.data&&(this._rowCount+=a.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),i)t.postMessage({results:a,workerId:s.WORKER_ID,finished:r});else if(x(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=a=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!r||!x(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){x(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function l(e){var t;(e||={}).chunkSize||(e.chunkSize=s.RemoteChunkSize),c.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?`POST`:`GET`,this._input,!r),this._config.downloadRequestHeaders){var e,n=this._config.downloadRequestHeaders;for(e in n)t.setRequestHeader(e,n[e])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,t.setRequestHeader(`Range`,`bytes=`+this._start+`-`+i));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>(e=e.getResponseHeader(`Content-Range`))===null?-1:parseInt(e.substring(e.lastIndexOf(`/`)+1)))(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(Error(e))}}function u(e){(e||={}).chunkSize||(e.chunkSize=s.LocalChunkSize),c.call(this,e);var t,n,r=typeof FileReader<`u`;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,i=(this._config.chunkSize&&(i=Math.min(this._start+this._config.chunkSize,this._input.size),e=n.call(e,this._start,i)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:i}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;c.call(this,e||={}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,n;if(!this._finished)return e=this._config.chunkSize,t=e?(n=t.substring(0,e),t.substring(e)):(n=t,``),this._finished=!t,this.parseChunk(n)}}function f(e){c.call(this,e||={});var t=[],n=!0,r=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on(`data`,this._streamData),this._input.on(`end`,this._streamEnd),this._input.on(`error`,this._streamError)},this._checkIsFinished=function(){r&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=b(function(e){try{t.push(typeof e==`string`?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=b(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=b(function(){this._streamCleanUp(),r=!0,this._streamData(``)},this),this._streamCleanUp=b(function(){this._input.removeListener(`data`,this._streamData),this._input.removeListener(`end`,this._streamEnd),this._input.removeListener(`error`,this._streamError)},this)}function p(e){var t,n,r,i,a=2**53,o=-a,c=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,u=this,d=0,f=0,p=!1,g=!1,_=[],v={data:[],errors:[],meta:{}};function b(t){return e.skipEmptyLines===`greedy`?t.join(``).trim()===``:t.length===1&&t[0].length===0}function S(){if(v&&r&&(w(`Delimiter`,`UndetectableDelimiter`,`Unable to auto-detect delimiting character; defaulted to '`+s.DefaultDelimiter+`'`),r=!1),e.skipEmptyLines&&(v.data=v.data.filter(function(e){return!b(e)})),C()){if(v)if(Array.isArray(v.data[0])){for(var t=0;C()&&t<v.data.length;t++)v.data[t].forEach(n);v.data.splice(0,1)}else v.data.forEach(n);function n(t,n){x(e.transformHeader)&&(t=e.transformHeader(t,n)),_.push(t)}}function n(t,n){for(var r=e.header?{}:[],i=0;i<t.length;i++){var s=i,u=t[i],u=((t,n)=>(t=>(e.dynamicTypingFunction&&e.dynamicTyping[t]===void 0&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)))(t)?n===`true`||n===`TRUE`||n!==`false`&&n!==`FALSE`&&((e=>{if(c.test(e)&&(e=parseFloat(e),o<e&&e<a))return 1})(n)?parseFloat(n):l.test(n)?new Date(n):n===``?null:n):n)(s=e.header?i>=_.length?`__parsed_extra`:_[i]:s,u=e.transform?e.transform(u,s):u);s===`__parsed_extra`?(r[s]=r[s]||[],r[s].push(u)):r[s]=u}return e.header&&(i>_.length?w(`FieldMismatch`,`TooManyFields`,`Too many fields: expected `+_.length+` fields but parsed `+i,f+n):i<_.length&&w(`FieldMismatch`,`TooFewFields`,`Too few fields: expected `+_.length+` fields but parsed `+i,f+n)),r}var i;v&&(e.header||e.dynamicTyping||e.transform)&&(i=1,!v.data.length||Array.isArray(v.data[0])?(v.data=v.data.map(n),i=v.data.length):v.data=n(v.data,0),e.header&&v.meta&&(v.meta.fields=_),f+=i)}function C(){return e.header&&_.length===0}function w(e,t,n,r){e={type:e,code:t,message:n},r!==void 0&&(e.row=r),v.errors.push(e)}x(e.step)&&(i=e.step,e.step=function(t){v=t,C()?S():(S(),v.data.length!==0&&(d+=t.data.length,e.preview&&d>e.preview?n.abort():(v.data=v.data[0],i(v,u))))}),this.parse=function(i,a,o){var c=e.quoteChar||`"`,c=(e.newline||=this.guessLineEndings(i,c),r=!1,e.delimiter?x(e.delimiter)&&(e.delimiter=e.delimiter(i),v.meta.delimiter=e.delimiter):((c=((t,n,r,i,a)=>{var o,c,l,u;a||=[`,`,` `,`|`,`;`,s.RECORD_SEP,s.UNIT_SEP];for(var d=0;d<a.length;d++){for(var f,p=a[d],m=0,g=0,_=0,v=(l=void 0,new h({comments:i,delimiter:p,newline:n,preview:10}).parse(t)),y=0;y<v.data.length;y++)r&&b(v.data[y])?_++:(f=v.data[y].length,g+=f,l===void 0?l=f:0<f&&(m+=Math.abs(f-l),l=f));0<v.data.length&&(g/=v.data.length-_),(c===void 0||m<=c)&&(u===void 0||u<g)&&1.99<g&&(c=m,o=p,u=g)}return{successful:!!(e.delimiter=o),bestDelimiter:o}})(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=s.DefaultDelimiter),v.meta.delimiter=e.delimiter),y(e));return e.preview&&e.header&&c.preview++,t=i,n=new h(c),v=n.parse(t,a,o),S(),p?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return p},this.pause=function(){p=!0,n.abort(),t=x(e.chunk)?``:t.substring(n.getCharIndex())},this.resume=function(){u.streamer._halted?(p=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,n.abort(),v.meta.aborted=!0,x(e.complete)&&e.complete(v),t=``},this.guessLineEndings=function(e,t){e=e.substring(0,1048576);var t=RegExp(m(t)+`([^]*?)`+m(t),`gm`),n=(e=e.replace(t,``)).split(`\r`),t=e.split(`
|
|
161
|
+
`),e=1<t.length&&t[0].length<n[0].length;if(n.length===1||e)return`
|
|
162
|
+
`;for(var r=0,i=0;i<n.length;i++)n[i][0]===`
|
|
163
|
+
`&&r++;return r>=n.length/2?`\r
|
|
164
|
+
`:`\r`}}function m(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function h(e){var t=(e||={}).delimiter,n=e.newline,r=e.comments,i=e.step,a=e.preview,o=e.fastMode,c=null,l=!1,u=e.quoteChar==null?`"`:e.quoteChar,d=u;if(e.escapeChar!==void 0&&(d=e.escapeChar),(typeof t!=`string`||-1<s.BAD_DELIMITERS.indexOf(t))&&(t=`,`),r===t)throw Error(`Comment character same as delimiter`);!0===r?r=`#`:(typeof r!=`string`||-1<s.BAD_DELIMITERS.indexOf(r))&&(r=!1),n!==`
|
|
165
|
+
`&&n!==`\r`&&n!==`\r
|
|
166
|
+
`&&(n=`
|
|
167
|
+
`);var f=0,p=!1;this.parse=function(s,h,g){if(typeof s!=`string`)throw Error(`Input must be a string`);var _=s.length,v=t.length,y=n.length,b=r.length,S=x(i),C=[],w=[],T=[],E=f=0;if(!s)return re();if(o||!1!==o&&s.indexOf(u)===-1){for(var D=s.split(n),O=0;O<D.length;O++){if(T=D[O],f+=T.length,O!==D.length-1)f+=n.length;else if(g)return re();if(!r||T.substring(0,b)!==r){if(S){if(C=[],P(T.split(t)),ie(),p)return re()}else P(T.split(t));if(a&&a<=O)return C=C.slice(0,a),re(!0)}}return re()}for(var k=s.indexOf(t,f),A=s.indexOf(n,f),j=new RegExp(m(d)+m(u),`g`),M=s.indexOf(u,f);;)if(s[f]===u)for(M=f,f++;;){if((M=s.indexOf(u,M+1))===-1)return g||w.push({type:`Quotes`,code:`MissingQuotes`,message:`Quoted field unterminated`,row:C.length,index:f}),te();if(M===_-1)return te(s.substring(f,M).replace(j,u));if(u===d&&s[M+1]===d)M++;else if(u===d||M===0||s[M-1]!==d){k!==-1&&k<M+1&&(k=s.indexOf(t,M+1));var N=ee((A=A!==-1&&A<M+1?s.indexOf(n,M+1):A)===-1?k:Math.min(k,A));if(s.substr(M+1+N,v)===t){T.push(s.substring(f,M).replace(j,u)),s[f=M+1+N+v]!==u&&(M=s.indexOf(u,f)),k=s.indexOf(t,f),A=s.indexOf(n,f);break}if(N=ee(A),s.substring(M+1+N,M+1+N+y)===n){if(T.push(s.substring(f,M).replace(j,u)),ne(M+1+N+y),k=s.indexOf(t,f),M=s.indexOf(u,f),S&&(ie(),p))return re();if(a&&C.length>=a)return re(!0);break}w.push({type:`Quotes`,code:`InvalidQuotes`,message:`Trailing quote on quoted field is malformed`,row:C.length,index:f}),M++}}else if(r&&T.length===0&&s.substring(f,f+b)===r){if(A===-1)return re();f=A+y,A=s.indexOf(n,f),k=s.indexOf(t,f)}else if(k!==-1&&(k<A||A===-1))T.push(s.substring(f,k)),f=k+v,k=s.indexOf(t,f);else{if(A===-1)break;if(T.push(s.substring(f,A)),ne(A+y),S&&(ie(),p))return re();if(a&&C.length>=a)return re(!0)}return te();function P(e){C.push(e),E=f}function ee(e){var t=0;return t=e!==-1&&(e=s.substring(M+1,e))&&e.trim()===``?e.length:t}function te(e){return g||(e===void 0&&(e=s.substring(f)),T.push(e),f=_,P(T),S&&ie()),re()}function ne(e){f=e,P(T),T=[],A=s.indexOf(n,f)}function re(r){if(e.header&&!h&&C.length&&!l){var i=C[0],a={},o=new Set(i);let t=!1;for(let n=0;n<i.length;n++){let r=i[n];if(a[r=x(e.transformHeader)?e.transformHeader(r,n):r]){let e,s=a[r];for(;e=r+`_`+s,s++,o.has(e););o.add(e),i[n]=e,a[r]++,t=!0,(c=c===null?{}:c)[e]=r}else a[r]=1,i[n]=r;o.add(r)}t&&console.warn(`Duplicate headers found and renamed.`),l=!0}return{data:C,errors:w,meta:{delimiter:t,linebreak:n,aborted:p,truncated:!!r,cursor:E+(h||0),renamedHeaders:c}}}function ie(){i(re()),C=[],w=[]}},this.abort=function(){p=!0},this.getCharIndex=function(){return f}}function g(e){var t=e.data,n=a[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,_(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(x(n.userStep)){for(var o=0;o<t.results.data.length&&(n.userStep({data:t.results.data[o],errors:t.results.errors,meta:t.results.meta},i),!r);o++);delete t.results}else x(n.userChunk)&&(n.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&_(t.workerId,t.results)}function _(e,t){var n=a[e];x(n.userComplete)&&n.userComplete(t),n.terminate(),delete a[e]}function v(){throw Error(`Not implemented.`)}function y(e){if(typeof e!=`object`||!e)return e;var t,n=Array.isArray(e)?[]:{};for(t in e)n[t]=y(e[t]);return n}function b(e,t){return function(){e.apply(t,arguments)}}function x(e){return typeof e==`function`}return s.parse=function(n,r){var i=(r||={}).dynamicTyping||!1;if(x(i)&&(r.dynamicTypingFunction=i,i={}),r.dynamicTyping=i,r.transform=!!x(r.transform)&&r.transform,!r.worker||!s.WORKERS_SUPPORTED)return i=null,s.NODE_STREAM_INPUT,typeof n==`string`?(n=(e=>e.charCodeAt(0)===65279?e.slice(1):e)(n),i=new(r.download?l:d)(r)):!0===n.readable&&x(n.read)&&x(n.on)?i=new f(r):(t.File&&n instanceof File||n instanceof Object)&&(i=new u(r)),i.stream(n);(i=(()=>{var n;return!!s.WORKERS_SUPPORTED&&(n=(()=>{var n=t.URL||t.webkitURL||null,r=e.toString();return s.BLOB_URL||=n.createObjectURL(new Blob([`var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; `,`(`,r,`)();`],{type:`text/javascript`}))})(),(n=new t.Worker(n)).onmessage=g,n.id=o++,a[n.id]=n)})()).userStep=r.step,i.userChunk=r.chunk,i.userComplete=r.complete,i.userError=r.error,r.step=x(r.step),r.chunk=x(r.chunk),r.complete=x(r.complete),r.error=x(r.error),delete r.worker,i.postMessage({input:n,config:r,workerId:i.id})},s.unparse=function(e,t){var n=!1,r=!0,i=`,`,a=`\r
|
|
168
|
+
`,o=`"`,c=o+o,l=!1,u=null,d=!1,f=((()=>{if(typeof t==`object`){if(typeof t.delimiter!=`string`||s.BAD_DELIMITERS.filter(function(e){return t.delimiter.indexOf(e)!==-1}).length||(i=t.delimiter),typeof t.quotes!=`boolean`&&typeof t.quotes!=`function`&&!Array.isArray(t.quotes)||(n=t.quotes),typeof t.skipEmptyLines!=`boolean`&&typeof t.skipEmptyLines!=`string`||(l=t.skipEmptyLines),typeof t.newline==`string`&&(a=t.newline),typeof t.quoteChar==`string`&&(o=t.quoteChar),typeof t.header==`boolean`&&(r=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw Error(`Option columns is empty`);u=t.columns}t.escapeChar!==void 0&&(c=t.escapeChar+o),t.escapeFormulae instanceof RegExp?d=t.escapeFormulae:typeof t.escapeFormulae==`boolean`&&t.escapeFormulae&&(d=/^[=+\-@\t\r].*$/)}})(),new RegExp(m(o),`g`));if(typeof e==`string`&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,l);if(typeof e[0]==`object`)return p(u||Object.keys(e[0]),e,l)}else if(typeof e==`object`)return typeof e.data==`string`&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||=e.meta&&e.meta.fields||u,e.fields||=Array.isArray(e.data[0])?e.fields:typeof e.data[0]==`object`?Object.keys(e.data[0]):[],Array.isArray(e.data[0])||typeof e.data[0]==`object`||(e.data=[e.data])),p(e.fields||[],e.data||[],l);throw Error(`Unable to serialize unrecognized input`);function p(e,t,n){var o=``,s=(typeof e==`string`&&(e=JSON.parse(e)),typeof t==`string`&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),c=!Array.isArray(t[0]);if(s&&r){for(var l=0;l<e.length;l++)0<l&&(o+=i),o+=h(e[l],l);0<t.length&&(o+=a)}for(var u=0;u<t.length;u++){var d=(s?e:t[u]).length,f=!1,p=s?Object.keys(t[u]).length===0:t[u].length===0;if(n&&!s&&(f=n===`greedy`?t[u].join(``).trim()===``:t[u].length===1&&t[u][0].length===0),n===`greedy`&&s){for(var m=[],g=0;g<d;g++){var _=c?e[g]:g;m.push(t[u][_])}f=m.join(``).trim()===``}if(!f){for(var v=0;v<d;v++){0<v&&!p&&(o+=i);var y=s&&c?e[v]:v;o+=h(t[u][y],v)}u<t.length-1&&(!n||0<d&&!p)&&(o+=a)}}return o}function h(e,t){var r,a;return e==null?``:e.constructor===Date?JSON.stringify(e).slice(1,25):(a=!1,d&&typeof e==`string`&&d.test(e)&&(e=`'`+e,a=!0),r=e.toString().replace(f,c),(a=a||!0===n||typeof n==`function`&&n(e,t)||Array.isArray(n)&&n[t]||((e,t)=>{for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1})(r,s.BAD_DELIMITERS)||-1<r.indexOf(i)||r.charAt(0)===` `||r.charAt(r.length-1)===` `)?o+r+o:r)}},s.RECORD_SEP=``,s.UNIT_SEP=``,s.BYTE_ORDER_MARK=``,s.BAD_DELIMITERS=[`\r`,`
|
|
169
|
+
`,`"`,s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!r&&!!t.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=`,`,s.Parser=h,s.ParserHandle=p,s.NetworkStreamer=l,s.FileStreamer=u,s.StringStreamer=d,s.ReadableStreamStreamer=f,t.jQuery&&((n=t.jQuery).fn.parse=function(e){var r=e.config||{},i=[];return this.each(function(e){if(!(n(this).prop(`tagName`).toUpperCase()===`INPUT`&&n(this).attr(`type`).toLowerCase()===`file`&&t.FileReader)||!this.files||this.files.length===0)return!0;for(var a=0;a<this.files.length;a++)i.push({file:this.files[a],inputElem:this,instanceConfig:n.extend({},r)})}),a(),this;function a(){if(i.length===0)x(e.complete)&&e.complete();else{var t,r,a,c,l=i[0];if(x(e.before)){var u=e.before(l.file,l.inputElem);if(typeof u==`object`){if(u.action===`abort`)return t=`AbortError`,r=l.file,a=l.inputElem,c=u.reason,void(x(e.error)&&e.error({name:t},r,a,c));if(u.action===`skip`)return void o();typeof u.config==`object`&&(l.instanceConfig=n.extend(l.instanceConfig,u.config))}else if(u===`skip`)return void o()}var d=l.instanceConfig.complete;l.instanceConfig.complete=function(e){x(d)&&d(e,l.file,l.inputElem),o()},s.parse(l.file,l.instanceConfig)}}function o(){i.splice(0,1),a()}}),i&&(t.onmessage=function(e){e=e.data,s.WORKER_ID===void 0&&e&&(s.WORKER_ID=e.workerId),typeof e.input==`string`?t.postMessage({workerId:s.WORKER_ID,results:s.parse(e.input,e.config),finished:!0}):(t.File&&e.input instanceof File||e.input instanceof Object)&&(e=s.parse(e.input,e.config))&&t.postMessage({workerId:s.WORKER_ID,results:e,finished:!0})}),(l.prototype=Object.create(c.prototype)).constructor=l,(u.prototype=Object.create(c.prototype)).constructor=u,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,s})})),oS=u(aS()),sS=u(iS());const cS=(e,t,n)=>e>=t-n,lS=e=>!!e&&e!==Ux&&e.trim()!==``,uS=(e,t,n,r,i,a,o)=>{let s=[],c=r.filter(e=>e.optionalColumn).length,l=r.length,u=c?`${l-c} or ${l}`:`${l}`,d=i&&a?2:i||a?1:0;if(i&&!cS(e.length,l,c)&&s.push(o(`incorrectNumberOfFieldNameHeaderColumns`,{expectedLengthMessage:u})),a){let e=r.filter(e=>Array.isArray(e.validUnits)&&e.validUnits.some(lS)).length,n=t.filter(lS).length,i=r.filter(e=>e.optionalColumn||!e.validUnits||e.validUnits.includes(Ux)).length;cS(n,e,i)||s.push(o(`incorrectNumberOfUnitHeaderColumns`,{expectedLengthMessage:u}))}return n.length===0?s.push(o(`incorrectNumberOfDataColumns`,{expectedLengthMessage:u,dataRowStartIndex:d})):n.forEach((e,t)=>{cS(e.length,l,c)||s.push(o(`incorrectNumberOfDataColumns`,{expectedLengthMessage:u,dataRowStartIndex:d+t}))}),s},dS=e=>e.toUpperCase().replace(/\(.*?\)/g,``).replace(/[^A-Z0-9]/g,``).trim(),fS=({value:e,defaultAllowedValues:t})=>{let n=dS(e);return t?.some(e=>dS(e).includes(n)||n.includes(dS(e)))??!1},pS=({value:e,defaultAllowedValues:t})=>t?.includes(e)??!1,mS=(e,t,n,r,i,a)=>{let o=[];if(r){let r=n.map(e=>e.fieldName).filter(Boolean);e.forEach((i,s)=>{let c=n[s];if(!c||!c?.fieldName)return;let l=n[s]?.fieldNameValidator??fS;l({value:i,defaultAllowedValues:r,columnIndex:s,fields:e,units:t})||o.push(a(`incorrectFieldName`,{i:s+1,correctName:n[s]?.fieldName||a(`notExist`),wrongName:i||a(`notApplicable`)}))})}if(i){let i=n.map(e=>e?.validUnits),s=r?1:0;t.forEach((r,c)=>{let l=n[c];if(!l)return;let u=l.unitsValidator??pS,d=i[c];u({value:r,defaultAllowedValues:d,columnIndex:c,fields:e,units:t})||o.push(a(`incorrectUnitRow`,{unitRowIndex:s,i:c+1,wrongUnit:r||a(`notApplicable`),correctUnit:d?.join(`,`)||a(`notExist`)}))})}return o},hS=(e,t,n)=>{let r=[];return e.forEach((e,i)=>{e.forEach((e,a)=>{let o=t[a];if(!o||!o.validator)return;let s=o.validator(e);s&&typeof s==`string`&&r.push(`${s} ${n(`rowColumn`,{rowIndex:i+2,columnIndex:a})}`)})}),r},gS=(e,t,n,r,i,a,o)=>{let s=uS(e,t,n,r,i,a,o);return s.length===0&&(s=s.concat(mS(e,t,r,i,a,o),hS(n,r,o))),{isValid:s.length===0,errors:s}},_S=(e,t,n)=>{let r=e=>e.replace(/,/g,`.`),i=e[0]?.some(e=>isNaN(Number(r(e))))??!1,a=e[1]?.some(e=>isNaN(Number(r(e))))??!1,o=e[0]?.some(e=>t.includes(e))??!1,s=e[0]?.some(e=>n.includes(e))??!1,c=e[1]?.some(e=>n.includes(e))??!1,l=e[0]?.some(e=>!isNaN(Number(r(e))))??!1,u=e[1]?.some(e=>!isNaN(Number(r(e))))??!1,d=o||i&&!s&&!l||i&&a&&!l,f=s||c||i&&a&&!s&&!l&&!u||i&&a&&!l&&!u;return{hasFieldNameHeader:d,hasUnitHeader:f}},vS=(e,{validationRules:t})=>{let n=t.length===(e[0]?.length??0),r=n?t:t.filter(e=>!e.optionalColumn),i=r.map(e=>e.fieldName),a=r.map(e=>e.defaultUnit??e.validUnits?.[0]??``),o=r.map(e=>e.validUnits).filter(e=>!!e).flat(),{hasFieldNameHeader:s,hasUnitHeader:c}=_S(e,i,o);return s||e.unshift(i),c||e.splice(1,0,a),{hasFieldNameHeader:s,hasUnitHeader:c}},yS=e=>Math.round(e*100)/100,bS=e=>e.join(`, `).replace(/,\s*$/,``),koe=e=>{let t=e.substring(0,200),n=(t.match(/\t/g)??[]).length,r=(t.match(/;/g)??[]).length;return n===0&&r===0?`,`:n>r?` `:`;`},xS={skipEmptyLines:!0,transform:e=>e?.trim(),delimiter:koe},SS=[`text/csv`,`text/plain`,`application/json`,`application/vnd.ms-excel`],CS=e=>SS.includes(e.type),wS=e=>e instanceof File,TS=e=>e.trim().startsWith(`[`),ES=e=>{try{return!!JSON.parse(e)?.path}catch{return!1}},DS=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result)),r.onerror=n,r.readAsText(e)}),OS=async(e,t,n)=>{try{let r=JSON.parse(e);return FS({data:r,errors:[]},t,n)}catch(e){throw Error(`${n(`jsonParseFailed`)} ${e.message}`)}},kS=async(e,t,n)=>{try{let r=JSON.parse(e),i=r.path.map(e=>[yS(e.md),yS(e.inclination),yS(e.gridAzimuth)]);return i.unshift([`m`,`deg`,`deg`]),FS({data:i,errors:[]},t,n)}catch(e){throw Error(`${n(`jsonParseFailed`)} ${e.message}`)}},AS=e=>e.replace(`,`,`.`),jS=e=>e.map(e=>e.map(e=>AS(e))),MS=(e,{importLimit:t,...n},r)=>new Promise(i=>{oS.default.parse(e,{...xS,preview:t,complete:e=>{let a=FS(e,{importLimit:t,...n},r);a.rows=jS(a.rows),i(a)}})}),NS=async(e,t,n)=>{let r={isValid:!1,fields:[],units:[],rows:[],errors:[]};try{if(wS(e)&&!CS(e))return r.errors.push(`${n(`wrongFileFormatExpectedOneOf`)} ${bS(Array.from(SS))}`),r;let i=wS(e)?await DS(e):e;return TS(i)?await OS(i,t,n):ES(i)?await kS(i,t,n):await MS(e,t,n)}catch(e){return r.errors.push(e.message),r}},PS=(e,t,n,r)=>{let i=r?.delimiter??`,`,a=[e,t,...n].filter(Boolean);return oS.default.unparse(a,{quotes:!1,header:!0,delimiter:i})},FS=(e,t,n)=>{let{data:r,errors:i}=e,a={isValid:!1,fields:[],units:[],rows:[],errors:i.map(e=>e.message)};if(i.length>0)return a;let{hasFieldNameHeader:o,hasUnitHeader:s}=vS(r,t);a.fields=r[0].map(e=>e.trim()),a.units=r[1].map(e=>e.trim()).filter(Boolean),a.rows=r.slice(2);let{validationRules:c}=t;if(c.length){let{isValid:e,errors:t}=gS(a.fields,a.units,a.rows,c,o,s,n);a.errors.push(...t),a.isValid=e&&t.length===0}else a.isValid=a.errors.length===0;return a};function IS(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=IS(e[t]))&&(r&&(r+=` `),r+=n);else for(t in e)e[t]&&(r&&(r+=` `),r+=t);return r}function LS(){for(var e,t,n=0,r=``;n<arguments.length;)(e=arguments[n++])&&(t=IS(e))&&(r&&(r+=` `),r+=t);return r}var RS=LS;const zS=e=>typeof e==`number`&&!isNaN(e),BS=e=>typeof e==`string`,VS=e=>typeof e==`function`,HS=e=>BS(e)||VS(e)?e:null,US=e=>(0,f.isValidElement)(e)||BS(e)||VS(e)||zS(e);function WS(e,t,n){n===void 0&&(n=300);let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight=`initial`,i.height=r+`px`,i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height=`0`,i.padding=`0`,i.margin=`0`,setTimeout(t,n)})})}function GS(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}=e;return function(e){let{children:o,position:s,preventExitTransition:c,done:l,nodeRef:u,isIn:d}=e,p=r?`${t}--${s}`:t,m=r?`${n}--${s}`:n,h=(0,f.useRef)(0);return(0,f.useLayoutEffect)(()=>{let e=u.current,t=p.split(` `),n=r=>{r.target===u.current&&(e.dispatchEvent(new Event(`d`)),e.removeEventListener(`animationend`,n),e.removeEventListener(`animationcancel`,n),h.current===0&&r.type!==`animationcancel`&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener(`animationend`,n),e.addEventListener(`animationcancel`,n)},[]),(0,f.useEffect)(()=>{let e=u.current,t=()=>{e.removeEventListener(`animationend`,t),i?WS(e,l,a):l()};d||(c?t():(h.current=1,e.className+=` ${m}`,e.addEventListener(`animationend`,t)))},[d]),f.default.createElement(f.default.Fragment,null,o)}}function KS(e,t){return e==null?{}:{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}}const qS={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){let n=this.list.get(e).filter(e=>e!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){let t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{let n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},JS=e=>{let{theme:t,type:n,...r}=e;return f.default.createElement(`svg`,{viewBox:`0 0 24 24`,width:`100%`,height:`100%`,fill:t===`colored`?`currentColor`:`var(--toastify-icon-color-${n})`,...r})},YS={info:function(e){return f.default.createElement(JS,{...e},f.default.createElement(`path`,{d:`M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z`}))},warning:function(e){return f.default.createElement(JS,{...e},f.default.createElement(`path`,{d:`M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z`}))},success:function(e){return f.default.createElement(JS,{...e},f.default.createElement(`path`,{d:`M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z`}))},error:function(e){return f.default.createElement(JS,{...e},f.default.createElement(`path`,{d:`M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z`}))},spinner:function(){return f.default.createElement(`div`,{className:`Toastify__spinner`})}};function XS(e){let[,t]=(0,f.useReducer)(e=>e+1,0),[n,r]=(0,f.useState)([]),i=(0,f.useRef)(null),a=(0,f.useRef)(new Map).current,o=e=>n.indexOf(e)!==-1,s=(0,f.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:o,getToast:e=>a.get(e)}).current;function c(e){let{containerId:t}=e,{limit:n}=s.props;!n||t&&s.containerId!==t||(s.count-=s.queue.length,s.queue=[])}function l(e){r(t=>e==null?[]:t.filter(t=>t!==e))}function u(){let{toastContent:e,toastProps:t,staleId:n}=s.queue.shift();p(e,t,n)}function d(e,n){let{delay:r,staleId:o,...c}=n;if(!US(e)||function(e){return!i.current||s.props.enableMultiContainer&&e.containerId!==s.props.containerId||a.has(e.toastId)&&e.updateId==null}(c))return;let{toastId:d,updateId:m,data:h}=c,{props:g}=s,_=()=>l(d),v=m==null;v&&s.count++;let y={...g,style:g.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(c).filter(e=>{let[t,n]=e;return n!=null})),toastId:d,updateId:m,data:h,closeToast:_,isIn:!1,className:HS(c.className||g.toastClassName),bodyClassName:HS(c.bodyClassName||g.bodyClassName),progressClassName:HS(c.progressClassName||g.progressClassName),autoClose:!c.isLoading&&(b=c.autoClose,x=g.autoClose,!1===b||zS(b)&&b>0?b:x),deleteToast(){let e=KS(a.get(d),`removed`);a.delete(d),qS.emit(4,e);let n=s.queue.length;if(s.count=d==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),n>0){let e=d==null?s.props.limit:1;if(n===1||e===1)s.displayedToast++,u();else{let t=e>n?n:e;s.displayedToast=t;for(let e=0;e<t;e++)u()}}else t()}};var b,x;y.iconOut=function(e){let{theme:t,type:n,isLoading:r,icon:i}=e,a=null,o={theme:t,type:n};return!1===i||(VS(i)?a=i(o):(0,f.isValidElement)(i)?a=(0,f.cloneElement)(i,o):BS(i)||zS(i)?a=i:r?a=YS.spinner():(e=>e in YS)(n)&&(a=YS[n](o))),a}(y),VS(c.onOpen)&&(y.onOpen=c.onOpen),VS(c.onClose)&&(y.onClose=c.onClose),y.closeButton=g.closeButton,!1===c.closeButton||US(c.closeButton)?y.closeButton=c.closeButton:!0===c.closeButton&&(y.closeButton=!US(g.closeButton)||g.closeButton);let S=e;(0,f.isValidElement)(e)&&!BS(e.type)?S=(0,f.cloneElement)(e,{closeToast:_,toastProps:y,data:h}):VS(e)&&(S=e({closeToast:_,toastProps:y,data:h})),g.limit&&g.limit>0&&s.count>g.limit&&v?s.queue.push({toastContent:S,toastProps:y,staleId:o}):zS(r)?setTimeout(()=>{p(S,y,o)},r):p(S,y,o)}function p(e,t,n){let{toastId:i}=t;n&&a.delete(n);let o={content:e,props:t};a.set(i,o),r(e=>[...e,i].filter(e=>e!==n)),qS.emit(4,KS(o,o.props.updateId==null?`added`:`updated`))}return(0,f.useEffect)(()=>(s.containerId=e.containerId,qS.cancelEmit(3).on(0,d).on(1,e=>i.current&&l(e)).on(5,c).emit(2,s),()=>{a.clear(),qS.emit(3,s)}),[]),(0,f.useEffect)(()=>{s.props=e,s.isToastActive=o,s.displayedToast=n.length}),{getToastToRender:function(t){let n=new Map,r=Array.from(a.values());return e.newestOnTop&&r.reverse(),r.forEach(e=>{let{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,e=>t(e[0],e[1]))},containerRef:i,isToastActive:o}}function ZS(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function QS(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function $S(e){let[t,n]=(0,f.useState)(!1),[r,i]=(0,f.useState)(!1),a=(0,f.useRef)(null),o=(0,f.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=(0,f.useRef)(e),{autoClose:c,pauseOnHover:l,closeToast:u,onClick:d,closeOnClick:p}=e;function m(t){if(e.draggable){t.nativeEvent.type===`touchstart`&&t.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener(`mousemove`,v),document.addEventListener(`mouseup`,y),document.addEventListener(`touchmove`,v),document.addEventListener(`touchend`,y);let n=a.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=n.getBoundingClientRect(),n.style.transition=``,o.x=ZS(t.nativeEvent),o.y=QS(t.nativeEvent),e.draggableDirection===`x`?(o.start=o.x,o.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=n.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(t){if(o.boundingRect){let{top:n,bottom:r,left:i,right:a}=o.boundingRect;t.nativeEvent.type!==`touchend`&&e.pauseOnHover&&o.x>=i&&o.x<=a&&o.y>=n&&o.y<=r?_():g()}}function g(){n(!0)}function _(){n(!1)}function v(n){let r=a.current;o.canDrag&&r&&(o.didMove=!0,t&&_(),o.x=ZS(n),o.y=QS(n),o.delta=e.draggableDirection===`x`?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),r.style.transform=`translate${e.draggableDirection}(${o.delta}px)`,r.style.opacity=``+(1-Math.abs(o.delta/o.removalDistance)))}function y(){document.removeEventListener(`mousemove`,v),document.removeEventListener(`mouseup`,y),document.removeEventListener(`touchmove`,v),document.removeEventListener(`touchend`,y);let t=a.current;if(o.canDrag&&o.didMove&&t){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),void e.closeToast();t.style.transition=`transform 0.2s, opacity 0.2s`,t.style.transform=`translate${e.draggableDirection}(0)`,t.style.opacity=`1`}}(0,f.useEffect)(()=>{s.current=e}),(0,f.useEffect)(()=>(a.current&&a.current.addEventListener(`d`,g,{once:!0}),VS(e.onOpen)&&e.onOpen((0,f.isValidElement)(e.children)&&e.children.props),()=>{let e=s.current;VS(e.onClose)&&e.onClose((0,f.isValidElement)(e.children)&&e.children.props)}),[]),(0,f.useEffect)(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||_(),window.addEventListener(`focus`,g),window.addEventListener(`blur`,_)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener(`focus`,g),window.removeEventListener(`blur`,_))}),[e.pauseOnFocusLoss]);let b={onMouseDown:m,onTouchStart:m,onMouseUp:h,onTouchEnd:h};return c&&l&&(b.onMouseEnter=_,b.onMouseLeave=g),p&&(b.onClick=e=>{d&&d(e),o.canCloseOnClick&&u()}),{playToast:g,pauseToast:_,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:b}}function eC(e){let{closeToast:t,theme:n,ariaLabel:r=`close`}=e;return f.default.createElement(`button`,{className:`Toastify__close-button Toastify__close-button--${n}`,type:`button`,onClick:e=>{e.stopPropagation(),t(e)},"aria-label":r},f.default.createElement(`svg`,{"aria-hidden":`true`,viewBox:`0 0 14 16`},f.default.createElement(`path`,{fillRule:`evenodd`,d:`M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z`})))}function tC(e){let{delay:t,isRunning:n,closeToast:r,type:i=`default`,hide:a,className:o,style:s,controlledProgress:c,progress:l,rtl:u,isIn:d,theme:p}=e,m=a||c&&l===0,h={...s,animationDuration:`${t}ms`,animationPlayState:n?`running`:`paused`,opacity:m?0:1};c&&(h.transform=`scaleX(${l})`);let g=RS(`Toastify__progress-bar`,c?`Toastify__progress-bar--controlled`:`Toastify__progress-bar--animated`,`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":u}),_=VS(o)?o({rtl:u,type:i,defaultClassName:g}):RS(g,o);return f.default.createElement(`div`,{role:`progressbar`,"aria-hidden":m?`true`:`false`,"aria-label":`notification timer`,className:_,style:h,[c&&l>=1?`onTransitionEnd`:`onAnimationEnd`]:c&&l<1?null:()=>{d&&r()}})}const nC=e=>{let{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i}=$S(e),{closeButton:a,children:o,autoClose:s,onClick:c,type:l,hideProgressBar:u,closeToast:d,transition:p,position:m,className:h,style:g,bodyClassName:_,bodyStyle:v,progressClassName:y,progressStyle:b,updateId:x,role:S,progress:C,rtl:w,toastId:T,deleteToast:E,isIn:D,isLoading:O,iconOut:k,closeOnClick:A,theme:j}=e,M=RS(`Toastify__toast`,`Toastify__toast-theme--${j}`,`Toastify__toast--${l}`,{"Toastify__toast--rtl":w},{"Toastify__toast--close-on-click":A}),N=VS(h)?h({rtl:w,position:m,type:l,defaultClassName:M}):RS(M,h),P=!!C||!s,ee={closeToast:d,type:l,theme:j},te=null;return!1===a||(te=VS(a)?a(ee):(0,f.isValidElement)(a)?(0,f.cloneElement)(a,ee):eC(ee)),f.default.createElement(p,{isIn:D,done:E,position:m,preventExitTransition:n,nodeRef:r},f.default.createElement(`div`,{id:T,onClick:c,className:N,...i,style:g,ref:r},f.default.createElement(`div`,{...D&&{role:S},className:VS(_)?_({type:l}):RS(`Toastify__toast-body`,_),style:v},k!=null&&f.default.createElement(`div`,{className:RS(`Toastify__toast-icon`,{"Toastify--animate-icon Toastify__zoom-enter":!O})},k),f.default.createElement(`div`,null,o)),te,f.default.createElement(tC,{...x&&!P?{key:`pb-${x}`}:{},rtl:w,theme:j,delay:s,isRunning:t,isIn:D,closeToast:d,hide:u,type:l,style:b,className:y,controlledProgress:P,progress:C||0})))},rC=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},iC=GS(rC(`bounce`,!0)),aC=GS(rC(`slide`,!0)),Aoe=GS(rC(`zoom`)),joe=GS(rC(`flip`)),oC=(0,f.forwardRef)((e,t)=>{let{getToastToRender:n,containerRef:r,isToastActive:i}=XS(e),{className:a,style:o,rtl:s,containerId:c}=e;function l(e){let t=RS(`Toastify__toast-container`,`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":s});return VS(a)?a({position:e,rtl:s,defaultClassName:t}):RS(t,HS(a))}return(0,f.useEffect)(()=>{t&&(t.current=r.current)},[]),f.default.createElement(`div`,{ref:r,className:`Toastify`,id:c},n((e,t)=>{let n=t.length?{...o}:{...o,pointerEvents:`none`};return f.default.createElement(`div`,{className:l(e),style:n,key:`container-${e}`},t.map((e,n)=>{let{content:r,props:a}=e;return f.default.createElement(nC,{...a,isIn:i(a.toastId),style:{...a.style,"--nth":n+1,"--len":t.length},key:`toast-${a.key}`},r)}))}))});oC.displayName=`ToastContainer`,oC.defaultProps={position:`top-right`,transition:iC,autoClose:5e3,closeButton:eC,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:`x`,role:`alert`,theme:`light`};let sC,cC=new Map,lC=[],uC=1;function dC(){return``+ uC++}function fC(e){return e&&(BS(e.toastId)||zS(e.toastId))?e.toastId:dC()}function pC(e,t){return cC.size>0?qS.emit(0,e,t):lC.push({content:e,options:t}),t.toastId}function mC(e,t){return{...t,type:t&&t.type||e,toastId:fC(t)}}function hC(e){return(t,n)=>pC(t,mC(e,n))}function gC(e,t){return pC(e,mC(`default`,t))}gC.loading=(e,t)=>pC(e,mC(`default`,{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),gC.promise=function(e,t,n){let r,{pending:i,error:a,success:o}=t;i&&(r=BS(i)?gC.loading(i,n):gC.loading(i.render,{...n,...i}));let s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(e,t,i)=>{if(t==null)return void gC.dismiss(r);let a={type:e,...s,...n,data:i},o=BS(t)?{render:t}:t;return r?gC.update(r,{...a,...o}):gC(o.render,{...a,...o}),i},l=VS(e)?e():e;return l.then(e=>c(`success`,o,e)).catch(e=>c(`error`,a,e)),l},gC.success=hC(`success`),gC.info=hC(`info`),gC.error=hC(`error`),gC.warning=hC(`warning`),gC.warn=gC.warning,gC.dark=(e,t)=>pC(e,mC(`default`,{theme:`dark`,...t})),gC.dismiss=e=>{cC.size>0?qS.emit(1,e):lC=lC.filter(t=>e!=null&&t.options.toastId!==e)},gC.clearWaitingQueue=function(e){return e===void 0&&(e={}),qS.emit(5,e)},gC.isActive=e=>{let t=!1;return cC.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},gC.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{let n=function(e,t){let{containerId:n}=t,r=cC.get(n||sC);return r&&r.getToast(e)}(e,t);if(n){let{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:dC()};a.toastId!==e&&(a.staleId=e);let o=a.render||i;delete a.render,pC(o,a)}},0)},gC.done=e=>{gC.update(e,{progress:1})},gC.onChange=e=>(qS.on(4,e),()=>{qS.off(4,e)}),gC.POSITION={TOP_LEFT:`top-left`,TOP_RIGHT:`top-right`,TOP_CENTER:`top-center`,BOTTOM_LEFT:`bottom-left`,BOTTOM_RIGHT:`bottom-right`,BOTTOM_CENTER:`bottom-center`},gC.TYPE={INFO:`info`,SUCCESS:`success`,WARNING:`warning`,ERROR:`error`,DEFAULT:`default`},qS.on(2,e=>{sC=e.containerId||e,cC.set(sC,e),lC.forEach(e=>{qS.emit(0,e.content,e.options)}),lC=[]}).on(3,e=>{cC.delete(e.containerId||e),cC.size===0&&qS.off(0).off(1).off(5)});const _C=({id:e,message:t={type:ih.INFO,content:``},autoClose:n=6e3,onClose:r})=>{let{type:i=ih.INFO}=t??{},a=({closeToast:t})=>(0,p.jsx)(sh,{type:i,onClose:t,isInToast:!0,testId:e===void 0?void 0:e.toString()+`-dismiss`}),o=(0,p.jsx)(fh,{message:{...t,visible:!0,width:`100%`,maxHeight:`500px`,withDismiss:!1}}),s=(()=>{switch(t?.type){case ih.SUCCESS:return gC.TYPE.SUCCESS;case ih.WARNING:return gC.TYPE.WARNING;case ih.ERROR:return gC.TYPE.ERROR;default:return gC.TYPE.INFO}})();return e!==void 0&&gC.isActive(e)?gC.update(e,{render:o,autoClose:n,onClose:r,type:s}):gC(o,{toastId:e,autoClose:n,onClose:r,hideProgressBar:n===!1,icon:!1,closeOnClick:!1,pauseOnHover:!0,draggable:!1,closeButton:a,transition:aC,type:s})},Moe=e=>{gC.dismiss(e)},vC=(e,t)=>{t(()=>{_C({...e})})},Noe=`_toggle_1c9wf_9`,Poe=`_small_1c9wf_25`,Foe=`_disabled_1c9wf_102`,Ioe=`_noMargin_1c9wf_110`,Loe=`_helpIconEnabled_1c9wf_113`;var yC={toggle:`_toggle_1c9wf_9`,small:`_small_1c9wf_25`,disabled:`_disabled_1c9wf_102`,noMargin:`_noMargin_1c9wf_110`,helpIconEnabled:`_helpIconEnabled_1c9wf_113`},Roe=u(h());const bC=({name:e,label:t,checked:n=!1,disabled:r,display:i,small:a=!1,onChange:o,noMargin:s=!1,testId:c,helpText:l,onClickHelp:u})=>{let d=(0,f.useContext)(Ie),m=l||u,h=r||d;return(0,p.jsxs)(`div`,{className:(0,Roe.default)(yC.toggle,h?yC.disabled:null,a?yC.small:null,s?yC.noMargin:null),style:{display:i},onClick:t=>{h||(t.target.name=e,t.target.checked=!n,t.target.value=!n,o(t))},"data-testid":c,children:[(0,p.jsx)(`input`,{type:w.CHECKBOX,name:e,value:n?.toString(),disabled:h,checked:n,onChange:()=>{}}),(0,p.jsx)(`label`,{children:t}),m&&(0,p.jsx)(`div`,{className:yC.helpIconEnabled,onClick:u,children:(0,p.jsx)(Ea,{text:l})})]})},zoe=({config:e,state:t,updateState:n,setModalVisibility:r,onCloseModal:i,readAndParseInput:a,validationRules:o=[],onCompleteImport:s=()=>{},prevalidationConfig:c,t:l,loading:u,startTransition:d,testId:m})=>{let{modalVisibility:{reviewPasteModal:h,pasteModalHelpVisible:g,helpModal:_}}=t,{warningMessage:v,actionButtonLabel:y,changeRulesAction:b,checkPrevalidationNeed:x}=c??{},S=(0,f.useRef)(null),[C,w]=(0,f.useState)(!1),[T,E]=(0,f.useState)({pastedText:``,parsedResult:{isValid:!1,fields:[],rows:[],units:[],errors:[]}});yp(`v`,async()=>{let e=await a({showSuccessToast:!1});e&&E(e)},[a],{ctrl:!0,meta:!0});let D=(0,f.useCallback)(t=>{if(t){let t=(0,sS.SimplifyAP)(M?.rows?.map(([e,t])=>[Number(e),Number(t)]),.001).map(([e,t])=>[e.toString(),t.toString()]),n=e.importLimit??Wx,r={validationRules:o,importLimit:n},i=M.fields.slice(0,2),a=(M.units??[]).slice(0,2),s=PS(i,a,t,r);d(()=>E({parsedResult:{...M,rows:t},pastedText:s})),S.current=T}else d(()=>{S.current&&E(S.current)});w(t)},[T,n,o]),O=()=>{E({pastedText:``,parsedResult:{isValid:!1,fields:[],rows:[],units:[],errors:[]}})},k=()=>{r(`helpModal`,!_)},A=()=>{n(T),s(T.parsedResult),i(),vC({message:{type:`Success`,content:l(`pasteSuccessful`)}},d)},{pastedText:j,parsedResult:M}=T,N=x&&x(M),{isValid:P,errors:ee}=M,te=ee.length,ne=j===``,re=eS(j),ie=$x(j),ae=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{className:nh.headerContainer,children:[(0,p.jsx)(ya,{text:l(`downsampleTooltip`),children:(0,p.jsx)(bC,{label:l(`downsampled`),checked:C,onChange:()=>D(!C),disabled:ne||!P})}),(0,p.jsx)(ya,{text:l(`deletePastedContent`),children:(0,p.jsx)(_o,{name:`clearReview`,icon:`delete`,small:!0,onClick:O})}),(0,p.jsx)(ya,{text:l(`openHelp`),children:(0,p.jsx)(_o,{name:`help`,icon:`help`,small:!0,onClick:k})})]}),g&&(0,p.jsx)(eh,{validationRules:o,t:l}),ne?(0,p.jsx)(`div`,{className:nh.resultContainer,children:(0,p.jsx)(Qx,{text:null,children:(0,p.jsxs)(`div`,{className:nh.emptyState,children:[(0,p.jsx)(`p`,{className:nh.emptyMainText,children:l(`noDataPastedYet`)}),(0,p.jsxs)(`p`,{className:nh.emptyHint,children:[`(`,l(`pasteShortcutHint`),`)`]}),(0,p.jsx)(_o,{name:`paste`,icon:`paste`,label:l(`pasteFromClipboard`),small:!0,onClick:async()=>{let e=await a({showSuccessToast:!1});e&&E(e)},colored:!0,loading:u,testId:`${m}-paste-from-clipboard-button`})]})})}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{className:nh.messagesContainer,children:[te?(0,p.jsx)(Xx,{errors:ee,t:l}):null,re&&(0,p.jsx)(Yd,{muted:!0,children:l(`commasAsDecimals`)}),ie&&(0,p.jsx)(fh,{message:{visible:!0,icon:!0,width:`100%`,content:l(`extraSeparators`),type:`Warning`}}),N&&(0,p.jsx)(fh,{message:{visible:!0,icon:!0,width:`100%`,content:v,type:`Warning`}})]}),(0,p.jsx)(qx,{validationRules:o,parsedResult:M,updateState:e=>E(t=>({...t,...e}))})]})]});return(0,p.jsx)(Tp,{visible:h,centered:!0,children:(0,p.jsx)(vf,{dialog:{width:`60vw`,height:`650px`,scroll:!0,heading:l(`pasteWithReviewRoundBrackets`),content:(0,p.jsx)(`div`,{className:nh.modalContent,children:ae}),footer:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(_o,{label:l(`okay`),colored:!0,onClick:()=>d(()=>A()),disabled:ne||!P,loading:u,testId:`${m}-paste-with-review-modal-button-okay`}),(0,p.jsx)(_o,{label:l(`cancel`),onClick:()=>i()}),N&&(0,p.jsx)(_o,{label:y,onClick:b})]}),onClose:i}})})},Boe=({modals:e=[],modalVisibility:t,onCloseModal:n,testId:r})=>e.length?(0,p.jsx)(p.Fragment,{children:e.map(({name:e,component:i,props:a={}})=>(0,p.jsx)(f.Fragment,{children:(0,p.jsx)(i,{testId:`${r}-modal-render-${e}`,visible:t?.[e]??!1,onClose:()=>n({name:e}),...a})},e))}):null,Voe=({sections:e,iconName:t,testId:n,tooltip:r})=>(0,p.jsx)(Us,{loading:!0,menu:{component:(0,p.jsx)(_o,{basic:!0,icon:t,colored:`muted`,round:!0,small:!0,tooltip:r}),trigger:`Component`,small:!0,sections:e},testId:n}),xC=(e,t,n)=>(0,f.useCallback)(async()=>{if(n)try{return await n()}catch(t){console.error(`beforeExportData failed`,t),_C({message:{type:`Error`,content:e(`unableToPrepareExportData`)}});return}return t},[t,n]);var SC=s(((exports,t)=>{var n=typeof Reflect<`u`?Reflect.construct:void 0,r=Object.defineProperty,i=Error.captureStackTrace;i===void 0&&(i=function(e){var t=Error();r(e,`stack`,{configurable:!0,get:function(){var e=t.stack;return r(this,`stack`,{configurable:!0,value:e,writable:!0}),e},set:function(t){r(e,`stack`,{configurable:!0,value:t,writable:!0})}})});function a(e){e!==void 0&&r(this,`message`,{configurable:!0,value:e,writable:!0});var t=this.constructor.name;t!==void 0&&t!==this.name&&r(this,`name`,{configurable:!0,value:t,writable:!0}),i(this,this.constructor)}a.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:a,writable:!0}});var o=(function(){function e(e,t){return r(e,`name`,{configurable:!0,value:t})}try{var t=function(){};if(e(t,`foo`),t.name===`foo`)return e}catch{}})();function s(e,t){if(t==null||t===Error)t=a;else if(typeof t!=`function`)throw TypeError(`super_ should be a function`);var r;if(typeof e==`string`)r=e,e=n===void 0?function(){t.apply(this,arguments)}:function(){return n(t,arguments,this.constructor)},o!==void 0&&(o(e,r),r=void 0);else if(typeof e!=`function`)throw TypeError(`constructor should be either a string or a function`);e.super_=e.super=t;var i={constructor:{configurable:!0,value:e,writable:!0}};return r!==void 0&&(i.name={configurable:!0,value:r,writable:!0}),e.prototype=Object.create(t.prototype,i),e}exports=t.exports=s,exports.BaseError=a})),CC=`ProseMirror-selectednode`,Hoe=`.${CC}`,wC=``,TC=`\0`,EC=`__state_override__`,Uoe={LastNodeCompatible:`lastNodeCompatible`,FormattingMark:`formattingMark`,FormattingNode:`formattingNode`,NodeCursor:`nodeCursor`,FontStyle:`fontStyle`,Link:`link`,Color:`color`,Alignment:`alignment`,Indentation:`indentation`,Behavior:`behavior`,Code:`code`,InlineNode:`inline`,ListContainerNode:`listContainer`,ListItemNode:`listItemNode`,Block:`block`,BlockNode:`block`,TextBlock:`textBlock`,ExcludeInputRules:`excludeFromInputRules`,PreventExits:`preventsExits`,Media:`media`},DC=Uoe,OC=Symbol.for(`__remirror__`),kC=(e=>(e.PlainExtension=`RemirrorPlainExtension`,e.NodeExtension=`RemirrorNodeExtension`,e.MarkExtension=`RemirrorMarkExtension`,e.PlainExtensionConstructor=`RemirrorPlainExtensionConstructor`,e.NodeExtensionConstructor=`RemirrorNodeExtensionConstructor`,e.MarkExtensionConstructor=`RemirrorMarkExtensionConstructor`,e.Manager=`RemirrorManager`,e.Preset=`RemirrorPreset`,e.PresetConstructor=`RemirrorPresetConstructor`,e))(kC||{}),AC=(e=>(e[e.Critical=1e6]=`Critical`,e[e.Highest=1e5]=`Highest`,e[e.High=1e4]=`High`,e[e.Medium=1e3]=`Medium`,e[e.Default=100]=`Default`,e[e.Low=10]=`Low`,e[e.Lowest=0]=`Lowest`,e))(AC||{}),jC=(e=>(e[e.None=0]=`None`,e[e.Create=1]=`Create`,e[e.EditorView=2]=`EditorView`,e[e.Runtime=3]=`Runtime`,e[e.Destroy=4]=`Destroy`,e))(jC||{}),V=(e=>(e.Undo=`_|undo|_`,e.Redo=`_|redo|_`,e.Bold=`_|bold|_`,e.Italic=`_|italic|_`,e.Underline=`_|underline|_`,e.Strike=`_|strike|_`,e.Code=`_|code|_`,e.Paragraph=`_|paragraph|_`,e.H1=`_|h1|_`,e.H2=`_|h2|_`,e.H3=`_|h3|_`,e.H4=`_|h4|_`,e.H5=`_|h5|_`,e.H6=`_|h6|_`,e.TaskList=`_|task|_`,e.BulletList=`_|bullet|_`,e.OrderedList=`_|number|_`,e.Quote=`_|quote|_`,e.Divider=`_|divider|_`,e.Codeblock=`_|codeblock|_`,e.ClearFormatting=`_|clear|_`,e.Superscript=`_|sup|_`,e.Subscript=`_|sub|_`,e.LeftAlignment=`_|left-align|_`,e.CenterAlignment=`_|center-align|_`,e.RightAlignment=`_|right-align|_`,e.JustifyAlignment=`_|justify-align|_`,e.InsertLink=`_|link|_`,e.Find=`_|find|_`,e.FindBackwards=`_|find-backwards|_`,e.FindReplace=`_|find-replace|_`,e.AddFootnote=`_|footnote|_`,e.AddComment=`_|comment|_`,e.ContextMenu=`_|context-menu|_`,e.IncreaseFontSize=`_|inc-font-size|_`,e.DecreaseFontSize=`_|dec-font-size|_`,e.IncreaseIndent=`_|indent|_`,e.DecreaseIndent=`_|dedent|_`,e.Shortcuts=`_|shortcuts|_`,e.Copy=`_|copy|_`,e.Cut=`_|cut|_`,e.Paste=`_|paste|_`,e.PastePlain=`_|paste-plain|_`,e.SelectAll=`_|select-all|_`,e.Format=`_|format|_`,e))(V||{}),H=(e=>(e.PROD=`RMR0000`,e.UNKNOWN=`RMR0001`,e.INVALID_COMMAND_ARGUMENTS=`RMR0002`,e.CUSTOM=`RMR0003`,e.CORE_HELPERS=`RMR0004`,e.MUTATION=`RMR0005`,e.INTERNAL=`RMR0006`,e.MISSING_REQUIRED_EXTENSION=`RMR0007`,e.MANAGER_PHASE_ERROR=`RMR0008`,e.INVALID_GET_EXTENSION=`RMR0010`,e.INVALID_MANAGER_ARGUMENTS=`RMR0011`,e.SCHEMA=`RMR0012`,e.HELPERS_CALLED_IN_OUTER_SCOPE=`RMR0013`,e.INVALID_MANAGER_EXTENSION=`RMR0014`,e.DUPLICATE_COMMAND_NAMES=`RMR0016`,e.DUPLICATE_HELPER_NAMES=`RMR0017`,e.NON_CHAINABLE_COMMAND=`RMR0018`,e.INVALID_EXTENSION=`RMR0019`,e.INVALID_CONTENT=`RMR0021`,e.INVALID_NAME=`RMR0050`,e.EXTENSION=`RMR0100`,e.EXTENSION_SPEC=`RMR0101`,e.EXTENSION_EXTRA_ATTRIBUTES=`RMR0102`,e.INVALID_SET_EXTENSION_OPTIONS=`RMR0103`,e.REACT_PROVIDER_CONTEXT=`RMR0200`,e.REACT_GET_ROOT_PROPS=`RMR0201`,e.REACT_EDITOR_VIEW=`RMR0202`,e.REACT_CONTROLLED=`RMR0203`,e.REACT_NODE_VIEW=`RMR0204`,e.REACT_GET_CONTEXT=`RMR0205`,e.REACT_COMPONENTS=`RMR0206`,e.REACT_HOOKS=`RMR0207`,e.I18N_CONTEXT=`RMR0300`,e))(H||{}),Woe=s(((exports,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||s(e)}var a=typeof Symbol==`function`&&Symbol.for,o=a?Symbol.for(`react.element`):60103;function s(e){return e.$$typeof===o}function c(e){return Array.isArray(e)?[]:{}}function l(e,t){return t.clone!==!1&&t.isMergeableObject(e)?_(c(e),e,t):e}function u(e,t,n){return e.concat(t).map(function(e){return l(e,n)})}function d(e,t){if(!t.customMerge)return _;var n=t.customMerge(e);return typeof n==`function`?n:_}function f(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function p(e){return Object.keys(e).concat(f(e))}function m(e,t){try{return t in e}catch{return!1}}function h(e,t){return m(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function g(e,t,n){var r={};return n.isMergeableObject(e)&&p(e).forEach(function(t){r[t]=l(e[t],n)}),p(t).forEach(function(i){h(e,i)||(m(e,i)&&n.isMergeableObject(t[i])?r[i]=d(i,n)(e[i],t[i],n):r[i]=l(t[i],n))}),r}function _(e,t,r){r||={},r.arrayMerge=r.arrayMerge||u,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=l;var i=Array.isArray(t),a=Array.isArray(e),o=i===a;return o?i?r.arrayMerge(e,t,r):g(e,t,r):l(t,r)}_.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return _(e,n,t)},{})};var v=_;t.exports=v})),MC=s(((exports,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),NC=s(((exports,t)=>{t.exports=function(e){return typeof e==`object`&&!!e&&Array.isArray(e)===!1}})),Goe=s(((exports,t)=>{var n=NC();function r(e){return n(e)===!0&&Object.prototype.toString.call(e)===`[object Object]`}t.exports=function(e){var t,n;return!(r(e)===!1||(t=e.constructor,typeof t!=`function`)||(n=t.prototype,r(n)===!1)||n.hasOwnProperty(`isPrototypeOf`)===!1)}})),Koe=s(((exports,t)=>{var n=Goe();t.exports=function(e){return n(e)||typeof e==`function`||Array.isArray(e)}})),qoe=s(((exports,t)=>{var n=Koe();t.exports=function(e,t,r){if(!n(e))return{};typeof t==`function`&&(r=t,t=[]),typeof t==`string`&&(t=[t]);for(var i=typeof r==`function`,a=Object.keys(e),o={},s=0;s<a.length;s++){var c=a[s],l=e[c];(!t||t.indexOf(c)===-1&&(!i||r(l,c,e)))&&(o[c]=l)}return o}})),Joe=s(((exports,t)=>{var n=NC();t.exports=function(e,t){if(!n(e)&&typeof e!=`function`)return{};var r={};if(typeof t==`string`)return t in e&&(r[t]=e[t]),r;for(var i=t.length,a=-1;++a<i;){var o=t[a];o in e&&(r[o]=e[o])}return r}}));const PC=/^[a-zà-öø-ÿ]+|[A-ZÀ-ÖØ-ß][a-zà-öø-ÿ]+|[a-zà-öø-ÿ]+|[0-9]+|[A-ZÀ-ÖØ-ß]+(?![a-zà-öø-ÿ])/g,Yoe=/\S+/g;function Xoe(e,t){let n={parts:[],prefixes:[]},r=e.matchAll(t),i=0;for(let t of r){if(typeof t.index!=`number`)continue;let r=t[0];n.parts.push(r);let a=e.slice(i,t.index).trim();n.prefixes.push(a),i=t.index+r.length}let a=e.slice(i).trim();return a&&(n.parts.push(``),n.prefixes.push(a)),n}function FC(e,t){let{keepSpecialCharacters:n=!1,keep:r,prefix:i=``}=t||{},a=e.trim().normalize(`NFC`),o=a.includes(` `),s=o?Yoe:PC,c=Xoe(a,s);return c.parts.map((e,t)=>{let a=c.prefixes[t]||``,s=e;return n===!1&&(r&&(s=s.normalize(`NFD`).replace(RegExp(`[^a-zA-Z\xD8\xDF\xF80-9${r.join(``)}]`,`g`),``)),r||(s=s.normalize(`NFD`).replace(/[^a-zA-ZØßø0-9]/g,``),a=``)),r&&(a=a.replace(RegExp(`[^${r.join(``)}]`,`g`),``)),t===0?a+s:!a&&!s?``:o&&!a&&i.match(/\s/)?` `+s:(a||i)+s}).filter(Boolean)}function Zoe(e){let t=e.matchAll(PC).next().value,n=t?t.index:0;return e.slice(0,n+1).toUpperCase()+e.slice(n+1).toLowerCase()}function IC(e,t){return FC(e,t).reduce((e,t)=>e+Zoe(t),``)}function LC(e,t){return FC(e,{...t,prefix:`-`}).join(``).toLowerCase()}function RC(e,t,n,r){var i,a=!1,o=0;function s(){i&&clearTimeout(i)}function c(){s(),a=!0}typeof t!=`boolean`&&(r=n,n=t,t=void 0);function l(){for(var c=arguments.length,l=Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=this,f=Date.now()-o;if(a)return;function p(){o=Date.now(),n.apply(d,l)}function m(){i=void 0}r&&!i&&p(),s(),r===void 0&&f>e?p():t!==!0&&(i=setTimeout(r?m:p,r===void 0?e-f:e))}return l.cancel=c,l}function Qoe(e,t,n){return n===void 0?RC(e,t,!1):RC(e,n,t!==!1)}var $oe=u(SC()),ese=u(Woe()),tse=u(MC()),nse=u(SC()),zC=u(qoe()),BC=u(Joe());function VC(e){return e}function HC(e,t,n){let r=e[t];return UC(!QC(r),n),r}function UC(e,t){if(!e)throw new rse(t)}var rse=class extends nse.BaseError{constructor(){super(...arguments),this.name=`AssertionError`}};function WC(e){return Object.entries(e)}function GC(e){return Object.keys(e)}function KC(e){return Object.values(e)}function qC(e,t,n){return e.includes(t,n)}function U(e){return Object.assign(Object.create(null),e)}function JC(e){return Object.prototype.toString.call(e)}function YC(e){let t=JC(e).slice(8,-1);return t}function XC(e,t){return n=>typeof n===e?t?t(n):!0:!1}function ZC(e){return t=>YC(t)===e}var QC=XC(`undefined`),$C=XC(`string`),ew=XC(`number`,e=>!Number.isNaN(e)),tw=XC(`function`);function ise(e){return e===null}function ase(e){return e===!0||e===!1}var ose=XC(`symbol`);function nw(e){if(YC(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})}function sse(e){return e==null||/^[bns]/.test(typeof e)}function rw(e){return ise(e)||QC(e)}function iw(e){return!rw(e)&&(tw(e)||XC(`object`)(e))}function cse(e){return t=>iw(t)&&t instanceof e}var lse=ZC(`RegExp`),use=ZC(`Date`),dse=ZC(`Error`);function fse(e){return ZC(`Map`)(e)}function pse(e){return ZC(`Set`)(e)}function aw(e){return iw(e)&&!fse(e)&&!pse(e)&&Object.keys(e).length===0}var ow=Array.isArray;function sw(e){return ow(e)&&e.length===0}function cw(e){return ow(e)&&e.length>0}function lw(e,t,n=e=>!!e){t.lastIndex=0;let r=[],i=t.flags,a;i.includes(`g`)||(t=new RegExp(t.source,`g${i}`));do a=t.exec(e),a&&r.push(a);while(n(a));return t.lastIndex=0,r}function uw(){let e=Date.now(),t=uw.last||e;return uw.last=e>t?e:t+1}uw.last=0;function dw(e=``){return`${e}${uw().toString(36)}`}function fw(e){return(0,zC.default)(e,e=>!QC(e))}function pw(e){if(!nw(e))throw Error(`An invalid value was passed into this clone utility. Expected a plain object`);return{...e}}function mw(e,t=!1){let n=t?[...e].reverse():e,r=new Set(n);return t?[...r].reverse():[...r]}function hw(){}function gw(...e){return ese.default.all(e,{isMergeableObject:nw})}function _w({min:e,max:t,value:n}){return n<e?e:n>t?t:n}function vw(e,t){return[...e].map((e,t)=>({value:e,index:t})).sort((e,n)=>t(e.value,n.value)||e.index-n.index).map(({value:e})=>e)}function yw(e,t,n){try{if($C(t)&&t in e)return e[t];ow(t)&&(t=`['${t.join(`']['`)}']`);let r=e;return t.replace(/\[\s*(["'])(.*?)\1\s*]|^\s*(\w+)\s*(?=\.|\[|$)|\.\s*(\w*)\s*(?=\.|\[|$)|\[\s*(-?\d+)\s*]/g,(e,t,n,i,a,o)=>(r=r[n||i||a||o],``)),r===void 0?n:r}catch{return n}}function bw(e,t){let n=pw(t),r=n;for(let[t,i]of e.entries()){let a=t>=e.length-1,o=r[i];if(a){if(ow(r)){let e=Number.parseInt(i.toString(),10);ew(e)&&r.splice(e,1)}else Reflect.deleteProperty(r,i);return n}if(sse(o))return n;o=ow(o)?[...o]:{...o},r[i]=o,r=o}return n}function xw(e){return t=>yw(t,e)}function Sw(e,t,n=!1){let r=[],i=new Set,a=tw(t)?t:xw(t),o=n?[...e].reverse():e;for(let e of o){let t=a(e);i.has(t)||(i.add(t),r.push(e))}return n?r.reverse():r}function Cw(e,t){let n=ow(e)?e[0]:e;return ew(t)?n<=t?Array.from({length:t+1-n},(e,t)=>t+n):Array.from({length:n+1-t},(e,t)=>-1*t+n):Array.from({length:Math.abs(n)},(e,t)=>(n<0?-1:1)*t)}function ww(e,...t){let n=t.filter(ew);return e>=Math.min(...n)&&e<=Math.max(...n)}function Tw(e){return tw(e)?e():e}var Ew=`https://remirror.io/docs/errors`,Dw={[H.UNKNOWN]:`An error occurred but we're not quite sure why. 🧐`,[H.INVALID_COMMAND_ARGUMENTS]:`The arguments passed to the command method were invalid.`,[H.CUSTOM]:`This is a custom error, possibly thrown by an external library.`,[H.CORE_HELPERS]:"An error occurred in a function called from the `@remirror/core-helpers` library.",[H.MUTATION]:`Mutation of immutable value detected.`,[H.INTERNAL]:`This is an error which should not occur and is internal to the remirror codebase.`,[H.MISSING_REQUIRED_EXTENSION]:`Your editor is missing a required extension.`,[H.MANAGER_PHASE_ERROR]:`This occurs when accessing a method or property before it is available.`,[H.INVALID_GET_EXTENSION]:"The user requested an invalid extension from the getExtensions method. Please check the `createExtensions` return method is returning an extension with the defined constructor.",[H.INVALID_MANAGER_ARGUMENTS]:"Invalid value(s) passed into `Manager` constructor. Only `Presets` and `Extensions` are supported.",[H.SCHEMA]:`There is a problem with the schema or you are trying to access a node / mark that doesn't exists.`,[H.HELPERS_CALLED_IN_OUTER_SCOPE]:"The `helpers` method which is passed into the ``create*` method should only be called within returned method since it relies on an active view (not present in the outer scope).",[H.INVALID_MANAGER_EXTENSION]:`You requested an invalid extension from the manager.`,[H.DUPLICATE_COMMAND_NAMES]:`Command method names must be unique within the editor.`,[H.DUPLICATE_HELPER_NAMES]:`Helper method names must be unique within the editor.`,[H.NON_CHAINABLE_COMMAND]:`Attempted to chain a non chainable command.`,[H.INVALID_EXTENSION]:`The provided extension is invalid.`,[H.INVALID_CONTENT]:`The content provided to the editor is not supported.`,[H.INVALID_NAME]:`An invalid name was used for the extension.`,[H.EXTENSION]:`An error occurred within an extension. More details should be made available.`,[H.EXTENSION_SPEC]:"The spec was defined without calling the `defaults`, `parse` or `dom` methods.",[H.EXTENSION_EXTRA_ATTRIBUTES]:`Extra attributes must either be a string or an object.`,[H.INVALID_SET_EXTENSION_OPTIONS]:"A call to `extension.setOptions` was made with invalid keys.",[H.REACT_PROVIDER_CONTEXT]:"`useRemirrorContext` was called outside of the `remirror` context. It can only be used within an active remirror context created by the `<Remirror />`.",[H.REACT_GET_ROOT_PROPS]:"`getRootProps` has been attached to the DOM more than once. It should only be attached to the dom once per editor.",[H.REACT_EDITOR_VIEW]:`A problem occurred adding the editor view to the dom.`,[H.REACT_CONTROLLED]:`There is a problem with your controlled editor setup.`,[H.REACT_NODE_VIEW]:`Something went wrong with your custom ReactNodeView Component.`,[H.REACT_GET_CONTEXT]:"You attempted to call `getContext` provided by the `useRemirror` prop during the first render of the editor. This is not possible and should only be after the editor first mounts.",[H.REACT_COMPONENTS]:`An error occurred within a remirror component.`,[H.REACT_HOOKS]:`An error occurred within a remirror hook.`,[H.I18N_CONTEXT]:"You called `useI18n()` outside of an `I18nProvider` context."};function Ow(e){return $C(e)&&qC(KC(H),e)}function kw(e,t){let n=Dw[e],r=n?`${n}
|
|
170
|
+
|
|
171
|
+
`:``,i=t?`${t}
|
|
172
|
+
|
|
173
|
+
`:``;return`${r}${i}For more information visit ${Ew}#${e.toLowerCase()}`}var Aw=class extends $oe.BaseError{constructor({code:e,message:t,disableLogging:n=!1}={}){let r=Ow(e)?e:H.CUSTOM;super(kw(r,t)),this.errorCode=r,this.url=`${Ew}#${r.toLowerCase()}`,n||console.error(this.message)}static create(e={}){return new Aw(e)}};function W(e,t){if(!e)throw Aw.create(t)}function jw(e){if(typeof e!=`object`||!e)return e;let t=Symbol.toStringTag in e&&e[Symbol.toStringTag]===`Module`?e.default??e:e;return t&&typeof e==`object`&&`__esModule`in t&&t.__esModule&&t.default!==void 0?t.default:t}function Mw(e,t={}){return process.env.NODE_ENV===`production`?e:(W(iw(e)||ow(e),{message:"`freeze` only supports objects and arrays.",code:H.CORE_HELPERS}),new Proxy(e,{get:(e,n,r)=>(W(n in e||!t.requireKeys,{message:`The prop: '${n.toString()}' you are trying to access does not yet exist on the target.`}),Reflect.get(e,n,r)),set:(e,t)=>{W(!1,{message:`It seems you're trying to set the value of the property (${String(t)}) on a frozen object. For your protection this object does not allow direct mutation.`,code:H.MUTATION})}}))}function Nw(e){this.content=e}Nw.prototype={constructor:Nw,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new Nw(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Nw(n)},addToStart:function(e,t){return new Nw([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Nw(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new Nw(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Nw.from(e),e.size?new Nw(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Nw.from(e),e.size?new Nw(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Nw.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},Nw.from=function(e){if(e instanceof Nw)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Nw(t)};var Pw=Nw;function Fw(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=Fw(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function Iw(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;e<t&&o.text[o.text.length-e-1]==s.text[s.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(o.content.size||s.content.size){let e=Iw(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}var G=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return Fw(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Iw(this,e,t,n)}findIndex(e,t=-1){if(e==0)return Rw(0,e);if(e==this.size)return Rw(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),a=r+i.nodeSize;if(a>=e)return a==e||t>0?Rw(n+1,a):Rw(n,r);r=a}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return new e(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};G.empty=new G([],0);const Lw={index:0,offset:0};function Rw(e,t){return Lw.index=e,Lw.offset=t,Lw}function zw(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!zw(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!zw(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var Bw=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else !n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&zw(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};Bw.none=[];var Vw=class extends Error{},K=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Uw(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(Hw(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(G.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};K.empty=new K(G.empty,0,0);function Hw(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(Hw(a.content,t-i-1,n-i-1)))}function Uw(e,t,n,r){let{index:i,offset:a}=e.findIndex(t),o=e.maybeChild(i);if(a==t||o.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let s=Uw(o.content,t-a-1,n);return s&&e.replaceChild(i,o.copy(s))}function Ww(e,t,n){if(n.openStart>e.depth)throw new Vw(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Vw(`Inconsistent open depths`);return Gw(e,t,n,0)}function Gw(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=Gw(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Xw(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=$w(n,e);return Xw(a,Zw(e,i,o,t,r))}else return Xw(a,Qw(e,t,r))}function Kw(e,t){if(!t.type.compatibleContent(e.type))throw new Vw(`Cannot join `+t.type.name+` onto `+e.type.name)}function qw(e,t,n){let r=e.node(n);return Kw(r,t.node(n)),r}function Jw(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Yw(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Jw(e.nodeAfter,r),a++));for(let e=a;e<o;e++)Jw(i.child(e),r);t&&t.depth==n&&t.textOffset&&Jw(t.nodeBefore,r)}function Xw(e,t){return e.type.checkContent(t),e.copy(t)}function Zw(e,t,n,r,i){let a=e.depth>i&&qw(e,t,i+1),o=r.depth>i&&qw(n,r,i+1),s=[];return Yw(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(Kw(a,o),Jw(Xw(a,Zw(e,t,n,r,i+1)),s)):(a&&Jw(Xw(a,Qw(e,t,i+1)),s),Yw(t,n,i,s),o&&Jw(Xw(o,Qw(n,r,i+1)),s)),Yw(r,null,i,s),new G(s)}function Qw(e,t,n){let r=[];if(Yw(null,e,n,r),e.depth>n){let i=qw(e,t,n+1);Jw(Xw(i,Qw(e,t,n+1)),r)}return Yw(t,null,n,r),new G(r)}function $w(e,t){let n=t.depth-e.openStart,r=t.node(n),i=r.copy(e.content);for(let e=n-1;e>=0;e--)i=t.node(e).copy(G.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}var eT=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Bw.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new iT(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=rT.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else rT.set(t,r=new tT);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%nT,i}},tT=class{constructor(){this.elts=[],this.i=0}};const nT=12,rT=new WeakMap;var iT=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}};const aT=Object.create(null);var oT=class e{constructor(e,t,n,r=Bw.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||G.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&zw(this.attrs,t||e.defaultAttrs||aT)&&Bw.sameSet(this.marks,n||Bw.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return K.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a),s=r.node(a),c=s.content.cut(r.pos-o,i.pos-o);return new K(c,r.depth-a,i.depth-a)}replace(e,t,n){return Ww(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return eT.resolveCached(this,e)}resolveNoCache(e){return eT.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),cT(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=G.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Bw.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Bw.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=G.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};oT.prototype.text=void 0;var sT=class e extends oT{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):cT(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function cT(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var lT=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new uT(t,n);if(r.next==null)return e.empty;let i=dT(r);r.next&&r.err(`Unexpected trailing text`);let a=xT(vT(i));return ST(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return G.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
174
|
+
`)}};lT.empty=new lT(!0);var uT=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function dT(e){let t=[];do t.push(fT(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function fT(e){let t=[];do t.push(pT(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function pT(e){let t=_T(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=hT(e,t);else break;return t}function mT(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function hT(e,t){let n=mT(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:mT(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function gT(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function _T(e){if(e.eat(`(`)){let t=dT(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=gT(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function vT(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function yT(e,t){return t-e}function bT(e,t){let n=[];return r(t),n.sort(yT);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function xT(e){let t=Object.create(null);return n(bT(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);bT(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new lT(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(yT);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function ST(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function CT(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function wT(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError(`No value supplied for attribute `+r)}n[r]=i}return n}function TT(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function ET(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new kT(e,r,t[r]);return n}var DT=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=ET(e,n.attrs),this.defaultAttrs=CT(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==lT.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:wT(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new oT(this,this.computeAttrs(e),G.from(t),Bw.setFrom(n))}createChecked(e=null,t,n){return t=G.from(t),this.checkContent(t),new oT(this,this.computeAttrs(e),t,Bw.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=G.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(G.empty,!0);return i?new oT(this,e,t.append(i),Bw.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){TT(this.attrs,e,`node`,this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:Bw.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function OT(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var kT=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?OT(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},AT=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=ET(e,r.attrs),this.excluded=null;let i=CT(this.attrs);this.instance=i?new Bw(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Bw(this,wT(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){TT(this.attrs,e,`mark`,this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},jT=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Pw.from(e.nodes),t.marks=Pw.from(e.marks||{}),this.nodes=DT.compile(this.spec.nodes,this),this.marks=AT.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=lT.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?MT(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:MT(this,n.split(` `))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(e instanceof DT){if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`)}else throw RangeError(`Invalid node type: `+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new sT(n,n.defaultAttrs,e,Bw.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return oT.fromJSON(this,e)}markFromJSON(e){return Bw.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function MT(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function NT(e){return e.tag!=null}function PT(e){return e.style!=null}var FT=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(NT(e))this.tags.push(e);else if(PT(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new VT(this,t,!1);return n.addAll(e,Bw.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new VT(this,t,!0);return n.addAll(e,Bw.none,t.from,t.to),K.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(UT(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r],i=e.priority==null?50:e.priority;if(i<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=WT(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=WT(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}};const IT={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},LT={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},RT={ol:!0,ul:!0},mse=1,hse=2,gse=4;function zT(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?1:0)|(t===`full`?2:0)}var BT=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=Bw.none,this.match=i||(a&4?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(G.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&1)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=G.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(G.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!IT.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},VT=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=zT(null,t.preserveWhitespace,0)|(n?4:0);i=r?new BT(r.type,r.attrs,Bw.none,!0,t.topMatch||r.type.contentMatch,a):n?new BT(null,null,Bw.none,!0,null,a):new BT(e.schema.topNodeType,null,Bw.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&2?`full`:this.localPreserveWS||(r.options&1)>0;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)n=i===`full`?n.replace(/\r\n?/g,`
|
|
175
|
+
`):n.replace(/\r?\n|\r/g,` `);else if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;RT.hasOwnProperty(a)&&this.parser.normalizeLists&&HT(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:LT.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(IT.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
176
|
+
`),t)}ignoreFallback(e,t){e.nodeName==`BR`&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text(`-`),t)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t){let n,r;for(let t=this.open;t>=0;t--){let i=this.nodes[t],a=i.findWrapping(e);if(a&&(!n||n.length>a.length)&&(n=a,r=i,!a.length)||i.solid)break}if(!n)return null;this.sync(r);for(let e=0;e<n.length;e++)t=this.enterInner(n[e],null,t,!1);return t}insertNode(e,t){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let n=this.findPlace(e,t);if(n){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let r=Bw.none;for(let i of n.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):GT(i.type,e.type))&&(r=i.addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=zT(e,i,a.options);a.options&4&&a.content.length==0&&(o|=4);let s=Bw.none;return n=n.filter(t=>(a.type?a.type.allowsMarkType(t.type):GT(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new BT(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find){for(let r=0;r<this.find.length;r++)if(this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)){let e=t.compareDocumentPosition(this.find[r].node);e&(n?2:4)&&(this.find[r].pos=this.currentPos)}}}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}else{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function HT(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&RT.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function UT(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function WT(e){let t={};for(let n in e)t[n]=e[n];return t}function GT(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var KT=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=JT(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name]){a++;continue}if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=QT(JT(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&QT(JT(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return QT(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=qT(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return qT(e.marks)}};function qT(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function JT(e){return e.document||window.document}const YT=new WeakMap;function XT(e){let t=YT.get(e);return t===void 0&&YT.set(e,t=ZT(e)),t}function ZT(e){let t=null;function n(e){if(e&&typeof e==`object`)if(Array.isArray(e))if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}function QT(e,t,n,r){if(typeof t==`string`)return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=XT(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){for(let e in u=2,l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}else{let{dom:t,contentDOM:i}=QT(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}const $T=65535,eE=2**16;function tE(e,t){return e+t*eE}function nE(e){return e&$T}function rE(e){return(e-(e&$T))/eE}const _se=1,vse=2,yse=4,bse=8;var iE=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&8)>0}get deletedBefore(){return(this.delInfo&5)>0}get deletedAfter(){return(this.delInfo&6)>0}get deletedAcross(){return(this.delInfo&4)>0}},aE=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=nE(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+rE(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:tE(o/3,e-s),f=e==s?2:e==u?1:4;return(t<0?e!=s:e!=u)&&(f|=8),new iE(a,f,d)}r+=l-c}return n?e+r:new iE(e+r,0,null)}touches(e,t){let n=0,r=nE(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i],c=o+s;if(e<=c&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};aE.empty=new aE([]);var oE=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n],a=i.mapResult(e,t);if(a.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(a.recover);continue}}r|=a.delInfo,e=a.pos}return n?e:new iE(e,r,null)}};const sE=Object.create(null);var cE=class{getMap(){return aE.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=sE[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in sE)throw RangeError(`Duplicate use of step JSON ID `+e);return sE[e]=t,t.prototype.jsonID=e,t}},lE=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof Vw)return e.fail(t.message);throw t}}};function uE(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(uE(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return G.fromArray(r)}var dE=class e extends cE{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new K(uE(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return lE.fromReplace(e,this.from,this.to,i)}invert(){return new fE(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};cE.jsonID(`addMark`,dE);var fE=class e extends cE{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new K(uE(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return lE.fromReplace(e,this.from,this.to,n)}invert(){return new dE(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.pos,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};cE.jsonID(`removeMark`,fE);var pE=class e extends cE{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return lE.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return lE.fromReplace(e,this.pos,this.pos+1,new K(G.from(n),0,t.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new mE(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};cE.jsonID(`addNodeMark`,pE);var mE=class e extends cE{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return lE.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return lE.fromReplace(e,this.pos,this.pos+1,new K(G.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new pE(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};cE.jsonID(`removeNodeMark`,mE);var hE=class e extends cE{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&_E(e,this.from,this.to)?lE.fail(`Structure replace would overwrite content`):lE.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new aE([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new e(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?K.empty:new K(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?K.empty:new K(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,K.fromJSON(t,n.slice),!!n.structure)}};cE.jsonID(`replace`,hE);var gE=class e extends cE{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(_E(e,this.from,this.gapFrom)||_E(e,this.gapTo,this.to)))return lE.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return lE.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?lE.fromReplace(e,this.from,this.to,n):lE.fail(`Content does not fit in gap`)}getMap(){return new aE([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,K.fromJSON(t,n.slice),n.insert,!!n.structure)}};cE.jsonID(`replaceAround`,gE);function _E(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function vE(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==l&&o.mark.eq(u[e])?o.to=d:i.push(o=new fE(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new dE(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function yE(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof AT){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new fE(t.from,t.to,t.style)))}function bE(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new hE(s,l,K.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new fE(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new K(G.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new hE(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(G.empty,!0);e.replace(s,s,new K(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function xE(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function SE(e){let t=e.parent,n=t.content.cutByIndex(e.startIndex,e.endIndex);for(let t=e.depth;;--t){let r=e.$from.node(t),i=e.$from.index(t),a=e.$to.indexAfter(t);if(t<e.depth&&r.canReplace(i,a,n))return t;if(t==0||r.type.spec.isolating||!xE(r,i,a))break}return null}function CE(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=G.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=G.from(r.node(e).copy(u)),d++):c--;let f=G.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=G.from(i.node(e).copy(f)),p++):l++;e.step(new gE(c,l,o,s,new K(u.append(f),d,p),u.size-d,!0))}function wE(e,t,n=null,r=e){let i=EE(e,t),a=i&&DE(r,t);return a?i.map(TE).concat({type:t,attrs:n}).concat(a.map(TE)):null}function TE(e){return{type:e,attrs:null}}function EE(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function DE(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=o.length?o[o.length-1]:t,c=s.contentMatch;for(let e=r;c&&e<i;e++)c=c.matchType(n.child(e).type);return!c||!c.validEnd?null:o}function OE(e,t,n){let r=G.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=G.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new gE(i,a,i,a,new K(r,0,0),n.length,!0))}function kE(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&ME(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&jE(e,t,n,a),bE(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new gE(c,l,c+1,l-1,new K(G.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&AE(e,t,n,a),!1}})}function AE(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function jE(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
|
|
177
|
+
`))}})}function ME(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function NE(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new gE(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new K(G.from(o),0,0),1,!0))}function PE(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function FE(e,t,n=1,r){let i=e.doc.resolve(t),a=G.empty,o=G.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=G.from(i.node(e).copy(a));let t=r&&r[s];o=G.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new hE(t,t,new K(a.append(o),n,n),!0))}function IE(e,t){let n=e.resolve(t),r=n.index();return RE(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function LE(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function RE(e,t){return!!(e&&t&&!e.isLeaf&&LE(e,t))}function zE(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);jE(e,r.node(),r.before(),s)}o.inlineContent&&bE(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new hE(l,c.map(t+n,-1),K.empty,!0)),r===!0){let t=e.doc.resolve(l);AE(e,t.node(),t.before(),e.steps.length)}return e}function BE(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function VE(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(n.openStart==0&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+(n>0?1:0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function HE(e,t,n=t,r=K.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return UE(i,a,r)?new hE(t,n,r):new WE(i,a,r).fit()}function UE(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var WE=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=G.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=G.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new K(i,a,o);return e>-1?new gE(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new hE(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=qE(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore(G.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=qE(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new K(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=qE(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new K(GE(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new K(GE(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let a=this.unplaced,o=n?n.content:a.content,s=a.openStart-e,c=0,l=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));u=u.matchFragment(r)}let f=o.size+e-(a.content.size-a.openEnd);for(;c<o.childCount;){let e=o.child(c),t=u.matchType(e.type);if(!t)break;c++,(c>1||s==0||e.content.size)&&(u=t,l.push(JE(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=KE(this.placed,t,G.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=o;e<f;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=p?e==0?K.empty:new K(GE(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new K(GE(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!YE(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=YE(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=YE(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=KE(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=KE(this.placed,this.depth,G.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop(),t=e.match.fillBefore(G.empty,!0);t.childCount&&(this.placed=KE(this.placed,this.frontier.length,t))}};function GE(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(GE(e.firstChild.content,t-1,n)))}function KE(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(KE(e.lastChild.content,t-1,n)))}function qE(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function JE(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,JE(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(G.empty,!0)))),e.copy(r)}function YE(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!XE(n,a.content,o)?s:null}function XE(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function ZE(e){return e.spec.defining||e.spec.definingForContent}function QE(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(UE(i,a,r))return e.step(new hE(t,n,r));let o=nD(i,e.doc.resolve(n));o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=ZE(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t<o.length;t++){let l=o[(t+c)%o.length],u=!0;l<0&&(u=!1,l=-l);let f=i.node(l-1),p=i.index(l-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(l),u?a.after(l):n,new K($E(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=o.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function $E(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy($E(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(G.empty,!0))}return e}function eD(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=BE(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new K(G.from(r),0,0))}function tD(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),a=nD(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&n==0||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function nD(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var rD=class e extends cE{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return lE.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return lE.fromReplace(e,this.pos,this.pos+1,new K(G.from(r),0,t.isLeaf?0:1))}getMap(){return aE.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};cE.jsonID(`attr`,rD);var iD=class e extends cE{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return lE.ok(n)}getMap(){return aE.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};cE.jsonID(`docAttr`,iD);let aD=class extends Error{};aD=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},aD.prototype=Object.create(Error.prototype),aD.prototype.constructor=aD,aD.prototype.name=`TransformError`;var oD=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new oE}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new aD(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=K.empty){let r=HE(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new K(G.from(n),0,0))}delete(e,t){return this.replace(e,t,K.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return QE(this,e,t,n),this}replaceRangeWith(e,t,n){return eD(this,e,t,n),this}deleteRange(e,t){return tD(this,e,t),this}lift(e,t){return CE(this,e,t),this}join(e,t=1){return zE(this,e,t),this}wrap(e,t){return OE(this,e,t),this}setBlockType(e,t=e,n,r=null){return kE(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return NE(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new rD(e,t,n)),this}setDocAttribute(e,t){return this.step(new iD(e,t)),this}addNodeMark(e,t){return this.step(new pE(e,t)),this}removeNodeMark(e,t){if(!(t instanceof Bw)){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t=t.isInSet(n.marks),!t)return this}return this.step(new mE(e,t)),this}split(e,t=1,n){return FE(this,e,t,n),this}addMark(e,t,n){return vE(this,e,t,n),this}removeMark(e,t,n){return yE(this,e,t,n),this}clearIncompatible(e,t,n){return bE(this,e,t,n),this}};const sD=Object.create(null);var cD=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new lD(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=K.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:s,$to:c}=a[o],l=e.mapping.slice(i);e.replaceRange(l.map(s.pos),l.map(c.pos),o?K.empty:t),o==0&&yD(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n),c=s.map(a.pos),l=s.map(o.pos);i?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),yD(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new fD(e):vD(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?vD(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):vD(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new gD(e.node(0))}static atStart(e){return vD(e,e,0,0,1)||new gD(e)}static atEnd(e){return vD(e,e,e.content.size,e.childCount,-1)||new gD(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=sD[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in sD)throw RangeError(`Duplicate use of selection JSON ID `+e);return sD[e]=t,t.prototype.jsonID=e,t}getBookmark(){return fD.between(this.$anchor,this.$head).getBookmark()}};cD.prototype.visible=!0;var lD=class{constructor(e,t){this.$from=e,this.$to=t}};let uD=!1;function dD(e){!uD&&!e.parent.inlineContent&&(uD=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var fD=class e extends cD{constructor(e,t=e){dD(e),dD(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return cD.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=K.empty){if(super.replace(e,t),t==K.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new pD(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=cD.findFrom(n,r,!0)||cD.findFrom(n,-r,!0);if(e)n=e.$head;else return cD.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(cD.findFrom(t,-r,!0)||cD.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};cD.jsonID(`text`,fD);var pD=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return fD.between(e.resolve(this.anchor),e.resolve(this.head))}},mD=class e extends cD{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),a=t.resolve(i);return r?cD.near(a):new e(a)}content(){return new K(G.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new hD(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};mD.prototype.visible=!1,cD.jsonID(`node`,mD);var hD=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new pD(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&mD.isSelectable(n)?new mD(t):cD.near(t)}},gD=class e extends cD{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=K.empty){if(t==K.empty){e.delete(0,e.doc.content.size);let t=cD.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:`all`}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return _D}};cD.jsonID(`all`,gD);const _D={map(){return this},resolve(e){return new gD(e)}};function vD(e,t,n,r,i,a=!1){if(t.inlineContent)return fD.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!a&&mD.isSelectable(r))return mD.create(e,n-(i<0?r.nodeSize:0))}else{let t=vD(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}n+=r.nodeSize*i}return null}function yD(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof hE||i instanceof gE))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(cD.near(e.doc.resolve(o),n))}const xse=1,Sse=2,Cse=4;var bD=class extends oD{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError(`Selection passed to setSelection must point at the current document`);return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|1)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&1)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return Bw.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&2)>0}addStep(e,t){super.addStep(e,t),this.updated&=-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Bw.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n??=t,n??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(cD.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e==`string`?e:e.key]=t,this}getMeta(e){return this.meta[typeof e==`string`?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(this.updated&4)>0}};function xD(e,t){return!t||!e?e:e.bind(t)}var SD=class{constructor(e,t,n){this.name=e,this.init=xD(t.init,n),this.apply=xD(t.apply,n)}};const CD=[new SD(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new SD(`selection`,{init(e,t){return e.selection||cD.atStart(t.doc)},apply(e){return e.selection}}),new SD(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new SD(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];var wD=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=CD.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new SD(e.key,e.spec.state,e))})}},TD=class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,c=r?r[a].state:this,l=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,c,n);if(l&&n.filterTransaction(l,a)){if(l.setMeta(`appendedTransaction`,e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError(`Applying a mismatched transaction`);let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new bD(this)}static create(t){let n=new wD(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new wD(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new wD(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=oT.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=cD.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function ED(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=ED(i,t,{})),n[r]=i}return n}var DD=class{constructor(e){this.spec=e,this.props={},e.props&&ED(e.props,this,this.props),this.key=e.key?e.key.key:kD(`plugin`)}getState(e){return e[this.key]}};const OD=Object.create(null);function kD(e){return e in OD?e+`$`+ ++OD[e]:(OD[e]=0,e+`$`)}var AD=class{constructor(e=`key`){this.key=kD(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};function jD(){return typeof document<`u`?document:null}var MD=s(((exports,t)=>{function n(e,t){if(typeof e!=`string`)return[e];var n=[e];typeof t==`string`||Array.isArray(t)?t={brackets:t}:t||={};var r=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:[`{}`,`[]`,`()`],i=t.escape||`___`,a=!!t.flat;r.forEach(function(e){var t=new RegExp([`\\`,e[0],`[^\\`,e[0],`\\`,e[1],`]*\\`,e[1]].join(``)),r=[];function a(t,a,o){var s=n.push(t.slice(e[0].length,-e[1].length))-1;return r.push(s),i+s+i}n.forEach(function(e,r){for(var i,o=0;e!=i;)if(i=e,e=e.replace(t,a),o++>1e4)throw Error(`References have circular dependency. Please, check them.`);n[r]=e}),r=r.reverse(),n=n.map(function(t){return r.forEach(function(n){t=t.replace(RegExp(`(\\`+i+n+`\\`+i+`)`,`g`),e[0]+`$1`+e[1])}),t})});var o=RegExp(`\\`+i+`([0-9]+)\\`+i);function s(e,t,n){for(var r=[],i,a=0;i=o.exec(e);){if(a++>1e4)throw Error(`Circular references in parenthesis`);r.push(e.slice(0,i.index)),r.push(s(t[i[1]],t)),e=e.slice(i.index+i[0].length)}return r.push(e),r}return a?n:s(n[0],n)}function r(e,t){if(t&&t.flat){var n=t&&t.escape||`___`,r=e[0],i;if(!r)return``;for(var a=RegExp(`\\`+n+`([0-9]+)\\`+n),o=0;r!=i;){if(o++>1e4)throw Error(`Circular references in `+e);i=r,r=r.replace(a,s)}return r}return e.reduce(function e(t,n){return Array.isArray(n)&&(n=n.reduce(e,``)),t+n},``);function s(t,n){if(e[n]==null)throw Error(`Reference `+n+`is undefined`);return e[n]}}function i(e,t){return Array.isArray(e)?r(e,t):n(e,t)}i.parse=n,i.stringify=r,t.exports=i}));const ND={id:`extension.command.copy.label`,message:`Copy`,comment:`Label for copy command.`},PD={id:`extension.command.copy.description`,message:`Copy the selected text`,comment:`Description for copy command.`},FD={id:`extension.command.cut.label`,message:`Cut`,comment:`Label for cut command.`},ID={id:`extension.command.cut.description`,message:`Cut the selected text`,comment:`Description for cut command.`},LD={id:`extension.command.paste.label`,message:`Paste`,comment:`Label for paste command.`},RD={id:`extension.command.paste.description`,message:`Paste content into the editor`,comment:`Description for paste command.`},zD={id:`extension.command.select-all.label`,message:`Select all`,comment:`Label for select all command.`},BD={id:`extension.command.select-all.description`,message:`Select all content within the editor`,comment:`Description for select all command.`};var VD=Object.freeze({__proto__:null,COPY_DESCRIPTION:PD,COPY_LABEL:ND,CUT_DESCRIPTION:ID,CUT_LABEL:FD,PASTE_DESCRIPTION:RD,PASTE_LABEL:LD,SELECT_ALL_DESCRIPTION:BD,SELECT_ALL_LABEL:zD});const HD={id:`extension.command.toggle-bold.label`,message:`Bold`,comment:`Label for bold formatting command.`},UD={id:`extension.command.toggle-bold.description`,message:`Add bold formatting to the selected text`,comment:`Description for bold formatting command.`};var WD=Object.freeze({__proto__:null,DESCRIPTION:UD,LABEL:HD});const GD={id:`extension.command.toggle-code.label`,message:`Code`,comment:`Label for the inline code formatting.`},KD={id:`extension.command.toggle-code.description`,message:`Add inline code formatting to the selected text`,comment:`Description for the inline code formatting command.`};var qD=Object.freeze({__proto__:null,DESCRIPTION:KD,LABEL:GD});const JD={id:`extension.command.undo.label`,message:`Undo`,comment:`Label for undo.`},YD={id:`extension.command.undo.description`,message:`Undo the most recent action`,comment:`Description for undo.`},XD={id:`extension.command.redo.label`,message:`Redo`,comment:`Label for redo.`},ZD={id:`extension.command.redo.description`,message:`Redo the most recent action`,comment:`Description for redo.`};var QD=Object.freeze({__proto__:null,REDO_DESCRIPTION:ZD,REDO_LABEL:XD,UNDO_DESCRIPTION:YD,UNDO_LABEL:JD});const $D={id:`extension.command.toggle-italic.label`,message:`Italic`,comment:`Label for italic formatting command.`},eO={id:`extension.command.toggle-italic.description`,message:`Italicize the selected text`,comment:`Description for italic formatting command.`};var tO=Object.freeze({__proto__:null,DESCRIPTION:eO,LABEL:$D});const nO={id:`extension.command.toggle-ordered-list.label`,message:`Ordered list`,comment:`Label for inserting an ordered list into the editor.`},rO={id:`extension.command.toggle-bullet-list.description`,message:`Bulleted list`,comment:`Description for inserting a bullet list into the editor.`},iO={id:`extension.command.toggle-task-list.description`,message:`Tasked list`,comment:`Description for inserting a task list into the editor.`};var aO=Object.freeze({__proto__:null,BULLET_LIST_LABEL:rO,ORDERED_LIST_LABEL:nO,TASK_LIST_LABEL:iO});const oO={id:`extension.command.insert-paragraph.label`,message:`Insert Paragraph`,comment:`Label for inserting a paragraph.`},sO={id:`extension.command.insert-paragraph.description`,message:`Insert a new paragraph`,comment:`Description for inserting a paragraph.`},cO={id:`extension.command.convert-paragraph.label`,message:`Convert Paragraph`,comment:`Label for converting the current node into a paragraph.`},lO={id:`extension.command.convert-paragraph.description`,message:`Convert current block into a paragraph block.`,comment:`Description for converting a paragraph.`};var uO=Object.freeze({__proto__:null,CONVERT_DESCRIPTION:lO,CONVERT_LABEL:cO,INSERT_DESCRIPTION:sO,INSERT_LABEL:oO}),dO=class{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t==`string`?fO(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1}};function fO(e){return function(t,n,r,i){let a=e;if(n[1]){let e=n[0].lastIndexOf(n[1]);a+=n[0].slice(e+n[1].length),r+=e;let t=r-i;t>0&&(a=n[0].slice(e-t,e)+a,r=i)}return t.tr.insertText(a,r,i)}}const wse=500;function pO({rules:e}){let t=new DD({state:{init(){return null},apply(e,t){let n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput(n,r,i,a){return mO(n,r,i,a,e,t)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:r}=n.state.selection;r&&mO(n,r.pos,r.pos,``,e,t)})}}},isInputRules:!0});return t}function mO(e,t,n,r,i,a){if(e.composing)return!1;let o=e.state,s=o.doc.resolve(t),c=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,``)+r;for(let l=0;l<i.length;l++){let u=i[l];if(s.parent.type.spec.code){if(!u.inCode)continue}else if(u.inCode===`only`)continue;let d=u.match.exec(c),f=d&&u.handler(o,d,t-(d[0].length-r.length),n);if(f)return u.undoable&&f.setMeta(a,{transform:f,from:t,to:n,text:r}),e.dispatch(f),!0}return!1}const hO=(e,t)=>{let n=e.plugins;for(let r=0;r<n.length;r++){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let n=e.tr,r=a.transform;for(let e=r.steps.length-1;e>=0;e--)n.step(r.steps[e].invert(r.docs[e]));if(a.text){let t=n.doc.resolve(a.from).marks();n.replaceWith(a.from,a.to,e.schema.text(a.text,t))}else n.delete(a.from,a.to);t(n)}return!0}}return!1},Tse=new dO(/--$/,`—`),Ese=new dO(/\.\.\.$/,`…`),Dse=new dO(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,`“`),Ose=new dO(/"$/,`”`),kse=new dO(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,`‘`),Ase=new dO(/'$/,`’`);function gO(e,t,n=null,r){return new dO(e,(e,i,a,o)=>{let s=n instanceof Function?n(i):n,c=e.tr.delete(a,o),l=c.doc.resolve(a),u=l.blockRange(),d=u&&wE(u,t,s);if(!d)return null;c.wrap(u,d);let f=c.doc.resolve(a-1).nodeBefore;return f&&f.type==t&&IE(c.doc,a-1)&&(!r||r(i,f))&&c.join(a-1),c})}const _O=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},vO=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let jse=null;const yO=function(e,t,n){let r=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Mse=function(){},bO=function(e,t,n,r){return n&&(SO(e,t,n,r,-1)||SO(e,t,n,r,1))},xO=/^(img|br|input|textarea|hr)$/i;function SO(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:CO(e))){let n=e.parentNode;if(!n||n.nodeType!=1||DO(e)||xO.test(e.nodeName)||e.contentEditable==`false`)return!1;t=_O(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable==`false`)return!1;t=i<0?CO(e):0}else return!1}}function CO(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function wO(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable==`false`)return null;e=e.childNodes[t-1],t=CO(e)}else if(e.parentNode&&!DO(e))t=_O(e),e=e.parentNode;else return null}}function TO(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable==`false`)return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!DO(e))t=_O(e)+1,e=e.parentNode;else return null}}function EO(e,t,n){for(let r=t==0,i=t==CO(e);r||i;){if(e==n)return!0;let t=_O(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==CO(e)}}function DO(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const OO=function(e){return e.focusNode&&bO(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function kO(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function AO(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function jO(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(CO(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(CO(r.startContainer),r.startOffset)}}}const MO=typeof navigator<`u`?navigator:null,NO=typeof document<`u`?document:null,PO=MO&&MO.userAgent||``,FO=/Edge\/(\d+)/.exec(PO),IO=/MSIE \d/.exec(PO),LO=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(PO),RO=!!(IO||LO||FO),zO=IO?document.documentMode:LO?+LO[1]:FO?+FO[1]:0,BO=!RO&&/gecko\/(\d+)/i.test(PO);BO&&+(/Firefox\/(\d+)/.exec(PO)||[0,0])[1];const VO=!RO&&/Chrome\/(\d+)/.exec(PO),HO=!!VO,UO=VO?+VO[1]:0,WO=!RO&&!!MO&&/Apple Computer/.test(MO.vendor),GO=WO&&(/Mobile\/\w+/.test(PO)||!!MO&&MO.maxTouchPoints>2),KO=GO||(MO?/Mac/.test(MO.platform):!1),qO=MO?/Win/.test(MO.platform):!1,JO=/Android \d/.test(PO),YO=!!NO&&`webkitFontSmoothing`in NO.documentElement.style,XO=YO?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function ZO(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function QO(e,t){return typeof e==`number`?e:e[t]}function $O(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function ek(e,t,n){let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=vO(o);continue}let e=o,n=e==a.body,s=n?ZO(a):$O(e),c=0,l=0;if(t.top<s.top+QO(r,`top`)?l=-(s.top-t.top+QO(i,`top`)):t.bottom>s.bottom-QO(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+QO(i,`top`)-s.top:t.bottom-s.bottom+QO(i,`bottom`)),t.left<s.left+QO(r,`left`)?c=-(s.left-t.left+QO(i,`left`)):t.right>s.right-QO(r,`right`)&&(c=t.right-s.right+QO(i,`right`)),c||l)if(n)a.defaultView.scrollBy(c,l);else{let n=e.scrollLeft,r=e.scrollTop;l&&(e.scrollTop+=l),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-i,top:t.top-a,right:t.right-i,bottom:t.bottom-a}}let u=n?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u==`absolute`?o.offsetParent:vO(o)}}function tk(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:nk(e.dom)}}function nk(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=vO(r));return t}function rk({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;ik(n,r==0?0:r-t)}function ik(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}let ak=null;function ok(e){if(e.setActive)return e.setActive();if(ak)return e.focus(ak);let t=nk(e);e.focus(ak==null?{get preventScroll(){return ak={preventScroll:!0},!0}}:void 0),ak||(ak=!1,ik(t,0))}function sk(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(u.nodeType==1)e=u.getClientRects();else if(u.nodeType==3)e=yO(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,u.nodeType==1&&e&&(a=d+(t.left>=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&n.nodeType==3?ck(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:sk(n,i)}function ck(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let n=gk(r,1);if(n.top!=n.bottom&&lk(t,n))return{node:e,offset:i+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}function lk(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function uk(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function dk(e,t,n){let{node:r,offset:i}=sk(t,n),a=-1;if(r.nodeType==1&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function fk(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(t.dom.nodeType==1&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText)){let e=t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2;return e?t.posBefore:t.posAfter}n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function pk(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(n.nodeType==1){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(lk(t,i))return pk(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function mk(e,t){let n=e.dom.ownerDocument,r,i=0,a=jO(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o.nodeType==1?o:o.parentNode)){let n=e.dom.getBoundingClientRect();if(!lk(t,n)||(o=pk(e.dom,t,n),!o))return null}if(WO)for(let e=o;r&&e;e=vO(e))e.draggable&&(r=void 0);if(o=uk(o,t),r){if(BO&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;YO&&i&&r.nodeType==1&&(n=r.childNodes[i-1]).nodeType==1&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!=`BR`)&&(s=fk(e,r,i,t))}s??=dk(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function hk(e){return e.top<e.bottom||e.left<e.right}function gk(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(hk(e))return e}return Array.prototype.find.call(n,hk)||e.getBoundingClientRect()}const _k=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function vk(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=YO||BO;if(r.nodeType==3)if(o&&(_k.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=gk(yO(r,i,i),n);if(BO&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=gk(yO(r,i-1,i-1),-1);if(t.top==e.top){let n=gk(yO(r,i,i+1),-1);if(n.top!=e.top)return yk(n,n.left<t.left)}}return e}else{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,yk(gk(yO(r,e,t),a),a<0)}let s=e.state.doc.resolve(t-(a||0));if(!s.parent.inlineContent){if(a==null&&i&&(n<0||i==CO(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return bk(e.getBoundingClientRect(),!1)}if(a==null&&i<CO(r)){let e=r.childNodes[i];if(e.nodeType==1)return bk(e.getBoundingClientRect(),!0)}return bk(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==CO(r))){let e=r.childNodes[i-1],t=e.nodeType==3?yO(e,CO(e)-(o?0:1)):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return yk(gk(t,1),!1)}if(a==null&&i<CO(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?e.nodeType==3?yO(e,0,o?0:1):e.nodeType==1?e:null:null;if(t)return yk(gk(t,-1),!0)}return yk(gk(r.nodeType==3?yO(r):r,-n),n>=0)}function yk(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function bk(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function xk(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function Sk(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return xk(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=vk(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(e.nodeType==1)t=e.getClientRects();else if(e.nodeType==3)t=yO(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}const Ck=/[\u0590-\u08ac]/;function wk(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!Ck.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:xk(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!l.contains(u.nodeType==1?u:u.parentNode)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}let Tk=null,Ek=null,Dk=!1;function Ok(e,t,n){return Tk==t&&Ek==n?Dk:(Tk=t,Ek=n,Dk=n==`up`||n==`down`?Sk(e,t,n):wk(e,t,n))}const Nse=0,Pse=1,Fse=2,Ise=3;var kk=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=t>_O(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(n&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e||i instanceof Ik){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof Ak&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,!(!e||e.dom.parentNode==this.contentDOM);n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?_O(e.dom)+1:0}}else{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,!(!e||e.dom.parentNode==this.contentDOM);n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?_O(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=_O(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=_O(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((BO||WO)&&e==t){let{node:e,offset:t}=o;if(e.nodeType==3){if(u=!!(t&&e.nodeValue[t-1]==`
|
|
178
|
+
`),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:_O(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(BO&&l.focusNode&&l.focusNode!=s.node&&l.focusNode.nodeType==1){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&WO)&&bO(o.node,o.offset,l.anchorNode,l.anchorOffset)&&bO(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!u){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?2:1,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=3:i.markDirty(e-r,t-r);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?2:3}n=a}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}},Ak=class extends kk{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(a.nodeType!=1){let e=document.createElement(`span`);e.appendChild(a),a=e}a.contentEditable=`false`,a.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==0&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}},jk=class extends kk{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},Mk=class e extends kk{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return(!o||!o.dom)&&(o=KT.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&3||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=3&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=0){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=Zk(a,n,o,r)),t>0&&(a=Zk(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},Nk=class e extends kk{constructor(e,t,n,r,i,a,o,s,c){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=KT.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=Wk(u,r,n),l?c=new Lk(t,n,r,i,u,d||null,f,l,a,o+1):n.isText?new Fk(t,n,r,i,u,f,a):new e(t,n,r,i,u,d||null,f,a,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(e.preserveWhitespace=`full`),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>G.empty)}return e}matchesNode(e,t,n){return this.dirty==0&&e.eq(this.node)&&Gk(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new qk(this,a&&a.node,e);Xk(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?Bw.none:this.node.child(i).marks,n,e),s.placeWidget(t,e,r)},(t,a,c,l)=>{s.syncToMarks(t.marks,n,e);let u;s.findNodeMatch(t,a,c,l)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,c,u,e)||s.updateNextNode(t,a,c,e,l,r)||s.addNode(t,a,c,e,r),r+=t.nodeSize}),s.syncToMarks([],n,e),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==2)&&(a&&this.protectLocalComposition(e,a),Rk(this.contentDOM,this.children,e),GO&&Lse(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof fD)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=Rse(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}else return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&=void 0}let a=new jk(this,i,t,r);e.input.compositionNodes.push(a),this.children=Zk(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==3||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(Gk(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=Hk(this.dom,this.nodeDOM,Vk(this.outerDeco,this.node,t),Vk(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function Pk(e,t,n,r,i){Wk(r,t,e);let a=new Nk(void 0,e,t,n,r,r,r,i,0);return a.contentDOM&&a.updateChildren(i,0),a}var Fk=class e extends Nk{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i,null,a,o,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==3||this.dirty!=0&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=0||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}},Ik=class extends kk{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==0&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},Lk=class extends Nk{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,c,l),this.spec=s}update(e,t,n,r){if(this.dirty==3)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function Rk(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=Kk(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof Mk){let t=r?r.previousSibling:e.lastChild;Rk(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=Kk(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const zk=function(e){e&&(this.nodeName=e)};zk.prototype=Object.create(null);const Bk=[new zk];function Vk(e,t,n){if(e.length==0)return Bk;let r=n?Bk[0]:new zk,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o)for(let e in o.nodeName&&i.push(r=new zk(o.nodeName)),o){let a=o[e];if(a==null)continue;n&&i.length==1&&i.push(r=new zk(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a)}}return i}function Hk(e,t,n,r){if(n==Bk&&r==Bk)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName?i=t:(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=Bk[0],i=t)}Uk(i,o||Bk[0],a)}return i}function Uk(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function Wk(e,t,n){return Hk(e,e,Bk,Vk(t,n,e.nodeType!=1))}function Gk(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Kk(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var qk=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Jk(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,i=this.stack.length>>1,a=Math.min(i,e.length);for(;r<a&&(r==i-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&e[r].type.spec.spanning!==!1;)r++;for(;r<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[i])&&!this.isLocked(n.dom)){r=t;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=Mk.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==3&&a.dom==a.contentDOM&&(a.dirty=2),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof Nk){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=3&&Gk(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=2,u.updateChildren(r,a+1),u.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!Gk(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=Nk.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=Nk.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new Ak(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Mk;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Fk)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((WO||HO)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new Ik(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}};function Jk(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof Mk)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function Yk(e,t){return e.type.side-t.type.side}function Xk(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u)if(d){d.sort(Yk);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c);let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function Lse(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function Rse(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function Zk(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&(a.push(i),i=void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function Qk(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(OO(n)){for(c=o;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&mD.isSelectable(e)&&i.parent&&!(e.isInline&&EO(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new mD(o==e?s:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=sA(e,u,s,n)}return l}function $k(e){return e.editable?e.hasFocus():lA(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function eA(e,t=!1){let n=e.state.selection;if(aA(e,n),$k(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&HO){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&bO(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Bse(e);else{let{anchor:r,head:i}=n,a,o;tA&&!(n instanceof fD)&&(n.$from.parent.inlineContent||(a=nA(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=nA(e,n.to))),e.docView.setSelection(r,i,e,t),tA&&(a&&iA(a),o&&iA(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&zse(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const tA=WO||HO&&UO<63;function nA(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(WO&&i&&i.contentEditable==`false`)return rA(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return rA(i);if(a)return rA(a)}}function rA(e){return e.contentEditable=`true`,WO&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function iA(e){e.contentEditable=`false`,e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function zse(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!$k(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function Bse(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i=r.nodeName==`IMG`;i?n.setStart(r.parentNode,_O(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&RO&&zO<=11&&(r.disabled=!0,r.disabled=!1)}function aA(e,t){if(t instanceof mD){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(oA(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else oA(e)}function oA(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function sA(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||fD.between(t,n,r)}function cA(e){return e.editable&&!e.hasFocus()?!1:lA(e)}function lA(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function Vse(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return bO(t.node,t.offset,n.anchorNode,n.anchorOffset)}function uA(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&cD.findFrom(a,t)}function dA(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function fA(e,t,n){let r=e.state.selection;if(r instanceof fD)if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return dA(e,new fD(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=uA(e.state,t);return n&&n instanceof mD?dA(e,n):!1}else if(!(KO&&n.indexOf(`m`)>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?mD.isSelectable(i)?dA(e,new mD(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):YO?dA(e,new fD(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1:!1}}else return!1;else if(r instanceof mD&&r.node.isInline)return dA(e,new fD(t>0?r.$to:r.$from));else{let n=uA(e.state,t);return n?dA(e,n):!1}}function pA(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function mA(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`)}function hA(e,t){return t<0?Hse(e):Use(e)}function Hse(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(BO&&n.nodeType==1&&r<pA(n)&&mA(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let e=n.childNodes[r-1];if(mA(e,-1))i=n,a=--r;else if(e.nodeType==3)n=e,r=n.nodeValue.length;else break}}else if(gA(n))break;else{let t=n.previousSibling;for(;t&&mA(t,-1);)i=n.parentNode,a=_O(t),t=t.previousSibling;if(t)n=t,r=pA(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?_A(e,n,r):i&&_A(e,i,a)}function Use(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=pA(n),a,o;for(;;)if(r<i){if(n.nodeType!=1)break;let e=n.childNodes[r];if(mA(e,1))a=n,o=++r;else break}else if(gA(n))break;else{let t=n.nextSibling;for(;t&&mA(t,1);)a=t.parentNode,o=_O(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=pA(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&_A(e,a,o)}function gA(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Wse(e,t){for(;e&&t==e.childNodes.length&&!DO(e);)t=_O(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=0}}function Gse(e,t){for(;e&&!t&&!DO(e);)t=_O(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function _A(e,t,n){if(t.nodeType!=3){let e,r;(r=Wse(t,n))?(t=r,n=0):(e=Gse(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(OO(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&eA(e)},50)}function vA(e,t){let n=e.state.doc.resolve(t);if(!(HO||qO)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}let r=getComputedStyle(e.dom).direction;return r==`rtl`?`rtl`:`ltr`}function yA(e,t,n){let r=e.state.selection;if(r instanceof fD&&!r.empty||n.indexOf(`s`)>-1||KO&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=uA(e.state,t);if(n&&n instanceof mD)return dA(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof gD?cD.near(n,t):cD.findFrom(n,t);return o?dA(e,o):!1}return!1}function bA(e,t){if(!(e.state.selection instanceof fD))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function xA(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Kse(e){if(!WO||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable==`false`){let n=t.firstChild;xA(e,n,`true`),setTimeout(()=>xA(e,n,`false`),20)}return!1}function qse(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function Jse(e,t){let n=t.keyCode,r=qse(t);if(n==8||KO&&n==72&&r==`c`)return bA(e,-1)||hA(e,-1);if(n==46&&!t.shiftKey||KO&&n==68&&r==`c`)return bA(e,1)||hA(e,1);if(n==13||n==27)return!0;if(n==37||KO&&n==66&&r==`c`){let t=n==37?vA(e,e.state.selection.from)==`ltr`?-1:1:-1;return fA(e,t,r)||hA(e,t)}else if(n==39||KO&&n==70&&r==`c`){let t=n==39?vA(e,e.state.selection.from)==`ltr`?1:-1:1;return fA(e,t,r)||hA(e,t)}else if(n==38||KO&&n==80&&r==`c`)return yA(e,-1,r)||hA(e,-1);else if(n==40||KO&&n==78&&r==`c`)return Kse(e)||yA(e,1,r)||hA(e,1);else if(r==(KO?`m`:`c`)&&(n==66||n==73||n==89||n==90))return!0;return!1}function SA(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||KT.fromSchema(e.state.schema),s=AA(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&l.nodeType==1&&(u=kA[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}l&&l.nodeType==1&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`);let f=e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
|
|
179
|
+
|
|
180
|
+
`);return{dom:c,text:f,slice:t}}function CA(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return t?new K(G.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
181
|
+
`))),0,0):K.empty;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=KT.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=$se(n),YO&&ece(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&e.nodeType!=1;)e=e.nextSibling;if(!e)break;o=e}if(!s){let t=e.someProp(`clipboardParser`)||e.someProp(`domParser`)||FT.fromSchema(e.state.schema);s=t.parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!Yse.test(e.parentNode.nodeName)?{ignore:!0}:null}})}if(u)s=tce(OA(s,+u[1],+u[2]),u[4]);else if(s=K.maxOpen(Xse(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=OA(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e)}),s}const Yse=/^(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)$/i;function Xse(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n),i=r.contentMatchAt(t.index(n)),a,o=[];if(e.forEach(e=>{if(!o)return;let t=i.findWrapping(e.type),n;if(!t)return o=null;if(n=o.length&&a.length&&TA(t,a,e,o[o.length-1],0))o[o.length-1]=n;else{o.length&&(o[o.length-1]=EA(o[o.length-1],a.length));let n=wA(e,t);o.push(n),i=i.matchType(n.type),a=t}}),o)return G.from(o)}return e}function wA(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,G.from(e));return e}function TA(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=TA(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));let o=r.contentMatchAt(r.childCount);if(o.matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(G.from(wA(n,e,i+1))))}}function EA(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,EA(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(G.empty,!0);return e.copy(n.append(r))}function DA(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=DA(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(G.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function OA(e,t,n){return t<e.openStart&&(e=new K(DA(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new K(DA(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const kA={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]};let Zse=null;function AA(){return document.implementation.createHTMLDocument(`title`)}let jA=null;function Qse(e){let t=window.trustedTypes;return t?(jA||=t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e}),jA.createHTML(e)):e}function $se(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=AA().createElement(`div`),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&kA[r[1].toLowerCase()])&&(e=i.map(e=>`<`+e+`>`).join(``)+e+i.map(e=>`</`+e+`>`).reverse().join(``)),n.innerHTML=Qse(e),i)for(let e=0;e<i.length;e++)n=n.querySelector(i[e])||n;return n}function ece(e){let t=e.querySelectorAll(HO?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function tce(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;i=G.from(t.create(r[e+1],i)),a++,o++}return new K(i,a,o)}const MA={},NA={},nce={touchstart:!0,touchmove:!0};var rce=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function ice(e){for(let t in MA){let n=MA[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{oce(e,t)&&!IA(e,t)&&(e.editable||!(t.type in NA))&&n(e,t)},nce[t]?{passive:!0}:void 0)}WO&&e.dom.addEventListener(`input`,()=>null),FA(e)}function PA(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ace(e){for(let t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function FA(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>IA(e,t))})}function IA(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function oce(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function sce(e,t){!IA(e,t)&&MA[t.type]&&(e.editable||!(t.type in NA))&&MA[t.type](e,t)}NA.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!HA(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(JO&&HO&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),GO&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,kO(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||Jse(e,n)?n.preventDefault():PA(e,`key`)},NA.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},NA.keypress=(e,t)=>{let n=t;if(HA(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||KO&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof fD)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode);!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t))&&e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};function LA(e){return{left:e.clientX,top:e.clientY}}function cce(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function RA(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function zA(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n==`pointer`&&r.setMeta(`pointer`,!0),e.dispatch(r)}function lce(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&mD.isSelectable(r)?(zA(e,new mD(n),`pointer`),!0):!1}function uce(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof mD&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(mD.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i==null?!1:(zA(e,mD.create(e.state.doc,i),`pointer`),!0)}function dce(e,t,n,r,i){return RA(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?uce(e,n):lce(e,n))}function fce(e,t,n,r){return RA(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function pce(e,t,n,r){return RA(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||mce(e,n,r)}function mce(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(zA(e,fD.create(r,0,r.content.size),`pointer`),!0):!1;let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),a=i.before(t);if(n.inlineContent)zA(e,fD.create(r,a+1,a+1+n.content.size),`pointer`);else if(mD.isSelectable(n))zA(e,mD.create(r,a),`pointer`);else continue;return!0}}function BA(e){return GA(e)}const VA=KO?`metaKey`:`ctrlKey`;MA.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=BA(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&cce(n,e.input.lastClick)&&!n[VA]&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a};let o=e.posAtCoords(LA(n));o&&(a==`singleClick`?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new hce(e,o,n,!!r)):(a==`doubleClick`?fce:pce)(e,o.pos,o.inside,n)?n.preventDefault():PA(e,`pointer`))};var hce=class{constructor(e,t,n,r){this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[VA],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&s.dom.nodeType==1?s.dom:null;let{selection:c}=e.state;(n.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof mD&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&BO&&!this.target.hasAttribute(`contentEditable`))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute(`contentEditable`,`false`)},20),this.view.domObserver.start()),e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this)),PA(e,`pointer`)}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute(`draggable`),this.mightDrag.setUneditable&&this.target.removeAttribute(`contentEditable`),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>eA(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(LA(e))),this.updateAllowDefault(e),this.allowDefault||!t?PA(this.view,`pointer`):dce(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||WO&&this.mightDrag&&!this.mightDrag.node.isAtom||HO&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(zA(this.view,cD.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):PA(this.view,`pointer`)}move(e){this.updateAllowDefault(e),PA(this.view,`pointer`),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};MA.touchstart=e=>{e.input.lastTouch=Date.now(),BA(e),PA(e,`pointer`)},MA.touchmove=e=>{e.input.lastTouch=Date.now(),PA(e,`pointer`)},MA.contextmenu=e=>BA(e);function HA(e,t){return e.composing?!0:WO&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const gce=JO?5e3:-1;NA.compositionstart=NA.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof fD&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),GA(e,!0),e.markCursor=null;else if(GA(e,!t.selection.empty),BO&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&n.nodeType==1&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(t.nodeType==3){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}else n=t,r=-1}}e.input.composing=!0}UA(e,gce)},NA.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,UA(e,20))};function UA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>GA(e),t))}function WA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=vce());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function _ce(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=wO(t.focusNode,t.focusOffset),r=TO(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}function vce(){let e=document.createEvent(`Event`);return e.initEvent(`event`,!0,!0),e.timeStamp}function GA(e,t=!1){if(!(JO&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),WA(e),t||e.docView&&e.docView.dirty){let n=Qk(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function yce(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const KA=RO&&zO<15||GO&&XO<604;MA.copy=NA.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=KA?null:n.clipboardData,o=r.content(),{dom:s,text:c}=SA(e,o);a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,s.innerHTML),a.setData(`text/plain`,c)):yce(e,s),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function bce(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function xce(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?qA(e,r.value,null,i,t):qA(e,r.textContent,r.innerHTML,i,t)},50)}function qA(e,t,n,r,i){let a=CA(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||K.empty)))return!0;if(!a)return!1;let o=bce(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function JA(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}NA.paste=(e,t)=>{let n=t;if(e.composing&&!JO)return;let r=KA?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&qA(e,JA(r),r.getData(`text/html`),i,n)?n.preventDefault():xce(e,n)};var YA=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}};const XA=KO?`altKey`:`ctrlKey`;for(let e in MA.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(LA(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof mD?i.to-1:i.to))){if(r&&r.mightDrag)o=mD.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=mD.create(e.state.doc,t.posBefore))}}let s=(o||e.state.selection).content(),{dom:c,text:l,slice:u}=SA(e,s);(!n.dataTransfer.files.length||!HO||UO>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(KA?`Text`:`text/html`,c.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,KA||n.dataTransfer.setData(`text/plain`,l),e.dragging=new YA(u,!n[XA],o)},MA.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},NA.dragover=NA.dragenter=(e,t)=>t.preventDefault(),NA.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(LA(n));if(!i)return;let a=e.state.doc.resolve(i.pos),o=r&&r.slice;o?e.someProp(`transformPasted`,t=>{o=t(o,e)}):o=CA(e,JA(n.dataTransfer),KA?null:n.dataTransfer.getData(`text/html`),!1,a);let s=!!(r&&!n[XA]);if(e.someProp(`handleDrop`,t=>t(e,n,o||K.empty,s))){n.preventDefault();return}if(!o)return;n.preventDefault();let c=o?VE(e.state.doc,a.pos,o):a.pos;c??=a.pos;let l=e.state.tr;if(s){let{node:e}=r;e?e.replace(l):l.deleteSelection()}let u=l.mapping.map(c),d=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,f=l.doc;if(d?l.replaceRangeWith(u,u,o.content.firstChild):l.replaceRange(u,u,o),l.doc.eq(f))return;let p=l.doc.resolve(u);if(d&&mD.isSelectable(o.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new mD(p));else{let t=l.mapping.map(c);l.mapping.maps[l.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),l.setSelection(sA(e,p,l.doc.resolve(t)))}e.focus(),e.dispatch(l.setMeta(`uiEvent`,`drop`))},MA.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&eA(e)},20))},MA.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},MA.beforeinput=(e,t)=>{let n=t;if(HO&&JO&&n.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,kO(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}},NA)MA[e]=NA[e];function ZA(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var QA=class e{constructor(e,t){this.toDOM=e,this.spec=t||nj,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new ej(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ZA(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},$A=class e{constructor(e,t){this.attrs=e,this.spec=t||nj}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new ej(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&ZA(this.attrs,t.attrs)&&ZA(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},Sce=class e{constructor(e,t){this.attrs=e,this.spec=t||nj}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new ej(i.pos-n,a.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&&ZA(this.attrs,t.attrs)&&ZA(this.spec,t.spec)}destroy(){}},ej=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new QA(n,r))}static inline(t,n,r,i){return new e(t,n,new $A(r,i))}static node(t,n,r,i){return new e(t,n,new Sce(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof $A}get widget(){return this.type instanceof QA}};const tj=[],nj={};var rj=class e{constructor(e,t){this.local=e.length?e:tj,this.children=t.length?t:tj}static create(e,t){return t.length?lj(t,e,0,nj):ij}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==ij||e.maps.length==0?this:this.mapInner(e,t,0,0,n||nj)}mapInner(t,n,r,i,a){let o;for(let e=0;e<this.local.length;e++){let s=this.local[e].map(t,r,i);s&&s.type.valid(n,s)?(o||=[]).push(s):a.onRemove&&a.onRemove(this.local[e].spec)}return this.children.length?Cce(this.children,o||[],t,n,r,i,a):o?new e(o.sort(uj),tj):ij}add(t,n){return n.length?this==ij?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=sj(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,lj(s,e,o+1,nj)),a+=3}});let o=oj(a?cj(n):n,-r);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new e(o.length?this.local.concat(o).sort(uj):this.local,i||this.children)}remove(e){return e.length==0||this==ij?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==ij?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):ij}forChild(t,n){if(this==ij)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof $A){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(uj),tj);return r?new aj([t,r]):t}return r||ij}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return dj(this.localsInner(e))}localsInner(e){if(this==ij)return tj;if(e.inlineContent||!this.local.some($A.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof $A||t.push(this.local[e]);return t}forEachSet(e){e(this)}};rj.empty=new rj([],[]),rj.removeOverlap=dj;const ij=rj.empty;var aj=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,nj));return e.from(r)}forChild(t,n){if(n.isLeaf)return rj.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=ij&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(!t)t=i;else{n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}}return t?dj(n?t:t.sort(uj)):tj}static from(t){switch(t.length){case 0:return ij;case 1:return t[0];default:return new e(t.every(e=>e instanceof rj)?t:t.reduce((e,t)=>e.concat(t instanceof rj?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function Cce(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1),f=d-i,{index:p,offset:m}=r.content.findIndex(u),h=r.maybeChild(p);if(h&&m==u&&m+h.nodeSize==f){let r=s[t+2].mapInner(n,h,l+1,e[t]+a+1,o);r==ij?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=f,s[t+2]=r)}else c=!0}if(c){let c=wce(s,e,t,n,i,a,o),l=lj(c,r,0,o);t=l.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<l.children.length;e+=3){let n=l.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,l.children[e],l.children[e+1],l.children[e+2])}}return new rj(t.sort(uj),s)}function oj(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new ej(i.from+t,i.to+t,i.type))}return n}function wce(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function sj(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function cj(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function lj(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=sj(e,t,o+n);if(s){a=!0;let e=lj(s,t,n+o+1,r);e!=ij&&i.push(o,o+t.nodeSize,e)}});let o=oj(a?cj(e):e,-n).sort(uj);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||(r.onRemove&&r.onRemove(o[e].spec),o.splice(e--,1));return o.length||i.length?new rj(o,i):ij}function uj(e,t){return e.from-t.from||e.to-t.to}function dj(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),fj(t,i+1,a.copy(r.to,a.to)));continue}else{a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),fj(t,i,r.copy(a.from,r.to)));break}}}return t}function fj(e,t,n){for(;t<e.length&&uj(n,e[t])>0;)t++;e.splice(t,0,n)}function pj(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=ij&&t.push(r)}),e.cursorWrapper&&t.push(rj.create(e.state.doc,[e.cursorWrapper.deco])),aj.from(t)}const Tce={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ece=RO&&zO<=11;var Dce=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},Oce=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Dce,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);RO&&zO<=11&&e.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),Ece&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Tce)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(cA(this.view)){if(this.suppressingSelectionUpdates)return eA(this.view);if(RO&&zO<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&bO(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=vO(n))t.add(n);for(let r=e.anchorNode;r;r=vO(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:`selection`,target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&cA(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(BO&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||jce(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&OO(n)&&(c=Qk(e))&&c.eq(cD.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,eA(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),kce(e)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||eA(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type==`attributes`&&(n==this.view.docView||e.attributeName==`contenteditable`||e.attributeName==`style`&&!e.oldValue&&!e.target.getAttribute(`style`))||!n||n.ignoreMutation(e))return null;if(e.type==`childList`){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),r.nodeType==3&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(RO&&zO<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?_O(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?_O(i):e.target.childNodes.length,c=n.localPosFromDOM(e.target,s,1);return{from:o,to:c}}else if(e.type==`attributes`)return{from:n.posAtStart-n.border,to:n.posAtEnd+n.border};else return this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}};let mj=new WeakMap,hj=!1;function kce(e){if(!mj.has(e)&&(mj.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=BO,hj)return;console.warn(`ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.`),hj=!0}}function gj(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return bO(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Ace(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return gj(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?gj(e,n):null}function jce(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function Mce(e,t,n){let{node:r,fromOffset:i,toOffset:a,from:o,to:s}=e.docView.parseRange(t,n),c=e.domSelectionRange(),l,u=c.anchorNode;if(u&&e.dom.contains(u.nodeType==1?u:u.parentNode)&&(l=[{node:u,offset:c.anchorOffset}],OO(c)||l.push({node:c.focusNode,offset:c.focusOffset})),HO&&e.input.lastKeyCode===8)for(let e=a;e>i;e--){let t=r.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){a=e;break}if(!n||n.size)break}let d=e.state.doc,f=e.someProp(`domParser`)||FT.fromSchema(e.state.schema),p=d.resolve(o),m=null,h=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:a,preserveWhitespace:p.parent.type.whitespace==`pre`?`full`:!0,findPositions:l,ruleFromNode:Nce,context:p});if(l&&l[0].pos!=null){let e=l[0].pos,t=l[1]&&l[1].pos;t??=e,m={anchor:e+o,head:t+o}}return{doc:h,sel:m,from:o,to:s}}function Nce(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName==`BR`&&e.parentNode){if(WO&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}else if(e.parentNode.lastChild==e||WO&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName==`IMG`&&e.getAttribute(`mark-placeholder`))return{ignore:!0};return null}const Pce=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Fce(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Qk(e,t);if(n&&!e.state.selection.eq(n)){if(HO&&JO&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,kO(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=Mce(e,t,n),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=Rce(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(GO&&e.input.lastIOSEnter>Date.now()-225||JO)&&i.some(e=>e.nodeType==1&&!Pce.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,kO(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof fD&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=_j(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof fD&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),RO&&zO<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA,y;if((GO&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&h.pos<l.doc.content.size&&!h.sameParent(g)&&(y=cD.findFrom(l.doc.resolve(h.pos+1),1,!0))&&y.head==g.pos)&&e.someProp(`handleKeyDown`,t=>t(e,kO(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&Lce(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,kO(8,`Backspace`)))){JO&&HO&&e.domObserver.suppressSelectionUpdates();return}HO&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),JO&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,kO(13,`Enter`))})},20));let b=m.start,x=m.endA,S,C,w;if(v){if(h.pos==g.pos)RO&&zO<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>eA(e),20)),S=e.state.tr.delete(b,x),C=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(w=Ice(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start()))))S=e.state.tr,w.type==`add`?S.addMark(b,x,w.mark):S.removeMark(b,x,w.mark);else if(h.parent.child(h.index()).isText&&h.index()==g.index()-(g.textOffset?0:1)){let t=h.parent.textBetween(h.parentOffset,g.parentOffset);if(e.someProp(`handleTextInput`,n=>n(e,b,x,t)))return;S=e.state.tr.insertText(t,b,x)}}if(S||=e.state.tr.replace(b,x,l.doc.slice(m.start-l.from,m.endB-l.from)),l.sel){let t=_j(e,S.doc,l.sel);t&&!(HO&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==b||t.head==S.mapping.map(x)-1)||RO&&t.empty&&t.head==b)&&S.setSelection(t)}C&&S.ensureMarks(C),a&&S.setMeta(`composition`,a),e.dispatch(S.scrollIntoView())}function _j(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:sA(e,t.resolve(n.anchor),t.resolve(n.head))}function Ice(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(G.from(l).eq(e))return{mark:s,type:o}}function Lce(e,t,n,r,i){if(n-t<=i.pos-r.pos||vj(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve(vj(a,!0,!0));return!o.parent.isTextblock||o.pos>n||vj(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function vj(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function Rce(e,t,n,r,i){let a=e.findDiffStart(t,n);if(a==null)return null;let{a:o,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(i==`end`){let e=Math.max(0,a-Math.min(o,s));r-=o+e-a}if(o<a&&e.size<t.size){let e=r<=a&&r>=o?a-r:0;a-=e,a&&a<t.size&&yj(t.textBetween(a-1,a+1))&&(a+=e?1:-1),s=a+(s-o),o=a}else if(s<a){let t=r<=a&&r>=s?a-r:0;a-=t,a&&a<e.size&&yj(e.textBetween(a-1,a+1))&&(a+=t?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function yj(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}var zce=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new rce,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(wj),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement(`div`),e&&(e.appendChild?e.appendChild(this.dom):typeof e==`function`?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Sj(this),xj(this),this.nodeViews=Cj(this),this.docView=Pk(this.state.doc,bj(this),pj(this),this.dom,this),this.domObserver=new Oce(this,(e,t,n,r)=>Fce(this,e,t,n,r)),this.domObserver.start(),ice(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;for(let t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&FA(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(wj),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];for(let n in t.state=this.state,e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let r=this.state,i=!1,a=!1;e.storedMarks&&this.composing&&(WA(this),a=!0),this.state=e;let o=r.plugins!=e.plugins||this._props.plugins!=t.plugins;if(o||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=Cj(this);Vce(e,this.nodeViews)&&(this.nodeViews=e,i=!0)}(o||t.handleDOMEvents!=this._props.handleDOMEvents)&&FA(this),this.editable=Sj(this),xj(this);let s=pj(this),c=bj(this),l=r.plugins!=e.plugins&&!r.doc.eq(e.doc)?`reset`:e.scrollToSelection>r.scrollToSelection?`to selection`:`preserve`,u=i||!this.docView.matchesNode(e.doc,c,s);(u||!e.selection.eq(r.selection))&&(a=!0);let d=l==`preserve`&&a&&this.dom.style.overflowAnchor==null&&tk(this);if(a){this.domObserver.stop();let t=u&&(RO||HO)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&Bce(r.selection,e.selection);if(u){let n=HO?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=_ce(this)),(i||!this.docView.update(e.doc,c,s,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Pk(e.doc,c,s,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Vse(this))?eA(this,t):(aA(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(n=this.dragging)?.node&&!r.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,r),l==`reset`?this.dom.scrollTop=0:l==`to selection`?this.scrollToSelection():d&&rk(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))&&!this.someProp(`handleScrollToSelection`,e=>e(this)))if(this.state.selection instanceof mD){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&ek(this,t.getBoundingClientRect(),e)}else ek(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size),i=e>0&&this.state.doc.nodeAt(e);i==n.node&&(r=e)}this.dragging=new YA(e.slice,e.move,r<0?void 0:mD.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(RO){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable==`false`)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&ok(this.dom),eA(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return mk(this,e)}coordsAtPos(e,t=1){return vk(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return Ok(this,t||this.state,e)}pasteHTML(e,t){return qA(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return qA(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return SA(this,e)}destroy(){this.docView&&(ace(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],pj(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return sce(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?WO&&this.root.nodeType===11&&AO(this.dom.ownerDocument)==this.dom&&Ace(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};function bj(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[ej.node(0,e.state.doc.content.size,t)]}function xj(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:ej.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Sj(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function Bce(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function Cj(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function Vce(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function wj(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}var Hce=s(((exports,t)=>{t.exports=e=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}})),Uce=u(Hce());function Wce(e){return!!(e.prev&&e.next&&e.prev.text.full!==e.next.text.full)}function Gce(e){return!!(e.prev&&e.next&&e.prev.range.cursor!==e.next.range.cursor)}function Kce(e){return!!(!e.prev&&e.next)}function qce(e){return!!(e.prev&&!e.next)}function Jce(e){return!!(e.prev&&e.next&&e.prev.range.from!==e.next.range.from)}function Yce(e){return e===`invalid-exit-split`}var Xce=[`jump-backward-exit`,`jump-forward-exit`],Zce=[`jump-backward-change`,`jump-forward-change`];function Qce(e){return qC(Xce,e.exit?.exitReason)||qC(Zce,e.change?.changeReason)}function Tj(e){return!!(e&&e.query.full.length>=e.suggester.matchOffset)}function Ej(e){return iw(e)&&e instanceof fD}function Dj(e){let{match:t,changeReason:n,exitReason:r}=e;return{...t,changeReason:n,exitReason:r}}function $ce(e,t){let{invalidPrefixCharacters:n,validPrefixCharacters:r}=t;if(n){let t=new RegExp(Fj(n));return!t.test(e)}{let t=new RegExp(Fj(r));return t.test(e)}}function ele(e){let{text:t,regexp:n,$pos:r,suggester:i}=e,a=r.start(),o;return lw(t,n).forEach(e=>{let t=e.input.slice(Math.max(0,e.index-1),e.index);if($ce(t,i)){let t=e.index+a,n=e[0],s=e[1];if(!$C(n)||!$C(s))return;let c=t+n.length,l=Math.min(c,r.pos),u=l-t;t<r.pos&&c>=r.pos&&(o={range:{from:t,to:c,cursor:l},match:e,query:{partial:n.slice(s.length,u),full:n.slice(s.length)},text:{partial:n.slice(0,u),full:n},textAfter:r.doc.textBetween(c,r.end(),TC,TC),textBefore:r.doc.textBetween(a,t,TC,TC),suggester:i})}}),o}function Oj(e){let{$pos:t,suggester:n}=e,{char:r,name:i,startOfLine:a,supportedCharacters:o,matchOffset:s,multiline:c,caseInsensitive:l,unicode:u}=n,d=lle({char:r,matchOffset:s,startOfLine:a,supportedCharacters:o,multiline:c,caseInsensitive:l,unicode:u}),f=t.doc.textBetween(t.before(),t.end(),TC,TC);return ele({suggester:n,text:f,regexp:d,$pos:t,char:r,name:i})}function kj(e){let{state:t,match:n}=e;try{return Oj({$pos:t.doc.resolve(n.range.cursor),suggester:n.suggester})}catch{return}}function Aj(e){let{prev:t,next:n,state:r}=e;return!n&&t.range.from>=r.doc.nodeSize?{exit:Dj({match:t,exitReason:`delete`})}:!n||!t.query.partial?{exit:Dj({match:t,exitReason:`invalid-exit-split`})}:t.range.to===n.range.cursor?{exit:Dj({match:n,exitReason:`exit-end`})}:t.query.partial?{exit:Dj({match:n,exitReason:`exit-split`})}:{}}function tle(e){let{prev:t,next:n,state:r}=e,i=U(),a=kj({state:r,match:t}),{exit:o}=a&&a.query.full!==t.query.full?Aj({prev:t,next:a,state:r}):i,s=t.range.from<n.range.from;return s?{exit:o??Dj({match:t,exitReason:`jump-forward-exit`}),change:Dj({match:n,changeReason:`jump-forward-change`})}:{exit:o??Dj({match:t,exitReason:`jump-backward-exit`}),change:Dj({match:n,changeReason:`jump-backward-change`})}}function nle(e){let{match:t,state:n,$pos:r}=e,{selection:i}=n,a=kj({match:t,state:n});return!a||a.text.full!==t.text.full?Aj({prev:t,next:a,state:n}):!i.empty&&(i.from<=t.range.from||i.to>=t.range.to)?{exit:Dj({match:t,exitReason:`selection-outside`})}:r.pos>t.range.to?{exit:Dj({match:t,exitReason:`move-end`})}:r.pos<=t.range.from?{exit:Dj({match:t,exitReason:`move-start`})}:{}}function rle(e){let{prev:t,next:n,state:r,$pos:i}=e,a=U();if(!t&&!n)return a;let o={prev:t,next:n};return Jce(o)?tle({prev:o.prev,next:o.next,state:r}):Kce(o)?{change:Dj({match:o.next,changeReason:`start`})}:qce(o)?nle({$pos:i,match:o.prev,state:r}):Wce(o)?{change:Dj({match:o.next,changeReason:`change-character`})}:Gce(o)?{change:Dj({match:o.next,changeReason:r.selection.empty?`move`:`selection-inside`})}:a}function jj(e,t){for(let n=e.depth;n>0;n--){let r=e.node(n);if(t.includes(r.type.name))return!0}return!1}function Mj(e,t){let{$from:n,$to:r}=e;return Nj(e,t)?!0:Cw(n.pos,r.pos).some(e=>ile(n.doc.resolve(e),t))}function Nj(e,t){let{$from:n,$to:r}=e,i=new Set((n.marksAcross(r)??[]).map(e=>e.type.name));return t.some(e=>i.has(e))}function ile(e,t){let n=new Set(e.marks().map(e=>e.type.name));return t.some(e=>n.has(e))}function ale(e,t){let{$cursor:n}=t,{validMarks:r,validNodes:i,invalidMarks:a,invalidNodes:o}=e;return!r&&!i&&sw(a)&&sw(o)?!0:!(r&&!Nj(t,r)||i&&!jj(n,i)||!r&&Mj(t,a)||!i&&jj(n,o))}function Pj(e){let{suggesters:t,$pos:n,selectionEmpty:r}=e;for(let e of t){if(e.emptySelectionsOnly&&!r)continue;try{let t=Oj({suggester:e,$pos:n});if(!t)continue;let r={$from:n.doc.resolve(t.range.from),$to:n.doc.resolve(t.range.to),$cursor:n};if(ale(e,r)&&e.isValidPosition(r,t))return t}catch{}}}function Fj(e){return lse(e)?e.source:e}function ole(e){return e?`^`:``}function sle(e,t){return`(?:${Fj(e)}){${t},}`}function cle(e){return $C(e)?new RegExp((0,Uce.default)(e)):e}function lle(e){let{char:t,matchOffset:n,startOfLine:r,supportedCharacters:i,captureChar:a=!0,caseInsensitive:o=!1,multiline:s=!1,unicode:c=!1}=e,l=`g${s?`m`:``}${o?`i`:``}${c?`u`:``}`,u=cle(t).source;return a&&(u=`(${u})`),RegExp(`${ole(r)}${u}${sle(i,n)}`,l)}var ule={appendTransaction:!1,priority:50,ignoredTag:`span`,matchOffset:0,disableDecorations:!1,startOfLine:!1,suggestClassName:`suggest`,suggestTag:`span`,supportedCharacters:/\w+/,validPrefixCharacters:/^[\s\0]?$/,invalidPrefixCharacters:null,ignoredClassName:null,invalidMarks:[],invalidNodes:[],validMarks:null,validNodes:null,isValidPosition:()=>!0,checkNextValidSelection:null,emptySelectionsOnly:!1,caseInsensitive:!1,multiline:!1,unicode:!1,captureChar:!0},Ij=`__ignore_prosemirror_suggest_update__`,dle=class e{static create(t){return new e(t)}#docChanged=!1;#ignoreNextExit=!1;#suggesters;#next;#prev;#handlerMatches=U();view;#ignored=rj.empty;#removed=!1;#lastChangeFromAppend=!1;get decorationSet(){return this.#ignored}get removed(){return this.#removed}get match(){return this.#next?this.#next:this.#prev&&this.#handlerMatches.exit?this.#prev:void 0}constructor(e){let t=Lj();this.#suggesters=e.map(t),this.#suggesters=vw(this.#suggesters,(e,t)=>t.priority-e.priority)}init(e){return this.view=e,this}setMarkRemoved=()=>{this.#removed=!0};createProps(e){let{name:t,char:n}=e.suggester;return{view:this.view,addIgnored:this.addIgnored,clearIgnored:this.clearIgnored,ignoreNextExit:this.ignoreNextExit,setMarkRemoved:this.setMarkRemoved,name:t,char:n,...e}}shouldRunExit(){return this.#ignoreNextExit?(this.#ignoreNextExit=!1,!1):!0}findNextTextSelection=e=>{let t=e.$from.doc,n=Math.min(t.nodeSize-2,e.to+1),r=t.resolve(n),i=cD.findFrom(r,1,!0);if(Ej(i))return i};updateWithNextSelection(e){let t=this.findNextTextSelection(e.selection);if(t)for(let n of this.#suggesters){let r=this.#handlerMatches.change?.suggester.name,i=this.#handlerMatches.exit?.suggester.name;n.checkNextValidSelection?.(t.$from,e,{change:r,exit:i})}}changeHandler(e,t){let{change:n,exit:r}=this.#handlerMatches,i=this.match;if(!n&&!r||!Tj(i))return;let a=t===r?.suggester.appendTransaction&&this.shouldRunExit(),o=t===n?.suggester.appendTransaction;if(!(!a&&!o)){if(n&&r&&Qce({change:n,exit:r})){let t=this.createProps(r),i=this.createProps(n);r.range.from,n.range.from,a&&r.suggester.onChange(t,e),o&&n.suggester.onChange(i,e),a&&(this.#removed=!1);return}n&&o&&n.suggester.onChange(this.createProps(n),e),r&&a&&(r.suggester.onChange(this.createProps(r),e),this.#removed=!1,Yce(r.exitReason)&&(this.#handlerMatches=U()))}}mapIgnoredDecorations(e){let t=this.#ignored.map(e.mapping,e.doc),n=t.find(),r=n.filter(({from:e,to:t,spec:n})=>{let r=$C(n.char)?n.char.length:1;return t-e!==r});this.#ignored=t.remove(r)}ignoreNextExit=()=>{this.#ignoreNextExit=!0};addIgnored=({from:e,name:t,specific:n=!1})=>{let r=this.#suggesters.find(e=>e.name===t);if(!r)throw Error(`No suggester exists for the name provided: ${t}`);let i=$C(r.char)?r.char.length:1,a=e+i,o=r.ignoredClassName?{class:r.ignoredClassName}:{},s=ej.inline(e,a,{nodeName:r.ignoredTag,...o},{name:t,specific:n,char:r.char});this.#ignored=this.#ignored.add(this.view.state.doc,[s])};removeIgnored=({from:e,name:t})=>{let n=this.#suggesters.find(e=>e.name===t);if(!n)throw Error(`No suggester exists for the name provided: ${t}`);let r=$C(n.char)?n.char.length:1,i=this.#ignored.find(e,e+r)[0];!i||i.spec.name!==t||(this.#ignored=this.#ignored.remove([i]))};clearIgnored=e=>{if(!e){this.#ignored=rj.empty;return}let t=this.#ignored.find(),n=t.filter(({spec:t})=>t.name===e);this.#ignored=this.#ignored.remove(n)};shouldIgnoreMatch({range:e,suggester:{name:t}}){let n=this.#ignored.find(),r=n.some(({spec:n,from:r})=>r===e.from?n.specific?n.name===t:!0:!1);return r}resetState(){this.#handlerMatches=U(),this.#next=void 0,this.#removed=!1,this.#lastChangeFromAppend=!1}updateReasons(e){let{$pos:t,state:n}=e,r=this.#docChanged,i=this.#suggesters,a=n.selection.empty,o=Ej(n.selection)?Pj({suggesters:i,$pos:t,docChanged:r,selectionEmpty:a}):void 0;this.#next=o&&this.shouldIgnoreMatch(o)?void 0:o,this.#handlerMatches=rle({next:this.#next,prev:this.#prev,state:n,$pos:t})}findMatchAtPosition=(e,t)=>{let n=t?this.#suggesters.filter(e=>e.name===t):this.#suggesters;return Pj({suggesters:n,$pos:e,docChanged:!1,selectionEmpty:!0})};addSuggester(e){let t=this.#suggesters.find(t=>t.name===e.name),n=Lj();if(t)this.#suggesters=this.#suggesters.map(r=>r===t?n(e):r);else{let t=[...this.#suggesters,n(e)];this.#suggesters=vw(t,(e,t)=>t.priority-e.priority)}return()=>this.removeSuggester(e.name)}removeSuggester(e){let t=$C(e)?e:e.name;this.#suggesters=this.#suggesters.filter(e=>e.name!==t),this.clearIgnored(t)}toJSON(){return this.match}apply(e){let{exit:t,change:n}=this.#handlerMatches;if(this.#lastChangeFromAppend&&(this.#lastChangeFromAppend=!1,!t?.suggester.appendTransaction&&!n?.suggester.appendTransaction))return this;let{tr:r,state:i}=e,a=r.docChanged||r.selectionSet,o=r.getMeta(Ij);return o||!a&&!this.#removed?this:(this.#docChanged=r.docChanged,this.mapIgnoredDecorations(r),t&&this.resetState(),this.#prev=this.#next,this.updateReasons({$pos:r.selection.$from,state:i}),this)}createDecorations(e){let t=this.match;if(!Tj(t))return this.#ignored;let{disableDecorations:n}=t.suggester,r=tw(n)?n(e,t):n;if(r)return this.#ignored;let{range:i,suggester:a}=t,{name:o,suggestTag:s,suggestClassName:c}=a,{from:l,to:u}=i;return this.shouldIgnoreMatch(t)?this.#ignored:this.#ignored.add(e.doc,[ej.inline(l,u,{nodeName:s,class:o?`${c} suggest-${o}`:c},{name:o})])}setLastChangeFromAppend=()=>{this.#lastChangeFromAppend=!0}};function Lj(){let e=new Set;return t=>{if(e.has(t.name))throw Error(`A suggester already exists with the name '${t.name}'. The name provided must be unique.`);let n={...ule,...t};return e.add(t.name),n}}var Rj=new AD(`suggest`);function zj(e){return Rj.getState(e)}function Bj(e,t){return zj(e).addSuggester(t)}function Vj(e){e.setMeta(Ij,!0)}function fle(e,t){return zj(e).removeSuggester(t)}function ple(...e){let t=dle.create(e);return new DD({key:Rj,view:e=>(t.init(e),{update:e=>t.changeHandler(e.state.tr,!1)}),state:{init:()=>t,apply:(e,n,r,i)=>t.apply({tr:e,state:i})},appendTransaction:(e,n,r)=>{let i=r.tr;return t.updateWithNextSelection(i),t.changeHandler(i,!0),i.docChanged||i.steps.length>0||i.selectionSet||i.storedMarksSet?(t.setLastChangeFromAppend(),i):null},props:{decorations:e=>t.createDecorations(e)}})}function Hj(e,t){let n=Object.getPrototypeOf(t),r=e.selection,i=e.doc,a=e.storedMarks,o=U();for(let[e,n]of Object.entries(t))o[e]={value:n};return Object.create(n,{...o,storedMarks:{get(){return a}},selection:{get(){return r}},doc:{get(){return i}},tr:{get(){return r=e.selection,i=e.doc,a=e.storedMarks,e}}})}function Uj(e){return({state:t,dispatch:n,view:r,tr:i})=>e(Hj(i,t),n,r)}function Wj(e){return t=>(W(t.dispatch===void 0||t.dispatch===t.view?.dispatch,{code:H.NON_CHAINABLE_COMMAND}),e(t))}var mle=u(MD()),Gj={get isBrowser(){return!!(typeof window<`u`&&window.document!==void 0&&window.navigator&&window.navigator.userAgent)},get isJSDOM(){return Gj.isBrowser&&window.navigator.userAgent.includes(`jsdom`)},get isNode(){return typeof process<`u`&&process.versions!=null&&process.versions.node!=null},get isIos(){return Gj.isBrowser&&/iPod|iPhone|iPad/.test(navigator.platform)},get isMac(){return Gj.isBrowser&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)},get isApple(){return Gj.isNode?process.platform===`darwin`:Gj.isBrowser?/Mac|iPod|iPhone|iPad/.test(window.navigator.platform):!1},get isDevelopment(){return process.env.NODE_ENV===`development`},get isTest(){return process.env.NODE_ENV===`test`},get isProduction(){return process.env.NODE_ENV===`production`}};function Kj(e,t){var n;let r=FM(e);return(n=r?.getComputedStyle(e))?.getPropertyValue(t)??``}function qj(e){return iw(e)&&ew(e.nodeType)&&$C(e.nodeName)}function Jj(e){return qj(e)&&e.nodeType===1}function Yj(e){let{types:t,node:n}=e;if(!n)return!1;let r=e=>e===n.type||e===n.type.name;return ow(t)?t.some(r):r(t)}function Xj(e){let{predicate:t,selection:n}=e,r=lM(n)?n.selection.$from:dM(n)?n.$from:n;for(let e=r.depth;e>0;e--){let n=r.node(e),i=e>0?r.before(e):0,a=r.start(e),o=i+n.nodeSize;if(t(n,i))return{pos:i,depth:e,node:n,start:a,end:o}}}function hle(e){let{depth:t}=e,n=t>0?e.before(t):0,r=e.node(t),i=e.start(t),a=n+r.nodeSize;return{pos:n,start:i,node:r,end:a,depth:t}}function Zj(e){let{types:t,selection:n}=e;return Xj({predicate:e=>Yj({types:t,node:e}),selection:n})}function gle(e){let{types:t,selection:n}=e;if(!(!mM(n)||!Yj({types:t,node:n.node})))return{pos:n.$from.pos,depth:n.$from.depth,start:n.$from.start(),end:n.$from.pos+n.node.nodeSize,node:n.node}}function Qj(e){return dM(e)?e.empty:e.selection.empty}function _le(e){return e.docChanged||e.selectionSet}function vle(e){return!!$j(e)}function $j(e){let{state:t,type:n,attrs:r}=e,{selection:i,doc:a}=t,o=$C(n)?a.type.schema.nodes[n]:n;W(o,{code:H.SCHEMA,message:`No node exists for ${n}`});let s=gle({selection:i,types:n})??Xj({predicate:e=>e.type===o,selection:i});return!r||aw(r)||!s||s.node.hasMarkup(o,{...s.node.attrs,...r})?s:void 0}function eM(...e){return t=>{if(!cw(e))return!1;let[n,...r]=e,i=!1,a=(...e)=>()=>{if(!cw(e))return!1;i=!0;let[,...n]=e;return eM(...e)({...t,next:a(...n)})},o=a(...r),s=n({...t,next:o});return i||s?s:o()}}function yle(e,t){let n=new Map,r=U();for(let i of e)for(let[e,a]of WC(i)){let i=n.get(e)??[],o=[...i,a],s=eM(...o);n.set(e,o),r[e]=t(s)}return r}function ble(e){return yle(e,e=>(t,n,r)=>e({state:t,dispatch:n,view:r,tr:t.tr,next:()=>!1}))}function tM(e,t){let n=e.attrs??{};return Object.entries(t).every(([e,t])=>n[e]===t)}function nM(e){return iw(e)}function rM(e,t){return ow(t)?qC(t,e[OC]):t===e[OC]}function xle(e){return iw(e)&&e instanceof DT}function Sle(e,t){return $C(e)?HC(t.nodes,e):e}function iM(e){return iw(e)&&e instanceof AT}function aM(e,t){return $C(e)?HC(t.marks,e):e}function oM(e){return iw(e)&&e instanceof oT}function sM(e){return iw(e)&&e instanceof G}function cM(e){return iw(e)&&e instanceof Bw}function lM(e){return iw(e)&&e instanceof TD}function uM(e){return iw(e)&&e instanceof fD}function dM(e){return iw(e)&&e instanceof cD}function fM(e){return iw(e)&&e instanceof eT}function pM(e){let{trState:t,from:n,to:r,type:i,attrs:a={}}=e,{doc:o}=t,s=aM(i,o.type.schema);if(Object.keys(a).length===0)return o.rangeHasMark(n,r,s);let c=!1;return r>n&&o.nodesBetween(n,r,e=>{if(c)return!1;let t=e.marks??[];return c=t.some(e=>e.type===s?tM(e,a):!1),!c}),c}function mM(e){return iw(e)&&e instanceof mD}function hM(e){let{trState:t,type:n,attrs:r={},from:i,to:a}=e,{selection:o,doc:s,storedMarks:c}=t,l=$C(n)?s.type.schema.marks[n]:n;if(W(l,{code:H.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}),i&&a)try{return Math.max(i,a)<s.nodeSize&&pM({...e,from:i,to:a})}catch{return!1}if(o.empty){let e=c??o.$from.marks();return e.some(e=>e.type===n?tM(e,r??{}):!1)}return pM({...e,from:o.from,to:o.to})}function gM(e,t={}){let n=vM(e.type.schema);if(!n)return!1;let{ignoreAttributes:r,ignoreDocAttributes:i}=t;return r?_M(n,e):i?n.content.eq(e.content):n.eq(e)}function _M(e,t){if(e===t)return!0;let n=e.type===t.type&&Bw.sameSet(e.marks,t.marks);function r(){if(e.content===t.content)return!0;if(e.content.size!==t.content.size)return!1;let n=[],r=[];e.content.forEach(e=>n.push(e)),t.content.forEach(e=>r.push(e));for(let[e,t]of n.entries()){let n=r[e];if(!n||!_M(t,n))return!1}return!0}return n&&r()}function vM(e){var t;return(t=e.nodes.doc)?.createAndFill()??void 0}function yM(e){for(let t of Object.values(e.nodes)){if(t.name===`doc`)continue;if(t.isBlock||t.isTextblock)return t}W(!1,{code:H.SCHEMA,message:`No default block node found for the provided schema.`})}function bM(e){return e.type===yM(e.type.schema)}function xM(e){return!!e&&e.type.isBlock&&!e.textContent&&!e.childCount}function SM(e,t,n){let r=e.parent.childAfter(e.parentOffset);if(!r.node)return;let i=$C(t)?t:t.name,a=r.node.marks.find(({type:e})=>e.name===i),o=e.index(),s=e.start()+r.offset,c=o+1,l=s+r.node.nodeSize;if(!a)return n&&l<n.pos?SM(e.doc.resolve(l+1),t,n):void 0;for(;o>0&&a.isInSet(e.parent.child(o-1).marks);)--o,s-=e.parent.child(o).nodeSize;for(;c<e.parent.childCount&&a.isInSet(e.parent.child(c).marks);)l+=e.parent.child(c).nodeSize,c+=1;let u=e.doc.textBetween(s,l,wC,`
|
|
182
|
+
|
|
183
|
+
`);return{from:s,to:l,text:u,mark:a}}function CM(e){var t;return(t=e.content.firstChild)?.textContent??``}function wM(e,t){if(!uM(e.selection))return;let{from:n,to:r}=e.selection,i=(t,n)=>CM(fD.between(e.doc.resolve(t),e.doc.resolve(n)).content());for(let e=i(n-1,n);e&&!t.test(e);n--,e=i(n-1,n));for(let e=i(r,r+1);e&&!t.test(e);r++,e=i(r,r+1));if(n===r)return;let a=e.doc.textBetween(n,r,wC,`
|
|
184
|
+
|
|
185
|
+
`);return{from:n,to:r,text:a}}function TM(e){return wM(e,/\W/)}function EM(e,t=0){let n=ow(e)?e[t]:e;return UC($C(n),`No match string found for match ${e}`),n??``}function DM(e){return uM(e)?e.$cursor:void 0}function OM(e,t){return oM(e)?t?e.type===t.nodes.doc:e.type.name===`doc`:!1}function kM(e){return iw(e)&&ew(e.anchor)&&ew(e.head)}function AM(e,t){let n=t.nodeSize-2,r,i=e=>_w({min:0,max:n,value:e});if(dM(e))return e;if(e===`all`)return new gD(t);if(r=e===`start`?0:e===`end`?n:fM(e)?e.pos:e,ew(r))return r=i(r),fD.near(t.resolve(r));if(kM(r)){let e=i(r.anchor),n=i(r.head);return fD.between(t.resolve(e),t.resolve(n))}let a=i(r.from),o=i(r.to);return fD.between(t.resolve(a),t.resolve(o))}var jM=3;function MM(e){let{content:t,schema:n,document:r,stringHandler:i,onError:a,attempts:o=0}=e,s=a&&o<=jM||o===0;if(W(s,{code:H.INVALID_CONTENT,message:"The invalid content has been called recursively more than ${MAX_ATTEMPTS} times. The content is invalid and the error handler has not been able to recover properly."}),$C(t)){W(i,{code:H.INVALID_CONTENT,message:`The string '${t}' was added to the editor, but no \`stringHandler\` was added. Please provide a valid string handler which transforms your content to a \`ProsemirrorNode\` to prevent this error.`});let e={document:r,content:t,schema:n};return i(e)}if(lM(t))return t.doc;if(oM(t))return t;try{return n.nodeFromJSON(t)}catch(r){let i=UM({schema:n,error:r,json:t}),s=a?.(i);return W(s,{code:H.INVALID_CONTENT,message:`An error occurred when processing the content. Please provide an \`onError\` handler to process the invalid content: ${JSON.stringify(i.invalidContent,null,2)}`}),MM({...e,content:s,attempts:o+1})}}function NM(){let e=jD();if(e)return e;throw Error(`Unable to retrieve the document from the global scope.
|
|
186
|
+
It seems that you are running Remirror in a non-browser environment. Remirror need browser APIs to work.
|
|
187
|
+
If you are using Jest (or other testing frameworks), make sure that you are using the JSDOM environment (https://jestjs.io/docs/29.0/configuration#testenvironment-string).
|
|
188
|
+
If you are using Next.js (or other server-side rendering frameworks), please use dynamic import with \`ssr: false\` to load the editor component without rendering it on the server (https://nextjs.org/docs/advanced-features/dynamic-import#with-no-ssr).
|
|
189
|
+
If you are using Node.js, you can install JSDOM and Remirror will try to use it automatically, or you can create a fake document and pass it to Remirror`)}function PM(e){var t;return e?.defaultView??(typeof window<`u`?window:void 0)??(t=jD())?.defaultView}function FM(e){return PM(e?.ownerDocument)}function IM(e){let t=PM(e)??NM().defaultView;if(t)return t;throw Error(`Unable to retrieve the window from the global scope`)}function LM(e,t=NM()){let n=OM(e,e.type.schema)?e.content:G.from(e);return KT.fromSchema(e.type.schema).serializeFragment(n,{document:t})}function RM(e,t){let n=new(IM(t)).DOMParser;return n.parseFromString(`<body>${e}</body>`,`text/html`).body}function zM(e,t=NM()){let n=t.createElement(`div`);return n.append(LM(e,t)),n.innerHTML}function BM(e){let{content:t,schema:n,document:r,fragment:i=!1,...a}=e,o=RM(t,r),s=FT.fromSchema(n);return i?s.parseSlice(o,{...VM,...a}).content:s.parse(o,{...VM,...a})}var VM={preserveWhitespace:!1},HM={remove(e,t){let n=e;for(let e of t){if(e.invalidParentNode)continue;n=bw(e.path,n)}return n}};function UM({json:e,schema:t,...n}){let r=new Set(GC(t.marks)),i=new Set(GC(t.nodes)),a=WM({json:e,path:[],validNodes:i,validMarks:r});return{json:e,invalidContent:a,transformers:HM,...n}}function WM(e){let{json:t,validMarks:n,validNodes:r,path:i=[]}=e,a={validMarks:n,validNodes:r},o=[],{type:s,marks:c,content:l}=t,{invalidParentMark:u=!1,invalidParentNode:d=!1}=e;if(c){let e=[];for(let[t,r]of c.entries()){let a=$C(r)?r:r.type;if(n.has(a))continue;e.unshift({name:a,path:[...i,`marks`,`${t}`],type:`mark`,invalidParentMark:u,invalidParentNode:d}),u=!0}o.push(...e)}if(r.has(s)||(o.push({name:s,type:`node`,path:i,invalidParentMark:u,invalidParentNode:d}),d=!0),l){let e=[];for(let[t,n]of l.entries())e.unshift(...WM({...a,json:n,path:[...i,`content`,`${t}`],invalidParentMark:u,invalidParentNode:d}));o.unshift(...e)}return o}function GM(e){return!!(uM(e)&&e.$cursor&&e.$cursor.parentOffset>=e.$cursor.parent.content.size)}function KM(e){return!!(uM(e)&&e.$cursor&&e.$cursor.parentOffset<=0)}function qM(e){let t=cD.atStart(e.$anchor.doc);return!!(KM(e)&&t.anchor===e.anchor)}function JM({tr:e,dispatch:t}){let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&SE(i);return!ew(a)||!i?!1:(t?.(e.lift(i,a).scrollIntoView()),!0)}function YM(e,t={},n){return function(r){let{tr:i,dispatch:a,state:o}=r,s=$C(e)?HC(o.schema.nodes,e):e,{from:c,to:l}=AM(n??i.selection,i.doc),u=i.doc.resolve(c),d=i.doc.resolve(l),f=u.blockRange(d),p=f&&wE(f,s,t);return!p||!f?!1:(a?.(i.wrap(f,p).scrollIntoView()),!0)}}function XM(e,t={},n){return r=>{let{tr:i,state:a}=r,o=$C(e)?HC(a.schema.nodes,e):e,s=$j({state:i,type:o,attrs:t});return s?JM(r):YM(e,t,n)(r)}}function ZM(e,t,n,r=!0){return function(i){let{tr:a,dispatch:o,state:s}=i,c=$C(e)?HC(s.schema.nodes,e):e,{from:l,to:u}=AM(n??a.selection,a.doc),d=!1,f;return a.doc.nodesBetween(l,u,(e,n)=>{if(d)return!1;if(!e.isTextblock||e.hasMarkup(c,t))return;if(e.type===c){d=!0,f=e.attrs;return}let r=a.doc.resolve(n),i=r.index();d=r.parent.canReplaceWith(i,i+1,c),d&&(f=r.parent.attrs)}),d?(o?.(a.setBlockType(l,u,c,{...r?f:{},...t}).scrollIntoView()),!0):!1}}function QM(e){return t=>{let{tr:n,state:r}=t,{type:i,attrs:a,preserveAttrs:o=!0}=e,s=$j({state:n,type:i,attrs:a}),c=e.toggleType??yM(r.schema);if(s)return ZM(c,{...o?s.node.attrs:{},...a})(t);let l=$j({state:n,type:c,attrs:a});return ZM(i,{...o?l?.node.attrs:{},...a})(t)}}function $M(e=0){let t=navigator.userAgent.match(/Chrom(e|ium)\/(\d+)\./);return t?Number.parseInt(HC(t,2),10)>=e:!1}function eN(e,t){let{head:n,empty:r,anchor:i}=e;for(let e of t.steps){let t=e.getMap();n=t.map(n)}r?t.setSelection(fD.near(t.doc.resolve(n))):t.setSelection(fD.between(t.doc.resolve(i),t.doc.resolve(n)))}function tN(e){let{attrs:t={},appendText:n=``,content:r=``,keepSelection:i=!1,range:a}=e;return({state:o,tr:s,dispatch:c})=>{var l;let u=o.schema,d=AM(e.selection??a??s.selection,s.doc),f=d.$from.index(),{from:p,to:m,$from:h}=d,g=$C(e.type)?u.nodes[e.type]??u.marks[e.type]:e.type;if(W($C(e.type)?g:!0,{code:H.SCHEMA,message:`Schema contains no marks or nodes with name ${g}`}),xle(g)){if(!h.parent.canReplaceWith(f,f,g))return!1;s.replaceWith(p,m,g.create(t,r?u.text(r):void 0))}else W(r,{message:"`replaceText` cannot be called without content when using a mark type"}),s.replaceWith(p,m,u.text(r,iM(g)?[g.create(t)]:void 0));return n&&s.insertText(n),i&&eN(o.selection,s),c&&($M(60)&&((l=document.getSelection())==null||l.empty()),c(s)),!0}}function nN(e,t){let n=e.parent.childAfter(e.parentOffset);if(!n.node)return;let{marks:r,nodeSize:i}=n.node;if(r[0])return r[0].type;let a=e.start()+n.offset,o=a+i;return nN(e.doc.resolve(o+1),t)}function rN(e){return({dispatch:t,tr:n,state:r})=>{let{type:i,expand:a=!0,range:o}=e,s=AM(e.selection??o??n.selection,n.doc),{from:c,to:l,$from:u,$to:d}=s,f=$C(i)?r.schema.marks[i]:i;f!==null&&W(f,{code:H.SCHEMA,message:`Mark type: ${i} does not exist on the current schema.`});let p=f??nN(u);if(!p)return!1;let m=SM(u,p,d);return a&&m&&(c=Math.max(0,Math.min(c,m.from)),l=Math.min(Math.max(l,m.to),n.doc.nodeSize-2)),t?.(n.removeMark(c,ew(l)?l:c,iM(f)?f:void 0)),!0}}function iN(e){let{node:t,predicate:n,descend:r=!0,action:i}=e;W(oM(t),{code:H.INTERNAL,message:`Invalid "node" parameter passed to "findChildren".`}),W(tw(n),{code:H.INTERNAL,message:`Invalid "predicate" parameter passed to "findChildren".`});let a=[];return t.descendants((e,t)=>{let o={node:e,pos:t},s=n(o);return s?(a.push(o),i?.(o),r):r}),a}function aN({predicate:e}){return t=>iN({...t,predicate:e})}var Cle=aN({predicate:e=>e.node.isText}),wle=aN({predicate:e=>e.node.isInline}),Tle=aN({predicate:e=>e.node.isBlock});function oN(e){let{regexp:t,type:n,getAttributes:r,ignoreWhitespace:i=!1,beforeDispatch:a,updateCaptured:o,shouldSkip:s,invalidMarks:c}=e,l,u=new dO(t,(e,t,d,f)=>{let{tr:p,schema:m}=e;l||(l=$C(n)?m.marks[n]:n,W(l,{code:H.SCHEMA,message:`Mark type: ${n} does not exist on the current schema.`}));let h=t[1],g=t[0],_=sN({captureGroup:h,fullMatch:g,end:f,start:d,rule:u,state:e,ignoreWhitespace:i,invalidMarks:c,shouldSkip:s,updateCaptured:o});if(!_)return null;({start:d,end:f,captureGroup:h,fullMatch:g}=_);let v=tw(r)?r(t):r,y=f,b=[];if(h){let e=g.search(/\S/),t=d+g.indexOf(h),n=t+h.length;b=p.storedMarks??[],n<f&&p.delete(n,f),t>d&&p.delete(d+e,t),y=d+e+h.length}return p.addMark(d,y,l.create(v)),p.setStoredMarks(b),a?.({tr:p,match:t,start:d,end:f}),p});return u}function sN({captureGroup:e,fullMatch:t,end:n,start:r,rule:i,ignoreWhitespace:a,shouldSkip:o,updateCaptured:s,state:c,invalidMarks:l}){var u;if(t==null)return null;let d=s?.({captureGroup:e,fullMatch:t,start:r,end:n})??{};e=d.captureGroup??e,t=d.fullMatch??t,r=d.start??r,n=d.end??n;let f=c.doc.resolve(r),p=c.doc.resolve(n);return l&&Mj({$from:f,$to:p},l)||i.invalidMarks&&Mj({$from:f,$to:p},i.invalidMarks)||a&&e?.trim()===``||o?.({state:c,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:`mark`})||(u=i.shouldSkip)?.call(i,{state:c,captureGroup:e,fullMatch:t,start:r,end:n,ruleType:`mark`})?null:{captureGroup:e,end:n,fullMatch:t,start:r}}var cN=function(){let e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach(e=>{let r=e?e.split(` `):[];r.forEach(e=>{if(e.startsWith(`atm_`)){let[,n]=e.split(`_`);t[n]=e}else n.push(e)})});let r=[];for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.push(t[e]);return r.push(...n),r.join(` `)},lN=cN;const uN=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function dN(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}const fN=(e,t,n)=>{let r=dN(e,n);if(!r)return!1;let i=hN(r);if(!i){let n=r.blockRange(),i=n&&SE(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(AN(e,i,t,-1))return!0;if(r.parent.content.size==0&&(pN(a,`end`)||mD.isSelectable(a)))for(let n=r.depth;;n--){let o=HE(e.doc,r.before(n),r.after(n),K.empty);if(o&&o.slice.size<o.to-o.from){if(t){let n=e.tr.step(o);n.setSelection(pN(a,`end`)?cD.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):mD.create(n.doc,i.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(n==1||r.node(n-1).childCount>1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1};function pN(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const mN=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=hN(r)}let o=a&&a.nodeBefore;return!o||!mD.isSelectable(o)?!1:(t&&t(e.tr.setSelection(mD.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function hN(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function gN(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}const _N=(e,t,n)=>{let r=gN(e,n);if(!r)return!1;let i=yN(r);if(!i)return!1;let a=i.nodeAfter;if(AN(e,i,t,1))return!0;if(r.parent.content.size==0&&(pN(a,`start`)||mD.isSelectable(a))){let n=HE(e.doc,r.before(),r.after(),K.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(pN(a,`start`)?cD.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):mD.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},vN=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=yN(r)}let o=a&&a.nodeAfter;return!o||!mD.isSelectable(o)?!1:(t&&t(e.tr.setSelection(mD.create(e.doc,a.pos)).scrollIntoView()),!0)};function yN(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const bN=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
190
|
+
`).scrollIntoView()),!0)};function xN(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const SN=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=xN(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(cD.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},CN=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof gD||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=xN(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(n,a.createAndFill());o.setSelection(fD.create(o.doc,n+1)),t(o.scrollIntoView())}return!0},wN=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(PE(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&SE(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function TN(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof mD&&t.selection.node.isBlock)return!r.parentOffset||!PE(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let a=[],o,s,c=!1,l=!1;for(let t=r.depth;;t--){let n=r.node(t);if(n.isBlock){c=r.end(t)==r.pos+(r.depth-t),l=r.start(t)==r.pos-(r.depth-t),s=xN(r.node(t-1).contentMatchAt(r.indexAfter(t-1)));let n=e&&e(i.parent,c,r);a.unshift(n||(c&&s?{type:s}:null)),o=t;break}else{if(t==1)return!1;a.unshift(null)}}let u=t.tr;(t.selection instanceof fD||t.selection instanceof gD)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=PE(u.doc,d,a.length,a);if(f||(a[0]=s?{type:s}:null,f=PE(u.doc,d,a.length,a)),u.split(d,a.length,a),!c&&l&&r.node(o).type!=s){let e=u.mapping.map(r.before(o)),t=u.doc.resolve(e);s&&r.node(o-1).canReplaceWith(t.index(),t.index()+1,s)&&u.setNodeMarkup(u.mapping.map(r.before(o)),s)}return n&&n(u.scrollIntoView()),!0}}const EN=TN(),DN=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a==0?!1:(i=n.before(a),t&&t(e.tr.setSelection(mD.create(e.doc,i))),!0)},ON=(e,t)=>(t&&t(e.tr.setSelection(new gD(e.doc))),!0);function kN(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,a=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(i.isTextblock||IE(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function AN(e,t,n,r){let i=t.nodeBefore,a=t.nodeAfter,o,s,c=i.type.spec.isolating||a.type.spec.isolating;if(!c&&kN(e,t,n))return!0;let l=!c&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(n){let r=t.pos+a.nodeSize,s=G.empty;for(let e=o.length-1;e>=0;e--)s=G.from(o[e].create(null,s));s=G.from(i.copy(s));let c=e.tr.step(new gE(t.pos-1,r,t.pos,r,new K(s,1,0),o.length,!0)),l=c.doc.resolve(r+2*o.length);l.nodeAfter&&l.nodeAfter.type==i.type&&IE(c.doc,l.pos)&&c.join(l.pos),n(c.scrollIntoView())}return!0}let u=a.type.spec.isolating||r>0&&c?null:cD.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&SE(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&pN(a,`start`,!0)&&pN(i,`end`)){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=a,c=1;for(;!s.isTextblock;s=s.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=G.empty;for(let e=o.length-1;e>=0;e--)r=G.from(o[e].copy(r));let i=e.tr.step(new gE(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new K(r,o.length,0),0,!0));n(i.scrollIntoView())}return!0}}return!1}function jN(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(fD.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}const MN=jN(-1),NN=jN(1);function PN(e,t,n,r){for(let i=0;i<t.length;i++){let{$from:a,$to:o}=t[i],s=a.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(a.pos,o.pos,(e,t)=>{if(s||!r&&e.isAtom&&e.isInline&&t>=a.pos&&t+e.nodeSize<=o.pos)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)}),s)return!0}return!1}function FN(e){let t=[];for(let n=0;n<e.length;n++){let{$from:r,$to:i}=e[n];r.doc.nodesBetween(r.pos,i.pos,(e,n)=>{if(e.isAtom&&e.content.size&&e.isInline&&n>=r.pos&&n+e.nodeSize<=i.pos)return n+1>r.pos&&t.push(new lD(r,r.doc.resolve(n+1))),r=r.doc.resolve(n+1+e.content.size),!1}),r.pos<i.pos&&t.push(new lD(r,i))}return t}function IN(e,t=null,n){let r=(n&&n.removeWhenPresent)!==!1,i=(n&&n.enterInlineAtoms)!==!1,a=!(n&&n.includeWhitespace);return function(n,o){let{empty:s,$cursor:c,ranges:l}=n.selection;if(s&&!c||!PN(n.doc,l,e,i))return!1;if(o)if(c)e.isInSet(n.storedMarks||c.marks())?o(n.tr.removeStoredMark(e)):o(n.tr.addStoredMark(e.create(t)));else{let s,c=n.tr;i||(l=FN(l)),s=r?!l.some(t=>n.doc.rangeHasMark(t.$from.pos,t.$to.pos,e)):!l.every(t=>{let n=!1;return c.doc.nodesBetween(t.$from.pos,t.$to.pos,(r,i,a)=>{if(n)return!1;n=!e.isInSet(r.marks)&&!!a&&a.type.allowsMarkType(e)&&!(r.isText&&/^\s*$/.test(r.textBetween(Math.max(0,t.$from.pos-i),Math.min(r.nodeSize,t.$to.pos-i))))}),!n});for(let n=0;n<l.length;n++){let{$from:r,$to:i}=l[n];if(!s)c.removeMark(r.pos,i.pos,e);else{let n=r.pos,o=i.pos,s=r.nodeAfter,l=i.nodeBefore,u=a&&s&&s.isText?/^\s*/.exec(s.text)[0].length:0,d=a&&l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+u<o&&(n+=u,o-=d),c.addMark(n,o,e.create(t))}}o(c.scrollIntoView())}return!0}}function LN(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let RN=LN(uN,fN,mN),zN=LN(uN,_N,vN);const BN={Enter:LN(bN,CN,wN,EN),"Mod-Enter":SN,Backspace:RN,"Mod-Backspace":RN,"Shift-Backspace":RN,Delete:zN,"Mod-Delete":zN,"Mod-a":ON},VN={"Ctrl-h":BN.Backspace,"Alt-Backspace":BN[`Mod-Backspace`],"Ctrl-d":BN.Delete,"Ctrl-Alt-Backspace":BN[`Mod-Delete`],"Alt-Delete":BN[`Mod-Delete`],"Alt-d":BN[`Mod-Delete`],"Ctrl-a":MN,"Ctrl-e":NN};for(let e in BN)VN[e]=BN[e];const HN=typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<`u`&&os.platform?os.platform()==`darwin`:!1,UN=HN?VN:BN;for(var WN={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},GN={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},KN=typeof navigator<`u`&&/Mac/.test(navigator.platform),qN=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),JN=0;JN<10;JN++)WN[48+JN]=WN[96+JN]=String(JN);for(var JN=1;JN<=24;JN++)WN[JN+111]=`F`+JN;for(var JN=65;JN<=90;JN++)WN[JN]=String.fromCharCode(JN+32),GN[JN]=String.fromCharCode(JN);for(var YN in WN)GN.hasOwnProperty(YN)||(GN[YN]=WN[YN]);function XN(e){var t=KN&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||qN&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`,n=!t&&e.key||(e.shiftKey?GN:WN)[e.keyCode]||e.key||`Unidentified`;return n==`Esc`&&(n=`Escape`),n==`Del`&&(n=`Delete`),n==`Left`&&(n=`ArrowLeft`),n==`Up`&&(n=`ArrowUp`),n==`Right`&&(n=`ArrowRight`),n==`Down`&&(n=`ArrowDown`),n}const ZN=typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function QN(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e++){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))ZN?o=!0:i=!0;else throw Error(`Unrecognized modifier name: `+n)}return r&&(n=`Alt-`+n),i&&(n=`Ctrl-`+n),o&&(n=`Meta-`+n),a&&(n=`Shift-`+n),n}function $N(e){let t=Object.create(null);for(let n in e)t[QN(n)]=e[n];return t}function eP(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function tP(e){let t=$N(e);return function(e,n){let r=XN(n),i,a=t[eP(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[eP(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||r.charCodeAt(0)>127)&&(i=WN[n.keyCode])&&i!=r){let r=t[eP(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}function nP(e){let t=vw(e,(e,t)=>(t.priority??AC.Low)-(e.priority??AC.Low)),n=[],r=[];for(let e of t)uP(e)?n.push(e):r.push(e);let i;return new DD({key:rP,view:e=>(i=e,{}),props:{transformPasted:e=>{let t=i.state.selection.$from,r=t.node().type.name,a=new Set(t.marks().map(e=>e.type.name));for(let t of n){if(t.ignoredNodes?.includes(r)||t.ignoredMarks?.some(e=>a.has(e)))continue;let n=e.content.firstChild?.textContent??``,o=!i.state.selection.empty&&e.content.childCount===1&&n,s=lw(n,t.regexp)[0];if(o&&s&&t.type===`mark`&&t.replaceSelection){let{from:e,to:n}=i.state.selection,r=i.state.doc.slice(e,n),a=r.content.textBetween(0,r.content.size);if(typeof t.replaceSelection==`boolean`?t.replaceSelection:t.replaceSelection(a)){let e=[],{getAttributes:n,markType:i}=t,a=tw(n)?n(s,!0):n,o=i.create(a);return r.content.forEach(t=>{if(t.isText){let n=o.addToSet(t.marks);e.push(t.mark(n))}}),K.maxOpen(G.fromArray(e))}}let{nodes:c,transformed:l}=cP(e.content,t,i.state.schema);l&&(e=t.type===`node`&&t.nodeType.isBlock?new K(G.fromArray(c),0,0):new K(G.fromArray(c),e.openStart,e.openEnd))}return mP(e)},handleDOMEvents:{paste:(e,t)=>{let n=t;if(!e.props.editable?.(e.state))return!1;let{clipboardData:i}=n;if(!i)return!1;let a=[...i.items].map(e=>e.getAsFile()).filter(e=>!!e);if(a.length===0)return!1;let{selection:o}=e.state;for(let{fileHandler:t,regexp:i}of r){let r=i?a.filter(e=>i.test(e.type)):a;if(r.length===0)continue;if(t({event:n,files:r,selection:o,view:e,type:`paste`}))return n.preventDefault(),!0}return!1},drop:(e,t)=>{let n=t;if(!e.props.editable?.(e.state))return!1;let{dataTransfer:i,clientX:a,clientY:o}=n;if(!i)return!1;let s=pP(n);if(s.length===0)return!1;let c=e.posAtCoords({left:a,top:o})?.pos??e.state.selection.anchor;for(let{fileHandler:t,regexp:i}of r){let r=i?s.filter(e=>i.test(e.type)):s;if(r.length===0)continue;if(t({event:n,files:r,pos:c,view:e,type:`drop`}))return n.preventDefault(),!0}return!1}}}})}var rP=new AD(`pasteRule`);function iP(e,t){return function n(r){let{fragment:i,rule:a,nodes:o}=r,{regexp:s,ignoreWhitespace:c,ignoredMarks:l,ignoredNodes:u}=a,d=!1;return i.forEach(r=>{if(u?.includes(r.type.name)||dP(r)){o.push(r);return}if(!r.isText){let e=n({fragment:r.content,rule:a,nodes:[]});d||=e.transformed;let t=G.fromArray(e.nodes);r.type.validContent(t)?o.push(r.copy(t)):o.push(...e.nodes);return}if(r.marks.some(e=>fP(e)||l?.includes(e.type.name))){o.push(r);return}let i=r.text??``,f=0;for(let n of lw(i,s)){let i=n[1],s=n[0];if(c&&i?.trim()===``||!s)return;let l=n.index,u=l+s.length;l>f&&o.push(r.cut(f,l));let p=r.cut(l,u);if(s&&i){let e=s.search(/\S/),t=l+s.indexOf(i),n=t+i.length;e&&o.push(r.cut(l,l+e)),p=r.cut(t,n)}e({nodes:o,rule:a,textNode:p,match:n,schema:t}),d=!0,f=u}i&&f<i.length&&o.push(r.cut(f))}),{nodes:o,transformed:d}}}function aP(e){let{nodes:t,rule:n,textNode:r,match:i,schema:a}=e,{transformMatch:o,getAttributes:s,markType:c}=n,l=tw(s)?s(i,!1):s,u=r.text??``,d=c.create(l),f=o?.(i);if(f===``)return;if(f===!1){t.push(a.text(u,r.marks));return}let p=d.addToSet(r.marks);t.push(a.text(f??u,p))}function oP(e){let{nodes:t,rule:n,textNode:r,match:i,schema:a}=e,{transformMatch:o}=n,s=o?.(i);if(s===``||s===!1)return;let c=s??r.text??``;t.push(a.text(c,r.marks))}function sP(e){let{nodes:t,rule:n,textNode:r,match:i}=e,{getAttributes:a,nodeType:o,getContent:s}=n,c=tw(a)?a(i,!1):a,l=(s?s(i):r)||void 0;t.push(o.createChecked(c,l))}function cP(e,t,n){let r=[];switch(t.type){case`mark`:return iP(aP,n)({fragment:e,nodes:r,rule:t});case`node`:return iP(sP,n)({fragment:e,nodes:r,rule:t});default:return iP(oP,n)({fragment:e,nodes:r,rule:t})}}var lP=[`mark`,`node`,`text`];function uP(e){return qC(lP,e.type)}function dP(e){return e.type.spec.code||e.type.spec.group?.split(` `).includes(`code`)}function fP(e){return e.type.name===`code`||e.type.spec.group?.split(` `).includes(`code`)}function pP(e){let{dataTransfer:t}=e;return t?t.files?.length>0?[...t.files]:t.items?.length?[...t.items].map(e=>e.getAsFile()).filter(e=>!!e):[]:[]}function mP(e){let t=K.maxOpen(e.content);return t.openStart<e.openStart||t.openEnd<e.openEnd?t:e}let hP=()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach(e=>e(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(e=>e!==t)}});var gP=Object.defineProperty,_P=Object.getOwnPropertyDescriptor,q=(e,t,n,r)=>{for(var i=r>1?void 0:r?_P(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&gP(t,n,i),i},vP=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},J=(e,t,n)=>(vP(e,t,`read from private field`),n?n.call(e):t.get(e)),yP=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},bP=(e,t,n,r)=>(vP(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function xP(e,t){return e===t}function SP(e){let{previousOptions:t,update:n,equals:r=xP}=e,i=Mw({...t,...n}),a=U(),o=GC(t);for(let e of o){let n=t[e],o=i[e];if(r(n,o)){a[e]={changed:!1};continue}a[e]={changed:!0,previousValue:n,value:o}}let s=e=>{let t=U();for(let n of e){let e=a[n];e?.changed&&(t[n]=e.value)}return t};return{changes:Mw(a),options:i,pickChanged:s}}var CP={[H.DUPLICATE_HELPER_NAMES]:`helper method`,[H.DUPLICATE_COMMAND_NAMES]:`command method`};function wP(e){let{name:t,set:n,code:r}=e,i=CP[r];W(!n.has(t),{code:r,message:`There is a naming conflict for the name: ${t} used in this '${i}'. Please rename or remove from the editor to avoid runtime errors.`}),n.add(t)}function TP(...e){return mw(lN(...e).split(` `)).join(` `)}var EP=`__IGNORE__`,DP=`__ALL__`,OP=class{constructor(e,...[t]){this[`~O`]={},this._mappedHandlers=U(),this.populateMappedHandlers(),this._options=this._initialOptions=gw(e,this.constructor.defaultOptions,t??U(),this.createDefaultHandlerOptions()),this._dynamicKeys=this.getDynamicKeys(),this.init()}get options(){return this._options}get dynamicKeys(){return this._dynamicKeys}get initialOptions(){return this._initialOptions}init(){}getDynamicKeys(){let e=[],{customHandlerKeys:t,handlerKeys:n,staticKeys:r}=this.constructor;for(let i of GC(this._options)){if(r.includes(i)||n.includes(i)||t.includes(i))continue;e.push(i)}return e}ensureAllKeysAreDynamic(e){if(Gj.isProduction)return;let t=[];for(let n of GC(e)){if(this._dynamicKeys.includes(n))continue;t.push(n)}W(sw(t),{code:H.INVALID_SET_EXTENSION_OPTIONS,message:`Invalid properties passed into the 'setOptions()' method: ${JSON.stringify(t)}.`})}setOptions(e){var t;let n=this.getDynamicOptions();this.ensureAllKeysAreDynamic(e);let{changes:r,options:i,pickChanged:a}=SP({previousOptions:n,update:e});this.updateDynamicOptions(i),(t=this.onSetOptions)==null||t.call(this,{reason:`set`,changes:r,options:i,pickChanged:a,initialOptions:this._initialOptions})}resetOptions(){var e;let t=this.getDynamicOptions(),{changes:n,options:r,pickChanged:i}=SP({previousOptions:t,update:this._initialOptions});this.updateDynamicOptions(r),(e=this.onSetOptions)==null||e.call(this,{reason:`reset`,options:r,changes:n,pickChanged:i,initialOptions:this._initialOptions})}getDynamicOptions(){return(0,zC.default)(this._options,[...this.constructor.customHandlerKeys,...this.constructor.handlerKeys])}updateDynamicOptions(e){this._options={...this._options,...e}}populateMappedHandlers(){for(let e of this.constructor.handlerKeys)this._mappedHandlers[e]=[]}createDefaultHandlerOptions(){let e=U();for(let t of this.constructor.handlerKeys)e[t]=(...e)=>{var n;let{handlerKeyOptions:r}=this.constructor,i=(n=r[t])?.reducer,a=i?.getDefault(...e);for(let[,n]of this._mappedHandlers[t]){let o=n(...e);if(a=i?i.accumulator(a,o,...e):o,kP(r,a,t))return a}return a};return e}addHandler(e,t,n=AC.Default){return this._mappedHandlers[e].push([n,t]),this.sortHandlers(e),()=>this._mappedHandlers[e]=this._mappedHandlers[e].filter(([,e])=>e!==t)}hasHandlers(e){return(this._mappedHandlers[e]??[]).length>0}sortHandlers(e){this._mappedHandlers[e]=vw(this._mappedHandlers[e],([e],[t])=>t-e)}addCustomHandler(e,t){var n;return(n=this.onAddCustomHandler)?.call(this,{[e]:t})??hw}};OP.defaultOptions={},OP.staticKeys=[],OP.handlerKeys=[],OP.handlerKeyOptions={},OP.customHandlerKeys=[];function kP(e,t,n){let{[DP]:r}=e,i=e[n];return!r&&!i?!1:!!(i&&i.earlyReturnValue!==EP&&(tw(i.earlyReturnValue)?i.earlyReturnValue(t)===!0:t===i.earlyReturnValue)||r&&r.earlyReturnValue!==EP&&(tw(r.earlyReturnValue)?r.earlyReturnValue(t)===!0:t===r.earlyReturnValue))}var AP=class extends OP{constructor(...e){super(PP,...e),this[`~E`]={},this._extensions=Sw(this.createExtensions(),e=>e.constructor),this.extensionMap=new Map;for(let e of this._extensions)this.extensionMap.set(e.constructor,e)}get priority(){return this.priorityOverride??this.options.priority??this.constructor.defaultPriority}get constructorName(){return`${IC(this.name)}Extension`}get store(){return W(this._store,{code:H.MANAGER_PHASE_ERROR,message:`An error occurred while attempting to access the 'extension.store' when the Manager has not yet set created the lifecycle methods.`}),Mw(this._store,{requireKeys:!0})}get extensions(){return this._extensions}replaceChildExtension(e,t){this.extensionMap.has(e)&&(this.extensionMap.set(e,t),this._extensions=this.extensions.map(n=>t.constructor===e?t:n))}createExtensions(){return[]}getExtension(e){let t=this.extensionMap.get(e);return W(t,{code:H.INVALID_GET_EXTENSION,message:`'${e.name}' does not exist within the preset: '${this.name}'`}),t}isOfType(e){return this.constructor===e}setStore(e){this._store||=e}clone(...e){return new this.constructor(...e)}setPriority(e){this.priorityOverride=e}};AP.defaultPriority=AC.Default;var jP=class extends AP{static get[OC](){return kC.PlainExtensionConstructor}get[OC](){return kC.PlainExtension}},MP=class extends AP{static get[OC](){return kC.MarkExtensionConstructor}get[OC](){return kC.MarkExtension}get type(){return HC(this.store.schema.marks,this.name)}constructor(...e){super(...e)}};MP.disableExtraAttributes=!1;var NP=class extends AP{static get[OC](){return kC.NodeExtensionConstructor}get[OC](){return kC.NodeExtension}get type(){return HC(this.store.schema.nodes,this.name)}constructor(...e){super(...e)}};NP.disableExtraAttributes=!1;var PP={priority:void 0,extraAttributes:{},disableExtraAttributes:!1,exclude:{}};function FP(e){return nM(e)&&rM(e,[kC.PlainExtension,kC.MarkExtension,kC.NodeExtension])}function IP(e){return nM(e)&&rM(e,[kC.PlainExtensionConstructor,kC.MarkExtensionConstructor,kC.NodeExtensionConstructor])}function LP(e){return nM(e)&&rM(e,kC.PlainExtension)}function RP(e){return nM(e)&&rM(e,kC.NodeExtension)}function zP(e){return nM(e)&&rM(e,kC.MarkExtension)}function BP(e){return t=>{let{defaultOptions:n,customHandlerKeys:r,handlerKeys:i,staticKeys:a,defaultPriority:o,handlerKeyOptions:s,...c}=e,l=VC(t);n&&(l.defaultOptions=n),o&&(l.defaultPriority=o),s&&(l.handlerKeyOptions=s),l.staticKeys=a??[],l.handlerKeys=i??[],l.customHandlerKeys=r??[];for(let[e,t]of Object.entries(c)){if(l[e])continue;l[e]=t}return VC(l)}}var VP=class extends jP{constructor(){super(...arguments),this.attributeList=[],this.attributeObject=U(),this.updateAttributes=(e=!0)=>{this.transformAttributes(),e&&this.store.commands.forceUpdate(`attributes`)}}get name(){return`attributes`}onCreate(){this.transformAttributes(),this.store.setExtensionStore(`updateAttributes`,this.updateAttributes)}transformAttributes(){var e,t,n;if(this.attributeObject=U(),(e=this.store.managerSettings.exclude)?.attributes){this.store.setStoreKey(`attributes`,this.attributeObject);return}this.attributeList=[];for(let e of this.store.extensions){if((t=e.options.exclude)?.attributes)continue;let r=(n=e.createAttributes)?.call(e),i={...r,class:TP(...e.classNames??[],r?.class)};this.attributeList.unshift(i)}for(let e of this.attributeList)this.attributeObject={...this.attributeObject,...e,class:TP(this.attributeObject.class,e.class)};this.store.setStoreKey(`attributes`,this.attributeObject)}};function HP(e={}){return(t,n,r)=>{(t.decoratedHelpers??={})[n]=e}}function Y(e={}){return(t,n,r)=>{(t.decoratedCommands??={})[n]=e}}function UP(e){return(t,n,r)=>{(t.decoratedKeybindings??={})[n]=e}}var WP=class{constructor(e){this.promiseCreator=e,this.failureHandlers=[],this.successHandlers=[],this.validateHandlers=[],this.generateCommand=()=>e=>{let t=!0,{view:n,tr:r,dispatch:i}=e;if(!n)return!1;for(let n of this.validateHandlers)if(!n({...e,dispatch:()=>{}})){t=!1;break}if(!i||!t)return t;let a=this.promiseCreator(e);return a.then(e=>{this.runHandlers(this.successHandlers,{value:e,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}).catch(e=>{this.runHandlers(this.failureHandlers,{error:e,state:n.state,tr:n.state.tr,dispatch:n.dispatch,view:n})}),i(r),!0}}validate(e,t=`push`){return this.validateHandlers[t](e),this}success(e,t=`push`){return this.successHandlers[t](e),this}failure(e,t=`push`){return this.failureHandlers[t](e),this}runHandlers(e,t){var n;for(let n of e)if(!n({...t,dispatch:()=>{}}))break;(n=t.dispatch)==null||n.call(t,t.tr)}};function GP(e){let{type:t,attrs:n,range:r,selection:i}=e;return e=>{let{dispatch:a,tr:o,state:s}=e,c=$C(t)?s.schema.marks[t]:t;if(W(c,{code:H.SCHEMA,message:`Mark type: ${t} does not exist on the current schema.`}),r||i){let{from:e,to:s}=AM(i??r??o.selection,o.doc);return hM({trState:o,type:t,...r})?a?.(o.removeMark(e,s,c)):a?.(o.addMark(e,s,c.create(n))),!0}return Uj(IN(c,n))(e)}}function KP(e,t,n){for(let{$from:r,$to:i}of n){let n=r.depth===0?t.type.allowsMarkType(e):!1;if(t.nodesBetween(r.pos,i.pos,t=>{if(n)return!1;n=t.inlineContent&&t.type.allowsMarkType(e)}),n)return!0}return!1}function qP(e,t,n){return({tr:r,dispatch:i,state:a})=>{let o=AM(n??r.selection,r.doc),s=DM(o),c=$C(e)?a.schema.marks[e]:e;if(W(c,{code:H.SCHEMA,message:`Mark type: ${e} does not exist on the current schema.`}),o.empty&&!s||!KP(c,r.doc,o.ranges))return!1;if(!i)return!0;if(s)return r.removeStoredMark(c),t&&r.addStoredMark(c.create(t)),i(r),!0;let l=!1;for(let{$from:e,$to:t}of o.ranges){if(l)break;l=r.doc.rangeHasMark(e.pos,t.pos,c)}for(let{$from:e,$to:n}of o.ranges)l&&r.removeMark(e.pos,n.pos,c),t&&r.addMark(e.pos,n.pos,c.create(t));return i(r),!0}}function JP(e,t={}){return({tr:n,dispatch:r,state:i})=>{let a=i.schema,o=n.selection,{from:s=o.from,to:c=s??o.to,marks:l={}}=t;if(!r)return!0;n.insertText(e,s,c);let u=HC(n.steps,n.steps.length-1).getMap().map(c);for(let[e,t]of WC(l))n.addMark(s,u,HC(a.marks,e).create(t));return r(n),!0}}var YP=class extends jP{constructor(){super(...arguments),this.decorated=new Map,this.forceUpdateTransaction=(e,...t)=>{let{forcedUpdates:n}=this.getCommandMeta(e);return this.setCommandMeta(e,{forcedUpdates:mw([...n,...t])}),e}}get name(){return`commands`}get transaction(){let e=this.store.getState();this._transaction||=e.tr;let t=this._transaction.before.eq(e.doc),n=!sw(this._transaction.steps);if(!t){let t=e.tr;if(n)for(let e of this._transaction.steps)t.step(e);this._transaction=t}return this._transaction}onCreate(){this.store.setStoreKey(`getForcedUpdates`,this.getForcedUpdates.bind(this))}onView(e){var t;let{extensions:n,helpers:r}=this.store,i=U(),a=new Set,o=U(),s=t=>{var n;let r=U(),a=()=>t??this.transaction,c=[],l=()=>c;for(let[e,t]of Object.entries(i)){if((n=o[e])?.disableChaining)continue;r[e]=this.chainedFactory({chain:r,command:t.original,getTr:a,getChain:l})}let u=e=>{W(e===a(),{message:"Chaining currently only supports `CommandFunction` methods which do not use the `state.tr` property. Instead you should use the provided `tr` property."})};return r.run=(t={})=>{let n=c;c=[];for(let e of n)if(!e(u)&&t.exitEarly)return;e.dispatch(a())},r.tr=()=>{let e=c;c=[];for(let t of e)t(u);return a()},r.enabled=()=>{for(let e of c)if(!e())return!1;return!0},r.new=e=>s(e),r};for(let e of n){let n=(t=e.createCommands)?.call(e)??{},s=e.decoratedCommands??{},c={};o={...o,decoratedCommands:s};for(let[t,i]of Object.entries(s)){let a=$C(i.shortcut)&&i.shortcut.startsWith(`_|`)?{shortcut:r.getNamedShortcut(i.shortcut,e.options)}:void 0;this.updateDecorated(t,{...i,name:e.name,...a}),n[t]=e[t].bind(e),i.active&&(c[t]=()=>{var t;return(t=i.active)?.call(i,e.options,this.store)??!1})}if(aw(n))continue;this.addCommands({active:c,names:a,commands:i,extensionCommands:n})}let c=s();for(let[e,t]of Object.entries(c))s[e]=t;this.store.setStoreKey(`commands`,i),this.store.setStoreKey(`chain`,s),this.store.setExtensionStore(`commands`,i),this.store.setExtensionStore(`chain`,s)}onStateUpdate({state:e}){this._transaction=e.tr}createPlugin(){return{}}customDispatch(e){return e}insertText(e,t={}){return $C(e)?JP(e,t):this.store.createPlaceholderCommand({promise:e,placeholder:{type:`inline`},onSuccess:(e,n,r)=>this.insertText(e,{...t,...n})(r)}).generateCommand()}selectText(e,t={}){return({tr:n,dispatch:r})=>{let i=AM(e,n.doc),a=n.selection.anchor===i.anchor&&n.selection.head===i.head;return a&&!t.forceUpdate?!1:(r?.(n.setSelection(i)),!0)}}selectMark(e){return t=>{let{tr:n}=t,r=SM(n.selection.$from,e);return r?this.store.commands.selectText.original({from:r.from,to:r.to})(t):!1}}delete(e){return({tr:t,dispatch:n})=>{let{from:r,to:i}=e??t.selection;return n?.(t.delete(r,i)),!0}}emptyUpdate(e){return({tr:t,dispatch:n})=>(n&&(e?.(),n(t)),!0)}forceUpdate(...e){return({tr:t,dispatch:n})=>(n?.(this.forceUpdateTransaction(t,...e)),!0)}updateNodeAttributes(e,t){return({tr:n,dispatch:r})=>(r?.(n.setNodeMarkup(e,void 0,t)),!0)}setContent(e,t){return n=>{let{tr:r,dispatch:i}=n,a=this.store.manager.createState({content:e,selection:t});return a?(i?.(r.replaceRangeWith(0,r.doc.nodeSize-2,a.doc)),!0):!1}}resetContent(){return e=>{let{tr:t,dispatch:n}=e,r=this.store.manager.createEmptyDoc();return r?this.setContent(r)(e):(n?.(t.delete(0,t.doc.nodeSize)),!0)}}emptySelection(){return({tr:e,dispatch:t})=>e.selection.empty?!1:(t?.(e.setSelection(fD.near(e.selection.$anchor))),!0)}insertNewLine(){return({dispatch:e,tr:t})=>uM(t.selection)?(e?.(t.insertText(`
|
|
191
|
+
`)),!0):!1}insertNode(e,t={}){return({dispatch:n,tr:r,state:i})=>{var a;let{attrs:o,range:s,selection:c,replaceEmptyParentBlock:l=!1}=t,{from:u,to:d,$from:f}=AM(c??s??r.selection,r.doc);if(oM(e)||sM(e)){let t=f.before(f.depth);return n?.(l&&u===d&&xM(f.parent)?r.replaceWith(t,t+f.parent.nodeSize,e):r.replaceWith(u,d,e)),!0}let p=$C(e)?i.schema.nodes[e]:e;W(p,{code:H.SCHEMA,message:`The requested node type ${e} does not exist in the schema.`});let m=(a=t.marks)?.map(e=>{if(e instanceof Bw)return e;let t=$C(e)?i.schema.marks[e]:e;return W(t,{code:H.SCHEMA,message:`The requested mark type ${e} does not exist in the schema.`}),t.create()}),h=p.createAndFill(o,$C(t.content)?i.schema.text(t.content):t.content,m);if(!h)return!1;let g=u!==d;return n?.(g?r.replaceRangeWith(u,d,h):r.insert(u,h)),!0}}focus(e){return t=>{let{dispatch:n,tr:r}=t,{view:i}=this.store;if(e===!1||i.hasFocus()&&(e===void 0||e===!0))return!1;if(e===void 0||e===!0){let{from:t=0,to:n=t}=r.selection;e={from:t,to:n}}return n&&this.delayedFocus(),this.selectText(e)(t)}}blur(e){return t=>{let{view:n}=this.store;return n.hasFocus()?(requestAnimationFrame(()=>{n.dom.blur()}),e?this.selectText(e)(t):!0):!1}}setBlockNodeType(e,t,n,r=!0){return ZM(e,t,n,r)}toggleWrappingNode(e,t,n){return XM(e,t,n)}toggleBlockNodeItem(e){return QM(e)}wrapInNode(e,t,n){return YM(e,t,n)}applyMark(e,t,n){return qP(e,t,n)}toggleMark(e){return GP(e)}removeMark(e){return rN(e)}setMeta(e,t){return({tr:n})=>(n.setMeta(e,t),!0)}selectAll(){return this.selectText(`all`)}copy(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand(`copy`),!0)}paste(){return this.store.createPlaceholderCommand({promise:async()=>{var e;return(e=navigator.clipboard)?.readText?await navigator.clipboard.readText():``},placeholder:{type:`inline`},onSuccess:(e,t,n)=>this.insertNode(BM({content:e,schema:n.state.schema}),{selection:t})(n)}).generateCommand()}cut(){return e=>e.tr.selection.empty?!1:(e.dispatch&&document.execCommand(`cut`),!0)}replaceText(e){return tN(e)}getAllCommandOptions(){let e={};for(let[t,n]of this.decorated){if(aw(n))continue;e[t]=n}return e}getCommandOptions(e){return this.decorated.get(e)}getCommandProp(){return{tr:this.transaction,dispatch:this.store.view.dispatch,state:this.store.view.state,view:this.store.view}}updateDecorated(e,t){if(!t){this.decorated.delete(e);return}let n=this.decorated.get(e)??{name:``};this.decorated.set(e,{...n,...t})}handleIosFocus(){Gj.isIos&&this.store.view.dom.focus()}delayedFocus(){this.handleIosFocus(),requestAnimationFrame(()=>{this.store.view.focus(),this.store.view.dispatch(this.transaction.scrollIntoView())})}getForcedUpdates(e){return this.getCommandMeta(e).forcedUpdates}getCommandMeta(e){let t=e.getMeta(this.pluginKey)??{};return{...XP,...t}}setCommandMeta(e,t){let n=this.getCommandMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addCommands(e){let{extensionCommands:t,commands:n,names:r,active:i}=e;for(let[e,a]of WC(t))wP({name:e,set:r,code:H.DUPLICATE_COMMAND_NAMES}),W(!ZP.has(e),{code:H.DUPLICATE_COMMAND_NAMES,message:`The command name you chose is forbidden.`}),n[e]=this.createUnchainedCommand(a,i[e])}unchainedFactory(e){return(...t)=>{let{shouldDispatch:n=!0,command:r}=e,{view:i}=this.store,{state:a}=i,o;return n&&(o=i.dispatch),r(...t)({state:a,dispatch:o,view:i,tr:a.tr})}}createUnchainedCommand(e,t){let n=this.unchainedFactory({command:e});return n.enabled=this.unchainedFactory({command:e,shouldDispatch:!1}),n.isEnabled=n.enabled,n.original=e,n.active=t,n}chainedFactory(e){return(...t)=>{let{chain:n,command:r,getTr:i,getChain:a}=e,o=a(),{view:s}=this.store,{state:c}=s;return o.push(e=>r(...t)({state:c,dispatch:e,view:s,tr:i()})),n}}};q([Y()],YP.prototype,`customDispatch`,1),q([Y()],YP.prototype,`insertText`,1),q([Y()],YP.prototype,`selectText`,1),q([Y()],YP.prototype,`selectMark`,1),q([Y()],YP.prototype,`delete`,1),q([Y()],YP.prototype,`emptyUpdate`,1),q([Y()],YP.prototype,`forceUpdate`,1),q([Y()],YP.prototype,`updateNodeAttributes`,1),q([Y()],YP.prototype,`setContent`,1),q([Y()],YP.prototype,`resetContent`,1),q([Y()],YP.prototype,`emptySelection`,1),q([Y()],YP.prototype,`insertNewLine`,1),q([Y()],YP.prototype,`insertNode`,1),q([Y()],YP.prototype,`focus`,1),q([Y()],YP.prototype,`blur`,1),q([Y()],YP.prototype,`setBlockNodeType`,1),q([Y()],YP.prototype,`toggleWrappingNode`,1),q([Y()],YP.prototype,`toggleBlockNodeItem`,1),q([Y()],YP.prototype,`wrapInNode`,1),q([Y()],YP.prototype,`applyMark`,1),q([Y()],YP.prototype,`toggleMark`,1),q([Y()],YP.prototype,`removeMark`,1),q([Y()],YP.prototype,`setMeta`,1),q([Y({description:({t:e})=>e(VD.SELECT_ALL_DESCRIPTION),label:({t:e})=>e(VD.SELECT_ALL_LABEL),shortcut:V.SelectAll})],YP.prototype,`selectAll`,1),q([Y({description:({t:e})=>e(VD.COPY_DESCRIPTION),label:({t:e})=>e(VD.COPY_LABEL),shortcut:V.Copy,icon:`fileCopyLine`})],YP.prototype,`copy`,1),q([Y({description:({t:e})=>e(VD.PASTE_DESCRIPTION),label:({t:e})=>e(VD.PASTE_LABEL),shortcut:V.Paste,icon:`clipboardLine`})],YP.prototype,`paste`,1),q([Y({description:({t:e})=>e(VD.CUT_DESCRIPTION),label:({t:e})=>e(VD.CUT_LABEL),shortcut:V.Cut,icon:`scissorsFill`})],YP.prototype,`cut`,1),q([Y()],YP.prototype,`replaceText`,1),q([HP()],YP.prototype,`getAllCommandOptions`,1),q([HP()],YP.prototype,`getCommandOptions`,1),q([HP()],YP.prototype,`getCommandProp`,1),YP=q([BP({defaultPriority:AC.Highest,defaultOptions:{trackerClassName:`remirror-tracker-position`,trackerNodeName:`span`},staticKeys:[`trackerClassName`,`trackerNodeName`]})],YP);var XP={forcedUpdates:[]},ZP=new Set([`run`,`chain`,`original`,`raw`,`enabled`,`tr`,`new`]),QP=class extends jP{constructor(){super(...arguments),this.placeholders=rj.empty,this.placeholderWidgets=new Map,this.createPlaceholderCommand=e=>{let t=dw(),{promise:n,placeholder:r,onFailure:i,onSuccess:a}=e;return new WP(n).validate(e=>this.addPlaceholder(t,r)(e)).success(e=>{let{state:n,tr:r,dispatch:o,view:s,value:c}=e,l=this.store.helpers.findPlaceholder(t);if(!l){let e=Error(`The placeholder has been removed`);return i?.({error:e,state:n,tr:r,dispatch:o,view:s})??!1}return this.removePlaceholder(t)({state:n,tr:r,view:s,dispatch:()=>{}}),a(c,l,{state:n,tr:r,dispatch:o,view:s})}).failure(e=>(this.removePlaceholder(t)({...e,dispatch:()=>{}}),i?.(e)??!1))}}get name(){return`decorations`}onCreate(){this.store.setExtensionStore(`createPlaceholderCommand`,this.createPlaceholderCommand)}createPlugin(){return{state:{init:()=>{},apply:e=>{var t,n,r,i,a,o;let{added:s,clearTrackers:c,removed:l,updated:u}=this.getMeta(e);if(c){this.placeholders=rj.empty;for(let[,e]of this.placeholderWidgets)(n=(t=e.spec).onDestroy)==null||n.call(t,this.store.view,e.spec.element);this.placeholderWidgets.clear();return}this.placeholders=this.placeholders.map(e.mapping,e.doc,{onRemove:e=>{var t,n;let r=this.placeholderWidgets.get(e.id);r&&((n=(t=r.spec).onDestroy)==null||n.call(t,this.store.view,r.spec.element))}});for(let[,e]of this.placeholderWidgets)(i=(r=e.spec).onUpdate)==null||i.call(r,this.store.view,e.from,e.spec.element,e.spec.data);for(let t of s){if(t.type===`inline`){this.addInlinePlaceholder(t,e);continue}if(t.type===`node`){this.addNodePlaceholder(t,e);continue}if(t.type===`widget`){this.addWidgetPlaceholder(t,e);continue}}for(let{id:t,data:n}of u){let r=this.placeholderWidgets.get(t);if(!r)continue;let i=ej.widget(r.from,r.spec.element,{...r.spec,data:n});this.placeholders=this.placeholders.remove([r]).add(e.doc,[i]),this.placeholderWidgets.set(t,i)}for(let e of l){let t=this.placeholders.find(void 0,void 0,t=>t.id===e&&t.__type===eF),n=this.placeholderWidgets.get(e);n&&((o=(a=n.spec).onDestroy)==null||o.call(a,this.store.view,n.spec.element)),this.placeholders=this.placeholders.remove(t),this.placeholderWidgets.delete(e)}}},props:{decorations:e=>{let t=this.options.decorations(e);t=t.add(e.doc,this.placeholders.find());for(let n of this.store.extensions){if(!n.createDecorations)continue;let r=n.createDecorations(e).find();t=t.add(e.doc,r)}return t},handleDOMEvents:{blur:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(tF,!1)),!1),focus:e=>(this.options.persistentSelectionClass&&e.dispatch(e.state.tr.setMeta(tF,!0)),!1)}}}}updateDecorations(){return({tr:e,dispatch:t})=>(t?.(e),!0)}addPlaceholder(e,t,n){return({dispatch:r,tr:i})=>this.addPlaceholderTransaction(e,t,i,!r)?(r?.(n?i.deleteSelection():i),!0):!1}updatePlaceholder(e,t){return({dispatch:n,tr:r})=>this.updatePlaceholderTransaction({id:e,data:t,tr:r,checkOnly:!n})?(n?.(r),!0):!1}removePlaceholder(e){return({dispatch:t,tr:n})=>this.removePlaceholderTransaction({id:e,tr:n,checkOnly:!t})?(t?.(n),!0):!1}clearPlaceholders(){return({tr:e,dispatch:t})=>this.clearPlaceholdersTransaction({tr:e,checkOnly:!t})?(t?.(e),!0):!1}findPlaceholder(e){return this.findAllPlaceholders().get(e)}findAllPlaceholders(){let e=new Map,t=this.placeholders.find(void 0,void 0,e=>e.__type===eF);for(let n of t)e.set(n.spec.id,{from:n.from,to:n.to});return e}createDecorations(e){var t,n,r;let{persistentSelectionClass:i}=this.options;return!i||(t=this.store.view)?.hasFocus()||(r=(n=this.store.helpers).isInteracting)?.call(n)?rj.empty:nF(e,rj.empty,{class:$C(i)?i:`selection`})}onApplyState(){}addWidgetPlaceholder(e,t){let{pos:n,createElement:r,onDestroy:i,onUpdate:a,className:o,nodeName:s,id:c,type:l}=e,u=r?.(this.store.view,n)??document.createElement(s);u.classList.add(o);let d=ej.widget(n,u,{id:c,__type:eF,type:l,element:u,onDestroy:i,onUpdate:a});this.placeholderWidgets.set(c,d),this.placeholders=this.placeholders.add(t.doc,[d])}addInlinePlaceholder(e,t){let{from:n=t.selection.from,to:r=t.selection.to,className:i,nodeName:a,id:o,type:s}=e,c;if(n===r){let e=document.createElement(a);e.classList.add(i),c=ej.widget(n,e,{id:o,type:s,__type:eF,widget:e})}else c=ej.inline(n,r,{nodeName:a,class:i},{id:o,__type:eF});this.placeholders=this.placeholders.add(t.doc,[c])}addNodePlaceholder(e,t){let{pos:n,className:r,nodeName:i,id:a}=e,o=ew(n)?t.doc.resolve(n):t.selection.$from,s=ew(n)?o.nodeAfter?{pos:n,end:o.nodeAfter.nodeSize}:void 0:hle(o);if(!s)return;let c=ej.node(s.pos,s.end,{nodeName:i,class:r},{id:a,__type:eF});this.placeholders=this.placeholders.add(t.doc,[c])}withRequiredBase(e,t){let{placeholderNodeName:n,placeholderClassName:r}=this.options,{nodeName:i=n,className:a,...o}=t,s=(a?[r,a]:[r]).join(` `);return{nodeName:i,className:s,...o,id:e}}getMeta(e){let t=e.getMeta(this.pluginKey)??{};return{...$P,...t}}setMeta(e,t){let n=this.getMeta(e);e.setMeta(this.pluginKey,{...n,...t})}addPlaceholderTransaction(e,t,n,r=!1){let i=this.findPlaceholder(e);if(i)return!1;if(r)return!0;let{added:a}=this.getMeta(n);return this.setMeta(n,{added:[...a,this.withRequiredBase(e,t)]}),!0}updatePlaceholderTransaction(e){let{id:t,tr:n,checkOnly:r=!1,data:i}=e,a=this.findPlaceholder(t);if(!a)return!1;if(r)return!0;let{updated:o}=this.getMeta(n);return this.setMeta(n,{updated:mw([...o,{id:t,data:i}])}),!0}removePlaceholderTransaction(e){let{id:t,tr:n,checkOnly:r=!1}=e,i=this.findPlaceholder(t);if(!i)return!1;if(r)return!0;let{removed:a}=this.getMeta(n);return this.setMeta(n,{removed:mw([...a,t])}),!0}clearPlaceholdersTransaction(e){let{tr:t,checkOnly:n=!1}=e,r=this.getPluginState();return r===rj.empty?!1:(n||this.setMeta(t,{clearTrackers:!0}),!0)}};q([Y()],QP.prototype,`updateDecorations`,1),q([Y()],QP.prototype,`addPlaceholder`,1),q([Y()],QP.prototype,`updatePlaceholder`,1),q([Y()],QP.prototype,`removePlaceholder`,1),q([Y()],QP.prototype,`clearPlaceholders`,1),q([HP()],QP.prototype,`findPlaceholder`,1),q([HP()],QP.prototype,`findAllPlaceholders`,1),QP=q([BP({defaultOptions:{persistentSelectionClass:void 0,placeholderClassName:`placeholder`,placeholderNodeName:`span`},staticKeys:[`placeholderClassName`,`placeholderNodeName`],handlerKeys:[`decorations`],handlerKeyOptions:{decorations:{reducer:{accumulator:(e,t,n)=>e.add(n.doc,t.find()),getDefault:()=>rj.empty}}},defaultPriority:AC.Low})],QP);var $P={added:[],updated:[],clearTrackers:!1,removed:[]},eF=`placeholderDecoration`,tF=`persistentSelectionFocus`;function nF(e,t,n){let{selection:r,doc:i}=e;if(r.empty)return t;let{from:a,to:o}=r,s=mM(r)?ej.node(a,o,n):ej.inline(a,o,n);return t.add(i,[s])}var rF=class extends jP{get name(){return`docChanged`}onStateUpdate(e){let{firstUpdate:t,transactions:n,tr:r}=e;t||(n??[r]).some(e=>e?.docChanged)&&this.options.docChanged(e)}};rF=q([BP({handlerKeys:[`docChanged`],handlerKeyOptions:{docChanged:{earlyReturnValue:!1}},defaultPriority:AC.Lowest})],rF);var iF=class extends jP{get name(){return`helpers`}onCreate(){var e;this.store.setStringHandler(`text`,this.textToProsemirrorNode.bind(this)),this.store.setStringHandler(`html`,BM);let t=U(),n=U(),r=U(),i=new Set;for(let a of this.store.extensions){RP(a)&&(n[a.name]=e=>vle({state:this.store.getState(),type:a.type,attrs:e}),r[a.name]=e=>{var t;return(t=$j({state:this.store.getState(),type:a.type,attrs:e}))?.node.attrs}),zP(a)&&(n[a.name]=e=>hM({trState:this.store.getState(),type:a.type,attrs:e}),r[a.name]=e=>{let t=SM(this.store.getState().selection.$from,a.type);if(!t||!e)return t?.mark.attrs;if(tM(t.mark,e))return t.mark.attrs});let o=(e=a.createHelpers)?.call(a)??{};for(let e of Object.keys(a.decoratedHelpers??{}))o[e]=a[e].bind(a);if(aw(o))continue;for(let[e,n]of WC(o))wP({name:e,set:i,code:H.DUPLICATE_HELPER_NAMES}),t[e]=n}this.store.setStoreKey(`attrs`,r),this.store.setStoreKey(`active`,n),this.store.setStoreKey(`helpers`,t),this.store.setExtensionStore(`attrs`,r),this.store.setExtensionStore(`active`,n),this.store.setExtensionStore(`helpers`,t)}isSelectionEmpty(e=this.store.getState()){return Qj(e)}isViewEditable(e=this.store.getState()){var t,n;return(n=(t=this.store.view.props).editable)?.call(t,e)??!1}getStateJSON(e=this.store.getState()){return e.toJSON()}getJSON(e=this.store.getState()){return e.doc.toJSON()}getRemirrorJSON(e=this.store.getState()){return this.getJSON(e)}insertHtml(e,t){return n=>{let{state:r}=n,i=BM({content:e,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,t)(n)}}getText({lineBreakDivider:e=`
|
|
192
|
+
|
|
193
|
+
`,state:t=this.store.getState()}={}){return t.doc.textBetween(0,t.doc.content.size,e,TC)}getTextBetween(e,t,n=this.store.getState().doc){return n.textBetween(e,t,`
|
|
194
|
+
|
|
195
|
+
`,TC)}getHTML(e=this.store.getState()){return zM(e.doc,this.store.document)}textToProsemirrorNode(e){let t=`<pre>${e.content}</pre>`;return this.store.stringHandlers.html({...e,content:t})}};q([HP()],iF.prototype,`isSelectionEmpty`,1),q([HP()],iF.prototype,`isViewEditable`,1),q([HP()],iF.prototype,`getStateJSON`,1),q([HP()],iF.prototype,`getJSON`,1),q([HP()],iF.prototype,`getRemirrorJSON`,1),q([Y()],iF.prototype,`insertHtml`,1),q([HP()],iF.prototype,`getText`,1),q([HP()],iF.prototype,`getTextBetween`,1),q([HP()],iF.prototype,`getHTML`,1),iF=q([BP({})],iF);var aF=class extends jP{get name(){return`inputRules`}onCreate(){this.store.setExtensionStore(`rebuildInputRules`,this.rebuildInputRules.bind(this))}createExternalPlugins(){return[this.generateInputRulesPlugin()]}generateInputRulesPlugin(){var e,t;let n=[],r=this.store.markTags[DC.ExcludeInputRules];for(let i of this.store.extensions){if((e=this.store.managerSettings.exclude)?.inputRules||!i.createInputRules||(t=i.options.exclude)?.inputRules)continue;for(let e of i.createInputRules())e.shouldSkip=this.options.shouldSkipInputRule,e.invalidMarks=r,n.push(e)}return pO({rules:n})}rebuildInputRules(){this.store.updateExtensionPlugins(this)}};aF=q([BP({defaultPriority:AC.Default,handlerKeys:[`shouldSkipInputRule`],handlerKeyOptions:{shouldSkipInputRule:{earlyReturnValue:!0}}})],aF);var oF=class extends jP{constructor(){super(...arguments),this.extraKeyBindings=[],this.backwardMarkExitTracker=new Map,this.keydownHandler=null,this.onAddCustomHandler=({keymap:e})=>{var t,n;if(e)return this.extraKeyBindings=[...this.extraKeyBindings,e],(n=(t=this.store).rebuildKeymap)==null||n.call(t),()=>{var t,n;this.extraKeyBindings=this.extraKeyBindings.filter(t=>t!==e),(n=(t=this.store).rebuildKeymap)==null||n.call(t)}},this.rebuildKeymap=()=>{this.setupKeydownHandler()}}get name(){return`keymap`}get shortcutMap(){let{shortcuts:e}=this.options;return $C(e)?pF[e]:e}onCreate(){this.store.setExtensionStore(`rebuildKeymap`,this.rebuildKeymap)}createExternalPlugins(){var e;return(e=this.store.managerSettings.exclude)?.keymap?[]:(this.setupKeydownHandler(),[new DD({props:{handleKeyDown:(e,t)=>{var n;return(n=this.keydownHandler)?.call(this,e,t)}}})])}setupKeydownHandler(){let e=this.generateKeymapBindings();this.keydownHandler=tP(e)}generateKeymapBindings(){var e;let t=[],n=this.shortcutMap,r=this.store.getExtension(YP),i=e=>t=>cF({shortcut:t,map:n,store:this.store,options:e.options});for(let a of this.store.extensions){let o=a.decoratedKeybindings??{};if((e=a.options.exclude)?.keymap)continue;a.createKeymap&&t.push(uF(a.createKeymap(i(a)),n));for(let[e,i]of WC(o)){if(i.isActive&&!i.isActive(a.options,this.store))continue;let o=a[e].bind(a),s=cF({shortcut:i.shortcut,map:n,options:a.options,store:this.store}),c=tw(i.priority)?i.priority(a.options,this.store):i.priority??AC.Low,l=U();for(let e of s)l[e]=o;t.push([c,l]),i.command&&r.updateDecorated(i.command,{shortcut:s})}}let a=this.sortKeymaps([...this.extraKeyBindings,...t]),o=ble(a);return o}arrowRightShortcut(e){let t=this.store.markTags[DC.PreventExits],n=this.store.nodeTags[DC.PreventExits];return this.exitMarkForwards(t,n)(e)}arrowLeftShortcut(e){let t=this.store.markTags[DC.PreventExits],n=this.store.nodeTags[DC.PreventExits];return eM(this.exitNodeBackwards(n),this.exitMarkBackwards(t,n))(e)}backspace(e){let t=this.store.markTags[DC.PreventExits],n=this.store.nodeTags[DC.PreventExits];return eM(this.exitNodeBackwards(n,!0),this.exitMarkBackwards(t,n,!0))(e)}createKeymap(){let{selectParentNodeOnEscape:e,undoInputRuleOnBackspace:t,excludeBaseKeymap:n}=this.options,r=U();if(!n)for(let[e,t]of WC(UN))r[e]=Uj(t);return t&&UN.Backspace&&(r.Backspace=Uj(LN(hO,UN.Backspace))),e&&(r.Escape=Uj(DN)),[AC.Low,r]}getNamedShortcut(e,t={}){return e.startsWith(`_|`)?cF({shortcut:e,map:this.shortcutMap,store:this.store,options:t}):[e]}onSetOptions(e){var t,n;let{changes:r}=e;(r.excludeBaseKeymap.changed||r.selectParentNodeOnEscape.changed||r.undoInputRuleOnBackspace.changed)&&((n=(t=this.store).rebuildKeymap)==null||n.call(t))}sortKeymaps(e){return vw(e.map(e=>ow(e)?e:[AC.Default,e]),(e,t)=>t[0]-e[0]).map(e=>e[1])}exitMarkForwards(e,t){return n=>{let{tr:r,dispatch:i}=n;if(!GM(r.selection))return!1;let a=Zj({selection:r.selection,types:t});if(a)return!1;let o=r.selection.$from,s=o.marks().filter(t=>!e.includes(t.type.name));if(sw(s))return!1;if(!i)return!0;for(let e of s)r.removeStoredMark(e);return i(r.insertText(` `,r.selection.from)),!0}}exitNodeBackwards(e,t=!1){return n=>{let{tr:r}=n,i=t?qM:KM;if(!i(r.selection))return!1;let a=r.selection.$anchor.node();return!xM(a)||bM(a)||e.includes(a.type.name)?!1:this.store.commands.toggleBlockNodeItem.original({type:a.type})(n)}}exitMarkBackwards(e,t,n=!1){return r=>{let{tr:i,dispatch:a}=r,o=n?qM:KM;if(!o(i.selection)||this.backwardMarkExitTracker.has(i.selection.anchor))return this.backwardMarkExitTracker.clear(),!1;let s=Zj({selection:i.selection,types:t});if(s)return!1;let c=[...i.storedMarks??[],...i.selection.$from.marks()].filter(t=>!e.includes(t.type.name));if(sw(c))return!1;if(!a)return!0;for(let e of c)i.removeStoredMark(e);return this.backwardMarkExitTracker.set(i.selection.anchor,!0),a(i),!0}}};q([UP({shortcut:`ArrowRight`,isActive:e=>e.exitMarksOnArrowPress})],oF.prototype,`arrowRightShortcut`,1),q([UP({shortcut:`ArrowLeft`,isActive:e=>e.exitMarksOnArrowPress})],oF.prototype,`arrowLeftShortcut`,1),q([UP({shortcut:`Backspace`,isActive:e=>e.exitMarksOnArrowPress})],oF.prototype,`backspace`,1),q([HP()],oF.prototype,`getNamedShortcut`,1),oF=q([BP({defaultPriority:AC.Low,defaultOptions:{shortcuts:`default`,undoInputRuleOnBackspace:!0,selectParentNodeOnEscape:!1,excludeBaseKeymap:!1,exitMarksOnArrowPress:!0},customHandlerKeys:[`keymap`]})],oF);function sF(e){return qC(KC(V),e)}function cF({shortcut:e,map:t,options:n,store:r}){return $C(e)?[lF(e,t)]:ow(e)?e.map(e=>lF(e,t)):(e=e(n,r),cF({shortcut:e,map:t,options:n,store:r}))}function lF(e,t){return sF(e)?t[e]:e}function uF(e,t){let n={},r,i;ow(e)?[i,r]=e:r=e;for(let[e,i]of WC(r))n[lF(e,t)]=i;return QC(i)?n:[i,n]}var dF={[V.Copy]:`Mod-c`,[V.Cut]:`Mod-x`,[V.Paste]:`Mod-v`,[V.PastePlain]:`Mod-Shift-v`,[V.SelectAll]:`Mod-a`,[V.Undo]:`Mod-z`,[V.Redo]:Gj.isMac?`Shift-Mod-z`:`Mod-y`,[V.Bold]:`Mod-b`,[V.Italic]:`Mod-i`,[V.Underline]:`Mod-u`,[V.Strike]:`Mod-d`,[V.Code]:"Mod-`",[V.Paragraph]:`Mod-Shift-0`,[V.H1]:`Mod-Shift-1`,[V.H2]:`Mod-Shift-2`,[V.H3]:`Mod-Shift-3`,[V.H4]:`Mod-Shift-4`,[V.H5]:`Mod-Shift-5`,[V.H6]:`Mod-Shift-6`,[V.TaskList]:`Mod-Shift-7`,[V.BulletList]:`Mod-Shift-8`,[V.OrderedList]:`Mod-Shift-9`,[V.Quote]:`Mod->`,[V.Divider]:`Mod-Shift-|`,[V.Codeblock]:`Mod-Shift-~`,[V.ClearFormatting]:`Mod-Shift-C`,[V.Superscript]:`Mod-.`,[V.Subscript]:`Mod-,`,[V.LeftAlignment]:`Mod-Shift-L`,[V.CenterAlignment]:`Mod-Shift-E`,[V.RightAlignment]:`Mod-Shift-R`,[V.JustifyAlignment]:`Mod-Shift-J`,[V.InsertLink]:`Mod-k`,[V.Find]:`Mod-f`,[V.FindBackwards]:`Mod-Shift-f`,[V.FindReplace]:`Mod-Shift-H`,[V.AddFootnote]:`Mod-Alt-f`,[V.AddComment]:`Mod-Alt-m`,[V.ContextMenu]:`Mod-Shift-\\`,[V.IncreaseFontSize]:`Mod-Shift-.`,[V.DecreaseFontSize]:`Mod-Shift-,`,[V.IncreaseIndent]:`Tab`,[V.DecreaseIndent]:`Shift-Tab`,[V.Shortcuts]:`Mod-/`,[V.Format]:Gj.isMac?`Alt-Shift-f`:`Shift-Ctrl-f`},fF={...dF,[V.Strike]:`Mod-Shift-S`,[V.Code]:`Mod-Shift-M`,[V.Paragraph]:`Mod-Alt-0`,[V.H1]:`Mod-Alt-1`,[V.H2]:`Mod-Alt-2`,[V.H3]:`Mod-Alt-3`,[V.H4]:`Mod-Alt-4`,[V.H5]:`Mod-Alt-5`,[V.H6]:`Mod-Alt-6`,[V.OrderedList]:`Mod-Alt-7`,[V.BulletList]:`Mod-Alt-8`,[V.Quote]:`Mod-Alt-9`,[V.ClearFormatting]:`Mod-\\`,[V.IncreaseIndent]:`Mod-[`,[V.DecreaseIndent]:`Mod-]`},pF={default:dF,googleDoc:fF},mF=class extends jP{get name(){return`nodeViews`}createPlugin(){let e=[],t=U();for(let t of this.store.extensions){if(!t.createNodeViews)continue;let n=t.createNodeViews();e.unshift(tw(n)?{[t.name]:n}:n)}e.unshift(this.store.managerSettings.nodeViews??{});for(let n of e)Object.assign(t,n);return{props:{nodeViews:t}}}},hF=class extends jP{get name(){return`pasteRules`}createExternalPlugins(){return[this.generatePasteRulesPlugin()]}generatePasteRulesPlugin(){var e,t;let n=[];for(let r of this.store.extensions){if((e=this.store.managerSettings.exclude)?.pasteRules||!r.createPasteRules||(t=r.options.exclude)?.pasteRules)continue;let i=r.createPasteRules(),a=ow(i)?i:[i];n.push(...a)}return nP(n)}},gF=class extends jP{constructor(){super(...arguments),this.plugins=[],this.managerPlugins=[],this.applyStateHandlers=[],this.initStateHandlers=[],this.appendTransactionHandlers=[],this.pluginKeys=U(),this.stateGetters=new Map,this.getPluginStateCreator=e=>t=>e.getState(t??this.store.getState()),this.getStateByName=e=>{let t=this.stateGetters.get(e);return W(t,{message:`No plugin exists for the requested extension name.`}),t()}}get name(){return`plugins`}onCreate(){let{setStoreKey:e,setExtensionStore:t,managerSettings:n,extensions:r}=this.store;this.updateExtensionStore();let{plugins:i=[]}=n;this.updatePlugins(i,this.managerPlugins);for(let e of r)e.onApplyState&&this.applyStateHandlers.push(e.onApplyState.bind(e)),e.onInitState&&this.initStateHandlers.push(e.onInitState.bind(e)),e.onAppendTransaction&&this.appendTransactionHandlers.push(e.onAppendTransaction.bind(e)),this.extractExtensionPlugins(e);this.managerPlugins=i,this.store.setStoreKey(`plugins`,this.plugins),e(`pluginKeys`,this.pluginKeys),e(`getPluginState`,this.getStateByName),t(`getPluginState`,this.getStateByName)}createPlugin(){return{appendTransaction:(e,t,n)=>{let r=n.tr,i={previousState:t,tr:r,transactions:e,state:n};for(let e of this.appendTransactionHandlers)e(i);return this.options.appendTransaction(i),r.docChanged||r.steps.length>0||r.selectionSet||r.storedMarksSet?r:void 0},state:{init:(e,t)=>{for(let e of this.initStateHandlers)e(t)},apply:(e,t,n,r)=>{let i={previousState:n,state:r,tr:e};for(let e of this.applyStateHandlers)e(i);this.options.applyState(i)}}}}extractExtensionPlugins(e){var t,n;let r=!e.createPlugin&&!e.createExternalPlugins;if(!(r||(t=this.store.managerSettings.exclude)?.plugins||(n=e.options.exclude)?.plugins)){if(e.createPlugin){let t=new AD(e.name);this.pluginKeys[e.name]=t;let n=this.getPluginStateCreator(t);e.pluginKey=t,e.getPluginState=n,this.stateGetters.set(e.name,n),this.stateGetters.set(e.constructor,n);let r={...e.createPlugin(),key:t},i=new DD(r);this.updatePlugins([i],e.plugin?[e.plugin]:void 0),e.plugin=i}if(e.createExternalPlugins){let t=e.createExternalPlugins();this.updatePlugins(t,e.externalPlugins),e.externalPlugins=t}}}updatePlugins(e,t){if(!t||sw(t)){this.plugins=[...this.plugins,...e];return}if(e.length!==t.length){this.plugins=[...this.plugins.filter(e=>!t.includes(e)),...e];return}let n=new Map;for(let[r,i]of e.entries())n.set(HC(t,r),i);this.plugins=this.plugins.map(e=>t.includes(e)?n.get(e):e)}updateExtensionStore(){let{setExtensionStore:e}=this.store;e(`updatePlugins`,this.updatePlugins.bind(this)),e(`dispatchPluginUpdate`,this.dispatchPluginUpdate.bind(this)),e(`updateExtensionPlugins`,this.updateExtensionPlugins.bind(this))}updateExtensionPlugins(e){let t=FP(e)?e:IP(e)?this.store.manager.getExtension(e):this.store.extensions.find(t=>t.name===e);W(t,{code:H.INVALID_MANAGER_EXTENSION,message:`The extension ${e} does not exist within the editor.`}),this.extractExtensionPlugins(t),this.store.setStoreKey(`plugins`,this.plugins),this.dispatchPluginUpdate()}dispatchPluginUpdate(){W(this.store.phase>=jC.EditorView,{code:H.MANAGER_PHASE_ERROR,message:"`dispatchPluginUpdate` should only be called after the view has been added to the manager."});let{view:e,updateState:t}=this.store,n=e.state.reconfigure({plugins:this.plugins});t(n)}};gF=q([BP({defaultPriority:AC.Highest,handlerKeys:[`applyState`,`appendTransaction`]})],gF);var _F=class extends jP{constructor(){super(...arguments),this.dynamicAttributes={marks:U(),nodes:U()}}get name(){return`schema`}onCreate(){let{managerSettings:e,tags:t,markNames:n,nodeNames:r,extensions:i}=this.store,{defaultBlockNode:a,disableExtraAttributes:o,nodeOverride:s,markOverride:c}=e,l=e=>!!(e&&t[DC.Block].includes(e));if(e.schema){let{nodes:t,marks:n}=DF(e.schema);this.addSchema(e.schema,t,n);return}let u=l(a)?{doc:U(),[a]:U()}:U(),d=U(),f=vF({settings:e,gatheredSchemaAttributes:this.gatherExtraAttributes(i),nodeNames:r,markNames:n,tags:t});for(let e of i){f[e.name]={...f[e.name],...e.options.extraAttributes};let t=o===!0||e.options.disableExtraAttributes===!0||e.constructor.disableExtraAttributes===!0;if(RP(e)){let{spec:n,dynamic:r}=xF({createExtensionSpec:(t,n)=>e.createNodeSpec(t,n),extraAttributes:HC(f,e.name),override:{...s,...e.options.nodeOverride},ignoreExtraAttributes:t,name:e.constructorName,tags:e.tags});e.spec=n,u[e.name]=n,Object.keys(r).length>0&&(this.dynamicAttributes.nodes[e.name]=r)}if(zP(e)){let{spec:n,dynamic:r}=xF({createExtensionSpec:(t,n)=>e.createMarkSpec(t,n),extraAttributes:HC(f,e.name),override:{...c,...e.options.markOverride},ignoreExtraAttributes:t,name:e.constructorName,tags:e.tags??[]});e.spec=n,d[e.name]=n,Object.keys(r).length>0&&(this.dynamicAttributes.marks[e.name]=r)}}let p=new jT({nodes:u,marks:d,topNode:`doc`});this.addSchema(p,u,d)}createPlugin(){return{appendTransaction:(e,t,n)=>{let{tr:r}=n,i=e.some(e=>e.docChanged);return!i||Object.keys(this.dynamicAttributes.nodes).length===0&&Object.keys(this.dynamicAttributes.marks).length===0?null:(r.doc.descendants((e,t)=>(this.checkAndUpdateDynamicNodes(e,t,r),this.checkAndUpdateDynamicMarks(e,t,r),!0)),r.steps.length>0?r:null)}}}addSchema(e,t,n){this.store.setStoreKey(`nodes`,t),this.store.setStoreKey(`marks`,n),this.store.setStoreKey(`schema`,e),this.store.setExtensionStore(`schema`,e),this.store.setStoreKey(`defaultBlockNode`,yM(e).name);for(let t of Object.values(e.nodes)){if(t.name===`doc`)continue;if(t.isBlock||t.isTextblock)break}}checkAndUpdateDynamicNodes(e,t,n){for(let[r,i]of WC(this.dynamicAttributes.nodes)){if(e.type.name!==r)continue;for(let[r,a]of WC(i)){if(!rw(e.attrs[r]))continue;let i={...e.attrs,[r]:a(e)};n.setNodeMarkup(t,void 0,i),Vj(n)}}}checkAndUpdateDynamicMarks(e,t,n){for(let[r,i]of WC(this.dynamicAttributes.marks)){let a=HC(this.store.schema.marks,r),o=e.marks.find(e=>e.type.name===r);if(!o)continue;for(let[e,r]of WC(i)){if(!rw(o.attrs[e]))continue;let i=SM(n.doc.resolve(t),a);if(!i)continue;let{from:s,to:c}=i,l=a.create({...o.attrs,[e]:r(o)});n.removeMark(s,c,a).addMark(s,c,l),Vj(n)}}}gatherExtraAttributes(e){let t=[];for(let n of e){if(!n.createSchemaAttributes)continue;t.push(...n.createSchemaAttributes())}return t}};_F=q([BP({defaultPriority:AC.Highest})],_F);function vF(e){let{settings:t,gatheredSchemaAttributes:n,nodeNames:r,markNames:i,tags:a}=e,o=U();if(t.disableExtraAttributes)return o;let s=[...n,...t.extraAttributes??[]];for(let e of s??[]){let t=bF({identifiers:e.identifiers,nodeNames:r,markNames:i,tags:a});for(let n of t){let t=o[n]??{};o[n]={...t,...e.attributes}}}return o}function yF(e){return nw(e)&&ow(e.tags)}function bF(e){let{identifiers:t,nodeNames:n,markNames:r,tags:i}=e;if(t===`nodes`)return n;if(t===`marks`)return r;if(t===`all`)return[...n,...r];if(ow(t))return t;W(yF(t),{code:H.EXTENSION_EXTRA_ATTRIBUTES,message:"Invalid value passed as an identifier when creating `extraAttributes`."});let{tags:a=[],names:o=[],behavior:s=`any`,excludeNames:c,excludeTags:l,type:u}=t,d=new Set,f=u===`mark`?r:u===`node`?n:[...r,...n],p=e=>f.includes(e)&&!c?.includes(e);for(let e of o)p(e)&&d.add(e);let m=new Map;for(let e of a){if(l?.includes(e))continue;for(let t of i[e]){if(!p(t))continue;if(s===`any`){d.add(t);continue}let n=m.get(t)??new Set;n.add(e),m.set(t,n)}}for(let[e,t]of m)t.size===a.length&&d.add(e);return[...d]}function xF(e){var t;let{createExtensionSpec:n,extraAttributes:r,ignoreExtraAttributes:i,name:a,tags:o,override:s}=e,c=U();function l(e,t){c[e]=t}let u=!1;function d(){u=!0}let f=CF(r,i,d,l),p=wF(r,i),m=TF(r,i),h=n({defaults:f,parse:p,dom:m},s);return W(i||u,{code:H.EXTENSION_SPEC,message:`When creating a node specification you must call the 'defaults', and parse, and 'dom' methods. To avoid this error you can set the static property 'disableExtraAttributes' of '${a}' to 'true'.`}),h.group=[...(t=h.group)?.split(` `)??[],...o].join(` `)||void 0,{spec:h,dynamic:c}}function SF(e){return $C(e)||tw(e)?{default:e}:(W(e,{message:`${JC(e)} is not supported`,code:H.EXTENSION_EXTRA_ATTRIBUTES}),e)}function CF(e,t,n,r){return()=>{n();let i=U();if(t)return i;for(let[t,n]of WC(e)){let e=SF(n),a=e.default;tw(a)&&(r(t,a),a=null),i[t]=a===void 0?{}:{default:a}}return i}}function wF(e,t){return n=>{let r=U();if(t)return r;for(let[t,i]of WC(e)){let{parseDOM:e,...a}=SF(i);if(!Jj(n))continue;if(rw(e)){r[t]=n.getAttribute(t)??a.default;continue}if(tw(e)){r[t]=e(n)??a.default;continue}r[t]=n.getAttribute(e)??a.default}return r}}function TF(e,t){return n=>{let r=U();if(t)return r;function i(e,t){if(e){if($C(e)){r[t]=e;return}if(ow(e)){let[i,a]=e;r[i]=a??n.attrs[t];return}for(let[t,n]of WC(e))r[t]=n}}for(let[t,a]of WC(e)){let{toDOM:e,parseDOM:o}=SF(a);if(rw(e)){let e=$C(o)?o:t;r[e]=n.attrs[t];continue}if(tw(e)){i(e(n.attrs,EF(n)),t);continue}i(e,t)}return r}}function EF(e){return oM(e)?{node:e}:cM(e)?{mark:e}:{}}function DF(e){let t=U(),n=U();for(let[n,r]of Object.entries(e.nodes))t[n]=r.spec;for(let[t,r]of Object.entries(e.marks))n[t]=r.spec;return{nodes:t,marks:n}}var OF=class extends jP{constructor(){super(...arguments),this.onAddCustomHandler=({suggester:e})=>{var t;if(!(!e||(t=this.store.managerSettings.exclude)?.suggesters))return Bj(this.store.getState(),e)}}get name(){return`suggest`}onCreate(){this.store.setExtensionStore(`addSuggester`,e=>Bj(this.store.getState(),e)),this.store.setExtensionStore(`removeSuggester`,e=>fle(this.store.getState(),e))}createExternalPlugins(){var e,t;let n=[];for(let r of this.store.extensions){if((e=this.store.managerSettings.exclude)?.suggesters)break;if(!r.createSuggesters||(t=r.options.exclude)?.suggesters)continue;let i=r.createSuggesters(),a=ow(i)?i:[i];n.push(...a)}return[ple(...n)]}getSuggestState(e){return zj(e??this.store.getState())}getSuggestMethods(){let{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:i,findMatchAtPosition:a,findNextTextSelection:o,setLastChangeFromAppend:s}=this.getSuggestState();return{addIgnored:e,clearIgnored:t,removeIgnored:n,ignoreNextExit:r,setMarkRemoved:i,findMatchAtPosition:a,findNextTextSelection:o,setLastChangeFromAppend:s}}isSuggesterActive(e){var t;return qC(ow(e)?e:[e],(t=this.getSuggestState().match)?.suggester.name)}};q([HP()],OF.prototype,`getSuggestState`,1),q([HP()],OF.prototype,`getSuggestMethods`,1),q([HP()],OF.prototype,`isSuggesterActive`,1),OF=q([BP({customHandlerKeys:[`suggester`]})],OF);var kF=class extends jP{constructor(){super(...arguments),this.allTags=U(),this.plainTags=U(),this.markTags=U(),this.nodeTags=U()}get name(){return`tags`}onCreate(){this.resetTags();for(let e of this.store.extensions)this.updateTagForExtension(e);this.store.setStoreKey(`tags`,this.allTags),this.store.setExtensionStore(`tags`,this.allTags),this.store.setStoreKey(`plainTags`,this.plainTags),this.store.setExtensionStore(`plainTags`,this.plainTags),this.store.setStoreKey(`markTags`,this.markTags),this.store.setExtensionStore(`markTags`,this.markTags),this.store.setStoreKey(`nodeTags`,this.nodeTags),this.store.setExtensionStore(`nodeTags`,this.nodeTags)}resetTags(){let e=U(),t=U(),n=U(),r=U();for(let i of KC(DC))e[i]=[],t[i]=[],n[i]=[],r[i]=[];this.allTags=e,this.plainTags=t,this.markTags=n,this.nodeTags=r}updateTagForExtension(e){var t,n;let r=new Set([...e.tags??[],...(t=e.createTags)?.call(e)??[],...e.options.extraTags??[],...(n=this.store.managerSettings.extraTags)?.[e.name]??[]]);for(let t of r)W(AF(t),{code:H.EXTENSION,message:`The tag provided by the extension: ${e.constructorName} is not supported by the editor. To add custom tags you can use the 'mutateTag' method.`}),this.allTags[t].push(e.name),LP(e)&&this.plainTags[t].push(e.name),zP(e)&&this.markTags[t].push(e.name),RP(e)&&this.nodeTags[t].push(e.name);e.tags=[...r]}};kF=q([BP({defaultPriority:AC.Highest})],kF);function AF(e){return qC(KC(DC),e)}var jF=new AD(`remirrorFilePlaceholderPlugin`);function MF(){let e=new DD({key:jF,state:{init(){return{set:rj.empty,payloads:new Map}},apply(t,{set:n,payloads:r}){n=n.map(t.mapping,t.doc);let i=t.getMeta(e);if(i)if(i.type===0){let e=document.createElement(`placeholder`),a=ej.widget(i.pos,e,{id:i.id});n=n.add(t.doc,[a]),r.set(i.id,i.payload)}else i.type===1&&(n=n.remove(n.find(void 0,void 0,e=>e.id===i.id)),r.delete(i.id));return{set:n,payloads:r}}},props:{decorations(t){var n;return(n=e.getState(t))?.set??null}}});return e}var NF=class extends jP{get name(){return`upload`}createExternalPlugins(){return[MF()]}};function PF(e={}){let t={exitMarksOnArrowPress:oF.defaultOptions.exitMarksOnArrowPress,excludeBaseKeymap:oF.defaultOptions.excludeBaseKeymap,selectParentNodeOnEscape:oF.defaultOptions.selectParentNodeOnEscape,undoInputRuleOnBackspace:oF.defaultOptions.undoInputRuleOnBackspace,persistentSelectionClass:QP.defaultOptions.persistentSelectionClass};e={...t,...e};let n=(0,BC.default)(e,[`excludeBaseKeymap`,`selectParentNodeOnEscape`,`undoInputRuleOnBackspace`]),r=(0,BC.default)(e,[`persistentSelectionClass`]);return[new kF,new _F,new VP,new gF,new aF,new hF,new mF,new OF,new YP,new iF,new oF(n),new rF,new NF,new QP(r)]}var FF=class extends jP{get name(){return`meta`}onCreate(){if(this.store.setStoreKey(`getCommandMeta`,this.getCommandMeta.bind(this)),this.options.capture)for(let e of this.store.extensions)this.captureCommands(e),this.captureKeybindings(e)}createPlugin(){return{}}captureCommands(e){let t=e.decoratedCommands??{},n=e.createCommands;for(let n of Object.keys(t)){let t=e[n];e[n]=(...r)=>i=>{var a;let o=t(...r)(i);return i.dispatch&&o&&this.setCommandMeta(i.tr,{type:`command`,chain:i.dispatch!==(a=i.view)?.dispatch,name:n,extension:e.name,decorated:!0}),o}}n&&(e.createCommands=()=>{let t=n();for(let[n,r]of Object.entries(t))t[n]=(...t)=>i=>{var a;let o=r(...t)(i);return i.dispatch&&o&&this.setCommandMeta(i.tr,{type:`command`,chain:i.dispatch!==(a=i.view)?.dispatch,name:n,extension:e.name,decorated:!1}),o};return t})}captureKeybindings(e){}getCommandMeta(e){return e.getMeta(this.pluginKey)??[]}setCommandMeta(e,t){let n=this.getCommandMeta(e);e.setMeta(this.pluginKey,[...n,t])}};FF=q([BP({defaultOptions:{capture:Gj.isDevelopment},staticKeys:[`capture`],defaultPriority:AC.Highest})],FF);var IF,LF,RF,zF,BF,VF,HF,UF=class{constructor(e){yP(this,IF,dw()),yP(this,LF,void 0),yP(this,RF,void 0),yP(this,zF,!0),yP(this,BF,hP()),yP(this,VF,void 0),yP(this,HF,void 0),this.getState=()=>this.view.state??this.initialEditorState,this.getPreviousState=()=>this.previousState,this.dispatchTransaction=e=>{var t,n;W(!this.manager.destroyed,{code:H.MANAGER_PHASE_ERROR,message:`A transaction was dispatched to a manager that has already been destroyed. Please check your set up, or open an issue.`}),e=(n=(t=this.props).onDispatchTransaction)?.call(t,e,this.getState())??e;let r=this.getState(),{state:i,transactions:a}=r.applyTransaction(e);bP(this,RF,r),this.updateState({state:i,tr:e,transactions:a});let o=this.manager.store.getForcedUpdates(e);sw(o)||this.updateViewProps(...o)},this.onChange=(e=U())=>{var t,n;let r=this.eventListenerProps(e);J(this,zF)&&bP(this,zF,!1),(n=(t=this.props).onChange)==null||n.call(t,r)},this.onBlur=e=>{var t,n;let r=this.eventListenerProps();(n=(t=this.props).onBlur)==null||n.call(t,r,e),J(this,BF).emit(`blur`,r,e)},this.onFocus=e=>{var t,n;let r=this.eventListenerProps();(n=(t=this.props).onFocus)==null||n.call(t,r,e),J(this,BF).emit(`focus`,r,e)},this.setContent=(e,{triggerChange:t=!1}={})=>{let{doc:n}=this.manager.createState({content:e}),r=this.getState(),{state:i}=this.getState().applyTransaction(r.tr.replaceRangeWith(0,r.doc.nodeSize-2,n));if(t)return this.updateState({state:i,triggerChange:t});this.view.updateState(i)},this.clearContent=({triggerChange:e=!1}={})=>{this.setContent(this.manager.createEmptyDoc(),{triggerChange:e})},this.createStateFromContent=(e,t)=>this.manager.createState({content:e,selection:t}),this.focus=e=>{this.manager.store.commands.focus(e)},this.blur=e=>{this.manager.store.commands.blur(e)};let{getProps:t,initialEditorState:n,element:r}=e;if(bP(this,LF,t),bP(this,HF,n),this.manager.attachFramework(this,this.updateListener.bind(this)),this.manager.view)return;let i=this.createView(n,r);this.manager.addView(i)}get addHandler(){return J(this,VF)??bP(this,VF,J(this,BF).on.bind(J(this,BF)))}get updatableViewProps(){return{attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0}}get firstRender(){return J(this,zF)}get props(){return J(this,LF).call(this)}get previousState(){return this.previousStateOverride??J(this,RF)??this.initialEditorState}get manager(){return this.props.manager}get view(){return this.manager.view}get uid(){return J(this,IF)}get initialEditorState(){return J(this,HF)}updateListener(e){let{state:t,tr:n}=e;return J(this,BF).emit(`updated`,this.eventListenerProps({state:t,tr:n}))}update(e){let{getProps:t}=e;return bP(this,LF,t),this}updateViewProps(...e){let t=(0,BC.default)(this.updatableViewProps,e);this.view.setProps({...this.view.props,...t})}getAttributes(e){var t;let{attributes:n,autoFocus:r,classNames:i=[],label:a,editable:o}=this.props,s=(t=this.manager.store)?.attributes,c=tw(n)?n(this.eventListenerProps()):n,l={};(r||ew(r))&&(l=e?{autoFocus:!0}:{autofocus:`true`});let u=mw(TP(e&&`Prosemirror`,`remirror-editor`,s?.class,...i).split(` `)).join(` `),d={role:`textbox`,...l,"aria-multiline":`true`,...o??!0?{}:{"aria-readonly":`true`},"aria-label":a??``,...s,class:u};return fw({...d,...c})}addFocusListeners(){this.view.dom.addEventListener(`blur`,this.onBlur),this.view.dom.addEventListener(`focus`,this.onFocus)}removeFocusListeners(){this.view.dom.removeEventListener(`blur`,this.onBlur),this.view.dom.removeEventListener(`focus`,this.onFocus)}destroy(){J(this,BF).emit(`destroy`),this.view&&this.removeFocusListeners()}eventListenerProps(e=U()){let{state:t,tr:n,transactions:r}=e;return{tr:n,transactions:r,internalUpdate:!n,view:this.view,firstRender:J(this,zF),state:t??this.getState(),createStateFromContent:this.createStateFromContent,previousState:this.previousState,helpers:this.manager.store.helpers}}get baseOutput(){return{manager:this.manager,...this.manager.store,addHandler:this.addHandler,focus:this.focus,blur:this.blur,uid:J(this,IF),view:this.view,getState:this.getState,getPreviousState:this.getPreviousState,getExtension:this.manager.getExtension.bind(this.manager),hasExtension:this.manager.hasExtension.bind(this.manager),clearContent:this.clearContent,setContent:this.setContent}}};IF=new WeakMap,LF=new WeakMap,RF=new WeakMap,zF=new WeakMap,BF=new WeakMap,VF=new WeakMap,HF=new WeakMap;function WF(e,t){let n=[],r=new WeakMap,i=[],a=new WeakMap,o=[],s={duplicateMap:a,parentExtensions:i,gatheredExtensions:o,settings:t};for(let t of e)GF(s,{extension:t});o=vw(o,(e,t)=>t.priority-e.priority);let c=new WeakSet,l=new Set;for(let e of o){let t=e.constructor,i=e.name,o=a.get(t);if(W(o,{message:`No entries were found for the ExtensionConstructor ${e.name}`,code:H.INTERNAL}),c.has(t)||l.has(i))continue;c.add(t),l.add(i),n.push(e),r.set(t,e),o.forEach(n=>n?.replaceChildExtension(t,e))}let u=[];for(let e of n)KF({extension:e,found:c,missing:u});return W(sw(u),{code:H.MISSING_REQUIRED_EXTENSION,message:u.map(({Constructor:e,extension:t})=>`The extension '${t.name}' requires '${e.name} in order to run correctly.`).join(`
|
|
196
|
+
`)}),{extensions:n,extensionMap:r}}function GF(e,t){var n;let{gatheredExtensions:r,duplicateMap:i,parentExtensions:a,settings:o}=e,{extension:s,parentExtension:c}=t,{names:l=[]}=t;W(FP(s),{code:H.INVALID_MANAGER_EXTENSION,message:`An invalid extension: ${s} was provided to the [[\`RemirrorManager\`]].`});let u=s.extensions;if(s.setPriority((n=o.priority)?.[s.name]),r.push(s),qF({duplicateMap:i,extension:s,parentExtension:c}),u.length!==0){if(l.includes(s.name)){ti(!1,`Circular dependency encountered when loading extensions: ${l.join(` > `)} > ${s.name}`);return}l=[...l,s.name],a.push(s);for(let t of u)GF(e,{names:l,extension:t,parentExtension:s})}}function KF(e){let{extension:t,found:n,missing:r}=e;if(t.requiredExtensions)for(let e of t.requiredExtensions??[]){if(n.has(e))continue;r.push({Constructor:e,extension:t})}}function qF(e){let{duplicateMap:t,extension:n,parentExtension:r}=e,i=n.constructor,a=t.get(i),o=r?[r]:[];t.set(i,a?[...a,...o]:o)}function JF(e){var t,n,r,i;let{extension:a,nodeNames:o,markNames:s,plainNames:c,store:l,handlers:u}=e;a.setStore(l);let d=(t=a.onCreate)?.bind(a),f=(n=a.onView)?.bind(a),p=(r=a.onStateUpdate)?.bind(a),m=(i=a.onDestroy)?.bind(a);d&&u.create.push(d),f&&u.view.push(f),p&&u.update.push(p),m&&u.destroy.push(m),zP(a)&&s.push(a.name),RP(a)&&a.name!==`doc`&&o.push(a.name),LP(a)&&c.push(a.name)}var YF,XF,ZF,QF,$F,eI,tI,nI,rI,iI,aI,oI,sI,cI=class{constructor(e,t={}){yP(this,YF,void 0),yP(this,XF,U()),yP(this,ZF,U()),yP(this,QF,void 0),yP(this,$F,void 0),yP(this,eI,jC.None),yP(this,tI,void 0),yP(this,nI,!0),yP(this,rI,{create:[],view:[],update:[],destroy:[]}),yP(this,iI,[]),yP(this,aI,hP()),yP(this,oI,void 0),yP(this,sI,void 0),this.getState=()=>{var e;return J(this,eI)>=jC.EditorView?this.view.state:(W(J(this,oI),{code:H.MANAGER_PHASE_ERROR,message:"`getState` can only be called after the `Framework` or the `EditorView` has been added to the manager`. Check your plugins to make sure that the decorations callback uses the state argument."}),(e=J(this,oI))?.initialEditorState)},this.updateState=e=>{let t=this.getState();this.view.updateState(e),this.onStateUpdate({previousState:t,state:e})};let{extensions:n,extensionMap:r}=WF(e,t);bP(this,tI,t),bP(this,QF,Mw(n)),bP(this,$F,r),bP(this,YF,this.createExtensionStore()),bP(this,eI,jC.Create),this.setupLifecycleHandlers();for(let e of J(this,rI).create){let t=e();t&&J(this,iI).push(t)}}static create(e,t={}){return new cI([...Tw(e),...PF(t.builtin)],t)}get[OC](){return kC.Manager}get destroyed(){return J(this,eI)===jC.Destroy}get mounted(){return J(this,eI)>=jC.EditorView&&J(this,eI)<jC.Destroy}get output(){var e;return(e=J(this,oI))?.frameworkOutput}get frameworkAttached(){return!!J(this,oI)}get extensions(){return J(this,QF)}get stringHandlers(){return J(this,XF)}get store(){return Mw(J(this,ZF))}get extensionStore(){return Mw(J(this,YF))}get tr(){return this.getExtension(YP).transaction}get nodes(){return J(this,ZF).nodes}get marks(){return J(this,ZF).marks}get schema(){return J(this,ZF).schema}get extensionTags(){return J(this,ZF).tags}get view(){return J(this,ZF).view}get settings(){return J(this,tI)}get document(){return J(this,tI).document??NM()}setupLifecycleHandlers(){let e=J(this,YF),t=J(this,rI),n=[],r=[],i=[];e.nodeNames=n,e.markNames=r,e.plainNames=i;for(let a of J(this,QF))JF({extension:a,nodeNames:n,markNames:r,plainNames:i,handlers:t,store:e})}setStringHandler(e,t){J(this,XF)[e]=t}setStoreKey(e,t){J(this,ZF)[e]=t}getStoreKey(e){let t=J(this,ZF)[e];return W(!rw(t),{code:H.MANAGER_PHASE_ERROR,message:"`getStoreKey` should not be called before the values are available."}),t}setExtensionStore(e,t){W(J(this,eI)<=jC.EditorView,{code:H.MANAGER_PHASE_ERROR,message:"`setExtensionStore` should only be called during the `onCreate` lifecycle hook. Make sure to only call it within the returned methods."}),J(this,YF)[e]=t}createExtensionStore(){let e=U(),t;return Object.defineProperties(e,{extensions:{get:()=>J(this,QF),enumerable:!0},phase:{get:()=>J(this,eI),enumerable:!0},view:{get:()=>this.view,enumerable:!0},managerSettings:{get:()=>Mw(J(this,tI)),enumerable:!0},getState:{value:this.getState,enumerable:!0},updateState:{value:this.updateState,enumerable:!0},isMounted:{value:()=>this.mounted,enumerable:!0},getExtension:{value:this.getExtension.bind(this),enumerable:!0},manager:{get:()=>this,enumerable:!0},document:{get:()=>this.document,enumerable:!0},stringHandlers:{get:()=>J(this,XF),enumerable:!0},currentState:{get:()=>this.getState(),set:e=>{},enumerable:!0},previousState:{get:()=>t,set:e=>{t=e},enumerable:!0}}),e.getStoreKey=this.getStoreKey.bind(this),e.setStoreKey=this.setStoreKey.bind(this),e.setExtensionStore=this.setExtensionStore.bind(this),e.setStringHandler=this.setStringHandler.bind(this),e}addView(e){if(J(this,eI)>=jC.EditorView)return this;bP(this,nI,!0),bP(this,eI,jC.EditorView),J(this,ZF).view=e;for(let t of J(this,rI).view){let n=t(e);n&&J(this,iI).push(n)}return this}attachFramework(e,t){var n;J(this,oI)!==e&&(J(this,oI)&&(J(this,oI).destroy(),(n=J(this,sI))==null||n.call(this)),bP(this,oI,e),bP(this,sI,this.addHandler(`stateUpdate`,t)))}createEmptyDoc(){var e;let t=(e=this.schema.nodes.doc)?.createAndFill();return W(t,{code:H.INVALID_CONTENT,message:`An empty node could not be created due to an invalid schema.`}),t}createState(e={}){let{onError:t,defaultSelection:n=`end`}=this.settings,{content:r=this.createEmptyDoc(),selection:i=n,stringHandler:a=this.settings.stringHandler}=e,{schema:o,plugins:s}=this.store,c=MM({stringHandler:$C(a)?this.stringHandlers[a]:a,document:this.document,content:r,onError:t,schema:o,selection:i});return TD.create({schema:o,doc:c,plugins:s,selection:AM(i,c)})}addHandler(e,t){return J(this,aI).on(e,t)}onStateUpdate(e){let t=J(this,nI);J(this,YF).currentState=e.state,J(this,YF).previousState=e.previousState,t&&(bP(this,eI,jC.Runtime),bP(this,nI,!1));let n={...e,firstUpdate:t};for(let e of J(this,rI).update)e(n);J(this,aI).emit(`stateUpdate`,n)}getExtension(e){let t=J(this,$F).get(e);return W(t,{code:H.INVALID_MANAGER_EXTENSION,message:`'${e.name}' doesn't exist within this manager. Make sure it is properly added before attempting to use it.`}),t}hasExtension(e){let t=J(this,$F).get(e);return!!t}clone(){let e=J(this,QF).map(e=>e.clone(e.options)),t=cI.create(()=>e,J(this,tI));return J(this,aI).emit(`clone`,t),t}recreate(e=[],t={}){let n=J(this,QF).map(e=>e.clone(e.initialOptions)),r=cI.create(()=>[...n,...e],t);return J(this,aI).emit(`recreate`,r),r}destroy(){var e,t,n,r,i,a;bP(this,eI,jC.Destroy);for(let r of(e=this.view)?.state.plugins??[])(n=(t=r.getState(this.view.state))?.destroy)==null||n.call(t);(r=J(this,oI))==null||r.destroy(),(i=J(this,sI))==null||i.call(this);for(let e of J(this,iI))e();for(let e of J(this,rI).destroy)e();(a=this.view)==null||a.destroy(),J(this,aI).emit(`destroy`)}includes(e){let t=[],n=[];for(let e of J(this,QF))t.push(e.name,e.constructorName),n.push(e.constructor);return e.every(e=>$C(e)?qC(t,e):qC(n,e))}},lI=cI;YF=new WeakMap,XF=new WeakMap,ZF=new WeakMap,QF=new WeakMap,$F=new WeakMap,eI=new WeakMap,tI=new WeakMap,nI=new WeakMap,rI=new WeakMap,iI=new WeakMap,aI=new WeakMap,oI=new WeakMap,sI=new WeakMap;function uI(e,t){return!nM(e)||!rM(e,kC.Manager)?!1:t?e.includes(t):!0}function dI(e,t,n){return Math.min(Math.max(e,n),t)}var fI=class extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}},pI=fI;function mI(e){if(typeof e!=`string`)throw new pI(e);if(e.trim().toLowerCase()===`transparent`)return[0,0,0,0];let t=e.trim();t=wI.test(e)?vI(e):e;let n=bI.exec(t);if(n){let e=Array.from(n).slice(1);return[...e.slice(0,3).map(e=>parseInt(yI(e,2),16)),parseInt(yI(e[3]||`f`,2),16)/255]}let r=xI.exec(t);if(r){let e=Array.from(r).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,16)),parseInt(e[3]||`ff`,16)/255]}let i=SI.exec(t);if(i){let e=Array.from(i).slice(1);return[...e.slice(0,3).map(e=>parseInt(e,10)),parseFloat(e[3]||`1`)]}let a=CI.exec(t);if(a){let[t,n,r,i]=Array.from(a).slice(1).map(parseFloat);if(dI(0,100,n)!==n||dI(0,100,r)!==r)throw new pI(e);return[...EI(t,n,r),Number.isNaN(i)?1:i]}throw new pI(e)}function hI(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const gI=e=>parseInt(e.replace(/_/g,``),36),_I=`1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm`.split(` `).reduce((e,t)=>{let n=gI(t.substring(0,3)),r=gI(t.substring(3)).toString(16),i=``;for(let e=0;e<6-r.length;e++)i+=`0`;return e[n]=`${i}${r}`,e},{});function vI(e){let t=e.toLowerCase().trim(),n=_I[hI(t)];if(!n)throw new pI(e);return`#${n}`}const yI=(e,t)=>Array.from(Array(t)).map(()=>e).join(``),bI=RegExp(`^#${yI(`([a-f0-9])`,3)}([a-f0-9])?$`,`i`),xI=RegExp(`^#${yI(`([a-f0-9]{2})`,3)}([a-f0-9]{2})?$`,`i`),SI=RegExp(`^rgba?\\(\\s*(\\d+)\\s*${yI(`,\\s*(\\d+)\\s*`,2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,`i`),CI=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,wI=/^[a-z]+$/i,TI=e=>Math.round(e*255),EI=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(TI);let i=(e%360+360)%360/60,a=(1-Math.abs(2*r-1))*(t/100),o=a*(1-Math.abs(i%2-1)),s=0,c=0,l=0;i>=0&&i<1?(s=a,c=o):i>=1&&i<2?(s=o,c=a):i>=2&&i<3?(c=a,l=o):i>=3&&i<4?(c=o,l=a):i>=4&&i<5?(s=o,l=a):i>=5&&i<6&&(s=a,l=o);let u=r-a/2,d=s+u,f=c+u,p=l+u;return[d,f,p].map(TI)};function DI(e){let[t,n,r,i]=mI(e).map((e,t)=>t===3?e:e/255),a=Math.max(t,n,r),o=Math.min(t,n,r),s=(a+o)/2;if(a===o)return[0,0,s,i];let c=a-o,l=s>.5?c/(2-a-o):c/(a+o),u=60*(t===a?(n-r)/c+(n<r?6:0):n===a?(r-t)/c+2:(t-n)/c+4);return[u,l,s,i]}function OI(e,t,n,r){return`hsla(${(e%360).toFixed()}, ${dI(0,100,t*100).toFixed()}%, ${dI(0,100,n*100).toFixed()}%, ${parseFloat(dI(0,1,r).toFixed(3))})`}function kI(e,t){let[n,r,i,a]=DI(e);return OI(n,r,i-t,a)}function AI(e){if(e===`transparent`)return 0;function t(e){let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}let[n,r,i]=mI(e);return .2126*t(n)+.7152*t(r)+.0722*t(i)}function jI(e,t,n,r){return`rgba(${dI(0,255,e).toFixed()}, ${dI(0,255,t).toFixed()}, ${dI(0,255,n).toFixed()}, ${parseFloat(dI(0,1,r).toFixed(3))})`}function MI(e,t){return kI(e,-t)}function NI(e,t){let[n,r,i,a]=mI(e);return jI(n,r,i,a-t)}function PI(e){return AI(e)>.179}function FI(e){return PI(e)?`#000`:`#fff`}const Ele=`remirror-editor-wrapper`,Dle=`remirror-button-active`,Ole=`remirror-button`,kle=`remirror-composite`,Ale=`remirror-dialog`,jle=`remirror-dialog-backdrop`,Mle=`remirror-form`,Nle=`remirror-form-message`,Ple=`remirror-form-label`,Fle=`remirror-form-group`,Ile=`remirror-group`,Lle=`remirror-input`,Rle=`remirror-menu`,zle=`remirror-menu-pane`,Ble=`remirror-menu-pane-active`,Vle=`remirror-menu-dropdown-label`,Hle=`remirror-menu-pane-icon`,Ule=`remirror-menu-pane-label`,Wle=`remirror-menu-pane-shortcut`,Gle=`remirror-menu-button-left`,Kle=`remirror-menu-button-right`,qle=`remirror-menu-button-nested-left`,Jle=`remirror-menu-button-nested-right`,Yle=`remirror-menu-button`,Xle=`remirror-menu-bar`,Zle=`remirror-flex-column`,Qle=`remirror-flex-row`,$le=`remirror-menu-item`,eue=`remirror-menu-item-row`,tue=`remirror-menu-item-column`,nue=`remirror-menu-item-checkbox`,rue=`remirror-menu-item-radio`,iue=`remirror-menu-group`,aue=`remirror-floating-popover`,oue=`remirror-popover`,sue=`remirror-animated-popover`,cue=`remirror-role`,lue=`remirror-separator`,uue=`remirror-tab`,due=`remirror-tab-list`,fue=`remirror-tabbable`,pue=`remirror-toolbar`,mue=`remirror-tooltip`,hue=`remirror-table-size-editor`,gue=`remirror-table-size-editor-body`,_ue=`remirror-table-size-editor-cell`,vue=`remirror-table-size-editor-cell-selected`,yue=`remirror-table-size-editor-footer`,bue=`remirror-color-picker`,xue=`remirror-color-picker-cell`,Sue=`remirror-color-picker-cell-selected`;var II=Object.freeze({__proto__:null,ANIMATED_POPOVER:`remirror-animated-popover`,BUTTON:`remirror-button`,BUTTON_ACTIVE:`remirror-button-active`,COLOR_PICKER:`remirror-color-picker`,COLOR_PICKER_CELL:`remirror-color-picker-cell`,COLOR_PICKER_CELL_SELECTED:`remirror-color-picker-cell-selected`,COMPOSITE:`remirror-composite`,DIALOG:`remirror-dialog`,DIALOG_BACKDROP:`remirror-dialog-backdrop`,EDITOR_WRAPPER:`remirror-editor-wrapper`,FLEX_COLUMN:`remirror-flex-column`,FLEX_ROW:`remirror-flex-row`,FLOATING_POPOVER:`remirror-floating-popover`,FORM:`remirror-form`,FORM_GROUP:`remirror-form-group`,FORM_LABEL:`remirror-form-label`,FORM_MESSAGE:`remirror-form-message`,GROUP:`remirror-group`,INPUT:`remirror-input`,MENU:`remirror-menu`,MENU_BAR:`remirror-menu-bar`,MENU_BUTTON:`remirror-menu-button`,MENU_BUTTON_LEFT:`remirror-menu-button-left`,MENU_BUTTON_NESTED_LEFT:`remirror-menu-button-nested-left`,MENU_BUTTON_NESTED_RIGHT:`remirror-menu-button-nested-right`,MENU_BUTTON_RIGHT:`remirror-menu-button-right`,MENU_DROPDOWN_LABEL:`remirror-menu-dropdown-label`,MENU_GROUP:`remirror-menu-group`,MENU_ITEM:`remirror-menu-item`,MENU_ITEM_CHECKBOX:`remirror-menu-item-checkbox`,MENU_ITEM_COLUMN:`remirror-menu-item-column`,MENU_ITEM_RADIO:`remirror-menu-item-radio`,MENU_ITEM_ROW:`remirror-menu-item-row`,MENU_PANE:`remirror-menu-pane`,MENU_PANE_ACTIVE:`remirror-menu-pane-active`,MENU_PANE_ICON:`remirror-menu-pane-icon`,MENU_PANE_LABEL:`remirror-menu-pane-label`,MENU_PANE_SHORTCUT:`remirror-menu-pane-shortcut`,POPOVER:`remirror-popover`,ROLE:`remirror-role`,SEPARATOR:`remirror-separator`,TAB:`remirror-tab`,TABBABLE:`remirror-tabbable`,TABLE_SIZE_EDITOR:`remirror-table-size-editor`,TABLE_SIZE_EDITOR_BODY:`remirror-table-size-editor-body`,TABLE_SIZE_EDITOR_CELL:`remirror-table-size-editor-cell`,TABLE_SIZE_EDITOR_CELL_SELECTED:`remirror-table-size-editor-cell-selected`,TABLE_SIZE_EDITOR_FOOTER:`remirror-table-size-editor-footer`,TAB_LIST:`remirror-tab-list`,TOOLBAR:`remirror-toolbar`,TOOLTIP:`remirror-tooltip`});const Cue=`remirror-list-item-with-custom-mark`,wue=`remirror-ul-list-content`,Tue=`remirror-editor`,Eue=`remirror-list-item-marker-container`,Due=`remirror-list-item-checkbox`,Oue=`remirror-collapsible-list-item-closed`,kue=`remirror-collapsible-list-item-button`,Aue=`remirror-list-spine`;var LI=Object.freeze({__proto__:null,COLLAPSIBLE_LIST_ITEM_BUTTON:`remirror-collapsible-list-item-button`,COLLAPSIBLE_LIST_ITEM_CLOSED:`remirror-collapsible-list-item-closed`,EDITOR:`remirror-editor`,LIST_ITEM_CHECKBOX:`remirror-list-item-checkbox`,LIST_ITEM_MARKER_CONTAINER:`remirror-list-item-marker-container`,LIST_ITEM_WITH_CUSTOM_MARKER:`remirror-list-item-with-custom-mark`,LIST_SPINE:`remirror-list-spine`,UL_LIST_CONTENT:`remirror-ul-list-content`});const jue=`remirror-is-empty`;var RI=Object.freeze({__proto__:null,IS_EMPTY:`remirror-is-empty`});const Mue=`remirror-editor`,Nue=`remirror-positioner`,Pue=`remirror-positioner-widget`;var zI=Object.freeze({__proto__:null,EDITOR:`remirror-editor`,POSITIONER:`remirror-positioner`,POSITIONER_WIDGET:`remirror-positioner-widget`});const BI={gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},VI=`#000000`,HI=`#ffffff`,Fue=`#252103`,UI=NI(VI,.75),WI=`#7963d2`,GI=`#bcd263`,Iue=`#fff`,Lue=`#fff`,KI=BI.gray[1],qI=`rgba(10,31,68,0.08)`,JI=`rgba(10,31,68,0.10)`,YI=`rgba(10,31,68,0.12)`,XI=MI(NI(VI,.1),.13),ZI={background:HI,border:UI,foreground:VI,muted:KI,primary:WI,secondary:GI,primaryText:`#fff`,secondaryText:`#fff`,text:`#252103`,faded:XI},QI={...ZI,background:kI(HI,.15),border:kI(UI,.15),foreground:kI(VI,.15),muted:kI(KI,.15),primary:kI(WI,.15),secondary:kI(GI,.15),get text(){return FI(this.background)},get primaryText(){return FI(this.primary)},get secondaryText(){return FI(this.secondary)}},$I={...ZI,background:kI(HI,.075),border:kI(UI,.075),foreground:kI(VI,.075),muted:kI(KI,.075),primary:kI(WI,.075),secondary:kI(GI,.075),get text(){return FI(this.background)},get primaryText(){return FI(this.primary)},get secondaryText(){return FI(this.secondary)}},Rue={color:{...ZI,active:QI,hover:$I,shadow1:qI,shadow2:JI,shadow3:YI,backdrop:NI(VI,.1),outline:NI(WI,.6),table:{default:{border:MI(VI,.8),cell:MI(VI,.4),controller:BI.gray[3]},selected:{border:BI.blue[7],cell:BI.blue[1],controller:BI.blue[5]},preselect:{border:BI.blue[7],cell:MI(VI,.4),controller:BI.blue[5]},predelete:{border:BI.red[7],cell:BI.red[1],controller:BI.red[5]},mark:`#91919196`}},hue:BI,radius:{border:`0.25rem`,extra:`0.5rem`,circle:`50%`},fontFamily:{default:`system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif`,heading:`inherit`,mono:`Menlo, monospace`},fontSize:{0:`12px`,1:`14px`,2:`16px`,3:`20px`,4:`24px`,5:`32px`,6:`48px`,7:`64px`,8:`96px`,default:`16px`},space:{1:`4px`,2:`8px`,3:`16px`,4:`32px`,5:`64px`,6:`128px`,7:`256px`,8:`512px`},fontWeight:{bold:`700`,default:`400`,heading:`700`},letterSpacing:{tight:`-1px`,default:`normal`,loose:`1px`,wide:`3px`},lineHeight:{heading:`1.25em`,default:`1.5em`},boxShadow:{1:`0 1px 1px ${qI}`,2:`0 1px 1px ${JI}`,3:`0 1px 1px ${YI}`}},eL={cancel:`Cancel`,chooseFile:`Choose file`,copyDecimalComma:`Copy (decimal comma)`,copyDecimalDot:`Copy (decimal dot)`,copyToClipboard:`Copy to clipboard`,copiedToClipboard:`Copied to clipboard`,deleteAllRows:`Delete all rows`,downloadFile:`Download file`,export:`Export`,help:`Help`,import:`Import`,noFileSelected:`No file selected`,notApplicable:`N/A`,notExist:`not exist`,okay:`Okay`,uploadCapitalized:`Upload`,uploadFile:`Upload file`,pasteShortcutHint:`You can also press Ctrl+V or Command+V to paste from clipboard`,pasteFromClipboard:`Paste from clipboard`,clipboardIsEmpty:`Clipboard is empty`,clipboardReadFailed:`Unable to read data from clipboard. Check formatting or try Paste with Review.`,clipboardReadNotAllowed:`Your browser did not allow reading the clipboard. Upgrade browser or try Paste with Review.`,pasteSuccessful:`Paste successful`,pasteWithReview:`Paste with review`,pasteWithReviewRoundBrackets:`Paste (with review)`,quickPasteFromClipboard:`Quick paste from clipboard`,unableToCopyToClipboard:`Unable to copy to clipboard`,fileParsingFailed:`Failed to read or validate the file. Please check the format and try again.`,importWarning:`Large data detected: More than 500 rows have been imported. You can choose to import all or downsample for better performance.`,importLimitExceeded:`Import failed: The data exceeds the 5000-row limit. Please reduce the number of rows and try again.`,importingData:`Importing data`,incorrectFieldName:`Incorrect field name (row 0, column {{i}}: has name {{wrongName}}, but should be {{correctName}})`,incorrectNumberOfDataColumns:`Incorrect number of data columns, expected {{expectedLengthMessage}} columns in row {{dataRowStartIndex}}`,incorrectNumberOfFieldNameHeaderColumns:`Incorrect number of field name header columns, expected {{expectedLengthMessage}} columns in row 0`,incorrectNumberOfUnitHeaderColumns:`Incorrect number of unit header columns, expected {{expectedLengthMessage}} columns in row 1`,incorrectUnitRow:`Incorrect unit (row {{unitRowIndex}}, column {{i}}: has unit [{{wrongUnit}}], but should be [{{correctUnit}}])`,jsonParseFailed:`JSON parse failed`,pasteYourTableDataHereToImportIt:`Paste your table data here to import it`,rowColumn:`(row {{rowIndex}}, column {{columnIndex}})`,theValuesCanBeSeparatedByDifferentDelimiters:`The values can be separated by different delimiters`,unableToImportPleaseCorrectError:`Unable to import - {{rows}} rows have errors. Please correct input data and try again.`,unableToPrepareExportData:`Unable to prepare export – see console for details.`,validInputForPaste:`Valid input for paste.`,wrongFileFormatExpectedOneOf:`Wrong file format: expected one of`,youCanImportDataByPastingOrByMessage:`You can import data by pasting (e.g. from a spreadsheet), or by uploading a text file ( .txt or .csv ).`,commasAsDecimals:`Comma is treated as a decimal separator when it is the only separator`,deletePastedContent:`Delete pasted content`,downsampled:`Downsampled`,downsampleSuccess:`Successfully downsampled from {{from}} rows to {{to}} rows.`,downsampleTooltip:`Reduces number of data rows (decimation) using the Ramer–Douglas–Peucker algorithm.`,extraSeparators:`Two or more separators detected. Kept only last one as decimal separator, please control your import results`,noDataPastedYet:`No data pasted yet.`,semicolonSeparatedValues:`Semicolon-separated values`,tabSeparatedValues:`Tab-separated values`,examples:`Examples`,smartUpload_description:`Upload image and extract table content using a LLM`,smartUpload_smartUpload:`Smart Upload`,toUploadOrImportFromClipboardMessage:`To upload or import from clipboard please select your preferred unit in the table header and upload or paste numbers only for Depth, Inc, Azi. Follow example below`},tL=(e,t={})=>e?.replace(/\{\{(\w+)\}\}/g,(e,n)=>t?.[n]===void 0?``:String(t?.[n])),nL=e=>(0,f.useMemo)(()=>{let t=Object.keys(eL).reduce((t,n)=>{let r=eL?.[n],i=e?.[n];return t[n]=i??r,t},{});return(e,n)=>{let r=t[e];return n?tL(r,n):r}},[e]),rL=e=>{let{rows:t}=e,n=Array(t.length);for(let e=0;e<t.length;e++){let r=t[e],i=Array(r.length);for(let e=0;e<r.length;e++)i[e]=fm(r[e]);n[e]=i}return{...e,rows:n}},iL=({config:e,state:t,setState:n,smartUploadConfig:r,startTransition:i})=>{let{exportData:a,beforeExportData:o,importLimit:s=Wx,validationRules:c=[],translations:l,onImportComplete:u=()=>{},disablePasteSuccessfulToast:d,prevalidationConfig:p,onDeleteRows:m}=e??{},{parsedResult:h}=t,{checkPrevalidationNeed:g}=p??{},_=nL(l),v=xC(_,a,o),y=(0,f.useCallback)(e=>{n(t=>({...t,...e}))},[n]),b=(0,f.useCallback)(({name:e,callback:n}={})=>{let r={...t.modalVisibility},i=!e,a=[];if(i)for(let e of Object.keys(r))a.push(e),r[e]=!1;else r?.[e]&&(a.push(e),r[e]=!1);a.length>0&&y({modalVisibility:r,pastedText:``,parsedResult:{isValid:!1,fields:[],rows:[],units:[],errors:[]}}),typeof n==`function`&&a.length>0&&n()},[t.modalVisibility,y]),x=(0,f.useCallback)(()=>{i(()=>y({pastedText:``,parsedResult:{isValid:!1,fields:[],rows:[],units:[],errors:[]}})),m&&m?.(`all`)},[t.modalVisibility,y]),S=(0,f.useCallback)((e,n)=>{y({modalVisibility:{...t.modalVisibility,[e]:n}})},[t.modalVisibility,y]),C=(0,f.useCallback)(async e=>{let t={validationRules:c,importLimit:s},n=await NS(e,t,_),r=rL(n);if(g&&g(h)){let{fields:e,units:n,rows:a,isValid:o}=r,s=PS(e,n??[],a,t);return i(()=>y({pastedText:s,parsedResult:h})),r}return i(()=>y({pastedText:e,parsedResult:r})),r},[c,s,_,g,h,y]),w=(0,f.useCallback)(async e=>{let{fromFile:t,showSuccessToast:n=!0}=e??{},r;try{if(r=t?await t.text():await navigator.clipboard.readText(),!r){vC({message:{type:`Error`,content:_(t?`fileReadOrParseFailed`:`clipboardReadNotAllowed`)}},i);return}let e={validationRules:c,importLimit:s},a=await NS(r,e,_),o=rL(a);return n&&vC({message:{type:`Success`,content:_(`pasteSuccessful`)}},i),{pastedText:r,parsedResult:o}}catch(e){vC({message:{type:`Error`,content:_(t?`fileReadOrParseFailed`:`clipboardReadNotAllowed`),details:e.message}},i);return}},[c,s]),T=(0,f.useCallback)(async e=>{let t=e?.target?.files?.[0];if(!t)return;let n=await t.text(),r=await C(n);r.isValid?(d||vC({message:{type:`Success`,content:_(`pasteSuccessful`)}},i),i(()=>u(r))):vC({message:{type:`Error`,content:_(`fileParsingFailed`)}},i)},[c,s,y,u]),E=(0,f.useCallback)(async(e=!0)=>{try{let t=await navigator.clipboard.readText();if(!t){vC({message:{type:`Error`,content:_(`clipboardIsEmpty`)}},i);return}let n=await C(t);if(!n.isValid){vC({message:{type:`Error`,content:_(`clipboardReadFailed`)}},i);return}d||vC({message:{type:`Success`,content:_(`pasteSuccessful`)}},i),e&&i(()=>u(n))}catch{vC({message:{type:`Error`,content:_(`clipboardReadNotAllowed`)}},i)}},[c,s,_,y,u]),D=(0,f.useCallback)(async e=>{let t=await v();if(!t)return;let{fields:n=[],units:r=[],rows:a=[]}=t,o=(r??[]).map(e=>e?.length?e:Ux).slice(0,n.length),s=(e,t)=>t===`comma`?e.replace(/\./g,`,`):e,c=a.map(t=>t.map(t=>rw(t)?``:s(t.toString(),e))),l=PS(n,o,c,{delimiter:` `});try{await navigator.clipboard.writeText(l),vC({message:{type:`Success`,content:_(`copiedToClipboard`)}},i)}catch(e){vC({message:{type:`Error`,content:_(`unableToCopyToClipboard`),details:e.message}},i)}},[v,_]),O=(0,f.useCallback)(e=>{if(!e||e.errorMessage){vC({message:{type:`Error`,content:e?.errorMessage||`Smart upload failed.`}},i);return}let[t,...n]=e,a=Object.keys(n[0]),o={isValid:!0,fields:a,units:Object.values(t),rows:n.map(e=>Object.values(e)),errors:[]};i(()=>y({parsedResult:o})),i(()=>u(o));let{onComplete:s}=r??{};typeof s==`function`&&s(o),b()},[y,u,r]);return{updateState:y,closeModals:b,setModalVisibility:S,readAndParseInput:w,onFileChange:T,onClickQuickPasteFromClipBoard:E,onClickCopyClipboard:D,onSmartUploadResult:O,deleteAllRows:x}},aL=(e,t)=>{let{fields:n,rows:r}=e,i=e.units?.map(e=>e||Ux)??[],a={delimiter:` `},o=PS(n,i,r,a),s=new Blob([o],{type:`text/plain`}),c=document.createElement(`a`);c.href=window.URL.createObjectURL(s),c.download=`${t}.csv`,document.body.appendChild(c),c.click(),document.body.removeChild(c)};var oL=u(Ra());const sL=e=>(0,oL.isObject)(e)&&`modalKey`in e,cL=(e,t,n)=>(0,oL.cloneDeepWith)(e,e=>{if((0,oL.isArray)(e)||!(0,oL.isPlainObject)(e))return;let{modalKey:r}=e??{};if(sL(e)&&typeof e.onClick!=`function`){let i=()=>{n(r,!t.modalVisibility?.[r])};return{...e,onClick:i}}}),lL=(e,t,n)=>cL(e,t,n),uL={pastedText:``,parsedResult:{isValid:!1,fields:[],rows:[],units:[],errors:[]},pasteModalHelpVisible:!1,modalVisibility:{smartUploadModal:!1,reviewPasteModal:!1,helpModal:!1}},dL=({config:e,smartUploadConfig:t,testId:n})=>{let{exportData:r,beforeExportData:i,prevalidationConfig:a,validationRules:o,title:s,translations:c,textOnly:l=!1,showImportOptions:u=!0,copyFromClipBoard:d=!0,showDeleteOptions:m=!0,showHelpOption:h=!0,modals:g=[],dynamicOptions:_,onImportComplete:v}=e??{},[y,b]=(0,f.useState)(uL),{modalVisibility:{smartUploadModal:x=!1,reviewPasteModal:S=!1,helpModal:C=!1}}=y,{enabled:w,prompt:T=``,onClose:E,onError:D,service:O=()=>Promise.resolve()}=t??{},k=nL(c),A=xC(k,r,i),[j,M]=(0,f.useTransition)(),N=iL({config:e,state:y,setState:b,smartUploadConfig:t,startTransition:M}),{readAndParseInput:P,updateState:ee,closeModals:te,setModalVisibility:ne,onFileChange:re,onClickQuickPasteFromClipBoard:ie,onClickCopyClipboard:ae,onSmartUploadResult:oe,deleteAllRows:se}=N??{};yp(`Escape`,()=>te());let ce=u?[{type:`Option`,label:k(`uploadFile`),upload:!0,uploadType:`.csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,onChange:re,testId:`${n}-option-upload-file`},...d?[{type:`Option`,label:k(`quickPasteFromClipboard`),onClick:ie,testId:`${n}-option-quick-paste-from-clipboard`}]:[],...d?[{type:`Option`,label:k(`pasteWithReview`),onClick:()=>ne(`reviewPasteModal`,!S),testId:`${n}-paste-with-review`}]:[],...T&&w&&t?[{type:`Option`,label:k(`smartUpload_smartUpload`),onClick:()=>ne(`smartUploadModal`,!x),testId:`${n}-smart-upload`}]:[],...lL(_?.importOptions??[],y,ne)]:[],le=[{type:`Option`,label:k(`downloadFile`),onClick:async()=>{let e=await A();e&&e&&aL(e,s)}},...l?[{type:`Option`,label:k(`copyToClipboard`),onClick:()=>ae(`dot`)}]:[{type:`Menu`,testId:`${n}-menu-copy-to-clipboard`,menu:{trigger:`Text`,label:k(`copyToClipboard`),sections:[{type:`Option`,label:k(`copyDecimalDot`),onClick:()=>ae(`dot`),testId:`${n}-option-copy-decimal-dot`},{type:`Option`,label:k(`copyDecimalComma`),onClick:()=>ae(`comma`)}]}}],...lL(_?.exportOptions??[],y,ne)],ue=m?[{type:`Option`,label:k(`deleteAllRows`),onClick:()=>se(),testId:`${n}-delete-all-rows`},...lL(_?.deleteOptions??[],y,ne)]:[],de=h?[{type:`Divider`},{type:`Option`,label:k(`help`),onClick:()=>ne(`helpModal`,!C)},...lL(_?.helpOptions??[],y,ne)]:[],fe=[...ce.length?[{section:[...ce,...de],name:`import-options`,iconName:`upload`,tooltip:k(`import`)}]:[],...le.length?[{section:le,name:`export-options`,iconName:`download`,tooltip:k(`export`)}]:[],...ue.length?[{section:ue,name:`delete-options`,iconName:`delete`,tooltip:k(`deleteAllRows`)}]:[]];return(0,p.jsxs)(`span`,{children:[j&&(0,p.jsx)(po,{small:!0,dark:!0}),fe.map((e,t)=>(0,p.jsx)(Voe,{sections:e.section,iconName:e.iconName,tooltip:e.tooltip,testId:`data-${e?.name}-menu`},t)),S&&(0,p.jsx)(zoe,{config:e,state:y,updateState:ee,setModalVisibility:ne,readAndParseInput:P,onCloseModal:te,validationRules:o,onCompleteImport:v,prevalidationConfig:a,t:k,loading:j,startTransition:M,testId:n}),C&&(0,p.jsx)(th,{visible:C,setModalVisibility:ne,validationRules:o,t:k}),w&&t&&(0,p.jsx)(Qm,{visible:x,prompt:T,onUpload:O,onCloseModal:()=>te({callback:E}),onComplete:oe,onError:D,heading:k(`smartUpload_smartUpload`),dialogText:k(`smartUpload_description`),fileInputText:k(`chooseFile`),fileInputPlaceholder:k(`noFileSelected`),uploadText:k(`uploadCapitalized`),cancelText:k(`cancel`),testId:n}),(0,p.jsx)(Boe,{modals:g,modalVisibility:y?.modalVisibility,onCloseModal:te,testId:n})]})};var fL=u(Ra());const pL=({file:e,accept:t,multi:n,name:r,disabled:i,onChange:a=fL.noop,...o})=>{let s=(0,f.useContext)(Ie),c=(0,f.useRef)(null),l=()=>{i||s||c.current?.click()},u=e=>{let t=n?e.target.files:e.target.files?.[0],r={...e,target:{...e.target,value:t,name:e.target.name}};a(r),c.current&&(c.current.value=``)};return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(_o,{...o,onClick:l}),(0,p.jsx)(`input`,{name:r,ref:c,style:{display:`none`},type:`file`,accept:t,multiple:n,onChange:u})]})},zue=`_label_18pfe_1`,Bue=`_labelLeft_18pfe_5`,Vue=`_icons_18pfe_13`;var mL={label:`_label_18pfe_1`,labelLeft:`_labelLeft_18pfe_5`,icons:`_icons_18pfe_13`},hL=u(h());const gL=({label:e=null,width:t=`auto`,helpText:n=``,helpTextMaxWidth:r=`300px`,onClickHelp:i=void 0,lock:a={visible:!1,active:!1,onClick:()=>{},tooltip:``,testId:void 0},info:o,libraryIcon:s,labelLeft:c=!1})=>(0,p.jsx)(`div`,{className:(0,hL.default)(mL.label,c?mL.labelLeft:``),children:(0,p.jsxs)(`label`,{style:{width:t||``},children:[e,(0,p.jsxs)(`div`,{className:mL.icons,children:[(n||i)&&(0,p.jsx)(Ea,{text:n,onClick:i,maxWidth:r}),o&&(0,p.jsx)(Ea,{text:o,icon:S.INFO}),a&&a.visible&&a.onClick&&(0,p.jsx)(Ea,{onClick:a.onClick,icon:a.active?S.LOCK:S.UNLOCK,active:a.active,testId:a.testId}),s&&(0,p.jsx)(Ea,{text:s?.tooltip??``,onClick:s.onClick,icon:S.LIBRARY})]})]})}),Hue=`_field_1xoss_1`,Uue=`_labelLeft_1xoss_5`,Wue=`_fieldInput_1xoss_9`,Gue=`_formRow_1xoss_12`,Kue=`_button_1xoss_22`;var _L={field:`_field_1xoss_1`,labelLeft:`_labelLeft_1xoss_5`,fieldInput:`_fieldInput_1xoss_9`,formRow:`_formRow_1xoss_12`,"form-row":`_form-row_1xoss_13`,button:`_button_1xoss_22`},vL=u(h());const yL=({label:e,labelLeft:t=!1,labelWidth:n=`auto`,children:r,helpText:i,helpTextMaxWidth:a=`300px`,onClickHelp:o,lock:s={visible:!1,active:!1,onClick:()=>{},tooltip:``,testId:void 0},info:c,libraryIcon:l,testId:u})=>(0,p.jsxs)(`div`,{className:(0,vL.default)(_L.field,t?_L.labelLeft:``),"data-testid":u,children:[(e||t)&&(0,p.jsx)(gL,{label:e,width:n,helpText:i,helpTextMaxWidth:a,onClickHelp:o,lock:s,info:c,libraryIcon:l,labelLeft:t}),(0,p.jsx)(`div`,{className:_L.fieldInput,children:r})]}),bL=({alignItems:e=`initial`,justifyContent:t=`initial`,direction:n=`initial`,height:r=`initial`,children:i=null,wrap:a=!0,gap:o=!1})=>(0,p.jsx)(`div`,{style:{display:`flex`,flexDirection:n,alignItems:e,justifyContent:t,height:typeof r==`number`?`${r}px`:r,flexWrap:a?`wrap`:`nowrap`,gap:o===!1?0:o===!0?`var(--padding)`:typeof o==`number`?`${o}px`:o},children:i}),que=`_formRow_odewu_1`;var xL={formRow:`_formRow_odewu_1`};const SL=({children:e})=>(0,p.jsx)(`div`,{className:xL.formRow,children:e}),CL=e=>typeof e==`boolean`?e?`20px`:`0px`:typeof e==`number`?`${e}px`:e||`initial`,wL=e=>typeof e==`number`?`${e}px`:e||`initial`,TL=Dd.div`
|
|
197
|
+
display: grid;
|
|
198
|
+
gap: ${e=>CL(e.$gap)};
|
|
199
|
+
grid-template-rows: ${e=>wL(e.$rows)};
|
|
200
|
+
grid-template-columns: ${e=>wL(e.$columns)};
|
|
201
|
+
height: ${e=>wL(e.$height)};
|
|
202
|
+
|
|
203
|
+
@media (max-width: 992px) {
|
|
204
|
+
${e=>e.$columnsTablet&&`grid-template-columns: ${wL(e.$columnsTablet)};`}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@media (max-width: 575px) {
|
|
208
|
+
${e=>e.$columnsMobile&&`grid-template-columns: ${wL(e.$columnsMobile)};`}
|
|
209
|
+
}
|
|
210
|
+
`,EL=({rows:e=`initial`,columns:t=`initial`,columnsTablet:n=null,columnsMobile:r=null,gap:i=!1,height:a=`initial`,children:o})=>(0,p.jsx)(TL,{$rows:e,$columns:t,$columnsTablet:n,$columnsMobile:r,$gap:i===!1?`0px`:i===!0?`var(--padding)`:i,$height:typeof a==`number`?`${a}px`:a,children:o}),Jue=`_inputInTable_1wss1_1`,Yue=`_inputHover_1wss1_13`,Xue=`_inputFocus_1wss1_18`,Zue=`_inputError_1wss1_25`,Que=`_inputWarning_1wss1_26`,$ue=`_inputDisabled_1wss1_61`,ede=`_hideScrollbars_1wss1_67`,tde=`_list_1wss1_77`,nde=`_bordered_1wss1_83`,rde=`_virtualRow_1wss1_87`,ide=`_item_1wss1_87`,ade=`_header_1wss1_90`,ode=`_headerTitle_1wss1_90`,sde=`_heading_1wss1_91`,cde=`_itemHeader_1wss1_91`,lde=`_narrow_1wss1_94`,ude=`_stickyHeader_1wss1_98`,dde=`_title_1wss1_109`,fde=`_name_1wss1_115`,pde=`_iconTooltipMargin_1wss1_119`,mde=`_bold_1wss1_122`,hde=`_toggleNarrow_1wss1_133`,gde=`_drag_1wss1_151`,_de=`_dragOverlay_1wss1_172`,vde=`_listContent_1wss1_177`,yde=`_action_1wss1_202`,bde=`_active_1wss1_205`,xde=`_indented_1wss1_212`,Sde=`_disabled_1wss1_225`,Cde=`_label_1wss1_236`,wde=`_details_1wss1_247`,Tde=`_metadata_1wss1_248`,Ede=`_itemContent_1wss1_256`,Dde=`_indentIcon_1wss1_263`,Ode=`_expandIcon_1wss1_268`,kde=`_expanded_1wss1_275`,Ade=`_right_1wss1_278`,jde=`_actions_1wss1_286`,Mde=`_scrollableList_1wss1_291`,Nde=`_hideScrollbar_1wss1_67`,Pde=`_noPointerEvents_1wss1_305`,Fde=`_virtualRows_1wss1_308`;var X={inputInTable:`_inputInTable_1wss1_1`,inputHover:`_inputHover_1wss1_13`,inputFocus:`_inputFocus_1wss1_18`,inputError:`_inputError_1wss1_25`,inputWarning:`_inputWarning_1wss1_26`,inputDisabled:`_inputDisabled_1wss1_61`,hideScrollbars:`_hideScrollbars_1wss1_67`,list:`_list_1wss1_77`,bordered:`_bordered_1wss1_83`,virtualRow:`_virtualRow_1wss1_87`,item:`_item_1wss1_87`,header:`_header_1wss1_90`,headerTitle:`_headerTitle_1wss1_90`,heading:`_heading_1wss1_91`,itemHeader:`_itemHeader_1wss1_91`,narrow:`_narrow_1wss1_94`,stickyHeader:`_stickyHeader_1wss1_98`,title:`_title_1wss1_109`,name:`_name_1wss1_115`,iconTooltipMargin:`_iconTooltipMargin_1wss1_119`,bold:`_bold_1wss1_122`,toggleNarrow:`_toggleNarrow_1wss1_133`,drag:`_drag_1wss1_151`,dragOverlay:`_dragOverlay_1wss1_172`,listContent:`_listContent_1wss1_177`,action:`_action_1wss1_202`,active:`_active_1wss1_205`,indented:`_indented_1wss1_212`,disabled:`_disabled_1wss1_225`,label:`_label_1wss1_236`,details:`_details_1wss1_247`,metadata:`_metadata_1wss1_248`,itemContent:`_itemContent_1wss1_256`,indentIcon:`_indentIcon_1wss1_263`,expandIcon:`_expandIcon_1wss1_268`,expanded:`_expanded_1wss1_275`,right:`_right_1wss1_278`,actions:`_actions_1wss1_286`,scrollableList:`_scrollableList_1wss1_291`,hideScrollbar:`_hideScrollbar_1wss1_67`,noPointerEvents:`_noPointerEvents_1wss1_305`,virtualRows:`_virtualRows_1wss1_308`};const DL=({toggleNarrow:e,onClickToggleNarrow:t})=>e?(0,p.jsx)(`a`,{className:X.toggleNarrow,onClick:t,children:(0,p.jsx)(er,{icon:S.CHEVRON_LEFT})}):null;var OL=u(h());const kL=(0,f.forwardRef)(({name:e,actions:t=[],toggleNarrow:n=!1,onToggleNarrow:r=()=>{},stickyHeader:i},a)=>(0,p.jsxs)(`div`,{ref:a,className:(0,OL.default)(X.header,i?X.stickyHeader:``),children:[(0,p.jsx)(DL,{toggleNarrow:n,onClickToggleNarrow:r}),e&&(0,p.jsx)(`div`,{className:X.headerTitle,children:(0,p.jsx)(rf,{top:!0,marginBottom:0,children:e})}),(0,p.jsx)(`div`,{className:X.right,children:(0,p.jsx)(`div`,{className:X.actions,children:(0,p.jsx)(qs,{actions:t})})})]})),AL=({label:e})=>e?(0,p.jsx)(`span`,{className:X.label,children:(0,p.jsx)(ks,{color:e.color,title:e.value,small:e.small})}):null;var jL=u(h());const ML=({name:e,icon:t,testId:n})=>{let r=t&&(0,p.jsx)(er,{icon:t.icon,color:t.color||`#db2828`});return(0,p.jsxs)(`span`,{className:(0,jL.default)(X.name,X.bold),"data-testid":n,children:[e,t&&t.tooltip&&t.tooltip.text?(0,p.jsx)(`span`,{className:X.iconTooltipMargin,children:(0,p.jsx)(ya,{text:t.tooltip.text,maxWidth:`350px`,children:r})}):t&&t.icon&&(0,p.jsx)(`span`,{className:X.iconTooltipMargin,children:r})]})},NL=({item:e})=>{let{name:t,icon:n,details:r,metadata:i,invalid:a,testId:o}=e,s=(0,p.jsx)(ML,{name:t,icon:n,testId:o&&`${o}-name`});return a&&(s=(0,p.jsx)(ks,{small:!0,margin:`-2px`,title:`!`,children:s})),(0,p.jsxs)(`span`,{className:X.title,children:[s,r&&(0,p.jsx)(`span`,{className:X.details,"data-testid":o&&`${o}-details`,children:r}),i&&(0,p.jsx)(`span`,{className:X.metadata,"data-testid":o&&`${o}-metadata`,children:i})]})},PL=({item:e})=>e.metaCount===void 0?null:(0,p.jsx)(ks,{color:`rgba(0,0,0,0.25)`,title:e.metaCount}),FL=({item:e,expanding:t})=>{let n=e=>{e.preventDefault(),e.stopPropagation()};return t&&e.active&&e.content?(0,p.jsx)(`div`,{className:X.itemContent,onClick:n,children:e.content}):null};var IL=u(h());const LL=(0,f.forwardRef)(({item:e,index:t},n)=>{let r=(0,f.useContext)(Ie),{actions:i,disabled:a,expanded:o,onClick:s,title:c,name:l,icon:u,testId:d}=e;return(0,p.jsx)(`div`,{ref:e=>{n&&`current`in n&&Array.isArray(n.current)&&t!==void 0&&(n.current[t]=e)},"data-testid":d??null,className:(0,IL.default)(X.item,X.heading,a||r?X.disabled:``,s?X.action:``),onClick:e=>{s&&s(e)},title:c,children:(0,p.jsx)(`div`,{children:(0,p.jsxs)(`div`,{className:X.itemHeader,children:[typeof o==`boolean`&&(0,p.jsx)(`div`,{className:(0,IL.default)(X.expandIcon,o&&X.expanded),children:(0,p.jsx)(er,{icon:S.CHEVRON_RIGHT})}),(0,p.jsx)(ML,{name:l,icon:u}),(0,p.jsxs)(`div`,{className:X.right,children:[(0,p.jsx)(PL,{item:e}),!(a||r)&&i&&(0,p.jsx)(`div`,{className:X.actions,children:(0,p.jsx)(qs,{actions:e.actions??[]})})]})]})})})});var RL=u(h());const zL=(0,f.forwardRef)(({item:e,index:t,expanding:n,invokeEditOnRowClick:r,draggable:i},a)=>{let o=(0,f.useContext)(Ie),s=(e,t,s,c,l,u)=>{let d=t.actions&&t.actions.find(e=>e.label&&String(e.label)?.toLowerCase()===`edit`),f=!!(d||t.url||t.onClick),m=t.level&&t.level>1?(t.level-1)*20:0,h=t.component||`a`;return(0,p.jsx)(h,{href:t.url,to:t.url,ref:u,style:s,className:(0,RL.default)(X.item,t.active?X.active:``,t.disabled||o?X.disabled:``,f?X.action:``),onClick:e=>{if(r&&d&&d.onClick&&d.onClick(e,t.id),t.onClick)return t.onClick(e)},"data-id":e,title:t.title,"data-testid":t.testId,children:(0,p.jsxs)(`div`,{ref:t=>{a&&`current`in a&&Array.isArray(a.current)&&e!==void 0&&(a.current[e]=t)},style:{paddingLeft:m},children:[(0,p.jsxs)(`div`,{className:X.itemHeader,children:[i&&(0,p.jsx)(`div`,{className:X.drag,...c,...l,children:(0,p.jsx)(er,{icon:S.DRAG})}),t.level&&t.level>0?(0,p.jsx)(`div`,{className:X.indentIcon,children:(0,p.jsx)(er,{icon:S.INDENT})}):null,(0,p.jsx)(AL,{label:t.label}),(0,p.jsx)(NL,{item:t}),(0,p.jsxs)(`div`,{className:X.right,children:[(0,p.jsx)(PL,{item:t}),!(t.disabled||o)&&t.actions&&(0,p.jsx)(`div`,{className:X.actions,children:(0,p.jsx)(qs,{actions:t.actions})})]})]}),(0,p.jsx)(FL,{item:t,expanding:n})]})},e)},c=(e,t)=>{let{attributes:n,listeners:r,setNodeRef:i,transform:a,transition:o,isDragging:c}=ky({id:e.toString(),animateLayoutChanges:()=>!1}),l={transform:D_.Translate.toString(a),transition:o,opacity:c?0:1};return s(e,t,l,n,r,i)},l=e.type===`Heading`;return l?(0,p.jsx)(LL,{ref:a,item:e,index:t},t):i?c(t,e):s(t,e)}),BL=({children:e,draggable:t,list:n,onListReorder:r})=>{let[i,a]=(0,f.useState)(null),o=e=>{a(e.active.id)},s=e=>{a(null);let{active:t,over:n}=e,i=t?.id,o=n?.id;o!==void 0&&i!==o&&r({from:Number(i),to:Number(o)})},c=(0,f.useMemo)(()=>n.items.map((e,t)=>t.toString()),[n.items]);return t?(0,p.jsxs)(hy,{collisionDetection:Y_,onDragStart:o,onDragEnd:s,children:[(0,p.jsx)(Dy,{items:c,strategy:wy,children:e}),!!i&&(0,m.createPortal)((0,p.jsx)(yy,{dropAnimation:null,children:(0,p.jsx)(`div`,{className:X.dragOverlay,children:(0,p.jsx)(zL,{draggable:t,item:n.items[Number(i)],index:Number(i)})})}),document.body)]}):e};var VL=u(h());const HL=({items:e,scrollDetails:t,children:n})=>{let{scrollable:r,hideScrollbar:i,triggerScrollToActiveItem:a,infiniteScroll:o}=t,s=(0,f.useRef)(null),c=()=>{let t=37;if(e.length>0){let n=e[e.length-1];n.details&&(t+=20),n.metadata&&(t+=20)}return t},l=Ix({count:e.length,getScrollElement:()=>s.current,estimateSize:(0,f.useCallback)(c,[]),overscan:5}),u=e=>e.findIndex(e=>e.active===!0),d=e=>{e>=0&&l.scrollToIndex(e,{align:`center`,behavior:`smooth`})};return(0,f.useEffect)(()=>{if(a){let t=u(e);d(t)}},[a]),(0,p.jsx)(`div`,{className:(0,VL.default)(X.listContent,r||o?X.scrollableList:``,i?X.hideScrollbar:``),ref:s,children:(0,p.jsx)(`div`,{className:X.virtualRows,style:{height:`${l.getTotalSize()}px`},children:n({virtualizer:l})})})};var UL=u(h());const WL=({items:e,scrollDetails:t,children:n})=>{let{scrollable:r,hideScrollbar:i,infiniteScroll:a}=t;return a?(0,p.jsx)(HL,{items:e,scrollDetails:t,children:({virtualizer:e})=>n({virtualizer:e})}):(0,p.jsx)(`div`,{className:(0,UL.default)(X.listContent,r?X.scrollableList:``,i?X.hideScrollbar:``),children:(0,p.jsx)(`div`,{className:X.virtualRows,children:n({})})})};var GL=u(h());const KL=({list:e,bordered:t=!1,expanding:n=!1,narrow:r=!1,toggleNarrow:i=!1,onToggleNarrow:a=()=>{},invokeEditOnRowClick:o=!0,noHeader:s=!1,stickyHeader:c,draggable:l=!1,onListReorder:u=()=>{},marginBottom:d=0,height:f,testId:m,scrollDetails:h={scrollable:!1,hideScrollbar:!1,triggerScrollToActiveItem:!1,infiniteScroll:!1}})=>(0,p.jsxs)(`div`,{className:(0,GL.default)(X.list,r?X.narrow:``,t?X.bordered:``),"data-testid":m,style:{height:f,marginBottom:d},id:`scrollableDiv`,children:[!s&&(0,p.jsx)(kL,{name:e.name,actions:e.actions,toggleNarrow:i,onToggleNarrow:a,stickyHeader:c}),(0,p.jsx)(BL,{draggable:l,list:e,onListReorder:u,children:(0,p.jsx)(WL,{items:e.items,scrollDetails:h,children:({virtualizer:t})=>t?t.getVirtualItems().map(r=>(0,p.jsx)(`div`,{"data-index":r.index,className:X.virtualRow,style:{transform:`translateY(${r.start}px)`},ref:t.measureElement,children:(0,p.jsx)(zL,{index:r.index,draggable:l,item:e.items[r.index],expanding:n,invokeEditOnRowClick:o})},r.key)):e.items.map((e,t)=>(0,p.jsx)(`div`,{children:(0,p.jsx)(zL,{index:t,draggable:l,item:e,expanding:n,invokeEditOnRowClick:o})},t))})})]}),Ide=`_loader_477i5_1`,Lde=`_fullViewPortSize_477i5_7`,Rde=`_cover_477i5_14`,zde=`_dimmer_477i5_21`,Bde=`_content_477i5_44`,Vde=`_text_477i5_49`,Hde=`_details_477i5_53`;var qL={loader:`_loader_477i5_1`,fullViewPortSize:`_fullViewPortSize_477i5_7`,cover:`_cover_477i5_14`,dimmer:`_dimmer_477i5_21`,content:`_content_477i5_44`,text:`_text_477i5_49`,details:`_details_477i5_53`},JL=u(h());const YL=({width:e,height:t,text:n=``,details:r=``,fullViewPortSize:i=!1,cover:a=!1,children:o=null,theme:s=C.DARK,testId:c=null})=>{let l=s===C.DARK?C.WHITE:C.INHERIT,u=s===`white`?`var(--color-background-raised)`:s===`light`?`var(--color-background)`:`black`;return(0,p.jsx)(`div`,{className:(0,JL.default)(qL.loader,a?qL.cover:``,{[qL.fullViewPortSize]:i}),style:{width:e,height:t},"data-testid":c,children:(0,p.jsx)(`div`,{className:qL.dimmer,style:{background:u,color:l},children:(0,p.jsxs)(`div`,{className:qL.content,"data-testid":c&&`${c}-content`,children:[o,n&&(0,p.jsx)(`div`,{className:qL.text,"data-testid":c&&`${c}-text`,children:n}),r&&(0,p.jsx)(`div`,{className:qL.details,"data-testid":c&&`${c}-details`,children:r})]})})})},Ude=`_menu_12x4u_1`,Wde=`_header_12x4u_11`,Gde=`_item_12x4u_27`,Kde=`_heading_12x4u_32`;var XL={menu:`_menu_12x4u_1`,header:`_header_12x4u_11`,item:`_item_12x4u_27`,heading:`_heading_12x4u_32`};const ZL=({option:e,onChange:t})=>{let{key:n,label:r,selected:i,testId:a}=e??{};return(0,p.jsx)(`div`,{className:XL.item,children:(0,p.jsx)(Oa,{label:r,noMargin:!0,checked:i,onChange:t,testId:a})},n)},QL=({label:e})=>(0,p.jsx)(`div`,{className:XL.heading,children:e});let $L=function(e){return e.HEADING=`Heading`,e.DIVIDER=`Divider`,e.DEFAULT=`Default`,e}({});var eR=u(h());const tR=({options:e,onChangeOptions:t,showHeader:n,maxHeight:r,testId:i})=>(0,p.jsxs)(`div`,{className:(0,eR.default)(`menu`,XL.menu),style:{maxHeight:r},"data-testid":i?`${i}-option-dropdown-layer`:void 0,children:[n&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{className:XL.header,children:[(0,p.jsx)(`a`,{onClick:n=>{let r=e.map(e=>({...e,selected:!0}));t(n,r)},children:`All`}),(0,p.jsx)(`a`,{onClick:n=>{let r=e.map(e=>({...e,selected:!1}));t(n,r)},children:`Clear`}),(0,p.jsx)(`a`,{onClick:n=>{let r=e.map(e=>({...e,selected:!e?.selected}));t(n,r)},children:`Invert`})]}),(0,p.jsx)(Zd,{margin:0})]}),e.map((n,r)=>{switch(n.type){case $L.HEADING:return(0,p.jsx)(QL,{label:n.label},r);case $L.DIVIDER:return(0,p.jsx)(Zd,{margin:0},r);default:return(0,p.jsx)(ZL,{option:n,onChange:r=>{let{value:i}=n,a=e.map(e=>e.value===i?{...e,selected:!e?.selected}:e);t(r,a)}},r)}})]}),nR=({name:e,label:t,options:n,onChange:r,small:i=!1,showHeader:a=!0,maxHeight:o=`40vh`,testId:s})=>(0,p.jsx)(Us,{testId:s,menu:{testId:s?`${s}-menu-layer`:void 0,small:i,label:t,trigger:_.DROP_DOWN_BUTTON,possiblePlacements:[`top-start`,`bottom-start`],sections:(0,p.jsx)(tR,{testId:s,options:n,onChangeOptions:(t,n)=>{t.target.name=e,t.target.value=n,r(t)},showHeader:a,maxHeight:o})}}),qde=`_page_beskc_1`,Jde=`_scroll_beskc_23`;var rR={page:`_page_beskc_1`,scroll:`_scroll_beskc_23`},iR=u(h());const aR=({children:e,left:t=`var(--size-sidebar)`,padding:n=!0,scroll:r=!0,top:i=`var(--size-topbar)`})=>{let a=typeof n==`string`?n:n===!0?`var(--padding)`:`0`;return(0,p.jsx)(`div`,{className:(0,iR.default)(rR.page,r?rR.scroll:``),style:{left:t,padding:a,top:i},children:e})},Yde=`_printHeader_o7xxx_1`;var oR={printHeader:`_printHeader_o7xxx_1`};const sR=({logo:e,alt:t,logoWidth:n=`100px`})=>(0,p.jsx)(`img`,{src:e,alt:t,className:oR.printHeader,style:{width:n}}),Xde=`_wrapper_1fbik_1`,Zde=`_inline_1fbik_1`,Qde=`_radio_1fbik_5`,$de=`_labelMargin_1fbik_8`,efe=`_small_1fbik_27`,tfe=`_noMargin_1fbik_32`,nfe=`_disabled_1fbik_90`,rfe=`_isInTable_1fbik_106`,ife=`_helpIconEnabled_1fbik_111`;var cR={wrapper:`_wrapper_1fbik_1`,inline:`_inline_1fbik_1`,radio:`_radio_1fbik_5`,labelMargin:`_labelMargin_1fbik_8`,small:`_small_1fbik_27`,noMargin:`_noMargin_1fbik_32`,disabled:`_disabled_1fbik_90`,isInTable:`_isInTable_1fbik_106`,helpIconEnabled:`_helpIconEnabled_1fbik_111`},lR=u(h());const uR=({name:e,label:t,value:n,selected:r,disabled:i=!1,small:a=!1,onChange:o,noMargin:s=!1,testId:c,helpText:l,onClickHelp:u})=>{let d=l||u;return(0,p.jsxs)(`div`,{className:(0,lR.default)(cR.radio,i?cR.disabled:null,a?cR.small:null,s?cR.noMargin:null),onClick:o,"data-testid":c,children:[(0,p.jsx)(`input`,{type:w.RADIO,value:n,checked:r,onChange:()=>{},disabled:i}),(0,p.jsx)(`label`,{"data-name":e,"data-value":n,children:t}),d&&(0,p.jsx)(`div`,{className:cR.helpIconEnabled,onClick:u,children:(0,p.jsx)(Ea,{text:l})})]})};var dR=u(h());const fR=({name:e,label:t,options:n,value:r,onChange:i,disabled:a=!1,small:o=!1,noMargin:s=!1,onClick:c=()=>{},inline:l=!1,mainLabel:u=``,radioButtonsData:d,classForContainer:m=`grouped fields`})=>{let h=(0,f.useContext)(Ie),g=d!==void 0,{simpleInputs:_,options:v,selectedOptions:y}=g?{simpleInputs:!1,options:d,selectedOptions:void 0}:Bg(n,r),b=g||y==null?void 0:_?y:y.value,x=g?u:t;return(0,p.jsxs)(`div`,{className:(0,dR.default)(cR.wrapper,l?cR.inline:null,m===`inline fields`?cR.inline:null),children:[u&&(0,p.jsx)(`label`,{className:(0,dR.default)(l&&cR.labelMargin),children:x}),v.map((t,n)=>{let r=t?.checked||t?.value===b||!1;return(0,p.jsx)(uR,{name:t.name||t.value,label:t.label,value:t.value,selected:r,disabled:a||t.disabled||h,small:o,noMargin:s,onChange:t.disabled?void 0:n=>{g?c(n.target):(n.target.name=e,n.target.value=t.value.toString(),n.target.label=t.label.toString(),i&&i(n))},testId:t.testId,helpText:t.helpText,onClickHelp:t.onClickHelp},n)})]})};var pR=Object.defineProperty,mR=Object.getOwnPropertyDescriptor,hR=(e,t,n,r)=>{for(var i=r>1?void 0:r?mR(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&pR(t,n,i),i},gR=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},_R=(e,t,n)=>(gR(e,t,`read from private field`),n?n.call(e):t.get(e)),vR=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},yR=(e,t,n,r)=>(gR(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),bR,xR,SR,CR,wR,TR,ER,DR,OR,kR=class{constructor(e){vR(this,bR,hP()),vR(this,xR,[]),vR(this,SR,new Map),vR(this,CR,[]),vR(this,wR,!1),vR(this,TR,void 0),vR(this,ER,void 0),vR(this,DR,void 0),vR(this,OR,void 0),this.addListener=(e,t)=>_R(this,bR).on(e,t),yR(this,TR,e),yR(this,ER,e.getActive),yR(this,OR,e.getPosition),yR(this,DR,e.getID),this.hasChanged=e.hasChanged,this.events=e.events??[`state`,`scroll`]}static create(e){return new kR(e)}static fromPositioner(e,t){return kR.create({...e.basePositioner,...t})}get basePositioner(){return{getActive:_R(this,ER),getPosition:_R(this,OR),hasChanged:this.hasChanged,events:this.events,getID:_R(this,DR)}}onActiveChanged(e){this.recentUpdate=e;let t=_R(this,ER).call(this,e);yR(this,xR,t),yR(this,SR,new Map),yR(this,wR,!1),yR(this,CR,[]);let n=[];for(let[r,i]of t.entries()){let t=this.getID(i,r);_R(this,CR).push(t),n.push({setElement:t=>this.addProps({...e,data:i,element:t},r),id:t,data:i})}_R(this,bR).emit(`update`,n)}getID(e,t){var n;return(n=_R(this,DR))?.call(this,e,t)??t.toString()}addProps(e,t){if(_R(this,wR)||(_R(this,SR).set(t,e),_R(this,SR).size<_R(this,xR).length))return;let n=[];for(let e of _R(this,xR).keys()){let t=_R(this,SR).get(e);W(t,{code:H.INTERNAL,message:`Something went wrong when retrieving the parameters`});let r=_R(this,CR)[e];if(!r)return;n.push({position:_R(this,OR).call(this,t),element:t.element,id:r})}_R(this,bR).emit(`done`,n)}clone(e){return kR.create({..._R(this,TR),...tw(e)?e(_R(this,TR)):e})}active(e){let t=tw(e)?e:()=>e;return this.clone(e=>({getActive:n=>e.getActive(n).filter(t)}))}},AR=kR;bR=new WeakMap,xR=new WeakMap,SR=new WeakMap,CR=new WeakMap,wR=new WeakMap,TR=new WeakMap,ER=new WeakMap,DR=new WeakMap,OR=new WeakMap,AR.EMPTY=[];function jR(e,t=IR){let{key:n}=e?.getMeta(FR)??{};return n===t}function MR(e){let{tr:t,state:n,previousState:r}=e;return!r||t&&jR(t)?!0:t?_le(t):!n.doc.eq(r.doc)||!n.selection.eq(r.selection)}function NR(e,t,n={}){let r=t.getBoundingClientRect(),{accountForPadding:i=!1}=n,a=0,o=0,s=0,c=0;if(Jj(t)&&i){let e=Number.parseFloat(Kj(t,`padding-left`).replace(`px`,``)),n=Number.parseFloat(Kj(t,`padding-right`).replace(`px`,``)),r=Number.parseFloat(Kj(t,`padding-top`).replace(`px`,``)),i=Number.parseFloat(Kj(t,`padding-bottom`).replace(`px`,``)),l=Number.parseFloat(Kj(t,`border-left`).replace(`px`,``)),u=Number.parseFloat(Kj(t,`border-right`).replace(`px`,``)),d=Number.parseFloat(Kj(t,`border-top`).replace(`px`,``)),f=Number.parseFloat(Kj(t,`border-bottom`).replace(`px`,``)),p=t.offsetWidth-t.clientWidth,m=t.offsetHeight-t.clientHeight;a+=e+l+(t.dir===`rtl`?p:0),o+=n+u+(t.dir===`rtl`?0:p),s+=r+d,c+=i+f+m}let l=new DOMRect(r.left+a,r.top+s,r.width-o,r.height-c);for(let[t,n]of[[e.top,e.left],[e.top,e.right],[e.bottom,e.left],[e.bottom,e.right]])if(ww(t,l.top,l.bottom)&&ww(n,l.left,l.right))return!0;return!1}var PR=`remirror-positioner-widget`,FR=`positionerUpdate`,IR=`__all_positioners__`,LR={y:-999999,x:-999999,width:0,height:0},RR={...LR,left:-999999,top:-999999,bottom:-999999,right:-999999},zR={...LR,rect:{...RR,toJSON:()=>RR},visible:!1},BR=AR.create({hasChanged:MR,getActive(e){let{state:t}=e;if(!Qj(t)||t.selection.$anchor.depth>2)return AR.EMPTY;let n=Xj({predicate:e=>e.type.isBlock,selection:t});return n?[n]:AR.EMPTY},getPosition(e){let{view:t,data:n}=e,r=t.nodeDOM(n.pos);if(!Jj(r))return zR;let i=r.getBoundingClientRect(),a=t.dom.getBoundingClientRect(),o=i.height,s=i.width,c=t.dom.scrollLeft+i.left-a.left,l=t.dom.scrollTop+i.top-a.top,u=NR(i,t.dom);return{y:l,x:c,height:o,width:s,rect:i,visible:u}}}),VR=BR.clone(({getActive:e})=>({getActive:t=>{let[n]=e(t);return n&&xM(n.node)&&n.node.type===yM(t.state.schema)?[n]:AR.EMPTY}})),afe=VR.clone(({getPosition:e})=>({getPosition:t=>({...e(t),width:1})})),ofe=VR.clone(({getPosition:e})=>({getPosition:t=>{let{width:n,x:r,y:i,height:a}=e(t);return{...e(t),width:1,x:n+r,rect:new DOMRect(n+r,i,1,a)}}}));function HR(e){return AR.create({hasChanged:MR,getActive:t=>{let{state:n,view:r}=t;if(!e(n)||!uM(n.selection))return AR.EMPTY;try{let{head:e,anchor:t}=n.selection;return[{from:r.coordsAtPos(t),to:r.coordsAtPos(e)}]}catch{return AR.EMPTY}},getPosition(e){let{element:t,data:n,view:r}=e,{from:i,to:a}=n,o=t.offsetParent??r.dom,s=o.getBoundingClientRect(),c=Math.abs(a.bottom-i.top),l=c>i.bottom-i.top,u=Math.min(i.left,a.left),d=Math.min(i.top,a.top),f=o.scrollLeft+(l?a.left-s.left:u-s.left),p=o.scrollTop+d-s.top,m=l?1:Math.abs(i.left-a.right),h=new DOMRect(l?a.left:u,d,m,c),g=NR(h,r.dom);return{rect:h,y:p,x:f,height:c,width:m,visible:g}}})}var UR=HR(e=>!e.selection.empty),sfe=HR(e=>e.selection.empty),cfe=HR(()=>!0),lfe=UR.clone(()=>({getActive:e=>{let{state:t,view:n}=e;if(!t.selection.empty)return AR.EMPTY;let r=TM(t);if(!r)return AR.EMPTY;try{return[{from:n.coordsAtPos(r.from),to:n.coordsAtPos(r.to)}]}catch{return AR.EMPTY}}})),WR=class extends jP{constructor(){super(...arguments),this.positioners=[],this.onAddCustomHandler=({positioner:e})=>{if(e)return this.positioners=[...this.positioners,e],this.store.commands.forceUpdate(),()=>{this.positioners=this.positioners.filter(t=>t!==e)}}}get name(){return`positioner`}createAttributes(){return{class:zI.EDITOR}}init(){this.onScroll=Qoe(this.options.scrollDebounce,this.onScroll.bind(this))}createEventHandlers(){return{scroll:()=>(this.onScroll(),!1),hover:(e,t)=>(this.positioner(this.getBaseProps(`hover`,{hover:t})),!1),contextmenu:(e,t)=>(this.positioner(this.getBaseProps(`contextmenu`,{contextmenu:t})),!1)}}onStateUpdate(e){this.positioner({...e,previousState:e.firstUpdate?void 0:e.previousState,event:`state`,helpers:this.store.helpers})}createDecorations(e){if(this.element??=this.createElement(),!this.element.hasChildNodes())return rj.empty;let t=ej.widget(0,this.element,{key:`positioner-widget`,side:-1,stopEvent:()=>!0});return rj.create(e.doc,[t])}forceUpdatePositioners(e=IR){return({tr:t,dispatch:n})=>(n?.(t.setMeta(FR,{key:e})),!0)}getPositionerWidget(){return this.element??=this.createElement()}createElement(){let e=document.createElement(`span`);return e.dataset.id=PR,e.setAttribute(`role`,`presentation`),e}triggerPositioner(e,t){e.hasChanged(t)&&e.onActiveChanged({...t,view:this.store.view})}positioner(e){for(let t of this.positioners){let n=!t.events.includes(e.event);if(n)continue;this.triggerPositioner(t,e)}}getBaseProps(e,t){let n=this.store.getState(),r=this.store.previousState;return{helpers:this.store.helpers,event:e,firstUpdate:!1,previousState:r,state:n,...t}}onScroll(){this.positioner(this.getBaseProps(`scroll`,{scroll:{scrollTop:this.store.view.dom.scrollTop}}))}};hR([Y()],WR.prototype,`forceUpdatePositioners`,1),hR([HP()],WR.prototype,`getPositionerWidget`,1),WR=hR([BP({defaultOptions:{scrollDebounce:100},customHandlerKeys:[`positioner`],staticKeys:[`scrollDebounce`]})],WR);var GR=Object.defineProperty,KR=Object.getOwnPropertyDescriptor,qR=(e,t,n,r)=>{for(var i=r>1?void 0:r?KR(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&GR(t,n,i),i},JR={icon:`bold`,label:({t:e})=>e(WD.LABEL),description:({t:e})=>e(WD.DESCRIPTION)},YR=class extends MP{get name(){return`bold`}createTags(){return[DC.FormattingMark,DC.FontStyle]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:`strong`,getAttrs:e.parse},{tag:`b`,getAttrs:t=>Jj(t)&&t.style.fontWeight!==`normal`?e.parse(t):!1},{style:`font-weight`,getAttrs:e=>$C(e)&&/^(bold(er)?|[5-9]\d{2,})$/.test(e)?null:!1},...t.parseDOM??[]],toDOM:t=>{let{weight:n}=this.options;return n?[`strong`,{"font-weight":n.toString()},0]:[`strong`,e.dom(t),0]}}}createInputRules(){return[oN({regexp:/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,type:this.type,ignoreWhitespace:!0})]}toggleBold(e){return GP({type:this.type,selection:e})}setBold(e){return({tr:t,dispatch:n})=>{let{from:r,to:i}=AM(e??t.selection,t.doc);return n?.(t.addMark(r,i,this.type.create())),!0}}removeBold(e){return({tr:t,dispatch:n})=>{let{from:r,to:i}=AM(e??t.selection,t.doc);return t.doc.rangeHasMark(r,i,this.type)?(n?.(t.removeMark(r,i,this.type)),!0):!1}}shortcut(e){return this.toggleBold()(e)}};qR([Y(JR)],YR.prototype,`toggleBold`,1),qR([Y()],YR.prototype,`setBold`,1),qR([Y()],YR.prototype,`removeBold`,1),qR([UP({shortcut:V.Bold,command:`toggleBold`})],YR.prototype,`shortcut`,1),YR=qR([BP({defaultOptions:{weight:void 0},staticKeys:[`weight`]})],YR);var XR=Object.defineProperty,ZR=Object.getOwnPropertyDescriptor,QR=(e,t,n,r)=>{for(var i=r>1?void 0:r?ZR(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&XR(t,n,i),i},{DESCRIPTION:$R,LABEL:ez}=qD,tz={icon:`codeLine`,description:({t:e})=>e($R),label:({t:e})=>e(ez)},nz=class extends MP{get name(){return`code`}createTags(){return[DC.Code,DC.ExcludeInputRules]}createMarkSpec(e,t){return{excludes:`_`,...t,attrs:e.defaults(),parseDOM:[{tag:`code`,getAttrs:e.parse},...t.parseDOM??[]],toDOM:t=>[`code`,{spellcheck:`false`,...e.dom(t)},0]}}createKeymap(){return{"Mod-`":GP({type:this.type})}}keyboardShortcut(e){return this.toggleCode()(e)}toggleCode(){return GP({type:this.type})}createInputRules(){return[oN({regexp:RegExp(`(?:\`)([^\`${wC}]+)(?:\`)$`),type:this.type,ignoreWhitespace:!0})]}createPasteRules(){return[{type:`mark`,regexp:/`([^`]+)`/g,markType:this.type}]}};QR([UP({shortcut:V.Code,command:`toggleCode`})],nz.prototype,`keyboardShortcut`,1),QR([Y(tz)],nz.prototype,`toggleCode`,1),nz=QR([BP({})],nz);var rz=200,iz=function(){};iz.prototype.append=function(e){return e.length?(e=iz.from(e),!this.length&&e||e.length<rz&&this.leafAppend(e)||this.length<rz&&e.leafPrepend(this)||this.appendInner(e)):this},iz.prototype.prepend=function(e){return e.length?iz.from(e).append(this):this},iz.prototype.appendInner=function(e){return new oz(this,e)},iz.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?iz.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},iz.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},iz.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},iz.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},iz.from=function(e){return e instanceof iz?e:e&&e.length?new az(e):iz.empty};var az=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=rz)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=rz)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(iz);iz.empty=new az([]);var oz=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(iz),sz=iz;const ufe=500;var cz=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--){let e=this.items.get(r-1);if(e.selection){--r;break}}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new uz(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new uz(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new uz(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&(o++,n=void 0),i||(c=l)}let l=o-r.depth;return l>fz&&(s=lz(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new oE;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new uz(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new uz(i,o,l))}else r.push(new uz(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new uz(a.maps[e]));let u=this.items.slice(0,i).append(l).append(r),d=new e(u,s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new uz(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(sz.from(i.reverse()),a)}};cz.empty=new cz(sz.empty,0);function lz(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var uz=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},dz=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}};const fz=20;function pz(e,t,n,r){let i=n.getMeta(xz),a;if(i)return i.historyState;n.getMeta(Sz)&&(e=new dz(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(xz))return o.getMeta(xz).redo?new dz(e.done.addTransform(n,void 0,r,bz(t)),e.undone,hz(n.mapping.maps),e.prevTime,e.prevComposition):new dz(e.done,e.undone.addTransform(n,void 0,r,bz(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!mz(n,e.prevRanges)),s=o?gz(e.prevRanges,n.mapping):hz(n.mapping.maps);return new dz(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,bz(t)),cz.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new dz(e.done.rebased(n,a),e.undone.rebased(n,a),gz(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new dz(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),gz(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function mz(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function hz(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function gz(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function _z(e,t,n){let r=bz(t),i=xz.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new dz(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(xz,{redo:n,historyState:c})}let vz=!1,yz=null;function bz(e){let t=e.plugins;if(yz!=t){vz=!1,yz=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){vz=!0;break}}return vz}const xz=new AD(`history`),Sz=new AD(`closeHistory`);function Cz(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new DD({key:xz,state:{init(){return new dz(cz.empty,cz.empty,null,0,-1)},apply(t,n,r){return pz(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?Tz:n==`historyRedo`?Ez:null;return r?(t.preventDefault(),r(e.state,e.dispatch)):!1}}}})}function wz(e,t){return(n,r)=>{let i=xz.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=_z(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}const Tz=wz(!1,!0),Ez=wz(!0,!0),dfe=wz(!1,!1),ffe=wz(!0,!1);function Dz(e){let t=xz.getState(e);return t?t.done.eventCount:0}function Oz(e){let t=xz.getState(e);return t?t.undone.eventCount:0}var kz=Object.defineProperty,Az=Object.getOwnPropertyDescriptor,jz=(e,t,n,r)=>{for(var i=r>1?void 0:r?Az(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&kz(t,n,i),i},Mz=class extends NP{get name(){return`doc`}createNodeSpec(e,t){let{docAttributes:n,content:r}=this.options,i=U();if(nw(n))for(let[e,t]of WC(n))i[e]={default:t};else for(let e of n)i[e]={default:null};return{attrs:i,content:r,...t}}setDocAttributes(e){return({tr:t,dispatch:n})=>{if(n){for(let[n,r]of Object.entries(e))t.step(new Fz(n,r));n(t)}return!0}}isDefaultDocNode({state:e=this.store.getState(),options:t}={}){return gM(e.doc,t)}};jz([Y()],Mz.prototype,`setDocAttributes`,1),jz([HP()],Mz.prototype,`isDefaultDocNode`,1),Mz=jz([BP({defaultOptions:{content:`block+`,docAttributes:[]},defaultPriority:AC.Medium,staticKeys:[`content`,`docAttributes`],disableExtraAttributes:!0})],Mz);var Nz=`SetDocAttribute`,Pz=`RevertSetDocAttribute`,Fz=class e extends cE{static fromJSON(t,n){return new e(n.key,n.value,n.stepType)}key;stepType;value;previous;constructor(e,t,n=Nz){super(),this.stepType=n,this.key=e,this.value=t}apply(e){this.previous=e.attrs[this.key];let t={...e.attrs,[this.key]:this.value};return lE.ok(e.type.create(t,e.content,e.marks))}invert(){return new e(this.key,this.previous,Pz)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}};try{cE.jsonID(Nz,Fz),cE.jsonID(Pz,Fz)}catch(e){if(!e.message.startsWith(`Duplicate use of step JSON ID`))throw e}var Iz=Object.defineProperty,Lz=Object.getOwnPropertyDescriptor,Rz=(e,t,n,r)=>{for(var i=r>1?void 0:r?Lz(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Iz(t,n,i),i};function zz(e,t,n,r){let i=e.docView.posFromDOM(t,n,r);return i===null||i<0?null:i}function Bz(e,t){let n=t.target;if(n){let t=zz(e,n,0);if(t!==null){let n=e.state.doc.resolve(t),r=n.node().isLeaf?0:1,i=n.start()-r;return{pos:t,inside:i}}}return e.posAtCoords({left:t.clientX,top:t.clientY})??void 0}var Vz=class extends jP{constructor(){super(...arguments),this.mousedown=!1,this.mouseover=!1,this.createMouseEventHandler=e=>(t,n)=>{let r=n,i=Bz(t,r);if(!i)return!1;let a=[],o=[],{inside:s,pos:c}=i;if(s===-1)return!1;let l=t.state.doc.resolve(c),u=l.depth+1;for(let e of Cw(u,1))a.push({node:e>l.depth&&l.nodeAfter?l.nodeAfter:l.node(e),pos:l.before(e)});for(let{type:e}of l.marksAcross(l)??[]){let t=SM(l,e);t&&o.push(t)}return e(r,{view:t,nodes:a,marks:o,getMark:e=>{let n=$C(e)?t.state.schema.marks[e]:e;return W(n,{code:H.EXTENSION,message:`The mark ${e} being checked does not exist within the editor schema.`}),o.find(e=>e.mark.type===n)},getNode:e=>{var n;let r=$C(e)?t.state.schema.nodes[e]:e;W(r,{code:H.EXTENSION,message:`The node being checked does not exist`});let i=a.find(({node:e})=>e.type===r);if(i)return{...i,isRoot:!!(n=a[0])?.node.eq(i.node)}}})}}get name(){return`events`}onView(){var e,t;if(!(e=this.store.managerSettings.exclude)?.clickHandler)for(let e of this.store.extensions){if(!e.createEventHandlers||(t=e.options.exclude)?.clickHandler)continue;let n=e.createEventHandlers();for(let[e,t]of WC(n))this.addHandler(e,t)}}createPlugin(){let e=new WeakMap,t=(t,n,r,i,a,o,s,c)=>{let l=this.store.currentState,{schema:u,doc:d}=l,f=d.resolve(i),p=e.has(s),m=Hz({$pos:f,handled:p,view:r,state:l}),h=!1;p||(h=t(s,m)||h);let g={...m,pos:i,direct:c,nodeWithPosition:{node:a,pos:o},getNode:e=>{let t=$C(e)?u.nodes[e]:e;return W(t,{code:H.EXTENSION,message:`The node being checked does not exist`}),t===a.type?{node:a,pos:o}:void 0}};return e.set(s,!0),n(s,g)||h};return{props:{handleKeyPress:(e,t)=>this.options.keypress(t)||!1,handleKeyDown:(e,t)=>this.options.keydown(t)||!1,handleTextInput:(e,t,n,r)=>this.options.textInput({from:t,to:n,text:r})||!1,handleClickOn:(e,n,r,i,a,o)=>t(this.options.clickMark,this.options.click,e,n,r,i,a,o),handleDoubleClickOn:(e,n,r,i,a,o)=>t(this.options.doubleClickMark,this.options.doubleClick,e,n,r,i,a,o),handleTripleClickOn:(e,n,r,i,a,o)=>t(this.options.tripleClickMark,this.options.tripleClick,e,n,r,i,a,o),handleDOMEvents:{focus:(e,t)=>this.options.focus(t)||!1,blur:(e,t)=>this.options.blur(t)||!1,mousedown:(e,t)=>(this.startMouseover(),this.options.mousedown(t)||!1),mouseup:(e,t)=>(this.endMouseover(),this.options.mouseup(t)||!1),mouseleave:(e,t)=>(this.mouseover=!1,this.options.mouseleave(t)||!1),mouseenter:(e,t)=>(this.mouseover=!0,this.options.mouseenter(t)||!1),keyup:(e,t)=>this.options.keyup(t)||!1,mouseout:this.createMouseEventHandler((e,t)=>{let n={...t,hovering:!1};return this.options.hover(e,n)||!1}),mouseover:this.createMouseEventHandler((e,t)=>{let n={...t,hovering:!0};return this.options.hover(e,n)||!1}),contextmenu:this.createMouseEventHandler((e,t)=>this.options.contextmenu(e,t)||!1),scroll:(e,t)=>this.options.scroll(t)||!1,copy:(e,t)=>this.options.copy(t)||!1,cut:(e,t)=>this.options.cut(t)||!1,paste:(e,t)=>this.options.paste(t)||!1}},view:e=>{let t=e.editable,n=this.options;return{update(e){let r=e.editable;r!==t&&(n.editable(r),t=r)}}}}}isInteracting(){return this.mousedown&&this.mouseover}startMouseover(){this.mouseover=!0,!this.mousedown&&(this.mousedown=!0,this.store.document.documentElement.addEventListener(`mouseup`,()=>{this.endMouseover()},{once:!0}))}endMouseover(){this.mousedown&&(this.mousedown=!1,this.store.commands.emptyUpdate())}};Rz([HP()],Vz.prototype,`isInteracting`,1),Vz=Rz([BP({handlerKeys:[`blur`,`focus`,`mousedown`,`mouseup`,`mouseenter`,`mouseleave`,`textInput`,`keypress`,`keyup`,`keydown`,`click`,`clickMark`,`doubleClick`,`doubleClickMark`,`tripleClick`,`tripleClickMark`,`contextmenu`,`hover`,`scroll`,`copy`,`cut`,`paste`,`editable`],handlerKeyOptions:{blur:{earlyReturnValue:!0},focus:{earlyReturnValue:!0},mousedown:{earlyReturnValue:!0},mouseleave:{earlyReturnValue:!0},mouseup:{earlyReturnValue:!0},click:{earlyReturnValue:!0},doubleClick:{earlyReturnValue:!0},tripleClick:{earlyReturnValue:!0},hover:{earlyReturnValue:!0},contextmenu:{earlyReturnValue:!0},scroll:{earlyReturnValue:!0},copy:{earlyReturnValue:!0},cut:{earlyReturnValue:!0},paste:{earlyReturnValue:!0}},defaultPriority:AC.High})],Vz);function Hz(e){let{handled:t,view:n,$pos:r,state:i}=e,a={getMark:hw,markRanges:[],view:n,state:i};if(t)return a;for(let{type:e}of r.marksAcross(r)??[]){let t=SM(r,e);t&&a.markRanges.push(t)}return a.getMark=e=>{let t=$C(e)?i.schema.marks[e]:e;return W(t,{code:H.EXTENSION,message:`The mark ${e} being checked does not exist within the editor schema.`}),a.markRanges.find(e=>e.mark.type===t)},a}var Uz=class e extends cD{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):cD.near(r)}content(){return K.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new Wz(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!Gz(e)||!Kz(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!mD.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};Uz.prototype.visible=!1,Uz.findFrom=Uz.findGapCursorFrom,cD.jsonID(`gapcursor`,Uz);var Wz=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Uz.valid(t)?new Uz(t):cD.near(t)}};function Gz(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}function Kz(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}function qz(){return new DD({props:{decorations:Qz,createSelectionBetween(e,t,n){return t.pos==n.pos&&Uz.valid(n)?new Uz(n):null},handleClick:Xz,handleKeyDown:Jz,handleDOMEvents:{beforeinput:Zz}}})}const Jz=tP({ArrowLeft:Yz(`horiz`,-1),ArrowRight:Yz(`horiz`,1),ArrowUp:Yz(`vert`,-1),ArrowDown:Yz(`vert`,1)});function Yz(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof fD){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=Uz.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new Uz(c))),!0):!1}}function Xz(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Uz.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&mD.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Uz(r))),!0)}function Zz(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof Uz))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=G.empty;for(let e=r.length-1;e>=0;e--)i=G.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new K(i,0,0));return a.setSelection(fD.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function Qz(e){if(!(e.selection instanceof Uz))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,rj.create(e.doc,[ej.widget(e.selection.head,t,{key:`gapcursor`})])}var $z=Object.defineProperty,eB=Object.getOwnPropertyDescriptor,tB=(e,t,n,r)=>{for(var i=r>1?void 0:r?eB(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&$z(t,n,i),i},nB=class extends jP{get name(){return`gapCursor`}createExternalPlugins(){return[qz()]}};nB=tB([BP({})],nB);var pfe=cse(Uz),rB=Object.defineProperty,iB=Object.getOwnPropertyDescriptor,aB=(e,t,n,r)=>{for(var i=r>1?void 0:r?iB(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&rB(t,n,i),i},oB=class extends jP{constructor(){super(...arguments),this.wrapMethod=(e,t)=>({state:n,dispatch:r,view:i})=>{let{getState:a,getDispatch:o}=this.options,s=tw(a)?a():n,c=tw(o)&&r?o():r,l=e(s,c,i);return t?.(l),l}}get name(){return`history`}createKeymap(){return{"Mod-y":Gj.isMac?()=>!1:this.wrapMethod(Ez,this.options.onRedo),"Mod-z":this.wrapMethod(Tz,this.options.onUndo),"Shift-Mod-z":this.wrapMethod(Ez,this.options.onRedo)}}undoShortcut(e){return this.wrapMethod(Tz,this.options.onUndo)(e)}redoShortcut(e){return this.wrapMethod(Ez,this.options.onRedo)(e)}createExternalPlugins(){let{depth:e,newGroupDelay:t}=this.options;return[Cz({depth:e,newGroupDelay:t})]}undo(){return Wj(this.wrapMethod(Tz,this.options.onUndo))}redo(){return Wj(this.wrapMethod(Ez,this.options.onRedo))}undoDepth(e=this.store.getState()){return Dz(e)}redoDepth(e=this.store.getState()){return Oz(e)}};aB([UP({shortcut:V.Undo,command:`undo`})],oB.prototype,`undoShortcut`,1),aB([UP({shortcut:V.Redo,command:`redo`})],oB.prototype,`redoShortcut`,1),aB([Y({disableChaining:!0,description:({t:e})=>e(QD.UNDO_DESCRIPTION),label:({t:e})=>e(QD.UNDO_LABEL),icon:`arrowGoBackFill`})],oB.prototype,`undo`,1),aB([Y({disableChaining:!0,description:({t:e})=>e(QD.REDO_DESCRIPTION),label:({t:e})=>e(QD.REDO_LABEL),icon:`arrowGoForwardFill`})],oB.prototype,`redo`,1),aB([HP()],oB.prototype,`undoDepth`,1),aB([HP()],oB.prototype,`redoDepth`,1),oB=aB([BP({defaultOptions:{depth:100,newGroupDelay:500,getDispatch:void 0,getState:void 0},staticKeys:[`depth`,`newGroupDelay`],handlerKeys:[`onUndo`,`onRedo`]})],oB);var sB=Object.defineProperty,cB=Object.getOwnPropertyDescriptor,lB=(e,t,n,r)=>{for(var i=r>1?void 0:r?cB(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&sB(t,n,i),i},uB={icon:`italic`,label:({t:e})=>e(tO.LABEL),description:({t:e})=>e(tO.DESCRIPTION)},dB=class extends MP{get name(){return`italic`}createTags(){return[DC.FontStyle,DC.FormattingMark]}createMarkSpec(e,t){return{...t,attrs:e.defaults(),parseDOM:[{tag:`i`,getAttrs:e.parse},{tag:`em`,getAttrs:e.parse},{style:`font-style=italic`},...t.parseDOM??[]],toDOM:t=>[`em`,e.dom(t),0]}}createKeymap(){return{"Mod-i":GP({type:this.type})}}createInputRules(){return[oN({regexp:/(?:^|[^*])\*([^*]+)\*$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith(`*`)?{}:{fullMatch:e.slice(1),start:t+1}}),oN({regexp:/(?:^|\W)_([^_]+)_$/,type:this.type,ignoreWhitespace:!0,updateCaptured:({fullMatch:e,start:t})=>e.startsWith(`_`)?{}:{fullMatch:e.slice(1),start:t+1}})]}createPasteRules(){return[{type:`mark`,markType:this.type,regexp:/(?:^|\W)_([^_]+)_/g},{type:`mark`,markType:this.type,regexp:/\*([^*]+)\*/g}]}toggleItalic(e){return GP({type:this.type,selection:e})}shortcut(e){return this.toggleItalic()(e)}};lB([Y(uB)],dB.prototype,`toggleItalic`,1),lB([UP({shortcut:V.Italic,command:`toggleItalic`})],dB.prototype,`shortcut`,1),dB=lB([BP({})],dB);function fB(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a);if(!o)return!1;let s=r?n.tr:null;return pB(s,o,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function pB(e,t,n,r=null){let i=!1,a=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let e=o.resolve(t.start-2);a=new iT(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new iT(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let s=wE(a,n,r,t);return s?(e&&mB(e,t,s,i,n),!0):!1}function mB(e,t,n,r,i){let a=G.empty;for(let e=n.length-1;e>=0;e--)a=G.from(n[e].type.create(n[e].attrs,a));e.step(new gE(t.start-(r?2:0),t.end,t.start,t.end,new K(a,0,0),n.length,!0));let o=0;for(let e=0;e<n.length;e++)n[e].type==i&&(o=e+1);let s=n.length-o,c=t.start+n.length-(r?2:0),l=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&PE(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=l.child(n).nodeSize;return e}function hB(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&t.firstChild.type==e);return a?n?r.node(a.depth-1).type==e?gB(t,n,e,a):_B(t,n,a):!0:!1}}function gB(e,t,n,r){let i=e.tr,a=r.end,o=r.$to.end(r.depth);a<o&&(i.step(new gE(a-1,o,a,o,new K(G.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new iT(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));let s=SE(r);if(s==null)return!1;i.lift(r,s);let c=i.doc.resolve(i.mapping.map(a,-1)-1);return IE(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),t(i.scrollIntoView()),!0}function _B(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let a=r.doc.resolve(n.start),o=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==i.childCount,l=a.node(-1),u=a.index(-1);if(!l.canReplace(u+(s?0:1),u+1,o.content.append(c?G.empty:G.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new gE(d-(s?1:0),f+(c?1:0),d+1,f-1,new K((s?G.empty:G.from(i.copy(G.empty))).append(c?G.empty:G.from(i.copy(G.empty))),s?0:1,c?0:1),s?0:1)),t(r.scrollIntoView()),!0}var vB=Object.defineProperty,yB=Object.getOwnPropertyDescriptor,bB=(e,t,n,r)=>{for(var i=r>1?void 0:r?yB(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&vB(t,n,i),i};function xB(e){return!!e.spec.group?.includes(DC.ListContainerNode)}function SB(e){return!!e.spec.group?.includes(DC.ListItemNode)}function CB(e){return xB(e.type)}function wB(e){return SB(e.type)}function TB(e,t){return n=>{let{dispatch:r,tr:i}=n,a=Hj(i,n.state),{$from:o,$to:s}=i.selection,c=o.blockRange(s);if(!c)return!1;let l=Xj({predicate:e=>xB(e.type),selection:i.selection});if(l&&c.depth-l.depth<=1&&c.startIndex===0){if(l.node.type===e)return MB(t)(n);if(xB(l.node.type))return e.validContent(l.node.content)?(r?.(i.setNodeMarkup(l.pos,e)),!0):DB(i,l,e,t)?(r?.(i.scrollIntoView()),!0):!1}return fB(e)(a,r)}}function EB(e,t=[`checked`]){return function({tr:n,dispatch:r,state:i}){let a=Sle(e,i.schema),{$from:o,$to:s}=n.selection;if(mM(n.selection)&&n.selection.node.isBlock||o.depth<2||!o.sameParent(s))return!1;let c=o.node(-1);if(c.type!==a)return!1;if(o.parent.content.size===0&&o.node(-1).childCount===o.indexAfter(-1)){if(o.depth===2||o.node(-3).type!==a||o.index(-2)!==o.node(-2).childCount-1)return!1;if(r){let e=o.index(-1)>0,t=G.empty;for(let n=o.depth-(e?1:2);n>=o.depth-3;n--)t=G.from(o.node(n).copy(t));let i=a.contentMatch.defaultType?.createAndFill()||void 0;t=t.append(G.from(a.createAndFill(null,i)||void 0));let s=o.indexAfter(-1)<o.node(-2).childCount?1:o.indexAfter(-2)<o.node(-3).childCount?2:3;n.replace(o.before(e?void 0:-1),o.after(-s),new K(t,e?3:2,2)),n.setSelection(n.selection.constructor.near(n.doc.resolve(o.pos+(e?3:2)))),r(n.scrollIntoView())}return!0}if(c.attrs.closed&&o.sameParent(s)&&s.pos===s.end()){if(r){let e=o.after(-1),t=a.contentMatch.defaultType?.createAndFill()||void 0,i=a.createAndFill(null,t);i&&(n.insert(e,i),n.setSelection(fD.near(n.doc.resolve(e+1)))),n.delete(o.pos,s.pos),r(n.scrollIntoView())}return!0}let l=Object.fromEntries(Object.entries(c.attrs).filter(([e])=>!t.includes(e))),u=s.pos===o.end()?c.contentMatchAt(0).defaultType:null,d={...o.node().attrs};n.delete(o.pos,s.pos);let f=u?[{type:a,attrs:l},{type:u,attrs:d}]:[{type:a,attrs:l}];return PE(n.doc,o.pos,2)?(r&&r(n.split(o.pos,2,f).scrollIntoView()),!0):!1}}function DB(e,t,n,r){let i=t.node,a=e.doc.resolve(t.start),o=a.node(-1),s=a.index(-1);if(!o||!o.canReplace(s,s+1,G.from(n.create())))return!1;let c=[];for(let e=0;e<i.childCount;e++){let t=i.child(e);if(!r.validContent(t.content))return!1;let n=r.createChecked(null,t.content);c.push(n)}let l=n.createChecked(null,c),u=t.pos,d=u+i.nodeSize,f=e.selection.from;return e.replaceRangeWith(u,d,l),e.setSelection(e.selection.constructor.near(e.doc.resolve(f))),!0}function OB({listType:e,itemType:t,tr:n,range:r}){let i=r.parent,a=n.doc.slice(r.start,r.end);if(i.type===e&&a.content.firstChild?.type===t)return!1;let o=[];for(let e=0;e<a.content.childCount;e++){let n=a.content.child(e);if(!t.validContent(n.content))return!1;let r=t.createChecked(null,n.content);o.push(r)}let s=e.createChecked(null,o);return n.replaceRange(r.start,r.end,new K(G.from(s),0,0)),!0}function kB({listType:e,itemType:t,tr:n}){let r=PB(n.selection);if(!r)return!1;let i=r.startIndex===0,{from:a,to:o}=n.selection;return OB({listType:e,itemType:t,tr:n,range:r})?(n.setSelection(fD.between(n.doc.resolve(i?a:a+2),n.doc.resolve(i?o:o+2))),n.scrollIntoView(),!0):!1}function AB(e,t,n){let r=e.tr,i=n.parent,a=r.mapping.maps.length;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(!s||r.mapping.slice(a).map(n.end)!==n.start+s.nodeSize)return!1;let c=n.startIndex===0,l=n.endIndex===i.childCount,u=o.node(-1),d=o.index(-1);if(!u.canReplace(d+(c?0:1),d+1,s.content.append(l?G.empty:G.from(i))))return!1;let f=o.pos,p=f+s.nodeSize;return r.step(new gE(f-(c?1:0),p+(l?1:0),f+1,p-1,new K((c?G.empty:G.from(i.copy(G.empty))).append(l?G.empty:G.from(i.copy(G.empty))),c?0:1,l?0:1),c?0:1)),t(r.scrollIntoView()),!0}function jB(e,t){let n=t||e.selection.$from,r=[],i,a,o,s;for(let e=n.depth;e>=0;e--){if(a=n.node(e),i=n.index(e),o=a.maybeChild(i-1),s=a.maybeChild(i),o&&s&&o.type.name===s.type.name&&CB(o)){let t=n.before(e+1);r.push(t)}if(i=n.indexAfter(e),o=a.maybeChild(i-1),s=a.maybeChild(i),o&&s&&o.type.name===s.type.name&&CB(o)){let t=n.after(e+1);r.push(t)}}r=[...new Set(r)].sort((e,t)=>t-e);let c=!1;for(let t of r)IE(e.doc,t)&&(e.join(t),c=!0);return c}function MB(e){return t=>{let{dispatch:n,tr:r}=t,i=Hj(r,t.state),a=NB(e,r.selection);return a?(n&&AB(i,n,a),!0):!1}}function NB(e,t){let{$from:n,$to:r}=t,i=n.blockRange(r,t=>t.firstChild?.type===e);return i}function PB(e){let{$from:t,$to:n}=e;return t.blockRange(n,CB)}function FB(e){let t=e.selection.$from,n=t.blockRange();if(!n||!wB(n.parent)||n.startIndex!==0)return!1;let r=t.node(n.depth-2),i=t.index(n.depth),a=t.index(n.depth-1),o=t.index(n.depth-2),s=r.maybeChild(o-1),c=s?.lastChild;if(i!==0||a!==0)return!1;if(s&&CB(s)&&c&&wB(c))return kB({listType:s.type,itemType:c.type,tr:e});if(wB(r)){let i=r,a=t.node(n.depth-3);if(CB(a))return kB({listType:a.type,itemType:i.type,tr:e})}return!1}function IB({view:e}){if(!e)return!1;{let t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;let n=t.blockRange();if(!n||!wB(n.parent)||n.startIndex!==0)return!1}{let t=e.state.tr;FB(t)&&e.dispatch(t)}{let t=e.state.selection.$cursor;if(!t||t.parentOffset>0)return!1;let n=t.blockRange();if(!n||!wB(n.parent)||n.startIndex!==0)return!1;let r=t.index(n.depth),i=t.index(n.depth-1),a=t.index(n.depth-2),o=n.depth-2>=1&&wB(t.node(n.depth-2));r===0&&i===0&&a<=1&&o&&hB(n.parent.type)(e.state,e.dispatch)}return fN(e.state,e.dispatch,e),!0}function LB({node:e,mark:t,updateDOM:n,updateMark:r}){let i=document.createElement(`label`);i.contentEditable=`false`,i.classList.add(LI.LIST_ITEM_MARKER_CONTAINER),i.append(t);let a=document.createElement(`div`),o=document.createElement(`li`);o.classList.add(LI.LIST_ITEM_WITH_CUSTOM_MARKER),o.append(i),o.append(a);let s=i=>i.type===e.type?(e=i,n(e,o),r(e,t),!0):!1;return s(e),{dom:o,contentDOM:a,update:s}}function RB(e,t){let n=e.node(t.depth-1),r=e.node(t.depth-2);return!wB(n)||!CB(r)?!1:{parentItem:n,parentList:r}}function zB(e,t){let n=t.parent,r=t.parent.child(t.endIndex-1),i=t.end,a=t.$to.end(t.depth);return i<a?(e.step(new gE(i-1,a,i,a,new K(G.from(r.type.create(null,n.copy())),1,0),1,!0)),new iT(e.doc.resolve(t.$from.pos),e.doc.resolve(a),t.depth)):t}function BB(e,t){let n=t.parent,r=t.parent.child(t.endIndex-1),i=t.end,a=t.$to.end(t.depth-1);return i+1<a?(e.step(new gE(i-1,a,i+1,a,new K(G.from(n.type.create(null,r.type.create(null))),2,0),0,!0)),new iT(e.selection.$from,e.selection.$to,t.depth)):t}function VB(e,t,n,r){let i=kB({listType:n.type,itemType:r.type,tr:e});return i?new iT(e.selection.$from,e.selection.$to,t.depth):t}function HB(e){let t=PB(e.selection);if(!t)return!1;let n=RB(e.selection.$from,t);if(!n)return!1;let{parentItem:r,parentList:i}=n;t=zB(e,t),t=BB(e,t),t=VB(e,t,i,r);let a=SE(t);return typeof a==`number`?(e.lift(t,a),t=PB(e.selection),t&&jB(e,e.doc.resolve(t.end-2)),!0):!0}var UB=({tr:e,dispatch:t})=>HB(e)?(t?.(e.scrollIntoView()),!0):!1;function WB(e,t,n){let r,i,a,o,s=t.doc;if(n.startIndex>=1){r=e.child(n.startIndex-1),i=e,o=s.resolve(n.start).start(n.depth),a=o+1;for(let e=0;e<n.startIndex-1;e++)a+=i.child(e).nodeSize}else{let e=t.index(n.depth-1);if(e>=1){let s=t.node(n.depth-1),c=t.start(n.depth-1);if(i=s.child(e-1),!CB(i))return!1;o=c+1;for(let t=0;t<e-1;t++)o+=s.child(t).nodeSize;if(r=i.child(i.childCount-1),a=o+i.nodeSize-r.nodeSize-1,!wB(r))return!1}else return!1}return{previousItem:r,previousList:i,previousItemStart:a,previousListStart:o}}function GB(e,t,n){let r,i,a=n.start,o=t.depth>=n.depth+2?t.end(n.depth+2):n.end-1,s=n.end;return o+1>=s?(r=e.slice(a,s),i=null):(r=e.slice(a,o),i=e.slice(o+1,s-1)),{selectedSlice:r,unselectedSlice:i}}function KB(e){let{$from:t,$to:n}=e.selection,r=PB(e.selection);if(!r)return!1;let i=e.doc.resolve(r.start).node();if(!CB(i))return!1;let a=WB(i,t,r);if(!a)return!1;let{previousItem:o,previousList:s,previousItemStart:c}=a,{selectedSlice:l,unselectedSlice:u}=GB(e.doc,n,r),d=o.content.append(G.fromArray([i.copy(l.content)])).append(u?u.content:G.empty);e.deleteRange(r.start,r.end);let f=c+o.nodeSize-2,p=o.copy(d);return p.check(),e.replaceRangeWith(c-1,f+1,p),e.setSelection(s===i?fD.between(e.doc.resolve(t.pos),e.doc.resolve(n.pos)):fD.between(e.doc.resolve(t.pos-2),e.doc.resolve(n.pos-2))),!0}var qB=({tr:e,dispatch:t})=>KB(e)?(t?.(e.scrollIntoView()),!0):!1,JB=class extends jP{get name(){return`listItemShared`}createKeymap(){let e={Tab:qB,"Shift-Tab":UB,Backspace:IB,"Mod-Backspace":IB};if(Gj.isMac){let t={"Ctrl-h":e.Backspace,"Alt-Backspace":e[`Mod-Backspace`]};return{...e,...t}}return e}createPlugin(){return{appendTransaction:(e,t,n)=>{let r=n.tr,i=jB(r);return i?r:null}}}},YB=class extends NP{get name(){return`listItem`}createTags(){return[DC.ListItemNode]}createNodeSpec(e,t){return{content:`paragraph block*`,defining:!0,draggable:!1,...t,attrs:{...e.defaults(),closed:{default:!1},nested:{default:!1}},parseDOM:[{tag:`li`,getAttrs:e.parse,priority:AC.Lowest},...t.parseDOM??[]],toDOM:t=>{let n=e.dom(t);return[`li`,n,0]}}}createNodeViews(){return this.options.enableCollapsible?(e,t,n)=>{let r=document.createElement(`div`);return r.classList.add(LI.COLLAPSIBLE_LIST_ITEM_BUTTON),r.contentEditable=`false`,r.addEventListener(`click`,()=>{if(r.classList.contains(`disabled`))return;let e=n(),i=mD.create(t.state.doc,e);return t.dispatch(t.state.tr.setSelection(i)),this.store.commands.toggleListItemClosed(),!0}),LB({mark:r,node:e,updateDOM:XB,updateMark:ZB})}:{}}createKeymap(){return{Enter:EB(this.type)}}createExtensions(){return[new JB]}toggleListItemClosed(e){return({state:{tr:t,selection:n},dispatch:r})=>{if(!mM(n)||n.node.type.name!==this.name)return!1;let{node:i,from:a}=n;return e=ase(e)?e:!i.attrs.closed,r?.(t.setNodeMarkup(a,void 0,{...i.attrs,closed:e})),!0}}liftListItemOutOfList(e){return MB(e??this.type)}};bB([Y()],YB.prototype,`toggleListItemClosed`,1),bB([Y()],YB.prototype,`liftListItemOutOfList`,1),YB=bB([BP({defaultOptions:{enableCollapsible:!1},staticKeys:[`enableCollapsible`]})],YB);function XB(e,t){e.attrs.closed?t.classList.add(LI.COLLAPSIBLE_LIST_ITEM_CLOSED):t.classList.remove(LI.COLLAPSIBLE_LIST_ITEM_CLOSED)}function ZB(e,t){e.childCount<=1?t.classList.add(`disabled`):t.classList.remove(`disabled`)}var QB=class extends NP{get name(){return`bulletList`}createTags(){return[DC.Block,DC.ListContainerNode]}createNodeSpec(e,t){return{content:`listItem+`,...t,attrs:e.defaults(),parseDOM:[{tag:`ul`,getAttrs:e.parse},...t.parseDOM??[]],toDOM:t=>[`ul`,e.dom(t),0]}}createNodeViews(){return this.options.enableSpine?(e,t,n)=>{let r=document.createElement(`div`);r.style.position=`relative`;let i=n(),a=t.state.doc.resolve(i+1),o=a.node(a.depth-1),s=o?.type?.name!==`listItem`;if(!s){let e=document.createElement(`div`);e.contentEditable=`false`,e.classList.add(LI.LIST_SPINE),e.addEventListener(`click`,e=>{let r=n(),i=t.state.doc.resolve(r+1),a=i.start(i.depth-1),o=mD.create(t.state.doc,a-1);t.dispatch(t.state.tr.setSelection(o)),this.store.commands.toggleListItemClosed(),e.preventDefault(),e.stopPropagation()}),r.append(e)}let c=document.createElement(`ul`);return c.classList.add(LI.UL_LIST_CONTENT),r.append(c),{dom:r,contentDOM:c}}:{}}createExtensions(){return[new YB({priority:AC.Low,enableCollapsible:this.options.enableSpine})]}toggleBulletList(){return TB(this.type,HC(this.store.schema.nodes,`listItem`))}listShortcut(e){return this.toggleBulletList()(e)}createInputRules(){let e=/^\s*([*+-])\s$/;return[gO(e,this.type),new dO(e,(e,t,n,r)=>{let i=e.tr;i.deleteRange(n,r);let a=kB({listType:this.type,itemType:HC(this.store.schema.nodes,`listItem`),tr:i});return a?i:null})]}};bB([Y({icon:`listUnordered`,label:({t:e})=>e(aO.BULLET_LIST_LABEL)})],QB.prototype,`toggleBulletList`,1),bB([UP({shortcut:V.BulletList,command:`toggleBulletList`})],QB.prototype,`listShortcut`,1),QB=bB([BP({defaultOptions:{enableSpine:!1},staticKeys:[`enableSpine`]})],QB);var $B=class extends NP{get name(){return`orderedList`}createTags(){return[DC.Block,DC.ListContainerNode]}createNodeSpec(e,t){return{content:`listItem+`,...t,attrs:{...e.defaults(),order:{default:1}},parseDOM:[{tag:`ol`,getAttrs:t=>Jj(t)?{...e.parse(t),order:+(t.getAttribute(`start`)??1)}:{}},...t.parseDOM??[]],toDOM:t=>{let n=e.dom(t);return t.attrs.order===1?[`ol`,n,0]:[`ol`,{...n,start:t.attrs.order},0]}}}createExtensions(){return[new YB({priority:AC.Low})]}toggleOrderedList(){return TB(this.type,HC(this.store.schema.nodes,`listItem`))}listShortcut(e){return this.toggleOrderedList()(e)}createInputRules(){let e=/^(\d+)\.\s$/;return[gO(e,this.type,e=>({order:+HC(e,1)}),(e,t)=>t.childCount+t.attrs.order===+HC(e,1)),new dO(e,(e,t,n,r)=>{let i=e.tr;i.deleteRange(n,r);let a=kB({listType:this.type,itemType:HC(this.store.schema.nodes,`listItem`),tr:i});if(!a)return null;let o=+HC(t,1);if(o!==1){let e=Zj({selection:i.selection,types:this.type});e&&i.setNodeMarkup(e.pos,void 0,{order:o})}return i})]}};bB([Y({icon:`listOrdered`,label:({t:e})=>e(aO.ORDERED_LIST_LABEL)})],$B.prototype,`toggleOrderedList`,1),bB([UP({shortcut:V.OrderedList,command:`toggleOrderedList`})],$B.prototype,`listShortcut`,1),$B=bB([BP({})],$B);var eV=class extends NP{get name(){return`taskListItem`}createTags(){return[DC.ListItemNode]}createNodeSpec(e,t){return{content:`paragraph block*`,defining:!0,draggable:!1,...t,attrs:{...e.defaults(),checked:{default:!1}},parseDOM:[{tag:`li[data-task-list-item]`,getAttrs:t=>{let n=!1;return Jj(t)&&t.getAttribute(`data-checked`)!==null&&(n=!0),{checked:n,...e.parse(t)}},priority:AC.Medium},...t.parseDOM??[]],toDOM:t=>[`li`,{...e.dom(t),"data-task-list-item":``,"data-checked":t.attrs.checked?``:void 0},0]}}createNodeViews(){return(e,t,n)=>{let r=document.createElement(`input`);return r.type=`checkbox`,r.classList.add(LI.LIST_ITEM_CHECKBOX),r.contentEditable=`false`,r.addEventListener(`click`,e=>{t.editable||e.preventDefault()}),r.addEventListener(`change`,()=>{let e=n(),r=t.state.doc.resolve(e+1);this.store.commands.toggleCheckboxChecked({$pos:r})}),r.checked=e.attrs.checked,LB({node:e,mark:r,updateDOM:tV,updateMark:nV})}}createKeymap(){return{Enter:EB(this.type)}}createExtensions(){return[new JB]}toggleCheckboxChecked(e){let t,n;return typeof e==`boolean`?t=e:e&&(t=e.checked,n=e.$pos),({tr:e,dispatch:r})=>{let i=Zj({selection:n??e.selection.$from,types:this.type});if(!i)return!1;let{node:a,pos:o}=i,s={...a.attrs,checked:t??!a.attrs.checked};return r?.(e.setNodeMarkup(o,void 0,s)),!0}}createInputRules(){let e=/^\s*(\[( ?|x|X)]\s)$/;return[gO(e,this.type,e=>({checked:[`x`,`X`].includes(EM(e,2))})),new dO(e,(e,t,n,r)=>{let i=e.tr;i.deleteRange(n,r);let a=kB({listType:HC(this.store.schema.nodes,`taskList`),itemType:this.type,tr:i});if(!a)return null;let o=[`x`,`X`].includes(EM(t,2));if(o){let e=Zj({selection:i.selection,types:this.type});e&&i.setNodeMarkup(e.pos,void 0,{checked:o})}return i})]}};bB([Y()],eV.prototype,`toggleCheckboxChecked`,1);function tV(e,t){e.attrs.checked?t.setAttribute(`data-checked`,``):t.removeAttribute(`data-checked`),t.setAttribute(`data-task-list-item`,``)}function nV(e,t){t.checked=!!e.attrs.checked}var rV=class extends NP{get name(){return`taskList`}createTags(){return[DC.Block,DC.ListContainerNode]}createNodeSpec(e,t){return{content:`taskListItem+`,...t,attrs:e.defaults(),parseDOM:[{tag:`ul[data-task-list]`,getAttrs:e.parse,priority:AC.Medium},...t.parseDOM??[]],toDOM:t=>[`ul`,{...e.dom(t),"data-task-list":``},0]}}createExtensions(){return[new eV({})]}toggleTaskList(){return TB(this.type,HC(this.store.schema.nodes,`taskListItem`))}listShortcut(e){return this.toggleTaskList()(e)}};bB([Y({icon:`checkboxMultipleLine`,label:({t:e})=>e(aO.TASK_LIST_LABEL)})],rV.prototype,`toggleTaskList`,1),bB([UP({shortcut:V.TaskList,command:`toggleTaskList`})],rV.prototype,`listShortcut`,1);function iV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}function aV(e,t){return Array(t+1).join(e)}function oV(e){return e.replace(/^\n*/,``)}function sV(e){for(var t=e.length;t>0&&e[t-1]===`
|
|
211
|
+
`;)t--;return e.substring(0,t)}var cV=`ADDRESS.ARTICLE.ASIDE.AUDIO.BLOCKQUOTE.BODY.CANVAS.CENTER.DD.DIR.DIV.DL.DT.FIELDSET.FIGCAPTION.FIGURE.FOOTER.FORM.FRAMESET.H1.H2.H3.H4.H5.H6.HEADER.HGROUP.HR.HTML.ISINDEX.LI.MAIN.MENU.NAV.NOFRAMES.NOSCRIPT.OL.OUTPUT.P.PRE.SECTION.TABLE.TBODY.TD.TFOOT.TH.THEAD.TR.UL`.split(`.`);function lV(e){return gV(e,cV)}var uV=[`AREA`,`BASE`,`BR`,`COL`,`COMMAND`,`EMBED`,`HR`,`IMG`,`INPUT`,`KEYGEN`,`LINK`,`META`,`PARAM`,`SOURCE`,`TRACK`,`WBR`];function dV(e){return gV(e,uV)}function fV(e){return _V(e,uV)}var pV=[`A`,`TABLE`,`THEAD`,`TBODY`,`TFOOT`,`TH`,`TD`,`IFRAME`,`SCRIPT`,`AUDIO`,`VIDEO`];function mV(e){return gV(e,pV)}function hV(e){return _V(e,pV)}function gV(e,t){return t.indexOf(e.nodeName)>=0}function _V(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var vV={};vV.paragraph={filter:`p`,replacement:function(e){return`
|
|
212
|
+
|
|
213
|
+
`+e+`
|
|
214
|
+
|
|
215
|
+
`}},vV.lineBreak={filter:`br`,replacement:function(e,t,n){return n.br+`
|
|
216
|
+
`}},vV.heading={filter:[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));if(n.headingStyle===`setext`&&r<3){var i=aV(r===1?`=`:`-`,e.length);return`
|
|
217
|
+
|
|
218
|
+
`+e+`
|
|
219
|
+
`+i+`
|
|
220
|
+
|
|
221
|
+
`}else return`
|
|
222
|
+
|
|
223
|
+
`+aV(`#`,r)+` `+e+`
|
|
224
|
+
|
|
225
|
+
`}},vV.blockquote={filter:`blockquote`,replacement:function(e){return e=e.replace(/^\n+|\n+$/g,``),e=e.replace(/^/gm,`> `),`
|
|
226
|
+
|
|
227
|
+
`+e+`
|
|
228
|
+
|
|
229
|
+
`}},vV.list={filter:[`ul`,`ol`],replacement:function(e,t){var n=t.parentNode;return n.nodeName===`LI`&&n.lastElementChild===t?`
|
|
230
|
+
`+e:`
|
|
231
|
+
|
|
232
|
+
`+e+`
|
|
233
|
+
|
|
234
|
+
`}},vV.listItem={filter:`li`,replacement:function(e,t,n){e=e.replace(/^\n+/,``).replace(/\n+$/,`
|
|
235
|
+
`).replace(/\n/gm,`
|
|
236
|
+
`);var r=n.bulletListMarker+` `,i=t.parentNode;if(i.nodeName===`OL`){var a=i.getAttribute(`start`),o=Array.prototype.indexOf.call(i.children,t);r=(a?Number(a)+o:o+1)+`. `}return r+e+(t.nextSibling&&!/\n$/.test(e)?`
|
|
237
|
+
`:``)}},vV.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle===`indented`&&e.nodeName===`PRE`&&e.firstChild&&e.firstChild.nodeName===`CODE`},replacement:function(e,t,n){return`
|
|
238
|
+
|
|
239
|
+
`+t.firstChild.textContent.replace(/\n/g,`
|
|
240
|
+
`)+`
|
|
241
|
+
|
|
242
|
+
`}},vV.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle===`fenced`&&e.nodeName===`PRE`&&e.firstChild&&e.firstChild.nodeName===`CODE`},replacement:function(e,t,n){for(var r=t.firstChild.getAttribute(`class`)||``,i=(r.match(/language-(\S+)/)||[null,``])[1],a=t.firstChild.textContent,o=n.fence.charAt(0),s=3,c=RegExp(`^`+o+`{3,}`,`gm`),l;l=c.exec(a);)l[0].length>=s&&(s=l[0].length+1);var u=aV(o,s);return`
|
|
243
|
+
|
|
244
|
+
`+u+i+`
|
|
245
|
+
`+a.replace(/\n$/,``)+`
|
|
246
|
+
`+u+`
|
|
247
|
+
|
|
248
|
+
`}},vV.horizontalRule={filter:`hr`,replacement:function(e,t,n){return`
|
|
249
|
+
|
|
250
|
+
`+n.hr+`
|
|
251
|
+
|
|
252
|
+
`}},vV.inlineLink={filter:function(e,t){return t.linkStyle===`inlined`&&e.nodeName===`A`&&e.getAttribute(`href`)},replacement:function(e,t){var n=t.getAttribute(`href`);n&&=n.replace(/([()])/g,`\\$1`);var r=yV(t.getAttribute(`title`));return r&&=` "`+r.replace(/"/g,`\\"`)+`"`,`[`+e+`](`+n+r+`)`}},vV.referenceLink={filter:function(e,t){return t.linkStyle===`referenced`&&e.nodeName===`A`&&e.getAttribute(`href`)},replacement:function(e,t,n){var r=t.getAttribute(`href`),i=yV(t.getAttribute(`title`));i&&=` "`+i+`"`;var a,o;switch(n.linkReferenceStyle){case`collapsed`:a=`[`+e+`][]`,o=`[`+e+`]: `+r+i;break;case`shortcut`:a=`[`+e+`]`,o=`[`+e+`]: `+r+i;break;default:var s=this.references.length+1;a=`[`+e+`][`+s+`]`,o=`[`+s+`]: `+r+i}return this.references.push(o),a},references:[],append:function(e){var t=``;return this.references.length&&(t=`
|
|
253
|
+
|
|
254
|
+
`+this.references.join(`
|
|
255
|
+
`)+`
|
|
256
|
+
|
|
257
|
+
`,this.references=[]),t}},vV.emphasis={filter:[`em`,`i`],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:``}},vV.strong={filter:[`strong`,`b`],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:``}},vV.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n=e.parentNode.nodeName===`PRE`&&!t;return e.nodeName===`CODE`&&!n},replacement:function(e){if(!e)return``;e=e.replace(/\r?\n|\r/g,` `);for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?` `:``,n="`",r=e.match(/`+/gm)||[];r.indexOf(n)!==-1;)n+="`";return n+t+e+t+n}},vV.image={filter:`img`,replacement:function(e,t){var n=yV(t.getAttribute(`alt`)),r=t.getAttribute(`src`)||``,i=yV(t.getAttribute(`title`)),a=i?` "`+i+`"`:``;return r?``:``}};function yV(e){return e?e.replace(/(\n+\s*)+/g,`
|
|
258
|
+
`):``}function bV(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}bV.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return``}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=xV(this.array,e,this.options))||(t=xV(this._keep,e,this.options))||(t=xV(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};function xV(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(SV(i,t,n))return i}}function SV(e,t,n){var r=e.filter;if(typeof r==`string`){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else if(typeof r==`function`){if(r.call(e,t,n))return!0}else throw TypeError("`filter` needs to be a string, array, or function")}function CV(e){var t=e.element,n=e.isBlock,r=e.isVoid,i=e.isPre||function(e){return e.nodeName===`PRE`};if(!(!t.firstChild||i(t))){for(var a=null,o=!1,s=null,c=TV(s,t,i);c!==t;){if(c.nodeType===3||c.nodeType===4){var l=c.data.replace(/[ \r\n\t]+/g,` `);if((!a||/ $/.test(a.data))&&!o&&l[0]===` `&&(l=l.substr(1)),!l){c=wV(c);continue}c.data=l,a=c}else if(c.nodeType===1)n(c)||c.nodeName===`BR`?(a&&(a.data=a.data.replace(/ $/,``)),a=null,o=!1):r(c)||i(c)?(a=null,o=!0):a&&(o=!1);else{c=wV(c);continue}var u=TV(s,c,i);s=c,c=u}a&&(a.data=a.data.replace(/ $/,``),a.data||wV(a))}}function wV(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function TV(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var EV=typeof window<`u`?window:{};function DV(){var e=EV.DOMParser,t=!1;try{new e().parseFromString(``,`text/html`)&&(t=!0)}catch{}return t}function OV(){var e=function(){};return kV()?e.prototype.parseFromString=function(e){var t=new window.ActiveXObject(`htmlfile`);return t.designMode=`on`,t.open(),t.write(e),t.close(),t}:e.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument(``);return t.open(),t.write(e),t.close(),t},e}function kV(){var e=!1;try{document.implementation.createHTMLDocument(``).open()}catch{EV.ActiveXObject&&(e=!0)}return e}var AV=DV()?EV.DOMParser:OV();function jV(e,t){var n;if(typeof e==`string`){var r=NV().parseFromString(`<x-turndown id="turndown-root">`+e+`</x-turndown>`,`text/html`);n=r.getElementById(`turndown-root`)}else n=e.cloneNode(!0);return CV({element:n,isBlock:lV,isVoid:dV,isPre:t.preformattedCode?PV:null}),n}var MV;function NV(){return MV||=new AV,MV}function PV(e){return e.nodeName===`PRE`||e.nodeName===`CODE`}function FV(e,t){return e.isBlock=lV(e),e.isCode=e.nodeName===`CODE`||e.parentNode.isCode,e.isBlank=IV(e),e.flankingWhitespace=LV(e,t),e}function IV(e){return!dV(e)&&!mV(e)&&/^\s*$/i.test(e.textContent)&&!fV(e)&&!hV(e)}function LV(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:``,trailing:``};var n=RV(e.textContent);return n.leadingAscii&&zV(`left`,e,t)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&zV(`right`,e,t)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function RV(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function zV(e,t,n){var r,i,a;return e===`left`?(r=t.previousSibling,i=/ $/):(r=t.nextSibling,i=/^ /),r&&(r.nodeType===3?a=i.test(r.nodeValue):n.preformattedCode&&r.nodeName===`CODE`?a=!1:r.nodeType===1&&!lV(r)&&(a=i.test(r.textContent))),a}var BV=Array.prototype.reduce,VV=[[/\\/g,`\\\\`],[/\*/g,`\\*`],[/^-/g,`\\-`],[/^\+ /g,`\\+ `],[/^(=+)/g,`\\$1`],[/^(#{1,6}) /g,`\\$1 `],[/`/g,"\\`"],[/^~~~/g,`\\~~~`],[/\[/g,`\\[`],[/\]/g,`\\]`],[/^>/g,`\\>`],[/_/g,`\\_`],[/^(\d+)\. /g,`$1\\. `]];function HV(e){if(!(this instanceof HV))return new HV(e);var t={rules:vV,headingStyle:`setext`,hr:`* * *`,bulletListMarker:`*`,codeBlockStyle:`indented`,fence:"```",emDelimiter:`_`,strongDelimiter:`**`,linkStyle:`inlined`,linkReferenceStyle:`full`,br:` `,preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?`
|
|
259
|
+
|
|
260
|
+
`:``},keepReplacement:function(e,t){return t.isBlock?`
|
|
261
|
+
|
|
262
|
+
`+t.outerHTML+`
|
|
263
|
+
|
|
264
|
+
`:t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?`
|
|
265
|
+
|
|
266
|
+
`+e+`
|
|
267
|
+
|
|
268
|
+
`:e}};this.options=iV({},t,e),this.rules=new bV(this.options)}HV.prototype={turndown:function(e){if(!qV(e))throw TypeError(e+` is not a string, or an element/document/fragment node.`);if(e===``)return``;var t=UV.call(this,new jV(e,this.options));return WV.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else if(typeof e==`function`)e(this);else throw TypeError(`plugin must be a Function or an Array of Functions`);return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return VV.reduce(function(e,t){return e.replace(t[0],t[1])},e)}};function UV(e){var t=this;return BV.call(e.childNodes,function(e,n){n=new FV(n,t.options);var r=``;return n.nodeType===3?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):n.nodeType===1&&(r=GV.call(t,n)),KV(e,r)},``)}function WV(e){var t=this;return this.rules.forEach(function(n){typeof n.append==`function`&&(e=KV(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,``).replace(/[\t\r\n\s]+$/,``)}function GV(e){var t=this.rules.forNode(e),n=UV.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function KV(e,t){var n=sV(e),r=oV(t),i=Math.max(e.length-n.length,t.length-r.length),a=`
|
|
269
|
+
|
|
270
|
+
`.substring(0,i);return n+a+r}function qV(e){return e!=null&&(typeof e==`string`||e.nodeType&&(e.nodeType===1||e.nodeType===9||e.nodeType===11))}var JV=HV;function YV(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:``,highlight:null,hooks:null,langPrefix:`language-`,mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let XV=YV();function ZV(e){XV=e}const QV=/[&<>"']/,$V=new RegExp(QV.source,`g`),eH=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,tH=new RegExp(eH.source,`g`),nH={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},rH=e=>nH[e];function iH(e,t){if(t){if(QV.test(e))return e.replace($V,rH)}else if(eH.test(e))return e.replace(tH,rH);return e}const aH=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function oH(e){return e.replace(aH,(e,t)=>(t=t.toLowerCase(),t===`colon`?`:`:t.charAt(0)===`#`?t.charAt(1)===`x`?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):``))}const sH=/(^|[^\[])\^/g;function cH(e,t){e=typeof e==`string`?e:e.source,t||=``;let n={replace:(t,r)=>(r=r.source||r,r=r.replace(sH,`$1`),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const lH=/[^\w:]/g,uH=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function dH(e,t,n){if(e){let e;try{e=decodeURIComponent(oH(n)).replace(lH,``).toLowerCase()}catch{return null}if(e.indexOf(`javascript:`)===0||e.indexOf(`vbscript:`)===0||e.indexOf(`data:`)===0)return null}t&&!uH.test(n)&&(n=gH(t,n));try{n=encodeURI(n).replace(/%25/g,`%`)}catch{return null}return n}const fH={},pH=/^[^:]+:\/*[^/]*$/,mH=/^([^:]+:)[\s\S]*$/,hH=/^([^:]+:\/*[^/]*)[\s\S]*$/;function gH(e,t){fH[` `+e]||(pH.test(e)?fH[` `+e]=e+`/`:fH[` `+e]=yH(e,`/`,!0)),e=fH[` `+e];let n=e.indexOf(`:`)===-1;return t.substring(0,2)===`//`?n?t:e.replace(mH,`$1`)+t:t.charAt(0)===`/`?n?t:e.replace(hH,`$1`)+t:e+t}const _H={exec:function(){}};function vH(e,t){let n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}),r=n.split(/ \|/),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push(``);for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,`|`);return r}function yH(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function bH(e,t){if(e.indexOf(t[1])===-1)return-1;let n=e.length,r=0,i=0;for(;i<n;i++)if(e[i]===`\\`)i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function xH(e){e&&e.sanitize&&!e.silent&&console.warn(`marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options`)}function SH(e,t){if(t<1)return``;let n=``;for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function CH(e,t,n,r){let i=t.href,a=t.title?iH(t.title):null,o=e[1].replace(/\\([\[\]])/g,`$1`);if(e[0].charAt(0)!==`!`){r.state.inLink=!0;let e={type:`link`,raw:n,href:i,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,e}return{type:`image`,raw:n,href:i,title:a,text:iH(o)}}function wH(e,t){let n=e.match(/^(\s+)(?:```)/);if(n===null)return t;let r=n[1];return t.split(`
|
|
271
|
+
`).map(e=>{let t=e.match(/^\s+/);if(t===null)return e;let[n]=t;return n.length>=r.length?e.slice(r.length):e}).join(`
|
|
272
|
+
`)}var TH=class{constructor(e){this.options=e||XV}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(/^ {1,4}/gm,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:yH(e,`
|
|
273
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=wH(e,t[3]||``);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){let t=yH(e,`#`);(this.options.pedantic||!t||/ $/.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:t[0]}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/^ *>[ \t]?/gm,``),n=this.lexer.state.top;this.lexer.state.top=!0;let r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:`blockquote`,raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,i,a,o,s,c,l,u,d,f,p,m=t[1].trim(),h=m.length>1,g={type:`list`,raw:``,ordered:h,start:h?+m.slice(0,-1):``,loose:!1,items:[]};m=h?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=h?m:`[*+-]`);let _=RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(p=!1,!(!(t=_.exec(e))||this.rules.block.hr.test(e)));){if(n=t[0],e=e.substring(n.length),l=t[2].split(`
|
|
274
|
+
`,1)[0].replace(/^\t+/,e=>` `.repeat(3*e.length)),u=e.split(`
|
|
275
|
+
`,1)[0],this.options.pedantic?(a=2,f=l.trimLeft()):(a=t[2].search(/[^ ]/),a=a>4?1:a,f=l.slice(a),a+=t[1].length),s=!1,!l&&/^ *$/.test(u)&&(n+=u+`
|
|
276
|
+
`,e=e.substring(u.length+1),p=!0),!p){let t=RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),o=RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;e&&(d=e.split(`
|
|
277
|
+
`,1)[0],u=d,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g,` `)),!(i.test(u)||o.test(u)||t.test(u)||r.test(e)));){if(u.search(/[^ ]/)>=a||!u.trim())f+=`
|
|
278
|
+
`+u.slice(a);else{if(s||l.search(/[^ ]/)>=4||i.test(l)||o.test(l)||r.test(l))break;f+=`
|
|
279
|
+
`+u}!s&&!u.trim()&&(s=!0),n+=d+`
|
|
280
|
+
`,e=e.substring(d.length+1),l=u.slice(a)}}g.loose||(c?g.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f),r&&(i=r[0]!==`[ ] `,f=f.replace(/^\[[ xX]\] +/,``))),g.items.push({type:`list_item`,raw:n,task:!!r,checked:i,loose:!1,text:f}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=f.trimRight(),g.raw=g.raw.trimRight();let v=g.items.length;for(o=0;o<v;o++)if(this.lexer.state.top=!1,g.items[o].tokens=this.lexer.blockTokens(g.items[o].text,[]),!g.loose){let e=g.items[o].tokens.filter(e=>e.type===`space`),t=e.length>0&&e.some(e=>/\n.*\n/.test(e.raw));g.loose=t}if(g.loose)for(o=0;o<v;o++)g.items[o].loose=!0;return g}}html(e){let t=this.rules.block.html.exec(e);if(t){let e={type:`html`,raw:t[0],pre:!this.options.sanitizer&&(t[1]===`pre`||t[1]===`script`||t[1]===`style`),text:t[0]};if(this.options.sanitize){let n=this.options.sanitizer?this.options.sanitizer(t[0]):iH(t[0]);e.type=`paragraph`,e.text=n,e.tokens=this.lexer.inline(n)}return e}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(/\s+/g,` `),n=t[2]?t[2].replace(/^<(.*)>$/,`$1`).replace(this.rules.inline._escapes,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(t){let e={type:`table`,header:vH(t[1]).map(e=>({text:e})),align:t[2].replace(/^ *|\| *$/g,``).split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,``).split(`
|
|
281
|
+
`):[]};if(e.header.length===e.align.length){e.raw=t[0];let n=e.align.length,r,i,a,o;for(r=0;r<n;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]=`right`:/^ *:-+: *$/.test(e.align[r])?e.align[r]=`center`:/^ *:-+ *$/.test(e.align[r])?e.align[r]=`left`:e.align[r]=null;for(n=e.rows.length,r=0;r<n;r++)e.rows[r]=vH(e.rows[r],e.header.length).map(e=>({text:e}));for(n=e.header.length,i=0;i<n;i++)e.header[i].tokens=this.lexer.inline(e.header[i].text);for(n=e.rows.length,i=0;i<n;i++)for(o=e.rows[i],a=0;a<o.length;a++)o[a].tokens=this.lexer.inline(o[a].text);return e}}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
282
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:iH(t[1])}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?`text`:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):iH(t[0]):t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;let t=yH(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=bH(t[2],`()`);if(e>-1){let n=t[0].indexOf(`!`)===0?5:4,r=n+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),CH(t,{href:n&&n.replace(this.rules.inline._escapes,`$1`),title:r&&r.replace(this.rules.inline._escapes,`$1`)},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g,` `);if(e=t[e.toLowerCase()],!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return CH(n,e,n[0],this.lexer)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r||r[3]&&n.match(/[\p{L}\p{N}]/u))return;let i=r[1]||r[2]||``;if(!i||i&&(n===``||this.rules.inline.punctuation.exec(n))){let n=r[0].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=i.length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=e.slice(0,n+r.index+(r[0].length-i.length)+a);if(Math.min(n,a)%2){let e=t.slice(1,-1);return{type:`em`,raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}let c=t.slice(2,-2);return{type:`strong`,raw:t,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g,` `),n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=iH(e,!0),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){let n=this.rules.inline.autolink.exec(e);if(n){let e,r;return n[2]===`@`?(e=iH(this.options.mangle?t(n[1]):n[1]),r=`mailto:`+e):(e=iH(n[1]),r=e),{type:`link`,raw:n[0],text:e,href:r,tokens:[{type:`text`,raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if(n[2]===`@`)e=iH(this.options.mangle?t(n[0]):n[0]),r=`mailto:`+e;else{let t;do t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(t!==n[0]);e=iH(n[0]),r=n[1]===`www.`?`http://`+n[0]:n[0]}return{type:`link`,raw:n[0],text:e,href:r,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e,t){let n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):iH(n[0]):n[0]:iH(this.options.smartypants?t(n[0]):n[0]),{type:`text`,raw:n[0],text:e}}}};const EH={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))`,def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:_H,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};EH._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,EH._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,EH.def=cH(EH.def).replace(`label`,EH._label).replace(`title`,EH._title).getRegex(),EH.bullet=/(?:[*+-]|\d{1,9}[.)])/,EH.listItemStart=cH(/^( *)(bull) */).replace(`bull`,EH.bullet).getRegex(),EH.list=cH(EH.list).replace(/bull/g,EH.bullet).replace(`hr`,`\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))`).replace(`def`,`\\n+(?=`+EH.def.source+`)`).getRegex(),EH._tag=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,EH._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,EH.html=cH(EH.html,`i`).replace(`comment`,EH._comment).replace(`tag`,EH._tag).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),EH.paragraph=cH(EH._paragraph).replace(`hr`,EH.hr).replace(`heading`,` {0,3}#{1,6} `).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,EH._tag).getRegex(),EH.blockquote=cH(EH.blockquote).replace(`paragraph`,EH.paragraph).getRegex(),EH.normal={...EH},EH.gfm={...EH.normal,table:`^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`},EH.gfm.table=cH(EH.gfm.table).replace(`hr`,EH.hr).replace(`heading`,` {0,3}#{1,6} `).replace(`blockquote`,` {0,3}>`).replace(`code`,` {4}[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,EH._tag).getRegex(),EH.gfm.paragraph=cH(EH._paragraph).replace(`hr`,EH.hr).replace(`heading`,` {0,3}#{1,6} `).replace(`|lheading`,``).replace(`table`,EH.gfm.table).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,EH._tag).getRegex(),EH.pedantic={...EH.normal,html:cH(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,EH._comment).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_H,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:cH(EH.normal._paragraph).replace(`hr`,EH.hr).replace(`heading`,` *#{1,6} *[^
|
|
283
|
+
]`).replace(`lheading`,EH.lheading).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).getRegex()};const Z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_H,tag:`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`,link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:`reflink|nolink(?!\\()`,emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:_H,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Z._punctuation=`!"#$%&'()+\\-.,/:;<=>?@\\[\\]\`^{|}~`,Z.punctuation=cH(Z.punctuation).replace(/punctuation/g,Z._punctuation).getRegex(),Z.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Z.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Z._comment=cH(EH._comment).replace(`(?:-->|$)`,`-->`).getRegex(),Z.emStrong.lDelim=cH(Z.emStrong.lDelim).replace(/punct/g,Z._punctuation).getRegex(),Z.emStrong.rDelimAst=cH(Z.emStrong.rDelimAst,`g`).replace(/punct/g,Z._punctuation).getRegex(),Z.emStrong.rDelimUnd=cH(Z.emStrong.rDelimUnd,`g`).replace(/punct/g,Z._punctuation).getRegex(),Z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Z._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Z.autolink=cH(Z.autolink).replace(`scheme`,Z._scheme).replace(`email`,Z._email).getRegex(),Z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Z.tag=cH(Z.tag).replace(`comment`,Z._comment).replace(`attribute`,Z._attribute).getRegex(),Z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Z._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Z.link=cH(Z.link).replace(`label`,Z._label).replace(`href`,Z._href).replace(`title`,Z._title).getRegex(),Z.reflink=cH(Z.reflink).replace(`label`,Z._label).replace(`ref`,EH._label).getRegex(),Z.nolink=cH(Z.nolink).replace(`ref`,EH._label).getRegex(),Z.reflinkSearch=cH(Z.reflinkSearch,`g`).replace(`reflink`,Z.reflink).replace(`nolink`,Z.nolink).getRegex(),Z.normal={...Z},Z.pedantic={...Z.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:cH(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Z._label).getRegex(),reflink:cH(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Z._label).getRegex()},Z.gfm={...Z.normal,escape:cH(Z.escape).replace(`])`,`~|])`).getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Z.gfm.url=cH(Z.gfm.url,`i`).replace(`email`,Z.gfm._extended_email).getRegex(),Z.breaks={...Z.gfm,br:cH(Z.br).replace(`{2,}`,`*`).getRegex(),text:cH(Z.gfm.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()};function DH(e){return e.replace(/---/g,`—`).replace(/--/g,`–`).replace(/(^|[-\u2014/(\[{"\s])'/g,`$1‘`).replace(/'/g,`’`).replace(/(^|[-\u2014/(\[{\u2018\s])"/g,`$1“`).replace(/"/g,`”`).replace(/\.{3}/g,`…`)}function OH(e){let t=``,n,r,i=e.length;for(n=0;n<i;n++)r=e.charCodeAt(n),Math.random()>.5&&(r=`x`+r.toString(16)),t+=`&#`+r+`;`;return t}var kH=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||XV,this.options.tokenizer=this.options.tokenizer||new TH,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={block:EH.normal,inline:Z.normal};this.options.pedantic?(t.block=EH.pedantic,t.inline=Z.pedantic):this.options.gfm&&(t.block=EH.gfm,this.options.breaks?t.inline=Z.breaks:t.inline=Z.gfm),this.tokenizer.rules=t}static get rules(){return{block:EH,inline:Z}}static lex(t,n){let r=new e(n);return r.lex(t)}static lexInline(t,n){let r=new e(n);return r.inlineTokens(t)}lex(e){e=e.replace(/\r\n|\r/g,`
|
|
284
|
+
`),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){e=this.options.pedantic?e.replace(/\t/g,` `).replace(/^ +$/gm,``):e.replace(/^( *)(\t+)/gm,(e,t,n)=>t+` `.repeat(n.length));let n,r,i,a;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>(n=r.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length),n.raw.length===1&&t.length>0?t[t.length-1].raw+=`
|
|
285
|
+
`:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type===`paragraph`||r.type===`text`)?(r.raw+=`
|
|
286
|
+
`+n.raw,r.text+=`
|
|
287
|
+
`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(n=this.tokenizer.fences(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&(r.type===`paragraph`||r.type===`text`)?(r.raw+=`
|
|
288
|
+
`+n.raw,r.text+=`
|
|
289
|
+
`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(e)){e=e.substring(n.raw.length),t.push(n);continue}if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(function(e){r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){r=t[t.length-1],a&&r.type===`paragraph`?(r.raw+=`
|
|
290
|
+
`+n.raw,r.text+=`
|
|
291
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),a=i.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&r.type===`text`?(r.raw+=`
|
|
292
|
+
`+n.raw,r.text+=`
|
|
293
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,i,a=e,o,s,c;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)e.includes(o[0].slice(o[0].lastIndexOf(`[`)+1,-1))&&(a=a.slice(0,o.index)+`[`+SH(`a`,o[0].length-2)+`]`+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,o.index)+`[`+SH(`a`,o[0].length-2)+`]`+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,o.index+o[0].length-2)+`++`+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(s||(c=``),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(r=>(n=r.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),r=t[t.length-1],r&&n.type===`text`&&r.type===`text`?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),r=t[t.length-1],r&&n.type===`text`&&r.type===`text`?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,a,c)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e,OH)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e,OH))){e=e.substring(n.raw.length),t.push(n);continue}if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(function(e){r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,DH)){e=e.substring(n.raw.length),n.raw.slice(-1)!==`_`&&(c=n.raw.slice(-1)),s=!0,r=t[t.length-1],r&&r.type===`text`?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},AH=class{constructor(e){this.options=e||XV}code(e,t,n){let r=(t||``).match(/\S*/)[0];if(this.options.highlight){let t=this.options.highlight(e,r);t!=null&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,``)+`
|
|
294
|
+
`,r?`<pre><code class="`+this.options.langPrefix+iH(r)+`">`+(n?e:iH(e,!0))+`</code></pre>
|
|
295
|
+
`:`<pre><code>`+(n?e:iH(e,!0))+`</code></pre>
|
|
296
|
+
`}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,n,r){if(this.options.headerIds){let i=this.options.headerPrefix+r.slug(n);return`<h${t} id="${i}">${e}</h${t}>\n`}return`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?`<hr/>
|
|
297
|
+
`:`<hr>
|
|
298
|
+
`}list(e,t,n){let r=t?`ol`:`ul`,i=t&&n!==1?` start="`+n+`"`:``;return`<`+r+i+`>
|
|
299
|
+
`+e+`</`+r+`>
|
|
300
|
+
`}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"`+(this.options.xhtml?` /`:``)+`> `}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&=`<tbody>${t}</tbody>`,`<table>
|
|
301
|
+
<thead>
|
|
302
|
+
`+e+`</thead>
|
|
303
|
+
`+t+`</table>
|
|
304
|
+
`}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){let n=t.header?`th`:`td`,r=t.align?`<${n} align="${t.align}">`:`<${n}>`;return r+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?`<br/>`:`<br>`}del(e){return`<del>${e}</del>`}link(e,t,n){if(e=dH(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let r=`<a href="`+e+`"`;return t&&(r+=` title="`+t+`"`),r+=`>`+n+`</a>`,r}image(e,t,n){if(e=dH(this.options.sanitize,this.options.baseUrl,e),e===null)return n;let r=`<img src="${e}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=this.options.xhtml?`/>`:`>`,r}text(e){return e}},jH=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return``+n}image(e,t,n){return``+n}br(){return``}},MH=class{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,``).replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,``).replace(/\s/g,`-`)}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do r++,n=e+`-`+r;while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){let n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}},NH=class e{constructor(e){this.options=e||XV,this.options.renderer=this.options.renderer||new AH,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new jH,this.slugger=new MH}static parse(t,n){let r=new e(n);return r.parse(t)}static parseInline(t,n){let r=new e(n);return r.parseInline(t)}parse(e,t=!0){let n=``,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S=e.length;for(r=0;r<S;r++){if(f=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[f.type]&&(x=this.options.extensions.renderers[f.type].call({parser:this},f),x!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`paragraph`,`text`].includes(f.type))){n+=x||``;continue}switch(f.type){case`space`:continue;case`hr`:n+=this.renderer.hr();continue;case`heading`:n+=this.renderer.heading(this.parseInline(f.tokens),f.depth,oH(this.parseInline(f.tokens,this.textRenderer)),this.slugger);continue;case`code`:n+=this.renderer.code(f.text,f.lang,f.escaped);continue;case`table`:for(u=``,l=``,o=f.header.length,i=0;i<o;i++)l+=this.renderer.tablecell(this.parseInline(f.header[i].tokens),{header:!0,align:f.align[i]});for(u+=this.renderer.tablerow(l),d=``,o=f.rows.length,i=0;i<o;i++){for(c=f.rows[i],l=``,s=c.length,a=0;a<s;a++)l+=this.renderer.tablecell(this.parseInline(c[a].tokens),{header:!1,align:f.align[a]});d+=this.renderer.tablerow(l)}n+=this.renderer.table(u,d);continue;case`blockquote`:d=this.parse(f.tokens),n+=this.renderer.blockquote(d);continue;case`list`:for(p=f.ordered,m=f.start,h=f.loose,o=f.items.length,d=``,i=0;i<o;i++)_=f.items[i],v=_.checked,y=_.task,g=``,_.task&&(b=this.renderer.checkbox(v),h?_.tokens.length>0&&_.tokens[0].type===`paragraph`?(_.tokens[0].text=b+` `+_.tokens[0].text,_.tokens[0].tokens&&_.tokens[0].tokens.length>0&&_.tokens[0].tokens[0].type===`text`&&(_.tokens[0].tokens[0].text=b+` `+_.tokens[0].tokens[0].text)):_.tokens.unshift({type:`text`,text:b}):g+=b),g+=this.parse(_.tokens,h),d+=this.renderer.listitem(g,y,v);n+=this.renderer.list(d,p,m);continue;case`html`:n+=this.renderer.html(f.text);continue;case`paragraph`:n+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case`text`:for(d=f.tokens?this.parseInline(f.tokens):f.text;r+1<S&&e[r+1].type===`text`;)f=e[++r],d+=`
|
|
305
|
+
`+(f.tokens?this.parseInline(f.tokens):f.text);n+=t?this.renderer.paragraph(d):d;continue;default:{let e=`Token with "`+f.type+`" type was not found.`;if(this.options.silent){console.error(e);return}else throw Error(e)}}}return n}parseInline(e,t){t||=this.renderer;let n=``,r,i,a,o=e.length;for(r=0;r<o;r++){if(i=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]&&(a=this.options.extensions.renderers[i.type].call({parser:this},i),a!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type))){n+=a||``;continue}switch(i.type){case`escape`:n+=t.text(i.text);break;case`html`:n+=t.html(i.text);break;case`link`:n+=t.link(i.href,i.title,this.parseInline(i.tokens,t));break;case`image`:n+=t.image(i.href,i.title,i.text);break;case`strong`:n+=t.strong(this.parseInline(i.tokens,t));break;case`em`:n+=t.em(this.parseInline(i.tokens,t));break;case`codespan`:n+=t.codespan(i.text);break;case`br`:n+=t.br();break;case`del`:n+=t.del(this.parseInline(i.tokens,t));break;case`text`:n+=t.text(i.text);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent){console.error(e);return}else throw Error(e)}}}return n}},PH=class{constructor(e){this.options=e||XV}static passThroughHooks=new Set([`preprocess`,`postprocess`]);preprocess(e){return e}postprocess(e){return e}};function FH(e,t,n){return r=>{if(r.message+=`
|
|
306
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+iH(r.message+``,!0)+`</pre>`;if(t)return Promise.resolve(e);if(n){n(null,e);return}return e}if(t)return Promise.reject(r);if(n){n(r);return}throw r}}function IH(e,t){return(n,r,i)=>{typeof r==`function`&&(i=r,r=null);let a={...r};r={...LH.defaults,...a};let o=FH(r.silent,r.async,i);if(n==null)return o(Error(`marked(): input parameter is undefined or null`));if(typeof n!=`string`)return o(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(n)+`, string expected`));if(xH(r),r.hooks&&(r.hooks.options=r),i){let a=r.highlight,s;try{r.hooks&&(n=r.hooks.preprocess(n)),s=e(n,r)}catch(e){return o(e)}let c=function(e){let n;if(!e)try{r.walkTokens&&LH.walkTokens(s,r.walkTokens),n=t(s,r),r.hooks&&(n=r.hooks.postprocess(n))}catch(t){e=t}return r.highlight=a,e?o(e):i(null,n)};if(!a||a.length<3||(delete r.highlight,!s.length))return c();let l=0;LH.walkTokens(s,function(e){e.type===`code`&&(l++,setTimeout(()=>{a(e.text,e.lang,function(t,n){if(t)return c(t);n!=null&&n!==e.text&&(e.text=n,e.escaped=!0),l--,l===0&&c()})},0))}),l===0&&c();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(t=>e(t,r)).then(e=>r.walkTokens?Promise.all(LH.walkTokens(e,r.walkTokens)).then(()=>e):e).then(e=>t(e,r)).then(e=>r.hooks?r.hooks.postprocess(e):e).catch(o);try{r.hooks&&(n=r.hooks.preprocess(n));let i=e(n,r);r.walkTokens&&LH.walkTokens(i,r.walkTokens);let a=t(i,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(e){return o(e)}}}function LH(e,t,n){return IH(kH.lex,NH.parse)(e,t,n)}LH.options=LH.setOptions=function(e){return LH.defaults={...LH.defaults,...e},ZV(LH.defaults),LH},LH.getDefaults=YV,LH.defaults=XV,LH.use=function(...e){let t=LH.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(e=>{let n={...e};if(n.async=LH.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(e.renderer){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(e.tokenizer){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=LH.defaults.renderer||new AH;for(let n in e.renderer){let r=t[n];t[n]=(...i)=>{let a=e.renderer[n].apply(t,i);return a===!1&&(a=r.apply(t,i)),a}}n.renderer=t}if(e.tokenizer){let t=LH.defaults.tokenizer||new TH;for(let n in e.tokenizer){let r=t[n];t[n]=(...i)=>{let a=e.tokenizer[n].apply(t,i);return a===!1&&(a=r.apply(t,i)),a}}n.tokenizer=t}if(e.hooks){let t=LH.defaults.hooks||new PH;for(let n in e.hooks){let r=t[n];PH.passThroughHooks.has(n)?t[n]=i=>{if(LH.defaults.async)return Promise.resolve(e.hooks[n].call(t,i)).then(e=>r.call(t,e));let a=e.hooks[n].call(t,i);return r.call(t,a)}:t[n]=(...i)=>{let a=e.hooks[n].apply(t,i);return a===!1&&(a=r.apply(t,i)),a}}n.hooks=t}if(e.walkTokens){let t=LH.defaults.walkTokens;n.walkTokens=function(n){let r=[];return r.push(e.walkTokens.call(this,n)),t&&(r=r.concat(t.call(this,n))),r}}LH.setOptions(n)})},LH.walkTokens=function(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(LH,r)),r.type){case`table`:for(let e of r.header)n=n.concat(LH.walkTokens(e.tokens,t));for(let e of r.rows)for(let r of e)n=n.concat(LH.walkTokens(r.tokens,t));break;case`list`:n=n.concat(LH.walkTokens(r.items,t));break;default:LH.defaults.extensions&&LH.defaults.extensions.childTokens&&LH.defaults.extensions.childTokens[r.type]?LH.defaults.extensions.childTokens[r.type].forEach(function(e){n=n.concat(LH.walkTokens(r[e],t))}):r.tokens&&(n=n.concat(LH.walkTokens(r.tokens,t)))}return n},LH.parseInline=IH(kH.lexInline,NH.parseInline),LH.Parser=NH,LH.parser=NH.parse,LH.Renderer=AH,LH.TextRenderer=jH,LH.Lexer=kH,LH.lexer=kH.lex,LH.Tokenizer=TH,LH.Slugger=MH,LH.Hooks=PH,LH.parse=LH;const mfe=LH.options,hfe=LH.setOptions,gfe=LH.use,_fe=LH.walkTokens,vfe=LH.parseInline,yfe=NH.parse,bfe=kH.lex;var RH=Object.defineProperty,zH=Object.getOwnPropertyDescriptor,BH=(e,t,n,r)=>{for(var i=r>1?void 0:r?zH(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&RH(t,n,i),i},VH=jw(JV);function HH(e){return YH.turndown(e)}function UH(e){let t=e.parentNode;if(!Jj(t))return!1;if(t.nodeName===`THEAD`)return!0;if(t.nodeName!==`TABLE`&&!KH(t))return!1;let n=[...e.childNodes];return n.every(e=>e.nodeName===`TH`)&&n.some(e=>!!e.textContent)}function WH(e){return Jj(e)&&e.matches(`th[data-controller-cell]`)}function GH(e){let t=e.parentNode;if(!Jj(t)||t.nodeName!==`TABLE`&&!KH(t))return!1;let n=[...e.childNodes];return n.every(e=>WH(e))}function KH(e){if(e.nodeName!==`TBODY`)return!1;let t=e.previousSibling;return t?Jj(t)&&t.nodeName===`THEAD`&&!t.textContent?.trim():!0}function qH(e){let t=e.closest(`table`);if(!t)return!1;let{parentNode:n}=t;return n?!!n.closest(`table`):!0}function JH(e,t){let n=[];for(let e of t.parentNode?.childNodes??[]){if(WH(e))continue;n.push(e)}let r=n.indexOf(t),i=r===0?`| `:` `;return`${i+e.trim()} |`}var YH=new VH({codeBlockStyle:`fenced`,headingStyle:`atx`}).addRule(`taskListItems`,{filter:e=>e.nodeName===`LI`&&e.hasAttribute(`data-task-list-item`),replacement:(e,t)=>{let n=t.hasAttribute(`data-checked`);return`- ${n?`[x]`:`[ ]`} ${e.trimStart()}`}}).addRule(`tableCell`,{filter:[`th`,`td`],replacement:(e,t)=>WH(t)?``:JH(e,t)}).addRule(`tableRow`,{filter:`tr`,replacement:(e,t)=>{let n=``,r={left:`:--`,right:`--:`,center:`:-:`},i=[...t.childNodes].filter(e=>!WH(e));if(UH(t))for(let e of i){if(!Jj(e))continue;let t=`---`,i=(e.getAttribute(`align`)??``).toLowerCase();i&&(t=r[i]||t),n+=JH(t,e)}return`
|
|
307
|
+
${e}${n?`
|
|
308
|
+
${n}`:``}`}}).addRule(`table`,{filter:e=>{if(e.nodeName!==`TABLE`||qH(e))return!1;let t=[...e.rows].filter(e=>!GH(e));return UH(t[0])},replacement:e=>(e=e.replace(`
|
|
309
|
+
|
|
310
|
+
`,`
|
|
311
|
+
`),`
|
|
312
|
+
|
|
313
|
+
${e}
|
|
314
|
+
|
|
315
|
+
`)}).addRule(`tableSection`,{filter:[`thead`,`tbody`,`tfoot`],replacement:function(e){return e}}).keep(e=>e.nodeName===`TABLE`&&!UH(e.rows[0])).keep(e=>e.nodeName===`TABLE`&&qH(e)).addRule(`strikethrough`,{filter:[`del`,`s`,`strike`],replacement:function(e){return`~${e}~`}}).addRule(`fencedCodeBlock`,{filter:(e,t)=>!!(t.codeBlockStyle===`fenced`&&e.nodeName===`PRE`&&e.firstChild&&e.firstChild.nodeName===`CODE`),replacement:(e,t,n)=>{W(Jj(t.firstChild),{code:H.EXTENSION,message:`Invalid node \`${t.firstChild?.nodeName}\` encountered for codeblock when converting html to markdown.`});let r=t.firstChild.getAttribute(`class`)??``,i=r.match(/(?:lang|language)-(\S+)/)?.[1]??t.firstChild.getAttribute(`data-code-block-language`)??``;return`
|
|
316
|
+
|
|
317
|
+
${n.fence}${i}
|
|
318
|
+
${t.firstChild.textContent}
|
|
319
|
+
${n.fence}
|
|
320
|
+
|
|
321
|
+
`}});LH.use({renderer:{list(e,t,n){if(t){let t=n===1?``:`start="${n}"`;return`<ol ${t}>
|
|
322
|
+
${e}</ol>
|
|
323
|
+
`}let r=e.startsWith(`<li data-task-list-item `)?`data-task-list`:``;return`<ul ${r}>
|
|
324
|
+
${e}</ul>
|
|
325
|
+
`},listitem(e,t,n){if(!t)return`<li>${e}</li>
|
|
326
|
+
`;let r=n?`data-checked`:``;return`<li data-task-list-item ${r}>${e}</li>
|
|
327
|
+
`}}});function XH(e,t){let n=LH(e,{gfm:!0,smartLists:!0,xhtml:!0});return t?t(n):n}var ZH=class extends jP{get name(){return`markdown`}onCreate(){this.store.setStringHandler(`markdown`,this.markdownToProsemirrorNode.bind(this))}createPlugin(){let e=this.options.copyAsMarkdown?e=>{let t=document.createElement(`div`),n=KT.fromSchema(this.store.schema);return t.append(n.serializeFragment(e.content)),this.options.htmlToMarkdown(t.innerHTML)}:void 0;return{props:{clipboardTextSerializer:e}}}markdownToProsemirrorNode(e){return this.store.stringHandlers.html({...e,content:this.options.markdownToHtml(e.content,this.options.htmlSanitizer)})}insertMarkdown(e,t){return n=>{let{state:r}=n,i=this.options.markdownToHtml(e,this.options.htmlSanitizer);i=!t?.alwaysWrapInBlock&&i.startsWith(`<p><`)&&i.endsWith(`</p>
|
|
328
|
+
`)?i.slice(3,-5):`<div>${i}</div>`;let a=this.store.stringHandlers.html({content:i,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(a,{...t,replaceEmptyParentBlock:!0})(n)}}getMarkdown(e){return this.options.htmlToMarkdown(this.store.helpers.getHTML(e))}toggleBoldMarkdown(){return e=>!1}};BH([Y()],ZH.prototype,`insertMarkdown`,1),BH([HP()],ZH.prototype,`getMarkdown`,1),BH([Y()],ZH.prototype,`toggleBoldMarkdown`,1),ZH=BH([BP({defaultOptions:{htmlToMarkdown:HH,markdownToHtml:XH,htmlSanitizer:void 0,activeNodes:[DC.Code],copyAsMarkdown:!1},staticKeys:[`htmlToMarkdown`,`markdownToHtml`,`htmlSanitizer`]})],ZH);var QH=Object.defineProperty,$H=Object.getOwnPropertyDescriptor,eU=(e,t,n,r)=>{for(var i=r>1?void 0:r?$H(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&QH(t,n,i),i},tU={icon:`paragraph`,label:({t:e})=>e(uO.INSERT_LABEL),description:({t:e})=>e(uO.INSERT_DESCRIPTION)},nU={icon:`paragraph`,label:({t:e})=>e(uO.CONVERT_LABEL),description:({t:e})=>e(uO.CONVERT_DESCRIPTION)},rU=class extends NP{get name(){return`paragraph`}createTags(){return[DC.LastNodeCompatible,DC.TextBlock,DC.Block,DC.FormattingNode]}createNodeSpec(e,t){return{content:`inline*`,draggable:!1,...t,attrs:{...e.defaults()},parseDOM:[{tag:`p`,getAttrs:t=>({...e.parse(t)})},...t.parseDOM??[]],toDOM:t=>[`p`,e.dom(t),0]}}convertParagraph(e={}){let{attrs:t,selection:n,preserveAttrs:r}=e;return this.store.commands.setBlockNodeType.original(this.type,t,n,r)}insertParagraph(e,t={}){let{selection:n,attrs:r}=t;return this.store.commands.insertNode.original(this.type,{content:e,selection:n,attrs:r})}shortcut(e){return this.convertParagraph()(e)}};eU([Y(nU)],rU.prototype,`convertParagraph`,1),eU([Y(tU)],rU.prototype,`insertParagraph`,1),eU([UP({shortcut:V.Paragraph,command:`convertParagraph`})],rU.prototype,`shortcut`,1),rU=eU([BP({defaultPriority:AC.Medium})],rU);var iU=Object.defineProperty,aU=Object.getOwnPropertyDescriptor,oU=(e,t,n,r)=>{for(var i=r>1?void 0:r?aU(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&iU(t,n,i),i},sU=class extends jP{get name(){return`placeholder`}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(e,t)=>({...this.options,empty:gM(t.doc,{ignoreAttributes:!0})}),apply:(e,t,n,r)=>cU({pluginState:t,tr:e,extension:this,state:r})},props:{decorations:e=>lU({state:e,extension:this})}}}onSetOptions(e){let{changes:t}=e;t.placeholder.changed&&this.store.phase>=jC.EditorView&&this.store.updateAttributes()}};sU=oU([BP({defaultOptions:{emptyNodeClass:RI.IS_EMPTY,placeholder:``}})],sU);function cU(e){let{pluginState:t,extension:n,tr:r,state:i}=e;return r.docChanged?{...n.options,empty:gM(i.doc)}:t}function lU(e){let{extension:t,state:n}=e,{empty:r}=t.pluginKey.getState(n),{emptyNodeClass:i,placeholder:a}=t.options;if(!r)return null;let o=[];return n.doc.descendants((e,t)=>{let n=ej.node(t,t+e.nodeSize,{class:i,"data-placeholder":a});o.push(n)}),rj.create(n.doc,o)}var uU=Object.defineProperty,dU=Object.getOwnPropertyDescriptor,fU=(e,t,n,r)=>{for(var i=r>1?void 0:r?dU(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&uU(t,n,i),i},pU=class extends NP{get name(){return`text`}createTags(){return[DC.InlineNode]}createNodeSpec(){return{}}};pU=fU([BP({disableExtraAttributes:!0,defaultPriority:AC.Medium})],pU);var mU={...Mz.defaultOptions,...rU.defaultOptions,...oB.defaultOptions,excludeExtensions:[]};function hU(e={}){e={...mU,...e};let{content:t,depth:n,getDispatch:r,getState:i,newGroupDelay:a,excludeExtensions:o}=e,s={};for(let e of o??[])s[e]=!0;let c=[];if(!s.history){let e=new oB({depth:n,getDispatch:r,getState:i,newGroupDelay:a});c.push(e)}return s.doc||c.push(new Mz({content:t})),s.text||c.push(new pU),s.paragraph||c.push(new rU),s.positioner||c.push(new WR),s.gapCursor||c.push(new nB),s.events||c.push(new Vz),c}var gU=Object.defineProperty,_U=Object.getOwnPropertyDescriptor,vU=(e,t,n,r)=>{for(var i=r>1?void 0:r?_U(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&gU(t,n,i),i},yU=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},Q=(e,t,n)=>(yU(e,t,`read from private field`),n?n.call(e):t.get(e)),bU=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},xU=(e,t,n,r)=>(yU(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),SU,CU=class{constructor(){this.portals=new Map,bU(this,SU,hP()),this.on=e=>Q(this,SU).on(`update`,e),this.once=e=>{let t=Q(this,SU).on(`update`,n=>{t(),e(n)});return t}}update(){Q(this,SU).emit(`update`,this.portals)}render({Component:e,container:t}){let n=this.portals.get(t);this.portals.set(t,{Component:e,key:n?.key??dw()}),this.update()}forceUpdate(){for(let[e,{Component:t}]of this.portals)this.portals.set(e,{Component:t,key:dw()})}remove(e){this.portals.delete(e),this.update()}};SU=new WeakMap;var wU=e=>{let{portals:t}=e;return f.default.createElement(f.default.Fragment,null,t.map(([e,{Component:t,key:n}])=>(0,m.createPortal)(f.default.createElement(t,null),e,n)))};function TU(e){let[t,n]=(0,f.useState)(()=>Array.from(e.portals.entries()));return(0,f.useEffect)(()=>e.on(e=>{n(Array.from(e.entries()))}),[e]),(0,f.useMemo)(()=>t,[t])}var EU,DU,OU,kU,AU,jU,MU,NU,PU,FU,IU,LU,RU=class{constructor({getPosition:e,node:t,portalContainer:n,view:r,ReactComponent:i,options:a}){bU(this,EU,void 0),bU(this,DU,[]),bU(this,OU,void 0),bU(this,kU,void 0),bU(this,AU,void 0),bU(this,jU,void 0),bU(this,MU,void 0),bU(this,NU,!1),bU(this,PU,void 0),bU(this,FU,void 0),bU(this,IU,void 0),bU(this,LU,e=>{e&&(W(Q(this,FU),{code:H.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${Q(this,EU).type.name}' which doesn't support content.`}),e.append(Q(this,FU)))}),this.Component=()=>{let e=Q(this,AU);return W(e,{code:H.REACT_NODE_VIEW,message:`The custom react node view provided for ${Q(this,EU).type.name} doesn't have a valid ReactComponent`}),f.default.createElement(e,{updateAttributes:this.updateAttributes,selected:this.selected,view:Q(this,OU),getPosition:Q(this,jU),node:Q(this,EU),forwardRef:Q(this,LU),decorations:Q(this,DU)})},this.updateAttributes=e=>{if(!Q(this,OU).editable)return;let t=Q(this,jU).call(this);if(t==null)return;let n=Q(this,OU).state.tr.setNodeMarkup(t,void 0,{...Q(this,EU).attrs,...e});Q(this,OU).dispatch(n)},W(tw(e),{message:`You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration.`}),xU(this,EU,t),xU(this,OU,r),xU(this,kU,n),xU(this,AU,i),xU(this,jU,e),xU(this,MU,a),xU(this,IU,this.createDom());let{contentDOM:o,wrapper:s}=this.createContentDom()??{};xU(this,PU,o??void 0),xU(this,FU,s),Q(this,FU)&&Q(this,IU).append(Q(this,FU)),this.setDomAttributes(Q(this,EU),Q(this,IU)),this.Component.displayName=IC(`${Q(this,EU).type.name}NodeView`),this.renderComponent()}static create(e){let{portalContainer:t,ReactComponent:n,options:r}=e;return(e,i,a)=>new RU({options:r,node:e,view:i,getPosition:a,portalContainer:t,ReactComponent:n})}get selected(){return Q(this,NU)}get contentDOM(){return Q(this,PU)}get dom(){return Q(this,IU)}renderComponent(){Q(this,kU).render({Component:this.Component,container:Q(this,IU)})}createDom(){let{defaultBlockNode:e,defaultInlineNode:t}=Q(this,MU),n=Q(this,EU).isInline?document.createElement(t):document.createElement(e);return n.classList.add(`${LC(Q(this,EU).type.name)}-node-view-wrapper`),n}createContentDom(){var e,t;if(Q(this,EU).isLeaf)return;let n=(t=(e=Q(this,EU).type.spec).toDOM)?.call(e,Q(this,EU));if(!n)return;let{contentDOM:r,dom:i}=KT.renderSpec(document,n),a;if(Jj(i))return a=i,i===r&&(a=document.createElement(`span`),a.classList.add(`${LC(Q(this,EU).type.name)}-node-view-content-wrapper`),a.append(r)),Jj(r),{wrapper:a,contentDOM:r}}update(e,t){return Yj({types:Q(this,EU).type,node:e})?Q(this,EU)===e&&Q(this,DU)===t?!0:(Q(this,EU).sameMarkup(e)||this.setDomAttributes(e,Q(this,IU)),xU(this,EU,e),xU(this,DU,t),this.renderComponent(),!0):!1}setDomAttributes(e,t){let{toDOM:n}=Q(this,EU).type.spec,r=e.attrs;if(n){let t=n(e);if($C(t)||BU(t))return;nw(t[1])&&(r=t[1])}for(let[e,n]of WC(r))t.setAttribute(e,n)}selectNode(){xU(this,NU,!0),Q(this,IU)&&Q(this,IU).classList.add(CC),this.renderComponent()}deselectNode(){xU(this,NU,!1),Q(this,IU)&&Q(this,IU).classList.remove(CC),this.renderComponent()}destroy(){Q(this,kU).remove(Q(this,IU))}ignoreMutation(e){return e.type===`selection`?!Q(this,EU).type.spec.selectable:Q(this,FU)?!Q(this,FU).contains(e.target):!0}stopEvent(e){var t;if(!Q(this,IU))return!1;if(tw(Q(this,MU).stopEvent))return Q(this,MU).stopEvent({event:e});let n=e.target,r=Q(this,IU).contains(n)&&!(t=this.contentDOM)?.contains(n);if(!r)return!1;let i=e.type===`drop`,a=[`INPUT`,`BUTTON`,`SELECT`,`TEXTAREA`].includes(n.tagName)||n.isContentEditable;if(a&&!i)return!0;let o=!!Q(this,EU).type.spec.draggable,s=mD.isSelectable(Q(this,EU)),c=e.type===`copy`,l=e.type===`paste`,u=e.type===`cut`,d=e.type===`mousedown`,f=e.type.startsWith(`drag`);return!o&&s&&f&&e.preventDefault(),!(f||i||c||l||u||d&&s)}},zU=RU;EU=new WeakMap,DU=new WeakMap,OU=new WeakMap,kU=new WeakMap,AU=new WeakMap,jU=new WeakMap,MU=new WeakMap,NU=new WeakMap,PU=new WeakMap,FU=new WeakMap,IU=new WeakMap,LU=new WeakMap;function BU(e){return qj(e)||nw(e)&&qj(e.dom)}var VU=class extends jP{constructor(){super(...arguments),this.portalContainer=new CU}get name(){return`reactComponent`}onCreate(){this.store.setStoreKey(`portalContainer`,this.portalContainer)}createNodeViews(){let e=U(),t=this.store.managerSettings.nodeViewComponents??{};for(let t of this.store.extensions){if(!t.ReactComponent||!RP(t)||t.reactComponentEnvironment===`ssr`)continue;e[t.name]=zU.create({options:this.options,ReactComponent:t.ReactComponent,portalContainer:this.portalContainer})}let n=WC({...this.options.nodeViewComponents,...t});for(let[t,r]of n)e[t]=zU.create({options:this.options,ReactComponent:r,portalContainer:this.portalContainer});return e}};VU=vU([BP({defaultOptions:{defaultBlockNode:`div`,defaultInlineNode:`span`,defaultContentNode:`span`,defaultEnvironment:`both`,nodeViewComponents:{},stopEvent:null},staticKeys:[`defaultBlockNode`,`defaultInlineNode`,`defaultContentNode`,`defaultEnvironment`]})],VU);var HU=Object.defineProperty,UU=Object.getOwnPropertySymbols,WU=Object.prototype.hasOwnProperty,GU=Object.prototype.propertyIsEnumerable,KU=(e,t,n)=>t in e?HU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qU=(e,t)=>{for(var n in t||={})WU.call(t,n)&&KU(e,n,t[n]);if(UU)for(var n of UU(t))GU.call(t,n)&&KU(e,n,t[n]);return e};function JU(e){let t=(0,f.createContext)(null),n=YU(t),r=n=>{let r=e(n);return f.default.createElement(t.Provider,{value:r},n.children)};return[r,n,t]}function YU(e){return(t,n)=>{let r=(0,f.useContext)(e),i=XU(r);if(!r)throw Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!t)return r;if(typeof t!=`function`)throw TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");let a=t(r);if(!i||!n)return a;let o=t(i);return n(o,a)?o:a}}function XU(e){let t=(0,f.useRef)();return ZU(()=>{t.current=e}),t.current}var ZU=typeof document<`u`?f.useLayoutEffect:f.useEffect;function QU(e,t){return JU(n=>{let r=(0,f.useRef)(null),i=(0,f.useRef)(),a=t?.(n),[o,s]=(0,f.useState)(()=>e({get:$U(r),set:eW(i),previousContext:void 0,props:n,state:a})),c=[...Object.values(n),a];return(0,f.useEffect)(()=>{c.length!==0&&s(t=>e({get:$U(r),set:eW(i),previousContext:t,props:n,state:a}))},c),r.current=o,i.current=s,o})}function $U(e){return t=>{if(!e.current)throw Error("`get` called outside of function scope. `get` can only be called within a function.");if(!t)return e.current;if(typeof t!=`function`)throw TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return t(e.current)}}function eW(e){return t=>{if(!e.current)throw Error("`set` called outside of function scope. `set` can only be called within a function.");e.current(e=>qU(qU({},e),typeof t==`function`?t(e):t))}}var tW=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0});var t;(function(e){e.MalformedUnicode=`MALFORMED_UNICODE`,e.MalformedHexadecimal=`MALFORMED_HEXADECIMAL`,e.CodePointLimit=`CODE_POINT_LIMIT`,e.OctalDeprecation=`OCTAL_DEPRECATION`,e.EndOfString=`END_OF_STRING`})(t=exports.ErrorType||={}),exports.errorMessages=new Map([[t.MalformedUnicode,`malformed Unicode character escape sequence`],[t.MalformedHexadecimal,`malformed hexadecimal character escape sequence`],[t.CodePointLimit,`Unicode codepoint must not be greater than 0x10FFFF in escape sequence`],[t.OctalDeprecation,`"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead`],[t.EndOfString,`malformed escape sequence at end of string`]])})),nW=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.unraw=exports.errorMessages=exports.ErrorType=void 0;let t=tW();Object.defineProperty(exports,`ErrorType`,{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(exports,`errorMessages`,{enumerable:!0,get:function(){return t.errorMessages}});function n(e){let t=!e.match(/[^a-f0-9]/i);return t?parseInt(e,16):NaN}function r(e,r,i){let a=n(e);if(Number.isNaN(a)||i!==void 0&&i!==e.length)throw SyntaxError(t.errorMessages.get(r));return a}function i(e){let n=r(e,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(n)}function a(e,n){let i=r(e,t.ErrorType.MalformedUnicode,4);if(n!==void 0){let e=r(n,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(i,e)}return String.fromCharCode(i)}function o(e){return e.charAt(0)===`{`&&e.charAt(e.length-1)===`}`}function s(e){if(!o(e))throw SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));let n=e.slice(1,-1),i=r(n,t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(i)}catch(e){throw e instanceof RangeError?SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):e}}function c(e,n=!1){if(n)throw SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));let r=parseInt(e,8);return String.fromCharCode(r)}let l=new Map([[`b`,`\b`],[`f`,`\f`],[`n`,`
|
|
329
|
+
`],[`r`,`\r`],[`t`,` `],[`v`,`\v`],[`0`,`\0`]]);function u(e){return l.get(e)||e}let d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function f(e,n=!1){return e.replace(d,function(e,r,o,l,d,f,p,m,h){if(r!==void 0)return`\\`;if(o!==void 0)return i(o);if(l!==void 0)return s(l);if(d!==void 0)return a(d,f);if(p!==void 0)return a(p);if(m===`0`)return`\0`;if(m!==void 0)return c(m,!n);if(h!==void 0)return u(h);throw SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))})}exports.unraw=f,exports.default=f})),rW=s(((exports,t)=>{(function(e,n){typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.moo=n()})(exports,function(){var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=typeof RegExp().sticky==`boolean`;function r(e){return e&&t.call(e)===`[object RegExp]`}function i(e){return e&&typeof e==`object`&&!r(e)&&!Array.isArray(e)}function a(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function o(e){var t=RegExp(`|`+e);return t.exec(``).length-1}function s(e){return`(`+e+`)`}function c(e){if(!e.length)return`(?!)`;var t=e.map(function(e){return`(?:`+e+`)`}).join(`|`);return`(?:`+t+`)`}function l(e){if(typeof e==`string`)return`(?:`+a(e)+`)`;if(r(e)){if(e.ignoreCase)throw Error(`RegExp /i flag not allowed`);if(e.global)throw Error(`RegExp /g flag is implied`);if(e.sticky)throw Error(`RegExp /y flag is implied`);if(e.multiline)throw Error(`RegExp /m flag is implied`);return e.source}else throw Error(`Not a pattern: `+e)}function u(e,t){return e.length>t?e:Array(t-e.length+1).join(` `)+e}function d(e,t){for(var n=e.length,r=0;;){var i=e.lastIndexOf(`
|
|
330
|
+
`,n-1);if(i===-1||(r++,n=i,r===t)||n===0)break}var a=r<t?0:n+1;return e.substring(a).split(`
|
|
331
|
+
`)}function f(e){for(var t=Object.getOwnPropertyNames(e),n=[],r=0;r<t.length;r++){var a=t[r],o=e[a],s=[].concat(o);if(a===`include`){for(var c=0;c<s.length;c++)n.push({include:s[c]});continue}var l=[];s.forEach(function(e){i(e)?(l.length&&n.push(m(a,l)),n.push(m(a,e)),l=[]):l.push(e)}),l.length&&n.push(m(a,l))}return n}function p(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(r.include){for(var i=[].concat(r.include),a=0;a<i.length;a++)t.push({include:i[a]});continue}if(!r.type)throw Error(`Rule has no type: `+JSON.stringify(r));t.push(m(r.type,r))}return t}function m(t,n){if(i(n)||(n={match:n}),n.include)throw Error(`Matching rules cannot also include states`);var a={defaultType:t,lineBreaks:!!n.error||!!n.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var o in n)e.call(n,o)&&(a[o]=n[o]);if(typeof a.type==`string`&&t!==a.type)throw Error(`Type transform cannot be a string (type '`+a.type+`' for token '`+t+`')`);var s=a.match;return a.match=Array.isArray(s)?s:s?[s]:[],a.match.sort(function(e,t){return r(e)&&r(t)?0:r(t)?-1:r(e)?1:t.length-e.length}),a}function h(e){return Array.isArray(e)?p(e):f(e)}var g=m(`error`,{lineBreaks:!0,shouldThrow:!0});function _(e,t){for(var i=null,a=Object.create(null),u=!0,d=null,f=[],p=[],m=0;m<e.length;m++)e[m].fallback&&(u=!1);for(var m=0;m<e.length;m++){var h=e[m];if(h.include)throw Error(`Inheritance is not allowed in stateless lexers`);if(h.error||h.fallback){if(i)throw!h.fallback==!i.fallback?Error(`Multiple `+(h.fallback?`fallback`:`error`)+` rules not allowed (for token '`+h.defaultType+`')`):Error(`fallback and error are mutually exclusive (for token '`+h.defaultType+`')`);i=h}var _=h.match.slice();if(u)for(;_.length&&typeof _[0]==`string`&&_[0].length===1;){var v=_.shift();a[v.charCodeAt(0)]=h}if(h.pop||h.push||h.next){if(!t)throw Error(`State-switching options are not allowed in stateless lexers (for token '`+h.defaultType+`')`);if(h.fallback)throw Error(`State-switching options are not allowed on fallback tokens (for token '`+h.defaultType+`')`)}if(_.length!==0){u=!1,f.push(h);for(var y=0;y<_.length;y++){var b=_[y];if(r(b)){if(d===null)d=b.unicode;else if(d!==b.unicode&&h.fallback===!1)throw Error(`If one rule is /u then all must be`)}}var x=c(_.map(l)),S=new RegExp(x);if(S.test(``))throw Error(`RegExp matches empty string: `+S);var C=o(x);if(C>0)throw Error(`RegExp has capture groups: `+S+`
|
|
332
|
+
Use (?: … ) instead`);if(!h.lineBreaks&&S.test(`
|
|
333
|
+
`))throw Error(`Rule should declare lineBreaks: `+S);p.push(s(x))}}var w=i&&i.fallback,T=n&&!w?`ym`:`gm`,E=n||w?``:`|`;d===!0&&(T+=`u`);var D=new RegExp(c(p)+E,T);return{regexp:D,groups:f,fast:a,error:i||g}}function v(e){var t=_(h(e));return new S({start:t},`start`)}function y(e,t,n){var r=e&&(e.push||e.next);if(r&&!n[r])throw Error(`Missing state '`+r+`' (in token '`+e.defaultType+`' of state '`+t+`')`);if(e&&e.pop&&+e.pop!=1)throw Error(`pop must be 1 (in token '`+e.defaultType+`' of state '`+t+`')`)}function b(e,t){var n=e.$all?h(e.$all):[];delete e.$all;var r=Object.getOwnPropertyNames(e);t||=r[0];for(var i=Object.create(null),a=0;a<r.length;a++){var o=r[a];i[o]=h(e[o]).concat(n)}for(var a=0;a<r.length;a++)for(var o=r[a],s=i[o],c=Object.create(null),l=0;l<s.length;l++){var u=s[l];if(u.include){var d=[l,1];if(u.include!==o&&!c[u.include]){c[u.include]=!0;var f=i[u.include];if(!f)throw Error(`Cannot include nonexistent state '`+u.include+`' (in state '`+o+`')`);for(var p=0;p<f.length;p++){var m=f[p];s.indexOf(m)===-1&&d.push(m)}}s.splice.apply(s,d),l--}}for(var g=Object.create(null),a=0;a<r.length;a++){var o=r[a];g[o]=_(i[o],!0)}for(var a=0;a<r.length;a++){for(var v=r[a],b=g[v],x=b.groups,l=0;l<x.length;l++)y(x[l],v,g);for(var C=Object.getOwnPropertyNames(b.fast),l=0;l<C.length;l++)y(b.fast[C[l]],v,g)}return new S(g,t)}function x(e){for(var t=typeof Map<`u`,n=t?new Map:Object.create(null),r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var a=r[i],o=e[a],s=Array.isArray(o)?o:[o];s.forEach(function(e){if(typeof e!=`string`)throw Error(`keyword must be string (in keyword '`+a+`')`);t?n.set(e,a):n[e]=a})}return function(e){return t?n.get(e):n[e]}}var S=function(e,t){this.startState=t,this.states=e,this.buffer=``,this.stack=[],this.reset()};S.prototype.reset=function(e,t){return this.buffer=e||``,this.index=0,this.line=t?t.line:1,this.col=t?t.col:1,this.queuedToken=t?t.queuedToken:null,this.queuedText=t?t.queuedText:``,this.queuedThrow=t?t.queuedThrow:null,this.setState(t?t.state:this.startState),this.stack=t&&t.stack?t.stack.slice():[],this},S.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},S.prototype.setState=function(e){if(!(!e||this.state===e)){this.state=e;var t=this.states[e];this.groups=t.groups,this.error=t.error,this.re=t.regexp,this.fast=t.fast}},S.prototype.popState=function(){this.setState(this.stack.pop())},S.prototype.pushState=function(e){this.stack.push(this.state),this.setState(e)};var C=n?function(e,t){return e.exec(t)}:function(e,t){var n=e.exec(t);return n[0].length===0?null:n};S.prototype._getGroup=function(e){for(var t=this.groups.length,n=0;n<t;n++)if(e[n+1]!==void 0)return this.groups[n];throw Error(`Cannot find token type for matched text`)};function w(){return this.value}if(S.prototype.next=function(){var e=this.index;if(this.queuedGroup){var t=this._token(this.queuedGroup,this.queuedText,e);return this.queuedGroup=null,this.queuedText=``,t}var n=this.buffer;if(e!==n.length){var r=this.fast[n.charCodeAt(e)];if(r)return this._token(r,n.charAt(e),e);var i=this.re;i.lastIndex=e;var a=C(i,n),o=this.error;if(a==null)return this._token(o,n.slice(e,n.length),e);var r=this._getGroup(a),s=a[0];return o.fallback&&a.index!==e?(this.queuedGroup=r,this.queuedText=s,this._token(o,n.slice(e,a.index),e)):this._token(r,s,e)}},S.prototype._token=function(e,t,n){var r=0;if(e.lineBreaks){var i=/\n/g,a=1;if(t===`
|
|
334
|
+
`)r=1;else for(;i.exec(t);)r++,a=i.lastIndex}var o={type:typeof e.type==`function`&&e.type(t)||e.defaultType,value:typeof e.value==`function`?e.value(t):t,text:t,toString:w,offset:n,lineBreaks:r,line:this.line,col:this.col},s=t.length;if(this.index+=s,this.line+=r,r===0?this.col+=s:this.col=s-a+1,e.shouldThrow){var c=Error(this.formatError(o,`invalid syntax`));throw c}return e.pop?this.popState():e.push?this.pushState(e.push):e.next&&this.setState(e.next),o},typeof Symbol<`u`&&Symbol.iterator){var T=function(e){this.lexer=e};T.prototype.next=function(){var e=this.lexer.next();return{value:e,done:!e}},T.prototype[Symbol.iterator]=function(){return this},S.prototype[Symbol.iterator]=function(){return new T(this)}}return S.prototype.formatError=function(e,t){if(e==null)var n=this.buffer.slice(this.index),e={text:n,offset:this.index,lineBreaks:n.indexOf(`
|
|
335
|
+
`)===-1?0:1,line:this.line,col:this.col};var r=2,i=Math.max(e.line-r,1),a=e.line+r,o=String(a).length,s=d(this.buffer,this.line-e.line+r+1).slice(0,5),c=[];c.push(t+` at line `+e.line+` col `+e.col+`:`),c.push(``);for(var l=0;l<s.length;l++){var f=s[l],p=i+l;c.push(u(String(p),o)+` `+f),p===e.line&&c.push(u(``,o+e.col+1)+`^`)}return c.join(`
|
|
336
|
+
`)},S.prototype.clone=function(){return new S(this.states,this.state)},S.prototype.has=function(e){return!0},{compile:v,states:b,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:x}})})),iW=s((exports=>{var t=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,`__esModule`,{value:!0});let n=t(rW());exports.states={body:{doubleapos:{match:`''`,value:()=>`'`},quoted:{lineBreaks:!0,match:/'[{}#](?:[^']|'')*'(?!')/u,value:e=>e.slice(1,-1).replace(/''/g,`'`)},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:`arg`,value:e=>e.substring(1).trim()},octothorpe:`#`,end:{match:`}`,pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:`select`,value:e=>e.split(`,`)[1].trim()},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:`body`,value:e=>e.split(`,`)[1].trim()},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:e=>e.substring(1).trim()},end:{match:`}`,pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:e=>e.split(`:`)[1].trim()},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:`body`,value:e=>e.substring(0,e.indexOf(`{`)).trim()},end:{match:/\s*\}/u,pop:1}}},exports.lexer=n.default.states(exports.states)})),aW=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.parse=l;let t=iW(),n=e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),r=e=>e===`plural`||e===`select`||e===`selectordinal`;function i(e,t){let n=``,r=``;for(let i of t){let t=i.ctx.text;switch(r+=t,i.type){case`content`:n+=i.value;break;case`argument`:case`function`:case`octothorpe`:n+=t;break;default:throw new s(e,`Unsupported part in strict mode function arg style: ${t}`)}}let i={type:`content`,value:n.trim(),ctx:Object.assign({},t[0].ctx,{text:r})};return[i]}let a=[`number`,`date`,`time`,`spellout`,`ordinal`,`duration`],o=[`zero`,`one`,`two`,`few`,`many`,`other`];var s=class extends Error{constructor(e,n){super(t.lexer.formatError(e,n))}},c=class{constructor(e,n){var r,i,a,s;this.lexer=t.lexer.reset(e),this.cardinalKeys=(r=n?.cardinal)??o,this.ordinalKeys=(i=n?.ordinal)??o,this.strict=(a=n?.strict)??!1,this.strictPluralKeys=(s=n?.strictPluralKeys)??!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(e,t,n){if(n[0]===`=`){if(t===`select`)throw new s(e,`The case ${n} is not valid with select`)}else if(t!==`select`){let r=t===`plural`?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&r.length>0&&!r.includes(n)){let r=`The ${t} case ${n} is not valid in this locale`;throw new s(e,r)}}}parseSelect({value:e},t,r,i){let a={type:i,arg:e,cases:[],ctx:r};i===`plural`||i===`selectordinal`?t=!0:this.strict&&(t=!1);for(let e of this.lexer)switch(e.type){case`offset`:if(i===`select`)throw new s(e,`Unexpected plural offset for select`);if(a.cases.length>0)throw new s(e,`Plural offset must be set before cases`);a.pluralOffset=Number(e.value),r.text+=e.text,r.lineBreaks+=e.lineBreaks;break;case`case`:this.checkSelectKey(e,i,e.value),a.cases.push({key:e.value,tokens:this.parseBody(t),ctx:n(e)});break;case`end`:return a;default:throw new s(e,`Unexpected lexer token: ${e.type}`)}throw new s(null,`Unexpected message end`)}parseArgToken(e,t){let o=n(e),c=this.lexer.next();if(!c)throw new s(null,`Unexpected message end`);if(o.text+=c.text,o.lineBreaks+=c.lineBreaks,this.strict&&(c.type===`func-simple`||c.type===`func-args`)&&!a.includes(c.value)){let t=`Invalid strict mode function arg type: ${c.value}`;throw new s(e,t)}switch(c.type){case`end`:return{type:`argument`,arg:e.value,ctx:o};case`func-simple`:{let t=this.lexer.next();if(!t)throw new s(null,`Unexpected message end`);if(t.type!==`end`)throw new s(t,`Unexpected lexer token: ${t.type}`);if(o.text+=t.text,r(c.value.toLowerCase()))throw new s(c,`Invalid type identifier: ${c.value}`);return{type:`function`,arg:e.value,key:c.value,ctx:o}}case`func-args`:{if(r(c.value.toLowerCase())){let e=`Invalid type identifier: ${c.value}`;throw new s(c,e)}let n=this.parseBody(this.strict?!1:t);return this.strict&&n.length>0&&(n=i(e,n)),{type:`function`,arg:e.value,key:c.value,param:n,ctx:o}}case`select`:if(r(c.value))return this.parseSelect(e,t,o,c.value);throw new s(c,`Unexpected select type ${c.value}`);default:throw new s(c,`Unexpected lexer token: ${c.type}`)}}parseBody(e,t){let r=[],i=null;for(let a of this.lexer)if(a.type===`argument`)i&&=null,r.push(this.parseArgToken(a,e));else if(a.type===`octothorpe`&&e)i&&=null,r.push({type:`octothorpe`,ctx:n(a)});else if(a.type===`end`&&!t)return r;else{let t=a.value;if(!e&&a.type===`quoted`&&t[0]===`#`){if(t.includes(`{`)){let e=`Unsupported escape pattern: ${t}`;throw new s(a,e)}t=a.text}i?(i.value+=t,i.ctx.text+=a.text,i.ctx.lineBreaks+=a.lineBreaks):(i={type:`content`,value:t,ctx:n(a)},r.push(i))}if(t)return r;throw new s(null,`Unexpected message end`)}};function l(e,t={}){let n=new c(e,t);return n.parse()}})),oW=u(aW(),1);function sW(e,t){return e.filter(e=>e.type!==`content`).length?e.map(e=>{if(e.type===`content`)return t(e.value);if(e.type===`octothorpe`)return`#`;if(e.type===`argument`)return[e.arg];if(e.type===`function`){let t=e?.param?.[0];return t?[e.arg,e.key,t.value.trim()]:[e.arg,e.key]}let n=e.pluralOffset,r={};return e.cases.forEach(({key:e,tokens:n})=>{let i=e[0]===`=`?e.slice(1):e;r[i]=sW(n,t)}),[e.arg,e.type,{offset:n,...r}]}):e.map(e=>t(e.value)).join(``)}function cW(e,t=e=>e){try{return sW((0,oW.parse)(e),t)}catch(t){return console.error(`${t.message}
|
|
337
|
+
|
|
338
|
+
Message: ${e}`),e}}var lW=u(nW(),1);const uW=e=>typeof e==`string`,dW=e=>typeof e==`function`,fW=new Map,xfe=`en`;function pW(e){let t=Array.isArray(e)?e:[e];return[...t,`en`]}function mW(e,t,n){let r=pW(e),i=_W(()=>vW(`date`,r,n),()=>new Intl.DateTimeFormat(r,n));return i.format(uW(t)?new Date(t):t)}function hW(e,t,n){let r=pW(e),i=_W(()=>vW(`number`,r,n),()=>new Intl.NumberFormat(r,n));return i.format(t)}function gW(e,t,n,{offset:r=0,...i}){let a=pW(e),o=t?_W(()=>vW(`plural-ordinal`,a),()=>new Intl.PluralRules(a,{type:`ordinal`})):_W(()=>vW(`plural-cardinal`,a),()=>new Intl.PluralRules(a,{type:`cardinal`}));return i[n]??i[o.select(n-r)]??i.other}function _W(e,t){let n=e(),r=fW.get(n);return r||(r=t(),fW.set(n,r)),r}function vW(e,t,n){let r=t.join(`-`);return`${e}-${r}-${JSON.stringify(n)}`}const yW=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,bW=`%__lingui_octothorpe__%`,xW=(e,t,n={})=>{let r=t||e,i=e=>typeof e==`object`?e:n[e]||{style:e},a=(e,t)=>{let a=Object.keys(n).length?i(`number`):void 0,o=hW(r,e,a);return t.replace(new RegExp(bW,`g`),o)};return{plural:(e,t)=>{let{offset:n=0}=t,i=gW(r,!1,e,t);return a(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=gW(r,!0,e,t);return a(e-n,i)},select:SW,number:(e,t)=>hW(r,e,i(t)),date:(e,t)=>mW(r,e,i(t))}},SW=(e,t)=>t[e]??t.other;function CW(e,t,n){return(r={},i)=>{let a=xW(t,n,i),o=(e,t=!1)=>Array.isArray(e)?e.reduce((e,n)=>{if(n===`#`&&t)return e+bW;if(uW(n))return e+n;let[i,s,c]=n,l={};s===`plural`||s===`selectordinal`||s===`select`?Object.entries(c).forEach(([e,t])=>{l[e]=o(t,s===`plural`||s===`selectordinal`)}):l=c;let u;if(s){let e=a[s];u=e(r[i],l)}else u=r[i];return u==null?e:e+u},``):e,s=o(e);return uW(s)&&yW.test(s)?(0,lW.unraw)(s.trim()):uW(s)?s.trim():s?String(s):``}}var wW=Object.defineProperty,TW=(e,t,n)=>t in e?wW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EW=(e,t,n)=>(TW(e,typeof t==`symbol`?t:t+``,n),n),DW=class{constructor(){EW(this,`_events`,{})}on(e,t){var n;return(n=this._events)[e]??(n[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){let n=this._getListeners(e);if(!n)return;let r=n.indexOf(t);~r&&n.splice(r,1)}emit(e,...t){let n=this._getListeners(e);n&&n.map(e=>e.apply(this,t))}_getListeners(e){let t=this._events[e];return Array.isArray(t)?t:!1}},OW=Object.defineProperty,kW=(e,t,n)=>t in e?OW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AW=(e,t,n)=>(kW(e,typeof t==`symbol`?t:t+``,n),n),jW=class extends DW{constructor(e){super(),AW(this,`_locale`,``),AW(this,`_locales`),AW(this,`_localeData`,{}),AW(this,`_messages`,{}),AW(this,`_missing`),AW(this,`t`,this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale==`string`||e.locales)&&this.activate(e.locale??`en`,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){let n=this._localeData[e];n?Object.assign(n,t):this._localeData[e]=t}loadLocaleData(e,t){t==null?Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])):this._loadLocaleData(e,t),this.emit(`change`)}_load(e,t){let n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}load(e,t){typeof e==`string`&&typeof t==`object`?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit(`change`)}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit(`change`)}activate(e,t){process.env.NODE_ENV!==`production`&&(this._messages[e]||console.warn(`Messages for locale "${e}" not loaded.`)),this._locale=e,this._locales=t,this.emit(`change`)}_(e,t,n){let r=n?.message;e||=``,uW(e)||(t=e.values||t,r=e.message,e=e.id);let i=this.messages[e],a=i===void 0,o=this._missing;if(o&&a)return dW(o)?o(this._locale,e):o;a&&this.emit(`missing`,{id:e,locale:this._locale});let s=i||r||e;return process.env.NODE_ENV!==`production`&&(s=uW(s)?cW(s):s),uW(s)&&yW.test(s)?JSON.parse(`"${s}"`):uW(s)?s:CW(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return mW(this._locales||this._locale,e,t)}number(e,t){return hW(this._locales||this._locale,e,t)}};function MW(e={}){return new jW(e)}const NW=MW();var PW={};c(PW,{_in:()=>zW,af:()=>BW,ak:()=>VW,am:()=>HW,an:()=>UW,ar:()=>WW,ars:()=>GW,as:()=>KW,asa:()=>qW,ast:()=>JW,az:()=>YW,be:()=>XW,bem:()=>ZW,bez:()=>QW,bg:()=>$W,bho:()=>eG,bm:()=>tG,bn:()=>nG,bo:()=>rG,br:()=>iG,brx:()=>aG,bs:()=>oG,ca:()=>sG,ce:()=>cG,ceb:()=>lG,cgg:()=>uG,chr:()=>dG,ckb:()=>fG,cs:()=>pG,cy:()=>mG,da:()=>hG,de:()=>gG,dsb:()=>_G,dv:()=>vG,dz:()=>yG,ee:()=>bG,el:()=>xG,en:()=>SG,eo:()=>CG,es:()=>wG,et:()=>TG,eu:()=>EG,fa:()=>DG,ff:()=>OG,fi:()=>kG,fil:()=>AG,fo:()=>jG,fr:()=>MG,fur:()=>NG,fy:()=>PG,ga:()=>FG,gd:()=>IG,gl:()=>LG,gsw:()=>RG,gu:()=>zG,guw:()=>BG,gv:()=>VG,ha:()=>HG,haw:()=>UG,he:()=>WG,hi:()=>GG,hr:()=>KG,hsb:()=>qG,hu:()=>JG,hy:()=>YG,ia:()=>XG,id:()=>ZG,ig:()=>QG,ii:()=>$G,io:()=>eK,is:()=>tK,it:()=>nK,iu:()=>rK,iw:()=>iK,ja:()=>aK,jbo:()=>oK,jgo:()=>sK,ji:()=>cK,jmc:()=>lK,jv:()=>uK,jw:()=>dK,ka:()=>fK,kab:()=>pK,kaj:()=>mK,kcg:()=>hK,kde:()=>gK,kea:()=>_K,kk:()=>vK,kkj:()=>yK,kl:()=>bK,km:()=>xK,kn:()=>SK,ko:()=>CK,ks:()=>wK,ksb:()=>TK,ksh:()=>EK,ku:()=>DK,kw:()=>OK,ky:()=>kK,lag:()=>AK,lb:()=>jK,lg:()=>MK,lkt:()=>NK,ln:()=>PK,lo:()=>FK,lt:()=>IK,lv:()=>LK,mas:()=>RK,mg:()=>zK,mgo:()=>BK,mk:()=>VK,ml:()=>HK,mn:()=>UK,mo:()=>WK,mr:()=>GK,ms:()=>KK,mt:()=>qK,my:()=>JK,nah:()=>YK,naq:()=>XK,nb:()=>ZK,nd:()=>QK,ne:()=>$K,nl:()=>eq,nn:()=>tq,nnh:()=>nq,no:()=>rq,nqo:()=>iq,nr:()=>aq,nso:()=>oq,ny:()=>sq,nyn:()=>cq,om:()=>lq,or:()=>uq,os:()=>dq,osa:()=>fq,pa:()=>pq,pap:()=>mq,pl:()=>hq,prg:()=>gq,ps:()=>_q,pt:()=>vq,pt_PT:()=>yq,rm:()=>bq,ro:()=>xq,rof:()=>Sq,root:()=>Cq,ru:()=>wq,rwk:()=>Tq,sah:()=>Eq,saq:()=>Dq,sc:()=>Oq,scn:()=>kq,sd:()=>Aq,sdh:()=>jq,se:()=>Mq,seh:()=>Nq,ses:()=>Pq,sg:()=>Fq,sh:()=>Iq,shi:()=>Lq,si:()=>Rq,sk:()=>zq,sl:()=>Bq,sma:()=>Vq,smi:()=>Hq,smj:()=>Uq,smn:()=>Wq,sms:()=>Gq,sn:()=>Kq,so:()=>qq,sq:()=>Jq,sr:()=>Yq,ss:()=>Xq,ssy:()=>Zq,st:()=>Qq,su:()=>$q,sv:()=>eJ,sw:()=>tJ,syr:()=>nJ,ta:()=>rJ,te:()=>iJ,teo:()=>aJ,th:()=>oJ,ti:()=>sJ,tig:()=>cJ,tk:()=>lJ,tl:()=>uJ,tn:()=>dJ,to:()=>fJ,tr:()=>pJ,ts:()=>mJ,tzm:()=>hJ,ug:()=>gJ,uk:()=>_J,ur:()=>vJ,uz:()=>yJ,ve:()=>bJ,vi:()=>xJ,vo:()=>SJ,vun:()=>CJ,wa:()=>wJ,wae:()=>TJ,wo:()=>EJ,xh:()=>DJ,xog:()=>OJ,yi:()=>kJ,yo:()=>AJ,yue:()=>jJ,zh:()=>MJ,zu:()=>NJ});function $(e,t){return t?`other`:e==1?`one`:`other`}function FW(e,t){return t?`other`:e==0||e==1?`one`:`other`}function IW(e,t){var n=String(e).split(`.`),r=!n[1];return t?`other`:e==1&&r?`one`:`other`}function LW(e,t){return`other`}function RW(e,t){return t?`other`:e==1?`one`:e==2?`two`:`other`}const zW=LW,BW=$,VW=FW;function HW(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}const UW=$;function WW(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-2);return t?`other`:e==0?`zero`:e==1?`one`:e==2?`two`:i>=3&&i<=10?`few`:i>=11&&i<=99?`many`:`other`}function GW(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-2);return t?`other`:e==0?`zero`:e==1?`one`:e==2?`two`:i>=3&&i<=10?`few`:i>=11&&i<=99?`many`:`other`}function KW(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e>=0&&e<=1?`one`:`other`}const qW=$,JW=IW;function YW(e,t){var n=String(e).split(`.`),r=n[0],i=r.slice(-1),a=r.slice(-2),o=r.slice(-3);return t?i==1||i==2||i==5||i==7||i==8||a==20||a==50||a==70||a==80?`one`:i==3||i==4||o==100||o==200||o==300||o==400||o==500||o==600||o==700||o==800||o==900?`few`:r==0||i==6||a==40||a==60||a==90?`many`:`other`:e==1?`one`:`other`}function XW(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return t?(i==2||i==3)&&a!=12&&a!=13?`few`:`other`:i==1&&a!=11?`one`:i>=2&&i<=4&&(a<12||a>14)?`few`:r&&i==0||i>=5&&i<=9||a>=11&&a<=14?`many`:`other`}const ZW=$,QW=$,$W=$,eG=FW,tG=LW;function nG(e,t){return t?e==1||e==5||e==7||e==8||e==9||e==10?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e>=0&&e<=1?`one`:`other`}const rG=LW;function iG(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1),a=r&&n[0].slice(-2),o=r&&n[0].slice(-6);return t?`other`:i==1&&a!=11&&a!=71&&a!=91?`one`:i==2&&a!=12&&a!=72&&a!=92?`two`:(i==3||i==4||i==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?`few`:e!=0&&r&&o==0?`many`:`other`}const aG=$;function oG(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:a&&o>=2&&o<=4&&(s<12||s>14)||c>=2&&c<=4&&(l<12||l>14)?`few`:`other`}function sG(e,t){var n=String(e).split(`.`),r=!n[1];return t?e==1||e==3?`one`:e==2?`two`:e==4?`few`:`other`:e==1&&r?`one`:`other`}const cG=$;function lG(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=i.slice(-1);return t?`other`:a&&(r==1||r==2||r==3)||a&&o!=4&&o!=6&&o!=9||!a&&s!=4&&s!=6&&s!=9?`one`:`other`}const uG=$,dG=$,fG=$;function pG(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1];return t?`other`:e==1&&i?`one`:r>=2&&r<=4&&i?`few`:i?`other`:`many`}function mG(e,t){return t?e==0||e==7||e==8||e==9?`zero`:e==1?`one`:e==2?`two`:e==3||e==4?`few`:e==5||e==6?`many`:`other`:e==0?`zero`:e==1?`one`:e==2?`two`:e==3?`few`:e==6?`many`:`other`}function hG(e,t){var n=String(e).split(`.`),r=n[0],i=Number(n[0])==e;return t?`other`:e==1||!i&&(r==0||r==1)?`one`:`other`}const gG=IW;function _G(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-2),s=i.slice(-2);return t?`other`:a&&o==1||s==1?`one`:a&&o==2||s==2?`two`:a&&(o==3||o==4)||s==3||s==4?`few`:`other`}const vG=$,yG=LW,bG=$,xG=$;function SG(e,t){var n=String(e).split(`.`),r=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1),o=i&&n[0].slice(-2);return t?a==1&&o!=11?`one`:a==2&&o!=12?`two`:a==3&&o!=13?`few`:`other`:e==1&&r?`one`:`other`}const CG=$,wG=$,TG=IW,EG=$;function DG(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}function OG(e,t){return t?`other`:e>=0&&e<2?`one`:`other`}const kG=IW;function AG(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=i.slice(-1);return t?e==1?`one`:`other`:a&&(r==1||r==2||r==3)||a&&o!=4&&o!=6&&o!=9||!a&&s!=4&&s!=6&&s!=9?`one`:`other`}const jG=$;function MG(e,t){return t?e==1?`one`:`other`:e>=0&&e<2?`one`:`other`}const NG=$,PG=IW;function FG(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?e==1?`one`:`other`:e==1?`one`:e==2?`two`:r&&e>=3&&e<=6?`few`:r&&e>=7&&e<=10?`many`:`other`}function IG(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?e==1||e==11?`one`:e==2||e==12?`two`:e==3||e==13?`few`:`other`:e==1||e==11?`one`:e==2||e==12?`two`:r&&e>=3&&e<=10||r&&e>=13&&e<=19?`few`:`other`}const LG=IW,RG=$;function zG(e,t){return t?e==1?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e>=0&&e<=1?`one`:`other`}const BG=FW;function VG(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=r.slice(-1),o=r.slice(-2);return t?`other`:i&&a==1?`one`:i&&a==2?`two`:i&&(o==0||o==20||o==40||o==60||o==80)?`few`:i?`other`:`many`}const HG=$,UG=$;function WG(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=Number(n[0])==e,o=a&&n[0].slice(-1);return t?`other`:e==1&&i?`one`:r==2&&i?`two`:i&&(e<0||e>10)&&a&&o==0?`many`:`other`}function GG(e,t){return t?e==1?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e>=0&&e<=1?`one`:`other`}function KG(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:a&&o>=2&&o<=4&&(s<12||s>14)||c>=2&&c<=4&&(l<12||l>14)?`few`:`other`}function qG(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-2),s=i.slice(-2);return t?`other`:a&&o==1||s==1?`one`:a&&o==2||s==2?`two`:a&&(o==3||o==4)||s==3||s==4?`few`:`other`}function JG(e,t){return t?e==1||e==5?`one`:`other`:e==1?`one`:`other`}function YG(e,t){return t?e==1?`one`:`other`:e>=0&&e<2?`one`:`other`}const XG=IW,ZG=LW,QG=LW,$G=LW,eK=IW;function tK(e,t){var n=String(e).split(`.`),r=n[0],i=Number(n[0])==e,a=r.slice(-1),o=r.slice(-2);return t?`other`:i&&a==1&&o!=11||!i?`one`:`other`}function nK(e,t){var n=String(e).split(`.`),r=!n[1];return t?e==11||e==8||e==80||e==800?`many`:`other`:e==1&&r?`one`:`other`}const rK=RW;function iK(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=Number(n[0])==e,o=a&&n[0].slice(-1);return t?`other`:e==1&&i?`one`:r==2&&i?`two`:i&&(e<0||e>10)&&a&&o==0?`many`:`other`}const aK=LW,oK=LW,sK=$,cK=IW,lK=$,uK=LW,dK=LW;function fK(e,t){var n=String(e).split(`.`),r=n[0],i=r.slice(-2);return t?r==1?`one`:r==0||i>=2&&i<=20||i==40||i==60||i==80?`many`:`other`:e==1?`one`:`other`}function pK(e,t){return t?`other`:e>=0&&e<2?`one`:`other`}const mK=$,hK=$,gK=LW,_K=LW;function vK(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?i==6||i==9||r&&i==0&&e!=0?`many`:`other`:e==1?`one`:`other`}const yK=$,bK=$,xK=LW;function SK(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}const CK=LW,wK=$,TK=$;function EK(e,t){return t?`other`:e==0?`zero`:e==1?`one`:`other`}const DK=$;function OK(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-2),a=r&&n[0].slice(-3),o=r&&n[0].slice(-5),s=r&&n[0].slice(-6);return t?r&&e>=1&&e<=4||i>=1&&i<=4||i>=21&&i<=24||i>=41&&i<=44||i>=61&&i<=64||i>=81&&i<=84?`one`:e==5||i==5?`many`:`other`:e==0?`zero`:e==1?`one`:i==2||i==22||i==42||i==62||i==82||r&&a==0&&(o>=1e3&&o<=2e4||o==4e4||o==6e4||o==8e4)||e!=0&&s==1e5?`two`:i==3||i==23||i==43||i==63||i==83?`few`:e!=1&&(i==1||i==21||i==41||i==61||i==81)?`many`:`other`}const kK=$;function AK(e,t){var n=String(e).split(`.`),r=n[0];return t?`other`:e==0?`zero`:(r==0||r==1)&&e!=0?`one`:`other`}const jK=$,MK=$,NK=LW,PK=FW;function FK(e,t){return t&&e==1?`one`:`other`}function IK(e,t){var n=String(e).split(`.`),r=n[1]||``,i=Number(n[0])==e,a=i&&n[0].slice(-1),o=i&&n[0].slice(-2);return t?`other`:a==1&&(o<11||o>19)?`one`:a>=2&&a<=9&&(o<11||o>19)?`few`:r==0?`other`:`many`}function LK(e,t){var n=String(e).split(`.`),r=n[1]||``,i=r.length,a=Number(n[0])==e,o=a&&n[0].slice(-1),s=a&&n[0].slice(-2),c=r.slice(-2),l=r.slice(-1);return t?`other`:a&&o==0||s>=11&&s<=19||i==2&&c>=11&&c<=19?`zero`:o==1&&s!=11||i==2&&l==1&&c!=11||i!=2&&l==1?`one`:`other`}const RK=$,zK=FW,BK=$;function VK(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?o==1&&s!=11?`one`:o==2&&s!=12?`two`:(o==7||o==8)&&s!=17&&s!=18?`many`:`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:`other`}const HK=$,UK=$;function WK(e,t){var n=String(e).split(`.`),r=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-2);return t?e==1?`one`:`other`:e==1&&r?`one`:!r||e==0||a>=2&&a<=19?`few`:`other`}function GK(e,t){return t?e==1?`one`:e==2||e==3?`two`:e==4?`few`:`other`:e==1?`one`:`other`}function KK(e,t){return t&&e==1?`one`:`other`}function qK(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-2);return t?`other`:e==1?`one`:e==0||i>=2&&i<=10?`few`:i>=11&&i<=19?`many`:`other`}const JK=LW,YK=$,XK=RW,ZK=$,QK=$;function $K(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?r&&e>=1&&e<=4?`one`:`other`:e==1?`one`:`other`}const eq=IW,tq=$,nq=$,rq=$,iq=LW,aq=$,oq=FW,sq=$,cq=$,lq=$;function uq(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?e==1||e==5||r&&e>=7&&e<=9?`one`:e==2||e==3?`two`:e==4?`few`:e==6?`many`:`other`:e==1?`one`:`other`}const dq=$,fq=LW,pq=FW,mq=$;function hq(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=r.slice(-1),o=r.slice(-2);return t?`other`:e==1&&i?`one`:i&&a>=2&&a<=4&&(o<12||o>14)?`few`:i&&r!=1&&(a==0||a==1)||i&&a>=5&&a<=9||i&&o>=12&&o<=14?`many`:`other`}function gq(e,t){var n=String(e).split(`.`),r=n[1]||``,i=r.length,a=Number(n[0])==e,o=a&&n[0].slice(-1),s=a&&n[0].slice(-2),c=r.slice(-2),l=r.slice(-1);return t?`other`:a&&o==0||s>=11&&s<=19||i==2&&c>=11&&c<=19?`zero`:o==1&&s!=11||i==2&&l==1&&c!=11||i!=2&&l==1?`one`:`other`}const _q=$;function vq(e,t){var n=String(e).split(`.`),r=n[0];return t?`other`:r==0||r==1?`one`:`other`}const yq=IW,bq=$;function xq(e,t){var n=String(e).split(`.`),r=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-2);return t?e==1?`one`:`other`:e==1&&r?`one`:!r||e==0||a>=2&&a<=19?`few`:`other`}const Sq=$,Cq=LW;function wq(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=r.slice(-1),o=r.slice(-2);return t?`other`:i&&a==1&&o!=11?`one`:i&&a>=2&&a<=4&&(o<12||o>14)?`few`:i&&a==0||i&&a>=5&&a<=9||i&&o>=11&&o<=14?`many`:`other`}const Tq=$,Eq=LW,Dq=$;function Oq(e,t){var n=String(e).split(`.`),r=!n[1];return t?e==11||e==8||e==80||e==800?`many`:`other`:e==1&&r?`one`:`other`}function kq(e,t){var n=String(e).split(`.`),r=!n[1];return t?e==11||e==8||e==80||e==800?`many`:`other`:e==1&&r?`one`:`other`}const Aq=$,jq=$,Mq=RW,Nq=$,Pq=LW,Fq=LW;function Iq(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:a&&o>=2&&o<=4&&(s<12||s>14)||c>=2&&c<=4&&(l<12||l>14)?`few`:`other`}function Lq(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?`other`:e>=0&&e<=1?`one`:r&&e>=2&&e<=10?`few`:`other`}function Rq(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``;return t?`other`:e==0||e==1||r==0&&i==1?`one`:`other`}function zq(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1];return t?`other`:e==1&&i?`one`:r>=2&&r<=4&&i?`few`:i?`other`:`many`}function Bq(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=r.slice(-2);return t?`other`:i&&a==1?`one`:i&&a==2?`two`:i&&(a==3||a==4)||!i?`few`:`other`}const Vq=RW,Hq=RW,Uq=RW,Wq=RW,Gq=RW,Kq=$,qq=$;function Jq(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return t?e==1?`one`:i==4&&a!=14?`many`:`other`:e==1?`one`:`other`}function Yq(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=r.slice(-2),c=i.slice(-1),l=i.slice(-2);return t?`other`:a&&o==1&&s!=11||c==1&&l!=11?`one`:a&&o>=2&&o<=4&&(s<12||s>14)||c>=2&&c<=4&&(l<12||l>14)?`few`:`other`}const Xq=$,Zq=$,Qq=$,$q=LW;function eJ(e,t){var n=String(e).split(`.`),r=!n[1],i=Number(n[0])==e,a=i&&n[0].slice(-1),o=i&&n[0].slice(-2);return t?(a==1||a==2)&&o!=11&&o!=12?`one`:`other`:e==1&&r?`one`:`other`}const tJ=IW,nJ=$,rJ=$,iJ=$,aJ=$,oJ=LW,sJ=FW,cJ=$;function lJ(e,t){var n=String(e).split(`.`),r=Number(n[0])==e,i=r&&n[0].slice(-1);return t?i==6||i==9||e==10?`few`:`other`:e==1?`one`:`other`}function uJ(e,t){var n=String(e).split(`.`),r=n[0],i=n[1]||``,a=!n[1],o=r.slice(-1),s=i.slice(-1);return t?e==1?`one`:`other`:a&&(r==1||r==2||r==3)||a&&o!=4&&o!=6&&o!=9||!a&&s!=4&&s!=6&&s!=9?`one`:`other`}const dJ=$,fJ=LW,pJ=$,mJ=$;function hJ(e,t){var n=String(e).split(`.`),r=Number(n[0])==e;return t?`other`:e==0||e==1||r&&e>=11&&e<=99?`one`:`other`}const gJ=$;function _J(e,t){var n=String(e).split(`.`),r=n[0],i=!n[1],a=Number(n[0])==e,o=a&&n[0].slice(-1),s=a&&n[0].slice(-2),c=r.slice(-1),l=r.slice(-2);return t?o==3&&s!=13?`few`:`other`:i&&c==1&&l!=11?`one`:i&&c>=2&&c<=4&&(l<12||l>14)?`few`:i&&c==0||i&&c>=5&&c<=9||i&&l>=11&&l<=14?`many`:`other`}const vJ=IW,yJ=$,bJ=$;function xJ(e,t){return t&&e==1?`one`:`other`}const SJ=$,CJ=$,wJ=FW,TJ=$,EJ=LW,DJ=$,OJ=$,kJ=IW,AJ=LW,jJ=LW,MJ=LW;function NJ(e,t){return t?`other`:e>=0&&e<=1?`one`:`other`}var PJ=Object.defineProperty,FJ=Object.getOwnPropertyDescriptor,IJ=Object.getOwnPropertyNames,LJ=Object.prototype.hasOwnProperty,RJ=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of IJ(t))!LJ.call(e,i)&&i!==n&&PJ(e,i,{get:()=>t[i],enumerable:!(r=FJ(t,i))||r.enumerable});return e},zJ=(e,t,n)=>(RJ(e,t,`default`),n&&RJ(n,t,`default`)),BJ=JSON.parse(`{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}`),VJ={};zJ(VJ,PW),NW.loadLocaleData(`en`,{plurals:VJ.en}),NW.load(`en`,BJ),NW.activate(`en`);var HJ=Object.defineProperty,UJ=Object.getOwnPropertyDescriptor,WJ=(e,t,n,r)=>{for(var i=r>1?void 0:r?UJ(t,n):t,a=e.length-1,o;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&HJ(t,n,i),i},GJ={...sU.defaultOptions,...VU.defaultOptions},KJ=[...sU.staticKeys,...VU.staticKeys],qJ=class extends jP{get name(){return`react`}onSetOptions(e){let{pickChanged:t}=e;this.getExtension(sU).setOptions(t([`placeholder`]))}createExtensions(){let{emptyNodeClass:e,placeholder:t,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:i,defaultInlineNode:a,nodeViewComponents:o}=this.options;return[new sU({emptyNodeClass:e,placeholder:t,priority:AC.Low}),new VU({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:i,defaultInlineNode:a,nodeViewComponents:o})]}};qJ=WJ([BP({defaultOptions:GJ,staticKeys:KJ})],qJ);function JJ(...e){if(e.length===2)return XJ(e[0],e[1])||null;let t=e.slice(1).reduce((e,t)=>XJ(e,t),e[0]);return t||null}const YJ=new WeakMap;function XJ(e,t){if(e&&t){let n=YJ.get(e)||new WeakMap;YJ.set(e,n);let r=n.get(t)||(n=>{ZJ(e,n),ZJ(t,n)});return n.set(t,r),r}return e||t}function ZJ(e,t){typeof e==`function`?e(t):e.current=t}var QJ=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},$J=(e,t,n)=>(QJ(e,t,`read from private field`),n?n.call(e):t.get(e)),eY=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},tY=(e,t,n,r)=>(QJ(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function nY(){let[,e]=(0,f.useState)(U());return(0,f.useCallback)(()=>{e(U())},[])}var rY=(0,f.createContext)(null);function iY(e){let t=(0,f.useContext)(rY),n=(0,f.useRef)(nY());W(t,{code:H.REACT_PROVIDER_CONTEXT});let{addHandler:r}=t;return(0,f.useEffect)(()=>{let t=e;if(t){if(nw(t)){let{autoUpdate:e}=t;t=e?()=>n.current():void 0}if(tw(t))return r(`updated`,t)}},[r,e]),t}function aY(e=!0){return iY({autoUpdate:e}).active}function oY(){return iY().commands}var[sY,Sfe]=QU(({props:e})=>{let t=e.locale??`en`,n=e.i18n??NW,r=e.supportedLocales??[t],i=n._.bind(n);return{locale:t,i18n:n,supportedLocales:r,t:i}});function cY(e,t={}){let{core:n,react:r,...i}=t;return uI(e)?e:lI.create(()=>[...Tw(e),new qJ(r),...hU(n)],i)}function lY(e,t={}){let n=(0,f.useRef)(e),r=(0,f.useRef)(t),[i,a]=(0,f.useState)(()=>cY(e,t));return n.current=e,r.current=t,(0,f.useEffect)(()=>i.addHandler(`destroy`,()=>{a(()=>cY(n.current,r.current))}),[i]),i}var uY=typeof JJ==`object`&&JJ.__esModule&&JJ.default?JJ.default:JJ,dY,fY=class extends UF{constructor(e){if(super(e),eY(this,dY,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,t)=>{this.rootPropsConfig.called=!0;let{refKey:n=`ref`,ref:r,...i}=e??U();return{[n]:uY(r,this.onRef),key:this.uid,...i,children:t}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,W(this.rootPropsConfig.count<=1,{code:H.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),tY(this,dY,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(sU).setOptions({placeholder:this.props.placeholder??``})}get name(){return`react`}update(e){return super.update(e),this}createView(e){return new zce(null,{state:e,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:e,...t}){let{triggerChange:n=!0,tr:r,transactions:i}=t;if(this.props.state){let{onChange:t}=this.props;W(t,{code:H.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),W(n,{code:H.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||=this.getState(),this.onChange({state:e,tr:r,transactions:i});return}!r&&!i&&(e=e.apply(e.tr.setMeta(EC,{}))),this.view.updateState(e),n&&i?.length!==0&&this.onChange({state:e,tr:r,transactions:i}),this.manager.onStateUpdate({previousState:this.previousState,state:e,tr:r,transactions:i})}updateControlledState(e,t){this.previousStateOverride=t,e=e.apply(e.tr.setMeta(EC,{})),this.view.updateState(e),this.manager.onStateUpdate({previousState:this.previousState,state:e}),this.previousStateOverride=void 0}addProsemirrorViewToDom(e,t){this.props.insertPosition===`start`?e.insertBefore(t,e.firstChild):e.append(t)}onRefLoad(){W($J(this,dY),{code:H.REACT_EDITOR_VIEW,message:`Something went wrong when initializing the text editor. Please check your setup.`});let{autoFocus:e}=this.props;this.addProsemirrorViewToDom($J(this,dY),this.view.dom),e&&this.focus(e),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&$J(this,dY)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};dY=new WeakMap;var pY=typeof document<`u`?f.useLayoutEffect:f.useEffect;function mY(e){let t=(0,f.useRef)();return pY(()=>{t.current=e}),t.current}function hY(e){let{manager:t,state:n}=e,{placeholder:r,editable:i}=e,a=(0,f.useRef)(!0);a.current&&!rw(r)&&t.getExtension(qJ).setOptions({placeholder:r}),(0,f.useEffect)(()=>{r!=null&&t.getExtension(qJ).setOptions({placeholder:r})},[r,t]);let[o]=(0,f.useState)(()=>{if(n)return n;let r=t.createEmptyDoc(),[i,a]=ow(e.initialContent)?e.initialContent:[e.initialContent??r];return t.createState({content:i,selection:a})}),s=gY({initialEditorState:o,getProps:()=>e});return(0,f.useEffect)(()=>()=>{s.destroy()},[s]),(0,f.useEffect)(()=>{s.onUpdate()},[i,s]),_Y(s),s.frameworkOutput}function gY(e){let t=(0,f.useRef)(e);t.current=e;let n=(0,f.useMemo)(()=>new fY(t.current),[]);return n.update(e),n}function _Y(e){let{state:t}=e.props,n=(0,f.useRef)(!!t),r=mY(t);pY(()=>{let i=t?n.current===!0:n.current===!1;W(i,{code:H.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!t||t===r)&&e.updateControlledState(t,r??void 0)},[t,r,e])}function vY(e={}){let{content:t,document:n,selection:r,extensions:i,...a}=e,o=lY(i??(()=>[]),a),[s,c]=(0,f.useState)(()=>o.createState({selection:r,content:t??o.createEmptyDoc()})),l=(0,f.useCallback)(({state:e})=>{c(e)},[]),u=(0,f.useCallback)(()=>{let e=o.output;return e},[o]);return(0,f.useMemo)(()=>({state:s,setState:c,manager:o,onChange:l,getContext:u}),[u,o,l,s])}var yY=()=>f.default.createElement(`div`,{className:II.EDITOR_WRAPPER,...iY().getRootProps()}),bY=e=>(e.hook(),null);function xY(e){let{children:t,autoRender:n,i18n:r,locale:i,supportedLocales:a,hooks:o=[],...s}=e,c=hY(s),l=TU(c.portalContainer),u=n===`start`||n===!0||!t&&rw(n),d=n===`end`;return f.default.createElement(sY,{i18n:r,locale:i,supportedLocales:a},f.default.createElement(rY.Provider,{value:c},f.default.createElement(wU,{portals:l}),o.map((e,t)=>f.default.createElement(bY,{hook:e,key:t})),u&&f.default.createElement(yY,null),t,d&&f.default.createElement(yY,null)))}function SY(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function CY(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var wY,TY,EY=o((()=>{wY=!1,TY=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0?!wY:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(CY(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=SY(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return(t=e.parentNode)?.removeChild(e)}),this.tags=[],this.ctr=0},e}()})),DY,OY,kY,AY,jY,MY,NY,PY,FY,IY=o((()=>{DY=`-ms-`,OY=`-moz-`,kY=`-webkit-`,AY=`comm`,jY=`rule`,MY=`decl`,NY=`@import`,PY=`@keyframes`,FY=`@layer`}));function LY(e,t){return HY(e,0)^45?(((t<<2^HY(e,0))<<2^HY(e,1))<<2^HY(e,2))<<2^HY(e,3):0}function RY(e){return e.trim()}function zY(e,t){return(e=t.exec(e))?e[0]:e}function BY(e,t,n){return e.replace(t,n)}function VY(e,t){return e.indexOf(t)}function HY(e,t){return e.charCodeAt(t)|0}function UY(e,t,n){return e.slice(t,n)}function WY(e){return e.length}function GY(e){return e.length}function KY(e,t){return t.push(e),e}function qY(e,t){return e.map(t).join(``)}var JY,YY,XY,ZY=o((()=>{JY=Math.abs,YY=String.fromCharCode,XY=Object.assign}));function QY(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:hX,column:gX,length:o,return:``}}function $Y(e,t){return XY(QY(``,null,null,``,null,null,0),e,{length:-e.length},t)}function eX(){return yX}function tX(){return yX=vX>0?HY(bX,--vX):0,gX--,yX===10&&(gX=1,hX--),yX}function nX(){return yX=vX<_X?HY(bX,vX++):0,gX++,yX===10&&(gX=1,hX++),yX}function rX(){return HY(bX,vX)}function iX(){return vX}function aX(e,t){return UY(bX,e,t)}function oX(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function sX(e){return hX=gX=1,_X=WY(bX=e),vX=0,[]}function cX(e){return bX=``,e}function lX(e){return RY(aX(vX-1,fX(e===91?e+2:e===40?e+1:e)))}function uX(e){for(;(yX=rX())&&yX<33;)nX();return oX(e)>2||oX(yX)>3?``:` `}function dX(e,t){for(;--t&&nX()&&!(yX<48||yX>102||yX>57&&yX<65||yX>70&&yX<97););return aX(e,iX()+(t<6&&rX()==32&&nX()==32))}function fX(e){for(;nX();)switch(yX){case e:return vX;case 34:case 39:e!==34&&e!==39&&fX(yX);break;case 40:e===41&&fX(e);break;case 92:nX();break}return vX}function pX(e,t){for(;nX()&&e+yX!==57&&!(e+yX===84&&rX()===47););return`/*`+aX(t,vX-1)+`*`+YY(e===47?e:nX())}function mX(e){for(;!oX(rX());)nX();return aX(e,vX)}var hX,gX,_X,vX,yX,bX,xX=o((()=>{ZY(),hX=1,gX=1,_X=0,vX=0,yX=0,bX=``}));function SX(e){return cX(CX(``,null,null,null,[``],e=sX(e),0,[0],e))}function CX(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=nX()){case 40:if(m!=108&&HY(C,d-1)==58){VY(C+=BY(lX(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=lX(v);break;case 9:case 10:case 13:case 32:C+=uX(m);break;case 92:C+=dX(iX()-1,7);continue;case 47:switch(rX()){case 42:case 47:KY(TX(pX(nX(),iX()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=WY(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=BY(C,/\f/g,``)),p>0&&WY(C)-d&&KY(p>32?EX(C+`;`,r,n,d-1):EX(BY(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(KY(S=wX(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)CX(C,t,S,S,b,a,d,s,x);else switch(f===99&&HY(C,3)===110?100:f){case 100:case 108:case 109:case 115:CX(e,S,S,r&&KY(wX(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:CX(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+WY(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&tX()==125)continue}switch(C+=YY(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(WY(C)-1)*_,_=1;break;case 64:rX()===45&&(C+=lX(nX())),f=rX(),u=d=WY(y=C+=mX(iX())),v++;break;case 45:m===45&&WY(C)==2&&(h=0)}}return a}function wX(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=GY(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=UY(e,d+1,d=JY(h=o[m])),y=e;_<p;++_)(y=RY(h>0?f[_]+` `+v:BY(v,/&\f/g,f[_])))&&(c[g++]=y);return QY(e,t,n,i===0?jY:s,c,l,u)}function TX(e,t,n){return QY(e,t,n,AY,YY(eX()),UY(e,2,-2),0)}function EX(e,t,n,r){return QY(e,t,n,MY,UY(e,0,r),UY(e,r+1,-1),r)}var DX=o((()=>{IY(),ZY(),xX()})),OX=o((()=>{}));function kX(e,t){for(var n=``,r=GY(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function AX(e,t,n,r){switch(e.type){case FY:if(e.children.length)break;case NY:case MY:return e.return=e.return||e.value;case AY:return``;case PY:return e.return=e.value+`{`+kX(e.children,r)+`}`;case jY:e.value=e.props.join(`,`)}return WY(n=kX(e.children,r))?e.return=e.value+`{`+n+`}`:``}var jX=o((()=>{IY(),ZY()}));function MX(e){var t=GY(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function NX(e){return function(t){t.root||(t=t.return)&&e(t)}}var PX=o((()=>{ZY()})),FX=o((()=>{IY(),ZY(),DX(),OX(),xX(),jX(),PX()}));function IX(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var LX=o((()=>{}));function RX(e,t){switch(LY(e,t)){case 5103:return kY+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return kY+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return kY+e+OY+e+DY+e+e;case 6828:case 4268:return kY+e+DY+e+e;case 6165:return kY+e+DY+`flex-`+e+e;case 5187:return kY+e+BY(e,/(\w+).+(:[^]+)/,kY+`box-$1$2`+DY+`flex-$1$2`)+e;case 5443:return kY+e+DY+`flex-item-`+BY(e,/flex-|-self/,``)+e;case 4675:return kY+e+DY+`flex-line-pack`+BY(e,/align-content|flex-|-self/,``)+e;case 5548:return kY+e+DY+BY(e,`shrink`,`negative`)+e;case 5292:return kY+e+DY+BY(e,`basis`,`preferred-size`)+e;case 6060:return kY+`box-`+BY(e,`-grow`,``)+kY+e+DY+BY(e,`grow`,`positive`)+e;case 4554:return kY+BY(e,/([^-])(transform)/g,`$1`+kY+`$2`)+e;case 6187:return BY(BY(BY(e,/(zoom-|grab)/,kY+`$1`),/(image-set)/,kY+`$1`),e,``)+e;case 5495:case 3959:return BY(e,/(image-set\([^]*)/,kY+"$1$`$1");case 4968:return BY(BY(e,/(.+:)(flex-)?(.*)/,kY+`box-pack:$3`+DY+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+kY+e+e;case 4095:case 3583:case 4068:case 2532:return BY(e,/(.+)-inline(.+)/,kY+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(WY(e)-1-t>6)switch(HY(e,t+1)){case 109:if(HY(e,t+4)!==45)break;case 102:return BY(e,/(.+:)(.+)-([^]+)/,`$1`+kY+`$2-$3$1`+OY+(HY(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~VY(e,`stretch`)?RX(BY(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(HY(e,t+1)!==115)break;case 6444:switch(HY(e,WY(e)-3-(~VY(e,`!important`)&&10))){case 107:return BY(e,`:`,`:`+kY)+e;case 101:return BY(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+kY+(HY(e,14)===45?`inline-`:``)+`box$3$1`+kY+`$2$3$1`+DY+`$2box$3`)+e}break;case 5936:switch(HY(e,t+11)){case 114:return kY+e+DY+BY(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return kY+e+DY+BY(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return kY+e+DY+BY(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return kY+e+DY+e+e}return e}var zX,BX,VX,HX,UX,WX,GX,KX,qX,JX=o((()=>{EY(),FX(),zX=function(e,t,n){for(var r=0,i=0;r=i,i=rX(),r===38&&i===12&&(t[n]=1),!oX(i);)nX();return aX(e,vX)},BX=function(e,t){var n=-1,r=44;do switch(oX(r)){case 0:r===38&&rX()===12&&(t[n]=1),e[n]+=zX(vX-1,t,n);break;case 2:e[n]+=lX(r);break;case 4:if(r===44){e[++n]=rX()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=YY(r)}while(r=nX());return e},VX=function(e,t){return cX(BX(sX(e),t))},HX=new WeakMap,UX=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!HX.get(n))&&!r){HX.set(e,!0);for(var i=[],a=VX(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},WX=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}},GX=function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case MY:e.return=RX(e.value,e.length);break;case PY:return kX([$Y(e,{value:BY(e.value,`@`,`@`+kY)})],r);case jY:if(e.length)return qY(e.props,function(t){switch(zY(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return kX([$Y(e,{props:[BY(t,/:(read-\w+)/,`:`+OY+`$1`)]})],r);case`::placeholder`:return kX([$Y(e,{props:[BY(t,/:(plac\w+)/,`:`+kY+`input-$1`)]}),$Y(e,{props:[BY(t,/:(plac\w+)/,`:`+OY+`$1`)]}),$Y(e,{props:[BY(t,/:(plac\w+)/,DY+`input-$1`)]})],r)}return``})}},KX=[GX],qX=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){var t=e.getAttribute(`data-emotion`);t.indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||KX,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[UX,WX],l,u=[AX,NX(function(e){l.insert(e)})],d=MX(c.concat(r,u)),f=function(e){return kX(SX(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new TY({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p}}));function YX(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var XX,ZX,QX,$X=o((()=>{XX=!0,ZX=function(e,t,n){var r=e.key+`-`+t.name;(n===!1||XX===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},QX=function(e,t,n){ZX(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}}}));function eZ(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var tZ=o((()=>{})),nZ,rZ=o((()=>{nZ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}}));function iZ(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return gZ={name:i.name,styles:i.styles,next:gZ},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)gZ={name:o.name,styles:o.styles,next:gZ},o=o.next;var s=a.styles+`;`;return s}return aZ(e,t,n);case`function`:if(e!==void 0){var c=gZ,l=n(e);return gZ=c,iZ(e,t,l)}break}var u=n;if(t==null)return u;var d=t[u];return d===void 0?u:d}function aZ(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=iZ(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:dZ(s)&&(r+=fZ(a)+`:`+pZ(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&sZ)throw Error(mZ);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)dZ(o[c])&&(r+=fZ(a)+`:`+pZ(a,o[c])+`;`);else{var l=iZ(e,t,o);switch(a){case`animation`:case`animationName`:r+=fZ(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}function oZ(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;gZ=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=iZ(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=iZ(n,t,e[s]),r){var c=a;i+=c[s]}hZ.lastIndex=0;for(var l=``,u;(u=hZ.exec(i))!==null;)l+=`-`+u[1];var d=eZ(i)+l;return{name:d,styles:i,next:gZ}}var sZ,cZ,lZ,uZ,dZ,fZ,pZ,mZ,hZ,gZ,_Z=o((()=>{tZ(),rZ(),LX(),sZ=!1,cZ=/[A-Z]|^ms/g,lZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uZ=function(e){return e.charCodeAt(1)===45},dZ=function(e){return e!=null&&typeof e!=`boolean`},fZ=IX(function(e){return uZ(e)?e:e.replace(cZ,`-$&`).toLowerCase()}),pZ=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(lZ,function(e,t,n){return gZ={name:t,styles:n,next:gZ},t})}return nZ[e]!==1&&!uZ(e)&&typeof t==`number`&&t!==0?t+`px`:t},mZ=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`,hZ=/label:\s*([^\s;{]+)\s*(;|$)/g})),vZ={};c(vZ,{default:()=>xZ});function yZ(e,t){if(e.inserted[t.name]===void 0)return e.insert(``,t,e.sheet,!0)}function bZ(e,t,n){var r=[],i=YX(e,r,n);return r.length<2?n:i+t(r)}var xZ,SZ,CZ=o((()=>{JX(),_Z(),$X(),xZ=function(e){var t=qX(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=oZ(n,t.registered,void 0);return QX(t,i,!1),t.key+`-`+i.name},r=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=oZ(n,t.registered),a=`animation-`+i.name;return yZ(t,{name:i.name,styles:`@keyframes `+a+`{`+i.styles+`}`}),a},i=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=oZ(n,t.registered);yZ(t,i)},a=function(){for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];return bZ(t.registered,n,SZ(r))};return{css:n,cx:a,injectGlobal:i,keyframes:r,hydrate:function(e){e.forEach(function(e){t.inserted[e]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:YX.bind(null,t.registered),merge:bZ.bind(null,t.registered,n)}},SZ=function e(t){for(var n=``,r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case`boolean`:break;case`object`:if(Array.isArray(i))a=e(i);else for(var o in a=``,i)i[o]&&o&&(a&&(a+=` `),a+=o);break;default:a=i}a&&(n&&(n+=` `),n+=a)}}return n}}));const Cfe=`_richTextToolbar_1gbkk_1`,wfe=`_richTextToolbarContainer_1gbkk_5`;var wZ={richTextToolbar:`_richTextToolbar_1gbkk_1`,richTextToolbarContainer:`_richTextToolbarContainer_1gbkk_5`};let TZ=function(e){return e.BOLD=`bold`,e.ITALIC=`italic`,e.CODE=`code`,e.UL=`ul`,e.OL=`ol`,e}({});const EZ=({disabled:e=!1,toolbarComponent:t=null})=>{let{focus:n,toggleBold:r,toggleBulletList:i,toggleCode:a,toggleItalic:o,toggleOrderedList:s}=oY(),c=aY(),l=[{icon:TZ.BOLD,onClick:r,active:c.bold()},{icon:TZ.ITALIC,onClick:o,active:c.italic()},{icon:TZ.CODE,onClick:a,active:c.code()},{icon:TZ.UL,onClick:i,active:c.bulletList()},{icon:TZ.OL,onClick:s,active:c.orderedList()}];return(0,p.jsxs)(`div`,{className:wZ.richTextToolbarContainer,children:[(0,p.jsx)(`div`,{className:wZ.richTextToolbar,children:l.map((t,r)=>(0,p.jsx)(_o,{small:!0,round:!0,basic:!0,icon:t.icon,colored:y.MUTED,onClick:()=>{t.onClick(),n()},active:t.active,disabled:e},r))}),t]})},Tfe=`_inputInTable_1fb4l_1`,Efe=`_inputHover_1fb4l_13`,Dfe=`_inputFocus_1fb4l_18`,Ofe=`_inputError_1fb4l_25`,kfe=`_inputWarning_1fb4l_26`,Afe=`_inputDisabled_1fb4l_61`,jfe=`_hideScrollbars_1fb4l_67`,Mfe=`_richTextInput_1fb4l_77`;var DZ={inputInTable:`_inputInTable_1fb4l_1`,inputHover:`_inputHover_1fb4l_13`,inputFocus:`_inputFocus_1fb4l_18`,inputError:`_inputError_1fb4l_25`,inputWarning:`_inputWarning_1fb4l_26`,inputDisabled:`_inputDisabled_1fb4l_61`,hideScrollbars:`_hideScrollbars_1fb4l_67`,richTextInput:`_richTextInput_1fb4l_77`};const OZ=(0,f.forwardRef)(({placeholder:e,onChange:t,value:n,disabled:r,toolbarComponent:i},a)=>{let o=(0,f.useContext)(Ie),s=r||o,{manager:c,state:l,setState:u,getContext:d}=vY({extensions:()=>[new YR({}),new QB({}),new nz,new dB,new ZH({}),new $B,new sU({placeholder:e})],content:n,selection:`start`,stringHandler:`markdown`});(0,f.useImperativeHandle)(a,()=>d(),[d]);let m=({helpers:e,state:n})=>{let r=e.getMarkdown(n);t&&t(r),u(n)};return(0,p.jsx)(`div`,{className:DZ.richTextInput,children:(0,p.jsxs)(xY,{manager:c,state:l,placeholder:e,onChange:m,editable:!s,children:[(0,p.jsx)(EZ,{disabled:s,toolbarComponent:i}),(0,p.jsx)(yY,{})]})})}),Nfe=`_row_n16je_1`;var kZ={row:`_row_n16je_1`},AZ=u(h());const jZ=({alignItems:e=`initial`,justifyContent:t=`initial`,children:n=null,flex:r=!1,height:i=`auto`,marginBottom:a=`0`,marginTop:o=`0`,spacing:s=`var(--padding)`,wrap:c=!1,testId:l=null})=>{let u=typeof s==`number`?`${s}px`:s,d=n===null||n===!1?[]:Array.isArray(n)?n.filter(e=>(0,f.isValidElement)(e)):[n],m=d.map((e,t)=>(0,p.jsx)(f.default.Fragment,{children:f.default.cloneElement(e,{spacing:u})},t));return(0,p.jsx)(`div`,{className:(0,AZ.default)(kZ.row),style:{alignItems:e,justifyContent:t,flexGrow:r?1:0,flexShrink:r?1:0,flexWrap:c?`wrap`:`nowrap`,height:i,marginLeft:`calc(${u} * -0.5)`,marginRight:`calc(${u} * -0.5)`,marginBottom:a,marginTop:o},"data-testid":l,children:m})},Pfe=`_inputInTable_1oy1z_1`,Ffe=`_inputHover_1oy1z_13`,Ife=`_inputFocus_1oy1z_18`,Lfe=`_inputError_1oy1z_25`,Rfe=`_inputWarning_1oy1z_26`,zfe=`_inputDisabled_1oy1z_61`,Bfe=`_hideScrollbars_1oy1z_67`,Vfe=`_sidebar_1oy1z_82`,Hfe=`_inner_1oy1z_93`,Ufe=`_title_1oy1z_103`,Wfe=`_subtitle_1oy1z_104`,Gfe=`_label_1oy1z_105`,Kfe=`_collapsed_1oy1z_109`,qfe=`_list_1oy1z_134`,Jfe=`_item_1oy1z_140`,Yfe=`_experimental_1oy1z_155`,Xfe=`_active_1oy1z_159`,Zfe=`_icon_1oy1z_163`;var MZ={inputInTable:`_inputInTable_1oy1z_1`,inputHover:`_inputHover_1oy1z_13`,inputFocus:`_inputFocus_1oy1z_18`,inputError:`_inputError_1oy1z_25`,inputWarning:`_inputWarning_1oy1z_26`,inputDisabled:`_inputDisabled_1oy1z_61`,hideScrollbars:`_hideScrollbars_1oy1z_67`,sidebar:`_sidebar_1oy1z_82`,inner:`_inner_1oy1z_93`,title:`_title_1oy1z_103`,subtitle:`_subtitle_1oy1z_104`,label:`_label_1oy1z_105`,collapsed:`_collapsed_1oy1z_109`,list:`_list_1oy1z_134`,item:`_item_1oy1z_140`,experimental:`_experimental_1oy1z_155`,active:`_active_1oy1z_159`,icon:`_icon_1oy1z_163`},NZ=u(h()),PZ=u(Gb());const FZ=(0,f.memo)(({isOpen:e,label:t,icon:n,invalid:r})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ya,{text:t,enabled:!e,placement:`right-center`,possiblePlacements:[`right-center`],fontSize:16,padding:`var(--padding-sm)`,display:`block`,children:(0,p.jsx)(`span`,{className:MZ.icon,children:(0,p.jsx)(ks,{small:!0,title:r?`!`:void 0,margin:4,children:(0,p.jsx)(er,{icon:n})})})}),(0,p.jsx)(`span`,{className:MZ.label,children:t})]}),(e,t)=>(0,PZ.default)(e,t)),IZ=({isOpen:e,items:t,sectionIndex:n,onClick:r,testId:i})=>(0,p.jsx)(`div`,{className:MZ.list,children:t.map((t,a)=>{let o=`${n}_${a}`;return(0,p.jsx)(`a`,{href:t.value,className:(0,NZ.default)(MZ.item,t.isActive?MZ.active:``,t.isExperimental?MZ.experimental:``),onClick:e=>r(e,t.value,t.label,t.onClick),"data-testid":i,children:(0,p.jsx)(FZ,{label:t.label,icon:t.icon,invalid:t.invalid,isOpen:e},o)},o)})}),LZ=({isOpen:e,sections:t,onClick:n})=>(0,p.jsx)(p.Fragment,{children:t.map((t,r)=>(0,p.jsxs)(f.default.Fragment,{children:[(0,p.jsx)(`h5`,{className:MZ.subtitle,children:t.heading.toUpperCase()}),(0,p.jsx)(IZ,{isOpen:e,items:t.items,sectionIndex:r,onClick:n,testId:t.testId})]},r))});var RZ=u(h()),zZ=u(Gb());const BZ=(0,f.memo)(({options:e,startOpen:t=!1,onShiftClickToggleOpen:n=()=>{},top:r})=>{let[i,a]=(0,f.useState)(t),o=(e,t,n,r)=>{e.preventDefault(),typeof r==`function`&&(e.currentTarget.value=t,e.currentTarget.label=n,r(e)),a(!1)},s=e.sections.length>0;return(0,p.jsx)(np,{fixed:!0,open:i,top:r,background:`var(--color-background-sidebar)`,closedWidth:`var(--size-sidebar)`,buttonPosition:x.BOTTOM,buttonAnimate:!0,button:s&&(0,p.jsx)(_o,{onClick:e=>{e.shiftKey&&n&&n(e),a(!i)},colored:!0,round:!0,icon:S.LEFT}),children:(0,p.jsx)(`div`,{className:(0,RZ.default)(MZ.sidebar,i?``:MZ.collapsed),children:s&&(0,p.jsxs)(`div`,{className:MZ.inner,children:[(0,p.jsx)(`h4`,{className:MZ.title,children:e.title}),(0,p.jsx)(LZ,{isOpen:i,sections:e.sections,onClick:o})]})})})},(e,t)=>(0,zZ.default)(e,t)),Qfe=`_tabs_1y79t_1`,$fe=`_padding_1y79t_7`,epe=`_margin_1y79t_11`,tpe=`_contentPadding_1y79t_14`,npe=`_item_1y79t_17`,rpe=`_active_1y79t_39`,ipe=`_hidden_1y79t_58`,ape=`_disabled_1y79t_61`,ope=`_left_1y79t_65`,spe=`_right_1y79t_65`;var VZ={tabs:`_tabs_1y79t_1`,padding:`_padding_1y79t_7`,margin:`_margin_1y79t_11`,contentPadding:`_contentPadding_1y79t_14`,item:`_item_1y79t_17`,active:`_active_1y79t_39`,hidden:`_hidden_1y79t_58`,disabled:`_disabled_1y79t_61`,left:`_left_1y79t_65`,right:`_right_1y79t_65`},HZ=u(h());const UZ=({label:e,url:t,hidden:n,disabled:r,active:i,onClick:a,right:o,invalid:s,badge:c,testId:l})=>{let u=getComputedStyle(document.body).getPropertyValue(`--color-text-error`);return(0,p.jsx)(`a`,{id:e?.toString(),href:t,className:(0,HZ.default)(VZ.item,i?VZ.active:``,r?VZ.disabled:``,n&&!i?VZ.hidden:``,o?VZ.right:VZ.left),onClick:a,"data-testid":l,children:s?(0,p.jsx)(ks,{small:!0,margin:`-4px`,color:u,title:`!`,children:e}):c?(0,p.jsx)(ks,{small:!0,margin:`-4px`,title:c?.toString(),children:e}):e})};var WZ=u(h());const GZ=({children:e,activeTabIndex:t,contentPadding:n})=>Array.isArray(e)?(0,p.jsx)(`div`,{className:(0,WZ.default)(n?VZ.contentPadding:``),children:e.map((e,n)=>t===n&&e)}):null;var KZ=u(h()),qZ=u(Ra());const JZ=({name:e=void 0,options:t=null,children:n=null,value:r=void 0,onChange:i=qZ.noop,padding:a=!1,margin:o=!0,contentPadding:s=!0,onChangeTab:c,activeTabIndex:l=void 0,tabs:u=void 0,testId:d})=>{let m=(0,f.useContext)(Ie),h=c!==void 0,g=n?n.map((e,t)=>({value:t,url:e.props.url,label:e.props.label,hidden:e.props.hidden,disabled:e.props.disabled||m,badge:e.props.badge,testId:e.props?.testId&&`${e.props.testId}-${t}`})):t||u,{simpleInputs:_,options:v,selectedOptions:y}=h?{simpleInputs:!1,options:g,selectedOptions:void 0}:Bg(g,r),b=h||y==null?void 0:_?y:y.value,x=l===void 0?v?.findIndex(e=>e.value===b):l,S=x===-1?0:x,C=(t,n,r)=>{if(h){let e=n.key||n.label||null;c(t,e)}else{let t=r.target;t.name=e,t.value=n.value,t.label=n.label,i(r)}},w=(e,t)=>{let{label:n,url:r,hidden:i,disabled:a,value:o,right:s,invalid:c,badge:l,testId:u}=e;return(0,p.jsx)(UZ,{label:n,url:r,hidden:i,disabled:a||m,invalid:c,badge:l,right:s,active:h?t===S:o===b,onClick:n=>C(t,e,n),testId:u},t)};return v?(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`div`,{className:(0,KZ.default)(VZ.tabs,a?VZ.padding:``,o?VZ.margin:``),"data-testid":d,children:v.map(w)}),(0,p.jsx)(GZ,{activeTabIndex:S??0,contentPadding:s,children:n})]}):null},YZ=({children:e,href:t=void 0,target:n=void 0,testId:r,onClick:i,component:a=`a`})=>(0,p.jsx)(a,{href:t,to:t,target:n,onClick:i,"data-testid":r,children:(0,p.jsx)(Yd,{link:!0,children:e})}),cpe=`_inputInTable_q0tl0_1`,lpe=`_inputHover_q0tl0_13`,upe=`_inputFocus_q0tl0_18`,dpe=`_inputError_q0tl0_25`,fpe=`_inputWarning_q0tl0_26`,ppe=`_inputDisabled_q0tl0_61`,mpe=`_hideScrollbars_q0tl0_67`,hpe=`_textarea_q0tl0_77`,gpe=`_small_q0tl0_116`,_pe=`_monospace_q0tl0_155`;var XZ={inputInTable:`_inputInTable_q0tl0_1`,inputHover:`_inputHover_q0tl0_13`,inputFocus:`_inputFocus_q0tl0_18`,inputError:`_inputError_q0tl0_25`,inputWarning:`_inputWarning_q0tl0_26`,inputDisabled:`_inputDisabled_q0tl0_61`,hideScrollbars:`_hideScrollbars_q0tl0_67`,textarea:`_textarea_q0tl0_77`,small:`_small_q0tl0_116`,monospace:`_monospace_q0tl0_155`},ZZ=u(h()),QZ=u(Ra());const $Z=({name:e,value:t=``,placeholder:n=``,cols:r,rows:i,disabled:a=!1,onChange:o=QZ.noop,onKeyPress:s=QZ.noop,onFocus:c=QZ.noop,onBlur:l=QZ.noop,tabIndex:u=0,error:d=null,warning:m=null,tooltip:h=null,maxTooltipWidth:g,resize:_,monospace:v=!1,testId:y})=>{let b=(0,f.useContext)(Ie),x=(0,p.jsx)(`textarea`,{className:(0,ZZ.default)(XZ.textarea,d?XZ.error:``,m?XZ.warning:``,v?XZ.monospace:``),name:e,value:t,placeholder:n,cols:r,rows:i,onChange:o,disabled:a||b,onKeyPress:s,onFocus:c,onBlur:l,tabIndex:u,style:{resize:_},"data-error":d||null,"data-warning":m||null,"data-testid":y});return(0,p.jsx)(ya,{error:!!d,warning:!!m,text:h||d||m,enabled:h&&gs(h)||d&&gs(d)||m&&gs(m)||!1,maxWidth:g,children:x})},vpe=`_topbar_oyr59_11`,ype=`_fixed_oyr59_21`,bpe=`_appSwitcher_oyr59_29`,xpe=`_title_oyr59_75`,Spe=`_logo_oyr59_91`,Cpe=`_label_oyr59_94`,wpe=`_brand_oyr59_99`,Tpe=`_version_oyr59_104`,Epe=`_left_oyr59_111`,Dpe=`_right_oyr59_112`,Ope=`_item_oyr59_126`,kpe=`_link_oyr59_127`,Ape=`_button_oyr59_138`,jpe=`_menu_oyr59_139`,Mpe=`_active_oyr59_168`,Npe=`_alert_oyr59_193`;var eQ={topbar:`_topbar_oyr59_11`,fixed:`_fixed_oyr59_21`,appSwitcher:`_appSwitcher_oyr59_29`,title:`_title_oyr59_75`,logo:`_logo_oyr59_91`,label:`_label_oyr59_94`,brand:`_brand_oyr59_99`,version:`_version_oyr59_104`,left:`_left_oyr59_111`,right:`_right_oyr59_112`,item:`_item_oyr59_126`,link:`_link_oyr59_127`,button:`_button_oyr59_138`,menu:`_menu_oyr59_139`,active:`_active_oyr59_168`,alert:`_alert_oyr59_193`};const tQ=({warning:e})=>(0,p.jsx)(`div`,{className:eQ.alert,children:e}),nQ=({icon:e,url:t,onClick:n})=>{let r=(0,p.jsx)(er,{icon:e});return t?(0,p.jsx)(`a`,{href:t,onClick:n,className:eQ.appSwitcher,children:r}):(0,p.jsx)(`div`,{onClick:n,className:eQ.appSwitcher,children:r})};var rQ=u(h());const iQ=({label:e,logo:t,url:n,version:r,onClick:i})=>{let a=(0,p.jsxs)(`div`,{className:eQ.title,children:[t&&(0,p.jsx)(`div`,{className:eQ.logo,children:t}),e&&(0,p.jsx)(`span`,{className:eQ.label,children:e}),r&&(0,p.jsx)(`div`,{className:eQ.version,children:r})]});return(0,p.jsx)(`div`,{className:(0,rQ.default)(eQ.item,eQ.brand),children:n?(0,p.jsx)(`a`,{href:n,onClick:i,children:a}):(0,p.jsx)(`div`,{onClick:i,children:a})})};let aQ=function(e){return e.LINK=`Link`,e.BUTTON=`Button`,e.MENU=`Menu`,e.COMPONENT=`Component`,e}({});var oQ=u(h());const sQ=({label:e,url:t,icon:n,onClick:r,active:i,disabled:a,testId:o,component:s=`a`})=>{let c=(0,f.useContext)(Ie),l=e=>{(a||c)&&e.preventDefault(),r?.(e)};return(0,p.jsxs)(s,{className:(0,oQ.default)(eQ.link,i?eQ.active:``),href:t||`#`,to:t,onClick:l,"aria-disabled":a||c,"data-testid":o,role:r&&!t?`button`:void 0,children:[n,(0,p.jsx)(`span`,{className:eQ.label,children:e})]})};var cQ=u(h());const lQ=({element:e})=>{switch(e.type){case aQ.LINK:return(0,p.jsx)(`div`,{className:eQ.item,children:(0,p.jsx)(sQ,{label:e.label,url:e.url,icon:e.icon,onClick:e.onClick,active:e.active,disabled:e.disabled,testId:e.testId,component:e.component})});case aQ.BUTTON:return(0,p.jsx)(`div`,{className:(0,cQ.default)(eQ.item,eQ.button),children:(0,p.jsx)(_o,{label:e.label,colored:e.colored,pill:!0,disabled:e.disabled,onClick:e.onClick,icon:e.icon,testId:e.testId})});case aQ.MENU:return(0,p.jsx)(`div`,{className:(0,cQ.default)(eQ.item,eQ.menu),children:(0,p.jsx)(Us,{maxHeight:`100%`,menu:{trigger:_.COMPONENT,fullHeightTrigger:!0,placement:`bottom-start`,component:(0,p.jsx)(sQ,{label:e.label,icon:e.icon,onClick:e.onClick}),sections:e.sections}})});case aQ.COMPONENT:return(0,p.jsx)(`div`,{className:eQ.item,children:e.component});default:return null}};var uQ=u(h());const dQ=({title:e,appSwitcher:t,content:n=[],contentRight:r=[],warning:i=``,height:a=`var(--size-topbar)`,fixedPosition:o=!0})=>(0,p.jsxs)(`div`,{children:[i&&(0,p.jsx)(tQ,{warning:i}),(0,p.jsxs)(`div`,{className:(0,uQ.default)(eQ.topbar,o?eQ.fixed:``),style:{height:a},children:[!!t&&(0,p.jsx)(nQ,{icon:t.icon,url:t.url,onClick:t.onClick}),(0,p.jsxs)(`div`,{className:eQ.left,children:[e&&(0,p.jsx)(iQ,{label:e.label,logo:e.logo,url:e.url,version:e.version,onClick:e.onClick}),n.map((e,t)=>e?(0,p.jsx)(lQ,{element:e},t):null)]}),(0,p.jsx)(`div`,{className:eQ.right,children:r.map((e,t)=>e?(0,p.jsx)(lQ,{element:e},t):null)})]})]}),Ppe=`_popConfirm_1x6ye_1`,Fpe=`_content_1x6ye_7`,Ipe=`_buttons_1x6ye_13`;var fQ={popConfirm:`_popConfirm_1x6ye_1`,content:`_content_1x6ye_7`,buttons:`_buttons_1x6ye_13`};const pQ=({title:e,okText:t,onClickOk:n,disableConfirmButton:r,cancelText:i,onClickCancel:a,close:o,testId:s})=>(0,p.jsxs)(`div`,{className:fQ.popConfirm,children:[e&&(0,p.jsx)(`div`,{className:fQ.content,children:(0,p.jsx)(Yd,{small:!0,children:e})}),(0,p.jsxs)(`div`,{className:fQ.buttons,children:[(0,p.jsx)(_o,{small:!0,colored:!0,label:t,onClick:()=>n(o),disabled:r,testId:`${s}-ok-button`}),(0,p.jsx)(_o,{small:!0,label:i,onClick:()=>a(o),testId:`${s}-cancel-button`})]})]}),mQ=({children:e,placement:t=`top-center`,closeOnOutsideClick:n=!0,fullWidth:r=!1,title:i=``,cancelText:a=`Cancel`,onClickCancel:o=e=>e&&e(),okText:s=`Ok`,onClickOk:c=()=>{},disableConfirmButton:l=!1,overflowContainer:u=!1,testId:d=void 0})=>{let f=(0,p.jsx)(pQ,{title:i,okText:s,onClickOk:c,disableConfirmButton:l,cancelText:a,onClickCancel:o,testId:d});return(0,p.jsx)(ix,{content:f,placement:t,closeOnOutsideClick:n,fullWidth:r,overflowContainer:u,testId:d,children:e})},hQ=(0,f.createContext)({dragDropManager:void 0});function gQ(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var _Q=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),vQ=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},yQ={INIT:`@@redux/INIT`+vQ(),REPLACE:`@@redux/REPLACE`+vQ(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+vQ()}};function bQ(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function xQ(e){if(e===void 0)return`undefined`;if(e===null)return`null`;var t=typeof e;switch(t){case`boolean`:case`string`:case`number`:case`symbol`:case`function`:return t}if(Array.isArray(e))return`array`;if(wQ(e))return`date`;if(CQ(e))return`error`;var n=SQ(e);switch(n){case`Symbol`:case`Promise`:case`WeakMap`:case`WeakSet`:case`Map`:case`Set`:return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,``)}function SQ(e){return typeof e.constructor==`function`?e.constructor.name:null}function CQ(e){return e instanceof Error||typeof e.message==`string`&&e.constructor&&typeof e.constructor.stackTraceLimit==`number`}function wQ(e){return e instanceof Date?!0:typeof e.toDateString==`function`&&typeof e.getDate==`function`&&typeof e.setDate==`function`}function TQ(e){var t=typeof e;return process.env.NODE_ENV!==`production`&&(t=xQ(e)),t}function EQ(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(process.env.NODE_ENV===`production`?gQ(0):`It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.`);if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(process.env.NODE_ENV===`production`?gQ(1):`Expected the enhancer to be a function. Instead, received: '`+TQ(n)+`'`);return n(EQ)(e,t)}if(typeof e!=`function`)throw Error(process.env.NODE_ENV===`production`?gQ(2):`Expected the root reducer to be a function. Instead, received: '`+TQ(e)+`'`);var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(process.env.NODE_ENV===`production`?gQ(3):`You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.`);return a}function d(e){if(typeof e!=`function`)throw Error(process.env.NODE_ENV===`production`?gQ(4):`Expected the listener to be a function. Instead, received: '`+TQ(e)+`'`);if(c)throw Error(process.env.NODE_ENV===`production`?gQ(5):`You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.`);var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(process.env.NODE_ENV===`production`?gQ(6):`You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.`);t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!bQ(e))throw Error(process.env.NODE_ENV===`production`?gQ(7):`Actions must be plain objects. Instead, the actual type was: '`+TQ(e)+`'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(e.type===void 0)throw Error(process.env.NODE_ENV===`production`?gQ(8):`Actions may not have an undefined "type" property. You may have misspelled an action type string constant.`);if(c)throw Error(process.env.NODE_ENV===`production`?gQ(9):`Reducers may not dispatch actions.`);try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(process.env.NODE_ENV===`production`?gQ(10):`Expected the nextReducer to be a function. Instead, received: '`+TQ(e));i=e,f({type:yQ.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(process.env.NODE_ENV===`production`?gQ(11):`Expected the observer to be an object. Instead, received: '`+TQ(e)+`'`);function n(){e.next&&e.next(u())}n();var r=t(n);return{unsubscribe:r}}},e[_Q]=function(){return this},e}return f({type:yQ.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[_Q]=m,r}function DQ(e,t,...n){if(OQ()&&t===void 0)throw Error(`invariant requires an error message argument`);if(!e){let e;if(t===void 0)e=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{let r=0;e=Error(t.replace(/%s/g,function(){return n[r++]})),e.name=`Invariant Violation`}throw e.framesToPop=1,e}}function OQ(){return typeof process<`u`&&process.env.NODE_ENV===`production`}function kQ(e,t,n){return t.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:n||null,e)}function AQ(e,t){return e.filter(e=>e!==t)}function jQ(e){return typeof e==`object`}function MQ(e,t){let n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);let i=[];return n.forEach((e,t)=>{e===1&&i.push(t)}),i}function NQ(e,t){return e.filter(e=>t.indexOf(e)>-1)}const PQ=`dnd-core/INIT_COORDS`,FQ=`dnd-core/BEGIN_DRAG`,IQ=`dnd-core/PUBLISH_DRAG_SOURCE`,LQ=`dnd-core/HOVER`,RQ=`dnd-core/DROP`,zQ=`dnd-core/END_DRAG`;function BQ(e,t){return{type:PQ,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const VQ={type:PQ,payload:{clientOffset:null,sourceClientOffset:null}};function HQ(e){return function(t=[],n={publishSource:!0}){let{publishSource:r=!0,clientOffset:i,getSourceClientOffset:a}=n,o=e.getMonitor(),s=e.getRegistry();e.dispatch(BQ(i)),UQ(t,o,s);let c=KQ(t,o);if(c==null){e.dispatch(VQ);return}let l=null;if(i){if(!a)throw Error(`getSourceClientOffset must be defined`);WQ(a),l=a(c)}e.dispatch(BQ(i,l));let u=s.getSource(c),d=u.beginDrag(o,c);if(d==null)return;GQ(d),s.pinSource(c);let f=s.getSourceType(c);return{type:FQ,payload:{itemType:f,item:d,sourceId:c,clientOffset:i||null,sourceClientOffset:l||null,isSourcePublic:!!r}}}}function UQ(e,t,n){DQ(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){DQ(n.getSource(e),`Expected sourceIds to be registered.`)})}function WQ(e){DQ(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function GQ(e){DQ(jQ(e),`Item must be an object.`)}function KQ(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function qQ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){qQ(e,t,n[t])})}return e}function YQ(e){return function(t={}){let n=e.getMonitor(),r=e.getRegistry();XQ(n);let i=$Q(n);i.forEach((i,a)=>{let o=ZQ(i,a,r,n),s={type:RQ,payload:{dropResult:JQ({},t,o)}};e.dispatch(s)})}}function XQ(e){DQ(e.isDragging(),`Cannot call drop while not dragging.`),DQ(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function ZQ(e,t,n,r){let i=n.getTarget(e),a=i?i.drop(r,e):void 0;return QQ(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function QQ(e){DQ(e===void 0||jQ(e),`Drop result must either be an object or undefined.`)}function $Q(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function e$(e){return function(){let t=e.getMonitor(),n=e.getRegistry();t$(t);let r=t.getSourceId();if(r!=null){let e=n.getSource(r,!0);e.endDrag(t,r),n.unpinSource()}return{type:zQ}}}function t$(e){DQ(e.isDragging(),`Cannot call endDrag while not dragging.`)}function n$(e,t){return t===null?e===null:Array.isArray(e)?e.some(e=>e===t):e===t}function r$(e){return function(t,{clientOffset:n}={}){i$(t);let r=t.slice(0),i=e.getMonitor(),a=e.getRegistry(),o=i.getItemType();return o$(r,a,o),a$(r,i,a),s$(r,i,a),{type:LQ,payload:{targetIds:r,clientOffset:n||null}}}}function i$(e){DQ(Array.isArray(e),`Expected targetIds to be an array.`)}function a$(e,t,n){DQ(t.isDragging(),`Cannot call hover while not dragging.`),DQ(!t.didDrop(),`Cannot call hover after drop.`);for(let t=0;t<e.length;t++){let r=e[t];DQ(e.lastIndexOf(r)===t,`Expected targetIds to be unique in the passed array.`);let i=n.getTarget(r);DQ(i,`Expected targetIds to be registered.`)}}function o$(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r],a=t.getTargetType(i);n$(a,n)||e.splice(r,1)}}function s$(e,t,n){e.forEach(function(e){let r=n.getTarget(e);r.hover(t,e)})}function c$(e){return function(){let t=e.getMonitor();if(t.isDragging())return{type:IQ}}}function l$(e){return{beginDrag:HQ(e),publishDragSource:c$(e),hover:r$(e),drop:YQ(e),endDrag:e$(e)}}var u$=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function n(n){return(...r)=>{let i=n.apply(e,r);i!==void 0&&t(i)}}let r=l$(this);return Object.keys(r).reduce((e,t)=>{let i=r[t];return e[t]=n(i),e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function d$(e,t){return{x:e.x+t.x,y:e.y+t.y}}function f$(e,t){return{x:e.x-t.x,y:e.y-t.y}}function p$(e){let{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:f$(d$(t,r),n)}function m$(e){let{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:f$(t,n)}const h$=[],g$=[];h$.__IS_NONE__=!0,g$.__IS_ALL__=!0;function _$(e,t){if(e===h$)return!1;if(e===g$||t===void 0)return!0;let n=NQ(t,e);return n.length>0}var v$=class{subscribeToStateChange(e,t={}){let{handlerIds:n}=t;DQ(typeof e==`function`,`listener must be a function.`),DQ(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);let r=this.store.getState().stateId,i=()=>{let t=this.store.getState(),i=t.stateId;try{let a=i===r||i===r+1&&!_$(t.dirtyHandlerIds,n);a||e()}finally{r=i}};return this.store.subscribe(i)}subscribeToOffsetChange(e){DQ(typeof e==`function`,`listener must be a function.`);let t=this.store.getState().dragOffset,n=()=>{let n=this.store.getState().dragOffset;n!==t&&(t=n,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return DQ(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);if(DQ(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;let n=this.registry.getTargetType(e),r=this.getItemType();return n$(n,r)&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);if(DQ(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;let n=this.registry.getSourceType(e),r=this.getItemType();return n===r?t.isDragging(this,e):!1}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:n}=t;if(!this.isDragging())return!1;let r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!n$(r,i))return!1;let a=this.getTargetIds();if(!a.length)return!1;let o=a.indexOf(e);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return p$(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return m$(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}};const y$=typeof global<`u`?global:self,b$=y$.MutationObserver||y$.WebKitMutationObserver;function x$(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function S$(e){let t=1,n=new b$(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const C$=typeof b$==`function`?S$:x$;var w$=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=C$(this.flush),this.requestErrorThrow=x$(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},T$=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},E$=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new T$(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}};const D$=new w$,O$=new E$(D$.registerPendingError);function k$(e){D$.enqueueTask(O$.create(e))}const A$=`dnd-core/ADD_SOURCE`,j$=`dnd-core/ADD_TARGET`,M$=`dnd-core/REMOVE_SOURCE`,N$=`dnd-core/REMOVE_TARGET`;function P$(e){return{type:A$,payload:{sourceId:e}}}function F$(e){return{type:j$,payload:{targetId:e}}}function I$(e){return{type:M$,payload:{sourceId:e}}}function L$(e){return{type:N$,payload:{targetId:e}}}function R$(e){DQ(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),DQ(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),DQ(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function z$(e){DQ(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),DQ(typeof e.hover==`function`,`Expected hover to be a function.`),DQ(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function B$(e,t){if(t&&Array.isArray(e)){e.forEach(e=>B$(e,!1));return}DQ(typeof e==`string`||typeof e==`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var V$;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(V$||={});let H$=0;function U$(){return H$++}function W$(e){let t=U$().toString();switch(e){case V$.SOURCE:return`S${t}`;case V$.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function G$(e){switch(e[0]){case`S`:return V$.SOURCE;case`T`:return V$.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function K$(e,t){let n=e.entries(),r=!1;do{let{done:e,value:[,i]}=n.next();if(i===t)return!0;r=!!e}while(!r);return!1}var q$=class{addSource(e,t){B$(e),R$(t);let n=this.addHandler(V$.SOURCE,e,t);return this.store.dispatch(P$(n)),n}addTarget(e,t){B$(e,!0),z$(t);let n=this.addHandler(V$.TARGET,e,t);return this.store.dispatch(F$(n)),n}containsHandler(e){return K$(this.dragSources,e)||K$(this.dropTargets,e)}getSource(e,t=!1){DQ(this.isSourceId(e),`Expected a valid source ID.`);let n=t&&e===this.pinnedSourceId,r=n?this.pinnedSource:this.dragSources.get(e);return r}getTarget(e){return DQ(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}getSourceType(e){return DQ(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}getTargetType(e){return DQ(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}isSourceId(e){let t=G$(e);return t===V$.SOURCE}isTargetId(e){let t=G$(e);return t===V$.TARGET}removeSource(e){DQ(this.getSource(e),`Expected an existing source.`),this.store.dispatch(I$(e)),k$(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){DQ(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(L$(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);DQ(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){DQ(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){let r=W$(e);return this.types.set(r,t),e===V$.SOURCE?this.dragSources.set(r,n):e===V$.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}};const J$=(e,t)=>e===t;function Y$(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function X$(e,t,n=J$){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function Z$(e=h$,t){switch(t.type){case LQ:break;case A$:case j$:case N$:case M$:return h$;case FQ:case IQ:case zQ:case RQ:default:return g$}let{targetIds:n=[],prevTargetIds:r=[]}=t.payload,i=MQ(n,r),a=i.length>0||!X$(n,r);if(!a)return h$;let o=r[r.length-1],s=n[n.length-1];return o!==s&&(o&&i.push(o),s&&i.push(s)),i}function Q$(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Q$(e,t,n[t])})}return e}const e1={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function t1(e=e1,t){let{payload:n}=t;switch(t.type){case PQ:case FQ:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case LQ:return Y$(e.clientOffset,n.clientOffset)?e:$$({},e,{clientOffset:n.clientOffset});case zQ:case RQ:return e1;default:return e}}function n1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){n1(e,t,n[t])})}return e}const i1={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function a1(e=i1,t){let{payload:n}=t;switch(t.type){case FQ:return r1({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case IQ:return r1({},e,{isSourcePublic:!0});case LQ:return r1({},e,{targetIds:n.targetIds});case N$:return e.targetIds.indexOf(n.targetId)===-1?e:r1({},e,{targetIds:AQ(e.targetIds,n.targetId)});case RQ:return r1({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case zQ:return r1({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function o1(e=0,t){switch(t.type){case A$:case j$:return e+1;case M$:case N$:return e-1;default:return e}}function s1(e=0){return e+1}function c1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){c1(e,t,n[t])})}return e}function u1(e={},t){return{dirtyHandlerIds:Z$(e.dirtyHandlerIds,{type:t.type,payload:l1({},t.payload,{prevTargetIds:kQ(e,`dragOperation.targetIds`,[])})}),dragOffset:t1(e.dragOffset,t),refCount:o1(e.refCount,t),dragOperation:a1(e.dragOperation,t),stateId:s1(e.stateId)}}function d1(e,t=void 0,n={},r=!1){let i=f1(r),a=new v$(i,new q$(i)),o=new u$(i,a),s=e(o,t,n);return o.receiveBackend(s),o}function f1(e){let t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return EQ(u1,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}function p1(e,t){if(e==null)return{};var n=m1(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function m1(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}let h1=0;const g1=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`);var _1=(0,f.memo)(function(e){var{children:t}=e,n=p1(e,[`children`]);let[r,i]=v1(n);return(0,f.useEffect)(()=>{if(i){let e=b1();return++h1,()=>{--h1===0&&(e[g1]=null)}}},[]),(0,p.jsx)(hQ.Provider,{value:r,children:t})});function v1(e){if(`manager`in e){let t={dragDropManager:e.manager};return[t,!1]}let t=y1(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function y1(e,t=b1(),n,r){let i=t;return i[g1]||(i[g1]={dragDropManager:d1(e,t,n,r)}),i[g1]}function b1(){return typeof global<`u`?global:window}const x1=typeof window<`u`?f.useLayoutEffect:f.useEffect;var S1=u(MC());function C1(e,t,n){let[r,i]=(0,f.useState)(()=>t(e)),a=(0,f.useCallback)(()=>{let a=t(e);(0,S1.default)(r,a)||(i(a),n&&n())},[r,e,n]);return x1(a),[r,a]}function w1(e,t,n){let[r,i]=C1(e,t,n);return x1(function(){let t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(i,{handlerIds:[t]})},[e,i]),r}function T1(e,t,n){return w1(t,e||(()=>({})),()=>n.reconnect())}function E1(e,t){let n=[...t||[]];return t==null&&typeof e!=`function`&&n.push(e),(0,f.useMemo)(()=>typeof e==`function`?e():e,n)}function D1(e){return(0,f.useMemo)(()=>e.hooks.dragSource(),[e])}function O1(e){return(0,f.useMemo)(()=>e.hooks.dragPreview(),[e])}let k1=!1,A1=!1;var j1=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){DQ(!k1,`You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return k1=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{k1=!1}}isDragging(){if(!this.sourceId)return!1;DQ(!A1,`You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return A1=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{A1=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}};let M1=!1;var N1=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;DQ(!M1,`You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor`);try{return M1=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{M1=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function P1(e,t,n){let r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function F1(e,t,n){let r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function I1(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;let s=Object.prototype.hasOwnProperty.bind(t);for(let o=0;o<a.length;o++){let c=a[o];if(!s(c))return!1;let l=e[c],u=t[c];if(i=n?n.call(r,l,u,c):void 0,i===!1||i===void 0&&l!==u)return!1}return!0}function L1(e){return typeof e==`object`&&!!e&&Object.prototype.hasOwnProperty.call(e,`current`)}function R1(e){if(typeof e.type==`string`)return;let t=e.type.displayName||e.type.name||`the component`;throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function z1(e){return(t=null,n=null)=>{if(!(0,f.isValidElement)(t)){let r=t;return e(r,n),r}let r=t;R1(r);let i=n?t=>e(t,n):e;return H1(r,i)}}function B1(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{let e=z1(r);t[n]=()=>e}}),t}function V1(e,t){typeof e==`function`?e(t):e.current=t}function H1(e,t){let n=e.ref;return DQ(typeof n!=`string`,`Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs`),n?(0,f.cloneElement)(e,{ref:e=>{V1(n,e),V1(t,e)}}):(0,f.cloneElement)(e,{ref:t})}var U1=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!I1(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!I1(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=B1({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,L1(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,L1(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},W1=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!I1(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=B1({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,L1(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function G1(){let{dragDropManager:e}=(0,f.useContext)(hQ);return DQ(e!=null,`Expected drag drop context`),e}function K1(e,t){let n=G1(),r=(0,f.useMemo)(()=>new U1(n.getBackend()),[n]);return x1(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),x1(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function q1(){let e=G1();return(0,f.useMemo)(()=>new j1(e),[e])}var J1=class{beginDrag(){let e=this.spec,t=this.monitor,n=null;return n=typeof e.item==`object`?e.item:typeof e.item==`function`?e.item(t):{},n??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag==`boolean`?e.canDrag:typeof e.canDrag==`function`?e.canDrag(t):!0}isDragging(e,t){let n=this.spec,r=this.monitor,{isDragging:i}=n;return i?i(r):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}};function Y1(e,t,n){let r=(0,f.useMemo)(()=>new J1(e,t,n),[t,n]);return(0,f.useEffect)(()=>{r.spec=e},[e]),r}function X1(e){return(0,f.useMemo)(()=>{let t=e.type;return DQ(t!=null,`spec.type must be defined`),t},[e])}function Z1(e,t,n){let r=G1(),i=Y1(e,t,n),a=X1(e);x1(function(){if(a!=null){let[e,o]=F1(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o}},[r,t,n,i,a])}function Q1(e,t){let n=E1(e,t);DQ(!n.begin,`useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)`);let r=q1(),i=K1(n.options,n.previewOptions);return Z1(n,r,i),[T1(n.collect,r,i),D1(i),O1(i)]}function $1(e){let t=G1(),n=t.getMonitor(),[r,i]=C1(n,e);return(0,f.useEffect)(()=>n.subscribeToOffsetChange(i)),(0,f.useEffect)(()=>n.subscribeToStateChange(i)),r}function e0(e){return(0,f.useMemo)(()=>e.hooks.dropTarget(),[e])}function t0(e){let t=G1(),n=(0,f.useMemo)(()=>new W1(t.getBackend()),[t]);return x1(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function n0(){let e=G1();return(0,f.useMemo)(()=>new N1(e),[e])}function r0(e){let{accept:t}=e;return(0,f.useMemo)(()=>(DQ(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]),[t])}var i0=class{canDrop(){let e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function a0(e,t){let n=(0,f.useMemo)(()=>new i0(e,t),[t]);return(0,f.useEffect)(()=>{n.spec=e},[e]),n}function o0(e,t,n){let r=G1(),i=a0(e,t),a=r0(e);x1(function(){let[e,o]=P1(a,i,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),o},[r,t,i,n,a.map(e=>e.toString()).join(`|`)])}function s0(e,t){let n=E1(e,t),r=n0(),i=t0(n.options);return o0(n,r,i),[T1(n.collect,r,i),e0(i)]}function c0(e){let t=null,n=()=>(t??=e(),t);return n}function l0(e,t){return e.filter(e=>e!==t)}function u0(e,t){let n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);let i=[];return n.forEach(e=>i.push(e)),i}var d0=class{enter(e){let t=this.entered.length,n=t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e));return this.entered=u0(this.entered.filter(n),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=l0(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},f0=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(n=>{let r=this.config.exposeProperties[n];r!=null&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},p0={};c(p0,{FILE:()=>m0,HTML:()=>_0,TEXT:()=>g0,URL:()=>h0});const m0=`__NATIVE_FILE__`,h0=`__NATIVE_URL__`,g0=`__NATIVE_TEXT__`,_0=`__NATIVE_HTML__`;function v0(e,t,n){let r=t.reduce((t,n)=>t||e.getData(n),``);return r??n}const y0={[m0]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:[`Files`]},[_0]:{exposeProperties:{html:(e,t)=>v0(e,t,``),dataTransfer:e=>e},matchesTypes:[`Html`,`text/html`]},[h0]:{exposeProperties:{urls:(e,t)=>v0(e,t,``).split(`
|
|
339
|
+
`),dataTransfer:e=>e},matchesTypes:[`Url`,`text/uri-list`]},[g0]:{exposeProperties:{text:(e,t)=>v0(e,t,``),dataTransfer:e=>e},matchesTypes:[`Text`,`text/plain`]}};function b0(e,t){let n=y0[e];if(!n)throw Error(`native type ${e} has no configuration`);let r=new f0(n);return r.loadDataTransfer(t),r}function x0(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(y0).filter(e=>{let n=y0[e];return n?.matchesTypes?n.matchesTypes.some(e=>t.indexOf(e)>-1):!1})[0]||null}const S0=c0(()=>/firefox/i.test(navigator.userAgent)),C0=c0(()=>!!window.safari);var w0=class{interpolate(e){let{xs:t,ys:n,c1s:r,c2s:i,c3s:a}=this,o=t.length-1;if(e===t[o])return n[o];let s=0,c=a.length-1,l;for(;s<=c;){l=Math.floor(.5*(s+c));let r=t[l];if(r<e)s=l+1;else if(r>e)c=l-1;else return n[l]}o=Math.max(0,c);let u=e-t[o],d=u*u;return n[o]+r[o]*u+i[o]*d+a[o]*u*d}constructor(e,t){let{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);let i=[],a=[],o=[],s,c;for(let r=0;r<n-1;r++)s=e[r+1]-e[r],c=t[r+1]-t[r],a.push(s),i.push(c),o.push(c/s);let l=[o[0]];for(let e=0;e<a.length-1;e++){let t=o[e],n=o[e+1];if(t*n<=0)l.push(0);else{s=a[e];let r=a[e+1],i=s+r;l.push(3*i/((i+r)/t+(i+s)/n))}}l.push(o[o.length-1]);let u=[],d=[],f;for(let e=0;e<l.length-1;e++){f=o[e];let t=l[e],n=1/a[e],r=t+l[e+1]-f-f;u.push((f-t-r)*n),d.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=d}};const Lpe=1;function T0(e){let t=e.nodeType===1?e:e.parentElement;if(!t)return null;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function E0(e){return{x:e.clientX,y:e.clientY}}function D0(e){var t;return e.nodeName===`IMG`&&(S0()||!(t=document.documentElement)?.contains(e))}function O0(e,t,n,r){let i=e?t.width:n,a=e?t.height:r;return C0()&&e&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function k0(e,t,n,r,i){let a=D0(t),o=a?e:t,s=T0(o),c={x:n.x-s.x,y:n.y-s.y},{offsetWidth:l,offsetHeight:u}=e,{anchorX:d,anchorY:f}=r,{dragPreviewWidth:p,dragPreviewHeight:m}=O0(a,t,l,u),h=()=>{let e=new w0([0,.5,1],[c.y,c.y/u*m,c.y+m-u]),t=e.interpolate(f);return C0()&&a&&(t+=(window.devicePixelRatio-1)*m),t},g=()=>{let e=new w0([0,.5,1],[c.x,c.x/l*p,c.x+p-l]);return e.interpolate(d)},{offsetX:_,offsetY:v}=i,y=_===0||_,b=v===0||v;return{x:y?_:g(),y:b?v:h()}}var A0=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<`u`)return window}get document(){var e;if((e=this.globalContext)?.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return(e=this.optionsArgs)?.rootElement||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function j0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){j0(e,t,n[t])})}return e}var N0=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(e=this.dragStartSourceIds)?.length||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(t=this.dragOverTargetIds)?.length||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error(`Cannot have two HTML5 backends at the same time.`);e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);let r=t=>this.handleDragStart(t,e),i=e=>this.handleSelectStart(e);return t.setAttribute(`draggable`,`true`),t.addEventListener(`dragstart`,r),t.addEventListener(`selectstart`,i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener(`dragstart`,r),t.removeEventListener(`selectstart`,i),t.setAttribute(`draggable`,`false`)}}connectDropTarget(e,t){let n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),i=t=>this.handleDrop(t,e);return t.addEventListener(`dragenter`,n),t.addEventListener(`dragover`,r),t.addEventListener(`drop`,i),()=>{t.removeEventListener(`dragenter`,n),t.removeEventListener(`dragover`,r),t.removeEventListener(`drop`,i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener(`dragstart`,this.handleTopDragStart),e.addEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.addEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.addEventListener(`dragenter`,this.handleTopDragEnter),e.addEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.addEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.addEventListener(`dragover`,this.handleTopDragOver),e.addEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.addEventListener(`drop`,this.handleTopDrop),e.addEventListener(`drop`,this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener(`dragstart`,this.handleTopDragStart),e.removeEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.removeEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.removeEventListener(`dragenter`,this.handleTopDragEnter),e.removeEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.removeEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.removeEventListener(`dragover`,this.handleTopDragOver),e.removeEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.removeEventListener(`drop`,this.handleTopDrop),e.removeEventListener(`drop`,this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return M0({dropEffect:this.altKeyPressed?`copy`:`move`},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?`copy`:this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourcePreviewNodeOptions.get(e);return M0({anchorX:.5,anchorY:.5,captureDraggingState:!1},t||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(p0).some(t=>p0[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=b0(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return(e=this.rootElement)?.addEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||=[],this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&T0(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>!!(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{let e=this.currentDragSourceNode;e==null||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{this.hoverRafId===null&&typeof requestAnimationFrame<`u`&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<`u`&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;let{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;let n=E0(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});let{dataTransfer:r}=e,i=x0(r);if(this.monitor.isDragging()){if(r&&typeof r.setDragImage==`function`){let e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),i=this.sourcePreviewNodes.get(e)||t;if(i){let{anchorX:e,anchorY:a,offsetX:o,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c={anchorX:e,anchorY:a},l={offsetX:o,offsetY:s},u=k0(t,i,n,c,l);r.setDragImage(i,u.x,u.y)}}try{r?.setData(`application/json`,{})}catch{}this.setCurrentDragSourceNode(e.target);let{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(i)this.beginDragNativeItem(i);else if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute(`draggable`)))return;else e.preventDefault()},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}let n=this.enterLeaveCounter.enter(e.target);if(!n||this.monitor.isDragging())return;let{dataTransfer:r}=e,i=x0(r);i&&this.beginDragNativeItem(i,r)},this.handleTopDragEnter=e=>{let{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:E0(e)});let n=t.some(e=>this.monitor.canDropOnTarget(e));n&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}},this.handleTopDragOver=e=>{let{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`);return}this.altKeyPressed=e.altKey,this.lastClientOffset=E0(e),this.scheduleHover(t);let n=(t||[]).some(e=>this.monitor.canDropOnTarget(e));n?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();let t=this.enterLeaveCounter.leave(e.target);t&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var t;e.preventDefault(),(t=this.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}else x0(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{let{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:E0(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{let t=e.target;typeof t.dragDrop==`function`&&(t.tagName===`INPUT`||t.tagName===`SELECT`||t.tagName===`TEXTAREA`||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new A0(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new d0(this.isNodeInDocument)}};let P0;function F0(){return P0||(P0=new Image,P0.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`),P0}const I0=function(e,t,n){return new N0(e,t,n)};var L0=[],R0=function(){return L0.some(function(e){return e.activeTargets.length>0})},z0=function(){return L0.some(function(e){return e.skippedTargets.length>0})},B0=`ResizeObserver loop completed with undelivered notifications.`,V0=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:B0}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=B0),window.dispatchEvent(e)},H0;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(H0||={});var U0=function(e){return Object.freeze(e)},W0=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,U0(this)}return e}(),G0=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,U0(this)}return e.prototype.toJSON=function(){var e=this,t=e.x,n=e.y,r=e.top,i=e.right,a=e.bottom,o=e.left,s=e.width,c=e.height;return{x:t,y:n,top:r,right:i,bottom:a,left:o,width:s,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),K0=function(e){return e instanceof SVGElement&&`getBBox`in e},q0=function(e){if(K0(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},J0=function(e){var t;if(e instanceof Element)return!0;var n=(t=e?.ownerDocument)?.defaultView;return!!(n&&e instanceof n.Element)},Y0=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},X0=typeof window<`u`?window:{},Z0=new WeakMap,Q0=/auto|scroll/,$0=/^tb|vertical/,e2=/msie|trident/i.test(X0.navigator&&X0.navigator.userAgent),t2=function(e){return parseFloat(e||`0`)},n2=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new W0((n?t:e)||0,(n?e:t)||0)},r2=U0({devicePixelContentBoxSize:n2(),borderBoxSize:n2(),contentBoxSize:n2(),contentRect:new G0(0,0,0,0)}),i2=function(e,t){if(t===void 0&&(t=!1),Z0.has(e)&&!t)return Z0.get(e);if(q0(e))return Z0.set(e,r2),r2;var n=getComputedStyle(e),r=K0(e)&&e.ownerSVGElement&&e.getBBox(),i=!e2&&n.boxSizing===`border-box`,a=$0.test(n.writingMode||``),o=!r&&Q0.test(n.overflowY||``),s=!r&&Q0.test(n.overflowX||``),c=r?0:t2(n.paddingTop),l=r?0:t2(n.paddingRight),u=r?0:t2(n.paddingBottom),d=r?0:t2(n.paddingLeft),f=r?0:t2(n.borderTopWidth),p=r?0:t2(n.borderRightWidth),m=r?0:t2(n.borderBottomWidth),h=r?0:t2(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:t2(n.width)-S-x,T=r?r.height:t2(n.height)-C-b,E=w+g+x+v,D=T+_+b+y,O=U0({devicePixelContentBoxSize:n2(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:n2(E,D,a),contentBoxSize:n2(w,T,a),contentRect:new G0(d,c,w,T)});return Z0.set(e,O),O},a2=function(e,t,n){var r=i2(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case H0.DEVICE_PIXEL_CONTENT_BOX:return o;case H0.BORDER_BOX:return i;default:return a}},o2=function(){function e(e){var t=i2(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=U0([t.borderBoxSize]),this.contentBoxSize=U0([t.contentBoxSize]),this.devicePixelContentBoxSize=U0([t.devicePixelContentBoxSize])}return e}(),s2=function(e){if(q0(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},c2=function(){var e=1/0,t=[];L0.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new o2(t.target),i=s2(t.target);r.push(n),t.lastReportedSize=a2(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},l2=function(e){L0.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(s2(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},u2=function(){var e=0;for(l2(e);R0();)e=c2(),l2(e);return z0()&&V0(),e>0},d2,f2=[],p2=function(){return f2.splice(0).forEach(function(e){return e()})},m2=function(e){if(!d2){var t=0,n=document.createTextNode(``),r={characterData:!0};new MutationObserver(function(){return p2()}).observe(n,r),d2=function(){n.textContent=`${t?t--:t++}`}}f2.push(e),d2()},h2=function(e){m2(function(){requestAnimationFrame(e)})},g2=0,_2=function(){return!!g2},v2=250,y2={attributes:!0,characterData:!0,childList:!0,subtree:!0},b2=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],x2=function(e){return e===void 0&&(e=0),Date.now()+e},S2=!1,C2=function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=v2),!S2){S2=!0;var n=x2(e);h2(function(){var r=!1;try{r=u2()}finally{if(S2=!1,e=n-x2(),!_2())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,y2)};document.body?t():X0.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),b2.forEach(function(t){return X0.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),b2.forEach(function(t){return X0.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}(),w2=new C2,T2=function(e){!g2&&e>0&&w2.start(),g2+=e,!g2&&w2.stop()},E2=function(e){return!K0(e)&&!Y0(e)&&getComputedStyle(e).display===`inline`},D2=function(){function e(e,t){this.target=e,this.observedBox=t||H0.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=a2(this.target,this.observedBox,!0);return E2(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),O2=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),k2=new WeakMap,A2=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},j2=function(){function e(){}return e.connect=function(e,t){var n=new O2(e,t);k2.set(e,n)},e.observe=function(e,t,n){var r=k2.get(e),i=r.observationTargets.length===0;A2(r.observationTargets,t)<0&&(i&&L0.push(r),r.observationTargets.push(new D2(t,n&&n.box)),T2(1),w2.schedule())},e.unobserve=function(e,t){var n=k2.get(e),r=A2(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&L0.splice(L0.indexOf(n),1),n.observationTargets.splice(r,1),T2(-1))},e.disconnect=function(e){var t=this,n=k2.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),M2=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);j2.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!J0(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);j2.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!J0(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);j2.unobserve(this,e)},e.prototype.disconnect=function(){j2.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}();const N2=(0,f.createContext)({});function P2(e){let t=(0,f.useRef)(null);return t.current===null&&(t.current=e()),t.current}const F2=(0,f.createContext)(null),I2=(0,f.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function L2(e=!0){let t=(0,f.useContext)(F2);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,f.useId)();(0,f.useEffect)(()=>{e&&i(a)},[e]);let o=(0,f.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const R2=typeof window<`u`,z2=R2?f.useLayoutEffect:f.useEffect,B2=e=>e;let V2=B2,H2=B2;process.env.NODE_ENV!==`production`&&(V2=(e,t)=>{!e&&typeof console<`u`&&console.warn(t)},H2=(e,t)=>{if(!e)throw Error(t)});function U2(e){let t;return()=>(t===void 0&&(t=e()),t)}const W2=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},G2=e=>e*1e3,K2=e=>e/1e3,q2={skipAnimations:!1,useManualTiming:!1};function J2(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r,c=s?t:n;return i&&a.add(e),c.has(e)||c.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}const Y2=[`read`,`resolveKeyframes`,`update`,`preRender`,`render`,`postRender`],Rpe=40;function X2(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Y2.reduce((e,t)=>(e[t]=J2(a),e),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:f}=o,p=()=>{let a=q2.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,40),1),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)},h=Y2.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||m(),r.schedule(e,t,i)),e},{}),g=e=>{for(let t=0;t<Y2.length;t++)o[Y2[t]].cancel(e)};return{schedule:h,cancel:g,state:i,steps:o}}const{schedule:Z2,cancel:Q2,state:$2,steps:e4}=X2(typeof requestAnimationFrame<`u`?requestAnimationFrame:B2,!0),t4=(0,f.createContext)({strict:!1}),n4={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},r4={};for(let e in n4)r4[e]={isEnabled:t=>n4[e].some(e=>!!t[e])};function i4(e){for(let t in e)r4[t]={...r4[t],...e[t]}}const a4=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function o4(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||a4.has(e)}let s4=e=>!o4(e);function c4(e){e&&(s4=t=>t.startsWith(`on`)?!o4(t):e(t))}try{c4((Cc(),d(bc)).default)}catch{}function l4(e,t,n){let r={};for(let i in e){if(i===`values`&&typeof e.values==`object`)continue;(s4(i)||n===!0&&o4(i)||!t&&!o4(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i])}return r}const u4=new Set;function d4(e,t,n){e||u4.has(t)||(console.warn(t),n&&console.warn(n),u4.add(t))}function f4(e){if(typeof Proxy>`u`)return e;let t=new Map,n=(...t)=>(process.env.NODE_ENV!==`production`&&d4(!1,`motion() is deprecated. Use motion.create() instead.`),e(...t));return new Proxy(n,{get:(n,r)=>r===`create`?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const p4=(0,f.createContext)({});function m4(e){return typeof e==`string`||Array.isArray(e)}function h4(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}const g4=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],_4=[`initial`,...g4];function v4(e){return h4(e.animate)||_4.some(t=>m4(e[t]))}function y4(e){return!!(v4(e)||e.variants)}function b4(e,t){if(v4(e)){let{initial:t,animate:n}=e;return{initial:t===!1||m4(t)?t:void 0,animate:m4(n)?n:void 0}}return e.inherit===!1?{}:t}function x4(e){let{initial:t,animate:n}=b4(e,(0,f.useContext)(p4));return(0,f.useMemo)(()=>({initial:t,animate:n}),[S4(t),S4(n)])}function S4(e){return Array.isArray(e)?e.join(` `):e}const C4=Symbol.for(`motionComponentSymbol`);function w4(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function T4(e,t,n){return(0,f.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):w4(n)&&(n.current=r))},[t])}const E4=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),zpe=`framerAppearId`,D4=`data-`+E4(`framerAppearId`),{schedule:O4,cancel:Bpe}=X2(queueMicrotask,!1),k4=(0,f.createContext)({});function A4(e,t,n,r,i){var a,o;let{visualElement:s}=(0,f.useContext)(p4),c=(0,f.useContext)(t4),l=(0,f.useContext)(F2),u=(0,f.useContext)(I2).reducedMotion,d=(0,f.useRef)(null);r||=c.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));let p=d.current,m=(0,f.useContext)(k4);p&&!p.projection&&i&&(p.type===`html`||p.type===`svg`)&&j4(d.current,n,i,m);let h=(0,f.useRef)(!1);(0,f.useInsertionEffect)(()=>{p&&h.current&&p.update(n,l)});let g=n[D4],_=(0,f.useRef)(!!g&&!(a=window.MotionHandoffIsComplete)?.call(window,g)&&(o=window.MotionHasOptimisedAnimation)?.call(window,g));return z2(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),O4.render(p.render),_.current&&p.animationState&&p.animationState.animateChanges())}),(0,f.useEffect)(()=>{p&&(!_.current&&p.animationState&&p.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var e;(e=window.MotionHandoffMarkAsComplete)==null||e.call(window,g)}),_.current=!1))}),p}function j4(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:M4(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&w4(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function M4(e){if(e)return e.options.allowProjection===!1?M4(e.parent):e.projection}function N4({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var a,o;e&&i4(e);function s(a,o){let s,c={...(0,f.useContext)(I2),...a,layoutId:P4(a)},{isStatic:l}=c,u=x4(a),d=r(a,l);if(!l&&R2){F4(c,e);let n=I4(c);s=n.MeasureLayout,u.visualElement=A4(i,d,c,t,n.ProjectionNode)}return(0,p.jsxs)(p4.Provider,{value:u,children:[s&&u.visualElement?(0,p.jsx)(s,{visualElement:u.visualElement,...c}):null,n(i,a,T4(d,u.visualElement,o),d,l,u.visualElement)]})}s.displayName=`motion.${typeof i==`string`?i:`create(${(o=(a=i.displayName)??i.name)??``})`}`;let c=(0,f.forwardRef)(s);return c[C4]=i,c}function P4({layoutId:e}){let t=(0,f.useContext)(N2).id;return t&&e!==void 0?t+`-`+e:e}function F4(e,t){let n=(0,f.useContext)(t4).strict;if(process.env.NODE_ENV!==`production`&&t&&n){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?V2(!1,t):H2(!1,t)}}function I4(e){let{drag:t,layout:n}=r4;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const L4=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function R4(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(L4.indexOf(e)>-1||/[A-Z]/u.test(e))}function z4(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function B4(e,t,n,r){if(typeof t==`function`){let[i,a]=z4(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=z4(r);t=t(n===void 0?e.custom:n,i,a)}return t}const V4=e=>Array.isArray(e),H4=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),U4=e=>V4(e)?e[e.length-1]||0:e,W4=e=>!!(e&&e.getVelocity);function G4(e){let t=W4(e)?e.get():e;return H4(t)?t.toValue():t}function K4({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){let o={latestValues:J4(r,i,a,e),renderState:t()};return n&&(o.onMount=e=>n({props:r,current:e,...o}),o.onUpdate=e=>n(e)),o}const q4=e=>(t,n)=>{let r=(0,f.useContext)(p4),i=(0,f.useContext)(F2),a=()=>K4(e,t,r,i);return n?a():P2(a)};function J4(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=G4(a[e]);let{initial:o,animate:s}=e,c=v4(e),l=y4(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!h4(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=B4(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}const Y4=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],X4=new Set(Y4),Z4=e=>t=>typeof t==`string`&&t.startsWith(e),Q4=Z4(`--`),$4=Z4(`var(--`),e3=e=>{let t=$4(e);return t?t3.test(e.split(`/*`)[0].trim()):!1},t3=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,n3=(e,t)=>t&&typeof e==`number`?t.transform(e):e,r3=(e,t,n)=>n>t?t:n<e?e:n,i3={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},a3={...i3,transform:e=>r3(0,1,e)},o3={...i3,default:1},s3=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),c3=s3(`deg`),l3=s3(`%`),u3=s3(`px`),Vpe=s3(`vh`),Hpe=s3(`vw`),d3={...l3,parse:e=>l3.parse(e)/100,transform:e=>l3.transform(e*100)},Upe={borderWidth:u3,borderTopWidth:u3,borderRightWidth:u3,borderBottomWidth:u3,borderLeftWidth:u3,borderRadius:u3,radius:u3,borderTopLeftRadius:u3,borderTopRightRadius:u3,borderBottomRightRadius:u3,borderBottomLeftRadius:u3,width:u3,maxWidth:u3,height:u3,maxHeight:u3,top:u3,right:u3,bottom:u3,left:u3,padding:u3,paddingTop:u3,paddingRight:u3,paddingBottom:u3,paddingLeft:u3,margin:u3,marginTop:u3,marginRight:u3,marginBottom:u3,marginLeft:u3,backgroundPositionX:u3,backgroundPositionY:u3},Wpe={rotate:c3,rotateX:c3,rotateY:c3,rotateZ:c3,scale:o3,scaleX:o3,scaleY:o3,scaleZ:o3,skew:c3,skewX:c3,skewY:c3,distance:u3,translateX:u3,translateY:u3,translateZ:u3,x:u3,y:u3,z:u3,perspective:u3,transformPerspective:u3,opacity:a3,originX:d3,originY:d3,originZ:u3},f3={...i3,transform:Math.round},p3={...Upe,...Wpe,zIndex:f3,size:u3,fillOpacity:a3,strokeOpacity:a3,numOctaves:f3},Gpe={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Kpe=Y4.length;function qpe(e,t,n){let r=``,i=!0;for(let a=0;a<Kpe;a++){let o=Y4[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=n3(s,p3[o]);if(!c){i=!1;let t=Gpe[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function m3(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(X4.has(e)){o=!0;continue}else if(Q4(e)){i[e]=n;continue}else{let t=n3(n,p3[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=qpe(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}const Jpe={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ype={offset:`strokeDashoffset`,array:`strokeDasharray`};function Xpe(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Jpe:Ype;e[a.offset]=u3.transform(-r);let o=u3.transform(t),s=u3.transform(n);e[a.array]=`${o} ${s}`}function h3(e,t,n){return typeof e==`string`?e:u3.transform(t+n*e)}function Zpe(e,t,n){let r=h3(t,e.x,e.width),i=h3(n,e.y,e.height);return`${r} ${i}`}function g3(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(m3(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=Zpe(m,i===void 0?.5:i,a===void 0?.5:a)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Xpe(f,o,s,c,!1)}const _3=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),v3=()=>({..._3(),attrs:{}}),y3=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function b3(e,{style:t,vars:n},r,i){for(let a in Object.assign(e.style,t,i&&i.getProjectionStyles(r)),n)e.style.setProperty(a,n[a])}const x3=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function S3(e,t,n,r){for(let n in b3(e,t,void 0,r),t.attrs)e.setAttribute(x3.has(n)?n:E4(n),t.attrs[n])}const C3={};function Qpe(e){Object.assign(C3,e)}function w3(e,{layout:t,layoutId:n}){return X4.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!C3[e]||e===`opacity`)}function T3(e,t,n){var r;let{style:i}=e,a={};for(let o in i)(W4(i[o])||t.style&&W4(t.style[o])||w3(o,e)||(r=n?.getValue(o))?.liveStyle!==void 0)&&(a[o]=i[o]);return a}function E3(e,t,n){let r=T3(e,t,n);for(let n in e)if(W4(e[n])||W4(t[n])){let t=Y4.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function $pe(e,t){try{t.dimensions=typeof e.getBBox==`function`?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const D3=[`x`,`y`,`width`,`height`,`cx`,`cy`,`r`],eme={useVisualState:q4({scrapeMotionValuesFromProps:E3,createRenderState:v3,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(let e in i)if(X4.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let n=0;n<D3.length;n++){let r=D3[n];e[r]!==t[r]&&(o=!0)}o&&Z2.read(()=>{$pe(n,r),Z2.render(()=>{g3(r,i,y3(n.tagName),e.transformTemplate),S3(n,r)})})}})},tme={useVisualState:q4({scrapeMotionValuesFromProps:T3,createRenderState:_3})};function O3(e,t,n){for(let r in t)!W4(t[r])&&!w3(r,n)&&(e[r]=t[r])}function nme({transformTemplate:e},t){return(0,f.useMemo)(()=>{let n=_3();return m3(n,t,e),Object.assign({},n.vars,n.style)},[t])}function rme(e,t){let n=e.style||{},r={};return O3(r,n,e),Object.assign(r,nme(e,t)),r}function ime(e,t){let n={},r=rme(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function ame(e,t,n,r){let i=(0,f.useMemo)(()=>{let n=v3();return g3(n,t,y3(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};O3(t,e.style,e),i.style={...t,...i.style}}return i}function ome(e=!1){let t=(t,n,r,{latestValues:i},a)=>{let o=R4(t)?ame:ime,s=o(n,i,a,t),c=l4(n,typeof t==`string`,e),l=t===f.Fragment?{}:{...c,...s,ref:r},{children:u}=n,d=(0,f.useMemo)(()=>W4(u)?u.get():u,[u]);return(0,f.createElement)(t,{...l,children:d})};return t}function sme(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){let i=R4(n)?eme:tme,a={...i,preloadedFeatures:e,useRender:ome(r),createVisualElement:t,Component:n};return N4(a)}}function k3(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function A3(e,t,n){let r=e.getProps();return B4(r,t,n===void 0?r.custom:n,e)}const cme=U2(()=>window.ScrollTimeline!==void 0);var lme=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>`finished`in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){let n=this.animations.map(n=>{if(cme()&&n.attachTimeline)return n.attachTimeline(e);if(typeof t==`function`)return t(n)});return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get startTime(){return this.getAll(`startTime`)}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll(`flatten`)}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},ume=class extends lme{then(e,t){return Promise.all(this.animations).then(e).catch(t)}};function j3(e,t){return e?e[t]||e.default||e:void 0}const M3=2e4;function N3(e){let t=0,n=e.next(t);for(;!n.done&&t<M3;)t+=50,n=e.next(t);return t>=M3?1/0:t}function P3(e){return typeof e==`function`}function F3(e,t){e.timeline=t,e.onfinish=null}const I3=e=>Array.isArray(e)&&typeof e[0]==`number`,dme={linearEasing:void 0};function fme(e,t){let n=U2(e);return()=>{var e;return(e=dme[t])??n()}}const L3=fme(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),R3=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=e(W2(0,i-1,t))+`, `;return`linear(${r.substring(0,r.length-2)})`};function z3(e){return!!(typeof e==`function`&&L3()||!e||typeof e==`string`&&(e in V3||L3())||I3(e)||Array.isArray(e)&&e.every(z3))}const B3=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,V3={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:B3([0,.65,.55,1]),circOut:B3([.55,0,1,.45]),backIn:B3([.31,.01,.66,-.59]),backOut:B3([.33,1.53,.69,.99])};function H3(e,t){if(e)return typeof e==`function`&&L3()?R3(e,t):I3(e)?B3(e):Array.isArray(e)?e.map(e=>H3(e,t)||V3.easeOut):V3[e]}const U3={x:!1,y:!1};function W3(){return U3.x||U3.y}function pme(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e==`string`){let i=document;t&&(i=t.current);let a=(r=n?.[e])??i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}function G3(e,t){let n=pme(e),r=new AbortController,i={passive:!0,...t,signal:r.signal},a=()=>r.abort();return[n,i,a]}function K3(e){return t=>{t.pointerType===`touch`||W3()||e(t)}}function mme(e,t,n={}){let[r,i,a]=G3(e,n),o=K3(e=>{let{target:n}=e,r=t(e);if(typeof r!=`function`||!n)return;let a=K3(e=>{r(e),n.removeEventListener(`pointerleave`,a)});n.addEventListener(`pointerleave`,a,i)});return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}const q3=(e,t)=>t?e===t?!0:q3(e,t.parentElement):!1,J3=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,hme=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function gme(e){return hme.has(e.tagName)||e.tabIndex!==-1}const Y3=new WeakSet;function X3(e){return t=>{t.key===`Enter`&&e(t)}}function Z3(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}const _me=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=X3(()=>{if(Y3.has(n))return;Z3(n,`down`);let e=X3(()=>{Z3(n,`up`)}),r=()=>Z3(n,`cancel`);n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,r,t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Q3(e){return J3(e)&&!W3()}function vme(e,t,n={}){let[r,i,a]=G3(e,n),o=e=>{let r=e.currentTarget;if(!Q3(e)||Y3.has(r))return;Y3.add(r);let a=t(e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),!(!Q3(e)||!Y3.has(r))&&(Y3.delete(r),typeof a==`function`&&a(e,{success:t}))},s=e=>{o(e,n.useGlobalTarget||q3(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{!gme(e)&&e.getAttribute(`tabindex`)===null&&(e.tabIndex=0);let t=n.useGlobalTarget?window:e;t.addEventListener(`pointerdown`,o,i),e.addEventListener(`focus`,e=>_me(e,i),i)}),a}function yme(e){return e===`x`||e===`y`?U3[e]?null:(U3[e]=!0,()=>{U3[e]=!1}):U3.x||U3.y?null:(U3.x=U3.y=!0,()=>{U3.x=U3.y=!1})}const $3=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Y4]);let e6;function bme(){e6=void 0}const t6={now:()=>(e6===void 0&&t6.set($2.isProcessing||q2.useManualTiming?$2.timestamp:performance.now()),e6),set:e=>{e6=e,queueMicrotask(bme)}};function n6(e,t){e.indexOf(t)===-1&&e.push(t)}function r6(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var i6=class{constructor(){this.subscriptions=[]}add(e){return n6(this.subscriptions,e),()=>r6(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function a6(e,t){return t?e*(1e3/t):0}const xme=30,Sme=e=>!isNaN(parseFloat(e)),o6={current:void 0};var Cme=class{constructor(e,t={}){this.version=`11.18.2`,this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=t6.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=t6.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Sme(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&d4(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new i6);let n=this.events[e].add(t);return e===`change`?()=>{n(),Z2.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return o6.current&&o6.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=t6.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return a6(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function s6(e,t){return new Cme(e,t)}function wme(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,s6(n))}function Tme(e,t){let n=A3(e,t),{transitionEnd:r={},transition:i={},...a}=n||{};for(let t in a={...a,...r},a){let n=U4(a[t]);wme(e,t,n)}}function Eme(e){return!!(W4(e)&&e.add)}function c6(e,t){let n=e.getValue(`willChange`);if(Eme(n))return n.add(t)}function l6(e){return e.props[D4]}const u6={current:!1},d6=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Dme=1e-7,Ome=12;function kme(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=d6(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>1e-7&&++s<12);return o}function f6(e,t,n,r){if(e===t&&n===r)return B2;let i=t=>kme(t,0,1,e,n);return e=>e===0||e===1?e:d6(i(e),t,r)}const p6=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,m6=e=>t=>1-e(1-t),h6=f6(.33,1.53,.69,.99),g6=m6(h6),_6=p6(g6),v6=e=>(e*=2)<1?.5*g6(e):.5*(2-2**(-10*(e-1))),y6=e=>1-Math.sin(Math.acos(e)),b6=m6(y6),x6=p6(y6),S6=e=>/^0[^.\s]+$/u.test(e);function Ame(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||S6(e)}const C6=e=>Math.round(e*1e5)/1e5,w6=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function jme(e){return e==null}const Mme=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,T6=(e,t)=>n=>!!(typeof n==`string`&&Mme.test(n)&&n.startsWith(e)||t&&!jme(n)&&Object.prototype.hasOwnProperty.call(n,t)),E6=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(w6);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Nme=e=>r3(0,255,e),D6={...i3,transform:e=>Math.round(Nme(e))},O6={test:T6(`rgb`,`red`),parse:E6(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+D6.transform(e)+`, `+D6.transform(t)+`, `+D6.transform(n)+`, `+C6(a3.transform(r))+`)`};function Pme(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const k6={test:T6(`#`),parse:Pme,transform:O6.transform},A6={test:T6(`hsl`,`hue`),parse:E6(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+l3.transform(C6(t))+`, `+l3.transform(C6(n))+`, `+C6(a3.transform(r))+`)`},j6={test:e=>O6.test(e)||k6.test(e)||A6.test(e),parse:e=>O6.test(e)?O6.parse(e):A6.test(e)?A6.parse(e):k6.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?O6.transform(e):A6.transform(e)},Fme=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ime(e){var t,n;return isNaN(e)&&typeof e==`string`&&((t=e.match(w6))?.length||0)+((n=e.match(Fme))?.length||0)>0}const M6=`number`,N6=`color`,Lme=`var`,Rme=`var(`,zme="${}",Bme=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function P6(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0,o=t.replace(Bme,e=>(j6.test(e)?(r.color.push(a),i.push(N6),n.push(j6.parse(e))):e.startsWith(`var(`)?(r.var.push(a),i.push(`var`),n.push(e)):(r.number.push(a),i.push(M6),n.push(parseFloat(e))),++a,"${}")),s=o.split("${}");return{values:n,split:s,indexes:r,types:i}}function F6(e){return P6(e).values}function I6(e){let{split:t,types:n}=P6(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===M6?i+=C6(e[a]):t===N6?i+=j6.transform(e[a]):i+=e[a]}return i}}const Vme=e=>typeof e==`number`?0:e;function Hme(e){let t=F6(e),n=I6(e);return n(t.map(Vme))}const L6={test:Ime,parse:F6,createTransformer:I6,getAnimatableNone:Hme},Ume=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Wme(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(w6)||[];if(!r)return e;let i=n.replace(r,``),a=Ume.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}const Gme=/\b([a-z-]*)\(.*?\)/gu,R6={...L6,getAnimatableNone:e=>{let t=e.match(Gme);return t?t.map(Wme).join(` `):e}},Kme={...p3,color:j6,backgroundColor:j6,outlineColor:j6,fill:j6,stroke:j6,borderColor:j6,borderTopColor:j6,borderRightColor:j6,borderBottomColor:j6,borderLeftColor:j6,filter:R6,WebkitFilter:R6},z6=e=>Kme[e];function B6(e,t){let n=z6(e);return n!==R6&&(n=L6),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const qme=new Set([`auto`,`none`,`0`]);function Jme(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!qme.has(t)&&P6(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=B6(n,i)}const V6=e=>e===i3||e===u3,H6=(e,t)=>parseFloat(e.split(`, `)[t]),U6=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return H6(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?H6(t[1],e):0}},Yme=new Set([`x`,`y`,`z`]),Xme=Y4.filter(e=>!Yme.has(e));function Zme(e){let t=[];return Xme.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}const W6={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:U6(4,13),y:U6(5,14)};W6.translateX=W6.x,W6.translateY=W6.y;const G6=new Set;let K6=!1,q6=!1;function J6(){if(q6){let e=Array.from(G6).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Zme(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;(r=e.getValue(t))==null||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}q6=!1,K6=!1,G6.forEach(e=>e.complete()),G6.clear()}function Y6(){G6.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(q6=!0)})}function Qme(){Y6(),J6()}var X6=class{constructor(e,t,n,r,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(G6.add(this),K6||(K6=!0,Z2.read(Y6),Z2.resolveKeyframes(J6))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),G6.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,G6.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};const Z6=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$me=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ehe(e){let t=$me.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}const the=4;function Q6(e,t,n=1){H2(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=ehe(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Z6(e)?parseFloat(e):e}return e3(i)?Q6(i,t,n+1):i}const $6=e=>t=>t.test(e),nhe={test:e=>e===`auto`,parse:e=>e},e8=[i3,u3,l3,c3,Hpe,Vpe,nhe],t8=e=>e8.find($6(e));var n8=class extends X6{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),e3(r))){let i=Q6(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!$3.has(n)||e.length!==2)return;let[r,i]=e,a=t8(r),o=t8(i);if(a!==o)if(V6(a)&&V6(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)Ame(e[t])&&n.push(t);n.length&&Jme(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=W6[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;let{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);let a=r.length-1,o=r[a];r[a]=W6[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(e=this.removedTransforms)?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}};const r8=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(L6.test(e)||e===`0`)&&!e.startsWith(`url(`));function rhe(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ihe(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=r8(i,t),s=r8(a,t);return V2(o===s,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!o||!s?!1:rhe(e)||(n===`spring`||P3(n))&&r}const ahe=e=>e!==null;function i8(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(ahe),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}const ohe=40;var a8=class{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=t6.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Qme(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=t6.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:c}=this.options;if(!c&&!ihe(e,n,r,i))if(u6.current||!a){s&&s(i8(e,this.options,t)),o&&o(),this.resolveFinishedPromise();return}else this.options.duration=0;let l=this.initPlayback(e,t);l!==!1&&(this._resolved={keyframes:e,finalKeyframe:t,...l},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type=`keyframes`,this.options.ease=`linear`}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}};const o8=(e,t,n)=>e+(t-e)*n;function s8(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function she({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=s8(s,r,e+1/3),a=s8(s,r,e),o=s8(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function c8(e,t){return n=>n>0?t:e}const l8=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},che=[k6,O6,A6],lhe=e=>che.find(t=>t.test(e));function u8(e){let t=lhe(e);if(V2(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===A6&&(n=she(n)),n}const d8=(e,t)=>{let n=u8(e),r=u8(t);if(!n||!r)return c8(e,t);let i={...n};return e=>(i.red=l8(n.red,r.red,e),i.green=l8(n.green,r.green,e),i.blue=l8(n.blue,r.blue,e),i.alpha=o8(n.alpha,r.alpha,e),O6.transform(i))},uhe=(e,t)=>n=>t(e(n)),f8=(...e)=>e.reduce(uhe),p8=new Set([`none`,`hidden`]);function dhe(e,t){return p8.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function fhe(e,t){return n=>o8(e,t,n)}function m8(e){return typeof e==`number`?fhe:typeof e==`string`?e3(e)?c8:j6.test(e)?d8:hhe:Array.isArray(e)?h8:typeof e==`object`?j6.test(e)?d8:phe:c8}function h8(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>m8(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function phe(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=m8(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function mhe(e,t){var n;let r=[],i={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let o=t.types[a],s=e.indexes[o][i[o]],c=(n=e.values[s])??0;r[a]=c,i[o]++}return r}const hhe=(e,t)=>{let n=L6.createTransformer(t),r=P6(e),i=P6(t),a=r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length;return a?p8.has(e)&&!i.values.length||p8.has(t)&&!r.values.length?dhe(e,t):f8(h8(mhe(r,i),i.values),n):(V2(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),c8(e,t))};function g8(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return o8(e,t,n);let r=m8(e);return r(e,t)}const ghe=5;function _8(e,t,n){let r=Math.max(t-5,0);return a6(n-e(r),t-r)}const v8={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},y8=.001;function _he({duration:e=v8.duration,bounce:t=v8.bounce,velocity:n=v8.velocity,mass:r=v8.mass}){let i,a;V2(e<=G2(v8.maxDuration),`Spring duration must be 10 seconds or less`);let o=1-t;o=r3(v8.minDamping,v8.maxDamping,o),e=r3(v8.minDuration,v8.maxDuration,K2(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=b8(t,o),c=Math.exp(-i);return y8-a/s*c},a=t=>{let r=t*o,a=r*e,s=a*n+n,c=o**2*t**2*e,l=Math.exp(-a),u=b8(t**2,o),d=-i(t)+y8>0?-1:1;return d*((s-c)*l)/u}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-y8+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});let s=5/e,c=yhe(i,a,s);if(e=G2(e),isNaN(c))return{stiffness:v8.stiffness,damping:v8.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}const vhe=12;function yhe(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}function b8(e,t){return e*Math.sqrt(1-t*t)}const bhe=[`duration`,`bounce`],xhe=[`stiffness`,`damping`,`mass`];function x8(e,t){return t.some(t=>e[t]!==void 0)}function She(e){let t={velocity:v8.velocity,stiffness:v8.stiffness,damping:v8.damping,mass:v8.mass,isResolvedFromDuration:!1,...e};if(!x8(e,xhe)&&x8(e,bhe))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*r3(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:v8.mass,stiffness:i,damping:a}}else{let n=_he(e);t={...t,...n,mass:v8.mass},t.isResolvedFromDuration=!0}return t}function S8(e=v8.visualDuration,t=v8.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=She({...n,velocity:-K2(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=K2(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?v8.restSpeed.granular:v8.restSpeed.default,i||=v?v8.restDelta.granular:v8.restDelta.default;let y;if(h<1){let e=b8(_,h);y=t=>{let n=Math.exp(-h*_*t);return o-n*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=0;h<1&&(n=e===0?G2(m):_8(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(N3(b),M3),t=R3(t=>b.next(e*t).value,e,30);return e+`ms `+t}};return b}function C8({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=S8({keyframes:[f.value,m(f.value)],velocity:_8(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}const Che=f6(.42,0,1,1),whe=f6(0,0,.58,1),w8=f6(.42,0,.58,1),The=e=>Array.isArray(e)&&typeof e[0]!=`number`,T8={linear:B2,easeIn:Che,easeInOut:w8,easeOut:whe,circIn:y6,circInOut:x6,circOut:b6,backIn:g6,backInOut:_6,backOut:h6,anticipate:v6},E8=e=>{if(I3(e)){H2(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return f6(t,n,r,i)}else if(typeof e==`string`)return H2(T8[e]!==void 0,`Invalid easing type '${e}'`),T8[e];return e};function Ehe(e,t,n){let r=[],i=n||g8,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);if(t){let e=Array.isArray(t)?t[n]||B2:t;a=f8(e,a)}r.push(a)}return r}function Dhe(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(H2(a===t.length,`Both input and output ranges must be the same length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Ehe(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=W2(e[r],e[r+1],n);return s[r](i)};return n?t=>l(r3(e[0],e[a-1],t)):l}function Ohe(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=W2(0,t,r);e.push(o8(n,1,i))}}function khe(e){let t=[0];return Ohe(t,e.length-1),t}function Ahe(e,t){return e.map(e=>e*t)}function jhe(e,t){return e.map(()=>t||w8).splice(0,e.length-1)}function D8({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=The(r)?r.map(E8):E8(r),a={done:!1,value:t[0]},o=Ahe(n&&n.length===t.length?n:khe(t),e),s=Dhe(o,t,{ease:Array.isArray(i)?i:jhe(t,i)});return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const Mhe=e=>{let t=({timestamp:t})=>e(t);return{start:()=>Z2.update(t,!0),stop:()=>Q2(t),now:()=>$2.isProcessing?$2.timestamp:t6.now()}},Nhe={decay:C8,inertia:C8,tween:D8,keyframes:D8,spring:S8},Phe=e=>e/100;var O8=class extends a8{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState=`running`,this.startTime=null,this.state=`idle`,this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options,a=r?.KeyframeResolver||X6,o=(e,t)=>this.onKeyframesResolved(e,t);this.resolver=new a(i,o,t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let{type:t=`keyframes`,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=this.options,o=P3(t)?t:Nhe[t]||D8,s,c;o!==D8&&typeof e[0]!=`number`&&(process.env.NODE_ENV!==`production`&&H2(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),s=f8(Phe,g8(e[0],e[1])),e=[0,100]);let l=o({...this.options,keyframes:e});i===`mirror`&&(c=o({...this.options,keyframes:[...e].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=N3(l));let{calculatedDuration:u}=l,d=u+r,f=d*(n+1)-r;return{generator:l,mirroredGenerator:c,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:f}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState===`paused`||!e?this.pause():this.state=this.pendingPlayState}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:s,calculatedDuration:c,totalDuration:l,resolvedDuration:u}=n;if(this.startTime===null)return i.next(0);let{delay:d,repeat:f,repeatType:p,repeatDelay:m,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),t?this.currentTime=e:this.holdTime===null?this.currentTime=Math.round(e-this.startTime)*this.speed:this.currentTime=this.holdTime;let g=this.currentTime-d*(this.speed>=0?1:-1),_=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=l);let v=this.currentTime,y=i;if(f){let e=Math.min(this.currentTime,l)/u,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,f+1);let r=!!(t%2);r&&(p===`reverse`?(n=1-n,m&&(n-=m/u)):p===`mirror`&&(y=a)),v=r3(0,1,n)*u}let b=_?{done:!1,value:s[0]}:y.next(v);o&&(b.value=o(b.value));let{done:x}=b;!_&&c!==null&&(x=this.speed>=0?this.currentTime>=l:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&r!==void 0&&(b.value=i8(s,this.options,r)),h&&h(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?K2(e.calculatedDuration):0}get time(){return K2(this.currentTime)}set time(e){e=G2(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=K2(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=`running`;return}if(this.isStopped)return;let{driver:e=Mhe,onPlay:t,startTime:n}=this.options;this.driver||=e(e=>this.tick(e)),t&&t();let r=this.driver.now();this.holdTime===null?this.startTime?this.state===`finished`&&(this.startTime=r):this.startTime=n??this.calcStartTime():this.startTime=r-this.holdTime,this.state===`finished`&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state=`running`,this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState=`paused`;return}this.state=`paused`,this.holdTime=(e=this.currentTime)??0}complete(){this.state!==`running`&&this.play(),this.pendingPlayState=this.state=`finished`,this.holdTime=null}finish(){this.teardown(),this.state=`finished`;let{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state=`idle`,this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}};const Fhe=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function Ihe(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeInOut`,times:c}={}){let l={[t]:n};c&&(l.offset=c);let u=H3(s,i);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:i,easing:Array.isArray(u)?`linear`:u,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`})}const Lhe=U2(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),Rhe=10,zhe=2e4;function Bhe(e){return P3(e.type)||e.type===`spring`||!z3(e.ease)}function Vhe(e,t){let n=new O8({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],a=0;for(;!r.done&&a<2e4;)r=n.sample(a),i.push(r.value),a+=10;return{times:void 0,keyframes:i,duration:a-10,ease:`linear`}}const k8={anticipate:v6,backInOut:_6,circInOut:x6};function Hhe(e){return e in k8}var A8=class extends a8{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new n8(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:i,type:a,motionValue:o,name:s,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i==`string`&&L3()&&Hhe(i)&&(i=k8[i]),Bhe(this.options)){let{onComplete:t,onUpdate:o,motionValue:s,element:c,...l}=this.options,u=Vhe(e,l);e=u.keyframes,e.length===1&&(e[1]=e[0]),n=u.duration,r=u.times,i=u.ease,a=`keyframes`}let l=Ihe(o.owner.current,s,e,{...this.options,duration:n,times:r,ease:i});return l.startTime=c??this.calcStartTime(),this.pendingTimeline?(F3(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{let{onComplete:n}=this.options;o.set(i8(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:l,duration:n,times:r,type:a,ease:i,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return K2(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return K2(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=G2(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return`idle`;let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{let{resolved:t}=this;if(!t)return B2;let{animation:n}=t;F3(n,e)}return B2}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.playState===`finished`&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:a,times:o}=e;if(t.playState===`idle`||t.playState===`finished`)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:s,element:c,...l}=this.options,u=new O8({...l,keyframes:n,duration:r,type:i,ease:a,times:o,isGenerator:!0}),d=G2(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}let{onStop:s}=this.options;s&&s(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return Lhe()&&n&&Fhe.has(n)&&!s&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}};const Uhe={type:`spring`,stiffness:500,damping:25,restSpeed:10},Whe=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ghe={type:`keyframes`,duration:.8},Khe={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},qhe=(e,{keyframes:t})=>t.length>2?Ghe:X4.has(e)?e.startsWith(`scale`)?Whe(t[1]):Uhe:Khe;function Jhe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const j8=(e,t,n,r={},i,a)=>o=>{let s=j3(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=G2(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Jhe(s)||(u={...u,...qhe(e,u)}),u.duration&&=G2(u.duration),u.repeatDelay&&=G2(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(u6.current||q2.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let e=i8(u.keyframes,s);if(e!==void 0)return Z2.update(()=>{u.onUpdate(e),u.onComplete()}),new ume([])}return!a&&A8.supports(u)?new A8(u):new O8(u)};function Yhe({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function M8(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...c}=t;r&&(o=r);let l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(let t in c){let r=e.getValue(t,(a=e.latestValues[t])??null),i=c[t];if(i===void 0||u&&Yhe(u,t))continue;let s={delay:n,...j3(o||{},t)},d=!1;if(window.MotionHandoffAnimation){let n=l6(e);if(n){let e=window.MotionHandoffAnimation(n,t,Z2);e!==null&&(s.startTime=e,d=!0)}}c6(e,t),r.start(j8(t,r,i,e.shouldReduceMotion&&$3.has(t)?{type:!1}:s,e,d));let f=r.animation;f&&l.push(f)}return s&&Promise.all(l).then(()=>{Z2.update(()=>{s&&Tme(e,s)})}),l}function N8(e,t,n={}){var r;let i=A3(e,t,n.type===`exit`?(r=e.presenceContext)?.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);let o=i?()=>Promise.all(M8(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:i=0,staggerChildren:o,staggerDirection:s}=a;return Xhe(e,t,i+r,o,s,n)}:()=>Promise.resolve(),{when:c}=a;if(c){let[e,t]=c===`beforeChildren`?[o,s]:[s,o];return e().then(()=>t())}else return Promise.all([o(),s(n.delay)])}function Xhe(e,t,n=0,r=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*r,c=i===1?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Zhe).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(N8(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function Zhe(e,t){return e.sortNodePosition(t)}function Qhe(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>N8(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=N8(e,t,n);else{let i=typeof t==`function`?A3(e,t,n.custom):t;r=Promise.all(M8(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}const $he=_4.length;function P8(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&P8(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<$he;n++){let r=_4[n],i=e.props[r];(m4(i)||i===!1)&&(t[r]=i)}return t}const ege=[...g4].reverse(),tge=g4.length;function nge(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Qhe(e,t,n)))}function rge(e){let t=nge(e),n=I8(),r=!0,i=t=>(n,r)=>{var i;let a=A3(e,r,t===`exit`?(i=e.presenceContext)?.custom:void 0);if(a){let{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=P8(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<tge;t++){let f=ege[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=m4(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||h4(m)||typeof m==`boolean`)continue;let v=ige(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=V4(t)&&V4(n)?!k3(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let E=_&&v,D=!E||b;y&&D&&c.push(...x.map(e=>({animation:e,options:{type:f}})))}if(l.size){let t={};l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){var i;if(n[t].isActive===r)return Promise.resolve();(i=e.variantChildren)==null||i.forEach(e=>{var n;return(n=e.animationState)?.setActive(t,r)}),n[t].isActive=r;let a=o(t);for(let e in n)n[e].protectedKeys={};return a}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=I8(),r=!0}}}function ige(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!k3(t,e):!1}function F8(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function I8(){return{animate:F8(!0),whileInView:F8(),whileHover:F8(),whileTap:F8(),whileDrag:F8(),whileFocus:F8(),exit:F8()}}var L8=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},age=class extends L8{constructor(e){super(e),e.animationState||=rge(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();h4(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}};let oge=0;var sge=class extends L8{constructor(){super(...arguments),this.id=oge++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}};const cge={animation:{Feature:age},exit:{Feature:sge}};function R8(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function z8(e){return{point:{x:e.pageX,y:e.pageY}}}const lge=e=>t=>J3(t)&&e(t,z8(t));function B8(e,t,n,r){return R8(e,t,lge(n),r)}const V8=(e,t)=>Math.abs(e-t);function uge(e,t){let n=V8(e.x,t.x),r=V8(e.y,t.y);return Math.sqrt(n**2+r**2)}var H8=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=G8(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=uge(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=$2;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=U8(t,this.transformPagePoint),Z2.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=G8(e.type===`pointercancel`?this.lastMoveEventInfo:U8(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!J3(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let a=z8(e),o=U8(a,this.transformPagePoint),{point:s}=o,{timestamp:c}=$2;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,G8(o,this.history)),this.removeListeners=f8(B8(this.contextWindow,`pointermove`,this.handlePointerMove),B8(this.contextWindow,`pointerup`,this.handlePointerUp),B8(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Q2(this.updatePoint)}};function U8(e,t){return t?{point:t(e.point)}:e}function W8(e,t){return{x:e.x-t.x,y:e.y-t.y}}function G8({point:e},t){return{point:e,delta:W8(e,K8(t)),offset:W8(e,dge(t)),velocity:fge(t,.1)}}function dge(e){return e[0]}function K8(e){return e[e.length-1]}function fge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=K8(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>G2(t)));)n--;if(!r)return{x:0,y:0};let a=K2(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const q8=1e-4,pge=1-q8,mge=1+q8,J8=.01,hge=0-J8,gge=0+J8;function Y8(e){return e.max-e.min}function _ge(e,t,n){return Math.abs(e-t)<=n}function X8(e,t,n,r=.5){e.origin=r,e.originPoint=o8(t.min,t.max,e.origin),e.scale=Y8(n)/Y8(t),e.translate=o8(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Z8(e,t,n,r){X8(e.x,t.x,n.x,r?r.originX:void 0),X8(e.y,t.y,n.y,r?r.originY:void 0)}function Q8(e,t,n){e.min=n.min+t.min,e.max=e.min+Y8(t)}function vge(e,t,n){Q8(e.x,t.x,n.x),Q8(e.y,t.y,n.y)}function $8(e,t,n){e.min=t.min-n.min,e.max=e.min+Y8(t)}function e5(e,t,n){$8(e.x,t.x,n.x),$8(e.y,t.y,n.y)}function yge(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?o8(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?o8(n,e,r.max):Math.min(e,n)),e}function t5(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function bge(e,{top:t,left:n,bottom:r,right:i}){return{x:t5(e.x,n,i),y:t5(e.y,t,r)}}function n5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function xge(e,t){return{x:n5(e.x,t.x),y:n5(e.y,t.y)}}function Sge(e,t){let n=.5,r=Y8(e),i=Y8(t);return i>r?n=W2(t.min,t.max-r,e.min):r>i&&(n=W2(e.min,e.max-i,t.min)),r3(0,1,n)}function Cge(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const r5=.35;function wge(e=r5){return e===!1?e=0:e===!0&&(e=r5),{x:i5(e,`left`,`right`),y:i5(e,`top`,`bottom`)}}function i5(e,t,n){return{min:a5(e,t),max:a5(e,n)}}function a5(e,t){return typeof e==`number`?e:e[t]||0}const o5=()=>({translate:0,scale:1,origin:0,originPoint:0}),s5=()=>({x:o5(),y:o5()}),c5=()=>({min:0,max:0}),l5=()=>({x:c5(),y:c5()});function u5(e){return[e(`x`),e(`y`)]}function d5({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Tge({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ege(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function f5(e){return e===void 0||e===1}function p5({scale:e,scaleX:t,scaleY:n}){return!f5(e)||!f5(t)||!f5(n)}function m5(e){return p5(e)||h5(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function h5(e){return g5(e.x)||g5(e.y)}function g5(e){return e&&e!==`0%`}function _5(e,t,n){let r=e-n,i=t*r;return n+i}function v5(e,t,n,r,i){return i!==void 0&&(e=_5(e,i,r)),_5(e,n,r)+t}function y5(e,t=0,n=1,r,i){e.min=v5(e.min,t,n,r,i),e.max=v5(e.max,t,n,r,i)}function b5(e,{x:t,y:n}){y5(e.x,t.translate,t.scale,t.originPoint),y5(e.y,n.translate,n.scale,n.originPoint)}const x5=.999999999999,S5=1.0000000000001;function Dge(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&T5(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,b5(e,o)),r&&m5(a.latestValues)&&T5(e,a.latestValues))}t.x<S5&&t.x>x5&&(t.x=1),t.y<S5&&t.y>x5&&(t.y=1)}function C5(e,t){e.min+=t,e.max+=t}function w5(e,t,n,r,i=.5){let a=o8(e.min,e.max,i);y5(e,t,n,a,r)}function T5(e,t){w5(e.x,t.x,t.scaleX,t.scale,t.originX),w5(e.y,t.y,t.scaleY,t.scale,t.originY)}function E5(e,t){return d5(Ege(e.getBoundingClientRect(),t))}function Oge(e,t,n){let r=E5(e,n),{scroll:i}=t;return i&&(C5(r.x,i.offset.x),C5(r.y,i.offset.y)),r}const D5=({current:e})=>e?e.ownerDocument.defaultView:null,kge=new WeakMap;var Age=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=l5(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let r=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(z8(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yme(n),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),u5(e=>{let t=this.getAxisMotionValue(e).get()||0;if(l3.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];if(r){let e=Y8(r);t=e*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&Z2.postRender(()=>i(e,t)),c6(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},a=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=jge(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},o=(e,t)=>this.stop(e,t),s=()=>u5(e=>{var t;return this.getAnimationState(e)===`paused`&&(t=this.getAxisMotionValue(e).animation)?.play()}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new H8(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:D5(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&Z2.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!O5(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=yge(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)?.layout,i=this.constraints;t&&w4(t)?this.constraints||=this.resolveRefConstraints():t&&r?this.constraints=bge(r.layoutBox,t):this.constraints=!1,this.elastic=wge(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&u5(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Cge(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!w4(e))return!1;let n=e.current;H2(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Oge(n,r.root,this.visualElement.getTransformPagePoint()),a=xge(r.layout.layoutBox,i);if(t){let e=t(Tge(a));this.hasMutatedConstraints=!!e,e&&(a=d5(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=u5(o=>{if(!O5(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return c6(this.visualElement,e),n.start(j8(e,n,0,t,this.visualElement,!1))}stopAnimation(){u5(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){u5(e=>{var t;return(t=this.getAxisMotionValue(e).animation)?.pause()})}getAnimationState(e){var t;return(t=this.getAxisMotionValue(e).animation)?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){u5(t=>{let{drag:n}=this.getProps();if(!O5(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-o8(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!w4(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};u5(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Sge({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),u5(t=>{if(!O5(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(o8(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;kge.set(this.visualElement,this);let e=this.visualElement.current,t=B8(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();w4(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Z2.read(n);let a=R8(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(u5(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=r5,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function O5(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function jge(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Mge=class extends L8{constructor(e){super(e),this.removeGroupControls=B2,this.removeListeners=B2,this.controls=new Age(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||B2}unmount(){this.removeGroupControls(),this.removeListeners()}};const k5=e=>(t,n)=>{e&&Z2.postRender(()=>e(t,n))};var Nge=class extends L8{constructor(){super(...arguments),this.removePointerDownListener=B2}onPointerDown(e){this.session=new H8(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:D5(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:k5(e),onStart:k5(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Z2.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=B8(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};const A5={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function j5(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const M5={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(u3.test(e))e=parseFloat(e);else return e;let n=j5(e,t.target.x),r=j5(e,t.target.y);return`${n}% ${r}%`}},Pge={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=L6.parse(e);if(i.length>5)return r;let a=L6.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=o8(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};var Fge=class extends f.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;Qpe(Ige),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),A5.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||t===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Z2.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),O4.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function N5(e){let[t,n]=L2(),r=(0,f.useContext)(N2);return(0,p.jsx)(Fge,{...e,layoutGroup:r,switchLayoutGroup:(0,f.useContext)(k4),isPresent:t,safeToRemove:n})}const Ige={borderRadius:{...M5,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:M5,borderTopRightRadius:M5,borderBottomLeftRadius:M5,borderBottomRightRadius:M5,boxShadow:Pge};function Lge(e,t,n){let r=W4(e)?e:s6(e);return r.start(j8(``,r,t,n)),r.animation}function Rge(e){return e instanceof SVGElement&&e.tagName!==`svg`}const zge=(e,t)=>e.depth-t.depth;var Bge=class{constructor(){this.children=[],this.isDirty=!1}add(e){n6(this.children,e),this.isDirty=!0}remove(e){r6(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(zge),this.isDirty=!1,this.children.forEach(e)}};function Vge(e,t){let n=t6.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(Q2(r),e(a-t))};return Z2.read(r,!0),()=>Q2(r)}const P5=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Hge=P5.length,F5=e=>typeof e==`string`?parseFloat(e):e,I5=e=>typeof e==`number`||u3.test(e);function Uge(e,t,n,r,i,a){i?(e.opacity=o8(0,n.opacity===void 0?1:n.opacity,Wge(r)),e.opacityExit=o8(t.opacity===void 0?1:t.opacity,0,Gge(r))):a&&(e.opacity=o8(t.opacity===void 0?1:t.opacity,n.opacity===void 0?1:n.opacity,r));for(let i=0;i<Hge;i++){let a=`border${P5[i]}Radius`,o=L5(t,a),s=L5(n,a);if(o===void 0&&s===void 0)continue;o||=0,s||=0;let c=o===0||s===0||I5(o)===I5(s);c?(e[a]=Math.max(o8(F5(o),F5(s),r),0),(l3.test(s)||l3.test(o))&&(e[a]+=`%`)):e[a]=s}(t.rotate||n.rotate)&&(e.rotate=o8(t.rotate||0,n.rotate||0,r))}function L5(e,t){return e[t]===void 0?e.borderRadius:e[t]}const Wge=R5(0,.5,b6),Gge=R5(.5,.95,B2);function R5(e,t,n){return r=>r<e?0:r>t?1:n(W2(e,t,r))}function z5(e,t){e.min=t.min,e.max=t.max}function B5(e,t){z5(e.x,t.x),z5(e.y,t.y)}function V5(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function H5(e,t,n,r,i){return e-=t,e=_5(e,1/n,r),i!==void 0&&(e=_5(e,1/i,r)),e}function Kge(e,t=0,n=1,r=.5,i,a=e,o=e){if(l3.test(t)){t=parseFloat(t);let e=o8(o.min,o.max,t/100);t=e-o.min}if(typeof t!=`number`)return;let s=o8(a.min,a.max,r);e===a&&(s-=t),e.min=H5(e.min,t,n,s,i),e.max=H5(e.max,t,n,s,i)}function U5(e,t,[n,r,i],a,o){Kge(e,t[n],t[r],t[i],t.scale,a,o)}const qge=[`x`,`scaleX`,`originX`],Jge=[`y`,`scaleY`,`originY`];function W5(e,t,n,r){U5(e.x,t,qge,n?n.x:void 0,r?r.x:void 0),U5(e.y,t,Jge,n?n.y:void 0,r?r.y:void 0)}function G5(e){return e.translate===0&&e.scale===1}function K5(e){return G5(e.x)&&G5(e.y)}function q5(e,t){return e.min===t.min&&e.max===t.max}function Yge(e,t){return q5(e.x,t.x)&&q5(e.y,t.y)}function J5(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Y5(e,t){return J5(e.x,t.x)&&J5(e.y,t.y)}function X5(e){return Y8(e.x)/Y8(e.y)}function Z5(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Xge=class{constructor(){this.members=[]}add(e){n6(this.members,e),e.scheduleRender()}remove(e){if(r6(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Zge(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}const Q5={type:`projectionFrame`,totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},$5=typeof window<`u`&&window.MotionDebug!==void 0,e7=[``,`X`,`Y`,`Z`],Qge={visibility:`hidden`},t7=1e3;let $ge=0;function n7(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function r7(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=l6(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Z2,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&r7(r)}function i7({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=$ge++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,$5&&(Q5.totalNodes=Q5.resolvedTargetDeltas=Q5.recalculatedProjection=0),this.nodes.forEach(n_e),this.nodes.forEach(s_e),this.nodes.forEach(c_e),this.nodes.forEach(r_e),$5&&window.MotionDebug.record(Q5)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Bge)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new i6),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Rge(t),this.instance=t;let{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Vge(r,250),A5.hasAnimatedSinceResize&&(A5.hasAnimatedSinceResize=!1,this.nodes.forEach(o7))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&a&&(r||i)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||a.getDefaultTransition()||p_e,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),c=!this.targetLayout||!Y5(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);let t={...j3(i,`layout`),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||o7(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Q2(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(l_e),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&r7(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){this.updateScheduled=!1;let e=this.isUpdateBlocked();if(e){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(a7);return}this.isUpdating||this.nodes.forEach(a_e),this.isUpdating=!1,this.nodes.forEach(o_e),this.nodes.forEach(e_e),this.nodes.forEach(t_e),this.clearAllSnapshots();let t=t6.now();$2.delta=r3(0,1e3/60,t-$2.timestamp),$2.timestamp=t,$2.isProcessing=!0,e4.update.process($2),e4.preRender.process($2),e4.render.process($2),$2.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,O4.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(i_e),this.sharedNodes.forEach(u_e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Z2.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Z2.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){let t=this.path[e];t.updateScroll()}let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=l5(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!K5(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||m5(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),m_e(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;let{visualElement:t}=this.options;if(!t)return l5();let n=t.measureViewportBox(),r=(e=this.scroll)?.wasRoot||this.path.some(h_e);if(!r){let{scroll:e}=this.root;e&&(C5(n.x,e.offset.x),C5(n.y,e.offset.y))}return n}removeElementScroll(e){var t;let n=l5();if(B5(n,e),(t=this.scroll)?.wasRoot)return n;for(let t=0;t<this.path.length;t++){let r=this.path[t],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&B5(n,e),C5(n.x,i.offset.x),C5(n.y,i.offset.y))}return n}applyTransform(e,t=!1){let n=l5();B5(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&T5(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),m5(r.latestValues)&&T5(n,r.latestValues)}return m5(this.latestValues)&&T5(n,this.latestValues),n}removeTransform(e){let t=l5();B5(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!m5(n.latestValues))continue;p5(n.latestValues)&&n.updateSnapshot();let r=l5(),i=n.measurePageBox();B5(r,i),W5(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return m5(this.latestValues)&&W5(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$2.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;let n=this.getLead();this.isProjectionDirty||=n.isProjectionDirty,this.isTransformDirty||=n.isTransformDirty,this.isSharedProjectionDirty||=n.isSharedProjectionDirty;let r=!!this.resumingFrom||this!==n,i=!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(t=this.parent)?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize);if(i)return;let{layout:a,layoutId:o}=this.options;if(!(!this.layout||!(a||o))){if(this.resolvedRelativeTargetAt=$2.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=l5(),this.relativeTargetOrigin=l5(),e5(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),B5(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=l5(),this.targetWithTransforms=l5()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vge(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):B5(this.target,this.layout.layoutBox),b5(this.target,this.targetDelta)):B5(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=l5(),this.relativeTargetOrigin=l5(),e5(this.relativeTargetOrigin,this.target,e.target),B5(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}$5&&Q5.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||p5(this.parent.latestValues)||h5(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;let t=this.getLead(),n=!!this.resumingFrom||this!==t,r=!0;if((this.isProjectionDirty||(e=this.parent)?.isProjectionDirty)&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===$2.timestamp&&(r=!1),r)return;let{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||a))return;B5(this.layoutCorrected,this.layout.layoutBox);let o=this.treeScale.x,s=this.treeScale.y;Dge(this.layoutCorrected,this.treeScale,this.path,n),t.layout&&!t.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=l5());let{target:c}=t;if(!c){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(V5(this.prevProjectionDelta.x,this.projectionDelta.x),V5(this.prevProjectionDelta.y,this.projectionDelta.y)),Z8(this.projectionDelta,this.layoutCorrected,c,this.latestValues),(this.treeScale.x!==o||this.treeScale.y!==s||!Z5(this.projectionDelta.x,this.prevProjectionDelta.x)||!Z5(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,c)),$5&&Q5.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if((t=this.options.visualElement)==null||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=s5(),this.projectionDelta=s5(),this.projectionDeltaWithTransform=s5()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=s5();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=l5(),s=n?n.source:void 0,c=this.layout?this.layout.source:void 0,l=s!==c,u=this.getStack(),d=!u||u.members.length<=1,f=!!(l&&!d&&this.options.crossfade===!0&&!this.path.some(f_e));this.animationProgress=0;let p;this.mixTargetDelta=t=>{let n=t/1e3;s7(a.x,e.x,n),s7(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(e5(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),d_e(this.relativeTarget,this.relativeTargetOrigin,o,n),p&&Yge(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||=l5(),B5(p,this.relativeTarget)),l&&(this.animationValues=i,Uge(i,r,this.latestValues,n,f,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Q2(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Z2.update(()=>{A5.hasAnimatedSinceResize=!0,this.currentAnimation=Lge(0,t7,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(t7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&f7(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||l5();let t=Y8(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Y8(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}B5(t,n),T5(t,i),Z8(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Xge);let n=this.sharedNodes.get(e);n.add(t);let r=t.options.initialPromotionConfig;t.promote({transition:r?r.transition:void 0,preserveFollowOpacity:r&&r.shouldPreserveFollowOpacity?r.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){var e;let{layoutId:t}=this.options;return t&&(e=this.getStack())?.lead||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?(e=this.getStack())?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&n7(`z`,e,r,this.animationValues);for(let t=0;t<e7.length;t++)n7(`rotate${e7[t]}`,e,r,this.animationValues),n7(`skew${e7[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Qge;let r={visibility:``},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity=``,r.pointerEvents=G4(e?.pointerEvents)||``,r.transform=i?i(this.latestValues,``):`none`,r;let a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){let t={};return this.options.layoutId&&(t.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,t.pointerEvents=G4(e?.pointerEvents)||``),this.hasProjected&&!m5(this.latestValues)&&(t.transform=i?i({},``):`none`,this.hasProjected=!1),t}let o=a.animationValues||a.latestValues;this.applyTransformsToTarget(),r.transform=Zge(this.projectionDeltaWithTransform,this.treeScale,o),i&&(r.transform=i(o,r.transform));let{x:s,y:c}=this.projectionDelta;for(let e in r.transformOrigin=`${s.origin*100}% ${c.origin*100}% 0`,a.animationValues?r.opacity=a===this?(n=(t=o.opacity)??this.latestValues.opacity)??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:r.opacity=a===this?o.opacity===void 0?``:o.opacity:o.opacityExit===void 0?0:o.opacityExit,C3){if(o[e]===void 0)continue;let{correct:t,applyTo:n}=C3[e],i=r.transform===`none`?o[e]:t(o[e],a);if(n){let e=n.length;for(let t=0;t<e;t++)r[n[t]]=i}else r[e]=i}return this.options.layoutId&&(r.pointerEvents=a===this?G4(e?.pointerEvents)||``:`none`),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return(t=e.currentAnimation)?.stop()}),this.root.nodes.forEach(a7),this.root.sharedNodes.clear()}}}function e_e(e){e.updateLayout()}function t_e(e){var t;let n=(t=e.resumeFrom)?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners(`didUpdate`)){let{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i===`size`?u5(e=>{let r=a?n.measuredBox[e]:n.layoutBox[e],i=Y8(r);r.min=t[e].min,r.max=r.min+i}):f7(i,n.layoutBox,t)&&u5(r=>{let i=a?n.measuredBox[r]:n.layoutBox[r],o=Y8(t[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=s5();Z8(o,t,n.layoutBox);let s=s5();a?Z8(s,e.applyTransform(r,!0),n.measuredBox):Z8(s,t,n.layoutBox);let c=!K5(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=l5();e5(o,n.layoutBox,i.layoutBox);let s=l5();e5(s,t,a.layoutBox),Y5(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:t,snapshot:n,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function n_e(e){$5&&Q5.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function r_e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function i_e(e){e.clearSnapshot()}function a7(e){e.clearMeasurements()}function a_e(e){e.isLayoutDirty=!1}function o_e(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function o7(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function s_e(e){e.resolveTargetDelta()}function c_e(e){e.calcProjection()}function l_e(e){e.resetSkewAndRotation()}function u_e(e){e.removeLeadSnapshot()}function s7(e,t,n){e.translate=o8(t.translate,0,n),e.scale=o8(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function c7(e,t,n,r){e.min=o8(t.min,n.min,r),e.max=o8(t.max,n.max,r)}function d_e(e,t,n,r){c7(e.x,t.x,n.x,r),c7(e.y,t.y,n.y,r)}function f_e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const p_e={duration:.45,ease:[.4,0,.1,1]},l7=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),u7=l7(`applewebkit/`)&&!l7(`chrome/`)?Math.round:B2;function d7(e){e.min=u7(e.min),e.max=u7(e.max)}function m_e(e){d7(e.x),d7(e.y)}function f7(e,t,n){return e===`position`||e===`preserve-aspect`&&!_ge(X5(t),X5(n),.2)}function h_e(e){var t;return e!==e.root&&(t=e.scroll)?.wasRoot}const g_e=i7({attachResizeListener:(e,t)=>R8(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),p7={current:void 0},m7=i7({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!p7.current){let e=new g_e({});e.mount(window),e.setOptions({layoutScroll:!0}),p7.current=e}return p7.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),__e={pan:{Feature:Nge},drag:{Feature:Mge,ProjectionNode:m7,MeasureLayout:N5}};function h7(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=`onHover`+n,a=r[i];a&&Z2.postRender(()=>a(t,z8(t)))}var v_e=class extends L8{mount(){let{current:e}=this.node;e&&(this.unmount=mme(e,e=>(h7(this.node,e,`Start`),e=>h7(this.node,e,`End`))))}unmount(){}},y_e=class extends L8{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=f8(R8(this.node.current,`focus`,()=>this.onFocus()),R8(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function g7(e,t,n){let{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=`onTap`+(n===`End`?``:n),a=r[i];a&&Z2.postRender(()=>a(t,z8(t)))}var b_e=class extends L8{mount(){let{current:e}=this.node;e&&(this.unmount=vme(e,e=>(g7(this.node,e,`Start`),(e,{success:t})=>g7(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};const _7=new WeakMap,v7=new WeakMap,x_e=e=>{let t=_7.get(e.target);t&&t(e)},S_e=e=>{e.forEach(x_e)};function C_e({root:e,...t}){let n=e||document;v7.has(n)||v7.set(n,{});let r=v7.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(S_e,{root:e,...t})),r[i]}function w_e(e,t,n){let r=C_e(t);return _7.set(e,n),r.observe(e),()=>{_7.delete(e),r.unobserve(e)}}const T_e={some:0,all:1};var E_e=class extends L8{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:T_e[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};return w_e(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node,n=[`amount`,`margin`,`root`].some(D_e(e,t));n&&this.startObserver()}unmount(){}};function D_e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const O_e={inView:{Feature:E_e},tap:{Feature:b_e},focus:{Feature:y_e},hover:{Feature:v_e}},k_e={layout:{ProjectionNode:m7,MeasureLayout:N5}},y7={current:null},b7={current:!1};function A_e(){if(b7.current=!0,R2)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>y7.current=e.matches;e.addListener(t),t()}else y7.current=!1}const j_e=[...e8,j6,L6],M_e=e=>j_e.find($6(e)),x7=new WeakMap;function N_e(e,t,n){for(let r in t){let i=t[r],a=n[r];if(W4(i))e.addValue(r,i),process.env.NODE_ENV===`development`&&d4(i.version===`11.18.2`,`Attempting to mix Motion versions ${i.version} with 11.18.2 may not work as expected.`);else if(W4(a))e.addValue(r,s6(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,s6(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}const S7=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`];var P_e=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=X6,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=t6.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Z2.render(this.render,!1,!0))};let{latestValues:s,renderState:c,onUpdate:l}=a;this.onUpdate=l,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=v4(t),this.isVariantNode=y4(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];s[e]!==void 0&&W4(t)&&t.set(s[e],!1)}}mount(e){this.current=e,x7.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),b7.current||A_e(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:y7.current,process.env.NODE_ENV!==`production`&&d4(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in x7.delete(this.current),this.projection&&this.projection.unmount(),Q2(this.notifyUpdate),Q2(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=X4.has(e),r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Z2.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on(`renderRequest`,this.scheduleRender),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in r4){let t=r4[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):l5()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<S7.length;t++){let n=S7[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=`on`+n,i=e[r];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=N_e(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=s6(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r==`string`&&(Z6(r)||S6(r))?r=parseFloat(r):!M_e(r)&&L6.test(t)&&(r=B6(e,t)),this.setBaseTarget(e,W4(r)?r.get():r)),W4(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let{initial:n}=this.props,r;if(typeof n==`string`||typeof n==`object`){let i=B4(this.props,n,(t=this.presenceContext)?.custom);i&&(r=i[e])}if(n&&r!==void 0)return r;let i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!W4(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new i6),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},C7=class extends P_e{constructor(){super(...arguments),this.KeyframeResolver=n8}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;W4(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function F_e(e){return window.getComputedStyle(e)}var I_e=class extends C7{constructor(){super(...arguments),this.type=`html`,this.renderInstance=b3}readValueFromInstance(e,t){if(X4.has(t)){let e=z6(t);return e&&e.default||0}else{let n=F_e(e),r=(Q4(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return E5(e,t)}build(e,t,n){m3(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return T3(e,t,n)}},L_e=class extends C7{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=l5}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(X4.has(t)){let e=z6(t);return e&&e.default||0}return t=x3.has(t)?t:E4(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return E3(e,t,n)}build(e,t,n){g3(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){S3(e,t,n,r)}mount(e){this.isSVGTag=y3(e.tagName),super.mount(e)}};const R_e=(e,t)=>R4(e)?new L_e(t):new I_e(t,{allowProjection:e!==f.Fragment}),z_e=sme({...cge,...O_e,...__e,...k_e},R_e),B_e=f4(z_e);function w7(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function V_e({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){let i=n||(typeof window>`u`?class{}:window.ResizeObserver);if(!i)throw Error(`This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills`);let[a,o]=(0,f.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),s=(0,f.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),c=e?typeof e==`number`?e:e.scroll:null,l=e?typeof e==`number`?e:e.resize:null,u=(0,f.useRef)(!1);(0,f.useEffect)(()=>(u.current=!0,()=>void(u.current=!1)));let[d,p,m]=(0,f.useMemo)(()=>{let e=()=>{if(!s.current.element)return;let{left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d}=s.current.element.getBoundingClientRect(),f={left:e,top:t,width:n,height:i,bottom:a,right:c,x:l,y:d};s.current.element instanceof HTMLElement&&r&&(f.height=s.current.element.offsetHeight,f.width=s.current.element.offsetWidth),Object.freeze(f),u.current&&!G_e(s.current.lastBounds,f)&&o(s.current.lastBounds=f)};return[e,l?w7(e,l):e,c?w7(e,c):e]},[o,r,c,l]);function h(){s.current.scrollContainers&&(s.current.scrollContainers.forEach(e=>e.removeEventListener(`scroll`,m,!0)),s.current.scrollContainers=null),s.current.resizeObserver&&(s.current.resizeObserver.disconnect(),s.current.resizeObserver=null),s.current.orientationHandler&&(`orientation`in screen&&`removeEventListener`in screen.orientation?screen.orientation.removeEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.removeEventListener(`orientationchange`,s.current.orientationHandler))}function g(){s.current.element&&(s.current.resizeObserver=new i(m),s.current.resizeObserver.observe(s.current.element),t&&s.current.scrollContainers&&s.current.scrollContainers.forEach(e=>e.addEventListener(`scroll`,m,{capture:!0,passive:!0})),s.current.orientationHandler=()=>{m()},`orientation`in screen&&`addEventListener`in screen.orientation?screen.orientation.addEventListener(`change`,s.current.orientationHandler):`onorientationchange`in window&&window.addEventListener(`orientationchange`,s.current.orientationHandler))}let _=e=>{!e||e===s.current.element||(h(),s.current.element=e,s.current.scrollContainers=T7(e),g())};return U_e(m,!!t),H_e(p),(0,f.useEffect)(()=>{h(),g()},[t,m,p]),(0,f.useEffect)(()=>h,[]),[_,a,d]}function H_e(e){(0,f.useEffect)(()=>{let t=e;return window.addEventListener(`resize`,t),()=>void window.removeEventListener(`resize`,t)},[e])}function U_e(e,t){(0,f.useEffect)(()=>{if(t){let t=e;return window.addEventListener(`scroll`,t,{capture:!0,passive:!0}),()=>void window.removeEventListener(`scroll`,t,!0)}},[e,t])}function T7(e){let t=[];if(!e||e===document.body)return t;let{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(e=>e===`auto`||e===`scroll`)&&t.push(e),[...t,...T7(e.parentElement)]}const W_e=[`x`,`y`,`top`,`bottom`,`left`,`right`,`width`,`height`],G_e=(e,t)=>W_e.every(n=>e[n]===t[n]);var E7=e=>{throw TypeError(e)},D7=(e,t,n)=>t.has(e)||E7(`Cannot `+n),O7=(e,t,n)=>(D7(e,t,`read from private field`),n?n.call(e):t.get(e)),k7=(e,t,n)=>t.has(e)?E7(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),A7=(e,t,n,r)=>(D7(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),j7,M7=class{constructor(){k7(this,j7),this.register=e=>{O7(this,j7).push(e)},this.unregister=e=>{for(;O7(this,j7).indexOf(e)!==-1;)O7(this,j7).splice(O7(this,j7).indexOf(e),1)},this.backendChanged=e=>{for(let t of O7(this,j7))t.backendChanged(e)},A7(this,j7,[])}};j7=new WeakMap;var N7,P7,F7,I7,L7,R7,z7,B7,V7,H7,U7,W7=class e{constructor(t,n,r){if(k7(this,N7),k7(this,P7),k7(this,F7),k7(this,I7),k7(this,L7),k7(this,R7,(e,t,n)=>{if(!n.backend)throw Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(n)}`);let r=n.backend(e,t,n.options),i=n.id,a=!n.id&&r&&r.constructor;if(a&&(i=r.constructor.name),!i)throw Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(n)}
|
|
340
|
+
see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`);if(a&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
|
|
341
|
+
This might be unsupported in the future, please specify 'id' explicitely for every backend.`),O7(this,F7)[i])throw Error(`You must specify a unique 'id' property in your Backend entry:
|
|
342
|
+
${JSON.stringify(n)} (conflicts with: ${JSON.stringify(O7(this,F7)[i])})`);return{id:i,instance:r,preview:n.preview??!1,transition:n.transition,skipDispatchOnTransition:n.skipDispatchOnTransition??!1}}),this.setup=()=>{if(!(typeof window>`u`)){if(e.isSetUp)throw Error(`Cannot have two MultiBackends at the same time.`);e.isSetUp=!0,O7(this,z7).call(this,window),O7(this,F7)[O7(this,N7)].instance.setup()}},this.teardown=()=>{typeof window>`u`||(e.isSetUp=!1,O7(this,B7).call(this,window),O7(this,F7)[O7(this,N7)].instance.teardown())},this.connectDragSource=(e,t,n)=>O7(this,U7).call(this,`connectDragSource`,e,t,n),this.connectDragPreview=(e,t,n)=>O7(this,U7).call(this,`connectDragPreview`,e,t,n),this.connectDropTarget=(e,t,n)=>O7(this,U7).call(this,`connectDropTarget`,e,t,n),this.profile=()=>O7(this,F7)[O7(this,N7)].instance.profile(),this.previewEnabled=()=>O7(this,F7)[O7(this,N7)].preview,this.previewsList=()=>O7(this,P7),this.backendsList=()=>O7(this,I7),k7(this,z7,e=>{for(let t of O7(this,I7))t.transition&&e.addEventListener(t.transition.event,O7(this,V7))}),k7(this,B7,e=>{for(let t of O7(this,I7))t.transition&&e.removeEventListener(t.transition.event,O7(this,V7))}),k7(this,V7,e=>{let t=O7(this,N7);if(O7(this,I7).some(t=>t.id!==O7(this,N7)&&t.transition&&t.transition.check(e)?(A7(this,N7,t.id),!0):!1),O7(this,N7)!==t){O7(this,F7)[t].instance.teardown();for(let[e,t]of Object.entries(O7(this,L7)))t.unsubscribe(),t.unsubscribe=O7(this,H7).call(this,t.func,...t.args);O7(this,P7).backendChanged(this);let n=O7(this,F7)[O7(this,N7)];if(n.instance.setup(),n.skipDispatchOnTransition)return;let r=e.constructor,i=new r(e.type,e);e.target?.dispatchEvent(i)}}),k7(this,H7,(e,t,n,r)=>O7(this,F7)[O7(this,N7)].instance[e](t,n,r)),k7(this,U7,(e,t,n,r)=>{let i=`${e}_${t}`,a=O7(this,H7).call(this,e,t,n,r);return O7(this,L7)[i]={func:e,args:[t,n,r],unsubscribe:a},()=>{O7(this,L7)[i].unsubscribe(),delete O7(this,L7)[i]}}),!r||!r.backends||r.backends.length<1)throw Error(`You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)
|
|
343
|
+
see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx`);A7(this,P7,new M7),A7(this,F7,{}),A7(this,I7,[]);for(let e of r.backends){let r=O7(this,R7).call(this,t,n,e);O7(this,F7)[r.id]=r,O7(this,I7).push(r)}A7(this,N7,O7(this,I7)[0].id),A7(this,L7,{})}};N7=new WeakMap,P7=new WeakMap,F7=new WeakMap,I7=new WeakMap,L7=new WeakMap,R7=new WeakMap,z7=new WeakMap,B7=new WeakMap,V7=new WeakMap,H7=new WeakMap,U7=new WeakMap,W7.isSetUp=!1;var K_e=W7,q_e=(e,t,n)=>new K_e(e,t,n),G7=(e,t)=>({event:e,check:t}),J_e=G7(`touchstart`,e=>{let t=e;return t.touches!==null&&t.touches!==void 0}),Y_e=G7(`dragstart`,e=>e.type.indexOf(`drag`)!==-1||e.type.indexOf(`drop`)!==-1),X_e=G7(`mousedown`,e=>e.type.indexOf(`touch`)===-1&&e.type.indexOf(`mouse`)!==-1),Z_e=G7(`pointerdown`,e=>e.pointerType===`mouse`),K7;(function(e){e.mouse=`mouse`,e.touch=`touch`,e.keyboard=`keyboard`})(K7||={});var Q_e=class{get delay(){var e;return(e=this.args.delay)??0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var e;return(e=this.args.ignoreContextMenu)??!1}get enableHoverOutsideTarget(){var e;return(e=this.args.enableHoverOutsideTarget)??!1}get enableKeyboardEvents(){var e;return(e=this.args.enableKeyboardEvents)??!1}get enableMouseEvents(){var e;return(e=this.args.enableMouseEvents)??!1}get enableTouchEvents(){var e;return(e=this.args.enableTouchEvents)??!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var e,t,n,r;return(r=(n=(e=this.args)?.delayTouchStart)??(t=this.args)?.delay)??0}get delayMouseStart(){var e,t,n,r;return(r=(n=(e=this.args)?.delayMouseStart)??(t=this.args)?.delay)??0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<`u`)return window}get document(){var e;if((e=this.context)?.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var e;return(e=this.args)?.rootElement||this.document}constructor(e,t){this.args=e,this.context=t}};function $_e(e,t,n,r){return Math.sqrt(Math.abs(n-e)**2+Math.abs(r-t)**2)}function eve(e,t,n,r,i){if(!i)return!1;let a=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let e=0;e<i.length;++e){let t=i[e];if(t&&(t.start==null||a>=t.start)&&(t.end==null||a<=t.end))return!0}return!1}const tve={Left:1,Right:2,Center:4},nve={Left:0,Center:1,Right:2};function q7(e){return e.button===void 0||e.button===nve.Left}function rve(e){return e.buttons===void 0||(e.buttons&tve.Left)===0}function J7(e){return!!e.targetTouches}const ive=1;function ave(e){let t=e.nodeType===1?e:e.parentElement;if(!t)return;let{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function ove(e,t){if(e.targetTouches.length===1)return Y7(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return Y7(e.touches[0])}function Y7(e,t){return J7(e)?ove(e,t):{x:e.clientX,y:e.clientY}}const X7=(()=>{let e=!1;try{addEventListener(`test`,()=>{},Object.defineProperty({},`passive`,{get(){return e=!0,!0}}))}catch{}return e})(),Z7={[K7.mouse]:{start:`mousedown`,move:`mousemove`,end:`mouseup`,contextmenu:`contextmenu`},[K7.touch]:{start:`touchstart`,move:`touchmove`,end:`touchend`},[K7.keyboard]:{keydown:`keydown`}};var sve=class e{profile(){var e;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:(e=this.dragOverTargetIds)?.length||0}}get document(){return this.options.document}setup(){let t=this.options.rootElement;t&&(DQ(!e.isSetUp,`Cannot have two Touch backends at the same time.`),e.isSetUp=!0,this.addEventListener(t,`start`,this.getTopMoveStartHandler()),this.addEventListener(t,`start`,this.handleTopMoveStartCapture,!0),this.addEventListener(t,`move`,this.handleTopMove),this.addEventListener(t,`move`,this.handleTopMoveCapture,!0),this.addEventListener(t,`end`,this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,`contextmenu`,this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,`keydown`,this.handleCancelOnEscape,!0))}teardown(){let t=this.options.rootElement;t&&(e.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,`start`,this.handleTopMoveStartCapture,!0),this.removeEventListener(t,`start`,this.handleTopMoveStart),this.removeEventListener(t,`move`,this.handleTopMoveCapture,!0),this.removeEventListener(t,`move`,this.handleTopMove),this.removeEventListener(t,`end`,this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,`contextmenu`,this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,`keydown`,this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(e,t,n,r=!1){let i=X7?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){let a=Z7[r][t];a&&e.addEventListener(a,n,i)})}removeEventListener(e,t,n,r=!1){let i=X7?{capture:r,passive:!1}:r;this.listenerTypes.forEach(function(r){let a=Z7[r][t];a&&e.removeEventListener(a,n,i)})}connectDragSource(e,t){let n=this.handleMoveStart.bind(this,e);return this.sourceNodes.set(e,t),this.addEventListener(t,`start`,n),()=>{this.sourceNodes.delete(e),this.removeEventListener(t,`start`,n)}}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDropTarget(e,t){let n=this.options.rootElement;if(!this.document||!n)return()=>{};let r=r=>{if(!this.document||!n||!this.monitor.isDragging())return;let i;switch(r.type){case Z7.mouse.move:i={x:r.clientX,y:r.clientY};break;case Z7.touch.move:var a,o;i={x:(a=r.touches[0])?.clientX||0,y:(o=r.touches[0])?.clientY||0};break}let s=i==null?void 0:this.document.elementFromPoint(i.x,i.y),c=s&&t.contains(s);if(s===t||c)return this.handleMove(r,e)};return this.addEventListener(this.document.body,`move`,r),this.targetNodes.set(e,t),()=>{this.document&&(this.targetNodes.delete(e),this.removeEventListener(this.document.body,`move`,r))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(e){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=e,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{e&&!e.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!e||!e.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(e.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display=`none`,this.draggedSourceNode.removeAttribute(`data-reactid`),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(e,t,n){this.getSourceClientOffset=e=>{let t=this.sourceNodes.get(e);return t&&ave(t)},this.handleTopMoveStartCapture=e=>{q7(e)&&(this.moveStartSourceIds=[])},this.handleMoveStart=e=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(e)},this.handleTopMoveStart=e=>{if(!q7(e))return;let t=Y7(e);t&&(J7(e)&&(this.lastTargetTouchFallback=e.targetTouches[0]),this._mouseClientOffset=t),this.waitingForDelay=!1},this.handleTopMoveStartDelay=e=>{if(!q7(e))return;let t=e.type===Z7.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,e),t),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(e,t)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(t)},this.handleTopMove=e=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;let{moveStartSourceIds:t,dragOverTargetIds:n}=this,r=this.options.enableHoverOutsideTarget,i=Y7(e,this.lastTargetTouchFallback);if(!i)return;if(this._isScrolling||!this.monitor.isDragging()&&eve(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty(`x`)&&t&&$_e(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,i.x,i.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(t,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;let a=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(a),this.actions.publishDragSource(),e.cancelable&&e.preventDefault();let o=(n||[]).map(e=>this.targetNodes.get(e)).filter(e=>!!e),s=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(i.x,i.y,o):this.document.elementsFromPoint(i.x,i.y),c=[];for(let e in s){if(!s.hasOwnProperty(e))continue;let t=s[e];for(t!=null&&c.push(t);t;)t=t.parentElement,t&&c.indexOf(t)===-1&&c.push(t)}let l=c.filter(e=>o.indexOf(e)>-1).map(e=>this._getDropTargetId(e)).filter(e=>!!e).filter((e,t,n)=>n.indexOf(e)===t);if(r)for(let e in this.targetNodes){let t=this.targetNodes.get(e);if(a&&t&&t.contains(a)&&l.indexOf(e)===-1){l.unshift(e);break}}l.reverse(),this.actions.hover(l,{clientOffset:i})},this._getDropTargetId=e=>{let t=this.targetNodes.keys(),n=t.next();for(;n.done===!1;){let r=n.value;if(e===this.targetNodes.get(r))return r;n=t.next()}},this.handleTopMoveEndCapture=e=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,rve(e)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}e.cancelable&&e.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=e=>{e.key===`Escape`&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new Q_e(n,t),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(K7.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(K7.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(K7.keyboard)}};const cve=function(e,t={},n={}){return new sve(e,t,n)};var Q7=function(){return Q7=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Q7.apply(this,arguments)};function $7(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function lve(e){var t=e.isVisible,n=e.ease,r=n===void 0?`easeIn`:n,i=e.duration,a=e.variants,o=a===void 0?{open:{opacity:1,height:`auto`},close:{opacity:0,height:0}}:a,s=e.children,c=V_e({polyfill:M2}),l=c[0],u=c[1].height,d=(0,f.useState)(t),p=d[0],m=d[1],h=(0,f.useState)(t),g=h[0],_=h[1],v=(0,f.useState)(!1),y=v[0],b=v[1],x=function(){b(!1),t||m(!1)};(0,f.useEffect)(function(){b(!0),t?m(!0):_(!1)},[t]);var S=u===0;return(0,f.useEffect)(function(){p&&_(!0)},[S]),f.default.createElement(B_e.div,{style:y?{overflow:`hidden`}:void 0,onAnimationComplete:x,initial:g?`open`:`close`,animate:g?`open`:`close`,inherit:!1,variants:o,transition:{ease:r,duration:uve(u,i)}},f.default.createElement(`div`,{ref:l},p&&s))}function uve(e,t){if(t)return t;if(!e)return 0;var n=e/36;return Math.round((4+10*n**.25+n/5)*10)/1500}var e9=(0,f.createContext)({}),dve={isLock:!1},fve=function(e){var t=(0,f.useState)(dve.isLock),n=t[0],r=t[1];return f.default.createElement(e9.Provider,{value:{isLock:n,lock:function(){return r(!0)},unlock:function(){return r(!1)}}},e.children)},t9=(0,f.createContext)({}),n9={dropTargetId:void 0,index:void 0},pve=function(e){var t=(0,f.useState)(n9.dropTargetId),n=t[0],r=t[1],i=(0,f.useState)(n9.index),a=i[0],o=i[1],s=function(e,t){r(e),o(t)},c=function(){r(n9.dropTargetId),o(n9.index)};return f.default.createElement(t9.Provider,{value:{dropTargetId:n,index:a,showPlaceholder:s,hidePlaceholder:c}},e.children)},mve=function(e,t){return e.text>t.text?1:e.text<t.text?-1:0},r9=function(e,t){return e.find(function(e){return e.id===t})},i9=function(e,t,n){if(n===0)return!1;var r=e.find(function(e){return e.id===n});return r===void 0?!1:r.parent===t?!0:i9(e,t,r.parent)},a9=function(e){return typeof e==`object`&&!!e&&`id`in e&&`parent`in e&&`text`in e},o9=function(e,t,n){var r=n.tree,i=n.rootId,a=n.canDrop;if(e===null){if(t===i)return!0;var o=r.find(function(e){return e.id===t});return!!(o&&o.droppable)}else{var s=a9(e)?e.id:null;if(a){var c=a(s,t);if(c!==void 0)return c}if(s===t)return!1;var l=r.find(function(e){return e.id===s}),o=r.find(function(e){return e.id===t});return l===void 0||s===null?t===i||!!o?.droppable:o===void 0?l.parent!==0:l.parent===t||!o.droppable?!1:!i9(r,s,t)}},hve=function(e,t,n){return e.map(function(e){return e.id===t?Q7(Q7({},e),{parent:n}):e})},s9=function(e,t,n){if(n===0)return 0;var r=e.filter(function(e){return e.parent===t});return r[n]?e.findIndex(function(e){return e.id===r[n].id}):e.findIndex(function(e){return e.id===r[n-1].id})+1},gve=function(e,t){return e.findIndex(function(e){return e.id===t})},c9=function(e,t,n,r){var i=gve(e,t),a=s9(e,n,r);return a=a>i?a-1:a,[i,a]},_ve=function(e,t,n){var r=t<0?e.length+t:t;if(r>=0&&r<e.length){var i=n<0?e.length+n:n,a=e.splice(t,1)[0];e.splice(i,0,a)}},vve=function(e,t,n,r){var i=c9(e,t,n,r),a=i[0],o=i[1],s=$7([],e,!0);return _ve(s,a,o),s.map(function(e){return e.id===t?Q7(Q7({},e),{parent:n}):e})},yve=function(e,t){var n=e.getBoundingClientRect(),r=n.top+n.height/2;return t>r?`down`:`up`},l9=function(e,t){var n=``,r=0;return e.forEach(function(i,a){var o,s=yve(i,(o=t.getClientOffset())?.y||0);n===``?n=s:n!==s&&(n=s,r=a),a===e.length-1&&s===`down`&&(r=a+1)}),r},u9=function(e,t,n){var r=t.closest(`[role="list"]`),i=r?.querySelectorAll(`:scope > [role="listitem"]`);return i?l9(i,n):null},bve=function(e,t,n){var r=e.getBoundingClientRect(),i=n.dropTargetOffset,a=r.top+i,o=r.bottom-i;return t>o?`lower`:t<a?`upper`:`middle`},d9=function(e,t,n,r){var i;if(!t)return null;if(e===null){var a=t.querySelectorAll(`:scope > [role="listitem"]`);return{id:r.rootId,index:l9(a,n)}}var o=n.getItem(),s=t.querySelector(`[role="list"]`),c=bve(t,(i=n.getClientOffset())?.y||0,r);if(s){if(c===`upper`)if(o9(o,e.parent,r)){var l=u9(e,t,n);return l===null?null:{id:e.parent,index:l}}else return{id:e.id,index:0};var a=s.querySelectorAll(`:scope > [role="listitem"]`);return{id:e.id,index:l9(a,n)}}else{if(c===`middle`)return{id:e.id,index:0};if(o9(o,e.parent,r)){var l=u9(e,t,n);return l===null?null:{id:e.parent,index:l}}return null}},xve=function(e){return e===void 0&&(e={}),{backends:[{id:`html5`,backend:I0,options:e.html5,transition:Z_e},{id:`touch`,backend:cve,options:e.touch||{enableMouseEvents:!0},preview:!0,transition:J_e}]}},f9=function(e,t){return e.some(function(e){return e.parent===t})},p9=(0,f.createContext)({}),Sve=function(e){var t=Ove(e.tree,e.initialOpen),n=t[0],r=t[1],i=r.handleToggle,a=r.handleCloseAll,o=r.handleOpenAll,s=r.handleOpen,c=r.handleClose;(0,f.useImperativeHandle)(e.treeRef,function(){return{open:function(t){return s(t,e.onChangeOpen)},close:function(t){return c(t,e.onChangeOpen)},openAll:function(){return o(e.onChangeOpen)},closeAll:function(){return a(e.onChangeOpen)}}});var l=G1().getMonitor(),u=e.canDrop,d=e.canDrag,p=Q7(Q7({extraAcceptTypes:[],listComponent:`ul`,listItemComponent:`li`,placeholderComponent:`li`,sort:!0,insertDroppableFirst:!0,enableAnimateExpand:!1,dropTargetOffset:0,initialOpen:!1},e),{openIds:n,onDrop:function(t,n,r){if(t){var i={dragSourceId:t.id,dropTargetId:n,dragSource:t,dropTarget:r9(e.tree,n),monitor:l},a=e.tree;if(r9(a,t.id)||(a=$7($7([],a,!0),[t],!1)),e.sort===!1){var o=c9(a,t.id,n,r),s=o[1];i.destinationIndex=s,i.relativeIndex=r,e.onDrop(vve(a,t.id,n,r),i);return}e.onDrop(hve(a,t.id,n),i)}else{var i={dropTargetId:n,dropTarget:r9(e.tree,n),monitor:l};e.sort===!1&&(i.destinationIndex=s9(e.tree,n,r),i.relativeIndex=r),e.onDrop(e.tree,i)}},canDrop:u?function(t,n){return u(e.tree,{dragSourceId:t??void 0,dropTargetId:n,dragSource:l.getItem(),dropTarget:r9(e.tree,n),monitor:l})}:void 0,canDrag:d?function(t){return d(r9(e.tree,t))}:void 0,onToggle:function(t){return i(t,e.onChangeOpen)}});return f.default.createElement(p9.Provider,{value:p},e.children)},Cve=function(e){return f.default.createElement(Sve,Q7({},e),f.default.createElement(fve,null,f.default.createElement(pve,null,e.children)))},wve=function(e){var t=(0,f.useContext)(e9);(0,f.useEffect)(function(){if(e.current){var n=e.current,r=function(e){var n=e.target;(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&t.lock()},i=function(e){var n=e.target;(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&t.unlock()},a=function(e){return r(e)},o=function(e){return i(e)},s=function(e){return r(e)},c=function(e){return i(e)},l=new MutationObserver(function(){document.activeElement===document.body&&t.unlock()});return l.observe(n,{subtree:!0,childList:!0}),n.addEventListener(`mouseover`,a),n.addEventListener(`mouseout`,o),n.addEventListener(`focusin`,s),n.addEventListener(`focusout`,c),function(){l.disconnect(),n.removeEventListener(`mouseover`,a),n.removeEventListener(`mouseout`,o),n.removeEventListener(`focusin`,s),n.removeEventListener(`focusout`,c)}}},[e,t]),(0,f.useEffect)(function(){var n;(n=e.current)==null||n.setAttribute(`draggable`,t.isLock?`false`:`true`)},[e,t.isLock])},m9={TREE_ITEM:Symbol()},h9=null,g9=function(e){var t=e.target;if(t instanceof HTMLElement){var n=t.closest(`[role="listitem"]`);e.currentTarget===n&&(h9=n)}},_9=function(e){return g9(e)},v9=function(e){return g9(e)},Tve=function(e,t){var n=y9();(0,f.useEffect)(function(){var e=t.current;return e?.addEventListener(`dragstart`,_9),e?.addEventListener(`touchstart`,v9,{passive:!0}),function(){e?.removeEventListener(`dragstart`,_9),e?.removeEventListener(`touchstart`,v9)}},[t]);var r=Q1({type:m9.TREE_ITEM,item:function(r){var i=Q7({ref:t},e);return n.onDragStart&&n.onDragStart(i,r),i},end:function(e,t){var r=e;n.onDragEnd&&n.onDragEnd(r,t)},canDrag:function(){var r=n.canDrag;return h9===t.current?r?r(e.id):!0:!1},collect:function(e){return{isDragging:e.isDragging()}}}),i=r[0].isDragging,a=r[1],o=r[2];return[i,a,o]},Eve=function(e){var t=y9(),n=(0,f.useContext)(t9),r=s0({accept:$7([m9.TREE_ITEM],t.extraAcceptTypes,!0),drop:function(e,r){var i=t.rootId,a=t.onDrop,o=n.dropTargetId,s=n.index;r.isOver({shallow:!0})&&o!==void 0&&s!==void 0&&a(a9(e)?e:null,i,s),n.hidePlaceholder()},canDrop:function(e,n){var r=t.rootId;return n.isOver({shallow:!0})?e===void 0?!1:o9(e,r,t):!1},hover:function(r,i){if(i.isOver({shallow:!0})){var a=t.rootId,o=n.dropTargetId,s=n.index,c=n.showPlaceholder,l=n.hidePlaceholder,u=d9(null,e.current,i,t);if(u===null||!o9(r,a,t)){l();return}(u.id!==o||u.index!==s)&&c(u.id,u.index)}},collect:function(e){var t=e.getItem();return{isOver:e.isOver({shallow:!0})&&e.canDrop(),dragSource:t}}}),i=r[0],a=i.isOver,o=i.dragSource,s=r[1];return[a,o,s]},Dve=function(e,t){var n=y9(),r=(0,f.useContext)(t9),i=s0({accept:$7([m9.TREE_ITEM],n.extraAcceptTypes,!0),drop:function(e,t){var i=r.dropTargetId,a=r.index;t.isOver({shallow:!0})&&i!==void 0&&a!==void 0&&n.onDrop(a9(e)?e:null,i,a),r.hidePlaceholder()},canDrop:function(r,i){if(i.isOver({shallow:!0})){var a=d9(e,t.current,i,n);return a===null?!1:o9(r,a.id,n)}return!1},hover:function(i,a){if(a.isOver({shallow:!0})){var o=r.dropTargetId,s=r.index,c=r.showPlaceholder,l=r.hidePlaceholder,u=d9(e,t.current,a,n);if(u===null||!o9(i,u.id,n)){l();return}(u.id!==o||u.index!==s)&&c(u.id,u.index)}},collect:function(e){var t=e.getItem();return{isOver:e.isOver({shallow:!0})&&e.canDrop(),dragSource:t}}}),a=i[0],o=a.isOver,s=a.dragSource,c=i[1];return[o,s,c]},Ove=function(e,t){var n=(0,f.useMemo)(function(){return t===!0?e.filter(function(t){return f9(e,t.id)}).map(function(e){return e.id}):Array.isArray(t)?t:[]},[t]),r=(0,f.useState)(n),i=r[0],a=r[1];(0,f.useEffect)(function(){return a(n)},[n]);var o=function(e,t){var n=i.includes(e)?i.filter(function(t){return t!==e}):$7($7([],i,!0),[e],!1);a(n),t&&t(n)},s=function(e){a([]),e&&e([])},c=function(t){var n=e.filter(function(t){return f9(e,t.id)}).map(function(e){return e.id});a(n),t&&t(n)},l=function(t,n){var r=[];if(Array.isArray(t)){var o=e.filter(function(n){return t.includes(n.id)&&f9(e,n.id)});r=$7($7([],i,!0),o.map(function(e){return e.id}),!0).filter(function(e,t,n){return n.indexOf(e)===t})}else r=i.includes(t)?i:$7($7([],i,!0),[t],!1);a(r),n&&n(r)},u=function(e,t){var n=i.filter(function(t){return Array.isArray(e)?!e.includes(t):t!==e});a(n),t&&t(n)};return[i,{handleToggle:o,handleCloseAll:s,handleOpenAll:c,handleOpen:l,handleClose:u}]},kve=function(){return $1(function(e){var t=e.getItemType();return{item:e.getItem(),clientOffset:e.getClientOffset(),isDragging:e.isDragging()&&t===m9.TREE_ITEM}})},y9=function(){var e=(0,f.useContext)(p9);if(!e)throw Error(`useTreeContext must be used under TreeProvider`);return e},Ave=function(e,t){var n=y9(),r=n.rootId,i=n.rootProps,a=n.classes,o=a?.container||``;return t&&a?.dropTarget&&(o=`${o} ${a.dropTarget}`),e===r&&a?.root&&(o=`${o} ${a.root}`),e===r&&i?.className&&(o=`${o} ${i.className}`),o=o.trim(),o},jve=function(e,t,n){t.current?n(t):n(e),(0,f.useEffect)(function(){t.current?n(t):n(e)},[t.current])},Mve=function(e){var t=y9(),n=(0,f.useContext)(t9),r=(0,f.useRef)(null),i=(0,f.useRef)(null),a=t.tree.find(function(t){return t.id===e.id}),o=t.openIds,s=t.classes,c=t.enableAnimateExpand,l=o.includes(e.id),u=Tve(a,r),d=u[0],p=u[1],m=u[2],h=Dve(a,r),g=h[0],_=h[1],v=h[2];jve(r,i,p),o9(_,e.id,t)&&v(r),(0,f.useEffect)(function(){t.dragPreviewRender?m(F0(),{captureDraggingState:!0}):i.current&&m(r)},[m,t.dragPreviewRender]),wve(r);var y=function(){return t.onToggle(a.id)},b=t.listItemComponent,x=t.canDrag?t.canDrag(e.id):!0,S=n.dropTargetId===e.id,C={depth:e.depth,isOpen:l,isDragging:d,isDropTarget:S,draggable:x,hasChild:f9(t.tree,e.id),containerRef:r,handleRef:i,onToggle:y},w=``;return s?.listItem&&(w=typeof s.listItem==`string`?s.listItem:s.listItem(a,C)),g&&s?.dropTarget&&(w=`${w} ${s.dropTarget}`),d&&s?.draggingSource&&(w=`${w} ${s.draggingSource}`),f.default.createElement(b,{ref:r,className:w,role:`listitem`},t.render(a,C),c&&C.hasChild&&f.default.createElement(lve,{isVisible:l},f.default.createElement(x9,{parentId:e.id,depth:e.depth+1})),!c&&C.hasChild&&l&&f.default.createElement(x9,{parentId:e.id,depth:e.depth+1}))},b9=function(e){var t=y9(),n=t.placeholderRender,r=t.placeholderComponent,i=t.classes,a=(0,f.useContext)(t9),o=G1(),s=o.getMonitor(),c=s.getItem();if(!n||!c)return null;var l=e.dropTargetId===a.dropTargetId&&(e.index===a.index||e.index===void 0&&e.listCount===a.index),u=s.getTargetIds();return!l||!u.length?null:f.default.createElement(r,{className:i?.placeholder||``},n(c,{depth:e.depth}))},x9=function(e){var t=y9(),n=(0,f.useRef)(null),r=t.tree.filter(function(t){return t.parent===e.parentId}),i=r,a=typeof t.sort==`function`?t.sort:mve;if(t.insertDroppableFirst){var o=r.filter(function(e){return e.droppable}),s=r.filter(function(e){return!e.droppable});t.sort===!1?i=$7($7([],o,!0),s,!0):(o=o.sort(a),s=s.sort(a),i=$7($7([],o,!0),s,!0))}else t.sort!==!1&&(i=r.sort(a));var c=Eve(n),l=c[0],u=c[1],d=c[2];e.parentId===t.rootId&&o9(u,t.rootId,t)&&d(n);var p=Ave(e.parentId,l),m=t.rootProps||{},h=t.listComponent;return f.default.createElement(h,Q7({ref:n,role:`list`},m,{className:p}),i.map(function(t,n){return f.default.createElement(f.default.Fragment,{key:t.id},f.default.createElement(b9,{depth:e.depth,listCount:i.length,dropTargetId:e.parentId,index:n}),f.default.createElement(Mve,{id:t.id,depth:e.depth}))}),f.default.createElement(b9,{depth:e.depth,listCount:i.length,dropTargetId:e.parentId}))},Nve={height:`100%`,left:0,pointerEvents:`none`,position:`fixed`,top:0,width:`100%`,zIndex:100},Pve=function(e){var t=e.clientOffset;if(!t)return{};var n=t.x,r=t.y,i=`translate(${n}px, ${r}px)`;return{pointerEvents:`none`,transform:i}},Fve=function(){var e=y9(),t=kve(),n=t.isDragging,r=t.clientOffset;return!n||!r?null:f.default.createElement(`div`,{style:Nve},f.default.createElement(`div`,{style:Pve(t)},e.dragPreviewRender&&e.dragPreviewRender(t)))};function Ive(e,t){return f.default.createElement(Cve,Q7({},e,{treeRef:t}),e.dragPreviewRender&&f.default.createElement(Fve,null),f.default.createElement(x9,{parentId:e.rootId,depth:0}))}var Lve=(0,f.forwardRef)(Ive);const Rve=`_tree_15yn1_1`,zve=`_toggle_15yn1_4`,Bve=`_dropTarget_15yn1_11`,Vve=`_draggingSource_15yn1_26`,Hve=`_placeholderContainer_15yn1_29`,Uve=`_placeholder_15yn1_29`;var S9={tree:`_tree_15yn1_1`,toggle:`_toggle_15yn1_4`,dropTarget:`_dropTarget_15yn1_11`,draggingSource:`_draggingSource_15yn1_26`,placeholderContainer:`_placeholderContainer_15yn1_29`,placeholder:`_placeholder_15yn1_29`},C9=u(h());const Wve=({node:e,depth:t,isOpen:n,onToggle:r,hasChild:i,draggable:a,icons:o,onDrop:s})=>{let{id:c,data:l}=e,{active:u,testId:d,onClick:m,actions:h=[]}=l,[g,_]=f.default.useState(!1),[v,b]=f.default.useState(0),x=e=>{e.stopPropagation(),r(c)},C=e=>{e.preventDefault(),e.stopPropagation(),g||(_(!0),b(new Date().getTime()))},w=e=>{e.preventDefault(),e.stopPropagation(),new Date().getTime()-v>20&&_(!1)},T=e=>{e.preventDefault(),e.stopPropagation(),i&&!n&&new Date().getTime()-v>200&&x(e)},E=e=>{e.preventDefault(),e.stopPropagation(),_(!1),b(new Date().getTime()),s?.(e)};return(0,p.jsx)(`div`,{className:(0,C9.default)(X.item,X.action,u?X.active:``,t>0?X.indented:``,g?X.bordered:``),style:{marginInlineStart:t*24},"data-testid":d,onClick:e=>{m?m(e):i&&x(e)},onDrop:e=>s?E(e):{},onDragEnter:e=>s?C(e):{},onDragOver:e=>s?T(e):{},onDragLeave:e=>s?w(e):{},children:(0,p.jsxs)(`div`,{className:(0,C9.default)(X.itemHeader,g?X.noPointerEvents:``),children:[i&&(0,p.jsx)(`div`,{className:S9.toggle,children:(0,p.jsx)(_o,{basic:!0,colored:n?!0:y.MUTED,small:!0,round:!0,icon:n?o?.collapse||S.COLLAPSE:o?.expand||S.EXPAND,onClick:x})}),a&&(0,p.jsx)(`div`,{className:X.drag,children:(0,p.jsx)(er,{icon:S.DRAG})}),(0,p.jsx)(NL,{item:l}),(0,p.jsx)(`div`,{className:X.right,children:(0,p.jsx)(`div`,{className:X.actions,children:(0,p.jsx)(qs,{actions:h})})})]})})},Gve=({depth:e})=>(0,p.jsx)(`div`,{className:S9.placeholder,style:{left:e*24}}),Kve=({list:e,draggable:t=!1,onListReorder:n,onChangeOpen:r,testId:i,isInitialOpen:a=!1,treeRef:o,itemHasChild:s,onItemToggle:c,icons:l,allowParentReassignment:u,stickyHeader:d})=>{let f=e=>{r&&r(e)},m=(e,t)=>e?.findIndex(e=>e?.id===t)??-1,h=(e,t)=>{let n=m(t,e?.parent);if(n>=0){let r=t?.find(e=>e?.id===t[n]?.parent);e.parent=r?r.id:0}},g=(e,t)=>t?.filter(t=>t?.id!==e?.id)??[],_=(e,t,n)=>(n?.splice(t,0,e),n),v=e=>e.map(({id:e,parent:t,droppable:n,data:r})=>({id:e,parent:t,droppable:n,...r})),y=(e,t)=>{let{dragSource:r,dropTarget:i}=t,a=[...e];if(!n)return;let o=m(a,r?.id),s=m(a,r?.parent),c=[];r?.parent===i?.id&&o===0&&u&&(h(r,a),a=g(r,a),a=_(r,s,a)),c=v(a),n(c)},b=e?.items?.map(({id:e,droppable:t,parent:n,name:r,onDrop:i,...a})=>({id:e,text:r,droppable:t,parent:n,data:{name:r,onDrop:i,...a}}));return(0,p.jsxs)(`div`,{"data-testid":i,children:[e.name&&!e.noHeader&&(0,p.jsx)(kL,{name:e.name,actions:e.actions,stickyHeader:d}),(0,p.jsx)(`div`,{className:X.list,children:(0,p.jsx)(_1,{backend:q_e,options:xve(),context:window,children:(0,p.jsx)(Lve,{ref:o,tree:b,sort:!1,insertDroppableFirst:!1,canDrag:()=>t,canDrop:(e,{dragSource:t,dropTargetId:n})=>{if(t?.parent===n)return!0},rootId:0,render:(e,{depth:n,isOpen:r,onToggle:i,hasChild:a})=>(0,p.jsx)(Wve,{hasChild:s?s(e):a,node:e,depth:n,isOpen:r,onToggle:()=>{c?.(e,!r),i()},draggable:t,icons:l,onDrop:e.data?.onDrop}),onDrop:y,onChangeOpen:f,dropTargetOffset:5,placeholderRender:(e,{depth:t})=>(0,p.jsx)(Gve,{depth:t}),placeholderComponent:`div`,listComponent:`div`,listItemComponent:`div`,classes:{root:S9.tree,draggingSource:S9.draggingSource,dropTarget:S9.dropTarget,placeholder:S9.placeholderContainer},initialOpen:a})})})]})},qve=()=>{let e=(0,f.useRef)(null);(0,f.useLayoutEffect)(()=>{e.current&&(e.current(),e.current=null)});let t=t=>{e.current=t};return t},w9=e=>{let t=(0,f.useRef)();return(0,f.useEffect)(()=>{t.current=e},[e]),t.current},T9=(e,t)=>{let n=t?.[e];return n||(console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`),Im(e)??``)};let E9=function(e){return e.CUSTOM=`custom`,e.PREDEFINED=`predefined`,e}({});const D9=e=>e===`undefined`||e===void 0||e===``||e===`null`||e===null||e===`NaN`||isNaN(e),Jve=e=>{if(!e)return!1;let t=Hm(e);return!Sm.includes(t)},O9=({value:e,unitkey:t,toUnit:n})=>{let r=vm[t];if(!r||r.length===0||!Xm(e)?.valid||!r.includes(n))return!1;let i=Hm(String(e));return!(i&&!r.includes(i))},k9=({value:e,unitkey:t,toUnit:n,fromUnit:r,doNotConvertValue:i=!1,exactPrecision:a=!1})=>{let o=Wm(e)?Vm(e):e,s=[1/0,-1/0].includes(Number(o));if(i||s)return{value:o,error:null};let c=r||(Wm(e)?Hm(e):Im(t));if(!Xm(o)?.valid)return{value:void 0,error:`Invalid number format`};if(!n)return{value:void 0,error:`Target unit is missing`};if(!c)return{value:void 0,error:`Source unit is missing`};if(D9(o))return{value:void 0,error:`Value is invalid for conversion`};try{let e=Km(o,c);if(O9({value:e,toUnit:n,unitkey:t})){let t=a?qm(e,n):Gm(e,n);return{value:Vm(Fy(t)),error:null}}return{value:Vm(e),error:null}}catch{return{value:void 0,error:`Conversion not possible`}}},A9=({value:e=``,toUnit:t,unitkey:n,defaultFromUnit:r,doNotConvertValue:i})=>{let a=Vm(e),o=D9(a),s=O9({value:e,unitkey:n,toUnit:t});return!s||Jve(e)||o?{value:a}:Wm(e)?k9({value:e,unitkey:n,toUnit:t,fromUnit:r,doNotConvertValue:i,exactPrecision:!0}):{value:e}};var j9=u(Ra());const M9=e=>(0,j9.isObject)(e)&&!(0,j9.isArray)(e)&&!(0,j9.isFunction)(e)?(0,j9.get)(e,`fieldName`,``):typeof e==`string`?e:``,N9=(e=``)=>Sm?.includes(e),Yve=(e,t)=>{let n=Hm(e||``);return N9(t)&&N9(n)};let P9=(0,f.createContext)(null);const F9=()=>(0,f.useContext)(P9);let I9=!1;const Xve=e=>{I9||(I9=!0,P9=e)},Zve=e=>{let t=Zp(e);return t?e:am(e)},Qve=`_predefinedMenuActive_ye9w9_1`,$ve=`_inputWrapper_ye9w9_4`;var L9={predefinedMenuActive:`_predefinedMenuActive_ye9w9_1`,inputWrapper:`_inputWrapper_ye9w9_4`},eye=u(h()),R9=u(Ra());const tye=({name:e,placeholder:t=``,disabled:n=!1,disabledUnit:r=!1,error:i=null,left:a=!1,small:o=!1,width:s=`100%`,value:c,unitkey:l=``,initUnit:u,noConversion:d=!1,onChange:m=R9.noop,onClick:h=R9.noop,onFocus:g=R9.noop,onSwitchUnit:_=R9.noop,unitTemplate:y,testId:b,warning:x=null,predefinedOptions:S,initialPredefinedOption:C=!1,shouldLinkAutomaticly:w=!0,selectedPredefinedOptionKey:T,validationCallback:E=()=>({name:``,error:null}),disabledValidation:D=!1,allowEmpty:O=!1,convertBackToStorageUnit:k=!1,enableCosmeticRounding:A=!0,enableDisplayRounding:j=!1,roundDisplayValue:M,selectOnFocus:N,groupOrder:P,tooltip:ee=null})=>{let te=F9(),ne=qve();typeof c==`number`&&(c=`${c}`);let[re=``,ie=``]=c===void 0?[]:Bm(c),ae=(0,f.useMemo)(()=>T9(l,y||te?.unitTemplate),[l,y,te?.unitTemplate]),oe=Yve(c,ae),se=u||ae||ie,ce=w9(se),{value:le}=A9({value:c,toUnit:se,unitkey:l,defaultFromUnit:ie,doNotConvertValue:d}),ue=le===``?{value:re,unit:ie}:{value:le,unit:se},[de,fe]=(0,f.useState)(ue),pe=O||de?.value===void 0,[me,he]=(0,f.useState)(C?E9.PREDEFINED:E9.CUSTOM),ge=!!(D||n),_e=S&&S.find(e=>{if(!e?.value)return;if(T)return T===e.valueKey;let t=Wm(e.value)?Hm(e.value):``,{value:n=c}=k9({value:String(c),unitkey:l,toUnit:t});return Km(n,t)===e.value}),ve=()=>{let e=c??``,t=de.unit,n=O9({value:e,unitkey:l,toUnit:t});if(n){if(l)try{let t=Jm(e,l);return Vm(e)===``?t.map(e=>[``,e[1]]):t}catch{return null}}else{let e=Lm(l);return e?.map(e=>[``,e?.unit])}},ye=t=>{let n=M9(e),r=t.target,{value:i,selectionStart:a}=r,o=Km(i,de?.unit||``),s=k?Km(Gm(o,ie),ie):o;m({target:{value:s,name:n}});let[c,l]=Bm(o);fe({value:c,unit:l}),ne(()=>{r.selectionStart=a,r.selectionEnd=a})},be=(e,t)=>{t===de.unit||isNaN(Number(e))||(fe({value:e,unit:t}),_&&_(t))};(0,f.useEffect)(()=>{if(se){let e,t=``;if(ce!==se){let{value:n}=A9({value:c,toUnit:se,unitkey:l,defaultFromUnit:ie,doNotConvertValue:d});e=n,t=se}else if(Km(de.value,de.unit)!==c){let{value:n}=A9({value:c,toUnit:de.unit,unitkey:l,defaultFromUnit:ie,doNotConvertValue:d});e=n,t=de.unit}e!==void 0&&fe({value:e,unit:t}),S&&he(_e&&w?E9.PREDEFINED:E9.CUSTOM)}},[se,c,i,w]);let xe=ve(),Se=Pm(de.unit)||de.unit||``,Ce=d||!xe||xe&&xe.length===1,we=M9(e),Te,Ee=t=>{let r=t?.value?t.value:``,[i=``,a=``]=Wm(r)?Bm(r):[r],o=Ym(r),s=O9({value:r,unitkey:l,toUnit:a});if(s){let{value:e=``}=A9({value:r,toUnit:ae,unitkey:l,defaultFromUnit:a,doNotConvertValue:d});o=Ym(Km(e,ae))}return{type:L.OPTION,inline:!0,onClick:()=>{let a=Xm(i);a.valid&&!n&&(he(E9.PREDEFINED),m({target:{value:r,name:typeof e==`string`?e:e?.fieldName||``,predefinedSelected:!0,predefinedOption:t}}))},label:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Yd,{children:t.label}),(0,p.jsx)(vp,{width:`20px`,height:`0`})]}),description:o,selected:_e===t&&me===E9.PREDEFINED}};if(Te=[{type:L.OPTION,inline:!0,onClick:()=>{me!==E9.CUSTOM&&!n&&m({target:{value:Km(de.value,de.unit),name:typeof e==`string`?e:e?.fieldName||``}})},label:`Custom`,selected:me===E9.CUSTOM}],S?.length){let e=S.map(Ee);Te=[...Te,...e]}let De=e=>{if(Wm(e)){let t=Hm(e),{value:n}=A9({value:e,toUnit:de.unit,unitkey:l,defaultFromUnit:t,doNotConvertValue:d});return n}return e},Oe=!S&&(!P||P===v.FIRST)?v.FIRST:v.MIDDLE,ke=!P||P===v.LAST?v.LAST:v.MIDDLE;return(0,p.jsx)(`div`,{className:me===E9.PREDEFINED?(0,eye.default)(L9.predefinedMenuActive):``,children:(0,p.jsxs)(sp,{small:o,width:s,children:[S&&(0,p.jsx)(Us,{maxHeight:380,groupOrder:`first`,testId:b&&`${b}-predefined-menu`,disabled:n,menu:{colored:!0,trigger:`Component`,component:(0,p.jsx)(_o,{groupOrder:`first`,active:me===E9.PREDEFINED,icon:me===E9.PREDEFINED?`link`:`unlink`}),small:o,sections:Te},tooltip:me===E9.PREDEFINED?_e?.label:``}),(0,p.jsx)(`div`,{className:L9.inputWrapper,children:(0,p.jsx)(Iy,{name:we,testId:b,disabled:n,placeholder:De(t),value:de.value,onChange:ye,onFocus:g,error:i===null?void 0:i,warning:x===null?void 0:x,left:a,allowEmpty:pe,validationCallback:(e,t)=>E(we,t),enableCosmeticRounding:A,enableDisplayRounding:j,roundDisplayValue:M,groupOrder:Oe,disableInternalErrorValidationMessages:ge,small:o,selectOnFocus:N,tooltip:ee},we)}),Se&&(Ce||!oe?(0,p.jsx)(Yg,{groupOrder:ke,children:Se}):(0,p.jsx)(Us,{groupOrder:ke,maxHeight:380,disabled:r,testId:b&&`${b}-menu`,tabIndex:-1,menu:{label:Se,trigger:`DropDownButton`,small:o,sections:xe.map(([e=``,t=``,n])=>{let r=n||t||``,i=Xp(e)?e:``,a=A?Zve(i):i;return{type:`Option`,label:a,inline:!0,onClick:n=>{n.stopPropagation(),be(e,t)},description:r,selected:r===Se,testId:`${b}-unit-${r}`}})}}))]})})},z9=Object.freeze({Translations:`translations`,LanguageKey:`languageKey`}),B9={unified:`Unified`,split:`Split`,changesTooLarge:`Changes are too large to be shown`,unitIsMissing:`Unit is missing`,companySetting:`Company setting`,companySettingDifferent:`Company setting is different`,allUsers:`All users`,adminOnly:`Admin only`,custom:`Custom`},V9=e=>{let t=Object.keys(B9);return t.reduce((t,n)=>({...t,[n]:e?.[n]||B9?.[n]}),{})},H9={[z9.Translations]:V9(),[z9.LanguageKey]:`en`},U9=e=>e?H9[e]:H9,W9=(e,t)=>{H9[e]=t};var nye=u(Ra());const rye=e=>e.reduce(({preferredUnits:e,storageUnits:t},{unitKey:n,preferredUnit:r,storageUnit:i})=>{let{unitTemplate:a=null}=F9()??{};return e[n]=r??T9(n,a),t[n]=i,{preferredUnits:e,storageUnits:t}},{preferredUnits:{},storageUnits:{}}),iye=({row:e,rowIndex:t,selectedUnits:n,storageUnits:r,convertBackToStorageUnit:i,enableCosmeticRounding:a,enableDisplayRounding:o})=>({...e,cells:e.cells.map((e,s)=>{if(`autoUnit`in e&&e?.autoUnit&&(typeof e?.value==`string`||typeof e?.value==`number`)){let{unitKey:c,value:l,formatDisplayValue:u}=e,d=o&&`roundDisplayValue`in e?e?.roundDisplayValue:null,f=n[c],p=r[c],m=p&&f!==p,{value:h=l}=k9({value:Fy(l),unitkey:c,toUnit:f,fromUnit:p}),g=m?h:e.value,_=u?u(g,f):g;return{...e,value:_,enableCosmeticRounding:a,enableDisplayRounding:o,roundDisplayValue:d,selectOnFocus:!0,onChange:n=>{let{value:r}=n.target,a=i?p:f,{value:o=r}=k9({value:String(r),unitkey:c,toUnit:a,fromUnit:f}),l=m?o:r;if(`onChange`in e){let{onChange:r}=e,i={...n,target:{...n.target,value:String(l),rowIndex:t,cellIndex:s,unit:a}};r(i)}}}}return e})}),aye=({headers:e,selectedUnits:t,storageUnits:n,onChangeUnit:r})=>{let{translations:i}=U9();return e?e.map(e=>({...e,cells:e.cells.map(e=>{if(e.type===fx.AUTO_UNIT){let{testId:a,unitKey:o,disabled:s=!1,error:c}=e,l=n[o];return{value:l&&t[o],type:fx.SELECT,error:!l&&i?.unitIsMissing||c,disabled:s||!l,searchable:!1,options:Nm(o)?.map(e=>({label:Pm(e),value:e})),native:e.native,onChange:e=>r({unitKey:o,value:e.target.value}),testId:a}}return e})})):[]},oye=({table:e,unitConfig:t,convertBackToStorageUnit:n=!0,enableCosmeticRounding:r=!0,enableDisplayRounding:i=!0,onListReorder:a,canListReorder:o,beforeRenderRow:s})=>{let{headers:c,...l}=e,{storageUnits:u,preferredUnits:d}=rye(t),m=w9(d),[h,g]=(0,f.useState)(d),_=({unitKey:e,value:n})=>{g({...h,[e]:n});let r=t.find(t=>t.unitKey===e);r&&typeof r.onChange==`function`&&r.onChange({oldUnit:h[e],newUnit:n,unitKey:e})},v=(0,f.useCallback)(({row:e,rowIndex:t})=>{let a=s?s({row:e,rowIndex:t}):e;return iye({row:a,rowIndex:t,selectedUnits:h,storageUnits:u,convertBackToStorageUnit:n,enableCosmeticRounding:r,enableDisplayRounding:i})},[h,u,n,r,i]);return(0,f.useEffect)(()=>{let e=!(0,nye.isEqual)(d,m);e&&Object.keys(d).forEach(e=>{let t=m?.[e],n=d[e];t!==n&&_({unitKey:e,value:n})})},[t]),(0,p.jsx)(Hx,{table:{...l,headers:aye({headers:e.headers,selectedUnits:h,storageUnits:u,onChangeUnit:_})},onListReorder:a,canListReorder:o,beforeRenderRow:v})},sye=`_settingField_1x02n_1`;var cye={settingField:`_settingField_1x02n_1`},lye=u(Ra());const uye=({helpText:e,disabled:t=!1,showCustom:n=!1,children:r,userValue:i=void 0,companyValue:a=void 0,noPermission:o=!1,selectedOption:s,handleSelectChange:c,testId:l})=>{let{translations:u}=U9(),d=e=>{let t=e.replace(/\\n/g,`
|
|
344
|
+
`);return t.split(/\n/).map((e,t)=>(0,p.jsxs)(f.default.Fragment,{children:[e,(0,p.jsx)(`br`,{})]},t))},m=[...n?[]:[{label:u?.allUsers,value:!1}],{label:u?.adminOnly,value:!0},...n?[{label:u?.custom,value:void 0}]:[]],h=i!==void 0&&a!==void 0&&!(0,lye.isEqual)(i,a),g=()=>Xm(a).valid?`${u?.companySetting}: ${Wm(a)?Ym(a):a}`:u?.companySettingDifferent;return(0,p.jsxs)(`div`,{className:cye.settingField,"data-testid":l,children:[(0,p.jsxs)(bL,{justifyContent:`space-between`,wrap:!1,children:[r,!o&&(0,p.jsx)(`div`,{style:{flexShrink:0},children:(0,p.jsxs)(bL,{gap:`8px`,alignItems:`center`,children:[h&&(0,p.jsx)(Ea,{text:g(),icon:S.INFO}),(0,p.jsx)(Hg,{small:!0,searchable:!1,name:`userType`,options:m,value:s,disabled:t,onChange:c||void 0,"aria-label":`Select user type`,width:`auto`,testId:`${l}-select`})]})})]}),e&&(0,p.jsx)(Yd,{muted:!0,children:d(e)})]})};var G9=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.default=t;function t(){}t.prototype={diff:function(e,t){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.callback;typeof i==`function`&&(a=i,i={}),this.options=i;var o=this;function s(e){return a?(setTimeout(function(){a(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var c=t.length,l=e.length,u=1,d=c+l;i.maxEditLength&&(d=Math.min(d,i.maxEditLength));var f=(r=i.timeout)??1/0,p=Date.now()+f,m=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(m[0],t,e,0);if(m[0].oldPos+1>=l&&h+1>=c)return s([{value:this.join(t),count:t.length}]);var g=-1/0,_=1/0;function v(){for(var r=Math.max(g,-u);r<=Math.min(_,u);r+=2){var i=void 0,a=m[r-1],d=m[r+1];a&&(m[r-1]=void 0);var f=!1;if(d){var p=d.oldPos-r;f=d&&0<=p&&p<c}var v=a&&a.oldPos+1<l;if(!f&&!v){m[r]=void 0;continue}if(i=!v||f&&a.oldPos+1<d.oldPos?o.addToPath(d,!0,void 0,0):o.addToPath(a,void 0,!0,1),h=o.extractCommon(i,t,e,r),i.oldPos+1>=l&&h+1>=c)return s(n(o,i.lastComponent,t,e,o.useLongestToken));m[r]=i,i.oldPos+1>=l&&(_=Math.min(_,r-1)),h+1>=c&&(g=Math.max(g,r+1))}u++}if(a)(function e(){setTimeout(function(){if(u>d||Date.now()>p)return a();v()||e()},0)})();else for(;u<=d&&Date.now()<=p;){var y=v();if(y)return y}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function n(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(d.removed){if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var f=a[s-1];a[s-1]=a[s],a[s]=f}}else{if(!d.added&&i){var p=n.slice(l,l+d.count);p=p.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(p)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}})),dye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.diffChars=i;var t=n(G9());function n(e){return e&&e.__esModule?e:{default:e}}var r=new t.default;exports.characterDiff=r;function i(e,t,n){return r.diff(e,t,n)}})),K9=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.generateOptions=t;function t(e,t){if(typeof e==`function`)t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}})),fye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.diffWords=s,exports.diffWordsWithSpace=c;var t=r(G9()),n=K9();function r(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a=/\S/,o=new t.default;exports.wordDiff=o,o.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!a.test(e)&&!a.test(t)},o.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&i.test(t[n])&&i.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function s(e,t,r){return r=(0,n.generateOptions)(r,{ignoreWhitespace:!0}),o.diff(e,t,r)}function c(e,t,n){return o.diff(e,t,n)}})),q9=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.diffLines=a,exports.diffTrimmedLines=o;var t=r(G9()),n=K9();function r(e){return e&&e.__esModule?e:{default:e}}var i=new t.default;exports.lineDiff=i,i.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
345
|
+
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function a(e,t,n){return i.diff(e,t,n)}function o(e,t,r){var a=(0,n.generateOptions)(r,{ignoreWhitespace:!0});return i.diff(e,t,a)}})),pye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.diffSentences=i;var t=n(G9());function n(e){return e&&e.__esModule?e:{default:e}}var r=new t.default;exports.sentenceDiff=r,r.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};function i(e,t,n){return r.diff(e,t,n)}})),mye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.diffCss=i;var t=n(G9());function n(e){return e&&e.__esModule?e:{default:e}}var r=new t.default;exports.cssDiff=r,r.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function i(e,t,n){return r.diff(e,t,n)}})),hye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.diffJson=s,exports.canonicalize=c;var t=r(G9()),n=q9();function r(e){return e&&e.__esModule?e:{default:e}}function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}var a=Object.prototype.toString,o=new t.default;exports.jsonDiff=o,o.useLongestToken=!0,o.tokenize=n.lineDiff.tokenize,o.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(e,t){return t===void 0?n:t}:r;return typeof e==`string`?e:JSON.stringify(c(e,null,null,i),i,` `)},o.equals=function(e,n){return t.default.prototype.equals.call(o,e.replace(/,([\r\n])/g,`$1`),n.replace(/,([\r\n])/g,`$1`))};function s(e,t,n){return o.diff(e,t,n)}function c(e,t,n,r,o){t||=[],n||=[],r&&(e=r(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var l;if(a.call(e)===`[object Array]`){for(t.push(e),l=Array(e.length),n.push(l),s=0;s<e.length;s+=1)l[s]=c(e[s],t,n,r,o);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),i(e)===`object`&&e!==null){t.push(e),l={},n.push(l);var u=[],d;for(d in e)e.hasOwnProperty(d)&&u.push(d);for(u.sort(),s=0;s<u.length;s+=1)d=u[s],l[d]=c(e[d],t,n,r,d);t.pop(),n.pop()}else l=e;return l}})),gye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.diffArrays=i;var t=n(G9());function n(e){return e&&e.__esModule?e:{default:e}}var r=new t.default;exports.arrayDiff=r,r.tokenize=function(e){return e.slice()},r.join=r.removeEmpty=function(e){return e};function i(e,t,n){return r.diff(e,t,n)}})),J9=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.parsePatch=t;function t(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],a=0;function o(){var e={};for(i.push(e);a<n.length;){var r=n[a];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var o=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(r);o&&(e.index=o[1]),a++}for(s(e),s(e),e.hunks=[];a<n.length;){var l=n[a];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(l))break;if(/^@@/.test(l))e.hunks.push(c());else if(l&&t.strict)throw Error(`Unknown line `+(a+1)+` `+JSON.stringify(l));else a++}}function s(e){var t=/^(---|\+\+\+)\s+(.*)$/.exec(n[a]);if(t){var r=t[1]===`---`?`old`:`new`,i=t[2].split(` `,2),o=i[0].replace(/\\\\/g,`\\`);/^".*"$/.test(o)&&(o=o.substr(1,o.length-2)),e[r+`FileName`]=o,e[r+`Header`]=(i[1]||``).trim(),a++}}function c(){var e=a,i=n[a++],o=i.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),s={oldStart:+o[1],oldLines:o[2]===void 0?1:+o[2],newStart:+o[3],newLines:o[4]===void 0?1:+o[4],lines:[],linedelimiters:[]};s.oldLines===0&&(s.oldStart+=1),s.newLines===0&&(s.newStart+=1);for(var c=0,l=0;a<n.length&&!(n[a].indexOf(`--- `)===0&&a+2<n.length&&n[a+1].indexOf(`+++ `)===0&&n[a+2].indexOf(`@@`)===0);a++){var u=n[a].length==0&&a!=n.length-1?` `:n[a][0];if(u===`+`||u===`-`||u===` `||u===`\\`)s.lines.push(n[a]),s.linedelimiters.push(r[a]||`
|
|
346
|
+
`),u===`+`?c++:u===`-`?l++:u===` `&&(c++,l++);else break}if(!c&&s.newLines===1&&(s.newLines=0),!l&&s.oldLines===1&&(s.oldLines=0),t.strict){if(c!==s.newLines)throw Error(`Added line count did not match for hunk at line `+(e+1));if(l!==s.oldLines)throw Error(`Removed line count did not match for hunk at line `+(e+1))}return s}for(;a<n.length;)o();return i}})),_ye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.default=t;function t(e,t,n){var r=!0,i=!1,a=!1,o=1;return function s(){if(r&&!a){if(i?o++:r=!1,e+o<=n)return o;a=!0}if(!i)return a||(r=!0),t<=e-o?-o++:(i=!0,s())}}})),vye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.applyPatch=i,exports.applyPatches=a;var t=J9(),n=r(_ye());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof r==`string`&&(r=(0,t.parsePatch)(r)),Array.isArray(r)){if(r.length>1)throw Error(`applyPatch only works with a single input.`);r=r[0]}var a=e.split(/\r\n|[\n\v\f\r\x85]/),o=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=r.hunks,c=i.compareLine||function(e,t,n,r){return t===r},l=0,u=i.fuzzFactor||0,d=0,f=0,p,m;function h(e,t){for(var n=0;n<e.lines.length;n++){var r=e.lines[n],i=r.length>0?r[0]:` `,o=r.length>0?r.substr(1):r;if(i===` `||i===`-`){if(!c(t+1,a[t],i,o)&&(l++,l>u))return!1;t++}}return!0}for(var g=0;g<s.length;g++){for(var _=s[g],v=a.length-_.oldLines,y=0,b=f+_.oldStart-1,x=(0,n.default)(b,d,v);y!==void 0;y=x())if(h(_,b+y)){_.offset=f+=y;break}if(y===void 0)return!1;d=_.offset+_.oldStart+_.oldLines}for(var S=0,C=0;C<s.length;C++){var w=s[C],T=w.oldStart+w.offset+S-1;S+=w.newLines-w.oldLines;for(var E=0;E<w.lines.length;E++){var D=w.lines[E],O=D.length>0?D[0]:` `,k=D.length>0?D.substr(1):D,A=w.linedelimiters&&w.linedelimiters[E]||`
|
|
347
|
+
`;if(O===` `)T++;else if(O===`-`)a.splice(T,1),o.splice(T,1);else if(O===`+`)a.splice(T,0,k),o.splice(T,0,A),T++;else if(O===`\\`){var j=w.lines[E-1]?w.lines[E-1][0]:null;j===`+`?p=!0:j===`-`&&(m=!0)}}}if(p)for(;!a[a.length-1];)a.pop(),o.pop();else m&&(a.push(``),o.push(`
|
|
348
|
+
`));for(var M=0;M<a.length-1;M++)a[M]=a[M]+o[M];return a.join(``)}function a(e,n){typeof e==`string`&&(e=(0,t.parsePatch)(e));var r=0;function a(){var t=e[r++];if(!t)return n.complete();n.loadFile(t,function(e,r){if(e)return n.complete(e);var o=i(r,t,n);n.patched(t,o,function(e){if(e)return n.complete(e);a()})})}a()}})),Y9=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.structuredPatch=c,exports.formatPatch=l,exports.createTwoFilesPatch=u,exports.createPatch=d;var t=q9();function n(e){return o(e)||a(e)||i(e)||r()}function r(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
349
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(e,t){if(e){if(typeof e==`string`)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}function a(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function o(e){if(Array.isArray(e))return s(e)}function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,r,i,a,o,s,c){c||={},c.context===void 0&&(c.context=4);var l=(0,t.diffLines)(i,a,c);if(!l)return;l.push({value:``,lines:[]});function u(e){return e.map(function(e){return` `+e})}for(var d=[],f=0,p=0,m=[],h=1,g=1,_=function(e){var t=l[e],r=t.lines||t.value.replace(/\n$/,``).split(`
|
|
350
|
+
`);if(t.lines=r,t.added||t.removed){var o;if(!f){var s=l[e-1];f=h,p=g,s&&(m=c.context>0?u(s.lines.slice(-c.context)):[],f-=m.length,p-=m.length)}(o=m).push.apply(o,n(r.map(function(e){return(t.added?`+`:`-`)+e}))),t.added?g+=r.length:h+=r.length}else{if(f)if(r.length<=c.context*2&&e<l.length-2){var _;(_=m).push.apply(_,n(u(r)))}else{var v,y=Math.min(r.length,c.context);(v=m).push.apply(v,n(u(r.slice(0,y))));var b={oldStart:f,oldLines:h-f+y,newStart:p,newLines:g-p+y,lines:m};if(e>=l.length-2&&r.length<=c.context){var x=/\n$/.test(i),S=/\n$/.test(a),C=r.length==0&&m.length>b.oldLines;!x&&C&&i.length>0&&m.splice(b.oldLines,0,`\`),(!x&&!C||!S)&&m.push(`\`)}d.push(b),f=0,p=0,m=[]}h+=r.length,g+=r.length}},v=0;v<l.length;v++)_(v);return{oldFileName:e,newFileName:r,oldHeader:o,newHeader:s,hunks:d}}function l(e){if(Array.isArray(e))return e.map(l).join(`
|
|
351
|
+
`);var t=[];e.oldFileName==e.newFileName&&t.push(`Index: `+e.oldFileName),t.push(`===================================================================`),t.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),t.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader));for(var n=0;n<e.hunks.length;n++){var r=e.hunks[n];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,t.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`),t.push.apply(t,r.lines)}return t.join(`
|
|
352
|
+
`)+`
|
|
353
|
+
`}function u(e,t,n,r,i,a,o){return l(c(e,t,n,r,i,a,o))}function d(e,t,n,r,i,a){return u(e,e,t,n,r,i,a)}})),yye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.arrayEqual=t,exports.arrayStartsWith=n;function t(e,t){return e.length===t.length?n(e,t):!1}function n(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}})),bye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.calcLineCount=u,exports.merge=d;var t=Y9(),n=J9(),r=yye();function i(e){return c(e)||s(e)||o(e)||a()}function a(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
354
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(e,t){if(e){if(typeof e==`string`)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}}function s(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function c(e){if(Array.isArray(e))return l(e)}function l(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=D(e.lines),n=t.oldLines,r=t.newLines;n===void 0?delete e.oldLines:e.oldLines=n,r===void 0?delete e.newLines:e.newLines=r}function d(e,t,n){e=f(e,n),t=f(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index),(e.newFileName||t.newFileName)&&(p(e)?p(t)?(r.oldFileName=m(r,e.oldFileName,t.oldFileName),r.newFileName=m(r,e.newFileName,t.newFileName),r.oldHeader=m(r,e.oldHeader,t.oldHeader),r.newHeader=m(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader)),r.hunks=[];for(var i=0,a=0,o=0,s=0;i<e.hunks.length||a<t.hunks.length;){var c=e.hunks[i]||{oldStart:1/0},l=t.hunks[a]||{oldStart:1/0};if(h(c,l))r.hunks.push(g(c,o)),i++,s+=c.newLines-c.oldLines;else if(h(l,c))r.hunks.push(g(l,s)),a++,o+=l.newLines-l.oldLines;else{var u={oldStart:Math.min(c.oldStart,l.oldStart),oldLines:0,newStart:Math.min(c.newStart+o,l.oldStart+s),newLines:0,lines:[]};_(u,c.oldStart,c.lines,l.oldStart,l.lines),a++,i++,r.hunks.push(u)}}return r}function f(e,r){if(typeof e==`string`){if(/^@@/m.test(e)||/^Index:/m.test(e))return(0,n.parsePatch)(e)[0];if(!r)throw Error(`Must provide a base reference or pass in a patch`);return(0,t.structuredPatch)(void 0,void 0,r,e)}return e}function p(e){return e.newFileName&&e.newFileName!==e.oldFileName}function m(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function h(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function g(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function _(e,t,n,r,a){var o={offset:t,lines:n,index:0},s={offset:r,lines:a,index:0};for(x(e,o,s),x(e,s,o);o.index<o.lines.length&&s.index<s.lines.length;){var c=o.lines[o.index],l=s.lines[s.index];if((c[0]===`-`||c[0]===`+`)&&(l[0]===`-`||l[0]===`+`))v(e,o,s);else if(c[0]===`+`&&l[0]===` `){var d;(d=e.lines).push.apply(d,i(C(o)))}else if(l[0]===`+`&&c[0]===` `){var f;(f=e.lines).push.apply(f,i(C(s)))}else c[0]===`-`&&l[0]===` `?y(e,o,s):l[0]===`-`&&c[0]===` `?y(e,s,o,!0):c===l?(e.lines.push(c),o.index++,s.index++):b(e,C(o),C(s))}S(e,o),S(e,s),u(e)}function v(e,t,n){var a=C(t),o=C(n);if(T(a)&&T(o)){if((0,r.arrayStartsWith)(a,o)&&E(n,a,a.length-o.length)){var s;(s=e.lines).push.apply(s,i(a));return}else if((0,r.arrayStartsWith)(o,a)&&E(t,o,o.length-a.length)){var c;(c=e.lines).push.apply(c,i(o));return}}else if((0,r.arrayEqual)(a,o)){var l;(l=e.lines).push.apply(l,i(a));return}b(e,a,o)}function y(e,t,n,r){var a=C(t),o=w(n,a);if(o.merged){var s;(s=e.lines).push.apply(s,i(o.merged))}else b(e,r?o:a,r?a:o)}function b(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function x(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function S(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function C(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if(n===`-`&&r[0]===`+`&&(n=`+`),n===r[0])t.push(r),e.index++;else break}return t}function w(e,t){for(var n=[],r=[],i=0,a=!1,o=!1;i<t.length&&e.index<e.lines.length;){var s=e.lines[e.index],c=t[i];if(c[0]===`+`)break;if(a||=s[0]!==` `,r.push(c),i++,s[0]===`+`)for(o=!0;s[0]===`+`;)n.push(s),s=e.lines[++e.index];c.substr(1)===s.substr(1)?(n.push(s),e.index++):o=!0}if((t[i]||``)[0]===`+`&&a&&(o=!0),o)return n;for(;i<t.length;)r.push(t[i++]);return{merged:r,changes:n}}function T(e){return e.reduce(function(e,t){return e&&t[0]===`-`},!0)}function E(e,t,n){for(var r=0;r<n;r++){var i=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==` `+i)return!1}return e.index+=n,!0}function D(e){var t=0,n=0;return e.forEach(function(e){if(typeof e!=`string`){var r=D(e.mine),i=D(e.theirs);t!==void 0&&(r.oldLines===i.oldLines?t+=r.oldLines:t=void 0),n!==void 0&&(r.newLines===i.newLines?n+=r.newLines:n=void 0)}else n!==void 0&&(e[0]===`+`||e[0]===` `)&&n++,t!==void 0&&(e[0]===`-`||e[0]===` `)&&t++}),{oldLines:t,newLines:n}}})),xye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.reversePatch=i;function t(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 n(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]==null?{}:arguments[n];n%2?t(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return Array.isArray(e)?e.map(i).reverse():n(n({},e),{},{oldFileName:e.newFileName,oldHeader:e.newHeader,newFileName:e.oldFileName,newHeader:e.oldHeader,hunks:e.hunks.map(function(e){return{oldLines:e.newLines,oldStart:e.newStart,newLines:e.oldLines,newStart:e.oldStart,linedelimiters:e.linedelimiters,lines:e.lines.map(function(e){return e.startsWith(`-`)?`+${e.slice(1)}`:e.startsWith(`+`)?`-${e.slice(1)}`:e})}})})}})),Sye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.convertChangesToDMP=t;function t(e){for(var t=[],n,r,i=0;i<e.length;i++)n=e[i],r=n.added?1:n.removed?-1:0,t.push([r,n.value]);return t}})),Cye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),exports.convertChangesToXML=t;function t(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];i.added?t.push(`<ins>`):i.removed&&t.push(`<del>`),t.push(n(i.value)),i.added?t.push(`</ins>`):i.removed&&t.push(`</del>`)}return t.join(``)}function n(e){var t=e;return t=t.replace(/&/g,`&`),t=t.replace(/</g,`<`),t=t.replace(/>/g,`>`),t=t.replace(/"/g,`"`),t}})),wye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0}),Object.defineProperty(exports,`Diff`,{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,`diffChars`,{enumerable:!0,get:function(){return n.diffChars}}),Object.defineProperty(exports,`diffWords`,{enumerable:!0,get:function(){return r.diffWords}}),Object.defineProperty(exports,`diffWordsWithSpace`,{enumerable:!0,get:function(){return r.diffWordsWithSpace}}),Object.defineProperty(exports,`diffLines`,{enumerable:!0,get:function(){return i.diffLines}}),Object.defineProperty(exports,`diffTrimmedLines`,{enumerable:!0,get:function(){return i.diffTrimmedLines}}),Object.defineProperty(exports,`diffSentences`,{enumerable:!0,get:function(){return a.diffSentences}}),Object.defineProperty(exports,`diffCss`,{enumerable:!0,get:function(){return o.diffCss}}),Object.defineProperty(exports,`diffJson`,{enumerable:!0,get:function(){return s.diffJson}}),Object.defineProperty(exports,`canonicalize`,{enumerable:!0,get:function(){return s.canonicalize}}),Object.defineProperty(exports,`diffArrays`,{enumerable:!0,get:function(){return c.diffArrays}}),Object.defineProperty(exports,`applyPatch`,{enumerable:!0,get:function(){return l.applyPatch}}),Object.defineProperty(exports,`applyPatches`,{enumerable:!0,get:function(){return l.applyPatches}}),Object.defineProperty(exports,`parsePatch`,{enumerable:!0,get:function(){return u.parsePatch}}),Object.defineProperty(exports,`merge`,{enumerable:!0,get:function(){return d.merge}}),Object.defineProperty(exports,`reversePatch`,{enumerable:!0,get:function(){return f.reversePatch}}),Object.defineProperty(exports,`structuredPatch`,{enumerable:!0,get:function(){return p.structuredPatch}}),Object.defineProperty(exports,`createTwoFilesPatch`,{enumerable:!0,get:function(){return p.createTwoFilesPatch}}),Object.defineProperty(exports,`createPatch`,{enumerable:!0,get:function(){return p.createPatch}}),Object.defineProperty(exports,`formatPatch`,{enumerable:!0,get:function(){return p.formatPatch}}),Object.defineProperty(exports,`convertChangesToDMP`,{enumerable:!0,get:function(){return m.convertChangesToDMP}}),Object.defineProperty(exports,`convertChangesToXML`,{enumerable:!0,get:function(){return h.convertChangesToXML}});var t=g(G9()),n=dye(),r=fye(),i=q9(),a=pye(),o=mye(),s=hye(),c=gye(),l=vye(),u=J9(),d=bye(),f=xye(),p=Y9(),m=Sye(),h=Cye();function g(e){return e&&e.__esModule?e:{default:e}}})),Tye=s((exports=>{var t=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=exports&&exports.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r};Object.defineProperty(exports,`__esModule`,{value:!0});let i=r(wye()),a=i;var o;(function(e){e[e.DEFAULT=0]=`DEFAULT`,e[e.ADDED=1]=`ADDED`,e[e.REMOVED=2]=`REMOVED`,e[e.CHANGED=3]=`CHANGED`})(o||(exports.DiffType=o={}));var s;(function(e){e.CHARS=`diffChars`,e.WORDS=`diffWords`,e.WORDS_WITH_SPACE=`diffWordsWithSpace`,e.LINES=`diffLines`,e.TRIMMED_LINES=`diffTrimmedLines`,e.SENTENCES=`diffSentences`,e.CSS=`diffCss`,e.JSON=`diffJson`})(s||(exports.DiffMethod=s={}));let c=e=>{if(e===``)return[];let t=e.replace(/\n$/,``).split(`
|
|
355
|
+
`);return t},l=(e,t,n=s.CHARS)=>{let r=a[n](e,t),i={left:[],right:[]};return r.forEach(({added:e,removed:t,value:n})=>{let r={};return e&&(r.type=o.ADDED,r.value=n,i.right.push(r)),t&&(r.type=o.REMOVED,r.value=n,i.left.push(r)),!t&&!e&&(r.type=o.DEFAULT,r.value=n,i.right.push(r),i.left.push(r)),r}),i},u=(e,t,n=!1,r=s.CHARS,a=0,u=[])=>{let d=[];d=typeof e==`string`&&typeof t==`string`?i.diffLines(e.trimRight(),t.trimRight(),{newlineIsToken:!1,ignoreWhitespace:!1,ignoreCase:!1}):i.diffJson(e,t);let f=a,p=a,m=[],h=0,g=[],_=[],v=(e,t,i,a,s)=>{let m=c(e);return m.map((e,m)=>{let y={},b={};if(!(_.includes(`${t}-${m}`)||s&&m!==0)){if(i||a){let i=!0;if(a){p+=1,y.lineNumber=p,y.type=o.REMOVED,y.value=e||` `;let a=d[t+1];if(a&&a.added){let o=c(a.value)[m];if(o){let a=v(o,t,!0,!1,!0),{value:s,lineNumber:c,type:u}=a[0].right;if(_.push(`${t+1}-${m}`),b.lineNumber=c,y.value===s)i=!1,b.type=0,y.type=0,b.value=s;else if(b.type=u,n)b.value=s;else{let t=l(e,s,r);b.value=t.right,y.value=t.left}}}}else f+=1,b.lineNumber=f,b.type=o.ADDED,b.value=e;i&&!s&&(g.includes(h)||g.push(h))}else p+=1,f+=1,y.lineNumber=p,y.type=o.DEFAULT,y.value=e,b.lineNumber=f,b.type=o.DEFAULT,b.value=e;return(u?.includes(`L-${y.lineNumber}`)||u?.includes(`R-${b.lineNumber}`)&&!g.includes(h))&&g.push(h),s||(h+=1),{right:b,left:y}}}).filter(Boolean)};return d.forEach(({added:e,removed:t,value:n},r)=>{m=[...m,...v(n,r,e,t)]}),{lineInformation:m,diffLines:g}};exports.computeLineInformation=u})),Eye=s((exports=>{var t=exports&&exports.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},n=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,`__esModule`,{value:!0});let r=n((CZ(),d(vZ)));exports.default=(e,n=!1,i=``)=>{let{variables:a={}}=e,o=t(e,[`variables`]),s={light:Object.assign({diffViewerBackground:`#fff`,diffViewerColor:`#212529`,addedBackground:`#e6ffed`,addedColor:`#24292e`,removedBackground:`#ffeef0`,removedColor:`#24292e`,changedBackground:`#fffbdd`,wordAddedBackground:`#acf2bd`,wordRemovedBackground:`#fdb8c0`,addedGutterBackground:`#cdffd8`,removedGutterBackground:`#ffdce0`,gutterBackground:`#f7f7f7`,gutterBackgroundDark:`#f3f1f1`,highlightBackground:`#fffbdd`,highlightGutterBackground:`#fff5b1`,codeFoldGutterBackground:`#dbedff`,codeFoldBackground:`#f1f8ff`,emptyLineBackground:`#fafbfc`,gutterColor:`#212529`,addedGutterColor:`#212529`,removedGutterColor:`#212529`,codeFoldContentColor:`#212529`,diffViewerTitleBackground:`#fafbfc`,diffViewerTitleColor:`#212529`,diffViewerTitleBorderColor:`#eee`},a.light||{}),dark:Object.assign({diffViewerBackground:`#2e303c`,diffViewerColor:`#FFF`,addedBackground:`#044B53`,addedColor:`white`,removedBackground:`#632F34`,removedColor:`white`,changedBackground:`#3e302c`,wordAddedBackground:`#055d67`,wordRemovedBackground:`#7d383f`,addedGutterBackground:`#034148`,removedGutterBackground:`#632b30`,gutterBackground:`#2c2f3a`,gutterBackgroundDark:`#262933`,highlightBackground:`#2a3967`,highlightGutterBackground:`#2d4077`,codeFoldGutterBackground:`#21232b`,codeFoldBackground:`#262831`,emptyLineBackground:`#363946`,gutterColor:`#666c87`,addedGutterColor:`#8c8c8c`,removedGutterColor:`#8c8c8c`,codeFoldContentColor:`#656a8b`,diffViewerTitleBackground:`#2f323e`,diffViewerTitleColor:`#555a7b`,diffViewerTitleBorderColor:`#353846`},a.dark||{})},c=n?s.dark:s.light,{css:l,cx:u}=(0,r.default)({key:`react-diff`,nonce:i}),d=l({width:`100%`,label:`content`}),f=l({[`.${d}`]:{width:`50%`},label:`split-view`}),p=l({width:`100%`,background:c.diffViewerBackground,pre:{margin:0,whiteSpace:`pre-wrap`,lineHeight:`25px`},label:`diff-container`,borderCollapse:`collapse`}),m=l({color:c.codeFoldContentColor,label:`code-fold-content`}),h=l({color:c.diffViewerColor,label:`content-text`}),g=l({background:c.diffViewerTitleBackground,padding:10,borderBottom:`1px solid ${c.diffViewerTitleBorderColor}`,label:`title-block`,":last-child":{borderLeft:`1px solid ${c.diffViewerTitleBorderColor}`},[`.${h}`]:{color:c.diffViewerTitleColor}}),_=l({color:c.gutterColor,label:`line-number`}),v=l({background:c.removedBackground,color:c.removedColor,pre:{color:c.removedColor},[`.${_}`]:{color:c.removedGutterColor},label:`diff-removed`}),y=l({background:c.addedBackground,color:c.addedColor,pre:{color:c.addedColor},[`.${_}`]:{color:c.addedGutterColor},label:`diff-added`}),b=l({background:c.changedBackground,[`.${_}`]:{color:c.gutterColor},label:`diff-changed`}),x=l({padding:2,display:`inline-flex`,borderRadius:4,wordBreak:`break-all`,label:`word-diff`}),S=l({background:c.wordAddedBackground,label:`word-added`}),C=l({background:c.wordRemovedBackground,label:`word-removed`}),w=l({backgroundColor:c.codeFoldGutterBackground,label:`code-fold-gutter`}),T=l({backgroundColor:c.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:`code-fold`,a:{textDecoration:`underline !important`,cursor:`pointer`,pre:{display:`inline`}}}),E=l({backgroundColor:c.emptyLineBackground,label:`empty-line`}),D=l({width:25,paddingLeft:10,paddingRight:10,userSelect:`none`,label:`marker`,[`&.${y}`]:{pre:{color:c.addedColor}},[`&.${v}`]:{pre:{color:c.removedColor}}}),O=l({background:c.highlightBackground,label:`highlighted-line`,[`.${S}, .${C}`]:{backgroundColor:`initial`}}),k=l({label:`highlighted-gutter`}),A=l({userSelect:`none`,minWidth:50,padding:`0 10px`,whiteSpace:`nowrap`,label:`gutter`,textAlign:`right`,background:c.gutterBackground,"&:hover":{cursor:`pointer`,background:c.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5},[`&.${y}`]:{background:c.addedGutterBackground},[`&.${v}`]:{background:c.removedGutterBackground},[`&.${k}`]:{background:c.highlightGutterBackground,"&:hover":{background:c.highlightGutterBackground}}}),j=l({"&:hover":{background:c.gutterBackground,cursor:`initial`},label:`empty-gutter`}),M=l({verticalAlign:`baseline`,label:`line`}),N={diffContainer:p,diffRemoved:v,diffAdded:y,diffChanged:b,splitView:f,marker:D,highlightedGutter:k,highlightedLine:O,gutter:A,line:M,wordDiff:x,wordAdded:S,wordRemoved:C,codeFoldGutter:w,codeFold:T,emptyGutter:j,emptyLine:E,lineNumber:_,contentText:h,content:d,codeFoldContent:m,titleBlock:g},P=Object.keys(o).reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:l(o[t])}),{});return Object.keys(N).reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:P[t]?u(N[t],P[t]):N[t]}),{})}})),Dye=s((exports=>{Object.defineProperty(exports,`__esModule`,{value:!0});function t(e,t,n){let r=0,i,a={},o=[];return e.forEach((e,s)=>{let c=t.some(e=>e>=s-n&&e<=s+n);!c&&i==null?(i={index:r,startLine:s,endLine:s,lines:1},o.push(i),a[s]=i.index,r++):c?i=void 0:(i.endLine=s,i.lines++,a[s]=i.index)}),{lineBlocks:a,blocks:o}}exports.computeHiddenBlocks=t})),X9={};c(X9,{default:()=>Aye});function Oye(e,t){return!!(e===t||Z9(e)&&Z9(t))}function kye(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Oye(e[n],t[n]))return!1;return!0}function Aye(e,t){t===void 0&&(t=kye);var n=null;function r(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return r.clear=function(){n=null},r}var Z9,jye=o((()=>{Z9=Number.isNaN||function(e){return typeof e==`number`&&e!==e}})),Mye=s((exports=>{var t=exports&&exports.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=exports&&exports.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=exports&&exports.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,`__esModule`,{value:!0}),exports.DiffMethod=exports.LineNumberPrefix=void 0;let a=require(`react/jsx-runtime`),o=r(require(`react`)),s=i(h()),c=Tye();Object.defineProperty(exports,`DiffMethod`,{enumerable:!0,get:function(){return c.DiffMethod}});let l=i(Eye()),u=Dye(),f=(jye(),d(X9)),p=f.default||f;var m;(function(e){e.LEFT=`L`,e.RIGHT=`R`})(m||(exports.LineNumberPrefix=m={}));var g=class extends o.Component{constructor(e){super(e),this.resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1,this.onBlockExpand=e=>{let t=this.state.expandedBlocks.slice();t.push(e),this.setState({expandedBlocks:t})},this.computeStyles=p(l.default),this.onLineNumberClickProxy=e=>this.props.onLineNumberClick?t=>this.props.onLineNumberClick(e,t):()=>{},this.renderWordDiff=(e,t)=>e.map((e,n)=>(0,a.jsx)(`span`,{className:(0,s.default)(this.styles.wordDiff,{[this.styles.wordAdded]:e.type===c.DiffType.ADDED,[this.styles.wordRemoved]:e.type===c.DiffType.REMOVED}),children:t?t(e.value):e.value},n)),this.renderLine=(e,t,n,r,i,l)=>{let u=`${n}-${e}`,d=`${l}-${i}`,f=this.props.highlightLines.includes(u)||this.props.highlightLines.includes(d),p=t===c.DiffType.ADDED,m=t===c.DiffType.REMOVED,h=t===c.DiffType.CHANGED,g;return g=Array.isArray(r)?this.renderWordDiff(r,this.props.renderContent):this.props.renderContent?this.props.renderContent(r):r,(0,a.jsxs)(o.Fragment,{children:[!this.props.hideLineNumbers&&(0,a.jsx)(`td`,{onClick:e&&this.onLineNumberClickProxy(u),className:(0,s.default)(this.styles.gutter,{[this.styles.emptyGutter]:!e,[this.styles.diffAdded]:p,[this.styles.diffRemoved]:m,[this.styles.diffChanged]:h,[this.styles.highlightedGutter]:f}),children:(0,a.jsx)(`pre`,{className:this.styles.lineNumber,children:e})}),!this.props.splitView&&!this.props.hideLineNumbers&&(0,a.jsx)(`td`,{onClick:i&&this.onLineNumberClickProxy(d),className:(0,s.default)(this.styles.gutter,{[this.styles.emptyGutter]:!i,[this.styles.diffAdded]:p,[this.styles.diffRemoved]:m,[this.styles.diffChanged]:h,[this.styles.highlightedGutter]:f}),children:(0,a.jsx)(`pre`,{className:this.styles.lineNumber,children:i})}),this.props.renderGutter?this.props.renderGutter({lineNumber:e,type:t,prefix:n,value:r,additionalLineNumber:i,additionalPrefix:l,styles:this.styles}):null,!this.props.hideMarkers&&(0,a.jsx)(`td`,{className:(0,s.default)(this.styles.marker,{[this.styles.emptyLine]:!g,[this.styles.diffAdded]:p,[this.styles.diffRemoved]:m,[this.styles.diffChanged]:h,[this.styles.highlightedLine]:f}),children:(0,a.jsxs)(`pre`,{children:[p&&`+`,m&&`-`]})}),(0,a.jsx)(`td`,{className:(0,s.default)(this.styles.content,{[this.styles.emptyLine]:!g,[this.styles.diffAdded]:p,[this.styles.diffRemoved]:m,[this.styles.diffChanged]:h,[this.styles.highlightedLine]:f}),children:(0,a.jsx)(`pre`,{className:this.styles.contentText,children:g})})]})},this.renderSplitView=({left:e,right:t},n)=>(0,a.jsxs)(`tr`,{className:this.styles.line,children:[this.renderLine(e.lineNumber,e.type,m.LEFT,e.value),this.renderLine(t.lineNumber,t.type,m.RIGHT,t.value)]},n),this.renderInlineView=({left:e,right:t},n)=>{let r;return e.type===c.DiffType.REMOVED&&t.type===c.DiffType.ADDED?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(`tr`,{className:this.styles.line,children:this.renderLine(e.lineNumber,e.type,m.LEFT,e.value,null)}),(0,a.jsx)(`tr`,{className:this.styles.line,children:this.renderLine(null,t.type,m.RIGHT,t.value,t.lineNumber)})]},n):(e.type===c.DiffType.REMOVED&&(r=this.renderLine(e.lineNumber,e.type,m.LEFT,e.value,null)),e.type===c.DiffType.DEFAULT&&(r=this.renderLine(e.lineNumber,e.type,m.LEFT,e.value,t.lineNumber,m.RIGHT)),t.type===c.DiffType.ADDED&&(r=this.renderLine(null,t.type,m.RIGHT,t.value,t.lineNumber)),(0,a.jsx)(`tr`,{className:this.styles.line,children:r},n))},this.onBlockClickProxy=e=>()=>this.onBlockExpand(e),this.renderSkippedLineIndicator=(e,t,n,r)=>{let{hideLineNumbers:i,splitView:c}=this.props,l=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(e,n,r):(0,a.jsxs)(`pre`,{className:this.styles.codeFoldContent,children:[`Expand `,e,` lines ...`]}),u=(0,a.jsx)(`td`,{children:(0,a.jsx)(`a`,{onClick:this.onBlockClickProxy(t),tabIndex:0,children:l})}),d=!c&&!i;return(0,a.jsxs)(`tr`,{className:this.styles.codeFold,children:[!i&&(0,a.jsx)(`td`,{className:this.styles.codeFoldGutter}),this.props.renderGutter?(0,a.jsx)(`td`,{className:this.styles.codeFoldGutter}):null,(0,a.jsx)(`td`,{className:(0,s.default)({[this.styles.codeFoldGutter]:d})}),d?(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(`td`,{}),u]}):(0,a.jsxs)(o.Fragment,{children:[u,this.props.renderGutter?(0,a.jsx)(`td`,{}):null,(0,a.jsx)(`td`,{})]}),(0,a.jsx)(`td`,{}),(0,a.jsx)(`td`,{})]},`${n}-${r}`)},this.renderDiff=()=>{let{oldValue:e,newValue:t,splitView:n,disableWordDiff:r,compareMethod:i,linesOffset:s}=this.props,{lineInformation:l,diffLines:d}=(0,c.computeLineInformation)(e,t,r,i,s,this.props.alwaysShowLines),f=this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff),{lineBlocks:p,blocks:m}=(0,u.computeHiddenBlocks)(l,d,f);return l.map((e,t)=>{if(this.props.showDiffOnly){let n=p[t];if(n!==void 0){let r=m[n].endLine===t;if(!this.state.expandedBlocks.includes(n)&&r)return(0,a.jsx)(o.Fragment,{children:this.renderSkippedLineIndicator(m[n].lines,n,e.left.lineNumber,e.right.lineNumber)},t);if(!this.state.expandedBlocks.includes(n))return null}}let r=n?this.renderSplitView(e,t):this.renderInlineView(e,t);return r})},this.render=()=>{let{oldValue:e,newValue:t,useDarkTheme:n,leftTitle:r,rightTitle:i,splitView:o,hideLineNumbers:l,hideMarkers:u,nonce:d}=this.props;if(this.props.compareMethod!==c.DiffMethod.JSON&&(typeof e!=`string`||typeof t!=`string`))throw Error(`"oldValue" and "newValue" should be strings`);this.styles=this.computeStyles(this.props.styles,n,d);let f=this.renderDiff(),p=l?2:3,m=l?2:4;u&&(--p,--m);let h=this.props.renderGutter?1:0,g=(r||i)&&(0,a.jsxs)(`tr`,{children:[(0,a.jsx)(`td`,{colSpan:(o?p:m)+h,className:this.styles.titleBlock,children:(0,a.jsx)(`pre`,{className:this.styles.contentText,children:r})}),o&&(0,a.jsx)(`td`,{colSpan:p+h,className:this.styles.titleBlock,children:(0,a.jsx)(`pre`,{className:this.styles.contentText,children:i})})]});return(0,a.jsx)(`table`,{className:(0,s.default)(this.styles.diffContainer,{[this.styles.splitView]:o}),children:(0,a.jsxs)(`tbody`,{children:[g,f]})})},this.state={expandedBlocks:[]}}};g.defaultProps={oldValue:``,newValue:``,splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:c.DiffMethod.CHARS,styles:{},hideLineNumbers:!1,hideMarkers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:``},exports.default=g})),Q9=u(Mye());const Nye=(e,t)=>{let n=e.replace(/\r\n/g,`
|
|
356
|
+
`).split(`
|
|
357
|
+
`),r=t.replace(/\r\n/g,`
|
|
358
|
+
`).split(`
|
|
359
|
+
`),i=r.length-n.length,a=n.length-r.length;return{added:Math.max(0,i),removed:Math.max(0,a)}},$9=`split`,Pye=`unified`,Fye=({oldJson:e,newJson:t,viewType:n=$9})=>{let{translations:r}=U9(),[i,a]=(0,f.useState)(n),o=[{value:$9,label:r?.split},{value:`unified`,label:r?.unified}];(0,f.useEffect)(()=>{a(n)},[n]);let s=({target:{value:e}})=>{a(e)},{added:c,removed:l}=Nye(e,t),u=c+l,d=u>3500;return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(hc,{bordered:!0,heading:(0,p.jsxs)(bL,{gap:!0,children:[(0,p.jsx)(rf,{children:(0,p.jsxs)(`div`,{children:[(0,p.jsxs)(Yd,{success:!0,children:[`+`,c,` `]}),(0,p.jsxs)(Yd,{error:!0,children:[`-`,l]})]})}),!d&&(0,p.jsx)(fR,{name:`viewType`,options:o,value:i,onChange:s,inline:!0})]}),padding:!1,children:d?(0,p.jsx)(`div`,{style:{padding:`5px`},children:(0,p.jsx)(Yd,{muted:!0,children:r?.changesTooLarge})}):(0,p.jsx)(Q9.default,{oldValue:e,newValue:t,splitView:i===$9,compareMethod:Q9.DiffMethod.WORDS})})})},Iye=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===null,Lye=e=>{W9(z9.LanguageKey,e.languageKey),Object.entries(e).forEach(([e,t])=>{if(e===z9.Translations)W9(e,V9(t));else{let n=Iye(t)?t:{...t};W9(e,n)}})};exports.Accordion=gr,exports.AccordionWithDefaultToggle=La,exports.Actions=qs,exports.Align=b,exports.Badge=ks,exports.Breadcrumb=ac,exports.BreadcrumbLinkType=tc,exports.Button=_o,exports.ButtonGroup=lc,exports.ButtonPosition=x,exports.ButtonType=mo,exports.Card=hc,exports.CheckBox=Oa,exports.Chevron=nr,exports.Color=y,exports.Column=Pd,exports.Dialog=vf,exports.DiffViewer=Fye,exports.DisabledContext=Ie,exports.Divider=Zd,exports.Drawer=np,exports.ElementType=aQ,exports.Empty=Qx,exports.Field=yL,exports.FileButton=pL,exports.FileInput=_p,exports.Flex=bL,exports.FormRow=SL,exports.Grid=EL,exports.GroupOrder=v,exports.Heading=rf,exports.HelpIcon=Ea,exports.Icon=er,exports.IconType=S,exports.Input=dp,exports.InputGroup=sp,exports.InputGroupAddon=Yg,exports.InputReaderMethods=pp,exports.InputType=w,exports.Label=gL,exports.List=KL,exports.ListHeading=kL,exports.ListSubheading=LL,exports.Loader=YL,exports.Menu=Us,exports.MenuCarat=ts,exports.MenuType=L,exports.Message=fh,exports.MessageType=ih,exports.Modal=Tp,exports.NativeSelect=bh,exports.NumberInput=Iy,exports.OptionDropdown=nR,exports.Page=aR,exports.Pagination=Xg,exports.PopConfirm=mQ,exports.Popover=ix,exports.Portal=bp,exports.PrintHeader=sR,exports.ProgressBar=kp,exports.RadioButton=fR,exports.RichTextInput=OZ,exports.Row=jZ,exports.Select=Hg,exports.SettingField=uye,exports.SideBar=BZ,exports.Slider=ex,exports.SmartUploadModal=Qm,exports.Spacer=vp,exports.Spinner=po,exports.Table=Hx,exports.TableImportExport=dL,exports.Tabs=JZ,exports.Text=Yd,exports.TextArea=$Z,exports.TextLink=YZ,exports.Theme=C,exports.Toaster=oC,exports.Toggle=bC,exports.Tooltip=ya,exports.TopBar=dQ,exports.Tree=Kve,exports.TriggerType=_,exports.UnitInput=tye,exports.UnitTable=oye,exports.dismissToast=Moe,exports.initializeContext=Xve,exports.initializeGuiLibrary=Lye,exports.readFile=hp,exports.toast=_C,exports.useFocus=xh,exports.useKeyboardEvent=yp,exports.useWindowWidth=Th;
|