@tryghost/comments-ui 0.1.1 → 0.2.1

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.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see comments-ui.min.js.LICENSE.txt */
2
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=46)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5);function o(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=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";e.exports=n(33)},function(e,t,n){"use strict";e.exports=n(42)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(15);var o=n(14);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(14);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";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}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return g})),n.d(t,"h",(function(){return y})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return l})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return c})),n.d(t,"m",(function(){return m})),n.d(t,"n",(function(){return v}));var r=Object.prototype.toString;function o(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(e,Error)}}function i(e,t){return r.call(e)==="[object ".concat(t,"]")}function a(e){return i(e,"ErrorEvent")}function s(e){return i(e,"DOMError")}function u(e){return i(e,"DOMException")}function c(e){return i(e,"String")}function l(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function f(e){return i(e,"Object")}function d(e){return"undefined"!==typeof Event&&g(e,Event)}function p(e){return"undefined"!==typeof Element&&g(e,Element)}function h(e){return i(e,"RegExp")}function v(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function m(e){return f(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e){return"number"===typeof e&&e!==e}function g(e,t){try{return e instanceof t}catch(n){return!1}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(14);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(16),o={};function i(){return Object(r.b)()?e:"undefined"!==typeof window?window:"undefined"!==typeof self?self:o}function a(e,t,n){var r=n||i(),o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(20))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return f}));var r=n(0),o=n(27),i=n(6),a=n(12);function s(e,t,n){if(t in e){var r=e[t],o=n(r);if("function"===typeof o)try{c(o,r)}catch(i){}e[t]=o}}function u(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function c(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,u(e,"__sentry_original__",t)}function l(e){return e.__sentry_original__}function f(e){return Object.keys(e).map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))})).join("&")}function d(e){if(Object(i.d)(e))return Object(r.a)({message:e.message,name:e.name,stack:e.stack},h(e));if(Object(i.f)(e)){var t=Object(r.a)({type:e.type,target:p(e.target),currentTarget:p(e.currentTarget)},h(e));return"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function p(e){try{return Object(i.c)(e)?Object(o.b)(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function h(e){if("object"===typeof e&&null!==e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(a.d)(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:Object(a.d)(o,t)}return""}function m(e){return y(e,new Map)}function y(e,t){if(Object(i.i)(e)){if(void 0!==(s=t.get(e)))return s;var n={};t.set(e,n);for(var r=0,o=Object.keys(e);r<o.length;r++){var a=o[r];"undefined"!==typeof e[a]&&(n[a]=y(e[a],t))}return n}if(Array.isArray(e)){var s;if(void 0!==(s=t.get(e)))return s;n=[];return t.set(e,n),e.forEach((function(e){n.push(y(e,t))})),n}return e}},function(e,t,n){e.exports=n(40)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o}));var r=n(6);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof e||0===t||e.length<=t?e:"".concat(e.substr(0,t),"...")}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} ".concat(n)),i<r&&(n+=" {snip}"),n}function a(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r<e.length;r++){var o=e[r];try{n.push(String(o))}catch(i){n.push("[value cannot be serialized]")}}return n.join(t)}function s(e,t){return!!Object(r.l)(e)&&(Object(r.k)(t)?t.test(e):"string"===typeof t&&-1!==e.indexOf(t))}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(34)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(15);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var o=n(26);function i(){return!Object(o.a)()&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof e?e:0)}function a(e,t){return e.require(t)}}).call(this,n(45),n(21)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return s}));var r=n(0),o=n(3),i=n(8);function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.sort((function(e,t){return e[0]-t[0]})).map((function(e){return e[1]}));return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=[],a=Object(i.a)(e.split("\n").slice(n));try{for(a.s();!(t=a.n()).done;){var s,c=t.value,l=Object(i.a)(r);try{for(l.s();!(s=l.n()).done;){var f=s.value,d=f(c);if(d){o.push(d);break}}}catch(p){l.e(p)}finally{l.f()}}}catch(p){a.e(p)}finally{a.f()}return u(o)}}function s(e){return Array.isArray(e)?a.apply(void 0,Object(o.a)(e)):e}function u(e){if(!e.length)return[];var t=e,n=t[0].function||"",o=t[t.length-1].function||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==o.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return Object(r.a)(Object(r.a)({},e),{},{filename:e.filename||t[0].filename,function:e.function||"?"})})).reverse()}var c="<anonymous>";function l(e){try{return e&&"function"===typeof e&&e.name||c}catch(t){return c}}},,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var o=function(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}(r),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"===typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},function(e,t,n){"use strict";(function(e){var r=n(1),o=n.n(r),i=n(13),a=n(11),s=n.n(a),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{};function c(e,t){return e(t={exports:{}},t.exports),t.exports}var l=c((function(e){!function(t){var n=function e(t,n,r){if(!u(n)||l(n)||f(n)||d(n)||s(n))return n;var o,i=0,a=0;if(c(n))for(o=[],a=n.length;i<a;i++)o.push(e(t,n[i],r));else for(var p in o={},n)Object.prototype.hasOwnProperty.call(n,p)&&(o[t(p,r)]=e(t,n[p],r));return o},r=function(e){return p(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1)},o=function(e){var t=r(e);return t.substr(0,1).toUpperCase()+t.substr(1)},i=function(e,t){return function(e,t){var n=(t=t||{}).separator||"_",r=t.split||/(?=[A-Z])/;return e.split(r).join(n)}(e,t).toLowerCase()},a=Object.prototype.toString,s=function(e){return"function"==typeof e},u=function(e){return e===Object(e)},c=function(e){return"[object Array]"==a.call(e)},l=function(e){return"[object Date]"==a.call(e)},f=function(e){return"[object RegExp]"==a.call(e)},d=function(e){return"[object Boolean]"==a.call(e)},p=function(e){return(e-=0)==e},h=function(e,t){var n=t&&"process"in t?t.process:t;return"function"!=typeof n?e:function(t,r){return n(t,e,r)}},v={camelize:r,decamelize:i,pascalize:o,depascalize:i,camelizeKeys:function(e,t){return n(h(r,t),e)},decamelizeKeys:function(e,t){return n(h(i,t),e,t)},pascalizeKeys:function(e,t){return n(h(o,t),e)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=v:t.humps=v}(u)})).decamelize,f=c((function(e){function t(){return e.exports=t=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},t.apply(this,arguments)}e.exports=t})),d=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},p=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},h=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},v=Object(r.createContext)(null);function m(e){var t=e.root,n=e.children;return Object(i.createPortal)(n,t)}function y(e){var t=Object(r.forwardRef)((function(t,n){var i,a,s=t.mode,u=t.delegatesFocus,c=t.styleSheets,l=t.ssr,d=t.children,y=h(t,["mode","delegatesFocus","styleSheets","ssr","children"]),g=(a=Object(r.useRef)((i=n)&&i.current),Object(r.useEffect)((function(){i&&(i.current=a.current)}),[i]),a),b=Object(r.useState)(null),k=p(b,2),w=k[0],x=k[1],E="node_".concat(s).concat(u);return Object(r.useEffect)((function(){if(g.current)try{if("function"==typeof n&&n(g.current),l){var e=g.current.shadowRoot;return void x(e)}var t=g.current.attachShadow({mode:s,delegatesFocus:u});c.length>0&&(t.adoptedStyleSheets=c),x(t)}catch(e){!function(e){var t=e.error,n=e.styleSheets,r=e.root;if("NotSupportedError"!==t.name)throw t;n.length>0&&(r.adoptedStyleSheets=n)}({error:e,styleSheets:c,root:w})}}),[n,g,c]),o.a.createElement(o.a.Fragment,null,o.a.createElement(e.tag,f({key:E,ref:g},y),(w||l)&&o.a.createElement(v.Provider,{value:w},l?o.a.createElement("template",{shadowroot:"open"},e.render({root:w,ssr:l,children:d})):o.a.createElement(m,{root:w},e.render({root:w,ssr:l,children:d})))))}));return t.propTypes={mode:s.a.oneOf(["open","closed"]),delegatesFocus:s.a.bool,styleSheets:s.a.arrayOf(s.a.instanceOf(globalThis.CSSStyleSheet)),ssr:s.a.bool,children:s.a.node},t.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},t}m.propTypes={root:s.a.object.isRequired,children:s.a.node},m.defaultProps={children:null};var g=new Map;var b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"core",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.children};return new Proxy(e,{get:function(e,r){var o=l(r,{separator:"-"}),i="".concat(t,"-").concat(o);return g.has(i)||g.set(i,y({tag:o,render:n})),g.get(i)}})}();t.a=b}).call(this,n(20))},function(e,t,n){"use strict";var r=n(43),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),v=u(n),m=0;m<a.length;++m){var y=a[m];if(!i[y]&&(!r||!r[y])&&(!v||!v[y])&&(!s||!s[y])){var g=d(n,y);try{c(t,y,g)}catch(b){}}}}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(9),o=n(16),i={nowSeconds:function(){return Date.now()/1e3}};var a=Object(o.b)()?function(){try{return Object(o.a)(e,"perf_hooks").performance}catch(t){return}}():function(){var e=Object(r.a)().performance;if(e&&e.now)return{now:function(){return e.now()},timeOrigin:Date.now()-e.now()}}(),s=void 0===a?i:{nowSeconds:function(){return(a.timeOrigin+a.now())/1e3}},u=i.nowSeconds.bind(i),c=s.nowSeconds.bind(s);!function(){var e=Object(r.a)().performance;if(e&&e.now){var t=36e5,n=e.now(),o=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-o):t,a=i<t,s=e.timing&&e.timing.navigationStart,u="number"===typeof s?Math.abs(s+n-o):t;return a||u<t?i<=u?("timeOrigin",e.timeOrigin):("navigationStart",s):("dateNow",o)}"none"}()}).call(this,n(21)(e))},function(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));var r=n(9),o=n(6);function i(e,t){try{for(var n,r=e,o=[],i=0,s=0,u=" > ".length;r&&i++<5&&!("html"===(n=a(r,t))||i>1&&s+o.length*u+n.length>=80);)o.push(n),s+=n.length,r=r.parentNode;return o.reverse().join(" > ")}catch(c){return"<unknown>"}}function a(e,t){var n,r,i,a,s,u=e,c=[];if(!u||!u.tagName)return"";c.push(u.tagName.toLowerCase());var l=t&&t.length?t.filter((function(e){return u.getAttribute(e)})).map((function(e){return[e,u.getAttribute(e)]})):null;if(l&&l.length)l.forEach((function(e){c.push("[".concat(e[0],'="').concat(e[1],'"]'))}));else if(u.id&&c.push("#".concat(u.id)),(n=u.className)&&Object(o.l)(n))for(r=n.split(/\s+/),s=0;s<r.length;s++)c.push(".".concat(r[s]));var f=["type","name","title","alt"];for(s=0;s<f.length;s++)i=f[s],(a=u.getAttribute(i))&&c.push("[".concat(i,'="').concat(a,'"]'));return c.join("")}function s(){var e=Object(r.a)();try{return e.document.location.href}catch(t){return""}}},function(e,t,n){"use strict";function r(){var e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(var r=0;r<t.length;r++){if(t[r]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(var r=0;r<t.length;r++)if(t[r]===n){t.splice(r,1);break}}]}n.d(t,"a",(function(){return r}))},,,,,function(e,t,n){"use strict";var r=n(19),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var b=g.prototype=new y;b.constructor=g,r(b,m.prototype),b.isPureReactComponent=!0;var k={current:null},w=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:k.current}}function O(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var D=/\/+/g;function S(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+S(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(D,"$&/")+"/"),C(a,t,n,"",(function(e){return e}))):null!=a&&(O(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(D,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+S(s=e[c],c);u+=C(s,t,n,l,a)}else if(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=C(s=s.value,t,n,l=r+S(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function _(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function j(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var A={current:null};function T(){var e=A.current;if(null===e)throw Error(p(321));return e}var N={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:_,forEach:function(e,t,n){_(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return _(e,(function(){t++})),t},toArray:function(e){return _(e,(function(e){return e}))||[]},only:function(e){if(!O(e))throw Error(p(143));return e}},t.Component=m,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)w.call(t,l)&&!x.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:j}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return T().useCallback(e,t)},t.useContext=function(e,t){return T().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return T().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return T().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return T().useLayoutEffect(e,t)},t.useMemo=function(e,t){return T().useMemo(e,t)},t.useReducer=function(e,t,n){return T().useReducer(e,t,n)},t.useRef=function(e){return T().useRef(e)},t.useState=function(e){return T().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(1),o=n(19),i=n(35);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},v={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function k(e,t,n,r){var o=y.hasOwnProperty(t)?y[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(v,e)||!p.call(h,e)&&(d.test(e)?v[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,E=60106,O=60107,D=60108,S=60114,C=60109,_=60110,j=60112,A=60113,T=60120,N=60115,M=60116,F=60121,B=60128,R=60129,P=60130,I=60131;if("function"===typeof Symbol&&Symbol.for){var L=Symbol.for;x=L("react.element"),E=L("react.portal"),O=L("react.fragment"),D=L("react.strict_mode"),S=L("react.profiler"),C=L("react.provider"),_=L("react.context"),j=L("react.forward_ref"),A=L("react.suspense"),T=L("react.suspense_list"),N=L("react.memo"),M=L("react.lazy"),F=L("react.block"),L("react.scope"),B=L("react.opaque.id"),R=L("react.debug_trace_mode"),P=L("react.offscreen"),I=L("react.legacy_hidden")}var z,U="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function $(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var H=!1;function q(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$(e):""}function W(e){switch(e.tag){case 5:return $(e.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1);case 11:return e=q(e.type.render,!1);case 22:return e=q(e.type._render,!1);case 1:return e=q(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case O:return"Fragment";case E:return"Portal";case S:return"Profiler";case D:return"StrictMode";case A:return"Suspense";case T:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case j:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case N:return K(e.type);case F:return K(e._render);case M:t=e._payload,e=e._init;try{return K(e(t))}catch(n){}}return null}function G(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function J(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&k(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+G(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ce(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,me,ye=(me=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ke=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(be).forEach((function(e){ke.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oe(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function De(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,_e=null,je=null;function Ae(e){if(e=ro(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),Ce(e.stateNode,e.type,t))}}function Te(e){_e?je?je.push(e):je=[e]:_e=e}function Ne(){if(_e){var e=_e,t=je;if(je=_e=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Me(e,t){return e(t)}function Fe(e,t,n,r,o){return e(t,n,r,o)}function Be(){}var Re=Me,Pe=!1,Ie=!1;function Le(){null===_e&&null===je||(Be(),Ne())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ue=!1;if(f)try{var Ve={};Object.defineProperty(Ve,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",Ve,Ve),window.removeEventListener("test",Ve,Ve)}catch(me){Ue=!1}function $e(e,t,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var He=!1,qe=null,We=!1,Ke=null,Ge={onError:function(e){He=!0,qe=e}};function Ye(e,t,n,r,o,i,a,s,u){He=!1,qe=null,$e.apply(Ge,arguments)}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Je(e)!==e)throw Error(a(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xe(o),e;if(i===r)return Xe(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,ut=null,ct=null,lt=new Map,ft=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function mt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function yt(e){var t=no(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){gt(e)&&n.delete(t)}function kt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&gt(st)&&(st=null),null!==ut&&gt(ut)&&(ut=null),null!==ct&&gt(ct)&&(ct=null),lt.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,kt)))}function xt(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==ut&&wt(ut,e),null!==ct&&wt(ct,e),lt.forEach(t),ft.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)yt(n),null===n.blockedOn&&dt.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ot={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},Dt={},St={};function Ct(e){if(Dt[e])return Dt[e];if(!Ot[e])return e;var t,n=Ot[e];for(t in n)if(n.hasOwnProperty(t)&&t in St)return Dt[e]=n[t];return e}f&&(St=document.createElement("div").style,"AnimationEvent"in window||(delete Ot.animationend.animation,delete Ot.animationiteration.animation,delete Ot.animationstart.animation),"TransitionEvent"in window||delete Ot.transitionend.transition);var _t=Ct("animationend"),jt=Ct("animationiteration"),At=Ct("animationstart"),Tt=Ct("transitionend"),Nt=new Map,Mt=new Map,Ft=["abort","abort",_t,"animationEnd",jt,"animationIteration",At,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Tt,"transitionEnd","waiting","waiting"];function Bt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Mt.set(r,t),Nt.set(r,o),c(o,[r])}}(0,i.unstable_now)();var Rt=8;function Pt(e){if(0!==(1&e))return Rt=15,1;if(0!==(2&e))return Rt=14,2;if(0!==(4&e))return Rt=13,4;var t=24&e;return 0!==t?(Rt=12,t):0!==(32&e)?(Rt=11,32):0!==(t=192&e)?(Rt=10,t):0!==(256&e)?(Rt=9,256):0!==(t=3584&e)?(Rt=8,t):0!==(4096&e)?(Rt=7,4096):0!==(t=4186112&e)?(Rt=6,t):0!==(t=62914560&e)?(Rt=5,t):67108864&e?(Rt=4,67108864):0!==(134217728&e)?(Rt=3,134217728):0!==(t=805306368&e)?(Rt=2,t):0!==(1073741824&e)?(Rt=1,1073741824):(Rt=8,e)}function It(e,t){var n=e.pendingLanes;if(0===n)return Rt=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Rt=15;else if(0!==(i=134217727&n)){var u=i&~a;0!==u?(r=Pt(u),o=Rt):0!==(s&=i)&&(r=Pt(s),o=Rt)}else 0!==(i=n&~a)?(r=Pt(i),o=Rt):0!==s&&(r=Pt(s),o=Rt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Pt(t),o<=Rt)return t;Rt=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Ht(t)),r|=e[n],t&=~o;return r}function Lt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?zt(10,t):e;case 10:return 0===(e=Ut(192&~t))?zt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ut(e){return e&-e}function Vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(qt(e)/Wt|0)|0},qt=Math.log,Wt=Math.LN2;var Kt=i.unstable_UserBlockingPriority,Gt=i.unstable_runWithPriority,Yt=!0;function Jt(e,t,n,r){Pe||Be();var o=Xt,i=Pe;Pe=!0;try{Fe(o,e,t,n,r)}finally{(Pe=i)||Le()}}function Qt(e,t,n,r){Gt(Kt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var o;if(Yt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Zt(e,t,n,r);if(null===i)o&&vt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=mt(st,e,t,n,r,o),!0;case"dragenter":return ut=mt(ut,e,t,n,r,o),!0;case"mouseover":return ct=mt(ct,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return lt.set(i,mt(lt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ft.set(i,mt(ft.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;vt(e,r)}Br(e,t,r,null,n)}}}function Zt(e,t,n,r){var o=Se(r);if(null!==(o=no(o))){var i=Je(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Qe(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Br(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function un(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,ln,fn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=un(dn),hn=o({},dn,{view:0,detail:0}),vn=un(hn),mn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,ln=e.screenY-fn.screenY):ln=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),yn=un(mn),gn=un(o({},mn,{dataTransfer:0})),bn=un(o({},hn,{relatedTarget:0})),kn=un(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=un(wn),En=un(o({},dn,{data:0})),On={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function _n(){return Cn}var jn=o({},hn,{key:function(e){if(e.key){var t=On[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Dn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=un(jn),Tn=un(o({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=un(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),Mn=un(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=o({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Bn=un(Fn),Rn=[9,13,27,32],Pn=f&&"CompositionEvent"in window,In=null;f&&"documentMode"in document&&(In=document.documentMode);var Ln=f&&"TextEvent"in window&&!In,zn=f&&(!Pn||In&&8<In&&11>=In),Un=String.fromCharCode(32),Vn=!1;function $n(e,t){switch(e){case"keyup":return-1!==Rn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Gn(e,t,n,r){Te(r),0<(t=Pr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yn=null,Jn=null;function Qn(e){jr(e,0)}function Xn(e){if(Q(oo(e)))return e}function Zn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){Yn&&(Yn.detachEvent("onpropertychange",ir),Jn=Yn=null)}function ir(e){if("value"===e.propertyName&&Xn(Jn)){var t=[];if(Gn(t,Jn,e,Se(e)),e=Qn,Pe)e(t);else{Pe=!0;try{Me(e,t)}finally{Pe=!1,Le()}}}}function ar(e,t,n){"focusin"===e?(or(),Jn=n,(Yn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Jn)}function ur(e,t){if("click"===e)return Xn(t)}function cr(e,t){if("input"===e||"change"===e)return Xn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function dr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!lr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gr=f&&"documentMode"in document&&11>=document.documentMode,br=null,kr=null,wr=null,xr=!1;function Er(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==br||br!==X(r)||("selectionStart"in(r=br)&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Pr(kr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Bt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Bt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Bt(Ft,2);for(var Or="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Dr=0;Dr<Or.length;Dr++)Mt.set(Or[Dr],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sr));function _r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,u,c){if(Ye.apply(this,arguments),He){if(!He)throw Error(a(198));var l=qe;He=!1,qe=null,We||(We=!0,Ke=l)}}(r,t,void 0,e),e.currentTarget=null}function jr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==i&&o.isPropagationStopped())break e;_r(o,s,c),i=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,c=s.currentTarget,s=s.listener,u!==i&&o.isPropagationStopped())break e;_r(o,s,c),i=u}}}if(We)throw e=Ke,We=!1,Ke=null,e}function Ar(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Fr(t,e,2,!1),n.add(r))}var Tr="_reactListening"+Math.random().toString(36).slice(2);function Nr(e){e[Tr]||(e[Tr]=!0,s.forEach((function(t){Cr.has(t)||Mr(t,!1,e,null),Mr(t,!0,e,null)})))}function Mr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Cr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Fr(i,e,o,t),a.add(s))}function Fr(e,t,n,r){var o=Mt.get(t);switch(void 0===o?2:o){case 0:o=Jt;break;case 1:o=Qt;break;default:o=Xt}n=o.bind(null,t,n,e),o=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Br(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(u=a.tag)||6===u){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Ie)return e(t,n);Ie=!0;try{Re(e,t,n)}finally{Ie=!1,Le()}}((function(){var r=i,o=Se(n),a=[];e:{var s=Nt.get(e);if(void 0!==s){var u=pn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":u=An;break;case"focusin":c="focus",u=bn;break;case"focusout":c="blur",u=bn;break;case"beforeblur":case"afterblur":u=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nn;break;case _t:case jt:case At:u=kn;break;case Tt:u=Mn;break;case"scroll":u=vn;break;case"wheel":u=Bn;break;case"copy":case"cut":case"paste":u=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Tn}var l=0!==(4&t),f=!l&&"scroll"===e,d=l?null!==s?s+"Capture":null:s;l=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==d&&(null!=(v=ze(h,d))&&l.push(Rr(h,v,p)))),f)break;h=h.return}0<l.length&&(s=new u(s,c,null,n,o),a.push({event:s,listeners:l}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!no(c)&&!c[eo])&&(u||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?no(c):null)&&(c!==(f=Je(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=yn,v="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(l=Tn,v="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==u?s:oo(u),p=null==c?s:oo(c),(s=new l(v,h+"leave",u,n,o)).target=f,s.relatedTarget=p,v=null,no(o)===r&&((l=new l(d,h+"enter",c,n,o)).target=p,l.relatedTarget=f,v=l),f=v,u&&c)e:{for(d=c,h=0,p=l=u;p;p=Ir(p))h++;for(p=0,v=d;v;v=Ir(v))p++;for(;0<h-p;)l=Ir(l),h--;for(;0<p-h;)d=Ir(d),p--;for(;h--;){if(l===d||null!==d&&l===d.alternate)break e;l=Ir(l),d=Ir(d)}l=null}else l=null;null!==u&&Lr(a,s,u,l,!1),null!==c&&null!==f&&Lr(a,f,c,l,!0)}if("select"===(u=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var m=Zn;else if(Kn(s))if(er)m=cr;else{m=sr;var y=ar}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ur);switch(m&&(m=m(e,r))?Gn(a,m,n,o):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&oe(s,"number",s.value)),y=r?oo(r):window,e){case"focusin":(Kn(y)||"true"===y.contentEditable)&&(br=y,kr=r,wr=null);break;case"focusout":wr=kr=br=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,Er(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":Er(a,n,o)}var g;if(Pn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else qn?$n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zn&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(g=rn()):(tn="value"in(en=o)?en.value:en.textContent,qn=!0)),0<(y=Pr(r,b)).length&&(b=new En(b,e,null,n,o),a.push({event:b,listeners:y}),g?b.data=g:null!==(g=Hn(n))&&(b.data=g))),(g=Ln?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Vn=!0,Un);case"textInput":return(e=t.data)===Un&&Vn?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Pn&&$n(e,t)?(e=rn(),nn=tn=en=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Pr(r,"onBeforeInput")).length&&(o=new En("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=g))}jr(a,t)}))}function Rr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=ze(e,n))&&r.unshift(Rr(e,i,o)),null!=(i=ze(e,t))&&r.push(Rr(e,i,o))),e=e.return}return r}function Ir(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Lr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(u=ze(n,i))&&a.unshift(Rr(n,u,s)):o||null!=(u=ze(n,i))&&a.push(Rr(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function zr(){}var Ur=null,Vr=null;function $r(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var qr="function"===typeof setTimeout?setTimeout:void 0,Wr="function"===typeof clearTimeout?clearTimeout:void 0;function Kr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Yr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Jr=0;var Qr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Qr,Zr="__reactProps$"+Qr,eo="__reactContainer$"+Qr,to="__reactEvents$"+Qr;function no(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Yr(e);null!==e;){if(n=e[Xr])return n;e=Yr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Xr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Zr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],uo=-1;function co(e){return{current:e}}function lo(e){0>uo||(e.current=so[uo],so[uo]=null,uo--)}function fo(e,t){uo++,so[uo]=e.current,e.current=t}var po={},ho=co(po),vo=co(!1),mo=po;function yo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function go(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bo(){lo(vo),lo(ho)}function ko(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(vo,n)}function wo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,K(t)||"Unknown",i));return o({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,mo=ho.current,fo(ho,e),fo(vo,vo.current),!0}function Eo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=wo(e,t,mo),r.__reactInternalMemoizedMergedChildContext=e,lo(vo),lo(ho),fo(ho,e)):lo(vo),fo(vo,n)}var Oo=null,Do=null,So=i.unstable_runWithPriority,Co=i.unstable_scheduleCallback,_o=i.unstable_cancelCallback,jo=i.unstable_shouldYield,Ao=i.unstable_requestPaint,To=i.unstable_now,No=i.unstable_getCurrentPriorityLevel,Mo=i.unstable_ImmediatePriority,Fo=i.unstable_UserBlockingPriority,Bo=i.unstable_NormalPriority,Ro=i.unstable_LowPriority,Po=i.unstable_IdlePriority,Io={},Lo=void 0!==Ao?Ao:function(){},zo=null,Uo=null,Vo=!1,$o=To(),Ho=1e4>$o?To:function(){return To()-$o};function qo(){switch(No()){case Mo:return 99;case Fo:return 98;case Bo:return 97;case Ro:return 96;case Po:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Mo;case 98:return Fo;case 97:return Bo;case 96:return Ro;case 95:return Po;default:throw Error(a(332))}}function Ko(e,t){return e=Wo(e),So(e,t)}function Go(e,t,n){return e=Wo(e),Co(e,t,n)}function Yo(){if(null!==Uo){var e=Uo;Uo=null,_o(e)}Jo()}function Jo(){if(!Vo&&null!==zo){Vo=!0;var e=0;try{var t=zo;Ko(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zo=null}catch(n){throw null!==zo&&(zo=zo.slice(e+1)),Co(Mo,Yo),n}finally{Vo=!1}}}var Qo=w.ReactCurrentBatchConfig;function Xo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Zo=co(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Zo.current;lo(Zo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Pa=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var ui=!1;function ci(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function li(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function di(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;ui=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,u=i.shared.pending;if(null!==u){i.shared.pending=null;var c=u,l=c.next;c.next=null,null===s?a=l:s.next=l,s=c;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==s&&(null===d?f.firstBaseUpdate=l:d.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,s=0,f=l=c=null;;){u=a.lane;var p=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(u=t,p=n,v.tag){case 1:if("function"===typeof(h=v.payload)){d=h.call(p,d,u);break e}d=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(u="function"===typeof(h=v.payload)?h.call(p,d,u):h)||void 0===u)break e;d=o({},d,u);break e;case 2:ui=!0}}null!==a.callback&&(e.flags|=32,null===(u=i.effects)?i.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=p,c=d):f=f.next=p,s|=u;if(null===(a=a.next)){if(null===(u=i.shared.pending))break;a=u.next,u.next=null,i.lastBaseUpdate=u,i.shared.pending=null}}null===f&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=f,Us|=s,e.lanes=s,e.memoizedState=d}}function vi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var mi=(new r.Component).refs;function yi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var gi={isMounted:function(e){return!!(e=e._reactInternals)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),o=pu(e),i=fi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hu(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),o=pu(e),i=fi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hu(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=pu(e),o=fi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),di(e,o),hu(e,r,n)}};function bi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(o,i))}function ki(e,t,n){var r=!1,o=po,i=t.contextType;return"object"===typeof i&&null!==i?i=si(i):(o=go(t)?mo:ho.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?yo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=gi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function wi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=mi,ci(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=si(i):(i=go(t)?mo:ho.current,o.context=yo(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(yi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&gi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var Ei=Array.isArray;function Oi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===mi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Di(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Si(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Wu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ju(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Oi(e,t,n),r.return=e,r):((r=Ku(n.type,n.key,n.props,null,e.mode,r)).ref=Oi(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Gu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ju(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Ku(t.type,t.key,t.props,null,e.mode,n)).ref=Oi(e,null,t),n.return=e,n;case E:return(t=Qu(t,e.mode,n)).return=e,t}if(Ei(t)||V(t))return(t=Gu(t,e.mode,n,null)).return=e,t;Di(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===O?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case E:return n.key===o?l(e,t,n,r):null}if(Ei(n)||V(n))return null!==o?null:f(e,t,n,r,null);Di(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===O?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case E:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Ei(r)||V(r))return f(t,e=e.get(n)||null,r,o,null);Di(t,r)}return null}function v(o,a,s,u){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=p(o,f,s[v],u);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(o,f),a=i(y,a,v),null===l?c=y:l.sibling=y,l=y,f=m}if(v===s.length)return n(o,f),c;if(null===f){for(;v<s.length;v++)null!==(f=d(o,s[v],u))&&(a=i(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);v<s.length;v++)null!==(m=h(f,o,v,s[v],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=i(m,a,v),null===l?c=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(o,e)})),c}function m(o,s,u,c){var l=V(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,m=s=0,y=null,g=u.next();null!==v&&!g.done;m++,g=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=p(o,v,g.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=i(b,s,m),null===f?l=b:f.sibling=b,f=b,v=y}if(g.done)return n(o,v),l;if(null===v){for(;!g.done;m++,g=u.next())null!==(g=d(o,g.value,c))&&(s=i(g,s,m),null===f?l=g:f.sibling=g,f=g);return l}for(v=r(o,v);!g.done;m++,g=u.next())null!==(g=h(v,o,m,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=i(g,s,m),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(o,e)})),l}return function(e,r,i,u){var c="object"===typeof i&&null!==i&&i.type===O&&null===i.key;c&&(i=i.props.children);var l="object"===typeof i&&null!==i;if(l)switch(i.$$typeof){case x:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(i.type===O){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Oi(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===O?((r=Gu(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Ku(i.type,i.key,i.props,null,e.mode,u)).ref=Oi(e,r,i),u.return=e,e=u)}return s(e);case E:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qu(i,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Ju(i,e.mode,u)).return=e,e=r),s(e);if(Ei(i))return v(e,r,i,u);if(V(i))return m(e,r,i,u);if(l&&Di(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,K(e.type)||"Component"))}return n(e,r)}}var Ci=Si(!0),_i=Si(!1),ji={},Ai=co(ji),Ti=co(ji),Ni=co(ji);function Mi(e){if(e===ji)throw Error(a(174));return e}function Fi(e,t){switch(fo(Ni,t),fo(Ti,e),fo(Ai,ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ai),fo(Ai,t)}function Bi(){lo(Ai),lo(Ti),lo(Ni)}function Ri(e){Mi(Ni.current);var t=Mi(Ai.current),n=he(t,e.type);t!==n&&(fo(Ti,e),fo(Ai,n))}function Pi(e){Ti.current===e&&(lo(Ai),lo(Ti))}var Ii=co(0);function Li(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zi=null,Ui=null,Vi=!1;function $i(e,t){var n=Hu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Hi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function qi(e){if(Vi){var t=Ui;if(t){var n=t;if(!Hi(e,t)){if(!(t=Gr(n.nextSibling))||!Hi(e,t))return e.flags=-1025&e.flags|2,Vi=!1,void(zi=e);$i(zi,n)}zi=e,Ui=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,Vi=!1,zi=e}}function Wi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zi=e}function Ki(e){if(e!==zi)return!1;if(!Vi)return Wi(e),Vi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Ui;t;)$i(e,t),t=Gr(t.nextSibling);if(Wi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ui=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ui=null}}else Ui=zi?Gr(e.stateNode.nextSibling):null;return!0}function Gi(){Ui=zi=null,Vi=!1}var Yi=[];function Ji(){for(var e=0;e<Yi.length;e++)Yi[e]._workInProgressVersionPrimary=null;Yi.length=0}var Qi=w.ReactCurrentDispatcher,Xi=w.ReactCurrentBatchConfig,Zi=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Zi=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qi.current=null===e||null===e.memoizedState?Ma:Fa,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Qi.current=Ba,e=n(r,o)}while(oa)}if(Qi.current=Na,t=null!==ta&&null!==ta.next,Zi=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ca(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function la(e,t){return"function"===typeof t?t(e):t}function fa(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.lane;if((Zi&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,ea.lanes|=l,Us|=l}c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,lr(r,t.memoizedState)||(Pa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);lr(i,t.memoizedState)||(Pa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Zi&e)===e)&&(t._workInProgressVersionPrimary=r,Yi.push(t))),e)return n(t._source);throw Yi.push(t),Error(a(350))}function ha(e,t,n,r){var o=Ms;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),u=Qi.current,c=u.useState((function(){return pa(o,t,n)})),l=c[1],f=c[0];c=na;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,v=d.source;d=d.subscribe;var m=ea;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=l;var e=i(t._source);if(!lr(s,e)){e=n(t._source),lr(f,e)||(l(e),e=pu(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var u=31-Ht(a),c=1<<u;r[u]|=e,a&=~c}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pu(m);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),lr(h,n)&&lr(v,t)&&lr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:f}).dispatch=l=Ta.bind(null,ea,e),c.queue=e,c.baseQueue=null,f=pa(o,t,n),c.memoizedState=c.baseState=f),f}function va(e,t,n){return ha(ca(),e,t,n)}function ma(e){var t=ua();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:e}).dispatch=Ta.bind(null,ea,e),[t.memoizedState,e]}function ya(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ga(e){return e={current:e},ua().memoizedState=e}function ba(){return ca().memoizedState}function ka(e,t,n,r){var o=ua();ea.flags|=e,o.memoizedState=ya(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ya(t,n,i,r)}ea.flags|=e,o.memoizedState=ya(1|t,n,i,r)}function xa(e,t){return ka(516,4,e,t)}function Ea(e,t){return wa(516,4,e,t)}function Oa(e,t){return wa(4,2,e,t)}function Da(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Sa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,Da.bind(null,t,e),n)}function Ca(){}function _a(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ja(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Aa(e,t){var n=qo();Ko(98>n?98:n,(function(){e(!0)})),Ko(97<n?97:n,(function(){var n=Xi.transition;Xi.transition=1;try{e(!1),t()}finally{Xi.transition=n}}))}function Ta(e,t,n){var r=du(),o=pu(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=a(s,n);if(i.eagerReducer=a,i.eagerState=u,lr(u,s))return}catch(c){}hu(e,o,r)}}var Na={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Ma={readContext:si,useCallback:function(e,t){return ua().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ka(4,2,Da.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ka(4,2,e,t)},useMemo:function(e,t){var n=ua();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ua();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ta.bind(null,ea,e),[r.memoizedState,e]},useRef:ga,useState:ma,useDebugValue:Ca,useDeferredValue:function(e){var t=ma(e),n=t[0],r=t[1];return xa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=ma(!1),t=e[0];return ga(e=Aa.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ua();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Vi){var e=!1,t=function(e){return{$$typeof:B,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Jr++).toString(36))),Error(a(355))})),n=ma(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ya(5,(function(){n("r:"+(Jr++).toString(36))}),void 0,null)),t}return ma(t="r:"+(Jr++).toString(36)),t},unstable_isNewReconciler:!1},Fa={readContext:si,useCallback:_a,useContext:si,useEffect:Ea,useImperativeHandle:Sa,useLayoutEffect:Oa,useMemo:ja,useReducer:fa,useRef:ba,useState:function(){return fa(la)},useDebugValue:Ca,useDeferredValue:function(e){var t=fa(la),n=t[0],r=t[1];return Ea((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=fa(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return fa(la)[0]},unstable_isNewReconciler:!1},Ba={readContext:si,useCallback:_a,useContext:si,useEffect:Ea,useImperativeHandle:Sa,useLayoutEffect:Oa,useMemo:ja,useReducer:da,useRef:ba,useState:function(){return da(la)},useDebugValue:Ca,useDeferredValue:function(e){var t=da(la),n=t[0],r=t[1];return Ea((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=da(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return da(la)[0]},unstable_isNewReconciler:!1},Ra=w.ReactCurrentOwner,Pa=!1;function Ia(e,t,n,r){t.child=null===e?_i(t,null,n,r):Ci(t,e.child,n,r)}function La(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||Pa?(t.flags|=1,Ia(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function za(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||qu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ku(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Wu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,o,i){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Pa=!1,0===(i&o))return t.lanes=e.lanes,is(e,t,i);0!==(16384&e.flags)&&(Pa=!0)}return Ha(e,t,n,r,i)}function Va(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},xu(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},xu(t,e),null;t.memoizedState={baseLanes:0},xu(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,xu(t,r);return Ia(e,t,o,n),t.child}function $a(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ha(e,t,n,r,o){var i=go(n)?mo:ho.current;return i=yo(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||Pa?(t.flags|=1,Ia(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function qa(e,t,n,r,o){if(go(n)){var i=!0;xo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ki(t,n,r),xi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=si(c):c=yo(t,c=go(n)?mo:ho.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&wi(t,a,r,c),ui=!1;var d=t.memoizedState;a.state=d,hi(t,r,a,o),u=t.memoizedState,s!==r||d!==u||vo.current||ui?("function"===typeof l&&(yi(t,n,l,r),u=t.memoizedState),(s=ui||bi(t,n,s,r,d,u,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,li(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xo(t.type,s),a.props=c,f=t.pendingProps,d=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=si(u):u=yo(t,u=go(n)?mo:ho.current);var p=n.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||d!==u)&&wi(t,a,r,u),ui=!1,d=t.memoizedState,a.state=d,hi(t,r,a,o);var h=t.memoizedState;s!==f||d!==h||vo.current||ui?("function"===typeof p&&(yi(t,n,p,r),h=t.memoizedState),(c=ui||bi(t,n,c,r,d,h,u))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Wa(e,t,n,r,i,o)}function Wa(e,t,n,r,o,i){$a(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&Eo(t,n,!1),is(e,t,i);r=t.stateNode,Ra.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ci(t,e.child,null,i),t.child=Ci(t,null,s,i)):Ia(e,t,s,i),t.memoizedState=r.state,o&&Eo(t,n,!0),t.child}function Ka(e){var t=e.stateNode;t.pendingContext?ko(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ko(0,t.context,!1),Fi(e,t.containerInfo)}var Ga,Ya,Ja,Qa={dehydrated:null,retryLane:0};function Xa(e,t,n){var r,o=t.pendingProps,i=Ii.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),fo(Ii,1&i),null===e?(void 0!==o.fallback&&qi(t),e=o.children,i=o.fallback,a?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,e):"number"===typeof o.unstable_expectedLoadTime?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,t.lanes=33554432,e):((n=Yu({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Qa,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Za(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=Yu(t,o,0,null),n=Gu(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Wu(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Wu(a,s),null!==e?r=Wu(e,r):(r=Gu(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ia(e,t,r.children,n),0!==(2&(r=Ii.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Ii,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Li(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Li(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Us|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Wu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Wu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Vi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return go(t.type)&&bo(),null;case 3:return Bi(),lo(vo),lo(ho),Ji(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ki(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Pi(t);var i=Mi(Ni.current);if(n=t.type,null!==e&&null!=t.stateNode)Ya(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Mi(Ai.current),Ki(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xr]=t,r[Zr]=s,n){case"dialog":Ar("cancel",r),Ar("close",r);break;case"iframe":case"object":case"embed":Ar("load",r);break;case"video":case"audio":for(e=0;e<Sr.length;e++)Ar(Sr[e],r);break;case"source":Ar("error",r);break;case"img":case"image":case"link":Ar("error",r),Ar("load",r);break;case"details":Ar("toggle",r);break;case"input":ee(r,s),Ar("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ar("invalid",r);break;case"textarea":ue(r,s),Ar("invalid",r)}for(var c in Oe(n,s),e=null,s)s.hasOwnProperty(c)&&(i=s[c],"children"===c?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):u.hasOwnProperty(c)&&null!=i&&"onScroll"===c&&Ar("scroll",r));switch(n){case"input":J(r),re(r,s,!0);break;case"textarea":J(r),le(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=zr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===i.nodeType?i:i.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Zr]=r,Ga(e,t),t.stateNode=e,c=De(n,r),n){case"dialog":Ar("cancel",e),Ar("close",e),i=r;break;case"iframe":case"object":case"embed":Ar("load",e),i=r;break;case"video":case"audio":for(i=0;i<Sr.length;i++)Ar(Sr[i],e);i=r;break;case"source":Ar("error",e),i=r;break;case"img":case"image":case"link":Ar("error",e),Ar("load",e),i=r;break;case"details":Ar("toggle",e),i=r;break;case"input":ee(e,r),i=Z(e,r),Ar("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Ar("invalid",e);break;case"textarea":ue(e,r),i=se(e,r),Ar("invalid",e);break;default:i=r}Oe(n,i);var l=i;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?xe(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&ye(e,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&ge(e,f):"number"===typeof f&&ge(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Ar("scroll",e):null!=f&&k(e,s,f,c))}switch(n){case"input":J(e),re(e,r,!1);break;case"textarea":J(e),le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+G(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=zr)}$r(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ja(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Mi(Ni.current),Mi(Ai.current),Ki(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return lo(Ii),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ki(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Ii.current)?0===Is&&(Is=3):(0!==Is&&3!==Is||(Is=4),null===Ms||0===(134217727&Us)&&0===(134217727&Vs)||gu(Ms,Bs))),(r||n)&&(t.flags|=4),null);case 4:return Bi(),null===e&&Nr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(lo(Ii),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=r.rendering))if(s)as(r,!1);else{if(0!==Is||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Li(e))){for(t.flags|=64,as(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fo(Ii,1&Ii.current|2),t.child}e=e.sibling}null!==r.tail&&Ho()>Ws&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Li(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Vi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ho()-r.renderingStartTime>Ws&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ho(),n.sibling=null,t=Ii.current,fo(Ii,s?1&t|2:1&t),n):null;case 23:case 24:return Eu(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function us(e){switch(e.tag){case 1:go(e.type)&&bo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Bi(),lo(vo),lo(ho),Ji(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Pi(e),null;case 13:return lo(Ii),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return lo(Ii),null;case 4:return Bi(),null;case 10:return oi(e),null;case 23:case 24:return Eu(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function ls(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ya=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Mi(Ai.current);var a,s=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=zr)}for(f in Oe(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var c=i[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Ar("scroll",e),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===B?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(t.updateQueue=f)&&(t.flags|=4)}},Ja=function(e,t,n,r){n!==r&&(t.flags|=4)};var fs="function"===typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=fi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Js||(Js=!0,Qs=r),ls(0,t)},n}function ps(e,t,n){(n=fi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return ls(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Xs?Xs=new Set([this]):Xs.add(this),ls(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"===typeof WeakSet?WeakSet:Set;function vs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){zu(e,n)}else t.current=null}function ms(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Kr(t.stateNode.containerInfo))}throw Error(a(163))}function ys(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Pu(n,e),Ru(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&vi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}vi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&$r(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function gs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Do&&"function"===typeof Do.onCommitFiberUnmount)try{Do.onCommitFiberUnmount(Oo,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Pu(t,n);else{r=t;try{o()}catch(i){zu(r,i)}}n=n.next}while(n!==e)}break;case 1:if(vs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){zu(t,i)}break;case 5:vs(t);break;case 4:Ds(e,t)}}function ks(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ws(e){return 5===e.tag||3===e.tag||4===e.tag}function xs(e){e:{for(var t=e.return;null!==t;){if(ws(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ws(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Es(e,n,t):Os(e,n,t)}function Es(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=zr));else if(4!==r&&null!==(e=e.child))for(Es(e,t,n),e=e.sibling;null!==e;)Es(e,t,n),e=e.sibling}function Os(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Os(e,t,n),e=e.sibling;null!==e;)Os(e,t,n),e=e.sibling}function Ds(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,u=o,c=u;;)if(bs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,u=o.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bs(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Ss(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),De(e,o),t=De(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?xe(n,u):"dangerouslySetInnerHTML"===s?ye(n,u):"children"===s?ge(n,u):k(n,s,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(qs=Ho(),gs(t.child,!0)),void Cs(t);case 19:return void Cs(t);case 23:case 24:return void gs(t,null!==t.memoizedState)}throw Error(a(163))}function Cs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Vu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _s(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var js=Math.ceil,As=w.ReactCurrentDispatcher,Ts=w.ReactCurrentOwner,Ns=0,Ms=null,Fs=null,Bs=0,Rs=0,Ps=co(0),Is=0,Ls=null,zs=0,Us=0,Vs=0,$s=0,Hs=null,qs=0,Ws=1/0;function Ks(){Ws=Ho()+500}var Gs,Ys=null,Js=!1,Qs=null,Xs=null,Zs=!1,eu=null,tu=90,nu=[],ru=[],ou=null,iu=0,au=null,su=-1,uu=0,cu=0,lu=null,fu=!1;function du(){return 0!==(48&Ns)?Ho():-1!==su?su:su=Ho()}function pu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===qo()?1:2;if(0===uu&&(uu=zs),0!==Qo.transition){0!==cu&&(cu=null!==Hs?Hs.pendingLanes:0),e=uu;var t=4186112&~cu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=qo(),0!==(4&Ns)&&98===e?e=zt(12,uu):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),uu),e}function hu(e,t,n){if(50<iu)throw iu=0,au=null,Error(a(185));if(null===(e=vu(e,t)))return null;$t(e,t,n),e===Ms&&(Vs|=t,4===Is&&gu(e,Bs));var r=qo();1===t?0!==(8&Ns)&&0===(48&Ns)?bu(e):(mu(e,n),0===Ns&&(Ks(),Yo())):(0===(4&Ns)||98!==r&&99!==r||(null===ou?ou=new Set([e]):ou.add(e)),mu(e,n)),Hs=e}function vu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function mu(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-Ht(s),c=1<<u,l=i[u];if(-1===l){if(0===(c&r)||0!==(c&o)){l=t,Pt(c);var f=Rt;i[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=t&&(e.expiredLanes|=c);s&=~c}if(r=It(e,e===Ms?Bs:0),t=Rt,0===r)null!==n&&(n!==Io&&_o(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Io&&_o(n)}15===t?(n=bu.bind(null,e),null===zo?(zo=[n],Uo=Co(Mo,Jo)):zo.push(n),n=Io):14===t?n=Go(99,bu.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Go(n,yu.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function yu(e){if(su=-1,cu=uu=0,0!==(48&Ns))throw Error(a(327));var t=e.callbackNode;if(Bu()&&e.callbackNode!==t)return null;var n=It(e,e===Ms?Bs:0);if(0===n)return null;var r=n,o=Ns;Ns|=16;var i=Su();for(Ms===e&&Bs===r||(Ks(),Ou(e,r));;)try{ju();break}catch(u){Du(e,u)}if(ri(),As.current=i,Ns=o,null!==Fs?r=0:(Ms=null,Bs=0,r=Is),0!==(zs&Vs))Ou(e,0);else if(0!==r){if(2===r&&(Ns|=64,e.hydrate&&(e.hydrate=!1,Kr(e.containerInfo)),0!==(n=Lt(e))&&(r=Cu(e,n))),1===r)throw t=Ls,Ou(e,0),gu(e,n),mu(e,Ho()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Nu(e);break;case 3:if(gu(e,n),(62914560&n)===n&&10<(r=qs+500-Ho())){if(0!==It(e,0))break;if(((o=e.suspendedLanes)&n)!==n){du(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=qr(Nu.bind(null,e),r);break}Nu(e);break;case 4:if(gu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Ht(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=Ho()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*js(n/1960))-n)){e.timeoutHandle=qr(Nu.bind(null,e),n);break}Nu(e);break;default:throw Error(a(329))}}return mu(e,Ho()),e.callbackNode===t?yu.bind(null,e):null}function gu(e,t){for(t&=~$s,t&=~Vs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function bu(e){if(0!==(48&Ns))throw Error(a(327));if(Bu(),e===Ms&&0!==(e.expiredLanes&Bs)){var t=Bs,n=Cu(e,t);0!==(zs&Vs)&&(n=Cu(e,t=It(e,t)))}else n=Cu(e,t=It(e,0));if(0!==e.tag&&2===n&&(Ns|=64,e.hydrate&&(e.hydrate=!1,Kr(e.containerInfo)),0!==(t=Lt(e))&&(n=Cu(e,t))),1===n)throw n=Ls,Ou(e,0),gu(e,t),mu(e,Ho()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nu(e),mu(e,Ho()),null}function ku(e,t){var n=Ns;Ns|=1;try{return e(t)}finally{0===(Ns=n)&&(Ks(),Yo())}}function wu(e,t){var n=Ns;Ns&=-2,Ns|=8;try{return e(t)}finally{0===(Ns=n)&&(Ks(),Yo())}}function xu(e,t){fo(Ps,Rs),Rs|=t,zs|=t}function Eu(){Rs=Ps.current,lo(Ps)}function Ou(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Wr(n)),null!==Fs)for(n=Fs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bo();break;case 3:Bi(),lo(vo),lo(ho),Ji();break;case 5:Pi(r);break;case 4:Bi();break;case 13:case 19:lo(Ii);break;case 10:oi(r);break;case 23:case 24:Eu()}n=n.return}Ms=e,Fs=Wu(e.current,null),Bs=Rs=zs=t,Is=0,Ls=null,$s=Vs=Us=0}function Du(e,t){for(;;){var n=Fs;try{if(ri(),Qi.current=Na,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Zi=0,na=ta=ea=null,oa=!1,Ts.current=null,null===n||null===n.return){Is=1,Ls=t,Fs=null;break}e:{var i=e,a=n.return,s=n,u=t;if(t=Bs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.lanes=l.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&Ii.current),d=a;do{var p;if(p=13===d.tag){var h=d.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var v=d.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var m=d.updateQueue;if(null===m){var y=new Set;y.add(c),d.updateQueue=y}else m.add(c);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var g=fi(-1,1);g.tag=2,di(s,g)}s.lanes|=1;break e}u=void 0,s=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new fs,u=new Set,b.set(c,u)):void 0===(u=b.get(c))&&(u=new Set,b.set(c,u)),!u.has(s)){u.add(s);var k=Uu.bind(null,i,c,s);c.then(k,k)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);u=Error((K(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Is&&(Is=2),u=cs(u,s),d=a;do{switch(d.tag){case 3:i=u,d.flags|=4096,t&=-t,d.lanes|=t,pi(d,ds(0,i,t));break e;case 1:i=u;var w=d.type,x=d.stateNode;if(0===(64&d.flags)&&("function"===typeof w.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Xs||!Xs.has(x)))){d.flags|=4096,t&=-t,d.lanes|=t,pi(d,ps(d,i,t));break e}}d=d.return}while(null!==d)}Tu(n)}catch(E){t=E,Fs===n&&null!==n&&(Fs=n=n.return);continue}break}}function Su(){var e=As.current;return As.current=Na,null===e?Na:e}function Cu(e,t){var n=Ns;Ns|=16;var r=Su();for(Ms===e&&Bs===t||Ou(e,t);;)try{_u();break}catch(o){Du(e,o)}if(ri(),Ns=n,As.current=r,null!==Fs)throw Error(a(261));return Ms=null,Bs=0,Is}function _u(){for(;null!==Fs;)Au(Fs)}function ju(){for(;null!==Fs&&!jo();)Au(Fs)}function Au(e){var t=Gs(e.alternate,e,Rs);e.memoizedProps=e.pendingProps,null===t?Tu(e):Fs=t,Ts.current=null}function Tu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Rs)))return void(Fs=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Rs)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=us(t)))return n.flags&=2047,void(Fs=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Fs=t);Fs=t=e}while(null!==t);0===Is&&(Is=5)}function Nu(e){var t=qo();return Ko(99,Mu.bind(null,e,t)),null}function Mu(e,t){do{Bu()}while(null!==eu);if(0!==(48&Ns))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<i;){var c=31-Ht(i),l=1<<c;o[c]=0,s[c]=-1,u[c]=-1,i&=~l}if(null!==ou&&0===(24&r)&&ou.has(e)&&ou.delete(e),e===Ms&&(Fs=Ms=null,Bs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Ns,Ns|=32,Ts.current=null,Ur=Yt,yr(s=mr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(l=u.getSelection&&u.getSelection())&&0!==l.rangeCount){u=l.anchorNode,i=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{u.nodeType,c.nodeType}catch(S){u=null;break e}var f=0,d=-1,p=-1,h=0,v=0,m=s,y=null;t:for(;;){for(var g;m!==u||0!==i&&3!==m.nodeType||(d=f+i),m!==c||0!==l&&3!==m.nodeType||(p=f+l),3===m.nodeType&&(f+=m.nodeValue.length),null!==(g=m.firstChild);)y=m,m=g;for(;;){if(m===s)break t;if(y===u&&++h===i&&(d=f),y===c&&++v===l&&(p=f),null!==(g=m.nextSibling))break;y=(m=y).parentNode}m=g}u=-1===d||-1===p?null:{start:d,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Vr={focusedElem:s,selectionRange:u},Yt=!1,lu=null,fu=!1,Ys=r;do{try{Fu()}catch(S){if(null===Ys)throw Error(a(330));zu(Ys,S),Ys=Ys.nextEffect}}while(null!==Ys);lu=null,Ys=r;do{try{for(s=e;null!==Ys;){var b=Ys.flags;if(16&b&&ge(Ys.stateNode,""),128&b){var k=Ys.alternate;if(null!==k){var w=k.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:xs(Ys),Ys.flags&=-3;break;case 6:xs(Ys),Ys.flags&=-3,Ss(Ys.alternate,Ys);break;case 1024:Ys.flags&=-1025;break;case 1028:Ys.flags&=-1025,Ss(Ys.alternate,Ys);break;case 4:Ss(Ys.alternate,Ys);break;case 8:Ds(s,u=Ys);var x=u.alternate;ks(u),null!==x&&ks(x)}Ys=Ys.nextEffect}}catch(S){if(null===Ys)throw Error(a(330));zu(Ys,S),Ys=Ys.nextEffect}}while(null!==Ys);if(w=Vr,k=mr(),b=w.focusedElem,s=w.selectionRange,k!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==s&&yr(b)&&(k=s.start,void 0===(w=s.end)&&(w=k),"selectionStart"in b?(b.selectionStart=k,b.selectionEnd=Math.min(w,b.value.length)):(w=(k=b.ownerDocument||document)&&k.defaultView||window).getSelection&&(w=w.getSelection(),u=b.textContent.length,x=Math.min(s.start,u),s=void 0===s.end?x:Math.min(s.end,u),!w.extend&&x>s&&(u=s,s=x,x=u),u=hr(b,x),i=hr(b,s),u&&i&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&((k=k.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),x>s?(w.addRange(k),w.extend(i.node,i.offset)):(k.setEnd(i.node,i.offset),w.addRange(k))))),k=[];for(w=b;w=w.parentNode;)1===w.nodeType&&k.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<k.length;b++)(w=k[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Yt=!!Ur,Vr=Ur=null,e.current=n,Ys=r;do{try{for(b=e;null!==Ys;){var E=Ys.flags;if(36&E&&ys(b,Ys.alternate,Ys),128&E){k=void 0;var O=Ys.ref;if(null!==O){var D=Ys.stateNode;Ys.tag,k=D,"function"===typeof O?O(k):O.current=k}}Ys=Ys.nextEffect}}catch(S){if(null===Ys)throw Error(a(330));zu(Ys,S),Ys=Ys.nextEffect}}while(null!==Ys);Ys=null,Lo(),Ns=o}else e.current=n;if(Zs)Zs=!1,eu=e,tu=t;else for(Ys=r;null!==Ys;)t=Ys.nextEffect,Ys.nextEffect=null,8&Ys.flags&&((E=Ys).sibling=null,E.stateNode=null),Ys=t;if(0===(r=e.pendingLanes)&&(Xs=null),1===r?e===au?iu++:(iu=0,au=e):iu=0,n=n.stateNode,Do&&"function"===typeof Do.onCommitFiberRoot)try{Do.onCommitFiberRoot(Oo,n,void 0,64===(64&n.current.flags))}catch(S){}if(mu(e,Ho()),Js)throw Js=!1,e=Qs,Qs=null,e;return 0!==(8&Ns)||Yo(),null}function Fu(){for(;null!==Ys;){var e=Ys.alternate;fu||null===lu||(0!==(8&Ys.flags)?et(Ys,lu)&&(fu=!0):13===Ys.tag&&_s(e,Ys)&&et(Ys,lu)&&(fu=!0));var t=Ys.flags;0!==(256&t)&&ms(e,Ys),0===(512&t)||Zs||(Zs=!0,Go(97,(function(){return Bu(),null}))),Ys=Ys.nextEffect}}function Bu(){if(90!==tu){var e=97<tu?97:tu;return tu=90,Ko(e,Iu)}return!1}function Ru(e,t){nu.push(t,e),Zs||(Zs=!0,Go(97,(function(){return Bu(),null})))}function Pu(e,t){ru.push(t,e),Zs||(Zs=!0,Go(97,(function(){return Bu(),null})))}function Iu(){if(null===eu)return!1;var e=eu;if(eu=null,0!==(48&Ns))throw Error(a(331));var t=Ns;Ns|=32;var n=ru;ru=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===i)throw Error(a(330));zu(i,c)}}for(n=nu,nu=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var u=o.create;o.destroy=u()}catch(c){if(null===i)throw Error(a(330));zu(i,c)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return Ns=t,Yo(),!0}function Lu(e,t,n){di(e,t=ds(0,t=cs(n,t),1)),t=du(),null!==(e=vu(e,1))&&($t(e,1,t),mu(e,t))}function zu(e,t){if(3===e.tag)Lu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Lu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r))){var o=ps(n,e=cs(t,e),1);if(di(n,o),o=du(),null!==(n=vu(n,1)))$t(n,1,o),mu(n,o);else if("function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function Uu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=du(),e.pingedLanes|=e.suspendedLanes&n,Ms===e&&(Bs&n)===n&&(4===Is||3===Is&&(62914560&Bs)===Bs&&500>Ho()-qs?Ou(e,0):$s|=n),mu(e,t)}function Vu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===qo()?1:2:(0===uu&&(uu=zs),0===(t=Ut(62914560&~uu))&&(t=4194304))),n=du(),null!==(e=vu(e,t))&&($t(e,t,n),mu(e,n))}function $u(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hu(e,t,n,r){return new $u(e,t,n,r)}function qu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Wu(e,t){var n=e.alternate;return null===n?((n=Hu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ku(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)qu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case O:return Gu(n.children,o,i,t);case R:s=8,o|=16;break;case D:s=8,o|=1;break;case S:return(e=Hu(12,n,t,8|o)).elementType=S,e.type=S,e.lanes=i,e;case A:return(e=Hu(13,n,t,o)).type=A,e.elementType=A,e.lanes=i,e;case T:return(e=Hu(19,n,t,o)).elementType=T,e.lanes=i,e;case P:return Yu(n,o,i,t);case I:return(e=Hu(24,n,t,o)).elementType=I,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case _:s=9;break e;case j:s=11;break e;case N:s=14;break e;case M:s=16,r=null;break e;case F:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Hu(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Gu(e,t,n,r){return(e=Hu(7,e,r,t)).lanes=n,e}function Yu(e,t,n,r){return(e=Hu(23,e,r,t)).elementType=P,e.lanes=n,e}function Ju(e,t,n){return(e=Hu(6,e,null,t)).lanes=n,e}function Qu(e,t,n){return(t=Hu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xu(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Vt(0),this.expirationTimes=Vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vt(0),this.mutableSourceEagerHydrationData=null}function Zu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:E,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ec(e,t,n,r){var o=t.current,i=du(),s=pu(o);e:if(n){t:{if(Je(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(go(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(go(c)){n=wo(n,c,u);break e}}n=u}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=fi(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),di(o,t),hu(o,s,i),s}function tc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rc(e,t){nc(e,t),(e=e.alternate)&&nc(e,t)}function oc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xu(e,t,null!=n&&!0===n.hydrate),t=Hu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ci(t),e[eo]=n.current,Nr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ac(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=tc(a);s.call(e)}}ec(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new oc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var u=o;o=function(){var e=tc(a);u.call(e)}}wu((function(){ec(t,a,e,o)}))}return tc(a)}function sc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return Zu(e,t,null,n)}Gs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||vo.current)Pa=!0;else{if(0===(n&r)){switch(Pa=!1,t.tag){case 3:Ka(t),Gi();break;case 5:Ri(t);break;case 1:go(t.type)&&xo(t);break;case 4:Fi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fo(Zo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Xa(e,t,n):(fo(Ii,1&Ii.current),null!==(t=is(e,t,n))?t.sibling:null);fo(Ii,1&Ii.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),fo(Ii,Ii.current),r)break;return null;case 23:case 24:return t.lanes=0,Va(e,t,n)}return is(e,t,n)}Pa=0!==(16384&e.flags)}else Pa=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=yo(t,ho.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,go(r)){var i=!0;xo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ci(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&yi(t,r,s,e),o.updater=gi,t.stateNode=o,o._reactInternals=t,xi(t,r,e,n),t=Wa(null,t,r,!0,i,n)}else t.tag=0,Ia(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return qu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===j)return 11;if(e===N)return 14}return 2}(o),e=Xo(o,e),i){case 0:t=Ha(null,t,o,e,n);break e;case 1:t=qa(null,t,o,e,n);break e;case 11:t=La(null,t,o,e,n);break e;case 14:t=za(null,t,o,Xo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ha(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 1:return r=t.type,o=t.pendingProps,qa(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 3:if(Ka(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,li(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Gi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Ui=Gr(t.stateNode.containerInfo.firstChild),zi=t,i=Vi=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Yi.push(i);for(n=_i(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Ia(e,t,r,n),Gi();t=t.child}return t;case 5:return Ri(t),null===e&&qi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,Hr(r,o)?s=null:null!==i&&Hr(r,i)&&(t.flags|=16),$a(e,t),Ia(e,t,s,n),t.child;case 6:return null===e&&qi(t),null;case 13:return Xa(e,t,n);case 4:return Fi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ci(t,null,r,n):Ia(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,La(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(fo(Zo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0===(i=lr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!vo.current){t=is(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&i)){1===u.tag&&((l=fi(-1,n&-n)).tag=2,di(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),ii(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Ia(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,Ia(e,t,r,n),t.child;case 14:return i=Xo(o=t.type,t.pendingProps),za(e,t,o,i=Xo(o.type,i),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,go(r)?(e=!0,xo(t)):e=!1,ai(t,n),ki(t,r,o),xi(t,r,o,n),Wa(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return Va(e,t,n)}throw Error(a(156,t.tag))},oc.prototype.render=function(e){ec(e,this._internalRoot,null,null)},oc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ec(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hu(e,4,du()),rc(e,4))},nt=function(e){13===e.tag&&(hu(e,67108864,du()),rc(e,67108864))},rt=function(e){if(13===e.tag){var t=du(),n=pu(e);hu(e,n,t),rc(e,n)}},ot=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Q(r),ne(r,o)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Me=ku,Fe=function(e,t,n,r,o){var i=Ns;Ns|=4;try{return Ko(98,e.bind(null,t,n,r,o))}finally{0===(Ns=i)&&(Ks(),Yo())}},Be=function(){0===(49&Ns)&&(function(){if(null!==ou){var e=ou;ou=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,mu(e,Ho())}))}Yo()}(),Bu())},Re=function(e,t){var n=Ns;Ns|=2;try{return e(t)}finally{0===(Ns=n)&&(Ks(),Yo())}};var uc={Events:[ro,oo,io,Te,Ne,Bu,{current:!1}]},cc={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},lc={bundleType:cc.bundleType,version:cc.version,rendererPackageName:cc.rendererPackageName,rendererConfig:cc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:cc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{Oo=fc.inject(lc),Do=fc}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uc,t.createPortal=sc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ns;if(0!==(48&n))return e(t);Ns|=1;try{if(e)return Ko(99,e.bind(null,t))}finally{Ns=n,Yo()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(wu((function(){ac(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=ku,t.unstable_createPortal=function(e,t){return sc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ac(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(36)},function(e,t,n){"use strict";var r,o,i,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,d=function e(){if(null!==l)try{var n=t.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var v=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,y=null,g=-1,b=5,k=0;t.unstable_shouldYield=function(){return t.unstable_now()>=k},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,x=w.port2;w.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();k=e+b;try{y(!0,e)?x.postMessage(null):(m=!1,y=null)}catch(n){throw x.postMessage(null),n}}else m=!1},r=function(e){y=e,m||(m=!0,x.postMessage(null))},o=function(e,n){g=p((function(){e(t.unstable_now())}),n)},i=function(){h(g),g=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<S(o,t)))break e;e[r]=t,e[n]=o,n=r}}function O(e){return void 0===(e=e[0])?null:e}function D(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>S(a,n))void 0!==u&&0>S(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],_=[],j=1,A=null,T=3,N=!1,M=!1,F=!1;function B(e){for(var t=O(_);null!==t;){if(null===t.callback)D(_);else{if(!(t.startTime<=e))break;D(_),t.sortIndex=t.expirationTime,E(C,t)}t=O(_)}}function R(e){if(F=!1,B(e),!M)if(null!==O(C))M=!0,r(P);else{var t=O(_);null!==t&&o(R,t.startTime-e)}}function P(e,n){M=!1,F&&(F=!1,i()),N=!0;var r=T;try{for(B(n),A=O(C);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"===typeof a){A.callback=null,T=A.priorityLevel;var s=a(A.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?A.callback=s:A===O(C)&&D(C),B(n)}else D(C);A=O(C)}if(null!==A)var u=!0;else{var c=O(_);null!==c&&o(R,c.startTime-n),u=!1}return u}finally{A=null,T=r,N=!1}}var I=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||N||(M=!0,r(P))},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return O(C)},t.unstable_next=function(e){switch(T){case 1:case 2:case 3:var t=3;break;default:t=T}var n=T;T=t;try{return e()}finally{T=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=I,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=T;T=e;try{return t()}finally{T=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:j++,callback:n,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(e.sortIndex=a,E(_,e),null===O(C)&&e===O(_)&&(F?i():F=!0,o(R,a-s))):(e.sortIndex=u,E(C,e),M||N||(M=!0,r(P))),e},t.unstable_wrapCallback=function(e){var t=T;return function(){var n=T;T=t;try{return e.apply(this,arguments)}finally{T=n}}}},function(e,t,n){var r=n(38),o=n(39);"string"===typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){"use strict";var r=function(){var e;return function(){return"undefined"===typeof e&&(e=Boolean(window&&document&&document.all&&!window.atob)),e}}(),o=function(){var e={};return function(t){if("undefined"===typeof e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(r){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],o=0;o<e.length;o++){var s=e[o],u=t.base?s[0]+t.base:s[0],c=n[u]||0,l="".concat(u," ").concat(c);n[u]=c+1;var f=a(l),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(i[f].references++,i[f].updater(d)):i.push({identifier:l,updater:h(d,t),references:1}),r.push(l)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if("undefined"===typeof r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"===typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var c=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function l(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!==typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var d=null,p=0;function h(e,t){var n,r,o;if(t.singleton){var i=p++;n=d||(d=u(t)),r=l.bind(null,n,i,!1),o=l.bind(null,n,i,!0)}else n=u(t),r=f.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"===typeof t.singleton||(t.singleton=r());var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=a(n[r]);i[o].references--}for(var u=s(e,t),c=0;c<n.length;c++){var l=a(n[c]);0===i[l].references&&(i[l].updater(),i.splice(l,1))}n=u}}}},function(e,t,n){"use strict";n.r(t);var r=n(22),o=n.n(r)()(!0);o.push([e.i,'@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:host {\n /* Reset all CSS properties */\n all: initial !important;\n}\n\nhtml {\n font-size: 62.5%;\n}\n\nbody {\n font-size: 1.5rem;\n}\n\n/* Comment HTML styles */\n\n/* This makes sure we can have empty lines in comments (= <p></p>) */\n.gh-comment-content p:empty::after {\n content: "\\00A0";\n}\n\n/* Links */\n.gh-comment-content a {\n text-decoration: underline;\n color: var(--gh-accent-color);\n}\n\n/* Blockquotes */\n.gh-comment-content blockquote {\n border-left: 3px solid rgba(13,13,13,.1);\n padding-left: 1rem;\n}\n\n/* The following lines are needed for the editor */\n\n/* Placeholder */\n.ProseMirror p.is-editor-empty:first-child::before {\n content: attr(data-placeholder);\n float: left;\n height: 0;\n pointer-events: none;\n --tw-text-opacity: 1;\n color: rgb(212 212 212 / var(--tw-text-opacity));\n}\n\n.ProseMirror * {\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\n[contenteditable]:focus {\n outline: 0px solid transparent;\n}',"",{version:3,sources:["webpack://src/index.css"],names:[],mappings:"AAAA,cAAc;AACd,oBAAoB;AACpB,mBAAmB;;AAEnB;IACI,6BAA6B;IAC7B,uBAAuB;AAC3B;;AAEA;IACI,gBAAgB;AACpB;;AAEA;IACI,iBAAiB;AACrB;;AAEA,wBAAwB;;AAExB,oEAAoE;AACpE;IACI,gBAAgB;AACpB;;AAEA,UAAU;AACV;IACI,0BAA0B;IAC1B,6BAA6B;AACjC;;AAEA,gBAAgB;AAChB;IACI,wCAAwC;IACxC,kBAAkB;AACtB;;AAEA,kDAAkD;;AAElD,gBAAgB;AAChB;IACI,+BAA+B;IAC/B,WAAW;IACX,SAAS;IACT,oBAAoB;IACpB,oBAAoB;IACpB,gDAAgD;AACpD;;AAEA;IACI,qBAAqB;IACrB,qBAAqB;AACzB;;AAEA;IACI,8BAA8B;AAClC",sourcesContent:['@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:host {\n /* Reset all CSS properties */\n all: initial !important;\n}\n\nhtml {\n font-size: 62.5%;\n}\n\nbody {\n font-size: 1.5rem;\n}\n\n/* Comment HTML styles */\n\n/* This makes sure we can have empty lines in comments (= <p></p>) */\n.gh-comment-content p:empty::after {\n content: "\\00A0";\n}\n\n/* Links */\n.gh-comment-content a {\n text-decoration: underline;\n color: var(--gh-accent-color);\n}\n\n/* Blockquotes */\n.gh-comment-content blockquote {\n border-left: 3px solid rgba(13,13,13,.1);\n padding-left: 1rem;\n}\n\n/* The following lines are needed for the editor */\n\n/* Placeholder */\n.ProseMirror p.is-editor-empty:first-child::before {\n content: attr(data-placeholder);\n float: left;\n height: 0;\n pointer-events: none;\n --tw-text-opacity: 1;\n color: rgb(212 212 212 / var(--tw-text-opacity));\n}\n\n.ProseMirror * {\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\n[contenteditable]:focus {\n outline: 0px solid transparent;\n}'],sourceRoot:""}]),t.default=o},function(e,t,n){"use strict";var r=n(41);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new 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}}function t(){return e}e.isRequired=e;var n={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:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n(19);var r=n(1),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";e.exports=n(44)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,k=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case p:case y:case m:case c:return e;default:return t}}case i:return t}}}function E(e){return x(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return E(e)||x(e)===f},t.isConcurrentMode=E,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===u},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===u||e===s||e===h||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===k||e.$$typeof===w||e.$$typeof===g)},t.typeOf=x},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"FunctionToString",(function(){return ge})),n.d(r,"InboundFilters",(function(){return ke}));var o=n(1),i=n.n(o),a=n(13),s=n.n(a),u=(n(37),n(0));function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){l=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(_){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new D(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(_){return{type:"throw",arg:_}}}e.wrap=u;var d={};function p(){}function h(){}function v(){}var m={};s(m,o,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(S([])));g&&g!==t&&n.call(g,o)&&(m=g);var b=v.prototype=p.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(o,i,a,s){var u=f(e[o],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=v,s(b,"constructor",v),s(v,"constructor",h),h.displayName=s(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},k(w.prototype),s(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new w(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(b),s(b,a,"Generator"),s(b,o,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function f(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function d(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,s,"next",e)}function s(e){f(i,r,o,a,s,"throw",e)}a(void 0)}))}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(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 v(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function b(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(rr){return!1}}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e,t){if(t&&("object"===c(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function x(e){var t=b();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var O=n(23),D=function(e){var t=e.type,n=e.status,r=e.autoHide,o=e.duration,i=void 0===o?2600:o,a=e.closeable,s=e.state,u=e.message,c=e.meta,l=void 0===c?{}:c,f=0;return s&&s.popupNotification&&(f=(s.popupNotification.count||0)+1),{type:t,status:n,autoHide:r,closeable:a,duration:i,meta:l,message:u,count:f}};function S(e){var t=e.site;return t||null}function C(e){var t=new Date(e),n=new Date,r=Math.round((n.getTime()-t.getTime())/1e3);if(r<5)return"Just now";if(r<60)return"".concat(r," seconds ago");if((r/=60)<60)return 1===Math.floor(r)?"One minute ago":"".concat(Math.floor(r)," minutes ago");var o=new Date(n.getFullYear(),n.getMonth(),n.getDate()-1);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()&&t.getDate()===o.getDate()?"Yesterday":(r/=60)<24?1===Math.floor(r)?"One hour ago":"".concat(Math.floor(r)," hours ago"):(r/=24)<7?1===Math.floor(r)?"One day ago":"".concat(Math.floor(r)," days ago"):(r/=7,1===Math.floor(r)?"One week ago":"".concat(Math.floor(r)," weeks ago"))}function _(e){if(!e)return"";var t=e.split(" ");return 0===t.length?"":1===t.length?t[0].substring(0,1):t[0].substring(0,1)+t[t.length-1].substring(0,1)}var j=n(2),A=["children"],T=function(e){var t=e.children,n=E(e,A),r=function(e){var t=e.appVersion;return t?"https://unpkg.com/@tryghost/comments-ui@~".concat(t,"/umd/main.css"):"http://localhost:3000/main.css"}({appVersion:n.appVersion}),o=Object(j.jsx)("link",{rel:"stylesheet",href:r});return Object(j.jsxs)(O.a.div,Object(u.a)(Object(u.a)({},n),{},{mode:"closed",children:[o,t]}))},N=n(9),M=n(10),F=n(12);function B(){var e=Object(N.a)(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0".concat(t);return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function R(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function P(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function I(e){var t=e.message,n=e.event_id;if(t)return t;var r=P(e);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"<unknown>":n||"<unknown>"}function L(e,t,n){var r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function z(e,t){var n=P(e);if(n){var r=n.mechanism;if(n.mechanism=Object(u.a)(Object(u.a)(Object(u.a)({},{type:"generic",handled:!0}),r),t),t&&"data"in t){var o=Object(u.a)(Object(u.a)({},r&&r.data),t.data);n.mechanism.data=o}}}function U(e){if(e&&e.__sentry_captured__)return!0;try{Object(M.a)(e,"__sentry_captured__",!0)}catch(t){}return!1}var V,$=n(25),H=Object(N.a)(),q="Sentry Logger ",W=["debug","info","warn","error","log","assert","trace"];function K(e){var t=Object(N.a)();if(!("console"in t))return e();var n=t.console,r={};W.forEach((function(e){var o=n[e]&&n[e].__sentry_original__;e in t.console&&o&&(r[e]=n[e],n[e]=o)}));try{return e()}finally{Object.keys(r).forEach((function(e){n[e]=r[e]}))}}function G(){var e=!1,t={enable:function(){e=!0},disable:function(){e=!1}};return"undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?W.forEach((function(n){t[n]=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];e&&K((function(){var e;(e=H.console)[n].apply(e,["".concat(q,"[").concat(n,"]:")].concat(r))}))}})):W.forEach((function(e){t[e]=function(){}})),t}V="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Object(N.b)("logger",G):G();var Y,J=n(16),Q=n(3),X=n(5),Z=n(6);function ee(e){return new ne((function(t){t(e)}))}function te(e){return new ne((function(t,n){n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Y||(Y={}));var ne=function(){function e(t){p(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(rr){this._reject(rr)}}return v(e,[{key:"__init",value:function(){this._state=Y.PENDING}},{key:"__init2",value:function(){this._handlers=[]}},{key:"then",value:function(t,n){var r=this;return new e((function(e,o){r._handlers.push([!1,function(n){if(t)try{e(t(n))}catch(rr){o(rr)}else e(n)},function(t){if(n)try{e(n(t))}catch(rr){o(rr)}else o(t)}]),r._executeHandlers()}))}},{key:"catch",value:function(e){return this.then((function(e){return e}),e)}},{key:"finally",value:function(t){var n=this;return new e((function(e,r){var o,i;return n.then((function(e){i=!1,o=e,t&&t()}),(function(e){i=!0,o=e,t&&t()})).then((function(){i?r(o):e(o)}))}))}},{key:"__init3",value:function(){var e=this;this._resolve=function(t){e._setResult(Y.RESOLVED,t)}}},{key:"__init4",value:function(){var e=this;this._reject=function(t){e._setResult(Y.REJECTED,t)}}},{key:"__init5",value:function(){var e=this;this._setResult=function(t,n){e._state===Y.PENDING&&(Object(Z.n)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))}}},{key:"__init6",value:function(){var e=this;this._executeHandlers=function(){if(e._state!==Y.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t[0]||(e._state===Y.RESOLVED&&t[1](e._value),e._state===Y.REJECTED&&t[2](e._value),t[0]=!0)}))}}}}]),e}();function re(e){var t=Object($.b)(),n={sid:B(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:function(){return function(e){return Object(M.c)({sid:"".concat(e.sid),init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?"".concat(e.did):void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)}};return e&&oe(n,e),n}function oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object($.b)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:B()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(t.did)),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}var ie=function(){function e(){p(this,e),this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return v(e,[{key:"addScopeListener",value:function(e){this._scopeListeners.push(e)}},{key:"addEventProcessor",value:function(e){return this._eventProcessors.push(e),this}},{key:"setUser",value:function(e){return this._user=e||{},this._session&&oe(this._session,{user:e}),this._notifyScopeListeners(),this}},{key:"getUser",value:function(){return this._user}},{key:"getRequestSession",value:function(){return this._requestSession}},{key:"setRequestSession",value:function(e){return this._requestSession=e,this}},{key:"setTags",value:function(e){return this._tags=Object(u.a)(Object(u.a)({},this._tags),e),this._notifyScopeListeners(),this}},{key:"setTag",value:function(e,t){return this._tags=Object(u.a)(Object(u.a)({},this._tags),{},Object(X.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setExtras",value:function(e){return this._extra=Object(u.a)(Object(u.a)({},this._extra),e),this._notifyScopeListeners(),this}},{key:"setExtra",value:function(e,t){return this._extra=Object(u.a)(Object(u.a)({},this._extra),{},Object(X.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setFingerprint",value:function(e){return this._fingerprint=e,this._notifyScopeListeners(),this}},{key:"setLevel",value:function(e){return this._level=e,this._notifyScopeListeners(),this}},{key:"setTransactionName",value:function(e){return this._transactionName=e,this._notifyScopeListeners(),this}},{key:"setContext",value:function(e,t){return null===t?delete this._contexts[e]:this._contexts=Object(u.a)(Object(u.a)({},this._contexts),{},Object(X.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setSpan",value:function(e){return this._span=e,this._notifyScopeListeners(),this}},{key:"getSpan",value:function(){return this._span}},{key:"getTransaction",value:function(){var e=this.getSpan();return e&&e.transaction}},{key:"setSession",value:function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}},{key:"getSession",value:function(){return this._session}},{key:"update",value:function(t){if(!t)return this;if("function"===typeof t){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=Object(u.a)(Object(u.a)({},this._tags),t._tags),this._extra=Object(u.a)(Object(u.a)({},this._extra),t._extra),this._contexts=Object(u.a)(Object(u.a)({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):Object(Z.i)(t)&&(this._tags=Object(u.a)(Object(u.a)({},this._tags),t.tags),this._extra=Object(u.a)(Object(u.a)({},this._extra),t.extra),this._contexts=Object(u.a)(Object(u.a)({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}},{key:"clear",value:function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}},{key:"addBreadcrumb",value:function(e,t){var n="number"===typeof t?Math.min(t,100):100;if(n<=0)return this;var r=Object(u.a)({timestamp:Object($.a)()},e);return this._breadcrumbs=[].concat(Object(Q.a)(this._breadcrumbs),[r]).slice(-n),this._notifyScopeListeners(),this}},{key:"clearBreadcrumbs",value:function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}},{key:"addAttachment",value:function(e){return this._attachments.push(e),this}},{key:"getAttachments",value:function(){return this._attachments}},{key:"clearAttachments",value:function(){return this._attachments=[],this}},{key:"applyToEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._extra&&Object.keys(this._extra).length&&(e.extra=Object(u.a)(Object(u.a)({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=Object(u.a)(Object(u.a)({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=Object(u.a)(Object(u.a)({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=Object(u.a)(Object(u.a)({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=Object(u.a)({trace:this._span.getTraceContext()},e.contexts);var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags=Object(u.a)({transaction:n},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=[].concat(Object(Q.a)(e.breadcrumbs||[]),Object(Q.a)(this._breadcrumbs)),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata=Object(u.a)(Object(u.a)({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),this._notifyEventProcessors([].concat(Object(Q.a)(ae()),Object(Q.a)(this._eventProcessors)),e,t)}},{key:"setSDKProcessingMetadata",value:function(e){return this._sdkProcessingMetadata=Object(u.a)(Object(u.a)({},this._sdkProcessingMetadata),e),this}},{key:"_notifyEventProcessors",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new ne((function(i,a){var s=e[o];if(null===t||"function"!==typeof s)i(t);else{var c=s(Object(u.a)({},t),n);("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.id&&null===c&&V.log('Event processor "'.concat(s.id,'" dropped event')),Object(Z.n)(c)?c.then((function(t){return r._notifyEventProcessors(e,t,n,o+1).then(i)})).then(null,a):r._notifyEventProcessors(e,c,n,o+1).then(i).then(null,a)}}))}},{key:"_notifyScopeListeners",value:function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)}},{key:"_applyFingerprint",value:function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}],[{key:"clone",value:function(t){var n=new e;return t&&(n._breadcrumbs=Object(Q.a)(t._breadcrumbs),n._tags=Object(u.a)({},t._tags),n._extra=Object(u.a)({},t._extra),n._contexts=Object(u.a)({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=Object(Q.a)(t._eventProcessors),n._requestSession=t._requestSession,n._attachments=Object(Q.a)(t._attachments)),n}}]),e}();function ae(){return Object(N.b)("globalEventProcessors",(function(){return[]}))}function se(e){ae().push(e)}var ue,ce=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ie,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4;p(this,e),this._version=r,e.prototype.__init.call(this),this.getStackTop().scope=n,t&&this.bindClient(t)}return v(e,[{key:"__init",value:function(){this._stack=[{}]}},{key:"isOlderThan",value:function(e){return this._version<e}},{key:"bindClient",value:function(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}},{key:"pushScope",value:function(){var e=ie.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}},{key:"popScope",value:function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}},{key:"withScope",value:function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}},{key:"getClient",value:function(){return this.getStackTop().client}},{key:"getScope",value:function(){return this.getStackTop().scope}},{key:"getStack",value:function(){return this._stack}},{key:"getStackTop",value:function(){return this._stack[this._stack.length-1]}},{key:"captureException",value:function(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:B(),r=new Error("Sentry syntheticException");return this._withClient((function(o,i){o.captureException(e,Object(u.a)(Object(u.a)({originalException:e,syntheticException:r},t),{},{event_id:n}),i)})),n}},{key:"captureMessage",value:function(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:B(),o=new Error(e);return this._withClient((function(i,a){i.captureMessage(e,t,Object(u.a)(Object(u.a)({originalException:e,syntheticException:o},n),{},{event_id:r}),a)})),r}},{key:"captureEvent",value:function(e,t){var n=t&&t.event_id?t.event_id:B();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((function(r,o){r.captureEvent(e,Object(u.a)(Object(u.a)({},t),{},{event_id:n}),o)})),n}},{key:"lastEventId",value:function(){return this._lastEventId}},{key:"addBreadcrumb",value:function(e,t){var n=this.getStackTop(),r=n.scope,o=n.client;if(r&&o){var i=o.getOptions&&o.getOptions()||{},a=i.beforeBreadcrumb,s=void 0===a?null:a,c=i.maxBreadcrumbs,l=void 0===c?100:c;if(!(l<=0)){var f=Object($.a)(),d=Object(u.a)({timestamp:f},e),p=s?K((function(){return s(d,t)})):d;null!==p&&r.addBreadcrumb(p,l)}}}},{key:"setUser",value:function(e){var t=this.getScope();t&&t.setUser(e)}},{key:"setTags",value:function(e){var t=this.getScope();t&&t.setTags(e)}},{key:"setExtras",value:function(e){var t=this.getScope();t&&t.setExtras(e)}},{key:"setTag",value:function(e,t){var n=this.getScope();n&&n.setTag(e,t)}},{key:"setExtra",value:function(e,t){var n=this.getScope();n&&n.setExtra(e,t)}},{key:"setContext",value:function(e,t){var n=this.getScope();n&&n.setContext(e,t)}},{key:"configureScope",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client;n&&r&&e(n)}},{key:"run",value:function(e){var t=fe(this);try{e(this)}finally{fe(t)}}},{key:"getIntegration",value:function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Cannot retrieve integration ".concat(e.id," from the current Hub")),null}}},{key:"startTransaction",value:function(e,t){return this._callExtensionMethod("startTransaction",e,t)}},{key:"traceHeaders",value:function(){return this._callExtensionMethod("traceHeaders")}},{key:"captureSession",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e)return this.endSession();this._sendSessionUpdate()}},{key:"endSession",value:function(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){var n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),oe(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}},{key:"startSession",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client,o=r&&r.getOptions()||{},i=o.release,a=o.environment,s=(Object(N.a)().navigator||{}).userAgent,c=re(Object(u.a)(Object(u.a)(Object(u.a)({release:i,environment:a},n&&{user:n.getUser()}),s&&{userAgent:s}),e));if(n){var l=n.getSession&&n.getSession();l&&"ok"===l.status&&oe(l,{status:"exited"}),this.endSession(),n.setSession(c)}return c}},{key:"shouldSendDefaultPii",value:function(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}},{key:"_sendSessionUpdate",value:function(){var e=this.getStackTop(),t=e.scope,n=e.client;if(t){var r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}}},{key:"_withClient",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client;r&&e(r,n)}},{key:"_callExtensionMethod",value:function(e){var t=le(),n=t.__SENTRY__;if(n&&n.extensions&&"function"===typeof n.extensions[e]){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.extensions[e].apply(this,o)}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Extension method ".concat(e," couldn't be found, doing nothing."))}}]),e}();function le(){var e=Object(N.a)();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function fe(e){var t=le(),n=he(t);return ve(t,e),n}function de(){var e=le();return pe(e)&&!he(e).isOlderThan(4)||ve(e,new ce),Object(J.b)()?function(e){try{var t=le().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return he(e);if(!pe(n)||he(n).isOlderThan(4)){var r=he(e).getStackTop();ve(n,new ce(r.client,ie.clone(r.scope)))}return he(n)}catch(o){return he(e)}}(e):he(e)}function pe(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function he(e){return Object(N.b)("hub",(function(){return new ce}),e)}function ve(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function me(e,t){return de().captureException(e,{captureContext:t})}function ye(e){de().withScope(e)}var ge=function(){function e(){p(this,e),e.prototype.__init.call(this)}return v(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){ue=Function.prototype.toString,Function.prototype.toString=function(){for(var e=Object(M.f)(this)||this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ue.apply(e,n)}}}],[{key:"__initStatic",value:function(){this.id="FunctionToString"}}]),e}();ge.__initStatic();var be=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],ke=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this._options=t,e.prototype.__init.call(this)}return v(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(t,n){var r=function(t){var r=n();if(r){var o=r.getIntegration(e);if(o){var i=r.getClient(),a=i?i.getOptions():{},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[].concat(Object(Q.a)(e.allowUrls||[]),Object(Q.a)(t.allowUrls||[])),denyUrls:[].concat(Object(Q.a)(e.denyUrls||[]),Object(Q.a)(t.denyUrls||[])),ignoreErrors:[].concat(Object(Q.a)(e.ignoreErrors||[]),Object(Q.a)(t.ignoreErrors||[]),be),ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(o._options,a);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(rr){}return!1}(e))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat(I(e))),!0;if(function(e,t){if(!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=void 0===n?"":n,o=t.value,i=void 0===o?"":o;return["".concat(i),"".concat(r,": ").concat(i)]}catch(a){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Cannot extract message for event ".concat(I(e))),[]}return[]}(e).some((function(e){return t.some((function(t){return Object(F.a)(e,t)}))}))}(e,t.ignoreErrors))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(I(e))),!0;if(function(e,t){if(!t||!t.length)return!1;var n=we(e);return!!n&&t.some((function(e){return Object(F.a)(n,e)}))}(e,t.denyUrls))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(I(e),".\nUrl: ").concat(we(e))),!0;if(!function(e,t){if(!t||!t.length)return!0;var n=we(e);return!n||t.some((function(e){return Object(F.a)(n,e)}))}(e,t.allowUrls))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(I(e),".\nUrl: ").concat(we(e))),!0;return!1}(t,s)?null:t}}return t};r.id=this.name,t(r)}}],[{key:"__initStatic",value:function(){this.id="InboundFilters"}}]),e}();function we(e){try{var t;try{t=e.exception.values[0].stacktrace.frames}catch(rr){}return t?function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.length-1;t>=0;t--){var n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(n){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Cannot extract url for event ".concat(I(e))),null}}ke.__initStatic();var xe=[];function Ee(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function Oe(e){var t=e.defaultIntegrations&&Object(Q.a)(e.defaultIntegrations)||[],n=e.integrations,r=Object(Q.a)(Ee(t));Array.isArray(n)?r=[].concat(Object(Q.a)(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))}))),Object(Q.a)(Ee(n))):"function"===typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o,i=r.map((function(e){return e.name})),a="Debug";-1!==i.indexOf(a)&&(o=r).push.apply(o,Object(Q.a)(r.splice(i.indexOf(a),1)));return r}function De(e,t){!0===t.debug&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?V.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=de(),r=n.getScope();r&&r.update(t.initialScope);var o=new e(t);n.bindClient(o)}var Se=n(4);function Ce(e,t,n){return Ce=b()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&m(o,n.prototype),o},Ce.apply(null,arguments)}function _e(e){var t="function"===typeof Map?new Map:void 0;return _e=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Ce(e,arguments,g(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),m(r,e)},_e(e)}var je=function(e){y(n,e);var t=x(n);function n(e){var r;return p(this,n),(r=t.call(this,e)).message=e,r.name=(this instanceof n?this.constructor:void 0).prototype.constructor.name,Object.setPrototypeOf(k(r),(this instanceof n?this.constructor:void 0).prototype),r}return v(n)}(_e(Error)),Ae=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Te(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.host,r=e.path,o=e.pass,i=e.port,a=e.projectId,s=e.protocol,u=e.publicKey;return"".concat(s,"://").concat(u).concat(t&&o?":".concat(o):"")+"@".concat(n).concat(i?":".concat(i):"","/").concat(r?"".concat(r,"/"):r).concat(a)}function Ne(e){var t=Ae.exec(e);if(!t)throw new je("Invalid Sentry Dsn: ".concat(e));var n=t.slice(1),r=Object(Se.a)(n,6),o=r[0],i=r[1],a=r[2],s=void 0===a?"":a,u=r[3],c=r[4],l=void 0===c?"":c,f="",d=r[5],p=d.split("/");if(p.length>1&&(f=p.slice(0,-1).join("/"),d=p.pop()),d){var h=d.match(/^\d+/);h&&(d=h[0])}return Me({host:u,pass:s,path:f,projectId:d,port:l,protocol:o,publicKey:i})}function Me(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Fe(e){var t="string"===typeof e?Ne(e):Me(e);return function(e){if("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){var t=e.port,n=e.projectId,r=e.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(t){if(!e[t])throw new je("Invalid Sentry Dsn: ".concat(t," missing"))})),!n.match(/^\d+$/))throw new je("Invalid Sentry Dsn: Invalid projectId ".concat(n));if(!function(e){return"http"===e||"https"===e}(r))throw new je("Invalid Sentry Dsn: Invalid protocol ".concat(r));if(t&&isNaN(parseInt(t,10)))throw new je("Invalid Sentry Dsn: Invalid port ".concat(t))}}(t),t}function Be(e){var t=e.protocol?"".concat(e.protocol,":"):"",n=e.port?":".concat(e.port):"";return"".concat(t,"//").concat(e.host).concat(n).concat(e.path?"/".concat(e.path):"","/api/")}function Re(e,t){return t||"".concat(function(e){return"".concat(Be(e)).concat(e.projectId,"/envelope/")}(e),"?").concat(function(e){return Object(M.h)({sentry_key:e.publicKey,sentry_version:"7"})}(e))}function Pe(e,t){var n=Fe(e),r="".concat(Be(n),"embed/error-page/"),o="dsn=".concat(Te(n));for(var i in t)if("dsn"!==i)if("user"===i){var a=t.user;if(!a)continue;a.name&&(o+="&name=".concat(encodeURIComponent(a.name))),a.email&&(o+="&email=".concat(encodeURIComponent(a.email)))}else o+="&".concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t[i]));return"".concat(r,"?").concat(o)}var Ie=n(17);function Le(){if(!("fetch"in Object(N.a)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(rr){return!1}}function ze(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var Ue,Ve=n(8),$e=Object(N.a)(),He={},qe={};function We(e){if(!qe[e])switch(qe[e]=!0,e){case"console":!function(){if(!("console"in $e))return;W.forEach((function(e){e in $e.console&&Object(M.e)($e.console,e,(function(t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];Ge("console",{args:r,level:e}),t&&t.apply($e.console,r)}}))}))}();break;case"dom":!function(){if(!("document"in $e))return;var e=Ge.bind(null,"dom"),t=tt(e,!0);$e.document.addEventListener("click",t,!1),$e.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((function(t){var n=$e[t]&&$e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(M.e)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{var i=this,a=i.__sentry_instrumentation_handlers__=i.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var u=tt(e);s.handler=u,t.call(this,n,u,o)}s.refCount+=1}catch(rr){}return t.call(this,n,r,o)}})),Object(M.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{var o=this,i=o.__sentry_instrumentation_handlers__||{},a=i[t];a&&(a.refCount-=1,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete o.__sentry_instrumentation_handlers__)}catch(rr){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in $e))return;var e=XMLHttpRequest.prototype;Object(M.e)(e,"open",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this,i=n[1],a=o.__sentry_xhr__={method:Object(Z.l)(n[0])?n[0].toUpperCase():n[0],url:n[1]};Object(Z.l)(i)&&"POST"===a.method&&i.match(/sentry_key/)&&(o.__sentry_own_request__=!0);var s=function(){if(4===o.readyState){try{a.status_code=o.status}catch(rr){}Ge("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:o})}};return"onreadystatechange"in o&&"function"===typeof o.onreadystatechange?Object(M.e)(o,"onreadystatechange",(function(e){return function(){s();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(o,n)}})):o.addEventListener("readystatechange",s),e.apply(o,n)}})),Object(M.e)(e,"send",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.__sentry_xhr__&&void 0!==n[0]&&(this.__sentry_xhr__.body=n[0]),Ge("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),e.apply(this,n)}}))}();break;case"fetch":!function(){if(!function(){if(!Le())return!1;var e=Object(N.a)();if(ze(e.fetch))return!0;var t=!1,n=e.document;if(n&&"function"===typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=ze(r.contentWindow.fetch)),n.head.removeChild(r)}catch(o){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",o)}return t}())return;Object(M.e)($e,"fetch",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o={args:n,fetchData:{method:Ye(n),url:Je(n)},startTimestamp:Date.now()};return Ge("fetch",Object(u.a)({},o)),e.apply($e,n).then((function(e){return Ge("fetch",Object(u.a)(Object(u.a)({},o),{},{endTimestamp:Date.now(),response:e})),e}),(function(e){throw Ge("fetch",Object(u.a)(Object(u.a)({},o),{},{endTimestamp:Date.now(),error:e})),e}))}}))}();break;case"history":!function(){if(!function(){var e=Object(N.a)(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}())return;var e=$e.onpopstate;function t(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length>2?n[2]:void 0;if(o){var i=Ue,a=String(o);Ue=a,Ge("history",{from:i,to:a})}return e.apply(this,n)}}$e.onpopstate=function(){var t=$e.location.href,n=Ue;if(Ue=t,Ge("history",{from:n,to:t}),e)try{for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(this,o)}catch(a){}},Object(M.e)($e.history,"pushState",t),Object(M.e)($e.history,"replaceState",t)}();break;case"error":nt=$e.onerror,$e.onerror=function(e,t,n,r,o){return Ge("error",{column:r,error:o,line:n,msg:e,url:t}),!!nt&&nt.apply(this,arguments)};break;case"unhandledrejection":rt=$e.onunhandledrejection,$e.onunhandledrejection=function(e){return Ge("unhandledrejection",e),!rt||rt.apply(this,arguments)};break;default:return void(("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("unknown instrumentation type:",e))}}function Ke(e,t){He[e]=He[e]||[],He[e].push(t),We(e)}function Ge(e,t){if(e&&He[e]){var n,r=Object(Ve.a)(He[e]||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{o(t)}catch(rr){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Error while triggering instrumentation handler.\nType: ".concat(e,"\nName: ").concat(Object(Ie.b)(o),"\nError:"),rr)}}}catch(i){r.e(i)}finally{r.f()}}}function Ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"Request"in $e&&Object(Z.g)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"string"===typeof e[0]?e[0]:"Request"in $e&&Object(Z.g)(e[0],Request)?e[0].url:String(e[0])}var Qe,Xe;function Ze(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(rr){}return!1}function et(e){if("keypress"!==e.type)return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(rr){}return!0}function tt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){if(n&&Xe!==n&&!et(n)){var r="keypress"===n.type?"input":n.type;(void 0===Qe||Ze(Xe,n))&&(e({event:n,name:r,global:t}),Xe=n),clearTimeout(Qe),Qe=$e.setTimeout((function(){Qe=void 0}),1e3)}}}var nt=null;var rt=null;function ot(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}function it(){return it="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=ot(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},it.apply(this,arguments)}var at="7.5.0";function st(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[e,t]}function ut(e,t){var n=Object(Se.a)(e,2),r=n[0],o=n[1];return[r,[].concat(Object(Q.a)(o),[t])]}function ct(e,t){e[1].forEach((function(e){var n=e[0].type;t(e,n)}))}function lt(e,t){return(t||new TextEncoder).encode(e)}function ft(e,t){var n=Object(Se.a)(e,2),r=n[0],o=n[1],i=JSON.stringify(r);function a(e){"string"===typeof i?i="string"===typeof e?i+e:[lt(i,t),e]:i.push("string"===typeof e?lt(e,t):e)}var s,u=Object(Ve.a)(o);try{for(u.s();!(s=u.n()).done;){var c=s.value,l=Object(Se.a)(c,2),f=l[0],d=l[1];a("\n".concat(JSON.stringify(f),"\n")),a("string"===typeof d||d instanceof Uint8Array?d:JSON.stringify(d))}}catch(p){u.e(p)}finally{u.f()}return"string"===typeof i?i:function(e){var t,n=e.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),o=0,i=Object(Ve.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;r.set(a,o),o+=a.length}}catch(p){i.e(p)}finally{i.f()}return r}(i)}function dt(e,t){var n="string"===typeof e.data?lt(e.data,t):e.data;return[Object(M.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var pt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function ht(e){return pt[e]}var vt=n(54);function mt(e){if(e&&e.sdk){var t=e.sdk;return{name:t.name,version:t.version}}}function yt(e,t,n,r){var o=mt(n),i=e.type||"event",a=(e.sdkProcessingMetadata||{}).transactionSampling||{},s=a.method,c=a.rate;!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[].concat(Object(Q.a)(e.sdk.integrations||[]),Object(Q.a)(t.integrations||[])),e.sdk.packages=[].concat(Object(Q.a)(e.sdk.packages||[]),Object(Q.a)(t.packages||[])))}(e,n&&n.sdk);var l=function(e,t,n,r){var o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baggage,i=o&&function(e){return e[0]}(o);return Object(u.a)(Object(u.a)(Object(u.a)({event_id:e.event_id,sent_at:(new Date).toISOString()},t&&{sdk:t}),!!n&&{dsn:Te(r)}),"transaction"===e.type&&i&&{trace:Object(M.c)(Object(u.a)({},i))})}(e,o,r,t);return delete e.sdkProcessingMetadata,st(l,[[{type:i,sample_rates:[{id:s,rate:c}]},e]])}var gt="Not capturing exception because it's already been captured.",bt=function(){function e(t){if(p(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._options=t,t.dsn){this._dsn=Fe(t.dsn);var n=Re(this._dsn,t.tunnel);this._transport=t.transport(Object(u.a)(Object(u.a)({recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{},{url:n}))}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("No DSN provided, client will not do anything.")}return v(e,[{key:"__init",value:function(){this._integrations={}}},{key:"__init2",value:function(){this._integrationsInitialized=!1}},{key:"__init3",value:function(){this._numProcessing=0}},{key:"__init4",value:function(){this._outcomes={}}},{key:"captureException",value:function(e,t,n){var r=this;if(!U(e)){var o=t&&t.event_id;return this._process(this.eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.log(gt)}},{key:"captureMessage",value:function(e,t,n,r){var o=this,i=n&&n.event_id,a=Object(Z.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i}},{key:"captureEvent",value:function(e,t,n){if(!(t&&t.originalException&&U(t.originalException))){var r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){r=e}))),r}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.log(gt)}},{key:"captureSession",value:function(e){this._isEnabled()?"string"!==typeof e.release?("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),oe(e,{init:!1})):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("SDK not enabled, will not capture session.")}},{key:"getDsn",value:function(){return this._dsn}},{key:"getOptions",value:function(){return this._options}},{key:"getTransport",value:function(){return this._transport}},{key:"flush",value:function(e){var t=this._transport;return t?this._isClientDoneProcessing(e).then((function(n){return t.flush(e).then((function(e){return n&&e}))})):ee(!0)}},{key:"close",value:function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))}},{key:"setupIntegrations",value:function(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){var t={};return e.forEach((function(e){t[e.name]=e,-1===xe.indexOf(e.name)&&(e.setupOnce(se,de),xe.push(e.name),("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.log("Integration installed: ".concat(e.name)))})),t}(this._options.integrations),this._integrationsInitialized=!0)}},{key:"getIntegrationById",value:function(e){return this._integrations[e]}},{key:"getIntegration",value:function(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Cannot retrieve integration ".concat(e.id," from the current Client")),null}}},{key:"sendEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._dsn){var n,r=yt(e,this._dsn,this._options._metadata,this._options.tunnel),o=Object(Ve.a)(t.attachments||[]);try{for(o.s();!(n=o.n()).done;){var i=n.value;r=ut(r,dt(i,this._options.transportOptions&&this._options.transportOptions.textEncoder))}}catch(a){o.e(a)}finally{o.f()}this._sendEnvelope(r)}}},{key:"sendSession",value:function(e){if(this._dsn){var t=function(e,t,n,r){var o=mt(n);return st(Object(u.a)(Object(u.a)({sent_at:(new Date).toISOString()},o&&{sdk:o}),!!r&&{dsn:Te(t)}),["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}},{key:"recordDroppedEvent",value:function(e,t){if(this._options.sendClientReports){var n="".concat(e,":").concat(t);("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.log('Adding outcome: "'.concat(n,'"')),this._outcomes[n]=this._outcomes[n]+1||1}}},{key:"_updateSessionFromEvent",value:function(e,t){var n=!1,r=!1,o=t.exception&&t.exception.values;if(o){r=!0;var i,a=Object(Ve.a)(o);try{for(a.s();!(i=a.n()).done;){var s=i.value.mechanism;if(s&&!1===s.handled){n=!0;break}}}catch(l){a.e(l)}finally{a.f()}}var c="ok"===e.status;(c&&0===e.errors||c&&n)&&(oe(e,Object(u.a)(Object(u.a)({},n&&{status:"crashed"}),{},{errors:e.errors||Number(r||n)})),this.captureSession(e))}},{key:"_isClientDoneProcessing",value:function(e){var t=this;return new ne((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))}},{key:"_isEnabled",value:function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}},{key:"_prepareEvent",value:function(e,t,n){var r=this,o=this.getOptions(),i=o.normalizeDepth,a=void 0===i?3:i,s=o.normalizeMaxBreadth,c=void 0===s?1e3:s,l=Object(u.a)(Object(u.a)({},e),{},{event_id:e.event_id||t.event_id||B(),timestamp:e.timestamp||Object($.a)()});this._applyClientOptions(l),this._applyIntegrationsMetadata(l);var f=n;t.captureContext&&(f=ie.clone(f).update(t.captureContext));var d=ee(l);if(f){var p=[].concat(Object(Q.a)(t.attachments||[]),Object(Q.a)(f.getAttachments()));p.length&&(t.attachments=p),d=f.applyToEvent(l,t)}return d.then((function(e){return"number"===typeof a&&a>0?r._normalizeEvent(e,a,c):e}))}},{key:"_normalizeEvent",value:function(e,t,n){if(!e)return null;var r=Object(u.a)(Object(u.a)(Object(u.a)(Object(u.a)(Object(u.a)({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return Object(u.a)(Object(u.a)({},e),e.data&&{data:Object(vt.a)(e.data,t,n)})}))}),e.user&&{user:Object(vt.a)(e.user,t,n)}),e.contexts&&{contexts:Object(vt.a)(e.contexts,t,n)}),e.extra&&{extra:Object(vt.a)(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(vt.a)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((function(e){return e.data&&(e.data=Object(vt.a)(e.data,t,n)),e}))),r}},{key:"_applyClientOptions",value:function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Object(F.d)(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(F.d)(s.value,a));var u=e.request;u&&u.url&&(u.url=Object(F.d)(u.url,a))}},{key:"_applyIntegrationsMetadata",value:function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[].concat(Object(Q.a)(e.sdk.integrations||[]),Object(Q.a)(t)))}},{key:"_captureEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn(e)}))}},{key:"_processEvent",value:function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;if(!this._isEnabled())return te(new je("SDK not enabled, will not capture event."));var s="transaction"===e.type;return!s&&"number"===typeof a&&Math.random()>a?(this.recordDroppedEvent("sample_rate","error"),te(new je("Discarding event because it's not included in the random sample (sampling rate = ".concat(a,")")))):this._prepareEvent(e,t,n).then((function(n){if(null===n)throw r.recordDroppedEvent("event_processor",e.type||"error"),new je("An event processor returned null, will not send event.");return t.data&&!0===t.data.__sentry__||s||!i?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Object(Z.n)(e))return e.then((function(e){if(!Object(Z.i)(e)&&null!==e)throw new je(t);return e}),(function(e){throw new je("beforeSend rejected with ".concat(e))}));if(!Object(Z.i)(e)&&null!==e)throw new je(t);return e}(i(n,t))})).then((function(o){if(null===o)throw r.recordDroppedEvent("before_send",e.type||"error"),new je("`beforeSend` returned `null`, will not send event.");var i=n&&n.getSession();return!s&&i&&r._updateSessionFromEvent(i,o),r.sendEvent(o,t),o})).then(null,(function(e){if(e instanceof je)throw e;throw r.captureException(e,{data:{__sentry__:!0},originalException:e}),new je("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(e))}))}},{key:"_process",value:function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))}},{key:"_sendEnvelope",value:function(e){this._transport&&this._dsn?this._transport.send(e).then(null,(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Error while sending event:",e)})):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Transport disabled")}},{key:"_clearOutcomes",value:function(){var e=this._outcomes;return this._outcomes={},Object.keys(e).map((function(t){var n=t.split(":"),r=Object(Se.a)(n,2);return{reason:r[0],category:r[1],quantity:e[t]}}))}}]),e}();function kt(e,t){var n=xt(e,t),r={type:t&&t.name,value:Ot(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function wt(e,t){return{exception:{values:[kt(e,t)]}}}function xt(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"===typeof e.framesToPop)return e.framesToPop;if(Et.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(rr){}return[]}var Et=/Minified React error #\d+;/i;function Ot(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function Dt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=r&&r.syntheticException||void 0,a=Ct(e,t,i,o);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),ee(a)}function St(e,t,n,r,o){var i;if(Object(Z.e)(t)&&t.error)return wt(e,t.error);if(Object(Z.a)(t)||Object(Z.b)(t)){var a=t;if("stack"in t)i=wt(e,t);else{var s=a.name||(Object(Z.a)(a)?"DOMError":"DOMException"),c=a.message?"".concat(s,": ").concat(a.message):s;L(i=Ct(e,c,n,r),c)}return"code"in a&&(i.tags=Object(u.a)(Object(u.a)({},i.tags),{},{"DOMException.code":"".concat(a.code)})),i}return Object(Z.d)(t)?wt(e,t):Object(Z.i)(t)||Object(Z.f)(t)?(i=function(e,t,n,r){var o={exception:{values:[{type:Object(Z.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:"Non-Error ".concat(r?"promise rejection":"exception"," captured with keys: ").concat(Object(M.d)(t))}]},extra:{__serialized__:Object(vt.b)(t)}};if(n){var i=xt(e,n);i.length&&(o.exception.values[0].stacktrace={frames:i})}return o}(e,t,n,o),z(i,{synthetic:!0}),i):(L(i=Ct(e,t,n,r),"".concat(t),void 0),z(i,{synthetic:!0}),i)}function Ct(e,t,n,r){var o={message:t};if(r&&n){var i=xt(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]})}return o}var _t=n(27),jt=["fatal","error","warning","log","info","debug"];function At(e){return"warn"===e?"warning":jt.includes(e)?e:"log"}var Tt="Breadcrumbs",Nt=function(){function e(t){p(this,e),e.prototype.__init.call(this),this.options=Object(u.a)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return v(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){this.options.console&&Ke("console",Mt),this.options.dom&&Ke("dom",function(e){function t(t){var n,r="object"===typeof e?e.serializeAttribute:void 0;"string"===typeof r&&(r=[r]);try{n=t.event.target?Object(_t.b)(t.event.target,r):Object(_t.b)(t.event,r)}catch(rr){n="<unknown>"}0!==n.length&&de().addBreadcrumb({category:"ui.".concat(t.name),message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&Ke("xhr",Ft),this.options.fetch&&Ke("fetch",Bt),this.options.history&&Ke("history",Rt)}}],[{key:"__initStatic",value:function(){this.id=Tt}}]),e}();function Mt(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:At(e.level),message:Object(F.b)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: ".concat(Object(F.b)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}de().addBreadcrumb(t,{input:e.args,level:e.level})}function Ft(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;de().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;}function Bt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?de().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):de().addBreadcrumb({category:"fetch",data:Object(u.a)(Object(u.a)({},e.fetchData),{},{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function Rt(e){var t=Object(N.a)(),n=e.from,r=e.to,o=R(t.location.href),i=R(n),a=R(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),de().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}Nt.__initStatic();var Pt,It=Object(N.a)();function Lt(){if(Pt)return Pt;if(ze(It.fetch))return Pt=It.fetch.bind(It);var e=It.document,t=It.fetch;if(e&&"function"===typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(rr){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",rr)}return Pt=t.bind(It)}var zt=Object(N.a)(),Ut=function(e){y(n,e);var t=x(n);function n(e){var r;return p(this,n),e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:at}],version:at},r=t.call(this,e),e.sendClientReports&&zt.document&&zt.document.addEventListener("visibilitychange",(function(){"hidden"===zt.document.visibilityState&&r._flushOutcomes()})),r}return v(n,[{key:"eventFromException",value:function(e,t){return function(e,t,n,r){var o=St(e,t,n&&n.syntheticException||void 0,r);return z(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),ee(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}},{key:"eventFromMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return Dt(this._options.stackParser,e,t,n,this._options.attachStacktrace)}},{key:"sendEvent",value:function(e,t){var r=this.getIntegrationById(Tt);r&&r.options&&r.options.sentry&&de().addBreadcrumb({category:"sentry.".concat("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:I(e)},{event:e}),it(g(n.prototype),"sendEvent",this).call(this,e,t)}},{key:"_prepareEvent",value:function(e,t,r){return e.platform=e.platform||"javascript",it(g(n.prototype),"_prepareEvent",this).call(this,e,t,r)}},{key:"_flushOutcomes",value:function(){var e=this._clearOutcomes();if(0!==e.length)if(this._dsn){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.log("Sending outcomes:",e);var t,n,r,o=Re(this._dsn,this._options.tunnel),i=(t=e,st((n=this._options.tunnel&&Te(this._dsn))?{dsn:n}:{},[[{type:"client_report"},{timestamp:r||Object($.a)(),discarded_events:t}]]));try{!function(e,t){"[object Navigator]"===Object.prototype.toString.call(It&&It.navigator)&&"function"===typeof It.navigator.sendBeacon?It.navigator.sendBeacon.bind(It.navigator)(e,t):Le()&&Lt()(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error(e)}))}(o,ft(i))}catch(rr){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error(rr)}}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.log("No dsn provided, will not send outcomes");else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.log("No outcomes to send")}}]),n}(bt),Vt=0;function $t(){return Vt>0}function Ht(){Vt+=1,setTimeout((function(){Vt-=1}))}function qt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("function"!==typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(Object(M.f)(e))return e}catch(rr){return e}var o=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var o=r.map((function(e){return qt(e,t)}));return e.apply(this,o)}catch(i){throw Ht(),ye((function(e){e.addEventProcessor((function(e){return t.mechanism&&(L(e,void 0,void 0),z(e,t.mechanism)),e.extra=Object(u.a)(Object(u.a)({},e.extra),{},{arguments:r}),e})),me(i)})),i}};try{for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=e[i])}catch(s){}Object(M.g)(o,e),Object(M.a)(e,"__sentry_wrapped__",o);try{var a=Object.getOwnPropertyDescriptor(o,"name");a.configurable&&Object.defineProperty(o,"name",{get:function(){return e.name}})}catch(s){}return o}var Wt="?";function Kt(e,t,n,r){var o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var Gt=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yt=/\((\S*)(?::(\d+))(?::(\d+))\)/,Jt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Qt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Xt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Zt=[[30,function(e){var t=Gt.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=Yt.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}var r=tn(t[1]||Wt,t[2]),o=Object(Se.a)(r,2),i=o[0];return Kt(o[1],i,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,function(e){var t=Jt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Qt.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],o=t[1]||Wt,i=tn(o,r),a=Object(Se.a)(i,2);return o=a[0],Kt(r=a[1],o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,function(e){var t=Xt.exec(e);return t?Kt(t[2],t[1]||Wt,+t[3],t[4]?+t[4]:void 0):void 0}]],en=Ie.a.apply(void 0,Zt),tn=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Wt,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},nn=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],rn=function(){function e(t){p(this,e),e.prototype.__init.call(this),this._options=Object(u.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return v(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){var e=Object(N.a)();this._options.setTimeout&&Object(M.e)(e,"setTimeout",on),this._options.setInterval&&Object(M.e)(e,"setInterval",on),this._options.requestAnimationFrame&&Object(M.e)(e,"requestAnimationFrame",an),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Object(M.e)(XMLHttpRequest.prototype,"send",sn);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:nn).forEach(un)}}],[{key:"__initStatic",value:function(){this.id="TryCatch"}}]),e}();function on(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];return n[0]=qt(o,{mechanism:{data:{function:Object(Ie.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,n)}}function an(e){return function(t){return e.apply(this,[qt(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(Ie.b)(e)},handled:!0,type:"instrument"}})])}}function sn(e){return function(){var t=this,n=["onload","onerror","onprogress","onreadystatechange"];n.forEach((function(e){e in t&&"function"===typeof t[e]&&Object(M.e)(t,e,(function(t){var n={mechanism:{data:{function:e,handler:Object(Ie.b)(t)},handled:!0,type:"instrument"}},r=Object(M.f)(t);return r&&(n.mechanism.data.handler=Object(Ie.b)(r)),qt(t,n)}))}));for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(this,o)}}function un(e){var t=Object(N.a)(),n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(M.e)(n,"addEventListener",(function(t){return function(n,r,o){try{"function"===typeof r.handleEvent&&(r.handleEvent=qt(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(Ie.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(i){}return t.apply(this,[n,qt(r,{mechanism:{data:{function:"addEventListener",handler:Object(Ie.b)(r),target:e},handled:!0,type:"instrument"}}),o])}})),Object(M.e)(n,"removeEventListener",(function(e){return function(t,n,r){var o=n;try{var i=o&&o.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(rr){}return e.call(this,t,o,r)}})))}rn.__initStatic();var cn=function(){function e(t){p(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),this._options=Object(u.a)({onerror:!0,onunhandledrejection:!0},t)}return v(e,[{key:"__init",value:function(){this.name=e.id}},{key:"__init2",value:function(){this._installFunc={onerror:ln,onunhandledrejection:fn}}},{key:"setupOnce",value:function(){Error.stackTraceLimit=50;var e,t=this._options;for(var n in t){var r=this._installFunc[n];r&&t[n]&&(e=n,("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.log("Global Handler attached: ".concat(e)),r(),this._installFunc[n]=void 0)}}}],[{key:"__initStatic",value:function(){this.id="GlobalHandlers"}}]),e}();function ln(){Ke("error",(function(e){var t=hn(),n=Object(Se.a)(t,3),r=n[0],o=n[1],i=n[2];if(r.getIntegration(cn)){var a=e.msg,s=e.url,u=e.line,c=e.column,l=e.error;if(!($t()||l&&l.__sentry_own_request__)){var f=void 0===l&&Object(Z.l)(a)?function(e,t,n,r){var o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Object(Z.e)(e)?e.message:e,a="Error",s=i.match(o);s&&(a=s[1],i=s[2]);return dn({exception:{values:[{type:a,value:i}]}},t,n,r)}(a,s,u,c):dn(St(o,l||a,void 0,i,!1),s,u,c);f.level="error",pn(r,l,f,"onerror")}}}))}function fn(){Ke("unhandledrejection",(function(e){var t=hn(),n=Object(Se.a)(t,3),r=n[0],o=n[1],i=n[2];if(r.getIntegration(cn)){var a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch(u){}if($t()||a&&a.__sentry_own_request__)return!0;var s=Object(Z.j)(a)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(a))}]}}:St(o,a,void 0,i,!0);s.level="error",pn(r,a,s,"onunhandledrejection")}}))}function dn(e,t,n,r){var o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},u=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,f=Object(Z.l)(t)&&t.length>0?t:Object(_t.a)();return 0===u.length&&u.push({colno:c,filename:f,function:"?",in_app:!0,lineno:l}),e}function pn(e,t,n,r){z(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function hn(){var e=de(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:function(){return[]},attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}cn.__initStatic();var vn="cause",mn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),e.prototype.__init.call(this),this._key=t.key||vn,this._limit=t.limit||5}return v(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){var t=de().getClient();t&&se((function(n,r){var o=de().getIntegration(e);return o?function(e,t,n,r,o){if(!r.exception||!r.exception.values||!o||!Object(Z.g)(o.originalException,Error))return r;var i=yn(e,n,o.originalException,t);return r.exception.values=[].concat(Object(Q.a)(i),Object(Q.a)(r.exception.values)),r}(t.getOptions().stackParser,o._key,o._limit,n,r):n}))}}],[{key:"__initStatic",value:function(){this.id="LinkedErrors"}}]),e}();function yn(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(!Object(Z.g)(n[r],Error)||o.length+1>=t)return o;var i=kt(e,n[r]);return yn(e,t,n[r],r,[i].concat(Object(Q.a)(o)))}mn.__initStatic();var gn=function(){function e(){p(this,e),e.prototype.__init.call(this)}return v(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(t,n){var r=function(t){var r=n().getIntegration(e);if(r){try{if(function(e,t){if(!t)return!1;if(function(e,t){var n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!kn(e,t))return!1;if(!bn(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){var n=wn(t),r=wn(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!kn(e,t))return!1;if(!bn(e,t))return!1;return!0}(e,t))return!0;return!1}(t,r._previousEvent))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){return r._previousEvent=t}return r._previousEvent=t}return t};r.id=this.name,t(r)}}],[{key:"__initStatic",value:function(){this.id="Dedupe"}}]),e}();function bn(e,t){var n=xn(e),r=xn(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++){var i=r[o],a=n[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function kn(e,t){var n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(o){return!1}}function wn(e){return e.exception&&e.exception.values&&e.exception.values[0]}function xn(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}gn.__initStatic();var En=Object(N.a)(),On=function(){function e(){p(this,e),e.prototype.__init.call(this)}return v(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){se((function(t){if(de().getIntegration(e)){if(!En.navigator&&!En.location&&!En.document)return t;var n=t.request&&t.request.url||En.location&&En.location.href,r=(En.document||{}).referrer,o=(En.navigator||{}).userAgent,i=Object(u.a)(Object(u.a)(Object(u.a)({},t.request&&t.request.headers),r&&{Referer:r}),o&&{"User-Agent":o}),a=Object(u.a)(Object(u.a)({},n&&{url:n}),{},{headers:i});return Object(u.a)(Object(u.a)({},t),{},{request:a})}return t}))}}],[{key:"__initStatic",value:function(){this.id="HttpContext"}}]),e}();function Dn(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return te(new je("Not adding Promise due to buffer limit reached."));var o=r();return-1===t.indexOf(o)&&t.push(o),o.then((function(){return n(o)})).then(null,(function(){return n(o).then(null,(function(){}))})),o},drain:function(e){return new ne((function(n,r){var o=t.length;if(!o)return n(!0);var i=setTimeout((function(){e&&e>0&&n(!1)}),e);t.forEach((function(e){ee(e).then((function(){--o||(clearTimeout(i),n(!0))}),r)}))}))}}}On.__initStatic();function Sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),n=parseInt("".concat(e),10);if(!isNaN(n))return 1e3*n;var r=Date.parse("".concat(e));return isNaN(r)?6e4:r-t}function Cn(e,t){return e[t]||e.all||0}function _n(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return Cn(e,t)>n}function jn(e,t){var n=t.statusCode,r=t.headers,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now(),i=Object(u.a)({},e),a=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(a){var c,l=Object(Ve.a)(a.trim().split(","));try{for(l.s();!(c=l.n()).done;){var f=c.value,d=f.split(":",2),p=Object(Se.a)(d,2),h=p[0],v=p[1],m=parseInt(h,10),y=1e3*(isNaN(m)?60:m);if(v){var g,b=Object(Ve.a)(v.split(";"));try{for(b.s();!(g=b.n()).done;){var k=g.value;i[k]=o+y}}catch(w){b.e(w)}finally{b.f()}}else i.all=o+y}}catch(w){l.e(w)}finally{l.f()}}else s?i.all=o+Sn(s,o):429===n&&(i.all=o+6e4);return i}function An(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Dn(e.bufferSize||30),r={},o=function(e){return n.drain(e)};function i(o){var i=[];if(ct(o,(function(t,n){var o=ht(n);_n(r,o)?e.recordDroppedEvent("ratelimit_backoff",o):i.push(t)})),0===i.length)return ee();var a=st(o[0],i),s=function(t){ct(a,(function(n,r){e.recordDroppedEvent(t,ht(r))}))};return n.add((function(){return t({body:ft(a,e.textEncoder)}).then((function(e){void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Sentry responded with status code ".concat(e.statusCode," to sent event.")),r=jn(r,e)}),(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Failed while sending event:",e),s("network_error")}))})).then((function(e){return e}),(function(e){if(e instanceof je)return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Skipped sending event due to full buffer"),s("queue_overflow"),ee();throw e}))}return{send:i,flush:o}}function Tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lt();function n(n){var r=Object(u.a)({body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers},e.fetchOptions);return t(e.url,r).then((function(e){return{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}}))}return An(e,n)}function Nn(e){return An(e,(function(t){return new ne((function(n,r){var o=new XMLHttpRequest;for(var i in o.onerror=r,o.onreadystatechange=function(){4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&o.setRequestHeader(i,e.headers[i]);o.send(t.body)}))}))}var Mn=[new r.InboundFilters,new r.FunctionToString,new rn,new Nt,new cn,new mn,new gn,new On];function Fn(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function Bn(){if("undefined"!==typeof Object(N.a)().document){var e=de();e.captureSession&&(Fn(e),Ke("history",(function(e){var t=e.from,n=e.to;void 0!==t&&t!==n&&Fn(de())})))}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")}n(24);var Rn={componentStack:null,error:null,eventId:null},Pn=function(e){y(n,e);var t=x(n);function n(){var e;p(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),n.prototype.__init.call(k(e)),n.prototype.__init2.call(k(e)),e}return v(n,[{key:"__init",value:function(){this.state=Rn}},{key:"componentDidCatch",value:function(e,t){var n=this,r=t.componentStack,i=this.props,a=i.beforeCapture,s=i.onError,c=i.showDialog,l=i.dialogOptions;ye((function(t){if(function(e){var t=e.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}(o.version)){var i=new Error(e.message);i.name="React ErrorBoundary ".concat(i.name),i.stack=r,e.cause=i}a&&a(t,e,r);var f=me(e,{contexts:{react:{componentStack:r}}});s&&s(e,r,f),c&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:de(),n=Object(N.a)();if(n.document){var r=t.getStackTop(),o=r.client,i=r.scope,a=e.dsn||o&&o.getDsn();if(a){i&&(e.user=Object(u.a)(Object(u.a)({},i.getUser()),e.user)),e.eventId||(e.eventId=t.lastEventId());var s=n.document.createElement("script");s.async=!0,s.src=Pe(a,e),e.onLoad&&(s.onload=e.onLoad);var c=n.document.head||n.document.body;c?c.appendChild(s):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Not injecting report dialog. No injection point found in HTML")}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("DSN not configured for showReportDialog call")}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.error("Global document not defined in showReportDialog call")}(Object(u.a)(Object(u.a)({},l),{},{eventId:f})),n.setState({error:e,componentStack:r,eventId:f})}))}},{key:"componentDidMount",value:function(){var e=this.props.onMount;e&&e()}},{key:"componentWillUnmount",value:function(){var e=this.state,t=e.error,n=e.componentStack,r=e.eventId,o=this.props.onUnmount;o&&o(t,n,r)}},{key:"__init2",value:function(){var e=this;this.resetErrorBoundary=function(){var t=e.props.onReset,n=e.state,r=n.error,o=n.componentStack,i=n.eventId;t&&t(r,o,i),e.setState(Rn)}}},{key:"render",value:function(){var e=this.props,t=e.fallback,n=e.children,r=this.state,i=r.error,a=r.componentStack,s=r.eventId;if(i){var u=void 0;return u="function"===typeof t?t({error:i,componentStack:a,resetError:this.resetErrorBoundary,eventId:s}):t,o.isValidElement(u)?u:(t&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&V.warn("fallback did not produce a valid ReactElement"),null)}return"function"===typeof n?n():n}}]),n}(o.Component);function In(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:at}],version:at},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=Mn),void 0===e.release){var t=Object(N.a)();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);var n=Object(u.a)(Object(u.a)({},e),{},{stackParser:Object(Ie.c)(e.stackParser||en),integrations:Oe(e),transport:e.transport||(Le()?Tn:Nn)});De(Ut,n),e.autoSessionTracking&&Bn()}(e)}function Ln(){return(Ln=d(l().mark((function e(t){var n,r,o,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=1,n.pagination&&n.pagination.page&&(o=n.pagination.page+1),e.next=5,r.comments.browse({page:o,postId:n.postId});case 5:return i=e.sent,e.abrupt("return",{comments:[].concat(Object(Q.a)(n.comments),Object(Q.a)(i.comments)),pagination:i.meta.pagination});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(){return(zn=d(l().mark((function e(t){var n,r,o,i,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=t.data,e.next=3,r.comments.add({comment:o});case 3:return i=e.sent,o=i.comments[0],a=Object(u.a)(Object(u.a)({},o),{},{member:n.member,replies:[]}),e.abrupt("return",{comments:[a].concat(Object(Q.a)(n.comments))});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Un(){return(Un=d(l().mark((function e(t){var n,r,o,i,a,s,c;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=t.data,i=o.reply,a=o.parent,(s=i).parent_id=a.id,e.next=5,r.comments.add({comment:s});case 5:return c=e.sent,s=c.comments[0],s=Object(u.a)(Object(u.a)({},s),{},{member:n.member}),e.abrupt("return",{comments:n.comments.map((function(e){return e.id===a.id?Object(u.a)(Object(u.a)({},a),{},{replies:[].concat(Object(Q.a)(a.replies),[s])}):e}))});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vn(){return(Vn=d(l().mark((function e(t){var n,r,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.adminApi,o=t.data,e.next=3,r.hideComment(o.id);case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{status:"hidden"}):e}));return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{status:"hidden",replies:t}):Object(u.a)(Object(u.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $n(){return($n=d(l().mark((function e(t){var n,r,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.adminApi,o=t.data,e.next=3,r.showComment(o.id);case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{status:"published"}):e}));return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{status:"published",replies:t}):Object(u.a)(Object(u.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hn(){return(Hn=d(l().mark((function e(t){var n,r,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=t.data,e.next=3,r.comments.like({comment:o});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{liked:!0,likes_count:e.likes_count+1}):e}));return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{liked:!0,likes_count:e.likes_count+1,replies:t}):Object(u.a)(Object(u.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qn(){return(qn=d(l().mark((function e(t){var n,r,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=t.data,e.next=3,r.comments.unlike({comment:o});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{liked:!1,likes_count:e.likes_count-1}):e}));return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{liked:!1,likes_count:e.likes_count-1,replies:t}):Object(u.a)(Object(u.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wn(){return(Wn=d(l().mark((function e(t){var n,r,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=t.data,e.next=3,r.comments.edit({comment:{id:o.id,status:"deleted"}});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{status:"deleted"}):e}));return e.id===o.id?Object(u.a)(Object(u.a)({},e),{},{status:"deleted",replies:t}):Object(u.a)(Object(u.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Kn(){return(Kn=d(l().mark((function e(t){var n,r,o,i,a,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=t.data,i=o.comment,a=o.parent,e.next=3,r.comments.edit({comment:i});case 3:return s=e.sent,i=s.comments[0],e.abrupt("return",{comments:n.comments.map((function(e){return a&&a.id===e.id?Object(u.a)(Object(u.a)({},e),{},{replies:e.replies.map((function(e){return e.id===i.id?i:e}))}):e.id===i.id?i:e}))});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Gn={addComment:function(e){return zn.apply(this,arguments)},editComment:function(e){return Kn.apply(this,arguments)},hideComment:function(e){return Vn.apply(this,arguments)},deleteComment:function(e){return Wn.apply(this,arguments)},showComment:function(e){return $n.apply(this,arguments)},likeComment:function(e){return Hn.apply(this,arguments)},unlikeComment:function(e){return qn.apply(this,arguments)},addReply:function(e){return Un.apply(this,arguments)},loadMoreComments:function(e){return Ln.apply(this,arguments)}};function Yn(e){return Jn.apply(this,arguments)}function Jn(){return(Jn=d(l().mark((function e(t){var n,r,o,i,a,s;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.action,r=t.data,o=t.state,i=t.api,a=t.adminApi,!(s=Gn[n])){e.next=9;break}return e.next=5,s({data:r,state:o,api:i,adminApi:a});case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:return e.abrupt("return",e.t0);case 9:return e.abrupt("return",{});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Qn=n(1).createContext({site:{},member:{},action:"",brandColor:"",pageData:{},onAction:function(e,t){return{action:e,data:t}}}),Xn={dev:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.customSiteUrl;return!1},test:function(){return!1}},Zn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.some((function(e){var n=Xn[e];return!(!n||!n(t))}))};var er=function(e){var t=e.siteUrl,n=void 0===t?window.location.origin:t,r=e.apiUrl,o=e.apiKey;function i(e){var t=e.type,r=e.resource,o=e.params,i=void 0===o?"":o;if("members"===t)return"".concat(n.replace(/\/$/,""),"/").concat("members/api","/").concat(r,"/").concat(i)}function a(e){var t=e.url,n=e.method,r=void 0===n?"GET":n,o=e.headers,i=void 0===o?{}:o,a=e.credentials,s=void 0===a?void 0:a,u=e.body;return fetch(t,{method:r,headers:i,credentials:s,body:void 0===u?void 0:u})}var s={};s.site={settings:function(){return a({url:function(e){var t=e.resource,n=e.params,i=void 0===n?"":n;return r&&o?"".concat(r.replace(/\/$/,""),"/").concat(t,"/?key=").concat(o,"&limit=all").concat(i):""}({resource:"settings"}),method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch site data")}))}},s.member={identity:function(){return a({url:i({type:"members",resource:"session"}),credentials:"same-origin"}).then((function(e){return e.ok&&204!==e.status?e.text():null}))},sessionData:function(){return a({url:i({type:"members",resource:"member"}),credentials:"same-origin"}).then((function(e){return e.ok&&204!==e.status?e.json():null}))}};var c=null;return s.comments={browse:function(e){var t,n=e.page,r=e.postId;c=null!==(t=c)&&void 0!==t?t:(new Date).toISOString();var o=encodeURIComponent("post_id:".concat(r,"+created_at:<=").concat(c)),s=encodeURIComponent("created_at DESC");return a({url:i({type:"members",resource:"comments",params:"?limit=5&include=member&order=".concat(s,"&filter=").concat(o,"&page=").concat(n)}),method:"GET",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch comments")}))},add:function(e){var t={comments:[e.comment]};return a({url:i({type:"members",resource:"comments"}),method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to add comment")}))},edit:function(e){var t=e.comment,n={comments:[t]};return a({url:i({type:"members",resource:"comments/".concat(t.id)}),method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to edit comment")}))},like:function(e){var t=e.comment,n={comments:[t]};return a({url:i({type:"members",resource:"comments/".concat(t.id,"/like")}),method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to like comment")}))},unlike:function(e){var t=e.comment,n={comments:[t]};return a({url:i({type:"members",resource:"comments/".concat(t.id,"/like")}),method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to unlike comment")}))}},s.init=d(l().mark((function e(){var t,n,r,o,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([s.member.sessionData()]);case 2:return t=e.sent,n=Object(Se.a)(t,1),r=n[0],o={},i={},e.prev=7,e.next=10,s.site.settings();case 10:i=e.sent,o=Object(u.a)({},i),e.next=16;break;case 14:e.prev=14,e.t0=e.catch(7);case 16:return o=S({site:o}),e.abrupt("return",{site:o,member:r});case 18:case"end":return e.stop()}}),e,null,[[7,14]])}))),s},tr=function(e){var t=Object(o.useContext)(Qn).accentColor,n={background:t},r={color:t};return Object(j.jsxs)("section",{className:"text-center mb-1 bg-neutral-900 rounded-lg pt-12 pb-10 px-8",style:n,children:[Object(j.jsx)("h1",{className:"text-center text-white text-[28px] font-sans font-semibold mb-6 tracking-tight",children:"Want to join the discussion?"}),Object(j.jsx)("a",{className:"bg-white font-sans py-3 px-4 mb-6 rounded inline-block font-medium",style:r,href:"#/portal/signup",children:"Subscribe now"}),Object(j.jsxs)("p",{className:"font-sans text-center text-white",children:[Object(j.jsx)("span",{className:"inline-block mr-1",children:"Already have an account?"}),Object(j.jsx)("a",{className:"text-white underline",href:"#/portal/signin",children:"Sign in"})]})]})};function nr(e,t){if(e in t){for(var n=t[e],r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,o):n}var a=new Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map((function(e){return'"'.concat(e,'"')})).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(a,nr),a}var rr,or,ir=["static"],ar=["unmount"],sr=["as","children","refName"],ur=((or=ur||{})[or.None=0]="None",or[or.RenderStrategy=1]="RenderStrategy",or[or.Static=2]="Static",or),cr=((rr=cr||{})[rr.Unmount=0]="Unmount",rr[rr.Hidden=1]="Hidden",rr);function lr(e){var t=e.ourProps,n=e.theirProps,r=e.slot,o=e.defaultTag,i=e.features,a=e.visible,s=void 0===a||a,c=e.name,l=dr(n,t);if(s)return fr(l,r,o,c);var f=null!=i?i:0;if(2&f){var d=l.static,p=void 0!==d&&d,h=E(l,ir);if(p)return fr(h,r,o,c)}if(1&f){var v,m=l.unmount,y=void 0===m||m,g=E(l,ar);return nr(y?0:1,(v={},Object(X.a)(v,0,(function(){return null})),Object(X.a)(v,1,(function(){return fr(Object(u.a)(Object(u.a)({},g),{},{hidden:!0,style:{display:"none"}}),r,o,c)})),v))}return fr(l,r,o,c)}function fr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=vr(e,["unmount","static"]),a=i.as,s=void 0===a?n:a,u=i.children,c=i.refName,l=void 0===c?"ref":c,f=E(i,sr),d=void 0!==e.ref?Object(X.a)({},l,e.ref):{},p="function"==typeof u?u(t):u;f.className&&"function"==typeof f.className&&(f.className=f.className(t));var h={};if(s===o.Fragment&&Object.keys(hr(f)).length>0){if(!Object(o.isValidElement)(p)||Array.isArray(p)&&p.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <".concat(r,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(f).map((function(e){return" - ".concat(e)})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - ".concat(e)})).join("\n")].join("\n"));return Object(o.cloneElement)(p,Object.assign({},dr(p.props,hr(vr(f,["ref"]))),h,d))}return Object(o.createElement)(s,Object.assign({},vr(f,["ref"]),s!==o.Fragment&&d,s!==o.Fragment&&h),p)}function dr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];for(var r={},o={},i=0,a=t;i<a.length;i++){var s=a[i];for(var u in s)u.startsWith("on")&&"function"==typeof s[u]?(null!=o[u]||(o[u]=[]),o[u].push(s[u])):r[u]=s[u]}if(r.disabled||r["aria-disabled"])return Object.assign(r,Object.fromEntries(Object.keys(o).map((function(e){return[e,void 0]}))));var c=function(e){Object.assign(r,Object(X.a)({},e,(function(t){for(var n=o[e],r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var s,u=Object(Ve.a)(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(t.defaultPrevented)return;c.apply(void 0,[t].concat(i))}}catch(l){u.e(l)}finally{u.f()}})))};for(var l in o)c(l);return r}function pr(e){var t;return Object.assign(Object(o.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function hr(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}function vr(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=Object(Ve.a)(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}var mr=Object(o.createContext)(null);mr.displayName="OpenClosedContext";var yr=function(e){return e[e.Open=0]="Open",e[e.Closed=1]="Closed",e}(yr||{});function gr(){return Object(o.useContext)(mr)}function br(e){var t=e.value,n=e.children;return i.a.createElement(mr.Provider,{value:t},n)}function kr(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}var wr,xr="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,Er={serverHandoffComplete:!1};function Or(){var e=Object(o.useState)(Er.serverHandoffComplete),t=Object(Se.a)(e,2),n=t[0],r=t[1];return Object(o.useEffect)((function(){!0!==n&&r(!0)}),[n]),Object(o.useEffect)((function(){!1===Er.serverHandoffComplete&&(Er.serverHandoffComplete=!0)}),[]),n}var Dr=0;function Sr(){return++Dr}var Cr=null!=(wr=i.a.useId)?wr:function(){var e=Or(),t=i.a.useState(e?Sr:null),n=Object(Se.a)(t,2),r=n[0],o=n[1];return xr((function(){null===r&&o(Sr())}),[r]),null!=r?""+r:void 0};function _r(){var e=Object(o.useRef)(!1);return xr((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function jr(e){var t=Object(o.useRef)(e);return xr((function(){t.current=e}),[e]),t}var Ar=function(e){var t=jr(e);return i.a.useCallback((function(){return t.current.apply(t,arguments)}),[t])},Tr=Symbol();function Nr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(o.useRef)(t);Object(o.useEffect)((function(){r.current=t}),[t]);var i=Ar((function(e){var t,n=Object(Ve.a)(r.current);try{for(n.s();!(t=n.n()).done;){var o=t.value;null!=o&&("function"==typeof o?o(e):o.current=e)}}catch(i){n.e(i)}finally{n.f()}}));return t.every((function(e){return null==e||(null==e?void 0:e[Tr])}))?void 0:i}function Mr(){var e=[],t=[],n={enqueue:function(e){t.push(e)},addEventListener:function(e,t,r,o){return e.addEventListener(t,r,o),n.add((function(){return e.removeEventListener(t,r,o)}))},requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);return n.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.requestAnimationFrame((function(){return n.requestAnimationFrame.apply(n,t)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);return n.add((function(){return clearTimeout(e)}))})),add:function(t){return e.push(t),function(){var n=e.indexOf(t);if(n>=0){var r=e.splice(n,1);(0,Object(Se.a)(r,1)[0])()}}},dispose:function(){var t,n=Object(Ve.a)(e.splice(0));try{for(n.s();!(t=n.n()).done;){(0,t.value)()}}catch(r){n.e(r)}finally{n.f()}},workQueue:function(){return d(l().mark((function e(){var n,r,o;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Object(Ve.a)(t.splice(0)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,o();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))()}};return n}function Fr(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function Br(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}var Rr=function(e){return e.Ended="ended",e.Cancelled="cancelled",e}(Rr||{});function Pr(e,t,n,r){var o=n?"enter":"leave",i=Mr(),a=void 0!==r?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(r):function(){},s=nr(o,{enter:function(){return t.enter},leave:function(){return t.leave}}),u=nr(o,{enter:function(){return t.enterTo},leave:function(){return t.leaveTo}}),c=nr(o,{enter:function(){return t.enterFrom},leave:function(){return t.leaveFrom}});return Br.apply(void 0,[e].concat(Object(Q.a)(t.enter),Object(Q.a)(t.enterTo),Object(Q.a)(t.enterFrom),Object(Q.a)(t.leave),Object(Q.a)(t.leaveFrom),Object(Q.a)(t.leaveTo),Object(Q.a)(t.entered))),Fr.apply(void 0,[e].concat(Object(Q.a)(s),Object(Q.a)(c))),i.nextFrame((function(){Br.apply(void 0,[e].concat(Object(Q.a)(c))),Fr.apply(void 0,[e].concat(Object(Q.a)(u))),function(e,t){var n=Mr();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e})),n=Object(Se.a)(t,1)[0];return void 0===n?0:n})),i=Object(Se.a)(o,2);if(i[0]+i[1]!==0){var a=[];a.push(n.addEventListener(e,"transitionrun",(function(r){r.target===r.currentTarget&&(a.splice(0).forEach((function(e){return e()})),a.push(n.addEventListener(e,"transitionend",(function(e){e.target===e.currentTarget&&(t("ended"),a.splice(0).forEach((function(e){return e()})))})),n.addEventListener(e,"transitioncancel",(function(e){e.target===e.currentTarget&&(t("cancelled"),a.splice(0).forEach((function(e){return e()})))}))))})))}else t("ended");n.add((function(){return t("cancelled")})),n.dispose}(e,(function(n){return"ended"===n&&(Br.apply(void 0,[e].concat(Object(Q.a)(s))),Fr.apply(void 0,[e].concat(Object(Q.a)(t.entered)))),a(n)}))})),i.dispose}function Ir(e){var t=e.container,n=e.direction,r=e.classes,i=e.events,a=e.onStart,s=e.onStop,u=_r(),c=function(){var e=Object(o.useState)(Mr),t=Object(Se.a)(e,1)[0];return Object(o.useEffect)((function(){return function(){return t.dispose()}}),[t]),t}(),l=jr(n),f=Ar((function(){return nr(l.current,{enter:function(){return i.current.beforeEnter()},leave:function(){return i.current.beforeLeave()},idle:function(){}})})),d=Ar((function(){return nr(l.current,{enter:function(){return i.current.afterEnter()},leave:function(){return i.current.afterLeave()},idle:function(){}})}));xr((function(){var e=Mr();c.add(e.dispose);var n=t.current;if(n&&"idle"!==l.current&&u.current)return e.dispose(),f(),a.current(l.current),e.add(Pr(n,r.current,"enter"===l.current,(function(t){var n;e.dispose(),nr(t,(n={},Object(X.a)(n,Rr.Ended,(function(){d(),s.current(l.current)})),Object(X.a)(n,Rr.Cancelled,(function(){})),n))}))),e.dispose}),[n])}var Lr=["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"],zr=["show","appear","unmount"];function Ur(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(" ").filter((function(e){return e.trim().length>1}))}var Vr=Object(o.createContext)(null);Vr.displayName="TransitionContext";var $r,Hr=(($r=Hr||{}).Visible="visible",$r.Hidden="hidden",$r);var qr=Object(o.createContext)(null);function Wr(e){return"children"in e?Wr(e.children):e.current.filter((function(e){return"visible"===e.state})).length>0}function Kr(e){var t=jr(e),n=Object(o.useRef)([]),r=_r(),i=Ar((function(e){var o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cr.Hidden,a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&(nr(i,(o={},Object(X.a)(o,cr.Unmount,(function(){n.current.splice(a,1)})),Object(X.a)(o,cr.Hidden,(function(){n.current[a].state="hidden"})),o)),kr((function(){var e;!Wr(n)&&r.current&&(null==(e=t.current)||e.call(t))})))})),a=Ar((function(e){var t=n.current.find((function(t){return t.id===e}));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({id:e,state:"visible"}),function(){return i(e,cr.Unmount)}}));return Object(o.useMemo)((function(){return{children:n,register:a,unregister:i}}),[a,i,n])}function Gr(){}qr.displayName="NestingContext";var Yr=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Jr(e){var t,n,r={},o=Object(Ve.a)(Yr);try{for(o.s();!(n=o.n()).done;){var i=n.value;r[i]=null!=(t=e[i])?t:Gr}}catch(a){o.e(a)}finally{o.f()}return r}var Qr=ur.RenderStrategy,Xr=pr((function(e,t){var n,r=e.beforeEnter,a=e.afterEnter,s=e.beforeLeave,u=e.afterLeave,c=e.enter,l=e.enterFrom,f=e.enterTo,d=e.entered,p=e.leave,h=e.leaveFrom,v=e.leaveTo,m=E(e,Lr),y=Object(o.useRef)(null),g=Nr(y,t),b=Object(o.useState)("visible"),k=Object(Se.a)(b,2),w=k[0],x=k[1],O=m.unmount?cr.Unmount:cr.Hidden,D=function(){var e=Object(o.useContext)(Vr);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),S=D.show,C=D.appear,_=D.initial,j=function(){var e=Object(o.useContext)(qr);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),A=j.register,T=j.unregister,N=Object(o.useRef)(null),M=Cr();Object(o.useEffect)((function(){if(M)return A(M)}),[A,M]),Object(o.useEffect)((function(){if(O===cr.Hidden&&M){var e;if(S&&"visible"!==w)return void x("visible");nr(w,(e={},Object(X.a)(e,"hidden",(function(){return T(M)})),Object(X.a)(e,"visible",(function(){return A(M)})),e))}}),[w,M,A,T,S,O]);var F=jr({enter:Ur(c),enterFrom:Ur(l),enterTo:Ur(f),entered:Ur(d),leave:Ur(p),leaveFrom:Ur(h),leaveTo:Ur(v)}),B=function(e){var t=Object(o.useRef)(Jr(e));return Object(o.useEffect)((function(){t.current=Jr(e)}),[e]),t}({beforeEnter:r,afterEnter:a,beforeLeave:s,afterLeave:u}),R=Or();Object(o.useEffect)((function(){if(R&&"visible"===w&&null===y.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[y,w,R]);var P=_&&!C,I=!R||P||N.current===S?"idle":S?"enter":"leave",L=Object(o.useRef)(!1),z=Kr((function(){L.current||(x("hidden"),T(M))}));Ir({container:y,classes:F,events:B,direction:I,onStart:jr((function(){L.current=!0})),onStop:jr((function(e){L.current=!1,"leave"===e&&!Wr(z)&&(x("hidden"),T(M))}))}),Object(o.useEffect)((function(){!P||(O===cr.Hidden?N.current=null:N.current=S)}),[S,P,w]);var U=m,V={ref:g};return i.a.createElement(qr.Provider,{value:z},i.a.createElement(br,{value:nr(w,(n={},Object(X.a)(n,"visible",yr.Open),Object(X.a)(n,"hidden",yr.Closed),n))},lr({ourProps:V,theirProps:U,defaultTag:"div",features:Qr,visible:"visible"===w,name:"Transition.Child"})))})),Zr=pr((function(e,t){var n,r=e.show,a=e.appear,s=void 0!==a&&a,c=e.unmount,l=E(e,zr),f=Object(o.useRef)(null),d=Nr(f,t);Or();var p=gr();if(void 0===r&&null!==p&&(r=nr(p,(n={},Object(X.a)(n,yr.Open,!0),Object(X.a)(n,yr.Closed,!1),n))),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var h=Object(o.useState)(r?"visible":"hidden"),v=Object(Se.a)(h,2),m=v[0],y=v[1],g=Kr((function(){y("hidden")})),b=Object(o.useState)(!0),k=Object(Se.a)(b,2),w=k[0],x=k[1],O=Object(o.useRef)([r]);xr((function(){!1!==w&&O.current[O.current.length-1]!==r&&(O.current.push(r),x(!1))}),[O,r]);var D=Object(o.useMemo)((function(){return{show:r,appear:s,initial:w}}),[r,s,w]);Object(o.useEffect)((function(){if(r)y("visible");else if(Wr(g)){var e=f.current;if(!e)return;var t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&y("hidden")}else y("hidden")}),[r,g]);var S={unmount:c};return i.a.createElement(qr.Provider,{value:g},i.a.createElement(Vr.Provider,{value:D},lr({ourProps:Object(u.a)(Object(u.a)({},S),{},{as:o.Fragment,children:i.a.createElement(Xr,Object(u.a)(Object(u.a)({ref:d},S),l))}),theirProps:{},defaultTag:o.Fragment,features:Qr,visible:"visible"===m,name:"Transition"})))})),eo=pr((function(e,t){var n=null!==Object(o.useContext)(Vr),r=null!==gr();return i.a.createElement(i.a.Fragment,null,!n&&r?i.a.createElement(Zr,Object(u.a)({ref:t},e)):i.a.createElement(Xr,Object(u.a)({ref:t},e)))})),to=Object.assign(Zr,{Child:eo,Root:Zr}),no=function(e){y(n,e);var t=x(n);function n(){return p(this,n),t.apply(this,arguments)}return v(n,[{key:"getHashOfString",value:function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return t=Math.abs(t)}},{key:"normalizeHash",value:function(e,t,n){return Math.floor(e%(n-t)+t)}},{key:"generateHSL",value:function(){var e=this.props.comment?this.props.comment.member:this.context.member;if(!e||!e.name)return[0,0,10];var t=isNaN(this.props.saturation)?50:this.props.saturation,n=[0,360],r=Math.round(t/(100/30))+30,o=[r-20,r],i=this.getHashOfString(e.name);return[this.normalizeHash(i,n[0],n[1]),t,this.normalizeHash(i,o[0],o[1])]}},{key:"HSLtoString",value:function(e){return"hsl(".concat(e[0],", ").concat(e[1],"%, ").concat(e[2],"%)")}},{key:"getInitials",value:function(){var e=this.props.comment?this.props.comment.member:this.context.member;return e&&e.name?_(e.name):_("Anonymous")}},{key:"render",value:function(){var e="small"===this.props.size?"w-8 h-8":"w-11 h-11",t="small"===this.props.size?"text-sm":"text-lg",n=this.props.comment?this.props.comment.member:this.context.member,r={background:this.HSLtoString(this.generateHSL())};return Object(j.jsxs)("figure",{className:"relative ".concat(e),children:[Object(j.jsx)("div",{className:"flex justify-center items-center rounded-full ".concat(e),style:r,children:Object(j.jsx)("p",{className:"text-white font-sans font-semibold ".concat(t),children:this.getInitials()})}),Object(j.jsx)("img",{className:"absolute top-0 left-0 rounded-full ".concat(e),src:n.avatar_image,alt:"Avatar"})]})}}]),n}(i.a.Component);no.contextType=Qn;var ro=no;function oo(e){this.content=e}oo.prototype={constructor:oo,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-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new oo(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new oo(n)},addToStart:function(e,t){return new oo([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new oo(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new oo(o)},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=oo.from(e)).size?new oo(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=oo.from(e)).size?new oo(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=oo.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},oo.from=function(e){if(e instanceof oo)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new oo(t)};var io=oo;function ao(e,t,n){for(var r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;var o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=ao(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function so(e,t,n,r){for(var o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=e.child(--o),s=t.child(--i),u=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var c=0,l=Math.min(a.text.length,s.text.length);c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){var f=so(a.content,s.content,n-1,r-1);if(f)return f}n-=u,r-=u}else n-=u,r-=u}}var uo=function(){function e(t,n){if(p(this,e),this.content=t,this.size=n||0,null==n)for(var r=0;r<t.length;r++)this.size+=t[r].nodeSize}return v(e,[{key:"nodesBetween",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=0,a=0;a<t;i++){var s=this.content[i],u=a+s.nodeSize;if(u>e&&!1!==n(s,r+a,o||null,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=u}}},{key:"descendants",value:function(e){this.nodesBetween(0,this.size,e)}},{key:"textBetween",value:function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf?(r?o+="function"===typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new e(o,this.size+t.size)}},{key:"cut",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==t&&n==this.size)return this;var r=[],o=0;if(n>t)for(var i=0,a=0;a<n;i++){var s=this.content[i],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s=s.isText?s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=u}return new e(r,o)}},{key:"cutByIndex",value:function(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}},{key:"replaceChild",value:function(t,n){var r=this.content[t];if(r==n)return this;var o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}},{key:"addToStart",value:function(t){return new e([t].concat(this.content),this.size+t.nodeSize)}},{key:"addToEnd",value:function(t){return new e(this.content.concat(t),this.size+t.nodeSize)}},{key:"eq",value:function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}},{key:"maybeChild",value:function(e){return this.content[e]||null}},{key:"forEach",value:function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}}},{key:"findDiffStart",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ao(this,e,t)}},{key:"findDiffEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size;return so(this,e,t,n)}},{key:"findIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==e)return lo(0,e);if(e==this.size)return lo(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position ".concat(e," outside of fragment (").concat(this,")"));for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e||t>0?lo(n+1,i):lo(n,r);r=i}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}},{key:"fromArray",value:function(t){if(!t.length)return e.empty;for(var n,r=0,o=0;o<t.length;o++){var i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}},{key:"from",value:function(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 new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),e}();uo.empty=new uo([],0);var co={index:0,offset:0};function lo(e,t){return co.index=e,co.offset=t,co}function fo(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!fo(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!fo(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}var po=function(){function e(t,n){p(this,e),this.type=t,this.attrs=n}return v(e,[{key:"addToSet",value:function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){return this==e||this.type==e.type&&fo(this.attrs,e.attrs)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type ".concat(t.type," in this schema"));return n.create(t.attrs)}},{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];var n=t.slice();return n.sort((function(e,t){return e.type.rank-t.type.rank})),n}}]),e}();po.none=[];var ho=function(e){y(n,e);var t=x(n);function n(){return p(this,n),t.apply(this,arguments)}return v(n)}(_e(Error)),vo=function(){function e(t,n,r){p(this,e),this.content=t,this.openStart=n,this.openEnd=r}return v(e,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(t,n){var r=yo(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(t,n){return new e(mo(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;var r=n.openStart||0,o=n.openEnd||0;if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new e(uo.fromJSON(t,n.content),r,o)}},{key:"maxOpen",value:function(t){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(var a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}}]),e}();function mo(e,t,n){var r=e.findIndex(t),o=r.index,i=r.offset,a=e.maybeChild(o),s=e.findIndex(n),u=s.index,c=s.offset;if(i==t||a.isText){if(c!=n&&!e.child(u).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(o!=u)throw new RangeError("Removing non-flat range");return e.replaceChild(o,a.copy(mo(a.content,t-i-1,n-i-1)))}function yo(e,t,n,r){var o=e.findIndex(t),i=o.index,a=o.offset,s=e.maybeChild(i);if(a==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));var u=yo(s.content,t-a-1,n);return u&&e.replaceChild(i,s.copy(u))}function go(e,t,n){if(n.openStart>e.depth)throw new ho("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ho("Inconsistent open depths");return bo(e,t,n,0)}function bo(e,t,n,r){var o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){var a=bo(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){var s=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(uo.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return Oo(i,Do(e,s.start,s.end,t,r))}var u=e.parent,c=u.content;return Oo(u,c.cut(0,e.parentOffset).append(n.content).append(c.cut(t.parentOffset)))}return Oo(i,So(e,t,r))}function ko(e,t){if(!t.type.compatibleContent(e.type))throw new ho("Cannot join "+t.type.name+" onto "+e.type.name)}function wo(e,t,n){var r=e.node(n);return ko(r,t.node(n)),r}function xo(e,t){var 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 Eo(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(xo(e.nodeAfter,r),i++));for(var s=i;s<a;s++)xo(o.child(s),r);t&&t.depth==n&&t.textOffset&&xo(t.nodeBefore,r)}function Oo(e,t){if(!e.type.validContent(t))throw new ho("Invalid content for node "+e.type.name);return e.copy(t)}function Do(e,t,n,r,o){var i=e.depth>o&&wo(e,t,o+1),a=r.depth>o&&wo(n,r,o+1),s=[];return Eo(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(ko(i,a),xo(Oo(i,Do(e,t,n,r,o+1)),s)):(i&&xo(Oo(i,So(e,t,o+1)),s),Eo(t,n,o,s),a&&xo(Oo(a,So(n,r,o+1)),s)),Eo(r,null,o,s),new uo(s)}function So(e,t,n){var r=[];(Eo(null,e,n,r),e.depth>n)&&xo(Oo(wo(e,t,n+1),So(e,t,n+1)),r);return Eo(t,null,n,r),new uo(r)}vo.empty=new vo(uo.empty,0,0);var Co=function(){function e(t,n,r){p(this,e),this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}return v(e,[{key:"resolveDepth",value:function(e){return null==e?this.depth:e<0?this.depth+e:e}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(e){return this.path[3*this.resolveDepth(e)]}},{key:"index",value:function(e){return this.path[3*this.resolveDepth(e)+1]}},{key:"indexAfter",value:function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}},{key:"start",value:function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}},{key:"end",value:function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}},{key:"before",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}},{key:"after",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}},{key:"nodeBefore",get:function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}},{key:"posAtIndex",value:function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r}},{key:"marks",value:function(){var e=this.parent,t=this.index();if(0==e.content.size)return po.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}},{key:"marksAcross",value:function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}},{key:"sharedDepth",value:function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}},{key:"blockRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,t=arguments.length>1?arguments[1]:void 0;if(e.pos<this.pos)return e.blockRange(this);for(var 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 To(this,e,n);return null}},{key:"sameParent",value:function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}},{key:"max",value:function(e){return e.pos>this.pos?e:this}},{key:"min",value:function(e){return e.pos<this.pos?e:this}},{key:"toString",value:function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}}],[{key:"resolve",value:function(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],o=0,i=n,a=t;;){var s=a.content.findIndex(i),u=s.index,c=s.offset,l=i-c;if(r.push(a,u,o+c),!l)break;if((a=a.child(u)).isText)break;i=l-1,o+=c+1}return new e(n,r,i)}},{key:"resolveCached",value:function(t,n){for(var r=0;r<_o.length;r++){var o=_o[r];if(o.pos==n&&o.doc==t)return o}var i=_o[jo]=e.resolve(t,n);return jo=(jo+1)%Ao,i}}]),e}(),_o=[],jo=0,Ao=12,To=function(){function e(t,n,r){p(this,e),this.$from=t,this.$to=n,this.depth=r}return v(e,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),e}(),No=Object.create(null),Mo=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:po.none;p(this,e),this.type=t,this.attrs=n,this.marks=o,this.content=r||uo.empty}return v(e,[{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(e){return this.content.child(e)}},{key:"maybeChild",value:function(e){return this.content.maybeChild(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"nodesBetween",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(e,t,n,r,this)}},{key:"descendants",value:function(e){this.nodesBetween(0,this.content.size,e)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(e,t,n,r){return this.content.textBetween(e,t,n,r)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(e,t,n){return this.type==e&&fo(this.attrs,t||e.defaultAttrs||No)&&po.sameSet(this.marks,n||po.none)}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}},{key:"mark",value:function(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}},{key:"cut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e==t)return vo.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i),u=s.content.cut(r.pos-a,o.pos-a);return new vo(u,r.depth-i,o.depth-i)}},{key:"replace",value:function(e,t,n){return go(this.resolve(e),this.resolve(t),n)}},{key:"nodeAt",value:function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}}},{key:"childAfter",value:function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}},{key:"resolve",value:function(e){return Co.resolveCached(this,e)}},{key:"resolveNoCache",value:function(e){return Co.resolve(this,e)}},{key:"rangeHasMark",value:function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Bo(this.marks,e)}},{key:"contentMatchAt",value:function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}},{key:"canReplace",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:uo.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,i=this.contentMatchAt(e).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var s=r;s<o;s++)if(!this.type.allowsMarks(n.child(s).marks))return!1;return!0}},{key:"canReplaceWith",value:function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}},{key:"canAppend",value:function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}},{key:"check",value:function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node ".concat(this.type.name,": ").concat(this.content.toString().slice(0,50)));for(var e=po.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!po.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map((function(e){return e.type.name}))));this.content.forEach((function(e){return e.check()}))}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var 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((function(e){return e.toJSON()}))),e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=uo.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}]),e}();Mo.prototype.text=void 0;var Fo=function(e){y(n,e);var t=x(n);function n(e,r,o,i){var a;if(p(this,n),a=t.call(this,e,r,null,i),!o)throw new RangeError("Empty text nodes are not allowed");return a.text=o,a}return v(n,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Bo(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(e,t){return this.text.slice(e,t)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}},{key:"withText",value:function(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}},{key:"cut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}},{key:"eq",value:function(e){return this.sameMarkup(e)&&this.text==e.text}},{key:"toJSON",value:function(){var e=it(g(n.prototype),"toJSON",this).call(this);return e.text=this.text,e}}]),n}(Mo);function Bo(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var Ro=function(){function e(t){p(this,e),this.validEnd=t,this.next=[],this.wrapCache=[]}return v(e,[{key:"matchType",value:function(e){for(var t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}},{key:"matchFragment",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.childCount,r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}},{key:"inlineContent",get:function(){return this.next.length&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var e=0;e<this.next.length;e++){var t=this.next[e].type;if(!t.isText&&!t.hasRequiredAttrs())return t}return null}},{key:"compatible",value:function(e){for(var t=0;t<this.next.length;t++)for(var n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}},{key:"fillBefore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];function o(i,a){var s=i.matchFragment(e,n);if(s&&(!t||s.validEnd))return uo.from(a.map((function(e){return e.createAndFill()})));for(var u=0;u<i.next.length;u++){var c=i.next[u],l=c.type,f=c.next;if(!l.isText&&!l.hasRequiredAttrs()&&-1==r.indexOf(f)){r.push(f);var d=o(f,a.concat(l));if(d)return d}}return null}return o(this,[])}},{key:"findWrapping",value:function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}},{key:"computeWrapping",value:function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s++){var u=o.next[s],c=u.type,l=u.next;c.isLeaf||c.hasRequiredAttrs()||c.name in t||r.type&&!l.validEnd||(n.push({match:c.contentMatch,type:c,via:r}),t[c.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(e){if(e>=this.next.length)throw new RangeError("There's no ".concat(e,"th edge in this content match"));return this.next[e]}},{key:"toString",value:function(){var e=[];return function t(n){e.push(n);for(var r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}],[{key:"parse",value:function(t,n){var r=new Po(t,n);if(null==r.next)return e.empty;var o=Io(r);r.next&&r.err("Unexpected trailing text");var i=function(e){var t=Object.create(null);return n(Ho(e,0));function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){for(var i,a=0;a<o.length;a++)o[a][0]==n&&(i=o[a][1]);Ho(e,r).forEach((function(e){i||o.push([n,i=[]]),-1==i.indexOf(e)&&i.push(e)}))}}))}));for(var i=t[r.join(",")]=new Ro(r.indexOf(e.length-1)>-1),a=0;a<o.length;a++){var s=o[a][1].sort($o);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}(function(e){var t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}function i(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(i(n,t))}),[]);if("seq"!=e.type){if("star"==e.type){var a=n();return r(t,a),o(i(e.expr,a),a),[r(a)]}if("plus"==e.type){var s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){for(var u=t,c=0;c<e.min;c++){var l=n();o(i(e.expr,u),l),u=l}if(-1==e.max)o(i(e.expr,u),u);else for(var f=e.min;f<e.max;f++){var d=n();r(u,d),o(i(e.expr,u),d),u=d}return[r(u)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(var p=0;;p++){var h=i(e.exprs[p],t);if(p==e.exprs.length-1)return h;o(h,t=n())}}}(o));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s++){var u=o.next[s],c=u.type,l=u.next;a.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(l)&&r.push(l)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,r),i}}]),e}();Ro.empty=new Ro(!0);var Po=function(){function e(t,n){p(this,e),this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}return v(e,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(e){return this.next==e&&(this.pos++||!0)}},{key:"err",value:function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}]),e}();function Io(e){var t=[];do{t.push(Lo(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function Lo(e){var t=[];do{t.push(zo(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function zo(e){for(var t=function(e){if(e.eat("(")){var t=Io(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)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("{"))break;t=Vo(e,t)}return t}function Uo(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function Vo(e,t){var n=Uo(e),r=n;return e.eat(",")&&(r="}"!=e.next?Uo(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function $o(e,t){return t-e}function Ho(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,u=a.to;s||-1!=n.indexOf(u)||t(u)}}(t),n.sort($o)}function qo(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Wo(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function Ko(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new Yo(e[n]);return t}var Go=function(){function e(t,n,r){p(this,e),this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ko(r.attrs),this.defaultAttrs=qo(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}return v(e,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==Ro.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(e){return this==e||this.contentMatch.compatible(e.contentMatch)}},{key:"computeAttrs",value:function(e){return!e&&this.defaultAttrs?this.defaultAttrs:Wo(this.attrs,e)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Mo(this,this.computeAttrs(e),uo.from(t),po.setFrom(n))}},{key:"createChecked",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(t=uo.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new Mo(this,this.computeAttrs(e),t,po.setFrom(n))}},{key:"createAndFill",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(e=this.computeAttrs(e),(t=uo.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(uo.empty,!0);return i?new Mo(this,e,t.append(i),po.setFrom(n)):null}},{key:"validContent",value:function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}},{key:"allowsMarkType",value:function(e){return null==this.markSet||this.markSet.indexOf(e)>-1}},{key:"allowsMarks",value:function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}},{key:"allowedMarks",value:function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:po.none:e}}],[{key:"compile",value:function(t,n){var r=Object.create(null);t.forEach((function(t,o){return r[t]=new e(t,n,o)}));var o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}]),e}(),Yo=function(){function e(t){p(this,e),this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}return v(e,[{key:"isRequired",get:function(){return!this.hasDefault}}]),e}(),Jo=function(){function e(t,n,r,o){p(this,e),this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=Ko(o.attrs),this.excluded=null;var i=qo(this.attrs);this.instance=i?new po(this,i):null}return v(e,[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!e&&this.instance?this.instance:new po(this,Wo(this.attrs,e))}},{key:"removeFromSet",value:function(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}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}},{key:"excludes",value:function(e){return this.excluded.indexOf(e)>-1}}],[{key:"compile",value:function(t,n){var r=Object.create(null),o=0;return t.forEach((function(t,i){return r[t]=new e(t,o++,n,i)})),r}}]),e}(),Qo=function(){function e(t){p(this,e),this.cached=Object.create(null),this.spec={nodes:io.from(t.nodes),marks:io.from(t.marks||{}),topNode:t.topNode},this.nodes=Go.compile(this.spec.nodes,this),this.marks=Jo.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=Ro.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?Xo(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var u=this.marks[s],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:Xo(this,c.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)}return v(e,[{key:"node",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Go))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}},{key:"text",value:function(e,t){var n=this.nodes.text;return new Fo(n,n.defaultAttrs,e,po.setFrom(t))}},{key:"mark",value:function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}},{key:"nodeFromJSON",value:function(e){return Mo.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){return po.fromJSON(this,e)}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}]),e}();function Xo(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var u=e.marks[s];("_"==o||u.spec.group&&u.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}var Zo=function(){function e(t,n){var r=this;p(this,e),this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach((function(e){e.tag?r.tags.push(e):e.style&&r.styles.push(e)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}return v(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ii(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}},{key:"parseSlice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ii(this,t,!0);return n.addAll(e,t.from,t.to),vo.maxOpen(n.finish())}},{key:"matchTag",value:function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(ai(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i||void 0}return o}}}},{key:"matchStyle",value:function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o],a=i.style;if(!(0!=a.indexOf(e)||i.context&&!n.matchesContext(i.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(i.getAttrs){var s=i.getAttrs(t);if(!1===s)continue;i.attrs=s||void 0}return i}}}}],[{key:"schemaRules",value:function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=si(e)),e.mark=t}))};for(var o in e.marks)r(o);var i=function(t){var r=e.nodes[t].spec.parseDOM;r&&r.forEach((function(e){n(e=si(e)),e.node=t}))};for(var a in e.nodes)i(a);return t}},{key:"fromSchema",value:function(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}}]),e}(),ei={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},ti={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ni={ol:!0,ul:!0};function ri(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var oi=function(){function e(t,n,r,o,i,a,s){p(this,e),this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=s,this.content=[],this.activeMarks=po.none,this.stashMarks=[],this.match=a||(4&s?null:t.contentMatch)}return v(e,[{key:"findWrapping",value:function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(uo.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}},{key:"finish",value:function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];if(n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))){var r=n;n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-t[0].length))}}var o=uo.from(this.content);return!e&&this.match&&(o=o.append(this.match.fillBefore(uo.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}},{key:"popFromStashMark",value:function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}},{key:"applyPending",value:function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):ui(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}},{key:"inlineContext",value:function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ei.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}]),e}(),ii=function(){function e(t,n,r){p(this,e),this.parser=t,this.options=n,this.isOpen=r,this.open=0;var o,i=n.topNode,a=ri(null,n.preserveWhitespace,0)|(r?4:0);o=i?new oi(i.type,i.attrs,po.none,po.none,!0,n.topMatch||i.type.contentMatch,a):new oi(r?null:t.schema.topNodeType,null,po.none,po.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}return v(e,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}}},{key:"addTextNode",value:function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}},{key:"addElement",value:function(e,t){var n,r=e.nodeName.toLowerCase();ni.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&ni.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:ti.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(ei.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}},{key:"leafFallback",value:function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}},{key:"ignoreFallback",value:function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}},{key:"readStyles",value:function(e){var t=po.none;e:for(var n=0;n<e.length;n+=2)for(var r=void 0;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}},{key:"addElementByRule",value:function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var u=e;"string"==typeof t.contentElement?u=e.querySelector(t.contentElement):"function"==typeof t.contentElement?u=t.contentElement(e):t.contentElement&&(u=t.contentElement),this.findAround(e,u,!0),this.addAll(u)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}},{key:"addAll",value:function(e,t,n){for(var r=t||0,o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}},{key:"findPlace",value:function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0}},{key:"insertNode",value:function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}},{key:"enter",value:function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}},{key:"enterInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);var i=ri(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new oi(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}},{key:"closeExtra",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],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}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}},{key:"sync",value:function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}},{key:"findAtPoint",value:function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}},{key:"findInside",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}},{key:"findAround",value:function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}},{key:"findInText",value:function(e){if(this.find)for(var 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))}},{key:"matchesContext",value:function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=u&&-1==c.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)}},{key:"textblockFromContext",value:function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}}},{key:"addPendingMark",value:function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}},{key:"removePendingMark",value:function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}}}]),e}();function ai(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function si(e){var t={};for(var n in e)t[n]=e[n];return t}function ui(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(!o.allowsMarkType(e))return"continue";var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),a=o.type,s=o.next;if(a==t)return!0;if(i.indexOf(s)<0&&e(s))return!0}}(o.contentMatch)?{v:!0}:void 0};for(var o in n){var i=r(o);if("continue"!==i&&"object"===typeof i)return i.v}}var ci=function(){function e(t,n){p(this,e),this.nodes=t,this.marks=n}return v(e,[{key:"serializeFragment",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;r||(r=fi(n).createDocumentFragment());var o=r,i=[];return e.forEach((function(e){if(i.length||e.marks.length){for(var r=0,a=0;r<i.length&&a<e.marks.length;){var s=e.marks[a];if(t.marks[s.type.name]){if(!s.eq(i[r][0])||!1===s.type.spec.spanning)break;r++,a++}else a++}for(;r<i.length;)o=i.pop()[1];for(;a<e.marks.length;){var u=e.marks[a++],c=t.serializeMark(u,e.isInline,n);c&&(i.push([u,o]),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(t.serializeNodeInner(e,n))})),r}},{key:"serializeNodeInner",value:function(t,n){var r=e.renderSpec(fi(n),this.nodes[t.type.name](t)),o=r.dom,i=r.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return o}},{key:"serializeNode",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}},{key:"serializeMark",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.marks[t.type.name];return o&&e.renderSpec(fi(r),o(t,n))}}],[{key:"renderSpec",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"==typeof n)return{dom:t.createTextNode(n)};if(null!=n.nodeType)return{dom:n};if(n.dom&&null!=n.dom.nodeType)return n;var o,i=n[0],a=i.indexOf(" ");a>0&&(r=i.slice(0,a),i=i.slice(a+1));var s=r?t.createElementNS(r,i):t.createElement(i),u=n[1],c=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u))for(var l in c=2,u)if(null!=u[l]){var f=l.indexOf(" ");f>0?s.setAttributeNS(l.slice(0,f),l.slice(f+1),u[l]):s.setAttribute(l,u[l])}for(var d=c;d<n.length;d++){var p=n[d];if(0===p){if(d<n.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=e.renderSpec(t,p,r),v=h.dom,m=h.contentDOM;if(s.appendChild(v),m){if(o)throw new RangeError("Multiple content holes");o=m}}return{dom:s,contentDOM:o}}},{key:"fromSchema",value:function(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}},{key:"nodesFromSchema",value:function(e){var t=li(e.nodes);return t.text||(t.text=function(e){return e.text}),t}},{key:"marksFromSchema",value:function(e){return li(e.marks)}}]),e}();function li(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function fi(e){return e.document||window.document}var di=Math.pow(2,16);function pi(e){return 65535&e}var hi=function(){function e(t,n,r){p(this,e),this.pos=t,this.delInfo=n,this.recover=r}return v(e,[{key:"deleted",get:function(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function(){return(4&this.delInfo)>0}}]),e}(),vi=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(p(this,e),this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}return v(e,[{key:"recover",value:function(e){var t=0,n=pi(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/di}(e)}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var u=this.ranges[a+o],c=this.ranges[a+i],l=s+u;if(e<=l){var f=s+r+((u?e==s?-1:e==l?1:t:t)<0?0:c);if(n)return f;var d=e==(t<0?s:l)?null:a/3+(e-s)*di,p=e==s?2:e==l?1:4;return(t<0?e!=s:e!=l)&&(p|=8),new hi(f,p,d)}r+=c-u}return n?e+r:new hi(e+r,0,null)}},{key:"touches",value:function(e,t){for(var n=0,r=pi(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var u=this.ranges[a+o];if(e<=s+u&&a==3*r)return!0;n+=this.ranges[a+i]-u}return!1}},{key:"forEach",value:function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),u=this.ranges[r+t],c=this.ranges[r+n];e(a,a+u,s,s+c),o+=c-u}}},{key:"invert",value:function(){return new e(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}}]),e}();vi.empty=new vi([]);var mi=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;p(this,e),this.maps=t,this.mirror=n,this.from=r,this.to=o}return v(e,[{key:"slice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new e(this.maps,this.mirror,t,n)}},{key:"copy",value:function(){return new e(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}},{key:"appendMapping",value:function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}},{key:"getMirror",value:function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}},{key:"setMirror",value:function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}},{key:"appendMappingInverted",value:function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}},{key:"invert",value:function(){var t=new e;return t.appendMappingInverted(this),t}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,e=this.maps[a].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new hi(e,r,null)}}]),e}(),yi=Object.create(null),gi=function(){function e(){p(this,e)}return v(e,[{key:"getMap",value:function(){return vi.empty}},{key:"merge",value:function(e){return null}}],[{key:"fromJSON",value:function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=yi[t.stepType];if(!n)throw new RangeError("No step type ".concat(t.stepType," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in yi)throw new RangeError("Duplicate use of step JSON ID "+e);return yi[e]=t,t.prototype.jsonID=e,t}}]),e}(),bi=function(){function e(t,n){p(this,e),this.doc=t,this.failed=n}return v(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,n,r,o){try{return e.ok(t.replace(n,r,o))}catch(rr){if(rr instanceof ho)return e.fail(rr.message);throw rr}}}]),e}();function ki(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var i=e.child(o);i.content.size&&(i=i.copy(ki(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return uo.fromArray(r)}var wi=function(e){y(n,e);var t=x(n);function n(e,r,o){var i;return p(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return v(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new vo(ki(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return bi.fromReplace(e,this.from,this.to,i)}},{key:"invert",value:function(){return new xi(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(gi);gi.jsonID("addMark",wi);var xi=function(e){y(n,e);var t=x(n);function n(e,r,o){var i;return p(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return v(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=new vo(ki(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))}),e),n.openStart,n.openEnd);return bi.fromReplace(e,this.from,this.to,r)}},{key:"invert",value:function(){return new wi(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(gi);gi.jsonID("removeMark",xi);var Ei=function(e){y(n,e);var t=x(n);function n(e,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(this,n),(i=t.call(this)).from=e,i.to=r,i.slice=o,i.structure=a,i}return v(n,[{key:"apply",value:function(e){return this.structure&&Di(e,this.from,this.to)?bi.fail("Structure replace would overwrite content"):bi.fromReplace(e,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new vi([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new n(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new n(t.pos,Math.max(t.pos,r.pos),this.slice)}},{key:"merge",value:function(e){if(!(e instanceof n)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var t=this.slice.size+e.slice.size==0?vo.empty:new vo(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new n(e.from,this.to,t,this.structure)}var r=this.slice.size+e.slice.size==0?vo.empty:new vo(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new n(this.from,this.to+(e.to-e.from),r,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new n(t.from,t.to,vo.fromJSON(e,t.slice),!!t.structure)}}]),n}(gi);gi.jsonID("replace",Ei);var Oi=function(e){y(n,e);var t=x(n);function n(e,r,o,i,a,s){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return p(this,n),(u=t.call(this)).from=e,u.to=r,u.gapFrom=o,u.gapTo=i,u.slice=a,u.insert=s,u.structure=c,u}return v(n,[{key:"apply",value:function(e){if(this.structure&&(Di(e,this.from,this.gapFrom)||Di(e,this.gapTo,this.to)))return bi.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return bi.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?bi.fromReplace(e,this.from,this.to,n):bi.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new vi([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var t=this.gapTo-this.gapFrom;return new n(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new n(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var 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}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,vo.fromJSON(e,t.slice),t.insert,!!t.structure)}}]),n}(gi);function Di(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function Si(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ci(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!Si(r,o,i))break}return null}function _i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=Ai(e,t),i=o&&Ti(r,t);return i?o.map(ji).concat({type:t,attrs:n}).concat(i.map(ji)):null}function ji(e){return{type:e,attrs:null}}function Ai(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function Ti(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,u=r;s&&u<o;u++)s=s.matchType(n.child(u).type);return s&&s.validEnd?a:null}function Ni(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=e.steps.length;e.doc.nodesBetween(t,n,(function(t,n){if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);var a=e.mapping.slice(i),s=a.map(n,1),u=a.map(n+t.nodeSize,1);return e.step(new Oi(s,u,s+1,u-1,new vo(uo.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}function Mi(e,t,n,r,o){var i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);var a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Oi(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new vo(uo.from(a),0,0),1,!0))}function Fi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,u=n-2;s>i;s--,u--){var c=o.node(s),l=o.index(s);if(c.type.spec.isolating)return!1;var f=c.content.cutByIndex(l,c.childCount),d=r&&r[u]||c;if(d!=c&&(f=f.replaceChild(0,d.type.create(d.attrs))),!c.canReplace(l+1,c.childCount)||!d.type.validContent(f))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)}function Bi(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.doc.resolve(t),i=uo.empty,a=uo.empty,s=o.depth,u=o.depth-n,c=n-1;s>u;s--,c--){i=uo.from(o.node(s).copy(i));var l=r&&r[c];a=uo.from(l?l.type.create(l.attrs,a):o.node(s).copy(a))}e.step(new Ei(t,t,new vo(i.append(a),n,n),!0))}function Ri(e,t){var n=e.resolve(t),r=n.index();return Pi(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Pi(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function Ii(e,t,n){var r=new Ei(t-n,t+n,vo.empty,!0);e.step(r)}function Li(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vo.empty;if(t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return zi(o,i,r)?new Ei(t,n,r):new Ui(o,i,r).fit()}function zi(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}gi.jsonID("replaceAround",Oi);var Ui=function(){function e(t,n,r){p(this,e),this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=uo.empty;for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(var a=t.depth;a>0;a--)this.placed=uo.from(t.node(a).copy(this.placed))}return v(e,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var u=new vo(i,a,s);return t>-1?new Oi(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new Ei(r.pos,o.pos,u):null}},{key:"findFittable",value:function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=null,r=(t?(n=Hi(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,u=void 0,c=null;if(1==e&&(r?s.matchType(r.type)||(c=s.fillBefore(uo.from(r),!1)):n&&a.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:c};if(2==e&&r&&(u=s.findWrapping(r.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:u};if(n&&s.matchType(n.type))break}}},{key:"openMore",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=Hi(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new vo(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}},{key:"dropNode",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=Hi(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new vo(Vi(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new vo(Vi(t,n,1),n,r)}},{key:"placeNodes",value:function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,i=e.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a<i.length;a++)this.openFrontierNode(i[a]);var s=this.unplaced,u=r?r.content:s.content,c=s.openStart-t,l=0,f=[],d=this.frontier[n],p=d.match,h=d.type;if(o){for(a=0;a<o.childCount;a++)f.push(o.child(a));p=p.matchFragment(o)}for(var v=u.size+t-(s.content.size-s.openEnd);l<u.childCount;){var m=u.child(l),y=p.matchType(m.type);if(!y)break;(++l>1||0==c||m.content.size)&&(p=y,f.push(qi(m.mark(h.allowedMarks(m.marks)),1==l?c:0,l==u.childCount?v:-1)))}var g=l==u.childCount;g||(v=-1),this.placed=$i(this.placed,n,uo.from(f)),this.frontier[n].match=p,g&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var b=0,k=u;b<v;b++){var w=k.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),k=w.content}this.unplaced=g?0==t?vo.empty:new vo(Vi(s.content,t-1,1),t-1,v<0?s.openEnd:t-1):new vo(Vi(s.content,t,l),s.openStart,s.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Wi(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r}},{key:"findCloseLevel",value:function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=Wi(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var u=this.frontier[s],c=u.match,l=Wi(e,s,u.type,c,!0);if(!l||l.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}},{key:"close",value:function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=$i(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e}},{key:"openFrontierNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=$i(this.placed,this.depth,uo.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}},{key:"closeFrontierNode",value:function(){var e=this.frontier.pop().match.fillBefore(uo.empty,!0);e.childCount&&(this.placed=$i(this.placed,this.frontier.length,e))}}]),e}();function Vi(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Vi(e.firstChild.content,t-1,n)))}function $i(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy($i(e.lastChild.content,t-1,n)))}function Hi(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function qi(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,qi(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(uo.empty,!0)))),e.copy(r)}function Wi(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function Ki(e){return e.spec.defining||e.spec.definingForContent}function Gi(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(Gi(i.content,t+1,n,r,i)))}if(t>r){var a=o.contentMatchAt(0),s=a.fillBefore(e).append(e);e=s.append(a.matchFragment(s).fillBefore(uo.empty,!0))}return e}function Yi(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var Ji=Error;((Ji=function e(t){var n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype)).constructor=Ji,Ji.prototype.name="TransformError";var Qi=function(){function e(t){p(this,e),this.doc=t,this.steps=[],this.docs=[],this.mapping=new mi}return v(e,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(e){var t=this.maybeStep(e);if(t.failed)throw new Ji(t.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:vo.empty,r=Li(this.doc,e,t,n);return r&&this.step(r),this}},{key:"replaceWith",value:function(e,t,n){return this.replace(e,t,new vo(uo.from(n),0,0))}},{key:"delete",value:function(e,t){return this.replace(e,t,vo.empty)}},{key:"insert",value:function(e,t){return this.replaceWith(e,e,t)}},{key:"replaceRange",value:function(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);var o=e.doc.resolve(t),i=e.doc.resolve(n);if(zi(o,i,r))return e.step(new Ei(t,n,r));var a=Yi(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,c=o.pos-1;u>0;u--,c--){var l=o.node(u).type.spec;if(l.defining||l.definingAsContext||l.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==c&&a.splice(1,0,-u)}for(var f=a.indexOf(s),d=[],p=r.openStart,h=r.content,v=0;;v++){var m=h.firstChild;if(d.push(m),v==r.openStart)break;h=m.content}for(var y=p-1;y>=0;y--){var g=d[y].type,b=Ki(g);if(b&&o.node(f).type!=g)p=y;else if(b||!g.isTextblock)break}for(var k=r.openStart;k>=0;k--){var w=(k+p+1)%(r.openStart+1),x=d[w];if(x)for(var E=0;E<a.length;E++){var O=a[(E+f)%a.length],D=!0;O<0&&(D=!1,O=-O);var S=o.node(O-1),C=o.index(O-1);if(S.canReplaceWith(C,C,x.type,x.marks))return e.replace(o.before(O),D?i.after(O):n,new vo(Gi(r.content,0,r.openStart,w),w,r.openEnd))}}for(var _=e.steps.length,j=a.length-1;j>=0&&(e.replace(t,n,r),!(e.steps.length>_));j--){var A=a[j];A<0||(t=o.before(A),n=i.after(A))}}(this,e,t,n),this}},{key:"replaceRangeWith",value:function(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){var o=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new vo(uo.from(r),0,0))}(this,e,t,n),this}},{key:"deleteRange",value:function(e,t){return function(e,t,n){for(var r=e.doc.resolve(t),o=e.doc.resolve(n),i=Yi(r,o),a=0;a<i.length;a++){var s=i[a],u=a==i.length-1;if(u&&0==s||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(u||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(var c=1;c<=r.depth&&c<=o.depth;c++)if(t-r.start(c)==r.depth-c&&n>r.end(c)&&o.end(c)-n!=o.depth-c)return e.delete(r.before(c),n);e.delete(t,n)}(this,e,t),this}},{key:"lift",value:function(e,t){return function(e,t,n){for(var r=t.$from,o=t.$to,i=t.depth,a=r.before(i+1),s=o.after(i+1),u=a,c=s,l=uo.empty,f=0,d=i,p=!1;d>n;d--)p||r.index(d)>0?(p=!0,l=uo.from(r.node(d).copy(l)),f++):u--;for(var h=uo.empty,v=0,m=i,y=!1;m>n;m--)y||o.after(m+1)<o.end(m)?(y=!0,h=uo.from(o.node(m).copy(h)),v++):c++;e.step(new Oi(u,c,a,s,new vo(l.append(h),f,v),l.size-f,!0))}(this,e,t),this}},{key:"join",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ii(this,e,t),this}},{key:"wrap",value:function(e,t){return function(e,t,n){for(var r=uo.empty,o=n.length-1;o>=0;o--){if(r.size){var i=n[o].type.contentMatch.matchFragment(r);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=uo.from(n[o].type.create(n[o].attrs,r))}var a=t.start,s=t.end;e.step(new Oi(a,s,a,s,new vo(r,0,0),n.length,!0))}(this,e,t),this}},{key:"setBlockType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Ni(this,e,t,n,r),this}},{key:"setNodeMarkup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Mi(this,e,t,n,r),this}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;return Bi(this,e,t,n),this}},{key:"addMark",value:function(e,t,n){return function(e,t,n,r){var o,i,a=[],s=[];e.doc.nodesBetween(t,n,(function(e,u,c){if(e.isInline){var l=e.marks;if(!r.isInSet(l)&&c.type.allowsMarkType(r.type)){for(var f=Math.max(u,t),d=Math.min(u+e.nodeSize,n),p=r.addToSet(l),h=0;h<l.length;h++)l[h].isInSet(p)||(o&&o.to==f&&o.mark.eq(l[h])?o.to=d:a.push(o=new xi(f,d,l[h])));i&&i.to==f?i.to=d:s.push(i=new wi(f,d,r))}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)}))}(this,e,t,n),this}},{key:"removeMark",value:function(e,t,n){return function(e,t,n,r){var o=[],i=0;e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof Jo)for(var u,c=e.marks;u=r.isInSet(c);)(s||(s=[])).push(u),c=u.removeFromSet(c);else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var l=Math.min(a+e.nodeSize,n),f=0;f<s.length;f++){for(var d=s[f],p=void 0,h=0;h<o.length;h++){var v=o[h];v.step==i-1&&d.eq(o[h].style)&&(p=v)}p?(p.to=l,p.step=i):o.push({style:d,from:Math.max(a,t),to:l,step:i})}}})),o.forEach((function(t){return e.step(new xi(t.from,t.to,t.style))}))}(this,e,t,n),this}},{key:"clearIncompatible",value:function(e,t,n){return function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.contentMatch,o=e.doc.nodeAt(t),i=[],a=t+1,s=0;s<o.childCount;s++){var u=o.child(s),c=a+u.nodeSize,l=r.matchType(u.type);if(l){r=l;for(var f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new xi(a,c,u.marks[f]))}else i.push(new Ei(a,c,vo.empty));a=c}if(!r.validEnd){var d=r.fillBefore(uo.empty,!0);e.replace(a,a,new vo(d,0,0))}for(var p=i.length-1;p>=0;p--)e.step(i[p])}(this,e,t,n),this}}]),e}(),Xi=Object.create(null),Zi=function(){function e(t,n,r){p(this,e),this.$anchor=t,this.$head=n,this.ranges=r||[new ea(t.min(n),t.max(n))]}return v(e,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vo.empty,n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,a=this.ranges,s=0;s<a.length;s++){var u=a[s],c=u.$from,l=u.$to,f=e.mapping.slice(i);e.replaceRange(f.map(c.pos),f.map(l.pos),s?vo.empty:t),0==s&&la(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,u=e.mapping.slice(n),c=u.map(a.pos),l=u.map(s.pos);o?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),la(e,n,t.isInline?-1:1))}}},{key:"getBookmark",value:function(){return ra.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.parent.inlineContent?new ra(e):ca(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?ca(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):ca(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}return null}},{key:"near",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(e,t)||this.findFrom(e,-t)||new sa(e.node(0))}},{key:"atStart",value:function(e){return ca(e,e,0,0,1)||new sa(e)}},{key:"atEnd",value:function(e){return ca(e,e,e.content.size,e.childCount,-1)||new sa(e)}},{key:"fromJSON",value:function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=Xi[t.type];if(!n)throw new RangeError("No selection type ".concat(t.type," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in Xi)throw new RangeError("Duplicate use of selection JSON ID "+e);return Xi[e]=t,t.prototype.jsonID=e,t}}]),e}();Zi.prototype.visible=!0;var ea=v((function e(t,n){p(this,e),this.$from=t,this.$to=n})),ta=!1;function na(e){ta||e.parent.inlineContent||(ta=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var ra=function(e){y(n,e);var t=x(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return p(this,n),na(e),na(r),t.call(this,e,r)}return v(n,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return Zi.near(r);var o=e.resolve(t.map(this.anchor));return new n(o.parent.inlineContent?o:r,r)}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vo.empty;if(it(g(n.prototype),"replace",this).call(this,e,t),t==vo.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}},{key:"getBookmark",value:function(){return new oa(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}},{key:"between",value:function(e,t,r){var o=e.pos-t.pos;if(r&&!o||(r=o>=0?1:-1),!t.parent.inlineContent){var i=Zi.findFrom(t,r,!0)||Zi.findFrom(t,-r,!0);if(!i)return Zi.near(t,r);t=i.$head}return e.parent.inlineContent||(0==o||(e=(Zi.findFrom(e,-r,!0)||Zi.findFrom(e,r,!0)).$anchor).pos<t.pos!=o<0)&&(e=t),new n(e,t)}}]),n}(Zi);Zi.jsonID("text",ra);var oa=function(){function e(t,n){p(this,e),this.anchor=t,this.head=n}return v(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){return ra.between(e.resolve(this.anchor),e.resolve(this.head))}}]),e}(),ia=function(e){y(n,e);var t=x(n);function n(e){var r;p(this,n);var o=e.nodeAfter,i=e.node(0).resolve(e.pos+o.nodeSize);return(r=t.call(this,e,i)).node=o,r}return v(n,[{key:"map",value:function(e,t){var r=t.mapResult(this.anchor),o=r.deleted,i=r.pos,a=e.resolve(i);return o?Zi.near(a):new n(a)}},{key:"content",value:function(){return new vo(uo.from(this.node),0,0)}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new aa(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new n(e.resolve(t.anchor))}},{key:"create",value:function(e,t){return new n(e.resolve(t))}},{key:"isSelectable",value:function(e){return!e.isText&&!1!==e.type.spec.selectable}}]),n}(Zi);ia.prototype.visible=!1,Zi.jsonID("node",ia);var aa=function(){function e(t){p(this,e),this.anchor=t}return v(e,[{key:"map",value:function(t){var n=t.mapResult(this.anchor),r=n.deleted,o=n.pos;return r?new oa(o,o):new e(o)}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ia.isSelectable(n)?new ia(t):Zi.near(t)}}]),e}(),sa=function(e){y(n,e);var t=x(n);function n(e){return p(this,n),t.call(this,e.resolve(0),e.resolve(e.content.size))}return v(n,[{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vo.empty;if(t==vo.empty){e.delete(0,e.doc.content.size);var r=Zi.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else it(g(n.prototype),"replace",this).call(this,e,t)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(e){return new n(e)}},{key:"eq",value:function(e){return e instanceof n}},{key:"getBookmark",value:function(){return ua}}],[{key:"fromJSON",value:function(e){return new n(e)}}]),n}(Zi);Zi.jsonID("all",sa);var ua={map:function(){return this},resolve:function(e){return new sa(e)}};function ca(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t.inlineContent)return ra.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&ia.isSelectable(s))return ia.create(e,n-(o<0?s.nodeSize:0))}else{var u=ca(e,s,n+o,o<0?s.childCount:0,o,i);if(u)return u}n+=s.nodeSize*o}return null}function la(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof Ei||i instanceof Oi)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(Zi.near(e.doc.resolve(o),n))}}var fa=function(e){y(n,e);var t=x(n);function n(e){var r;return p(this,n),(r=t.call(this,e.doc)).curSelectionFor=0,r.updated=0,r.meta=Object.create(null),r.time=Date.now(),r.curSelection=e.selection,r.storedMarks=e.storedMarks,r}return v(n,[{key:"selection",get:function(){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}},{key:"setSelection",value:function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(1&this.updated)>0}},{key:"setStoredMarks",value:function(e){return this.storedMarks=e,this.updated|=2,this}},{key:"ensureMarks",value:function(e){return po.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}},{key:"addStoredMark",value:function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(2&this.updated)>0}},{key:"addStep",value:function(e,t){it(g(n.prototype),"addStep",this).call(this,e,t),this.updated=-3&this.updated,this.storedMarks=null}},{key:"setTime",value:function(e){return this.time=e,this}},{key:"replaceSelection",value:function(e){return this.selection.replace(this,e),this}},{key:"replaceSelectionWith",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||po.none))),n.replaceWith(this,e),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(e,t,n){var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(Zi.near(this.selection.$to)),this}},{key:"setMeta",value:function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}},{key:"getMeta",value:function(e){return this.meta["string"==typeof e?e:e.key]}},{key:"isGeneric",get:function(){for(var e in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=4,this}},{key:"scrolledIntoView",get:function(){return(4&this.updated)>0}}]),n}(Qi);function da(e,t){return t&&e?e.bind(t):e}var pa=v((function e(t,n,r){p(this,e),this.name=t,this.init=da(n.init,r),this.apply=da(n.apply,r)})),ha=[new pa("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new pa("selection",{init:function(e,t){return e.selection||Zi.atStart(t.doc)},apply:function(e){return e.selection}}),new pa("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new pa("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],va=v((function e(t,n){var r=this;p(this,e),this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=ha.slice(),n&&n.forEach((function(e){if(r.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");r.plugins.push(e),r.pluginsByKey[e.key]=e,e.spec.state&&r.fields.push(new pa(e.key,e.spec.state,e))}))})),ma=function(){function e(t){p(this,e),this.config=t}return v(e,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(e){return this.applyTransaction(e).state}},{key:"filterTransaction",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}},{key:"applyTransaction",value:function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,u=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,u,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var l=0;l<this.config.plugins.length;l++)r.push(l<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}},{key:"applyInner",value:function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var n=new e(this.config),r=this.config.fields,o=0;o<r.length;o++){var i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}},{key:"tr",get:function(){return new fa(this)}},{key:"reconfigure",value:function(t){for(var n=new va(this.schema,t.plugins),r=n.fields,o=new e(n),i=0;i<r.length;i++){var a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}},{key:"toJSON",value:function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}}],[{key:"create",value:function(t){for(var n=new va(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n),o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}},{key:"fromJSON",value:function(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var o=new va(t.schema,t.plugins),i=new e(o);return o.fields.forEach((function(e){if("doc"==e.name)i.doc=Mo.fromJSON(t.schema,n.doc);else if("selection"==e.name)i.selection=Zi.fromJSON(i.doc,n.selection);else if("storedMarks"==e.name)n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var o in r){var a=r[o],s=a.spec.state;if(a.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,o))return void(i[e.name]=s.fromJSON.call(a,t,n[o],i))}i[e.name]=e.init(t,i)}})),i}}]),e}();function ya(e,t,n){for(var r in e){var o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=ya(o,t,{})),n[r]=o}return n}var ga=function(){function e(t){p(this,e),this.spec=t,this.props={},t.props&&ya(t.props,this,this.props),this.key=t.key?t.key.key:ka("plugin")}return v(e,[{key:"getState",value:function(e){return e[this.key]}}]),e}(),ba=Object.create(null);function ka(e){return e in ba?e+"$"+ ++ba[e]:(ba[e]=0,e+"$")}var wa=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";p(this,e),this.key=ka(t)}return v(e,[{key:"get",value:function(e){return e.config.pluginsByKey[this.key]}},{key:"getState",value:function(e){return e[this.key]}}]),e}(),xa="undefined"!=typeof navigator?navigator:null,Ea="undefined"!=typeof document?document:null,Oa=xa&&xa.userAgent||"",Da=/Edge\/(\d+)/.exec(Oa),Sa=/MSIE \d/.exec(Oa),Ca=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Oa),_a=!!(Sa||Ca||Da),ja=Sa?document.documentMode:Ca?+Ca[1]:Da?+Da[1]:0,Aa=!_a&&/gecko\/(\d+)/i.test(Oa);Aa&&(/Firefox\/(\d+)/.exec(Oa)||[0,0])[1];var Ta=!_a&&/Chrome\/(\d+)/.exec(Oa),Na=!!Ta,Ma=Ta?+Ta[1]:0,Fa=!_a&&!!xa&&/Apple Computer/.test(xa.vendor),Ba=Fa&&(/Mobile\/\w+/.test(Oa)||!!xa&&xa.maxTouchPoints>2),Ra=Ba||!!xa&&/Mac/.test(xa.platform),Pa=/Android \d/.test(Oa),Ia=!!Ea&&"webkitFontSmoothing"in Ea.documentElement.style,La=Ia?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,za=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Ua=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},Va=null,$a=function(e,t,n){var r=Va||(Va=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},Ha=function(e,t,n,r){return n&&(Wa(e,t,n,r,-1)||Wa(e,t,n,r,1))},qa=/^(img|br|input|textarea|hr)$/i;function Wa(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Ka(e))){var i=e.parentNode;if(!i||1!=i.nodeType||Ya(e)||qa.test(e.nodeName)||"false"==e.contentEditable)return!1;t=za(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?Ka(e):0}}}function Ka(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ga(e,t,n){for(var r=0==t,o=t==Ka(e);r||o;){if(e==n)return!0;var i=za(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==Ka(e)}}function Ya(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Ja=function(e){var t=e.isCollapsed;return t&&Na&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function Qa(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Xa(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Za(e,t){return"number"==typeof e?e:e[t]}function es(e){var 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 ts(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=Ua(a))if(1==a.nodeType){var s=a,u=s==i.body,c=u?Xa(i):es(s),l=0,f=0;if(t.top<c.top+Za(r,"top")?f=-(c.top-t.top+Za(o,"top")):t.bottom>c.bottom-Za(r,"bottom")&&(f=t.bottom-c.bottom+Za(o,"bottom")),t.left<c.left+Za(r,"left")?l=-(c.left-t.left+Za(o,"left")):t.right>c.right-Za(r,"right")&&(l=t.right-c.right+Za(o,"right")),l||f)if(u)i.defaultView.scrollBy(l,f);else{var d=s.scrollLeft,p=s.scrollTop;f&&(s.scrollTop+=f),l&&(s.scrollLeft+=l);var h=s.scrollLeft-d,v=s.scrollTop-p;t={left:t.left-h,top:t.top-v,right:t.right-h,bottom:t.bottom-v}}if(u)break}}function ns(e){for(var t=[],n=e.ownerDocument,r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Ua(r));return t}function rs(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var is=null;function as(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,u=e.firstChild,c=0;u;u=u.nextSibling,c++){var l=void 0;if(1==u.nodeType)l=u.getClientRects();else{if(3!=u.nodeType)continue;l=$a(u).getClientRects()}for(var f=0;f<l.length;f++){var d=l[f];if(d.top<=a&&d.bottom>=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var p=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(p<o){n=u,o=p,r=p&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==u.nodeType&&p&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=ls(r,1);if(i.top!=i.bottom&&ss(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:as(n,r)}function ss(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function us(e,t,n){var r=e.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=e.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),u=0;u<s.length;u++){var c=s[u];if(ss(t,c))return us(a,t,c)}if((i=(i+1)%r)==o)break}return e}function cs(e,t){var n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{var i=r.caretPositionFromPoint(t.left,t.top);i&&(n=i.offsetNode,o=i.offset)}catch(h){}if(!n&&r.caretRangeFromPoint){var a=r.caretRangeFromPoint(t.left,t.top);a&&(n=a.startContainer,o=a.startOffset)}var s,u=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top+1);if(!u||!e.dom.contains(1!=u.nodeType?u.parentNode:u)){var c=e.dom.getBoundingClientRect();if(!ss(t,c))return null;if(!(u=us(e.dom,t,c)))return null}if(Fa)for(var l=u;n&&l;l=Ua(l))l.draggable&&(n=void 0);if(u=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(u,t),n){if(Aa&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length))<n.childNodes.length){var f,d=n.childNodes[o];"IMG"==d.nodeName&&(f=d.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==s&&(s=function(e,t,n){var r=as(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,u,t));var p=e.docView.nearestDesc(u,!0);return{pos:s,inside:p?p.posAtStart-p.border:-1}}function ls(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var fs=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ds(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=Ia||Aa;if(3==o.nodeType){if(!a||!fs.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==o.nodeValue.length?(s--,c=1):n<0?s--:u++,ps(ls($a(o,s,u),c),c<0)}var l=ls($a(o,i,i),n);if(Aa&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=ls($a(o,i-1,i-1),-1);if(f.top==l.top){var d=ls($a(o,i,i+1),-1);if(d.top!=l.top)return ps(d,d.left<f.left)}}return l}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==Ka(o))){var p=o.childNodes[i-1];if(1==p.nodeType)return hs(p.getBoundingClientRect(),!1)}if(i<Ka(o)){var h=o.childNodes[i];if(1==h.nodeType)return hs(h.getBoundingClientRect(),!0)}return hs(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==Ka(o))){var v=o.childNodes[i-1],m=3==v.nodeType?$a(v,Ka(v)-(a?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(m)return ps(ls(m,1),!1)}if(i<Ka(o)){for(var y=o.childNodes[i];y.pmViewDesc&&y.pmViewDesc.ignoreForCoords;)y=y.nextSibling;var g=y?3==y.nodeType?$a(y,0,a?0:1):1==y.nodeType?y:null:null;if(g)return ps(ls(g,-1),!0)}return ps(ls(3==o.nodeType?$a(o):o,-n),n>=0)}function ps(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function hs(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function vs(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var ms=/[\u0590-\u08ac]/;var ys=null,gs=null,bs=!1;function ks(e,t,n){return ys==t&&gs==n?bs:(ys=t,gs=n,bs="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return vs(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=ds(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=$a(a,0,a.nodeValue.length).getClientRects()}for(var u=0;u<s.length;u++){var c=s[u];if(c.bottom>c.top+1&&("up"==n?i.top-c.top>2*(c.bottom-i.top):c.bottom-i.bottom>2*(i.bottom-c.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return ms.test(r.parent.textContent)&&s.modify?vs(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?i:a}(e,t,n))}var ws=function(){function e(t,n,r,o){p(this,e),this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=0,r.pmViewDesc=this}return v(e,[{key:"matchesWidget",value:function(e){return!1}},{key:"matchesMark",value:function(e){return!1}},{key:"matchesNode",value:function(e,t,n){return!1}},{key:"matchesHack",value:function(e){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(e){return!1}},{key:"size",get:function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var e=0;e<this.children.length;e++)this.children[e].destroy()}},{key:"posBeforeChild",value:function(e){for(var t=0,n=this.posAtStart;;t++){var r=this.children[t];if(r==e)return n;n+=r.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>za(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!1;break}if(u.previousSibling)break}if(null==s&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.nextSibling)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r),i=void 0;if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}},{key:"getDesc",value:function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t}},{key:"posFromDOM",value:function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}},{key:"descAt",value:function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}},{key:"domFromPos",value:function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n,r=0,o=0,i=0;r<this.children.length;r++){var a=this.children[r],s=i+a.size;if(s>e||a instanceof _s){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof xs&&n.side>=0;r--);if(t<=0){for(var u,c=!0;(u=r?this.children[r-1]:null)&&u.dom.parentNode!=this.contentDOM;r--,c=!1);return u&&t&&c&&!u.border&&!u.domAtom?u.domFromPos(u.size,t):{node:this.contentDOM,offset:u?za(u.dom)+1:0}}for(var l,f=!0;(l=r<this.children.length?this.children[r]:null)&&l.dom.parentNode!=this.contentDOM;r++,f=!1);return l&&f&&!l.border&&!l.domAtom?l.domFromPos(0,t):{node:this.contentDOM,offset:l?za(l.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],u=i+s.size;if(-1==r&&e<=u){var c=i+s.border;if(e>=c&&t<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var l=a;l>0;l--){var f=this.children[l-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=za(f.dom)+1;break}e-=f.size}-1==r&&(r=0)}if(r>-1&&(u>t||a==this.children.length-1)){t=u;for(var d=a+1;d<this.children.length;d++){var p=this.children[d];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=za(p.dom);break}t+=p.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}},{key:"emptyChildAt",value:function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}},{key:"domAfterPos",value:function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}},{key:"setSelection",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var u=this.children[a],c=s+u.size;if(o>s&&i<c)return u.setSelection(e-s-u.border,t-s-u.border,n,r);s=c}var l=this.domFromPos(e,e?-1:1),f=t==e?l:this.domFromPos(t,t?-1:1),d=n.getSelection(),p=!1;if((Aa||Fa)&&e==t){var h=l,v=h.node,m=h.offset;if(3==v.nodeType){if((p=!(!m||"\n"!=v.nodeValue[m-1]))&&m==v.nodeValue.length)for(var y,g=v;g;g=g.parentNode){if(y=g.nextSibling){"BR"==y.nodeName&&(l=f={node:y.parentNode,offset:za(y)+1});break}var b=g.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{var k=v.childNodes[m-1];p=k&&("BR"==k.nodeName||"false"==k.contentEditable)}}if(Aa&&d.focusNode&&d.focusNode!=f.node&&1==d.focusNode.nodeType){var w=d.focusNode.childNodes[d.focusOffset];w&&"false"==w.contentEditable&&(r=!0)}if(r||p&&Fa||!Ha(l.node,l.offset,d.anchorNode,d.anchorOffset)||!Ha(f.node,f.offset,d.focusNode,d.focusOffset)){var x=!1;if((d.extend||e==t)&&!p){d.collapse(l.node,l.offset);try{e!=t&&d.extend(f.node,f.offset),x=!0}catch(D){if(!(D instanceof DOMException))throw D}}if(!x){if(e>t){var E=l;l=f,f=E}var O=document.createRange();O.setEnd(f.node,f.offset),O.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(O)}}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM&&"selection"!=e.type}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}},{key:"markParentsDirty",value:function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}}]),e}(),xs=function(e){y(n,e);var t=x(n);function n(e,r,o,i){var a;p(this,n);var s,u=r.type.toDOM;if("function"==typeof u&&(u=u(o,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:i}))),!r.type.spec.raw){if(1!=u.nodeType){var c=document.createElement("span");c.appendChild(u),u=c}u.contentEditable="false",u.classList.add("ProseMirror-widget")}return(a=t.call(this,e,[],u,null)).widget=r,a.widget=r,s=k(a),a}return v(n,[{key:"matchesWidget",value:function(e){return 0==this.dirty&&e.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)}},{key:"ignoreMutation",value:function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),it(g(n.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),n}(ws),Es=function(e){y(n,e);var t=x(n);function n(e,r,o,i){var a;return p(this,n),(a=t.call(this,e,[],r,null)).textDOM=o,a.text=i,a}return v(n,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}},{key:"domFromPos",value:function(e){return{node:this.textDOM,offset:e}}},{key:"ignoreMutation",value:function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}]),n}(ws),Os=function(e){y(n,e);var t=x(n);function n(e,r,o,i){var a;return p(this,n),(a=t.call(this,e,[],o,i)).mark=r,a}return v(n,[{key:"parseRule",value:function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}},{key:"matchesMark",value:function(e){return 3!=this.dirty&&this.mark.eq(e)}},{key:"markDirty",value:function(e,t){if(it(g(n.prototype),"markDirty",this).call(this,e,t),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function(e,t,r){var o=n.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=Us(i,t,a,r)),e>0&&(i=Us(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}],[{key:"create",value:function(e,t,r,o){var i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return a&&a.dom||(a=ci.renderSpec(document,t.type.spec.toDOM(t,r))),new n(e,t,a.dom,a.contentDOM||a.dom)}}]),n}(ws),Ds=function(e){y(n,e);var t=x(n);function n(e,r,o,i,a,s,u,c,l){var f;return p(this,n),(f=t.call(this,e,[],a,s)).node=r,f.outerDeco=o,f.innerDeco=i,f.nodeDOM=u,s&&f.updateChildren(c,l),f}return v(n,[{key:"parseRule",value:function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return uo.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t}},{key:"matchesNode",value:function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Ps(t,this.outerDeco)&&n.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,u=new Ls(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var u=0,c=[],l=null,f=0;;){if(u<o.length&&o[u].to==i){for(var d=o[u++],p=void 0;u<o.length&&o[u].to==i;)(p||(p=[d])).push(o[u++]);if(p){p.sort(zs);for(var h=0;h<p.length;h++)n(p[h],f,!!l)}else n(d,f,!!l)}var v=void 0,m=void 0;if(l)m=-1,v=l,l=null;else{if(!(f<e.childCount))break;m=f,v=e.child(f++)}for(var y=0;y<c.length;y++)c[y].to<=i&&c.splice(y--,1);for(;u<o.length&&o[u].from<=i&&o[u].to>i;)c.push(o[u++]);var g=i+v.nodeSize;if(v.isText){var b=g;u<o.length&&o[u].from<b&&(b=o[u].from);for(var k=0;k<c.length;k++)c[k].to<b&&(b=c[k].to);b<g&&(l=v.cut(b-i),v=v.cut(0,b-i),g=b,m=-1)}r(v,v.isInline&&!v.isLeaf?c.filter((function(e){return!e.inline})):c.slice(),t.forChild(i,v),m),i=g}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?u.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&u.syncToMarks(i==n.node.childCount?po.none:n.node.child(i).marks,r,e),u.placeWidget(t,e,o)}),(function(t,n,a,c){var l;u.syncToMarks(t.marks,r,e),u.findNodeMatch(t,n,a,c)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(l=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(t,n,a,l,e)||u.updateNextNode(t,n,a,e,c)||u.addNode(t,n,a,e,o),o+=t.nodeSize})),u.syncToMarks([],r,e),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),As(this.contentDOM,this.children,e),Ba&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}},{key:"localCompositionInfo",value:function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(e.state.selection instanceof ra)||r<t||o>t+this.node.content.size)return null;var i=e.domSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=Ka(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){var s=a.nodeValue,u=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var u=a.text;o<e.childCount;){var c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;u+=c.text}if(i>=n){var l=s<r?u.lastIndexOf(t,r-s-1):-1;if(l>=0&&l+t.length+s>=n)return s+l;if(n==r&&u.length>=r+t.length-s&&u.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return u<0?null:{node:a,pos:u,text:s}}return{node:a,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;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&&(i.pmViewDesc=void 0)}var a=new Es(this,i,n,o);e.input.compositionNodes.push(a),this.children=Us(this.children,r,r+o.length,e,a)}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}},{key:"updateInner",value:function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function(e){if(!Ps(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Fs(this.dom,this.nodeDOM,Ms(this.outerDeco,this.node,t),Ms(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}}},{key:"selectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(e,t,r,o,i,a){var s,u=i.nodeViews[t.type.name],c=u&&u(t,i,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:a}),r,o),l=c&&c.dom,f=c&&c.contentDOM;if(t.isText)if(l){if(3!=l.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else l=document.createTextNode(t.text);else if(!l){var d=ci.renderSpec(document,t.type.spec.toDOM(t));l=d.dom,f=d.contentDOM}f||t.isText||"BR"==l.nodeName||(l.hasAttribute("contenteditable")||(l.contentEditable="false"),t.type.spec.draggable&&(l.draggable=!0));var p=l;return l=Rs(l,r,t),c?s=new js(e,t,r,o,l,f||null,p,c,i,a+1):t.isText?new Cs(e,t,r,o,l,p,i):new n(e,t,r,o,l,f||null,p,i,a+1)}}]),n}(ws);function Ss(e,t,n,r,o){return Rs(r,t,e),new Ds(void 0,e,t,n,r,r,r,o,0)}var Cs=function(e){y(n,e);var t=x(n);function n(e,r,o,i,a,s,u){return p(this,n),t.call(this,e,r,o,i,a,null,s,u,0)}return v(n,[{key:"parseRule",value:function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&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)}},{key:"inParent",value:function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}},{key:"domFromPos",value:function(e){return{node:this.nodeDOM,offset:e}}},{key:"localPosFromDOM",value:function(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):it(g(n.prototype),"localPosFromDOM",this).call(this,e,t,r)}},{key:"ignoreMutation",value:function(e){return"characterData"!=e.type&&"selection"!=e.type}},{key:"slice",value:function(e,t,r){var o=this.node.cut(e,t),i=document.createTextNode(o.text);return new n(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}},{key:"markDirty",value:function(e,t){it(g(n.prototype),"markDirty",this).call(this,e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function(){return!1}}]),n}(Ds),_s=function(e){y(n,e);var t=x(n);function n(){return p(this,n),t.apply(this,arguments)}return v(n,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(e){return 0==this.dirty&&this.dom.nodeName==e}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return"IMG"==this.dom.nodeName}}]),n}(ws),js=function(e){y(n,e);var t=x(n);function n(e,r,o,i,a,s,u,c,l,f){var d;return p(this,n),(d=t.call(this,e,r,o,i,a,s,u,l,f)).spec=c,d}return v(n,[{key:"update",value:function(e,t,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&it(g(n.prototype),"update",this).call(this,e,t,r,o)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():it(g(n.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():it(g(n.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):it(g(n.prototype),"setSelection",this).call(this,e,t,r,o)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),it(g(n.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}},{key:"ignoreMutation",value:function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):it(g(n.prototype),"ignoreMutation",this).call(this,e)}}]),n}(Ds);function As(e,t,n){for(var r=e.firstChild,o=!1,i=0;i<t.length;i++){var a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=Is(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof Os){var u=r?r.previousSibling:e.lastChild;As(a.contentDOM,a.children,n),r=u?u.nextSibling:e.firstChild}}for(;r;)r=Is(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var Ts=function(e){e&&(this.nodeName=e)};Ts.prototype=Object.create(null);var Ns=[new Ts];function Ms(e,t,n){if(0==e.length)return Ns;for(var r=n?Ns[0]:new Ts,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new Ts(a.nodeName)),a){var u=a[s];null!=u&&(n&&1==o.length&&o.push(r=new Ts(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+u:"style"==s?r.style=(r.style?r.style+";":"")+u:"nodeName"!=s&&(r[s]=u))}}return o}function Fs(e,t,n,r){if(n==Ns&&r==Ns)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var u=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(u=o.parentNode)&&u.nodeName.toLowerCase()==a.nodeName||((u=document.createElement(a.nodeName)).pmIsDeco=!0,u.appendChild(o),s=Ns[0]),o=u}Bs(o,s||Ns[0],a)}return o}function Bs(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):[],a=n.class?n.class.split(" ").filter(Boolean):[],s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var u=0;u<a.length;u++)-1==i.indexOf(a[u])&&e.classList.add(a[u]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var c,l=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=l.exec(t.style);)e.style.removeProperty(c[1]);n.style&&(e.style.cssText+=n.style)}}function Rs(e,t,n){return Fs(e,e,Ns,Ms(t,n,1!=e.nodeType))}function Ps(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Is(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var Ls=function(){function e(t,n){p(this,e),this.lock=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var u=n.children[r-1];if(!(u instanceof Os)){s=u,r--;break}n=u,r=u.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var c=s.node;if(c){if(c!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)}return v(e,[{key:"destroyBetween",value:function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var u=Os.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}}},{key:"findNodeMatch",value:function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var u=this.top.children[a];if(u.matchesNode(e,t,n)&&!this.preMatch.matched.has(u)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}},{key:"updateNodeAt",value:function(e,t,n,r,o){var i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)}},{key:"findIndexWithChild",value:function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}}},{key:"updateNextNode",value:function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof Ds){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var u=a.dom;if(!(this.lock&&(u==this.lock||1==u.nodeType&&u.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&Ps(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=u&&(this.changed=!0),this.index++,!0;break}}return!1}},{key:"addNode",value:function(e,t,n,r,o){this.top.children.splice(this.index++,0,Ds.create(this.top,e,t,n,r,o)),this.changed=!0}},{key:"placeWidget",value:function(e,t,n){var 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){var o=new xs(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function(){for(var e=this.top.children[this.index-1],t=this.top;e instanceof Os;)e=(t=e).children[t.children.length-1];e&&e instanceof Cs&&!/\n$/.test(e.node.text)||((Fa||Na)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{var n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");var r=new _s(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}]),e}();function zs(e,t){return e.type.side-t.type.side}function Us(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var u=e[a],c=s,l=s+=u.size;c>=n||l<=t?i.push(u):(c<t&&i.push(u.slice(0,t-c,r)),o&&(i.push(o),o=void 0),l>n&&i.push(u.slice(n-c,u.size,r)))}return i}function Vs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,u,c=r.resolve(a);if(Ja(n)){for(s=c;o&&!o.node;)o=o.parent;var l=o.node;if(o&&l.isAtom&&ia.isSelectable(l)&&o.parent&&(!l.isInline||!Ga(n.focusNode,n.focusOffset,o.dom))){var f=o.posBefore;u=new ia(a==f?c:r.resolve(f))}}else{var d=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(d<0)return null;s=r.resolve(d)}if(!u){var p="pointer"==t||e.state.selection.head<c.pos&&!i?1:-1;u=Zs(e,s,c,p)}return u}function $s(e){return e.editable?e.hasFocus():tu(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Hs(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(Qs(e,n),$s(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Na){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Ha(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Js(e);else{var i,a,s=n.anchor,u=n.head;!qs||n instanceof ra||(n.$from.parent.inlineContent||(i=Ws(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=Ws(e,n.to))),e.docView.setSelection(s,u,e.root,t),qs&&(i&&Gs(i),a&&Gs(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Ys(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var qs=Fa||Na&&Ma<63;function Ws(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(Fa&&i&&"false"==i.contentEditable)return Ks(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return Ks(i);if(a)return Ks(a)}}function Ks(e){return e.contentEditable="true",Fa&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Gs(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Ys(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){$s(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function Js(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,za(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&_a&&ja<=11&&(r.disabled=!0,r.disabled=!1)}function Qs(e,t){if(t instanceof ia){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Xs(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Xs(e)}function Xs(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Zs(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||ra.between(t,n,r)}function eu(e){return(!e.editable||e.root.activeElement==e.dom)&&tu(e)}function tu(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function nu(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&Zi.findFrom(a,t)}function ru(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ou(e,t,n){var r=e.state.selection;if(!(r instanceof ra)){if(r instanceof ia&&r.node.isInline)return ru(e,new ra(t>0?r.$to:r.$from));var o=nu(e.state,t);return!!o&&ru(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=nu(e.state,t);return!!(i&&i instanceof ia)&&ru(e,i)}if(!(Ra&&n.indexOf("m")>-1)){var a,s=r.$head,u=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!u||u.isText)return!1;var c=t<0?s.pos-u.nodeSize:s.pos;return!!(u.isAtom||(a=e.docView.descAt(c))&&!a.contentDOM)&&(ia.isSelectable(u)?ru(e,new ia(t<0?e.state.doc.resolve(s.pos-u.nodeSize):s)):!!Ia&&ru(e,new ra(e.state.doc.resolve(t<0?c:c+u.nodeSize))))}}function iu(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function au(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function su(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(Aa&&1==n.nodeType&&r<iu(n)&&au(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(au(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(cu(n))break;for(var u=n.previousSibling;u&&au(u);)o=n.parentNode,i=za(u),u=u.previousSibling;if(u)r=iu(n=u);else{if((n=n.parentNode)==e.dom)break;r=0}}a?lu(e,t,n,r):o&&lu(e,t,o,i)}}function uu(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=iu(n);;)if(r<a){if(1!=n.nodeType)break;if(!au(n.childNodes[r]))break;o=n,i=++r}else{if(cu(n))break;for(var s=n.nextSibling;s&&au(s);)o=s.parentNode,i=za(s)+1,s=s.nextSibling;if(s)r=0,a=iu(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&lu(e,t,o,i)}}function cu(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function lu(e,t,n,r){if(Ja(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&Hs(e)}),50)}function fu(e,t,n){var r=e.state.selection;if(r instanceof ra&&!r.empty||n.indexOf("s")>-1)return!1;if(Ra&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=nu(e.state,t);if(a&&a instanceof ia)return ru(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,u=r instanceof sa?Zi.near(s,t):Zi.findFrom(s,t);return!!u&&ru(e,u)}return!1}function du(e,t){if(!(e.state.selection instanceof ra))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function pu(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function hu(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||Ra&&72==n&&"c"==r?du(e,-1)||su(e):46==n||Ra&&68==n&&"c"==r?du(e,1)||uu(e):13==n||27==n||(37==n||Ra&&66==n&&"c"==r?ou(e,-1,r)||su(e):39==n||Ra&&70==n&&"c"==r?ou(e,1,r)||uu(e):38==n||Ra&&80==n&&"c"==r?fu(e,-1,r)||su(e):40==n||Ra&&78==n&&"c"==r?function(e){if(!Fa||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;pu(e,o,"true"),setTimeout((function(){return pu(e,o,"false")}),20)}return!1}(e)||fu(e,1,r)||uu(e):r==(Ra?"m":"c")&&(66==n||73==n||89==n||90==n))}function vu(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||ci.fromSchema(e.state.schema),u=Du(),c=u.createElement("div");c.appendChild(s.serializeFragment(r,{document:u}));for(var l,f=c.firstChild,d=0;f&&1==f.nodeType&&(l=Eu[f.nodeName.toLowerCase()]);){for(var p=l.length-1;p>=0;p--){for(var h=u.createElement(l[p]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h),d++}f=c.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(d?" -".concat(d):""," ").concat(JSON.stringify(n))),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function mu(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||s||!n);if(u){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new vo(uo.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):vo.empty;var c=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(c)a=c;else{var l=o.marks(),f=e.state.schema,d=ci.fromSchema(f);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(d.serializeNode(f.text(e,l)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Du().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Eu[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),Ia&&function(e){for(var t=e.querySelectorAll(Na?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var v=+h[3];v>0&&i.firstChild;v--)i=i.firstChild;if(!a){var m=e.someProp("clipboardParser")||e.someProp("domParser")||Zo.fromSchema(e.state.schema);a=m.parseSlice(i,{preserveWhitespace:!(!u&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||yu.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(rr){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var u=r.nodes[n[s]];if(!u||u.hasRequiredAttrs())break;o=uo.from(u.create(n[s+1],o)),i++,a++}return new vo(o,i,a)}(xu(a,+h[1],+h[2]),h[4]);else if(a=vo.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&bu(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=ku(i[i.length-1],o.length));var a=gu(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:uo.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,g=0,b=a.content.firstChild;y<a.openStart&&!b.type.spec.isolating;y++,b=b.firstChild);for(var k=a.content.lastChild;g<a.openEnd&&!k.type.spec.isolating;g++,k=k.lastChild);a=xu(a,y,g)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var yu=/^(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 gu(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,uo.from(e));return e}function bu(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=bu(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(uo.from(gu(n,e,o+1))))}}function ku(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,ku(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(uo.empty,!0);return e.copy(n.append(r))}function wu(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=wu(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(uo.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function xu(e,t,n){return t<e.openStart&&(e=new vo(wu(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new vo(wu(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Eu={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Ou=null;function Du(){return Ou||(Ou=document.implementation.createHTMLDocument("title"))}var Su={},Cu={},_u=v((function e(){p(this,e),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.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}));function ju(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Au(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=function(t){return Tu(e,t)})}))}function Tu(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Nu(e){return{left:e.clientX,top:e.clientY}}function Mu(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var u=a(s);if("object"===typeof u)return u.v}return!1}function Fu(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Bu(e,t,n,r,o){return Mu(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof ia&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(ia.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(Fu(e,ia.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&ia.isSelectable(r))&&(Fu(e,new ia(n),"pointer"),!0)}(e,n))}function Ru(e,t,n,r){return Mu(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function Pu(e,t,n,r){return Mu(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Fu(e,ra.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)Fu(e,ra.create(r,s+1,s+1+a.content.size),"pointer");else{if(!ia.isSelectable(a))continue;Fu(e,ia.create(r,s),"pointer")}return!0}}(e,n,r)}function Iu(e){return qu(e)}Cu.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Uu(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Pa||!Na||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Ba||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||hu(e,n)?n.preventDefault():ju(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,Qa(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},Cu.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},Cu.keypress=function(e,t){var n=t;if(!(Uu(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ra&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof ra)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var Lu=Ra?"metaKey":"ctrlKey";Su.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=Iu(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Lu]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(Nu(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new zu(e,a,n,!!r)):("doubleClick"==i?Ru:Pu)(e,a.pos,a.inside,n)?n.preventDefault():ju(e,"pointer"))};var zu=function(){function e(t,n,r,o){var i,a,s=this;if(p(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Lu],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var u=t.state.doc.resolve(n.pos);i=u.parent,a=u.depth?u.before():0}var c=o?null:r.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof ia&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Aa||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((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ju(t,"pointer")}return v(e,[{key:"done",value:function(){var e=this;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((function(){return Hs(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Nu(e))),this.allowDefault||!t?ju(this.view,"pointer"):Bu(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Fa&&this.mightDrag&&!this.mightDrag.node.isAtom||Na&&!(this.view.state.selection instanceof ra)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Fu(this.view,Zi.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ju(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),ju(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function Uu(e,t){return!!e.composing||!!(Fa&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Su.touchdown=function(e){Iu(e),ju(e,"pointer")},Su.contextmenu=function(e){return Iu(e)};var Vu=Pa?5e3:-1;function $u(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return qu(e)}),t))}function Hu(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function qu(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(Pa&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Hu(e),t||e.docView&&e.docView.dirty){var n=Vs(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}Cu.compositionstart=Cu.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),qu(e,!0),e.markCursor=null;else if(qu(e),Aa&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}$u(e,Vu)},Cu.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,$u(e,20))};var Wu=_a&&ja<15||Ba&&La<604;function Ku(e,t,n,r){var o=mu(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||vo.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Su.copy=Cu.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=Wu?null:n.clipboardData,a=vu(e,r.content()),s=a.dom,u=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",u)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Cu.paste=function(e,t){var n=t;if(!e.composing||Pa){var r=Wu?null:n.clipboardData;r&&Ku(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var 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(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ku(e,r.value,null,t):Ku(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var Gu=v((function e(t,n){p(this,e),this.slice=t,this.move=n})),Yu=Ra?"altKey":"ctrlKey";for(var Ju in Su.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Nu(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof ia?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(ia.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(ia.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),u=vu(e,s),c=u.dom,l=u.text;n.dataTransfer.clearData(),n.dataTransfer.setData(Wu?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",Wu||n.dataTransfer.setData("text/plain",l),e.dragging=new Gu(s,!n[Yu])}},Su.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Cu.dragover=Cu.dragenter=function(e,t){return t.preventDefault()},Cu.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(Nu(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=mu(e,n.dataTransfer.getData(Wu?"Text":"text/plain"),Wu?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[Yu]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||vo.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var u=a?function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(u>0?1:0),l=r.node(s),f=!1;if(1==a)f=l.canReplace(c,c,o);else{var d=l.contentMatchAt(c).findWrapping(o.firstChild.type);f=d&&l.canReplaceWith(c,c,d[0])}if(f)return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null}(e.state.doc,i.pos,a):i.pos;null==u&&(u=i.pos);var c=e.state.tr;s&&c.deleteSelection();var l=c.mapping.map(u),f=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,d=c.doc;if(f?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),!c.doc.eq(d)){var p=c.doc.resolve(l);if(f&&ia.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new ia(p));else{var h=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((function(e,t,n,r){return h=r})),c.setSelection(Zs(e,p,c.doc.resolve(h)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))}}}}}},Su.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&Hs(e)}),20))},Su.blur=function(e,t){var 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)},Su.beforeinput=function(e,t){if(Na&&Pa&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,Qa(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Cu)Su[Ju]=Cu[Ju];function Qu(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var Xu=function(){function e(t,n){p(this,e),this.toDOM=t,this.spec=n||rc,this.side=this.spec.side||0}return v(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new tc(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Qu(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),Zu=function(){function e(t,n){p(this,e),this.attrs=t,this.spec=n||rc}return v(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new tc(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Qu(this.attrs,t.attrs)&&Qu(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),ec=function(){function e(t,n){p(this,e),this.attrs=t,this.spec=n||rc}return v(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new tc(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Qu(this.attrs,t.attrs)&&Qu(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),tc=function(){function e(t,n,r){p(this,e),this.from=t,this.to=n,this.type=r}return v(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Zu}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new Xu(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new Zu(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new ec(r,o))}}]),e}(),nc=[],rc={},oc=function(){function e(t,n){p(this,e),this.local=t.length?t:nc,this.children=n.length?n:nc}return v(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var u=this.children[s]+1;this.children[s+2].findInner(e-u,t-u,n,r+u,o)}}},{key:"map",value:function(e,t,n){return this==ic||0==e.maps.length?this:this.mapInner(e,t,0,0,n||rc)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var u=this.local[s].map(t,r,o);u&&u.type.valid(n,u)?(a||(a=[])).push(u):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),u=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var u=s[a+1],c=void 0;if(!(u<0||e>u+i)){var l=s[a]+i;t>=l?s[a+1]=e<=l?-2:-1:n>=o&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c)}}},c=0;c<n.maps.length;c++)n.maps[c].forEach(u);for(var l=!1,f=0;f<s.length;f+=3)if(s[f+1]<0){if(-2==s[f+1]){l=!0,s[f+1]=-1;continue}var d=n.map(e[f]+i),p=d-o;if(p<0||p>=r.content.size){l=!0;continue}var h=n.map(e[f+1]+i,-1)-o,v=r.content.findIndex(p),m=v.index,y=v.offset,g=r.maybeChild(m);if(g&&y==p&&y+g.nodeSize==h){var b=s[f+2].mapInner(n,g,d+1,e[f]+i+1,a);b!=ic?(s[f]=p,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,l=!0)}else l=!0}if(l){var k=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var u=e.local[i].map(r,o,t);u?n.push(u):a.onRemove&&a.onRemove(e.local[i].spec)}for(var c=0;c<e.children.length;c+=3)s(e.children[c+2],e.children[c]+t+1)}for(var u=0;u<e.length;u+=3)-1==e[u+1]&&s(e[u+2],t[u]+i+1);return n}(s,e,t,n,o,i,a),w=lc(k,r,0,a);t=w.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var E=0,O=0;E<w.children.length;E+=3){for(var D=w.children[E];O<s.length&&s[O]<D;)O+=3;s.splice(O,0,w.children[E],w.children[E+1],w.children[E+2])}}return new oc(t.sort(fc),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(fc),nc):ic}},{key:"add",value:function(t,n){return n.length?this==ic?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,u=t+r;if(s=uc(n,e,u)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,u+1):o.splice(a,0,t,t+e.nodeSize,lc(s,e,u+1,rc)),a+=3}}));for(var s=sc(a?cc(n):n,-r),u=0;u<s.length;u++)s[u].type.valid(t,s[u])||s.splice(u--,1);return new e(s.length?this.local.concat(s).sort(fc):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==ic?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,u=r[i]+n,c=r[i+1]+n,l=0;l<t.length;l++)(a=t[l])&&a.from>u&&a.to<c&&(t[l]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var f=r[i+2].removeInner(s,u+1);f!=ic?r[i+2]=f:(r.splice(i,3),i-=3)}}if(o.length)for(var d,p=0;p<t.length;p++)if(d=t[p])for(var h=0;h<o.length;h++)o[h].eq(d,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):ic}},{key:"forChild",value:function(t,n){if(this==ic)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,u=0;u<this.local.length;u++){var c=this.local[u];if(c.from<s&&c.to>a&&c.type instanceof Zu){var l=Math.max(a,c.from)-a,f=Math.min(s,c.to)-a;l<f&&(o||(o=[])).push(c.copy(l,f))}}if(o){var d=new e(o.sort(fc),nc);return r?new ac([d,r]):d}return r||ic}},{key:"eq",value:function(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(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return dc(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==ic)return nc;if(e.inlineContent||!this.local.some(Zu.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Zu||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?lc(t,e,0,rc):ic}}]),e}();oc.empty=new oc([],[]),oc.removeOverlap=dc;var ic=oc.empty,ac=function(){function e(t){p(this,e),this.members=t}return v(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,rc)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return oc.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=ic&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?dc(n?t:t.sort(fc)):nc}}],[{key:"from",value:function(t){switch(t.length){case 0:return ic;case 1:return t[0];default:return new e(t)}}}]),e}();function sc(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new tc(o.from+t,o.to+t,o.type))}return n}function uc(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function cc(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function lc(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=uc(e,t,a+n);if(s){i=!0;var u=lc(s,t,n+a+1,r);u!=ic&&o.push(a,a+t.nodeSize,u)}}));for(var a=sc(i?cc(e):e,-n).sort(fc),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new oc(a,o):ic}function fc(e,t){return e.from-t.from||e.to-t.to}function dc(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),pc(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),pc(t,o+1,i.copy(r.to,i.to)))}}return t}function pc(e,t,n){for(;t<e.length&&fc(n,e[t])>0;)t++;e.splice(t,0,n)}function hc(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=ic&&t.push(r)})),e.cursorWrapper&&t.push(oc.create(e.state.doc,[e.cursorWrapper.deco])),ac.from(t)}var vc={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},mc=_a&&ja<=11,yc=function(){function e(){p(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return v(e,[{key:"set",value:function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}]),e}(),gc=function(){function e(t,n){var r=this;p(this,e),this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new yc,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)r.queue.push(e[t]);_a&&ja<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?r.flushSoon():r.flush()})),mc&&(this.onCharData=function(e){r.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return v(e,[{key:"flushSoon",value:function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&this.observer.observe(this.view.dom,vc),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)}},{key:"onSelectionChange",value:function(){if(eu(this.view)){if(this.suppressingSelectionUpdates)return Hs(this.view);if(_a&&ja<=11&&!this.view.state.selection.empty){var e=this.view.domSelection();if(e.focusNode&&Ha(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelection())}},{key:"ignoreSelectionChange",value:function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}},{key:"flush",value:function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&eu(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var u=this.registerMutation(e[s],a);u&&(r=r<0?u.from:Math.min(u.from,r),o=o<0?u.to:Math.max(u.to,o),u.typeOver&&(i=!0))}if(Aa&&a.length>1){var c=a.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var l=c[0],f=c[1];l.parentNode&&l.parentNode.parentNode==f.parentNode?f.remove():l.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(bc)return;bc=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&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.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Hs(this.view),this.currentSelection.set(t))}}},{key:"registerMutation",value:function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(_a&&ja<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],u=s.previousSibling,c=s.nextSibling;(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(o=u),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c)}var l=o&&o.parentNode==e.target?za(o)+1:0,f=n.localPosFromDOM(e.target,l,-1),d=i&&i.parentNode==e.target?za(i):e.target.childNodes.length;return{from:f,to:n.localPosFromDOM(e.target,d,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}]),e}(),bc=!1;function kc(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(Fa&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||Fa&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function wc(e,t,n,r,o){if(t<0){var i=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,a=Vs(e,i);if(a&&!e.state.selection.eq(a)){var s=e.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),e.dispatch(s)}}else{var u=e.state.doc.resolve(t),c=u.sharedDepth(n);t=u.before(c+1),n=e.state.doc.resolve(n).after(c+1);var l=e.state.selection,f=function(e,t,n){var r,o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,s=o.toOffset,u=o.from,c=o.to,l=e.domSelection(),f=l.anchorNode;if(f&&e.dom.contains(1==f.nodeType?f:f.parentNode)&&(r=[{node:f,offset:l.anchorOffset}],Ja(l)||r.push({node:l.focusNode,offset:l.focusOffset})),Na&&8===e.input.lastKeyCode)for(var d=s;d>a;d--){var p=i.childNodes[d-1],h=p.pmViewDesc;if("BR"==p.nodeName&&!h){s=d;break}if(!h||h.size)break}var v=e.state.doc,m=e.someProp("domParser")||Zo.fromSchema(e.state.schema),y=v.resolve(u),g=null,b=m.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",findPositions:r,ruleFromNode:kc,context:y});if(r&&null!=r[0].pos){var k=r[0].pos,w=r[1]&&r[1].pos;null==w&&(w=k),g={anchor:k+u,head:w+u}}return{doc:b,sel:g,from:u,to:c}}(e,t,n);if(Na&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from){var d=e.cursorWrapper.deco.type.toDOM.nextSibling,p=d&&d.nodeValue?d.nodeValue.length:1;f.sel={anchor:f.sel.anchor+p,head:f.sel.anchor+p}}var h,v,m=e.state.doc,y=m.slice(f.from,f.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(h=e.state.selection.to,v="end"):(h=e.state.selection.from,v="start"),e.input.lastKeyCode=null;var g=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,u=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,u))-i}if(s<i&&e.size<t.size){u=(i-=r<=i&&r>=s?i-r:0)+(u-s),s=i}else if(u<i){s=(i-=r<=i&&r>=u?i-r:0)+(s-u),u=i}return{start:i,endA:s,endB:u}}(y.content,f.doc.content,f.from,h,v);if((Ba&&e.input.lastIOSEnter>Date.now()-225||Pa)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!g||g.endA>=g.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,Qa(13,"Enter"))})))e.input.lastIOSEnter=0;else{if(!g){if(!(r&&l instanceof ra&&!l.empty&&l.$head.sameParent(l.$anchor))||e.composing||f.sel&&f.sel.anchor!=f.sel.head){if(f.sel){var b=xc(e,e.state.doc,f.sel);b&&!b.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(b))}return}g={start:l.from,endA:l.to,endB:l.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&g.start==g.endB&&e.state.selection instanceof ra&&(g.start>e.state.selection.from&&g.start<=e.state.selection.from+2&&e.state.selection.from>=f.from?g.start=e.state.selection.from:g.endA<e.state.selection.to&&g.endA>=e.state.selection.to-2&&e.state.selection.to<=f.to&&(g.endB+=e.state.selection.to-g.endA,g.endA=e.state.selection.to)),_a&&ja<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>f.from&&" \xa0"==f.doc.textBetween(g.start-f.from-1,g.start-f.from+1)&&(g.start--,g.endA--,g.endB--);var k,w=f.doc.resolveNoCache(g.start-f.from),x=f.doc.resolveNoCache(g.endB-f.from),E=m.resolve(g.start),O=w.sameParent(x)&&w.parent.inlineContent&&E.end()>=g.endA;if((Ba&&e.input.lastIOSEnter>Date.now()-225&&(!O||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!O&&w.pos<f.doc.content.size&&(k=Zi.findFrom(f.doc.resolve(w.pos+1),1,!0))&&k.head==x.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,Qa(13,"Enter"))})))e.input.lastIOSEnter=0;else if(e.state.selection.anchor>g.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Ec(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(Ec(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||Ec(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(m,g.start,g.endA,w,x)&&e.someProp("handleKeyDown",(function(t){return t(e,Qa(8,"Backspace"))})))Pa&&Na&&e.domObserver.suppressSelectionUpdates();else{Na&&Pa&&g.endB==g.start&&(e.input.lastAndroidDelete=Date.now()),Pa&&!O&&w.start()!=x.start()&&0==x.parentOffset&&w.depth==x.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==g.endA&&(g.endB-=2,x=f.doc.resolveNoCache(g.endB-f.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,Qa(13,"Enter"))}))}),20));var D,S,C,_=g.start,j=g.endA;if(O)if(w.pos==x.pos)_a&&ja<=11&&0==w.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Hs(e)}),20)),D=e.state.tr.delete(_,j),S=m.resolve(g.start).marksAcross(m.resolve(g.endA));else if(g.endA==g.endB&&(C=function(e,t){for(var n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,s=i,u=a,c=0;c<a.length;c++)s=a[c].removeFromSet(s);for(var l=0;l<i.length;l++)u=i[l].removeFromSet(u);if(1==s.length&&0==u.length)r=s[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=s.length||1!=u.length)return null;r=u[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var f=[],d=0;d<t.childCount;d++)f.push(o(t.child(d)));if(uo.from(f).eq(e))return{mark:r,type:n}}(w.parent.content.cut(w.parentOffset,x.parentOffset),E.parent.content.cut(E.parentOffset,g.endA-E.start()))))D=e.state.tr,"add"==C.type?D.addMark(_,j,C.mark):D.removeMark(_,j,C.mark);else if(w.parent.child(w.index()).isText&&w.index()==x.index()-(x.textOffset?0:1)){var A=w.parent.textBetween(w.parentOffset,x.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,_,j,A)})))return;D=e.state.tr.insertText(A,_,j)}if(D||(D=e.state.tr.replace(_,j,f.doc.slice(g.start-f.from,g.endB-f.from))),f.sel){var T=xc(e,D.doc,f.sel);T&&!(Na&&Pa&&e.composing&&T.empty&&(g.start!=g.endB||e.input.lastAndroidDelete<Date.now()-100)&&(T.head==_||T.head==D.mapping.map(j)-1)||_a&&T.empty&&T.head==_)&&D.setSelection(T)}S&&D.ensureMarks(S),e.dispatch(D.scrollIntoView())}}}}function xc(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Zs(e,t.resolve(n.anchor),t.resolve(n.head))}function Ec(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}var Oc=function(){function e(t,n){var r=this;p(this,e),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 _u,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(jc),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Cc(this),Sc(this),this.nodeViews=_c(this),this.docView=Ss(this.state.doc,Dc(this),hc(this),this.dom,this),this.domObserver=new gc(this,(function(e,t,n,o){return wc(r,e,t,n,o)})),this.domObserver.start(),function(e){var t=function(t){var n=Su[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||Tu(e,t)||!e.editable&&t.type in Cu||n(e,t)})};for(var n in Su)t(n);Fa&&e.dom.addEventListener("input",(function(){return null})),Au(e)}(this),this.updatePluginViews()}return v(e,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}},{key:"update",value:function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Au(this),this._props=e,e.plugins&&(e.plugins.forEach(jc),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}},{key:"setProps",value:function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)}},{key:"updateState",value:function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}},{key:"updateStateInner",value:function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(Hu(this),i=!0),this.state=e,t){var a=_c(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),Au(this)}this.editable=Cc(this),Sc(this);var s=hc(this),u=Dc(this),c=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",l=o||!this.docView.matchesNode(e.doc,u,s);!l&&e.selection.eq(r.selection)||(i=!0);var f="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s&&s!=e.dom&&e.dom.contains(s)){var u=s.getBoundingClientRect();if(u.top>=o-20){t=s,n=u.top;break}}}return{refDOM:t,refTop:n,stack:ns(e.dom)}}(this);if(i){this.domObserver.stop();var d=l&&(_a||Na)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(l){var p=Na?this.trackWrites=this.domSelection().focusNode:null;!o&&this.docView.update(e.doc,u,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Ss(e.doc,u,s,this.dom,this)),p&&!this.trackWrites&&(d=!0)}d||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return Ha(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Hs(this,d):(Qs(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==c)this.dom.scrollTop=0;else if("to selection"==c){var h=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(function(e){return e(n)})));else if(e.selection instanceof ia){var v=this.docView.domAfterPos(e.selection.from);1==v.nodeType&&ts(this,v.getBoundingClientRect(),h)}else ts(this,this.coordsAtPos(e.selection.head,1),h)}else f&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;rs(r,0==o?0:o-n)}(f)}},{key:"destroyPluginViews",value:function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()}},{key:"updatePluginViews",value:function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}}},{key:"someProp",value:function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var u=a[s].props[e];if(null!=u&&(n=t?t(u):u))return n}}},{key:"hasFocus",value:function(){return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(is)return e.focus(is);var t=ns(e);e.focus(null==is?{get preventScroll(){return is={preventScroll:!0},!0}}:void 0),is||(is=!1,rs(t,0))}(this.dom),Hs(this),this.domObserver.start()}},{key:"root",get:function(){var e=this,t=this._root;if(null==t)for(var n=function(t){if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return t.ownerDocument.getSelection()}),{v:e._root=t}},r=this.dom.parentNode;r;r=r.parentNode){var o=n(r);if("object"===typeof o)return o.v}return t||document}},{key:"posAtCoords",value:function(e){return cs(this,e)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return ds(this,e,t)}},{key:"domAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}},{key:"nodeDOM",value:function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null}},{key:"posAtDOM",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}},{key:"endOfTextblock",value:function(e,t){return ks(this,t||this.state,e)}},{key:"destroy",value:function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],hc(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}},{key:"isDestroyed",get:function(){return null==this.docView}},{key:"dispatchEvent",value:function(e){return function(e,t){Tu(e,t)||!Su[t.type]||!e.editable&&t.type in Cu||Su[t.type](e,t)}(this,e)}},{key:"dispatch",value:function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),e}();function Dc(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[tc.node(0,e.state.doc.content.size,t)]}function Sc(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:tc.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Cc(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function _c(e){var t=Object.create(null);function n(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function jc(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Ac={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:"'",229:"q"},Tc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Nc="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Mc="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Fc="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Bc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Rc="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Pc=Nc&&(Bc||+Nc[1]<57)||Fc&&Bc,Ic=0;Ic<10;Ic++)Ac[48+Ic]=Ac[96+Ic]=String(Ic);for(Ic=1;Ic<=24;Ic++)Ac[Ic+111]="F"+Ic;for(Ic=65;Ic<=90;Ic++)Ac[Ic]=String.fromCharCode(Ic+32),Tc[Ic]=String.fromCharCode(Ic);for(var Lc in Ac)Tc.hasOwnProperty(Lc)||(Tc[Lc]=Ac[Lc]);var zc="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Uc(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var u=i[s];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: "+u);zc?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function Vc(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function $c(e){var t=function(e){var t=Object.create(null);for(var n in e)t[Uc(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(Pc&&(e.ctrlKey||e.altKey||e.metaKey)||(Mc||Rc)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?Tc:Ac)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[Vc(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Ac[n.keyCode])&&r!=o){var s=t[Vc(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var u=t[Vc(o,n,!0)];if(u&&u(e.state,e.dispatch,e))return!0}return!1}}var Hc=function(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)},qc=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=Gc(r);if(!o){var i=r.blockRange(),a=i&&Ci(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&il(e,o,t))return!0;if(0==r.parent.content.size&&(Wc(s,"end")||ia.isSelectable(s))){var u=Li(e.doc,r.before(),r.after(),vo.empty);if(u&&u.slice.size<u.to-u.from){if(t){var c=e.tr.step(u);c.setSelection(Wc(s,"end")?Zi.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):ia.create(c.doc,o.pos-s.nodeSize)),t(c.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)};function Wc(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}var Kc=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;i=Gc(o)}var a=i&&i.nodeBefore;return!(!a||!ia.isSelectable(a))&&(t&&t(e.tr.setSelection(ia.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function Gc(e){if(!e.parent.type.spec.isolating)for(var 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}var Yc=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=Qc(r);if(!o)return!1;var i=o.nodeAfter;if(il(e,o,t))return!0;if(0==r.parent.content.size&&(Wc(i,"start")||ia.isSelectable(i))){var a=Li(e.doc,r.before(),r.after(),vo.empty);if(a&&a.slice.size<a.to-a.from){if(t){var s=e.tr.step(a);s.setSelection(Wc(i,"start")?Zi.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):ia.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)},Jc=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;i=Qc(o)}var a=i&&i.nodeAfter;return!(!a||!ia.isSelectable(a))&&(t&&t(e.tr.setSelection(ia.create(e.doc,i.pos)).scrollIntoView()),!0)};function Qc(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var 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}var Xc=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&Ci(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},Zc=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function el(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var tl=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=el(i.contentMatchAt(a));if(!s||!i.canReplaceWith(a,a,s))return!1;if(t){var u=r.after(),c=e.tr.replaceWith(u,u,s.createAndFill());c.setSelection(Zi.near(c.doc.resolve(u),1)),t(c.scrollIntoView())}return!0},nl=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof sa||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=el(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(ra.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},rl=function(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(Fi(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&Ci(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},ol=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof ia&&e.selection.node.isBlock)return!(!r.parentOffset||!Fi(e.doc,r.pos))&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof ra||e.selection instanceof sa)&&a.deleteSelection();var s=0==r.depth?null:el(r.node(-1).contentMatchAt(r.indexAfter(-1))),u=i&&s?[{type:s}]:void 0,c=Fi(a.doc,a.mapping.map(r.pos),1,u);if(u||c||!Fi(a.doc,a.mapping.map(r.pos),1,s?[{type:s}]:void 0)||(s&&(u=[{type:s}]),c=!0),c&&(a.split(a.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=s)){var l=a.mapping.map(r.before()),f=a.doc.resolve(l);s&&r.node(-1).canReplaceWith(f.index(),f.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0};function il(e,t,n){var r,o,i=t.nodeBefore,a=t.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(e,t,n){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(i,i+1)||!o.isTextblock&&!Ri(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){for(var u=t.pos+a.nodeSize,c=uo.empty,l=r.length-1;l>=0;l--)c=uo.from(r[l].create(null,c));c=uo.from(i.copy(c));var f=e.tr.step(new Oi(t.pos-1,u,t.pos,u,new vo(c,1,0),r.length,!0)),d=u+2*r.length;Ri(f.doc,d)&&f.join(d),n(f.scrollIntoView())}return!0}var p=Zi.findFrom(t,1),h=p&&p.$from.blockRange(p.$to),v=h&&Ci(h);if(null!=v&&v>=t.depth)return n&&n(e.tr.lift(h,v).scrollIntoView()),!0;if(s&&Wc(a,"start",!0)&&Wc(i,"end")){for(var m=i,y=[];y.push(m),!m.isTextblock;)m=m.lastChild;for(var g=a,b=1;!g.isTextblock;g=g.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,g.content)){if(n){for(var k=uo.empty,w=y.length-1;w>=0;w--)k=uo.from(y[w].copy(k));n(e.tr.step(new Oi(t.pos-y.length,t.pos+a.nodeSize,t.pos+b,t.pos+a.nodeSize-b,new vo(k,y.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function al(e){return function(t,n){for(var r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(ra.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}var sl=al(-1),ul=al(1);function cl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),u=s&&_i(s,e,t);return!!u&&(r&&r(n.tr.wrap(s,u).scrollIntoView()),!0)}}function ll(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function fl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,r){for(var o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var dl=fl(Hc,qc,Kc),pl=fl(Hc,Yc,Jc),hl={Enter:fl(Zc,nl,rl,ol),"Mod-Enter":tl,Backspace:dl,"Mod-Backspace":dl,"Shift-Backspace":dl,Delete:pl,"Mod-Delete":pl,"Mod-a":function(e,t){return t&&t(e.tr.setSelection(new sa(e.doc))),!0}},vl={"Ctrl-h":hl.Backspace,"Alt-Backspace":hl["Mod-Backspace"],"Ctrl-d":hl.Delete,"Ctrl-Alt-Backspace":hl["Mod-Delete"],"Alt-Delete":hl["Mod-Delete"],"Alt-d":hl["Mod-Delete"],"Ctrl-a":sl,"Ctrl-e":ul};for(var ml in hl)vl[ml]=hl[ml];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function yl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),u=!1,c=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var l=n.doc.resolve(s.start-2);c=new To(l,l,s.depth),s.endIndex<s.parent.childCount&&(s=new To(i,n.doc.resolve(a.end(s.depth)),s.depth)),u=!0}var f=_i(c,e,t,s);return!!f&&(r&&r(gl(n.tr,s,f,u,e).scrollIntoView()),!0)}}function gl(e,t,n,r,o){for(var i=uo.empty,a=n.length-1;a>=0;a--)i=uo.from(n[a].type.create(n[a].attrs,i));e.step(new Oi(t.start-(r?2:0),t.end,t.start,t.end,new vo(i,0,0),n.length,!0));for(var s=0,u=0;u<n.length;u++)n[u].type==o&&(s=u+1);for(var c=n.length-s,l=t.start+n.length-(r?2:0),f=t.parent,d=t.startIndex,p=t.endIndex,h=!0;d<p;d++,h=!1)!h&&Fi(e.doc,l,c)&&(e.split(l,c),l+=2*c),l+=f.child(d).nodeSize;return e}function bl(e){return function(t,n){var r=t.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(t){return t.childCount>0&&t.firstChild.type==e}));return!!a&&(!n||(o.node(a.depth-1).type==e?function(e,t,n,r){var o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Oi(i-1,a,i,a,new vo(uo.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new To(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));return t(o.lift(r,Ci(r)).scrollIntoView()),!0}(t,n,e,a):function(e,t,n){for(var r=e.tr,o=n.parent,i=n.end,a=n.endIndex-1,s=n.startIndex;a>s;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var u=r.doc.resolve(n.start),c=u.nodeAfter;if(r.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;var l=0==n.startIndex,f=n.endIndex==o.childCount,d=u.node(-1),p=u.index(-1);if(!d.canReplace(p+(l?0:1),p+1,c.content.append(f?uo.empty:uo.from(o))))return!1;var h=u.pos,v=h+c.nodeSize;return r.step(new Oi(h-(l?1:0),v+(f?1:0),h+1,v-1,new vo((l?uo.empty:uo.from(o.copy(uo.empty))).append(f?uo.empty:uo.from(o.copy(uo.empty))),l?0:1,f?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,a)))}}function kl(e){var t=e.state,n=e.transaction,r=n.selection,o=n.doc,i=n.storedMarks;return Object(u.a)(Object(u.a)({},t),{},{apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}})}var wl=function(){function e(t){p(this,e),this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}return v(e,[{key:"hasCustomState",get:function(){return!!this.customState}},{key:"state",get:function(){return this.customState||this.editor.state}},{key:"commands",get:function(){var e=this,t=this.rawCommands,n=this.editor,r=this.state,o=n.view,i=r.tr,a=this.buildProps(i);return Object.fromEntries(Object.entries(t).map((function(t){var n=Object(Se.a)(t,2),r=n[0],s=n[1];return[r,function(){var t=s.apply(void 0,arguments)(a);return i.getMeta("preventDispatch")||e.hasCustomState||o.dispatch(i),t}]})))}},{key:"chain",get:function(){var e=this;return function(){return e.createChain()}}},{key:"can",get:function(){var e=this;return function(){return e.createCan()}}},{key:"createChain",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,i=this.state,a=o.view,s=[],c=!!e,l=e||i.tr,f=function(){return c||!n||l.getMeta("preventDispatch")||t.hasCustomState||a.dispatch(l),s.every((function(e){return!0===e}))},d=Object(u.a)(Object(u.a)({},Object.fromEntries(Object.entries(r).map((function(e){var r=Object(Se.a)(e,2),o=r[0],i=r[1];return[o,function(){var e=t.buildProps(l,n),r=i.apply(void 0,arguments)(e);return s.push(r),d}]})))),{},{run:f});return d}},{key:"createCan",value:function(e){var t=this,n=this.rawCommands,r=this.state,o=void 0,i=e||r.tr,a=this.buildProps(i,o),s=Object.fromEntries(Object.entries(n).map((function(e){var t=Object(Se.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(Object(u.a)(Object(u.a)({},a),{},{dispatch:o}))}]})));return Object(u.a)(Object(u.a)({},s),{},{chain:function(){return t.createChain(i,o)}})}},{key:"buildProps",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,i=this.state,a=o.view;i.storedMarks&&e.setStoredMarks(i.storedMarks);var s={tr:e,editor:o,view:a,state:kl({state:i,transaction:e}),dispatch:n?function(){}:void 0,chain:function(){return t.createChain(e)},can:function(){return t.createCan(e)},get commands(){return Object.fromEntries(Object.entries(r).map((function(e){var t=Object(Se.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(s)}]})))}};return s}}]),e}(),xl=function(){function e(){p(this,e),this.callbacks={}}return v(e,[{key:"on",value:function(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=this.callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){var n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((function(e){return e!==t})):delete this.callbacks[e]),this}},{key:"removeAllListeners",value:function(){this.callbacks={}}}]),e}();function El(e,t,n){return void 0===e.config[t]&&e.parent?El(e.parent,t,n):"function"===typeof e.config[t]?e.config[t].bind(Object(u.a)(Object(u.a)({},n),{},{parent:e.parent?El(e.parent,t,n):null})):e.config[t]}function Ol(e){return{baseExtensions:e.filter((function(e){return"extension"===e.type})),nodeExtensions:e.filter((function(e){return"node"===e.type})),markExtensions:e.filter((function(e){return"mark"===e.type}))}}function Dl(e){var t=[],n=Ol(e),r=n.nodeExtensions,o=n.markExtensions,i=[].concat(Object(Q.a)(r),Object(Q.a)(o)),a={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((function(e){var n=El(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});n&&n().forEach((function(e){e.types.forEach((function(n){Object.entries(e.attributes).forEach((function(e){var r=Object(Se.a)(e,2),o=r[0],i=r[1];t.push({type:n,name:o,attribute:Object(u.a)(Object(u.a)({},a),i)})}))}))}))})),i.forEach((function(e){var n={name:e.name,options:e.options,storage:e.storage},r=El(e,"addAttributes",n);if(r){var o=r();Object.entries(o).forEach((function(n){var r=Object(Se.a)(n,2),o=r[0],i=r[1],s=Object(u.a)(Object(u.a)({},a),i);i.isRequired&&void 0===i.default&&delete s.default,t.push({type:e.name,name:o,attribute:s})}))}})),t}function Sl(e,t){if("string"===typeof e){if(!t.nodes[e])throw Error("There is no node type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.nodes[e]}return e}function Cl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return!!e})).reduce((function(e,t){var n=Object(u.a)({},e);return Object.entries(t).forEach((function(e){var t=Object(Se.a)(e,2),r=t[0],o=t[1];n[r]?n[r]="class"===r?[n[r],o].join(" "):"style"===r?[n[r],o].join("; "):o:n[r]=o})),n}),{})}function _l(e,t){return t.filter((function(e){return e.attribute.rendered})).map((function(t){return t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:Object(X.a)({},t.name,e.attrs[t.name])})).reduce((function(e,t){return Cl(e,t)}),{})}function jl(e){return"function"===typeof e}function Al(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(jl(e)){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t?e.bind(t).apply(void 0,r):e.apply(void 0,r)}return e}function Tl(e,t){return e.style?e:Object(u.a)(Object(u.a)({},e),{},{getAttrs:function(n){var r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;var o=t.reduce((function(e,t){var r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!==typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null===r||void 0===r?e:Object(u.a)(Object(u.a)({},e),{},Object(X.a)({},t.name,r))}),{});return Object(u.a)(Object(u.a)({},r),o)}})}function Nl(e){return Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(Se.a)(e,2),n=t[0],r=t[1];return("attrs"!==n||!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length&&e.constructor===Object}(r))&&(null!==r&&void 0!==r)})))}function Ml(e){var t,n=Dl(e),r=Ol(e),o=r.nodeExtensions,i=r.markExtensions,a=null===(t=o.find((function(e){return El(e,"topNode")})))||void 0===t?void 0:t.name,s=Object.fromEntries(o.map((function(t){var r=n.filter((function(e){return e.type===t.name})),o={name:t.name,options:t.options,storage:t.storage},i=e.reduce((function(e,n){var r=El(n,"extendNodeSchema",o);return Object(u.a)(Object(u.a)({},e),r?r(t):{})}),{}),a=Nl(Object(u.a)(Object(u.a)({},i),{},{content:Al(El(t,"content",o)),marks:Al(El(t,"marks",o)),group:Al(El(t,"group",o)),inline:Al(El(t,"inline",o)),atom:Al(El(t,"atom",o)),selectable:Al(El(t,"selectable",o)),draggable:Al(El(t,"draggable",o)),code:Al(El(t,"code",o)),defining:Al(El(t,"defining",o)),isolating:Al(El(t,"isolating",o)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),s=Al(El(t,"parseHTML",o));s&&(a.parseDOM=s.map((function(e){return Tl(e,r)})));var c=El(t,"renderHTML",o);c&&(a.toDOM=function(e){return c({node:e,HTMLAttributes:_l(e,r)})});var l=El(t,"renderText",o);return l&&(a.toText=l),[t.name,a]}))),c=Object.fromEntries(i.map((function(t){var r=n.filter((function(e){return e.type===t.name})),o={name:t.name,options:t.options,storage:t.storage},i=e.reduce((function(e,n){var r=El(n,"extendMarkSchema",o);return Object(u.a)(Object(u.a)({},e),r?r(t):{})}),{}),a=Nl(Object(u.a)(Object(u.a)({},i),{},{inclusive:Al(El(t,"inclusive",o)),excludes:Al(El(t,"excludes",o)),group:Al(El(t,"group",o)),spanning:Al(El(t,"spanning",o)),code:Al(El(t,"code",o)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),s=Al(El(t,"parseHTML",o));s&&(a.parseDOM=s.map((function(e){return Tl(e,r)})));var c=El(t,"renderHTML",o);return c&&(a.toDOM=function(e){return c({mark:e,HTMLAttributes:_l(e,r)})}),[t.name,a]})));return new Qo({topNode:a,nodes:s,marks:c})}function Fl(e,t){return t.nodes[e]||t.marks[e]||null}function Bl(e,t){return Array.isArray(t)?t.some((function(t){return("string"===typeof t?t:t.name)===e.name})):t}function Rl(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Pl=v((function e(t){p(this,e),this.find=t.find,this.handler=t.handler}));function Il(e){var t,n=e.editor,r=e.from,o=e.to,i=e.text,a=e.rules,s=e.plugin,u=n.view;if(u.composing)return!1;var c=u.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((function(e){return e.type.spec.code}))))return!1;var l=!1,f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n="";return e.parent.nodesBetween(Math.max(0,e.parentOffset-t),e.parentOffset,(function(t,r,o,i){var a,s,u;n+=(null===(s=(a=t.type.spec).toText)||void 0===s?void 0:s.call(a,{node:t,pos:r,parent:o,index:i}))||(null===(u=e.nodeBefore)||void 0===u?void 0:u.text)||"%leaf%"})),n}(c)+i;return a.forEach((function(e){if(!l){var t=function(e,t){if(Rl(t))return t.exec(e);var n=t(e);if(!n)return null;var r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r}(f,e.find);if(t){var a=u.state.tr,c=kl({state:u.state,transaction:a}),d={from:r-(t[0].length-i.length),to:o},p=new wl({editor:n,state:c}),h=p.commands,v=p.chain,m=p.can;null!==e.handler({state:c,range:d,match:t,commands:h,chain:v,can:m})&&a.steps.length&&(a.setMeta(s,{transform:a,from:r,to:o,text:i}),u.dispatch(a),l=!0)}}})),l}function Ll(e){var t=e.editor,n=e.rules,r=new ga({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,o,i,a){return Il({editor:t,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:function(e){return setTimeout((function(){var o=e.state.selection.$cursor;o&&Il({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1}},handleKeyDown:function(e,o){if("Enter"!==o.key)return!1;var i=e.state.selection.$cursor;return!!i&&Il({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}var zl=v((function e(t){p(this,e),this.find=t.find,this.handler=t.handler}));function Ul(e){var t=e.editor,n=e.state,r=e.from,o=e.to,i=e.rule,a=new wl({editor:t,state:n}),s=a.commands,u=a.chain,c=a.can,l=[];return n.doc.nodesBetween(r,o,(function(e,t){if(e.isTextblock&&!e.type.spec.code){var a=Math.max(r,t),f=Math.min(o,t+e.content.size);(function(e,t){if(Rl(t))return Object(Q.a)(e.matchAll(t));var n=t(e);return n?n.map((function(t){var n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(a-t,f-t,void 0,"\ufffc"),i.find).forEach((function(e){if(void 0!==e.index){var t=a+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=i.handler({state:n,range:o,match:e,commands:s,chain:u,can:c});l.push(f)}}))}})),l.every((function(e){return null!==e}))}var Vl=function(){function e(t,n){var r=this;p(this,e),this.splittableMarks=[],this.editor=n,this.extensions=e.resolve(t),this.schema=Ml(this.extensions),this.extensions.forEach((function(e){var t;r.editor.extensionStorage[e.name]=e.storage;var n={name:e.name,options:e.options,storage:e.storage,editor:r.editor,type:Fl(e.name,r.schema)};"mark"===e.type&&((null===(t=Al(El(e,"keepOnSplit",n)))||void 0===t||t)&&r.splittableMarks.push(e.name));var o=El(e,"onBeforeCreate",n);o&&r.editor.on("beforeCreate",o);var i=El(e,"onCreate",n);i&&r.editor.on("create",i);var a=El(e,"onUpdate",n);a&&r.editor.on("update",a);var s=El(e,"onSelectionUpdate",n);s&&r.editor.on("selectionUpdate",s);var u=El(e,"onTransaction",n);u&&r.editor.on("transaction",u);var c=El(e,"onFocus",n);c&&r.editor.on("focus",c);var l=El(e,"onBlur",n);l&&r.editor.on("blur",l);var f=El(e,"onDestroy",n);f&&r.editor.on("destroy",f)}))}return v(e,[{key:"commands",get:function(){var e=this;return this.extensions.reduce((function(t,n){var r=El(n,"addCommands",{name:n.name,options:n.options,storage:n.storage,editor:e.editor,type:Fl(n.name,e.schema)});return r?Object(u.a)(Object(u.a)({},t),r()):t}),{})}},{key:"plugins",get:function(){var t=this,n=this.editor,r=e.sort(Object(Q.a)(this.extensions).reverse()),o=[],i=[],a=r.map((function(e){var r={name:e.name,options:e.options,storage:e.storage,editor:n,type:Fl(e.name,t.schema)},a=[],s=El(e,"addKeyboardShortcuts",r);if(s){var u=function(e){return new ga({props:{handleKeyDown:$c(e)}})}(Object.fromEntries(Object.entries(s()).map((function(e){var t=Object(Se.a)(e,2),r=t[0],o=t[1];return[r,function(){return o({editor:n})}]}))));a.push(u)}var c=El(e,"addInputRules",r);Bl(e,n.options.enableInputRules)&&c&&o.push.apply(o,Object(Q.a)(c()));var l=El(e,"addPasteRules",r);Bl(e,n.options.enablePasteRules)&&l&&i.push.apply(i,Object(Q.a)(l()));var f=El(e,"addProseMirrorPlugins",r);if(f){var d=f();a.push.apply(a,Object(Q.a)(d))}return a})).flat();return[Ll({editor:n,rules:o})].concat(Object(Q.a)(function(e){var t=e.editor,n=e.rules,r=null,o=!1,i=!1;return n.map((function(e){return new ga({view:function(e){var t=function(t){var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy:function(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:function(e){return i=r===e.dom.parentElement,!1},paste:function(e,t){var n,r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null===r||void 0===r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:function(n,r,a){var s=n[0],u="paste"===s.getMeta("uiEvent")&&!o,c="drop"===s.getMeta("uiEvent")&&!i;if(u||c){var l=r.doc.content.findDiffStart(a.doc.content),f=r.doc.content.findDiffEnd(a.doc.content);if("number"===typeof l&&f&&l!==f.b){var d=a.tr,p=kl({state:a,transaction:d});if(Ul({editor:t,state:p,from:Math.max(l-1,0),to:f.b,rule:e})&&d.steps.length)return d}}}})}))}({editor:n,rules:i})),Object(Q.a)(a))}},{key:"attributes",get:function(){return Dl(this.extensions)}},{key:"nodeViews",get:function(){var e=this,t=this.editor,n=Ol(this.extensions).nodeExtensions;return Object.fromEntries(n.filter((function(e){return!!El(e,"addNodeView")})).map((function(n){var r=e.attributes.filter((function(e){return e.type===n.name})),o={name:n.name,options:n.options,storage:n.storage,editor:t,type:Sl(n.name,e.schema)},i=El(n,"addNodeView",o);if(!i)return[];return[n.name,function(e,o,a,s){var u=_l(e,r);return i()({editor:t,node:e,getPos:a,decorations:s,HTMLAttributes:u,extension:n})}]})))}}],[{key:"resolve",value:function(t){var n=e.sort(e.flatten(t)),r=function(e){var t=e.filter((function(t,n){return e.indexOf(t)!==n}));return Object(Q.a)(new Set(t))}(n.map((function(e){return e.name})));return r.length&&console.warn("[tiptap warn]: Duplicate extension names found: [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"]. This can lead to issues.")),n}},{key:"flatten",value:function(e){var t=this;return e.map((function(e){var n=El(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return n?[e].concat(Object(Q.a)(t.flatten(n()))):e})).flat(10)}},{key:"sort",value:function(e){return e.sort((function(e,t){var n=El(e,"priority")||100,r=El(t,"priority")||100;return n>r?-1:n<r?1:0}))}}]),e}();function $l(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function Hl(e,t){var n=Object(u.a)({},e);return $l(e)&&$l(t)&&Object.keys(t).forEach((function(r){$l(t[r])&&r in e?n[r]=Hl(e[r],t[r]):Object.assign(n,Object(X.a)({},r,t[r]))})),n}var ql=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(u.a)(Object(u.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Al(El(this,"addOptions",{name:this.name}))),this.storage=Al(El(this,"addStorage",{name:this.name,options:this.options}))||{}}return v(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Hl(this.options,e),t.storage=Al(El(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Al(El(n,"addOptions",{name:n.name})),n.storage=Al(El(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function Wl(e,t,n){var r=t.from,o=t.to,i=n||{},a=i.blockSeparator,s=void 0===a?"\n\n":a,u=i.textSerializers,c=void 0===u?{}:u,l="",f=!0;return e.nodesBetween(r,o,(function(e,n,i,a){var u,d=null===c||void 0===c?void 0:c[e.type.name];d?(e.isBlock&&!f&&(l+=s,f=!0),i&&(l+=d({node:e,pos:n,parent:i,index:a,range:t}))):e.isText?(l+=null===(u=null===e||void 0===e?void 0:e.text)||void 0===u?void 0:u.slice(Math.max(r,n)-n,o-n),f=!1):e.isBlock&&!f&&(l+=s,f=!0)})),l}function Kl(e){return Object.fromEntries(Object.entries(e.nodes).filter((function(e){return Object(Se.a)(e,2)[1].spec.toText})).map((function(e){var t=Object(Se.a)(e,2);return[t[0],t[1].spec.toText]})))}var Gl=ql.create({name:"clipboardTextSerializer",addProseMirrorPlugins:function(){var e=this;return[new ga({key:new wa("clipboardTextSerializer"),props:{clipboardTextSerializer:function(){var t=e.editor,n=t.state,r=t.schema,o=n.doc,i=n.selection.ranges,a=Math.min.apply(Math,Object(Q.a)(i.map((function(e){return e.$from.pos})))),s=Math.max.apply(Math,Object(Q.a)(i.map((function(e){return e.$to.pos}))));return Wl(o,{from:a,to:s},{textSerializers:Kl(r)})}}})]}});function Yl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0},r=Object.keys(t);return!r.length||r.every((function(r){return n.strict?t[r]===e[r]:Rl(t[r])?t[r].test(e[r]):t[r]===e[r]}))}function Jl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.find((function(e){return e.type===t&&Yl(e.attrs,n)}))}function Ql(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!!Jl(e,t,n)}function Xl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t){var r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),r.node){var o=Jl(Object(Q.a)(r.node.marks),t,n);if(o){var i=r.index,a=e.start()+r.offset,s=i+1,u=a+r.node.nodeSize;for(Jl(Object(Q.a)(r.node.marks),t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,a-=e.parent.child(i).nodeSize;for(;s<e.parent.childCount&&Ql(Object(Q.a)(e.parent.child(s).marks),t,n);)u+=e.parent.child(s).nodeSize,s+=1;return{from:a,to:u}}}}}function Zl(e,t){if("string"===typeof e){if(!t.marks[e])throw Error("There is no mark type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.marks[e]}return e}function ef(e){return e&&"object"===typeof e&&!Array.isArray(e)&&!function(e){var t;return"class"===(null===(t=e.constructor)||void 0===t?void 0:t.toString().substring(0,5))}(e)}function tf(e){return ef(e)&&e instanceof ra}function nf(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(e,t),n)}function rf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;var n=Zi.atStart(e),r=Zi.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;var o=n.from,i=r.to;return"all"===t?ra.create(e,nf(0,o,i),nf(e.content.size,o,i)):ra.create(e,nf(t,o,i),nf(t,o,i))}function of(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function af(e){var t="<body>".concat(e,"</body>");return(new window.DOMParser).parseFromString(t,"text/html").body}function sf(e,t,n){if(n=Object(u.a)({slice:!0,parseOptions:{}},n),"object"===typeof e&&null!==e)try{return Array.isArray(e)?uo.fromArray(e.map((function(e){return t.nodeFromJSON(e)}))):t.nodeFromJSON(e)}catch(o){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),sf("",t,n)}if("string"===typeof e){var r=Zo.fromSchema(t);return n.slice?r.parseSlice(af(e),n.parseOptions).content:r.parse(af(e),n.parseOptions)}return sf("",t,n)}function uf(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}function cf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.from,i=r.to,a=r.empty,s=t?Sl(t,e.schema):null,u=[];e.doc.nodesBetween(o,i,(function(e,t){if(!e.isText){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);u.push({node:e,from:n,to:r})}}));var c=i-o,l=u.filter((function(e){return!s||s.name===e.node.type.name})).filter((function(e){return Yl(e.node.attrs,n,{strict:!1})}));if(a)return!!l.length;var f=l.reduce((function(e,t){return e+t.to-t.from}),0);return f>=c}function lf(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function ff(e,t){var n="string"===typeof t?[t]:t;return Object.keys(e).reduce((function(t,r){return n.includes(r)||(t[r]=e[r]),t}),{})}function df(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return sf(e,t,{slice:!1,parseOptions:n})}function pf(e,t){var n=Zl(t,e.schema),r=e.selection,o=r.from,i=r.to,a=r.empty,s=[];a?(e.storedMarks&&s.push.apply(s,Object(Q.a)(e.storedMarks)),s.push.apply(s,Object(Q.a)(e.selection.$head.marks()))):e.doc.nodesBetween(o,i,(function(e){s.push.apply(s,Object(Q.a)(e.marks))}));var c=s.find((function(e){return e.type.name===n.name}));return c?Object(u.a)({},c.attrs):{}}function hf(e,t,n){return Object.fromEntries(Object.entries(n).filter((function(n){var r=Object(Se.a)(n,1)[0],o=e.find((function(e){return e.type===t&&e.name===r}));return!!o&&o.attribute.keepOnSplit})))}function vf(e){for(var t=0;t<e.edgeCount;t+=1){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function mf(e,t){var n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){var r=n.filter((function(e){return null===t||void 0===t?void 0:t.includes(e.type.name)}));e.tr.ensureMarks(r)}}function yf(e){return function(t){return function(e,t){for(var n=e.depth;n>0;n-=1){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}}function gf(e,t){var n=Ol(t).nodeExtensions.find((function(t){return t.name===e}));if(!n)return!1;var r=Al(El(n,"group",{name:n.name,options:n.options,storage:n.storage}));return"string"===typeof r&&r.split(" ").includes("list")}var bf=function(e,t){var n=yf((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Ri(e.doc,n.pos)||(e.join(n.pos),!0)},kf=function(e,t){var n=yf((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Ri(e.doc,r)||(e.join(r),!0)};function wf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.empty,i=r.ranges,a=t?Zl(t,e.schema):null;if(o)return!!(e.storedMarks||e.selection.$from.marks()).filter((function(e){return!a||a.name===e.type.name})).find((function(e){return Yl(e.attrs,n,{strict:!1})}));var s=0,u=[];if(i.forEach((function(t){var n=t.$from,r=t.$to,o=n.pos,i=r.pos;e.doc.nodesBetween(o,i,(function(e,t){if(e.isText||e.marks.length){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);s+=r-n,u.push.apply(u,Object(Q.a)(e.marks.map((function(e){return{mark:e,from:n,to:r}}))))}}))})),0===s)return!1;var c=u.filter((function(e){return!a||a.name===e.mark.type.name})).filter((function(e){return Yl(e.mark.attrs,n,{strict:!1})})).reduce((function(e,t){return e+t.to-t.from}),0),l=u.filter((function(e){return!a||e.mark.type!==a&&e.mark.type.excludes(a)})).reduce((function(e,t){return e+t.to-t.from}),0),f=c>0?c+l:c;return f>=s}var xf=Object.freeze({__proto__:null,blur:function(){return function(e){var t=e.editor,n=e.view;return requestAnimationFrame((function(){var e;t.isDestroyed||(n.dom.blur(),null===(e=null===window||void 0===window?void 0:window.getSelection())||void 0===e||e.removeAllRanges())})),!0}},clearContent:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t){return t.commands.setContent("",e)}},clearNodes:function(){return function(e){var t=e.state,n=e.tr,r=e.dispatch,o=n.selection.ranges;return!r||(o.forEach((function(e){var r=e.$from,o=e.$to;t.doc.nodesBetween(r.pos,o.pos,(function(e,t){if(!e.type.isText){var r=n.doc,o=n.mapping,i=r.resolve(o.map(t)),a=r.resolve(o.map(t+e.nodeSize)),s=i.blockRange(a);if(s){var u=Ci(s);if(e.type.isTextblock){var c=i.parent.contentMatchAt(i.index()).defaultType;n.setNodeMarkup(s.start,c)}(u||0===u)&&n.lift(s,u)}}}))})),!0)}},command:function(e){return function(t){return e(t)}},createParagraphNear:function(){return function(e){var t=e.state,n=e.dispatch;return nl(t,n)}},deleteNode:function(e){return function(t){for(var n=t.tr,r=t.state,o=t.dispatch,i=Sl(e,r.schema),a=n.selection.$anchor,s=a.depth;s>0;s-=1){if(a.node(s).type===i){if(o){var u=a.before(s),c=a.after(s);n.delete(u,c).scrollIntoView()}return!0}}return!1}},deleteRange:function(e){return function(t){var n=t.tr,r=t.dispatch,o=e.from,i=e.to;return r&&n.delete(o,i),!0}},deleteSelection:function(){return function(e){var t=e.state,n=e.dispatch;return Hc(t,n)}},enter:function(){return function(e){return e.commands.keyboardShortcut("Enter")}},exitCode:function(){return function(e){var t=e.state,n=e.dispatch;return tl(t,n)}},extendMarkRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=Zl(e,o.schema),s=r.doc,u=r.selection,c=u.$from,l=u.from,f=u.to;if(i){var d=Xl(c,a,t);if(d&&d.from<=l&&d.to>=f){var p=ra.create(s,d.from,d.to);r.setSelection(p)}}return!0}},first:function(e){return function(t){for(var n="function"===typeof e?e(t):e,r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1}},focus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.editor,o=n.view,i=n.tr,a=n.dispatch;t=Object(u.a)({scrollIntoView:!0},t);var s=function(){of()&&o.dom.focus(),requestAnimationFrame((function(){r.isDestroyed||(o.focus(),(null===t||void 0===t?void 0:t.scrollIntoView)&&r.commands.scrollIntoView())}))};if(o.hasFocus()&&null===e||!1===e)return!0;if(a&&null===e&&!tf(r.state.selection))return s(),!0;var c=rf(i.doc,e)||r.state.selection,l=r.state.selection.eq(c);return a&&(l||i.setSelection(c),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0}},forEach:function(e,t){return function(n){return e.every((function(e,r){return t(e,Object(u.a)(Object(u.a)({},n),{},{index:r}))}))}},insertContent:function(e,t){return function(n){var r=n.tr;return n.commands.insertContentAt({from:r.selection.from,to:r.selection.to},e,t)}},insertContentAt:function(e,t,n){return function(r){var o=r.tr,i=r.dispatch,a=r.editor;if(i){n=Object(u.a)({parseOptions:{},updateSelection:!0},n);var s=sf(t,a.schema,{parseOptions:Object(u.a)({preserveWhitespace:"full"},n.parseOptions)});if("<>"===s.toString())return!0;var c="number"===typeof e?{from:e,to:e}:e,l=c.from,f=c.to,d=!0,p=!0;if((s.toString().startsWith("<")?s:[s]).forEach((function(e){e.check(),d=!!d&&(e.isText&&0===e.marks.length),p=!!p&&e.isBlock})),l===f&&p){var h=o.doc.resolve(l).parent;h.isTextblock&&!h.type.spec.code&&!h.childCount&&(l-=1,f+=1)}d?o.insertText(t,l,f):o.replaceWith(l,f,s),n.updateSelection&&function(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o=e.steps[r];if(o instanceof Ei||o instanceof Oi){var i=e.mapping.maps[r],a=0;i.forEach((function(e,t,n,r){0===a&&(a=r)})),e.setSelection(Zi.near(e.doc.resolve(a),n))}}}(o,o.steps.length-1,-1)}return!0}},joinBackward:function(){return function(e){var t=e.state,n=e.dispatch;return qc(t,n)}},joinForward:function(){return function(e){var t=e.state,n=e.dispatch;return Yc(t,n)}},keyboardShortcut:function(e){return function(t){var n=t.editor,r=t.view,o=t.tr,i=t.dispatch,a=function(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"===a&&(a=" ");for(var s=0;s<i.length-1;s+=1){var u=i[s];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: ".concat(u));of()||uf()?o=!0:n=!0}}return t&&(a="Alt-".concat(a)),n&&(a="Ctrl-".concat(a)),o&&(a="Meta-".concat(a)),r&&(a="Shift-".concat(a)),a}(e).split(/-(?!$)/),s=a.find((function(e){return!["Alt","Ctrl","Meta","Shift"].includes(e)})),u=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),c=n.captureTransaction((function(){r.someProp("handleKeyDown",(function(e){return e(r,u)}))}));return null===c||void 0===c||c.steps.forEach((function(e){var t=e.map(o.mapping);t&&i&&o.maybeStep(t)})),!0}},lift:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return!!cf(r,Sl(e,r.schema),t)&&Xc(r,o)}},liftEmptyBlock:function(){return function(e){var t=e.state,n=e.dispatch;return rl(t,n)}},liftListItem:function(e){return function(t){var n=t.state,r=t.dispatch;return bl(Sl(e,n.schema))(n,r)}},newlineInCode:function(){return function(e){var t=e.state,n=e.dispatch;return Zc(t,n)}},resetAttributes:function(e,t){return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,u=lf("string"===typeof e?e:e.name,o.schema);return!!u&&("node"===u&&(a=Sl(e,o.schema)),"mark"===u&&(s=Zl(e,o.schema)),i&&r.selection.ranges.forEach((function(e){o.doc.nodesBetween(e.$from.pos,e.$to.pos,(function(e,n){a&&a===e.type&&r.setNodeMarkup(n,void 0,ff(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((function(o){s===o.type&&r.addMark(n,n+e.nodeSize,s.create(ff(o.attrs,t)))}))}))})),!0)}},scrollIntoView:function(){return function(e){var t=e.tr;return e.dispatch&&t.scrollIntoView(),!0}},selectAll:function(){return function(e){var t=e.tr;return e.commands.setTextSelection({from:0,to:t.doc.content.size})}},selectNodeBackward:function(){return function(e){var t=e.state,n=e.dispatch;return Kc(t,n)}},selectNodeForward:function(){return function(e){var t=e.state,n=e.dispatch;return Jc(t,n)}},selectParentNode:function(){return function(e){return function(e,t){var n,r=e.selection,o=r.$from,i=r.to,a=o.sharedDepth(i);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(ia.create(e.doc,n))),!0)}(e.state,e.dispatch)}},selectTextblockEnd:function(){return function(e){var t=e.state,n=e.dispatch;return ul(t,n)}},selectTextblockStart:function(){return function(e){var t=e.state,n=e.dispatch;return sl(t,n)}},setContent:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.tr,i=r.editor,a=r.dispatch,s=o.doc,u=df(e,i.schema,n);return a&&o.replaceWith(0,s.content.size,u).setMeta("preventUpdate",!t),!0}},setMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=r.selection,s=a.empty,c=a.ranges,l=Zl(e,o.schema);if(i)if(s){var f=pf(o,l);r.addStoredMark(l.create(Object(u.a)(Object(u.a)({},f),t)))}else c.forEach((function(e){var n=e.$from.pos,i=e.$to.pos;o.doc.nodesBetween(n,i,(function(e,o){var a=Math.max(o,n),s=Math.min(o+e.nodeSize,i);e.marks.find((function(e){return e.type===l}))?e.marks.forEach((function(e){l===e.type&&r.addMark(a,s,l.create(Object(u.a)(Object(u.a)({},e.attrs),t)))})):r.addMark(a,s,l.create(t))}))}));return!0}},setMeta:function(e,t){return function(n){return n.tr.setMeta(e,t),!0}},setNode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch,i=n.chain,a=Sl(e,r.schema);return a.isTextblock?i().command((function(e){var n=e.commands;return!!ll(a,t)(r)||n.clearNodes()})).command((function(e){var n=e.state;return ll(a,t)(n,o)})).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}},setNodeSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o=Zi.atStart(r).from,i=Zi.atEnd(r).to,a=nf(e,o,i),s=ia.create(r,a);n.setSelection(s)}return!0}},setTextSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o="number"===typeof e?{from:e,to:e}:e,i=o.from,a=o.to,s=ra.atStart(r).from,u=ra.atEnd(r).to,c=nf(i,s,u),l=nf(a,s,u),f=ra.create(r,c,l);n.setSelection(f)}return!0}},sinkListItem:function(e){return function(t){var n,r=t.state,o=t.dispatch,i=Sl(e,r.schema);return(n=i,function(e,t){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount>0&&e.firstChild.type==n}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var u=a.parent,c=u.child(s-1);if(c.type!=n)return!1;if(t){var l=c.lastChild&&c.lastChild.type==u.type,f=uo.from(l?n.create():null),d=new vo(uo.from(n.create(null,uo.from(u.type.create(null,f)))),l?3:1,0),p=a.start,h=a.end;t(e.tr.step(new Oi(p-(l?3:1),h,p,h,d,1,!0)).scrollIntoView())}return!0})(r,o)}},splitBlock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.keepMarks,n=void 0===t||t;return function(e){var t=e.tr,r=e.state,o=e.dispatch,i=e.editor,a=t.selection,s=t.doc,u=a.$from,c=a.$to,l=hf(i.extensionManager.attributes,u.node().type.name,u.node().attrs);if(a instanceof ia&&a.node.isBlock)return!(!u.parentOffset||!Fi(s,u.pos))&&(o&&(n&&mf(r,i.extensionManager.splittableMarks),t.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;if(o){var f=c.parentOffset===c.parent.content.size;a instanceof ra&&t.deleteSelection();var d=0===u.depth?void 0:vf(u.node(-1).contentMatchAt(u.indexAfter(-1))),p=f&&d?[{type:d,attrs:l}]:void 0,h=Fi(t.doc,t.mapping.map(u.pos),1,p);if(p||h||!Fi(t.doc,t.mapping.map(u.pos),1,d?[{type:d}]:void 0)||(h=!0,p=d?[{type:d,attrs:l}]:void 0),h&&(t.split(t.mapping.map(u.pos),1,p),d&&!f&&!u.parentOffset&&u.parent.type!==d)){var v=t.mapping.map(u.before()),m=t.doc.resolve(v);u.node(-1).canReplaceWith(m.index(),m.index()+1,d)&&t.setNodeMarkup(t.mapping.map(u.before()),d)}n&&mf(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0}},splitListItem:function(e){return function(t){var n,r=t.tr,o=t.state,i=t.dispatch,a=t.editor,s=Sl(e,o.schema),u=o.selection,c=u.$from,l=u.$to,f=o.selection.node;if(f&&f.isBlock||c.depth<2||!c.sameParent(l))return!1;var d=c.node(-1);if(d.type!==s)return!1;var p=a.extensionManager.attributes;if(0===c.parent.content.size&&c.node(-1).childCount===c.indexAfter(-1)){if(2===c.depth||c.node(-3).type!==s||c.index(-2)!==c.node(-2).childCount-1)return!1;if(i){for(var h=uo.empty,v=c.index(-1)?1:c.index(-2)?2:3,m=c.depth-v;m>=c.depth-3;m-=1)h=uo.from(c.node(m).copy(h));var y=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,g=hf(p,c.node().type.name,c.node().attrs),b=(null===(n=s.contentMatch.defaultType)||void 0===n?void 0:n.createAndFill(g))||void 0;h=h.append(uo.from(s.createAndFill(null,b)||void 0));var k=c.before(c.depth-(v-1));r.replace(k,c.after(-y),new vo(h,4-v,0));var w=-1;r.doc.nodesBetween(k,r.doc.content.size,(function(e,t){if(w>-1)return!1;e.isTextblock&&0===e.content.size&&(w=t+1)})),w>-1&&r.setSelection(ra.near(r.doc.resolve(w))),r.scrollIntoView()}return!0}var x=l.pos===c.end()?d.contentMatchAt(0).defaultType:null,E=hf(p,d.type.name,d.attrs),O=hf(p,c.node().type.name,c.node().attrs);r.delete(c.pos,l.pos);var D=x?[{type:s,attrs:E},{type:x,attrs:O}]:[{type:s,attrs:E}];return!!Fi(r.doc,c.pos,2)&&(i&&r.split(c.pos,2,D).scrollIntoView(),!0)}},toggleList:function(e,t){return function(n){var r=n.editor,o=n.tr,i=n.state,a=n.dispatch,s=n.chain,u=n.commands,c=n.can,l=r.extensionManager.extensions,f=Sl(e,i.schema),d=Sl(t,i.schema),p=i.selection,h=p.$from,v=p.$to,m=h.blockRange(v);if(!m)return!1;var y=yf((function(e){return gf(e.type.name,l)}))(p);if(m.depth>=1&&y&&m.depth-y.depth<=1){if(y.node.type===f)return u.liftListItem(d);if(gf(y.node.type.name,l)&&f.validContent(y.node.content)&&a)return s().command((function(){return o.setNodeMarkup(y.pos,f),!0})).command((function(){return bf(o,f)})).command((function(){return kf(o,f)})).run()}return s().command((function(){return!!c().wrapInList(f)||u.clearNodes()})).wrapInList(f).command((function(){return bf(o,f)})).command((function(){return kf(o,f)})).run()}},toggleMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=n.extendEmptyMarkRange,s=void 0!==a&&a,u=Zl(e,o.schema);return wf(o,u,t)?i.unsetMark(u,{extendEmptyMarkRange:s}):i.setMark(u,t)}},toggleNode:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=Sl(e,o.schema),s=Sl(t,o.schema);return cf(o,a,n)?i.setNode(s):i.setNode(a,n)}},toggleWrap:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.commands,i=Sl(e,r.schema);return cf(r,i,t)?o.lift(i):o.wrapIn(i,t)}},undoInputRule:function(){return function(e){for(var t=e.state,n=e.dispatch,r=t.plugins,o=0;o<r.length;o+=1){var i=r[o],a=void 0;if(i.spec.isInputRules&&(a=i.getState(t))){if(n){for(var s=t.tr,u=a.transform,c=u.steps.length-1;c>=0;c-=1)s.step(u.steps[c].invert(u.docs[c]));if(a.text){var l=s.doc.resolve(a.from).marks();s.replaceWith(a.from,a.to,t.schema.text(a.text,l))}else s.delete(a.from,a.to)}return!0}}return!1}},unsetAllMarks:function(){return function(e){var t=e.tr,n=e.dispatch,r=t.selection,o=r.empty,i=r.ranges;return o||n&&i.forEach((function(e){t.removeMark(e.$from.pos,e.$to.pos)})),!0}},unsetMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r,o=n.tr,i=n.state,a=n.dispatch,s=t.extendEmptyMarkRange,u=void 0!==s&&s,c=o.selection,l=Zl(e,i.schema),f=c.$from,d=c.empty,p=c.ranges;if(!a)return!0;if(d&&u){var h=c.from,v=c.to,m=null===(r=f.marks().find((function(e){return e.type===l})))||void 0===r?void 0:r.attrs,y=Xl(f,l,m);y&&(h=y.from,v=y.to),o.removeMark(h,v,l)}else p.forEach((function(e){o.removeMark(e.$from.pos,e.$to.pos,l)}));return o.removeStoredMark(l),!0}},updateAttributes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,c=lf("string"===typeof e?e:e.name,o.schema);return!!c&&("node"===c&&(a=Sl(e,o.schema)),"mark"===c&&(s=Zl(e,o.schema)),i&&r.selection.ranges.forEach((function(e){var n=e.$from.pos,i=e.$to.pos;o.doc.nodesBetween(n,i,(function(e,o){a&&a===e.type&&r.setNodeMarkup(o,void 0,Object(u.a)(Object(u.a)({},e.attrs),t)),s&&e.marks.length&&e.marks.forEach((function(a){if(s===a.type){var c=Math.max(o,n),l=Math.min(o+e.nodeSize,i);r.addMark(c,l,s.create(Object(u.a)(Object(u.a)({},a.attrs),t)))}}))}))})),!0)}},wrapIn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return cl(Sl(e,r.schema),t)(r,o)}},wrapInList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return yl(Sl(e,r.schema),t)(r,o)}}}),Ef=ql.create({name:"commands",addCommands:function(){return Object(u.a)({},xf)}}),Of=ql.create({name:"editable",addProseMirrorPlugins:function(){var e=this;return[new ga({key:new wa("editable"),props:{editable:function(){return e.editor.options.editable}}})]}}),Df=ql.create({name:"focusEvents",addProseMirrorPlugins:function(){var e=this.editor;return[new ga({key:new wa("focusEvents"),props:{handleDOMEvents:{focus:function(t,n){e.isFocused=!0;var r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:function(t,n){e.isFocused=!1;var r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),Sf=ql.create({name:"keymap",addKeyboardShortcuts:function(){var e=this,t=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.undoInputRule()},function(){return t.command((function(e){var n=e.tr,r=n.selection,o=n.doc,i=r.empty,a=r.$anchor,s=a.pos,u=a.parent,c=Zi.atStart(o).from===s;return!(!(i&&c&&u.type.isTextblock)||u.textContent.length)&&t.clearNodes()}))},function(){return t.deleteSelection()},function(){return t.joinBackward()},function(){return t.selectNodeBackward()}]}))},n=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.deleteSelection()},function(){return t.joinForward()},function(){return t.selectNodeForward()}]}))},r={Enter:function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.newlineInCode()},function(){return t.createParagraphNear()},function(){return t.liftEmptyBlock()},function(){return t.splitBlock()}]}))},"Mod-Enter":function(){return e.editor.commands.exitCode()},Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:n,"Mod-Delete":n,"Mod-a":function(){return e.editor.commands.selectAll()}},o=Object(u.a)({},r),i=Object(u.a)(Object(u.a)({},r),{},{"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":n,"Ctrl-Alt-Backspace":n,"Alt-Delete":n,"Alt-d":n,"Ctrl-a":function(){return e.editor.commands.selectTextblockStart()},"Ctrl-e":function(){return e.editor.commands.selectTextblockEnd()}});return of()||uf()?i:o},addProseMirrorPlugins:function(){var e=this;return[new ga({key:new wa("clearDocument"),appendTransaction:function(t,n,r){if(t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc)){var o=n.selection,i=o.empty,a=o.from,s=o.to,u=Zi.atStart(n.doc).from,c=Zi.atEnd(n.doc).to,l=a===u&&s===c,f=0===r.doc.textBetween(0,r.doc.content.size," "," ").length;if(!i&&l&&f){var d=r.tr,p=kl({state:r,transaction:d});if(new wl({editor:e.editor,state:p}).commands.clearNodes(),d.steps.length)return d}}}})]}}),Cf=ql.create({name:"tabindex",addProseMirrorPlugins:function(){return[new ga({key:new wa("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}}),_f=Object.freeze({__proto__:null,ClipboardTextSerializer:Gl,Commands:Ef,Editable:Of,FocusEvents:Df,Keymap:Sf,Tabindex:Cf});function jf(e,t){var n=lf("string"===typeof t?t:t.name,e.schema);return"node"===n?function(e,t){var n=Sl(t,e.schema),r=e.selection,o=r.from,i=r.to,a=[];e.doc.nodesBetween(o,i,(function(e){a.push(e)}));var s=a.reverse().find((function(e){return e.type.name===n.name}));return s?Object(u.a)({},s.attrs):{}}(e,t):"mark"===n?pf(e,t):{}}function Af(e,t){var n=ci.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function Tf(e,t){return Wl(e,{from:0,to:e.content.size},t)}var Nf=function(e){y(n,e);var t=x(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(this,n),(e=t.call(this)).isFocused=!1,e.extensionStorage={},e.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:function(){return null},onCreate:function(){return null},onUpdate:function(){return null},onSelectionUpdate:function(){return null},onTransaction:function(){return null},onFocus:function(){return null},onBlur:function(){return null},onDestroy:function(){return null}},e.isCapturingTransaction=!1,e.capturedTransaction=null,e.setOptions(r),e.createExtensionManager(),e.createCommandManager(),e.createSchema(),e.on("beforeCreate",e.options.onBeforeCreate),e.emit("beforeCreate",{editor:k(e)}),e.createView(),e.injectCSS(),e.on("create",e.options.onCreate),e.on("update",e.options.onUpdate),e.on("selectionUpdate",e.options.onSelectionUpdate),e.on("transaction",e.options.onTransaction),e.on("focus",e.options.onFocus),e.on("blur",e.options.onBlur),e.on("destroy",e.options.onDestroy),window.setTimeout((function(){e.isDestroyed||(e.commands.focus(e.options.autofocus),e.emit("create",{editor:k(e)}))}),0),e}return v(n,[{key:"storage",get:function(){return this.extensionStorage}},{key:"commands",get:function(){return this.commandManager.commands}},{key:"chain",value:function(){return this.commandManager.chain()}},{key:"can",value:function(){return this.commandManager.can()}},{key:"injectCSS",value:function(){this.options.injectCSS&&document&&(this.css=function(e,t){var n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=Object(u.a)(Object(u.a)({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}},{key:"setEditable",value:function(e){this.setOptions({editable:e})}},{key:"isEditable",get:function(){return this.options.editable&&this.view&&this.view.editable}},{key:"state",get:function(){return this.view.state}},{key:"registerPlugin",value:function(e,t){var n=jl(t)?t(e,Object(Q.a)(this.state.plugins)):[].concat(Object(Q.a)(this.state.plugins),[e]),r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(e){if(!this.isDestroyed){var t="string"===typeof e?"".concat(e,"$"):e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((function(e){return!e.key.startsWith(t)}))});this.view.updateState(n)}}},{key:"createExtensionManager",value:function(){var e=this.options.enableCoreExtensions?Object.values(_f):[],t=[].concat(Object(Q.a)(e),Object(Q.a)(this.options.extensions)).filter((function(e){return["extension","node","mark"].includes(null===e||void 0===e?void 0:e.type)}));this.extensionManager=new Vl(t,this)}},{key:"createCommandManager",value:function(){this.commandManager=new wl({editor:this})}},{key:"createSchema",value:function(){this.schema=this.extensionManager.schema}},{key:"createView",value:function(){var e=df(this.options.content,this.schema,this.options.parseOptions),t=rf(e,this.options.autofocus);this.view=new Oc(this.options.element,Object(u.a)(Object(u.a)({},this.options.editorProps),{},{dispatchTransaction:this.dispatchTransaction.bind(this),state:ma.create({doc:e,selection:t||void 0})}));var n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.view.dom.editor=this}},{key:"createNodeViews",value:function(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}},{key:"captureTransaction",value:function(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;var t=this.capturedTransaction;return this.capturedTransaction=null,t}},{key:"dispatchTransaction",value:function(e){var t=this;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((function(e){var n;return null===(n=t.capturedTransaction)||void 0===n?void 0:n.step(e)})):void(this.capturedTransaction=e);var n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});var o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}},{key:"getAttributes",value:function(e){return jf(this.state,e)}},{key:"isActive",value:function(e,t){var n="string"===typeof e?e:null,r="string"===typeof e?t:e;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return cf(e,null,n)||wf(e,null,n);var r=lf(t,e.schema);return"node"===r?cf(e,t,n):"mark"===r&&wf(e,t,n)}(this.state,n,r)}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"getHTML",value:function(){return Af(this.state.doc.content,this.schema)}},{key:"getText",value:function(e){var t=e||{},n=t.blockSeparator,r=void 0===n?"\n\n":n,o=t.textSerializers,i=void 0===o?{}:o;return Tf(this.state.doc,{blockSeparator:r,textSerializers:Object(u.a)(Object(u.a)({},i),Kl(this.schema))})}},{key:"isEmpty",get:function(){return function(e){var t,n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}},{key:"getCharacterCount",value:function(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}},{key:"destroy",value:function(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}},{key:"isDestroyed",get:function(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}]),n}(xl);function Mf(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,n={};return e.filter((function(e){var r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter((function(e,n){return!t.filter((function(e,t){return t!==n})).some((function(t){return e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to}))}))}function Ff(e,t,n){var r=[];return e===t?n.resolve(e).marks().forEach((function(t){var o=Xl(n.resolve(e-1),t.type);o&&r.push(Object(u.a)({mark:t},o))})):n.nodesBetween(e,t,(function(e,t){r.push.apply(r,Object(Q.a)(e.marks.map((function(n){return{from:t,to:t+e.nodeSize,mark:n}}))))})),r}function Bf(e,t,n){var r=e.state.doc.content.size,o=nf(t,0,r),i=nf(n,0,r),a=e.coordsAtPos(o),s=e.coordsAtPos(i,-1),c=Math.min(a.top,s.top),l=Math.max(a.bottom,s.bottom),f=Math.min(a.left,s.left),d=Math.max(a.right,s.right),p={top:c,bottom:l,left:f,right:d,width:d-f,height:l-c,x:f,y:c};return Object(u.a)(Object(u.a)({},p),{},{toJSON:function(){return p}})}var Rf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(u.a)(Object(u.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Al(El(this,"addOptions",{name:this.name}))),this.storage=Al(El(this,"addStorage",{name:this.name,options:this.options}))||{}}return v(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Hl(this.options,e),t.storage=Al(El(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Al(El(n,"addOptions",{name:n.name})),n.storage=Al(El(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}(),Pf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(u.a)(Object(u.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Al(El(this,"addOptions",{name:this.name}))),this.storage=Al(El(this,"addStorage",{name:this.name,options:this.options}))||{}}return v(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Hl(this.options,e),t.storage=Al(El(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Al(El(n,"addOptions",{name:n.name})),n.storage=Al(El(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function If(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Lf(e){return e instanceof If(e).Element||e instanceof Element}function zf(e){return e instanceof If(e).HTMLElement||e instanceof HTMLElement}function Uf(e){return"undefined"!==typeof ShadowRoot&&(e instanceof If(e).ShadowRoot||e instanceof ShadowRoot)}var Vf=Math.max,$f=Math.min,Hf=Math.round;function qf(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(zf(e)&&t){var i=e.offsetHeight,a=e.offsetWidth;a>0&&(r=Hf(n.width)/a||1),i>0&&(o=Hf(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function Wf(e){var t=If(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Kf(e){return e?(e.nodeName||"").toLowerCase():null}function Gf(e){return((Lf(e)?e.ownerDocument:e.document)||window.document).documentElement}function Yf(e){return qf(Gf(e)).left+Wf(e).scrollLeft}function Jf(e){return If(e).getComputedStyle(e)}function Qf(e){var t=Jf(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Xf(e,t,n){void 0===n&&(n=!1);var r=zf(t),o=zf(t)&&function(e){var t=e.getBoundingClientRect(),n=Hf(t.width)/e.offsetWidth||1,r=Hf(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=Gf(t),a=qf(e,o),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==Kf(t)||Qf(i))&&(s=function(e){return e!==If(e)&&zf(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:Wf(e);var t}(t)),zf(t)?((u=qf(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=Yf(i))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function Zf(e){var t=qf(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function ed(e){return"html"===Kf(e)?e:e.assignedSlot||e.parentNode||(Uf(e)?e.host:null)||Gf(e)}function td(e){return["html","body","#document"].indexOf(Kf(e))>=0?e.ownerDocument.body:zf(e)&&Qf(e)?e:td(ed(e))}function nd(e,t){var n;void 0===t&&(t=[]);var r=td(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=If(r),a=o?[i].concat(i.visualViewport||[],Qf(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(nd(ed(a)))}function rd(e){return["table","td","th"].indexOf(Kf(e))>=0}function od(e){return zf(e)&&"fixed"!==Jf(e).position?e.offsetParent:null}function id(e){for(var t=If(e),n=od(e);n&&rd(n)&&"static"===Jf(n).position;)n=od(n);return n&&("html"===Kf(n)||"body"===Kf(n)&&"static"===Jf(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&zf(e)&&"fixed"===Jf(e).position)return null;var n=ed(e);for(Uf(n)&&(n=n.host);zf(n)&&["html","body"].indexOf(Kf(n))<0;){var r=Jf(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var ad="top",sd="bottom",ud="right",cd="left",ld="auto",fd=[ad,sd,ud,cd],dd="start",pd="end",hd="viewport",vd="popper",md=fd.reduce((function(e,t){return e.concat([t+"-"+dd,t+"-"+pd])}),[]),yd=[].concat(fd,[ld]).reduce((function(e,t){return e.concat([t,t+"-"+dd,t+"-"+pd])}),[]),gd=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function bd(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function kd(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var wd={placement:"bottom",modifiers:[],strategy:"absolute"};function xd(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function Ed(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?wd:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},wd,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,u={state:o,setOptions:function(n){var s="function"===typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:Lf(e)?nd(e):e.contextElement?nd(e.contextElement):[],popper:nd(t)};var l=function(e){var t=bd(e);return gd.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=l.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"===typeof i){var s=i({state:o,name:t,instance:u,options:r}),c=function(){};a.push(s||c)}})),u.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(xd(t,n)){o.rects={reference:Xf(t,id(n),"fixed"===o.options.strategy),popper:Zf(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,l=void 0===c?{}:c,f=i.name;"function"===typeof a&&(o=a({state:o,options:l,name:f,instance:u})||o)}else o.reset=!1,r=-1}}},update:kd((function(){return new Promise((function(e){u.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!xd(e,t))return u;function c(){a.forEach((function(e){return e()})),a=[]}return u.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Od={passive:!0};function Dd(e){return e.split("-")[0]}function Sd(e){return e.split("-")[1]}function Cd(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _d(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Dd(o):null,a=o?Sd(o):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case ad:t={x:s,y:n.y-r.height};break;case sd:t={x:s,y:n.y+n.height};break;case ud:t={x:n.x+n.width,y:u};break;case cd:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var c=i?Cd(i):null;if(null!=c){var l="y"===c?"height":"width";switch(a){case dd:t[c]=t[c]-(n[l]/2-r[l]/2);break;case pd:t[c]=t[c]+(n[l]/2-r[l]/2)}}return t}var jd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ad(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,f=e.isFixed,d=a.x,p=void 0===d?0:d,h=a.y,v=void 0===h?0:h,m="function"===typeof l?l({x:p,y:v}):{x:p,y:v};p=m.x,v=m.y;var y=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=cd,k=ad,w=window;if(c){var x=id(n),E="clientHeight",O="clientWidth";if(x===If(n)&&"static"!==Jf(x=Gf(n)).position&&"absolute"===s&&(E="scrollHeight",O="scrollWidth"),o===ad||(o===cd||o===ud)&&i===pd)k=sd,v-=(f&&x===w&&w.visualViewport?w.visualViewport.height:x[E])-r.height,v*=u?1:-1;if(o===cd||(o===ad||o===sd)&&i===pd)b=ud,p-=(f&&x===w&&w.visualViewport?w.visualViewport.width:x[O])-r.width,p*=u?1:-1}var D,S=Object.assign({position:s},c&&jd),C=!0===l?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:Hf(t*r)/r||0,y:Hf(n*r)/r||0}}({x:p,y:v}):{x:p,y:v};return p=C.x,v=C.y,u?Object.assign({},S,((D={})[k]=g?"0":"",D[b]=y?"0":"",D.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",D)):Object.assign({},S,((t={})[k]=g?v+"px":"",t[b]=y?p+"px":"",t.transform="",t))}var Td={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];zf(o)&&Kf(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});zf(r)&&Kf(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Nd={left:"right",right:"left",bottom:"top",top:"bottom"};function Md(e){return e.replace(/left|right|bottom|top/g,(function(e){return Nd[e]}))}var Fd={start:"end",end:"start"};function Bd(e){return e.replace(/start|end/g,(function(e){return Fd[e]}))}function Rd(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Uf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Pd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Id(e,t){return t===hd?Pd(function(e){var t=If(e),n=Gf(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+Yf(e),y:s}}(e)):Lf(t)?function(e){var t=qf(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Pd(function(e){var t,n=Gf(e),r=Wf(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Vf(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Vf(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Yf(e),u=-r.scrollTop;return"rtl"===Jf(o||n).direction&&(s+=Vf(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}(Gf(e)))}function Ld(e,t,n){var r="clippingParents"===t?function(e){var t=nd(ed(e)),n=["absolute","fixed"].indexOf(Jf(e).position)>=0&&zf(e)?id(e):e;return Lf(n)?t.filter((function(e){return Lf(e)&&Rd(e,n)&&"body"!==Kf(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=Id(e,n);return t.top=Vf(r.top,t.top),t.right=$f(r.right,t.right),t.bottom=$f(r.bottom,t.bottom),t.left=Vf(r.left,t.left),t}),Id(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function zd(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Ud(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Vd(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,s=n.rootBoundary,u=void 0===s?hd:s,c=n.elementContext,l=void 0===c?vd:c,f=n.altBoundary,d=void 0!==f&&f,p=n.padding,h=void 0===p?0:p,v=zd("number"!==typeof h?h:Ud(h,fd)),m=l===vd?"reference":vd,y=e.rects.popper,g=e.elements[d?m:l],b=Ld(Lf(g)?g:g.contextElement||Gf(e.elements.popper),a,u),k=qf(e.elements.reference),w=_d({reference:k,element:y,strategy:"absolute",placement:o}),x=Pd(Object.assign({},y,w)),E=l===vd?x:k,O={top:b.top-E.top+v.top,bottom:E.bottom-b.bottom+v.bottom,left:b.left-E.left+v.left,right:E.right-b.right+v.right},D=e.modifiersData.offset;if(l===vd&&D){var S=D[o];Object.keys(O).forEach((function(e){var t=[ud,sd].indexOf(e)>=0?1:-1,n=[ad,sd].indexOf(e)>=0?"y":"x";O[e]+=S[n]*t}))}return O}function $d(e,t,n){return Vf(e,$f(t,n))}function Hd(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function qd(e){return[ad,ud,sd,cd].some((function(t){return e[t]>=0}))}var Wd=Ed({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,u=If(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Od)})),s&&u.addEventListener("resize",n.update,Od),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Od)})),s&&u.removeEventListener("resize",n.update,Od)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=_d({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,u=void 0===s||s,c={placement:Dd(t.placement),variation:Sd(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ad(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ad(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Td,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=yd.reduce((function(e,n){return e[n]=function(e,t,n){var r=Dd(e),o=[cd,ad].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[cd,ud].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,u=n.fallbackPlacements,c=n.padding,l=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,h=void 0===p||p,v=n.allowedAutoPlacements,m=t.options.placement,y=Dd(m),g=u||(y===m||!h?[Md(m)]:function(e){if(Dd(e)===ld)return[];var t=Md(e);return[Bd(e),t,Bd(t)]}(m)),b=[m].concat(g).reduce((function(e,n){return e.concat(Dd(n)===ld?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?yd:u,l=Sd(r),f=l?s?md:md.filter((function(e){return Sd(e)===l})):fd,d=f.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=f);var p=d.reduce((function(t,n){return t[n]=Vd(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Dd(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:l,rootBoundary:f,padding:c,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),k=t.rects.reference,w=t.rects.popper,x=new Map,E=!0,O=b[0],D=0;D<b.length;D++){var S=b[D],C=Dd(S),_=Sd(S)===dd,j=[ad,sd].indexOf(C)>=0,A=j?"width":"height",T=Vd(t,{placement:S,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),N=j?_?ud:cd:_?sd:ad;k[A]>w[A]&&(N=Md(N));var M=Md(N),F=[];if(i&&F.push(T[C]<=0),s&&F.push(T[N]<=0,T[M]<=0),F.every((function(e){return e}))){O=S,E=!1;break}x.set(S,F)}if(E)for(var B=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return O=t,"break"},R=h?3:1;R>0;R--){if("break"===B(R))break}t.placement!==O&&(t.modifiersData[r]._skip=!0,t.placement=O,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,f=n.padding,d=n.tether,p=void 0===d||d,h=n.tetherOffset,v=void 0===h?0:h,m=Vd(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),y=Dd(t.placement),g=Sd(t.placement),b=!g,k=Cd(y),w="x"===k?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,O=t.rects.popper,D="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,S="number"===typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(x){if(i){var j,A="y"===k?ad:cd,T="y"===k?sd:ud,N="y"===k?"height":"width",M=x[k],F=M+m[A],B=M-m[T],R=p?-O[N]/2:0,P=g===dd?E[N]:O[N],I=g===dd?-O[N]:-E[N],L=t.elements.arrow,z=p&&L?Zf(L):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=U[A],$=U[T],H=$d(0,E[N],z[N]),q=b?E[N]/2-R-H-V-S.mainAxis:P-H-V-S.mainAxis,W=b?-E[N]/2+R+H+$+S.mainAxis:I+H+$+S.mainAxis,K=t.elements.arrow&&id(t.elements.arrow),G=K?"y"===k?K.clientTop||0:K.clientLeft||0:0,Y=null!=(j=null==C?void 0:C[k])?j:0,J=M+W-Y,Q=$d(p?$f(F,M+q-Y-G):F,M,p?Vf(B,J):B);x[k]=Q,_[k]=Q-M}if(s){var X,Z="x"===k?ad:cd,ee="x"===k?sd:ud,te=x[w],ne="y"===w?"height":"width",re=te+m[Z],oe=te-m[ee],ie=-1!==[ad,cd].indexOf(y),ae=null!=(X=null==C?void 0:C[w])?X:0,se=ie?re:te-E[ne]-O[ne]-ae+S.altAxis,ue=ie?te+E[ne]+O[ne]-ae-S.altAxis:oe,ce=p&&ie?function(e,t,n){var r=$d(e,t,n);return r>n?n:r}(se,te,ue):$d(p?se:re,te,p?ue:oe);x[w]=ce,_[w]=ce-te}t.modifiersData[r]=_}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Dd(n.placement),u=Cd(s),c=[cd,ud].indexOf(s)>=0?"height":"width";if(i&&a){var l=function(e,t){return zd("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ud(e,fd))}(o.padding,n),f=Zf(i),d="y"===u?ad:cd,p="y"===u?sd:ud,h=n.rects.reference[c]+n.rects.reference[u]-a[u]-n.rects.popper[c],v=a[u]-n.rects.reference[u],m=id(i),y=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,g=h/2-v/2,b=l[d],k=y-f[c]-l[p],w=y/2-f[c]/2+g,x=$d(b,w,k),E=u;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&Rd(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Vd(t,{elementContext:"reference"}),s=Vd(t,{altBoundary:!0}),u=Hd(a,r),c=Hd(s,o,i),l=qd(u),f=qd(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),Kd="tippy-content",Gd="tippy-backdrop",Yd="tippy-arrow",Jd="tippy-svg-arrow",Qd={passive:!0,capture:!0},Xd=function(){return document.body};function Zd(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ep(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function tp(e,t){return"function"===typeof e?e.apply(void 0,t):e}function np(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function rp(e){return[].concat(e)}function op(e,t){-1===e.indexOf(t)&&e.push(t)}function ip(e){return e.split("-")[0]}function ap(e){return[].slice.call(e)}function sp(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function up(){return document.createElement("div")}function cp(e){return["Element","Fragment"].some((function(t){return ep(e,t)}))}function lp(e){return ep(e,"MouseEvent")}function fp(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function dp(e){return cp(e)?[e]:function(e){return ep(e,"NodeList")}(e)?ap(e):Array.isArray(e)?e:ap(document.querySelectorAll(e))}function pp(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function hp(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function vp(e){var t,n=rp(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function mp(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function yp(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var gp={isTouch:!1},bp=0;function kp(){gp.isTouch||(gp.isTouch=!0,window.performance&&document.addEventListener("mousemove",wp))}function wp(){var e=performance.now();e-bp<20&&(gp.isTouch=!1,document.removeEventListener("mousemove",wp)),bp=e}function xp(){var e=document.activeElement;if(fp(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Ep=!!("undefined"!==typeof window&&"undefined"!==typeof document)&&!!window.msCrypto;var Op={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Dp=Object.assign({appendTo:Xd,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Op,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Sp=Object.keys(Dp);function Cp(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=Dp[o])?r:i);return t}),{});return Object.assign({},e,t)}function _p(e,t){var n=Object.assign({},t,{content:tp(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Cp(Object.assign({},Dp,{plugins:t}))):Sp).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(rr){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Dp.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function jp(e,t){e.innerHTML=t}function Ap(e){var t=up();return!0===e?t.className=Yd:(t.className=Jd,cp(e)?t.appendChild(e):jp(t,e)),t}function Tp(e,t){cp(t.content)?(jp(e,""),e.appendChild(t.content)):"function"!==typeof t.content&&(t.allowHTML?jp(e,t.content):e.textContent=t.content)}function Np(e){var t=e.firstElementChild,n=ap(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Kd)})),arrow:n.find((function(e){return e.classList.contains(Yd)||e.classList.contains(Jd)})),backdrop:n.find((function(e){return e.classList.contains(Gd)}))}}function Mp(e){var t=up(),n=up();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=up();function o(n,r){var o=Np(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"===typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"===typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Tp(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Ap(r.arrow))):i.appendChild(Ap(r.arrow)):s&&i.removeChild(s)}return r.className=Kd,r.setAttribute("data-state","hidden"),Tp(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}Mp.$$tippy=!0;var Fp=1,Bp=[],Rp=[];function Pp(e,t){var n,r,o,i,a,s,u,c,l=_p(e,Object.assign({},Dp,Cp(sp(t)))),f=!1,d=!1,p=!1,h=!1,v=[],m=np(K,l.interactiveDebounce),y=Fp++,g=(c=l.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:y,reference:e,popper:up(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){0;if(b.state.isDestroyed)return;M("onBeforeUpdate",[b,t]),q();var n=b.props,r=_p(e,Object.assign({},n,sp(t),{ignoreAttributes:!0}));b.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),m=np(K,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?rp(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");B(),N(),x&&x(n,r);b.popperInstance&&(Q(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=gp.isTouch&&!b.props.touch,o=Zd(b.props.duration,0,Dp.duration);if(e||t||n||r)return;if(_().hasAttribute("disabled"))return;if(M("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,C()&&(w.style.visibility="visible");N(),z(),b.state.isMounted||(w.style.transition="none");if(C()){var i=A(),a=i.box,u=i.content;pp([a,u],0)}s=function(){var e;if(b.state.isVisible&&!h){if(h=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,C()&&b.props.animation){var t=A(),n=t.box,r=t.content;pp([n,r],o),hp([n,r],"visible")}F(),B(),op(Rp,b),null==(e=b.popperInstance)||e.forceUpdate(),M("onMount",[b]),b.props.animation&&C()&&function(e,t){V(e,t)}(o,(function(){b.state.isShown=!0,M("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=_();e=b.props.interactive&&t===Xd||"parent"===t?n.parentNode:tp(t,[n]);e.contains(w)||e.appendChild(w);b.state.isMounted=!0,Q(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Zd(b.props.duration,1,Dp.duration);if(e||t||n)return;if(M("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,h=!1,f=!1,C()&&(w.style.visibility="hidden");if(R(),U(),N(!0),C()){var o=A(),i=o.box,a=o.content;b.props.animation&&(pp([i,a],r),hp([i,a],"hidden"))}F(),B(),b.props.animation?C()&&function(e,t){V(e,(function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;j().addEventListener("mousemove",m),op(Bp,m),m(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;X(),Z().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);Rp=Rp.filter((function(e){return e!==b})),b.state.isMounted=!1,M("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),q(),delete e._tippy,b.state.isDestroyed=!0,M("onDestroy",[b])}};if(!l.render)return b;var k=l.render(b),w=k.popper,x=k.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,e._tippy=b,w._tippy=b;var E=g.map((function(e){return e.fn(b)})),O=e.hasAttribute("aria-expanded");return H(),B(),N(),M("onCreate",[b]),l.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&j().addEventListener("mousemove",m)})),b;function D(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===D()[0]}function C(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function _(){return u||e}function j(){var e=_().parentNode;return e?vp(e):document}function A(){return Np(w)}function T(e){return b.state.isMounted&&!b.state.isVisible||gp.isTouch||i&&"focus"===i.type?0:Zd(b.props.delay,e?0:1,Dp.delay)}function N(e){void 0===e&&(e=!1),w.style.pointerEvents=b.props.interactive&&!e?"":"none",w.style.zIndex=""+b.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=b.props)[e].apply(r,t)}function F(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;rp(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function B(){!O&&b.props.aria.expanded&&rp(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===_()?"true":"false"):e.removeAttribute("aria-expanded")}))}function R(){j().removeEventListener("mousemove",m),Bp=Bp.filter((function(e){return e!==m}))}function P(t){if(!gp.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!yp(w,n)){if(rp(b.props.triggerTarget||e).some((function(e){return yp(e,n)}))){if(gp.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout((function(){d=!1})),b.state.isMounted||U())}}}function I(){p=!0}function L(){p=!1}function z(){var e=j();e.addEventListener("mousedown",P,!0),e.addEventListener("touchend",P,Qd),e.addEventListener("touchstart",L,Qd),e.addEventListener("touchmove",I,Qd)}function U(){var e=j();e.removeEventListener("mousedown",P,!0),e.removeEventListener("touchend",P,Qd),e.removeEventListener("touchstart",L,Qd),e.removeEventListener("touchmove",I,Qd)}function V(e,t){var n=A().box;function r(e){e.target===n&&(mp(n,"remove",r),t())}if(0===e)return t();mp(n,"remove",a),mp(n,"add",r),a=r}function $(t,n,r){void 0===r&&(r=!1),rp(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;S()&&($("touchstart",W,{passive:!0}),$("touchend",G,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,W),e){case"mouseenter":$("mouseleave",G);break;case"focus":$(Ep?"focusout":"blur",Y);break;case"focusin":$("focusout",Y)}}))}function q(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),v=[]}function W(e){var t,n=!1;if(b.state.isEnabled&&!J(e)&&!d){var r="focus"===(null==(t=i)?void 0:t.type);i=e,u=e.currentTarget,B(),!b.state.isVisible&&lp(e)&&Bp.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||f)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(f=!n),n&&!r&&te(e)}}function K(e){var t=e.target,n=_().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:l}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=ip(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,l="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-r+u>i,p=r-t.bottom-c>i,h=t.left-n+l>i,v=n-t.right-f>i;return d||p||h||v}))})(r,e)&&(R(),te(e))}}function G(e){J(e)||b.props.trigger.indexOf("click")>=0&&f||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function Y(e){b.props.trigger.indexOf("focusin")<0&&e.target!==_()||b.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function J(e){return!!gp.isTouch&&S()!==e.type.indexOf("touch")>=0}function Q(){X();var t=b.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,u=C()?Np(w).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||_()}:e,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(C()){var n=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},f=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},l];C()&&u&&f.push({name:"arrow",options:{element:u,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),b.popperInstance=Wd(c,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:f}))}function X(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Z(){return ap(w.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&M("onTrigger",[b,e]),z();var t=T(!0),r=D(),o=r[0],i=r[1];gp.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),M("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=T(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else U()}}function Ip(e,t){void 0===t&&(t={});var n=Dp.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",kp,Qd),window.addEventListener("blur",xp);var r=Object.assign({},t,{plugins:n}),o=dp(e).reduce((function(e,t){var n=t&&Pp(t,r);return n&&e.push(n),e}),[]);return cp(e)?o[0]:o}Ip.defaultProps=Dp,Ip.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Dp[t]=e[t]}))},Ip.currentInput=gp;Object.assign({},Td,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Ip.setDefaultProps({render:Mp});var Lp=Ip,zp=function(){function e(t){var n=this,r=t.editor,o=t.element,i=t.view,a=t.tippyOptions,s=void 0===a?{}:a,u=t.shouldShow;p(this,e),this.preventHide=!1,this.shouldShow=function(e){var t=e.view,n=e.state,r=e.from,o=e.to,i=n.doc,a=n.selection.empty,s=!i.textBetween(r,o).length&&tf(n.selection);return!(!t.hasFocus()||a||s)},this.mousedownHandler=function(){n.preventHide=!0},this.dragstartHandler=function(){n.hide()},this.focusHandler=function(){setTimeout((function(){return n.update(n.editor.view)}))},this.blurHandler=function(e){var t,r=e.event;n.preventHide?n.preventHide=!1:(null===r||void 0===r?void 0:r.relatedTarget)&&(null===(t=n.element.parentNode)||void 0===t?void 0:t.contains(r.relatedTarget))||n.hide()},this.editor=r,this.element=o,this.view=i,u&&(this.shouldShow=u),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}return v(e,[{key:"createTooltip",value:function(){var e=this,t=this.editor.options.element,n=!!t.parentElement;!this.tippy&&n&&(this.tippy=Lp(t,Object(u.a)({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(function(t){e.blurHandler({event:t})})))}},{key:"update",value:function(e,t){var n,r,o,i=e.state,a=e.composing,s=i.doc,u=i.selection,c=t&&t.doc.eq(s)&&t.selection.eq(u);if(!a&&!c){this.createTooltip();var l=u.ranges,f=Math.min.apply(Math,Object(Q.a)(l.map((function(e){return e.$from.pos})))),d=Math.max.apply(Math,Object(Q.a)(l.map((function(e){return e.$to.pos}))));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t,from:f,to:d}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||function(){if(ef(n=i.selection)&&n instanceof ia){var t=e.nodeDOM(f);if(t)return t.getBoundingClientRect()}var n;return Bf(e,f,d)}}),this.show()):this.hide()}}},{key:"show",value:function(){var e;null===(e=this.tippy)||void 0===e||e.show()}},{key:"hide",value:function(){var e;null===(e=this.tippy)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}]),e}(),Up=function(e){return new ga({key:"string"===typeof e.pluginKey?new wa(e.pluginKey):e.pluginKey,view:function(t){return new zp(Object(u.a)({view:t},e))}})},Vp=(ql.create({name:"bubbleMenu",addOptions:function(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}},addProseMirrorPlugins:function(){return this.options.element?[Up({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),function(){function e(t){var n=this,r=t.editor,o=t.element,i=t.view,a=t.tippyOptions,s=void 0===a?{}:a,u=t.shouldShow;p(this,e),this.preventHide=!1,this.shouldShow=function(e){var t=e.view,n=e.state.selection,r=n.$anchor,o=n.empty,i=1===r.depth,a=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(t.hasFocus()&&o&&i&&a)},this.mousedownHandler=function(){n.preventHide=!0},this.focusHandler=function(){setTimeout((function(){return n.update(n.editor.view)}))},this.blurHandler=function(e){var t,r=e.event;n.preventHide?n.preventHide=!1:(null===r||void 0===r?void 0:r.relatedTarget)&&(null===(t=n.element.parentNode)||void 0===t?void 0:t.contains(r.relatedTarget))||n.hide()},this.editor=r,this.element=o,this.view=i,u&&(this.shouldShow=u),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}return v(e,[{key:"createTooltip",value:function(){var e=this,t=this.editor.options.element,n=!!t.parentElement;!this.tippy&&n&&(this.tippy=Lp(t,Object(u.a)({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(function(t){e.blurHandler({event:t})})))}},{key:"update",value:function(e,t){var n,r,o,i=e.state,a=i.doc,s=i.selection,u=s.from,c=s.to;t&&t.doc.eq(a)&&t.selection.eq(s)||(this.createTooltip(),(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||function(){return Bf(e,u,c)}}),this.show()):this.hide())}},{key:"show",value:function(){var e;null===(e=this.tippy)||void 0===e||e.show()}},{key:"hide",value:function(){var e;null===(e=this.tippy)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}]),e}()),$p=function(e){return new ga({key:"string"===typeof e.pluginKey?new wa(e.pluginKey):e.pluginKey,view:function(t){return new Vp(Object(u.a)({view:t},e))}})},Hp=(ql.create({name:"floatingMenu",addOptions:function(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins:function(){return this.options.element?[$p({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),["editor"]),qp=function(e){y(n,e);var t=x(n);function n(){var e;return p(this,n),(e=t.apply(this,arguments)).contentComponent=null,e}return v(n)}(Nf),Wp=function(e){var t=e.renderers;return i.a.createElement(i.a.Fragment,null,Array.from(t).map((function(e){var t=Object(Se.a)(e,2),n=t[0],r=t[1];return s.a.createPortal(r.reactElement,r.element,n)})))},Kp=function(e){y(n,e);var t=x(n);function n(e){var r;return p(this,n),(r=t.call(this,e)).editorContentRef=i.a.createRef(),r.state={renderers:new Map},r}return v(n,[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(){this.init()}},{key:"init",value:function(){var e=this.props.editor;if(e&&e.options.element){if(e.contentComponent)return;var t=this.editorContentRef.current;t.append.apply(t,Object(Q.a)(e.options.element.childNodes)),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews()}}},{key:"componentWillUnmount",value:function(){var e=this.props.editor;if(e&&(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,e.options.element.firstChild)){var t=document.createElement("div");t.append.apply(t,Object(Q.a)(e.options.element.childNodes)),e.setOptions({element:t})}}},{key:"render",value:function(){var e=this.props,t=(e.editor,E(e,Hp));return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",Object(u.a)({ref:this.editorContentRef},t)),i.a.createElement(Wp,{renderers:this.state.renderers}))}}]),n}(i.a.Component),Gp=i.a.memo(Kp),Yp=Object(o.createContext)({onDragStart:void 0}),Jp=function(){return Object(o.useContext)(Yp)};i.a.forwardRef((function(e,t){var n=Jp().onDragStart,r=e.as||"div";return i.a.createElement(r,Object(u.a)(Object(u.a)({},e),{},{ref:t,"data-node-view-wrapper":"",onDragStart:n,style:Object(u.a)({whiteSpace:"normal"},e.style)}))}));function Qp(){var e=Object(o.useState)(0),t=Object(Se.a)(e,2)[1];return function(){return t((function(e){return e+1}))}}var Xp=ql.create({name:"placeholder",addOptions:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins:function(){var e=this;return[new ga({props:{decorations:function(t){var n=t.doc,r=t.selection,o=e.editor.isEditable||!e.options.showOnlyWhenEditable,i=r.anchor,a=[];return o?(n.descendants((function(t,n){var r=i>=n&&i<=n+t.nodeSize,o=!t.isLeaf&&!t.childCount;if((r||!e.options.showOnlyCurrent)&&o){var s=[e.options.emptyNodeClass];e.editor.isEmpty&&s.push(e.options.emptyEditorClass);var u=tc.node(n,n+t.nodeSize,{class:s.join(" "),"data-placeholder":"function"===typeof e.options.placeholder?e.options.placeholder({editor:e.editor,node:t,pos:n,hasAnchor:r}):e.options.placeholder});a.push(u)}return e.options.includeChildren})),oc.create(n,a)):null}}})]}}),Zp=Pf.create({name:"text",group:"inline"});function eh(e){this.j={},this.jr=[],this.jd=null,this.t=e}eh.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=th();var o=ih(this,e);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[e]=r,r}};var th=function(){return new eh},nh=function(e){return new eh(e)},rh=function(e,t,n){e.j[t]||(e.j[t]=n)},oh=function(e,t,n){e.jr.push([t,n])},ih=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var o=e.jr[r][0],i=e.jr[r][1];if(o.test(t))return i}return e.jd},ah=function(e,t,n){for(var r=0;r<t.length;r++)rh(e,t[r],n)},sh=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],o=t[n][1];rh(e,r,o)}},uh=function(e,t,n,r){for(var o,i=0,a=t.length;i<a&&(o=e.j[t[i]]);)e=o,i++;if(i>=a)return[];for(;i<a-1;)o=r(),rh(e,t[i],o),e=o,i++;rh(e,t[a-1],n)},ch="DOMAIN",lh="LOCALHOST",fh="TLD",dh="NUM",ph="PROTOCOL",hh="MAILTO",vh="WS",mh="NL",yh="OPENBRACE",gh="OPENBRACKET",bh="OPENANGLEBRACKET",kh="OPENPAREN",wh="CLOSEBRACE",xh="CLOSEBRACKET",Eh="CLOSEANGLEBRACKET",Oh="CLOSEPAREN",Dh="AMPERSAND",Sh="APOSTROPHE",Ch="ASTERISK",_h="AT",jh="BACKSLASH",Ah="BACKTICK",Th="CARET",Nh="COLON",Mh="COMMA",Fh="DOLLAR",Bh="DOT",Rh="EQUALS",Ph="EXCLAMATION",Ih="HYPHEN",Lh="PERCENT",zh="PIPE",Uh="PLUS",Vh="POUND",$h="QUERY",Hh="QUOTE",qh="SEMI",Wh="SLASH",Kh="TILDE",Gh="UNDERSCORE",Yh="SYM",Jh=Object.freeze({__proto__:null,DOMAIN:ch,LOCALHOST:lh,TLD:fh,NUM:dh,PROTOCOL:ph,MAILTO:hh,WS:vh,NL:mh,OPENBRACE:yh,OPENBRACKET:gh,OPENANGLEBRACKET:bh,OPENPAREN:kh,CLOSEBRACE:wh,CLOSEBRACKET:xh,CLOSEANGLEBRACKET:Eh,CLOSEPAREN:Oh,AMPERSAND:Dh,APOSTROPHE:Sh,ASTERISK:Ch,AT:_h,BACKSLASH:jh,BACKTICK:Ah,CARET:Th,COLON:Nh,COMMA:Mh,DOLLAR:Fh,DOT:Bh,EQUALS:Rh,EXCLAMATION:Ph,HYPHEN:Ih,PERCENT:Lh,PIPE:zh,PLUS:Uh,POUND:Vh,QUERY:$h,QUOTE:Hh,SEMI:qh,SLASH:Wh,TILDE:Kh,UNDERSCORE:Gh,SYM:Yh}),Qh="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw verm\xf6gensberater-ctb verm\xf6gensberatung-pwb \u03b5\u03bb \u03b5\u03c5 \u0431\u0433 \u0431\u0435\u043b \u0434\u0435\u0442\u0438 \u0435\u044e \u043a\u0430\u0442\u043e\u043b\u0438\u043a \u043a\u043e\u043c \u049b\u0430\u0437 \u043c\u043a\u0434 \u043c\u043e\u043d \u043c\u043e\u0441\u043a\u0432\u0430 \u043e\u043d\u043b\u0430\u0439\u043d \u043e\u0440\u0433 \u0440\u0443\u0441 \u0440\u0444 \u0441\u0430\u0439\u0442 \u0441\u0440\u0431 \u0443\u043a\u0440 \u10d2\u10d4 \u0570\u0561\u0575 \u05d9\u05e9\u05e8\u05d0\u05dc \u05e7\u05d5\u05dd \u0627\u0628\u0648\u0638\u0628\u064a \u0627\u062a\u0635\u0627\u0644\u0627\u062a \u0627\u0631\u0627\u0645\u0643\u0648 \u0627\u0644\u0627\u0631\u062f\u0646 \u0627\u0644\u0628\u062d\u0631\u064a\u0646 \u0627\u0644\u062c\u0632\u0627\u0626\u0631 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629 \u0627\u0644\u0639\u0644\u064a\u0627\u0646 \u0627\u0644\u0645\u063a\u0631\u0628 \u0627\u0645\u0627\u0631\u0627\u062a \u0627\u06cc\u0631\u0627\u0646 \u0628\u0627\u0631\u062a \u0628\u0627\u0632\u0627\u0631 \u0628\u06be\u0627\u0631\u062a \u0628\u064a\u062a\u0643 \u067e\u0627\u06a9\u0633\u062a\u0627\u0646 \u0680\u0627\u0631\u062a \u062a\u0648\u0646\u0633 \u0633\u0648\u062f\u0627\u0646 \u0633\u0648\u0631\u064a\u0629 \u0634\u0628\u0643\u0629 \u0639\u0631\u0627\u0642 \u0639\u0631\u0628 \u0639\u0645\u0627\u0646 \u0641\u0644\u0633\u0637\u064a\u0646 \u0642\u0637\u0631 \u0643\u0627\u062b\u0648\u0644\u064a\u0643 \u0643\u0648\u0645 \u0645\u0635\u0631 \u0645\u0644\u064a\u0633\u064a\u0627 \u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627 \u0645\u0648\u0642\u0639 \u0647\u0645\u0631\u0627\u0647 \u0915\u0949\u092e \u0928\u0947\u091f \u092d\u093e\u0930\u0924 \u092d\u093e\u0930\u0924\u092e\u094d \u092d\u093e\u0930\u094b\u0924 \u0938\u0902\u0917\u0920\u0928 \u09ac\u09be\u0982\u09b2\u09be \u09ad\u09be\u09b0\u09a4 \u09ad\u09be\u09f0\u09a4 \u0a2d\u0a3e\u0a30\u0a24 \u0aad\u0abe\u0ab0\u0aa4 \u0b2d\u0b3e\u0b30\u0b24 \u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe \u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8 \u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd \u0c2d\u0c3e\u0c30\u0c24\u0c4d \u0cad\u0cbe\u0cb0\u0ca4 \u0d2d\u0d3e\u0d30\u0d24\u0d02 \u0dbd\u0d82\u0d9a\u0dcf \u0e04\u0e2d\u0e21 \u0e44\u0e17\u0e22 \u0ea5\u0eb2\u0ea7 \ub2f7\ub137 \ub2f7\ucef4 \uc0bc\uc131 \ud55c\uad6d \u30a2\u30de\u30be\u30f3 \u30b0\u30fc\u30b0\u30eb \u30af\u30e9\u30a6\u30c9 \u30b3\u30e0 \u30b9\u30c8\u30a2 \u30bb\u30fc\u30eb \u30d5\u30a1\u30c3\u30b7\u30e7\u30f3 \u30dd\u30a4\u30f3\u30c8 \u307f\u3093\u306a \u4e16\u754c \u4e2d\u4fe1 \u4e2d\u56fd \u4e2d\u570b \u4e2d\u6587\u7f51 \u4e9a\u9a6c\u900a \u4f01\u4e1a \u4f5b\u5c71 \u4fe1\u606f \u5065\u5eb7 \u516b\u5366 \u516c\u53f8 \u516c\u76ca \u53f0\u6e7e \u53f0\u7063 \u5546\u57ce \u5546\u5e97 \u5546\u6807 \u5609\u91cc \u5609\u91cc\u5927\u9152\u5e97 \u5728\u7ebf \u5927\u4f17\u6c7d\u8f66 \u5927\u62ff \u5929\u4e3b\u6559 \u5a31\u4e50 \u5bb6\u96fb \u5e7f\u4e1c \u5fae\u535a \u6148\u5584 \u6211\u7231\u4f60 \u624b\u673a \u62db\u8058 \u653f\u52a1 \u653f\u5e9c \u65b0\u52a0\u5761 \u65b0\u95fb \u65f6\u5c1a \u66f8\u7c4d \u673a\u6784 \u6de1\u9a6c\u9521 \u6e38\u620f \u6fb3\u9580 \u70b9\u770b \u79fb\u52a8 \u7ec4\u7ec7\u673a\u6784 \u7f51\u5740 \u7f51\u5e97 \u7f51\u7ad9 \u7f51\u7edc \u8054\u901a \u8bfa\u57fa\u4e9a \u8c37\u6b4c \u8d2d\u7269 \u901a\u8ca9 \u96c6\u56e2 \u96fb\u8a0a\u76c8\u79d1 \u98de\u5229\u6d66 \u98df\u54c1 \u9910\u5385 \u9999\u683c\u91cc\u62c9 \u9999\u6e2f".split(" "),Xh=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,Zh=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,ev=/\uFE0F/,tv=/\d/,nv=/\s/;function rv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=th(),n=nh(dh),r=nh(ch),o=th(),i=nh(vh),a=[[tv,r],[Xh,r],[Zh,r],[ev,r]],s=function(){var e=nh(ch);return e.j={"-":o},e.jr=[].concat(a),e},u=function(e){var t=s();return t.t=e,t};sh(t,[["'",nh(Sh)],["{",nh(yh)],["[",nh(gh)],["<",nh(bh)],["(",nh(kh)],["}",nh(wh)],["]",nh(xh)],[">",nh(Eh)],[")",nh(Oh)],["&",nh(Dh)],["*",nh(Ch)],["@",nh(_h)],["`",nh(Ah)],["^",nh(Th)],[":",nh(Nh)],[",",nh(Mh)],["$",nh(Fh)],[".",nh(Bh)],["=",nh(Rh)],["!",nh(Ph)],["-",nh(Ih)],["%",nh(Lh)],["|",nh(zh)],["+",nh(Uh)],["#",nh(Vh)],["?",nh($h)],['"',nh(Hh)],["/",nh(Wh)],[";",nh(qh)],["~",nh(Kh)],["_",nh(Gh)],["\\",nh(jh)]]),rh(t,"\n",nh(mh)),oh(t,nv,i),rh(i,"\n",th()),oh(i,nv,i);for(var c=0;c<Qh.length;c++)uh(t,Qh[c],u(fh),s);var l=s(),f=s(),d=s(),p=s();uh(t,"file",l,s),uh(t,"ftp",f,s),uh(t,"http",d,s),uh(t,"mailto",p,s);var h=s(),v=nh(ph),m=nh(hh);rh(f,"s",h),rh(f,":",v),rh(d,"s",h),rh(d,":",v),rh(l,":",v),rh(h,":",v),rh(p,":",m);for(var y=s(),g=0;g<e.length;g++)uh(t,e[g],y,s);return rh(y,":",v),uh(t,"localhost",u(lh),s),oh(t,tv,n),oh(t,Xh,r),oh(t,Zh,r),oh(t,ev,r),oh(n,tv,n),oh(n,Xh,r),oh(n,Zh,r),oh(n,ev,r),rh(n,"-",o),rh(r,"-",o),rh(o,"-",o),oh(r,tv,r),oh(r,Xh,r),oh(r,Zh,r),oh(r,ev,r),oh(o,tv,r),oh(o,Xh,r),oh(o,Zh,r),oh(o,ev,r),t.jd=nh(Yh),t}function ov(e){return ov="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ov(e)}var iv={defaultProtocol:"http",events:null,format:sv,formatHref:sv,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function av(e){e=e||{},this.defaultProtocol="defaultProtocol"in e?e.defaultProtocol:iv.defaultProtocol,this.events="events"in e?e.events:iv.events,this.format="format"in e?e.format:iv.format,this.formatHref="formatHref"in e?e.formatHref:iv.formatHref,this.nl2br="nl2br"in e?e.nl2br:iv.nl2br,this.tagName="tagName"in e?e.tagName:iv.tagName,this.target="target"in e?e.target:iv.target,this.rel="rel"in e?e.rel:iv.rel,this.validate="validate"in e?e.validate:iv.validate,this.truncate="truncate"in e?e.truncate:iv.truncate,this.className="className"in e?e.className:iv.className,this.attributes=e.attributes||iv.attributes,this.ignoreTags=[];for(var t=("ignoreTags"in e?e.ignoreTags:iv.ignoreTags),n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function sv(e){return e}av.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),rel:this.get("rel",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e),truncate:this.get("truncate",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var r,o=this[e];if(!o)return o;switch(ov(o)){case"function":return o(t,n.t);case"object":return"function"===typeof(r=n.t in o?o[n.t]:iv[e])?r(t,n.t):r}return o},getObject:function(e,t,n){var r=this[e];return"function"===typeof r?r(t,n.t):r}};function uv(){}function cv(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];r.constructor=t,t.prototype=r}(uv,n,t),n}uv.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iv.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var lv=cv("email",{isLink:!0}),fv=cv("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),dv=cv("text"),pv=cv("nl"),hv=cv("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:iv.defaultProtocol,t=this.tk,n=!1,r=!1,o=[],i=0;t[i].t===ph;)n=!0,o.push(t[i].v),i++;for(;t[i].t===Wh;)r=!0,o.push(t[i].v),i++;for(;i<t.length;i++)o.push(t[i].v);return o=o.join(""),n||r||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===ph}}),vv=Object.freeze({__proto__:null,MultiToken:uv,Base:uv,createTokenClass:cv,MailtoEmail:lv,Email:fv,Text:dv,Nl:pv,Url:hv});function mv(){var e=th(),t=th(),n=th(),r=th(),o=th(),i=th(),a=th(),s=nh(hv),u=th(),c=nh(hv),l=nh(hv),f=th(),d=th(),p=th(),h=th(),v=th(),m=nh(hv),y=nh(hv),g=nh(hv),b=nh(hv),k=th(),w=th(),x=th(),E=th(),O=th(),D=th(),S=nh(fv),C=th(),_=nh(fv),j=nh(lv),A=th(),T=th(),N=th(),M=th(),F=nh(pv);rh(e,mh,F),rh(e,ph,t),rh(e,hh,n),rh(t,Wh,r),rh(r,Wh,o),rh(e,fh,i),rh(e,ch,i),rh(e,lh,s),rh(e,dh,i),rh(o,fh,l),rh(o,ch,l),rh(o,dh,l),rh(o,lh,l),rh(i,Bh,a),rh(O,Bh,D),rh(a,fh,s),rh(a,ch,i),rh(a,dh,i),rh(a,lh,i),rh(D,fh,S),rh(D,ch,O),rh(D,dh,O),rh(D,lh,O),rh(s,Bh,a),rh(S,Bh,D),rh(s,Nh,u),rh(s,Wh,l),rh(u,dh,c),rh(c,Wh,l),rh(S,Nh,C),rh(C,dh,_);var B=[Dh,Ch,_h,jh,Ah,Th,Fh,ch,Rh,Ih,lh,dh,Lh,zh,Uh,Vh,ph,Wh,Yh,Kh,fh,Gh],R=[Sh,Eh,wh,xh,Oh,Nh,Mh,Bh,Ph,bh,yh,gh,kh,$h,Hh,qh];rh(l,yh,d),rh(l,gh,p),rh(l,bh,h),rh(l,kh,v),rh(f,yh,d),rh(f,gh,p),rh(f,bh,h),rh(f,kh,v),rh(d,wh,l),rh(p,xh,l),rh(h,Eh,l),rh(v,Oh,l),rh(m,wh,l),rh(y,xh,l),rh(g,Eh,l),rh(b,Oh,l),rh(k,wh,l),rh(w,xh,l),rh(x,Eh,l),rh(E,Oh,l),ah(d,B,m),ah(p,B,y),ah(h,B,g),ah(v,B,b),ah(d,R,k),ah(p,R,w),ah(h,R,x),ah(v,R,E),ah(m,B,m),ah(y,B,y),ah(g,B,g),ah(b,B,b),ah(m,R,m),ah(y,R,y),ah(g,R,g),ah(b,R,b),ah(k,B,m),ah(w,B,y),ah(x,B,g),ah(E,B,b),ah(k,R,k),ah(w,R,w),ah(x,R,x),ah(E,R,E),ah(l,B,l),ah(f,B,l),ah(l,R,f),ah(f,R,f),rh(n,fh,j),rh(n,ch,j),rh(n,dh,j),rh(n,lh,j),ah(j,B,j),ah(j,R,A),ah(A,B,j),ah(A,R,A);var P=[Dh,Sh,Ch,jh,Ah,Th,wh,Fh,ch,Rh,Ih,dh,yh,Lh,zh,Uh,Vh,$h,Wh,Yh,Kh,fh,Gh];return ah(i,P,T),rh(i,_h,N),ah(s,P,T),rh(s,_h,N),ah(a,P,T),ah(T,P,T),rh(T,_h,N),rh(T,Bh,M),ah(M,P,T),rh(N,fh,O),rh(N,ch,O),rh(N,dh,O),rh(N,lh,S),e}function yv(e,t,n){var r=n[0].s,o=n[n.length-1].e;return new e(t.substr(r,o-r),n)}var gv="undefined"!==typeof console&&console&&console.warn||function(){},bv={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function kv(e){if(bv.initialized&&gv('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");bv.customProtocols.push(e)}function wv(e){return bv.initialized||function(){bv.scanner={start:rv(bv.customProtocols),tokens:Jh},bv.parser={start:mv(),tokens:vv};for(var e={createTokenClass:cv},t=0;t<bv.pluginQueue.length;t++)bv.pluginQueue[t][1]({scanner:bv.scanner,parser:bv.parser,utils:e});bv.initialized=!0}(),function(e,t,n){for(var r=n.length,o=0,i=[],a=[];o<r;){for(var s=e,u=null,c=null,l=0,f=null,d=-1;o<r&&!(u=ih(s,n[o].t));)a.push(n[o++]);for(;o<r&&(c=u||ih(s,n[o].t));)u=null,(s=c).accepts()?(d=0,f=s):d>=0&&d++,o++,l++;if(d<0)for(var p=o-l;p<o;p++)a.push(n[p]);else{a.length>0&&(i.push(yv(dv,t,a)),a=[]),o-=d,l-=d;var h=f.t,v=n.slice(o-l,o);i.push(yv(h,t,v))}}return a.length>0&&i.push(yv(dv,t,a)),i}(bv.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var o=e.charCodeAt(r),i=void 0,a=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,o=[],i=0,a=0;a<r;){for(var s=e,u=null,c=0,l=null,f=-1,d=-1;a<r&&(u=ih(s,n[a]));)(s=u).accepts()?(f=0,d=0,l=s):f>=0&&(f+=n[a].length,d++),c+=n[a].length,i+=n[a].length,a++;i-=f,a-=d,c-=f,o.push({t:l.t,v:t.substr(i-c,c),s:i-c,e:i})}return o}(bv.scanner.start,e))}function xv(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=wv(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.t!==t||r.push(i.toObject())}return r}function Ev(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=wv(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function Ov(e){return new ga({key:new wa("autolink"),appendTransaction:function(t,n,r){var o=t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc),i=t.some((function(e){return e.getMeta("preventAutolink")}));if(o&&!i){var a=r.tr,s=function(e,t){var n=new Qi(e);return t.forEach((function(e){e.steps.forEach((function(e){n.step(e)}))})),n}(n.doc,Object(Q.a)(t)),c=s.mapping,l=function(e){var t=e.mapping,n=e.steps,r=[];return t.maps.forEach((function(e,o){var i=[];if(e.ranges.length)e.forEach((function(e,t){i.push({from:e,to:t})}));else{var a=n[o],s=a.from,u=a.to;if(void 0===s||void 0===u)return;i.push({from:s,to:u})}i.forEach((function(e){var n=e.from,i=e.to,a=t.slice(o).map(n,-1),s=t.slice(o).map(i),u=t.invert().map(a,-1),c=t.invert().map(s);r.push({oldRange:{from:u,to:c},newRange:{from:a,to:s}})}))})),Mf(r)}(s);if(l.forEach((function(t){var o=t.oldRange,i=t.newRange;Ff(o.from,o.to,n.doc).filter((function(t){return t.mark.type===e.type})).forEach((function(t){var o=Ff(c.map(t.from),c.map(t.to),r.doc).filter((function(t){return t.mark.type===e.type}));if(o.length){var i=o[0],s=n.doc.textBetween(t.from,t.to,void 0," "),u=r.doc.textBetween(i.from,i.to,void 0," "),l=Ev(s),f=Ev(u);l&&!f&&a.removeMark(i.from,i.to,e.type)}})),function(e,t,n){var r=[];return e.nodesBetween(t.from,t.to,(function(e,t){n(e)&&r.push({node:e,pos:t})})),r}(r.doc,i,(function(e){return e.isTextblock})).forEach((function(t){xv(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((function(e){return e.isLink})).filter((function(t){return!e.validate||e.validate(t.value)})).map((function(e){return Object(u.a)(Object(u.a)({},e),{},{from:t.pos+e.start+1,to:t.pos+e.end+1})})).filter((function(e){var t=i.from>=e.from&&i.from<=e.to,n=i.to>=e.from&&i.to<=e.to;return t||n})).forEach((function(t){a.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),a.steps.length)return a}}})}var Dv=Rf.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate:function(){this.options.protocols.forEach(kv)},inclusive:function(){return this.options.autolink},addOptions:function(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes:function(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:function(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML:function(e){var t=e.HTMLAttributes;return["a",Cl(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setLink:function(t){return function(n){return(0,n.chain)().setMark(e.name,t).setMeta("preventAutolink",!0).run()}},toggleLink:function(t){return function(n){return(0,n.chain)().toggleMark(e.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},unsetLink:function(){return function(t){return(0,t.chain)().unsetMark(e.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}},addPasteRules:function(){var e,t=this;return[(e={find:function(e){return xv(e).filter((function(e){return!t.options.validate||t.options.validate(e.value)})).filter((function(e){return e.isLink})).map((function(e){return{text:e.value,index:e.start,data:e}}))},type:this.type,getAttributes:function(e){var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}},new zl({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Al(e.getAttributes,void 0,o);if(!1===i||null===i)return null;var a=n.tr,s=o[o.length-1],u=o[0],c=r.to;if(s){var l=u.search(/\S/),f=r.from+u.indexOf(s),d=f+s.length;if(Ff(r.from,r.to,n.doc).filter((function(t){return t.mark.type.excluded.find((function(n){return n===e.type&&n!==t.mark.type}))})).filter((function(e){return e.to>f})).length)return null;d<r.to&&a.delete(d,r.to),f>r.from&&a.delete(r.from+l,f),c=r.from+l+s.length,a.addMark(r.from+l,c,e.type.create(i||{})),a.removeStoredMark(e.type)}}}))]},addProseMirrorPlugins:function(){var e,t=[];return this.options.autolink&&t.push(Ov({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new ga({key:new wa("handleClickLink"),props:{handleClick:function(t,n,r){var o,i=jf(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href)&&(window.open(i.href,i.target),!0)}}}))),this.options.linkOnPaste&&t.push(function(e){return new ga({key:new wa("handlePasteLink"),props:{handlePaste:function(t,n,r){if(t.state.selection.empty)return!1;var o="";r.content.forEach((function(e){o+=e.textContent}));var i=xv(o).find((function(e){return e.isLink&&e.value===o}));return!(!o||!i)&&(e.editor.commands.setMark(e.type,{href:i.href}),!0)}}})}({editor:this.editor,type:this.type})),t}}),Sv=Pf.create({name:"paragraph",priority:1e3,addOptions:function(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML:function(){return[{tag:"p"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["p",Cl(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setParagraph:function(){return function(t){return t.commands.setNode(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-0":function(){return e.editor.commands.setParagraph()}}}}),Cv=Pf.create({name:"doc",topNode:!0,content:"block+"}),_v=/^\s*>\s$/,jv=Pf.create({name:"blockquote",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML:function(){return[{tag:"blockquote"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["blockquote",Cl(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setBlockquote:function(){return function(t){return t.commands.wrapIn(e.name)}},toggleBlockquote:function(){return function(t){return t.commands.toggleWrap(e.name)}},unsetBlockquote:function(){return function(t){return t.commands.lift(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-b":function(){return e.editor.commands.toggleBlockquote()}}},addInputRules:function(){return[(e={find:_v,type:this.type},new Pl({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Al(e.getAttributes,void 0,o)||{},a=n.tr.delete(r.from,r.to),s=a.doc.resolve(r.from).blockRange(),u=s&&_i(s,e.type,i);if(!u)return null;a.wrap(s,u);var c=a.doc.resolve(r.from-1).nodeBefore;c&&c.type===e.type&&Ri(a.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(o,c))&&a.join(r.from-1)}}))];var e}});var Av,Tv=function(e){var t,n=Object(o.useContext)(Qn),r=n.member,i=n.postId,a=n.dispatchAction,s=n.onAction,c=n.avatarSaturation;t=e.isReply?{placeholder:"Reply to comment",autofocus:!1}:e.isEdit?{placeholder:"Edit this comment",autofocus:!1,content:e.comment.html}:{placeholder:"Join the discussion",autofocus:!1};var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(o.useState)(null),r=Object(Se.a)(n,2),i=r[0],a=r[1],s=Qp();return Object(o.useEffect)((function(){var t=!0,n=new qp(e);return a(n),n.on("transaction",(function(){requestAnimationFrame((function(){requestAnimationFrame((function(){t&&s()}))}))})),function(){n.destroy(),t=!1}}),t),i}(Object(u.a)({},function(e){var t=e.placeholder,n=e.autofocus,r=void 0!==n&&n,o=e.content,i=void 0===o?"":o;return{extensions:[Cv,Zp,Sv,Dv.configure({openOnClick:!1}),Xp.configure({placeholder:t}),jv.configure({})],content:i,autofocus:r,editorProps:{attributes:{class:"gh-comment-content focus:outline-0"}},parseOptions:{preserveWhitespace:"full"}}}(t)));Object(o.useEffect)((function(){f&&e.isEdit&&f.chain().focus().command((function(e){var t=e.tr;return e.commands.setTextSelection({from:t.doc.content.size,to:t.doc.content.size})})).run()}),[f,e.isEdit]);var p,h=(null===f||void 0===f?void 0:f.isFocused)||!(null!==f&&void 0!==f&&f.isEmpty),v=function(){var t=d(l().mark((function t(n){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),!f.isEmpty){t.next=3;break}return t.abrupt("return");case 3:if(!e.isReply){t.next=16;break}return t.prev=4,t.next=7,a("addReply",{parent:e.parent,reply:{post_id:i,status:"published",html:f.getHTML()}});case 7:f.chain().clearContent().blur().run(),e.toggle(),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),console.error(t.t0);case 14:t.next=31;break;case 16:if(!e.isEdit){t.next=22;break}return t.next=19,a("editComment",{comment:{id:e.comment.id,html:f.getHTML()},parent:e.parent});case 19:e.toggle(),t.next=31;break;case 22:return t.prev=22,t.next=25,s("addComment",{post_id:i,status:"published",html:f.getHTML()});case 25:f.chain().clearContent().blur().run(),t.next=31;break;case 28:t.prev=28,t.t1=t.catch(22),console.error(t.t1);case 31:return t.abrupt("return",!1);case 32:case"end":return t.stop()}}),t,null,[[4,11],[22,28]])})));return function(e){return t.apply(this,arguments)}}(),m=e.comment,y=e.commentsCount,g=e.isEdit?m.member.name:r.name;return p=e.isReply?"Add reply":e.isEdit?"Edit comment":"Add comment",Object(j.jsx)("form",{onClick:function(e){f.commands.focus()},className:"\n comment-form\n bg-white\n transition\n duration-200\n rounded-md\n pt-3 pb-2 px-3\n -mt-[12px] -mr-3 mb-10 -ml-[12px]\n shadow-lg\n dark:bg-[rgba(255,255,255,0.08)]\n dark:shadow-transparent\n hover:shadow-xl\n ".concat(!y&&!e.isEdit&&!e.isReply&&"-mt-0 -mr-0 -ml-0","\n ").concat(h?"cursor-default":"cursor-pointer"),children:Object(j.jsxs)("div",{className:"w-full relative",children:[Object(j.jsx)("div",{className:"pr-3 font-sans leading-normal dark:text-neutral-300",children:Object(j.jsxs)("div",{className:"relative w-full",children:[Object(j.jsx)(Gp,{className:"\n transition-[min-height]\n pl-[56px] px-0 py-[10px] pr-4\n duration-150\n bg-transparent\n w-full\n border-none\n resize-none\n rounded-md\n border\n border-slate-50 \n font-sans\n text-[16.5px]\n leading-normal\n focus:outline-0\n placeholder:text-neutral-300\n dark:placeholder:text-[rgba(255,255,255,0.3)]\n dark:border-none\n dark:text-neutral-300\n ".concat(h?"cursor-text min-h-[144px] pt-[44px] pb-[68px]":"cursor-pointer overflow-hidden min-h-[48px] hover:border-slate-300","\n "),editor:f}),Object(j.jsxs)("div",{className:"flex space-x-4 transition-[opacity] duration-150 absolute -right-3 bottom-[2px]",children:[e.isEdit&&Object(j.jsx)("button",{type:"button",className:"font-sans text-sm font-medium ml-2.5 text-neutral-500 dark:text-neutral-400",onClick:e.toggle,children:"Cancel"}),Object(j.jsx)("button",{className:"transition-[opacity] duration-150 rounded-[4px] border py-3 px-4 font-sans text-sm text-center bg-neutral-900 font-semibold text-white dark:bg-[rgba(255,255,255,0.9)] dark:text-neutral-800",type:"button",onClick:v,children:p})]})]})}),Object(j.jsxs)("div",{className:"flex mb-1 justify-start items-center absolute top-0 left-0",children:[Object(j.jsx)(ro,{comment:m,saturation:c}),Object(j.jsx)(to,{show:h,enter:"transition duration-500 ease-in-out",enterFrom:"opacity-0 -translate-x-2",enterTo:"opacity-100 translate-x-0",leave:"transition-none duration-0",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(j.jsx)("div",{className:"ml-3",children:Object(j.jsx)("h4",{className:"text-lg font-sans font-semibold mb-1 tracking-tight dark:text-neutral-300",children:g||"Anonymous"})})})]})]})})},Nv=["title","titleId"];function Mv(){return Mv=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},Mv.apply(this,arguments)}function Fv(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Bv(e,t){var n=e.title,r=e.titleId,i=Fv(e,Nv);return o.createElement("svg",Mv({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"black",ref:t,"aria-labelledby":r},i),n?o.createElement("title",{id:r},n):null,Av||(Av=o.createElement("path",{d:"M8.00025 13.8739L2.46073 8.09636C1.97388 7.60989 1.65255 6.98248 1.54231 6.30312C1.43208 5.62376 1.53853 4.92694 1.84658 4.31148V4.31148C2.07887 3.84703 2.41819 3.44443 2.83659 3.13684C3.25499 2.82925 3.74049 2.62547 4.25308 2.54231C4.76567 2.45914 5.29069 2.49896 5.78488 2.65849C6.27906 2.81802 6.72827 3.09269 7.09549 3.45987L8.00025 4.36406L8.90502 3.45987C9.27224 3.09269 9.72145 2.81802 10.2156 2.65849C10.7098 2.49896 11.2348 2.45914 11.7474 2.54231C12.26 2.62547 12.7455 2.82925 13.1639 3.13684C13.5823 3.44443 13.9216 3.84703 14.1539 4.31148C14.4616 4.9267 14.5678 5.62311 14.4577 6.30208C14.3476 6.98105 14.0267 7.60817 13.5404 8.09462L8.00025 13.8739Z",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})))}var Rv=o.forwardRef(Bv);n.p;var Pv,Iv=function(e){var t=Object(o.useContext)(Qn).onAction;return Object(j.jsxs)("button",{className:"flex font-sans items-center text-sm ".concat(e.comment.liked?"text-neutral-900 dark:text-[rgba(255,255,255,0.9)]":"text-neutral-400 dark:text-[rgba(255,255,255,0.5)]"),onClick:function(){e.comment.liked?t("unlikeComment",e.comment):t("likeComment",e.comment)},children:[Object(j.jsx)(Rv,{className:"mr-[6px] ".concat(e.comment.liked?"fill-neutral-900 stroke-neutral-900 dark:fill-white dark:stroke-white":"stroke-neutral-400 dark:stroke-[rgba(255,255,255,0.5)]")}),e.comment.likes_count]})},Lv=["title","titleId"];function zv(){return zv=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},zv.apply(this,arguments)}function Uv(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Vv(e,t){var n=e.title,r=e.titleId,i=Uv(e,Lv);return o.createElement("svg",zv({width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"black",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},i),n?o.createElement("title",{id:r},n):null,Pv||(Pv=o.createElement("path",{d:"M7.17463 2.98741C7.17439 2.7888 7.11434 2.59487 7.00229 2.43088C6.89025 2.26689 6.73141 2.14046 6.54647 2.06805C6.36153 1.99564 6.15907 1.98061 5.96546 2.02492C5.77186 2.06923 5.5961 2.17083 5.46107 2.31648L1.86192 6.21418C1.69351 6.39677 1.60001 6.63606 1.60001 6.88445C1.60001 7.13284 1.69351 7.37213 1.86192 7.55472L5.45909 11.4524C5.59412 11.5981 5.76988 11.6997 5.96349 11.744C6.15709 11.7883 6.35955 11.7733 6.54449 11.7009C6.72943 11.6284 6.88827 11.502 7.00032 11.338C7.11236 11.174 7.17242 10.9801 7.17265 10.7815V8.86164H9.12703C10.438 8.86164 11.6953 9.38241 12.6222 10.3094C13.5492 11.2364 14.07 12.4937 14.07 13.8046V9.85023C14.07 8.53927 13.5492 7.28201 12.6222 6.35502C11.6953 5.42803 10.438 4.90726 9.12703 4.90726H7.17265L7.17463 2.98741Z",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})))}var $v=o.forwardRef(Vv);n.p;var Hv=function(e){return Object(o.useContext)(Qn).member?Object(j.jsxs)("button",{className:"flex font-sans items-center text-sm ".concat(e.isReplying?"text-neutral-900 dark:text-[rgba(255,255,255,0.9)]":"text-neutral-400 dark:text-[rgba(255,255,255,0.5)]"),onClick:e.toggleReply,children:[Object(j.jsx)($v,{className:"mr-[6px] ".concat(e.isReplying?"fill-neutral-900 stroke-neutral-900 dark:fill-white dark:stroke-white":"stroke-neutral-400 dark:stroke-[rgba(255,255,255,0.5)]")}),"Reply"]}):null},qv=function(e){var t=Object(o.useContext)(Qn).dispatchAction,n="published"!==e.comment.status;return Object(j.jsx)("div",{className:"flex flex-col",children:n?Object(j.jsx)("button",{className:"text-[14px]",onClick:function(n){t("showComment",e.comment),e.close()},children:"Show comment"}):Object(j.jsx)("button",{className:"text-[14px]",onClick:function(n){t("hideComment",e.comment),e.close()},children:"Hide comment"})})},Wv=function(e){y(n,e);var t=x(n);function n(e){var r;return p(this,n),(r=t.call(this,e)).state={},r.deleteComment=r.deleteComment.bind(k(r)),r}return v(n,[{key:"deleteComment",value:function(e){this.context.onAction("deleteComment",this.props.comment),this.close()}},{key:"close",value:function(){this.props.close()}},{key:"render",value:function(){return Object(j.jsxs)("div",{className:"flex flex-col",children:[Object(j.jsx)("button",{className:"w-full mb-3 text-left text-[14px]",onClick:this.props.toggleEdit,children:"Edit"}),Object(j.jsx)("button",{className:"w-full text-left text-[14px]",onClick:this.deleteComment,children:"Delete"})]})}}]),n}(i.a.Component);Wv.contextType=Qn;var Kv=Wv,Gv=function(e){y(n,e);var t=x(n);function n(e){var r;return p(this,n),(r=t.call(this,e)).state={},r.reportComment=r.reportComment.bind(k(r)),r}return v(n,[{key:"reportComment",value:function(e){this.close()}},{key:"close",value:function(){this.props.close()}},{key:"render",value:function(){return Object(j.jsx)("button",{className:"text-[14px]",onClick:this.reportComment,children:"Report comment"})}}]),n}(i.a.Component);Gv.contextType=Qn;var Yv=Gv,Jv=function(e){y(n,e);var t=x(n);function n(e){var r;return p(this,n),(r=t.call(this,e)).state={},r.close=r.close.bind(k(r)),r}return v(n,[{key:"isAuthor",get:function(){var e,t;return this.props.comment.member.uuid===(null===(e=this.context)||void 0===e||null===(t=e.member)||void 0===t?void 0:t.uuid)}},{key:"isAdmin",get:function(){return!!this.context.admin}},{key:"close",value:function(){this.props.close()}},{key:"render",value:function(){var e=this.props.comment;return Object(j.jsx)("div",{className:"min-w-[170px] bg-white absolute font-sans rounded py-3 px-4 shadow-lg text-sm whitespace-nowrap z-10 dark:bg-zinc-900 dark:text-white",children:this.isAuthor&&"published"===e.status?Object(j.jsx)(Kv,{comment:e,close:this.close,toggleEdit:this.props.toggleEdit}):this.isAdmin?Object(j.jsx)(qv,{comment:e,close:this.close}):Object(j.jsx)(Yv,{comment:e,close:this.close})})}}]),n}(i.a.Component);Jv.contextType=Qn;var Qv,Xv,Zv,em=Jv,tm=["title","titleId"];function nm(){return nm=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},nm.apply(this,arguments)}function rm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function om(e,t){var n=e.title,r=e.titleId,i=rm(e,tm);return o.createElement("svg",nm({width:16,height:16,viewBox:"0 0 16 16",fill:"black",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},i),n?o.createElement("title",{id:r},n):null,Qv||(Qv=o.createElement("path",{d:"M3 12C3.82843 12 4.5 11.3284 4.5 10.5C4.5 9.67157 3.82843 9 3 9C2.17157 9 1.5 9.67157 1.5 10.5C1.5 11.3284 2.17157 12 3 12Z"})),Xv||(Xv=o.createElement("path",{d:"M8 12C8.82843 12 9.5 11.3284 9.5 10.5C9.5 9.67157 8.82843 9 8 9C7.17157 9 6.5 9.67157 6.5 10.5C6.5 11.3284 7.17157 12 8 12Z"})),Zv||(Zv=o.createElement("path",{d:"M13 12C13.8284 12 14.5 11.3284 14.5 10.5C14.5 9.67157 13.8284 9 13 9C12.1716 9 11.5 9.67157 11.5 10.5C11.5 11.3284 12.1716 12 13 12Z"})))}var im=o.forwardRef(om),am=(n.p,function(e){var t=Object(o.useState)(!1),n=Object(Se.a)(t,2),r=n[0],i=n[1],a=Object(o.useContext)(Qn),s=a.member,u=a.admin,c=function(){i((function(e){return!e}))},l=e.comment,f=!!s&&"published"===l.status||!!u;return Object(j.jsxs)("div",{className:"relative",children:[f?Object(j.jsx)("button",{onClick:c,children:Object(j.jsx)(im,{className:"gh-comments-icon gh-comments-icon-more fill-neutral-400 dark:fill-rgba(255,255,255,0.5)"})}):null,r?Object(j.jsx)(em,{comment:l,close:c,toggleEdit:e.toggleEdit}):null]})}),sm=function(e){var t=e.comment;return Object(j.jsx)("div",{children:t.replies.map((function(e){return Object(j.jsx)(um,{comment:e,parent:t,isReply:!0},e.id)}))})},um=function(e){var t=Object(o.useState)(!1),n=Object(Se.a)(t,2),r=n[0],i=n[1],a=Object(o.useState)(!1),s=Object(Se.a)(a,2),u=s[0],c=s[1],l=function(){i((function(e){return!e}))},f=function(){c((function(e){return!e}))},d=Object(o.useContext)(Qn),p=d.admin,h=d.avatarSaturation,v=e.comment,m=v.replies&&v.replies.length>0,y="published"!==v.status,g={__html:v.html};return y&&(p&&"hidden"===v.status?g.__html="<i>This comment has been hidden.</i>":g.__html="<i>This comment has been removed.</i>"),r?Object(j.jsx)(Tv,{comment:v,toggle:l,parent:e.parent,isEdit:!0,avatarSaturation:e.avatarSaturation}):Object(j.jsxs)(j.Fragment,{children:[Object(j.jsx)("div",{className:"flex flex-col ".concat(m?"mb-4":"mb-12"),children:Object(j.jsxs)("div",{children:[Object(j.jsxs)("div",{className:"flex justify-start items-center",children:[Object(j.jsx)(ro,{comment:v,saturation:h}),Object(j.jsx)("div",{className:"ml-3",children:Object(j.jsx)("h4",{className:"text-lg font-sans font-semibold mb-1 tracking-tight dark:text-[rgba(255,255,255,0.85)]",children:v.member.name})})]}),Object(j.jsx)("div",{className:"ml-14 mb-4 pr-4 font-sans leading-normal ".concat(y?"text-neutral-400":"text-neutral-900"," dark:text-[rgba(255,255,255,0.85)]"),children:Object(j.jsx)("p",{dangerouslySetInnerHTML:g,className:"gh-comment-content text-[16.5px] leading-normal"})}),Object(j.jsxs)("div",{className:"ml-14 flex gap-5 items-center",children:[Object(j.jsx)(Iv,{comment:v}),(y||!e.parent)&&Object(j.jsx)(Hv,{comment:v,toggleReply:f,isReplying:u}),Object(j.jsx)("div",{className:"text-sm text-neutral-400 dark:text-[rgba(255,255,255,0.5)] font-sans",children:C(v.created_at)}),Object(j.jsx)(am,{comment:v,toggleEdit:l})]})]})}),Object(j.jsx)(to,{show:u,enter:"transition duration-500 delay-50 ease-in-out",enterFrom:"opacity-0 -translate-y-2",enterTo:"opacity-100 translate-y-0",leave:"transition-none duration-0",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(j.jsx)("div",{className:"ml-14 my-10",children:Object(j.jsx)(Tv,{parent:v,toggle:f,isReply:!0})})}),m&&Object(j.jsx)("div",{className:"ml-14 mt-10",children:Object(j.jsx)(sm,{comment:v})})]})},cm=function(e){var t=Object(o.useContext)(Qn),n=t.pagination,r=t.dispatchAction;if(!n)return null;var i=n.total-n.page*n.limit;return i<=0?null:Object(j.jsxs)("button",{className:"w-full rounded-md bg-neutral-100 text-neutral-700 font-semibold px-3 py-3.5 mb-12 font-sans text-md text-center dark:bg-[rgba(255,255,255,0.08)] dark:text-white",onClick:function(){r("loadMoreComments")},children:["\u2191 Show ",i," previous comments"]})},lm=function(e){var t=function(e,t,n){var r=[e,t,n].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*r[0]+.7152*r[1]+.0722*r[2]},n=Object(o.useContext)(Qn),r=n.accentColor,i=n.pagination,a=n.member,s=n.comments,u=s?s.slice().reverse().map((function(t){return Object(j.jsx)(um,{comment:t,avatarSaturation:e.avatarSaturation},t.id)})):"Loading...",c=function(){if("light"===e.colorScheme)return!1;if("dark"===e.colorScheme)return!0;var n=getComputedStyle(document.querySelector("#ghost-comments-root").parentNode).getPropertyValue("color"),r=n.substring(n.indexOf("(")+1,n.lastIndexOf(")")).split(/,\s*/);return function(e,n){var r=t(e[0],e[1],e[2]),o=t(n[0],n[1],n[2]);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}([255,255,255],[r[0],r[1],r[2]])<5}()?"dark":"",l=s.length,f={"--gh-accent-color":null!==r&&void 0!==r?r:"blue"};return Object(j.jsxs)("section",{className:c,style:f,children:[Object(j.jsx)(cm,{}),Object(j.jsx)("div",{className:i?"":"mt-4",children:u}),Object(j.jsx)("div",{children:a?Object(j.jsx)(Tv,{commentsCount:l,avatarSaturation:e.avatarSaturation}):Object(j.jsx)(tr,{})})]})};function fm(e){var t=e.adminUrl,n=e.onLoad;Object(o.useEffect)((function(){n()}),[]);return Object(j.jsx)("iframe",{"data-frame":"admin-auth",src:t+"auth-frame/",style:{display:"none"},title:"auth-frame"})}function dm(e){var t=e.done,n=e.appVersion;return t?Object(j.jsx)(T,{appVersion:n,children:Object(j.jsx)(lm,{})}):null}function pm(e){var t=e.dsn,n=e.children;return t?Object(j.jsx)(Pn,{children:n}):Object(j.jsx)(j.Fragment,{children:n})}var hm=function(e){y(n,e);var t=x(n);function n(e){var r;return p(this,n),(r=t.call(this,e)).state={action:"init:running",initStatus:"running",member:null,admin:null,comments:null,pagination:null,popupNotification:null,customSiteUrl:e.customSiteUrl,postId:e.postId,accentColor:e.accentColor},r}return v(n,[{key:"initSetup",value:function(){var e=d(l().mark((function e(){var t,n,r,o,i,a,s,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetchApiData();case 3:return t=e.sent,n=t.site,r=t.member,e.next=8,this.fetchComments();case 8:return o=e.sent,i=o.comments,a=o.pagination,this.adminApi=this.setupAdminAPI(),s=null,e.prev=13,e.next=16,this.adminApi.getUser();case 16:s=e.sent,console.log(s),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(13),console.error(e.t0);case 23:u={site:n,member:r,admin:s,action:"init:success",initStatus:"success",comments:i,pagination:a},this.setState(u),e.next=31;break;case 27:e.prev=27,e.t1=e.catch(0),console.error("[Comments] Failed to initialize:",e.t1),this.setState({action:"init:failed",initStatus:"failed"});case 31:case"end":return e.stop()}}),e,this,[[0,27],[13,20]])})));return function(){return e.apply(this,arguments)}}()},{key:"dispatchAction",value:function(){var e=d(l().mark((function e(t,n){var r,o,i=this;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this.timeoutId),this.setState({action:"".concat(t,":running")}),e.prev=2,e.next=5,Yn({action:t,data:n,state:this.state,api:this.GhostApi,adminApi:this.adminApi});case 5:r=e.sent,this.setState(r),r&&r.action&&!r.action.includes(":failed")&&(this.timeoutId=setTimeout((function(){i.setState({action:""})}),2e3)),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(2),console.error(e.t0),o=D({type:"".concat(t,":failed"),autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:e.t0}}),this.setState({action:"".concat(t,":failed"),popupNotification:o});case 15:case"end":return e.stop()}}),e,this,[[2,10]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchApiData",value:function(){var e=d(l().mark((function e(){var t,n,r,o,i,a,s,u;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.siteUrl,r=t.customSiteUrl,o=t.apiUrl,i=t.apiKey,e.prev=1,this.GhostApi=this.props.api||er({siteUrl:n,apiUrl:o,apiKey:i}),e.next=5,this.GhostApi.init();case 5:return a=e.sent,s=a.site,u=a.member,this.setupSentry({site:s}),e.abrupt("return",{site:s,member:u});case 12:if(e.prev=12,e.t0=e.catch(1),!Zn(["dev","test"],{customSiteUrl:r})){e.next=16;break}return e.abrupt("return",{});case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,this,[[1,12]])})));return function(){return e.apply(this,arguments)}}()},{key:"fetchComments",value:function(){var e=d(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.GhostApi.comments.browse({page:1,postId:this.state.postId});case 2:return t=e.sent,e.abrupt("return",{comments:t.comments,pagination:t.meta.pagination});case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setupAdminAPI",value:function(){var e=document.querySelector('iframe[data-frame="admin-auth"]'),t=1,n={};function r(r,o){return new Promise((function(i,a){n[t+=1]=function(e,t){return e?a(e):i(t)},e.contentWindow.postMessage(JSON.stringify(Object(u.a)({uid:t,action:r},o)),"*")}))}return window.addEventListener("message",(function(e){e.origin;var t=null;try{t=JSON.parse(e.data)}catch(o){return void console.error("Error parsing event data",o)}var r=n[t.uid];r&&(delete n[t.uid],r(t.error,t.result))})),{getUser:function(){return d(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r("getUser");case 2:return t=e.sent,e.abrupt("return",t.users[0]);case 4:case"end":return e.stop()}}),e)})))()},hideComment:function(e){return d(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r("hideComment",{id:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()},showComment:function(e){return d(l().mark((function t(){return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r("showComment",{id:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()}}}},{key:"setupSentry",value:function(e){var t=e.site;if(Zn(["test"]))return null;var n=t.portal_sentry,r=(t.portal_version,t.version),o="comments@".concat("0.1.1","|ghost@").concat(r);n&&n.dsn&&In({dsn:n.dsn,environment:n.env||"development",release:o,beforeSend:function(e){return function(e){var t,n,r,o,i=e.event,a=((null===i||void 0===i||null===(t=i.exception)||void 0===t||null===(n=t.values)||void 0===n||null===(r=n[0])||void 0===r||null===(o=r.stacktrace)||void 0===o?void 0:o.frames)||[]).map((function(e){return e.filename})).filter((function(e){return!!e}));return(a[a.length-1]||"").includes("@tryghost/comments")}({event:e})?e:null},allowUrls:[/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/comments/]})}},{key:"getContextFromState",value:function(){var e=this,t=this.state,n=t.action,r=t.popupNotification,o=t.customSiteUrl,i=t.member,a=t.comments,s=t.pagination,u=t.postId;return{action:n,popupNotification:r,customSiteUrl:o,member:i,admin:t.admin,comments:a,pagination:s,postId:u,colorScheme:this.props.colorScheme,avatarSaturation:this.props.avatarSaturation,accentColor:this.props.accentColor,dispatchAction:function(t,n){return e.dispatchAction(t,n)},onAction:function(t,n){return e.dispatchAction(t,n)}}}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"render",value:function(){var e="success"===this.state.initStatus;return Object(j.jsx)(pm,{dsn:this.props.sentryDsn,children:Object(j.jsxs)(Qn.Provider,{value:this.getContextFromState(),children:[Object(j.jsx)(dm,{done:e,appVersion:this.props.appVersion}),Object(j.jsx)(fm,{adminUrl:this.props.adminUrl,onLoad:this.initSetup.bind(this)})]})})}}]),n}(i.a.Component),vm="ghost-comments-root";function mm(e){e.siteUrl;!function(){var e=document.querySelector("script[data-ghost-comments]");if(e){var t=document.createElement("div");t.id=vm,e.parentElement.insertBefore(t,e)}else console.warn("Comment box location was not found: could not load comments box.")}(),function(){var e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}()}!function(){var e=function(){var e=document.querySelector("script[data-ghost-comments]");if(e){var t=e.dataset.ghostComments,n=e.dataset.key,r=e.dataset.api,o=e.dataset.admin;return{siteUrl:t,apiKey:n,apiUrl:r,sentryDsn:e.dataset.sentryDsn,postId:e.dataset.postId,adminUrl:o,colorScheme:e.dataset.colorScheme,avatarSaturation:e.dataset.avatarSaturation,accentColor:e.dataset.accentColor,appVersion:e.dataset.appVersion}}return{}}(),t=e.siteUrl,n=e.sentryDsn,r=e.postId,o=e.adminUrl,a=e.colorScheme,u=e.avatarSaturation,c=e.accentColor,l=e.appVersion,f=t||window.location.origin;mm({siteUrl:f}),s.a.render(Object(j.jsx)(i.a.StrictMode,{children:Object(j.jsx)(hm,{appVersion:l,adminUrl:o,siteUrl:f,customSiteUrl:t,sentryDsn:n,postId:r,colorScheme:a,avatarSaturation:u,accentColor:c})}),document.getElementById(vm))}()},,,,,,,,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(4),o=n(6),i=n(28),a=n(10),s=n(17);function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return l("",e,t,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400,r=u(e,t);return d(r)>n?c(e,t-1,n):r}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Object(i.a)(),c=Object(r.a)(u,2),d=c[0],p=c[1];if(null===t||["number","boolean","string"].includes(typeof t)&&!Object(o.h)(t))return t;var h=f(e,t);if(!h.startsWith("[object "))return h;if(t.__sentry_skip_normalization__)return t;if(0===n)return h.replace("object ","");if(d(t))return"[Circular ~]";var v=t;if(v&&"function"===typeof v.toJSON)try{var m=v.toJSON();return l("",m,n-1,s,u)}catch(x){}var y=Array.isArray(t)?[]:{},g=0,b=Object(a.b)(t);for(var k in b)if(Object.prototype.hasOwnProperty.call(b,k)){if(g>=s){y[k]="[MaxProperties ~]";break}var w=b[k];y[k]=l(k,w,n-1,s,u),g+=1}return p(t),y}function f(t,n){try{return"domain"===t&&n&&"object"===typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!==typeof e&&n===e?"[Global]":"undefined"!==typeof window&&n===window?"[Window]":"undefined"!==typeof document&&n===document?"[Document]":Object(o.m)(n)?"[SyntheticEvent]":"number"===typeof n&&n!==n?"[NaN]":void 0===n?"[undefined]":"function"===typeof n?"[Function: ".concat(Object(s.b)(n),"]"):"symbol"===typeof n?"[".concat(String(n),"]"):"bigint"===typeof n?"[BigInt: ".concat(String(n),"]"):"[object ".concat(Object.getPrototypeOf(n).constructor.name,"]")}catch(r){return"**non-serializable** (".concat(r,")")}}function d(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}}).call(this,n(20))}]);
2
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=38)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(5);function o(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=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";e.exports=n(30)},function(e,t,n){"use strict";e.exports=n(34)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(14);var o=n(13);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";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}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(13);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return g})),n.d(t,"h",(function(){return y})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return l})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return c})),n.d(t,"m",(function(){return m})),n.d(t,"n",(function(){return v}));var r=Object.prototype.toString;function o(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(e,Error)}}function i(e,t){return r.call(e)==="[object ".concat(t,"]")}function a(e){return i(e,"ErrorEvent")}function s(e){return i(e,"DOMError")}function u(e){return i(e,"DOMException")}function c(e){return i(e,"String")}function l(e){return null===e||"object"!==typeof e&&"function"!==typeof e}function f(e){return i(e,"Object")}function d(e){return"undefined"!==typeof Event&&g(e,Event)}function p(e){return"undefined"!==typeof Element&&g(e,Element)}function h(e){return i(e,"RegExp")}function v(e){return Boolean(e&&e.then&&"function"===typeof e.then)}function m(e){return f(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function y(e){return"number"===typeof e&&e!==e}function g(e,t){try{return e instanceof t}catch(n){return!1}}},,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(15),o={};function i(){return Object(r.b)()?e:"undefined"!==typeof window?window:"undefined"!==typeof self?self:o}function a(e,t,n){var r=n||i(),o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}}).call(this,n(21))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return f}));var r=n(0),o=n(25),i=n(7),a=n(12);function s(e,t,n){if(t in e){var r=e[t],o=n(r);if("function"===typeof o)try{c(o,r)}catch(i){}e[t]=o}}function u(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function c(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,u(e,"__sentry_original__",t)}function l(e){return e.__sentry_original__}function f(e){return Object.keys(e).map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))})).join("&")}function d(e){if(Object(i.d)(e))return Object(r.a)({message:e.message,name:e.name,stack:e.stack},h(e));if(Object(i.f)(e)){var t=Object(r.a)({type:e.type,target:p(e.target),currentTarget:p(e.currentTarget)},h(e));return"undefined"!==typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function p(e){try{return Object(i.c)(e)?Object(o.b)(e):Object.prototype.toString.call(e)}catch(t){return"<unknown>"}}function h(e){if("object"===typeof e&&null!==e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(a.d)(n[0],t);for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(!(o.length>t))return r===n.length?o:Object(a.d)(o,t)}return""}function m(e){return y(e,new Map)}function y(e,t){if(Object(i.i)(e)){if(void 0!==(s=t.get(e)))return s;var n={};t.set(e,n);for(var r=0,o=Object.keys(e);r<o.length;r++){var a=o[r];"undefined"!==typeof e[a]&&(n[a]=y(e[a],t))}return n}if(Array.isArray(e)){var s;if(void 0!==(s=t.get(e)))return s;n=[];return t.set(e,n),e.forEach((function(e){n.push(y(e,t))})),n}return e}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(31)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o}));var r=n(7);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof e||0===t||e.length<=t?e:"".concat(e.substr(0,t),"...")}function i(e,t){var n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);var o=Math.max(t-60,0);o<5&&(o=0);var i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} ".concat(n)),i<r&&(n+=" {snip}"),n}function a(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r<e.length;r++){var o=e[r];try{n.push(String(o))}catch(i){n.push("[value cannot be serialized]")}}return n.join(t)}function s(e,t){return!!Object(r.l)(e)&&(Object(r.k)(t)?t.test(e):"string"===typeof t&&-1!==e.indexOf(t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(14);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var o=n(24);function i(){return!Object(o.a)()&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof e?e:0)}function a(e,t){return e.require(t)}}).call(this,n(37),n(20)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return s}));var r=n(0),o=n(3),i=n(6);function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.sort((function(e,t){return e[0]-t[0]})).map((function(e){return e[1]}));return function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=[],a=Object(i.a)(e.split("\n").slice(n));try{for(a.s();!(t=a.n()).done;){var s,c=t.value,l=Object(i.a)(r);try{for(l.s();!(s=l.n()).done;){var f=s.value,d=f(c);if(d){o.push(d);break}}}catch(p){l.e(p)}finally{l.f()}}}catch(p){a.e(p)}finally{a.f()}return u(o)}}function s(e){return Array.isArray(e)?a.apply(void 0,Object(o.a)(e)):e}function u(e){if(!e.length)return[];var t=e,n=t[0].function||"",o=t[t.length-1].function||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==o.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return Object(r.a)(Object(r.a)({},e),{},{filename:e.filename||t[0].filename,function:e.function||"?"})})).reverse()}var c="<anonymous>";function l(e){try{return e&&"function"===typeof e&&e.name||c}catch(t){return c}}},,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(35),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),v=u(n),m=0;m<a.length;++m){var y=a[m];if(!i[y]&&(!r||!r[y])&&(!v||!v[y])&&(!s||!s[y])){var g=d(n,y);try{c(t,y,g)}catch(b){}}}}return t}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(9),o=n(15),i={nowSeconds:function(){return Date.now()/1e3}};var a=Object(o.b)()?function(){try{return Object(o.a)(e,"perf_hooks").performance}catch(t){return}}():function(){var e=Object(r.a)().performance;if(e&&e.now)return{now:function(){return e.now()},timeOrigin:Date.now()-e.now()}}(),s=void 0===a?i:{nowSeconds:function(){return(a.timeOrigin+a.now())/1e3}},u=i.nowSeconds.bind(i),c=s.nowSeconds.bind(s);!function(){var e=Object(r.a)().performance;if(e&&e.now){var t=36e5,n=e.now(),o=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-o):t,a=i<t,s=e.timing&&e.timing.navigationStart,u="number"===typeof s?Math.abs(s+n-o):t;return a||u<t?i<=u?("timeOrigin",e.timeOrigin):("navigationStart",s):("dateNow",o)}"none"}()}).call(this,n(20)(e))},function(e,t,n){"use strict";function r(){return"undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));var r=n(9),o=n(7);function i(e,t){try{for(var n,r=e,o=[],i=0,s=0,u=" > ".length;r&&i++<5&&!("html"===(n=a(r,t))||i>1&&s+o.length*u+n.length>=80);)o.push(n),s+=n.length,r=r.parentNode;return o.reverse().join(" > ")}catch(c){return"<unknown>"}}function a(e,t){var n,r,i,a,s,u=e,c=[];if(!u||!u.tagName)return"";c.push(u.tagName.toLowerCase());var l=t&&t.length?t.filter((function(e){return u.getAttribute(e)})).map((function(e){return[e,u.getAttribute(e)]})):null;if(l&&l.length)l.forEach((function(e){c.push("[".concat(e[0],'="').concat(e[1],'"]'))}));else if(u.id&&c.push("#".concat(u.id)),(n=u.className)&&Object(o.l)(n))for(r=n.split(/\s+/),s=0;s<r.length;s++)c.push(".".concat(r[s]));var f=["type","name","title","alt"];for(s=0;s<f.length;s++)i=f[s],(a=u.getAttribute(i))&&c.push("[".concat(i,'="').concat(a,'"]'));return c.join("")}function s(){var e=Object(r.a)();try{return e.document.location.href}catch(t){return""}}},function(e,t,n){"use strict";function r(){var e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(var r=0;r<t.length;r++){if(t[r]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(var r=0;r<t.length;r++)if(t[r]===n){t.splice(r,1);break}}]}n.d(t,"a",(function(){return r}))},,,,function(e,t,n){"use strict";var r=n(19),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"===typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var d="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v={};function m(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function y(){}function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=m.prototype;var b=g.prototype=new y;b.constructor=g,r(b,m.prototype),b.isPureReactComponent=!0;var k={current:null},w=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:k.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var D=/\/+/g;function S(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+S(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(D,"$&/")+"/"),C(a,t,n,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(D,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+S(s=e[c],c);u+=C(s,t,n,l,a)}else if(l=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"===typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=C(s=s.value,t,n,l=r+S(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function _(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function j(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var A={current:null};function T(){var e=A.current;if(null===e)throw Error(p(321));return e}var N={ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:_,forEach:function(e,t,n){_(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return _(e,(function(){t++})),t},toArray:function(e){return _(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error(p(143));return e}},t.Component=m,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=k.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)w.call(t,l)&&!x.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:j}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return T().useCallback(e,t)},t.useContext=function(e,t){return T().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return T().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return T().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return T().useLayoutEffect(e,t)},t.useMemo=function(e,t){return T().useMemo(e,t)},t.useReducer=function(e,t,n){return T().useReducer(e,t,n)},t.useRef=function(e){return T().useRef(e)},t.useState=function(e){return T().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(1),o=n(19),i=n(32);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function c(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var f=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},v={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function k(e,t,n,r){var o=y.hasOwnProperty(t)?y[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(v,e)||!p.call(h,e)&&(d.test(e)?v[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);y[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,O=60106,E=60107,D=60108,S=60114,C=60109,_=60110,j=60112,A=60113,T=60120,N=60115,M=60116,F=60121,R=60128,P=60129,B=60130,L=60131;if("function"===typeof Symbol&&Symbol.for){var I=Symbol.for;x=I("react.element"),O=I("react.portal"),E=I("react.fragment"),D=I("react.strict_mode"),S=I("react.profiler"),C=I("react.provider"),_=I("react.context"),j=I("react.forward_ref"),A=I("react.suspense"),T=I("react.suspense_list"),N=I("react.memo"),M=I("react.lazy"),F=I("react.block"),I("react.scope"),R=I("react.opaque.id"),P=I("react.debug_trace_mode"),B=I("react.offscreen"),L=I("react.legacy_hidden")}var z,U="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function $(e){if(void 0===z)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var H=!1;function q(e,t){if(!e||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{H=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$(e):""}function W(e){switch(e.tag){case 5:return $(e.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1);case 11:return e=q(e.type.render,!1);case 22:return e=q(e.type._render,!1);case 1:return e=q(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case E:return"Fragment";case O:return"Portal";case S:return"Profiler";case D:return"StrictMode";case A:return"Suspense";case T:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case _:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case j:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case N:return G(e.type);case F:return G(e._render);case M:t=e._payload,e=e._init;try{return G(e(t))}catch(n){}}return null}function Y(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function J(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Y(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&k(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=Y(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,Y(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Y(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Y(n)}}function ce(e,t){var n=Y(t.value),r=Y(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function le(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml",de="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ve,me,ye=(me=function(e,t){if(e.namespaceURI!==de||"innerHTML"in e)e.innerHTML=t;else{for((ve=ve||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ve.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ke=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(be).forEach((function(e){ke.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Oe=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ee(e,t){if(t){if(Oe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function De(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Se(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ce=null,_e=null,je=null;function Ae(e){if(e=ro(e)){if("function"!==typeof Ce)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),Ce(e.stateNode,e.type,t))}}function Te(e){_e?je?je.push(e):je=[e]:_e=e}function Ne(){if(_e){var e=_e,t=je;if(je=_e=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Me(e,t){return e(t)}function Fe(e,t,n,r,o){return e(t,n,r,o)}function Re(){}var Pe=Me,Be=!1,Le=!1;function Ie(){null===_e&&null===je||(Re(),Ne())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ue=!1;if(f)try{var Ve={};Object.defineProperty(Ve,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",Ve,Ve),window.removeEventListener("test",Ve,Ve)}catch(me){Ue=!1}function $e(e,t,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(l){this.onError(l)}}var He=!1,qe=null,We=!1,Ge=null,Ye={onError:function(e){He=!0,qe=e}};function Ke(e,t,n,r,o,i,a,s,u){He=!1,qe=null,$e.apply(Ye,arguments)}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Je(e)!==e)throw Error(a(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xe(o),e;if(i===r)return Xe(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,ut=null,ct=null,lt=new Map,ft=new Map,dt=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function vt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ft.delete(t.pointerId)}}function mt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function yt(e){var t=no(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){gt(e)&&n.delete(t)}function kt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&gt(st)&&(st=null),null!==ut&&gt(ut)&&(ut=null),null!==ct&&gt(ct)&&(ct=null),lt.forEach(bt),ft.forEach(bt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,kt)))}function xt(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==ut&&wt(ut,e),null!==ct&&wt(ct,e),lt.forEach(t),ft.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)yt(n),null===n.blockedOn&&dt.shift()}function Ot(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Et={animationend:Ot("Animation","AnimationEnd"),animationiteration:Ot("Animation","AnimationIteration"),animationstart:Ot("Animation","AnimationStart"),transitionend:Ot("Transition","TransitionEnd")},Dt={},St={};function Ct(e){if(Dt[e])return Dt[e];if(!Et[e])return e;var t,n=Et[e];for(t in n)if(n.hasOwnProperty(t)&&t in St)return Dt[e]=n[t];return e}f&&(St=document.createElement("div").style,"AnimationEvent"in window||(delete Et.animationend.animation,delete Et.animationiteration.animation,delete Et.animationstart.animation),"TransitionEvent"in window||delete Et.transitionend.transition);var _t=Ct("animationend"),jt=Ct("animationiteration"),At=Ct("animationstart"),Tt=Ct("transitionend"),Nt=new Map,Mt=new Map,Ft=["abort","abort",_t,"animationEnd",jt,"animationIteration",At,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Tt,"transitionEnd","waiting","waiting"];function Rt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Mt.set(r,t),Nt.set(r,o),c(o,[r])}}(0,i.unstable_now)();var Pt=8;function Bt(e){if(0!==(1&e))return Pt=15,1;if(0!==(2&e))return Pt=14,2;if(0!==(4&e))return Pt=13,4;var t=24&e;return 0!==t?(Pt=12,t):0!==(32&e)?(Pt=11,32):0!==(t=192&e)?(Pt=10,t):0!==(256&e)?(Pt=9,256):0!==(t=3584&e)?(Pt=8,t):0!==(4096&e)?(Pt=7,4096):0!==(t=4186112&e)?(Pt=6,t):0!==(t=62914560&e)?(Pt=5,t):67108864&e?(Pt=4,67108864):0!==(134217728&e)?(Pt=3,134217728):0!==(t=805306368&e)?(Pt=2,t):0!==(1073741824&e)?(Pt=1,1073741824):(Pt=8,e)}function Lt(e,t){var n=e.pendingLanes;if(0===n)return Pt=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Pt=15;else if(0!==(i=134217727&n)){var u=i&~a;0!==u?(r=Bt(u),o=Pt):0!==(s&=i)&&(r=Bt(s),o=Pt)}else 0!==(i=n&~a)?(r=Bt(i),o=Pt):0!==s&&(r=Bt(s),o=Pt);if(0===r)return 0;if(r=n&((0>(r=31-Ht(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Bt(t),o<=Pt)return t;Pt=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Ht(t)),r|=e[n],t&=~o;return r}function It(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?zt(10,t):e;case 10:return 0===(e=Ut(192&~t))?zt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ut(e){return e&-e}function Vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Ht(t)]=n}var Ht=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(qt(e)/Wt|0)|0},qt=Math.log,Wt=Math.LN2;var Gt=i.unstable_UserBlockingPriority,Yt=i.unstable_runWithPriority,Kt=!0;function Jt(e,t,n,r){Be||Re();var o=Xt,i=Be;Be=!0;try{Fe(o,e,t,n,r)}finally{(Be=i)||Ie()}}function Qt(e,t,n,r){Yt(Gt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var o;if(Kt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Zt(e,t,n,r);if(null===i)o&&vt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=mt(st,e,t,n,r,o),!0;case"dragenter":return ut=mt(ut,e,t,n,r,o),!0;case"mouseover":return ct=mt(ct,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return lt.set(i,mt(lt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ft.set(i,mt(ft.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;vt(e,r)}Rr(e,t,r,null,n)}}}function Zt(e,t,n,r){var o=Se(r);if(null!==(o=no(o))){var i=Je(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Qe(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Rr(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function un(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,ln,fn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=un(dn),hn=o({},dn,{view:0,detail:0}),vn=un(hn),mn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fn&&(fn&&"mousemove"===e.type?(cn=e.screenX-fn.screenX,ln=e.screenY-fn.screenY):ln=cn=0,fn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:ln}}),yn=un(mn),gn=un(o({},mn,{dataTransfer:0})),bn=un(o({},hn,{relatedTarget:0})),kn=un(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=un(wn),On=un(o({},dn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function _n(){return Cn}var jn=o({},hn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Dn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),An=un(jn),Tn=un(o({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=un(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),Mn=un(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=o({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rn=un(Fn),Pn=[9,13,27,32],Bn=f&&"CompositionEvent"in window,Ln=null;f&&"documentMode"in document&&(Ln=document.documentMode);var In=f&&"TextEvent"in window&&!Ln,zn=f&&(!Bn||Ln&&8<Ln&&11>=Ln),Un=String.fromCharCode(32),Vn=!1;function $n(e,t){switch(e){case"keyup":return-1!==Pn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Wn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wn[e.type]:"textarea"===t}function Yn(e,t,n,r){Te(r),0<(t=Br(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Jn=null;function Qn(e){jr(e,0)}function Xn(e){if(Q(oo(e)))return e}function Zn(e,t){if("change"===e)return t}var er=!1;if(f){var tr;if(f){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){Kn&&(Kn.detachEvent("onpropertychange",ir),Jn=Kn=null)}function ir(e){if("value"===e.propertyName&&Xn(Jn)){var t=[];if(Yn(t,Jn,e,Se(e)),e=Qn,Be)e(t);else{Be=!0;try{Me(e,t)}finally{Be=!1,Ie()}}}}function ar(e,t,n){"focusin"===e?(or(),Jn=n,(Kn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Jn)}function ur(e,t){if("click"===e)return Xn(t)}function cr(e,t){if("input"===e||"change"===e)return Xn(t)}var lr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},fr=Object.prototype.hasOwnProperty;function dr(e,t){if(lr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!fr.call(t,n[r])||!lr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function vr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?vr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gr=f&&"documentMode"in document&&11>=document.documentMode,br=null,kr=null,wr=null,xr=!1;function Or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==br||br!==X(r)||("selectionStart"in(r=br)&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&dr(wr,r)||(wr=r,0<(r=Br(kr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Rt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Rt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Rt(Ft,2);for(var Er="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Dr=0;Dr<Er.length;Dr++)Mt.set(Er[Dr],0);l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sr));function _r(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,u,c){if(Ke.apply(this,arguments),He){if(!He)throw Error(a(198));var l=qe;He=!1,qe=null,We||(We=!0,Ge=l)}}(r,t,void 0,e),e.currentTarget=null}function jr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==i&&o.isPropagationStopped())break e;_r(o,s,c),i=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,c=s.currentTarget,s=s.listener,u!==i&&o.isPropagationStopped())break e;_r(o,s,c),i=u}}}if(We)throw e=Ge,We=!1,Ge=null,e}function Ar(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Fr(t,e,2,!1),n.add(r))}var Tr="_reactListening"+Math.random().toString(36).slice(2);function Nr(e){e[Tr]||(e[Tr]=!0,s.forEach((function(t){Cr.has(t)||Mr(t,!1,e,null),Mr(t,!0,e,null)})))}function Mr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Cr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Fr(i,e,o,t),a.add(s))}function Fr(e,t,n,r){var o=Mt.get(t);switch(void 0===o?2:o){case 0:o=Jt;break;case 1:o=Qt;break;default:o=Xt}n=o.bind(null,t,n,e),o=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Rr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(u=a.tag)||6===u){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Le)return e(t,n);Le=!0;try{Pe(e,t,n)}finally{Le=!1,Ie()}}((function(){var r=i,o=Se(n),a=[];e:{var s=Nt.get(e);if(void 0!==s){var u=pn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":u=An;break;case"focusin":c="focus",u=bn;break;case"focusout":c="blur",u=bn;break;case"beforeblur":case"afterblur":u=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=yn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Nn;break;case _t:case jt:case At:u=kn;break;case Tt:u=Mn;break;case"scroll":u=vn;break;case"wheel":u=Rn;break;case"copy":case"cut":case"paste":u=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=Tn}var l=0!==(4&t),f=!l&&"scroll"===e,d=l?null!==s?s+"Capture":null:s;l=[];for(var p,h=r;null!==h;){var v=(p=h).stateNode;if(5===p.tag&&null!==v&&(p=v,null!==d&&(null!=(v=ze(h,d))&&l.push(Pr(h,v,p)))),f)break;h=h.return}0<l.length&&(s=new u(s,c,null,n,o),a.push({event:s,listeners:l}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!no(c)&&!c[eo])&&(u||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(c=(c=n.relatedTarget||n.toElement)?no(c):null)&&(c!==(f=Je(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(u=null,c=r),u!==c)){if(l=yn,v="onMouseLeave",d="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(l=Tn,v="onPointerLeave",d="onPointerEnter",h="pointer"),f=null==u?s:oo(u),p=null==c?s:oo(c),(s=new l(v,h+"leave",u,n,o)).target=f,s.relatedTarget=p,v=null,no(o)===r&&((l=new l(d,h+"enter",c,n,o)).target=p,l.relatedTarget=f,v=l),f=v,u&&c)e:{for(d=c,h=0,p=l=u;p;p=Lr(p))h++;for(p=0,v=d;v;v=Lr(v))p++;for(;0<h-p;)l=Lr(l),h--;for(;0<p-h;)d=Lr(d),p--;for(;h--;){if(l===d||null!==d&&l===d.alternate)break e;l=Lr(l),d=Lr(d)}l=null}else l=null;null!==u&&Ir(a,s,u,l,!1),null!==c&&null!==f&&Ir(a,f,c,l,!0)}if("select"===(u=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var m=Zn;else if(Gn(s))if(er)m=cr;else{m=sr;var y=ar}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ur);switch(m&&(m=m(e,r))?Yn(a,m,n,o):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&oe(s,"number",s.value)),y=r?oo(r):window,e){case"focusin":(Gn(y)||"true"===y.contentEditable)&&(br=y,kr=r,wr=null);break;case"focusout":wr=kr=br=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,Or(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":Or(a,n,o)}var g;if(Bn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else qn?$n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zn&&"ko"!==n.locale&&(qn||"onCompositionStart"!==b?"onCompositionEnd"===b&&qn&&(g=rn()):(tn="value"in(en=o)?en.value:en.textContent,qn=!0)),0<(y=Br(r,b)).length&&(b=new On(b,e,null,n,o),a.push({event:b,listeners:y}),g?b.data=g:null!==(g=Hn(n))&&(b.data=g))),(g=In?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Vn=!0,Un);case"textInput":return(e=t.data)===Un&&Vn?null:e;default:return null}}(e,n):function(e,t){if(qn)return"compositionend"===e||!Bn&&$n(e,t)?(e=rn(),nn=tn=en=null,qn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Br(r,"onBeforeInput")).length&&(o=new On("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=g))}jr(a,t)}))}function Pr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Br(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=ze(e,n))&&r.unshift(Pr(e,i,o)),null!=(i=ze(e,t))&&r.push(Pr(e,i,o))),e=e.return}return r}function Lr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ir(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(u=ze(n,i))&&a.unshift(Pr(n,u,s)):o||null!=(u=ze(n,i))&&a.push(Pr(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function zr(){}var Ur=null,Vr=null;function $r(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Hr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var qr="function"===typeof setTimeout?setTimeout:void 0,Wr="function"===typeof clearTimeout?clearTimeout:void 0;function Gr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Yr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Kr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Jr=0;var Qr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Qr,Zr="__reactProps$"+Qr,eo="__reactContainer$"+Qr,to="__reactEvents$"+Qr;function no(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Kr(e);null!==e;){if(n=e[Xr])return n;e=Kr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Xr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Zr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],uo=-1;function co(e){return{current:e}}function lo(e){0>uo||(e.current=so[uo],so[uo]=null,uo--)}function fo(e,t){uo++,so[uo]=e.current,e.current=t}var po={},ho=co(po),vo=co(!1),mo=po;function yo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function go(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bo(){lo(vo),lo(ho)}function ko(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(vo,n)}function wo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,G(t)||"Unknown",i));return o({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,mo=ho.current,fo(ho,e),fo(vo,vo.current),!0}function Oo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=wo(e,t,mo),r.__reactInternalMemoizedMergedChildContext=e,lo(vo),lo(ho),fo(ho,e)):lo(vo),fo(vo,n)}var Eo=null,Do=null,So=i.unstable_runWithPriority,Co=i.unstable_scheduleCallback,_o=i.unstable_cancelCallback,jo=i.unstable_shouldYield,Ao=i.unstable_requestPaint,To=i.unstable_now,No=i.unstable_getCurrentPriorityLevel,Mo=i.unstable_ImmediatePriority,Fo=i.unstable_UserBlockingPriority,Ro=i.unstable_NormalPriority,Po=i.unstable_LowPriority,Bo=i.unstable_IdlePriority,Lo={},Io=void 0!==Ao?Ao:function(){},zo=null,Uo=null,Vo=!1,$o=To(),Ho=1e4>$o?To:function(){return To()-$o};function qo(){switch(No()){case Mo:return 99;case Fo:return 98;case Ro:return 97;case Po:return 96;case Bo:return 95;default:throw Error(a(332))}}function Wo(e){switch(e){case 99:return Mo;case 98:return Fo;case 97:return Ro;case 96:return Po;case 95:return Bo;default:throw Error(a(332))}}function Go(e,t){return e=Wo(e),So(e,t)}function Yo(e,t,n){return e=Wo(e),Co(e,t,n)}function Ko(){if(null!==Uo){var e=Uo;Uo=null,_o(e)}Jo()}function Jo(){if(!Vo&&null!==zo){Vo=!0;var e=0;try{var t=zo;Go(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zo=null}catch(n){throw null!==zo&&(zo=zo.slice(e+1)),Co(Mo,Ko),n}finally{Vo=!1}}}var Qo=w.ReactCurrentBatchConfig;function Xo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Zo=co(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Zo.current;lo(Zo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Ba=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var ui=!1;function ci(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function li(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function di(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;ui=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,u=i.shared.pending;if(null!==u){i.shared.pending=null;var c=u,l=c.next;c.next=null,null===s?a=l:s.next=l,s=c;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==s&&(null===d?f.firstBaseUpdate=l:d.next=l,f.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,s=0,f=l=c=null;;){u=a.lane;var p=a.eventTime;if((r&u)===u){null!==f&&(f=f.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,v=a;switch(u=t,p=n,v.tag){case 1:if("function"===typeof(h=v.payload)){d=h.call(p,d,u);break e}d=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(u="function"===typeof(h=v.payload)?h.call(p,d,u):h)||void 0===u)break e;d=o({},d,u);break e;case 2:ui=!0}}null!==a.callback&&(e.flags|=32,null===(u=i.effects)?i.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(l=f=p,c=d):f=f.next=p,s|=u;if(null===(a=a.next)){if(null===(u=i.shared.pending))break;a=u.next,u.next=null,i.lastBaseUpdate=u,i.shared.pending=null}}null===f&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=f,Us|=s,e.lanes=s,e.memoizedState=d}}function vi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var mi=(new r.Component).refs;function yi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var gi={isMounted:function(e){return!!(e=e._reactInternals)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),o=pu(e),i=fi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hu(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),o=pu(e),i=fi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),di(e,i),hu(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=pu(e),o=fi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),di(e,o),hu(e,r,n)}};function bi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!dr(n,r)||!dr(o,i))}function ki(e,t,n){var r=!1,o=po,i=t.contextType;return"object"===typeof i&&null!==i?i=si(i):(o=go(t)?mo:ho.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?yo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=gi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function wi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=mi,ci(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=si(i):(i=go(t)?mo:ho.current,o.context=yo(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(yi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&gi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var Oi=Array.isArray;function Ei(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===mi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Di(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Si(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Wu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Ju(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Ei(e,t,n),r.return=e,r):((r=Gu(n.type,n.key,n.props,null,e.mode,r)).ref=Ei(e,t,n),r.return=e,r)}function l(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Yu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Ju(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Gu(t.type,t.key,t.props,null,e.mode,n)).ref=Ei(e,null,t),n.return=e,n;case O:return(t=Qu(t,e.mode,n)).return=e,t}if(Oi(t)||V(t))return(t=Yu(t,e.mode,n,null)).return=e,t;Di(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===E?f(e,t,n.props.children,r,o):c(e,t,n,r):null;case O:return n.key===o?l(e,t,n,r):null}if(Oi(n)||V(n))return null!==o?null:f(e,t,n,r,null);Di(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===E?f(t,e,r.props.children,o,r.key):c(t,e,r,o);case O:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Oi(r)||V(r))return f(t,e=e.get(n)||null,r,o,null);Di(t,r)}return null}function v(o,a,s,u){for(var c=null,l=null,f=a,v=a=0,m=null;null!==f&&v<s.length;v++){f.index>v?(m=f,f=null):m=f.sibling;var y=p(o,f,s[v],u);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(o,f),a=i(y,a,v),null===l?c=y:l.sibling=y,l=y,f=m}if(v===s.length)return n(o,f),c;if(null===f){for(;v<s.length;v++)null!==(f=d(o,s[v],u))&&(a=i(f,a,v),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);v<s.length;v++)null!==(m=h(f,o,v,s[v],u))&&(e&&null!==m.alternate&&f.delete(null===m.key?v:m.key),a=i(m,a,v),null===l?c=m:l.sibling=m,l=m);return e&&f.forEach((function(e){return t(o,e)})),c}function m(o,s,u,c){var l=V(u);if("function"!==typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,v=s,m=s=0,y=null,g=u.next();null!==v&&!g.done;m++,g=u.next()){v.index>m?(y=v,v=null):y=v.sibling;var b=p(o,v,g.value,c);if(null===b){null===v&&(v=y);break}e&&v&&null===b.alternate&&t(o,v),s=i(b,s,m),null===f?l=b:f.sibling=b,f=b,v=y}if(g.done)return n(o,v),l;if(null===v){for(;!g.done;m++,g=u.next())null!==(g=d(o,g.value,c))&&(s=i(g,s,m),null===f?l=g:f.sibling=g,f=g);return l}for(v=r(o,v);!g.done;m++,g=u.next())null!==(g=h(v,o,m,g.value,c))&&(e&&null!==g.alternate&&v.delete(null===g.key?m:g.key),s=i(g,s,m),null===f?l=g:f.sibling=g,f=g);return e&&v.forEach((function(e){return t(o,e)})),l}return function(e,r,i,u){var c="object"===typeof i&&null!==i&&i.type===E&&null===i.key;c&&(i=i.props.children);var l="object"===typeof i&&null!==i;if(l)switch(i.$$typeof){case x:e:{for(l=i.key,c=r;null!==c;){if(c.key===l){if(7===c.tag){if(i.type===E){n(e,c.sibling),(r=o(c,i.props.children)).return=e,e=r;break e}}else if(c.elementType===i.type){n(e,c.sibling),(r=o(c,i.props)).ref=Ei(e,c,i),r.return=e,e=r;break e}n(e,c);break}t(e,c),c=c.sibling}i.type===E?((r=Yu(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Gu(i.type,i.key,i.props,null,e.mode,u)).ref=Ei(e,r,i),u.return=e,e=u)}return s(e);case O:e:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qu(i,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Ju(i,e.mode,u)).return=e,e=r),s(e);if(Oi(i))return v(e,r,i,u);if(V(i))return m(e,r,i,u);if(l&&Di(e,i),"undefined"===typeof i&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,G(e.type)||"Component"))}return n(e,r)}}var Ci=Si(!0),_i=Si(!1),ji={},Ai=co(ji),Ti=co(ji),Ni=co(ji);function Mi(e){if(e===ji)throw Error(a(174));return e}function Fi(e,t){switch(fo(Ni,t),fo(Ti,e),fo(Ai,ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}lo(Ai),fo(Ai,t)}function Ri(){lo(Ai),lo(Ti),lo(Ni)}function Pi(e){Mi(Ni.current);var t=Mi(Ai.current),n=he(t,e.type);t!==n&&(fo(Ti,e),fo(Ai,n))}function Bi(e){Ti.current===e&&(lo(Ai),lo(Ti))}var Li=co(0);function Ii(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zi=null,Ui=null,Vi=!1;function $i(e,t){var n=Hu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Hi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function qi(e){if(Vi){var t=Ui;if(t){var n=t;if(!Hi(e,t)){if(!(t=Yr(n.nextSibling))||!Hi(e,t))return e.flags=-1025&e.flags|2,Vi=!1,void(zi=e);$i(zi,n)}zi=e,Ui=Yr(t.firstChild)}else e.flags=-1025&e.flags|2,Vi=!1,zi=e}}function Wi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zi=e}function Gi(e){if(e!==zi)return!1;if(!Vi)return Wi(e),Vi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Hr(t,e.memoizedProps))for(t=Ui;t;)$i(e,t),t=Yr(t.nextSibling);if(Wi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ui=Yr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ui=null}}else Ui=zi?Yr(e.stateNode.nextSibling):null;return!0}function Yi(){Ui=zi=null,Vi=!1}var Ki=[];function Ji(){for(var e=0;e<Ki.length;e++)Ki[e]._workInProgressVersionPrimary=null;Ki.length=0}var Qi=w.ReactCurrentDispatcher,Xi=w.ReactCurrentBatchConfig,Zi=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Zi=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qi.current=null===e||null===e.memoizedState?Ma:Fa,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Qi.current=Ra,e=n(r,o)}while(oa)}if(Qi.current=Na,t=null!==ta&&null!==ta.next,Zi=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ca(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function la(e,t){return"function"===typeof t?t(e):t}function fa(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.lane;if((Zi&l)===l)null!==u&&(u=u.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var f={lane:l,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,ea.lanes|=l,Us|=l}c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,lr(r,t.memoizedState)||(Ba=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function da(e){var t=ca(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);lr(i,t.memoizedState)||(Ba=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Zi&e)===e)&&(t._workInProgressVersionPrimary=r,Ki.push(t))),e)return n(t._source);throw Ki.push(t),Error(a(350))}function ha(e,t,n,r){var o=Ms;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),u=Qi.current,c=u.useState((function(){return pa(o,t,n)})),l=c[1],f=c[0];c=na;var d=e.memoizedState,p=d.refs,h=p.getSnapshot,v=d.source;d=d.subscribe;var m=ea;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=l;var e=i(t._source);if(!lr(s,e)){e=n(t._source),lr(f,e)||(l(e),e=pu(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var u=31-Ht(a),c=1<<u;r[u]|=e,a&=~c}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pu(m);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),lr(h,n)&&lr(v,t)&&lr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:f}).dispatch=l=Ta.bind(null,ea,e),c.queue=e,c.baseQueue=null,f=pa(o,t,n),c.memoizedState=c.baseState=f),f}function va(e,t,n){return ha(ca(),e,t,n)}function ma(e){var t=ua();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:la,lastRenderedState:e}).dispatch=Ta.bind(null,ea,e),[t.memoizedState,e]}function ya(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ga(e){return e={current:e},ua().memoizedState=e}function ba(){return ca().memoizedState}function ka(e,t,n,r){var o=ua();ea.flags|=e,o.memoizedState=ya(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var o=ca();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ya(t,n,i,r)}ea.flags|=e,o.memoizedState=ya(1|t,n,i,r)}function xa(e,t){return ka(516,4,e,t)}function Oa(e,t){return wa(516,4,e,t)}function Ea(e,t){return wa(4,2,e,t)}function Da(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Sa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,Da.bind(null,t,e),n)}function Ca(){}function _a(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ja(e,t){var n=ca();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Aa(e,t){var n=qo();Go(98>n?98:n,(function(){e(!0)})),Go(97<n?97:n,(function(){var n=Xi.transition;Xi.transition=1;try{e(!1),t()}finally{Xi.transition=n}}))}function Ta(e,t,n){var r=du(),o=pu(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=a(s,n);if(i.eagerReducer=a,i.eagerState=u,lr(u,s))return}catch(c){}hu(e,o,r)}}var Na={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Ma={readContext:si,useCallback:function(e,t){return ua().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ka(4,2,Da.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ka(4,2,e,t)},useMemo:function(e,t){var n=ua();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ua();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ta.bind(null,ea,e),[r.memoizedState,e]},useRef:ga,useState:ma,useDebugValue:Ca,useDeferredValue:function(e){var t=ma(e),n=t[0],r=t[1];return xa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=ma(!1),t=e[0];return ga(e=Aa.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ua();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Vi){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Jr++).toString(36))),Error(a(355))})),n=ma(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ya(5,(function(){n("r:"+(Jr++).toString(36))}),void 0,null)),t}return ma(t="r:"+(Jr++).toString(36)),t},unstable_isNewReconciler:!1},Fa={readContext:si,useCallback:_a,useContext:si,useEffect:Oa,useImperativeHandle:Sa,useLayoutEffect:Ea,useMemo:ja,useReducer:fa,useRef:ba,useState:function(){return fa(la)},useDebugValue:Ca,useDeferredValue:function(e){var t=fa(la),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=fa(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return fa(la)[0]},unstable_isNewReconciler:!1},Ra={readContext:si,useCallback:_a,useContext:si,useEffect:Oa,useImperativeHandle:Sa,useLayoutEffect:Ea,useMemo:ja,useReducer:da,useRef:ba,useState:function(){return da(la)},useDebugValue:Ca,useDeferredValue:function(e){var t=da(la),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=da(la)[0];return[ba().current,e]},useMutableSource:va,useOpaqueIdentifier:function(){return da(la)[0]},unstable_isNewReconciler:!1},Pa=w.ReactCurrentOwner,Ba=!1;function La(e,t,n,r){t.child=null===e?_i(t,null,n,r):Ci(t,e.child,n,r)}function Ia(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||Ba?(t.flags|=1,La(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function za(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||qu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Gu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:dr)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Wu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,o,i){if(null!==e&&dr(e.memoizedProps,r)&&e.ref===t.ref){if(Ba=!1,0===(i&o))return t.lanes=e.lanes,is(e,t,i);0!==(16384&e.flags)&&(Ba=!0)}return Ha(e,t,n,r,i)}function Va(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},xu(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},xu(t,e),null;t.memoizedState={baseLanes:0},xu(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,xu(t,r);return La(e,t,o,n),t.child}function $a(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ha(e,t,n,r,o){var i=go(n)?mo:ho.current;return i=yo(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||Ba?(t.flags|=1,La(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function qa(e,t,n,r,o){if(go(n)){var i=!0;xo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),ki(t,n,r),xi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=si(c):c=yo(t,c=go(n)?mo:ho.current);var l=n.getDerivedStateFromProps,f="function"===typeof l||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==c)&&wi(t,a,r,c),ui=!1;var d=t.memoizedState;a.state=d,hi(t,r,a,o),u=t.memoizedState,s!==r||d!==u||vo.current||ui?("function"===typeof l&&(yi(t,n,l,r),u=t.memoizedState),(s=ui||bi(t,n,s,r,d,u,c))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,li(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xo(t.type,s),a.props=c,f=t.pendingProps,d=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=si(u):u=yo(t,u=go(n)?mo:ho.current);var p=n.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==f||d!==u)&&wi(t,a,r,u),ui=!1,d=t.memoizedState,a.state=d,hi(t,r,a,o);var h=t.memoizedState;s!==f||d!==h||vo.current||ui?("function"===typeof p&&(yi(t,n,p,r),h=t.memoizedState),(c=ui||bi(t,n,c,r,d,h,u))?(l||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Wa(e,t,n,r,i,o)}function Wa(e,t,n,r,o,i){$a(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&Oo(t,n,!1),is(e,t,i);r=t.stateNode,Pa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ci(t,e.child,null,i),t.child=Ci(t,null,s,i)):La(e,t,s,i),t.memoizedState=r.state,o&&Oo(t,n,!0),t.child}function Ga(e){var t=e.stateNode;t.pendingContext?ko(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ko(0,t.context,!1),Fi(e,t.containerInfo)}var Ya,Ka,Ja,Qa={dehydrated:null,retryLane:0};function Xa(e,t,n){var r,o=t.pendingProps,i=Li.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),fo(Li,1&i),null===e?(void 0!==o.fallback&&qi(t),e=o.children,i=o.fallback,a?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,e):"number"===typeof o.unstable_expectedLoadTime?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,t.lanes=33554432,e):((n=Ku({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Qa,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Za(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=Ku(t,o,0,null),n=Yu(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Wu(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Wu(a,s),null!==e?r=Wu(e,r):(r=Yu(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(La(e,t,r.children,n),0!==(2&(r=Li.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Li,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ii(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ii(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Us|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Wu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Wu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Vi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return go(t.type)&&bo(),null;case 3:return Ri(),lo(vo),lo(ho),Ji(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Gi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Bi(t);var i=Mi(Ni.current);if(n=t.type,null!==e&&null!=t.stateNode)Ka(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Mi(Ai.current),Gi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xr]=t,r[Zr]=s,n){case"dialog":Ar("cancel",r),Ar("close",r);break;case"iframe":case"object":case"embed":Ar("load",r);break;case"video":case"audio":for(e=0;e<Sr.length;e++)Ar(Sr[e],r);break;case"source":Ar("error",r);break;case"img":case"image":case"link":Ar("error",r),Ar("load",r);break;case"details":Ar("toggle",r);break;case"input":ee(r,s),Ar("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ar("invalid",r);break;case"textarea":ue(r,s),Ar("invalid",r)}for(var c in Ee(n,s),e=null,s)s.hasOwnProperty(c)&&(i=s[c],"children"===c?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):u.hasOwnProperty(c)&&null!=i&&"onScroll"===c&&Ar("scroll",r));switch(n){case"input":J(r),re(r,s,!0);break;case"textarea":J(r),le(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=zr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(c=9===i.nodeType?i:i.ownerDocument,e===fe&&(e=pe(n)),e===fe?"script"===n?((e=c.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),"select"===n&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Xr]=t,e[Zr]=r,Ya(e,t),t.stateNode=e,c=De(n,r),n){case"dialog":Ar("cancel",e),Ar("close",e),i=r;break;case"iframe":case"object":case"embed":Ar("load",e),i=r;break;case"video":case"audio":for(i=0;i<Sr.length;i++)Ar(Sr[i],e);i=r;break;case"source":Ar("error",e),i=r;break;case"img":case"image":case"link":Ar("error",e),Ar("load",e),i=r;break;case"details":Ar("toggle",e),i=r;break;case"input":ee(e,r),i=Z(e,r),Ar("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Ar("invalid",e);break;case"textarea":ue(e,r),i=se(e,r),Ar("invalid",e);break;default:i=r}Ee(n,i);var l=i;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?xe(e,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&ye(e,f):"children"===s?"string"===typeof f?("textarea"!==n||""!==f)&&ge(e,f):"number"===typeof f&&ge(e,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=f&&"onScroll"===s&&Ar("scroll",e):null!=f&&k(e,s,f,c))}switch(n){case"input":J(e),re(e,r,!1);break;case"textarea":J(e),le(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Y(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=zr)}$r(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ja(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Mi(Ni.current),Mi(Ai.current),Gi(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return lo(Li),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Gi(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Li.current)?0===Ls&&(Ls=3):(0!==Ls&&3!==Ls||(Ls=4),null===Ms||0===(134217727&Us)&&0===(134217727&Vs)||gu(Ms,Rs))),(r||n)&&(t.flags|=4),null);case 4:return Ri(),null===e&&Nr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(lo(Li),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(c=r.rendering))if(s)as(r,!1);else{if(0!==Ls||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(c=Ii(e))){for(t.flags|=64,as(r,!1),null!==(s=c.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(c=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fo(Li,1&Li.current|2),t.child}e=e.sibling}null!==r.tail&&Ho()>Ws&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Ii(c))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!c.alternate&&!Vi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ho()-r.renderingStartTime>Ws&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(c.sibling=t.child,t.child=c):(null!==(n=r.last)?n.sibling=c:t.child=c,r.last=c)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ho(),n.sibling=null,t=Li.current,fo(Li,s?1&t|2:1&t),n):null;case 23:case 24:return Ou(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function us(e){switch(e.tag){case 1:go(e.type)&&bo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ri(),lo(vo),lo(ho),Ji(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Bi(e),null;case 13:return lo(Li),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return lo(Li),null;case 4:return Ri(),null;case 10:return oi(e),null;case 23:case 24:return Ou(),null;default:return null}}function cs(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function ls(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ya=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ka=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Mi(Ai.current);var a,s=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=zr)}for(f in Ee(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var c=i[f];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(u.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in r){var l=r[f];if(c=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&l!==c&&(null!=l||null!=c))if("style"===f)if(c){for(a in c)!c.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&c[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(f,n)),n=l;else"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(s=s||[]).push(f,l)):"children"===f?"string"!==typeof l&&"number"!==typeof l||(s=s||[]).push(f,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(u.hasOwnProperty(f)?(null!=l&&"onScroll"===f&&Ar("scroll",e),s||c===l||(s=[])):"object"===typeof l&&null!==l&&l.$$typeof===R?l.toString():(s=s||[]).push(f,l))}n&&(s=s||[]).push("style",n);var f=s;(t.updateQueue=f)&&(t.flags|=4)}},Ja=function(e,t,n,r){n!==r&&(t.flags|=4)};var fs="function"===typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=fi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Js||(Js=!0,Qs=r),ls(0,t)},n}function ps(e,t,n){(n=fi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return ls(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Xs?Xs=new Set([this]):Xs.add(this),ls(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"===typeof WeakSet?WeakSet:Set;function vs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){zu(e,n)}else t.current=null}function ms(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Gr(t.stateNode.containerInfo))}throw Error(a(163))}function ys(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Bu(n,e),Pu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&vi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}vi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&$r(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function gs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Do&&"function"===typeof Do.onCommitFiberUnmount)try{Do.onCommitFiberUnmount(Eo,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Bu(t,n);else{r=t;try{o()}catch(i){zu(r,i)}}n=n.next}while(n!==e)}break;case 1:if(vs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){zu(t,i)}break;case 5:vs(t);break;case 4:Ds(e,t)}}function ks(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ws(e){return 5===e.tag||3===e.tag||4===e.tag}function xs(e){e:{for(var t=e.return;null!==t;){if(ws(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ws(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Os(e,n,t):Es(e,n,t)}function Os(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=zr));else if(4!==r&&null!==(e=e.child))for(Os(e,t,n),e=e.sibling;null!==e;)Os(e,t,n),e=e.sibling}function Es(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Es(e,t,n),e=e.sibling;null!==e;)Es(e,t,n),e=e.sibling}function Ds(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,u=o,c=u;;)if(bs(s,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===u)break e;for(;null===c.sibling;){if(null===c.return||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(s=n,u=o.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bs(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Ss(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),De(e,o),t=De(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?xe(n,u):"dangerouslySetInnerHTML"===s?ye(n,u):"children"===s?ge(n,u):k(n,s,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":ce(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(qs=Ho(),gs(t.child,!0)),void Cs(t);case 19:return void Cs(t);case 23:case 24:return void gs(t,null!==t.memoizedState)}throw Error(a(163))}function Cs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Vu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _s(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var js=Math.ceil,As=w.ReactCurrentDispatcher,Ts=w.ReactCurrentOwner,Ns=0,Ms=null,Fs=null,Rs=0,Ps=0,Bs=co(0),Ls=0,Is=null,zs=0,Us=0,Vs=0,$s=0,Hs=null,qs=0,Ws=1/0;function Gs(){Ws=Ho()+500}var Ys,Ks=null,Js=!1,Qs=null,Xs=null,Zs=!1,eu=null,tu=90,nu=[],ru=[],ou=null,iu=0,au=null,su=-1,uu=0,cu=0,lu=null,fu=!1;function du(){return 0!==(48&Ns)?Ho():-1!==su?su:su=Ho()}function pu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===qo()?1:2;if(0===uu&&(uu=zs),0!==Qo.transition){0!==cu&&(cu=null!==Hs?Hs.pendingLanes:0),e=uu;var t=4186112&~cu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=qo(),0!==(4&Ns)&&98===e?e=zt(12,uu):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),uu),e}function hu(e,t,n){if(50<iu)throw iu=0,au=null,Error(a(185));if(null===(e=vu(e,t)))return null;$t(e,t,n),e===Ms&&(Vs|=t,4===Ls&&gu(e,Rs));var r=qo();1===t?0!==(8&Ns)&&0===(48&Ns)?bu(e):(mu(e,n),0===Ns&&(Gs(),Ko())):(0===(4&Ns)||98!==r&&99!==r||(null===ou?ou=new Set([e]):ou.add(e)),mu(e,n)),Hs=e}function vu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function mu(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-Ht(s),c=1<<u,l=i[u];if(-1===l){if(0===(c&r)||0!==(c&o)){l=t,Bt(c);var f=Pt;i[u]=10<=f?l+250:6<=f?l+5e3:-1}}else l<=t&&(e.expiredLanes|=c);s&=~c}if(r=Lt(e,e===Ms?Rs:0),t=Pt,0===r)null!==n&&(n!==Lo&&_o(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Lo&&_o(n)}15===t?(n=bu.bind(null,e),null===zo?(zo=[n],Uo=Co(Mo,Jo)):zo.push(n),n=Lo):14===t?n=Yo(99,bu.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Yo(n,yu.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function yu(e){if(su=-1,cu=uu=0,0!==(48&Ns))throw Error(a(327));var t=e.callbackNode;if(Ru()&&e.callbackNode!==t)return null;var n=Lt(e,e===Ms?Rs:0);if(0===n)return null;var r=n,o=Ns;Ns|=16;var i=Su();for(Ms===e&&Rs===r||(Gs(),Eu(e,r));;)try{ju();break}catch(u){Du(e,u)}if(ri(),As.current=i,Ns=o,null!==Fs?r=0:(Ms=null,Rs=0,r=Ls),0!==(zs&Vs))Eu(e,0);else if(0!==r){if(2===r&&(Ns|=64,e.hydrate&&(e.hydrate=!1,Gr(e.containerInfo)),0!==(n=It(e))&&(r=Cu(e,n))),1===r)throw t=Is,Eu(e,0),gu(e,n),mu(e,Ho()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Nu(e);break;case 3:if(gu(e,n),(62914560&n)===n&&10<(r=qs+500-Ho())){if(0!==Lt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){du(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=qr(Nu.bind(null,e),r);break}Nu(e);break;case 4:if(gu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Ht(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=Ho()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*js(n/1960))-n)){e.timeoutHandle=qr(Nu.bind(null,e),n);break}Nu(e);break;default:throw Error(a(329))}}return mu(e,Ho()),e.callbackNode===t?yu.bind(null,e):null}function gu(e,t){for(t&=~$s,t&=~Vs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ht(t),r=1<<n;e[n]=-1,t&=~r}}function bu(e){if(0!==(48&Ns))throw Error(a(327));if(Ru(),e===Ms&&0!==(e.expiredLanes&Rs)){var t=Rs,n=Cu(e,t);0!==(zs&Vs)&&(n=Cu(e,t=Lt(e,t)))}else n=Cu(e,t=Lt(e,0));if(0!==e.tag&&2===n&&(Ns|=64,e.hydrate&&(e.hydrate=!1,Gr(e.containerInfo)),0!==(t=It(e))&&(n=Cu(e,t))),1===n)throw n=Is,Eu(e,0),gu(e,t),mu(e,Ho()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nu(e),mu(e,Ho()),null}function ku(e,t){var n=Ns;Ns|=1;try{return e(t)}finally{0===(Ns=n)&&(Gs(),Ko())}}function wu(e,t){var n=Ns;Ns&=-2,Ns|=8;try{return e(t)}finally{0===(Ns=n)&&(Gs(),Ko())}}function xu(e,t){fo(Bs,Ps),Ps|=t,zs|=t}function Ou(){Ps=Bs.current,lo(Bs)}function Eu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Wr(n)),null!==Fs)for(n=Fs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bo();break;case 3:Ri(),lo(vo),lo(ho),Ji();break;case 5:Bi(r);break;case 4:Ri();break;case 13:case 19:lo(Li);break;case 10:oi(r);break;case 23:case 24:Ou()}n=n.return}Ms=e,Fs=Wu(e.current,null),Rs=Ps=zs=t,Ls=0,Is=null,$s=Vs=Us=0}function Du(e,t){for(;;){var n=Fs;try{if(ri(),Qi.current=Na,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Zi=0,na=ta=ea=null,oa=!1,Ts.current=null,null===n||null===n.return){Ls=1,Is=t,Fs=null;break}e:{var i=e,a=n.return,s=n,u=t;if(t=Rs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u;if(0===(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.lanes=l.lanes):(s.updateQueue=null,s.memoizedState=null)}var f=0!==(1&Li.current),d=a;do{var p;if(p=13===d.tag){var h=d.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var v=d.memoizedProps;p=void 0!==v.fallback&&(!0!==v.unstable_avoidThisFallback||!f)}}if(p){var m=d.updateQueue;if(null===m){var y=new Set;y.add(c),d.updateQueue=y}else m.add(c);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var g=fi(-1,1);g.tag=2,di(s,g)}s.lanes|=1;break e}u=void 0,s=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new fs,u=new Set,b.set(c,u)):void 0===(u=b.get(c))&&(u=new Set,b.set(c,u)),!u.has(s)){u.add(s);var k=Uu.bind(null,i,c,s);c.then(k,k)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);u=Error((G(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ls&&(Ls=2),u=cs(u,s),d=a;do{switch(d.tag){case 3:i=u,d.flags|=4096,t&=-t,d.lanes|=t,pi(d,ds(0,i,t));break e;case 1:i=u;var w=d.type,x=d.stateNode;if(0===(64&d.flags)&&("function"===typeof w.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Xs||!Xs.has(x)))){d.flags|=4096,t&=-t,d.lanes|=t,pi(d,ps(d,i,t));break e}}d=d.return}while(null!==d)}Tu(n)}catch(O){t=O,Fs===n&&null!==n&&(Fs=n=n.return);continue}break}}function Su(){var e=As.current;return As.current=Na,null===e?Na:e}function Cu(e,t){var n=Ns;Ns|=16;var r=Su();for(Ms===e&&Rs===t||Eu(e,t);;)try{_u();break}catch(o){Du(e,o)}if(ri(),Ns=n,As.current=r,null!==Fs)throw Error(a(261));return Ms=null,Rs=0,Ls}function _u(){for(;null!==Fs;)Au(Fs)}function ju(){for(;null!==Fs&&!jo();)Au(Fs)}function Au(e){var t=Ys(e.alternate,e,Ps);e.memoizedProps=e.pendingProps,null===t?Tu(e):Fs=t,Ts.current=null}function Tu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Ps)))return void(Fs=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ps)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=us(t)))return n.flags&=2047,void(Fs=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Fs=t);Fs=t=e}while(null!==t);0===Ls&&(Ls=5)}function Nu(e){var t=qo();return Go(99,Mu.bind(null,e,t)),null}function Mu(e,t){do{Ru()}while(null!==eu);if(0!==(48&Ns))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<i;){var c=31-Ht(i),l=1<<c;o[c]=0,s[c]=-1,u[c]=-1,i&=~l}if(null!==ou&&0===(24&r)&&ou.has(e)&&ou.delete(e),e===Ms&&(Fs=Ms=null,Rs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Ns,Ns|=32,Ts.current=null,Ur=Kt,yr(s=mr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(l=u.getSelection&&u.getSelection())&&0!==l.rangeCount){u=l.anchorNode,i=l.anchorOffset,c=l.focusNode,l=l.focusOffset;try{u.nodeType,c.nodeType}catch(S){u=null;break e}var f=0,d=-1,p=-1,h=0,v=0,m=s,y=null;t:for(;;){for(var g;m!==u||0!==i&&3!==m.nodeType||(d=f+i),m!==c||0!==l&&3!==m.nodeType||(p=f+l),3===m.nodeType&&(f+=m.nodeValue.length),null!==(g=m.firstChild);)y=m,m=g;for(;;){if(m===s)break t;if(y===u&&++h===i&&(d=f),y===c&&++v===l&&(p=f),null!==(g=m.nextSibling))break;y=(m=y).parentNode}m=g}u=-1===d||-1===p?null:{start:d,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Vr={focusedElem:s,selectionRange:u},Kt=!1,lu=null,fu=!1,Ks=r;do{try{Fu()}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);lu=null,Ks=r;do{try{for(s=e;null!==Ks;){var b=Ks.flags;if(16&b&&ge(Ks.stateNode,""),128&b){var k=Ks.alternate;if(null!==k){var w=k.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(1038&b){case 2:xs(Ks),Ks.flags&=-3;break;case 6:xs(Ks),Ks.flags&=-3,Ss(Ks.alternate,Ks);break;case 1024:Ks.flags&=-1025;break;case 1028:Ks.flags&=-1025,Ss(Ks.alternate,Ks);break;case 4:Ss(Ks.alternate,Ks);break;case 8:Ds(s,u=Ks);var x=u.alternate;ks(u),null!==x&&ks(x)}Ks=Ks.nextEffect}}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);if(w=Vr,k=mr(),b=w.focusedElem,s=w.selectionRange,k!==b&&b&&b.ownerDocument&&vr(b.ownerDocument.documentElement,b)){null!==s&&yr(b)&&(k=s.start,void 0===(w=s.end)&&(w=k),"selectionStart"in b?(b.selectionStart=k,b.selectionEnd=Math.min(w,b.value.length)):(w=(k=b.ownerDocument||document)&&k.defaultView||window).getSelection&&(w=w.getSelection(),u=b.textContent.length,x=Math.min(s.start,u),s=void 0===s.end?x:Math.min(s.end,u),!w.extend&&x>s&&(u=s,s=x,x=u),u=hr(b,x),i=hr(b,s),u&&i&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&((k=k.createRange()).setStart(u.node,u.offset),w.removeAllRanges(),x>s?(w.addRange(k),w.extend(i.node,i.offset)):(k.setEnd(i.node,i.offset),w.addRange(k))))),k=[];for(w=b;w=w.parentNode;)1===w.nodeType&&k.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<k.length;b++)(w=k[b]).element.scrollLeft=w.left,w.element.scrollTop=w.top}Kt=!!Ur,Vr=Ur=null,e.current=n,Ks=r;do{try{for(b=e;null!==Ks;){var O=Ks.flags;if(36&O&&ys(b,Ks.alternate,Ks),128&O){k=void 0;var E=Ks.ref;if(null!==E){var D=Ks.stateNode;Ks.tag,k=D,"function"===typeof E?E(k):E.current=k}}Ks=Ks.nextEffect}}catch(S){if(null===Ks)throw Error(a(330));zu(Ks,S),Ks=Ks.nextEffect}}while(null!==Ks);Ks=null,Io(),Ns=o}else e.current=n;if(Zs)Zs=!1,eu=e,tu=t;else for(Ks=r;null!==Ks;)t=Ks.nextEffect,Ks.nextEffect=null,8&Ks.flags&&((O=Ks).sibling=null,O.stateNode=null),Ks=t;if(0===(r=e.pendingLanes)&&(Xs=null),1===r?e===au?iu++:(iu=0,au=e):iu=0,n=n.stateNode,Do&&"function"===typeof Do.onCommitFiberRoot)try{Do.onCommitFiberRoot(Eo,n,void 0,64===(64&n.current.flags))}catch(S){}if(mu(e,Ho()),Js)throw Js=!1,e=Qs,Qs=null,e;return 0!==(8&Ns)||Ko(),null}function Fu(){for(;null!==Ks;){var e=Ks.alternate;fu||null===lu||(0!==(8&Ks.flags)?et(Ks,lu)&&(fu=!0):13===Ks.tag&&_s(e,Ks)&&et(Ks,lu)&&(fu=!0));var t=Ks.flags;0!==(256&t)&&ms(e,Ks),0===(512&t)||Zs||(Zs=!0,Yo(97,(function(){return Ru(),null}))),Ks=Ks.nextEffect}}function Ru(){if(90!==tu){var e=97<tu?97:tu;return tu=90,Go(e,Lu)}return!1}function Pu(e,t){nu.push(t,e),Zs||(Zs=!0,Yo(97,(function(){return Ru(),null})))}function Bu(e,t){ru.push(t,e),Zs||(Zs=!0,Yo(97,(function(){return Ru(),null})))}function Lu(){if(null===eu)return!1;var e=eu;if(eu=null,0!==(48&Ns))throw Error(a(331));var t=Ns;Ns|=32;var n=ru;ru=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"===typeof s)try{s()}catch(c){if(null===i)throw Error(a(330));zu(i,c)}}for(n=nu,nu=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var u=o.create;o.destroy=u()}catch(c){if(null===i)throw Error(a(330));zu(i,c)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return Ns=t,Ko(),!0}function Iu(e,t,n){di(e,t=ds(0,t=cs(n,t),1)),t=du(),null!==(e=vu(e,1))&&($t(e,1,t),mu(e,t))}function zu(e,t){if(3===e.tag)Iu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Iu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r))){var o=ps(n,e=cs(t,e),1);if(di(n,o),o=du(),null!==(n=vu(n,1)))$t(n,1,o),mu(n,o);else if("function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function Uu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=du(),e.pingedLanes|=e.suspendedLanes&n,Ms===e&&(Rs&n)===n&&(4===Ls||3===Ls&&(62914560&Rs)===Rs&&500>Ho()-qs?Eu(e,0):$s|=n),mu(e,t)}function Vu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===qo()?1:2:(0===uu&&(uu=zs),0===(t=Ut(62914560&~uu))&&(t=4194304))),n=du(),null!==(e=vu(e,t))&&($t(e,t,n),mu(e,n))}function $u(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Hu(e,t,n,r){return new $u(e,t,n,r)}function qu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Wu(e,t){var n=e.alternate;return null===n?((n=Hu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gu(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)qu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case E:return Yu(n.children,o,i,t);case P:s=8,o|=16;break;case D:s=8,o|=1;break;case S:return(e=Hu(12,n,t,8|o)).elementType=S,e.type=S,e.lanes=i,e;case A:return(e=Hu(13,n,t,o)).type=A,e.elementType=A,e.lanes=i,e;case T:return(e=Hu(19,n,t,o)).elementType=T,e.lanes=i,e;case B:return Ku(n,o,i,t);case L:return(e=Hu(24,n,t,o)).elementType=L,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case _:s=9;break e;case j:s=11;break e;case N:s=14;break e;case M:s=16,r=null;break e;case F:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Hu(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Yu(e,t,n,r){return(e=Hu(7,e,r,t)).lanes=n,e}function Ku(e,t,n,r){return(e=Hu(23,e,r,t)).elementType=B,e.lanes=n,e}function Ju(e,t,n){return(e=Hu(6,e,null,t)).lanes=n,e}function Qu(e,t,n){return(t=Hu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xu(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Vt(0),this.expirationTimes=Vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vt(0),this.mutableSourceEagerHydrationData=null}function Zu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:O,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function ec(e,t,n,r){var o=t.current,i=du(),s=pu(o);e:if(n){t:{if(Je(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(go(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(go(c)){n=wo(n,c,u);break e}}n=u}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=fi(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),di(o,t),hu(o,s,i),s}function tc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rc(e,t){nc(e,t),(e=e.alternate)&&nc(e,t)}function oc(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xu(e,t,null!=n&&!0===n.hydrate),t=Hu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ci(t),e[eo]=n.current,Nr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function ic(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ac(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=tc(a);s.call(e)}}ec(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new oc(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var u=o;o=function(){var e=tc(a);u.call(e)}}wu((function(){ec(t,a,e,o)}))}return tc(a)}function sc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ic(t))throw Error(a(200));return Zu(e,t,null,n)}Ys=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||vo.current)Ba=!0;else{if(0===(n&r)){switch(Ba=!1,t.tag){case 3:Ga(t),Yi();break;case 5:Pi(t);break;case 1:go(t.type)&&xo(t);break;case 4:Fi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fo(Zo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Xa(e,t,n):(fo(Li,1&Li.current),null!==(t=is(e,t,n))?t.sibling:null);fo(Li,1&Li.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),fo(Li,Li.current),r)break;return null;case 23:case 24:return t.lanes=0,Va(e,t,n)}return is(e,t,n)}Ba=0!==(16384&e.flags)}else Ba=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=yo(t,ho.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,go(r)){var i=!0;xo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ci(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&yi(t,r,s,e),o.updater=gi,t.stateNode=o,o._reactInternals=t,xi(t,r,e,n),t=Wa(null,t,r,!0,i,n)}else t.tag=0,La(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return qu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===j)return 11;if(e===N)return 14}return 2}(o),e=Xo(o,e),i){case 0:t=Ha(null,t,o,e,n);break e;case 1:t=qa(null,t,o,e,n);break e;case 11:t=Ia(null,t,o,e,n);break e;case 14:t=za(null,t,o,Xo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ha(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 1:return r=t.type,o=t.pendingProps,qa(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 3:if(Ga(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,li(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Yi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Ui=Yr(t.stateNode.containerInfo.firstChild),zi=t,i=Vi=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Ki.push(i);for(n=_i(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else La(e,t,r,n),Yi();t=t.child}return t;case 5:return Pi(t),null===e&&qi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,Hr(r,o)?s=null:null!==i&&Hr(r,i)&&(t.flags|=16),$a(e,t),La(e,t,s,n),t.child;case 6:return null===e&&qi(t),null;case 13:return Xa(e,t,n);case 4:return Fi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ci(t,null,r,n):La(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ia(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 7:return La(e,t,t.pendingProps,n),t.child;case 8:case 12:return La(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(fo(Zo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0===(i=lr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!vo.current){t=is(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!==(l.observedBits&i)){1===u.tag&&((l=fi(-1,n&-n)).tag=2,di(u,l)),u.lanes|=n,null!==(l=u.alternate)&&(l.lanes|=n),ii(u.return,n),c.lanes|=n;break}l=l.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}La(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,La(e,t,r,n),t.child;case 14:return i=Xo(o=t.type,t.pendingProps),za(e,t,o,i=Xo(o.type,i),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,go(r)?(e=!0,xo(t)):e=!1,ai(t,n),ki(t,r,o),xi(t,r,o,n),Wa(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return Va(e,t,n)}throw Error(a(156,t.tag))},oc.prototype.render=function(e){ec(e,this._internalRoot,null,null)},oc.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ec(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hu(e,4,du()),rc(e,4))},nt=function(e){13===e.tag&&(hu(e,67108864,du()),rc(e,67108864))},rt=function(e){if(13===e.tag){var t=du(),n=pu(e);hu(e,n,t),rc(e,n)}},ot=function(e,t){return t()},Ce=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Q(r),ne(r,o)}}}break;case"textarea":ce(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Me=ku,Fe=function(e,t,n,r,o){var i=Ns;Ns|=4;try{return Go(98,e.bind(null,t,n,r,o))}finally{0===(Ns=i)&&(Gs(),Ko())}},Re=function(){0===(49&Ns)&&(function(){if(null!==ou){var e=ou;ou=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,mu(e,Ho())}))}Ko()}(),Ru())},Pe=function(e,t){var n=Ns;Ns|=2;try{return e(t)}finally{0===(Ns=n)&&(Gs(),Ko())}};var uc={Events:[ro,oo,io,Te,Ne,Ru,{current:!1}]},cc={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},lc={bundleType:cc.bundleType,version:cc.version,rendererPackageName:cc.rendererPackageName,rendererConfig:cc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:cc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{Eo=fc.inject(lc),Do=fc}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uc,t.createPortal=sc,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ns;if(0!==(48&n))return e(t);Ns|=1;try{if(e)return Go(99,e.bind(null,t))}finally{Ns=n,Ko()}},t.hydrate=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!0,n)},t.render=function(e,t,n){if(!ic(t))throw Error(a(200));return ac(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ic(e))throw Error(a(40));return!!e._reactRootContainer&&(wu((function(){ac(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=ku,t.unstable_createPortal=function(e,t){return sc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ic(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ac(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(33)},function(e,t,n){"use strict";var r,o,i,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,f=null,d=function e(){if(null!==l)try{var n=t.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==l?setTimeout(r,0,e):(l=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var v=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,y=null,g=-1,b=5,k=0;t.unstable_shouldYield=function(){return t.unstable_now()>=k},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,x=w.port2;w.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();k=e+b;try{y(!0,e)?x.postMessage(null):(m=!1,y=null)}catch(n){throw x.postMessage(null),n}}else m=!1},r=function(e){y=e,m||(m=!0,x.postMessage(null))},o=function(e,n){g=p((function(){e(t.unstable_now())}),n)},i=function(){h(g),g=-1}}function O(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<S(o,t)))break e;e[r]=t,e[n]=o,n=r}}function E(e){return void 0===(e=e[0])?null:e}function D(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>S(a,n))void 0!==u&&0>S(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>S(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function S(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var C=[],_=[],j=1,A=null,T=3,N=!1,M=!1,F=!1;function R(e){for(var t=E(_);null!==t;){if(null===t.callback)D(_);else{if(!(t.startTime<=e))break;D(_),t.sortIndex=t.expirationTime,O(C,t)}t=E(_)}}function P(e){if(F=!1,R(e),!M)if(null!==E(C))M=!0,r(B);else{var t=E(_);null!==t&&o(P,t.startTime-e)}}function B(e,n){M=!1,F&&(F=!1,i()),N=!0;var r=T;try{for(R(n),A=E(C);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"===typeof a){A.callback=null,T=A.priorityLevel;var s=a(A.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?A.callback=s:A===E(C)&&D(C),R(n)}else D(C);A=E(C)}if(null!==A)var u=!0;else{var c=E(_);null!==c&&o(P,c.startTime-n),u=!1}return u}finally{A=null,T=r,N=!1}}var L=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){M||N||(M=!0,r(B))},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return E(C)},t.unstable_next=function(e){switch(T){case 1:case 2:case 3:var t=3;break;default:t=T}var n=T;T=t;try{return e()}finally{T=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=L,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=T;T=e;try{return t()}finally{T=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:j++,callback:n,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(e.sortIndex=a,O(_,e),null===E(C)&&e===E(_)&&(F?i():F=!0,o(P,a-s))):(e.sortIndex=u,O(C,e),M||N||(M=!0,r(B))),e},t.unstable_wrapCallback=function(e){var t=T;return function(){var n=T;T=t;try{return e.apply(this,arguments)}finally{T=n}}}},function(e,t,n){"use strict";n(19);var r=n(1),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:l,props:i,_owner:a.current}}t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";e.exports=n(36)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,k=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case u:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case p:case y:case m:case c:return e;default:return t}}case i:return t}}}function O(e){return x(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||x(e)===f},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===u},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===u||e===s||e===h||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===p||e.$$typeof===b||e.$$typeof===k||e.$$typeof===w||e.$$typeof===g)},t.typeOf=x},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"FunctionToString",(function(){return ye})),n.d(r,"InboundFilters",(function(){return be}));var o=n(0);function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var a=n(1),s=n.n(a),u=n(11),c=n.n(u);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function f(){f=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(_){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new D(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(_){return{type:"throw",arg:_}}}e.wrap=u;var d={};function p(){}function h(){}function v(){}var m={};s(m,o,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(S([])));g&&g!==t&&n.call(g,o)&&(m=g);var b=v.prototype=p.prototype=Object.create(m);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function r(o,i,a,s){var u=c(e[o],e,i);if("throw"!==u.type){var f=u.arg,d=f.value;return d&&"object"==l(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){f.value=e,a(f)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=v,s(b,"constructor",v),s(v,"constructor",h),h.displayName=s(v,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,a,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},k(w.prototype),s(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new w(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(b),s(b,a,"Generator"),s(b,o,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function d(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,s,"next",e)}function s(e){d(i,r,o,a,s,"throw",e)}a(void 0)}))}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(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 m(e,t,n){return t&&v(e.prototype,t),n&&v(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function g(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function k(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(sr){return!1}}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e,t){if(t&&("object"===l(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function O(e){var t=k();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}var E=n(4),D=n(1).createContext({site:{},member:{},action:"",brandColor:"",pageData:{},onAction:function(e,t){return{action:e,data:t}}}),S=n(2),C=["children","head","title","style","onResize"],_=function(e){g(n,e);var t=O(n);function n(){var e;h(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(e=t.call.apply(t,[this].concat(o))).handleLoad=function(){e.setupFrameBaseStyle()},e}return m(n,[{key:"componentDidMount",value:function(){this.node.addEventListener("load",this.handleLoad)}},{key:"componentWillUnmout",value:function(){this.node.removeEventListener("load",this.handleLoad)}},{key:"setupFrameBaseStyle",value:function(){var e=this;this.node.contentDocument&&(this.iframeHtml=this.node.contentDocument.documentElement,this.iframeHead=this.node.contentDocument.head,this.iframeRoot=this.node.contentDocument.body,this.forceUpdate(),this.props.onResize&&new ResizeObserver((function(t){return e.props.onResize(e.iframeRoot)})).observe(this.iframeRoot))}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.head,a=t.title,s=void 0===a?"":a,c=t.style,l=void 0===c?{}:c,f=(t.onResize,i(t,C));return Object(S.jsxs)("iframe",Object(o.a)(Object(o.a)({srcDoc:"<!DOCTYPE html>"},f),{},{ref:function(t){return e.node=t},title:s,style:l,frameBorder:"0",children:[this.iframeHead&&Object(u.createPortal)(r,this.iframeHead),this.iframeRoot&&Object(u.createPortal)(n,this.iframeRoot)]}))}}]),n}(a.Component),j=["children","type","style"],A=function(e){var t,n=e.children,r=e.type,s=e.style,u=i(e,j),c=Object(a.useContext)(D).stylesUrl,l="dynamic"===(r=null!==(t=r)&&void 0!==t?t:"dynamic")?{width:"calc(100% + min(8vmin, 40px))",height:"400px",marginLeft:"max(-4vmin,-20px)",marginRight:"max(-4vmin,-20px)"}:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},f=Object(a.useState)(l),d=Object(E.a)(f,2),p=d[0],h=d[1],v=Object(a.useState)(!1),m=Object(E.a)(v,2),y=m[0],g=m[1],b=Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("link",{rel:"stylesheet",href:c,onLoad:function(){g(!0)}}),Object(S.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n body, html {\n overflow: hidden;\n }\n "}}),Object(S.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}),k=Object(o.a)(Object(o.a)({},p),s);return Object(S.jsx)(_,Object(o.a)(Object(o.a)({},u),{},{head:b,style:k,onResize:"dynamic"===r?function(e){h((function(t){return Object(o.a)(Object(o.a)({},t),{},{height:"".concat(e.scrollHeight,"px")})}))}:null,children:y&&n}))},T=n(9),N=n(10),M=n(12);function F(){var e=Object(T.a)(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var t=e.toString(16);t.length<4;)t="0".concat(t);return t};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function R(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function P(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function B(e){var t=e.message,n=e.event_id;if(t)return t;var r=P(e);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"<unknown>":n||"<unknown>"}function L(e,t,n){var r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function I(e,t){var n=P(e);if(n){var r=n.mechanism;if(n.mechanism=Object(o.a)(Object(o.a)(Object(o.a)({},{type:"generic",handled:!0}),r),t),t&&"data"in t){var i=Object(o.a)(Object(o.a)({},r&&r.data),t.data);n.mechanism.data=i}}}function z(e){if(e&&e.__sentry_captured__)return!0;try{Object(N.a)(e,"__sentry_captured__",!0)}catch(t){}return!1}var U,V=n(23),$=Object(T.a)(),H="Sentry Logger ",q=["debug","info","warn","error","log","assert","trace"];function W(e){var t=Object(T.a)();if(!("console"in t))return e();var n=t.console,r={};q.forEach((function(e){var o=n[e]&&n[e].__sentry_original__;e in t.console&&o&&(r[e]=n[e],n[e]=o)}));try{return e()}finally{Object.keys(r).forEach((function(e){n[e]=r[e]}))}}function G(){var e=!1,t={enable:function(){e=!0},disable:function(){e=!1}};return"undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?q.forEach((function(n){t[n]=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];e&&W((function(){var e;(e=$.console)[n].apply(e,["".concat(H,"[").concat(n,"]:")].concat(r))}))}})):q.forEach((function(e){t[e]=function(){}})),t}U="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Object(T.b)("logger",G):G();var Y,K=n(15),J=n(3),Q=n(5),X=n(7);function Z(e){return new te((function(t){t(e)}))}function ee(e){return new te((function(t,n){n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(Y||(Y={}));var te=function(){function e(t){h(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(sr){this._reject(sr)}}return m(e,[{key:"__init",value:function(){this._state=Y.PENDING}},{key:"__init2",value:function(){this._handlers=[]}},{key:"then",value:function(t,n){var r=this;return new e((function(e,o){r._handlers.push([!1,function(n){if(t)try{e(t(n))}catch(sr){o(sr)}else e(n)},function(t){if(n)try{e(n(t))}catch(sr){o(sr)}else o(t)}]),r._executeHandlers()}))}},{key:"catch",value:function(e){return this.then((function(e){return e}),e)}},{key:"finally",value:function(t){var n=this;return new e((function(e,r){var o,i;return n.then((function(e){i=!1,o=e,t&&t()}),(function(e){i=!0,o=e,t&&t()})).then((function(){i?r(o):e(o)}))}))}},{key:"__init3",value:function(){var e=this;this._resolve=function(t){e._setResult(Y.RESOLVED,t)}}},{key:"__init4",value:function(){var e=this;this._reject=function(t){e._setResult(Y.REJECTED,t)}}},{key:"__init5",value:function(){var e=this;this._setResult=function(t,n){e._state===Y.PENDING&&(Object(X.n)(n)?n.then(e._resolve,e._reject):(e._state=t,e._value=n,e._executeHandlers()))}}},{key:"__init6",value:function(){var e=this;this._executeHandlers=function(){if(e._state!==Y.PENDING){var t=e._handlers.slice();e._handlers=[],t.forEach((function(t){t[0]||(e._state===Y.RESOLVED&&t[1](e._value),e._state===Y.REJECTED&&t[2](e._value),t[0]=!0)}))}}}}]),e}();function ne(e){var t=Object(V.b)(),n={sid:F(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:function(){return function(e){return Object(N.c)({sid:"".concat(e.sid),init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?"".concat(e.did):void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)}};return e&&re(n,e),n}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(V.b)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:F()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(t.did)),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}var oe=function(){function e(){h(this,e),this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return m(e,[{key:"addScopeListener",value:function(e){this._scopeListeners.push(e)}},{key:"addEventProcessor",value:function(e){return this._eventProcessors.push(e),this}},{key:"setUser",value:function(e){return this._user=e||{},this._session&&re(this._session,{user:e}),this._notifyScopeListeners(),this}},{key:"getUser",value:function(){return this._user}},{key:"getRequestSession",value:function(){return this._requestSession}},{key:"setRequestSession",value:function(e){return this._requestSession=e,this}},{key:"setTags",value:function(e){return this._tags=Object(o.a)(Object(o.a)({},this._tags),e),this._notifyScopeListeners(),this}},{key:"setTag",value:function(e,t){return this._tags=Object(o.a)(Object(o.a)({},this._tags),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setExtras",value:function(e){return this._extra=Object(o.a)(Object(o.a)({},this._extra),e),this._notifyScopeListeners(),this}},{key:"setExtra",value:function(e,t){return this._extra=Object(o.a)(Object(o.a)({},this._extra),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setFingerprint",value:function(e){return this._fingerprint=e,this._notifyScopeListeners(),this}},{key:"setLevel",value:function(e){return this._level=e,this._notifyScopeListeners(),this}},{key:"setTransactionName",value:function(e){return this._transactionName=e,this._notifyScopeListeners(),this}},{key:"setContext",value:function(e,t){return null===t?delete this._contexts[e]:this._contexts=Object(o.a)(Object(o.a)({},this._contexts),{},Object(Q.a)({},e,t)),this._notifyScopeListeners(),this}},{key:"setSpan",value:function(e){return this._span=e,this._notifyScopeListeners(),this}},{key:"getSpan",value:function(){return this._span}},{key:"getTransaction",value:function(){var e=this.getSpan();return e&&e.transaction}},{key:"setSession",value:function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}},{key:"getSession",value:function(){return this._session}},{key:"update",value:function(t){if(!t)return this;if("function"===typeof t){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=Object(o.a)(Object(o.a)({},this._tags),t._tags),this._extra=Object(o.a)(Object(o.a)({},this._extra),t._extra),this._contexts=Object(o.a)(Object(o.a)({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):Object(X.i)(t)&&(this._tags=Object(o.a)(Object(o.a)({},this._tags),t.tags),this._extra=Object(o.a)(Object(o.a)({},this._extra),t.extra),this._contexts=Object(o.a)(Object(o.a)({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}},{key:"clear",value:function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}},{key:"addBreadcrumb",value:function(e,t){var n="number"===typeof t?Math.min(t,100):100;if(n<=0)return this;var r=Object(o.a)({timestamp:Object(V.a)()},e);return this._breadcrumbs=[].concat(Object(J.a)(this._breadcrumbs),[r]).slice(-n),this._notifyScopeListeners(),this}},{key:"clearBreadcrumbs",value:function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}},{key:"addAttachment",value:function(e){return this._attachments.push(e),this}},{key:"getAttachments",value:function(){return this._attachments}},{key:"clearAttachments",value:function(){return this._attachments=[],this}},{key:"applyToEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._extra&&Object.keys(this._extra).length&&(e.extra=Object(o.a)(Object(o.a)({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=Object(o.a)(Object(o.a)({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=Object(o.a)(Object(o.a)({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=Object(o.a)(Object(o.a)({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=Object(o.a)({trace:this._span.getTraceContext()},e.contexts);var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags=Object(o.a)({transaction:n},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=[].concat(Object(J.a)(e.breadcrumbs||[]),Object(J.a)(this._breadcrumbs)),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata=Object(o.a)(Object(o.a)({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),this._notifyEventProcessors([].concat(Object(J.a)(ie()),Object(J.a)(this._eventProcessors)),e,t)}},{key:"setSDKProcessingMetadata",value:function(e){return this._sdkProcessingMetadata=Object(o.a)(Object(o.a)({},this._sdkProcessingMetadata),e),this}},{key:"_notifyEventProcessors",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new te((function(a,s){var u=e[i];if(null===t||"function"!==typeof u)a(t);else{var c=u(Object(o.a)({},t),n);("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&u.id&&null===c&&U.log('Event processor "'.concat(u.id,'" dropped event')),Object(X.n)(c)?c.then((function(t){return r._notifyEventProcessors(e,t,n,i+1).then(a)})).then(null,s):r._notifyEventProcessors(e,c,n,i+1).then(a).then(null,s)}}))}},{key:"_notifyScopeListeners",value:function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(t){t(e)})),this._notifyingListeners=!1)}},{key:"_applyFingerprint",value:function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}],[{key:"clone",value:function(t){var n=new e;return t&&(n._breadcrumbs=Object(J.a)(t._breadcrumbs),n._tags=Object(o.a)({},t._tags),n._extra=Object(o.a)({},t._extra),n._contexts=Object(o.a)({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=Object(J.a)(t._eventProcessors),n._requestSession=t._requestSession,n._attachments=Object(J.a)(t._attachments)),n}}]),e}();function ie(){return Object(T.b)("globalEventProcessors",(function(){return[]}))}function ae(e){ie().push(e)}var se,ue=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new oe,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4;h(this,e),this._version=r,e.prototype.__init.call(this),this.getStackTop().scope=n,t&&this.bindClient(t)}return m(e,[{key:"__init",value:function(){this._stack=[{}]}},{key:"isOlderThan",value:function(e){return this._version<e}},{key:"bindClient",value:function(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}},{key:"pushScope",value:function(){var e=oe.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}},{key:"popScope",value:function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}},{key:"withScope",value:function(e){var t=this.pushScope();try{e(t)}finally{this.popScope()}}},{key:"getClient",value:function(){return this.getStackTop().client}},{key:"getScope",value:function(){return this.getStackTop().scope}},{key:"getStack",value:function(){return this._stack}},{key:"getStackTop",value:function(){return this._stack[this._stack.length-1]}},{key:"captureException",value:function(e,t){var n=this._lastEventId=t&&t.event_id?t.event_id:F(),r=new Error("Sentry syntheticException");return this._withClient((function(i,a){i.captureException(e,Object(o.a)(Object(o.a)({originalException:e,syntheticException:r},t),{},{event_id:n}),a)})),n}},{key:"captureMessage",value:function(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:F(),i=new Error(e);return this._withClient((function(a,s){a.captureMessage(e,t,Object(o.a)(Object(o.a)({originalException:e,syntheticException:i},n),{},{event_id:r}),s)})),r}},{key:"captureEvent",value:function(e,t){var n=t&&t.event_id?t.event_id:F();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((function(r,i){r.captureEvent(e,Object(o.a)(Object(o.a)({},t),{},{event_id:n}),i)})),n}},{key:"lastEventId",value:function(){return this._lastEventId}},{key:"addBreadcrumb",value:function(e,t){var n=this.getStackTop(),r=n.scope,i=n.client;if(r&&i){var a=i.getOptions&&i.getOptions()||{},s=a.beforeBreadcrumb,u=void 0===s?null:s,c=a.maxBreadcrumbs,l=void 0===c?100:c;if(!(l<=0)){var f=Object(V.a)(),d=Object(o.a)({timestamp:f},e),p=u?W((function(){return u(d,t)})):d;null!==p&&r.addBreadcrumb(p,l)}}}},{key:"setUser",value:function(e){var t=this.getScope();t&&t.setUser(e)}},{key:"setTags",value:function(e){var t=this.getScope();t&&t.setTags(e)}},{key:"setExtras",value:function(e){var t=this.getScope();t&&t.setExtras(e)}},{key:"setTag",value:function(e,t){var n=this.getScope();n&&n.setTag(e,t)}},{key:"setExtra",value:function(e,t){var n=this.getScope();n&&n.setExtra(e,t)}},{key:"setContext",value:function(e,t){var n=this.getScope();n&&n.setContext(e,t)}},{key:"configureScope",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client;n&&r&&e(n)}},{key:"run",value:function(e){var t=le(this);try{e(this)}finally{le(t)}}},{key:"getIntegration",value:function(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Cannot retrieve integration ".concat(e.id," from the current Hub")),null}}},{key:"startTransaction",value:function(e,t){return this._callExtensionMethod("startTransaction",e,t)}},{key:"traceHeaders",value:function(){return this._callExtensionMethod("traceHeaders")}},{key:"captureSession",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e)return this.endSession();this._sendSessionUpdate()}},{key:"endSession",value:function(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){var n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),re(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}},{key:"startSession",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client,i=r&&r.getOptions()||{},a=i.release,s=i.environment,u=(Object(T.a)().navigator||{}).userAgent,c=ne(Object(o.a)(Object(o.a)(Object(o.a)({release:a,environment:s},n&&{user:n.getUser()}),u&&{userAgent:u}),e));if(n){var l=n.getSession&&n.getSession();l&&"ok"===l.status&&re(l,{status:"exited"}),this.endSession(),n.setSession(c)}return c}},{key:"shouldSendDefaultPii",value:function(){var e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}},{key:"_sendSessionUpdate",value:function(){var e=this.getStackTop(),t=e.scope,n=e.client;if(t){var r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}}},{key:"_withClient",value:function(e){var t=this.getStackTop(),n=t.scope,r=t.client;r&&e(r,n)}},{key:"_callExtensionMethod",value:function(e){var t=ce(),n=t.__SENTRY__;if(n&&n.extensions&&"function"===typeof n.extensions[e]){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.extensions[e].apply(this,o)}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Extension method ".concat(e," couldn't be found, doing nothing."))}}]),e}();function ce(){var e=Object(T.a)();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function le(e){var t=ce(),n=pe(t);return he(t,e),n}function fe(){var e=ce();return de(e)&&!pe(e).isOlderThan(4)||he(e,new ue),Object(K.b)()?function(e){try{var t=ce().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return pe(e);if(!de(n)||pe(n).isOlderThan(4)){var r=pe(e).getStackTop();he(n,new ue(r.client,oe.clone(r.scope)))}return pe(n)}catch(o){return pe(e)}}(e):pe(e)}function de(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function pe(e){return Object(T.b)("hub",(function(){return new ue}),e)}function he(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function ve(e,t){return fe().captureException(e,{captureContext:t})}function me(e){fe().withScope(e)}var ye=function(){function e(){h(this,e),e.prototype.__init.call(this)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){se=Function.prototype.toString,Function.prototype.toString=function(){for(var e=Object(N.f)(this)||this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return se.apply(e,n)}}}],[{key:"__initStatic",value:function(){this.id="FunctionToString"}}]),e}();ye.__initStatic();var ge=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],be=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this._options=t,e.prototype.__init.call(this)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(t,n){var r=function(t){var r=n();if(r){var o=r.getIntegration(e);if(o){var i=r.getClient(),a=i?i.getOptions():{},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[].concat(Object(J.a)(e.allowUrls||[]),Object(J.a)(t.allowUrls||[])),denyUrls:[].concat(Object(J.a)(e.denyUrls||[]),Object(J.a)(t.denyUrls||[])),ignoreErrors:[].concat(Object(J.a)(e.ignoreErrors||[]),Object(J.a)(t.ignoreErrors||[]),ge),ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(o._options,a);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(sr){}return!1}(e))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being internal Sentry Error.\nEvent: ".concat(B(e))),!0;if(function(e,t){if(!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=void 0===n?"":n,o=t.value,i=void 0===o?"":o;return["".concat(i),"".concat(r,": ").concat(i)]}catch(a){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Cannot extract message for event ".concat(B(e))),[]}return[]}(e).some((function(e){return t.some((function(t){return Object(M.a)(e,t)}))}))}(e,t.ignoreErrors))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(B(e))),!0;if(function(e,t){if(!t||!t.length)return!1;var n=ke(e);return!!n&&t.some((function(e){return Object(M.a)(n,e)}))}(e,t.denyUrls))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(B(e),".\nUrl: ").concat(ke(e))),!0;if(!function(e,t){if(!t||!t.length)return!0;var n=ke(e);return!n||t.some((function(e){return Object(M.a)(n,e)}))}(e,t.allowUrls))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(B(e),".\nUrl: ").concat(ke(e))),!0;return!1}(t,s)?null:t}}return t};r.id=this.name,t(r)}}],[{key:"__initStatic",value:function(){this.id="InboundFilters"}}]),e}();function ke(e){try{var t;try{t=e.exception.values[0].stacktrace.frames}catch(sr){}return t?function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.length-1;t>=0;t--){var n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(n){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Cannot extract url for event ".concat(B(e))),null}}be.__initStatic();var we=[];function xe(e){return e.reduce((function(e,t){return e.every((function(e){return t.name!==e.name}))&&e.push(t),e}),[])}function Oe(e){var t=e.defaultIntegrations&&Object(J.a)(e.defaultIntegrations)||[],n=e.integrations,r=Object(J.a)(xe(t));Array.isArray(n)?r=[].concat(Object(J.a)(r.filter((function(e){return n.every((function(t){return t.name!==e.name}))}))),Object(J.a)(xe(n))):"function"===typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var o,i=r.map((function(e){return e.name})),a="Debug";-1!==i.indexOf(a)&&(o=r).push.apply(o,Object(J.a)(r.splice(i.indexOf(a),1)));return r}function Ee(e,t){!0===t.debug&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?U.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=fe(),r=n.getScope();r&&r.update(t.initialScope);var o=new e(t);n.bindClient(o)}function De(e,t,n){return De=k()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&y(o,n.prototype),o},De.apply(null,arguments)}function Se(e){var t="function"===typeof Map?new Map:void 0;return Se=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return De(e,arguments,b(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)},Se(e)}var Ce=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),(r=t.call(this,e)).message=e,r.name=(this instanceof n?this.constructor:void 0).prototype.constructor.name,Object.setPrototypeOf(w(r),(this instanceof n?this.constructor:void 0).prototype),r}return m(n)}(Se(Error)),_e=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function je(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.host,r=e.path,o=e.pass,i=e.port,a=e.projectId,s=e.protocol,u=e.publicKey;return"".concat(s,"://").concat(u).concat(t&&o?":".concat(o):"")+"@".concat(n).concat(i?":".concat(i):"","/").concat(r?"".concat(r,"/"):r).concat(a)}function Ae(e){var t=_e.exec(e);if(!t)throw new Ce("Invalid Sentry Dsn: ".concat(e));var n=t.slice(1),r=Object(E.a)(n,6),o=r[0],i=r[1],a=r[2],s=void 0===a?"":a,u=r[3],c=r[4],l=void 0===c?"":c,f="",d=r[5],p=d.split("/");if(p.length>1&&(f=p.slice(0,-1).join("/"),d=p.pop()),d){var h=d.match(/^\d+/);h&&(d=h[0])}return Te({host:u,pass:s,path:f,projectId:d,port:l,protocol:o,publicKey:i})}function Te(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Ne(e){var t="string"===typeof e?Ae(e):Te(e);return function(e){if("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){var t=e.port,n=e.projectId,r=e.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(t){if(!e[t])throw new Ce("Invalid Sentry Dsn: ".concat(t," missing"))})),!n.match(/^\d+$/))throw new Ce("Invalid Sentry Dsn: Invalid projectId ".concat(n));if(!function(e){return"http"===e||"https"===e}(r))throw new Ce("Invalid Sentry Dsn: Invalid protocol ".concat(r));if(t&&isNaN(parseInt(t,10)))throw new Ce("Invalid Sentry Dsn: Invalid port ".concat(t))}}(t),t}function Me(e){var t=e.protocol?"".concat(e.protocol,":"):"",n=e.port?":".concat(e.port):"";return"".concat(t,"//").concat(e.host).concat(n).concat(e.path?"/".concat(e.path):"","/api/")}function Fe(e,t){return t||"".concat(function(e){return"".concat(Me(e)).concat(e.projectId,"/envelope/")}(e),"?").concat(function(e){return Object(N.h)({sentry_key:e.publicKey,sentry_version:"7"})}(e))}function Re(e,t){var n=Ne(e),r="".concat(Me(n),"embed/error-page/"),o="dsn=".concat(je(n));for(var i in t)if("dsn"!==i)if("user"===i){var a=t.user;if(!a)continue;a.name&&(o+="&name=".concat(encodeURIComponent(a.name))),a.email&&(o+="&email=".concat(encodeURIComponent(a.email)))}else o+="&".concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t[i]));return"".concat(r,"?").concat(o)}var Pe=n(16);function Be(){if(!("fetch"in Object(T.a)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(sr){return!1}}function Le(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}var Ie,ze=n(6),Ue=Object(T.a)(),Ve={},$e={};function He(e){if(!$e[e])switch($e[e]=!0,e){case"console":!function(){if(!("console"in Ue))return;q.forEach((function(e){e in Ue.console&&Object(N.e)(Ue.console,e,(function(t){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];We("console",{args:r,level:e}),t&&t.apply(Ue.console,r)}}))}))}();break;case"dom":!function(){if(!("document"in Ue))return;var e=We.bind(null,"dom"),t=Ze(e,!0);Ue.document.addEventListener("click",t,!1),Ue.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((function(t){var n=Ue[t]&&Ue[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(N.e)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{var i=this,a=i.__sentry_instrumentation_handlers__=i.__sentry_instrumentation_handlers__||{},s=a[n]=a[n]||{refCount:0};if(!s.handler){var u=Ze(e);s.handler=u,t.call(this,n,u,o)}s.refCount+=1}catch(sr){}return t.call(this,n,r,o)}})),Object(N.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{var o=this,i=o.__sentry_instrumentation_handlers__||{},a=i[t];a&&(a.refCount-=1,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete o.__sentry_instrumentation_handlers__)}catch(sr){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Ue))return;var e=XMLHttpRequest.prototype;Object(N.e)(e,"open",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=this,i=n[1],a=o.__sentry_xhr__={method:Object(X.l)(n[0])?n[0].toUpperCase():n[0],url:n[1]};Object(X.l)(i)&&"POST"===a.method&&i.match(/sentry_key/)&&(o.__sentry_own_request__=!0);var s=function(){if(4===o.readyState){try{a.status_code=o.status}catch(sr){}We("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:o})}};return"onreadystatechange"in o&&"function"===typeof o.onreadystatechange?Object(N.e)(o,"onreadystatechange",(function(e){return function(){s();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(o,n)}})):o.addEventListener("readystatechange",s),e.apply(o,n)}})),Object(N.e)(e,"send",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.__sentry_xhr__&&void 0!==n[0]&&(this.__sentry_xhr__.body=n[0]),We("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),e.apply(this,n)}}))}();break;case"fetch":!function(){if(!function(){if(!Be())return!1;var e=Object(T.a)();if(Le(e.fetch))return!0;var t=!1,n=e.document;if(n&&"function"===typeof n.createElement)try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Le(r.contentWindow.fetch)),n.head.removeChild(r)}catch(o){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",o)}return t}())return;Object(N.e)(Ue,"fetch",(function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i={args:n,fetchData:{method:Ge(n),url:Ye(n)},startTimestamp:Date.now()};return We("fetch",Object(o.a)({},i)),e.apply(Ue,n).then((function(e){return We("fetch",Object(o.a)(Object(o.a)({},i),{},{endTimestamp:Date.now(),response:e})),e}),(function(e){throw We("fetch",Object(o.a)(Object(o.a)({},i),{},{endTimestamp:Date.now(),error:e})),e}))}}))}();break;case"history":!function(){if(!function(){var e=Object(T.a)(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}())return;var e=Ue.onpopstate;function t(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length>2?n[2]:void 0;if(o){var i=Ie,a=String(o);Ie=a,We("history",{from:i,to:a})}return e.apply(this,n)}}Ue.onpopstate=function(){var t=Ue.location.href,n=Ie;if(Ie=t,We("history",{from:n,to:t}),e)try{for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(this,o)}catch(a){}},Object(N.e)(Ue.history,"pushState",t),Object(N.e)(Ue.history,"replaceState",t)}();break;case"error":et=Ue.onerror,Ue.onerror=function(e,t,n,r,o){return We("error",{column:r,error:o,line:n,msg:e,url:t}),!!et&&et.apply(this,arguments)};break;case"unhandledrejection":tt=Ue.onunhandledrejection,Ue.onunhandledrejection=function(e){return We("unhandledrejection",e),!tt||tt.apply(this,arguments)};break;default:return void(("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("unknown instrumentation type:",e))}}function qe(e,t){Ve[e]=Ve[e]||[],Ve[e].push(t),He(e)}function We(e,t){if(e&&Ve[e]){var n,r=Object(ze.a)(Ve[e]||[]);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{o(t)}catch(sr){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Error while triggering instrumentation handler.\nType: ".concat(e,"\nName: ").concat(Object(Pe.b)(o),"\nError:"),sr)}}}catch(i){r.e(i)}finally{r.f()}}}function Ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"Request"in Ue&&Object(X.g)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return"string"===typeof e[0]?e[0]:"Request"in Ue&&Object(X.g)(e[0],Request)?e[0].url:String(e[0])}var Ke,Je;function Qe(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(sr){}return!1}function Xe(e){if("keypress"!==e.type)return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(sr){}return!0}function Ze(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){if(n&&Je!==n&&!Xe(n)){var r="keypress"===n.type?"input":n.type;(void 0===Ke||Qe(Je,n))&&(e({event:n,name:r,global:t}),Je=n),clearTimeout(Ke),Ke=Ue.setTimeout((function(){Ke=void 0}),1e3)}}}var et=null;var tt=null;function nt(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}function rt(){return rt="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=nt(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},rt.apply(this,arguments)}var ot="7.5.0";function it(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[e,t]}function at(e,t){var n=Object(E.a)(e,2),r=n[0],o=n[1];return[r,[].concat(Object(J.a)(o),[t])]}function st(e,t){e[1].forEach((function(e){var n=e[0].type;t(e,n)}))}function ut(e,t){return(t||new TextEncoder).encode(e)}function ct(e,t){var n=Object(E.a)(e,2),r=n[0],o=n[1],i=JSON.stringify(r);function a(e){"string"===typeof i?i="string"===typeof e?i+e:[ut(i,t),e]:i.push("string"===typeof e?ut(e,t):e)}var s,u=Object(ze.a)(o);try{for(u.s();!(s=u.n()).done;){var c=s.value,l=Object(E.a)(c,2),f=l[0],d=l[1];a("\n".concat(JSON.stringify(f),"\n")),a("string"===typeof d||d instanceof Uint8Array?d:JSON.stringify(d))}}catch(p){u.e(p)}finally{u.f()}return"string"===typeof i?i:function(e){var t,n=e.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),o=0,i=Object(ze.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;r.set(a,o),o+=a.length}}catch(p){i.e(p)}finally{i.f()}return r}(i)}function lt(e,t){var n="string"===typeof e.data?ut(e.data,t):e.data;return[Object(N.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var ft={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function dt(e){return ft[e]}var pt=n(46);function ht(e){if(e&&e.sdk){var t=e.sdk;return{name:t.name,version:t.version}}}function vt(e,t,n,r){var i=ht(n),a=e.type||"event",s=(e.sdkProcessingMetadata||{}).transactionSampling||{},u=s.method,c=s.rate;!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[].concat(Object(J.a)(e.sdk.integrations||[]),Object(J.a)(t.integrations||[])),e.sdk.packages=[].concat(Object(J.a)(e.sdk.packages||[]),Object(J.a)(t.packages||[])))}(e,n&&n.sdk);var l=function(e,t,n,r){var i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baggage,a=i&&function(e){return e[0]}(i);return Object(o.a)(Object(o.a)(Object(o.a)({event_id:e.event_id,sent_at:(new Date).toISOString()},t&&{sdk:t}),!!n&&{dsn:je(r)}),"transaction"===e.type&&a&&{trace:Object(N.c)(Object(o.a)({},a))})}(e,i,r,t);return delete e.sdkProcessingMetadata,it(l,[[{type:a,sample_rates:[{id:u,rate:c}]},e]])}var mt="Not capturing exception because it's already been captured.",yt=function(){function e(t){if(h(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._options=t,t.dsn){this._dsn=Ne(t.dsn);var n=Fe(this._dsn,t.tunnel);this._transport=t.transport(Object(o.a)(Object(o.a)({recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{},{url:n}))}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("No DSN provided, client will not do anything.")}return m(e,[{key:"__init",value:function(){this._integrations={}}},{key:"__init2",value:function(){this._integrationsInitialized=!1}},{key:"__init3",value:function(){this._numProcessing=0}},{key:"__init4",value:function(){this._outcomes={}}},{key:"captureException",value:function(e,t,n){var r=this;if(!z(e)){var o=t&&t.event_id;return this._process(this.eventFromException(e,t).then((function(e){return r._captureEvent(e,t,n)})).then((function(e){o=e}))),o}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log(mt)}},{key:"captureMessage",value:function(e,t,n,r){var o=this,i=n&&n.event_id,a=Object(X.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(a.then((function(e){return o._captureEvent(e,n,r)})).then((function(e){i=e}))),i}},{key:"captureEvent",value:function(e,t,n){if(!(t&&t.originalException&&z(t.originalException))){var r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((function(e){r=e}))),r}("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log(mt)}},{key:"captureSession",value:function(e){this._isEnabled()?"string"!==typeof e.release?("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),re(e,{init:!1})):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("SDK not enabled, will not capture session.")}},{key:"getDsn",value:function(){return this._dsn}},{key:"getOptions",value:function(){return this._options}},{key:"getTransport",value:function(){return this._transport}},{key:"flush",value:function(e){var t=this._transport;return t?this._isClientDoneProcessing(e).then((function(n){return t.flush(e).then((function(e){return n&&e}))})):Z(!0)}},{key:"close",value:function(e){var t=this;return this.flush(e).then((function(e){return t.getOptions().enabled=!1,e}))}},{key:"setupIntegrations",value:function(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){var t={};return e.forEach((function(e){t[e.name]=e,-1===we.indexOf(e.name)&&(e.setupOnce(ae,fe),we.push(e.name),("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Integration installed: ".concat(e.name)))})),t}(this._options.integrations),this._integrationsInitialized=!0)}},{key:"getIntegrationById",value:function(e){return this._integrations[e]}},{key:"getIntegration",value:function(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Cannot retrieve integration ".concat(e.id," from the current Client")),null}}},{key:"sendEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._dsn){var n,r=vt(e,this._dsn,this._options._metadata,this._options.tunnel),o=Object(ze.a)(t.attachments||[]);try{for(o.s();!(n=o.n()).done;){var i=n.value;r=at(r,lt(i,this._options.transportOptions&&this._options.transportOptions.textEncoder))}}catch(a){o.e(a)}finally{o.f()}this._sendEnvelope(r)}}},{key:"sendSession",value:function(e){if(this._dsn){var t=function(e,t,n,r){var i=ht(n);return it(Object(o.a)(Object(o.a)({sent_at:(new Date).toISOString()},i&&{sdk:i}),!!r&&{dsn:je(t)}),["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}},{key:"recordDroppedEvent",value:function(e,t){if(this._options.sendClientReports){var n="".concat(e,":").concat(t);("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log('Adding outcome: "'.concat(n,'"')),this._outcomes[n]=this._outcomes[n]+1||1}}},{key:"_updateSessionFromEvent",value:function(e,t){var n=!1,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;var a,s=Object(ze.a)(i);try{for(s.s();!(a=s.n()).done;){var u=a.value.mechanism;if(u&&!1===u.handled){n=!0;break}}}catch(l){s.e(l)}finally{s.f()}}var c="ok"===e.status;(c&&0===e.errors||c&&n)&&(re(e,Object(o.a)(Object(o.a)({},n&&{status:"crashed"}),{},{errors:e.errors||Number(r||n)})),this.captureSession(e))}},{key:"_isClientDoneProcessing",value:function(e){var t=this;return new te((function(n){var r=0,o=setInterval((function(){0==t._numProcessing?(clearInterval(o),n(!0)):(r+=1,e&&r>=e&&(clearInterval(o),n(!1)))}),1)}))}},{key:"_isEnabled",value:function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}},{key:"_prepareEvent",value:function(e,t,n){var r=this,i=this.getOptions(),a=i.normalizeDepth,s=void 0===a?3:a,u=i.normalizeMaxBreadth,c=void 0===u?1e3:u,l=Object(o.a)(Object(o.a)({},e),{},{event_id:e.event_id||t.event_id||F(),timestamp:e.timestamp||Object(V.a)()});this._applyClientOptions(l),this._applyIntegrationsMetadata(l);var f=n;t.captureContext&&(f=oe.clone(f).update(t.captureContext));var d=Z(l);if(f){var p=[].concat(Object(J.a)(t.attachments||[]),Object(J.a)(f.getAttachments()));p.length&&(t.attachments=p),d=f.applyToEvent(l,t)}return d.then((function(e){return"number"===typeof s&&s>0?r._normalizeEvent(e,s,c):e}))}},{key:"_normalizeEvent",value:function(e,t,n){if(!e)return null;var r=Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((function(e){return Object(o.a)(Object(o.a)({},e),e.data&&{data:Object(pt.a)(e.data,t,n)})}))}),e.user&&{user:Object(pt.a)(e.user,t,n)}),e.contexts&&{contexts:Object(pt.a)(e.contexts,t,n)}),e.extra&&{extra:Object(pt.a)(e.extra,t,n)});return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(pt.a)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((function(e){return e.data&&(e.data=Object(pt.a)(e.data,t,n)),e}))),r}},{key:"_applyClientOptions",value:function(e){var t=this.getOptions(),n=t.environment,r=t.release,o=t.dist,i=t.maxValueLength,a=void 0===i?250:i;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==o&&(e.dist=o),e.message&&(e.message=Object(M.d)(e.message,a));var s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(M.d)(s.value,a));var u=e.request;u&&u.url&&(u.url=Object(M.d)(u.url,a))}},{key:"_applyIntegrationsMetadata",value:function(e){var t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[].concat(Object(J.a)(e.sdk.integrations||[]),Object(J.a)(t)))}},{key:"_captureEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return this._processEvent(e,t,n).then((function(e){return e.event_id}),(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn(e)}))}},{key:"_processEvent",value:function(e,t,n){var r=this,o=this.getOptions(),i=o.beforeSend,a=o.sampleRate;if(!this._isEnabled())return ee(new Ce("SDK not enabled, will not capture event."));var s="transaction"===e.type;return!s&&"number"===typeof a&&Math.random()>a?(this.recordDroppedEvent("sample_rate","error"),ee(new Ce("Discarding event because it's not included in the random sample (sampling rate = ".concat(a,")")))):this._prepareEvent(e,t,n).then((function(n){if(null===n)throw r.recordDroppedEvent("event_processor",e.type||"error"),new Ce("An event processor returned null, will not send event.");return t.data&&!0===t.data.__sentry__||s||!i?n:function(e){var t="`beforeSend` method has to return `null` or a valid event.";if(Object(X.n)(e))return e.then((function(e){if(!Object(X.i)(e)&&null!==e)throw new Ce(t);return e}),(function(e){throw new Ce("beforeSend rejected with ".concat(e))}));if(!Object(X.i)(e)&&null!==e)throw new Ce(t);return e}(i(n,t))})).then((function(o){if(null===o)throw r.recordDroppedEvent("before_send",e.type||"error"),new Ce("`beforeSend` returned `null`, will not send event.");var i=n&&n.getSession();return!s&&i&&r._updateSessionFromEvent(i,o),r.sendEvent(o,t),o})).then(null,(function(e){if(e instanceof Ce)throw e;throw r.captureException(e,{data:{__sentry__:!0},originalException:e}),new Ce("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(e))}))}},{key:"_process",value:function(e){var t=this;this._numProcessing+=1,e.then((function(e){return t._numProcessing-=1,e}),(function(e){return t._numProcessing-=1,e}))}},{key:"_sendEnvelope",value:function(e){this._transport&&this._dsn?this._transport.send(e).then(null,(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Error while sending event:",e)})):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Transport disabled")}},{key:"_clearOutcomes",value:function(){var e=this._outcomes;return this._outcomes={},Object.keys(e).map((function(t){var n=t.split(":"),r=Object(E.a)(n,2);return{reason:r[0],category:r[1],quantity:e[t]}}))}}]),e}();function gt(e,t){var n=kt(e,t),r={type:t&&t.name,value:xt(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function bt(e,t){return{exception:{values:[gt(e,t)]}}}function kt(e,t){var n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"===typeof e.framesToPop)return e.framesToPop;if(wt.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(sr){}return[]}var wt=/Minified React error #\d+;/i;function xt(e){var t=e&&e.message;return t?t.error&&"string"===typeof t.error.message?t.error.message:t:"No error message"}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=r&&r.syntheticException||void 0,a=Dt(e,t,i,o);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Z(a)}function Et(e,t,n,r,i){var a;if(Object(X.e)(t)&&t.error)return bt(e,t.error);if(Object(X.a)(t)||Object(X.b)(t)){var s=t;if("stack"in t)a=bt(e,t);else{var u=s.name||(Object(X.a)(s)?"DOMError":"DOMException"),c=s.message?"".concat(u,": ").concat(s.message):u;L(a=Dt(e,c,n,r),c)}return"code"in s&&(a.tags=Object(o.a)(Object(o.a)({},a.tags),{},{"DOMException.code":"".concat(s.code)})),a}return Object(X.d)(t)?bt(e,t):Object(X.i)(t)||Object(X.f)(t)?(a=function(e,t,n,r){var o={exception:{values:[{type:Object(X.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:"Non-Error ".concat(r?"promise rejection":"exception"," captured with keys: ").concat(Object(N.d)(t))}]},extra:{__serialized__:Object(pt.b)(t)}};if(n){var i=kt(e,n);i.length&&(o.exception.values[0].stacktrace={frames:i})}return o}(e,t,n,i),I(a,{synthetic:!0}),a):(L(a=Dt(e,t,n,r),"".concat(t),void 0),I(a,{synthetic:!0}),a)}function Dt(e,t,n,r){var o={message:t};if(r&&n){var i=kt(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]})}return o}var St=n(25),Ct=["fatal","error","warning","log","info","debug"];function _t(e){return"warn"===e?"warning":Ct.includes(e)?e:"log"}var jt="Breadcrumbs",At=function(){function e(t){h(this,e),e.prototype.__init.call(this),this.options=Object(o.a)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){this.options.console&&qe("console",Tt),this.options.dom&&qe("dom",function(e){function t(t){var n,r="object"===typeof e?e.serializeAttribute:void 0;"string"===typeof r&&(r=[r]);try{n=t.event.target?Object(St.b)(t.event.target,r):Object(St.b)(t.event,r)}catch(sr){n="<unknown>"}0!==n.length&&fe().addBreadcrumb({category:"ui.".concat(t.name),message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&qe("xhr",Nt),this.options.fetch&&qe("fetch",Mt),this.options.history&&qe("history",Ft)}}],[{key:"__initStatic",value:function(){this.id=jt}}]),e}();function Tt(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:_t(e.level),message:Object(M.b)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: ".concat(Object(M.b)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}fe().addBreadcrumb(t,{input:e.args,level:e.level})}function Nt(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,o=t.status_code,i=t.body;fe().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:o},type:"http"},{xhr:e.xhr,input:i})}else;}function Mt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?fe().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):fe().addBreadcrumb({category:"fetch",data:Object(o.a)(Object(o.a)({},e.fetchData),{},{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function Ft(e){var t=Object(T.a)(),n=e.from,r=e.to,o=R(t.location.href),i=R(n),a=R(r);i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),fe().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}At.__initStatic();var Rt,Pt=Object(T.a)();function Bt(){if(Rt)return Rt;if(Le(Pt.fetch))return Rt=Pt.fetch.bind(Pt);var e=Pt.document,t=Pt.fetch;if(e&&"function"===typeof e.createElement)try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(sr){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",sr)}return Rt=t.bind(Pt)}var Lt=Object(T.a)(),It=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:ot}],version:ot},r=t.call(this,e),e.sendClientReports&&Lt.document&&Lt.document.addEventListener("visibilitychange",(function(){"hidden"===Lt.document.visibilityState&&r._flushOutcomes()})),r}return m(n,[{key:"eventFromException",value:function(e,t){return function(e,t,n,r){var o=Et(e,t,n&&n.syntheticException||void 0,r);return I(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Z(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}},{key:"eventFromMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return Ot(this._options.stackParser,e,t,n,this._options.attachStacktrace)}},{key:"sendEvent",value:function(e,t){var r=this.getIntegrationById(jt);r&&r.options&&r.options.sentry&&fe().addBreadcrumb({category:"sentry.".concat("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:B(e)},{event:e}),rt(b(n.prototype),"sendEvent",this).call(this,e,t)}},{key:"_prepareEvent",value:function(e,t,r){return e.platform=e.platform||"javascript",rt(b(n.prototype),"_prepareEvent",this).call(this,e,t,r)}},{key:"_flushOutcomes",value:function(){var e=this._clearOutcomes();if(0!==e.length)if(this._dsn){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Sending outcomes:",e);var t,n,r,o=Fe(this._dsn,this._options.tunnel),i=(t=e,it((n=this._options.tunnel&&je(this._dsn))?{dsn:n}:{},[[{type:"client_report"},{timestamp:r||Object(V.a)(),discarded_events:t}]]));try{!function(e,t){"[object Navigator]"===Object.prototype.toString.call(Pt&&Pt.navigator)&&"function"===typeof Pt.navigator.sendBeacon?Pt.navigator.sendBeacon.bind(Pt.navigator)(e,t):Be()&&Bt()(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error(e)}))}(o,ct(i))}catch(sr){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error(sr)}}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("No dsn provided, will not send outcomes");else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("No outcomes to send")}}]),n}(yt),zt=0;function Ut(){return zt>0}function Vt(){zt+=1,setTimeout((function(){zt-=1}))}function $t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if("function"!==typeof e)return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(Object(N.f)(e))return e}catch(sr){return e}var i=function(){var r=Array.prototype.slice.call(arguments);try{n&&"function"===typeof n&&n.apply(this,arguments);var i=r.map((function(e){return $t(e,t)}));return e.apply(this,i)}catch(a){throw Vt(),me((function(e){e.addEventProcessor((function(e){return t.mechanism&&(L(e,void 0,void 0),I(e,t.mechanism)),e.extra=Object(o.a)(Object(o.a)({},e.extra),{},{arguments:r}),e})),ve(a)})),a}};try{for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(i[a]=e[a])}catch(u){}Object(N.g)(i,e),Object(N.a)(e,"__sentry_wrapped__",i);try{var s=Object.getOwnPropertyDescriptor(i,"name");s.configurable&&Object.defineProperty(i,"name",{get:function(){return e.name}})}catch(u){}return i}var Ht="?";function qt(e,t,n,r){var o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var Wt=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Gt=/\((\S*)(?::(\d+))(?::(\d+))\)/,Yt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Kt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Jt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Qt=[[30,function(e){var t=Wt.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){var n=Gt.exec(t[2]);n&&(t[2]=n[1],t[3]=n[2],t[4]=n[3])}var r=Zt(t[1]||Ht,t[2]),o=Object(E.a)(r,2),i=o[0];return qt(o[1],i,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,function(e){var t=Yt.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){var n=Kt.exec(t[3]);n&&(t[1]=t[1]||"eval",t[3]=n[1],t[4]=n[2],t[5]="")}var r=t[3],o=t[1]||Ht,i=Zt(o,r),a=Object(E.a)(i,2);return o=a[0],qt(r=a[1],o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,function(e){var t=Jt.exec(e);return t?qt(t[2],t[1]||Ht,+t[3],t[4]?+t[4]:void 0):void 0}]],Xt=Pe.a.apply(void 0,Qt),Zt=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Ht,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]},en=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],tn=function(){function e(t){h(this,e),e.prototype.__init.call(this),this._options=Object(o.a)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){var e=Object(T.a)();this._options.setTimeout&&Object(N.e)(e,"setTimeout",nn),this._options.setInterval&&Object(N.e)(e,"setInterval",nn),this._options.requestAnimationFrame&&Object(N.e)(e,"requestAnimationFrame",rn),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Object(N.e)(XMLHttpRequest.prototype,"send",on);var t=this._options.eventTarget;t&&(Array.isArray(t)?t:en).forEach(an)}}],[{key:"__initStatic",value:function(){this.id="TryCatch"}}]),e}();function nn(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];return n[0]=$t(o,{mechanism:{data:{function:Object(Pe.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,n)}}function rn(e){return function(t){return e.apply(this,[$t(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(Pe.b)(e)},handled:!0,type:"instrument"}})])}}function on(e){return function(){var t=this,n=["onload","onerror","onprogress","onreadystatechange"];n.forEach((function(e){e in t&&"function"===typeof t[e]&&Object(N.e)(t,e,(function(t){var n={mechanism:{data:{function:e,handler:Object(Pe.b)(t)},handled:!0,type:"instrument"}},r=Object(N.f)(t);return r&&(n.mechanism.data.handler=Object(Pe.b)(r)),$t(t,n)}))}));for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(this,o)}}function an(e){var t=Object(T.a)(),n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(N.e)(n,"addEventListener",(function(t){return function(n,r,o){try{"function"===typeof r.handleEvent&&(r.handleEvent=$t(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(Pe.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(i){}return t.apply(this,[n,$t(r,{mechanism:{data:{function:"addEventListener",handler:Object(Pe.b)(r),target:e},handled:!0,type:"instrument"}}),o])}})),Object(N.e)(n,"removeEventListener",(function(e){return function(t,n,r){var o=n;try{var i=o&&o.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(sr){}return e.call(this,t,o,r)}})))}tn.__initStatic();var sn=function(){function e(t){h(this,e),e.prototype.__init.call(this),e.prototype.__init2.call(this),this._options=Object(o.a)({onerror:!0,onunhandledrejection:!0},t)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"__init2",value:function(){this._installFunc={onerror:un,onunhandledrejection:cn}}},{key:"setupOnce",value:function(){Error.stackTraceLimit=50;var e,t=this._options;for(var n in t){var r=this._installFunc[n];r&&t[n]&&(e=n,("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.log("Global Handler attached: ".concat(e)),r(),this._installFunc[n]=void 0)}}}],[{key:"__initStatic",value:function(){this.id="GlobalHandlers"}}]),e}();function un(){qe("error",(function(e){var t=dn(),n=Object(E.a)(t,3),r=n[0],o=n[1],i=n[2];if(r.getIntegration(sn)){var a=e.msg,s=e.url,u=e.line,c=e.column,l=e.error;if(!(Ut()||l&&l.__sentry_own_request__)){var f=void 0===l&&Object(X.l)(a)?function(e,t,n,r){var o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Object(X.e)(e)?e.message:e,a="Error",s=i.match(o);s&&(a=s[1],i=s[2]);return ln({exception:{values:[{type:a,value:i}]}},t,n,r)}(a,s,u,c):ln(Et(o,l||a,void 0,i,!1),s,u,c);f.level="error",fn(r,l,f,"onerror")}}}))}function cn(){qe("unhandledrejection",(function(e){var t=dn(),n=Object(E.a)(t,3),r=n[0],o=n[1],i=n[2];if(r.getIntegration(sn)){var a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch(u){}if(Ut()||a&&a.__sentry_own_request__)return!0;var s=Object(X.j)(a)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(a))}]}}:Et(o,a,void 0,i,!0);s.level="error",fn(r,a,s,"onunhandledrejection")}}))}function ln(e,t,n,r){var o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},u=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,f=Object(X.l)(t)&&t.length>0?t:Object(St.a)();return 0===u.length&&u.push({colno:c,filename:f,function:"?",in_app:!0,lineno:l}),e}function fn(e,t,n,r){I(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function dn(){var e=fe(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:function(){return[]},attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}sn.__initStatic();var pn="cause",hn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),e.prototype.__init.call(this),this._key=t.key||pn,this._limit=t.limit||5}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){var t=fe().getClient();t&&ae((function(n,r){var o=fe().getIntegration(e);return o?function(e,t,n,r,o){if(!r.exception||!r.exception.values||!o||!Object(X.g)(o.originalException,Error))return r;var i=vn(e,n,o.originalException,t);return r.exception.values=[].concat(Object(J.a)(i),Object(J.a)(r.exception.values)),r}(t.getOptions().stackParser,o._key,o._limit,n,r):n}))}}],[{key:"__initStatic",value:function(){this.id="LinkedErrors"}}]),e}();function vn(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(!Object(X.g)(n[r],Error)||o.length+1>=t)return o;var i=gt(e,n[r]);return vn(e,t,n[r],r,[i].concat(Object(J.a)(o)))}hn.__initStatic();var mn=function(){function e(){h(this,e),e.prototype.__init.call(this)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(t,n){var r=function(t){var r=n().getIntegration(e);if(r){try{if(function(e,t){if(!t)return!1;if(function(e,t){var n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!gn(e,t))return!1;if(!yn(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){var n=bn(t),r=bn(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!gn(e,t))return!1;if(!yn(e,t))return!1;return!0}(e,t))return!0;return!1}(t,r._previousEvent))return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(o){return r._previousEvent=t}return r._previousEvent=t}return t};r.id=this.name,t(r)}}],[{key:"__initStatic",value:function(){this.id="Dedupe"}}]),e}();function yn(e,t){var n=kn(e),r=kn(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++){var i=r[o],a=n[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function gn(e,t){var n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(o){return!1}}function bn(e){return e.exception&&e.exception.values&&e.exception.values[0]}function kn(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(n){return}}mn.__initStatic();var wn=Object(T.a)(),xn=function(){function e(){h(this,e),e.prototype.__init.call(this)}return m(e,[{key:"__init",value:function(){this.name=e.id}},{key:"setupOnce",value:function(){ae((function(t){if(fe().getIntegration(e)){if(!wn.navigator&&!wn.location&&!wn.document)return t;var n=t.request&&t.request.url||wn.location&&wn.location.href,r=(wn.document||{}).referrer,i=(wn.navigator||{}).userAgent,a=Object(o.a)(Object(o.a)(Object(o.a)({},t.request&&t.request.headers),r&&{Referer:r}),i&&{"User-Agent":i}),s=Object(o.a)(Object(o.a)({},n&&{url:n}),{},{headers:a});return Object(o.a)(Object(o.a)({},t),{},{request:s})}return t}))}}],[{key:"__initStatic",value:function(){this.id="HttpContext"}}]),e}();function On(e){var t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return ee(new Ce("Not adding Promise due to buffer limit reached."));var o=r();return-1===t.indexOf(o)&&t.push(o),o.then((function(){return n(o)})).then(null,(function(){return n(o).then(null,(function(){}))})),o},drain:function(e){return new te((function(n,r){var o=t.length;if(!o)return n(!0);var i=setTimeout((function(){e&&e>0&&n(!1)}),e);t.forEach((function(e){Z(e).then((function(){--o||(clearTimeout(i),n(!0))}),r)}))}))}}}xn.__initStatic();function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),n=parseInt("".concat(e),10);if(!isNaN(n))return 1e3*n;var r=Date.parse("".concat(e));return isNaN(r)?6e4:r-t}function Dn(e,t){return e[t]||e.all||0}function Sn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return Dn(e,t)>n}function Cn(e,t){var n=t.statusCode,r=t.headers,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now(),a=Object(o.a)({},e),s=r&&r["x-sentry-rate-limits"],u=r&&r["retry-after"];if(s){var c,l=Object(ze.a)(s.trim().split(","));try{for(l.s();!(c=l.n()).done;){var f=c.value,d=f.split(":",2),p=Object(E.a)(d,2),h=p[0],v=p[1],m=parseInt(h,10),y=1e3*(isNaN(m)?60:m);if(v){var g,b=Object(ze.a)(v.split(";"));try{for(b.s();!(g=b.n()).done;){var k=g.value;a[k]=i+y}}catch(w){b.e(w)}finally{b.f()}}else a.all=i+y}}catch(w){l.e(w)}finally{l.f()}}else u?a.all=i+En(u,i):429===n&&(a.all=i+6e4);return a}function _n(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:On(e.bufferSize||30),r={},o=function(e){return n.drain(e)};function i(o){var i=[];if(st(o,(function(t,n){var o=dt(n);Sn(r,o)?e.recordDroppedEvent("ratelimit_backoff",o):i.push(t)})),0===i.length)return Z();var a=it(o[0],i),s=function(t){st(a,(function(n,r){e.recordDroppedEvent(t,dt(r))}))};return n.add((function(){return t({body:ct(a,e.textEncoder)}).then((function(e){void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Sentry responded with status code ".concat(e.statusCode," to sent event.")),r=Cn(r,e)}),(function(e){("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Failed while sending event:",e),s("network_error")}))})).then((function(e){return e}),(function(e){if(e instanceof Ce)return("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Skipped sending event due to full buffer"),s("queue_overflow"),Z();throw e}))}return{send:i,flush:o}}function jn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bt();function n(n){var r=Object(o.a)({body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers},e.fetchOptions);return t(e.url,r).then((function(e){return{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}}))}return _n(e,n)}function An(e){return _n(e,(function(t){return new te((function(n,r){var o=new XMLHttpRequest;for(var i in o.onerror=r,o.onreadystatechange=function(){4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,i)&&o.setRequestHeader(i,e.headers[i]);o.send(t.body)}))}))}var Tn=[new r.InboundFilters,new r.FunctionToString,new tn,new At,new sn,new hn,new mn,new xn];function Nn(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function Mn(){if("undefined"!==typeof Object(T.a)().document){var e=fe();e.captureSession&&(Nn(e),qe("history",(function(e){var t=e.from,n=e.to;void 0!==t&&t!==n&&Nn(fe())})))}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("Session tracking in non-browser environment with @sentry/browser is not supported.")}n(22);var Fn={componentStack:null,error:null,eventId:null},Rn=function(e){g(n,e);var t=O(n);function n(){var e;h(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),n.prototype.__init.call(w(e)),n.prototype.__init2.call(w(e)),e}return m(n,[{key:"__init",value:function(){this.state=Fn}},{key:"componentDidCatch",value:function(e,t){var n=this,r=t.componentStack,i=this.props,s=i.beforeCapture,u=i.onError,c=i.showDialog,l=i.dialogOptions;me((function(t){if(function(e){var t=e.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}(a.version)){var i=new Error(e.message);i.name="React ErrorBoundary ".concat(i.name),i.stack=r,e.cause=i}s&&s(t,e,r);var f=ve(e,{contexts:{react:{componentStack:r}}});u&&u(e,r,f),c&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe(),n=Object(T.a)();if(n.document){var r=t.getStackTop(),i=r.client,a=r.scope,s=e.dsn||i&&i.getDsn();if(s){a&&(e.user=Object(o.a)(Object(o.a)({},a.getUser()),e.user)),e.eventId||(e.eventId=t.lastEventId());var u=n.document.createElement("script");u.async=!0,u.src=Re(s,e),e.onLoad&&(u.onload=e.onLoad);var c=n.document.head||n.document.body;c?c.appendChild(u):("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Not injecting report dialog. No injection point found in HTML")}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("DSN not configured for showReportDialog call")}else("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.error("Global document not defined in showReportDialog call")}(Object(o.a)(Object(o.a)({},l),{},{eventId:f})),n.setState({error:e,componentStack:r,eventId:f})}))}},{key:"componentDidMount",value:function(){var e=this.props.onMount;e&&e()}},{key:"componentWillUnmount",value:function(){var e=this.state,t=e.error,n=e.componentStack,r=e.eventId,o=this.props.onUnmount;o&&o(t,n,r)}},{key:"__init2",value:function(){var e=this;this.resetErrorBoundary=function(){var t=e.props.onReset,n=e.state,r=n.error,o=n.componentStack,i=n.eventId;t&&t(r,o,i),e.setState(Fn)}}},{key:"render",value:function(){var e=this.props,t=e.fallback,n=e.children,r=this.state,o=r.error,i=r.componentStack,s=r.eventId;if(o){var u=void 0;return u="function"===typeof t?t({error:o,componentStack:i,resetError:this.resetErrorBoundary,eventId:s}):t,a.isValidElement(u)?u:(t&&("undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&U.warn("fallback did not produce a valid ReactElement"),null)}return"function"===typeof n?n():n}}]),n}(a.Component);function Pn(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:ot}],version:ot},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.defaultIntegrations&&(e.defaultIntegrations=Tn),void 0===e.release){var t=Object(T.a)();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);var n=Object(o.a)(Object(o.a)({},e),{},{stackParser:Object(Pe.c)(e.stackParser||Xt),integrations:Oe(e),transport:e.transport||(Be()?jn:An)});Ee(It,n),e.autoSessionTracking&&Mn()}(e)}function Bn(){return(Bn=p(f().mark((function e(t){var n,r,o,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,o=1,n.pagination&&n.pagination.page&&(o=n.pagination.page+1),e.next=5,r.comments.browse({page:o,postId:n.postId});case 5:return i=e.sent,e.abrupt("return",{comments:[].concat(Object(J.a)(n.comments),Object(J.a)(i.comments)),pagination:i.meta.pagination});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ln(){return(Ln=p(f().mark((function e(t){var n,r,i,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.add({comment:i});case 3:return a=e.sent,i=a.comments[0],s=Object(o.a)(Object(o.a)({},i),{},{member:n.member,replies:[]}),e.abrupt("return",{comments:[s].concat(Object(J.a)(n.comments))});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function In(){return(In=p(f().mark((function e(t){var n,r,i,a,s,u,c;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,a=i.reply,s=i.parent,(u=a).parent_id=s.id,e.next=5,r.comments.add({comment:u});case 5:return c=e.sent,u=c.comments[0],u=Object(o.a)(Object(o.a)({},u),{},{member:n.member}),e.abrupt("return",{comments:n.comments.map((function(e){return e.id===s.id?Object(o.a)(Object(o.a)({},s),{},{replies:[].concat(Object(J.a)(s.replies),[u])}):e}))});case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(){return(zn=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.adminApi,i=t.data,e.next=3,r.hideComment(i.id);case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"hidden"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"hidden",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Un(){return(Un=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.adminApi,i=t.data,e.next=3,r.showComment(i.id);case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"published"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"published",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vn(){return(Vn=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.like({comment:i});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!0,likes_count:e.likes_count+1}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!0,likes_count:e.likes_count+1,replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $n(){return($n=p(f().mark((function e(t){var n,r;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.state,n=t.api,r=t.data,e.next=3,n.comments.report({comment:r});case 3:return e.abrupt("return",{});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Hn(){return(Hn=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.unlike({comment:i});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!1,likes_count:e.likes_count-1}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{liked:!1,likes_count:e.likes_count-1,replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qn(){return(qn=p(f().mark((function e(t){var n,r,i;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,e.next=3,r.comments.edit({comment:{id:i.id,status:"deleted"}});case 3:return e.abrupt("return",{comments:n.comments.map((function(e){var t=e.replies.map((function(e){return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"deleted"}):e}));return e.id===i.id?Object(o.a)(Object(o.a)({},e),{},{status:"deleted",replies:t}):Object(o.a)(Object(o.a)({},e),{},{replies:t})}))});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wn(){return(Wn=p(f().mark((function e(t){var n,r,i,a,s,u;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.state,r=t.api,i=t.data,a=i.comment,s=i.parent,e.next=3,r.comments.edit({comment:a});case 3:return u=e.sent,a=u.comments[0],e.abrupt("return",{comments:n.comments.map((function(e){return s&&s.id===e.id?Object(o.a)(Object(o.a)({},e),{},{replies:e.replies.map((function(e){return e.id===a.id?a:e}))}):e.id===a.id?a:e}))});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gn(){return(Gn=p(f().mark((function e(t){var n,r,o,i,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.data,o=t.state,i=t.api,a=r.name,(null===o||void 0===o||null===(n=o.member)||void 0===n?void 0:n.name)===a){e.next=16;break}return e.prev=4,e.next=7,i.member.update({name:a});case 7:if(s=e.sent){e.next=10;break}throw new Error("Failed to update member");case 10:return e.abrupt("return",{member:s,success:!0});case 13:return e.prev=13,e.t0=e.catch(4),e.abrupt("return",{success:!1,error:e.t0});case 16:return e.abrupt("return",null);case 17:case"end":return e.stop()}}),e,null,[[4,13]])})))).apply(this,arguments)}var Yn={addComment:function(e){return Ln.apply(this,arguments)},editComment:function(e){return Wn.apply(this,arguments)},hideComment:function(e){return zn.apply(this,arguments)},deleteComment:function(e){return qn.apply(this,arguments)},showComment:function(e){return Un.apply(this,arguments)},likeComment:function(e){return Vn.apply(this,arguments)},unlikeComment:function(e){return Hn.apply(this,arguments)},reportComment:function(e){return $n.apply(this,arguments)},addReply:function(e){return In.apply(this,arguments)},loadMoreComments:function(e){return Bn.apply(this,arguments)},updateMemberName:function(e){return Gn.apply(this,arguments)},openPopup:function(e){return{popup:e.data}},closePopup:function(){return{popup:null}}};function Kn(e){return Jn.apply(this,arguments)}function Jn(){return(Jn=p(f().mark((function e(t){var n,r,o,i,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.action,r=t.data,o=t.state,i=t.api,a=t.adminApi,!(s=Yn[n])){e.next=9;break}return e.next=5,s({data:r,state:o,api:i,adminApi:a});case 5:if(e.t0=e.sent,e.t0){e.next=8;break}e.t0={};case 8:return e.abrupt("return",e.t0);case 9:return e.abrupt("return",{});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Qn=function(e){var t=e.type,n=e.status,r=e.autoHide,o=e.duration,i=void 0===o?2600:o,a=e.closeable,s=e.state,u=e.message,c=e.meta,l=void 0===c?{}:c,f=0;return s&&s.popupNotification&&(f=(s.popupNotification.count||0)+1),{type:t,status:n,autoHide:r,closeable:a,duration:i,meta:l,message:u,count:f}};function Xn(e){var t=e.site;return t||null}function Zn(e){var t=new Date(e),n=new Date,r=Math.round((n.getTime()-t.getTime())/1e3);if(r<5)return"Just now";if(r<60)return"".concat(r," seconds ago");if((r/=60)<60)return 1===Math.floor(r)?"One minute ago":"".concat(Math.floor(r)," minutes ago");var o=new Date(n.getFullYear(),n.getMonth(),n.getDate()-1);return t.getFullYear()===o.getFullYear()&&t.getMonth()===o.getMonth()&&t.getDate()===o.getDate()?"Yesterday":(r/=60)<24?1===Math.floor(r)?"One hour ago":"".concat(Math.floor(r)," hours ago"):(r/=24)<7?1===Math.floor(r)?"One day ago":"".concat(Math.floor(r)," days ago"):(r/=7,1===Math.floor(r)?"One week ago":"".concat(Math.floor(r)," weeks ago"))}function er(e){if(!e)return"";var t=e.split(" ");return 0===t.length?"":1===t.length?t[0].substring(0,1).toLocaleUpperCase():t[0].substring(0,1).toLocaleUpperCase()+t[t.length-1].substring(0,1).toLocaleUpperCase()}function tr(){return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<480}var nr={dev:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.customSiteUrl;return!1},test:function(){return!1}},rr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.some((function(e){var n=nr[e];return!(!n||!n(t))}))};var or=function(e){var t=e.siteUrl,n=void 0===t?window.location.origin:t,r=e.apiUrl,i=e.apiKey;function a(e){var t=e.type,r=e.resource,o=e.params,i=void 0===o?"":o;if("members"===t)return"".concat(n.replace(/\/$/,""),"/").concat("members/api","/").concat(r,"/").concat(i)}function s(e){var t=e.url,n=e.method,r=void 0===n?"GET":n,o=e.headers,i=void 0===o?{}:o,a=e.credentials,s=void 0===a?void 0:a,u=e.body;return fetch(t,{method:r,headers:i,credentials:s,body:void 0===u?void 0:u})}var u={};u.site={settings:function(){return s({url:function(e){var t=e.resource,n=e.params,o=void 0===n?"":n;return r&&i?"".concat(r.replace(/\/$/,""),"/").concat(t,"/?key=").concat(i,"&limit=all").concat(o):""}({resource:"settings"}),method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch site data")}))}},u.member={identity:function(){return s({url:a({type:"members",resource:"session"}),credentials:"same-origin"}).then((function(e){return e.ok&&204!==e.status?e.text():null}))},sessionData:function(){return s({url:a({type:"members",resource:"member"}),credentials:"same-origin"}).then((function(e){return e.ok&&204!==e.status?e.json():null}))},update:function(e){var t={name:e.name};return s({url:a({type:"members",resource:"member"}),method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(t)}).then((function(e){return e.ok?e.json():null}))}};var c=null;return u.comments={browse:function(e){var t,n=e.page,r=e.postId;c=null!==(t=c)&&void 0!==t?t:(new Date).toISOString();var o=encodeURIComponent("post_id:".concat(r,"+created_at:<=").concat(c)),i=encodeURIComponent("created_at DESC");return s({url:a({type:"members",resource:"comments",params:"?limit=5&order=".concat(i,"&filter=").concat(o,"&page=").concat(n)}),method:"GET",headers:{"Content-Type":"application/json"},credentials:"same-origin"}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to fetch comments")}))},add:function(e){var t={comments:[e.comment]};return s({url:a({type:"members",resource:"comments"}),method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to add comment")}))},edit:function(e){var t=e.comment,n={comments:[t]};return s({url:a({type:"members",resource:"comments/".concat(t.id)}),method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return e.json();throw new Error("Failed to edit comment")}))},like:function(e){var t=e.comment;return s({url:a({type:"members",resource:"comments/".concat(t.id,"/like")}),method:"POST",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to like comment")}))},unlike:function(e){var t=e.comment,n={comments:[t]};return s({url:a({type:"members",resource:"comments/".concat(t.id,"/like")}),method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to unlike comment")}))},report:function(e){var t=e.comment;return s({url:a({type:"members",resource:"comments/".concat(t.id,"/report")}),method:"POST",headers:{"Content-Type":"application/json"}}).then((function(e){if(e.ok)return"Success";throw new Error("Failed to report comment")}))}},u.init=p(f().mark((function e(){var t,n,r,i,a;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([u.member.sessionData()]);case 2:t=e.sent,n=Object(E.a)(t,1),r=n[0],i={},a={};try{i=Object(o.a)({},a)}catch(sr){}return i=Xn({site:i}),e.abrupt("return",{site:i,member:r});case 10:case"end":return e.stop()}}),e)}))),u},ir=function(e){var t=Object(a.useContext)(D).accentColor,n={background:t},r={color:t},o=e.isFirst?"Want to be the first to comment?":"Want to join the discussion?";return Object(S.jsxs)("section",{className:"text-center mb-1 bg-neutral-900 rounded-lg pt-12 pb-10 px-8",style:n,children:[Object(S.jsx)("h1",{className:"text-center text-white text-[28px] font-sans font-semibold mb-6 tracking-tight",children:o}),Object(S.jsx)("button",{onClick:function(e){window.location.href="#/portal/signup"},className:"bg-white font-sans py-3 px-4 mb-6 rounded inline-block font-medium",style:r,children:"Subscribe now"}),Object(S.jsxs)("p",{className:"font-sans text-center text-white",children:[Object(S.jsx)("span",{className:"inline-block mr-1",children:"Already have an account?"}),Object(S.jsx)("button",{onClick:function(e){window.location.href="#/portal/signin"},className:"text-white underline",children:"Sign in"})]})]})};function ar(e,t){if(e in t){for(var n=t[e],r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return"function"==typeof n?n.apply(void 0,o):n}var a=new Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map((function(e){return'"'.concat(e,'"')})).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(a,ar),a}var sr,ur,cr=["static"],lr=["unmount"],fr=["as","children","refName"],dr=((ur=dr||{})[ur.None=0]="None",ur[ur.RenderStrategy=1]="RenderStrategy",ur[ur.Static=2]="Static",ur),pr=((sr=pr||{})[sr.Unmount=0]="Unmount",sr[sr.Hidden=1]="Hidden",sr);function hr(e){var t=e.ourProps,n=e.theirProps,r=e.slot,a=e.defaultTag,s=e.features,u=e.visible,c=void 0===u||u,l=e.name,f=mr(n,t);if(c)return vr(f,r,a,l);var d=null!=s?s:0;if(2&d){var p=f.static,h=void 0!==p&&p,v=i(f,cr);if(h)return vr(v,r,a,l)}if(1&d){var m,y=f.unmount,g=void 0===y||y,b=i(f,lr);return ar(g?0:1,(m={},Object(Q.a)(m,0,(function(){return null})),Object(Q.a)(m,1,(function(){return vr(Object(o.a)(Object(o.a)({},b),{},{hidden:!0,style:{display:"none"}}),r,a,l)})),m))}return vr(f,r,a,l)}function vr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=br(e,["unmount","static"]),s=o.as,u=void 0===s?n:s,c=o.children,l=o.refName,f=void 0===l?"ref":l,d=i(o,fr),p=void 0!==e.ref?Object(Q.a)({},f,e.ref):{},h="function"==typeof c?c(t):c;d.className&&"function"==typeof d.className&&(d.className=d.className(t));var v={};if(u===a.Fragment&&Object.keys(gr(d)).length>0){if(!Object(a.isValidElement)(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <".concat(r,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(d).map((function(e){return" - ".concat(e)})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - ".concat(e)})).join("\n")].join("\n"));return Object(a.cloneElement)(h,Object.assign({},mr(h.props,gr(br(d,["ref"]))),v,p))}return Object(a.createElement)(u,Object.assign({},br(d,["ref"]),u!==a.Fragment&&p,u!==a.Fragment&&v),h)}function mr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];for(var r={},o={},i=0,a=t;i<a.length;i++){var s=a[i];for(var u in s)u.startsWith("on")&&"function"==typeof s[u]?(null!=o[u]||(o[u]=[]),o[u].push(s[u])):r[u]=s[u]}if(r.disabled||r["aria-disabled"])return Object.assign(r,Object.fromEntries(Object.keys(o).map((function(e){return[e,void 0]}))));var c=function(e){Object.assign(r,Object(Q.a)({},e,(function(t){for(var n=o[e],r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];var s,u=Object(ze.a)(n);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(t.defaultPrevented)return;c.apply(void 0,[t].concat(i))}}catch(l){u.e(l)}finally{u.f()}})))};for(var l in o)c(l);return r}function yr(e){var t;return Object.assign(Object(a.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function gr(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}function br(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=Object(ze.a)(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}var kr=Object(a.createContext)(null);kr.displayName="OpenClosedContext";var wr=function(e){return e[e.Open=0]="Open",e[e.Closed=1]="Closed",e}(wr||{});function xr(){return Object(a.useContext)(kr)}function Or(e){var t=e.value,n=e.children;return s.a.createElement(kr.Provider,{value:t},n)}function Er(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}var Dr,Sr="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,Cr={serverHandoffComplete:!1};function _r(){var e=Object(a.useState)(Cr.serverHandoffComplete),t=Object(E.a)(e,2),n=t[0],r=t[1];return Object(a.useEffect)((function(){!0!==n&&r(!0)}),[n]),Object(a.useEffect)((function(){!1===Cr.serverHandoffComplete&&(Cr.serverHandoffComplete=!0)}),[]),n}var jr=0;function Ar(){return++jr}var Tr=null!=(Dr=s.a.useId)?Dr:function(){var e=_r(),t=s.a.useState(e?Ar:null),n=Object(E.a)(t,2),r=n[0],o=n[1];return Sr((function(){null===r&&o(Ar())}),[r]),null!=r?""+r:void 0};function Nr(){var e=Object(a.useRef)(!1);return Sr((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function Mr(e){var t=Object(a.useRef)(e);return Sr((function(){t.current=e}),[e]),t}var Fr=function(e){var t=Mr(e);return s.a.useCallback((function(){return t.current.apply(t,arguments)}),[t])},Rr=Symbol();function Pr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Object(a.useRef)(t);Object(a.useEffect)((function(){r.current=t}),[t]);var o=Fr((function(e){var t,n=Object(ze.a)(r.current);try{for(n.s();!(t=n.n()).done;){var o=t.value;null!=o&&("function"==typeof o?o(e):o.current=e)}}catch(i){n.e(i)}finally{n.f()}}));return t.every((function(e){return null==e||(null==e?void 0:e[Rr])}))?void 0:o}function Br(){var e=[],t=[],n={enqueue:function(e){t.push(e)},addEventListener:function(e,t,r,o){return e.addEventListener(t,r,o),n.add((function(){return e.removeEventListener(t,r,o)}))},requestAnimationFrame:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=requestAnimationFrame.apply(void 0,arguments);return n.add((function(){return cancelAnimationFrame(e)}))})),nextFrame:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.requestAnimationFrame((function(){return n.requestAnimationFrame.apply(n,t)}))},setTimeout:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){var e=setTimeout.apply(void 0,arguments);return n.add((function(){return clearTimeout(e)}))})),add:function(t){return e.push(t),function(){var n=e.indexOf(t);if(n>=0){var r=e.splice(n,1);(0,Object(E.a)(r,1)[0])()}}},dispose:function(){var t,n=Object(ze.a)(e.splice(0));try{for(n.s();!(t=n.n()).done;){(0,t.value)()}}catch(r){n.e(r)}finally{n.f()}},workQueue:function(){return p(f().mark((function e(){var n,r,o;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Object(ze.a)(t.splice(0)),e.prev=1,n.s();case 3:if((r=n.n()).done){e.next=9;break}return o=r.value,e.next=7,o();case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),n.e(e.t0);case 14:return e.prev=14,n.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})))()}};return n}function Lr(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).add.apply(t,r)}function Ir(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e&&r.length>0&&(t=e.classList).remove.apply(t,r)}var zr=function(e){return e.Ended="ended",e.Cancelled="cancelled",e}(zr||{});function Ur(e,t,n,r){var o=n?"enter":"leave",i=Br(),a=void 0!==r?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(r):function(){},s=ar(o,{enter:function(){return t.enter},leave:function(){return t.leave}}),u=ar(o,{enter:function(){return t.enterTo},leave:function(){return t.leaveTo}}),c=ar(o,{enter:function(){return t.enterFrom},leave:function(){return t.leaveFrom}});return Ir.apply(void 0,[e].concat(Object(J.a)(t.enter),Object(J.a)(t.enterTo),Object(J.a)(t.enterFrom),Object(J.a)(t.leave),Object(J.a)(t.leaveFrom),Object(J.a)(t.leaveTo),Object(J.a)(t.entered))),Lr.apply(void 0,[e].concat(Object(J.a)(s),Object(J.a)(c))),i.nextFrame((function(){Ir.apply(void 0,[e].concat(Object(J.a)(c))),Lr.apply(void 0,[e].concat(Object(J.a)(u))),function(e,t){var n=Br();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e})),n=Object(E.a)(t,1)[0];return void 0===n?0:n})),i=Object(E.a)(o,2);if(i[0]+i[1]!==0){var a=[];a.push(n.addEventListener(e,"transitionrun",(function(r){r.target===r.currentTarget&&(a.splice(0).forEach((function(e){return e()})),a.push(n.addEventListener(e,"transitionend",(function(e){e.target===e.currentTarget&&(t("ended"),a.splice(0).forEach((function(e){return e()})))})),n.addEventListener(e,"transitioncancel",(function(e){e.target===e.currentTarget&&(t("cancelled"),a.splice(0).forEach((function(e){return e()})))}))))})))}else t("ended");n.add((function(){return t("cancelled")})),n.dispose}(e,(function(n){return"ended"===n&&(Ir.apply(void 0,[e].concat(Object(J.a)(s))),Lr.apply(void 0,[e].concat(Object(J.a)(t.entered)))),a(n)}))})),i.dispose}function Vr(e){var t=e.container,n=e.direction,r=e.classes,o=e.events,i=e.onStart,s=e.onStop,u=Nr(),c=function(){var e=Object(a.useState)(Br),t=Object(E.a)(e,1)[0];return Object(a.useEffect)((function(){return function(){return t.dispose()}}),[t]),t}(),l=Mr(n),f=Fr((function(){return ar(l.current,{enter:function(){return o.current.beforeEnter()},leave:function(){return o.current.beforeLeave()},idle:function(){}})})),d=Fr((function(){return ar(l.current,{enter:function(){return o.current.afterEnter()},leave:function(){return o.current.afterLeave()},idle:function(){}})}));Sr((function(){var e=Br();c.add(e.dispose);var n=t.current;if(n&&"idle"!==l.current&&u.current)return e.dispose(),f(),i.current(l.current),e.add(Ur(n,r.current,"enter"===l.current,(function(t){var n;e.dispose(),ar(t,(n={},Object(Q.a)(n,zr.Ended,(function(){d(),s.current(l.current)})),Object(Q.a)(n,zr.Cancelled,(function(){})),n))}))),e.dispose}),[n])}var $r=["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"],Hr=["show","appear","unmount"];function qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(" ").filter((function(e){return e.trim().length>1}))}var Wr=Object(a.createContext)(null);Wr.displayName="TransitionContext";var Gr,Yr=((Gr=Yr||{}).Visible="visible",Gr.Hidden="hidden",Gr);var Kr=Object(a.createContext)(null);function Jr(e){return"children"in e?Jr(e.children):e.current.filter((function(e){return"visible"===e.state})).length>0}function Qr(e){var t=Mr(e),n=Object(a.useRef)([]),r=Nr(),o=Fr((function(e){var o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pr.Hidden,a=n.current.findIndex((function(t){return t.id===e}));-1!==a&&(ar(i,(o={},Object(Q.a)(o,pr.Unmount,(function(){n.current.splice(a,1)})),Object(Q.a)(o,pr.Hidden,(function(){n.current[a].state="hidden"})),o)),Er((function(){var e;!Jr(n)&&r.current&&(null==(e=t.current)||e.call(t))})))})),i=Fr((function(e){var t=n.current.find((function(t){return t.id===e}));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({id:e,state:"visible"}),function(){return o(e,pr.Unmount)}}));return Object(a.useMemo)((function(){return{children:n,register:i,unregister:o}}),[i,o,n])}function Xr(){}Kr.displayName="NestingContext";var Zr=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function eo(e){var t,n,r={},o=Object(ze.a)(Zr);try{for(o.s();!(n=o.n()).done;){var i=n.value;r[i]=null!=(t=e[i])?t:Xr}}catch(a){o.e(a)}finally{o.f()}return r}var to,no=dr.RenderStrategy,ro=yr((function(e,t){var n,r=e.beforeEnter,o=e.afterEnter,u=e.beforeLeave,c=e.afterLeave,l=e.enter,f=e.enterFrom,d=e.enterTo,p=e.entered,h=e.leave,v=e.leaveFrom,m=e.leaveTo,y=i(e,$r),g=Object(a.useRef)(null),b=Pr(g,t),k=Object(a.useState)("visible"),w=Object(E.a)(k,2),x=w[0],O=w[1],D=y.unmount?pr.Unmount:pr.Hidden,S=function(){var e=Object(a.useContext)(Wr);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),C=S.show,_=S.appear,j=S.initial,A=function(){var e=Object(a.useContext)(Kr);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),T=A.register,N=A.unregister,M=Object(a.useRef)(null),F=Tr();Object(a.useEffect)((function(){if(F)return T(F)}),[T,F]),Object(a.useEffect)((function(){if(D===pr.Hidden&&F){var e;if(C&&"visible"!==x)return void O("visible");ar(x,(e={},Object(Q.a)(e,"hidden",(function(){return N(F)})),Object(Q.a)(e,"visible",(function(){return T(F)})),e))}}),[x,F,T,N,C,D]);var R=Mr({enter:qr(l),enterFrom:qr(f),enterTo:qr(d),entered:qr(p),leave:qr(h),leaveFrom:qr(v),leaveTo:qr(m)}),P=function(e){var t=Object(a.useRef)(eo(e));return Object(a.useEffect)((function(){t.current=eo(e)}),[e]),t}({beforeEnter:r,afterEnter:o,beforeLeave:u,afterLeave:c}),B=_r();Object(a.useEffect)((function(){if(B&&"visible"===x&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,x,B]);var L=j&&!_,I=!B||L||M.current===C?"idle":C?"enter":"leave",z=Object(a.useRef)(!1),U=Qr((function(){z.current||(O("hidden"),N(F))}));Vr({container:g,classes:R,events:P,direction:I,onStart:Mr((function(){z.current=!0})),onStop:Mr((function(e){z.current=!1,"leave"===e&&!Jr(U)&&(O("hidden"),N(F))}))}),Object(a.useEffect)((function(){!L||(D===pr.Hidden?M.current=null:M.current=C)}),[C,L,x]);var V=y,$={ref:b};return s.a.createElement(Kr.Provider,{value:U},s.a.createElement(Or,{value:ar(x,(n={},Object(Q.a)(n,"visible",wr.Open),Object(Q.a)(n,"hidden",wr.Closed),n))},hr({ourProps:$,theirProps:V,defaultTag:"div",features:no,visible:"visible"===x,name:"Transition.Child"})))})),oo=yr((function(e,t){var n,r=e.show,u=e.appear,c=void 0!==u&&u,l=e.unmount,f=i(e,Hr),d=Object(a.useRef)(null),p=Pr(d,t);_r();var h=xr();if(void 0===r&&null!==h&&(r=ar(h,(n={},Object(Q.a)(n,wr.Open,!0),Object(Q.a)(n,wr.Closed,!1),n))),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");var v=Object(a.useState)(r?"visible":"hidden"),m=Object(E.a)(v,2),y=m[0],g=m[1],b=Qr((function(){g("hidden")})),k=Object(a.useState)(!0),w=Object(E.a)(k,2),x=w[0],O=w[1],D=Object(a.useRef)([r]);Sr((function(){!1!==x&&D.current[D.current.length-1]!==r&&(D.current.push(r),O(!1))}),[D,r]);var S=Object(a.useMemo)((function(){return{show:r,appear:c,initial:x}}),[r,c,x]);Object(a.useEffect)((function(){if(r)g("visible");else if(Jr(b)){var e=d.current;if(!e)return;var t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&g("hidden")}else g("hidden")}),[r,b]);var C={unmount:l};return s.a.createElement(Kr.Provider,{value:b},s.a.createElement(Wr.Provider,{value:S},hr({ourProps:Object(o.a)(Object(o.a)({},C),{},{as:a.Fragment,children:s.a.createElement(ro,Object(o.a)(Object(o.a)({ref:p},C),f))}),theirProps:{},defaultTag:a.Fragment,features:no,visible:"visible"===y,name:"Transition"})))})),io=yr((function(e,t){var n=null!==Object(a.useContext)(Wr),r=null!==xr();return s.a.createElement(s.a.Fragment,null,!n&&r?s.a.createElement(oo,Object(o.a)({ref:t},e)):s.a.createElement(ro,Object(o.a)({ref:t},e)))})),ao=Object.assign(oo,{Child:io,Root:oo}),so=["title","titleId"];function uo(){return uo=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},uo.apply(this,arguments)}function co(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function lo(e,t){var n=e.title,r=e.titleId,o=co(e,so);return a.createElement("svg",uo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,to||(to=a.createElement("g",{clipPath:"url(#clip0_173_611)"},a.createElement("path",{d:"M5.58984 7.32143C5.58984 8.15157 5.75335 8.97358 6.07103 9.74053C6.38872 10.5075 6.85435 11.2044 7.44135 11.7914C8.02834 12.3783 8.72521 12.844 9.49216 13.1617C10.2591 13.4793 11.0811 13.6429 11.9113 13.6429C12.7414 13.6429 13.5634 13.4793 14.3304 13.1617C15.0973 12.844 15.7942 12.3783 16.3812 11.7914C16.9682 11.2044 17.4338 10.5075 17.7515 9.74053C18.0692 8.97358 18.2327 8.15157 18.2327 7.32143C18.2327 6.49128 18.0692 5.66927 17.7515 4.90232C17.4338 4.13537 16.9682 3.4385 16.3812 2.8515C15.7942 2.2645 15.0973 1.79887 14.3304 1.48119C13.5634 1.16351 12.7414 1 11.9113 1C11.0811 1 10.2591 1.16351 9.49216 1.48119C8.72521 1.79887 8.02834 2.2645 7.44135 2.8515C6.85435 3.4385 6.38872 4.13537 6.07103 4.90232C5.75335 5.66927 5.58984 6.49128 5.58984 7.32143V7.32143Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M1.5 26.2858C1.5 23.5244 2.59695 20.8761 4.54953 18.9236C6.50212 16.971 9.15039 15.874 11.9118 15.874C14.6731 15.874 17.3214 16.971 19.274 18.9236C21.2266 20.8761 22.3235 23.5244 22.3235 26.2858H1.5Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))))}var fo=a.forwardRef(lo),po=(n.p,function(e){var t,n=Object(a.useContext)(D).member,r=function(e,t,n){return Math.floor(e%(n-t)+t)},o="small"===e.size?"w-6 h-6 sm:w-8 sm:h-8":"w-9 h-9 sm:w-11 sm:h-11",i="small"===e.size?"text-sm":"text-lg",s=e.comment?e.comment.member:n,u=(t=function(){var t=e.comment?e.comment.member:n;if(!t||!t.name)return[0,0,10];var o=isNaN(e.saturation)?50:e.saturation,i=[0,360],a=Math.round(o/(100/30))+30,s=[a-20,a],u=function(e){for(var t=0,n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return Math.abs(t)}(t.name);return[r(u,i[0],i[1]),o,r(u,s[0],s[1])]}(),"hsl(".concat(t[0],", ").concat(t[1],"%, ").concat(t[2],"%)")),c={background:u};return e.isBlank?Object(S.jsx)("figure",{className:"relative ".concat(o),children:Object(S.jsx)("div",{className:"flex justify-center items-center rounded-full bg-neutral-300 dark:opacity-70 ".concat(o),children:Object(S.jsx)(fo,{className:"stroke-white dark:stroke-neutral-600"})})}):Object(S.jsxs)("figure",{className:"relative ".concat(o),children:[Object(S.jsx)("div",{className:"flex justify-center items-center rounded-full ".concat(o),style:c,children:Object(S.jsx)("p",{className:"text-white font-sans font-semibold ".concat(i),children:function(){if(e.comment&&!e.comment.member)return er("Deleted member");var t=e.comment?e.comment.member:n;return t&&t.name?er(t.name):er("Anonymous")}()})}),s&&Object(S.jsx)("img",{className:"absolute top-0 left-0 rounded-full ".concat(o),src:s.avatar_image,alt:"Avatar"})]})});function ho(e){this.content=e}ho.prototype={constructor:ho,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-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new ho(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new ho(n)},addToStart:function(e,t){return new ho([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ho(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new ho(o)},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=ho.from(e)).size?new ho(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=ho.from(e)).size?new ho(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ho.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},ho.from=function(e){if(e instanceof ho)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ho(t)};var vo=ho;function mo(e,t,n){for(var r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;var o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=mo(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function yo(e,t,n,r){for(var o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=e.child(--o),s=t.child(--i),u=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var c=0,l=Math.min(a.text.length,s.text.length);c<l&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){var f=yo(a.content,s.content,n-1,r-1);if(f)return f}n-=u,r-=u}else n-=u,r-=u}}var go=function(){function e(t,n){if(h(this,e),this.content=t,this.size=n||0,null==n)for(var r=0;r<t.length;r++)this.size+=t[r].nodeSize}return m(e,[{key:"nodesBetween",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=0,a=0;a<t;i++){var s=this.content[i],u=a+s.nodeSize;if(u>e&&!1!==n(s,r+a,o||null,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=u}}},{key:"descendants",value:function(e){this.nodesBetween(0,this.size,e)}},{key:"textBetween",value:function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf?(r?o+="function"===typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new e(o,this.size+t.size)}},{key:"cut",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==t&&n==this.size)return this;var r=[],o=0;if(n>t)for(var i=0,a=0;a<n;i++){var s=this.content[i],u=a+s.nodeSize;u>t&&((a<t||u>n)&&(s=s.isText?s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=u}return new e(r,o)}},{key:"cutByIndex",value:function(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}},{key:"replaceChild",value:function(t,n){var r=this.content[t];if(r==n)return this;var o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}},{key:"addToStart",value:function(t){return new e([t].concat(this.content),this.size+t.nodeSize)}},{key:"addToEnd",value:function(t){return new e(this.content.concat(t),this.size+t.nodeSize)}},{key:"eq",value:function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}},{key:"maybeChild",value:function(e){return this.content[e]||null}},{key:"forEach",value:function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}}},{key:"findDiffStart",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return mo(this,e,t)}},{key:"findDiffEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size;return yo(this,e,t,n)}},{key:"findIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==e)return ko(0,e);if(e==this.size)return ko(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position ".concat(e," outside of fragment (").concat(this,")"));for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e||t>0?ko(n+1,i):ko(n,r);r=i}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}},{key:"fromArray",value:function(t){if(!t.length)return e.empty;for(var n,r=0,o=0;o<t.length;o++){var i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}},{key:"from",value:function(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 new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),e}();go.empty=new go([],0);var bo={index:0,offset:0};function ko(e,t){return bo.index=e,bo.offset=t,bo}function wo(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!wo(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!wo(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}var xo=function(){function e(t,n){h(this,e),this.type=t,this.attrs=n}return m(e,[{key:"addToSet",value:function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){return this==e||this.type==e.type&&wo(this.attrs,e.attrs)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type ".concat(t.type," in this schema"));return n.create(t.attrs)}},{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];var n=t.slice();return n.sort((function(e,t){return e.type.rank-t.type.rank})),n}}]),e}();xo.none=[];var Oo=function(e){g(n,e);var t=O(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n)}(Se(Error)),Eo=function(){function e(t,n,r){h(this,e),this.content=t,this.openStart=n,this.openEnd=r}return m(e,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(t,n){var r=So(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(t,n){return new e(Do(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;var r=n.openStart||0,o=n.openEnd||0;if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new e(go.fromJSON(t,n.content),r,o)}},{key:"maxOpen",value:function(t){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(var a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}}]),e}();function Do(e,t,n){var r=e.findIndex(t),o=r.index,i=r.offset,a=e.maybeChild(o),s=e.findIndex(n),u=s.index,c=s.offset;if(i==t||a.isText){if(c!=n&&!e.child(u).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(o!=u)throw new RangeError("Removing non-flat range");return e.replaceChild(o,a.copy(Do(a.content,t-i-1,n-i-1)))}function So(e,t,n,r){var o=e.findIndex(t),i=o.index,a=o.offset,s=e.maybeChild(i);if(a==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));var u=So(s.content,t-a-1,n);return u&&e.replaceChild(i,s.copy(u))}function Co(e,t,n){if(n.openStart>e.depth)throw new Oo("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Oo("Inconsistent open depths");return _o(e,t,n,0)}function _o(e,t,n,r){var o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){var a=_o(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){var s=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(go.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return Mo(i,Fo(e,s.start,s.end,t,r))}var u=e.parent,c=u.content;return Mo(u,c.cut(0,e.parentOffset).append(n.content).append(c.cut(t.parentOffset)))}return Mo(i,Ro(e,t,r))}function jo(e,t){if(!t.type.compatibleContent(e.type))throw new Oo("Cannot join "+t.type.name+" onto "+e.type.name)}function Ao(e,t,n){var r=e.node(n);return jo(r,t.node(n)),r}function To(e,t){var 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 No(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(To(e.nodeAfter,r),i++));for(var s=i;s<a;s++)To(o.child(s),r);t&&t.depth==n&&t.textOffset&&To(t.nodeBefore,r)}function Mo(e,t){if(!e.type.validContent(t))throw new Oo("Invalid content for node "+e.type.name);return e.copy(t)}function Fo(e,t,n,r,o){var i=e.depth>o&&Ao(e,t,o+1),a=r.depth>o&&Ao(n,r,o+1),s=[];return No(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(jo(i,a),To(Mo(i,Fo(e,t,n,r,o+1)),s)):(i&&To(Mo(i,Ro(e,t,o+1)),s),No(t,n,o,s),a&&To(Mo(a,Ro(n,r,o+1)),s)),No(r,null,o,s),new go(s)}function Ro(e,t,n){var r=[];(No(null,e,n,r),e.depth>n)&&To(Mo(Ao(e,t,n+1),Ro(e,t,n+1)),r);return No(t,null,n,r),new go(r)}Eo.empty=new Eo(go.empty,0,0);var Po=function(){function e(t,n,r){h(this,e),this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}return m(e,[{key:"resolveDepth",value:function(e){return null==e?this.depth:e<0?this.depth+e:e}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(e){return this.path[3*this.resolveDepth(e)]}},{key:"index",value:function(e){return this.path[3*this.resolveDepth(e)+1]}},{key:"indexAfter",value:function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}},{key:"start",value:function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}},{key:"end",value:function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}},{key:"before",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}},{key:"after",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}},{key:"nodeBefore",get:function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}},{key:"posAtIndex",value:function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r}},{key:"marks",value:function(){var e=this.parent,t=this.index();if(0==e.content.size)return xo.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}},{key:"marksAcross",value:function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}},{key:"sharedDepth",value:function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}},{key:"blockRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,t=arguments.length>1?arguments[1]:void 0;if(e.pos<this.pos)return e.blockRange(this);for(var 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 zo(this,e,n);return null}},{key:"sameParent",value:function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}},{key:"max",value:function(e){return e.pos>this.pos?e:this}},{key:"min",value:function(e){return e.pos<this.pos?e:this}},{key:"toString",value:function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}}],[{key:"resolve",value:function(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],o=0,i=n,a=t;;){var s=a.content.findIndex(i),u=s.index,c=s.offset,l=i-c;if(r.push(a,u,o+c),!l)break;if((a=a.child(u)).isText)break;i=l-1,o+=c+1}return new e(n,r,i)}},{key:"resolveCached",value:function(t,n){for(var r=0;r<Bo.length;r++){var o=Bo[r];if(o.pos==n&&o.doc==t)return o}var i=Bo[Lo]=e.resolve(t,n);return Lo=(Lo+1)%Io,i}}]),e}(),Bo=[],Lo=0,Io=12,zo=function(){function e(t,n,r){h(this,e),this.$from=t,this.$to=n,this.depth=r}return m(e,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),e}(),Uo=Object.create(null),Vo=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:xo.none;h(this,e),this.type=t,this.attrs=n,this.marks=o,this.content=r||go.empty}return m(e,[{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(e){return this.content.child(e)}},{key:"maybeChild",value:function(e){return this.content.maybeChild(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"nodesBetween",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(e,t,n,r,this)}},{key:"descendants",value:function(e){this.nodesBetween(0,this.content.size,e)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(e,t,n,r){return this.content.textBetween(e,t,n,r)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(e,t,n){return this.type==e&&wo(this.attrs,t||e.defaultAttrs||Uo)&&xo.sameSet(this.marks,n||xo.none)}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}},{key:"mark",value:function(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}},{key:"cut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e==t)return Eo.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i),u=s.content.cut(r.pos-a,o.pos-a);return new Eo(u,r.depth-i,o.depth-i)}},{key:"replace",value:function(e,t,n){return Co(this.resolve(e),this.resolve(t),n)}},{key:"nodeAt",value:function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}}},{key:"childAfter",value:function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}},{key:"resolve",value:function(e){return Po.resolveCached(this,e)}},{key:"resolveNoCache",value:function(e){return Po.resolve(this,e)}},{key:"rangeHasMark",value:function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Ho(this.marks,e)}},{key:"contentMatchAt",value:function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}},{key:"canReplace",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:go.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,i=this.contentMatchAt(e).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var s=r;s<o;s++)if(!this.type.allowsMarks(n.child(s).marks))return!1;return!0}},{key:"canReplaceWith",value:function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}},{key:"canAppend",value:function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}},{key:"check",value:function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node ".concat(this.type.name,": ").concat(this.content.toString().slice(0,50)));for(var e=xo.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!xo.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map((function(e){return e.type.name}))));this.content.forEach((function(e){return e.check()}))}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var 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((function(e){return e.toJSON()}))),e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=go.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}]),e}();Vo.prototype.text=void 0;var $o=function(e){g(n,e);var t=O(n);function n(e,r,o,i){var a;if(h(this,n),a=t.call(this,e,r,null,i),!o)throw new RangeError("Empty text nodes are not allowed");return a.text=o,a}return m(n,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Ho(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(e,t){return this.text.slice(e,t)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}},{key:"withText",value:function(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}},{key:"cut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}},{key:"eq",value:function(e){return this.sameMarkup(e)&&this.text==e.text}},{key:"toJSON",value:function(){var e=rt(b(n.prototype),"toJSON",this).call(this);return e.text=this.text,e}}]),n}(Vo);function Ho(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var qo=function(){function e(t){h(this,e),this.validEnd=t,this.next=[],this.wrapCache=[]}return m(e,[{key:"matchType",value:function(e){for(var t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}},{key:"matchFragment",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.childCount,r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}},{key:"inlineContent",get:function(){return this.next.length&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var e=0;e<this.next.length;e++){var t=this.next[e].type;if(!t.isText&&!t.hasRequiredAttrs())return t}return null}},{key:"compatible",value:function(e){for(var t=0;t<this.next.length;t++)for(var n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}},{key:"fillBefore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];function o(i,a){var s=i.matchFragment(e,n);if(s&&(!t||s.validEnd))return go.from(a.map((function(e){return e.createAndFill()})));for(var u=0;u<i.next.length;u++){var c=i.next[u],l=c.type,f=c.next;if(!l.isText&&!l.hasRequiredAttrs()&&-1==r.indexOf(f)){r.push(f);var d=o(f,a.concat(l));if(d)return d}}return null}return o(this,[])}},{key:"findWrapping",value:function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}},{key:"computeWrapping",value:function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s++){var u=o.next[s],c=u.type,l=u.next;c.isLeaf||c.hasRequiredAttrs()||c.name in t||r.type&&!l.validEnd||(n.push({match:c.contentMatch,type:c,via:r}),t[c.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(e){if(e>=this.next.length)throw new RangeError("There's no ".concat(e,"th edge in this content match"));return this.next[e]}},{key:"toString",value:function(){var e=[];return function t(n){e.push(n);for(var r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}],[{key:"parse",value:function(t,n){var r=new Wo(t,n);if(null==r.next)return e.empty;var o=Go(r);r.next&&r.err("Unexpected trailing text");var i=function(e){var t=Object.create(null);return n(Zo(e,0));function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){for(var i,a=0;a<o.length;a++)o[a][0]==n&&(i=o[a][1]);Zo(e,r).forEach((function(e){i||o.push([n,i=[]]),-1==i.indexOf(e)&&i.push(e)}))}}))}));for(var i=t[r.join(",")]=new qo(r.indexOf(e.length-1)>-1),a=0;a<o.length;a++){var s=o[a][1].sort(Xo);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}(function(e){var t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}function i(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(i(n,t))}),[]);if("seq"!=e.type){if("star"==e.type){var a=n();return r(t,a),o(i(e.expr,a),a),[r(a)]}if("plus"==e.type){var s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){for(var u=t,c=0;c<e.min;c++){var l=n();o(i(e.expr,u),l),u=l}if(-1==e.max)o(i(e.expr,u),u);else for(var f=e.min;f<e.max;f++){var d=n();r(u,d),o(i(e.expr,u),d),u=d}return[r(u)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(var p=0;;p++){var h=i(e.exprs[p],t);if(p==e.exprs.length-1)return h;o(h,t=n())}}}(o));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s++){var u=o.next[s],c=u.type,l=u.next;a.push(c.name),!i||c.isText||c.hasRequiredAttrs()||(i=!1),-1==r.indexOf(l)&&r.push(l)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,r),i}}]),e}();qo.empty=new qo(!0);var Wo=function(){function e(t,n){h(this,e),this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}return m(e,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(e){return this.next==e&&(this.pos++||!0)}},{key:"err",value:function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}]),e}();function Go(e){var t=[];do{t.push(Yo(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function Yo(e){var t=[];do{t.push(Ko(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function Ko(e){for(var t=function(e){if(e.eat("(")){var t=Go(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)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("{"))break;t=Qo(e,t)}return t}function Jo(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function Qo(e,t){var n=Jo(e),r=n;return e.eat(",")&&(r="}"!=e.next?Jo(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Xo(e,t){return t-e}function Zo(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,u=a.to;s||-1!=n.indexOf(u)||t(u)}}(t),n.sort(Xo)}function ei(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function ti(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function ni(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new oi(e[n]);return t}var ri=function(){function e(t,n,r){h(this,e),this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ni(r.attrs),this.defaultAttrs=ei(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}return m(e,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==qo.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(e){return this==e||this.contentMatch.compatible(e.contentMatch)}},{key:"computeAttrs",value:function(e){return!e&&this.defaultAttrs?this.defaultAttrs:ti(this.attrs,e)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Vo(this,this.computeAttrs(e),go.from(t),xo.setFrom(n))}},{key:"createChecked",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(t=go.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new Vo(this,this.computeAttrs(e),t,xo.setFrom(n))}},{key:"createAndFill",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(e=this.computeAttrs(e),(t=go.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(go.empty,!0);return i?new Vo(this,e,t.append(i),xo.setFrom(n)):null}},{key:"validContent",value:function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}},{key:"allowsMarkType",value:function(e){return null==this.markSet||this.markSet.indexOf(e)>-1}},{key:"allowsMarks",value:function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}},{key:"allowedMarks",value:function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:xo.none:e}}],[{key:"compile",value:function(t,n){var r=Object.create(null);t.forEach((function(t,o){return r[t]=new e(t,n,o)}));var o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}]),e}(),oi=function(){function e(t){h(this,e),this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}return m(e,[{key:"isRequired",get:function(){return!this.hasDefault}}]),e}(),ii=function(){function e(t,n,r,o){h(this,e),this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=ni(o.attrs),this.excluded=null;var i=ei(this.attrs);this.instance=i?new xo(this,i):null}return m(e,[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!e&&this.instance?this.instance:new xo(this,ti(this.attrs,e))}},{key:"removeFromSet",value:function(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}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}},{key:"excludes",value:function(e){return this.excluded.indexOf(e)>-1}}],[{key:"compile",value:function(t,n){var r=Object.create(null),o=0;return t.forEach((function(t,i){return r[t]=new e(t,o++,n,i)})),r}}]),e}(),ai=function(){function e(t){h(this,e),this.cached=Object.create(null),this.spec={nodes:vo.from(t.nodes),marks:vo.from(t.marks||{}),topNode:t.topNode},this.nodes=ri.compile(this.spec.nodes,this),this.marks=ii.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=qo.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?si(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var u=this.marks[s],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:si(this,c.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)}return m(e,[{key:"node",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof ri))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}},{key:"text",value:function(e,t){var n=this.nodes.text;return new $o(n,n.defaultAttrs,e,xo.setFrom(t))}},{key:"mark",value:function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}},{key:"nodeFromJSON",value:function(e){return Vo.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){return xo.fromJSON(this,e)}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}]),e}();function si(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var u=e.marks[s];("_"==o||u.spec.group&&u.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=u)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}var ui=function(){function e(t,n){var r=this;h(this,e),this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach((function(e){e.tag?r.tags.push(e):e.style&&r.styles.push(e)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}return m(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new hi(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}},{key:"parseSlice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new hi(this,t,!0);return n.addAll(e,t.from,t.to),Eo.maxOpen(n.finish())}},{key:"matchTag",value:function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(vi(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i||void 0}return o}}}},{key:"matchStyle",value:function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o],a=i.style;if(!(0!=a.indexOf(e)||i.context&&!n.matchesContext(i.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(i.getAttrs){var s=i.getAttrs(t);if(!1===s)continue;i.attrs=s||void 0}return i}}}}],[{key:"schemaRules",value:function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=mi(e)),e.mark=t}))};for(var o in e.marks)r(o);var i=function(t){var r=e.nodes[t].spec.parseDOM;r&&r.forEach((function(e){n(e=mi(e)),e.node=t}))};for(var a in e.nodes)i(a);return t}},{key:"fromSchema",value:function(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}}]),e}(),ci={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},li={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},fi={ol:!0,ul:!0};function di(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var pi=function(){function e(t,n,r,o,i,a,s){h(this,e),this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=s,this.content=[],this.activeMarks=xo.none,this.stashMarks=[],this.match=a||(4&s?null:t.contentMatch)}return m(e,[{key:"findWrapping",value:function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(go.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}},{key:"finish",value:function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];if(n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))){var r=n;n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-t[0].length))}}var o=go.from(this.content);return!e&&this.match&&(o=o.append(this.match.fillBefore(go.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}},{key:"popFromStashMark",value:function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}},{key:"applyPending",value:function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):yi(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}},{key:"inlineContext",value:function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ci.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}]),e}(),hi=function(){function e(t,n,r){h(this,e),this.parser=t,this.options=n,this.isOpen=r,this.open=0;var o,i=n.topNode,a=di(null,n.preserveWhitespace,0)|(r?4:0);o=i?new pi(i.type,i.attrs,xo.none,xo.none,!0,n.topMatch||i.type.contentMatch,a):new pi(r?null:t.schema.topNodeType,null,xo.none,xo.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}return m(e,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}}},{key:"addTextNode",value:function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}},{key:"addElement",value:function(e,t){var n,r=e.nodeName.toLowerCase();fi.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&fi.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:li.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(ci.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}},{key:"leafFallback",value:function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}},{key:"ignoreFallback",value:function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}},{key:"readStyles",value:function(e){var t=xo.none;e:for(var n=0;n<e.length;n+=2)for(var r=void 0;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}},{key:"addElementByRule",value:function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var u=e;"string"==typeof t.contentElement?u=e.querySelector(t.contentElement):"function"==typeof t.contentElement?u=t.contentElement(e):t.contentElement&&(u=t.contentElement),this.findAround(e,u,!0),this.addAll(u)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}},{key:"addAll",value:function(e,t,n){for(var r=t||0,o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}},{key:"findPlace",value:function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0}},{key:"insertNode",value:function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}},{key:"enter",value:function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}},{key:"enterInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);var i=di(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new pi(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}},{key:"closeExtra",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],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}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}},{key:"sync",value:function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}},{key:"findAtPoint",value:function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}},{key:"findInside",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}},{key:"findAround",value:function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}},{key:"findInText",value:function(e){if(this.find)for(var 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))}},{key:"matchesContext",value:function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var u=n[a];if(""==u){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=u&&-1==c.groups.indexOf(u))return!1;s--}return!0}(n.length-1,this.open)}},{key:"textblockFromContext",value:function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}}},{key:"addPendingMark",value:function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}},{key:"removePendingMark",value:function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}}}]),e}();function vi(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function mi(e){var t={};for(var n in e)t[n]=e[n];return t}function yi(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(!o.allowsMarkType(e))return"continue";var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),a=o.type,s=o.next;if(a==t)return!0;if(i.indexOf(s)<0&&e(s))return!0}}(o.contentMatch)?{v:!0}:void 0};for(var o in n){var i=r(o);if("continue"!==i&&"object"===typeof i)return i.v}}var gi=function(){function e(t,n){h(this,e),this.nodes=t,this.marks=n}return m(e,[{key:"serializeFragment",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;r||(r=ki(n).createDocumentFragment());var o=r,i=[];return e.forEach((function(e){if(i.length||e.marks.length){for(var r=0,a=0;r<i.length&&a<e.marks.length;){var s=e.marks[a];if(t.marks[s.type.name]){if(!s.eq(i[r][0])||!1===s.type.spec.spanning)break;r++,a++}else a++}for(;r<i.length;)o=i.pop()[1];for(;a<e.marks.length;){var u=e.marks[a++],c=t.serializeMark(u,e.isInline,n);c&&(i.push([u,o]),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(t.serializeNodeInner(e,n))})),r}},{key:"serializeNodeInner",value:function(t,n){var r=e.renderSpec(ki(n),this.nodes[t.type.name](t)),o=r.dom,i=r.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return o}},{key:"serializeNode",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}},{key:"serializeMark",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.marks[t.type.name];return o&&e.renderSpec(ki(r),o(t,n))}}],[{key:"renderSpec",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"==typeof n)return{dom:t.createTextNode(n)};if(null!=n.nodeType)return{dom:n};if(n.dom&&null!=n.dom.nodeType)return n;var o,i=n[0],a=i.indexOf(" ");a>0&&(r=i.slice(0,a),i=i.slice(a+1));var s=r?t.createElementNS(r,i):t.createElement(i),u=n[1],c=1;if(u&&"object"==typeof u&&null==u.nodeType&&!Array.isArray(u))for(var l in c=2,u)if(null!=u[l]){var f=l.indexOf(" ");f>0?s.setAttributeNS(l.slice(0,f),l.slice(f+1),u[l]):s.setAttribute(l,u[l])}for(var d=c;d<n.length;d++){var p=n[d];if(0===p){if(d<n.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=e.renderSpec(t,p,r),v=h.dom,m=h.contentDOM;if(s.appendChild(v),m){if(o)throw new RangeError("Multiple content holes");o=m}}return{dom:s,contentDOM:o}}},{key:"fromSchema",value:function(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}},{key:"nodesFromSchema",value:function(e){var t=bi(e.nodes);return t.text||(t.text=function(e){return e.text}),t}},{key:"marksFromSchema",value:function(e){return bi(e.marks)}}]),e}();function bi(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ki(e){return e.document||window.document}var wi=Math.pow(2,16);function xi(e){return 65535&e}var Oi=function(){function e(t,n,r){h(this,e),this.pos=t,this.delInfo=n,this.recover=r}return m(e,[{key:"deleted",get:function(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function(){return(4&this.delInfo)>0}}]),e}(),Ei=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(h(this,e),this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}return m(e,[{key:"recover",value:function(e){var t=0,n=xi(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/wi}(e)}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var u=this.ranges[a+o],c=this.ranges[a+i],l=s+u;if(e<=l){var f=s+r+((u?e==s?-1:e==l?1:t:t)<0?0:c);if(n)return f;var d=e==(t<0?s:l)?null:a/3+(e-s)*wi,p=e==s?2:e==l?1:4;return(t<0?e!=s:e!=l)&&(p|=8),new Oi(f,p,d)}r+=c-u}return n?e+r:new Oi(e+r,0,null)}},{key:"touches",value:function(e,t){for(var n=0,r=xi(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var u=this.ranges[a+o];if(e<=s+u&&a==3*r)return!0;n+=this.ranges[a+i]-u}return!1}},{key:"forEach",value:function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),u=this.ranges[r+t],c=this.ranges[r+n];e(a,a+u,s,s+c),o+=c-u}}},{key:"invert",value:function(){return new e(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}}]),e}();Ei.empty=new Ei([]);var Di=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;h(this,e),this.maps=t,this.mirror=n,this.from=r,this.to=o}return m(e,[{key:"slice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new e(this.maps,this.mirror,t,n)}},{key:"copy",value:function(){return new e(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}},{key:"appendMapping",value:function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}},{key:"getMirror",value:function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}},{key:"setMirror",value:function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}},{key:"appendMappingInverted",value:function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}},{key:"invert",value:function(){var t=new e;return t.appendMappingInverted(this),t}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,e=this.maps[a].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new Oi(e,r,null)}}]),e}(),Si=Object.create(null),Ci=function(){function e(){h(this,e)}return m(e,[{key:"getMap",value:function(){return Ei.empty}},{key:"merge",value:function(e){return null}}],[{key:"fromJSON",value:function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=Si[t.stepType];if(!n)throw new RangeError("No step type ".concat(t.stepType," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in Si)throw new RangeError("Duplicate use of step JSON ID "+e);return Si[e]=t,t.prototype.jsonID=e,t}}]),e}(),_i=function(){function e(t,n){h(this,e),this.doc=t,this.failed=n}return m(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,n,r,o){try{return e.ok(t.replace(n,r,o))}catch(sr){if(sr instanceof Oo)return e.fail(sr.message);throw sr}}}]),e}();function ji(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var i=e.child(o);i.content.size&&(i=i.copy(ji(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return go.fromArray(r)}var Ai=function(e){g(n,e);var t=O(n);function n(e,r,o){var i;return h(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return m(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Eo(ji(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return _i.fromReplace(e,this.from,this.to,i)}},{key:"invert",value:function(){return new Ti(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(Ci);Ci.jsonID("addMark",Ai);var Ti=function(e){g(n,e);var t=O(n);function n(e,r,o){var i;return h(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return m(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=new Eo(ji(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))}),e),n.openStart,n.openEnd);return _i.fromReplace(e,this.from,this.to,r)}},{key:"invert",value:function(){return new Ai(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(Ci);Ci.jsonID("removeMark",Ti);var Ni=function(e){g(n,e);var t=O(n);function n(e,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return h(this,n),(i=t.call(this)).from=e,i.to=r,i.slice=o,i.structure=a,i}return m(n,[{key:"apply",value:function(e){return this.structure&&Fi(e,this.from,this.to)?_i.fail("Structure replace would overwrite content"):_i.fromReplace(e,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new Ei([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new n(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new n(t.pos,Math.max(t.pos,r.pos),this.slice)}},{key:"merge",value:function(e){if(!(e instanceof n)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var t=this.slice.size+e.slice.size==0?Eo.empty:new Eo(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new n(e.from,this.to,t,this.structure)}var r=this.slice.size+e.slice.size==0?Eo.empty:new Eo(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new n(this.from,this.to+(e.to-e.from),r,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new n(t.from,t.to,Eo.fromJSON(e,t.slice),!!t.structure)}}]),n}(Ci);Ci.jsonID("replace",Ni);var Mi=function(e){g(n,e);var t=O(n);function n(e,r,o,i,a,s){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return h(this,n),(u=t.call(this)).from=e,u.to=r,u.gapFrom=o,u.gapTo=i,u.slice=a,u.insert=s,u.structure=c,u}return m(n,[{key:"apply",value:function(e){if(this.structure&&(Fi(e,this.from,this.gapFrom)||Fi(e,this.gapTo,this.to)))return _i.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return _i.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?_i.fromReplace(e,this.from,this.to,n):_i.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new Ei([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var t=this.gapTo-this.gapFrom;return new n(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new n(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var 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}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,Eo.fromJSON(e,t.slice),t.insert,!!t.structure)}}]),n}(Ci);function Fi(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function Ri(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Pi(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!Ri(r,o,i))break}return null}function Bi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=Ii(e,t),i=o&&zi(r,t);return i?o.map(Li).concat({type:t,attrs:n}).concat(i.map(Li)):null}function Li(e){return{type:e,attrs:null}}function Ii(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function zi(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,u=r;s&&u<o;u++)s=s.matchType(n.child(u).type);return s&&s.validEnd?a:null}function Ui(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=e.steps.length;e.doc.nodesBetween(t,n,(function(t,n){if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);var a=e.mapping.slice(i),s=a.map(n,1),u=a.map(n+t.nodeSize,1);return e.step(new Mi(s,u,s+1,u-1,new Eo(go.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}function Vi(e,t,n,r,o){var i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);var a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Mi(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Eo(go.from(a),0,0),1,!0))}function $i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,u=n-2;s>i;s--,u--){var c=o.node(s),l=o.index(s);if(c.type.spec.isolating)return!1;var f=c.content.cutByIndex(l,c.childCount),d=r&&r[u]||c;if(d!=c&&(f=f.replaceChild(0,d.type.create(d.attrs))),!c.canReplace(l+1,c.childCount)||!d.type.validContent(f))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)}function Hi(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.doc.resolve(t),i=go.empty,a=go.empty,s=o.depth,u=o.depth-n,c=n-1;s>u;s--,c--){i=go.from(o.node(s).copy(i));var l=r&&r[c];a=go.from(l?l.type.create(l.attrs,a):o.node(s).copy(a))}e.step(new Ni(t,t,new Eo(i.append(a),n,n),!0))}function qi(e,t){var n=e.resolve(t),r=n.index();return Wi(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Wi(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function Gi(e,t,n){var r=new Ni(t-n,t+n,Eo.empty,!0);e.step(r)}function Yi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Eo.empty;if(t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return Ki(o,i,r)?new Ni(t,n,r):new Ji(o,i,r).fit()}function Ki(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Ci.jsonID("replaceAround",Mi);var Ji=function(){function e(t,n,r){h(this,e),this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=go.empty;for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(var a=t.depth;a>0;a--)this.placed=go.from(t.node(a).copy(this.placed))}return m(e,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var u=new Eo(i,a,s);return t>-1?new Mi(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new Ni(r.pos,o.pos,u):null}},{key:"findFittable",value:function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=null,r=(t?(n=Zi(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,u=void 0,c=null;if(1==e&&(r?s.matchType(r.type)||(c=s.fillBefore(go.from(r),!1)):n&&a.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:c};if(2==e&&r&&(u=s.findWrapping(r.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:u};if(n&&s.matchType(n.type))break}}},{key:"openMore",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=Zi(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new Eo(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}},{key:"dropNode",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=Zi(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new Eo(Qi(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Eo(Qi(t,n,1),n,r)}},{key:"placeNodes",value:function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,i=e.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a<i.length;a++)this.openFrontierNode(i[a]);var s=this.unplaced,u=r?r.content:s.content,c=s.openStart-t,l=0,f=[],d=this.frontier[n],p=d.match,h=d.type;if(o){for(a=0;a<o.childCount;a++)f.push(o.child(a));p=p.matchFragment(o)}for(var v=u.size+t-(s.content.size-s.openEnd);l<u.childCount;){var m=u.child(l),y=p.matchType(m.type);if(!y)break;(++l>1||0==c||m.content.size)&&(p=y,f.push(ea(m.mark(h.allowedMarks(m.marks)),1==l?c:0,l==u.childCount?v:-1)))}var g=l==u.childCount;g||(v=-1),this.placed=Xi(this.placed,n,go.from(f)),this.frontier[n].match=p,g&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var b=0,k=u;b<v;b++){var w=k.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),k=w.content}this.unplaced=g?0==t?Eo.empty:new Eo(Qi(s.content,t-1,1),t-1,v<0?s.openEnd:t-1):new Eo(Qi(s.content,t,l),s.openStart,s.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!ta(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r}},{key:"findCloseLevel",value:function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=ta(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var u=this.frontier[s],c=u.match,l=ta(e,s,u.type,c,!0);if(!l||l.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}},{key:"close",value:function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Xi(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e}},{key:"openFrontierNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Xi(this.placed,this.depth,go.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}},{key:"closeFrontierNode",value:function(){var e=this.frontier.pop().match.fillBefore(go.empty,!0);e.childCount&&(this.placed=Xi(this.placed,this.frontier.length,e))}}]),e}();function Qi(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Qi(e.firstChild.content,t-1,n)))}function Xi(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Xi(e.lastChild.content,t-1,n)))}function Zi(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function ea(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,ea(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(go.empty,!0)))),e.copy(r)}function ta(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function na(e){return e.spec.defining||e.spec.definingForContent}function ra(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(ra(i.content,t+1,n,r,i)))}if(t>r){var a=o.contentMatchAt(0),s=a.fillBefore(e).append(e);e=s.append(a.matchFragment(s).fillBefore(go.empty,!0))}return e}function oa(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var ia=Error;((ia=function e(t){var n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype)).constructor=ia,ia.prototype.name="TransformError";var aa=function(){function e(t){h(this,e),this.doc=t,this.steps=[],this.docs=[],this.mapping=new Di}return m(e,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(e){var t=this.maybeStep(e);if(t.failed)throw new ia(t.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Eo.empty,r=Yi(this.doc,e,t,n);return r&&this.step(r),this}},{key:"replaceWith",value:function(e,t,n){return this.replace(e,t,new Eo(go.from(n),0,0))}},{key:"delete",value:function(e,t){return this.replace(e,t,Eo.empty)}},{key:"insert",value:function(e,t){return this.replaceWith(e,e,t)}},{key:"replaceRange",value:function(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);var o=e.doc.resolve(t),i=e.doc.resolve(n);if(Ki(o,i,r))return e.step(new Ni(t,n,r));var a=oa(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,c=o.pos-1;u>0;u--,c--){var l=o.node(u).type.spec;if(l.defining||l.definingAsContext||l.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==c&&a.splice(1,0,-u)}for(var f=a.indexOf(s),d=[],p=r.openStart,h=r.content,v=0;;v++){var m=h.firstChild;if(d.push(m),v==r.openStart)break;h=m.content}for(var y=p-1;y>=0;y--){var g=d[y].type,b=na(g);if(b&&o.node(f).type!=g)p=y;else if(b||!g.isTextblock)break}for(var k=r.openStart;k>=0;k--){var w=(k+p+1)%(r.openStart+1),x=d[w];if(x)for(var O=0;O<a.length;O++){var E=a[(O+f)%a.length],D=!0;E<0&&(D=!1,E=-E);var S=o.node(E-1),C=o.index(E-1);if(S.canReplaceWith(C,C,x.type,x.marks))return e.replace(o.before(E),D?i.after(E):n,new Eo(ra(r.content,0,r.openStart,w),w,r.openEnd))}}for(var _=e.steps.length,j=a.length-1;j>=0&&(e.replace(t,n,r),!(e.steps.length>_));j--){var A=a[j];A<0||(t=o.before(A),n=i.after(A))}}(this,e,t,n),this}},{key:"replaceRangeWith",value:function(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){var o=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new Eo(go.from(r),0,0))}(this,e,t,n),this}},{key:"deleteRange",value:function(e,t){return function(e,t,n){for(var r=e.doc.resolve(t),o=e.doc.resolve(n),i=oa(r,o),a=0;a<i.length;a++){var s=i[a],u=a==i.length-1;if(u&&0==s||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(u||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(var c=1;c<=r.depth&&c<=o.depth;c++)if(t-r.start(c)==r.depth-c&&n>r.end(c)&&o.end(c)-n!=o.depth-c)return e.delete(r.before(c),n);e.delete(t,n)}(this,e,t),this}},{key:"lift",value:function(e,t){return function(e,t,n){for(var r=t.$from,o=t.$to,i=t.depth,a=r.before(i+1),s=o.after(i+1),u=a,c=s,l=go.empty,f=0,d=i,p=!1;d>n;d--)p||r.index(d)>0?(p=!0,l=go.from(r.node(d).copy(l)),f++):u--;for(var h=go.empty,v=0,m=i,y=!1;m>n;m--)y||o.after(m+1)<o.end(m)?(y=!0,h=go.from(o.node(m).copy(h)),v++):c++;e.step(new Mi(u,c,a,s,new Eo(l.append(h),f,v),l.size-f,!0))}(this,e,t),this}},{key:"join",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Gi(this,e,t),this}},{key:"wrap",value:function(e,t){return function(e,t,n){for(var r=go.empty,o=n.length-1;o>=0;o--){if(r.size){var i=n[o].type.contentMatch.matchFragment(r);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=go.from(n[o].type.create(n[o].attrs,r))}var a=t.start,s=t.end;e.step(new Mi(a,s,a,s,new Eo(r,0,0),n.length,!0))}(this,e,t),this}},{key:"setBlockType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return Ui(this,e,t,n,r),this}},{key:"setNodeMarkup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Vi(this,e,t,n,r),this}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;return Hi(this,e,t,n),this}},{key:"addMark",value:function(e,t,n){return function(e,t,n,r){var o,i,a=[],s=[];e.doc.nodesBetween(t,n,(function(e,u,c){if(e.isInline){var l=e.marks;if(!r.isInSet(l)&&c.type.allowsMarkType(r.type)){for(var f=Math.max(u,t),d=Math.min(u+e.nodeSize,n),p=r.addToSet(l),h=0;h<l.length;h++)l[h].isInSet(p)||(o&&o.to==f&&o.mark.eq(l[h])?o.to=d:a.push(o=new Ti(f,d,l[h])));i&&i.to==f?i.to=d:s.push(i=new Ai(f,d,r))}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)}))}(this,e,t,n),this}},{key:"removeMark",value:function(e,t,n){return function(e,t,n,r){var o=[],i=0;e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof ii)for(var u,c=e.marks;u=r.isInSet(c);)(s||(s=[])).push(u),c=u.removeFromSet(c);else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var l=Math.min(a+e.nodeSize,n),f=0;f<s.length;f++){for(var d=s[f],p=void 0,h=0;h<o.length;h++){var v=o[h];v.step==i-1&&d.eq(o[h].style)&&(p=v)}p?(p.to=l,p.step=i):o.push({style:d,from:Math.max(a,t),to:l,step:i})}}})),o.forEach((function(t){return e.step(new Ti(t.from,t.to,t.style))}))}(this,e,t,n),this}},{key:"clearIncompatible",value:function(e,t,n){return function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.contentMatch,o=e.doc.nodeAt(t),i=[],a=t+1,s=0;s<o.childCount;s++){var u=o.child(s),c=a+u.nodeSize,l=r.matchType(u.type);if(l){r=l;for(var f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new Ti(a,c,u.marks[f]))}else i.push(new Ni(a,c,Eo.empty));a=c}if(!r.validEnd){var d=r.fillBefore(go.empty,!0);e.replace(a,a,new Eo(d,0,0))}for(var p=i.length-1;p>=0;p--)e.step(i[p])}(this,e,t,n),this}}]),e}(),sa=Object.create(null),ua=function(){function e(t,n,r){h(this,e),this.$anchor=t,this.$head=n,this.ranges=r||[new ca(t.min(n),t.max(n))]}return m(e,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Eo.empty,n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,a=this.ranges,s=0;s<a.length;s++){var u=a[s],c=u.$from,l=u.$to,f=e.mapping.slice(i);e.replaceRange(f.map(c.pos),f.map(l.pos),s?Eo.empty:t),0==s&&ba(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,u=e.mapping.slice(n),c=u.map(a.pos),l=u.map(s.pos);o?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),ba(e,n,t.isInline?-1:1))}}},{key:"getBookmark",value:function(){return da.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.parent.inlineContent?new da(e):ga(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?ga(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):ga(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}return null}},{key:"near",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(e,t)||this.findFrom(e,-t)||new ma(e.node(0))}},{key:"atStart",value:function(e){return ga(e,e,0,0,1)||new ma(e)}},{key:"atEnd",value:function(e){return ga(e,e,e.content.size,e.childCount,-1)||new ma(e)}},{key:"fromJSON",value:function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=sa[t.type];if(!n)throw new RangeError("No selection type ".concat(t.type," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in sa)throw new RangeError("Duplicate use of selection JSON ID "+e);return sa[e]=t,t.prototype.jsonID=e,t}}]),e}();ua.prototype.visible=!0;var ca=m((function e(t,n){h(this,e),this.$from=t,this.$to=n})),la=!1;function fa(e){la||e.parent.inlineContent||(la=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var da=function(e){g(n,e);var t=O(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return h(this,n),fa(e),fa(r),t.call(this,e,r)}return m(n,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return ua.near(r);var o=e.resolve(t.map(this.anchor));return new n(o.parent.inlineContent?o:r,r)}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Eo.empty;if(rt(b(n.prototype),"replace",this).call(this,e,t),t==Eo.empty){var r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}},{key:"getBookmark",value:function(){return new pa(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}},{key:"between",value:function(e,t,r){var o=e.pos-t.pos;if(r&&!o||(r=o>=0?1:-1),!t.parent.inlineContent){var i=ua.findFrom(t,r,!0)||ua.findFrom(t,-r,!0);if(!i)return ua.near(t,r);t=i.$head}return e.parent.inlineContent||(0==o||(e=(ua.findFrom(e,-r,!0)||ua.findFrom(e,r,!0)).$anchor).pos<t.pos!=o<0)&&(e=t),new n(e,t)}}]),n}(ua);ua.jsonID("text",da);var pa=function(){function e(t,n){h(this,e),this.anchor=t,this.head=n}return m(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){return da.between(e.resolve(this.anchor),e.resolve(this.head))}}]),e}(),ha=function(e){g(n,e);var t=O(n);function n(e){var r;h(this,n);var o=e.nodeAfter,i=e.node(0).resolve(e.pos+o.nodeSize);return(r=t.call(this,e,i)).node=o,r}return m(n,[{key:"map",value:function(e,t){var r=t.mapResult(this.anchor),o=r.deleted,i=r.pos,a=e.resolve(i);return o?ua.near(a):new n(a)}},{key:"content",value:function(){return new Eo(go.from(this.node),0,0)}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new va(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new n(e.resolve(t.anchor))}},{key:"create",value:function(e,t){return new n(e.resolve(t))}},{key:"isSelectable",value:function(e){return!e.isText&&!1!==e.type.spec.selectable}}]),n}(ua);ha.prototype.visible=!1,ua.jsonID("node",ha);var va=function(){function e(t){h(this,e),this.anchor=t}return m(e,[{key:"map",value:function(t){var n=t.mapResult(this.anchor),r=n.deleted,o=n.pos;return r?new pa(o,o):new e(o)}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ha.isSelectable(n)?new ha(t):ua.near(t)}}]),e}(),ma=function(e){g(n,e);var t=O(n);function n(e){return h(this,n),t.call(this,e.resolve(0),e.resolve(e.content.size))}return m(n,[{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Eo.empty;if(t==Eo.empty){e.delete(0,e.doc.content.size);var r=ua.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else rt(b(n.prototype),"replace",this).call(this,e,t)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(e){return new n(e)}},{key:"eq",value:function(e){return e instanceof n}},{key:"getBookmark",value:function(){return ya}}],[{key:"fromJSON",value:function(e){return new n(e)}}]),n}(ua);ua.jsonID("all",ma);var ya={map:function(){return this},resolve:function(e){return new ma(e)}};function ga(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t.inlineContent)return da.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&ha.isSelectable(s))return ha.create(e,n-(o<0?s.nodeSize:0))}else{var u=ga(e,s,n+o,o<0?s.childCount:0,o,i);if(u)return u}n+=s.nodeSize*o}return null}function ba(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof Ni||i instanceof Mi)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(ua.near(e.doc.resolve(o),n))}}var ka=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),(r=t.call(this,e.doc)).curSelectionFor=0,r.updated=0,r.meta=Object.create(null),r.time=Date.now(),r.curSelection=e.selection,r.storedMarks=e.storedMarks,r}return m(n,[{key:"selection",get:function(){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}},{key:"setSelection",value:function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(1&this.updated)>0}},{key:"setStoredMarks",value:function(e){return this.storedMarks=e,this.updated|=2,this}},{key:"ensureMarks",value:function(e){return xo.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}},{key:"addStoredMark",value:function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(2&this.updated)>0}},{key:"addStep",value:function(e,t){rt(b(n.prototype),"addStep",this).call(this,e,t),this.updated=-3&this.updated,this.storedMarks=null}},{key:"setTime",value:function(e){return this.time=e,this}},{key:"replaceSelection",value:function(e){return this.selection.replace(this,e),this}},{key:"replaceSelectionWith",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||xo.none))),n.replaceWith(this,e),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(e,t,n){var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(ua.near(this.selection.$to)),this}},{key:"setMeta",value:function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}},{key:"getMeta",value:function(e){return this.meta["string"==typeof e?e:e.key]}},{key:"isGeneric",get:function(){for(var e in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=4,this}},{key:"scrolledIntoView",get:function(){return(4&this.updated)>0}}]),n}(aa);function wa(e,t){return t&&e?e.bind(t):e}var xa=m((function e(t,n,r){h(this,e),this.name=t,this.init=wa(n.init,r),this.apply=wa(n.apply,r)})),Oa=[new xa("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new xa("selection",{init:function(e,t){return e.selection||ua.atStart(t.doc)},apply:function(e){return e.selection}}),new xa("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new xa("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],Ea=m((function e(t,n){var r=this;h(this,e),this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Oa.slice(),n&&n.forEach((function(e){if(r.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");r.plugins.push(e),r.pluginsByKey[e.key]=e,e.spec.state&&r.fields.push(new xa(e.key,e.spec.state,e))}))})),Da=function(){function e(t){h(this,e),this.config=t}return m(e,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(e){return this.applyTransaction(e).state}},{key:"filterTransaction",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}},{key:"applyTransaction",value:function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,u=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,u,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var l=0;l<this.config.plugins.length;l++)r.push(l<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}},{key:"applyInner",value:function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var n=new e(this.config),r=this.config.fields,o=0;o<r.length;o++){var i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}},{key:"tr",get:function(){return new ka(this)}},{key:"reconfigure",value:function(t){for(var n=new Ea(this.schema,t.plugins),r=n.fields,o=new e(n),i=0;i<r.length;i++){var a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}},{key:"toJSON",value:function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}}],[{key:"create",value:function(t){for(var n=new Ea(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n),o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}},{key:"fromJSON",value:function(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var o=new Ea(t.schema,t.plugins),i=new e(o);return o.fields.forEach((function(e){if("doc"==e.name)i.doc=Vo.fromJSON(t.schema,n.doc);else if("selection"==e.name)i.selection=ua.fromJSON(i.doc,n.selection);else if("storedMarks"==e.name)n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var o in r){var a=r[o],s=a.spec.state;if(a.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,o))return void(i[e.name]=s.fromJSON.call(a,t,n[o],i))}i[e.name]=e.init(t,i)}})),i}}]),e}();function Sa(e,t,n){for(var r in e){var o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=Sa(o,t,{})),n[r]=o}return n}var Ca=function(){function e(t){h(this,e),this.spec=t,this.props={},t.props&&Sa(t.props,this,this.props),this.key=t.key?t.key.key:ja("plugin")}return m(e,[{key:"getState",value:function(e){return e[this.key]}}]),e}(),_a=Object.create(null);function ja(e){return e in _a?e+"$"+ ++_a[e]:(_a[e]=0,e+"$")}var Aa=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";h(this,e),this.key=ja(t)}return m(e,[{key:"get",value:function(e){return e.config.pluginsByKey[this.key]}},{key:"getState",value:function(e){return e[this.key]}}]),e}(),Ta="undefined"!=typeof navigator?navigator:null,Na="undefined"!=typeof document?document:null,Ma=Ta&&Ta.userAgent||"",Fa=/Edge\/(\d+)/.exec(Ma),Ra=/MSIE \d/.exec(Ma),Pa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ma),Ba=!!(Ra||Pa||Fa),La=Ra?document.documentMode:Pa?+Pa[1]:Fa?+Fa[1]:0,Ia=!Ba&&/gecko\/(\d+)/i.test(Ma);Ia&&(/Firefox\/(\d+)/.exec(Ma)||[0,0])[1];var za=!Ba&&/Chrome\/(\d+)/.exec(Ma),Ua=!!za,Va=za?+za[1]:0,$a=!Ba&&!!Ta&&/Apple Computer/.test(Ta.vendor),Ha=$a&&(/Mobile\/\w+/.test(Ma)||!!Ta&&Ta.maxTouchPoints>2),qa=Ha||!!Ta&&/Mac/.test(Ta.platform),Wa=/Android \d/.test(Ma),Ga=!!Na&&"webkitFontSmoothing"in Na.documentElement.style,Ya=Ga?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Ka=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Ja=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},Qa=null,Xa=function(e,t,n){var r=Qa||(Qa=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},Za=function(e,t,n,r){return n&&(ts(e,t,n,r,-1)||ts(e,t,n,r,1))},es=/^(img|br|input|textarea|hr)$/i;function ts(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:ns(e))){var i=e.parentNode;if(!i||1!=i.nodeType||is(e)||es.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Ka(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?ns(e):0}}}function ns(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function rs(e,t,n){for(var r=0==t,o=t==ns(e);r||o;){if(e==n)return!0;var i=Ka(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==ns(e)}}function is(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var as=function(e){var t=e.isCollapsed;return t&&Ua&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function ss(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function us(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function cs(e,t){return"number"==typeof e?e:e[t]}function ls(e){var 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 fs(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=Ja(a))if(1==a.nodeType){var s=a,u=s==i.body,c=u?us(i):ls(s),l=0,f=0;if(t.top<c.top+cs(r,"top")?f=-(c.top-t.top+cs(o,"top")):t.bottom>c.bottom-cs(r,"bottom")&&(f=t.bottom-c.bottom+cs(o,"bottom")),t.left<c.left+cs(r,"left")?l=-(c.left-t.left+cs(o,"left")):t.right>c.right-cs(r,"right")&&(l=t.right-c.right+cs(o,"right")),l||f)if(u)i.defaultView.scrollBy(l,f);else{var d=s.scrollLeft,p=s.scrollTop;f&&(s.scrollTop+=f),l&&(s.scrollLeft+=l);var h=s.scrollLeft-d,v=s.scrollTop-p;t={left:t.left-h,top:t.top-v,right:t.right-h,bottom:t.bottom-v}}if(u)break}}function ds(e){for(var t=[],n=e.ownerDocument,r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Ja(r));return t}function ps(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var hs=null;function vs(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,u=e.firstChild,c=0;u;u=u.nextSibling,c++){var l=void 0;if(1==u.nodeType)l=u.getClientRects();else{if(3!=u.nodeType)continue;l=Xa(u).getClientRects()}for(var f=0;f<l.length;f++){var d=l[f];if(d.top<=a&&d.bottom>=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var p=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(p<o){n=u,o=p,r=p&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==u.nodeType&&p&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=bs(r,1);if(i.top!=i.bottom&&ms(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:vs(n,r)}function ms(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function ys(e,t,n){var r=e.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=e.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),u=0;u<s.length;u++){var c=s[u];if(ms(t,c))return ys(a,t,c)}if((i=(i+1)%r)==o)break}return e}function gs(e,t){var n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{var i=r.caretPositionFromPoint(t.left,t.top);i&&(n=i.offsetNode,o=i.offset)}catch(h){}if(!n&&r.caretRangeFromPoint){var a=r.caretRangeFromPoint(t.left,t.top);a&&(n=a.startContainer,o=a.startOffset)}var s,u=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top+1);if(!u||!e.dom.contains(1!=u.nodeType?u.parentNode:u)){var c=e.dom.getBoundingClientRect();if(!ms(t,c))return null;if(!(u=ys(e.dom,t,c)))return null}if($a)for(var l=u;n&&l;l=Ja(l))l.draggable&&(n=void 0);if(u=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(u,t),n){if(Ia&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length))<n.childNodes.length){var f,d=n.childNodes[o];"IMG"==d.nodeName&&(f=d.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==s&&(s=function(e,t,n){var r=vs(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,u,t));var p=e.docView.nearestDesc(u,!0);return{pos:s,inside:p?p.posAtStart-p.border:-1}}function bs(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var ks=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ws(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=Ga||Ia;if(3==o.nodeType){if(!a||!ks.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==o.nodeValue.length?(s--,c=1):n<0?s--:u++,xs(bs(Xa(o,s,u),c),c<0)}var l=bs(Xa(o,i,i),n);if(Ia&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=bs(Xa(o,i-1,i-1),-1);if(f.top==l.top){var d=bs(Xa(o,i,i+1),-1);if(d.top!=l.top)return xs(d,d.left<f.left)}}return l}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==ns(o))){var p=o.childNodes[i-1];if(1==p.nodeType)return Os(p.getBoundingClientRect(),!1)}if(i<ns(o)){var h=o.childNodes[i];if(1==h.nodeType)return Os(h.getBoundingClientRect(),!0)}return Os(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==ns(o))){var v=o.childNodes[i-1],m=3==v.nodeType?Xa(v,ns(v)-(a?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(m)return xs(bs(m,1),!1)}if(i<ns(o)){for(var y=o.childNodes[i];y.pmViewDesc&&y.pmViewDesc.ignoreForCoords;)y=y.nextSibling;var g=y?3==y.nodeType?Xa(y,0,a?0:1):1==y.nodeType?y:null:null;if(g)return xs(bs(g,-1),!0)}return xs(bs(3==o.nodeType?Xa(o):o,-n),n>=0)}function xs(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Os(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Es(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var Ds=/[\u0590-\u08ac]/;var Ss=null,Cs=null,_s=!1;function js(e,t,n){return Ss==t&&Cs==n?_s:(Ss=t,Cs=n,_s="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Es(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=ws(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=Xa(a,0,a.nodeValue.length).getClientRects()}for(var u=0;u<s.length;u++){var c=s[u];if(c.bottom>c.top+1&&("up"==n?i.top-c.top>2*(c.bottom-i.top):c.bottom-i.bottom>2*(i.bottom-c.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return Ds.test(r.parent.textContent)&&s.modify?Es(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var u=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),u})):"left"==n||"backward"==n?i:a}(e,t,n))}var As=function(){function e(t,n,r,o){h(this,e),this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=0,r.pmViewDesc=this}return m(e,[{key:"matchesWidget",value:function(e){return!1}},{key:"matchesMark",value:function(e){return!1}},{key:"matchesNode",value:function(e,t,n){return!1}},{key:"matchesHack",value:function(e){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(e){return!1}},{key:"size",get:function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var e=0;e<this.children.length;e++)this.children[e].destroy()}},{key:"posBeforeChild",value:function(e){for(var t=0,n=this.posAtStart;;t++){var r=this.children[t];if(r==e)return n;n+=r.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>Ka(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!1;break}if(u.previousSibling)break}if(null==s&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.nextSibling)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r),i=void 0;if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}},{key:"getDesc",value:function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t}},{key:"posFromDOM",value:function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}},{key:"descAt",value:function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}},{key:"domFromPos",value:function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n,r=0,o=0,i=0;r<this.children.length;r++){var a=this.children[r],s=i+a.size;if(s>e||a instanceof Bs){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof Ts&&n.side>=0;r--);if(t<=0){for(var u,c=!0;(u=r?this.children[r-1]:null)&&u.dom.parentNode!=this.contentDOM;r--,c=!1);return u&&t&&c&&!u.border&&!u.domAtom?u.domFromPos(u.size,t):{node:this.contentDOM,offset:u?Ka(u.dom)+1:0}}for(var l,f=!0;(l=r<this.children.length?this.children[r]:null)&&l.dom.parentNode!=this.contentDOM;r++,f=!1);return l&&f&&!l.border&&!l.domAtom?l.domFromPos(0,t):{node:this.contentDOM,offset:l?Ka(l.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],u=i+s.size;if(-1==r&&e<=u){var c=i+s.border;if(e>=c&&t<=u-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var l=a;l>0;l--){var f=this.children[l-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=Ka(f.dom)+1;break}e-=f.size}-1==r&&(r=0)}if(r>-1&&(u>t||a==this.children.length-1)){t=u;for(var d=a+1;d<this.children.length;d++){var p=this.children[d];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=Ka(p.dom);break}t+=p.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}},{key:"emptyChildAt",value:function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}},{key:"domAfterPos",value:function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}},{key:"setSelection",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var u=this.children[a],c=s+u.size;if(o>s&&i<c)return u.setSelection(e-s-u.border,t-s-u.border,n,r);s=c}var l=this.domFromPos(e,e?-1:1),f=t==e?l:this.domFromPos(t,t?-1:1),d=n.getSelection(),p=!1;if((Ia||$a)&&e==t){var h=l,v=h.node,m=h.offset;if(3==v.nodeType){if((p=!(!m||"\n"!=v.nodeValue[m-1]))&&m==v.nodeValue.length)for(var y,g=v;g;g=g.parentNode){if(y=g.nextSibling){"BR"==y.nodeName&&(l=f={node:y.parentNode,offset:Ka(y)+1});break}var b=g.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{var k=v.childNodes[m-1];p=k&&("BR"==k.nodeName||"false"==k.contentEditable)}}if(Ia&&d.focusNode&&d.focusNode!=f.node&&1==d.focusNode.nodeType){var w=d.focusNode.childNodes[d.focusOffset];w&&"false"==w.contentEditable&&(r=!0)}if(r||p&&$a||!Za(l.node,l.offset,d.anchorNode,d.anchorOffset)||!Za(f.node,f.offset,d.focusNode,d.focusOffset)){var x=!1;if((d.extend||e==t)&&!p){d.collapse(l.node,l.offset);try{e!=t&&d.extend(f.node,f.offset),x=!0}catch(D){if(!(D instanceof DOMException))throw D}}if(!x){if(e>t){var O=l;l=f,f=O}var E=document.createRange();E.setEnd(f.node,f.offset),E.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(E)}}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM&&"selection"!=e.type}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}},{key:"markParentsDirty",value:function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}}]),e}(),Ts=function(e){g(n,e);var t=O(n);function n(e,r,o,i){var a;h(this,n);var s,u=r.type.toDOM;if("function"==typeof u&&(u=u(o,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:i}))),!r.type.spec.raw){if(1!=u.nodeType){var c=document.createElement("span");c.appendChild(u),u=c}u.contentEditable="false",u.classList.add("ProseMirror-widget")}return(a=t.call(this,e,[],u,null)).widget=r,a.widget=r,s=w(a),a}return m(n,[{key:"matchesWidget",value:function(e){return 0==this.dirty&&e.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)}},{key:"ignoreMutation",value:function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),rt(b(n.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),n}(As),Ns=function(e){g(n,e);var t=O(n);function n(e,r,o,i){var a;return h(this,n),(a=t.call(this,e,[],r,null)).textDOM=o,a.text=i,a}return m(n,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}},{key:"domFromPos",value:function(e){return{node:this.textDOM,offset:e}}},{key:"ignoreMutation",value:function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}]),n}(As),Ms=function(e){g(n,e);var t=O(n);function n(e,r,o,i){var a;return h(this,n),(a=t.call(this,e,[],o,i)).mark=r,a}return m(n,[{key:"parseRule",value:function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}},{key:"matchesMark",value:function(e){return 3!=this.dirty&&this.mark.eq(e)}},{key:"markDirty",value:function(e,t){if(rt(b(n.prototype),"markDirty",this).call(this,e,t),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function(e,t,r){var o=n.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=Js(i,t,a,r)),e>0&&(i=Js(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}],[{key:"create",value:function(e,t,r,o){var i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return a&&a.dom||(a=gi.renderSpec(document,t.type.spec.toDOM(t,r))),new n(e,t,a.dom,a.contentDOM||a.dom)}}]),n}(As),Fs=function(e){g(n,e);var t=O(n);function n(e,r,o,i,a,s,u,c,l){var f;return h(this,n),(f=t.call(this,e,[],a,s)).node=r,f.outerDeco=o,f.innerDeco=i,f.nodeDOM=u,s&&f.updateChildren(c,l),f}return m(n,[{key:"parseRule",value:function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return go.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t}},{key:"matchesNode",value:function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Ws(t,this.outerDeco)&&n.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,u=new Ys(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var u=0,c=[],l=null,f=0;;){if(u<o.length&&o[u].to==i){for(var d=o[u++],p=void 0;u<o.length&&o[u].to==i;)(p||(p=[d])).push(o[u++]);if(p){p.sort(Ks);for(var h=0;h<p.length;h++)n(p[h],f,!!l)}else n(d,f,!!l)}var v=void 0,m=void 0;if(l)m=-1,v=l,l=null;else{if(!(f<e.childCount))break;m=f,v=e.child(f++)}for(var y=0;y<c.length;y++)c[y].to<=i&&c.splice(y--,1);for(;u<o.length&&o[u].from<=i&&o[u].to>i;)c.push(o[u++]);var g=i+v.nodeSize;if(v.isText){var b=g;u<o.length&&o[u].from<b&&(b=o[u].from);for(var k=0;k<c.length;k++)c[k].to<b&&(b=c[k].to);b<g&&(l=v.cut(b-i),v=v.cut(0,b-i),g=b,m=-1)}r(v,v.isInline&&!v.isLeaf?c.filter((function(e){return!e.inline})):c.slice(),t.forChild(i,v),m),i=g}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?u.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&u.syncToMarks(i==n.node.childCount?xo.none:n.node.child(i).marks,r,e),u.placeWidget(t,e,o)}),(function(t,n,a,c){var l;u.syncToMarks(t.marks,r,e),u.findNodeMatch(t,n,a,c)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(l=u.findIndexWithChild(i.node))>-1&&u.updateNodeAt(t,n,a,l,e)||u.updateNextNode(t,n,a,e,c)||u.addNode(t,n,a,e,o),o+=t.nodeSize})),u.syncToMarks([],r,e),this.node.isTextblock&&u.addTextblockHacks(),u.destroyRest(),(u.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),Is(this.contentDOM,this.children,e),Ha&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}},{key:"localCompositionInfo",value:function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(e.state.selection instanceof da)||r<t||o>t+this.node.content.size)return null;var i=e.domSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=ns(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){var s=a.nodeValue,u=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var u=a.text;o<e.childCount;){var c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;u+=c.text}if(i>=n){var l=s<r?u.lastIndexOf(t,r-s-1):-1;if(l>=0&&l+t.length+s>=n)return s+l;if(n==r&&u.length>=r+t.length-s&&u.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return u<0?null:{node:a,pos:u,text:s}}return{node:a,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;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&&(i.pmViewDesc=void 0)}var a=new Ns(this,i,n,o);e.input.compositionNodes.push(a),this.children=Js(this.children,r,r+o.length,e,a)}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}},{key:"updateInner",value:function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function(e){if(!Ws(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=$s(this.dom,this.nodeDOM,Vs(this.outerDeco,this.node,t),Vs(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}}},{key:"selectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(e,t,r,o,i,a){var s,u=i.nodeViews[t.type.name],c=u&&u(t,i,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:a}),r,o),l=c&&c.dom,f=c&&c.contentDOM;if(t.isText)if(l){if(3!=l.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else l=document.createTextNode(t.text);else if(!l){var d=gi.renderSpec(document,t.type.spec.toDOM(t));l=d.dom,f=d.contentDOM}f||t.isText||"BR"==l.nodeName||(l.hasAttribute("contenteditable")||(l.contentEditable="false"),t.type.spec.draggable&&(l.draggable=!0));var p=l;return l=qs(l,r,t),c?s=new Ls(e,t,r,o,l,f||null,p,c,i,a+1):t.isText?new Ps(e,t,r,o,l,p,i):new n(e,t,r,o,l,f||null,p,i,a+1)}}]),n}(As);function Rs(e,t,n,r,o){return qs(r,t,e),new Fs(void 0,e,t,n,r,r,r,o,0)}var Ps=function(e){g(n,e);var t=O(n);function n(e,r,o,i,a,s,u){return h(this,n),t.call(this,e,r,o,i,a,null,s,u,0)}return m(n,[{key:"parseRule",value:function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&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)}},{key:"inParent",value:function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}},{key:"domFromPos",value:function(e){return{node:this.nodeDOM,offset:e}}},{key:"localPosFromDOM",value:function(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):rt(b(n.prototype),"localPosFromDOM",this).call(this,e,t,r)}},{key:"ignoreMutation",value:function(e){return"characterData"!=e.type&&"selection"!=e.type}},{key:"slice",value:function(e,t,r){var o=this.node.cut(e,t),i=document.createTextNode(o.text);return new n(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}},{key:"markDirty",value:function(e,t){rt(b(n.prototype),"markDirty",this).call(this,e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function(){return!1}}]),n}(Fs),Bs=function(e){g(n,e);var t=O(n);function n(){return h(this,n),t.apply(this,arguments)}return m(n,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(e){return 0==this.dirty&&this.dom.nodeName==e}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return"IMG"==this.dom.nodeName}}]),n}(As),Ls=function(e){g(n,e);var t=O(n);function n(e,r,o,i,a,s,u,c,l,f){var d;return h(this,n),(d=t.call(this,e,r,o,i,a,s,u,l,f)).spec=c,d}return m(n,[{key:"update",value:function(e,t,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&rt(b(n.prototype),"update",this).call(this,e,t,r,o)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():rt(b(n.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():rt(b(n.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):rt(b(n.prototype),"setSelection",this).call(this,e,t,r,o)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),rt(b(n.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}},{key:"ignoreMutation",value:function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):rt(b(n.prototype),"ignoreMutation",this).call(this,e)}}]),n}(Fs);function Is(e,t,n){for(var r=e.firstChild,o=!1,i=0;i<t.length;i++){var a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=Gs(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof Ms){var u=r?r.previousSibling:e.lastChild;Is(a.contentDOM,a.children,n),r=u?u.nextSibling:e.firstChild}}for(;r;)r=Gs(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var zs=function(e){e&&(this.nodeName=e)};zs.prototype=Object.create(null);var Us=[new zs];function Vs(e,t,n){if(0==e.length)return Us;for(var r=n?Us[0]:new zs,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new zs(a.nodeName)),a){var u=a[s];null!=u&&(n&&1==o.length&&o.push(r=new zs(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+u:"style"==s?r.style=(r.style?r.style+";":"")+u:"nodeName"!=s&&(r[s]=u))}}return o}function $s(e,t,n,r){if(n==Us&&r==Us)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var u=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(u=o.parentNode)&&u.nodeName.toLowerCase()==a.nodeName||((u=document.createElement(a.nodeName)).pmIsDeco=!0,u.appendChild(o),s=Us[0]),o=u}Hs(o,s||Us[0],a)}return o}function Hs(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):[],a=n.class?n.class.split(" ").filter(Boolean):[],s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var u=0;u<a.length;u++)-1==i.indexOf(a[u])&&e.classList.add(a[u]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var c,l=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=l.exec(t.style);)e.style.removeProperty(c[1]);n.style&&(e.style.cssText+=n.style)}}function qs(e,t,n){return $s(e,e,Us,Vs(t,n,1!=e.nodeType))}function Ws(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Gs(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var Ys=function(){function e(t,n){h(this,e),this.lock=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var u=n.children[r-1];if(!(u instanceof Ms)){s=u,r--;break}n=u,r=u.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var c=s.node;if(c){if(c!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)}return m(e,[{key:"destroyBetween",value:function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var u=Ms.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,o++}}},{key:"findNodeMatch",value:function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var u=this.top.children[a];if(u.matchesNode(e,t,n)&&!this.preMatch.matched.has(u)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}},{key:"updateNodeAt",value:function(e,t,n,r,o){var i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)}},{key:"findIndexWithChild",value:function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}}},{key:"updateNextNode",value:function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof Fs){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var u=a.dom;if(!(this.lock&&(u==this.lock||1==u.nodeType&&u.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&Ws(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=u&&(this.changed=!0),this.index++,!0;break}}return!1}},{key:"addNode",value:function(e,t,n,r,o){this.top.children.splice(this.index++,0,Fs.create(this.top,e,t,n,r,o)),this.changed=!0}},{key:"placeWidget",value:function(e,t,n){var 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){var o=new Ts(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function(){for(var e=this.top.children[this.index-1],t=this.top;e instanceof Ms;)e=(t=e).children[t.children.length-1];e&&e instanceof Ps&&!/\n$/.test(e.node.text)||(($a||Ua)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{var n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");var r=new Bs(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}]),e}();function Ks(e,t){return e.type.side-t.type.side}function Js(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var u=e[a],c=s,l=s+=u.size;c>=n||l<=t?i.push(u):(c<t&&i.push(u.slice(0,t-c,r)),o&&(i.push(o),o=void 0),l>n&&i.push(u.slice(n-c,u.size,r)))}return i}function Qs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,u,c=r.resolve(a);if(as(n)){for(s=c;o&&!o.node;)o=o.parent;var l=o.node;if(o&&l.isAtom&&ha.isSelectable(l)&&o.parent&&(!l.isInline||!rs(n.focusNode,n.focusOffset,o.dom))){var f=o.posBefore;u=new ha(a==f?c:r.resolve(f))}}else{var d=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(d<0)return null;s=r.resolve(d)}if(!u){var p="pointer"==t||e.state.selection.head<c.pos&&!i?1:-1;u=uu(e,s,c,p)}return u}function Xs(e){return e.editable?e.hasFocus():lu(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Zs(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(au(e,n),Xs(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Ua){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Za(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)iu(e);else{var i,a,s=n.anchor,u=n.head;!eu||n instanceof da||(n.$from.parent.inlineContent||(i=tu(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=tu(e,n.to))),e.docView.setSelection(s,u,e.root,t),eu&&(i&&ru(i),a&&ru(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ou(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var eu=$a||Ua&&Va<63;function tu(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if($a&&i&&"false"==i.contentEditable)return nu(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return nu(i);if(a)return nu(a)}}function nu(e){return e.contentEditable="true",$a&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function ru(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function ou(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){Xs(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function iu(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,Ka(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Ba&&La<=11&&(r.disabled=!0,r.disabled=!1)}function au(e,t){if(t instanceof ha){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(su(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else su(e)}function su(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function uu(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||da.between(t,n,r)}function cu(e){return(!e.editable||e.root.activeElement==e.dom)&&lu(e)}function lu(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function fu(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&ua.findFrom(a,t)}function du(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function pu(e,t,n){var r=e.state.selection;if(!(r instanceof da)){if(r instanceof ha&&r.node.isInline)return du(e,new da(t>0?r.$to:r.$from));var o=fu(e.state,t);return!!o&&du(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=fu(e.state,t);return!!(i&&i instanceof ha)&&du(e,i)}if(!(qa&&n.indexOf("m")>-1)){var a,s=r.$head,u=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!u||u.isText)return!1;var c=t<0?s.pos-u.nodeSize:s.pos;return!!(u.isAtom||(a=e.docView.descAt(c))&&!a.contentDOM)&&(ha.isSelectable(u)?du(e,new ha(t<0?e.state.doc.resolve(s.pos-u.nodeSize):s)):!!Ga&&du(e,new da(e.state.doc.resolve(t<0?c:c+u.nodeSize))))}}function hu(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function vu(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function mu(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(Ia&&1==n.nodeType&&r<hu(n)&&vu(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(vu(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(gu(n))break;for(var u=n.previousSibling;u&&vu(u);)o=n.parentNode,i=Ka(u),u=u.previousSibling;if(u)r=hu(n=u);else{if((n=n.parentNode)==e.dom)break;r=0}}a?bu(e,t,n,r):o&&bu(e,t,o,i)}}function yu(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=hu(n);;)if(r<a){if(1!=n.nodeType)break;if(!vu(n.childNodes[r]))break;o=n,i=++r}else{if(gu(n))break;for(var s=n.nextSibling;s&&vu(s);)o=s.parentNode,i=Ka(s)+1,s=s.nextSibling;if(s)r=0,a=hu(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&bu(e,t,o,i)}}function gu(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function bu(e,t,n,r){if(as(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&Zs(e)}),50)}function ku(e,t,n){var r=e.state.selection;if(r instanceof da&&!r.empty||n.indexOf("s")>-1)return!1;if(qa&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=fu(e.state,t);if(a&&a instanceof ha)return du(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,u=r instanceof ma?ua.near(s,t):ua.findFrom(s,t);return!!u&&du(e,u)}return!1}function wu(e,t){if(!(e.state.selection instanceof da))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function xu(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ou(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||qa&&72==n&&"c"==r?wu(e,-1)||mu(e):46==n||qa&&68==n&&"c"==r?wu(e,1)||yu(e):13==n||27==n||(37==n||qa&&66==n&&"c"==r?pu(e,-1,r)||mu(e):39==n||qa&&70==n&&"c"==r?pu(e,1,r)||yu(e):38==n||qa&&80==n&&"c"==r?ku(e,-1,r)||mu(e):40==n||qa&&78==n&&"c"==r?function(e){if(!$a||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;xu(e,o,"true"),setTimeout((function(){return xu(e,o,"false")}),20)}return!1}(e)||ku(e,1,r)||yu(e):r==(qa?"m":"c")&&(66==n||73==n||89==n||90==n))}function Eu(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||gi.fromSchema(e.state.schema),u=Fu(),c=u.createElement("div");c.appendChild(s.serializeFragment(r,{document:u}));for(var l,f=c.firstChild,d=0;f&&1==f.nodeType&&(l=Nu[f.nodeName.toLowerCase()]);){for(var p=l.length-1;p>=0;p--){for(var h=u.createElement(l[p]);c.firstChild;)h.appendChild(c.firstChild);c.appendChild(h),d++}f=c.firstChild}return f&&1==f.nodeType&&f.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(d?" -".concat(d):""," ").concat(JSON.stringify(n))),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Du(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var u=t&&(r||s||!n);if(u){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new Eo(go.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Eo.empty;var c=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(c)a=c;else{var l=o.marks(),f=e.state.schema,d=gi.fromSchema(f);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(d.serializeNode(f.text(e,l)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Fu().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Nu[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),Ga&&function(e){for(var t=e.querySelectorAll(Ua?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var v=+h[3];v>0&&i.firstChild;v--)i=i.firstChild;if(!a){var m=e.someProp("clipboardParser")||e.someProp("domParser")||ui.fromSchema(e.state.schema);a=m.parseSlice(i,{preserveWhitespace:!(!u&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Su.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(sr){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var u=r.nodes[n[s]];if(!u||u.hasRequiredAttrs())break;o=go.from(u.create(n[s+1],o)),i++,a++}return new Eo(o,i,a)}(Tu(a,+h[1],+h[2]),h[4]);else if(a=Eo.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&_u(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=ju(i[i.length-1],o.length));var a=Cu(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:go.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,g=0,b=a.content.firstChild;y<a.openStart&&!b.type.spec.isolating;y++,b=b.firstChild);for(var k=a.content.lastChild;g<a.openEnd&&!k.type.spec.isolating;g++,k=k.lastChild);a=Tu(a,y,g)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var Su=/^(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 Cu(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,go.from(e));return e}function _u(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=_u(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(go.from(Cu(n,e,o+1))))}}function ju(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,ju(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(go.empty,!0);return e.copy(n.append(r))}function Au(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=Au(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(go.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function Tu(e,t,n){return t<e.openStart&&(e=new Eo(Au(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Eo(Au(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Nu={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Mu=null;function Fu(){return Mu||(Mu=document.implementation.createHTMLDocument("title"))}var Ru={},Pu={},Bu=m((function e(){h(this,e),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.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}));function Lu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Iu(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=function(t){return zu(e,t)})}))}function zu(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Uu(e){return{left:e.clientX,top:e.clientY}}function Vu(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var u=a(s);if("object"===typeof u)return u.v}return!1}function $u(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Hu(e,t,n,r,o){return Vu(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof ha&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(ha.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&($u(e,ha.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&ha.isSelectable(r))&&($u(e,new ha(n),"pointer"),!0)}(e,n))}function qu(e,t,n,r){return Vu(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function Wu(e,t,n,r){return Vu(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&($u(e,da.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)$u(e,da.create(r,s+1,s+1+a.content.size),"pointer");else{if(!ha.isSelectable(a))continue;$u(e,ha.create(r,s),"pointer")}return!0}}(e,n,r)}function Gu(e){return ec(e)}Pu.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Ju(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Wa||!Ua||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!Ha||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||Ou(e,n)?n.preventDefault():Lu(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,ss(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},Pu.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},Pu.keypress=function(e,t){var n=t;if(!(Ju(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||qa&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof da)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var Yu=qa?"metaKey":"ctrlKey";Ru.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=Gu(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Yu]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(Uu(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Ku(e,a,n,!!r)):("doubleClick"==i?qu:Wu)(e,a.pos,a.inside,n)?n.preventDefault():Lu(e,"pointer"))};var Ku=function(){function e(t,n,r,o){var i,a,s=this;if(h(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Yu],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var u=t.state.doc.resolve(n.pos);i=u.parent,a=u.depth?u.before():0}var c=o?null:r.target,l=c?t.docView.nearestDesc(c,!0):null;this.target=l?l.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof ha&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Ia||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((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Lu(t,"pointer")}return m(e,[{key:"done",value:function(){var e=this;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((function(){return Zs(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Uu(e))),this.allowDefault||!t?Lu(this.view,"pointer"):Hu(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||$a&&this.mightDrag&&!this.mightDrag.node.isAtom||Ua&&!(this.view.state.selection instanceof da)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?($u(this.view,ua.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Lu(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Lu(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function Ju(e,t){return!!e.composing||!!($a&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Ru.touchdown=function(e){Gu(e),Lu(e,"pointer")},Ru.contextmenu=function(e){return Gu(e)};var Qu=Wa?5e3:-1;function Xu(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return ec(e)}),t))}function Zu(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function ec(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(Wa&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Zu(e),t||e.docView&&e.docView.dirty){var n=Qs(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}Pu.compositionstart=Pu.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),ec(e,!0),e.markCursor=null;else if(ec(e),Ia&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}Xu(e,Qu)},Pu.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Xu(e,20))};var tc=Ba&&La<15||Ha&&Ya<604;function nc(e,t,n,r){var o=Du(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||Eo.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Ru.copy=Pu.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=tc?null:n.clipboardData,a=Eu(e,r.content()),s=a.dom,u=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",u)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Pu.paste=function(e,t){var n=t;if(!e.composing||Wa){var r=tc?null:n.clipboardData;r&&nc(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var 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(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?nc(e,r.value,null,t):nc(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var rc=m((function e(t,n){h(this,e),this.slice=t,this.move=n})),oc=qa?"altKey":"ctrlKey";for(var ic in Ru.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Uu(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof ha?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(ha.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(ha.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),u=Eu(e,s),c=u.dom,l=u.text;n.dataTransfer.clearData(),n.dataTransfer.setData(tc?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",tc||n.dataTransfer.setData("text/plain",l),e.dragging=new rc(s,!n[oc])}},Ru.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Pu.dragover=Pu.dragenter=function(e,t){return t.preventDefault()},Pu.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(Uu(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=Du(e,n.dataTransfer.getData(tc?"Text":"text/plain"),tc?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[oc]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||Eo.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var u=a?function(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var u=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(u>0?1:0),l=r.node(s),f=!1;if(1==a)f=l.canReplace(c,c,o);else{var d=l.contentMatchAt(c).findWrapping(o.firstChild.type);f=d&&l.canReplaceWith(c,c,d[0])}if(f)return 0==u?r.pos:u<0?r.before(s+1):r.after(s+1)}return null}(e.state.doc,i.pos,a):i.pos;null==u&&(u=i.pos);var c=e.state.tr;s&&c.deleteSelection();var l=c.mapping.map(u),f=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,d=c.doc;if(f?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),!c.doc.eq(d)){var p=c.doc.resolve(l);if(f&&ha.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new ha(p));else{var h=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((function(e,t,n,r){return h=r})),c.setSelection(uu(e,p,c.doc.resolve(h)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))}}}}}},Ru.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&Zs(e)}),20))},Ru.blur=function(e,t){var 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)},Ru.beforeinput=function(e,t){if(Ua&&Wa&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,ss(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Pu)Ru[ic]=Pu[ic];function ac(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var sc=function(){function e(t,n){h(this,e),this.toDOM=t,this.spec=n||dc,this.side=this.spec.side||0}return m(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new lc(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ac(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),uc=function(){function e(t,n){h(this,e),this.attrs=t,this.spec=n||dc}return m(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new lc(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&ac(this.attrs,t.attrs)&&ac(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),cc=function(){function e(t,n){h(this,e),this.attrs=t,this.spec=n||dc}return m(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new lc(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&ac(this.attrs,t.attrs)&&ac(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),lc=function(){function e(t,n,r){h(this,e),this.from=t,this.to=n,this.type=r}return m(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof uc}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new sc(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new uc(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new cc(r,o))}}]),e}(),fc=[],dc={},pc=function(){function e(t,n){h(this,e),this.local=t.length?t:fc,this.children=n.length?n:fc}return m(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var u=this.children[s]+1;this.children[s+2].findInner(e-u,t-u,n,r+u,o)}}},{key:"map",value:function(e,t,n){return this==hc||0==e.maps.length?this:this.mapInner(e,t,0,0,n||dc)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var u=this.local[s].map(t,r,o);u&&u.type.valid(n,u)?(a||(a=[])).push(u):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),u=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var u=s[a+1],c=void 0;if(!(u<0||e>u+i)){var l=s[a]+i;t>=l?s[a+1]=e<=l?-2:-1:n>=o&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c)}}},c=0;c<n.maps.length;c++)n.maps[c].forEach(u);for(var l=!1,f=0;f<s.length;f+=3)if(s[f+1]<0){if(-2==s[f+1]){l=!0,s[f+1]=-1;continue}var d=n.map(e[f]+i),p=d-o;if(p<0||p>=r.content.size){l=!0;continue}var h=n.map(e[f+1]+i,-1)-o,v=r.content.findIndex(p),m=v.index,y=v.offset,g=r.maybeChild(m);if(g&&y==p&&y+g.nodeSize==h){var b=s[f+2].mapInner(n,g,d+1,e[f]+i+1,a);b!=hc?(s[f]=p,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,l=!0)}else l=!0}if(l){var k=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var u=e.local[i].map(r,o,t);u?n.push(u):a.onRemove&&a.onRemove(e.local[i].spec)}for(var c=0;c<e.children.length;c+=3)s(e.children[c+2],e.children[c]+t+1)}for(var u=0;u<e.length;u+=3)-1==e[u+1]&&s(e[u+2],t[u]+i+1);return n}(s,e,t,n,o,i,a),w=bc(k,r,0,a);t=w.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,E=0;O<w.children.length;O+=3){for(var D=w.children[O];E<s.length&&s[E]<D;)E+=3;s.splice(E,0,w.children[O],w.children[O+1],w.children[O+2])}}return new pc(t.sort(kc),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(kc),fc):hc}},{key:"add",value:function(t,n){return n.length?this==hc?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,u=t+r;if(s=yc(n,e,u)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,u+1):o.splice(a,0,t,t+e.nodeSize,bc(s,e,u+1,dc)),a+=3}}));for(var s=mc(a?gc(n):n,-r),u=0;u<s.length;u++)s[u].type.valid(t,s[u])||s.splice(u--,1);return new e(s.length?this.local.concat(s).sort(kc):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==hc?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,u=r[i]+n,c=r[i+1]+n,l=0;l<t.length;l++)(a=t[l])&&a.from>u&&a.to<c&&(t[l]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var f=r[i+2].removeInner(s,u+1);f!=hc?r[i+2]=f:(r.splice(i,3),i-=3)}}if(o.length)for(var d,p=0;p<t.length;p++)if(d=t[p])for(var h=0;h<o.length;h++)o[h].eq(d,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):hc}},{key:"forChild",value:function(t,n){if(this==hc)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,u=0;u<this.local.length;u++){var c=this.local[u];if(c.from<s&&c.to>a&&c.type instanceof uc){var l=Math.max(a,c.from)-a,f=Math.min(s,c.to)-a;l<f&&(o||(o=[])).push(c.copy(l,f))}}if(o){var d=new e(o.sort(kc),fc);return r?new vc([d,r]):d}return r||hc}},{key:"eq",value:function(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(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return wc(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==hc)return fc;if(e.inlineContent||!this.local.some(uc.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof uc||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?bc(t,e,0,dc):hc}}]),e}();pc.empty=new pc([],[]),pc.removeOverlap=wc;var hc=pc.empty,vc=function(){function e(t){h(this,e),this.members=t}return m(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,dc)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return pc.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=hc&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?wc(n?t:t.sort(kc)):fc}}],[{key:"from",value:function(t){switch(t.length){case 0:return hc;case 1:return t[0];default:return new e(t)}}}]),e}();function mc(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new lc(o.from+t,o.to+t,o.type))}return n}function yc(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function gc(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function bc(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=yc(e,t,a+n);if(s){i=!0;var u=bc(s,t,n+a+1,r);u!=hc&&o.push(a,a+t.nodeSize,u)}}));for(var a=mc(i?gc(e):e,-n).sort(kc),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new pc(a,o):hc}function kc(e,t){return e.from-t.from||e.to-t.to}function wc(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),xc(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),xc(t,o+1,i.copy(r.to,i.to)))}}return t}function xc(e,t,n){for(;t<e.length&&kc(n,e[t])>0;)t++;e.splice(t,0,n)}function Oc(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=hc&&t.push(r)})),e.cursorWrapper&&t.push(pc.create(e.state.doc,[e.cursorWrapper.deco])),vc.from(t)}var Ec={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Dc=Ba&&La<=11,Sc=function(){function e(){h(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return m(e,[{key:"set",value:function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}]),e}(),Cc=function(){function e(t,n){var r=this;h(this,e),this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Sc,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)r.queue.push(e[t]);Ba&&La<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?r.flushSoon():r.flush()})),Dc&&(this.onCharData=function(e){r.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return m(e,[{key:"flushSoon",value:function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&this.observer.observe(this.view.dom,Ec),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)}},{key:"onSelectionChange",value:function(){if(cu(this.view)){if(this.suppressingSelectionUpdates)return Zs(this.view);if(Ba&&La<=11&&!this.view.state.selection.empty){var e=this.view.domSelection();if(e.focusNode&&Za(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelection())}},{key:"ignoreSelectionChange",value:function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}},{key:"flush",value:function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&cu(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var u=this.registerMutation(e[s],a);u&&(r=r<0?u.from:Math.min(u.from,r),o=o<0?u.to:Math.max(u.to,o),u.typeOver&&(i=!0))}if(Ia&&a.length>1){var c=a.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var l=c[0],f=c[1];l.parentNode&&l.parentNode.parentNode==f.parentNode?f.remove():l.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(_c)return;_c=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&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.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Zs(this.view),this.currentSelection.set(t))}}},{key:"registerMutation",value:function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(Ba&&La<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],u=s.previousSibling,c=s.nextSibling;(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(o=u),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c)}var l=o&&o.parentNode==e.target?Ka(o)+1:0,f=n.localPosFromDOM(e.target,l,-1),d=i&&i.parentNode==e.target?Ka(i):e.target.childNodes.length;return{from:f,to:n.localPosFromDOM(e.target,d,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}]),e}(),_c=!1;function jc(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if($a&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||$a&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function Ac(e,t,n,r,o){if(t<0){var i=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,a=Qs(e,i);if(a&&!e.state.selection.eq(a)){var s=e.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),e.dispatch(s)}}else{var u=e.state.doc.resolve(t),c=u.sharedDepth(n);t=u.before(c+1),n=e.state.doc.resolve(n).after(c+1);var l=e.state.selection,f=function(e,t,n){var r,o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,s=o.toOffset,u=o.from,c=o.to,l=e.domSelection(),f=l.anchorNode;if(f&&e.dom.contains(1==f.nodeType?f:f.parentNode)&&(r=[{node:f,offset:l.anchorOffset}],as(l)||r.push({node:l.focusNode,offset:l.focusOffset})),Ua&&8===e.input.lastKeyCode)for(var d=s;d>a;d--){var p=i.childNodes[d-1],h=p.pmViewDesc;if("BR"==p.nodeName&&!h){s=d;break}if(!h||h.size)break}var v=e.state.doc,m=e.someProp("domParser")||ui.fromSchema(e.state.schema),y=v.resolve(u),g=null,b=m.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",findPositions:r,ruleFromNode:jc,context:y});if(r&&null!=r[0].pos){var k=r[0].pos,w=r[1]&&r[1].pos;null==w&&(w=k),g={anchor:k+u,head:w+u}}return{doc:b,sel:g,from:u,to:c}}(e,t,n);if(Ua&&e.cursorWrapper&&f.sel&&f.sel.anchor==e.cursorWrapper.deco.from){var d=e.cursorWrapper.deco.type.toDOM.nextSibling,p=d&&d.nodeValue?d.nodeValue.length:1;f.sel={anchor:f.sel.anchor+p,head:f.sel.anchor+p}}var h,v,m=e.state.doc,y=m.slice(f.from,f.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(h=e.state.selection.to,v="end"):(h=e.state.selection.from,v="start"),e.input.lastKeyCode=null;var g=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,u=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,u))-i}if(s<i&&e.size<t.size){u=(i-=r<=i&&r>=s?i-r:0)+(u-s),s=i}else if(u<i){s=(i-=r<=i&&r>=u?i-r:0)+(s-u),u=i}return{start:i,endA:s,endB:u}}(y.content,f.doc.content,f.from,h,v);if((Ha&&e.input.lastIOSEnter>Date.now()-225||Wa)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!g||g.endA>=g.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,ss(13,"Enter"))})))e.input.lastIOSEnter=0;else{if(!g){if(!(r&&l instanceof da&&!l.empty&&l.$head.sameParent(l.$anchor))||e.composing||f.sel&&f.sel.anchor!=f.sel.head){if(f.sel){var b=Tc(e,e.state.doc,f.sel);b&&!b.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(b))}return}g={start:l.from,endA:l.to,endB:l.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&g.start==g.endB&&e.state.selection instanceof da&&(g.start>e.state.selection.from&&g.start<=e.state.selection.from+2&&e.state.selection.from>=f.from?g.start=e.state.selection.from:g.endA<e.state.selection.to&&g.endA>=e.state.selection.to-2&&e.state.selection.to<=f.to&&(g.endB+=e.state.selection.to-g.endA,g.endA=e.state.selection.to)),Ba&&La<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>f.from&&" \xa0"==f.doc.textBetween(g.start-f.from-1,g.start-f.from+1)&&(g.start--,g.endA--,g.endB--);var k,w=f.doc.resolveNoCache(g.start-f.from),x=f.doc.resolveNoCache(g.endB-f.from),O=m.resolve(g.start),E=w.sameParent(x)&&w.parent.inlineContent&&O.end()>=g.endA;if((Ha&&e.input.lastIOSEnter>Date.now()-225&&(!E||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!E&&w.pos<f.doc.content.size&&(k=ua.findFrom(f.doc.resolve(w.pos+1),1,!0))&&k.head==x.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,ss(13,"Enter"))})))e.input.lastIOSEnter=0;else if(e.state.selection.anchor>g.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Nc(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(Nc(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||Nc(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(m,g.start,g.endA,w,x)&&e.someProp("handleKeyDown",(function(t){return t(e,ss(8,"Backspace"))})))Wa&&Ua&&e.domObserver.suppressSelectionUpdates();else{Ua&&Wa&&g.endB==g.start&&(e.input.lastAndroidDelete=Date.now()),Wa&&!E&&w.start()!=x.start()&&0==x.parentOffset&&w.depth==x.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==g.endA&&(g.endB-=2,x=f.doc.resolveNoCache(g.endB-f.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,ss(13,"Enter"))}))}),20));var D,S,C,_=g.start,j=g.endA;if(E)if(w.pos==x.pos)Ba&&La<=11&&0==w.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Zs(e)}),20)),D=e.state.tr.delete(_,j),S=m.resolve(g.start).marksAcross(m.resolve(g.endA));else if(g.endA==g.endB&&(C=function(e,t){for(var n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,s=i,u=a,c=0;c<a.length;c++)s=a[c].removeFromSet(s);for(var l=0;l<i.length;l++)u=i[l].removeFromSet(u);if(1==s.length&&0==u.length)r=s[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=s.length||1!=u.length)return null;r=u[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var f=[],d=0;d<t.childCount;d++)f.push(o(t.child(d)));if(go.from(f).eq(e))return{mark:r,type:n}}(w.parent.content.cut(w.parentOffset,x.parentOffset),O.parent.content.cut(O.parentOffset,g.endA-O.start()))))D=e.state.tr,"add"==C.type?D.addMark(_,j,C.mark):D.removeMark(_,j,C.mark);else if(w.parent.child(w.index()).isText&&w.index()==x.index()-(x.textOffset?0:1)){var A=w.parent.textBetween(w.parentOffset,x.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,_,j,A)})))return;D=e.state.tr.insertText(A,_,j)}if(D||(D=e.state.tr.replace(_,j,f.doc.slice(g.start-f.from,g.endB-f.from))),f.sel){var T=Tc(e,D.doc,f.sel);T&&!(Ua&&Wa&&e.composing&&T.empty&&(g.start!=g.endB||e.input.lastAndroidDelete<Date.now()-100)&&(T.head==_||T.head==D.mapping.map(j)-1)||Ba&&T.empty&&T.head==_)&&D.setSelection(T)}S&&D.ensureMarks(S),e.dispatch(D.scrollIntoView())}}}}function Tc(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:uu(e,t.resolve(n.anchor),t.resolve(n.head))}function Nc(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}var Mc=function(){function e(t,n){var r=this;h(this,e),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 Bu,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Lc),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=Pc(this),Rc(this),this.nodeViews=Bc(this),this.docView=Rs(this.state.doc,Fc(this),Oc(this),this.dom,this),this.domObserver=new Cc(this,(function(e,t,n,o){return Ac(r,e,t,n,o)})),this.domObserver.start(),function(e){var t=function(t){var n=Ru[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||zu(e,t)||!e.editable&&t.type in Pu||n(e,t)})};for(var n in Ru)t(n);$a&&e.dom.addEventListener("input",(function(){return null})),Iu(e)}(this),this.updatePluginViews()}return m(e,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}},{key:"update",value:function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Iu(this),this._props=e,e.plugins&&(e.plugins.forEach(Lc),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}},{key:"setProps",value:function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)}},{key:"updateState",value:function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}},{key:"updateStateInner",value:function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(Zu(this),i=!0),this.state=e,t){var a=Bc(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),Iu(this)}this.editable=Pc(this),Rc(this);var s=Oc(this),u=Fc(this),c=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",l=o||!this.docView.matchesNode(e.doc,u,s);!l&&e.selection.eq(r.selection)||(i=!0);var f="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s&&s!=e.dom&&e.dom.contains(s)){var u=s.getBoundingClientRect();if(u.top>=o-20){t=s,n=u.top;break}}}return{refDOM:t,refTop:n,stack:ds(e.dom)}}(this);if(i){this.domObserver.stop();var d=l&&(Ba||Ua)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(l){var p=Ua?this.trackWrites=this.domSelection().focusNode:null;!o&&this.docView.update(e.doc,u,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Rs(e.doc,u,s,this.dom,this)),p&&!this.trackWrites&&(d=!0)}d||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return Za(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Zs(this,d):(au(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==c)this.dom.scrollTop=0;else if("to selection"==c){var h=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(function(e){return e(n)})));else if(e.selection instanceof ha){var v=this.docView.domAfterPos(e.selection.from);1==v.nodeType&&fs(this,v.getBoundingClientRect(),h)}else fs(this,this.coordsAtPos(e.selection.head,1),h)}else f&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;ps(r,0==o?0:o-n)}(f)}},{key:"destroyPluginViews",value:function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()}},{key:"updatePluginViews",value:function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}}},{key:"someProp",value:function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var u=a[s].props[e];if(null!=u&&(n=t?t(u):u))return n}}},{key:"hasFocus",value:function(){return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(hs)return e.focus(hs);var t=ds(e);e.focus(null==hs?{get preventScroll(){return hs={preventScroll:!0},!0}}:void 0),hs||(hs=!1,ps(t,0))}(this.dom),Zs(this),this.domObserver.start()}},{key:"root",get:function(){var e=this,t=this._root;if(null==t)for(var n=function(t){if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return t.ownerDocument.getSelection()}),{v:e._root=t}},r=this.dom.parentNode;r;r=r.parentNode){var o=n(r);if("object"===typeof o)return o.v}return t||document}},{key:"posAtCoords",value:function(e){return gs(this,e)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return ws(this,e,t)}},{key:"domAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}},{key:"nodeDOM",value:function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null}},{key:"posAtDOM",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}},{key:"endOfTextblock",value:function(e,t){return js(this,t||this.state,e)}},{key:"destroy",value:function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Oc(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}},{key:"isDestroyed",get:function(){return null==this.docView}},{key:"dispatchEvent",value:function(e){return function(e,t){zu(e,t)||!Ru[t.type]||!e.editable&&t.type in Pu||Ru[t.type](e,t)}(this,e)}},{key:"dispatch",value:function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),e}();function Fc(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[lc.node(0,e.state.doc.content.size,t)]}function Rc(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:lc.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Pc(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function Bc(e){var t=Object.create(null);function n(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Lc(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Ic={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:"'",229:"q"},zc={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Uc="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Vc="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),$c="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Hc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),qc="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Wc=Uc&&(Hc||+Uc[1]<57)||$c&&Hc,Gc=0;Gc<10;Gc++)Ic[48+Gc]=Ic[96+Gc]=String(Gc);for(Gc=1;Gc<=24;Gc++)Ic[Gc+111]="F"+Gc;for(Gc=65;Gc<=90;Gc++)Ic[Gc]=String.fromCharCode(Gc+32),zc[Gc]=String.fromCharCode(Gc);for(var Yc in Ic)zc.hasOwnProperty(Yc)||(zc[Yc]=Ic[Yc]);var Kc="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Jc(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var u=i[s];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: "+u);Kc?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function Qc(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function Xc(e){var t=function(e){var t=Object.create(null);for(var n in e)t[Jc(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(Wc&&(e.ctrlKey||e.altKey||e.metaKey)||(Vc||qc)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?zc:Ic)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[Qc(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Ic[n.keyCode])&&r!=o){var s=t[Qc(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var u=t[Qc(o,n,!0)];if(u&&u(e.state,e.dispatch,e))return!0}return!1}}var Zc=function(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)},el=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=rl(r);if(!o){var i=r.blockRange(),a=i&&Pi(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&hl(e,o,t))return!0;if(0==r.parent.content.size&&(tl(s,"end")||ha.isSelectable(s))){var u=Yi(e.doc,r.before(),r.after(),Eo.empty);if(u&&u.slice.size<u.to-u.from){if(t){var c=e.tr.step(u);c.setSelection(tl(s,"end")?ua.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):ha.create(c.doc,o.pos-s.nodeSize)),t(c.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)};function tl(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}var nl=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;i=rl(o)}var a=i&&i.nodeBefore;return!(!a||!ha.isSelectable(a))&&(t&&t(e.tr.setSelection(ha.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function rl(e){if(!e.parent.type.spec.isolating)for(var 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}var ol=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=al(r);if(!o)return!1;var i=o.nodeAfter;if(hl(e,o,t))return!0;if(0==r.parent.content.size&&(tl(i,"start")||ha.isSelectable(i))){var a=Yi(e.doc,r.before(),r.after(),Eo.empty);if(a&&a.slice.size<a.to-a.from){if(t){var s=e.tr.step(a);s.setSelection(tl(i,"start")?ua.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):ha.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)},il=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;i=al(o)}var a=i&&i.nodeAfter;return!(!a||!ha.isSelectable(a))&&(t&&t(e.tr.setSelection(ha.create(e.doc,i.pos)).scrollIntoView()),!0)};function al(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var 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}var sl=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&Pi(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},ul=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function cl(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var ll=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=cl(i.contentMatchAt(a));if(!s||!i.canReplaceWith(a,a,s))return!1;if(t){var u=r.after(),c=e.tr.replaceWith(u,u,s.createAndFill());c.setSelection(ua.near(c.doc.resolve(u),1)),t(c.scrollIntoView())}return!0},fl=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof ma||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=cl(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(da.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},dl=function(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if($i(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&Pi(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},pl=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof ha&&e.selection.node.isBlock)return!(!r.parentOffset||!$i(e.doc,r.pos))&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof da||e.selection instanceof ma)&&a.deleteSelection();var s=0==r.depth?null:cl(r.node(-1).contentMatchAt(r.indexAfter(-1))),u=i&&s?[{type:s}]:void 0,c=$i(a.doc,a.mapping.map(r.pos),1,u);if(u||c||!$i(a.doc,a.mapping.map(r.pos),1,s?[{type:s}]:void 0)||(s&&(u=[{type:s}]),c=!0),c&&(a.split(a.mapping.map(r.pos),1,u),!i&&!r.parentOffset&&r.parent.type!=s)){var l=a.mapping.map(r.before()),f=a.doc.resolve(l);s&&r.node(-1).canReplaceWith(f.index(),f.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0};function hl(e,t,n){var r,o,i=t.nodeBefore,a=t.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(e,t,n){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(i,i+1)||!o.isTextblock&&!qi(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){for(var u=t.pos+a.nodeSize,c=go.empty,l=r.length-1;l>=0;l--)c=go.from(r[l].create(null,c));c=go.from(i.copy(c));var f=e.tr.step(new Mi(t.pos-1,u,t.pos,u,new Eo(c,1,0),r.length,!0)),d=u+2*r.length;qi(f.doc,d)&&f.join(d),n(f.scrollIntoView())}return!0}var p=ua.findFrom(t,1),h=p&&p.$from.blockRange(p.$to),v=h&&Pi(h);if(null!=v&&v>=t.depth)return n&&n(e.tr.lift(h,v).scrollIntoView()),!0;if(s&&tl(a,"start",!0)&&tl(i,"end")){for(var m=i,y=[];y.push(m),!m.isTextblock;)m=m.lastChild;for(var g=a,b=1;!g.isTextblock;g=g.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,g.content)){if(n){for(var k=go.empty,w=y.length-1;w>=0;w--)k=go.from(y[w].copy(k));n(e.tr.step(new Mi(t.pos-y.length,t.pos+a.nodeSize,t.pos+b,t.pos+a.nodeSize-b,new Eo(k,y.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function vl(e){return function(t,n){for(var r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(da.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}var ml=vl(-1),yl=vl(1);function gl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),u=s&&Bi(s,e,t);return!!u&&(r&&r(n.tr.wrap(s,u).scrollIntoView()),!0)}}function bl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function kl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,r){for(var o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var wl=kl(Zc,el,nl),xl=kl(Zc,ol,il),Ol={Enter:kl(ul,fl,dl,pl),"Mod-Enter":ll,Backspace:wl,"Mod-Backspace":wl,"Shift-Backspace":wl,Delete:xl,"Mod-Delete":xl,"Mod-a":function(e,t){return t&&t(e.tr.setSelection(new ma(e.doc))),!0}},El={"Ctrl-h":Ol.Backspace,"Alt-Backspace":Ol["Mod-Backspace"],"Ctrl-d":Ol.Delete,"Ctrl-Alt-Backspace":Ol["Mod-Delete"],"Alt-Delete":Ol["Mod-Delete"],"Alt-d":Ol["Mod-Delete"],"Ctrl-a":ml,"Ctrl-e":yl};for(var Dl in Ol)El[Dl]=Ol[Dl];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function Sl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),u=!1,c=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var l=n.doc.resolve(s.start-2);c=new zo(l,l,s.depth),s.endIndex<s.parent.childCount&&(s=new zo(i,n.doc.resolve(a.end(s.depth)),s.depth)),u=!0}var f=Bi(c,e,t,s);return!!f&&(r&&r(Cl(n.tr,s,f,u,e).scrollIntoView()),!0)}}function Cl(e,t,n,r,o){for(var i=go.empty,a=n.length-1;a>=0;a--)i=go.from(n[a].type.create(n[a].attrs,i));e.step(new Mi(t.start-(r?2:0),t.end,t.start,t.end,new Eo(i,0,0),n.length,!0));for(var s=0,u=0;u<n.length;u++)n[u].type==o&&(s=u+1);for(var c=n.length-s,l=t.start+n.length-(r?2:0),f=t.parent,d=t.startIndex,p=t.endIndex,h=!0;d<p;d++,h=!1)!h&&$i(e.doc,l,c)&&(e.split(l,c),l+=2*c),l+=f.child(d).nodeSize;return e}function _l(e){return function(t,n){var r=t.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(t){return t.childCount>0&&t.firstChild.type==e}));return!!a&&(!n||(o.node(a.depth-1).type==e?function(e,t,n,r){var o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Mi(i-1,a,i,a,new Eo(go.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new zo(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));return t(o.lift(r,Pi(r)).scrollIntoView()),!0}(t,n,e,a):function(e,t,n){for(var r=e.tr,o=n.parent,i=n.end,a=n.endIndex-1,s=n.startIndex;a>s;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var u=r.doc.resolve(n.start),c=u.nodeAfter;if(r.mapping.map(n.end)!=n.start+u.nodeAfter.nodeSize)return!1;var l=0==n.startIndex,f=n.endIndex==o.childCount,d=u.node(-1),p=u.index(-1);if(!d.canReplace(p+(l?0:1),p+1,c.content.append(f?go.empty:go.from(o))))return!1;var h=u.pos,v=h+c.nodeSize;return r.step(new Mi(h-(l?1:0),v+(f?1:0),h+1,v-1,new Eo((l?go.empty:go.from(o.copy(go.empty))).append(f?go.empty:go.from(o.copy(go.empty))),l?0:1,f?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,a)))}}function jl(e){var t=e.state,n=e.transaction,r=n.selection,i=n.doc,a=n.storedMarks;return Object(o.a)(Object(o.a)({},t),{},{apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}})}var Al=function(){function e(t){h(this,e),this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}return m(e,[{key:"hasCustomState",get:function(){return!!this.customState}},{key:"state",get:function(){return this.customState||this.editor.state}},{key:"commands",get:function(){var e=this,t=this.rawCommands,n=this.editor,r=this.state,o=n.view,i=r.tr,a=this.buildProps(i);return Object.fromEntries(Object.entries(t).map((function(t){var n=Object(E.a)(t,2),r=n[0],s=n[1];return[r,function(){var t=s.apply(void 0,arguments)(a);return i.getMeta("preventDispatch")||e.hasCustomState||o.dispatch(i),t}]})))}},{key:"chain",get:function(){var e=this;return function(){return e.createChain()}}},{key:"can",get:function(){var e=this;return function(){return e.createCan()}}},{key:"createChain",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,i=this.editor,a=this.state,s=i.view,u=[],c=!!e,l=e||a.tr,f=function(){return c||!n||l.getMeta("preventDispatch")||t.hasCustomState||s.dispatch(l),u.every((function(e){return!0===e}))},d=Object(o.a)(Object(o.a)({},Object.fromEntries(Object.entries(r).map((function(e){var r=Object(E.a)(e,2),o=r[0],i=r[1];return[o,function(){var e=t.buildProps(l,n),r=i.apply(void 0,arguments)(e);return u.push(r),d}]})))),{},{run:f});return d}},{key:"createCan",value:function(e){var t=this,n=this.rawCommands,r=this.state,i=void 0,a=e||r.tr,s=this.buildProps(a,i),u=Object.fromEntries(Object.entries(n).map((function(e){var t=Object(E.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(Object(o.a)(Object(o.a)({},s),{},{dispatch:i}))}]})));return Object(o.a)(Object(o.a)({},u),{},{chain:function(){return t.createChain(a,i)}})}},{key:"buildProps",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,i=this.state,a=o.view;i.storedMarks&&e.setStoredMarks(i.storedMarks);var s={tr:e,editor:o,view:a,state:jl({state:i,transaction:e}),dispatch:n?function(){}:void 0,chain:function(){return t.createChain(e)},can:function(){return t.createCan(e)},get commands(){return Object.fromEntries(Object.entries(r).map((function(e){var t=Object(E.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(s)}]})))}};return s}}]),e}(),Tl=function(){function e(){h(this,e),this.callbacks={}}return m(e,[{key:"on",value:function(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=this.callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){var n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((function(e){return e!==t})):delete this.callbacks[e]),this}},{key:"removeAllListeners",value:function(){this.callbacks={}}}]),e}();function Nl(e,t,n){return void 0===e.config[t]&&e.parent?Nl(e.parent,t,n):"function"===typeof e.config[t]?e.config[t].bind(Object(o.a)(Object(o.a)({},n),{},{parent:e.parent?Nl(e.parent,t,n):null})):e.config[t]}function Ml(e){return{baseExtensions:e.filter((function(e){return"extension"===e.type})),nodeExtensions:e.filter((function(e){return"node"===e.type})),markExtensions:e.filter((function(e){return"mark"===e.type}))}}function Fl(e){var t=[],n=Ml(e),r=n.nodeExtensions,i=n.markExtensions,a=[].concat(Object(J.a)(r),Object(J.a)(i)),s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((function(e){var n=Nl(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});n&&n().forEach((function(e){e.types.forEach((function(n){Object.entries(e.attributes).forEach((function(e){var r=Object(E.a)(e,2),i=r[0],a=r[1];t.push({type:n,name:i,attribute:Object(o.a)(Object(o.a)({},s),a)})}))}))}))})),a.forEach((function(e){var n={name:e.name,options:e.options,storage:e.storage},r=Nl(e,"addAttributes",n);if(r){var i=r();Object.entries(i).forEach((function(n){var r=Object(E.a)(n,2),i=r[0],a=r[1],u=Object(o.a)(Object(o.a)({},s),a);a.isRequired&&void 0===a.default&&delete u.default,t.push({type:e.name,name:i,attribute:u})}))}})),t}function Rl(e,t){if("string"===typeof e){if(!t.nodes[e])throw Error("There is no node type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.nodes[e]}return e}function Pl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return!!e})).reduce((function(e,t){var n=Object(o.a)({},e);return Object.entries(t).forEach((function(e){var t=Object(E.a)(e,2),r=t[0],o=t[1];n[r]?n[r]="class"===r?[n[r],o].join(" "):"style"===r?[n[r],o].join("; "):o:n[r]=o})),n}),{})}function Bl(e,t){return t.filter((function(e){return e.attribute.rendered})).map((function(t){return t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:Object(Q.a)({},t.name,e.attrs[t.name])})).reduce((function(e,t){return Pl(e,t)}),{})}function Ll(e){return"function"===typeof e}function Il(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Ll(e)){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t?e.bind(t).apply(void 0,r):e.apply(void 0,r)}return e}function zl(e,t){return e.style?e:Object(o.a)(Object(o.a)({},e),{},{getAttrs:function(n){var r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;var i=t.reduce((function(e,t){var r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!==typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null===r||void 0===r?e:Object(o.a)(Object(o.a)({},e),{},Object(Q.a)({},t.name,r))}),{});return Object(o.a)(Object(o.a)({},r),i)}})}function Ul(e){return Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(E.a)(e,2),n=t[0],r=t[1];return("attrs"!==n||!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length&&e.constructor===Object}(r))&&(null!==r&&void 0!==r)})))}function Vl(e){var t,n=Fl(e),r=Ml(e),i=r.nodeExtensions,a=r.markExtensions,s=null===(t=i.find((function(e){return Nl(e,"topNode")})))||void 0===t?void 0:t.name,u=Object.fromEntries(i.map((function(t){var r=n.filter((function(e){return e.type===t.name})),i={name:t.name,options:t.options,storage:t.storage},a=e.reduce((function(e,n){var r=Nl(n,"extendNodeSchema",i);return Object(o.a)(Object(o.a)({},e),r?r(t):{})}),{}),s=Ul(Object(o.a)(Object(o.a)({},a),{},{content:Il(Nl(t,"content",i)),marks:Il(Nl(t,"marks",i)),group:Il(Nl(t,"group",i)),inline:Il(Nl(t,"inline",i)),atom:Il(Nl(t,"atom",i)),selectable:Il(Nl(t,"selectable",i)),draggable:Il(Nl(t,"draggable",i)),code:Il(Nl(t,"code",i)),defining:Il(Nl(t,"defining",i)),isolating:Il(Nl(t,"isolating",i)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),u=Il(Nl(t,"parseHTML",i));u&&(s.parseDOM=u.map((function(e){return zl(e,r)})));var c=Nl(t,"renderHTML",i);c&&(s.toDOM=function(e){return c({node:e,HTMLAttributes:Bl(e,r)})});var l=Nl(t,"renderText",i);return l&&(s.toText=l),[t.name,s]}))),c=Object.fromEntries(a.map((function(t){var r=n.filter((function(e){return e.type===t.name})),i={name:t.name,options:t.options,storage:t.storage},a=e.reduce((function(e,n){var r=Nl(n,"extendMarkSchema",i);return Object(o.a)(Object(o.a)({},e),r?r(t):{})}),{}),s=Ul(Object(o.a)(Object(o.a)({},a),{},{inclusive:Il(Nl(t,"inclusive",i)),excludes:Il(Nl(t,"excludes",i)),group:Il(Nl(t,"group",i)),spanning:Il(Nl(t,"spanning",i)),code:Il(Nl(t,"code",i)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),u=Il(Nl(t,"parseHTML",i));u&&(s.parseDOM=u.map((function(e){return zl(e,r)})));var c=Nl(t,"renderHTML",i);return c&&(s.toDOM=function(e){return c({mark:e,HTMLAttributes:Bl(e,r)})}),[t.name,s]})));return new ai({topNode:s,nodes:u,marks:c})}function $l(e,t){return t.nodes[e]||t.marks[e]||null}function Hl(e,t){return Array.isArray(t)?t.some((function(t){return("string"===typeof t?t:t.name)===e.name})):t}function ql(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Wl=m((function e(t){h(this,e),this.find=t.find,this.handler=t.handler}));function Gl(e){var t,n=e.editor,r=e.from,o=e.to,i=e.text,a=e.rules,s=e.plugin,u=n.view;if(u.composing)return!1;var c=u.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((function(e){return e.type.spec.code}))))return!1;var l=!1,f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n="";return e.parent.nodesBetween(Math.max(0,e.parentOffset-t),e.parentOffset,(function(t,r,o,i){var a,s,u;n+=(null===(s=(a=t.type.spec).toText)||void 0===s?void 0:s.call(a,{node:t,pos:r,parent:o,index:i}))||(null===(u=e.nodeBefore)||void 0===u?void 0:u.text)||"%leaf%"})),n}(c)+i;return a.forEach((function(e){if(!l){var t=function(e,t){if(ql(t))return t.exec(e);var n=t(e);if(!n)return null;var r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r}(f,e.find);if(t){var a=u.state.tr,c=jl({state:u.state,transaction:a}),d={from:r-(t[0].length-i.length),to:o},p=new Al({editor:n,state:c}),h=p.commands,v=p.chain,m=p.can;null!==e.handler({state:c,range:d,match:t,commands:h,chain:v,can:m})&&a.steps.length&&(a.setMeta(s,{transform:a,from:r,to:o,text:i}),u.dispatch(a),l=!0)}}})),l}function Yl(e){var t=e.editor,n=e.rules,r=new Ca({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,o,i,a){return Gl({editor:t,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:function(e){return setTimeout((function(){var o=e.state.selection.$cursor;o&&Gl({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1}},handleKeyDown:function(e,o){if("Enter"!==o.key)return!1;var i=e.state.selection.$cursor;return!!i&&Gl({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}var Kl=m((function e(t){h(this,e),this.find=t.find,this.handler=t.handler}));function Jl(e){var t=e.editor,n=e.state,r=e.from,o=e.to,i=e.rule,a=new Al({editor:t,state:n}),s=a.commands,u=a.chain,c=a.can,l=[];return n.doc.nodesBetween(r,o,(function(e,t){if(e.isTextblock&&!e.type.spec.code){var a=Math.max(r,t),f=Math.min(o,t+e.content.size);(function(e,t){if(ql(t))return Object(J.a)(e.matchAll(t));var n=t(e);return n?n.map((function(t){var n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(a-t,f-t,void 0,"\ufffc"),i.find).forEach((function(e){if(void 0!==e.index){var t=a+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=i.handler({state:n,range:o,match:e,commands:s,chain:u,can:c});l.push(f)}}))}})),l.every((function(e){return null!==e}))}var Ql=function(){function e(t,n){var r=this;h(this,e),this.splittableMarks=[],this.editor=n,this.extensions=e.resolve(t),this.schema=Vl(this.extensions),this.extensions.forEach((function(e){var t;r.editor.extensionStorage[e.name]=e.storage;var n={name:e.name,options:e.options,storage:e.storage,editor:r.editor,type:$l(e.name,r.schema)};"mark"===e.type&&((null===(t=Il(Nl(e,"keepOnSplit",n)))||void 0===t||t)&&r.splittableMarks.push(e.name));var o=Nl(e,"onBeforeCreate",n);o&&r.editor.on("beforeCreate",o);var i=Nl(e,"onCreate",n);i&&r.editor.on("create",i);var a=Nl(e,"onUpdate",n);a&&r.editor.on("update",a);var s=Nl(e,"onSelectionUpdate",n);s&&r.editor.on("selectionUpdate",s);var u=Nl(e,"onTransaction",n);u&&r.editor.on("transaction",u);var c=Nl(e,"onFocus",n);c&&r.editor.on("focus",c);var l=Nl(e,"onBlur",n);l&&r.editor.on("blur",l);var f=Nl(e,"onDestroy",n);f&&r.editor.on("destroy",f)}))}return m(e,[{key:"commands",get:function(){var e=this;return this.extensions.reduce((function(t,n){var r=Nl(n,"addCommands",{name:n.name,options:n.options,storage:n.storage,editor:e.editor,type:$l(n.name,e.schema)});return r?Object(o.a)(Object(o.a)({},t),r()):t}),{})}},{key:"plugins",get:function(){var t=this,n=this.editor,r=e.sort(Object(J.a)(this.extensions).reverse()),o=[],i=[],a=r.map((function(e){var r={name:e.name,options:e.options,storage:e.storage,editor:n,type:$l(e.name,t.schema)},a=[],s=Nl(e,"addKeyboardShortcuts",r);if(s){var u=function(e){return new Ca({props:{handleKeyDown:Xc(e)}})}(Object.fromEntries(Object.entries(s()).map((function(e){var t=Object(E.a)(e,2),r=t[0],o=t[1];return[r,function(){return o({editor:n})}]}))));a.push(u)}var c=Nl(e,"addInputRules",r);Hl(e,n.options.enableInputRules)&&c&&o.push.apply(o,Object(J.a)(c()));var l=Nl(e,"addPasteRules",r);Hl(e,n.options.enablePasteRules)&&l&&i.push.apply(i,Object(J.a)(l()));var f=Nl(e,"addProseMirrorPlugins",r);if(f){var d=f();a.push.apply(a,Object(J.a)(d))}return a})).flat();return[Yl({editor:n,rules:o})].concat(Object(J.a)(function(e){var t=e.editor,n=e.rules,r=null,o=!1,i=!1;return n.map((function(e){return new Ca({view:function(e){var t=function(t){var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy:function(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:function(e){return i=r===e.dom.parentElement,!1},paste:function(e,t){var n,r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null===r||void 0===r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:function(n,r,a){var s=n[0],u="paste"===s.getMeta("uiEvent")&&!o,c="drop"===s.getMeta("uiEvent")&&!i;if(u||c){var l=r.doc.content.findDiffStart(a.doc.content),f=r.doc.content.findDiffEnd(a.doc.content);if("number"===typeof l&&f&&l!==f.b){var d=a.tr,p=jl({state:a,transaction:d});if(Jl({editor:t,state:p,from:Math.max(l-1,0),to:f.b,rule:e})&&d.steps.length)return d}}}})}))}({editor:n,rules:i})),Object(J.a)(a))}},{key:"attributes",get:function(){return Fl(this.extensions)}},{key:"nodeViews",get:function(){var e=this,t=this.editor,n=Ml(this.extensions).nodeExtensions;return Object.fromEntries(n.filter((function(e){return!!Nl(e,"addNodeView")})).map((function(n){var r=e.attributes.filter((function(e){return e.type===n.name})),o={name:n.name,options:n.options,storage:n.storage,editor:t,type:Rl(n.name,e.schema)},i=Nl(n,"addNodeView",o);if(!i)return[];return[n.name,function(e,o,a,s){var u=Bl(e,r);return i()({editor:t,node:e,getPos:a,decorations:s,HTMLAttributes:u,extension:n})}]})))}}],[{key:"resolve",value:function(t){var n=e.sort(e.flatten(t)),r=function(e){var t=e.filter((function(t,n){return e.indexOf(t)!==n}));return Object(J.a)(new Set(t))}(n.map((function(e){return e.name})));return r.length&&console.warn("[tiptap warn]: Duplicate extension names found: [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"]. This can lead to issues.")),n}},{key:"flatten",value:function(e){var t=this;return e.map((function(e){var n=Nl(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return n?[e].concat(Object(J.a)(t.flatten(n()))):e})).flat(10)}},{key:"sort",value:function(e){return e.sort((function(e,t){var n=Nl(e,"priority")||100,r=Nl(t,"priority")||100;return n>r?-1:n<r?1:0}))}}]),e}();function Xl(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function Zl(e,t){var n=Object(o.a)({},e);return Xl(e)&&Xl(t)&&Object.keys(t).forEach((function(r){Xl(t[r])&&r in e?n[r]=Zl(e[r],t[r]):Object.assign(n,Object(Q.a)({},r,t[r]))})),n}var ef=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Il(Nl(this,"addOptions",{name:this.name}))),this.storage=Il(Nl(this,"addStorage",{name:this.name,options:this.options}))||{}}return m(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Zl(this.options,e),t.storage=Il(Nl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Il(Nl(n,"addOptions",{name:n.name})),n.storage=Il(Nl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function tf(e,t,n){var r=t.from,o=t.to,i=n||{},a=i.blockSeparator,s=void 0===a?"\n\n":a,u=i.textSerializers,c=void 0===u?{}:u,l="",f=!0;return e.nodesBetween(r,o,(function(e,n,i,a){var u,d=null===c||void 0===c?void 0:c[e.type.name];d?(e.isBlock&&!f&&(l+=s,f=!0),i&&(l+=d({node:e,pos:n,parent:i,index:a,range:t}))):e.isText?(l+=null===(u=null===e||void 0===e?void 0:e.text)||void 0===u?void 0:u.slice(Math.max(r,n)-n,o-n),f=!1):e.isBlock&&!f&&(l+=s,f=!0)})),l}function nf(e){return Object.fromEntries(Object.entries(e.nodes).filter((function(e){return Object(E.a)(e,2)[1].spec.toText})).map((function(e){var t=Object(E.a)(e,2);return[t[0],t[1].spec.toText]})))}var rf=ef.create({name:"clipboardTextSerializer",addProseMirrorPlugins:function(){var e=this;return[new Ca({key:new Aa("clipboardTextSerializer"),props:{clipboardTextSerializer:function(){var t=e.editor,n=t.state,r=t.schema,o=n.doc,i=n.selection.ranges,a=Math.min.apply(Math,Object(J.a)(i.map((function(e){return e.$from.pos})))),s=Math.max.apply(Math,Object(J.a)(i.map((function(e){return e.$to.pos}))));return tf(o,{from:a,to:s},{textSerializers:nf(r)})}}})]}});function of(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0},r=Object.keys(t);return!r.length||r.every((function(r){return n.strict?t[r]===e[r]:ql(t[r])?t[r].test(e[r]):t[r]===e[r]}))}function af(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.find((function(e){return e.type===t&&of(e.attrs,n)}))}function sf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!!af(e,t,n)}function uf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t){var r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),r.node){var o=af(Object(J.a)(r.node.marks),t,n);if(o){var i=r.index,a=e.start()+r.offset,s=i+1,u=a+r.node.nodeSize;for(af(Object(J.a)(r.node.marks),t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,a-=e.parent.child(i).nodeSize;for(;s<e.parent.childCount&&sf(Object(J.a)(e.parent.child(s).marks),t,n);)u+=e.parent.child(s).nodeSize,s+=1;return{from:a,to:u}}}}}function cf(e,t){if("string"===typeof e){if(!t.marks[e])throw Error("There is no mark type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.marks[e]}return e}function lf(e){return e&&"object"===typeof e&&!Array.isArray(e)&&!function(e){var t;return"class"===(null===(t=e.constructor)||void 0===t?void 0:t.toString().substring(0,5))}(e)}function ff(e){return lf(e)&&e instanceof da}function df(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(e,t),n)}function pf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;var n=ua.atStart(e),r=ua.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;var o=n.from,i=r.to;return"all"===t?da.create(e,df(0,o,i),df(e.content.size,o,i)):da.create(e,df(t,o,i),df(t,o,i))}function hf(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function vf(e){var t="<body>".concat(e,"</body>");return(new window.DOMParser).parseFromString(t,"text/html").body}function mf(e,t,n){if(n=Object(o.a)({slice:!0,parseOptions:{}},n),"object"===typeof e&&null!==e)try{return Array.isArray(e)?go.fromArray(e.map((function(e){return t.nodeFromJSON(e)}))):t.nodeFromJSON(e)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",i),mf("",t,n)}if("string"===typeof e){var r=ui.fromSchema(t);return n.slice?r.parseSlice(vf(e),n.parseOptions).content:r.parse(vf(e),n.parseOptions)}return mf("",t,n)}function yf(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}function gf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.from,i=r.to,a=r.empty,s=t?Rl(t,e.schema):null,u=[];e.doc.nodesBetween(o,i,(function(e,t){if(!e.isText){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);u.push({node:e,from:n,to:r})}}));var c=i-o,l=u.filter((function(e){return!s||s.name===e.node.type.name})).filter((function(e){return of(e.node.attrs,n,{strict:!1})}));if(a)return!!l.length;var f=l.reduce((function(e,t){return e+t.to-t.from}),0);return f>=c}function bf(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function kf(e,t){var n="string"===typeof t?[t]:t;return Object.keys(e).reduce((function(t,r){return n.includes(r)||(t[r]=e[r]),t}),{})}function wf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return mf(e,t,{slice:!1,parseOptions:n})}function xf(e,t){var n=cf(t,e.schema),r=e.selection,i=r.from,a=r.to,s=r.empty,u=[];s?(e.storedMarks&&u.push.apply(u,Object(J.a)(e.storedMarks)),u.push.apply(u,Object(J.a)(e.selection.$head.marks()))):e.doc.nodesBetween(i,a,(function(e){u.push.apply(u,Object(J.a)(e.marks))}));var c=u.find((function(e){return e.type.name===n.name}));return c?Object(o.a)({},c.attrs):{}}function Of(e,t,n){return Object.fromEntries(Object.entries(n).filter((function(n){var r=Object(E.a)(n,1)[0],o=e.find((function(e){return e.type===t&&e.name===r}));return!!o&&o.attribute.keepOnSplit})))}function Ef(e){for(var t=0;t<e.edgeCount;t+=1){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Df(e,t){var n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){var r=n.filter((function(e){return null===t||void 0===t?void 0:t.includes(e.type.name)}));e.tr.ensureMarks(r)}}function Sf(e){return function(t){return function(e,t){for(var n=e.depth;n>0;n-=1){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}}function Cf(e,t){var n=Ml(t).nodeExtensions.find((function(t){return t.name===e}));if(!n)return!1;var r=Il(Nl(n,"group",{name:n.name,options:n.options,storage:n.storage}));return"string"===typeof r&&r.split(" ").includes("list")}var _f=function(e,t){var n=Sf((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!qi(e.doc,n.pos)||(e.join(n.pos),!0)},jf=function(e,t){var n=Sf((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!qi(e.doc,r)||(e.join(r),!0)};function Af(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.empty,i=r.ranges,a=t?cf(t,e.schema):null;if(o)return!!(e.storedMarks||e.selection.$from.marks()).filter((function(e){return!a||a.name===e.type.name})).find((function(e){return of(e.attrs,n,{strict:!1})}));var s=0,u=[];if(i.forEach((function(t){var n=t.$from,r=t.$to,o=n.pos,i=r.pos;e.doc.nodesBetween(o,i,(function(e,t){if(e.isText||e.marks.length){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);s+=r-n,u.push.apply(u,Object(J.a)(e.marks.map((function(e){return{mark:e,from:n,to:r}}))))}}))})),0===s)return!1;var c=u.filter((function(e){return!a||a.name===e.mark.type.name})).filter((function(e){return of(e.mark.attrs,n,{strict:!1})})).reduce((function(e,t){return e+t.to-t.from}),0),l=u.filter((function(e){return!a||e.mark.type!==a&&e.mark.type.excludes(a)})).reduce((function(e,t){return e+t.to-t.from}),0),f=c>0?c+l:c;return f>=s}var Tf=Object.freeze({__proto__:null,blur:function(){return function(e){var t=e.editor,n=e.view;return requestAnimationFrame((function(){var e;t.isDestroyed||(n.dom.blur(),null===(e=null===window||void 0===window?void 0:window.getSelection())||void 0===e||e.removeAllRanges())})),!0}},clearContent:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t){return t.commands.setContent("",e)}},clearNodes:function(){return function(e){var t=e.state,n=e.tr,r=e.dispatch,o=n.selection.ranges;return!r||(o.forEach((function(e){var r=e.$from,o=e.$to;t.doc.nodesBetween(r.pos,o.pos,(function(e,t){if(!e.type.isText){var r=n.doc,o=n.mapping,i=r.resolve(o.map(t)),a=r.resolve(o.map(t+e.nodeSize)),s=i.blockRange(a);if(s){var u=Pi(s);if(e.type.isTextblock){var c=i.parent.contentMatchAt(i.index()).defaultType;n.setNodeMarkup(s.start,c)}(u||0===u)&&n.lift(s,u)}}}))})),!0)}},command:function(e){return function(t){return e(t)}},createParagraphNear:function(){return function(e){var t=e.state,n=e.dispatch;return fl(t,n)}},deleteNode:function(e){return function(t){for(var n=t.tr,r=t.state,o=t.dispatch,i=Rl(e,r.schema),a=n.selection.$anchor,s=a.depth;s>0;s-=1){if(a.node(s).type===i){if(o){var u=a.before(s),c=a.after(s);n.delete(u,c).scrollIntoView()}return!0}}return!1}},deleteRange:function(e){return function(t){var n=t.tr,r=t.dispatch,o=e.from,i=e.to;return r&&n.delete(o,i),!0}},deleteSelection:function(){return function(e){var t=e.state,n=e.dispatch;return Zc(t,n)}},enter:function(){return function(e){return e.commands.keyboardShortcut("Enter")}},exitCode:function(){return function(e){var t=e.state,n=e.dispatch;return ll(t,n)}},extendMarkRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=cf(e,o.schema),s=r.doc,u=r.selection,c=u.$from,l=u.from,f=u.to;if(i){var d=uf(c,a,t);if(d&&d.from<=l&&d.to>=f){var p=da.create(s,d.from,d.to);r.setSelection(p)}}return!0}},first:function(e){return function(t){for(var n="function"===typeof e?e(t):e,r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1}},focus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.editor,i=n.view,a=n.tr,s=n.dispatch;t=Object(o.a)({scrollIntoView:!0},t);var u=function(){hf()&&i.dom.focus(),requestAnimationFrame((function(){r.isDestroyed||(i.focus(),(null===t||void 0===t?void 0:t.scrollIntoView)&&r.commands.scrollIntoView())}))};if(i.hasFocus()&&null===e||!1===e)return!0;if(s&&null===e&&!ff(r.state.selection))return u(),!0;var c=pf(a.doc,e)||r.state.selection,l=r.state.selection.eq(c);return s&&(l||a.setSelection(c),l&&a.storedMarks&&a.setStoredMarks(a.storedMarks),u()),!0}},forEach:function(e,t){return function(n){return e.every((function(e,r){return t(e,Object(o.a)(Object(o.a)({},n),{},{index:r}))}))}},insertContent:function(e,t){return function(n){var r=n.tr;return n.commands.insertContentAt({from:r.selection.from,to:r.selection.to},e,t)}},insertContentAt:function(e,t,n){return function(r){var i=r.tr,a=r.dispatch,s=r.editor;if(a){n=Object(o.a)({parseOptions:{},updateSelection:!0},n);var u=mf(t,s.schema,{parseOptions:Object(o.a)({preserveWhitespace:"full"},n.parseOptions)});if("<>"===u.toString())return!0;var c="number"===typeof e?{from:e,to:e}:e,l=c.from,f=c.to,d=!0,p=!0;if((u.toString().startsWith("<")?u:[u]).forEach((function(e){e.check(),d=!!d&&(e.isText&&0===e.marks.length),p=!!p&&e.isBlock})),l===f&&p){var h=i.doc.resolve(l).parent;h.isTextblock&&!h.type.spec.code&&!h.childCount&&(l-=1,f+=1)}d?i.insertText(t,l,f):i.replaceWith(l,f,u),n.updateSelection&&function(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o=e.steps[r];if(o instanceof Ni||o instanceof Mi){var i=e.mapping.maps[r],a=0;i.forEach((function(e,t,n,r){0===a&&(a=r)})),e.setSelection(ua.near(e.doc.resolve(a),n))}}}(i,i.steps.length-1,-1)}return!0}},joinBackward:function(){return function(e){var t=e.state,n=e.dispatch;return el(t,n)}},joinForward:function(){return function(e){var t=e.state,n=e.dispatch;return ol(t,n)}},keyboardShortcut:function(e){return function(t){var n=t.editor,r=t.view,o=t.tr,i=t.dispatch,a=function(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"===a&&(a=" ");for(var s=0;s<i.length-1;s+=1){var u=i[s];if(/^(cmd|meta|m)$/i.test(u))o=!0;else if(/^a(lt)?$/i.test(u))t=!0;else if(/^(c|ctrl|control)$/i.test(u))n=!0;else if(/^s(hift)?$/i.test(u))r=!0;else{if(!/^mod$/i.test(u))throw new Error("Unrecognized modifier name: ".concat(u));hf()||yf()?o=!0:n=!0}}return t&&(a="Alt-".concat(a)),n&&(a="Ctrl-".concat(a)),o&&(a="Meta-".concat(a)),r&&(a="Shift-".concat(a)),a}(e).split(/-(?!$)/),s=a.find((function(e){return!["Alt","Ctrl","Meta","Shift"].includes(e)})),u=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),c=n.captureTransaction((function(){r.someProp("handleKeyDown",(function(e){return e(r,u)}))}));return null===c||void 0===c||c.steps.forEach((function(e){var t=e.map(o.mapping);t&&i&&o.maybeStep(t)})),!0}},lift:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return!!gf(r,Rl(e,r.schema),t)&&sl(r,o)}},liftEmptyBlock:function(){return function(e){var t=e.state,n=e.dispatch;return dl(t,n)}},liftListItem:function(e){return function(t){var n=t.state,r=t.dispatch;return _l(Rl(e,n.schema))(n,r)}},newlineInCode:function(){return function(e){var t=e.state,n=e.dispatch;return ul(t,n)}},resetAttributes:function(e,t){return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,u=bf("string"===typeof e?e:e.name,o.schema);return!!u&&("node"===u&&(a=Rl(e,o.schema)),"mark"===u&&(s=cf(e,o.schema)),i&&r.selection.ranges.forEach((function(e){o.doc.nodesBetween(e.$from.pos,e.$to.pos,(function(e,n){a&&a===e.type&&r.setNodeMarkup(n,void 0,kf(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((function(o){s===o.type&&r.addMark(n,n+e.nodeSize,s.create(kf(o.attrs,t)))}))}))})),!0)}},scrollIntoView:function(){return function(e){var t=e.tr;return e.dispatch&&t.scrollIntoView(),!0}},selectAll:function(){return function(e){var t=e.tr;return e.commands.setTextSelection({from:0,to:t.doc.content.size})}},selectNodeBackward:function(){return function(e){var t=e.state,n=e.dispatch;return nl(t,n)}},selectNodeForward:function(){return function(e){var t=e.state,n=e.dispatch;return il(t,n)}},selectParentNode:function(){return function(e){return function(e,t){var n,r=e.selection,o=r.$from,i=r.to,a=o.sharedDepth(i);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(ha.create(e.doc,n))),!0)}(e.state,e.dispatch)}},selectTextblockEnd:function(){return function(e){var t=e.state,n=e.dispatch;return yl(t,n)}},selectTextblockStart:function(){return function(e){var t=e.state,n=e.dispatch;return ml(t,n)}},setContent:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.tr,i=r.editor,a=r.dispatch,s=o.doc,u=wf(e,i.schema,n);return a&&o.replaceWith(0,s.content.size,u).setMeta("preventUpdate",!t),!0}},setMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,i=n.state,a=n.dispatch,s=r.selection,u=s.empty,c=s.ranges,l=cf(e,i.schema);if(a)if(u){var f=xf(i,l);r.addStoredMark(l.create(Object(o.a)(Object(o.a)({},f),t)))}else c.forEach((function(e){var n=e.$from.pos,a=e.$to.pos;i.doc.nodesBetween(n,a,(function(e,i){var s=Math.max(i,n),u=Math.min(i+e.nodeSize,a);e.marks.find((function(e){return e.type===l}))?e.marks.forEach((function(e){l===e.type&&r.addMark(s,u,l.create(Object(o.a)(Object(o.a)({},e.attrs),t)))})):r.addMark(s,u,l.create(t))}))}));return!0}},setMeta:function(e,t){return function(n){return n.tr.setMeta(e,t),!0}},setNode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch,i=n.chain,a=Rl(e,r.schema);return a.isTextblock?i().command((function(e){var n=e.commands;return!!bl(a,t)(r)||n.clearNodes()})).command((function(e){var n=e.state;return bl(a,t)(n,o)})).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}},setNodeSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o=ua.atStart(r).from,i=ua.atEnd(r).to,a=df(e,o,i),s=ha.create(r,a);n.setSelection(s)}return!0}},setTextSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o="number"===typeof e?{from:e,to:e}:e,i=o.from,a=o.to,s=da.atStart(r).from,u=da.atEnd(r).to,c=df(i,s,u),l=df(a,s,u),f=da.create(r,c,l);n.setSelection(f)}return!0}},sinkListItem:function(e){return function(t){var n,r=t.state,o=t.dispatch,i=Rl(e,r.schema);return(n=i,function(e,t){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount>0&&e.firstChild.type==n}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var u=a.parent,c=u.child(s-1);if(c.type!=n)return!1;if(t){var l=c.lastChild&&c.lastChild.type==u.type,f=go.from(l?n.create():null),d=new Eo(go.from(n.create(null,go.from(u.type.create(null,f)))),l?3:1,0),p=a.start,h=a.end;t(e.tr.step(new Mi(p-(l?3:1),h,p,h,d,1,!0)).scrollIntoView())}return!0})(r,o)}},splitBlock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.keepMarks,n=void 0===t||t;return function(e){var t=e.tr,r=e.state,o=e.dispatch,i=e.editor,a=t.selection,s=t.doc,u=a.$from,c=a.$to,l=Of(i.extensionManager.attributes,u.node().type.name,u.node().attrs);if(a instanceof ha&&a.node.isBlock)return!(!u.parentOffset||!$i(s,u.pos))&&(o&&(n&&Df(r,i.extensionManager.splittableMarks),t.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;if(o){var f=c.parentOffset===c.parent.content.size;a instanceof da&&t.deleteSelection();var d=0===u.depth?void 0:Ef(u.node(-1).contentMatchAt(u.indexAfter(-1))),p=f&&d?[{type:d,attrs:l}]:void 0,h=$i(t.doc,t.mapping.map(u.pos),1,p);if(p||h||!$i(t.doc,t.mapping.map(u.pos),1,d?[{type:d}]:void 0)||(h=!0,p=d?[{type:d,attrs:l}]:void 0),h&&(t.split(t.mapping.map(u.pos),1,p),d&&!f&&!u.parentOffset&&u.parent.type!==d)){var v=t.mapping.map(u.before()),m=t.doc.resolve(v);u.node(-1).canReplaceWith(m.index(),m.index()+1,d)&&t.setNodeMarkup(t.mapping.map(u.before()),d)}n&&Df(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0}},splitListItem:function(e){return function(t){var n,r=t.tr,o=t.state,i=t.dispatch,a=t.editor,s=Rl(e,o.schema),u=o.selection,c=u.$from,l=u.$to,f=o.selection.node;if(f&&f.isBlock||c.depth<2||!c.sameParent(l))return!1;var d=c.node(-1);if(d.type!==s)return!1;var p=a.extensionManager.attributes;if(0===c.parent.content.size&&c.node(-1).childCount===c.indexAfter(-1)){if(2===c.depth||c.node(-3).type!==s||c.index(-2)!==c.node(-2).childCount-1)return!1;if(i){for(var h=go.empty,v=c.index(-1)?1:c.index(-2)?2:3,m=c.depth-v;m>=c.depth-3;m-=1)h=go.from(c.node(m).copy(h));var y=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,g=Of(p,c.node().type.name,c.node().attrs),b=(null===(n=s.contentMatch.defaultType)||void 0===n?void 0:n.createAndFill(g))||void 0;h=h.append(go.from(s.createAndFill(null,b)||void 0));var k=c.before(c.depth-(v-1));r.replace(k,c.after(-y),new Eo(h,4-v,0));var w=-1;r.doc.nodesBetween(k,r.doc.content.size,(function(e,t){if(w>-1)return!1;e.isTextblock&&0===e.content.size&&(w=t+1)})),w>-1&&r.setSelection(da.near(r.doc.resolve(w))),r.scrollIntoView()}return!0}var x=l.pos===c.end()?d.contentMatchAt(0).defaultType:null,O=Of(p,d.type.name,d.attrs),E=Of(p,c.node().type.name,c.node().attrs);r.delete(c.pos,l.pos);var D=x?[{type:s,attrs:O},{type:x,attrs:E}]:[{type:s,attrs:O}];return!!$i(r.doc,c.pos,2)&&(i&&r.split(c.pos,2,D).scrollIntoView(),!0)}},toggleList:function(e,t){return function(n){var r=n.editor,o=n.tr,i=n.state,a=n.dispatch,s=n.chain,u=n.commands,c=n.can,l=r.extensionManager.extensions,f=Rl(e,i.schema),d=Rl(t,i.schema),p=i.selection,h=p.$from,v=p.$to,m=h.blockRange(v);if(!m)return!1;var y=Sf((function(e){return Cf(e.type.name,l)}))(p);if(m.depth>=1&&y&&m.depth-y.depth<=1){if(y.node.type===f)return u.liftListItem(d);if(Cf(y.node.type.name,l)&&f.validContent(y.node.content)&&a)return s().command((function(){return o.setNodeMarkup(y.pos,f),!0})).command((function(){return _f(o,f)})).command((function(){return jf(o,f)})).run()}return s().command((function(){return!!c().wrapInList(f)||u.clearNodes()})).wrapInList(f).command((function(){return _f(o,f)})).command((function(){return jf(o,f)})).run()}},toggleMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=n.extendEmptyMarkRange,s=void 0!==a&&a,u=cf(e,o.schema);return Af(o,u,t)?i.unsetMark(u,{extendEmptyMarkRange:s}):i.setMark(u,t)}},toggleNode:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=Rl(e,o.schema),s=Rl(t,o.schema);return gf(o,a,n)?i.setNode(s):i.setNode(a,n)}},toggleWrap:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.commands,i=Rl(e,r.schema);return gf(r,i,t)?o.lift(i):o.wrapIn(i,t)}},undoInputRule:function(){return function(e){for(var t=e.state,n=e.dispatch,r=t.plugins,o=0;o<r.length;o+=1){var i=r[o],a=void 0;if(i.spec.isInputRules&&(a=i.getState(t))){if(n){for(var s=t.tr,u=a.transform,c=u.steps.length-1;c>=0;c-=1)s.step(u.steps[c].invert(u.docs[c]));if(a.text){var l=s.doc.resolve(a.from).marks();s.replaceWith(a.from,a.to,t.schema.text(a.text,l))}else s.delete(a.from,a.to)}return!0}}return!1}},unsetAllMarks:function(){return function(e){var t=e.tr,n=e.dispatch,r=t.selection,o=r.empty,i=r.ranges;return o||n&&i.forEach((function(e){t.removeMark(e.$from.pos,e.$to.pos)})),!0}},unsetMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r,o=n.tr,i=n.state,a=n.dispatch,s=t.extendEmptyMarkRange,u=void 0!==s&&s,c=o.selection,l=cf(e,i.schema),f=c.$from,d=c.empty,p=c.ranges;if(!a)return!0;if(d&&u){var h=c.from,v=c.to,m=null===(r=f.marks().find((function(e){return e.type===l})))||void 0===r?void 0:r.attrs,y=uf(f,l,m);y&&(h=y.from,v=y.to),o.removeMark(h,v,l)}else p.forEach((function(e){o.removeMark(e.$from.pos,e.$to.pos,l)}));return o.removeStoredMark(l),!0}},updateAttributes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,i=n.state,a=n.dispatch,s=null,u=null,c=bf("string"===typeof e?e:e.name,i.schema);return!!c&&("node"===c&&(s=Rl(e,i.schema)),"mark"===c&&(u=cf(e,i.schema)),a&&r.selection.ranges.forEach((function(e){var n=e.$from.pos,a=e.$to.pos;i.doc.nodesBetween(n,a,(function(e,i){s&&s===e.type&&r.setNodeMarkup(i,void 0,Object(o.a)(Object(o.a)({},e.attrs),t)),u&&e.marks.length&&e.marks.forEach((function(s){if(u===s.type){var c=Math.max(i,n),l=Math.min(i+e.nodeSize,a);r.addMark(c,l,u.create(Object(o.a)(Object(o.a)({},s.attrs),t)))}}))}))})),!0)}},wrapIn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return gl(Rl(e,r.schema),t)(r,o)}},wrapInList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return Sl(Rl(e,r.schema),t)(r,o)}}}),Nf=ef.create({name:"commands",addCommands:function(){return Object(o.a)({},Tf)}}),Mf=ef.create({name:"editable",addProseMirrorPlugins:function(){var e=this;return[new Ca({key:new Aa("editable"),props:{editable:function(){return e.editor.options.editable}}})]}}),Ff=ef.create({name:"focusEvents",addProseMirrorPlugins:function(){var e=this.editor;return[new Ca({key:new Aa("focusEvents"),props:{handleDOMEvents:{focus:function(t,n){e.isFocused=!0;var r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:function(t,n){e.isFocused=!1;var r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),Rf=ef.create({name:"keymap",addKeyboardShortcuts:function(){var e=this,t=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.undoInputRule()},function(){return t.command((function(e){var n=e.tr,r=n.selection,o=n.doc,i=r.empty,a=r.$anchor,s=a.pos,u=a.parent,c=ua.atStart(o).from===s;return!(!(i&&c&&u.type.isTextblock)||u.textContent.length)&&t.clearNodes()}))},function(){return t.deleteSelection()},function(){return t.joinBackward()},function(){return t.selectNodeBackward()}]}))},n=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.deleteSelection()},function(){return t.joinForward()},function(){return t.selectNodeForward()}]}))},r={Enter:function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.newlineInCode()},function(){return t.createParagraphNear()},function(){return t.liftEmptyBlock()},function(){return t.splitBlock()}]}))},"Mod-Enter":function(){return e.editor.commands.exitCode()},Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:n,"Mod-Delete":n,"Mod-a":function(){return e.editor.commands.selectAll()}},i=Object(o.a)({},r),a=Object(o.a)(Object(o.a)({},r),{},{"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":n,"Ctrl-Alt-Backspace":n,"Alt-Delete":n,"Alt-d":n,"Ctrl-a":function(){return e.editor.commands.selectTextblockStart()},"Ctrl-e":function(){return e.editor.commands.selectTextblockEnd()}});return hf()||yf()?a:i},addProseMirrorPlugins:function(){var e=this;return[new Ca({key:new Aa("clearDocument"),appendTransaction:function(t,n,r){if(t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc)){var o=n.selection,i=o.empty,a=o.from,s=o.to,u=ua.atStart(n.doc).from,c=ua.atEnd(n.doc).to,l=a===u&&s===c,f=0===r.doc.textBetween(0,r.doc.content.size," "," ").length;if(!i&&l&&f){var d=r.tr,p=jl({state:r,transaction:d});if(new Al({editor:e.editor,state:p}).commands.clearNodes(),d.steps.length)return d}}}})]}}),Pf=ef.create({name:"tabindex",addProseMirrorPlugins:function(){return[new Ca({key:new Aa("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Bf=Object.freeze({__proto__:null,ClipboardTextSerializer:rf,Commands:Nf,Editable:Mf,FocusEvents:Ff,Keymap:Rf,Tabindex:Pf});function Lf(e,t){var n=bf("string"===typeof t?t:t.name,e.schema);return"node"===n?function(e,t){var n=Rl(t,e.schema),r=e.selection,i=r.from,a=r.to,s=[];e.doc.nodesBetween(i,a,(function(e){s.push(e)}));var u=s.reverse().find((function(e){return e.type.name===n.name}));return u?Object(o.a)({},u.attrs):{}}(e,t):"mark"===n?xf(e,t):{}}function If(e,t){var n=gi.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function zf(e,t){return tf(e,{from:0,to:e.content.size},t)}var Uf=function(e){g(n,e);var t=O(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(this,n),(e=t.call(this)).isFocused=!1,e.extensionStorage={},e.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:function(){return null},onCreate:function(){return null},onUpdate:function(){return null},onSelectionUpdate:function(){return null},onTransaction:function(){return null},onFocus:function(){return null},onBlur:function(){return null},onDestroy:function(){return null}},e.isCapturingTransaction=!1,e.capturedTransaction=null,e.setOptions(r),e.createExtensionManager(),e.createCommandManager(),e.createSchema(),e.on("beforeCreate",e.options.onBeforeCreate),e.emit("beforeCreate",{editor:w(e)}),e.createView(),e.injectCSS(),e.on("create",e.options.onCreate),e.on("update",e.options.onUpdate),e.on("selectionUpdate",e.options.onSelectionUpdate),e.on("transaction",e.options.onTransaction),e.on("focus",e.options.onFocus),e.on("blur",e.options.onBlur),e.on("destroy",e.options.onDestroy),window.setTimeout((function(){e.isDestroyed||(e.commands.focus(e.options.autofocus),e.emit("create",{editor:w(e)}))}),0),e}return m(n,[{key:"storage",get:function(){return this.extensionStorage}},{key:"commands",get:function(){return this.commandManager.commands}},{key:"chain",value:function(){return this.commandManager.chain()}},{key:"can",value:function(){return this.commandManager.can()}},{key:"injectCSS",value:function(){this.options.injectCSS&&document&&(this.css=function(e,t){var n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=Object(o.a)(Object(o.a)({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}},{key:"setEditable",value:function(e){this.setOptions({editable:e})}},{key:"isEditable",get:function(){return this.options.editable&&this.view&&this.view.editable}},{key:"state",get:function(){return this.view.state}},{key:"registerPlugin",value:function(e,t){var n=Ll(t)?t(e,Object(J.a)(this.state.plugins)):[].concat(Object(J.a)(this.state.plugins),[e]),r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(e){if(!this.isDestroyed){var t="string"===typeof e?"".concat(e,"$"):e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((function(e){return!e.key.startsWith(t)}))});this.view.updateState(n)}}},{key:"createExtensionManager",value:function(){var e=this.options.enableCoreExtensions?Object.values(Bf):[],t=[].concat(Object(J.a)(e),Object(J.a)(this.options.extensions)).filter((function(e){return["extension","node","mark"].includes(null===e||void 0===e?void 0:e.type)}));this.extensionManager=new Ql(t,this)}},{key:"createCommandManager",value:function(){this.commandManager=new Al({editor:this})}},{key:"createSchema",value:function(){this.schema=this.extensionManager.schema}},{key:"createView",value:function(){var e=wf(this.options.content,this.schema,this.options.parseOptions),t=pf(e,this.options.autofocus);this.view=new Mc(this.options.element,Object(o.a)(Object(o.a)({},this.options.editorProps),{},{dispatchTransaction:this.dispatchTransaction.bind(this),state:Da.create({doc:e,selection:t||void 0})}));var n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.view.dom.editor=this}},{key:"createNodeViews",value:function(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}},{key:"captureTransaction",value:function(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;var t=this.capturedTransaction;return this.capturedTransaction=null,t}},{key:"dispatchTransaction",value:function(e){var t=this;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((function(e){var n;return null===(n=t.capturedTransaction)||void 0===n?void 0:n.step(e)})):void(this.capturedTransaction=e);var n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});var o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}},{key:"getAttributes",value:function(e){return Lf(this.state,e)}},{key:"isActive",value:function(e,t){var n="string"===typeof e?e:null,r="string"===typeof e?t:e;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return gf(e,null,n)||Af(e,null,n);var r=bf(t,e.schema);return"node"===r?gf(e,t,n):"mark"===r&&Af(e,t,n)}(this.state,n,r)}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"getHTML",value:function(){return If(this.state.doc.content,this.schema)}},{key:"getText",value:function(e){var t=e||{},n=t.blockSeparator,r=void 0===n?"\n\n":n,i=t.textSerializers,a=void 0===i?{}:i;return zf(this.state.doc,{blockSeparator:r,textSerializers:Object(o.a)(Object(o.a)({},a),nf(this.schema))})}},{key:"isEmpty",get:function(){return function(e){var t,n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}},{key:"getCharacterCount",value:function(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}},{key:"destroy",value:function(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}},{key:"isDestroyed",get:function(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}]),n}(Tl);function Vf(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,n={};return e.filter((function(e){var r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter((function(e,n){return!t.filter((function(e,t){return t!==n})).some((function(t){return e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to}))}))}function $f(e,t,n){var r=[];return e===t?n.resolve(e).marks().forEach((function(t){var i=uf(n.resolve(e-1),t.type);i&&r.push(Object(o.a)({mark:t},i))})):n.nodesBetween(e,t,(function(e,t){r.push.apply(r,Object(J.a)(e.marks.map((function(n){return{from:t,to:t+e.nodeSize,mark:n}}))))})),r}function Hf(e,t,n){var r=e.state.doc.content.size,i=df(t,0,r),a=df(n,0,r),s=e.coordsAtPos(i),u=e.coordsAtPos(a,-1),c=Math.min(s.top,u.top),l=Math.max(s.bottom,u.bottom),f=Math.min(s.left,u.left),d=Math.max(s.right,u.right),p={top:c,bottom:l,left:f,right:d,width:d-f,height:l-c,x:f,y:c};return Object(o.a)(Object(o.a)({},p),{},{toJSON:function(){return p}})}var qf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Il(Nl(this,"addOptions",{name:this.name}))),this.storage=Il(Nl(this,"addStorage",{name:this.name,options:this.options}))||{}}return m(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Zl(this.options,e),t.storage=Il(Nl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Il(Nl(n,"addOptions",{name:n.name})),n.storage=Il(Nl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}(),Wf=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(o.a)(Object(o.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Il(Nl(this,"addOptions",{name:this.name}))),this.storage=Il(Nl(this,"addStorage",{name:this.name,options:this.options}))||{}}return m(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Zl(this.options,e),t.storage=Il(Nl(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Il(Nl(n,"addOptions",{name:n.name})),n.storage=Il(Nl(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function Gf(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Yf(e){return e instanceof Gf(e).Element||e instanceof Element}function Kf(e){return e instanceof Gf(e).HTMLElement||e instanceof HTMLElement}function Jf(e){return"undefined"!==typeof ShadowRoot&&(e instanceof Gf(e).ShadowRoot||e instanceof ShadowRoot)}var Qf=Math.max,Xf=Math.min,Zf=Math.round;function ed(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(Kf(e)&&t){var i=e.offsetHeight,a=e.offsetWidth;a>0&&(r=Zf(n.width)/a||1),i>0&&(o=Zf(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function td(e){var t=Gf(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nd(e){return e?(e.nodeName||"").toLowerCase():null}function rd(e){return((Yf(e)?e.ownerDocument:e.document)||window.document).documentElement}function od(e){return ed(rd(e)).left+td(e).scrollLeft}function id(e){return Gf(e).getComputedStyle(e)}function ad(e){var t=id(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function sd(e,t,n){void 0===n&&(n=!1);var r=Kf(t),o=Kf(t)&&function(e){var t=e.getBoundingClientRect(),n=Zf(t.width)/e.offsetWidth||1,r=Zf(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=rd(t),a=ed(e,o),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==nd(t)||ad(i))&&(s=function(e){return e!==Gf(e)&&Kf(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:td(e);var t}(t)),Kf(t)?((u=ed(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=od(i))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function ud(e){var t=ed(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function cd(e){return"html"===nd(e)?e:e.assignedSlot||e.parentNode||(Jf(e)?e.host:null)||rd(e)}function ld(e){return["html","body","#document"].indexOf(nd(e))>=0?e.ownerDocument.body:Kf(e)&&ad(e)?e:ld(cd(e))}function fd(e,t){var n;void 0===t&&(t=[]);var r=ld(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Gf(r),a=o?[i].concat(i.visualViewport||[],ad(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(fd(cd(a)))}function dd(e){return["table","td","th"].indexOf(nd(e))>=0}function pd(e){return Kf(e)&&"fixed"!==id(e).position?e.offsetParent:null}function hd(e){for(var t=Gf(e),n=pd(e);n&&dd(n)&&"static"===id(n).position;)n=pd(n);return n&&("html"===nd(n)||"body"===nd(n)&&"static"===id(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Kf(e)&&"fixed"===id(e).position)return null;var n=cd(e);for(Jf(n)&&(n=n.host);Kf(n)&&["html","body"].indexOf(nd(n))<0;){var r=id(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var vd="top",md="bottom",yd="right",gd="left",bd="auto",kd=[vd,md,yd,gd],wd="start",xd="end",Od="viewport",Ed="popper",Dd=kd.reduce((function(e,t){return e.concat([t+"-"+wd,t+"-"+xd])}),[]),Sd=[].concat(kd,[bd]).reduce((function(e,t){return e.concat([t,t+"-"+wd,t+"-"+xd])}),[]),Cd=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _d(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function jd(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Ad={placement:"bottom",modifiers:[],strategy:"absolute"};function Td(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"===typeof e.getBoundingClientRect)}))}function Nd(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?Ad:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ad,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,u={state:o,setOptions:function(n){var s="function"===typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:Yf(e)?fd(e):e.contextElement?fd(e.contextElement):[],popper:fd(t)};var l=function(e){var t=_d(e);return Cd.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));return o.orderedModifiers=l.filter((function(e){return e.enabled})),o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"===typeof i){var s=i({state:o,name:t,instance:u,options:r}),c=function(){};a.push(s||c)}})),u.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(Td(t,n)){o.rects={reference:sd(t,hd(n),"fixed"===o.options.strategy),popper:ud(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,l=void 0===c?{}:c,f=i.name;"function"===typeof a&&(o=a({state:o,options:l,name:f,instance:u})||o)}else o.reset=!1,r=-1}}},update:jd((function(){return new Promise((function(e){u.forceUpdate(),e(o)}))})),destroy:function(){c(),s=!0}};if(!Td(e,t))return u;function c(){a.forEach((function(e){return e()})),a=[]}return u.setOptions(n).then((function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var Md={passive:!0};function Fd(e){return e.split("-")[0]}function Rd(e){return e.split("-")[1]}function Pd(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bd(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Fd(o):null,a=o?Rd(o):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case vd:t={x:s,y:n.y-r.height};break;case md:t={x:s,y:n.y+n.height};break;case yd:t={x:n.x+n.width,y:u};break;case gd:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var c=i?Pd(i):null;if(null!=c){var l="y"===c?"height":"width";switch(a){case wd:t[c]=t[c]-(n[l]/2-r[l]/2);break;case xd:t[c]=t[c]+(n[l]/2-r[l]/2)}}return t}var Ld={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Id(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,f=e.isFixed,d=a.x,p=void 0===d?0:d,h=a.y,v=void 0===h?0:h,m="function"===typeof l?l({x:p,y:v}):{x:p,y:v};p=m.x,v=m.y;var y=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=gd,k=vd,w=window;if(c){var x=hd(n),O="clientHeight",E="clientWidth";if(x===Gf(n)&&"static"!==id(x=rd(n)).position&&"absolute"===s&&(O="scrollHeight",E="scrollWidth"),o===vd||(o===gd||o===yd)&&i===xd)k=md,v-=(f&&x===w&&w.visualViewport?w.visualViewport.height:x[O])-r.height,v*=u?1:-1;if(o===gd||(o===vd||o===md)&&i===xd)b=yd,p-=(f&&x===w&&w.visualViewport?w.visualViewport.width:x[E])-r.width,p*=u?1:-1}var D,S=Object.assign({position:s},c&&Ld),C=!0===l?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:Zf(t*r)/r||0,y:Zf(n*r)/r||0}}({x:p,y:v}):{x:p,y:v};return p=C.x,v=C.y,u?Object.assign({},S,((D={})[k]=g?"0":"",D[b]=y?"0":"",D.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",D)):Object.assign({},S,((t={})[k]=g?v+"px":"",t[b]=y?p+"px":"",t.transform="",t))}var zd={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Kf(o)&&nd(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Kf(r)&&nd(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Ud={left:"right",right:"left",bottom:"top",top:"bottom"};function Vd(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ud[e]}))}var $d={start:"end",end:"start"};function Hd(e){return e.replace(/start|end/g,(function(e){return $d[e]}))}function qd(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Jf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Wd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Gd(e,t){return t===Od?Wd(function(e){var t=Gf(e),n=rd(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+od(e),y:s}}(e)):Yf(t)?function(e){var t=ed(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Wd(function(e){var t,n=rd(e),r=td(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Qf(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Qf(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+od(e),u=-r.scrollTop;return"rtl"===id(o||n).direction&&(s+=Qf(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}(rd(e)))}function Yd(e,t,n){var r="clippingParents"===t?function(e){var t=fd(cd(e)),n=["absolute","fixed"].indexOf(id(e).position)>=0&&Kf(e)?hd(e):e;return Yf(n)?t.filter((function(e){return Yf(e)&&qd(e,n)&&"body"!==nd(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=Gd(e,n);return t.top=Qf(r.top,t.top),t.right=Xf(r.right,t.right),t.bottom=Xf(r.bottom,t.bottom),t.left=Qf(r.left,t.left),t}),Gd(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Kd(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Jd(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Qd(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,s=n.rootBoundary,u=void 0===s?Od:s,c=n.elementContext,l=void 0===c?Ed:c,f=n.altBoundary,d=void 0!==f&&f,p=n.padding,h=void 0===p?0:p,v=Kd("number"!==typeof h?h:Jd(h,kd)),m=l===Ed?"reference":Ed,y=e.rects.popper,g=e.elements[d?m:l],b=Yd(Yf(g)?g:g.contextElement||rd(e.elements.popper),a,u),k=ed(e.elements.reference),w=Bd({reference:k,element:y,strategy:"absolute",placement:o}),x=Wd(Object.assign({},y,w)),O=l===Ed?x:k,E={top:b.top-O.top+v.top,bottom:O.bottom-b.bottom+v.bottom,left:b.left-O.left+v.left,right:O.right-b.right+v.right},D=e.modifiersData.offset;if(l===Ed&&D){var S=D[o];Object.keys(E).forEach((function(e){var t=[yd,md].indexOf(e)>=0?1:-1,n=[vd,md].indexOf(e)>=0?"y":"x";E[e]+=S[n]*t}))}return E}function Xd(e,t,n){return Qf(e,Xf(t,n))}function Zd(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ep(e){return[vd,yd,md,gd].some((function(t){return e[t]>=0}))}var tp=Nd({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,u=Gf(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Md)})),s&&u.addEventListener("resize",n.update,Md),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Md)})),s&&u.removeEventListener("resize",n.update,Md)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Bd({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,u=void 0===s||s,c={placement:Fd(t.placement),variation:Rd(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Id(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Id(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},zd,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=Sd.reduce((function(e,n){return e[n]=function(e,t,n){var r=Fd(e),o=[gd,vd].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[gd,yd].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,u=n.fallbackPlacements,c=n.padding,l=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,h=void 0===p||p,v=n.allowedAutoPlacements,m=t.options.placement,y=Fd(m),g=u||(y===m||!h?[Vd(m)]:function(e){if(Fd(e)===bd)return[];var t=Vd(e);return[Hd(e),t,Hd(t)]}(m)),b=[m].concat(g).reduce((function(e,n){return e.concat(Fd(n)===bd?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?Sd:u,l=Rd(r),f=l?s?Dd:Dd.filter((function(e){return Rd(e)===l})):kd,d=f.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=f);var p=d.reduce((function(t,n){return t[n]=Qd(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Fd(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:l,rootBoundary:f,padding:c,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),k=t.rects.reference,w=t.rects.popper,x=new Map,O=!0,E=b[0],D=0;D<b.length;D++){var S=b[D],C=Fd(S),_=Rd(S)===wd,j=[vd,md].indexOf(C)>=0,A=j?"width":"height",T=Qd(t,{placement:S,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),N=j?_?yd:gd:_?md:vd;k[A]>w[A]&&(N=Vd(N));var M=Vd(N),F=[];if(i&&F.push(T[C]<=0),s&&F.push(T[N]<=0,T[M]<=0),F.every((function(e){return e}))){E=S,O=!1;break}x.set(S,F)}if(O)for(var R=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},P=h?3:1;P>0;P--){if("break"===R(P))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,f=n.padding,d=n.tether,p=void 0===d||d,h=n.tetherOffset,v=void 0===h?0:h,m=Qd(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),y=Fd(t.placement),g=Rd(t.placement),b=!g,k=Pd(y),w="x"===k?"y":"x",x=t.modifiersData.popperOffsets,O=t.rects.reference,E=t.rects.popper,D="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,S="number"===typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(x){if(i){var j,A="y"===k?vd:gd,T="y"===k?md:yd,N="y"===k?"height":"width",M=x[k],F=M+m[A],R=M-m[T],P=p?-E[N]/2:0,B=g===wd?O[N]:E[N],L=g===wd?-E[N]:-O[N],I=t.elements.arrow,z=p&&I?ud(I):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=U[A],$=U[T],H=Xd(0,O[N],z[N]),q=b?O[N]/2-P-H-V-S.mainAxis:B-H-V-S.mainAxis,W=b?-O[N]/2+P+H+$+S.mainAxis:L+H+$+S.mainAxis,G=t.elements.arrow&&hd(t.elements.arrow),Y=G?"y"===k?G.clientTop||0:G.clientLeft||0:0,K=null!=(j=null==C?void 0:C[k])?j:0,J=M+W-K,Q=Xd(p?Xf(F,M+q-K-Y):F,M,p?Qf(R,J):R);x[k]=Q,_[k]=Q-M}if(s){var X,Z="x"===k?vd:gd,ee="x"===k?md:yd,te=x[w],ne="y"===w?"height":"width",re=te+m[Z],oe=te-m[ee],ie=-1!==[vd,gd].indexOf(y),ae=null!=(X=null==C?void 0:C[w])?X:0,se=ie?re:te-O[ne]-E[ne]-ae+S.altAxis,ue=ie?te+O[ne]+E[ne]-ae-S.altAxis:oe,ce=p&&ie?function(e,t,n){var r=Xd(e,t,n);return r>n?n:r}(se,te,ue):Xd(p?se:re,te,p?ue:oe);x[w]=ce,_[w]=ce-te}t.modifiersData[r]=_}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Fd(n.placement),u=Pd(s),c=[gd,yd].indexOf(s)>=0?"height":"width";if(i&&a){var l=function(e,t){return Kd("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Jd(e,kd))}(o.padding,n),f=ud(i),d="y"===u?vd:gd,p="y"===u?md:yd,h=n.rects.reference[c]+n.rects.reference[u]-a[u]-n.rects.popper[c],v=a[u]-n.rects.reference[u],m=hd(i),y=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,g=h/2-v/2,b=l[d],k=y-f[c]-l[p],w=y/2-f[c]/2+g,x=Xd(b,w,k),O=u;n.modifiersData[r]=((t={})[O]=x,t.centerOffset=x-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&qd(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Qd(t,{elementContext:"reference"}),s=Qd(t,{altBoundary:!0}),u=Zd(a,r),c=Zd(s,o,i),l=ep(u),f=ep(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),np="tippy-content",rp="tippy-backdrop",op="tippy-arrow",ip="tippy-svg-arrow",ap={passive:!0,capture:!0},sp=function(){return document.body};function up(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function cp(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function lp(e,t){return"function"===typeof e?e.apply(void 0,t):e}function fp(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function dp(e){return[].concat(e)}function pp(e,t){-1===e.indexOf(t)&&e.push(t)}function hp(e){return e.split("-")[0]}function vp(e){return[].slice.call(e)}function mp(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function yp(){return document.createElement("div")}function gp(e){return["Element","Fragment"].some((function(t){return cp(e,t)}))}function bp(e){return cp(e,"MouseEvent")}function kp(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function wp(e){return gp(e)?[e]:function(e){return cp(e,"NodeList")}(e)?vp(e):Array.isArray(e)?e:vp(document.querySelectorAll(e))}function xp(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Op(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Ep(e){var t,n=dp(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function Dp(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function Sp(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Cp={isTouch:!1},_p=0;function jp(){Cp.isTouch||(Cp.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ap))}function Ap(){var e=performance.now();e-_p<20&&(Cp.isTouch=!1,document.removeEventListener("mousemove",Ap)),_p=e}function Tp(){var e=document.activeElement;if(kp(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Np=!!("undefined"!==typeof window&&"undefined"!==typeof document)&&!!window.msCrypto;var Mp={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Fp=Object.assign({appendTo:sp,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Mp,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Rp=Object.keys(Fp);function Pp(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=Fp[o])?r:i);return t}),{});return Object.assign({},e,t)}function Bp(e,t){var n=Object.assign({},t,{content:lp(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Pp(Object.assign({},Fp,{plugins:t}))):Rp).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(sr){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Fp.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Lp(e,t){e.innerHTML=t}function Ip(e){var t=yp();return!0===e?t.className=op:(t.className=ip,gp(e)?t.appendChild(e):Lp(t,e)),t}function zp(e,t){gp(t.content)?(Lp(e,""),e.appendChild(t.content)):"function"!==typeof t.content&&(t.allowHTML?Lp(e,t.content):e.textContent=t.content)}function Up(e){var t=e.firstElementChild,n=vp(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(np)})),arrow:n.find((function(e){return e.classList.contains(op)||e.classList.contains(ip)})),backdrop:n.find((function(e){return e.classList.contains(rp)}))}}function Vp(e){var t=yp(),n=yp();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=yp();function o(n,r){var o=Up(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"===typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"===typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||zp(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Ip(r.arrow))):i.appendChild(Ip(r.arrow)):s&&i.removeChild(s)}return r.className=np,r.setAttribute("data-state","hidden"),zp(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}Vp.$$tippy=!0;var $p=1,Hp=[],qp=[];function Wp(e,t){var n,r,o,i,a,s,u,c,l=Bp(e,Object.assign({},Fp,Pp(mp(t)))),f=!1,d=!1,p=!1,h=!1,v=[],m=fp(G,l.interactiveDebounce),y=$p++,g=(c=l.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:y,reference:e,popper:yp(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){0;if(b.state.isDestroyed)return;M("onBeforeUpdate",[b,t]),q();var n=b.props,r=Bp(e,Object.assign({},n,mp(t),{ignoreAttributes:!0}));b.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(P(),m=fp(G,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?dp(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");R(),N(),x&&x(n,r);b.popperInstance&&(Q(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Cp.isTouch&&!b.props.touch,o=up(b.props.duration,0,Fp.duration);if(e||t||n||r)return;if(_().hasAttribute("disabled"))return;if(M("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,C()&&(w.style.visibility="visible");N(),z(),b.state.isMounted||(w.style.transition="none");if(C()){var i=A(),a=i.box,u=i.content;xp([a,u],0)}s=function(){var e;if(b.state.isVisible&&!h){if(h=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,C()&&b.props.animation){var t=A(),n=t.box,r=t.content;xp([n,r],o),Op([n,r],"visible")}F(),R(),pp(qp,b),null==(e=b.popperInstance)||e.forceUpdate(),M("onMount",[b]),b.props.animation&&C()&&function(e,t){V(e,t)}(o,(function(){b.state.isShown=!0,M("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=_();e=b.props.interactive&&t===sp||"parent"===t?n.parentNode:lp(t,[n]);e.contains(w)||e.appendChild(w);b.state.isMounted=!0,Q(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=up(b.props.duration,1,Fp.duration);if(e||t||n)return;if(M("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,h=!1,f=!1,C()&&(w.style.visibility="hidden");if(P(),U(),N(!0),C()){var o=A(),i=o.box,a=o.content;b.props.animation&&(xp([i,a],r),Op([i,a],"hidden"))}F(),R(),b.props.animation?C()&&function(e,t){V(e,(function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;j().addEventListener("mousemove",m),pp(Hp,m),m(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;X(),Z().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);qp=qp.filter((function(e){return e!==b})),b.state.isMounted=!1,M("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),q(),delete e._tippy,b.state.isDestroyed=!0,M("onDestroy",[b])}};if(!l.render)return b;var k=l.render(b),w=k.popper,x=k.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,e._tippy=b,w._tippy=b;var O=g.map((function(e){return e.fn(b)})),E=e.hasAttribute("aria-expanded");return H(),R(),N(),M("onCreate",[b]),l.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&j().addEventListener("mousemove",m)})),b;function D(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function S(){return"hold"===D()[0]}function C(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function _(){return u||e}function j(){var e=_().parentNode;return e?Ep(e):document}function A(){return Up(w)}function T(e){return b.state.isMounted&&!b.state.isVisible||Cp.isTouch||i&&"focus"===i.type?0:up(b.props.delay,e?0:1,Fp.delay)}function N(e){void 0===e&&(e=!1),w.style.pointerEvents=b.props.interactive&&!e?"":"none",w.style.zIndex=""+b.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),O.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=b.props)[e].apply(r,t)}function F(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;dp(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function R(){!E&&b.props.aria.expanded&&dp(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===_()?"true":"false"):e.removeAttribute("aria-expanded")}))}function P(){j().removeEventListener("mousemove",m),Hp=Hp.filter((function(e){return e!==m}))}function B(t){if(!Cp.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!Sp(w,n)){if(dp(b.props.triggerTarget||e).some((function(e){return Sp(e,n)}))){if(Cp.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout((function(){d=!1})),b.state.isMounted||U())}}}function L(){p=!0}function I(){p=!1}function z(){var e=j();e.addEventListener("mousedown",B,!0),e.addEventListener("touchend",B,ap),e.addEventListener("touchstart",I,ap),e.addEventListener("touchmove",L,ap)}function U(){var e=j();e.removeEventListener("mousedown",B,!0),e.removeEventListener("touchend",B,ap),e.removeEventListener("touchstart",I,ap),e.removeEventListener("touchmove",L,ap)}function V(e,t){var n=A().box;function r(e){e.target===n&&(Dp(n,"remove",r),t())}if(0===e)return t();Dp(n,"remove",a),Dp(n,"add",r),a=r}function $(t,n,r){void 0===r&&(r=!1),dp(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;S()&&($("touchstart",W,{passive:!0}),$("touchend",Y,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch($(e,W),e){case"mouseenter":$("mouseleave",Y);break;case"focus":$(Np?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),v=[]}function W(e){var t,n=!1;if(b.state.isEnabled&&!J(e)&&!d){var r="focus"===(null==(t=i)?void 0:t.type);i=e,u=e.currentTarget,R(),!b.state.isVisible&&bp(e)&&Hp.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||f)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(f=!n),n&&!r&&te(e)}}function G(e){var t=e.target,n=_().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:l}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=hp(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,l="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-r+u>i,p=r-t.bottom-c>i,h=t.left-n+l>i,v=n-t.right-f>i;return d||p||h||v}))})(r,e)&&(P(),te(e))}}function Y(e){J(e)||b.props.trigger.indexOf("click")>=0&&f||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function K(e){b.props.trigger.indexOf("focusin")<0&&e.target!==_()||b.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function J(e){return!!Cp.isTouch&&S()!==e.type.indexOf("touch")>=0}function Q(){X();var t=b.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,u=C()?Up(w).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||_()}:e,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(C()){var n=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},f=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},l];C()&&u&&f.push({name:"arrow",options:{element:u,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),b.popperInstance=tp(c,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:f}))}function X(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Z(){return vp(w.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&M("onTrigger",[b,e]),z();var t=T(!0),r=D(),o=r[0],i=r[1];Cp.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),M("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=T(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else U()}}function Gp(e,t){void 0===t&&(t={});var n=Fp.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",jp,ap),window.addEventListener("blur",Tp);var r=Object.assign({},t,{plugins:n}),o=wp(e).reduce((function(e,t){var n=t&&Wp(t,r);return n&&e.push(n),e}),[]);return gp(e)?o[0]:o}Gp.defaultProps=Fp,Gp.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Fp[t]=e[t]}))},Gp.currentInput=Cp;Object.assign({},zd,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Gp.setDefaultProps({render:Vp});var Yp=Gp,Kp=function(){function e(t){var n=this,r=t.editor,o=t.element,i=t.view,a=t.tippyOptions,s=void 0===a?{}:a,u=t.shouldShow;h(this,e),this.preventHide=!1,this.shouldShow=function(e){var t=e.view,n=e.state,r=e.from,o=e.to,i=n.doc,a=n.selection.empty,s=!i.textBetween(r,o).length&&ff(n.selection);return!(!t.hasFocus()||a||s)},this.mousedownHandler=function(){n.preventHide=!0},this.dragstartHandler=function(){n.hide()},this.focusHandler=function(){setTimeout((function(){return n.update(n.editor.view)}))},this.blurHandler=function(e){var t,r=e.event;n.preventHide?n.preventHide=!1:(null===r||void 0===r?void 0:r.relatedTarget)&&(null===(t=n.element.parentNode)||void 0===t?void 0:t.contains(r.relatedTarget))||n.hide()},this.editor=r,this.element=o,this.view=i,u&&(this.shouldShow=u),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}return m(e,[{key:"createTooltip",value:function(){var e=this,t=this.editor.options.element,n=!!t.parentElement;!this.tippy&&n&&(this.tippy=Yp(t,Object(o.a)({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(function(t){e.blurHandler({event:t})})))}},{key:"update",value:function(e,t){var n,r,o,i=e.state,a=e.composing,s=i.doc,u=i.selection,c=t&&t.doc.eq(s)&&t.selection.eq(u);if(!a&&!c){this.createTooltip();var l=u.ranges,f=Math.min.apply(Math,Object(J.a)(l.map((function(e){return e.$from.pos})))),d=Math.max.apply(Math,Object(J.a)(l.map((function(e){return e.$to.pos}))));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t,from:f,to:d}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||function(){if(lf(n=i.selection)&&n instanceof ha){var t=e.nodeDOM(f);if(t)return t.getBoundingClientRect()}var n;return Hf(e,f,d)}}),this.show()):this.hide()}}},{key:"show",value:function(){var e;null===(e=this.tippy)||void 0===e||e.show()}},{key:"hide",value:function(){var e;null===(e=this.tippy)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}]),e}(),Jp=function(e){return new Ca({key:"string"===typeof e.pluginKey?new Aa(e.pluginKey):e.pluginKey,view:function(t){return new Kp(Object(o.a)({view:t},e))}})},Qp=(ef.create({name:"bubbleMenu",addOptions:function(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}},addProseMirrorPlugins:function(){return this.options.element?[Jp({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),function(){function e(t){var n=this,r=t.editor,o=t.element,i=t.view,a=t.tippyOptions,s=void 0===a?{}:a,u=t.shouldShow;h(this,e),this.preventHide=!1,this.shouldShow=function(e){var t=e.view,n=e.state.selection,r=n.$anchor,o=n.empty,i=1===r.depth,a=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(t.hasFocus()&&o&&i&&a)},this.mousedownHandler=function(){n.preventHide=!0},this.focusHandler=function(){setTimeout((function(){return n.update(n.editor.view)}))},this.blurHandler=function(e){var t,r=e.event;n.preventHide?n.preventHide=!1:(null===r||void 0===r?void 0:r.relatedTarget)&&(null===(t=n.element.parentNode)||void 0===t?void 0:t.contains(r.relatedTarget))||n.hide()},this.editor=r,this.element=o,this.view=i,u&&(this.shouldShow=u),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=s,this.element.remove(),this.element.style.visibility="visible"}return m(e,[{key:"createTooltip",value:function(){var e=this,t=this.editor.options.element,n=!!t.parentElement;!this.tippy&&n&&(this.tippy=Yp(t,Object(o.a)({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(function(t){e.blurHandler({event:t})})))}},{key:"update",value:function(e,t){var n,r,o,i=e.state,a=i.doc,s=i.selection,u=s.from,c=s.to;t&&t.doc.eq(a)&&t.selection.eq(s)||(this.createTooltip(),(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||function(){return Hf(e,u,c)}}),this.show()):this.hide())}},{key:"show",value:function(){var e;null===(e=this.tippy)||void 0===e||e.show()}},{key:"hide",value:function(){var e;null===(e=this.tippy)||void 0===e||e.hide()}},{key:"destroy",value:function(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}]),e}()),Xp=function(e){return new Ca({key:"string"===typeof e.pluginKey?new Aa(e.pluginKey):e.pluginKey,view:function(t){return new Qp(Object(o.a)({view:t},e))}})},Zp=(ef.create({name:"floatingMenu",addOptions:function(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins:function(){return this.options.element?[Xp({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),["editor"]),eh=function(e){g(n,e);var t=O(n);function n(){var e;return h(this,n),(e=t.apply(this,arguments)).contentComponent=null,e}return m(n)}(Uf),th=function(e){var t=e.renderers;return s.a.createElement(s.a.Fragment,null,Array.from(t).map((function(e){var t=Object(E.a)(e,2),n=t[0],r=t[1];return c.a.createPortal(r.reactElement,r.element,n)})))},nh=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),(r=t.call(this,e)).editorContentRef=s.a.createRef(),r.state={renderers:new Map},r}return m(n,[{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(){this.init()}},{key:"init",value:function(){var e=this.props.editor;if(e&&e.options.element){if(e.contentComponent)return;var t=this.editorContentRef.current;t.append.apply(t,Object(J.a)(e.options.element.childNodes)),e.setOptions({element:t}),e.contentComponent=this,e.createNodeViews()}}},{key:"componentWillUnmount",value:function(){var e=this.props.editor;if(e&&(e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null,e.options.element.firstChild)){var t=document.createElement("div");t.append.apply(t,Object(J.a)(e.options.element.childNodes)),e.setOptions({element:t})}}},{key:"render",value:function(){var e=this.props,t=(e.editor,i(e,Zp));return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",Object(o.a)({ref:this.editorContentRef},t)),s.a.createElement(th,{renderers:this.state.renderers}))}}]),n}(s.a.Component),rh=s.a.memo(nh),oh=Object(a.createContext)({onDragStart:void 0}),ih=function(){return Object(a.useContext)(oh)};s.a.forwardRef((function(e,t){var n=ih().onDragStart,r=e.as||"div";return s.a.createElement(r,Object(o.a)(Object(o.a)({},e),{},{ref:t,"data-node-view-wrapper":"",onDragStart:n,style:Object(o.a)({whiteSpace:"normal"},e.style)}))}));function ah(){var e=Object(a.useState)(0),t=Object(E.a)(e,2)[1];return function(){return t((function(e){return e+1}))}}var sh=ef.create({name:"placeholder",addOptions:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins:function(){var e=this;return[new Ca({props:{decorations:function(t){var n=t.doc,r=t.selection,o=e.editor.isEditable||!e.options.showOnlyWhenEditable,i=r.anchor,a=[];return o?(n.descendants((function(t,n){var r=i>=n&&i<=n+t.nodeSize,o=!t.isLeaf&&!t.childCount;if((r||!e.options.showOnlyCurrent)&&o){var s=[e.options.emptyNodeClass];e.editor.isEmpty&&s.push(e.options.emptyEditorClass);var u=lc.node(n,n+t.nodeSize,{class:s.join(" "),"data-placeholder":"function"===typeof e.options.placeholder?e.options.placeholder({editor:e.editor,node:t,pos:n,hasAnchor:r}):e.options.placeholder});a.push(u)}return e.options.includeChildren})),pc.create(n,a)):null}}})]}}),uh=Wf.create({name:"text",group:"inline"});function ch(e){this.j={},this.jr=[],this.jd=null,this.t=e}ch.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=lh();var o=hh(this,e);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[e]=r,r}};var lh=function(){return new ch},fh=function(e){return new ch(e)},dh=function(e,t,n){e.j[t]||(e.j[t]=n)},ph=function(e,t,n){e.jr.push([t,n])},hh=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var o=e.jr[r][0],i=e.jr[r][1];if(o.test(t))return i}return e.jd},vh=function(e,t,n){for(var r=0;r<t.length;r++)dh(e,t[r],n)},mh=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],o=t[n][1];dh(e,r,o)}},yh=function(e,t,n,r){for(var o,i=0,a=t.length;i<a&&(o=e.j[t[i]]);)e=o,i++;if(i>=a)return[];for(;i<a-1;)o=r(),dh(e,t[i],o),e=o,i++;dh(e,t[a-1],n)},gh="DOMAIN",bh="LOCALHOST",kh="TLD",wh="NUM",xh="PROTOCOL",Oh="MAILTO",Eh="WS",Dh="NL",Sh="OPENBRACE",Ch="OPENBRACKET",_h="OPENANGLEBRACKET",jh="OPENPAREN",Ah="CLOSEBRACE",Th="CLOSEBRACKET",Nh="CLOSEANGLEBRACKET",Mh="CLOSEPAREN",Fh="AMPERSAND",Rh="APOSTROPHE",Ph="ASTERISK",Bh="AT",Lh="BACKSLASH",Ih="BACKTICK",zh="CARET",Uh="COLON",Vh="COMMA",$h="DOLLAR",Hh="DOT",qh="EQUALS",Wh="EXCLAMATION",Gh="HYPHEN",Yh="PERCENT",Kh="PIPE",Jh="PLUS",Qh="POUND",Xh="QUERY",Zh="QUOTE",ev="SEMI",tv="SLASH",nv="TILDE",rv="UNDERSCORE",ov="SYM",iv=Object.freeze({__proto__:null,DOMAIN:gh,LOCALHOST:bh,TLD:kh,NUM:wh,PROTOCOL:xh,MAILTO:Oh,WS:Eh,NL:Dh,OPENBRACE:Sh,OPENBRACKET:Ch,OPENANGLEBRACKET:_h,OPENPAREN:jh,CLOSEBRACE:Ah,CLOSEBRACKET:Th,CLOSEANGLEBRACKET:Nh,CLOSEPAREN:Mh,AMPERSAND:Fh,APOSTROPHE:Rh,ASTERISK:Ph,AT:Bh,BACKSLASH:Lh,BACKTICK:Ih,CARET:zh,COLON:Uh,COMMA:Vh,DOLLAR:$h,DOT:Hh,EQUALS:qh,EXCLAMATION:Wh,HYPHEN:Gh,PERCENT:Yh,PIPE:Kh,PLUS:Jh,POUND:Qh,QUERY:Xh,QUOTE:Zh,SEMI:ev,SLASH:tv,TILDE:nv,UNDERSCORE:rv,SYM:ov}),av="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw verm\xf6gensberater-ctb verm\xf6gensberatung-pwb \u03b5\u03bb \u03b5\u03c5 \u0431\u0433 \u0431\u0435\u043b \u0434\u0435\u0442\u0438 \u0435\u044e \u043a\u0430\u0442\u043e\u043b\u0438\u043a \u043a\u043e\u043c \u049b\u0430\u0437 \u043c\u043a\u0434 \u043c\u043e\u043d \u043c\u043e\u0441\u043a\u0432\u0430 \u043e\u043d\u043b\u0430\u0439\u043d \u043e\u0440\u0433 \u0440\u0443\u0441 \u0440\u0444 \u0441\u0430\u0439\u0442 \u0441\u0440\u0431 \u0443\u043a\u0440 \u10d2\u10d4 \u0570\u0561\u0575 \u05d9\u05e9\u05e8\u05d0\u05dc \u05e7\u05d5\u05dd \u0627\u0628\u0648\u0638\u0628\u064a \u0627\u062a\u0635\u0627\u0644\u0627\u062a \u0627\u0631\u0627\u0645\u0643\u0648 \u0627\u0644\u0627\u0631\u062f\u0646 \u0627\u0644\u0628\u062d\u0631\u064a\u0646 \u0627\u0644\u062c\u0632\u0627\u0626\u0631 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629 \u0627\u0644\u0639\u0644\u064a\u0627\u0646 \u0627\u0644\u0645\u063a\u0631\u0628 \u0627\u0645\u0627\u0631\u0627\u062a \u0627\u06cc\u0631\u0627\u0646 \u0628\u0627\u0631\u062a \u0628\u0627\u0632\u0627\u0631 \u0628\u06be\u0627\u0631\u062a \u0628\u064a\u062a\u0643 \u067e\u0627\u06a9\u0633\u062a\u0627\u0646 \u0680\u0627\u0631\u062a \u062a\u0648\u0646\u0633 \u0633\u0648\u062f\u0627\u0646 \u0633\u0648\u0631\u064a\u0629 \u0634\u0628\u0643\u0629 \u0639\u0631\u0627\u0642 \u0639\u0631\u0628 \u0639\u0645\u0627\u0646 \u0641\u0644\u0633\u0637\u064a\u0646 \u0642\u0637\u0631 \u0643\u0627\u062b\u0648\u0644\u064a\u0643 \u0643\u0648\u0645 \u0645\u0635\u0631 \u0645\u0644\u064a\u0633\u064a\u0627 \u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627 \u0645\u0648\u0642\u0639 \u0647\u0645\u0631\u0627\u0647 \u0915\u0949\u092e \u0928\u0947\u091f \u092d\u093e\u0930\u0924 \u092d\u093e\u0930\u0924\u092e\u094d \u092d\u093e\u0930\u094b\u0924 \u0938\u0902\u0917\u0920\u0928 \u09ac\u09be\u0982\u09b2\u09be \u09ad\u09be\u09b0\u09a4 \u09ad\u09be\u09f0\u09a4 \u0a2d\u0a3e\u0a30\u0a24 \u0aad\u0abe\u0ab0\u0aa4 \u0b2d\u0b3e\u0b30\u0b24 \u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe \u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8 \u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd \u0c2d\u0c3e\u0c30\u0c24\u0c4d \u0cad\u0cbe\u0cb0\u0ca4 \u0d2d\u0d3e\u0d30\u0d24\u0d02 \u0dbd\u0d82\u0d9a\u0dcf \u0e04\u0e2d\u0e21 \u0e44\u0e17\u0e22 \u0ea5\u0eb2\u0ea7 \ub2f7\ub137 \ub2f7\ucef4 \uc0bc\uc131 \ud55c\uad6d \u30a2\u30de\u30be\u30f3 \u30b0\u30fc\u30b0\u30eb \u30af\u30e9\u30a6\u30c9 \u30b3\u30e0 \u30b9\u30c8\u30a2 \u30bb\u30fc\u30eb \u30d5\u30a1\u30c3\u30b7\u30e7\u30f3 \u30dd\u30a4\u30f3\u30c8 \u307f\u3093\u306a \u4e16\u754c \u4e2d\u4fe1 \u4e2d\u56fd \u4e2d\u570b \u4e2d\u6587\u7f51 \u4e9a\u9a6c\u900a \u4f01\u4e1a \u4f5b\u5c71 \u4fe1\u606f \u5065\u5eb7 \u516b\u5366 \u516c\u53f8 \u516c\u76ca \u53f0\u6e7e \u53f0\u7063 \u5546\u57ce \u5546\u5e97 \u5546\u6807 \u5609\u91cc \u5609\u91cc\u5927\u9152\u5e97 \u5728\u7ebf \u5927\u4f17\u6c7d\u8f66 \u5927\u62ff \u5929\u4e3b\u6559 \u5a31\u4e50 \u5bb6\u96fb \u5e7f\u4e1c \u5fae\u535a \u6148\u5584 \u6211\u7231\u4f60 \u624b\u673a \u62db\u8058 \u653f\u52a1 \u653f\u5e9c \u65b0\u52a0\u5761 \u65b0\u95fb \u65f6\u5c1a \u66f8\u7c4d \u673a\u6784 \u6de1\u9a6c\u9521 \u6e38\u620f \u6fb3\u9580 \u70b9\u770b \u79fb\u52a8 \u7ec4\u7ec7\u673a\u6784 \u7f51\u5740 \u7f51\u5e97 \u7f51\u7ad9 \u7f51\u7edc \u8054\u901a \u8bfa\u57fa\u4e9a \u8c37\u6b4c \u8d2d\u7269 \u901a\u8ca9 \u96c6\u56e2 \u96fb\u8a0a\u76c8\u79d1 \u98de\u5229\u6d66 \u98df\u54c1 \u9910\u5385 \u9999\u683c\u91cc\u62c9 \u9999\u6e2f".split(" "),sv=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,uv=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,cv=/\uFE0F/,lv=/\d/,fv=/\s/;function dv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=lh(),n=fh(wh),r=fh(gh),o=lh(),i=fh(Eh),a=[[lv,r],[sv,r],[uv,r],[cv,r]],s=function(){var e=fh(gh);return e.j={"-":o},e.jr=[].concat(a),e},u=function(e){var t=s();return t.t=e,t};mh(t,[["'",fh(Rh)],["{",fh(Sh)],["[",fh(Ch)],["<",fh(_h)],["(",fh(jh)],["}",fh(Ah)],["]",fh(Th)],[">",fh(Nh)],[")",fh(Mh)],["&",fh(Fh)],["*",fh(Ph)],["@",fh(Bh)],["`",fh(Ih)],["^",fh(zh)],[":",fh(Uh)],[",",fh(Vh)],["$",fh($h)],[".",fh(Hh)],["=",fh(qh)],["!",fh(Wh)],["-",fh(Gh)],["%",fh(Yh)],["|",fh(Kh)],["+",fh(Jh)],["#",fh(Qh)],["?",fh(Xh)],['"',fh(Zh)],["/",fh(tv)],[";",fh(ev)],["~",fh(nv)],["_",fh(rv)],["\\",fh(Lh)]]),dh(t,"\n",fh(Dh)),ph(t,fv,i),dh(i,"\n",lh()),ph(i,fv,i);for(var c=0;c<av.length;c++)yh(t,av[c],u(kh),s);var l=s(),f=s(),d=s(),p=s();yh(t,"file",l,s),yh(t,"ftp",f,s),yh(t,"http",d,s),yh(t,"mailto",p,s);var h=s(),v=fh(xh),m=fh(Oh);dh(f,"s",h),dh(f,":",v),dh(d,"s",h),dh(d,":",v),dh(l,":",v),dh(h,":",v),dh(p,":",m);for(var y=s(),g=0;g<e.length;g++)yh(t,e[g],y,s);return dh(y,":",v),yh(t,"localhost",u(bh),s),ph(t,lv,n),ph(t,sv,r),ph(t,uv,r),ph(t,cv,r),ph(n,lv,n),ph(n,sv,r),ph(n,uv,r),ph(n,cv,r),dh(n,"-",o),dh(r,"-",o),dh(o,"-",o),ph(r,lv,r),ph(r,sv,r),ph(r,uv,r),ph(r,cv,r),ph(o,lv,r),ph(o,sv,r),ph(o,uv,r),ph(o,cv,r),t.jd=fh(ov),t}function pv(e){return pv="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pv(e)}var hv={defaultProtocol:"http",events:null,format:mv,formatHref:mv,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function vv(e){e=e||{},this.defaultProtocol="defaultProtocol"in e?e.defaultProtocol:hv.defaultProtocol,this.events="events"in e?e.events:hv.events,this.format="format"in e?e.format:hv.format,this.formatHref="formatHref"in e?e.formatHref:hv.formatHref,this.nl2br="nl2br"in e?e.nl2br:hv.nl2br,this.tagName="tagName"in e?e.tagName:hv.tagName,this.target="target"in e?e.target:hv.target,this.rel="rel"in e?e.rel:hv.rel,this.validate="validate"in e?e.validate:hv.validate,this.truncate="truncate"in e?e.truncate:hv.truncate,this.className="className"in e?e.className:hv.className,this.attributes=e.attributes||hv.attributes,this.ignoreTags=[];for(var t=("ignoreTags"in e?e.ignoreTags:hv.ignoreTags),n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function mv(e){return e}vv.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),rel:this.get("rel",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e),truncate:this.get("truncate",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var r,o=this[e];if(!o)return o;switch(pv(o)){case"function":return o(t,n.t);case"object":return"function"===typeof(r=n.t in o?o[n.t]:hv[e])?r(t,n.t):r}return o},getObject:function(e,t,n){var r=this[e];return"function"===typeof r?r(t,n.t):r}};function yv(){}function gv(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];r.constructor=t,t.prototype=r}(yv,n,t),n}yv.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hv.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var bv=gv("email",{isLink:!0}),kv=gv("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),wv=gv("text"),xv=gv("nl"),Ov=gv("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hv.defaultProtocol,t=this.tk,n=!1,r=!1,o=[],i=0;t[i].t===xh;)n=!0,o.push(t[i].v),i++;for(;t[i].t===tv;)r=!0,o.push(t[i].v),i++;for(;i<t.length;i++)o.push(t[i].v);return o=o.join(""),n||r||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===xh}}),Ev=Object.freeze({__proto__:null,MultiToken:yv,Base:yv,createTokenClass:gv,MailtoEmail:bv,Email:kv,Text:wv,Nl:xv,Url:Ov});function Dv(){var e=lh(),t=lh(),n=lh(),r=lh(),o=lh(),i=lh(),a=lh(),s=fh(Ov),u=lh(),c=fh(Ov),l=fh(Ov),f=lh(),d=lh(),p=lh(),h=lh(),v=lh(),m=fh(Ov),y=fh(Ov),g=fh(Ov),b=fh(Ov),k=lh(),w=lh(),x=lh(),O=lh(),E=lh(),D=lh(),S=fh(kv),C=lh(),_=fh(kv),j=fh(bv),A=lh(),T=lh(),N=lh(),M=lh(),F=fh(xv);dh(e,Dh,F),dh(e,xh,t),dh(e,Oh,n),dh(t,tv,r),dh(r,tv,o),dh(e,kh,i),dh(e,gh,i),dh(e,bh,s),dh(e,wh,i),dh(o,kh,l),dh(o,gh,l),dh(o,wh,l),dh(o,bh,l),dh(i,Hh,a),dh(E,Hh,D),dh(a,kh,s),dh(a,gh,i),dh(a,wh,i),dh(a,bh,i),dh(D,kh,S),dh(D,gh,E),dh(D,wh,E),dh(D,bh,E),dh(s,Hh,a),dh(S,Hh,D),dh(s,Uh,u),dh(s,tv,l),dh(u,wh,c),dh(c,tv,l),dh(S,Uh,C),dh(C,wh,_);var R=[Fh,Ph,Bh,Lh,Ih,zh,$h,gh,qh,Gh,bh,wh,Yh,Kh,Jh,Qh,xh,tv,ov,nv,kh,rv],P=[Rh,Nh,Ah,Th,Mh,Uh,Vh,Hh,Wh,_h,Sh,Ch,jh,Xh,Zh,ev];dh(l,Sh,d),dh(l,Ch,p),dh(l,_h,h),dh(l,jh,v),dh(f,Sh,d),dh(f,Ch,p),dh(f,_h,h),dh(f,jh,v),dh(d,Ah,l),dh(p,Th,l),dh(h,Nh,l),dh(v,Mh,l),dh(m,Ah,l),dh(y,Th,l),dh(g,Nh,l),dh(b,Mh,l),dh(k,Ah,l),dh(w,Th,l),dh(x,Nh,l),dh(O,Mh,l),vh(d,R,m),vh(p,R,y),vh(h,R,g),vh(v,R,b),vh(d,P,k),vh(p,P,w),vh(h,P,x),vh(v,P,O),vh(m,R,m),vh(y,R,y),vh(g,R,g),vh(b,R,b),vh(m,P,m),vh(y,P,y),vh(g,P,g),vh(b,P,b),vh(k,R,m),vh(w,R,y),vh(x,R,g),vh(O,R,b),vh(k,P,k),vh(w,P,w),vh(x,P,x),vh(O,P,O),vh(l,R,l),vh(f,R,l),vh(l,P,f),vh(f,P,f),dh(n,kh,j),dh(n,gh,j),dh(n,wh,j),dh(n,bh,j),vh(j,R,j),vh(j,P,A),vh(A,R,j),vh(A,P,A);var B=[Fh,Rh,Ph,Lh,Ih,zh,Ah,$h,gh,qh,Gh,wh,Sh,Yh,Kh,Jh,Qh,Xh,tv,ov,nv,kh,rv];return vh(i,B,T),dh(i,Bh,N),vh(s,B,T),dh(s,Bh,N),vh(a,B,T),vh(T,B,T),dh(T,Bh,N),dh(T,Hh,M),vh(M,B,T),dh(N,kh,E),dh(N,gh,E),dh(N,wh,E),dh(N,bh,S),e}function Sv(e,t,n){var r=n[0].s,o=n[n.length-1].e;return new e(t.substr(r,o-r),n)}var Cv="undefined"!==typeof console&&console&&console.warn||function(){},_v={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function jv(e){if(_v.initialized&&Cv('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");_v.customProtocols.push(e)}function Av(e){return _v.initialized||function(){_v.scanner={start:dv(_v.customProtocols),tokens:iv},_v.parser={start:Dv(),tokens:Ev};for(var e={createTokenClass:gv},t=0;t<_v.pluginQueue.length;t++)_v.pluginQueue[t][1]({scanner:_v.scanner,parser:_v.parser,utils:e});_v.initialized=!0}(),function(e,t,n){for(var r=n.length,o=0,i=[],a=[];o<r;){for(var s=e,u=null,c=null,l=0,f=null,d=-1;o<r&&!(u=hh(s,n[o].t));)a.push(n[o++]);for(;o<r&&(c=u||hh(s,n[o].t));)u=null,(s=c).accepts()?(d=0,f=s):d>=0&&d++,o++,l++;if(d<0)for(var p=o-l;p<o;p++)a.push(n[p]);else{a.length>0&&(i.push(Sv(wv,t,a)),a=[]),o-=d,l-=d;var h=f.t,v=n.slice(o-l,o);i.push(Sv(h,t,v))}}return a.length>0&&i.push(Sv(wv,t,a)),i}(_v.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var o=e.charCodeAt(r),i=void 0,a=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,o=[],i=0,a=0;a<r;){for(var s=e,u=null,c=0,l=null,f=-1,d=-1;a<r&&(u=hh(s,n[a]));)(s=u).accepts()?(f=0,d=0,l=s):f>=0&&(f+=n[a].length,d++),c+=n[a].length,i+=n[a].length,a++;i-=f,a-=d,c-=f,o.push({t:l.t,v:t.substr(i-c,c),s:i-c,e:i})}return o}(_v.scanner.start,e))}function Tv(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Av(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.t!==t||r.push(i.toObject())}return r}function Nv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Av(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function Mv(e){return new Ca({key:new Aa("autolink"),appendTransaction:function(t,n,r){var i=t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc),a=t.some((function(e){return e.getMeta("preventAutolink")}));if(i&&!a){var s=r.tr,u=function(e,t){var n=new aa(e);return t.forEach((function(e){e.steps.forEach((function(e){n.step(e)}))})),n}(n.doc,Object(J.a)(t)),c=u.mapping,l=function(e){var t=e.mapping,n=e.steps,r=[];return t.maps.forEach((function(e,o){var i=[];if(e.ranges.length)e.forEach((function(e,t){i.push({from:e,to:t})}));else{var a=n[o],s=a.from,u=a.to;if(void 0===s||void 0===u)return;i.push({from:s,to:u})}i.forEach((function(e){var n=e.from,i=e.to,a=t.slice(o).map(n,-1),s=t.slice(o).map(i),u=t.invert().map(a,-1),c=t.invert().map(s);r.push({oldRange:{from:u,to:c},newRange:{from:a,to:s}})}))})),Vf(r)}(u);if(l.forEach((function(t){var i=t.oldRange,a=t.newRange;$f(i.from,i.to,n.doc).filter((function(t){return t.mark.type===e.type})).forEach((function(t){var o=$f(c.map(t.from),c.map(t.to),r.doc).filter((function(t){return t.mark.type===e.type}));if(o.length){var i=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),u=r.doc.textBetween(i.from,i.to,void 0," "),l=Nv(a),f=Nv(u);l&&!f&&s.removeMark(i.from,i.to,e.type)}})),function(e,t,n){var r=[];return e.nodesBetween(t.from,t.to,(function(e,t){n(e)&&r.push({node:e,pos:t})})),r}(r.doc,a,(function(e){return e.isTextblock})).forEach((function(t){Tv(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((function(e){return e.isLink})).filter((function(t){return!e.validate||e.validate(t.value)})).map((function(e){return Object(o.a)(Object(o.a)({},e),{},{from:t.pos+e.start+1,to:t.pos+e.end+1})})).filter((function(e){var t=a.from>=e.from&&a.from<=e.to,n=a.to>=e.from&&a.to<=e.to;return t||n})).forEach((function(t){s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length)return s}}})}var Fv=qf.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate:function(){this.options.protocols.forEach(jv)},inclusive:function(){return this.options.autolink},addOptions:function(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes:function(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:function(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML:function(e){var t=e.HTMLAttributes;return["a",Pl(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setLink:function(t){return function(n){return(0,n.chain)().setMark(e.name,t).setMeta("preventAutolink",!0).run()}},toggleLink:function(t){return function(n){return(0,n.chain)().toggleMark(e.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},unsetLink:function(){return function(t){return(0,t.chain)().unsetMark(e.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}},addPasteRules:function(){var e,t=this;return[(e={find:function(e){return Tv(e).filter((function(e){return!t.options.validate||t.options.validate(e.value)})).filter((function(e){return e.isLink})).map((function(e){return{text:e.value,index:e.start,data:e}}))},type:this.type,getAttributes:function(e){var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}},new Kl({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Il(e.getAttributes,void 0,o);if(!1===i||null===i)return null;var a=n.tr,s=o[o.length-1],u=o[0],c=r.to;if(s){var l=u.search(/\S/),f=r.from+u.indexOf(s),d=f+s.length;if($f(r.from,r.to,n.doc).filter((function(t){return t.mark.type.excluded.find((function(n){return n===e.type&&n!==t.mark.type}))})).filter((function(e){return e.to>f})).length)return null;d<r.to&&a.delete(d,r.to),f>r.from&&a.delete(r.from+l,f),c=r.from+l+s.length,a.addMark(r.from+l,c,e.type.create(i||{})),a.removeStoredMark(e.type)}}}))]},addProseMirrorPlugins:function(){var e,t=[];return this.options.autolink&&t.push(Mv({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new Ca({key:new Aa("handleClickLink"),props:{handleClick:function(t,n,r){var o,i=Lf(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href)&&(window.open(i.href,i.target),!0)}}}))),this.options.linkOnPaste&&t.push(function(e){return new Ca({key:new Aa("handlePasteLink"),props:{handlePaste:function(t,n,r){if(t.state.selection.empty)return!1;var o="";r.content.forEach((function(e){o+=e.textContent}));var i=Tv(o).find((function(e){return e.isLink&&e.value===o}));return!(!o||!i)&&(e.editor.commands.setMark(e.type,{href:i.href}),!0)}}})}({editor:this.editor,type:this.type})),t}}),Rv=Wf.create({name:"paragraph",priority:1e3,addOptions:function(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML:function(){return[{tag:"p"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["p",Pl(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setParagraph:function(){return function(t){return t.commands.setNode(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-0":function(){return e.editor.commands.setParagraph()}}}}),Pv=Wf.create({name:"doc",topNode:!0,content:"block+"}),Bv=/^\s*>\s$/,Lv=Wf.create({name:"blockquote",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML:function(){return[{tag:"blockquote"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["blockquote",Pl(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setBlockquote:function(){return function(t){return t.commands.wrapIn(e.name)}},toggleBlockquote:function(){return function(t){return t.commands.toggleWrap(e.name)}},unsetBlockquote:function(){return function(t){return t.commands.lift(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-b":function(){return e.editor.commands.toggleBlockquote()}}},addInputRules:function(){return[(e={find:Bv,type:this.type},new Wl({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Il(e.getAttributes,void 0,o)||{},a=n.tr.delete(r.from,r.to),s=a.doc.resolve(r.from).blockRange(),u=s&&Bi(s,e.type,i);if(!u)return null;a.wrap(s,u);var c=a.doc.resolve(r.from-1).nodeBefore;c&&c.type===e.type&&qi(a.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(o,c))&&a.join(r.from-1)}}))];var e}});var Iv,zv=function(e){var t,n=Object(a.useContext)(D),r=n.member,i=n.postId,s=n.dispatchAction,u=n.onAction,c=n.avatarSaturation,l=Object(a.useState)(!(!e.isReply&&!e.isEdit)),d=Object(E.a)(l,2),h=d[0],v=d[1],m=Object(a.useRef)(null),y=e.comment,g=e.commentsCount,b=e.isEdit?y.member.name:r.name;t=e.isReply?{placeholder:"Reply to comment",autofocus:!0}:e.isEdit?{placeholder:"Edit this comment",autofocus:!1,content:e.comment.html}:{placeholder:0===g?"Be first to start the conversation":"Join the discussion",autofocus:!1};var k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(a.useState)(null),r=Object(E.a)(n,2),o=r[0],i=r[1],s=ah();return Object(a.useEffect)((function(){var t=!0,n=new eh(e);return i(n),n.on("transaction",(function(){requestAnimationFrame((function(){requestAnimationFrame((function(){t&&s()}))}))})),function(){n.destroy(),t=!1}}),t),o}(Object(o.a)({},function(e){var t=e.placeholder,n=e.autofocus,r=void 0!==n&&n,o=e.content,i=void 0===o?"":o;return{extensions:[Pv,uh,Rv,Fv.configure({openOnClick:!1}),sh.configure({placeholder:t}),Lv.configure({})],content:i,autofocus:r,editorProps:{attributes:{class:"gh-comment-content focus:outline-0"}},parseOptions:{preserveWhitespace:"full"}}}(t))),w=function(){for(var e=-100,t=m.current,n=t.ownerDocument.defaultView;n!==window;)for(var r=n.parent,o=0;o<r.frames.length;o++)if(r.frames[o]===n){var i,a=Object(ze.a)(r.document.getElementsByTagName("iframe"));try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s.contentWindow===n)e+=s.getBoundingClientRect().top+n.pageYOffset}}catch(u){a.e(u)}finally{a.f()}n=r;break}return t.getBoundingClientRect().top+window.pageYOffset+e},x=Object(a.useCallback)((function(){b||e.isEdit?v(!0):(k.commands.blur(),s("openPopup",{type:"addNameDialog",callback:function(){k.commands.focus()}}))}),[k,s,b,e.isEdit]);Object(a.useEffect)((function(){var t;if(k)return e.isReply&&(t=setTimeout((function(){window.scrollTo({top:w(),left:0,behavior:"smooth"})}),100)),e.isEdit?(k.chain().focus().command((function(e){var t=e.tr;return e.commands.setTextSelection({from:t.doc.content.size,to:t.doc.content.size})})).run(),function(){t&&clearTimeout(t)}):function(){t&&clearTimeout(t)}}),[k,e]),Object(a.useEffect)((function(){if(k)return k.on("focus",(function(){x()})),k.on("blur",(function(){null!==k&&void 0!==k&&k.isEmpty&&(v(!1),e.isReply&&e.close&&e.close())})),function(){null===k||void 0===k||k.off("focus"),null===k||void 0===k||k.off("blur")}}),[k,e,x]);var O,C=function(){var t=p(f().mark((function t(n){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.preventDefault(),!k.isEmpty){t.next=3;break}return t.abrupt("return");case 3:if(!e.isReply){t.next=16;break}return t.prev=4,t.next=7,s("addReply",{parent:e.parent,reply:{post_id:i,status:"published",html:k.getHTML()}});case 7:k.chain().clearContent().blur().run(),e.close(),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),console.error(t.t0);case 14:t.next=32;break;case 16:if(!e.isEdit){t.next=22;break}return t.next=19,s("editComment",{comment:{id:e.comment.id,html:k.getHTML()},parent:e.parent});case 19:e.close(),t.next=32;break;case 22:return t.prev=22,t.next=25,u("addComment",{post_id:i,status:"published",html:k.getHTML()});case 25:k.chain().clearContent().blur().run(),v(!1),t.next=32;break;case 29:t.prev=29,t.t1=t.catch(22),console.error(t.t1);case 32:return t.abrupt("return",!1);case 33:case"end":return t.stop()}}),t,null,[[4,11],[22,29]])})));return function(e){return t.apply(this,arguments)}}(),_=function(e){k.isFocused&&e.preventDefault()},j=function(e){k.isFocused&&e.stopPropagation()};O=e.isReply?Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{className:"hidden sm:inline",children:"Add "}),Object(S.jsx)("span",{className:"capitalize sm:normal-case",children:"reply"})]}):e.isEdit?"Save":Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("span",{className:"hidden sm:inline",children:"Add "}),Object(S.jsx)("span",{className:"capitalize sm:normal-case",children:"comment"})]});var A=tr()&&e.isReply||tr()&&e.isEdit;return Object(S.jsx)(S.Fragment,{children:Object(S.jsx)("form",{ref:m,onClick:function(e){k.isFocused||k.commands.focus()},onMouseDown:_,onTouchStart:_,className:"\n transition duration-200\n pt-3 pb-2 px-3\n -mt-[12px] -mr-3 mb-10 -ml-[12px]\n bg-white dark:bg-[rgba(255,255,255,0.08)]\n rounded-md shadow-formlg dark:shadow-transparent hover:shadow-formxl\n ".concat(!g&&!e.isEdit&&!e.isReply&&"mt-0 ml-0 mr-0","\n ").concat(h?"cursor-default":"cursor-pointer","\n ").concat(!e.isReply&&!e.isEdit&&"-mt-[4px]","\n ").concat(e.isReply&&"-ml-[12px]"),children:Object(S.jsxs)("div",{className:"w-full relative",children:[Object(S.jsx)("div",{className:"pr-3 font-sans leading-normal dark:text-neutral-300",children:Object(S.jsxs)("div",{className:"relative w-full",children:[Object(S.jsx)("div",{className:"\n transition-all duration-150 delay-100\n w-full pl-[50px] sm:pl-[56px] px-0 py-[10px] pr-4\n bg-transparent rounded-md border-none border border-slate-50 dark:border-none\n font-sans text-[16.5px] leading-normal dark:text-neutral-300 \n focus:outline-0\n placeholder:text-neutral-300 dark:placeholder:text-[rgba(255,255,255,0.3)] \n resize-none\n ".concat(0===g&&"placeholder:text-neutral-700","\n ").concat(h?"cursor-text min-h-[144px] pt-[33px] pb-[68px]":"cursor-pointer overflow-hidden min-h-[48px] hover:border-slate-300","\n ").concat(e.isEdit&&"cursor-text","\n ").concat(!b&&"pointer-events-none","\n ").concat(A&&"pl-1","\n "),children:Object(S.jsx)(rh,{onMouseDown:j,onTouchStart:j,editor:k})}),Object(S.jsxs)("div",{className:" absolute -right-3 bottom-[2px] flex space-x-4 transition-[opacity] duration-150 ",children:[e.isEdit&&Object(S.jsx)("button",{type:"button",onClick:e.close,className:"font-sans text-sm font-medium ml-2.5 text-neutral-500 dark:text-neutral-400",children:"Cancel"}),Object(S.jsx)("button",{className:"\n transition-[opacity] duration-150\n bg-neutral-900 dark:bg-[rgba(255,255,255,0.9)]\n rounded-[6px] border\n py-3 px-4\n text-sm text-center font-sans font-semibold\n text-white dark:text-neutral-800\n ",type:"button",onClick:C,children:O})]})]})}),Object(S.jsxs)("div",{className:"flex mb-1 justify-start items-center absolute top-0 left-0",children:[!A&&Object(S.jsx)(po,{comment:y,saturation:c,className:"pointer-events-none"}),Object(S.jsx)(ao,{show:h,enter:"transition duration-500 delay-100 ease-in-out",enterFrom:"opacity-0 -translate-x-2",enterTo:"opacity-100 translate-x-0",leave:"transition-none duration-0",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"".concat(A?"ml-1 mt-0":"ml-3 -mt-[9px]"," pointer-events-none"),children:Object(S.jsx)("h4",{className:"text-lg font-sans font-semibold mb-1 tracking-tight dark:text-neutral-300",children:b||"Anonymous"})})})]})]})})})},Uv=["title","titleId"];function Vv(){return Vv=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},Vv.apply(this,arguments)}function $v(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Hv(e,t){var n=e.title,r=e.titleId,o=$v(e,Uv);return a.createElement("svg",Vv({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"black",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Iv||(Iv=a.createElement("path",{d:"M8.00025 13.8739L2.46073 8.09636C1.97388 7.60989 1.65255 6.98248 1.54231 6.30312C1.43208 5.62376 1.53853 4.92694 1.84658 4.31148V4.31148C2.07887 3.84703 2.41819 3.44443 2.83659 3.13684C3.25499 2.82925 3.74049 2.62547 4.25308 2.54231C4.76567 2.45914 5.29069 2.49896 5.78488 2.65849C6.27906 2.81802 6.72827 3.09269 7.09549 3.45987L8.00025 4.36406L8.90502 3.45987C9.27224 3.09269 9.72145 2.81802 10.2156 2.65849C10.7098 2.49896 11.2348 2.45914 11.7474 2.54231C12.26 2.62547 12.7455 2.82925 13.1639 3.13684C13.5823 3.44443 13.9216 3.84703 14.1539 4.31148C14.4616 4.9267 14.5678 5.62311 14.4577 6.30208C14.3476 6.98105 14.0267 7.60817 13.5404 8.09462L8.00025 13.8739Z",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})))}var qv=a.forwardRef(Hv);n.p;var Wv,Gv=function(e){var t=Object(a.useContext)(D),n=t.dispatchAction,r=t.member,o=t.commentsEnabled,i=Object(a.useState)(""),s=Object(E.a)(i,2),u=s[0],c=s[1],l="paid"===o,f=r&&!!r.paid,d=r&&(f||!l),p=d?"button":"span",h="cursor-pointer";return d||(h="cursor-text"),Object(S.jsxs)(p,{className:"group transition-all duration-50 ease-linear flex font-sans items-center text-sm outline-0 ".concat(e.comment.liked?"text-neutral-900 dark:text-[rgba(255,255,255,0.9)]":"text-neutral-400 dark:text-[rgba(255,255,255,0.5)] hover:text-neutral-600"," ").concat(h),onClick:function(){d&&(e.comment.liked?n("unlikeComment",e.comment):(n("likeComment",e.comment),c("animate-heartbeat"),setTimeout((function(){c("")}),400)))},children:[Object(S.jsx)(qv,{className:u+" mr-[6px] ".concat(e.comment.liked?"fill-neutral-900 stroke-neutral-900 dark:fill-white dark:stroke-white":"stroke-neutral-400 dark:stroke-[rgba(255,255,255,0.5)] group-hover:stroke-neutral-600"," transition duration-50 ease-linear")}),e.comment.likes_count]})},Yv=["title","titleId"];function Kv(){return Kv=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},Kv.apply(this,arguments)}function Jv(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Qv(e,t){var n=e.title,r=e.titleId,o=Jv(e,Yv);return a.createElement("svg",Kv({width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"black",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Wv||(Wv=a.createElement("path",{d:"M7.17463 2.98741C7.17439 2.7888 7.11434 2.59487 7.00229 2.43088C6.89025 2.26689 6.73141 2.14046 6.54647 2.06805C6.36153 1.99564 6.15907 1.98061 5.96546 2.02492C5.77186 2.06923 5.5961 2.17083 5.46107 2.31648L1.86192 6.21418C1.69351 6.39677 1.60001 6.63606 1.60001 6.88445C1.60001 7.13284 1.69351 7.37213 1.86192 7.55472L5.45909 11.4524C5.59412 11.5981 5.76988 11.6997 5.96349 11.744C6.15709 11.7883 6.35955 11.7733 6.54449 11.7009C6.72943 11.6284 6.88827 11.502 7.00032 11.338C7.11236 11.174 7.17242 10.9801 7.17265 10.7815V8.86164H9.12703C10.438 8.86164 11.6953 9.38241 12.6222 10.3094C13.5492 11.2364 14.07 12.4937 14.07 13.8046V9.85023C14.07 8.53927 13.5492 7.28201 12.6222 6.35502C11.6953 5.42803 10.438 4.90726 9.12703 4.90726H7.17265L7.17463 2.98741Z",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})))}var Xv=a.forwardRef(Qv);n.p;var Zv,em,tm,nm=function(e){return Object(a.useContext)(D).member?Object(S.jsxs)("button",{className:"group transition-all duration-50 ease-linear flex font-sans items-center text-sm outline-0 ".concat(e.isReplying?"text-neutral-900 dark:text-[rgba(255,255,255,0.9)]":"text-neutral-400 dark:text-[rgba(255,255,255,0.5)] hover:text-neutral-600"),onMouseDown:function(e){e.preventDefault()},onClick:e.toggleReply,children:[Object(S.jsx)(Xv,{className:"mr-[6px] ".concat(e.isReplying?"fill-neutral-900 stroke-neutral-900 dark:fill-white dark:stroke-white":"stroke-neutral-400 dark:stroke-[rgba(255,255,255,0.5)] group-hover:stroke-neutral-600"," transition duration-50 ease-linear")}),"Reply"]}):null},rm=function(e){var t=Object(a.useContext)(D).dispatchAction,n="published"!==e.comment.status;return Object(S.jsx)("div",{className:"flex flex-col",children:n?Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(n){t("showComment",e.comment),e.close()},children:[Object(S.jsx)("span",{children:"Show "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]}):Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(n){t("hideComment",e.comment),e.close()},children:[Object(S.jsx)("span",{children:"Hide "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]})})},om=function(e){var t=Object(a.useContext)(D).dispatchAction;return Object(S.jsxs)("div",{className:"flex flex-col",children:[Object(S.jsx)("button",{className:"w-full mb-3 text-left text-[14px]",onClick:e.toggleEdit,children:"Edit"}),Object(S.jsx)("button",{className:"w-full text-left text-[14px] text-red-600",onClick:function(n){t("deleteComment",e.comment),e.close()},children:"Delete"})]})},im=function(e){var t=Object(a.useContext)(D).dispatchAction;return Object(S.jsx)("div",{className:"flex flex-col",children:Object(S.jsxs)("button",{className:"w-full text-left text-[14px]",onClick:function(){t("openPopup",{type:"reportDialog",comment:e.comment}),e.close()},children:[Object(S.jsx)("span",{children:"Report "}),Object(S.jsx)("span",{className:"hidden sm:inline",children:"comment"})]})})},am=function(e){var t,n=Object(a.useContext)(D),r=n.member,o=n.admin,i=e.comment,s=r&&(null===(t=i.member)||void 0===t?void 0:t.uuid)===(null===r||void 0===r?void 0:r.uuid),u=!!o,c=Object(a.useRef)();Object(a.useEffect)((function(){var t,n,r=function(){e.close()};window.addEventListener("click",r,{passive:!0});var o=null===(t=c.current)||void 0===t||null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;return o&&o!==window&&o.addEventListener("click",r,{passive:!0}),function(){window.removeEventListener("click",r,{passive:!0}),o&&o!==window&&o.removeEventListener("click",r,{passive:!0})}}),[e]);var l=null;if("published"===i.status)l=s?Object(S.jsx)(om,{comment:i,close:e.close,toggleEdit:e.toggleEdit}):u?Object(S.jsx)(rm,{comment:i,close:e.close}):Object(S.jsx)(im,{comment:i,close:e.close});else{if(!u)return null;l=Object(S.jsx)(rm,{comment:i,close:e.close})}return Object(S.jsx)("div",{ref:c,onClick:function(e){e.stopPropagation()},children:Object(S.jsx)("div",{className:"min-w-min sm:min-w-[150px] bg-white absolute font-sans rounded py-3 pl-4 pr-8 shadow-lg text-sm whitespace-nowrap z-10 dark:bg-zinc-900 dark:text-white outline-0",children:l})})},sm=["title","titleId"];function um(){return um=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},um.apply(this,arguments)}function cm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function lm(e,t){var n=e.title,r=e.titleId,o=cm(e,sm);return a.createElement("svg",um({width:16,height:16,viewBox:"0 0 16 16",fill:"black",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Zv||(Zv=a.createElement("path",{d:"M3 12C3.82843 12 4.5 11.3284 4.5 10.5C4.5 9.67157 3.82843 9 3 9C2.17157 9 1.5 9.67157 1.5 10.5C1.5 11.3284 2.17157 12 3 12Z"})),em||(em=a.createElement("path",{d:"M8 12C8.82843 12 9.5 11.3284 9.5 10.5C9.5 9.67157 8.82843 9 8 9C7.17157 9 6.5 9.67157 6.5 10.5C6.5 11.3284 7.17157 12 8 12Z"})),tm||(tm=a.createElement("path",{d:"M13 12C13.8284 12 14.5 11.3284 14.5 10.5C14.5 9.67157 13.8284 9 13 9C12.1716 9 11.5 9.67157 11.5 10.5C11.5 11.3284 12.1716 12 13 12Z"})))}var fm,dm=a.forwardRef(lm),pm=(n.p,function(e){var t=Object(a.useState)(!1),n=Object(E.a)(t,2),r=n[0],o=n[1],i=Object(a.useContext)(D),s=i.member,u=i.admin,c=e.comment,l=!!s&&"published"===c.status||!!u;return s?Object(S.jsxs)("div",{className:"relative",children:[l?Object(S.jsx)("button",{onClick:function(){o((function(e){return!e}))},className:"outline-0",children:Object(S.jsx)(dm,{className:"transition duration-50 ease-linear gh-comments-icon gh-comments-icon-more outline-0 fill-neutral-400 dark:fill-rgba(255,255,255,0.5) hover:fill-neutral-600"})}):null,r?Object(S.jsx)(am,{comment:c,close:function(){o(!1)},toggleEdit:e.toggleEdit}):null]}):null}),hm=function(e){var t=e.loadMore,n=e.count;return Object(S.jsxs)("button",{className:"group w-full text-neutral-700 font-semibold px-0 pt-0 pb-3 mt-10 sm:mt-0 mb-10 font-sans text-md text-left dark:text-white flex items-center ",onClick:t,children:[Object(S.jsxs)("span",{className:"whitespace-nowrap mr-4",children:["\u2193 Show ",n," more replies"]}),Object(S.jsx)("span",{className:"transition-[background-color] duration-200 ease-out inline-block w-full bg-neutral-100 group-hover:bg-neutral-200 dark:bg-[rgba(255,255,255,0.08)] rounded h-[3px] mt-[3px]"})]})},vm=function(e){var t=e.comment,n=Object(a.useState)([]),r=Object(E.a)(n,2),o=r[0],i=r[1];Object(a.useEffect)((function(){i((function(e){return 0===e.length?t.replies.slice(0,3):t.replies.slice(0,t.replies.length)}))}),[t.replies]);var s=t.replies.length-o.length;return Object(S.jsxs)("div",{children:[o.map((function(e){return Object(S.jsx)(mm,{comment:e,parent:t,isReply:!0},e.id)})),!!s&&Object(S.jsx)(hm,{count:s,loadMore:function(){var e=o.length+5;i(t.replies.slice(0,e))}})]})},mm=function(e){var t=Object(a.useState)(!1),n=Object(E.a)(t,2),r=n[0],o=n[1],i=Object(a.useState)(!1),s=Object(E.a)(i,2),u=s[0],c=s[1],l=Object(a.useContext)(D),f=l.admin,d=l.avatarSaturation,p=l.member,h=l.commentsEnabled,v=e.comment,m=v.replies&&v.replies.length>0,y="published"!==v.status,g={__html:v.html};y&&(f&&"hidden"===v.status?g.__html="<i>This comment has been hidden.</i>":g.__html="<i>This comment has been removed.</i>");var b="paid"===h,k=p&&!!p.paid,w=p&&(k||!b);return r?Object(S.jsx)(zv,{comment:v,close:function(){o(!1)},parent:e.parent,isEdit:!0}):Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)("div",{className:"flex flex-row ".concat(m?"mb-2 sm:mb-4":"mb-6 sm:mb-10"),children:[Object(S.jsx)("div",{className:"mr-3",children:Object(S.jsx)(po,{comment:v,saturation:d,isBlank:y})}),Object(S.jsxs)("div",{children:[!y&&Object(S.jsx)("div",{className:"mb-[2px] sm:mb-[4px] mt-[2px]",children:Object(S.jsx)("h4",{className:"text-lg font-sans font-semibold tracking-tight dark:text-[rgba(255,255,255,0.85)]",children:v.member?v.member.name?v.member.name:"Anonymous":"Deleted member"})}),Object(S.jsx)("div",{className:"mb-2 pr-4 font-sans leading-normal ".concat(y?"text-neutral-400 mt-[4px]":"text-neutral-900"," dark:text-[rgba(255,255,255,0.85)]"),children:Object(S.jsx)("p",{dangerouslySetInnerHTML:g,className:"gh-comment-content text-[16.5px] leading-normal"})}),Object(S.jsxs)("div",{className:"flex gap-5 items-center",children:[!y&&Object(S.jsx)(Gv,{comment:v}),!y&&w&&(y||!e.parent)&&Object(S.jsx)(nm,{comment:v,toggleReply:function(){c((function(e){return!e}))},isReplying:u}),Object(S.jsx)("div",{className:"text-sm text-neutral-400 dark:text-[rgba(255,255,255,0.5)] font-sans",children:Zn(v.created_at)}),Object(S.jsx)(pm,{comment:v,toggleEdit:function(){o((function(e){return!e}))}})]})]})]}),m&&Object(S.jsx)("div",{className:"ml-11 sm:ml-14 mt-8 sm:mt-10 mb-4 sm:mb-0",children:Object(S.jsx)(vm,{comment:v})}),Object(S.jsx)(ao,{show:u,enter:"transition duration-500 delay-50 ease-in-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-none duration-0",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"ml-14 my-10",children:Object(S.jsx)(zv,{parent:v,close:function(){c(!1)},isReply:!0})})})]})},ym=function(e){var t=Object(a.useContext)(D),n=t.pagination,r=t.dispatchAction;if(!n)return null;var o=n.total-n.page*n.limit;return o<=0?null:Object(S.jsxs)("button",{className:"transition-[background-color] duration-200 ease-out w-full rounded-md bg-neutral-100 hover:bg-neutral-200 text-neutral-700 font-semibold px-3 py-3.5 mb-12 font-sans text-md text-center dark:bg-[rgba(255,255,255,0.08)] dark:text-white",onClick:function(){r("loadMoreComments")},children:["\u2191 Show ",o," previous comments"]})},gm=function(e){var t=Object(a.useContext)(D).accentColor,n={background:t},r={color:t},o=e.isFirst?"Want to be the first to comment?":"Want to join the discussion?";return Object(S.jsxs)("section",{className:"text-center mb-1 bg-neutral-900 rounded-lg pt-12 pb-10 px-8",style:n,children:[Object(S.jsx)("h1",{className:"text-center text-white text-[28px] font-sans font-semibold mb-6 tracking-tight",children:o}),Object(S.jsx)("button",{onClick:function(e){window.location.href="#/portal/signup"},className:"bg-white font-sans py-3 px-4 mb-6 rounded inline-block font-medium",style:r,children:"Subscribe now"}),Object(S.jsx)("p",{className:"font-sans text-center text-white",children:"You need to be subscribed to a paid plan to be able to join the discussion."})]})},bm=["title","titleId"];function km(){return km=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},km.apply(this,arguments)}function wm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function xm(e,t){var n=e.title,r=e.titleId,o=wm(e,bm);return a.createElement("svg",km({id:"loader-1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"40px",height:"40px",viewBox:"0 0 50 50",style:{enableBackground:"new 0 0 50 50"},xmlSpace:"preserve",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,fm||(fm=a.createElement("path",{d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"},a.createElement("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"}))))}var Om=a.forwardRef(xm);n.p;var Em,Dm,Sm=function(){return Object(S.jsx)("div",{className:"flex items-center justify-center w-full h-32",children:Object(S.jsx)(Om,{className:"w-12 h-12 mb-6 fill-[rgb(225,225,225,0.9)] dark:fill-[rgba(255,255,255,0.6)]"})})},Cm=function(e){var t=Object(a.useContext)(D),n=t.pagination,r=t.member,o=t.comments,i=t.commentsEnabled,s=o.slice().reverse().map((function(e){return Object(S.jsx)(mm,{comment:e},e.id)})),u=o.length,c="paid"===i,l=r&&!!r.paid;return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(ym,{}),Object(S.jsx)("div",{className:n?"":"mt-4",children:u>0&&s}),Object(S.jsx)("div",{children:r?l||!c?Object(S.jsx)(zv,{commentsCount:u}):Object(S.jsx)(gm,{isFirst:0===u}):Object(S.jsx)(ir,{isFirst:0===u})})]})},_m=function(e){var t=function(e,t,n){var r=[e,t,n].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*r[0]+.7152*r[1]+.0722*r[2]},n=Object(a.useContext)(D),r=n.accentColor,o=n.colorScheme,i=function(){if("light"===o)return!1;if("dark"===o)return!0;var e=getComputedStyle(document.querySelector("#ghost-comments-root").parentNode).getPropertyValue("color"),n=e.substring(e.indexOf("(")+1,e.lastIndexOf(")")).split(/,\s*/);return function(e,n){var r=t(e[0],e[1],e[2]),o=t(n[0],n[1],n[2]);return(Math.max(r,o)+.05)/(Math.min(r,o)+.05)}([255,255,255],[n[0],n[1],n[2]])<5}()?"dark":"",s={"--gh-accent-color":null!==r&&void 0!==r?r:"blue",paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:32};return Object(S.jsx)("section",{className:"ghost-display "+i,style:s,children:e.done?Object(S.jsx)(S.Fragment,{children:Object(S.jsx)(Cm,{})}):Object(S.jsx)(Sm,{})})},jm=["title","titleId"];function Am(){return Am=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},Am.apply(this,arguments)}function Tm(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Nm(e,t){var n=e.title,r=e.titleId,o=Tm(e,jm);return a.createElement("svg",Am({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"gh-portal-closeicon",alt:"Close",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Em||(Em=a.createElement("defs",null,a.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.2px !important;}"))),Dm||(Dm=a.createElement("path",{className:"a",d:"M.75 23.249l22.5-22.5M23.25 23.249L.75.749"})))}var Mm,Fm=a.forwardRef(Nm),Rm=(n.p,function(e){return Object(S.jsx)("button",{className:"transition-opacity duration-100 ease-out absolute top-[36px] sm:top-10 right-8 sm:right-10 opacity-20 hover:opacity-40",onClick:e.close,children:Object(S.jsx)(Fm,{className:"w-[20px] h-[20px]"})})}),Pm=function(e){var t=Object(a.useRef)(null),n=Object(a.useContext)(D).dispatchAction,r=function(){n("closePopup")},o=function(){var o=p(f().mark((function o(){var i;return f().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(""===u.trim()){o.next=7;break}return o.next=3,n("updateMemberName",{name:u});case 3:e.callback(),r(),o.next=10;break;case 7:v("Enter your name"),c(""),null===(i=t.current)||void 0===i||i.focus();case 10:case"end":return o.stop()}}),o)})));return function(){return o.apply(this,arguments)}}();Object(a.useEffect)((function(){var e=setTimeout((function(){var e;null===(e=t.current)||void 0===e||e.focus()}),200);return function(){clearTimeout(e)}}),[t]);var i=Object(a.useState)(""),s=Object(E.a)(i,2),u=s[0],c=s[1],l=Object(a.useState)(""),d=Object(E.a)(l,2),h=d[0],v=d[1];return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("h1",{className:"font-sans font-bold tracking-tight text-[24px] mb-3 text-black",children:"Add your name"}),Object(S.jsx)("p",{className:"font-sans text-[1.45rem] text-neutral-500 px-4 sm:px-8 leading-9",children:"For a healthy discussion, let other members know who you are when commenting."}),Object(S.jsxs)("section",{className:"mt-8 text-left",children:[Object(S.jsxs)("div",{className:"flex flex-row mb-2 justify-between",children:[Object(S.jsx)("label",{htmlFor:"comments-name",className:"font-sans font-medium text-sm",children:"Name"}),Object(S.jsx)(ao,{show:!!h,enter:"transition duration-300 ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition duration-100 ease-out",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"font-sans text-sm text-red-500",children:h})})]}),Object(S.jsx)("input",{id:"comments-name",className:"transition-[border-color] duration-200 font-sans px-3 rounded border border-neutral-200 focus:border-neutral-300 w-full outline-0 h-[42px] flex items-center ".concat(h&&"border-red-500 focus:border-red-500"),type:"text",name:"name",ref:t,value:u,placeholder:"Jamie Larson",onChange:function(e){c(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&(c(e.target.value),o())},maxLength:"64"}),Object(S.jsx)("button",{className:"transition-opacity duration-200 ease-linear w-full h-[44px] mt-4 px-8 flex items-center justify-center rounded-md text-white font-sans font-semibold text-[15px] bg-[#3204F5] opacity-100 hover:opacity-90",onClick:o,children:"Save"})]}),Object(S.jsx)(Rm,{close:r})]})},Bm=["title","titleId"];function Lm(){return Lm=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},Lm.apply(this,arguments)}function Im(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function zm(e,t){var n=e.title,r=e.titleId,o=Im(e,Bm);return a.createElement("svg",Lm({width:"26px",height:"26px",viewBox:"-1 -1 26 26",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":r},o),n?a.createElement("title",{id:r},n):null,Mm||(Mm=a.createElement("g",{id:"check-circle",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},a.createElement("path",{className:"animated-check-circle",d:"M19.6004116,2.71490714 C17.5353801,1.0196018 14.8927356,0 12,0 C5.38938053,0 0,5.38938053 0,12 C0,18.6106195 5.38938053,24 12,24 C18.6106195,24 24,18.6106195 24,12 C24,9.71681416 23.3628319,7.59292035 22.2743363,5.78761062 L11.0442478,17.0442478 L5.49557522,11.4955752",id:"Shape",stroke:"#FFFFFF",strokeWidth:2}))))}var Um=a.forwardRef(zm),Vm=(n.p,{addNameDialog:Pm,reportDialog:function(e){var t=Object(a.useState)("default"),n=Object(E.a)(t,2),r=n[0],o=n[1],i="bg-red-600";"sent"===r&&(i="bg-green-600");var s="Yes";"sending"===r?s="Sending":"sent"===r&&(s="Sent");var u=null;"sending"===r?u=Object(S.jsx)(Om,{className:"w-[20px] h-[20px] mr-2 fill-white"}):"sent"===r&&(u=Object(S.jsx)(Um,{className:"w-[16px] h-[16px] mr-2"}));var c=Object(a.useContext)(D).dispatchAction,l=function(e){c("closePopup")};return Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)("h1",{className:"font-sans font-bold tracking-tight text-[24px] mb-3 text-black",children:"You sure you want to report?"}),Object(S.jsx)("p",{className:"font-sans text-[1.45rem] text-neutral-500",children:"You request will be sent to the owner of this site."}),Object(S.jsxs)("div",{className:"mt-10",children:[Object(S.jsxs)("button",{className:"transition duration-200 ease-linear w-full h-[44px] px-8 flex items-center justify-center rounded-md text-white font-sans font-semibold text-[15px] ".concat(i),onClick:function(t){t.stopPropagation(),o("sending"),setTimeout((function(){o("sent"),c("reportComment",e.comment),setTimeout((function(){l()}),750)}),1e3)},children:[u,s]}),Object(S.jsxs)("p",{className:"font-sans font-medium text-[1.45rem] text-neutral-500 mt-4 -mb-1",children:["No, ",Object(S.jsx)("button",{className:"font-sans underline",onClick:l,children:"I've changed my mind"})]})]})]})}}),$m=function(e){var t=Object(a.useContext)(D).dispatchAction;return Object(S.jsx)(ao,{show:e.show,appear:!0,children:Object(S.jsx)(A,{type:"fixed",children:Object(S.jsx)("div",{children:Object(S.jsx)(ao.Child,{enter:"transition duration-200 linear",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition duration-200 linear",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:Object(S.jsx)("div",{className:"fixed top-0 left-0 overflow-hidden w-screen h-screen flex pt-0 sm:pt-12 justify-center bg-gradient-to-b from-[rgba(0,0,0,0.2)] to-rgba(0,0,0,0.1) backdrop-blur-[2px]",onClick:function(e){t("closePopup")},children:Object(S.jsx)(ao.Child,{enter:"transition duration-200 delay-150 linear",enterFrom:"translate-y-4 opacity-0",enterTo:"translate-y-0 opacity-100",leave:"transition duration-200 linear",leaveFrom:"translate-y-0 opacity-100",leaveTo:"translate-y-4 opacity-0",children:Object(S.jsx)("div",{className:"relative bg-white w-screen sm:w-[500px] h-screen sm:h-auto p-[28px] sm:p-8 rounded-none sm:rounded-xl text-center shadow-modal",onClick:function(e){e.stopPropagation()},children:e.children})})})})})})})},Hm=["type"];function qm(e){var t=Object(a.useContext)(D).popup,n=Object(a.useState)(t),r=Object(E.a)(n,2),s=r[0],u=r[1];if(Object(a.useEffect)((function(){null!==t&&u(t)}),[t,u]),!s||!s.type)return null;var c=null!==t&&void 0!==t?t:s,l=c.type,f=i(c,Hm),d=Vm[l];if(!d)return console.warn("Unknown popup of type ",l),null;var p=t===s;return Object(S.jsx)($m,{show:p,children:Object(S.jsx)(d,Object(o.a)({},f))})}function Wm(e){var t=e.adminUrl,n=e.onLoad;return Object(S.jsx)("iframe",{"data-frame":"admin-auth",src:t+"auth-frame/",style:{display:"none"},title:"auth-frame",onLoad:n})}function Gm(e){var t=e.done;e.appVersion;return Object(S.jsx)(A,{children:Object(S.jsx)(_m,{done:t})})}function Ym(e){var t=e.dsn,n=e.children;return t?Object(S.jsx)(Rn,{children:n}):Object(S.jsx)(S.Fragment,{children:n})}var Km=function(e){g(n,e);var t=O(n);function n(e){var r;return h(this,n),(r=t.call(this,e)).state={action:"init:running",initStatus:"running",member:null,admin:null,comments:null,pagination:null,popupNotification:null,customSiteUrl:e.customSiteUrl,postId:e.postId,popup:null,accentColor:e.accentColor},r.adminApi=null,r.GhostApi=null,r}return m(n,[{key:"initSetup",value:function(){var e=p(f().mark((function e(){var t,n,r,o,i,a,s;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetchApiData();case 3:return t=e.sent,n=t.site,r=t.member,e.next=8,this.fetchComments();case 8:o=e.sent,i=o.comments,a=o.pagination,s={site:n,member:r,action:"init:success",initStatus:"success",comments:i,pagination:a},this.setState(s),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error("[Comments] Failed to initialize:",e.t0),this.setState({action:"init:failed",initStatus:"failed"});case 19:case"end":return e.stop()}}),e,this,[[0,15]])})));return function(){return e.apply(this,arguments)}}()},{key:"initAdminAuth",value:function(){var e=p(f().mark((function e(){var t,n;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.adminApi=this.setupAdminAPI(),t=null,e.prev=3,e.next=6,this.adminApi.getUser();case 6:t=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),console.warn("[Comments] Failed to fetch current admin user:",e.t0);case 12:n={admin:t},this.setState(n),e.next=19;break;case 16:e.prev=16,e.t1=e.catch(0),console.error("[Comments] Failed to initialize admin authentication:",e.t1);case 19:case"end":return e.stop()}}),e,this,[[0,16],[3,9]])})));return function(){return e.apply(this,arguments)}}()},{key:"dispatchAction",value:function(){var e=p(f().mark((function e(t,n){var r,o,i=this;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return clearTimeout(this.timeoutId),this.setState({action:"".concat(t,":running")}),e.prev=2,e.next=5,Kn({action:t,data:n,state:this.state,api:this.GhostApi,adminApi:this.adminApi});case 5:r=e.sent,this.setState(r),r&&r.action&&!r.action.includes(":failed")&&(this.timeoutId=setTimeout((function(){i.setState({action:""})}),2e3)),e.next=15;break;case 10:e.prev=10,e.t0=e.catch(2),console.error(e.t0),o=Qn({type:"".concat(t,":failed"),autoHide:!0,closeable:!0,status:"error",state:this.state,meta:{error:e.t0}}),this.setState({action:"".concat(t,":failed"),popupNotification:o});case 15:case"end":return e.stop()}}),e,this,[[2,10]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"fetchApiData",value:function(){var e=p(f().mark((function e(){var t,n,r,o,i,a,s,u;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.siteUrl,r=t.customSiteUrl,o=t.apiUrl,i=t.apiKey,e.prev=1,this.GhostApi=this.props.api||or({siteUrl:n,apiUrl:o,apiKey:i}),e.next=5,this.GhostApi.init();case 5:return a=e.sent,s=a.site,u=a.member,this.setupSentry({site:s}),e.abrupt("return",{site:s,member:u});case 12:if(e.prev=12,e.t0=e.catch(1),!rr(["dev","test"],{customSiteUrl:r})){e.next=16;break}return e.abrupt("return",{});case 16:throw e.t0;case 17:case"end":return e.stop()}}),e,this,[[1,12]])})));return function(){return e.apply(this,arguments)}}()},{key:"fetchComments",value:function(){var e=p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.GhostApi.comments.browse({page:1,postId:this.state.postId});case 2:return t=e.sent,e.abrupt("return",{comments:t.comments,pagination:t.meta.pagination});case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"setupAdminAPI",value:function(){var e=document.querySelector('iframe[data-frame="admin-auth"]'),t=1,n={};function r(r,i){return new Promise((function(a,s){n[t+=1]=function(e,t){return e?s(e):a(t)},e.contentWindow.postMessage(JSON.stringify(Object(o.a)({uid:t,action:r},i)),"*")}))}return window.addEventListener("message",(function(e){e.origin;var t=null;try{t=JSON.parse(e.data)}catch(o){return void console.error("Error parsing event data",o)}var r=n[t.uid];r&&(delete n[t.uid],r(t.error,t.result))})),{getUser:function(){return p(f().mark((function e(){var t;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r("getUser");case 2:return t=e.sent,e.abrupt("return",t.users[0]);case 4:case"end":return e.stop()}}),e)})))()},hideComment:function(e){return p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r("hideComment",{id:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()},showComment:function(e){return p(f().mark((function t(){return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r("showComment",{id:e});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))()}}}},{key:"setupSentry",value:function(e){var t=e.site;if(rr(["test"]))return null;var n=t.portal_sentry,r=(t.portal_version,t.version),o="comments@".concat("0.2.1","|ghost@").concat(r);n&&n.dsn&&Pn({dsn:n.dsn,environment:n.env||"development",release:o,beforeSend:function(e){return function(e){var t,n,r,o,i=e.event,a=((null===i||void 0===i||null===(t=i.exception)||void 0===t||null===(n=t.values)||void 0===n||null===(r=n[0])||void 0===r||null===(o=r.stacktrace)||void 0===o?void 0:o.frames)||[]).map((function(e){return e.filename})).filter((function(e){return!!e}));return(a[a.length-1]||"").includes("@tryghost/comments")}({event:e})?e:null},allowUrls:[/https?:\/\/((www)\.)?unpkg\.com\/@tryghost\/comments/,/https?:\/\/((cdn)\.)?jsdelivr\.net\/npm\/@tryghost\/comments/]})}},{key:"getContextFromState",value:function(){var e=this,t=this.state,n=t.action,r=t.popupNotification,o=t.customSiteUrl,i=t.member,a=t.comments,s=t.pagination,u=t.postId,c=t.admin,l=t.popup;return{action:n,popupNotification:r,customSiteUrl:o,member:i,admin:c,comments:a,pagination:s,postId:u,colorScheme:this.props.colorScheme,avatarSaturation:this.props.avatarSaturation,accentColor:this.props.accentColor,commentsEnabled:this.props.commentsEnabled,appVersion:this.props.appVersion,stylesUrl:this.props.stylesUrl,popup:l,dispatchAction:function(t,n){return e.dispatchAction(t,n)},onAction:function(t,n){return e.dispatchAction(t,n)}}}},{key:"componentDidMount",value:function(){this.initSetup()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeoutId)}},{key:"render",value:function(){var e="success"===this.state.initStatus;return Object(S.jsx)(Ym,{dsn:this.props.sentryDsn,children:Object(S.jsxs)(D.Provider,{value:this.getContextFromState(),children:[Object(S.jsx)(Gm,{done:e}),Object(S.jsx)(Wm,{adminUrl:this.props.adminUrl,onLoad:this.initAdminAuth.bind(this)}),Object(S.jsx)(qm,{})]})})}}]),n}(s.a.Component),Jm=["siteUrl"],Qm="ghost-comments-root";function Xm(e){e.siteUrl;!function(){var e=document.querySelector("script[data-ghost-comments]");if(e){var t=document.createElement("div");t.id=Qm,e.parentElement.insertBefore(t,e)}else console.warn("[Comments] Comment box location was not found: could not load comments box.")}(),function(){var e=new URL(window.location.href);e.searchParams.get("token")&&(e.searchParams.delete("token"),window.history.replaceState({},document.title,e.href))}()}!function(){var e=function(){var e=document.querySelector("script[data-ghost-comments]");if(e){var t=e.dataset.ghostComments,n=e.dataset.key,r=e.dataset.api,o=e.dataset.admin,i=e.dataset.sentryDsn,a=e.dataset.postId,s=e.dataset.colorScheme,u=e.dataset.avatarSaturation,c=e.dataset.accentColor,l=e.dataset.appVersion,f=e.dataset.commentsEnabled;return{siteUrl:t,stylesUrl:e.dataset.styles,apiKey:n,apiUrl:r,sentryDsn:i,postId:a,adminUrl:o,colorScheme:s,avatarSaturation:u,accentColor:c,appVersion:l,commentsEnabled:f}}return{}}(),t=e.siteUrl,n=i(e,Jm),r=t||window.location.origin;Xm({siteUrl:r}),c.a.render(Object(S.jsx)(s.a.StrictMode,{children:Object(S.jsx)(Km,Object(o.a)({siteUrl:r,customSiteUrl:t},n))}),document.getElementById(Qm))}()},,,,,,,,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(4),o=n(7),i=n(26),a=n(10),s=n(16);function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return l("",e,t,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400,r=u(e,t);return d(r)>n?c(e,t-1,n):r}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Object(i.a)(),c=Object(r.a)(u,2),d=c[0],p=c[1];if(null===t||["number","boolean","string"].includes(typeof t)&&!Object(o.h)(t))return t;var h=f(e,t);if(!h.startsWith("[object "))return h;if(t.__sentry_skip_normalization__)return t;if(0===n)return h.replace("object ","");if(d(t))return"[Circular ~]";var v=t;if(v&&"function"===typeof v.toJSON)try{var m=v.toJSON();return l("",m,n-1,s,u)}catch(x){}var y=Array.isArray(t)?[]:{},g=0,b=Object(a.b)(t);for(var k in b)if(Object.prototype.hasOwnProperty.call(b,k)){if(g>=s){y[k]="[MaxProperties ~]";break}var w=b[k];y[k]=l(k,w,n-1,s,u),g+=1}return p(t),y}function f(t,n){try{return"domain"===t&&n&&"object"===typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!==typeof e&&n===e?"[Global]":"undefined"!==typeof window&&n===window?"[Window]":"undefined"!==typeof document&&n===document?"[Document]":Object(o.m)(n)?"[SyntheticEvent]":"number"===typeof n&&n!==n?"[NaN]":void 0===n?"[undefined]":"function"===typeof n?"[Function: ".concat(Object(s.b)(n),"]"):"symbol"===typeof n?"[".concat(String(n),"]"):"bigint"===typeof n?"[BigInt: ".concat(String(n),"]"):"[object ".concat(Object.getPrototypeOf(n).constructor.name,"]")}catch(r){return"**non-serializable** (".concat(r,")")}}function d(e){return function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(e))}}).call(this,n(21))}]);
3
3
  //# sourceMappingURL=comments-ui.min.js.map