@arkyn/components 1.3.112 → 1.3.113

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- (function(he,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react"),require("lucide-react"),require("react-dom"),require("@remix-run/react"),require("@react-input/mask"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","react-dom","@remix-run/react","@react-input/mask","framer-motion"],l):(he=typeof globalThis<"u"?globalThis:he||self,l(he["@arkyn/components"]={},he.e$2,he.lucideReact,he.ReactDOM,he.react,he.mask,he.framerMotion))})(this,function(he,l,Se,Wt,Dn,Ac,nn){"use strict";function Oc(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Ia=Oc(Wt);var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function si(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ui={exports:{}},Tn={};/**
1
+ (function(he,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react"),require("lucide-react"),require("react-dom"),require("@remix-run/react"),require("@react-input/mask"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","react-dom","@remix-run/react","@react-input/mask","framer-motion"],l):(he=typeof globalThis<"u"?globalThis:he||self,l(he["@arkyn/components"]={},he.e$2,he.lucideReact,he.ReactDOM,he.react,he.mask,he.framerMotion))})(this,function(he,l,Se,Wt,Dn,Ac,nn){"use strict";function Oc(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Ii=Oc(Wt);var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ua={exports:{}},Tn={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Na;function Fc(){if(Na)return Tn;Na=1;var t=l,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,c){var f,h={},p=null,g=null;c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(g=u.ref);for(f in u)r.call(u,f)&&!a.hasOwnProperty(f)&&(h[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:e,type:s,key:p,ref:g,props:h,_owner:i.current}}return Tn.Fragment=n,Tn.jsx=o,Tn.jsxs=o,Tn}var Rn={};/**
9
+ */var Ni;function Fc(){if(Ni)return Tn;Ni=1;var t=l,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,c){var f,h={},p=null,v=null;c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)r.call(u,f)&&!i.hasOwnProperty(f)&&(h[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)h[f]===void 0&&(h[f]=u[f]);return{$$typeof:e,type:s,key:p,ref:v,props:h,_owner:a.current}}return Tn.Fragment=n,Tn.jsx=o,Tn.jsxs=o,Tn}var Rn={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,22 +14,22 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var za;function Pc(){return za||(za=1,process.env.NODE_ENV!=="production"&&function(){var t=l,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),C=Symbol.iterator,v="@@iterator";function d(L){if(L===null||typeof L!="object")return null;var te=C&&L[C]||L[v];return typeof te=="function"?te:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function B(L){{for(var te=arguments.length,oe=new Array(te>1?te-1:0),De=1;De<te;De++)oe[De-1]=arguments[De];w("error",L,oe)}}function w(L,te,oe){{var De=D.ReactDebugCurrentFrame,je=De.getStackAddendum();je!==""&&(te+="%s",oe=oe.concat([je]));var _e=oe.map(function(ke){return String(ke)});_e.unshift("Warning: "+te),Function.prototype.apply.call(console[L],console,_e)}}var O=!1,b=!1,E=!1,S=!1,F=!1,V;V=Symbol.for("react.module.reference");function P(L){return!!(typeof L=="string"||typeof L=="function"||L===r||L===a||F||L===i||L===c||L===f||S||L===g||O||b||E||typeof L=="object"&&L!==null&&(L.$$typeof===p||L.$$typeof===h||L.$$typeof===o||L.$$typeof===s||L.$$typeof===u||L.$$typeof===V||L.getModuleId!==void 0))}function z(L,te,oe){var De=L.displayName;if(De)return De;var je=te.displayName||te.name||"";return je!==""?oe+"("+je+")":oe}function R(L){return L.displayName||"Context"}function I(L){if(L==null)return null;if(typeof L.tag=="number"&&B("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof L=="function")return L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case f:return"SuspenseList"}if(typeof L=="object")switch(L.$$typeof){case s:var te=L;return R(te)+".Consumer";case o:var oe=L;return R(oe._context)+".Provider";case u:return z(L,L.render,"ForwardRef");case h:var De=L.displayName||null;return De!==null?De:I(L.type)||"Memo";case p:{var je=L,_e=je._payload,ke=je._init;try{return I(ke(_e))}catch{return null}}}return null}var j=Object.assign,N=0,X,_,$,re,k,T,Z;function H(){}H.__reactDisabledLog=!0;function Q(){{if(N===0){X=console.log,_=console.info,$=console.warn,re=console.error,k=console.group,T=console.groupCollapsed,Z=console.groupEnd;var L={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}N++}}function K(){{if(N--,N===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},L,{value:X}),info:j({},L,{value:_}),warn:j({},L,{value:$}),error:j({},L,{value:re}),group:j({},L,{value:k}),groupCollapsed:j({},L,{value:T}),groupEnd:j({},L,{value:Z})})}N<0&&B("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=D.ReactCurrentDispatcher,U;function W(L,te,oe){{if(U===void 0)try{throw Error()}catch(je){var De=je.stack.trim().match(/\n( *(at )?)/);U=De&&De[1]||""}return`
18
- `+U+L}}var M=!1,J;{var ne=typeof WeakMap=="function"?WeakMap:Map;J=new ne}function G(L,te){if(!L||M)return"";{var oe=J.get(L);if(oe!==void 0)return oe}var De;M=!0;var je=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _e;_e=y.current,y.current=null,Q();try{if(te){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(it){De=it}Reflect.construct(L,[],ke)}else{try{ke.call()}catch(it){De=it}L.call(ke.prototype)}}else{try{throw Error()}catch(it){De=it}L()}}catch(it){if(it&&De&&typeof it.stack=="string"){for(var Oe=it.stack.split(`
17
+ */var zi;function Pc(){return zi||(zi=1,process.env.NODE_ENV!=="production"&&function(){var t=l,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),C=Symbol.iterator,g="@@iterator";function d(L){if(L===null||typeof L!="object")return null;var te=C&&L[C]||L[g];return typeof te=="function"?te:null}var D=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function B(L){{for(var te=arguments.length,oe=new Array(te>1?te-1:0),De=1;De<te;De++)oe[De-1]=arguments[De];E("error",L,oe)}}function E(L,te,oe){{var De=D.ReactDebugCurrentFrame,je=De.getStackAddendum();je!==""&&(te+="%s",oe=oe.concat([je]));var _e=oe.map(function(ke){return String(ke)});_e.unshift("Warning: "+te),Function.prototype.apply.call(console[L],console,_e)}}var O=!1,b=!1,w=!1,S=!1,P=!1,V;V=Symbol.for("react.module.reference");function F(L){return!!(typeof L=="string"||typeof L=="function"||L===r||L===i||P||L===a||L===c||L===f||S||L===v||O||b||w||typeof L=="object"&&L!==null&&(L.$$typeof===p||L.$$typeof===h||L.$$typeof===o||L.$$typeof===s||L.$$typeof===u||L.$$typeof===V||L.getModuleId!==void 0))}function j(L,te,oe){var De=L.displayName;if(De)return De;var je=te.displayName||te.name||"";return je!==""?oe+"("+je+")":oe}function k(L){return L.displayName||"Context"}function I(L){if(L==null)return null;if(typeof L.tag=="number"&&B("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof L=="function")return L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case a:return"StrictMode";case c:return"Suspense";case f:return"SuspenseList"}if(typeof L=="object")switch(L.$$typeof){case s:var te=L;return k(te)+".Consumer";case o:var oe=L;return k(oe._context)+".Provider";case u:return j(L,L.render,"ForwardRef");case h:var De=L.displayName||null;return De!==null?De:I(L.type)||"Memo";case p:{var je=L,_e=je._payload,ke=je._init;try{return I(ke(_e))}catch{return null}}}return null}var N=Object.assign,z=0,X,_,$,re,T,R,Z;function H(){}H.__reactDisabledLog=!0;function Q(){{if(z===0){X=console.log,_=console.info,$=console.warn,re=console.error,T=console.group,R=console.groupCollapsed,Z=console.groupEnd;var L={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}z++}}function K(){{if(z--,z===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},L,{value:X}),info:N({},L,{value:_}),warn:N({},L,{value:$}),error:N({},L,{value:re}),group:N({},L,{value:T}),groupCollapsed:N({},L,{value:R}),groupEnd:N({},L,{value:Z})})}z<0&&B("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var y=D.ReactCurrentDispatcher,U;function W(L,te,oe){{if(U===void 0)try{throw Error()}catch(je){var De=je.stack.trim().match(/\n( *(at )?)/);U=De&&De[1]||""}return`
18
+ `+U+L}}var M=!1,J;{var ne=typeof WeakMap=="function"?WeakMap:Map;J=new ne}function G(L,te){if(!L||M)return"";{var oe=J.get(L);if(oe!==void 0)return oe}var De;M=!0;var je=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _e;_e=y.current,y.current=null,Q();try{if(te){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(at){De=at}Reflect.construct(L,[],ke)}else{try{ke.call()}catch(at){De=at}L.call(ke.prototype)}}else{try{throw Error()}catch(at){De=at}L()}}catch(at){if(at&&De&&typeof at.stack=="string"){for(var Oe=at.stack.split(`
19
19
  `),rt=De.stack.split(`
20
20
  `),Ke=Oe.length-1,$e=rt.length-1;Ke>=1&&$e>=0&&Oe[Ke]!==rt[$e];)$e--;for(;Ke>=1&&$e>=0;Ke--,$e--)if(Oe[Ke]!==rt[$e]){if(Ke!==1||$e!==1)do if(Ke--,$e--,$e<0||Oe[Ke]!==rt[$e]){var lt=`
21
- `+Oe[Ke].replace(" at new "," at ");return L.displayName&&lt.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",L.displayName)),typeof L=="function"&&J.set(L,lt),lt}while(Ke>=1&&$e>=0);break}}}finally{M=!1,y.current=_e,K(),Error.prepareStackTrace=je}var zt=L?L.displayName||L.name:"",_t=zt?W(zt):"";return typeof L=="function"&&J.set(L,_t),_t}function ue(L,te,oe){return G(L,!1)}function ae(L){var te=L.prototype;return!!(te&&te.isReactComponent)}function de(L,te,oe){if(L==null)return"";if(typeof L=="function")return G(L,ae(L));if(typeof L=="string")return W(L);switch(L){case c:return W("Suspense");case f:return W("SuspenseList")}if(typeof L=="object")switch(L.$$typeof){case u:return ue(L.render);case h:return de(L.type,te,oe);case p:{var De=L,je=De._payload,_e=De._init;try{return de(_e(je),te,oe)}catch{}}}return""}var pe=Object.prototype.hasOwnProperty,Ce={},ye=D.ReactDebugCurrentFrame;function ge(L){if(L){var te=L._owner,oe=de(L.type,L._source,te?te.type:null);ye.setExtraStackFrame(oe)}else ye.setExtraStackFrame(null)}function ve(L,te,oe,De,je){{var _e=Function.call.bind(pe);for(var ke in L)if(_e(L,ke)){var Oe=void 0;try{if(typeof L[ke]!="function"){var rt=Error((De||"React class")+": "+oe+" type `"+ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof L[ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw rt.name="Invariant Violation",rt}Oe=L[ke](te,ke,De,oe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ke){Oe=Ke}Oe&&!(Oe instanceof Error)&&(ge(je),B("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",De||"React class",oe,ke,typeof Oe),ge(null)),Oe instanceof Error&&!(Oe.message in Ce)&&(Ce[Oe.message]=!0,ge(je),B("Failed %s type: %s",oe,Oe.message),ge(null))}}}var Ie=Array.isArray;function se(L){return Ie(L)}function Ne(L){{var te=typeof Symbol=="function"&&Symbol.toStringTag,oe=te&&L[Symbol.toStringTag]||L.constructor.name||"Object";return oe}}function fe(L){try{return we(L),!1}catch{return!0}}function we(L){return""+L}function Me(L){if(fe(L))return B("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ne(L)),we(L)}var He=D.ReactCurrentOwner,qe={key:!0,ref:!0,__self:!0,__source:!0},Ee,ut,at;at={};function At(L){if(pe.call(L,"ref")){var te=Object.getOwnPropertyDescriptor(L,"ref").get;if(te&&te.isReactWarning)return!1}return L.ref!==void 0}function ht(L){if(pe.call(L,"key")){var te=Object.getOwnPropertyDescriptor(L,"key").get;if(te&&te.isReactWarning)return!1}return L.key!==void 0}function wt(L,te){if(typeof L.ref=="string"&&He.current&&te&&He.current.stateNode!==te){var oe=I(He.current.type);at[oe]||(B('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(He.current.type),L.ref),at[oe]=!0)}}function Tt(L,te){{var oe=function(){Ee||(Ee=!0,B("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};oe.isReactWarning=!0,Object.defineProperty(L,"key",{get:oe,configurable:!0})}}function vt(L,te){{var oe=function(){ut||(ut=!0,B("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};oe.isReactWarning=!0,Object.defineProperty(L,"ref",{get:oe,configurable:!0})}}var tn=function(L,te,oe,De,je,_e,ke){var Oe={$$typeof:e,type:L,key:te,ref:oe,props:ke,_owner:_e};return Oe._store={},Object.defineProperty(Oe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Oe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:De}),Object.defineProperty(Oe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.freeze&&(Object.freeze(Oe.props),Object.freeze(Oe)),Oe};function be(L,te,oe,De,je){{var _e,ke={},Oe=null,rt=null;oe!==void 0&&(Me(oe),Oe=""+oe),ht(te)&&(Me(te.key),Oe=""+te.key),At(te)&&(rt=te.ref,wt(te,je));for(_e in te)pe.call(te,_e)&&!qe.hasOwnProperty(_e)&&(ke[_e]=te[_e]);if(L&&L.defaultProps){var Ke=L.defaultProps;for(_e in Ke)ke[_e]===void 0&&(ke[_e]=Ke[_e])}if(Oe||rt){var $e=typeof L=="function"?L.displayName||L.name||"Unknown":L;Oe&&Tt(ke,$e),rt&&vt(ke,$e)}return tn(L,Oe,rt,je,De,He.current,ke)}}var Te=D.ReactCurrentOwner,Re=D.ReactDebugCurrentFrame;function nt(L){if(L){var te=L._owner,oe=de(L.type,L._source,te?te.type:null);Re.setExtraStackFrame(oe)}else Re.setExtraStackFrame(null)}var ot;ot=!1;function Ot(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function yn(){{if(Te.current){var L=I(Te.current.type);if(L)return`
21
+ `+Oe[Ke].replace(" at new "," at ");return L.displayName&&lt.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",L.displayName)),typeof L=="function"&&J.set(L,lt),lt}while(Ke>=1&&$e>=0);break}}}finally{M=!1,y.current=_e,K(),Error.prepareStackTrace=je}var zt=L?L.displayName||L.name:"",_t=zt?W(zt):"";return typeof L=="function"&&J.set(L,_t),_t}function ue(L,te,oe){return G(L,!1)}function ie(L){var te=L.prototype;return!!(te&&te.isReactComponent)}function de(L,te,oe){if(L==null)return"";if(typeof L=="function")return G(L,ie(L));if(typeof L=="string")return W(L);switch(L){case c:return W("Suspense");case f:return W("SuspenseList")}if(typeof L=="object")switch(L.$$typeof){case u:return ue(L.render);case h:return de(L.type,te,oe);case p:{var De=L,je=De._payload,_e=De._init;try{return de(_e(je),te,oe)}catch{}}}return""}var pe=Object.prototype.hasOwnProperty,Ce={},ye=D.ReactDebugCurrentFrame;function ge(L){if(L){var te=L._owner,oe=de(L.type,L._source,te?te.type:null);ye.setExtraStackFrame(oe)}else ye.setExtraStackFrame(null)}function ve(L,te,oe,De,je){{var _e=Function.call.bind(pe);for(var ke in L)if(_e(L,ke)){var Oe=void 0;try{if(typeof L[ke]!="function"){var rt=Error((De||"React class")+": "+oe+" type `"+ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof L[ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw rt.name="Invariant Violation",rt}Oe=L[ke](te,ke,De,oe,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ke){Oe=Ke}Oe&&!(Oe instanceof Error)&&(ge(je),B("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",De||"React class",oe,ke,typeof Oe),ge(null)),Oe instanceof Error&&!(Oe.message in Ce)&&(Ce[Oe.message]=!0,ge(je),B("Failed %s type: %s",oe,Oe.message),ge(null))}}}var Ie=Array.isArray;function se(L){return Ie(L)}function Ne(L){{var te=typeof Symbol=="function"&&Symbol.toStringTag,oe=te&&L[Symbol.toStringTag]||L.constructor.name||"Object";return oe}}function fe(L){try{return we(L),!1}catch{return!0}}function we(L){return""+L}function Me(L){if(fe(L))return B("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ne(L)),we(L)}var He=D.ReactCurrentOwner,qe={key:!0,ref:!0,__self:!0,__source:!0},Ee,ut,it;it={};function At(L){if(pe.call(L,"ref")){var te=Object.getOwnPropertyDescriptor(L,"ref").get;if(te&&te.isReactWarning)return!1}return L.ref!==void 0}function ht(L){if(pe.call(L,"key")){var te=Object.getOwnPropertyDescriptor(L,"key").get;if(te&&te.isReactWarning)return!1}return L.key!==void 0}function wt(L,te){if(typeof L.ref=="string"&&He.current&&te&&He.current.stateNode!==te){var oe=I(He.current.type);it[oe]||(B('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(He.current.type),L.ref),it[oe]=!0)}}function Tt(L,te){{var oe=function(){Ee||(Ee=!0,B("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};oe.isReactWarning=!0,Object.defineProperty(L,"key",{get:oe,configurable:!0})}}function vt(L,te){{var oe=function(){ut||(ut=!0,B("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};oe.isReactWarning=!0,Object.defineProperty(L,"ref",{get:oe,configurable:!0})}}var tn=function(L,te,oe,De,je,_e,ke){var Oe={$$typeof:e,type:L,key:te,ref:oe,props:ke,_owner:_e};return Oe._store={},Object.defineProperty(Oe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Oe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:De}),Object.defineProperty(Oe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.freeze&&(Object.freeze(Oe.props),Object.freeze(Oe)),Oe};function be(L,te,oe,De,je){{var _e,ke={},Oe=null,rt=null;oe!==void 0&&(Me(oe),Oe=""+oe),ht(te)&&(Me(te.key),Oe=""+te.key),At(te)&&(rt=te.ref,wt(te,je));for(_e in te)pe.call(te,_e)&&!qe.hasOwnProperty(_e)&&(ke[_e]=te[_e]);if(L&&L.defaultProps){var Ke=L.defaultProps;for(_e in Ke)ke[_e]===void 0&&(ke[_e]=Ke[_e])}if(Oe||rt){var $e=typeof L=="function"?L.displayName||L.name||"Unknown":L;Oe&&Tt(ke,$e),rt&&vt(ke,$e)}return tn(L,Oe,rt,je,De,He.current,ke)}}var Te=D.ReactCurrentOwner,Re=D.ReactDebugCurrentFrame;function nt(L){if(L){var te=L._owner,oe=de(L.type,L._source,te?te.type:null);Re.setExtraStackFrame(oe)}else Re.setExtraStackFrame(null)}var ot;ot=!1;function Ot(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function yn(){{if(Te.current){var L=I(Te.current.type);if(L)return`
22
22
 
23
23
  Check the render method of \``+L+"`."}return""}}function Fn(L){{if(L!==void 0){var te=L.fileName.replace(/^.*[\\\/]/,""),oe=L.lineNumber;return`
24
24
 
25
- Check your code at `+te+":"+oe+"."}return""}}var sr={};function ri(L){{var te=yn();if(!te){var oe=typeof L=="string"?L:L.displayName||L.name;oe&&(te=`
25
+ Check your code at `+te+":"+oe+"."}return""}}var sr={};function ra(L){{var te=yn();if(!te){var oe=typeof L=="string"?L:L.displayName||L.name;oe&&(te=`
26
26
 
27
- Check the top-level render call using <`+oe+">.")}return te}}function Cn(L,te){{if(!L._store||L._store.validated||L.key!=null)return;L._store.validated=!0;var oe=ri(te);if(sr[oe])return;sr[oe]=!0;var De="";L&&L._owner&&L._owner!==Te.current&&(De=" It was passed a child from "+I(L._owner.type)+"."),nt(L),B('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',oe,De),nt(null)}}function ur(L,te){{if(typeof L!="object")return;if(se(L))for(var oe=0;oe<L.length;oe++){var De=L[oe];Ot(De)&&Cn(De,te)}else if(Ot(L))L._store&&(L._store.validated=!0);else if(L){var je=d(L);if(typeof je=="function"&&je!==L.entries)for(var _e=je.call(L),ke;!(ke=_e.next()).done;)Ot(ke.value)&&Cn(ke.value,te)}}}function ii(L){{var te=L.type;if(te==null||typeof te=="string")return;var oe;if(typeof te=="function")oe=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===u||te.$$typeof===h))oe=te.propTypes;else return;if(oe){var De=I(te);ve(oe,L.props,"prop",De,L)}else if(te.PropTypes!==void 0&&!ot){ot=!0;var je=I(te);B("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",je||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&B("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pn(L){{for(var te=Object.keys(L.props),oe=0;oe<te.length;oe++){var De=te[oe];if(De!=="children"&&De!=="key"){nt(L),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",De),nt(null);break}}L.ref!==null&&(nt(L),B("Invalid attribute `ref` supplied to `React.Fragment`."),nt(null))}}var lr={};function cr(L,te,oe,De,je,_e){{var ke=P(L);if(!ke){var Oe="";(L===void 0||typeof L=="object"&&L!==null&&Object.keys(L).length===0)&&(Oe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var rt=Fn(je);rt?Oe+=rt:Oe+=yn();var Ke;L===null?Ke="null":se(L)?Ke="array":L!==void 0&&L.$$typeof===e?(Ke="<"+(I(L.type)||"Unknown")+" />",Oe=" Did you accidentally export a JSX literal instead of a component?"):Ke=typeof L,B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ke,Oe)}var $e=be(L,te,oe,je,_e);if($e==null)return $e;if(ke){var lt=te.children;if(lt!==void 0)if(De)if(se(lt)){for(var zt=0;zt<lt.length;zt++)ur(lt[zt],L);Object.freeze&&Object.freeze(lt)}else B("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ur(lt,L)}if(pe.call(te,"key")){var _t=I(L),it=Object.keys(te).filter(function(zD){return zD!=="key"}),Be=it.length>0?"{key: someKey, "+it.join(": ..., ")+": ...}":"{key: someKey}";if(!lr[_t+Be]){var ND=it.length>0?"{"+it.join(": ..., ")+": ...}":"{}";B(`A props object containing a "key" prop is being spread into JSX:
27
+ Check the top-level render call using <`+oe+">.")}return te}}function Cn(L,te){{if(!L._store||L._store.validated||L.key!=null)return;L._store.validated=!0;var oe=ra(te);if(sr[oe])return;sr[oe]=!0;var De="";L&&L._owner&&L._owner!==Te.current&&(De=" It was passed a child from "+I(L._owner.type)+"."),nt(L),B('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',oe,De),nt(null)}}function ur(L,te){{if(typeof L!="object")return;if(se(L))for(var oe=0;oe<L.length;oe++){var De=L[oe];Ot(De)&&Cn(De,te)}else if(Ot(L))L._store&&(L._store.validated=!0);else if(L){var je=d(L);if(typeof je=="function"&&je!==L.entries)for(var _e=je.call(L),ke;!(ke=_e.next()).done;)Ot(ke.value)&&Cn(ke.value,te)}}}function aa(L){{var te=L.type;if(te==null||typeof te=="string")return;var oe;if(typeof te=="function")oe=te.propTypes;else if(typeof te=="object"&&(te.$$typeof===u||te.$$typeof===h))oe=te.propTypes;else return;if(oe){var De=I(te);ve(oe,L.props,"prop",De,L)}else if(te.PropTypes!==void 0&&!ot){ot=!0;var je=I(te);B("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",je||"Unknown")}typeof te.getDefaultProps=="function"&&!te.getDefaultProps.isReactClassApproved&&B("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pn(L){{for(var te=Object.keys(L.props),oe=0;oe<te.length;oe++){var De=te[oe];if(De!=="children"&&De!=="key"){nt(L),B("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",De),nt(null);break}}L.ref!==null&&(nt(L),B("Invalid attribute `ref` supplied to `React.Fragment`."),nt(null))}}var lr={};function cr(L,te,oe,De,je,_e){{var ke=F(L);if(!ke){var Oe="";(L===void 0||typeof L=="object"&&L!==null&&Object.keys(L).length===0)&&(Oe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var rt=Fn(je);rt?Oe+=rt:Oe+=yn();var Ke;L===null?Ke="null":se(L)?Ke="array":L!==void 0&&L.$$typeof===e?(Ke="<"+(I(L.type)||"Unknown")+" />",Oe=" Did you accidentally export a JSX literal instead of a component?"):Ke=typeof L,B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ke,Oe)}var $e=be(L,te,oe,je,_e);if($e==null)return $e;if(ke){var lt=te.children;if(lt!==void 0)if(De)if(se(lt)){for(var zt=0;zt<lt.length;zt++)ur(lt[zt],L);Object.freeze&&Object.freeze(lt)}else B("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ur(lt,L)}if(pe.call(te,"key")){var _t=I(L),at=Object.keys(te).filter(function(zD){return zD!=="key"}),Be=at.length>0?"{key: someKey, "+at.join(": ..., ")+": ...}":"{key: someKey}";if(!lr[_t+Be]){var ND=at.length>0?"{"+at.join(": ..., ")+": ...}":"{}";B(`A props object containing a "key" prop is being spread into JSX:
28
28
  let props = %s;
29
29
  <%s {...props} />
30
30
  React keys must be passed directly to JSX without using spread:
31
31
  let props = %s;
32
- <%s key={someKey} {...props} />`,Be,_t,ND,_t),lr[_t+Be]=!0}}return L===r?Pn($e):ii($e),$e}}function Mn(L,te,oe){return cr(L,te,oe,!0)}function ai(L,te,oe){return cr(L,te,oe,!1)}var oi=ai,kn=Mn;Rn.Fragment=r,Rn.jsx=oi,Rn.jsxs=kn}()),Rn}process.env.NODE_ENV==="production"?ui.exports=Fc():ui.exports=Pc();var x=ui.exports;function _a(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return x.jsx("div",{className:r.trim(),...n})}const Wa=l.createContext({});function Mc(){return l.useContext(Wa)}function kc(t){const{schema:e,children:n,className:r,...i}=t,s=!(c=>{let f=!1;const h=p=>{Array.isArray(p)?p.forEach(h):p&&typeof p=="object"&&"type"in p&&(p.type===_a?f=!0:p.props&&p.props.children&&h(p.props.children))};return h(c),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${s} ${r}`;return x.jsx(Wa.Provider,{value:t,children:x.jsx("div",{className:u.trim(),...i,children:n})})}function Tc(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Rc(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return x.jsx("div",{className:r.trim(),...n})}function jc(t){const{className:e,...n}=t,{schema:r}=Mc(),i=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return x.jsx(Se.CheckCircle2,{className:i,...n});case"danger":return x.jsx(Se.XCircle,{className:i,...n});case"warning":return x.jsx(Se.AlertTriangle,{className:i,...n});case"info":return x.jsx(Se.Info,{className:i,...n})}}function fr(t,e){return e?x.jsx(e,{size:t,strokeWidth:2.5}):x.jsx(x.Fragment,{})}function Ua(t,e){return[...new Array(e-t)].map((n,r)=>t+r+1).filter(n=>n>0)}function Ic(t,e,n){return t>=n?[]:Ua(t,t+e)}function Nc(t,e){return t<=1?[]:Ua(t-1-e,t-1)}function zc(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function _c(t){const{variant:e="ghost",scheme:n="primary",size:r="md",leftIcon:i,rightIcon:a,className:o="",children:s,...u}=t,f={md:12,lg:14}[r],h=`arkynBadge ${e} ${n} ${r} ${o}`;return x.jsxs("div",{className:h.trim(),...u,children:[fr(f,i),s,fr(f,i)]})}function Wc(t){const{className:e,...n}=t,r=`arkynCard ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Uc(t){const{className:e,orientation:n="horizontal",...r}=t,i=`arkynDivider ${n} ${e}`;return x.jsx("div",{className:i.trim(),...r})}/*! *****************************************************************************
32
+ <%s key={someKey} {...props} />`,Be,_t,ND,_t),lr[_t+Be]=!0}}return L===r?Pn($e):aa($e),$e}}function Mn(L,te,oe){return cr(L,te,oe,!0)}function ia(L,te,oe){return cr(L,te,oe,!1)}var oa=ia,kn=Mn;Rn.Fragment=r,Rn.jsx=oa,Rn.jsxs=kn}()),Rn}process.env.NODE_ENV==="production"?ua.exports=Fc():ua.exports=Pc();var x=ua.exports;function _i(t){const{className:e,...n}=t,r=`arkynAlertTitle ${e}`;return x.jsx("div",{className:r.trim(),...n})}const Wi=l.createContext({});function Mc(){return l.useContext(Wi)}function kc(t){const{schema:e,children:n,className:r,...a}=t,s=!(c=>{let f=!1;const h=p=>{Array.isArray(p)?p.forEach(h):p&&typeof p=="object"&&"type"in p&&(p.type===_i?f=!0:p.props&&p.props.children&&h(p.props.children))};return h(c),f})(n)?"nonExistsAlertTitle":"existsAlertTitle",u=`arkynAlertContainer ${e} ${s} ${r}`;return x.jsx(Wi.Provider,{value:t,children:x.jsx("div",{className:u.trim(),...a,children:n})})}function Tc(t){const{className:e,...n}=t,r=`arkynAlertContent ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Rc(t){const{className:e,...n}=t,r=`arkynAlertDescription ${e}`;return x.jsx("div",{className:r.trim(),...n})}function jc(t){const{className:e,...n}=t,{schema:r}=Mc(),a=`arkynAlertIcon ${r} ${e}`;switch(r){case"success":return x.jsx(Se.CheckCircle2,{className:a,...n});case"danger":return x.jsx(Se.XCircle,{className:a,...n});case"warning":return x.jsx(Se.AlertTriangle,{className:a,...n});case"info":return x.jsx(Se.Info,{className:a,...n})}}function fr(t,e){return e?x.jsx(e,{size:t,strokeWidth:2.5}):x.jsx(x.Fragment,{})}function Ui(t,e){return[...new Array(e-t)].map((n,r)=>t+r+1).filter(n=>n>0)}function Ic(t,e,n){return t>=n?[]:Ui(t,t+e)}function Nc(t,e){return t<=1?[]:Ui(t-1-e,t-1)}function zc(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function _c(t){const{variant:e="ghost",scheme:n="primary",size:r="md",leftIcon:a,rightIcon:i,className:o="",children:s,...u}=t,f={md:12,lg:14}[r],h=`arkynBadge ${e} ${n} ${r} ${o}`;return x.jsxs("div",{className:h.trim(),...u,children:[fr(f,a),s,fr(f,a)]})}function Wc(t){const{className:e,...n}=t,r=`arkynCard ${e}`;return x.jsx("div",{className:r.trim(),...n})}function Uc(t){const{className:e,orientation:n="horizontal",...r}=t,a=`arkynDivider ${n} ${e}`;return x.jsx("div",{className:a.trim(),...r})}/*! *****************************************************************************
33
33
  Copyright (c) Microsoft Corporation.
34
34
 
35
35
  Permission to use, copy, modify, and/or distribute this software for any
@@ -42,15 +42,15 @@ React keys must be passed directly to JSX without using spread:
42
42
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
43
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
44
  PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */var li=function(t,e){return li=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},li(t,e)};function Ve(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");li(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var me=function(){return me=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},me.apply(this,arguments)};function ci(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function Hc(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(f){try{c(r.next(f))}catch(h){o(h)}}function u(f){try{c(r.throw(f))}catch(h){o(h)}}function c(f){f.done?a(f.value):i(f.value).then(s,u)}c((r=r.apply(t,e||[])).next())})}function Vc(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(f){return u([c,f])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(f){c=[6,f],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Ha(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qc=process.env.NODE_ENV,Zc=function(t,e,n,r,i,a,o,s){if(qc!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var u;if(e===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,a,o,s],f=0;u=new Error(e.replace(/%s/g,function(){return c[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},Gc=Zc,tt=Ha(Gc),Le=l.createContext(null);function Yc(){tt(!!l.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=l.useContext(Le);return tt(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function Kc(t,e,n){return Object.keys(t).reduce(function(i,a){return e(i,t[a],a)},n)}function Xc(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Jc(t,e,n,r){var i={},a=function(o,s){var u=n[s];u!==e[s]&&(i[s]=u,o(r,u))};return Xc(t,a),i}function Qc(t,e,n){var r=Kc(n,function(a,o,s){return typeof t[s]=="function"&&a.push(google.maps.event.addListener(e,o,t[s])),a},[]);return r}function $c(t){google.maps.event.removeListener(t)}function Pe(t){t===void 0&&(t=[]),t.forEach($c)}function Fe(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,i=t.nextProps,a=t.instance,o=Qc(i,a,n);return Jc(e,r,i,a),o}var Va={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},qa={extraMapTypes:function(t,e){e.forEach(function(r,i){t.mapTypes.set(String(i),r)})},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}};function ef(t){var e=t.children,n=t.options,r=t.id,i=t.mapContainerStyle,a=t.mapContainerClassName,o=t.center,s=t.onClick,u=t.onDblClick,c=t.onDrag,f=t.onDragEnd,h=t.onDragStart,p=t.onMouseMove,g=t.onMouseOut,C=t.onMouseOver,v=t.onMouseDown,d=t.onMouseUp,D=t.onRightClick,B=t.onCenterChanged,w=t.onLoad,O=t.onUnmount,b=l.useState(null),E=b[0],S=b[1],F=l.useRef(null),V=l.useState(null),P=V[0],z=V[1],R=l.useState(null),I=R[0],j=R[1],N=l.useState(null),X=N[0],_=N[1],$=l.useState(null),re=$[0],k=$[1],T=l.useState(null),Z=T[0],H=T[1],Q=l.useState(null),K=Q[0],y=Q[1],U=l.useState(null),W=U[0],M=U[1],J=l.useState(null),ne=J[0],G=J[1],ue=l.useState(null),ae=ue[0],de=ue[1],pe=l.useState(null),Ce=pe[0],ye=pe[1],ge=l.useState(null),ve=ge[0],Ie=ge[1],se=l.useState(null),Ne=se[0],fe=se[1];return l.useEffect(function(){n&&E!==null&&E.setOptions(n)},[E,n]),l.useEffect(function(){E!==null&&typeof o<"u"&&E.setCenter(o)},[E,o]),l.useEffect(function(){E&&u&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(E,"dblclick",u)))},[u]),l.useEffect(function(){E&&f&&(X!==null&&google.maps.event.removeListener(X),_(google.maps.event.addListener(E,"dragend",f)))},[f]),l.useEffect(function(){E&&h&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(E,"dragstart",h)))},[h]),l.useEffect(function(){E&&v&&(Z!==null&&google.maps.event.removeListener(Z),H(google.maps.event.addListener(E,"mousedown",v)))},[v]),l.useEffect(function(){E&&p&&(K!==null&&google.maps.event.removeListener(K),y(google.maps.event.addListener(E,"mousemove",p)))},[p]),l.useEffect(function(){E&&g&&(W!==null&&google.maps.event.removeListener(W),M(google.maps.event.addListener(E,"mouseout",g)))},[g]),l.useEffect(function(){E&&C&&(ne!==null&&google.maps.event.removeListener(ne),G(google.maps.event.addListener(E,"mouseover",C)))},[C]),l.useEffect(function(){E&&d&&(ae!==null&&google.maps.event.removeListener(ae),de(google.maps.event.addListener(E,"mouseup",d)))},[d]),l.useEffect(function(){E&&D&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(E,"rightclick",D)))},[D]),l.useEffect(function(){E&&s&&(ve!==null&&google.maps.event.removeListener(ve),Ie(google.maps.event.addListener(E,"click",s)))},[s]),l.useEffect(function(){E&&c&&(Ne!==null&&google.maps.event.removeListener(Ne),fe(google.maps.event.addListener(E,"drag",c)))},[c]),l.useEffect(function(){E&&B&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(E,"center_changed",B)))},[s]),l.useEffect(function(){var we=F.current===null?null:new google.maps.Map(F.current,n);return S(we),we!==null&&w&&w(we),function(){we!==null&&O&&O(we)}},[]),x.jsx("div",{id:r,ref:F,style:i,className:a,children:x.jsx(Le.Provider,{value:E,children:E!==null?e:null})})}l.memo(ef);var tf=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={map:null},n.registeredEvents=[],n.mapRef=null,n.getInstance=function(){return n.mapRef===null?null:new google.maps.Map(n.mapRef,n.props.options)},n.panTo=function(r){var i=n.getInstance();i&&i.panTo(r)},n.setMapCallback=function(){n.state.map!==null&&n.props.onLoad&&n.props.onLoad(n.state.map)},n.getRef=function(r){n.mapRef=r},n}return e.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=Fe({updaterMap:qa,eventMap:Va,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:qa,eventMap:Va,prevProps:n,nextProps:this.props,instance:this.state.map}))},e.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:x.jsx(Le.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(l.PureComponent),rn=typeof document<"u";function Za(t){var e=t.url,n=t.id,r=t.nonce;return rn?new Promise(function(a,o){var s=document.getElementById(n),u=window;if(s){var c=s.getAttribute("data-state");if(s.src===e&&c!=="error"){if(c==="ready")return a(n);var f=u.initMap,h=s.onerror;u.initMap=function(){f&&f(),a(n)},s.onerror=function(g){h&&h(g),o(g)};return}else s.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=e,p.id=n,p.async=!0,p.nonce=r||"",p.onerror=function(C){p.setAttribute("data-state","error"),o(C)},u.initMap=function(){p.setAttribute("data-state","ready"),a(n)},document.head.appendChild(p)}).catch(function(i){throw console.error("injectScript error: ",i),i}):Promise.reject(new Error("document is undefined"))}function Ga(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
45
+ ***************************************************************************** */var la=function(t,e){return la=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},la(t,e)};function Ve(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");la(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var me=function(){return me=Object.assign||function(e){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},me.apply(this,arguments)};function ca(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]]);return n}function Hc(t,e,n,r){function a(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function s(f){try{c(r.next(f))}catch(h){o(h)}}function u(f){try{c(r.throw(f))}catch(h){o(h)}}function c(f){f.done?i(f.value):a(f.value).then(s,u)}c((r=r.apply(t,e||[])).next())})}function Vc(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(f){return u([c,f])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,a&&(i=c[0]&2?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,a=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=e.call(t,n)}catch(f){c=[6,f],a=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Hi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qc=process.env.NODE_ENV,Zc=function(t,e,n,r,a,i,o,s){if(qc!=="production"&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){var u;if(e===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,i,o,s],f=0;u=new Error(e.replace(/%s/g,function(){return c[f++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},Gc=Zc,tt=Hi(Gc),Le=l.createContext(null);function Yc(){tt(!!l.useContext,"useGoogleMap is React hook and requires React version 16.8+");var t=l.useContext(Le);return tt(!!t,"useGoogleMap needs a GoogleMap available up in the tree"),t}function Kc(t,e,n){return Object.keys(t).reduce(function(a,i){return e(a,t[i],i)},n)}function Xc(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function Jc(t,e,n,r){var a={},i=function(o,s){var u=n[s];u!==e[s]&&(a[s]=u,o(r,u))};return Xc(t,i),a}function Qc(t,e,n){var r=Kc(n,function(i,o,s){return typeof t[s]=="function"&&i.push(google.maps.event.addListener(e,o,t[s])),i},[]);return r}function $c(t){google.maps.event.removeListener(t)}function Pe(t){t===void 0&&(t=[]),t.forEach($c)}function Fe(t){var e=t.updaterMap,n=t.eventMap,r=t.prevProps,a=t.nextProps,i=t.instance,o=Qc(a,i,n);return Jc(e,r,a,i),o}var Vi={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},qi={extraMapTypes:function(t,e){e.forEach(function(r,a){t.mapTypes.set(String(a),r)})},center:function(t,e){t.setCenter(e)},clickableIcons:function(t,e){t.setClickableIcons(e)},heading:function(t,e){t.setHeading(e)},mapTypeId:function(t,e){t.setMapTypeId(e)},options:function(t,e){t.setOptions(e)},streetView:function(t,e){t.setStreetView(e)},tilt:function(t,e){t.setTilt(e)},zoom:function(t,e){t.setZoom(e)}};function ef(t){var e=t.children,n=t.options,r=t.id,a=t.mapContainerStyle,i=t.mapContainerClassName,o=t.center,s=t.onClick,u=t.onDblClick,c=t.onDrag,f=t.onDragEnd,h=t.onDragStart,p=t.onMouseMove,v=t.onMouseOut,C=t.onMouseOver,g=t.onMouseDown,d=t.onMouseUp,D=t.onRightClick,B=t.onCenterChanged,E=t.onLoad,O=t.onUnmount,b=l.useState(null),w=b[0],S=b[1],P=l.useRef(null),V=l.useState(null),F=V[0],j=V[1],k=l.useState(null),I=k[0],N=k[1],z=l.useState(null),X=z[0],_=z[1],$=l.useState(null),re=$[0],T=$[1],R=l.useState(null),Z=R[0],H=R[1],Q=l.useState(null),K=Q[0],y=Q[1],U=l.useState(null),W=U[0],M=U[1],J=l.useState(null),ne=J[0],G=J[1],ue=l.useState(null),ie=ue[0],de=ue[1],pe=l.useState(null),Ce=pe[0],ye=pe[1],ge=l.useState(null),ve=ge[0],Ie=ge[1],se=l.useState(null),Ne=se[0],fe=se[1];return l.useEffect(function(){n&&w!==null&&w.setOptions(n)},[w,n]),l.useEffect(function(){w!==null&&typeof o<"u"&&w.setCenter(o)},[w,o]),l.useEffect(function(){w&&u&&(I!==null&&google.maps.event.removeListener(I),N(google.maps.event.addListener(w,"dblclick",u)))},[u]),l.useEffect(function(){w&&f&&(X!==null&&google.maps.event.removeListener(X),_(google.maps.event.addListener(w,"dragend",f)))},[f]),l.useEffect(function(){w&&h&&(re!==null&&google.maps.event.removeListener(re),T(google.maps.event.addListener(w,"dragstart",h)))},[h]),l.useEffect(function(){w&&g&&(Z!==null&&google.maps.event.removeListener(Z),H(google.maps.event.addListener(w,"mousedown",g)))},[g]),l.useEffect(function(){w&&p&&(K!==null&&google.maps.event.removeListener(K),y(google.maps.event.addListener(w,"mousemove",p)))},[p]),l.useEffect(function(){w&&v&&(W!==null&&google.maps.event.removeListener(W),M(google.maps.event.addListener(w,"mouseout",v)))},[v]),l.useEffect(function(){w&&C&&(ne!==null&&google.maps.event.removeListener(ne),G(google.maps.event.addListener(w,"mouseover",C)))},[C]),l.useEffect(function(){w&&d&&(ie!==null&&google.maps.event.removeListener(ie),de(google.maps.event.addListener(w,"mouseup",d)))},[d]),l.useEffect(function(){w&&D&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(w,"rightclick",D)))},[D]),l.useEffect(function(){w&&s&&(ve!==null&&google.maps.event.removeListener(ve),Ie(google.maps.event.addListener(w,"click",s)))},[s]),l.useEffect(function(){w&&c&&(Ne!==null&&google.maps.event.removeListener(Ne),fe(google.maps.event.addListener(w,"drag",c)))},[c]),l.useEffect(function(){w&&B&&(F!==null&&google.maps.event.removeListener(F),j(google.maps.event.addListener(w,"center_changed",B)))},[s]),l.useEffect(function(){var we=P.current===null?null:new google.maps.Map(P.current,n);return S(we),we!==null&&E&&E(we),function(){we!==null&&O&&O(we)}},[]),x.jsx("div",{id:r,ref:P,style:a,className:i,children:x.jsx(Le.Provider,{value:w,children:w!==null?e:null})})}l.memo(ef);var tf=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={map:null},n.registeredEvents=[],n.mapRef=null,n.getInstance=function(){return n.mapRef===null?null:new google.maps.Map(n.mapRef,n.props.options)},n.panTo=function(r){var a=n.getInstance();a&&a.panTo(r)},n.setMapCallback=function(){n.state.map!==null&&n.props.onLoad&&n.props.onLoad(n.state.map)},n.getRef=function(r){n.mapRef=r},n}return e.prototype.componentDidMount=function(){var n=this.getInstance();this.registeredEvents=Fe({updaterMap:qi,eventMap:Vi,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{map:n}},this.setMapCallback)},e.prototype.componentDidUpdate=function(n){this.state.map!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:qi,eventMap:Vi,prevProps:n,nextProps:this.props,instance:this.state.map}))},e.prototype.componentWillUnmount=function(){this.state.map!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:x.jsx(Le.Provider,{value:this.state.map,children:this.state.map!==null?this.props.children:null})})},e}(l.PureComponent),rn=typeof document<"u";function Zi(t){var e=t.url,n=t.id,r=t.nonce;return rn?new Promise(function(i,o){var s=document.getElementById(n),u=window;if(s){var c=s.getAttribute("data-state");if(s.src===e&&c!=="error"){if(c==="ready")return i(n);var f=u.initMap,h=s.onerror;u.initMap=function(){f&&f(),i(n)},s.onerror=function(v){h&&h(v),o(v)};return}else s.remove()}var p=document.createElement("script");p.type="text/javascript",p.src=e,p.id=n,p.async=!0,p.nonce=r||"",p.onerror=function(C){p.setAttribute("data-state","error"),o(C)},u.initMap=function(){p.setAttribute("data-state","ready"),i(n)},document.head.appendChild(p)}).catch(function(a){throw console.error("injectScript error: ",a),a}):Promise.reject(new Error("document is undefined"))}function Gi(t){var e=t.href;return e&&(e.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||e.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text")===0)?!0:t.tagName.toLowerCase()==="style"&&t.styleSheet&&t.styleSheet.cssText&&t.styleSheet.cssText.replace(`\r
46
46
  `,"").indexOf(".gm-style")===0?(t.styleSheet.cssText="",!0):t.tagName.toLowerCase()==="style"&&t.innerHTML&&t.innerHTML.replace(`\r
47
- `,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function Ya(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(i,a){return Ga(i)||Reflect.apply(e,t,[i,a]),i};var n=t.appendChild.bind(t);t.appendChild=function(i){return Ga(i)||Reflect.apply(n,t,[i]),i}}}function Ka(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,i=r===void 0?"weekly":r,a=t.language,o=t.region,s=t.libraries,u=t.channel,c=t.mapIds,f=t.authReferrerPolicy,h=[];return tt(e&&n||!(e&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?h.push("key=".concat(e)):n&&h.push("client=".concat(n)),i&&h.push("v=".concat(i)),a&&h.push("language=".concat(a)),o&&h.push("region=".concat(o)),s&&s.length&&h.push("libraries=".concat(s.sort().join(","))),u&&h.push("channel=".concat(u)),c&&c.length&&h.push("map_ids=".concat(c.join(","))),f&&h.push("auth_referrer_policy=".concat(f)),h.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(h.join("&"))}var jn=!1;function Xa(){return x.jsx("div",{children:"Loading..."})}var fi={id:"script-loader",version:"weekly"},nf=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=l.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return Hc(n,void 0,void 0,function(){function r(i){if(!jn)i();else if(rn)var a=window.setInterval(function(){jn||(window.clearInterval(a),i())},1)}return Vc(this,function(i){return[2,new Promise(r)]})})},n.cleanup=function(){jn=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(a){return typeof a.src=="string"&&a.src.includes("maps.googleapis")}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(a){return a.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(a){return a.innerText!==void 0&&a.innerText.length>0&&a.innerText.includes(".gm-")}).forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&Ya(),tt(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:Ka(n.props)};Za(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(i){n.props.onError&&n.props.onError(i),console.error(`
47
+ `,"").indexOf(".gm-style")===0?(t.innerHTML="",!0):t.tagName.toLowerCase()==="style"&&!t.styleSheet&&!t.innerHTML}function Yi(){var t=document.getElementsByTagName("head")[0];if(t){var e=t.insertBefore.bind(t);t.insertBefore=function(a,i){return Gi(a)||Reflect.apply(e,t,[a,i]),a};var n=t.appendChild.bind(t);t.appendChild=function(a){return Gi(a)||Reflect.apply(n,t,[a]),a}}}function Ki(t){var e=t.googleMapsApiKey,n=t.googleMapsClientId,r=t.version,a=r===void 0?"weekly":r,i=t.language,o=t.region,s=t.libraries,u=t.channel,c=t.mapIds,f=t.authReferrerPolicy,h=[];return tt(e&&n||!(e&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),e?h.push("key=".concat(e)):n&&h.push("client=".concat(n)),a&&h.push("v=".concat(a)),i&&h.push("language=".concat(i)),o&&h.push("region=".concat(o)),s&&s.length&&h.push("libraries=".concat(s.sort().join(","))),u&&h.push("channel=".concat(u)),c&&c.length&&h.push("map_ids=".concat(c.join(","))),f&&h.push("auth_referrer_policy=".concat(f)),h.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(h.join("&"))}var jn=!1;function Xi(){return x.jsx("div",{children:"Loading..."})}var fa={id:"script-loader",version:"weekly"},nf=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.check=l.createRef(),n.state={loaded:!1},n.cleanupCallback=function(){delete window.google.maps,n.injectScript()},n.isCleaningUp=function(){return Hc(n,void 0,void 0,function(){function r(a){if(!jn)a();else if(rn)var i=window.setInterval(function(){jn||(window.clearInterval(i),a())},1)}return Vc(this,function(a){return[2,new Promise(r)]})})},n.cleanup=function(){jn=!0;var r=document.getElementById(n.props.id);r&&r.parentNode&&r.parentNode.removeChild(r),Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(i){return typeof i.src=="string"&&i.src.includes("maps.googleapis")}).forEach(function(i){i.parentNode&&i.parentNode.removeChild(i)}),Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(i){return i.href==="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"}).forEach(function(i){i.parentNode&&i.parentNode.removeChild(i)}),Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(i){return i.innerText!==void 0&&i.innerText.length>0&&i.innerText.includes(".gm-")}).forEach(function(i){i.parentNode&&i.parentNode.removeChild(i)})},n.injectScript=function(){n.props.preventGoogleFontsLoading&&Yi(),tt(!!n.props.id,'LoadScript requires "id" prop to be a string: %s',n.props.id);var r={id:n.props.id,nonce:n.props.nonce,url:Ki(n.props)};Zi(r).then(function(){n.props.onLoad&&n.props.onLoad(),n.setState(function(){return{loaded:!0}})}).catch(function(a){n.props.onError&&n.props.onError(a),console.error(`
48
48
  There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(n.props.googleMapsApiKey||"-",") or Client ID (").concat(n.props.googleMapsClientId||"-",`) to <LoadScript />
49
49
  Otherwise it is a Network issue.
50
- `))})},n}return e.prototype.componentDidMount=function(){if(rn){if(window.google&&window.google.maps&&!jn){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),rn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(rn){this.cleanup();var r=function(){n.check.current||(delete window.google,jn=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||x.jsx(Xa,{})]})},e.defaultProps=fi,e}(l.PureComponent),Ja;function rf(t){var e=t.id,n=e===void 0?fi.id:e,r=t.version,i=r===void 0?fi.version:r,a=t.nonce,o=t.googleMapsApiKey,s=t.googleMapsClientId,u=t.language,c=t.region,f=t.libraries,h=t.preventGoogleFontsLoading,p=t.channel,g=t.mapIds,C=t.authReferrerPolicy,v=l.useRef(!1),d=l.useState(!1),D=d[0],B=d[1],w=l.useState(void 0),O=w[0],b=w[1];l.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]),l.useEffect(function(){rn&&h&&Ya()},[h]),l.useEffect(function(){D&&tt(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[D]);var E=Ka({version:i,googleMapsApiKey:o,googleMapsClientId:s,language:u,region:c,libraries:f,channel:p,mapIds:g,authReferrerPolicy:C});l.useEffect(function(){if(!rn)return;function V(){v.current&&(B(!0),Ja=E)}if(window.google&&window.google.maps&&Ja===E){V();return}Za({id:n,url:E,nonce:a}).then(V).catch(function(z){v.current&&b(z),console.warn(`
50
+ `))})},n}return e.prototype.componentDidMount=function(){if(rn){if(window.google&&window.google.maps&&!jn){console.error("google api is already presented");return}this.isCleaningUp().then(this.injectScript).catch(function(r){console.error("Error at injecting script after cleaning up: ",r)})}},e.prototype.componentDidUpdate=function(n){this.props.libraries!==n.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),rn&&n.language!==this.props.language&&(this.cleanup(),this.setState(function(){return{loaded:!1}},this.cleanupCallback))},e.prototype.componentWillUnmount=function(){var n=this;if(rn){this.cleanup();var r=function(){n.check.current||(delete window.google,jn=!1)};window.setTimeout(r,1),this.props.onUnmount&&this.props.onUnmount()}},e.prototype.render=function(){return x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||x.jsx(Xi,{})]})},e.defaultProps=fa,e}(l.PureComponent),Ji;function rf(t){var e=t.id,n=e===void 0?fa.id:e,r=t.version,a=r===void 0?fa.version:r,i=t.nonce,o=t.googleMapsApiKey,s=t.googleMapsClientId,u=t.language,c=t.region,f=t.libraries,h=t.preventGoogleFontsLoading,p=t.channel,v=t.mapIds,C=t.authReferrerPolicy,g=l.useRef(!1),d=l.useState(!1),D=d[0],B=d[1],E=l.useState(void 0),O=E[0],b=E[1];l.useEffect(function(){return g.current=!0,function(){g.current=!1}},[]),l.useEffect(function(){rn&&h&&Yi()},[h]),l.useEffect(function(){D&&tt(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")},[D]);var w=Ki({version:a,googleMapsApiKey:o,googleMapsClientId:s,language:u,region:c,libraries:f,channel:p,mapIds:v,authReferrerPolicy:C});l.useEffect(function(){if(!rn)return;function V(){g.current&&(B(!0),Ji=w)}if(window.google&&window.google.maps&&Ji===w){V();return}Zi({id:n,url:w,nonce:i}).then(V).catch(function(j){g.current&&b(j),console.warn(`
51
51
  There has been an Error with loading Google Maps API script, please check that you provided correct google API key (`.concat(o||"-",") or Client ID (").concat(s||"-",`)
52
52
  Otherwise it is a Network issue.
53
- `)),console.error(z)})},[n,E,a]);var S=l.useRef();return l.useEffect(function(){S.current&&f!==S.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),S.current=f},[f]),{isLoaded:D,loadError:O,url:E}}var af=x.jsx(Xa,{});function of(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,i=t.onUnmount,a=t.children,o=ci(t,["loadingElement","onLoad","onError","onUnmount","children"]),s=rf(o),u=s.isLoaded,c=s.loadError;return l.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),l.useEffect(function(){c&&typeof r=="function"&&r(c)},[c,r]),l.useEffect(function(){return function(){i&&i()}},[i]),u?a:e||af}l.memo(of);var Qa;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Qa||(Qa={}));var $a={},eo={options:function(t,e){t.setOptions(e)}};function sf(t){var e=t.options,n=t.onLoad,r=t.onUnmount,i=l.useContext(Le),a=l.useState(null),o=a[0],s=a[1];return l.useEffect(function(){o!==null&&o.setMap(i)},[i]),l.useEffect(function(){e&&o!==null&&o.setOptions(e)},[o,e]),l.useEffect(function(){var u=new google.maps.TrafficLayer(me(me({},e||{}),{map:i}));return s(u),n&&n(u),function(){o!==null&&(r&&r(o),o.setMap(null))}},[]),null}l.memo(sf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:eo,eventMap:$a,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:eo,eventMap:$a,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),Pe(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);function uf(t){var e=t.onLoad,n=t.onUnmount,r=l.useContext(Le),i=l.useState(null),a=i[0],o=i[1];return l.useEffect(function(){a!==null&&a.setMap(r)},[r]),l.useEffect(function(){var s=new google.maps.BicyclingLayer;return o(s),s.setMap(r),e&&e(s),function(){s!==null&&(n&&n(s),s.setMap(null))}},[]),null}l.memo(uf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);function lf(t){var e=t.onLoad,n=t.onUnmount,r=l.useContext(Le),i=l.useState(null),a=i[0],o=i[1];return l.useEffect(function(){a!==null&&a.setMap(r)},[r]),l.useEffect(function(){var s=new google.maps.TransitLayer;return o(s),s.setMap(r),e&&e(s),function(){a!==null&&(n&&n(a),a.setMap(null))}},[]),null}l.memo(lf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var to={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},no={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function cf(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,i=t.onMarkerComplete,a=t.onOverlayComplete,o=t.onPolygonComplete,s=t.onPolylineComplete,u=t.onRectangleComplete,c=t.onLoad,f=t.onUnmount,h=l.useContext(Le),p=l.useState(null),g=p[0],C=p[1],v=l.useState(null),d=v[0],D=v[1],B=l.useState(null),w=B[0],O=B[1],b=l.useState(null),E=b[0],S=b[1],F=l.useState(null),V=F[0],P=F[1],z=l.useState(null),R=z[0],I=z[1],j=l.useState(null),N=j[0],X=j[1];return l.useEffect(function(){g!==null&&g.setMap(h)},[h]),l.useEffect(function(){e&&g!==null&&g.setOptions(e)},[g,e]),l.useEffect(function(){g!==null&&g.setDrawingMode(n??null)},[g,n]),l.useEffect(function(){g&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(g,"circlecomplete",r)))},[g,r]),l.useEffect(function(){g&&i&&(w!==null&&google.maps.event.removeListener(w),O(google.maps.event.addListener(g,"markercomplete",i)))},[g,i]),l.useEffect(function(){g&&a&&(E!==null&&google.maps.event.removeListener(E),S(google.maps.event.addListener(g,"overlaycomplete",a)))},[g,a]),l.useEffect(function(){g&&o&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(g,"polygoncomplete",o)))},[g,o]),l.useEffect(function(){g&&s&&(R!==null&&google.maps.event.removeListener(R),I(google.maps.event.addListener(g,"polylinecomplete",s)))},[g,s]),l.useEffect(function(){g&&u&&(N!==null&&google.maps.event.removeListener(N),X(google.maps.event.addListener(g,"rectanglecomplete",u)))},[g,u]),l.useEffect(function(){tt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var _=new google.maps.drawing.DrawingManager(me(me({},e||{}),{map:h}));return n&&_.setDrawingMode(n),r&&D(google.maps.event.addListener(_,"circlecomplete",r)),i&&O(google.maps.event.addListener(_,"markercomplete",i)),a&&S(google.maps.event.addListener(_,"overlaycomplete",a)),o&&P(google.maps.event.addListener(_,"polygoncomplete",o)),s&&I(google.maps.event.addListener(_,"polylinecomplete",s)),u&&X(google.maps.event.addListener(_,"rectanglecomplete",u)),C(_),c&&c(_),function(){g!==null&&(d&&google.maps.event.removeListener(d),w&&google.maps.event.removeListener(w),E&&google.maps.event.removeListener(E),V&&google.maps.event.removeListener(V),R&&google.maps.event.removeListener(R),N&&google.maps.event.removeListener(N),f&&f(g),g.setMap(null))}},[]),null}l.memo(cf),function(t){Ve(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},tt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:no,eventMap:to,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:no,eventMap:to,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),Pe(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var ro={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},io={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},dr={};function ff(t){var e=t.position,n=t.options,r=t.clusterer,i=t.noClustererRedraw,a=t.children,o=t.draggable,s=t.visible,u=t.animation,c=t.clickable,f=t.cursor,h=t.icon,p=t.label,g=t.opacity,C=t.shape,v=t.title,d=t.zIndex,D=t.onClick,B=t.onDblClick,w=t.onDrag,O=t.onDragEnd,b=t.onDragStart,E=t.onMouseOut,S=t.onMouseOver,F=t.onMouseUp,V=t.onMouseDown,P=t.onRightClick,z=t.onClickableChanged,R=t.onCursorChanged,I=t.onAnimationChanged,j=t.onDraggableChanged,N=t.onFlatChanged,X=t.onIconChanged,_=t.onPositionChanged,$=t.onShapeChanged,re=t.onTitleChanged,k=t.onVisibleChanged,T=t.onZindexChanged,Z=t.onLoad,H=t.onUnmount,Q=l.useContext(Le),K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ae=l.useState(null),de=ae[0],pe=ae[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1],ve=l.useState(null),Ie=ve[0],se=ve[1],Ne=l.useState(null),fe=Ne[0],we=Ne[1],Me=l.useState(null),He=Me[0],qe=Me[1],Ee=l.useState(null),ut=Ee[0],at=Ee[1],At=l.useState(null),ht=At[0],wt=At[1],Tt=l.useState(null),vt=Tt[0],tn=Tt[1],be=l.useState(null),Te=be[0],Re=be[1],nt=l.useState(null),ot=nt[0],Ot=nt[1],yn=l.useState(null),Fn=yn[0],sr=yn[1],ri=l.useState(null),Cn=ri[0],ur=ri[1],ii=l.useState(null),Pn=ii[0],lr=ii[1],cr=l.useState(null),Mn=cr[0],ai=cr[1],oi=l.useState(null),kn=oi[0],L=oi[1],te=l.useState(null),oe=te[0],De=te[1],je=l.useState(null),_e=je[0],ke=je[1],Oe=l.useState(null),rt=Oe[0],Ke=Oe[1],$e=l.useState(null),lt=$e[0],zt=$e[1];l.useEffect(function(){y!==null&&y.setMap(Q)},[Q]),l.useEffect(function(){typeof n<"u"&&y!==null&&y.setOptions(n)},[y,n]),l.useEffect(function(){typeof o<"u"&&y!==null&&y.setDraggable(o)},[y,o]),l.useEffect(function(){e&&y!==null&&y.setPosition(e)},[y,e]),l.useEffect(function(){typeof s<"u"&&y!==null&&y.setVisible(s)},[y,s]),l.useEffect(function(){y==null||y.setAnimation(u)},[y,u]),l.useEffect(function(){y&&c!==void 0&&y.setClickable(c)},[y,c]),l.useEffect(function(){y&&f!==void 0&&y.setCursor(f)},[y,f]),l.useEffect(function(){y&&h!==void 0&&y.setIcon(h)},[y,h]),l.useEffect(function(){y&&p!==void 0&&y.setLabel(p)},[y,p]),l.useEffect(function(){y&&g!==void 0&&y.setOpacity(g)},[y,g]),l.useEffect(function(){y&&C!==void 0&&y.setShape(C)},[y,C]),l.useEffect(function(){y&&v!==void 0&&y.setTitle(v)},[y,v]),l.useEffect(function(){y&&d!==void 0&&y.setZIndex(d)},[y,d]),l.useEffect(function(){y&&B&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(y,"dblclick",B)))},[B]),l.useEffect(function(){y&&O&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(y,"dragend",O)))},[O]),l.useEffect(function(){y&&b&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(y,"dragstart",b)))},[b]),l.useEffect(function(){y&&V&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(y,"mousedown",V)))},[V]),l.useEffect(function(){y&&E&&(Ie!==null&&google.maps.event.removeListener(Ie),se(google.maps.event.addListener(y,"mouseout",E)))},[E]),l.useEffect(function(){y&&S&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(y,"mouseover",S)))},[S]),l.useEffect(function(){y&&F&&(He!==null&&google.maps.event.removeListener(He),qe(google.maps.event.addListener(y,"mouseup",F)))},[F]),l.useEffect(function(){y&&P&&(ut!==null&&google.maps.event.removeListener(ut),at(google.maps.event.addListener(y,"rightclick",P)))},[P]),l.useEffect(function(){y&&D&&(ht!==null&&google.maps.event.removeListener(ht),wt(google.maps.event.addListener(y,"click",D)))},[D]),l.useEffect(function(){y&&w&&(vt!==null&&google.maps.event.removeListener(vt),tn(google.maps.event.addListener(y,"drag",w)))},[w]),l.useEffect(function(){y&&z&&(Te!==null&&google.maps.event.removeListener(Te),Re(google.maps.event.addListener(y,"clickable_changed",z)))},[z]),l.useEffect(function(){y&&R&&(ot!==null&&google.maps.event.removeListener(ot),Ot(google.maps.event.addListener(y,"cursor_changed",R)))},[R]),l.useEffect(function(){y&&I&&(Fn!==null&&google.maps.event.removeListener(Fn),sr(google.maps.event.addListener(y,"animation_changed",I)))},[I]),l.useEffect(function(){y&&j&&(Cn!==null&&google.maps.event.removeListener(Cn),ur(google.maps.event.addListener(y,"draggable_changed",j)))},[j]),l.useEffect(function(){y&&N&&(Pn!==null&&google.maps.event.removeListener(Pn),lr(google.maps.event.addListener(y,"flat_changed",N)))},[N]),l.useEffect(function(){y&&X&&(Mn!==null&&google.maps.event.removeListener(Mn),ai(google.maps.event.addListener(y,"icon_changed",X)))},[X]),l.useEffect(function(){y&&_&&(kn!==null&&google.maps.event.removeListener(kn),L(google.maps.event.addListener(y,"position_changed",_)))},[_]),l.useEffect(function(){y&&$&&(oe!==null&&google.maps.event.removeListener(oe),De(google.maps.event.addListener(y,"shape_changed",$)))},[$]),l.useEffect(function(){y&&re&&(_e!==null&&google.maps.event.removeListener(_e),ke(google.maps.event.addListener(y,"title_changed",re)))},[re]),l.useEffect(function(){y&&k&&(rt!==null&&google.maps.event.removeListener(rt),Ke(google.maps.event.addListener(y,"visible_changed",k)))},[k]),l.useEffect(function(){y&&T&&(lt!==null&&google.maps.event.removeListener(lt),zt(google.maps.event.addListener(y,"zindex_changed",T)))},[T]),l.useEffect(function(){var it=me(me(me({},n||dr),r?dr:{map:Q}),{position:e}),Be=new google.maps.Marker(it);return r?r.addMarker(Be,!!i):Be.setMap(Q),e&&Be.setPosition(e),typeof s<"u"&&Be.setVisible(s),typeof o<"u"&&Be.setDraggable(o),typeof c<"u"&&Be.setClickable(c),typeof f=="string"&&Be.setCursor(f),h&&Be.setIcon(h),typeof p<"u"&&Be.setLabel(p),typeof g<"u"&&Be.setOpacity(g),C&&Be.setShape(C),typeof v=="string"&&Be.setTitle(v),typeof d=="number"&&Be.setZIndex(d),B&&J(google.maps.event.addListener(Be,"dblclick",B)),O&&ue(google.maps.event.addListener(Be,"dragend",O)),b&&pe(google.maps.event.addListener(Be,"dragstart",b)),V&&ge(google.maps.event.addListener(Be,"mousedown",V)),E&&se(google.maps.event.addListener(Be,"mouseout",E)),S&&we(google.maps.event.addListener(Be,"mouseover",S)),F&&qe(google.maps.event.addListener(Be,"mouseup",F)),P&&at(google.maps.event.addListener(Be,"rightclick",P)),D&&wt(google.maps.event.addListener(Be,"click",D)),w&&tn(google.maps.event.addListener(Be,"drag",w)),z&&Re(google.maps.event.addListener(Be,"clickable_changed",z)),R&&Ot(google.maps.event.addListener(Be,"cursor_changed",R)),I&&sr(google.maps.event.addListener(Be,"animation_changed",I)),j&&ur(google.maps.event.addListener(Be,"draggable_changed",j)),N&&lr(google.maps.event.addListener(Be,"flat_changed",N)),X&&ai(google.maps.event.addListener(Be,"icon_changed",X)),_&&L(google.maps.event.addListener(Be,"position_changed",_)),$&&De(google.maps.event.addListener(Be,"shape_changed",$)),re&&ke(google.maps.event.addListener(Be,"title_changed",re)),k&&Ke(google.maps.event.addListener(Be,"visible_changed",k)),T&&zt(google.maps.event.addListener(Be,"zindex_changed",T)),U(Be),Z&&Z(Be),function(){M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),Ie!==null&&google.maps.event.removeListener(Ie),fe!==null&&google.maps.event.removeListener(fe),He!==null&&google.maps.event.removeListener(He),ut!==null&&google.maps.event.removeListener(ut),ht!==null&&google.maps.event.removeListener(ht),Te!==null&&google.maps.event.removeListener(Te),ot!==null&&google.maps.event.removeListener(ot),Fn!==null&&google.maps.event.removeListener(Fn),Cn!==null&&google.maps.event.removeListener(Cn),Pn!==null&&google.maps.event.removeListener(Pn),Mn!==null&&google.maps.event.removeListener(Mn),kn!==null&&google.maps.event.removeListener(kn),_e!==null&&google.maps.event.removeListener(_e),rt!==null&&google.maps.event.removeListener(rt),lt!==null&&google.maps.event.removeListener(lt),H&&H(Be),r?r.removeMarker(Be,!!i):Be&&Be.setMap(null)}},[]);var _t=l.useMemo(function(){return a?l.Children.map(a,function(it){if(!l.isValidElement(it))return it;var Be=it;return l.cloneElement(Be,{anchor:y})}):null},[a,y]);return x.jsx(x.Fragment,{children:_t})||null}l.memo(ff);var df=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=me(me(me({},this.props.options||dr),this.props.clusterer?dr:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=Fe({updaterMap:io,eventMap:ro,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:io,eventMap:ro,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),Pe(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=l.Children.map(this.props.children,function(i){if(!l.isValidElement(i))return i;var a=i;return l.cloneElement(a,{anchor:n.marker})})),r||null},e.contextType=Le,e}(l.PureComponent),pf=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),i=this.cluster.getBounds(),a=n.getMap();a!==null&&"fitBounds"in a&&a.fitBounds(i),this.timeOut=window.setTimeout(function(){var o=n.getMap();if(o!==null){"fitBounds"in o&&o.fitBounds(i);var s=o.getZoom()||0;r!==null&&s>r&&o.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,i,a,o;if(this.div&&this.center){var s=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),c=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),h=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(h!==null?"".concat(h.y,"px"):"0","; left: ").concat(h!==null?"".concat(h.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var p=document.createElement("img");p.alt=s,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var g=document.createElement("div");g.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(g.innerText="".concat((i=this.sums)===null||i===void 0?void 0:i.text)),!((a=this.sums)===null||a===void 0)&&a.html&&(g.innerHTML="".concat((o=this.sums)===null||o===void 0?void 0:o.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(g),this.div.title=s,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),hf=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new pf(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,i=n;r<i.length;r++){var a=i[r],o=a.getPosition();o&&e.extend(o)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var i=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(i-1)+r.lat())/i,(this.center.lng()*(i-1)+r.lng())/i),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var a=this.markers.length,o=this.markerClusterer.getMaxZoom(),s=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(o!==null&&typeof s<"u"&&s>o)e.getMap()!==this.map&&e.setMap(this.map);else if(a<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(a===this.minClusterSize)for(var u=0,c=this.markers;u<c.length;u++){var f=c[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),i=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof i<"u"&&i>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function vf(t,e){var n=t.length,r=n.toString().length,i=Math.min(r,e);return{text:n.toString(),index:i,title:""}}var gf=2e3,mf=500,yf="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Cf="png",Df=[53,56,66,78,90],bf="cluster",ao=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||yf,this.imageExtension=r.imageExtension||Cf,this.imageSizes=r.imageSizes||Df,this.calculator=r.calculator||vf,this.batchSize=r.batchSize||gf,this.batchSizeIE=r.batchSizeIE||mf,this.clusterClass=r.clusterClass||bf,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var i=0,a=this.clusters;i<a.length;i++){var o=a[i];o.remove()}this.clusters=[];for(var s=0,u=this.listeners;s<u.length;s++){var c=u[s];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,i=e;r<i.length;r++){var a=i[r],o=a.getPosition();o&&n.extend(o)}var s=this.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];i&&this.pushMarkerTo(i)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,i=0,a=e;i<a.length;i++){var o=a[i];r=r||this.removeMarker_(o)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,i=e;r<i.length;r++){var a=i[r];a.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var i=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(i!==null&&(i.x-=this.gridSize,i.y+=this.gridSize),r!==null){var a=n.fromDivPixelToLatLng(r);a!==null&&e.extend(a)}if(i!==null){var o=n.fromDivPixelToLatLng(i);o!==null&&e.extend(o)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var i=r[n];i.remove()}this.clusters=[];for(var a=0,o=this.markers;a<o.length;a++){var s=o[a];s.isAdded=!1,e&&s.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,i=(n.lat()-e.lat())*Math.PI/180,a=(n.lng()-e.lng())*Math.PI/180,o=Math.sin(i/2)*Math.sin(i/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(a/2)*Math.sin(a/2);return r*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,i=null,a=0,o=this.clusters;a<o.length;a++){var s=o[a];n=s;var u=n.getCenter(),c=e.getPosition();if(u&&c){var f=this.distanceBetweenPoints(u,c);f<r&&(r=f,i=n)}}i&&i.isMarkerInClusterBounds(e)?i.addMarker(e):(n=new hf(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),i=r!==null&&("getBounds"in r)?r.getBounds():null,a=(r==null?void 0:r.getZoom())||0,o=a>3?new google.maps.LatLngBounds(i==null?void 0:i.getSouthWest(),i==null?void 0:i.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(o),u=Math.min(e+this.batchSize,this.markers.length),c=e;c<u;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,s)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var h=0,p=this.clusters;h<p.length;h++){var g=p[h];g.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(i){for(var a in i.prototype){var o=a;this.prototype[o]=i.prototype[o]}return this}).apply(e,[n])},t}(),Bt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},ze={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},Ef={};function wf(t){var e=t.children,n=t.options,r=t.averageCenter,i=t.batchSizeIE,a=t.calculator,o=t.clusterClass,s=t.enableRetinaIcons,u=t.gridSize,c=t.ignoreHidden,f=t.imageExtension,h=t.imagePath,p=t.imageSizes,g=t.maxZoom,C=t.minimumClusterSize,v=t.styles,d=t.title,D=t.zoomOnClick,B=t.onClick,w=t.onClusteringBegin,O=t.onClusteringEnd,b=t.onMouseOver,E=t.onMouseOut,S=t.onLoad,F=t.onUnmount,V=l.useState(null),P=V[0],z=V[1],R=l.useContext(Le),I=l.useState(null),j=I[0],N=I[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),k=re[0],T=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1];return l.useEffect(function(){P&&E&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(P,Bt.onMouseOut,E)))},[E]),l.useEffect(function(){P&&b&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(P,Bt.onMouseOver,b)))},[b]),l.useEffect(function(){P&&B&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(P,Bt.onClick,B)))},[B]),l.useEffect(function(){P&&w&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(P,Bt.onClusteringBegin,w)))},[w]),l.useEffect(function(){P&&O&&(k!==null&&google.maps.event.removeListener(k),$(google.maps.event.addListener(P,Bt.onClusteringEnd,O)))},[O]),l.useEffect(function(){typeof r<"u"&&P!==null&&ze.averageCenter(P,r)},[P,r]),l.useEffect(function(){typeof i<"u"&&P!==null&&ze.batchSizeIE(P,i)},[P,i]),l.useEffect(function(){typeof a<"u"&&P!==null&&ze.calculator(P,a)},[P,a]),l.useEffect(function(){typeof o<"u"&&P!==null&&ze.clusterClass(P,o)},[P,o]),l.useEffect(function(){typeof s<"u"&&P!==null&&ze.enableRetinaIcons(P,s)},[P,s]),l.useEffect(function(){typeof u<"u"&&P!==null&&ze.gridSize(P,u)},[P,u]),l.useEffect(function(){typeof c<"u"&&P!==null&&ze.ignoreHidden(P,c)},[P,c]),l.useEffect(function(){typeof f<"u"&&P!==null&&ze.imageExtension(P,f)},[P,f]),l.useEffect(function(){typeof h<"u"&&P!==null&&ze.imagePath(P,h)},[P,h]),l.useEffect(function(){typeof p<"u"&&P!==null&&ze.imageSizes(P,p)},[P,p]),l.useEffect(function(){typeof g<"u"&&P!==null&&ze.maxZoom(P,g)},[P,g]),l.useEffect(function(){typeof C<"u"&&P!==null&&ze.minimumClusterSize(P,C)},[P,C]),l.useEffect(function(){typeof v<"u"&&P!==null&&ze.styles(P,v)},[P,v]),l.useEffect(function(){typeof d<"u"&&P!==null&&ze.title(P,d)},[P,d]),l.useEffect(function(){typeof D<"u"&&P!==null&&ze.zoomOnClick(P,D)},[P,D]),l.useEffect(function(){if(R){var W=me({},n||Ef),M=new ao(R,[],W);return r&&ze.averageCenter(M,r),i&&ze.batchSizeIE(M,i),a&&ze.calculator(M,a),o&&ze.clusterClass(M,o),s&&ze.enableRetinaIcons(M,s),u&&ze.gridSize(M,u),c&&ze.ignoreHidden(M,c),f&&ze.imageExtension(M,f),h&&ze.imagePath(M,h),p&&ze.imageSizes(M,p),g&&ze.maxZoom(M,g),C&&ze.minimumClusterSize(M,C),v&&ze.styles(M,v),d&&ze.title(M,d),D&&ze.zoomOnClick(M,D),E&&Q(google.maps.event.addListener(M,Bt.onMouseOut,E)),b&&U(google.maps.event.addListener(M,Bt.onMouseOver,b)),B&&N(google.maps.event.addListener(M,Bt.onClick,B)),w&&$(google.maps.event.addListener(M,Bt.onClusteringBegin,w)),O&&T(google.maps.event.addListener(M,Bt.onClusteringEnd,O)),z(M),S&&S(M),function(){H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),j!==null&&google.maps.event.removeListener(j),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),F&&F(M)}}},[]),P!==null&&e(P)||null}l.memo(wf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new ao(this.context,[],this.props.options);this.registeredEvents=Fe({updaterMap:ze,eventMap:Bt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:ze,eventMap:Bt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),Pe(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=Le,e}(l.PureComponent);function oo(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var so=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||oo(c)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var i=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-i.left-i.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var a=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],o=0,s=a;o<s.length;o++){var u=s[o];this.eventListeners.push(google.maps.event.addListener(this.div,u,oo))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,i=0,a=n.getBounds();a&&!a.contains(this.position)&&n.setCenter(this.position);var o=n.getDiv(),s=o.offsetWidth,u=o.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,h=this.div.offsetWidth,p=this.div.offsetHeight,g=this.infoBoxClearance.width,C=this.infoBoxClearance.height,v=this.getProjection(),d=v.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-c+g?r=d.x+c-g:d.x+h+c+g>s&&(r=d.x+h+c+g-s),this.alignBottom?d.y<-f+C+p?i=d.y+f-C-p:d.y+f+C>u&&(i=d.y+f+C-u):d.y<-f+C?i=d.y+f-C:d.y+p+f+C>u&&(i=d.y+p+f+C-u)),r===0&&i===0||n.panBy(r,i)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var i=this.div.currentStyle;i&&(e.top=parseInt(i.borderTopWidth||"",10)||0,e.bottom=parseInt(i.borderBottomWidth||"",10)||0,e.left=parseInt(i.borderLeftWidth||"",10)||0,e.right=parseInt(i.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var i=n.getPosition();r.setPosition(i)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(i){for(var a in i.prototype)Object.prototype.hasOwnProperty.call(this,a)||(this.prototype[a]=i.prototype[a]);return this}).apply(e,[n])},t}(),uo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},lo={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Bf={};function xf(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,a=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,g=l.useContext(Le),C=l.useState(null),v=C[0],d=C[1],D=l.useState(null),B=D[0],w=D[1],O=l.useState(null),b=O[0],E=O[1],S=l.useState(null),F=S[0],V=S[1],P=l.useState(null),z=P[0],R=P[1],I=l.useState(null),j=I[0],N=I[1],X=l.useRef(null);return l.useEffect(function(){g&&v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),l.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),l.useEffect(function(){if(i&&v!==null){var _=i instanceof google.maps.LatLng?i:new google.maps.LatLng(i.lat,i.lng);v.setPosition(_)}},[i]),l.useEffect(function(){typeof a=="number"&&v!==null&&v.setZIndex(a)},[a]),l.useEffect(function(){v&&o&&(B!==null&&google.maps.event.removeListener(B),w(google.maps.event.addListener(v,"closeclick",o)))},[o]),l.useEffect(function(){v&&s&&(b!==null&&google.maps.event.removeListener(b),E(google.maps.event.addListener(v,"domready",s)))},[s]),l.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"content_changed",u)))},[u]),l.useEffect(function(){v&&c&&(z!==null&&google.maps.event.removeListener(z),R(google.maps.event.addListener(v,"position_changed",c)))},[c]),l.useEffect(function(){v&&f&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),l.useEffect(function(){if(g){var _=r||Bf,$=_.position,re=ci(_,["position"]),k=void 0;$&&!($ instanceof google.maps.LatLng)&&(k=new google.maps.LatLng($.lat,$.lng));var T=new so(me(me({},re),k?{position:k}:{}));X.current=document.createElement("div"),d(T),o&&w(google.maps.event.addListener(T,"closeclick",o)),s&&E(google.maps.event.addListener(T,"domready",s)),u&&V(google.maps.event.addListener(T,"content_changed",u)),c&&R(google.maps.event.addListener(T,"position_changed",c)),f&&N(google.maps.event.addListener(T,"zindex_changed",f)),T.setContent(X.current),n?T.open(g,n):T.getPosition()?T.open(g):tt(!1,"You must provide either an anchor or a position prop for <InfoBox>."),h&&h(T)}return function(){v!==null&&(B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),b&&google.maps.event.removeListener(b),z&&google.maps.event.removeListener(z),j&&google.maps.event.removeListener(j),p&&p(v),v.close())}},[]),X.current?Wt.createPortal(l.Children.only(e),X.current):null}l.memo(xf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,i){i?n.context!==null&&r.open(n.context,i):r.getPosition()?n.context!==null&&r.open(n.context):tt(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,i=ci(n,["position"]),a;r&&!(r instanceof google.maps.LatLng)&&(a=new google.maps.LatLng(r.lat,r.lng));var o=new so(me(me({},i),a?{position:a}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Fe({updaterMap:lo,eventMap:uo,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:lo,eventMap:uo,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),Pe(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Wt.createPortal(l.Children.only(this.props.children),this.containerElement):null},e.contextType=Le,e}(l.PureComponent);var Lf=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n},co=Ha(Lf);const fo=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],di=1,In=8;class pi{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==di)throw new Error(`Got v${i} data when expected v${di}.`);const a=fo[r&15];if(!a)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[s]=new Uint32Array(e,4,1);return new pi(s,o,a,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const a=fo.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,s=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-s%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,In,e),this.coords=new this.ArrayType(this.data,In+s+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(In+o+s+u),this.ids=new this.IndexArrayType(this.data,In,e),this.coords=new this.ArrayType(this.data,In+s+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(di<<4)+a]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return hi(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:a,coords:o,nodeSize:s}=this,u=[0,a.length-1,0],c=[];for(;u.length;){const f=u.pop()||0,h=u.pop()||0,p=u.pop()||0;if(h-p<=s){for(let d=p;d<=h;d++){const D=o[2*d],B=o[2*d+1];D>=e&&D<=r&&B>=n&&B<=i&&c.push(a[d])}continue}const g=p+h>>1,C=o[2*g],v=o[2*g+1];C>=e&&C<=r&&v>=n&&v<=i&&c.push(a[g]),(f===0?e<=C:n<=v)&&(u.push(p),u.push(g-1),u.push(1-f)),(f===0?r>=C:i>=v)&&(u.push(g+1),u.push(h),u.push(1-f))}return c}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:a,nodeSize:o}=this,s=[0,i.length-1,0],u=[],c=r*r;for(;s.length;){const f=s.pop()||0,h=s.pop()||0,p=s.pop()||0;if(h-p<=o){for(let d=p;d<=h;d++)ho(a[2*d],a[2*d+1],e,n)<=c&&u.push(i[d]);continue}const g=p+h>>1,C=a[2*g],v=a[2*g+1];ho(C,v,e,n)<=c&&u.push(i[g]),(f===0?e-r<=C:n-r<=v)&&(s.push(p),s.push(g-1),s.push(1-f)),(f===0?e+r>=C:n+r>=v)&&(s.push(g+1),s.push(h),s.push(1-f))}return u}}function hi(t,e,n,r,i,a){if(i-r<=n)return;const o=r+i>>1;po(t,e,o,r,i,a),hi(t,e,n,r,o-1,1-a),hi(t,e,n,o+1,i,1-a)}function po(t,e,n,r,i,a){for(;i>r;){if(i-r>600){const c=i-r+1,f=n-r+1,h=Math.log(c),p=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*p*(c-p)/c)*(f-c/2<0?-1:1),C=Math.max(r,Math.floor(n-f*p/c+g)),v=Math.min(i,Math.floor(n+(c-f)*p/c+g));po(t,e,n,C,v,a)}const o=e[2*n+a];let s=r,u=i;for(Nn(t,e,r,n),e[2*i+a]>o&&Nn(t,e,r,i);s<u;){for(Nn(t,e,s,u),s++,u--;e[2*s+a]<o;)s++;for(;e[2*u+a]>o;)u--}e[2*r+a]===o?Nn(t,e,r,u):(u++,Nn(t,e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}}function Nn(t,e,n,r){vi(t,n,r),vi(e,2*n,2*r),vi(e,2*n+1,2*r+1)}function vi(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ho(t,e,n,r){const i=t-n,a=e-r;return i*i+a*a}const Sf={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},vo=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),an=2,Ht=3,gi=4,Vt=5,go=6;class Af{constructor(e){this.options=Object.assign(Object.create(Sf),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:i}=this.options;n&&console.time("total time");const a=`prepare ${e.length} points`;n&&console.time(a),this.points=e;const o=[];for(let u=0;u<e.length;u++){const c=e[u];if(!c.geometry)continue;const[f,h]=c.geometry.coordinates,p=vo(pr(f)),g=vo(hr(h));o.push(p,g,1/0,u,-1,1),this.options.reduce&&o.push(0)}let s=this.trees[i+1]=this._createTree(o);n&&console.timeEnd(a);for(let u=i;u>=r;u--){const c=+Date.now();s=this.trees[u]=this._createTree(this._cluster(s,u)),n&&console.log("z%d: %d clusters in %dms",u,s.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let a=e[2]===180?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,a=180;else if(r>a){const h=this.getClusters([r,i,180,o],n),p=this.getClusters([-180,i,a,o],n);return h.concat(p)}const s=this.trees[this._limitZoom(n)],u=s.range(pr(r),hr(o),pr(a),hr(i)),c=s.data,f=[];for(const h of u){const p=this.stride*h;f.push(c[p+Vt]>1?mo(c,p,this.clusterProps):this.points[c[p+Ht]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),i="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(i);const o=a.data;if(n*this.stride>=o.length)throw new Error(i);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),u=o[n*this.stride],c=o[n*this.stride+1],f=a.within(u,c,s),h=[];for(const p of f){const g=p*this.stride;o[g+gi]===e&&h.push(o[g+Vt]>1?mo(o,g,this.clusterProps):this.points[o[g+Ht]])}if(h.length===0)throw new Error(i);return h}getLeaves(e,n,r){n=n||10,r=r||0;const i=[];return this._appendLeaves(i,e,n,r,0),i}getTile(e,n,r){const i=this.trees[this._limitZoom(e)],a=Math.pow(2,e),{extent:o,radius:s}=this.options,u=s/o,c=(r-u)/a,f=(r+1+u)/a,h={features:[]};return this._addTileFeatures(i.range((n-u)/a,c,(n+1+u)/a,f),i.data,n,r,a,h),n===0&&this._addTileFeatures(i.range(1-u/a,c,1,f),i.data,a,r,a,h),n===a-1&&this._addTileFeatures(i.range(0,c,u/a,f),i.data,-1,r,a,h),h.features.length?h:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,i,a){const o=this.getChildren(n);for(const s of o){const u=s.properties;if(u&&u.cluster?a+u.point_count<=i?a+=u.point_count:a=this._appendLeaves(e,u.cluster_id,r,i,a):a<i?a++:e.push(s),e.length===r)break}return a}_createTree(e){const n=new pi(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,i,a,o){for(const s of e){const u=s*this.stride,c=n[u+Vt]>1;let f,h,p;if(c)f=yo(n,u,this.clusterProps),h=n[u],p=n[u+1];else{const v=this.points[n[u+Ht]];f=v.properties;const[d,D]=v.geometry.coordinates;h=pr(d),p=hr(D)}const g={type:1,geometry:[[Math.round(this.options.extent*(h*a-r)),Math.round(this.options.extent*(p*a-i))]],tags:f};let C;c||this.options.generateId?C=n[u+Ht]:C=this.points[n[u+Ht]].id,C!==void 0&&(g.id=C),o.features.push(g)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:i,reduce:a,minPoints:o}=this.options,s=r/(i*Math.pow(2,n)),u=e.data,c=[],f=this.stride;for(let h=0;h<u.length;h+=f){if(u[h+an]<=n)continue;u[h+an]=n;const p=u[h],g=u[h+1],C=e.within(u[h],u[h+1],s),v=u[h+Vt];let d=v;for(const D of C){const B=D*f;u[B+an]>n&&(d+=u[B+Vt])}if(d>v&&d>=o){let D=p*v,B=g*v,w,O=-1;const b=((h/f|0)<<5)+(n+1)+this.points.length;for(const E of C){const S=E*f;if(u[S+an]<=n)continue;u[S+an]=n;const F=u[S+Vt];D+=u[S]*F,B+=u[S+1]*F,u[S+gi]=b,a&&(w||(w=this._map(u,h,!0),O=this.clusterProps.length,this.clusterProps.push(w)),a(w,this._map(u,S)))}u[h+gi]=b,c.push(D/d,B/d,1/0,b,-1,d),a&&c.push(O)}else{for(let D=0;D<f;D++)c.push(u[h+D]);if(d>1)for(const D of C){const B=D*f;if(!(u[B+an]<=n)){u[B+an]=n;for(let w=0;w<f;w++)c.push(u[B+w])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Vt]>1){const o=this.clusterProps[e[n+go]];return r?Object.assign({},o):o}const i=this.points[e[n+Ht]].properties,a=this.options.map(i);return r&&a===i?Object.assign({},a):a}}function mo(t,e,n){return{type:"Feature",id:t[e+Ht],properties:yo(t,e,n),geometry:{type:"Point",coordinates:[Of(t[e]),Ff(t[e+1])]}}}function yo(t,e,n){const r=t[e+Vt],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,a=t[e+go],o=a===-1?{}:Object.assign({},n[a]);return Object.assign(o,{cluster:!0,cluster_id:t[e+Ht],point_count:r,point_count_abbreviated:i})}function pr(t){return t/360+.5}function hr(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Of(t){return(t-.5)*360}function Ff(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
53
+ `)),console.error(j)})},[n,w,i]);var S=l.useRef();return l.useEffect(function(){S.current&&f!==S.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),S.current=f},[f]),{isLoaded:D,loadError:O,url:w}}var af=x.jsx(Xi,{});function of(t){var e=t.loadingElement,n=t.onLoad,r=t.onError,a=t.onUnmount,i=t.children,o=ca(t,["loadingElement","onLoad","onError","onUnmount","children"]),s=rf(o),u=s.isLoaded,c=s.loadError;return l.useEffect(function(){u&&typeof n=="function"&&n()},[u,n]),l.useEffect(function(){c&&typeof r=="function"&&r(c)},[c,r]),l.useEffect(function(){return function(){a&&a()}},[a]),u?i:e||af}l.memo(of);var Qi;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Qi||(Qi={}));var $i={},eo={options:function(t,e){t.setOptions(e)}};function sf(t){var e=t.options,n=t.onLoad,r=t.onUnmount,a=l.useContext(Le),i=l.useState(null),o=i[0],s=i[1];return l.useEffect(function(){o!==null&&o.setMap(a)},[a]),l.useEffect(function(){e&&o!==null&&o.setOptions(e)},[o,e]),l.useEffect(function(){var u=new google.maps.TrafficLayer(me(me({},e||{}),{map:a}));return s(u),n&&n(u),function(){o!==null&&(r&&r(o),o.setMap(null))}},[]),null}l.memo(sf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={trafficLayer:null},n.setTrafficLayerCallback=function(){n.state.trafficLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.trafficLayer)},n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=new google.maps.TrafficLayer(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:eo,eventMap:$i,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{trafficLayer:n}},this.setTrafficLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.trafficLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:eo,eventMap:$i,prevProps:n,nextProps:this.props,instance:this.state.trafficLayer}))},e.prototype.componentWillUnmount=function(){this.state.trafficLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),Pe(this.registeredEvents),this.state.trafficLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);function uf(t){var e=t.onLoad,n=t.onUnmount,r=l.useContext(Le),a=l.useState(null),i=a[0],o=a[1];return l.useEffect(function(){i!==null&&i.setMap(r)},[r]),l.useEffect(function(){var s=new google.maps.BicyclingLayer;return o(s),s.setMap(r),e&&e(s),function(){s!==null&&(n&&n(s),s.setMap(null))}},[]),null}l.memo(uf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={bicyclingLayer:null},n.setBicyclingLayerCallback=function(){n.state.bicyclingLayer!==null&&(n.state.bicyclingLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.bicyclingLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.BicyclingLayer;this.setState(function(){return{bicyclingLayer:n}},this.setBicyclingLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.bicyclingLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);function lf(t){var e=t.onLoad,n=t.onUnmount,r=l.useContext(Le),a=l.useState(null),i=a[0],o=a[1];return l.useEffect(function(){i!==null&&i.setMap(r)},[r]),l.useEffect(function(){var s=new google.maps.TransitLayer;return o(s),s.setMap(r),e&&e(s),function(){i!==null&&(n&&n(i),i.setMap(null))}},[]),null}l.memo(lf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={transitLayer:null},n.setTransitLayerCallback=function(){n.state.transitLayer!==null&&(n.state.transitLayer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.transitLayer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.TransitLayer;this.setState(function(){return{transitLayer:n}},this.setTransitLayerCallback)},e.prototype.componentWillUnmount=function(){this.state.transitLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var to={onCircleComplete:"circlecomplete",onMarkerComplete:"markercomplete",onOverlayComplete:"overlaycomplete",onPolygonComplete:"polygoncomplete",onPolylineComplete:"polylinecomplete",onRectangleComplete:"rectanglecomplete"},no={drawingMode:function(t,e){t.setDrawingMode(e)},options:function(t,e){t.setOptions(e)}};function cf(t){var e=t.options,n=t.drawingMode,r=t.onCircleComplete,a=t.onMarkerComplete,i=t.onOverlayComplete,o=t.onPolygonComplete,s=t.onPolylineComplete,u=t.onRectangleComplete,c=t.onLoad,f=t.onUnmount,h=l.useContext(Le),p=l.useState(null),v=p[0],C=p[1],g=l.useState(null),d=g[0],D=g[1],B=l.useState(null),E=B[0],O=B[1],b=l.useState(null),w=b[0],S=b[1],P=l.useState(null),V=P[0],F=P[1],j=l.useState(null),k=j[0],I=j[1],N=l.useState(null),z=N[0],X=N[1];return l.useEffect(function(){v!==null&&v.setMap(h)},[h]),l.useEffect(function(){e&&v!==null&&v.setOptions(e)},[v,e]),l.useEffect(function(){v!==null&&v.setDrawingMode(n??null)},[v,n]),l.useEffect(function(){v&&r&&(d!==null&&google.maps.event.removeListener(d),D(google.maps.event.addListener(v,"circlecomplete",r)))},[v,r]),l.useEffect(function(){v&&a&&(E!==null&&google.maps.event.removeListener(E),O(google.maps.event.addListener(v,"markercomplete",a)))},[v,a]),l.useEffect(function(){v&&i&&(w!==null&&google.maps.event.removeListener(w),S(google.maps.event.addListener(v,"overlaycomplete",i)))},[v,i]),l.useEffect(function(){v&&o&&(V!==null&&google.maps.event.removeListener(V),F(google.maps.event.addListener(v,"polygoncomplete",o)))},[v,o]),l.useEffect(function(){v&&s&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(v,"polylinecomplete",s)))},[v,s]),l.useEffect(function(){v&&u&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(v,"rectanglecomplete",u)))},[v,u]),l.useEffect(function(){tt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var _=new google.maps.drawing.DrawingManager(me(me({},e||{}),{map:h}));return n&&_.setDrawingMode(n),r&&D(google.maps.event.addListener(_,"circlecomplete",r)),a&&O(google.maps.event.addListener(_,"markercomplete",a)),i&&S(google.maps.event.addListener(_,"overlaycomplete",i)),o&&F(google.maps.event.addListener(_,"polygoncomplete",o)),s&&I(google.maps.event.addListener(_,"polylinecomplete",s)),u&&X(google.maps.event.addListener(_,"rectanglecomplete",u)),C(_),c&&c(_),function(){v!==null&&(d&&google.maps.event.removeListener(d),E&&google.maps.event.removeListener(E),w&&google.maps.event.removeListener(w),V&&google.maps.event.removeListener(V),k&&google.maps.event.removeListener(k),z&&google.maps.event.removeListener(z),f&&f(v),v.setMap(null))}},[]),null}l.memo(cf),function(t){Ve(e,t);function e(n){var r=t.call(this,n)||this;return r.registeredEvents=[],r.state={drawingManager:null},r.setDrawingManagerCallback=function(){r.state.drawingManager!==null&&r.props.onLoad&&r.props.onLoad(r.state.drawingManager)},tt(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing),r}return e.prototype.componentDidMount=function(){var n=new google.maps.drawing.DrawingManager(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:no,eventMap:to,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{drawingManager:n}},this.setDrawingManagerCallback)},e.prototype.componentDidUpdate=function(n){this.state.drawingManager!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:no,eventMap:to,prevProps:n,nextProps:this.props,instance:this.state.drawingManager}))},e.prototype.componentWillUnmount=function(){this.state.drawingManager!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),Pe(this.registeredEvents),this.state.drawingManager.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var ro={onAnimationChanged:"animation_changed",onClick:"click",onClickableChanged:"clickable_changed",onCursorChanged:"cursor_changed",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDraggableChanged:"draggable_changed",onDragStart:"dragstart",onFlatChanged:"flat_changed",onIconChanged:"icon_changed",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onPositionChanged:"position_changed",onRightClick:"rightclick",onShapeChanged:"shape_changed",onTitleChanged:"title_changed",onVisibleChanged:"visible_changed",onZindexChanged:"zindex_changed"},ao={animation:function(t,e){t.setAnimation(e)},clickable:function(t,e){t.setClickable(e)},cursor:function(t,e){t.setCursor(e)},draggable:function(t,e){t.setDraggable(e)},icon:function(t,e){t.setIcon(e)},label:function(t,e){t.setLabel(e)},map:function(t,e){t.setMap(e)},opacity:function(t,e){t.setOpacity(e)},options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},shape:function(t,e){t.setShape(e)},title:function(t,e){t.setTitle(e)},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},dr={};function ff(t){var e=t.position,n=t.options,r=t.clusterer,a=t.noClustererRedraw,i=t.children,o=t.draggable,s=t.visible,u=t.animation,c=t.clickable,f=t.cursor,h=t.icon,p=t.label,v=t.opacity,C=t.shape,g=t.title,d=t.zIndex,D=t.onClick,B=t.onDblClick,E=t.onDrag,O=t.onDragEnd,b=t.onDragStart,w=t.onMouseOut,S=t.onMouseOver,P=t.onMouseUp,V=t.onMouseDown,F=t.onRightClick,j=t.onClickableChanged,k=t.onCursorChanged,I=t.onAnimationChanged,N=t.onDraggableChanged,z=t.onFlatChanged,X=t.onIconChanged,_=t.onPositionChanged,$=t.onShapeChanged,re=t.onTitleChanged,T=t.onVisibleChanged,R=t.onZindexChanged,Z=t.onLoad,H=t.onUnmount,Q=l.useContext(Le),K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ie=l.useState(null),de=ie[0],pe=ie[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1],ve=l.useState(null),Ie=ve[0],se=ve[1],Ne=l.useState(null),fe=Ne[0],we=Ne[1],Me=l.useState(null),He=Me[0],qe=Me[1],Ee=l.useState(null),ut=Ee[0],it=Ee[1],At=l.useState(null),ht=At[0],wt=At[1],Tt=l.useState(null),vt=Tt[0],tn=Tt[1],be=l.useState(null),Te=be[0],Re=be[1],nt=l.useState(null),ot=nt[0],Ot=nt[1],yn=l.useState(null),Fn=yn[0],sr=yn[1],ra=l.useState(null),Cn=ra[0],ur=ra[1],aa=l.useState(null),Pn=aa[0],lr=aa[1],cr=l.useState(null),Mn=cr[0],ia=cr[1],oa=l.useState(null),kn=oa[0],L=oa[1],te=l.useState(null),oe=te[0],De=te[1],je=l.useState(null),_e=je[0],ke=je[1],Oe=l.useState(null),rt=Oe[0],Ke=Oe[1],$e=l.useState(null),lt=$e[0],zt=$e[1];l.useEffect(function(){y!==null&&y.setMap(Q)},[Q]),l.useEffect(function(){typeof n<"u"&&y!==null&&y.setOptions(n)},[y,n]),l.useEffect(function(){typeof o<"u"&&y!==null&&y.setDraggable(o)},[y,o]),l.useEffect(function(){e&&y!==null&&y.setPosition(e)},[y,e]),l.useEffect(function(){typeof s<"u"&&y!==null&&y.setVisible(s)},[y,s]),l.useEffect(function(){y==null||y.setAnimation(u)},[y,u]),l.useEffect(function(){y&&c!==void 0&&y.setClickable(c)},[y,c]),l.useEffect(function(){y&&f!==void 0&&y.setCursor(f)},[y,f]),l.useEffect(function(){y&&h!==void 0&&y.setIcon(h)},[y,h]),l.useEffect(function(){y&&p!==void 0&&y.setLabel(p)},[y,p]),l.useEffect(function(){y&&v!==void 0&&y.setOpacity(v)},[y,v]),l.useEffect(function(){y&&C!==void 0&&y.setShape(C)},[y,C]),l.useEffect(function(){y&&g!==void 0&&y.setTitle(g)},[y,g]),l.useEffect(function(){y&&d!==void 0&&y.setZIndex(d)},[y,d]),l.useEffect(function(){y&&B&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(y,"dblclick",B)))},[B]),l.useEffect(function(){y&&O&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(y,"dragend",O)))},[O]),l.useEffect(function(){y&&b&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(y,"dragstart",b)))},[b]),l.useEffect(function(){y&&V&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(y,"mousedown",V)))},[V]),l.useEffect(function(){y&&w&&(Ie!==null&&google.maps.event.removeListener(Ie),se(google.maps.event.addListener(y,"mouseout",w)))},[w]),l.useEffect(function(){y&&S&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(y,"mouseover",S)))},[S]),l.useEffect(function(){y&&P&&(He!==null&&google.maps.event.removeListener(He),qe(google.maps.event.addListener(y,"mouseup",P)))},[P]),l.useEffect(function(){y&&F&&(ut!==null&&google.maps.event.removeListener(ut),it(google.maps.event.addListener(y,"rightclick",F)))},[F]),l.useEffect(function(){y&&D&&(ht!==null&&google.maps.event.removeListener(ht),wt(google.maps.event.addListener(y,"click",D)))},[D]),l.useEffect(function(){y&&E&&(vt!==null&&google.maps.event.removeListener(vt),tn(google.maps.event.addListener(y,"drag",E)))},[E]),l.useEffect(function(){y&&j&&(Te!==null&&google.maps.event.removeListener(Te),Re(google.maps.event.addListener(y,"clickable_changed",j)))},[j]),l.useEffect(function(){y&&k&&(ot!==null&&google.maps.event.removeListener(ot),Ot(google.maps.event.addListener(y,"cursor_changed",k)))},[k]),l.useEffect(function(){y&&I&&(Fn!==null&&google.maps.event.removeListener(Fn),sr(google.maps.event.addListener(y,"animation_changed",I)))},[I]),l.useEffect(function(){y&&N&&(Cn!==null&&google.maps.event.removeListener(Cn),ur(google.maps.event.addListener(y,"draggable_changed",N)))},[N]),l.useEffect(function(){y&&z&&(Pn!==null&&google.maps.event.removeListener(Pn),lr(google.maps.event.addListener(y,"flat_changed",z)))},[z]),l.useEffect(function(){y&&X&&(Mn!==null&&google.maps.event.removeListener(Mn),ia(google.maps.event.addListener(y,"icon_changed",X)))},[X]),l.useEffect(function(){y&&_&&(kn!==null&&google.maps.event.removeListener(kn),L(google.maps.event.addListener(y,"position_changed",_)))},[_]),l.useEffect(function(){y&&$&&(oe!==null&&google.maps.event.removeListener(oe),De(google.maps.event.addListener(y,"shape_changed",$)))},[$]),l.useEffect(function(){y&&re&&(_e!==null&&google.maps.event.removeListener(_e),ke(google.maps.event.addListener(y,"title_changed",re)))},[re]),l.useEffect(function(){y&&T&&(rt!==null&&google.maps.event.removeListener(rt),Ke(google.maps.event.addListener(y,"visible_changed",T)))},[T]),l.useEffect(function(){y&&R&&(lt!==null&&google.maps.event.removeListener(lt),zt(google.maps.event.addListener(y,"zindex_changed",R)))},[R]),l.useEffect(function(){var at=me(me(me({},n||dr),r?dr:{map:Q}),{position:e}),Be=new google.maps.Marker(at);return r?r.addMarker(Be,!!a):Be.setMap(Q),e&&Be.setPosition(e),typeof s<"u"&&Be.setVisible(s),typeof o<"u"&&Be.setDraggable(o),typeof c<"u"&&Be.setClickable(c),typeof f=="string"&&Be.setCursor(f),h&&Be.setIcon(h),typeof p<"u"&&Be.setLabel(p),typeof v<"u"&&Be.setOpacity(v),C&&Be.setShape(C),typeof g=="string"&&Be.setTitle(g),typeof d=="number"&&Be.setZIndex(d),B&&J(google.maps.event.addListener(Be,"dblclick",B)),O&&ue(google.maps.event.addListener(Be,"dragend",O)),b&&pe(google.maps.event.addListener(Be,"dragstart",b)),V&&ge(google.maps.event.addListener(Be,"mousedown",V)),w&&se(google.maps.event.addListener(Be,"mouseout",w)),S&&we(google.maps.event.addListener(Be,"mouseover",S)),P&&qe(google.maps.event.addListener(Be,"mouseup",P)),F&&it(google.maps.event.addListener(Be,"rightclick",F)),D&&wt(google.maps.event.addListener(Be,"click",D)),E&&tn(google.maps.event.addListener(Be,"drag",E)),j&&Re(google.maps.event.addListener(Be,"clickable_changed",j)),k&&Ot(google.maps.event.addListener(Be,"cursor_changed",k)),I&&sr(google.maps.event.addListener(Be,"animation_changed",I)),N&&ur(google.maps.event.addListener(Be,"draggable_changed",N)),z&&lr(google.maps.event.addListener(Be,"flat_changed",z)),X&&ia(google.maps.event.addListener(Be,"icon_changed",X)),_&&L(google.maps.event.addListener(Be,"position_changed",_)),$&&De(google.maps.event.addListener(Be,"shape_changed",$)),re&&ke(google.maps.event.addListener(Be,"title_changed",re)),T&&Ke(google.maps.event.addListener(Be,"visible_changed",T)),R&&zt(google.maps.event.addListener(Be,"zindex_changed",R)),U(Be),Z&&Z(Be),function(){M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),Ie!==null&&google.maps.event.removeListener(Ie),fe!==null&&google.maps.event.removeListener(fe),He!==null&&google.maps.event.removeListener(He),ut!==null&&google.maps.event.removeListener(ut),ht!==null&&google.maps.event.removeListener(ht),Te!==null&&google.maps.event.removeListener(Te),ot!==null&&google.maps.event.removeListener(ot),Fn!==null&&google.maps.event.removeListener(Fn),Cn!==null&&google.maps.event.removeListener(Cn),Pn!==null&&google.maps.event.removeListener(Pn),Mn!==null&&google.maps.event.removeListener(Mn),kn!==null&&google.maps.event.removeListener(kn),_e!==null&&google.maps.event.removeListener(_e),rt!==null&&google.maps.event.removeListener(rt),lt!==null&&google.maps.event.removeListener(lt),H&&H(Be),r?r.removeMarker(Be,!!a):Be&&Be.setMap(null)}},[]);var _t=l.useMemo(function(){return i?l.Children.map(i,function(at){if(!l.isValidElement(at))return at;var Be=at;return l.cloneElement(Be,{anchor:y})}):null},[i,y]);return x.jsx(x.Fragment,{children:_t})||null}l.memo(ff);var df=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n}return e.prototype.componentDidMount=function(){var n=me(me(me({},this.props.options||dr),this.props.clusterer?dr:{map:this.context}),{position:this.props.position});this.marker=new google.maps.Marker(n),this.props.clusterer?this.props.clusterer.addMarker(this.marker,!!this.props.noClustererRedraw):this.marker.setMap(this.context),this.registeredEvents=Fe({updaterMap:ao,eventMap:ro,prevProps:{},nextProps:this.props,instance:this.marker}),this.props.onLoad&&this.props.onLoad(this.marker)},e.prototype.componentDidUpdate=function(n){this.marker&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:ao,eventMap:ro,prevProps:n,nextProps:this.props,instance:this.marker}))},e.prototype.componentWillUnmount=function(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),Pe(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))},e.prototype.render=function(){var n=this,r=null;return this.props.children&&(r=l.Children.map(this.props.children,function(a){if(!l.isValidElement(a))return a;var i=a;return l.cloneElement(i,{anchor:n.marker})})),r||null},e.contextType=Le,e}(l.PureComponent),pf=function(){function t(e,n){e.getClusterer().extend(t,google.maps.OverlayView),this.cluster=e,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(e.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return t.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},t.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},t.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var n=this.cluster.getClusterer();if(google.maps.event.trigger(n,"click",this.cluster),google.maps.event.trigger(n,"clusterclick",this.cluster),n.getZoomOnClick()){var r=n.getMaxZoom(),a=this.cluster.getBounds(),i=n.getMap();i!==null&&"fitBounds"in i&&i.fitBounds(a),this.timeOut=window.setTimeout(function(){var o=n.getMap();if(o!==null){"fitBounds"in o&&o.fitBounds(a);var s=o.getZoom()||0;r!==null&&s>r&&o.setZoom(r+1)}},100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},t.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},t.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},t.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),(e=this.getPanes())===null||e===void 0||e.overlayMouseTarget.appendChild(this.div);var n=this.getMap();n!==null&&(this.boundsChangedListener=google.maps.event.addListener(n,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),this.boundsChangedListener!==null&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),this.timeOut!==null&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},t.prototype.draw=function(){if(this.visible&&this.div!==null&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=e!==null?"".concat(e.y,"px"):"0",this.div.style.left=e!==null?"".concat(e.x,"px"):"0"}},t.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},t.prototype.show=function(){var e,n,r,a,i,o;if(this.div&&this.center){var s=this.sums===null||typeof this.sums.title>"u"||this.sums.title===""?this.cluster.getClusterer().getTitle():this.sums.title,u=this.backgroundPosition.split(" "),c=parseInt(((e=u[0])===null||e===void 0?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),f=parseInt(((n=u[1])===null||n===void 0?void 0:n.replace(/^\s+|\s+$/g,""))||"0",10),h=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(h!==null?"".concat(h.y,"px"):"0","; left: ").concat(h!==null?"".concat(h.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var p=document.createElement("img");p.alt=s,p.src=this.url,p.width=this.width,p.height=this.height,p.setAttribute("style","position: absolute; top: ".concat(f,"px; left: ").concat(c,"px")),this.cluster.getClusterer().enableRetinaIcons||(p.style.clip="rect(-".concat(f,"px, -").concat(c+this.width,"px, -").concat(f+this.height,", -").concat(c,")"));var v=document.createElement("div");v.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),!((r=this.sums)===null||r===void 0)&&r.text&&(v.innerText="".concat((a=this.sums)===null||a===void 0?void 0:a.text)),!((i=this.sums)===null||i===void 0)&&i.html&&(v.innerHTML="".concat((o=this.sums)===null||o===void 0?void 0:o.html)),this.div.innerHTML="",this.div.appendChild(p),this.div.appendChild(v),this.div.title=s,this.div.style.display=""}this.visible=!0},t.prototype.useStyle=function(e){this.sums=e;var n=this.cluster.getClusterer().getStyles(),r=n[Math.min(n.length-1,Math.max(0,e.index-1))];r&&(this.url=r.url,this.height=r.height,this.width=r.width,r.className&&(this.className="".concat(this.clusterClassName," ").concat(r.className)),this.anchorText=r.anchorText||[0,0],this.anchorIcon=r.anchorIcon||[this.height/2,this.width/2],this.textColor=r.textColor||"black",this.textSize=r.textSize||11,this.textDecoration=r.textDecoration||"none",this.fontWeight=r.fontWeight||"bold",this.fontStyle=r.fontStyle||"normal",this.fontFamily=r.fontFamily||"Arial,sans-serif",this.backgroundPosition=r.backgroundPosition||"0 0")},t.prototype.setCenter=function(e){this.center=e},t.prototype.getPosFromLatLng=function(e){var n=this.getProjection().fromLatLngToDivPixel(e);return n!==null&&(n.x-=this.anchorIcon[1],n.y-=this.anchorIcon[0]),n},t}(),hf=function(){function t(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new pf(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return t.prototype.getSize=function(){return this.markers.length},t.prototype.getMarkers=function(){return this.markers},t.prototype.getCenter=function(){return this.center},t.prototype.getMap=function(){return this.map},t.prototype.getClusterer=function(){return this.markerClusterer},t.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),n=this.getMarkers(),r=0,a=n;r<a.length;r++){var i=a[r],o=i.getPosition();o&&e.extend(o)}return e},t.prototype.remove=function(){this.clusterIcon.setMap(null),this.markers=[],delete this.markers},t.prototype.addMarker=function(e){var n;if(this.isMarkerAlreadyAdded(e))return!1;if(this.center){if(this.averageCenter){var r=e.getPosition();if(r){var a=this.markers.length+1;this.center=new google.maps.LatLng((this.center.lat()*(a-1)+r.lat())/a,(this.center.lng()*(a-1)+r.lng())/a),this.calculateBounds()}}}else{var r=e.getPosition();r&&(this.center=r,this.calculateBounds())}e.isAdded=!0,this.markers.push(e);var i=this.markers.length,o=this.markerClusterer.getMaxZoom(),s=(n=this.map)===null||n===void 0?void 0:n.getZoom();if(o!==null&&typeof s<"u"&&s>o)e.getMap()!==this.map&&e.setMap(this.map);else if(i<this.minClusterSize)e.getMap()!==this.map&&e.setMap(this.map);else if(i===this.minClusterSize)for(var u=0,c=this.markers;u<c.length;u++){var f=c[u];f.setMap(null)}else e.setMap(null);return!0},t.prototype.isMarkerInClusterBounds=function(e){if(this.bounds!==null){var n=e.getPosition();if(n)return this.bounds.contains(n)}return!1},t.prototype.calculateBounds=function(){this.bounds=this.markerClusterer.getExtendedBounds(new google.maps.LatLngBounds(this.center,this.center))},t.prototype.updateIcon=function(){var e,n=this.markers.length,r=this.markerClusterer.getMaxZoom(),a=(e=this.map)===null||e===void 0?void 0:e.getZoom();if(r!==null&&typeof a<"u"&&a>r){this.clusterIcon.hide();return}if(n<this.minClusterSize){this.clusterIcon.hide();return}this.center&&this.clusterIcon.setCenter(this.center),this.clusterIcon.useStyle(this.markerClusterer.getCalculator()(this.markers,this.markerClusterer.getStyles().length)),this.clusterIcon.show()},t.prototype.isMarkerAlreadyAdded=function(e){if(this.markers.includes)return this.markers.includes(e);for(var n=0;n<this.markers.length;n++)if(e===this.markers[n])return!0;return!1},t}();function vf(t,e){var n=t.length,r=n.toString().length,a=Math.min(r,e);return{text:n.toString(),index:a,title:""}}var gf=2e3,mf=500,yf="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",Cf="png",Df=[53,56,66,78,90],bf="cluster",io=function(){function t(e,n,r){n===void 0&&(n=[]),r===void 0&&(r={}),this.getMinimumClusterSize=this.getMinimumClusterSize.bind(this),this.setMinimumClusterSize=this.setMinimumClusterSize.bind(this),this.getEnableRetinaIcons=this.getEnableRetinaIcons.bind(this),this.setEnableRetinaIcons=this.setEnableRetinaIcons.bind(this),this.addToClosestCluster=this.addToClosestCluster.bind(this),this.getImageExtension=this.getImageExtension.bind(this),this.setImageExtension=this.setImageExtension.bind(this),this.getExtendedBounds=this.getExtendedBounds.bind(this),this.getAverageCenter=this.getAverageCenter.bind(this),this.setAverageCenter=this.setAverageCenter.bind(this),this.getTotalClusters=this.getTotalClusters.bind(this),this.fitMapToMarkers=this.fitMapToMarkers.bind(this),this.getIgnoreHidden=this.getIgnoreHidden.bind(this),this.setIgnoreHidden=this.setIgnoreHidden.bind(this),this.getClusterClass=this.getClusterClass.bind(this),this.setClusterClass=this.setClusterClass.bind(this),this.getTotalMarkers=this.getTotalMarkers.bind(this),this.getZoomOnClick=this.getZoomOnClick.bind(this),this.setZoomOnClick=this.setZoomOnClick.bind(this),this.getBatchSizeIE=this.getBatchSizeIE.bind(this),this.setBatchSizeIE=this.setBatchSizeIE.bind(this),this.createClusters=this.createClusters.bind(this),this.onZoomChanged=this.onZoomChanged.bind(this),this.getImageSizes=this.getImageSizes.bind(this),this.setImageSizes=this.setImageSizes.bind(this),this.getCalculator=this.getCalculator.bind(this),this.setCalculator=this.setCalculator.bind(this),this.removeMarkers=this.removeMarkers.bind(this),this.resetViewport=this.resetViewport.bind(this),this.getImagePath=this.getImagePath.bind(this),this.setImagePath=this.setImagePath.bind(this),this.pushMarkerTo=this.pushMarkerTo.bind(this),this.removeMarker=this.removeMarker.bind(this),this.clearMarkers=this.clearMarkers.bind(this),this.setupStyles=this.setupStyles.bind(this),this.getGridSize=this.getGridSize.bind(this),this.setGridSize=this.setGridSize.bind(this),this.getClusters=this.getClusters.bind(this),this.getMaxZoom=this.getMaxZoom.bind(this),this.setMaxZoom=this.setMaxZoom.bind(this),this.getMarkers=this.getMarkers.bind(this),this.addMarkers=this.addMarkers.bind(this),this.getStyles=this.getStyles.bind(this),this.setStyles=this.setStyles.bind(this),this.addMarker=this.addMarker.bind(this),this.onRemove=this.onRemove.bind(this),this.getTitle=this.getTitle.bind(this),this.setTitle=this.setTitle.bind(this),this.repaint=this.repaint.bind(this),this.onIdle=this.onIdle.bind(this),this.redraw=this.redraw.bind(this),this.onAdd=this.onAdd.bind(this),this.draw=this.draw.bind(this),this.extend=this.extend.bind(this),this.extend(t,google.maps.OverlayView),this.markers=[],this.clusters=[],this.listeners=[],this.activeMap=null,this.ready=!1,this.gridSize=r.gridSize||60,this.minClusterSize=r.minimumClusterSize||2,this.maxZoom=r.maxZoom||null,this.styles=r.styles||[],this.title=r.title||"",this.zoomOnClick=!0,r.zoomOnClick!==void 0&&(this.zoomOnClick=r.zoomOnClick),this.averageCenter=!1,r.averageCenter!==void 0&&(this.averageCenter=r.averageCenter),this.ignoreHidden=!1,r.ignoreHidden!==void 0&&(this.ignoreHidden=r.ignoreHidden),this.enableRetinaIcons=!1,r.enableRetinaIcons!==void 0&&(this.enableRetinaIcons=r.enableRetinaIcons),this.imagePath=r.imagePath||yf,this.imageExtension=r.imageExtension||Cf,this.imageSizes=r.imageSizes||Df,this.calculator=r.calculator||vf,this.batchSize=r.batchSize||gf,this.batchSizeIE=r.batchSizeIE||mf,this.clusterClass=r.clusterClass||bf,navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize=this.batchSizeIE),this.timerRefStatic=null,this.setupStyles(),this.addMarkers(n,!0),this.setMap(e)}return t.prototype.onZoomChanged=function(){var e,n;this.resetViewport(!1),(((e=this.getMap())===null||e===void 0?void 0:e.getZoom())===(this.get("minZoom")||0)||((n=this.getMap())===null||n===void 0?void 0:n.getZoom())===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")},t.prototype.onIdle=function(){this.redraw()},t.prototype.onAdd=function(){var e=this.getMap();this.activeMap=e,this.ready=!0,this.repaint(),e!==null&&(this.listeners=[google.maps.event.addListener(e,"zoom_changed",this.onZoomChanged),google.maps.event.addListener(e,"idle",this.onIdle)])},t.prototype.onRemove=function(){for(var e=0,n=this.markers;e<n.length;e++){var r=n[e];r.getMap()!==this.activeMap&&r.setMap(this.activeMap)}for(var a=0,i=this.clusters;a<i.length;a++){var o=i[a];o.remove()}this.clusters=[];for(var s=0,u=this.listeners;s<u.length;s++){var c=u[s];google.maps.event.removeListener(c)}this.listeners=[],this.activeMap=null,this.ready=!1},t.prototype.draw=function(){},t.prototype.getMap=function(){return null},t.prototype.getPanes=function(){return null},t.prototype.getProjection=function(){return{fromContainerPixelToLatLng:function(){return null},fromDivPixelToLatLng:function(){return null},fromLatLngToContainerPixel:function(){return null},fromLatLngToDivPixel:function(){return null},getVisibleRegion:function(){return null},getWorldWidth:function(){return 0}}},t.prototype.setMap=function(){},t.prototype.addListener=function(){return{remove:function(){}}},t.prototype.bindTo=function(){},t.prototype.get=function(){},t.prototype.notify=function(){},t.prototype.set=function(){},t.prototype.setValues=function(){},t.prototype.unbind=function(){},t.prototype.unbindAll=function(){},t.prototype.setupStyles=function(){if(!(this.styles.length>0))for(var e=0;e<this.imageSizes.length;e++)this.styles.push({url:"".concat(this.imagePath+(e+1),".").concat(this.imageExtension),height:this.imageSizes[e]||0,width:this.imageSizes[e]||0})},t.prototype.fitMapToMarkers=function(){for(var e=this.getMarkers(),n=new google.maps.LatLngBounds,r=0,a=e;r<a.length;r++){var i=a[r],o=i.getPosition();o&&n.extend(o)}var s=this.getMap();s!==null&&"fitBounds"in s&&s.fitBounds(n)},t.prototype.getGridSize=function(){return this.gridSize},t.prototype.setGridSize=function(e){this.gridSize=e},t.prototype.getMinimumClusterSize=function(){return this.minClusterSize},t.prototype.setMinimumClusterSize=function(e){this.minClusterSize=e},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.setMaxZoom=function(e){this.maxZoom=e},t.prototype.getStyles=function(){return this.styles},t.prototype.setStyles=function(e){this.styles=e},t.prototype.getTitle=function(){return this.title},t.prototype.setTitle=function(e){this.title=e},t.prototype.getZoomOnClick=function(){return this.zoomOnClick},t.prototype.setZoomOnClick=function(e){this.zoomOnClick=e},t.prototype.getAverageCenter=function(){return this.averageCenter},t.prototype.setAverageCenter=function(e){this.averageCenter=e},t.prototype.getIgnoreHidden=function(){return this.ignoreHidden},t.prototype.setIgnoreHidden=function(e){this.ignoreHidden=e},t.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons},t.prototype.setEnableRetinaIcons=function(e){this.enableRetinaIcons=e},t.prototype.getImageExtension=function(){return this.imageExtension},t.prototype.setImageExtension=function(e){this.imageExtension=e},t.prototype.getImagePath=function(){return this.imagePath},t.prototype.setImagePath=function(e){this.imagePath=e},t.prototype.getImageSizes=function(){return this.imageSizes},t.prototype.setImageSizes=function(e){this.imageSizes=e},t.prototype.getCalculator=function(){return this.calculator},t.prototype.setCalculator=function(e){this.calculator=e},t.prototype.getBatchSizeIE=function(){return this.batchSizeIE},t.prototype.setBatchSizeIE=function(e){this.batchSizeIE=e},t.prototype.getClusterClass=function(){return this.clusterClass},t.prototype.setClusterClass=function(e){this.clusterClass=e},t.prototype.getMarkers=function(){return this.markers},t.prototype.getTotalMarkers=function(){return this.markers.length},t.prototype.getClusters=function(){return this.clusters},t.prototype.getTotalClusters=function(){return this.clusters.length},t.prototype.addMarker=function(e,n){this.pushMarkerTo(e),n||this.redraw()},t.prototype.addMarkers=function(e,n){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var a=e[r];a&&this.pushMarkerTo(a)}n||this.redraw()},t.prototype.pushMarkerTo=function(e){var n=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){n.ready&&(e.isAdded=!1,n.repaint())}),e.isAdded=!1,this.markers.push(e)},t.prototype.removeMarker_=function(e){var n=-1;if(this.markers.indexOf)n=this.markers.indexOf(e);else for(var r=0;r<this.markers.length;r++)if(e===this.markers[r]){n=r;break}return n===-1?!1:(e.setMap(null),this.markers.splice(n,1),!0)},t.prototype.removeMarker=function(e,n){var r=this.removeMarker_(e);return!n&&r&&this.repaint(),r},t.prototype.removeMarkers=function(e,n){for(var r=!1,a=0,i=e;a<i.length;a++){var o=i[a];r=r||this.removeMarker_(o)}return!n&&r&&this.repaint(),r},t.prototype.clearMarkers=function(){this.resetViewport(!0),this.markers=[]},t.prototype.repaint=function(){var e=this.clusters.slice();this.clusters=[],this.resetViewport(!1),this.redraw(),setTimeout(function(){for(var r=0,a=e;r<a.length;r++){var i=a[r];i.remove()}},0)},t.prototype.getExtendedBounds=function(e){var n=this.getProjection(),r=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()));r!==null&&(r.x+=this.gridSize,r.y-=this.gridSize);var a=n.fromLatLngToDivPixel(new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()));if(a!==null&&(a.x-=this.gridSize,a.y+=this.gridSize),r!==null){var i=n.fromDivPixelToLatLng(r);i!==null&&e.extend(i)}if(a!==null){var o=n.fromDivPixelToLatLng(a);o!==null&&e.extend(o)}return e},t.prototype.redraw=function(){this.createClusters(0)},t.prototype.resetViewport=function(e){for(var n=0,r=this.clusters;n<r.length;n++){var a=r[n];a.remove()}this.clusters=[];for(var i=0,o=this.markers;i<o.length;i++){var s=o[i];s.isAdded=!1,e&&s.setMap(null)}},t.prototype.distanceBetweenPoints=function(e,n){var r=6371,a=(n.lat()-e.lat())*Math.PI/180,i=(n.lng()-e.lng())*Math.PI/180,o=Math.sin(a/2)*Math.sin(a/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(n.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return r*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},t.prototype.isMarkerInBounds=function(e,n){var r=e.getPosition();return r?n.contains(r):!1},t.prototype.addToClosestCluster=function(e){for(var n,r=4e4,a=null,i=0,o=this.clusters;i<o.length;i++){var s=o[i];n=s;var u=n.getCenter(),c=e.getPosition();if(u&&c){var f=this.distanceBetweenPoints(u,c);f<r&&(r=f,a=n)}}a&&a.isMarkerInClusterBounds(e)?a.addMarker(e):(n=new hf(this),n.addMarker(e),this.clusters.push(n))},t.prototype.createClusters=function(e){var n=this;if(this.ready){e===0&&(google.maps.event.trigger(this,"clusteringbegin",this),this.timerRefStatic!==null&&(window.clearTimeout(this.timerRefStatic),delete this.timerRefStatic));for(var r=this.getMap(),a=r!==null&&("getBounds"in r)?r.getBounds():null,i=(r==null?void 0:r.getZoom())||0,o=i>3?new google.maps.LatLngBounds(a==null?void 0:a.getSouthWest(),a==null?void 0:a.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),s=this.getExtendedBounds(o),u=Math.min(e+this.batchSize,this.markers.length),c=e;c<u;c++){var f=this.markers[c];f&&!f.isAdded&&this.isMarkerInBounds(f,s)&&(!this.ignoreHidden||this.ignoreHidden&&f.getVisible())&&this.addToClosestCluster(f)}if(u<this.markers.length)this.timerRefStatic=window.setTimeout(function(){n.createClusters(u)},0);else{this.timerRefStatic=null,google.maps.event.trigger(this,"clusteringend",this);for(var h=0,p=this.clusters;h<p.length;h++){var v=p[h];v.updateIcon()}}}},t.prototype.extend=function(e,n){return(function(a){for(var i in a.prototype){var o=i;this.prototype[o]=a.prototype[o]}return this}).apply(e,[n])},t}(),Bt={onClick:"click",onClusteringBegin:"clusteringbegin",onClusteringEnd:"clusteringend",onMouseOut:"mouseout",onMouseOver:"mouseover"},ze={averageCenter:function(t,e){t.setAverageCenter(e)},batchSizeIE:function(t,e){t.setBatchSizeIE(e)},calculator:function(t,e){t.setCalculator(e)},clusterClass:function(t,e){t.setClusterClass(e)},enableRetinaIcons:function(t,e){t.setEnableRetinaIcons(e)},gridSize:function(t,e){t.setGridSize(e)},ignoreHidden:function(t,e){t.setIgnoreHidden(e)},imageExtension:function(t,e){t.setImageExtension(e)},imagePath:function(t,e){t.setImagePath(e)},imageSizes:function(t,e){t.setImageSizes(e)},maxZoom:function(t,e){t.setMaxZoom(e)},minimumClusterSize:function(t,e){t.setMinimumClusterSize(e)},styles:function(t,e){t.setStyles(e)},title:function(t,e){t.setTitle(e)},zoomOnClick:function(t,e){t.setZoomOnClick(e)}},Ef={};function wf(t){var e=t.children,n=t.options,r=t.averageCenter,a=t.batchSizeIE,i=t.calculator,o=t.clusterClass,s=t.enableRetinaIcons,u=t.gridSize,c=t.ignoreHidden,f=t.imageExtension,h=t.imagePath,p=t.imageSizes,v=t.maxZoom,C=t.minimumClusterSize,g=t.styles,d=t.title,D=t.zoomOnClick,B=t.onClick,E=t.onClusteringBegin,O=t.onClusteringEnd,b=t.onMouseOver,w=t.onMouseOut,S=t.onLoad,P=t.onUnmount,V=l.useState(null),F=V[0],j=V[1],k=l.useContext(Le),I=l.useState(null),N=I[0],z=I[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),T=re[0],R=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1];return l.useEffect(function(){F&&w&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(F,Bt.onMouseOut,w)))},[w]),l.useEffect(function(){F&&b&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(F,Bt.onMouseOver,b)))},[b]),l.useEffect(function(){F&&B&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(F,Bt.onClick,B)))},[B]),l.useEffect(function(){F&&E&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(F,Bt.onClusteringBegin,E)))},[E]),l.useEffect(function(){F&&O&&(T!==null&&google.maps.event.removeListener(T),$(google.maps.event.addListener(F,Bt.onClusteringEnd,O)))},[O]),l.useEffect(function(){typeof r<"u"&&F!==null&&ze.averageCenter(F,r)},[F,r]),l.useEffect(function(){typeof a<"u"&&F!==null&&ze.batchSizeIE(F,a)},[F,a]),l.useEffect(function(){typeof i<"u"&&F!==null&&ze.calculator(F,i)},[F,i]),l.useEffect(function(){typeof o<"u"&&F!==null&&ze.clusterClass(F,o)},[F,o]),l.useEffect(function(){typeof s<"u"&&F!==null&&ze.enableRetinaIcons(F,s)},[F,s]),l.useEffect(function(){typeof u<"u"&&F!==null&&ze.gridSize(F,u)},[F,u]),l.useEffect(function(){typeof c<"u"&&F!==null&&ze.ignoreHidden(F,c)},[F,c]),l.useEffect(function(){typeof f<"u"&&F!==null&&ze.imageExtension(F,f)},[F,f]),l.useEffect(function(){typeof h<"u"&&F!==null&&ze.imagePath(F,h)},[F,h]),l.useEffect(function(){typeof p<"u"&&F!==null&&ze.imageSizes(F,p)},[F,p]),l.useEffect(function(){typeof v<"u"&&F!==null&&ze.maxZoom(F,v)},[F,v]),l.useEffect(function(){typeof C<"u"&&F!==null&&ze.minimumClusterSize(F,C)},[F,C]),l.useEffect(function(){typeof g<"u"&&F!==null&&ze.styles(F,g)},[F,g]),l.useEffect(function(){typeof d<"u"&&F!==null&&ze.title(F,d)},[F,d]),l.useEffect(function(){typeof D<"u"&&F!==null&&ze.zoomOnClick(F,D)},[F,D]),l.useEffect(function(){if(k){var W=me({},n||Ef),M=new io(k,[],W);return r&&ze.averageCenter(M,r),a&&ze.batchSizeIE(M,a),i&&ze.calculator(M,i),o&&ze.clusterClass(M,o),s&&ze.enableRetinaIcons(M,s),u&&ze.gridSize(M,u),c&&ze.ignoreHidden(M,c),f&&ze.imageExtension(M,f),h&&ze.imagePath(M,h),p&&ze.imageSizes(M,p),v&&ze.maxZoom(M,v),C&&ze.minimumClusterSize(M,C),g&&ze.styles(M,g),d&&ze.title(M,d),D&&ze.zoomOnClick(M,D),w&&Q(google.maps.event.addListener(M,Bt.onMouseOut,w)),b&&U(google.maps.event.addListener(M,Bt.onMouseOver,b)),B&&z(google.maps.event.addListener(M,Bt.onClick,B)),E&&$(google.maps.event.addListener(M,Bt.onClusteringBegin,E)),O&&R(google.maps.event.addListener(M,Bt.onClusteringEnd,O)),j(M),S&&S(M),function(){H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),N!==null&&google.maps.event.removeListener(N),_!==null&&google.maps.event.removeListener(_),T!==null&&google.maps.event.removeListener(T),P&&P(M)}}},[]),F!==null&&e(F)||null}l.memo(wf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={markerClusterer:null},n.setClustererCallback=function(){n.state.markerClusterer!==null&&n.props.onLoad&&n.props.onLoad(n.state.markerClusterer)},n}return e.prototype.componentDidMount=function(){if(this.context){var n=new io(this.context,[],this.props.options);this.registeredEvents=Fe({updaterMap:ze,eventMap:Bt,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{markerClusterer:n}},this.setClustererCallback)}},e.prototype.componentDidUpdate=function(n){this.state.markerClusterer&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:ze,eventMap:Bt,prevProps:n,nextProps:this.props,instance:this.state.markerClusterer}))},e.prototype.componentWillUnmount=function(){this.state.markerClusterer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),Pe(this.registeredEvents),this.state.markerClusterer.setMap(null))},e.prototype.render=function(){return this.state.markerClusterer!==null?this.props.children(this.state.markerClusterer):null},e.contextType=Le,e}(l.PureComponent);function oo(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()}var so=function(){function t(e){e===void 0&&(e={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(t,google.maps.OverlayView),this.content=e.content||"",this.disableAutoPan=e.disableAutoPan||!1,this.maxWidth=e.maxWidth||0,this.pixelOffset=e.pixelOffset||new google.maps.Size(0,0),this.position=e.position||new google.maps.LatLng(0,0),this.zIndex=e.zIndex||null,this.boxClass=e.boxClass||"infoBox",this.boxStyle=e.boxStyle||{},this.closeBoxMargin=e.closeBoxMargin||"2px",this.closeBoxURL=e.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",e.closeBoxURL===""&&(this.closeBoxURL=""),this.infoBoxClearance=e.infoBoxClearance||new google.maps.Size(1,1),typeof e.visible>"u"&&(typeof e.isHidden>"u"?e.visible=!0:e.visible=!e.isHidden),this.isHidden=!e.visible,this.alignBottom=e.alignBottom||!1,this.pane=e.pane||"floatPane",this.enableEventPropagation=e.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return t.prototype.createInfoBoxDiv=function(){var e=this,n=function(c){c.returnValue=!1,c.preventDefault&&c.preventDefault(),e.enableEventPropagation||oo(c)};if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),typeof this.content=="string"?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var r=this.getPanes();if(r!==null&&r[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(this.maxWidth!==0&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var a=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-a.left-a.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var i=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],o=0,s=i;o<s.length;o++){var u=s[o];this.eventListeners.push(google.maps.event.addListener(this.div,u,oo))}this.eventListeners.push(google.maps.event.addListener(this.div,"mouseover",function(){e.div&&(e.div.style.cursor="default")}))}this.contextListener=google.maps.event.addListener(this.div,"contextmenu",n),google.maps.event.trigger(this,"domready")}},t.prototype.getCloseBoxImg=function(){var e="";return this.closeBoxURL!==""&&(e='<img alt=""',e+=' aria-hidden="true"',e+=" src='"+this.closeBoxURL+"'",e+=" align=right",e+=" style='",e+=" position: relative;",e+=" cursor: pointer;",e+=" margin: "+this.closeBoxMargin+";",e+="'>"),e},t.prototype.addClickHandler=function(){this.closeListener=this.div&&this.div.firstChild&&this.closeBoxURL!==""?google.maps.event.addListener(this.div.firstChild,"click",this.getCloseClickHandler()):null},t.prototype.closeClickHandler=function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(this,"closeclick"),this.close()},t.prototype.getCloseClickHandler=function(){return this.closeClickHandler},t.prototype.panBox=function(e){if(this.div&&!e){var n=this.getMap();if(n instanceof google.maps.Map){var r=0,a=0,i=n.getBounds();i&&!i.contains(this.position)&&n.setCenter(this.position);var o=n.getDiv(),s=o.offsetWidth,u=o.offsetHeight,c=this.pixelOffset.width,f=this.pixelOffset.height,h=this.div.offsetWidth,p=this.div.offsetHeight,v=this.infoBoxClearance.width,C=this.infoBoxClearance.height,g=this.getProjection(),d=g.fromLatLngToContainerPixel(this.position);d!==null&&(d.x<-c+v?r=d.x+c-v:d.x+h+c+v>s&&(r=d.x+h+c+v-s),this.alignBottom?d.y<-f+C+p?a=d.y+f-C-p:d.y+f+C>u&&(a=d.y+f+C-u):d.y<-f+C?a=d.y+f-C:d.y+p+f+C>u&&(a=d.y+p+f+C-u)),r===0&&a===0||n.panBy(r,a)}}},t.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this.div.style[n]=e[n]);if(this.div.style.webkitTransform="translateZ(0)",typeof this.div.style.opacity<"u"&&this.div.style.opacity!==""){var r=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+r*100+')"',this.div.style.filter="alpha(opacity="+r*100+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",this.zIndex!==null&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},t.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var n=this.div.ownerDocument,r=n&&n.defaultView?n.defaultView.getComputedStyle(this.div,""):null;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var a=this.div.currentStyle;a&&(e.top=parseInt(a.borderTopWidth||"",10)||0,e.bottom=parseInt(a.borderBottomWidth||"",10)||0,e.left=parseInt(a.borderLeftWidth||"",10)||0,e.right=parseInt(a.borderRightWidth||"",10)||0)}return e},t.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},t.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection(),n=e.fromLatLngToDivPixel(this.position);n!==null&&(this.div.style.left=n.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(n.y+this.pixelOffset.height)+"px":this.div.style.top=n.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},t.prototype.setOptions=function(e){e===void 0&&(e={}),typeof e.boxClass<"u"&&(this.boxClass=e.boxClass,this.setBoxStyle()),typeof e.boxStyle<"u"&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),typeof e.content<"u"&&this.setContent(e.content),typeof e.disableAutoPan<"u"&&(this.disableAutoPan=e.disableAutoPan),typeof e.maxWidth<"u"&&(this.maxWidth=e.maxWidth),typeof e.pixelOffset<"u"&&(this.pixelOffset=e.pixelOffset),typeof e.alignBottom<"u"&&(this.alignBottom=e.alignBottom),typeof e.position<"u"&&this.setPosition(e.position),typeof e.zIndex<"u"&&this.setZIndex(e.zIndex),typeof e.closeBoxMargin<"u"&&(this.closeBoxMargin=e.closeBoxMargin),typeof e.closeBoxURL<"u"&&(this.closeBoxURL=e.closeBoxURL),typeof e.infoBoxClearance<"u"&&(this.infoBoxClearance=e.infoBoxClearance),typeof e.isHidden<"u"&&(this.isHidden=e.isHidden),typeof e.visible<"u"&&(this.isHidden=!e.visible),typeof e.enableEventPropagation<"u"&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},t.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px",typeof e=="string"?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},t.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},t.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},t.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},t.prototype.getContent=function(){return this.content},t.prototype.getPosition=function(){return this.position},t.prototype.getZIndex=function(){return this.zIndex},t.prototype.getVisible=function(){var e=this.getMap();return typeof e>"u"||e===null?!1:!this.isHidden},t.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},t.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},t.prototype.open=function(e,n){var r=this;n&&(this.position=n.getPosition(),this.moveListener=google.maps.event.addListener(n,"position_changed",function(){var a=n.getPosition();r.setPosition(a)}),this.mapListener=google.maps.event.addListener(n,"map_changed",function(){r.setMap(n.map)})),this.setMap(e),this.div&&this.panBox()},t.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,n=this.eventListeners;e<n.length;e++){var r=n[e];google.maps.event.removeListener(r)}this.eventListeners=null}this.moveListener&&(google.maps.event.removeListener(this.moveListener),this.moveListener=null),this.mapListener&&(google.maps.event.removeListener(this.mapListener),this.mapListener=null),this.contextListener&&(google.maps.event.removeListener(this.contextListener),this.contextListener=null),this.setMap(null)},t.prototype.extend=function(e,n){return(function(a){for(var i in a.prototype)Object.prototype.hasOwnProperty.call(this,i)||(this.prototype[i]=a.prototype[i]);return this}).apply(e,[n])},t}(),uo={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},lo={options:function(t,e){t.setOptions(e)},position:function(t,e){e instanceof google.maps.LatLng?t.setPosition(e):t.setPosition(new google.maps.LatLng(e.lat,e.lng))},visible:function(t,e){t.setVisible(e)},zIndex:function(t,e){t.setZIndex(e)}},Bf={};function xf(t){var e=t.children,n=t.anchor,r=t.options,a=t.position,i=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,v=l.useContext(Le),C=l.useState(null),g=C[0],d=C[1],D=l.useState(null),B=D[0],E=D[1],O=l.useState(null),b=O[0],w=O[1],S=l.useState(null),P=S[0],V=S[1],F=l.useState(null),j=F[0],k=F[1],I=l.useState(null),N=I[0],z=I[1],X=l.useRef(null);return l.useEffect(function(){v&&g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),l.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),l.useEffect(function(){if(a&&g!==null){var _=a instanceof google.maps.LatLng?a:new google.maps.LatLng(a.lat,a.lng);g.setPosition(_)}},[a]),l.useEffect(function(){typeof i=="number"&&g!==null&&g.setZIndex(i)},[i]),l.useEffect(function(){g&&o&&(B!==null&&google.maps.event.removeListener(B),E(google.maps.event.addListener(g,"closeclick",o)))},[o]),l.useEffect(function(){g&&s&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(g,"domready",s)))},[s]),l.useEffect(function(){g&&u&&(P!==null&&google.maps.event.removeListener(P),V(google.maps.event.addListener(g,"content_changed",u)))},[u]),l.useEffect(function(){g&&c&&(j!==null&&google.maps.event.removeListener(j),k(google.maps.event.addListener(g,"position_changed",c)))},[c]),l.useEffect(function(){g&&f&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),l.useEffect(function(){if(v){var _=r||Bf,$=_.position,re=ca(_,["position"]),T=void 0;$&&!($ instanceof google.maps.LatLng)&&(T=new google.maps.LatLng($.lat,$.lng));var R=new so(me(me({},re),T?{position:T}:{}));X.current=document.createElement("div"),d(R),o&&E(google.maps.event.addListener(R,"closeclick",o)),s&&w(google.maps.event.addListener(R,"domready",s)),u&&V(google.maps.event.addListener(R,"content_changed",u)),c&&k(google.maps.event.addListener(R,"position_changed",c)),f&&z(google.maps.event.addListener(R,"zindex_changed",f)),R.setContent(X.current),n?R.open(v,n):R.getPosition()?R.open(v):tt(!1,"You must provide either an anchor or a position prop for <InfoBox>."),h&&h(R)}return function(){g!==null&&(B&&google.maps.event.removeListener(B),P&&google.maps.event.removeListener(P),b&&google.maps.event.removeListener(b),j&&google.maps.event.removeListener(j),N&&google.maps.event.removeListener(N),p&&p(g),g.close())}},[]),X.current?Wt.createPortal(l.Children.only(e),X.current):null}l.memo(xf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoBox:null},n.open=function(r,a){a?n.context!==null&&r.open(n.context,a):r.getPosition()?n.context!==null&&r.open(n.context):tt(!1,"You must provide either an anchor or a position prop for <InfoBox>.")},n.setInfoBoxCallback=function(){n.state.infoBox!==null&&n.containerElement!==null&&(n.state.infoBox.setContent(n.containerElement),n.open(n.state.infoBox,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoBox))},n}return e.prototype.componentDidMount=function(){var n=this.props.options||{},r=n.position,a=ca(n,["position"]),i;r&&!(r instanceof google.maps.LatLng)&&(i=new google.maps.LatLng(r.lat,r.lng));var o=new so(me(me({},a),i?{position:i}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=Fe({updaterMap:lo,eventMap:uo,prevProps:{},nextProps:this.props,instance:o}),this.setState({infoBox:o},this.setInfoBoxCallback)},e.prototype.componentDidUpdate=function(n){var r=this.state.infoBox;r!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:lo,eventMap:uo,prevProps:n,nextProps:this.props,instance:r}))},e.prototype.componentWillUnmount=function(){var n=this.props.onUnmount,r=this.state.infoBox;r!==null&&(n&&n(r),Pe(this.registeredEvents),r.close())},e.prototype.render=function(){return this.containerElement?Wt.createPortal(l.Children.only(this.props.children),this.containerElement):null},e.contextType=Le,e}(l.PureComponent);var Lf=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!t(e[a],n[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;a--!==0;){var o=i[a];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n},co=Hi(Lf);const fo=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],da=1,In=8;class pa{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const a=r>>4;if(a!==da)throw new Error(`Got v${a} data when expected v${da}.`);const i=fo[r&15];if(!i)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[s]=new Uint32Array(e,4,1);return new pa(s,o,i,e)}constructor(e,n=64,r=Float64Array,a){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const i=fo.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,s=e*this.IndexArrayType.BYTES_PER_ELEMENT,u=(8-s%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${r}.`);a&&a instanceof ArrayBuffer?(this.data=a,this.ids=new this.IndexArrayType(this.data,In,e),this.coords=new this.ArrayType(this.data,In+s+u,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(In+o+s+u),this.ids=new this.IndexArrayType(this.data,In,e),this.coords=new this.ArrayType(this.data,In+s+u,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(da<<4)+i]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return ha(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,a){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,u=[0,i.length-1,0],c=[];for(;u.length;){const f=u.pop()||0,h=u.pop()||0,p=u.pop()||0;if(h-p<=s){for(let d=p;d<=h;d++){const D=o[2*d],B=o[2*d+1];D>=e&&D<=r&&B>=n&&B<=a&&c.push(i[d])}continue}const v=p+h>>1,C=o[2*v],g=o[2*v+1];C>=e&&C<=r&&g>=n&&g<=a&&c.push(i[v]),(f===0?e<=C:n<=g)&&(u.push(p),u.push(v-1),u.push(1-f)),(f===0?r>=C:a>=g)&&(u.push(v+1),u.push(h),u.push(1-f))}return c}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:a,coords:i,nodeSize:o}=this,s=[0,a.length-1,0],u=[],c=r*r;for(;s.length;){const f=s.pop()||0,h=s.pop()||0,p=s.pop()||0;if(h-p<=o){for(let d=p;d<=h;d++)ho(i[2*d],i[2*d+1],e,n)<=c&&u.push(a[d]);continue}const v=p+h>>1,C=i[2*v],g=i[2*v+1];ho(C,g,e,n)<=c&&u.push(a[v]),(f===0?e-r<=C:n-r<=g)&&(s.push(p),s.push(v-1),s.push(1-f)),(f===0?e+r>=C:n+r>=g)&&(s.push(v+1),s.push(h),s.push(1-f))}return u}}function ha(t,e,n,r,a,i){if(a-r<=n)return;const o=r+a>>1;po(t,e,o,r,a,i),ha(t,e,n,r,o-1,1-i),ha(t,e,n,o+1,a,1-i)}function po(t,e,n,r,a,i){for(;a>r;){if(a-r>600){const c=a-r+1,f=n-r+1,h=Math.log(c),p=.5*Math.exp(2*h/3),v=.5*Math.sqrt(h*p*(c-p)/c)*(f-c/2<0?-1:1),C=Math.max(r,Math.floor(n-f*p/c+v)),g=Math.min(a,Math.floor(n+(c-f)*p/c+v));po(t,e,n,C,g,i)}const o=e[2*n+i];let s=r,u=a;for(Nn(t,e,r,n),e[2*a+i]>o&&Nn(t,e,r,a);s<u;){for(Nn(t,e,s,u),s++,u--;e[2*s+i]<o;)s++;for(;e[2*u+i]>o;)u--}e[2*r+i]===o?Nn(t,e,r,u):(u++,Nn(t,e,u,a)),u<=n&&(r=u+1),n<=u&&(a=u-1)}}function Nn(t,e,n,r){va(t,n,r),va(e,2*n,2*r),va(e,2*n+1,2*r+1)}function va(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ho(t,e,n,r){const a=t-n,i=e-r;return a*a+i*i}const Sf={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},vo=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),an=2,Ht=3,ga=4,Vt=5,go=6;class Af{constructor(e){this.options=Object.assign(Object.create(Sf),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:n,minZoom:r,maxZoom:a}=this.options;n&&console.time("total time");const i=`prepare ${e.length} points`;n&&console.time(i),this.points=e;const o=[];for(let u=0;u<e.length;u++){const c=e[u];if(!c.geometry)continue;const[f,h]=c.geometry.coordinates,p=vo(pr(f)),v=vo(hr(h));o.push(p,v,1/0,u,-1,1),this.options.reduce&&o.push(0)}let s=this.trees[a+1]=this._createTree(o);n&&console.timeEnd(i);for(let u=a;u>=r;u--){const c=+Date.now();s=this.trees[u]=this._createTree(this._cluster(s,u)),n&&console.log("z%d: %d clusters in %dms",u,s.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let r=((e[0]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,e[1]));let i=e[2]===180?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){const h=this.getClusters([r,a,180,o],n),p=this.getClusters([-180,a,i,o],n);return h.concat(p)}const s=this.trees[this._limitZoom(n)],u=s.range(pr(r),hr(o),pr(i),hr(a)),c=s.data,f=[];for(const h of u){const p=this.stride*h;f.push(c[p+Vt]>1?mo(c,p,this.clusterProps):this.points[c[p+Ht]])}return f}getChildren(e){const n=this._getOriginId(e),r=this._getOriginZoom(e),a="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(a);const o=i.data;if(n*this.stride>=o.length)throw new Error(a);const s=this.options.radius/(this.options.extent*Math.pow(2,r-1)),u=o[n*this.stride],c=o[n*this.stride+1],f=i.within(u,c,s),h=[];for(const p of f){const v=p*this.stride;o[v+ga]===e&&h.push(o[v+Vt]>1?mo(o,v,this.clusterProps):this.points[o[v+Ht]])}if(h.length===0)throw new Error(a);return h}getLeaves(e,n,r){n=n||10,r=r||0;const a=[];return this._appendLeaves(a,e,n,r,0),a}getTile(e,n,r){const a=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:o,radius:s}=this.options,u=s/o,c=(r-u)/i,f=(r+1+u)/i,h={features:[]};return this._addTileFeatures(a.range((n-u)/i,c,(n+1+u)/i,f),a.data,n,r,i,h),n===0&&this._addTileFeatures(a.range(1-u/i,c,1,f),a.data,i,r,i,h),n===i-1&&this._addTileFeatures(a.range(0,c,u/i,f),a.data,-1,r,i,h),h.features.length?h:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(e);if(n++,r.length!==1)break;e=r[0].properties.cluster_id}return n}_appendLeaves(e,n,r,a,i){const o=this.getChildren(n);for(const s of o){const u=s.properties;if(u&&u.cluster?i+u.point_count<=a?i+=u.point_count:i=this._appendLeaves(e,u.cluster_id,r,a,i):i<a?i++:e.push(s),e.length===r)break}return i}_createTree(e){const n=new pa(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)n.add(e[r],e[r+1]);return n.finish(),n.data=e,n}_addTileFeatures(e,n,r,a,i,o){for(const s of e){const u=s*this.stride,c=n[u+Vt]>1;let f,h,p;if(c)f=yo(n,u,this.clusterProps),h=n[u],p=n[u+1];else{const g=this.points[n[u+Ht]];f=g.properties;const[d,D]=g.geometry.coordinates;h=pr(d),p=hr(D)}const v={type:1,geometry:[[Math.round(this.options.extent*(h*i-r)),Math.round(this.options.extent*(p*i-a))]],tags:f};let C;c||this.options.generateId?C=n[u+Ht]:C=this.points[n[u+Ht]].id,C!==void 0&&(v.id=C),o.features.push(v)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const{radius:r,extent:a,reduce:i,minPoints:o}=this.options,s=r/(a*Math.pow(2,n)),u=e.data,c=[],f=this.stride;for(let h=0;h<u.length;h+=f){if(u[h+an]<=n)continue;u[h+an]=n;const p=u[h],v=u[h+1],C=e.within(u[h],u[h+1],s),g=u[h+Vt];let d=g;for(const D of C){const B=D*f;u[B+an]>n&&(d+=u[B+Vt])}if(d>g&&d>=o){let D=p*g,B=v*g,E,O=-1;const b=((h/f|0)<<5)+(n+1)+this.points.length;for(const w of C){const S=w*f;if(u[S+an]<=n)continue;u[S+an]=n;const P=u[S+Vt];D+=u[S]*P,B+=u[S+1]*P,u[S+ga]=b,i&&(E||(E=this._map(u,h,!0),O=this.clusterProps.length,this.clusterProps.push(E)),i(E,this._map(u,S)))}u[h+ga]=b,c.push(D/d,B/d,1/0,b,-1,d),i&&c.push(O)}else{for(let D=0;D<f;D++)c.push(u[h+D]);if(d>1)for(const D of C){const B=D*f;if(!(u[B+an]<=n)){u[B+an]=n;for(let E=0;E<f;E++)c.push(u[B+E])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n,r){if(e[n+Vt]>1){const o=this.clusterProps[e[n+go]];return r?Object.assign({},o):o}const a=this.points[e[n+Ht]].properties,i=this.options.map(a);return r&&i===a?Object.assign({},i):i}}function mo(t,e,n){return{type:"Feature",id:t[e+Ht],properties:yo(t,e,n),geometry:{type:"Point",coordinates:[Of(t[e]),Ff(t[e+1])]}}}function yo(t,e,n){const r=t[e+Vt],a=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,i=t[e+go],o=i===-1?{}:Object.assign({},n[i]);return Object.assign(o,{cluster:!0,cluster_id:t[e+Ht],point_count:r,point_count_abbreviated:a})}function pr(t){return t/360+.5}function hr(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function Of(t){return(t-.5)*360}function Ff(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}/*! *****************************************************************************
54
54
  Copyright (c) Microsoft Corporation.
55
55
 
56
56
  Permission to use, copy, modify, and/or distribute this software for any
@@ -63,49 +63,49 @@ React keys must be passed directly to JSX without using spread:
63
63
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
64
64
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65
65
  PERFORMANCE OF THIS SOFTWARE.
66
- ***************************************************************************** */function Pf(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}class yt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class mi{constructor({markers:e,position:n}){this.markers=e,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(yt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>yt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(yt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Mf{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return kf(e)}}const kf=t=>t.map(n=>new mi({position:yt.getPosition(n),markers:[n]}));class Tf extends Mf{constructor(e){var{maxZoom:n,radius:r=60}=e,i=Pf(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new Af(Object.assign({maxZoom:this.maxZoom,radius:r},i))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!co(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const i=this.markers.map(a=>{const o=yt.getPosition(a);return{type:"Feature",geometry:{type:"Point",coordinates:[o.lng(),o.lat()]},properties:{marker:a}}});this.superCluster.load(i)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!co(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new mi({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(a=>a.properties.marker),position:{lat:n,lng:e}});const i=r.marker;return new mi({markers:[i],position:yt.getPosition(i)})}}class Rf{constructor(e,n){this.markers={sum:e.length};const r=n.map(a=>a.count),i=r.reduce((a,o)=>a+o,0);this.clusters={count:n.length,markers:{mean:i/n.length,sum:i,min:Math.min(...r),max:Math.max(...r)}}}}class jf{render({count:e,position:n},r,i){const o=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
66
+ ***************************************************************************** */function Pf(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]]);return n}class yt{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,n){this.isAdvancedMarker(e)?e.map=n:e.setMap(n)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(e.position.lat&&e.position.lng)return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class ma{constructor({markers:e,position:n}){this.markers=e,n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)e.extend(yt.getPosition(n));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>yt.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(yt.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Mf{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return kf(e)}}const kf=t=>t.map(n=>new ma({position:yt.getPosition(n),markers:[n]}));class Tf extends Mf{constructor(e){var{maxZoom:n,radius:r=60}=e,a=Pf(e,["maxZoom","radius"]);super({maxZoom:n}),this.state={zoom:-1},this.superCluster=new Af(Object.assign({maxZoom:this.maxZoom,radius:r},a))}calculate(e){let n=!1;const r={zoom:e.map.getZoom()};if(!co(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const a=this.markers.map(i=>{const o=yt.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[o.lng(),o.lat()]},properties:{marker:i}}});this.superCluster.load(a)}return n||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(n=!co(this.state,r)),this.state=r,n&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:n}}cluster({map:e}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,n]},properties:r}){if(r.cluster)return new ma({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(i=>i.properties.marker),position:{lat:n,lng:e}});const a=r.marker;return new ma({markers:[a],position:yt.getPosition(a)})}}class Rf{constructor(e,n){this.markers={sum:e.length};const r=n.map(i=>i.count),a=r.reduce((i,o)=>i+o,0);this.clusters={count:n.length,markers:{mean:a/n.length,sum:a,min:Math.min(...r),max:Math.max(...r)}}}}class jf{render({count:e,position:n},r,a){const o=`<svg fill="${e>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
67
67
  <circle cx="120" cy="120" opacity=".6" r="70" />
68
68
  <circle cx="120" cy="120" opacity=".3" r="90" />
69
69
  <circle cx="120" cy="120" opacity=".2" r="110" />
70
70
  <text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text>
71
- </svg>`,s=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(yt.isAdvancedMarkerAvailable(i)){const h=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;h.setAttribute("transform","translate(0 25)");const p={map:i,position:n,zIndex:u,title:s,content:h};return new google.maps.marker.AdvancedMarkerElement(p)}const c={position:n,zIndex:u,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function If(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class yi{constructor(){If(yi,google.maps.OverlayView)}}var zn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(zn||(zn={}));const Nf=(t,e,n)=>{n.fitBounds(e.bounds)};class zf extends yi{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:i=new Tf(r),renderer:a=new jf,onClusterClick:o=Nf}){super(),this.markers=[...n],this.clusters=[],this.algorithm=i,this.renderer=a,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(yt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(i=>{r=this.removeMarker(i,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,zn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const i=new Set;for(const o of n)o.markers.length==1&&i.add(o.markers[0]);const a=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?i.has(o.marker)||yt.setMap(o.marker,null):a.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>a.forEach(o=>yt.setMap(o,null)))}google.maps.event.trigger(this,zn.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>yt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Rf(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(i=>yt.setMap(i,null)),this.onClusterClick&&r.marker.addListener("click",i=>{google.maps.event.trigger(this,zn.CLUSTER_CLICK,r),this.onClusterClick(i,r,n)})),yt.setMap(r.marker,n)})}}function _f(t){var e=Yc(),n=l.useState(null),r=n[0],i=n[1];return l.useEffect(function(){if(e&&r===null){var a=new zf(me(me({},t),{map:e}));i(a)}},[e]),r}function Wf(t){var e=t.children,n=t.options,r=_f(n);return r!==null?e(r):null}l.memo(Wf);var Co={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Do={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Uf(t){var e=t.children,n=t.anchor,r=t.options,i=t.position,a=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,g=l.useContext(Le),C=l.useState(null),v=C[0],d=C[1],D=l.useState(null),B=D[0],w=D[1],O=l.useState(null),b=O[0],E=O[1],S=l.useState(null),F=S[0],V=S[1],P=l.useState(null),z=P[0],R=P[1],I=l.useState(null),j=I[0],N=I[1],X=l.useRef(null);return l.useEffect(function(){v!==null&&(v.close(),n?v.open(g,n):v.getPosition()&&v.open(g))},[g,v,n]),l.useEffect(function(){r&&v!==null&&v.setOptions(r)},[v,r]),l.useEffect(function(){i&&v!==null&&v.setPosition(i)},[i]),l.useEffect(function(){typeof a=="number"&&v!==null&&v.setZIndex(a)},[a]),l.useEffect(function(){v&&o&&(B!==null&&google.maps.event.removeListener(B),w(google.maps.event.addListener(v,"closeclick",o)))},[o]),l.useEffect(function(){v&&s&&(b!==null&&google.maps.event.removeListener(b),E(google.maps.event.addListener(v,"domready",s)))},[s]),l.useEffect(function(){v&&u&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(v,"content_changed",u)))},[u]),l.useEffect(function(){v&&c&&(z!==null&&google.maps.event.removeListener(z),R(google.maps.event.addListener(v,"position_changed",c)))},[c]),l.useEffect(function(){v&&f&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(v,"zindex_changed",f)))},[f]),l.useEffect(function(){var _=new google.maps.InfoWindow(me({},r||{}));return d(_),X.current=document.createElement("div"),o&&w(google.maps.event.addListener(_,"closeclick",o)),s&&E(google.maps.event.addListener(_,"domready",s)),u&&V(google.maps.event.addListener(_,"content_changed",u)),c&&R(google.maps.event.addListener(_,"position_changed",c)),f&&N(google.maps.event.addListener(_,"zindex_changed",f)),_.setContent(X.current),i&&_.setPosition(i),a&&_.setZIndex(a),n?_.open(g,n):_.getPosition()?_.open(g):tt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),h&&h(_),function(){B&&google.maps.event.removeListener(B),F&&google.maps.event.removeListener(F),b&&google.maps.event.removeListener(b),z&&google.maps.event.removeListener(z),j&&google.maps.event.removeListener(j),p&&p(_),_.close()}},[]),X.current?Wt.createPortal(l.Children.only(e),X.current):null}l.memo(Uf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,i){i?r.open(n.context,i):r.getPosition()?r.open(n.context):tt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(me({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Fe({updaterMap:Do,eventMap:Co,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Do,eventMap:Co,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Wt.createPortal(l.Children.only(this.props.children),this.containerElement):null},e.contextType=Le,e}(l.PureComponent);var bo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Eo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Hf={};function Vf(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,a=t.path,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,g=t.onMouseUp,C=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onLoad,B=t.onUnmount,w=l.useContext(Le),O=l.useState(null),b=O[0],E=O[1],S=l.useState(null),F=S[0],V=S[1],P=l.useState(null),z=P[0],R=P[1],I=l.useState(null),j=I[0],N=I[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),k=re[0],T=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ae=l.useState(null),de=ae[0],pe=ae[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1];return l.useEffect(function(){b!==null&&b.setMap(w)},[w]),l.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),l.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),l.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),l.useEffect(function(){typeof i<"u"&&b!==null&&b.setVisible(i)},[b,i]),l.useEffect(function(){typeof a<"u"&&b!==null&&b.setPath(a)},[b,a]),l.useEffect(function(){b&&o&&(F!==null&&google.maps.event.removeListener(F),V(google.maps.event.addListener(b,"dblclick",o)))},[o]),l.useEffect(function(){b&&s&&(z!==null&&google.maps.event.removeListener(z),R(google.maps.event.addListener(b,"dragend",s)))},[s]),l.useEffect(function(){b&&u&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(b,"dragstart",u)))},[u]),l.useEffect(function(){b&&c&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(b,"mousedown",c)))},[c]),l.useEffect(function(){b&&f&&(k!==null&&google.maps.event.removeListener(k),T(google.maps.event.addListener(b,"mousemove",f)))},[f]),l.useEffect(function(){b&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(b,"mouseout",h)))},[h]),l.useEffect(function(){b&&p&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(b,"mouseover",p)))},[p]),l.useEffect(function(){b&&g&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(b,"mouseup",g)))},[g]),l.useEffect(function(){b&&C&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(b,"rightclick",C)))},[C]),l.useEffect(function(){b&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(b,"click",v)))},[v]),l.useEffect(function(){b&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(b,"drag",d)))},[d]),l.useEffect(function(){var ve=new google.maps.Polyline(me(me({},e||Hf),{map:w}));return a&&ve.setPath(a),typeof i<"u"&&ve.setVisible(i),typeof r<"u"&&ve.setEditable(r),typeof n<"u"&&ve.setDraggable(n),o&&V(google.maps.event.addListener(ve,"dblclick",o)),s&&R(google.maps.event.addListener(ve,"dragend",s)),u&&N(google.maps.event.addListener(ve,"dragstart",u)),c&&$(google.maps.event.addListener(ve,"mousedown",c)),f&&T(google.maps.event.addListener(ve,"mousemove",f)),h&&Q(google.maps.event.addListener(ve,"mouseout",h)),p&&U(google.maps.event.addListener(ve,"mouseover",p)),g&&J(google.maps.event.addListener(ve,"mouseup",g)),C&&ue(google.maps.event.addListener(ve,"rightclick",C)),v&&pe(google.maps.event.addListener(ve,"click",v)),d&&ge(google.maps.event.addListener(ve,"drag",d)),E(ve),D&&D(ve),function(){F!==null&&google.maps.event.removeListener(F),z!==null&&google.maps.event.removeListener(z),j!==null&&google.maps.event.removeListener(j),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),B&&B(ve),ve.setMap(null)}},[]),null}l.memo(Vf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Eo,eventMap:bo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Eo,eventMap:bo,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var wo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Bo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function qf(t){var e=t.options,n=t.draggable,r=t.editable,i=t.visible,a=t.path,o=t.paths,s=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,g=t.onMouseOver,C=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onLoad,w=t.onUnmount,O=t.onEdit,b=l.useContext(Le),E=l.useState(null),S=E[0],F=E[1],V=l.useState(null),P=V[0],z=V[1],R=l.useState(null),I=R[0],j=R[1],N=l.useState(null),X=N[0],_=N[1],$=l.useState(null),re=$[0],k=$[1],T=l.useState(null),Z=T[0],H=T[1],Q=l.useState(null),K=Q[0],y=Q[1],U=l.useState(null),W=U[0],M=U[1],J=l.useState(null),ne=J[0],G=J[1],ue=l.useState(null),ae=ue[0],de=ue[1],pe=l.useState(null),Ce=pe[0],ye=pe[1],ge=l.useState(null),ve=ge[0],Ie=ge[1];return l.useEffect(function(){S!==null&&S.setMap(b)},[b]),l.useEffect(function(){typeof e<"u"&&S!==null&&S.setOptions(e)},[S,e]),l.useEffect(function(){typeof n<"u"&&S!==null&&S.setDraggable(n)},[S,n]),l.useEffect(function(){typeof r<"u"&&S!==null&&S.setEditable(r)},[S,r]),l.useEffect(function(){typeof i<"u"&&S!==null&&S.setVisible(i)},[S,i]),l.useEffect(function(){typeof a<"u"&&S!==null&&S.setPath(a)},[S,a]),l.useEffect(function(){typeof o<"u"&&S!==null&&S.setPaths(o)},[S,o]),l.useEffect(function(){S&&s&&(P!==null&&google.maps.event.removeListener(P),z(google.maps.event.addListener(S,"dblclick",s)))},[s]),l.useEffect(function(){S&&(google.maps.event.addListener(S.getPath(),"insert_at",function(){O==null||O(S)}),google.maps.event.addListener(S.getPath(),"set_at",function(){O==null||O(S)}))},[S,O]),l.useEffect(function(){S&&u&&(I!==null&&google.maps.event.removeListener(I),j(google.maps.event.addListener(S,"dragend",u)))},[u]),l.useEffect(function(){S&&c&&(X!==null&&google.maps.event.removeListener(X),_(google.maps.event.addListener(S,"dragstart",c)))},[c]),l.useEffect(function(){S&&f&&(re!==null&&google.maps.event.removeListener(re),k(google.maps.event.addListener(S,"mousedown",f)))},[f]),l.useEffect(function(){S&&h&&(Z!==null&&google.maps.event.removeListener(Z),H(google.maps.event.addListener(S,"mousemove",h)))},[h]),l.useEffect(function(){S&&p&&(K!==null&&google.maps.event.removeListener(K),y(google.maps.event.addListener(S,"mouseout",p)))},[p]),l.useEffect(function(){S&&g&&(W!==null&&google.maps.event.removeListener(W),M(google.maps.event.addListener(S,"mouseover",g)))},[g]),l.useEffect(function(){S&&C&&(ne!==null&&google.maps.event.removeListener(ne),G(google.maps.event.addListener(S,"mouseup",C)))},[C]),l.useEffect(function(){S&&v&&(ae!==null&&google.maps.event.removeListener(ae),de(google.maps.event.addListener(S,"rightclick",v)))},[v]),l.useEffect(function(){S&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(S,"click",d)))},[d]),l.useEffect(function(){S&&D&&(ve!==null&&google.maps.event.removeListener(ve),Ie(google.maps.event.addListener(S,"drag",D)))},[D]),l.useEffect(function(){var se=new google.maps.Polygon(me(me({},e||{}),{map:b}));return a&&se.setPath(a),o&&se.setPaths(o),typeof i<"u"&&se.setVisible(i),typeof r<"u"&&se.setEditable(r),typeof n<"u"&&se.setDraggable(n),s&&z(google.maps.event.addListener(se,"dblclick",s)),u&&j(google.maps.event.addListener(se,"dragend",u)),c&&_(google.maps.event.addListener(se,"dragstart",c)),f&&k(google.maps.event.addListener(se,"mousedown",f)),h&&H(google.maps.event.addListener(se,"mousemove",h)),p&&y(google.maps.event.addListener(se,"mouseout",p)),g&&M(google.maps.event.addListener(se,"mouseover",g)),C&&G(google.maps.event.addListener(se,"mouseup",C)),v&&de(google.maps.event.addListener(se,"rightclick",v)),d&&ye(google.maps.event.addListener(se,"click",d)),D&&Ie(google.maps.event.addListener(se,"drag",D)),F(se),B&&B(se),function(){P!==null&&google.maps.event.removeListener(P),I!==null&&google.maps.event.removeListener(I),X!==null&&google.maps.event.removeListener(X),re!==null&&google.maps.event.removeListener(re),Z!==null&&google.maps.event.removeListener(Z),K!==null&&google.maps.event.removeListener(K),W!==null&&google.maps.event.removeListener(W),ne!==null&&google.maps.event.removeListener(ne),ae!==null&&google.maps.event.removeListener(ae),Ce!==null&&google.maps.event.removeListener(Ce),w&&w(se),se.setMap(null)}},[]),null}l.memo(qf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Bo,eventMap:wo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Bo,eventMap:wo,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var xo={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Lo={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Zf(t){var e=t.options,n=t.bounds,r=t.draggable,i=t.editable,a=t.visible,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,g=t.onMouseUp,C=t.onRightClick,v=t.onClick,d=t.onDrag,D=t.onBoundsChanged,B=t.onLoad,w=t.onUnmount,O=l.useContext(Le),b=l.useState(null),E=b[0],S=b[1],F=l.useState(null),V=F[0],P=F[1],z=l.useState(null),R=z[0],I=z[1],j=l.useState(null),N=j[0],X=j[1],_=l.useState(null),$=_[0],re=_[1],k=l.useState(null),T=k[0],Z=k[1],H=l.useState(null),Q=H[0],K=H[1],y=l.useState(null),U=y[0],W=y[1],M=l.useState(null),J=M[0],ne=M[1],G=l.useState(null),ue=G[0],ae=G[1],de=l.useState(null),pe=de[0],Ce=de[1],ye=l.useState(null),ge=ye[0],ve=ye[1],Ie=l.useState(null),se=Ie[0],Ne=Ie[1];return l.useEffect(function(){E!==null&&E.setMap(O)},[O]),l.useEffect(function(){typeof e<"u"&&E!==null&&E.setOptions(e)},[E,e]),l.useEffect(function(){typeof r<"u"&&E!==null&&E.setDraggable(r)},[E,r]),l.useEffect(function(){typeof i<"u"&&E!==null&&E.setEditable(i)},[E,i]),l.useEffect(function(){typeof a<"u"&&E!==null&&E.setVisible(a)},[E,a]),l.useEffect(function(){typeof n<"u"&&E!==null&&E.setBounds(n)},[E,n]),l.useEffect(function(){E&&o&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(E,"dblclick",o)))},[o]),l.useEffect(function(){E&&s&&(R!==null&&google.maps.event.removeListener(R),I(google.maps.event.addListener(E,"dragend",s)))},[s]),l.useEffect(function(){E&&u&&(N!==null&&google.maps.event.removeListener(N),X(google.maps.event.addListener(E,"dragstart",u)))},[u]),l.useEffect(function(){E&&c&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(E,"mousedown",c)))},[c]),l.useEffect(function(){E&&f&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(E,"mousemove",f)))},[f]),l.useEffect(function(){E&&h&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(E,"mouseout",h)))},[h]),l.useEffect(function(){E&&p&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(E,"mouseover",p)))},[p]),l.useEffect(function(){E&&g&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(E,"mouseup",g)))},[g]),l.useEffect(function(){E&&C&&(ue!==null&&google.maps.event.removeListener(ue),ae(google.maps.event.addListener(E,"rightclick",C)))},[C]),l.useEffect(function(){E&&v&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(E,"click",v)))},[v]),l.useEffect(function(){E&&d&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(E,"drag",d)))},[d]),l.useEffect(function(){E&&D&&(se!==null&&google.maps.event.removeListener(se),Ne(google.maps.event.addListener(E,"bounds_changed",D)))},[D]),l.useEffect(function(){var fe=new google.maps.Rectangle(me(me({},e||{}),{map:O}));return typeof a<"u"&&fe.setVisible(a),typeof i<"u"&&fe.setEditable(i),typeof r<"u"&&fe.setDraggable(r),typeof n<"u"&&fe.setBounds(n),o&&P(google.maps.event.addListener(fe,"dblclick",o)),s&&I(google.maps.event.addListener(fe,"dragend",s)),u&&X(google.maps.event.addListener(fe,"dragstart",u)),c&&re(google.maps.event.addListener(fe,"mousedown",c)),f&&Z(google.maps.event.addListener(fe,"mousemove",f)),h&&K(google.maps.event.addListener(fe,"mouseout",h)),p&&W(google.maps.event.addListener(fe,"mouseover",p)),g&&ne(google.maps.event.addListener(fe,"mouseup",g)),C&&ae(google.maps.event.addListener(fe,"rightclick",C)),v&&Ce(google.maps.event.addListener(fe,"click",v)),d&&ve(google.maps.event.addListener(fe,"drag",d)),D&&Ne(google.maps.event.addListener(fe,"bounds_changed",D)),S(fe),B&&B(fe),function(){V!==null&&google.maps.event.removeListener(V),R!==null&&google.maps.event.removeListener(R),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),T!==null&&google.maps.event.removeListener(T),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),w&&w(fe),fe.setMap(null)}},[]),null}l.memo(Zf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Lo,eventMap:xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Lo,eventMap:xo,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var So={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ao={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Gf={};function Yf(t){var e=t.options,n=t.center,r=t.radius,i=t.draggable,a=t.editable,o=t.visible,s=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,g=t.onMouseOver,C=t.onMouseUp,v=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onCenterChanged,w=t.onRadiusChanged,O=t.onLoad,b=t.onUnmount,E=l.useContext(Le),S=l.useState(null),F=S[0],V=S[1],P=l.useState(null),z=P[0],R=P[1],I=l.useState(null),j=I[0],N=I[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),k=re[0],T=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ae=l.useState(null),de=ae[0],pe=ae[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1],ve=l.useState(null),Ie=ve[0],se=ve[1],Ne=l.useState(null),fe=Ne[0],we=Ne[1],Me=l.useState(null),He=Me[0],qe=Me[1];return l.useEffect(function(){F!==null&&F.setMap(E)},[E]),l.useEffect(function(){typeof e<"u"&&F!==null&&F.setOptions(e)},[F,e]),l.useEffect(function(){typeof i<"u"&&F!==null&&F.setDraggable(i)},[F,i]),l.useEffect(function(){typeof a<"u"&&F!==null&&F.setEditable(a)},[F,a]),l.useEffect(function(){typeof o<"u"&&F!==null&&F.setVisible(o)},[F,o]),l.useEffect(function(){typeof r=="number"&&F!==null&&F.setRadius(r)},[F,r]),l.useEffect(function(){typeof n<"u"&&F!==null&&F.setCenter(n)},[F,n]),l.useEffect(function(){F&&s&&(z!==null&&google.maps.event.removeListener(z),R(google.maps.event.addListener(F,"dblclick",s)))},[s]),l.useEffect(function(){F&&u&&(j!==null&&google.maps.event.removeListener(j),N(google.maps.event.addListener(F,"dragend",u)))},[u]),l.useEffect(function(){F&&c&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(F,"dragstart",c)))},[c]),l.useEffect(function(){F&&f&&(k!==null&&google.maps.event.removeListener(k),T(google.maps.event.addListener(F,"mousedown",f)))},[f]),l.useEffect(function(){F&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(F,"mousemove",h)))},[h]),l.useEffect(function(){F&&p&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(F,"mouseout",p)))},[p]),l.useEffect(function(){F&&g&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(F,"mouseover",g)))},[g]),l.useEffect(function(){F&&C&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(F,"mouseup",C)))},[C]),l.useEffect(function(){F&&v&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(F,"rightclick",v)))},[v]),l.useEffect(function(){F&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(F,"click",d)))},[d]),l.useEffect(function(){F&&D&&(Ie!==null&&google.maps.event.removeListener(Ie),se(google.maps.event.addListener(F,"drag",D)))},[D]),l.useEffect(function(){F&&B&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(F,"center_changed",B)))},[d]),l.useEffect(function(){F&&w&&(He!==null&&google.maps.event.removeListener(He),qe(google.maps.event.addListener(F,"radius_changed",w)))},[w]),l.useEffect(function(){var Ee=new google.maps.Circle(me(me({},e||Gf),{map:E}));return typeof r=="number"&&Ee.setRadius(r),typeof n<"u"&&Ee.setCenter(n),typeof r=="number"&&Ee.setRadius(r),typeof o<"u"&&Ee.setVisible(o),typeof a<"u"&&Ee.setEditable(a),typeof i<"u"&&Ee.setDraggable(i),s&&R(google.maps.event.addListener(Ee,"dblclick",s)),u&&N(google.maps.event.addListener(Ee,"dragend",u)),c&&$(google.maps.event.addListener(Ee,"dragstart",c)),f&&T(google.maps.event.addListener(Ee,"mousedown",f)),h&&Q(google.maps.event.addListener(Ee,"mousemove",h)),p&&U(google.maps.event.addListener(Ee,"mouseout",p)),g&&J(google.maps.event.addListener(Ee,"mouseover",g)),C&&ue(google.maps.event.addListener(Ee,"mouseup",C)),v&&pe(google.maps.event.addListener(Ee,"rightclick",v)),d&&ge(google.maps.event.addListener(Ee,"click",d)),D&&se(google.maps.event.addListener(Ee,"drag",D)),B&&we(google.maps.event.addListener(Ee,"center_changed",B)),w&&qe(google.maps.event.addListener(Ee,"radius_changed",w)),V(Ee),O&&O(Ee),function(){z!==null&&google.maps.event.removeListener(z),j!==null&&google.maps.event.removeListener(j),_!==null&&google.maps.event.removeListener(_),k!==null&&google.maps.event.removeListener(k),H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),fe!==null&&google.maps.event.removeListener(fe),He!==null&&google.maps.event.removeListener(He),b&&b(Ee),Ee.setMap(null)}},[]),null}l.memo(Yf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Ao,eventMap:So,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Ao,eventMap:So,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Oo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Fo={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Kf(t){var e=t.options,n=t.onClick,r=t.onDblClick,i=t.onMouseDown,a=t.onMouseMove,o=t.onMouseOut,s=t.onMouseOver,u=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,h=t.onRemoveFeature,p=t.onRemoveProperty,g=t.onSetGeometry,C=t.onSetProperty,v=t.onLoad,d=t.onUnmount,D=l.useContext(Le),B=l.useState(null),w=B[0],O=B[1],b=l.useState(null),E=b[0],S=b[1],F=l.useState(null),V=F[0],P=F[1],z=l.useState(null),R=z[0],I=z[1],j=l.useState(null),N=j[0],X=j[1],_=l.useState(null),$=_[0],re=_[1],k=l.useState(null),T=k[0],Z=k[1],H=l.useState(null),Q=H[0],K=H[1],y=l.useState(null),U=y[0],W=y[1],M=l.useState(null),J=M[0],ne=M[1],G=l.useState(null),ue=G[0],ae=G[1],de=l.useState(null),pe=de[0],Ce=de[1],ye=l.useState(null),ge=ye[0],ve=ye[1],Ie=l.useState(null),se=Ie[0],Ne=Ie[1];return l.useEffect(function(){w!==null&&w.setMap(D)},[D]),l.useEffect(function(){w&&r&&(E!==null&&google.maps.event.removeListener(E),S(google.maps.event.addListener(w,"dblclick",r)))},[r]),l.useEffect(function(){w&&i&&(V!==null&&google.maps.event.removeListener(V),P(google.maps.event.addListener(w,"mousedown",i)))},[i]),l.useEffect(function(){w&&a&&(R!==null&&google.maps.event.removeListener(R),I(google.maps.event.addListener(w,"mousemove",a)))},[a]),l.useEffect(function(){w&&o&&(N!==null&&google.maps.event.removeListener(N),X(google.maps.event.addListener(w,"mouseout",o)))},[o]),l.useEffect(function(){w&&s&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(w,"mouseover",s)))},[s]),l.useEffect(function(){w&&u&&(T!==null&&google.maps.event.removeListener(T),Z(google.maps.event.addListener(w,"mouseup",u)))},[u]),l.useEffect(function(){w&&c&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(w,"rightclick",c)))},[c]),l.useEffect(function(){w&&n&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(w,"click",n)))},[n]),l.useEffect(function(){w&&f&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(w,"addfeature",f)))},[f]),l.useEffect(function(){w&&h&&(ue!==null&&google.maps.event.removeListener(ue),ae(google.maps.event.addListener(w,"removefeature",h)))},[h]),l.useEffect(function(){w&&p&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(w,"removeproperty",p)))},[p]),l.useEffect(function(){w&&g&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(w,"setgeometry",g)))},[g]),l.useEffect(function(){w&&C&&(se!==null&&google.maps.event.removeListener(se),Ne(google.maps.event.addListener(w,"setproperty",C)))},[C]),l.useEffect(function(){if(D!==null){var fe=new google.maps.Data(me(me({},e||{}),{map:D}));r&&S(google.maps.event.addListener(fe,"dblclick",r)),i&&P(google.maps.event.addListener(fe,"mousedown",i)),a&&I(google.maps.event.addListener(fe,"mousemove",a)),o&&X(google.maps.event.addListener(fe,"mouseout",o)),s&&re(google.maps.event.addListener(fe,"mouseover",s)),u&&Z(google.maps.event.addListener(fe,"mouseup",u)),c&&K(google.maps.event.addListener(fe,"rightclick",c)),n&&W(google.maps.event.addListener(fe,"click",n)),f&&ne(google.maps.event.addListener(fe,"addfeature",f)),h&&ae(google.maps.event.addListener(fe,"removefeature",h)),p&&Ce(google.maps.event.addListener(fe,"removeproperty",p)),g&&ve(google.maps.event.addListener(fe,"setgeometry",g)),C&&Ne(google.maps.event.addListener(fe,"setproperty",C)),O(fe),v&&v(fe)}return function(){w&&(E!==null&&google.maps.event.removeListener(E),V!==null&&google.maps.event.removeListener(V),R!==null&&google.maps.event.removeListener(R),N!==null&&google.maps.event.removeListener(N),$!==null&&google.maps.event.removeListener($),T!==null&&google.maps.event.removeListener(T),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),d&&d(w),w.setMap(null))}},[]),null}l.memo(Kf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Fo,eventMap:Oo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Fo,eventMap:Oo,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Po={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Mo={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(me(me({},this.props.options),{map:this.context}));this.registeredEvents=Fe({updaterMap:Mo,eventMap:Po,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Mo,eventMap:Po,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e})(l.PureComponent);function ko(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Xf(t,e){return new e(t.lat,t.lng)}function Jf(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Qf(t,e,n){return t instanceof e?t:n(t,e)}function $f(t,e,n){return t instanceof e?t:n(t,e)}function ed(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),i=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&i?{left:"".concat(i.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-i.x-e.x,"px"),height:"".concat(i.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function td(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var i=r.x,a=r.y;return{left:"".concat(i+e.x,"px"),top:"".concat(a+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function To(t,e,n,r){return n!==void 0?ed(t,e,$f(n,google.maps.LatLngBounds,Jf)):td(t,e,Qf(r,google.maps.LatLng,Xf))}function nd(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function rd(t,e,n,r,i){var a=function(o){Ve(s,o);function s(u,c,f,h){var p=o.call(this)||this;return p.container=u,p.pane=c,p.position=f,p.bounds=h,p}return s.prototype.onAdd=function(){var u,c=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];c==null||c.appendChild(this.container)},s.prototype.draw=function(){for(var u=this.getProjection(),c=me({},this.container?ko(this.container,i):{x:0,y:0}),f=To(u,c,this.bounds,this.position),h=0,p=Object.entries(f);h<p.length;h++){var g=p[h],C=g[0],v=g[1];this.container.style[C]=v}},s.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},s}(google.maps.OverlayView);return new a(t,e,n,r)}function Ro(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function jo(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function id(t){var e=t.position,n=t.bounds,r=t.mapPaneName,i=t.zIndex,a=t.onLoad,o=t.onUnmount,s=t.getPixelPositionOffset,u=t.children,c=l.useContext(Le),f=l.useMemo(function(){var p=document.createElement("div");return p.style.position="absolute",p},[]),h=l.useMemo(function(){return rd(f,r,e,n,s)},[f,r,e,n]);return l.useEffect(function(){return a==null||a(h),h==null||h.setMap(c),function(){o==null||o(h),h==null||h.setMap(null)}},[c,h]),l.useEffect(function(){f.style.zIndex="".concat(i)},[i,f]),Ia.createPortal(u,f)}l.memo(id),function(t){Ve(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var a=r.props.mapPaneName,o=r.overlayView.getPanes();tt(!!a,"OverlayView requires props.mapPaneName but got %s",a),o?r.setState({paneEl:o[a]}):r.setState({paneEl:null})},r.onAdd=function(){var a,o;r.updatePane(),(o=(a=r.props).onLoad)===null||o===void 0||o.call(a,r.overlayView)},r.onPositionElement=function(){var a=r.overlayView.getProjection(),o=me({x:0,y:0},r.containerRef.current?ko(r.containerRef.current,r.props.getPixelPositionOffset):{}),s=To(a,o,r.props.bounds,r.props.position),u=r.state.containerStyle,c=u.left,f=u.top,h=u.width,p=u.height;nd(s,{left:c,top:f,width:h,height:p})||r.setState({containerStyle:{top:s.top||0,left:s.left||0,width:s.width||0,height:s.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var a,o;r.setState(function(){return{paneEl:null}}),(o=(a=r.props).onUnmount)===null||o===void 0||o.call(a,r.overlayView)},r.containerRef=l.createRef();var i=new google.maps.OverlayView;return i.onAdd=r.onAdd,i.draw=r.draw,i.onRemove=r.onRemove,r.overlayView=i,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=Ro(n.position),i=Ro(this.props.position),a=jo(n.bounds),o=jo(this.props.bounds);(r!==i||a!==o)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Ia.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:l.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=Le,e}(l.PureComponent);function ad(){}var Io={onDblClick:"dblclick",onClick:"click"},No={opacity:function(t,e){t.setOpacity(e)}};function od(t){var e=t.url,n=t.bounds,r=t.options,i=t.visible,a=l.useContext(Le),o=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),s=l.useMemo(function(){var u=new google.maps.GroundOverlay(e,o,me({},r));return u},[]);return l.useEffect(function(){s!==null&&s.setMap(a)},[a]),l.useEffect(function(){typeof e<"u"&&s!==null&&(s.set("url",e),s.setMap(a))},[s,e]),l.useEffect(function(){typeof i<"u"&&s!==null&&s.setOpacity(i?1:0)},[s,i]),l.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&s!==null&&(s.set("bounds",u),s.setMap(a))},[s,n]),null}l.memo(od),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){tt(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,me(me({},this.props.options),{map:this.context}));this.registeredEvents=Fe({updaterMap:No,eventMap:Io,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:No,eventMap:Io,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:ad},e.contextType=Le,e}(l.PureComponent);var zo={},_o={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function sd(t){var e=t.data,n=t.onLoad,r=t.onUnmount,i=t.options,a=l.useContext(Le),o=l.useState(null),s=o[0],u=o[1];return l.useEffect(function(){google.maps.visualization||tt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),l.useEffect(function(){tt(!!e,"data property is required in HeatmapLayer %s",e)},[e]),l.useEffect(function(){s!==null&&s.setMap(a)},[a]),l.useEffect(function(){i&&s!==null&&s.setOptions(i)},[s,i]),l.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(me(me({},i||{}),{data:e,map:a}));return u(c),n&&n(c),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}l.memo(sd),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){tt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),tt(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(me(me({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Fe({updaterMap:_o,eventMap:zo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:_o,eventMap:zo,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Wo={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Uo={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,i=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Fe({updaterMap:Uo,eventMap:Wo,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{streetViewPanorama:i}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Uo,eventMap:Wo,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=Le,e})(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){tt(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(l.PureComponent);var Ho={onDirectionsChanged:"directions_changed"},Vo={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Fe({updaterMap:Vo,eventMap:Ho,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Vo,eventMap:Ho,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return x.jsx(x.Fragment,{})},e.contextType=Le,e})(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){tt(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(l.PureComponent);var qo={onPlacesChanged:"places_changed"},Zo={bounds:function(t,e){t.setBounds(e)}},ud=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=l.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(tt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=Fe({updaterMap:Zo,eventMap:qo,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Zo,eventMap:qo,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,children:l.Children.only(this.props.children)})},e.contextType=Le,e}(l.PureComponent),Go={onPlaceChanged:"place_changed"},Yo={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=l.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;tt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var i=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Fe({updaterMap:Yo,eventMap:Go,prevProps:{},nextProps:this.props,instance:i}),this.setState(function(){return{autocomplete:i}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Yo,eventMap:Go,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Pe(this.registeredEvents)},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,className:this.props.className,children:l.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Le,e})(l.PureComponent);function ld({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...i}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...i,children:x.jsx(tf,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(df,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...i,children:x.jsx(Se.MapPinned,{})})}function cd(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function fd(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...i}=t,a=`arkynTableBody ${n}`,o=l.Children.count(r)===0;return x.jsx("tbody",{className:a.trim(),...i,children:o?x.jsx("tr",{className:"arkynTableBodyEmptyLine",children:x.jsx("td",{colSpan:100,children:x.jsx("div",{children:e})})}):r})}function dd(t){const{className:e,children:n,...r}=t,i=`arkynTableCaption ${e}`;return x.jsx("caption",{className:i.trim(),...r,children:x.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function pd(t){const{children:e,className:n,...r}=t,i=`arkynTableContainer ${n}`;return x.jsx("div",{className:i.trim(),...r,children:x.jsx("table",{children:e})})}function hd(t){const{className:e,children:n,...r}=t,i=`arkynTableFooter ${e}`;return x.jsxs("tfoot",{className:i.trim(),...r,children:[x.jsx("tr",{className:"spacingRow"}),x.jsx("tr",{children:x.jsx("th",{colSpan:100,children:x.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function vd(t){const{className:e,children:n,...r}=t,i=`arkynTableHeader ${e}`;return x.jsxs("thead",{className:i.trim(),...r,children:[x.jsx("tr",{children:n}),x.jsx("tr",{className:"spacingRow"})]})}function gd(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:i,size:a="md",leftIcon:o,rightIcon:s,disabled:u,className:c="",children:f,...h}=t,g={xs:12,sm:16,md:20,lg:24}[a],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${a} ${i?"loadingTextTrue":"loadingTextFalse"} ${c}`;return x.jsxs("button",{className:d,disabled:u||e,...h,children:[x.jsxs("div",{className:"arkynButtonSpinner",children:[x.jsx(Se.Loader2,{size:g,strokeWidth:2.5}),i&&i]}),x.jsxs("div",{className:"arkynButtonContent",children:[fr(g,o),f,fr(g,s)]})]})}const Ko=l.createContext({});function md(t){var h,p;const e=Dn.useActionData(),{children:n,className:r,id:i,...a}=t,o=l.useRef(null),s=((h=o.current)==null?void 0:h.name)||"",u=((p=e==null?void 0:e.fieldErrors)==null?void 0:p[s])||null,c=l.useId(),f=`arkynFormController ${r}`;return x.jsx(Ko.Provider,{value:{error:u,id:c,inputRef:o},children:x.jsx("section",{id:i||s||void 0,className:f.trim(),...a,children:n})})}function Ct(){return l.useContext(Ko)}function yd(t){const{name:e,className:n="",size:r="md",isError:i,defaultChecked:a=!1,checked:o=null,onCheck:s,value:u,...c}=t,{id:f,inputRef:h,error:p}=Ct(),g=i||!!p,[C,v]=l.useState(a||!1),d=typeof o=="boolean"?o:C,w=`arkynCheckbox ${r} ${g?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const b=C;v(!b),s&&s(b?"":u||"checked")}return x.jsxs("button",{id:f,type:"button",className:w,onClick:O,...c,children:[x.jsx("input",{type:"hidden",name:e,ref:h,value:d?u||"checked":""}),x.jsx(Se.Check,{})]})}function Cd(t){const{children:e,className:n,...r}=t,i=`arkynFormError ${n}`,{error:a}=Ct();return e?x.jsx("strong",{className:i.trim(),...r,children:e}):a?x.jsx("strong",{className:i.trim(),...r,children:a}):x.jsx(x.Fragment,{})}function Dd(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:i}=Ct(),o=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return x.jsx("label",{className:o.trim(),htmlFor:i,...r})}function qt(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function Ci(t){return t&&t.replace(/[^0-9]/g,"")}function Xo(t,e){let n="",r=0;return Array.from(t).forEach((i,a)=>{e[a+r].match(/[0-9]/)||(n+=e[a+r],r++),n+=i}),n}function Jo(t){return t.length>11?"CNPJ":"CPF"}const Di={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Qo=Ci(Di.CNPJ).length;function bd(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,defaultValue:p,readOnly:g,onFocus:C,onBlur:v,title:d,style:D,onChange:B,...w}=t;function O(j){let N=Ci(j);const X=Jo(N);if(!(N.length>Qo))return N=Xo(N,Di[X]),N}const b=f?"right":"left",z=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||g||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,I={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:qt(s,I,"prefix"),sufix:qt(u,I,"sufix"),LeftIcon:c,RightIcon:f,defaultValue:O(p||""),disabled:h,readOnly:g,onFocus:C,onBlur:v,title:d,style:D,onChange:B,loadingPosition:b,iconSize:I,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...w}}function Ed(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:i,id:a,error:o}=Ct(),s=i||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:g,sufix:C,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:w,onFocus:O,onBlur:b,RightIcon:E,Spinner:S,onChange:F,value:V,defaultValue:P,...z}=bd({...t,id:a,isError:u},e),[R,I]=l.useState(P),j=B&&!D,N=E&&!D,X=d==="left"&&D,_=d==="right"&&D;function $(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function re(Z){let H=Ci(Z.target.value);const Q=Jo(H);H.length>Qo||(H=Xo(H,Di[Q]),Z.target.value=H,I(H),F&&F(Z))}function k(Z){n(!0),O&&O(Z)}function T(Z){n(!1),b&&b(Z)}return x.jsxs("section",{title:f,style:h,onClick:$,className:p,children:[g,X&&S,j&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:c||D,readOnly:w,ref:s,value:V||R,onFocus:k,onChange:re,onBlur:T,...z}),N&&x.jsx(E,{size:v,strokeWidth:2.5}),_&&S,C]})}const wd=3,Bd=(t="pt-BR",e,n="BRL",r=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(r?wd:0),vr=2,$o=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),bi=t=>{let e=t;return typeof t=="string"?(e=$o(t),e%1!==0&&(e=e.toFixed(vr))):e=Number.isInteger(t)?Number(t)*10**vr:t.toFixed(vr),$o(e)/10**vr},es=(t,e,n)=>{if(!e)return[0,""];const r=bi(e),i=Bd(t,r,n);return[r,i]};function xd(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,max:D=1e9,locale:B="pt-BR",currency:w="BRL",...O}=t,b=f?"right":"left",z=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,I={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:qt(s,I,"prefix"),sufix:qt(u,I,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,locale:B,currency:w,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,max:D,loadingPosition:b,iconSize:I,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...O}}function Ld(t){const[e,n]=l.useState(!1),[r,i]=l.useState("0"),a=l.useRef(null),{inputRef:o,id:s,error:u}=Ct(),c=o||a,f=t.isError||!!u,{disabled:h,title:p,style:g,className:C,prefix:v,sufix:d,iconSize:D,loadingPosition:B,isLoading:w,LeftIcon:O,readOnly:b,onFocus:E,onBlur:S,RightIcon:F,Spinner:V,value:P,max:z,onChangeValue:R,onKeyPress:I,currency:j,locale:N,name:X,defaultValue:_,...$}=xd({...t,id:s,isError:f},e),re=O&&!w,k=F&&!w,T=B==="left"&&w,Z=B==="right"&&w;function H(){h||!(c!=null&&c.current)||(n(!0),c.current.focus())}function Q(M){n(!0),E&&E(M)}function K(M){n(!1),S&&S(M)}const y=M=>{const[J,ne]=es(N,M,j);return!z||J<=z?(i(ne),[J,ne]):[bi(r),r]},U=M=>{M.preventDefault();const[J,ne]=y(M.target.value);R(M,String(J),String(ne))},W=M=>I&&I(M,M.key,M.key);return l.useEffect(()=>{const M=P||+_||void 0,[,J]=es(N,M,j);i(J)},[j,_,P]),x.jsxs("section",{title:p,style:g,onClick:H,className:C,children:[v,T&&V,re&&x.jsx(O,{size:D,strokeWidth:2.5}),x.jsx("input",{value:r,onChange:U,onBlur:K,onFocus:Q,onKeyUp:W,disabled:h||w,readOnly:b,...$}),x.jsx("input",{type:"hidden",ref:c,name:X,value:bi(r)}),Z&&V,k&&x.jsx(F,{size:D,strokeWidth:2.5}),d]})}function Sd(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,onChange:D,showMask:B=!1,type:w,...O}=t,b=f?"right":"left",z=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,I={md:20,lg:20}[i];return{isLoading:n,className:z,prefix:qt(s,I,"prefix"),sufix:qt(u,I,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,onChange:D,loadingPosition:b,iconSize:I,showMask:B,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...O}}const Ad=l.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function Od(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:i,id:a,error:o}=Ct(),s=i||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:g,sufix:C,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:w,onFocus:O,onBlur:b,RightIcon:E,Spinner:S,...F}=Sd({...t,id:a,isError:u},e),V=B&&!D,P=E&&!D,z=d==="left"&&D,R=d==="right"&&D;function I(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function j(X){n(!0),O&&O(X)}function N(X){n(!1),b&&b(X)}return x.jsxs("section",{title:f,style:h,onClick:I,className:p,children:[g,z&&S,V&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx(Ac.InputMask,{component:Ad,ref:s,onFocus:j,onBlur:N,disabled:c,...F}),P&&x.jsx(E,{size:v,strokeWidth:2.5}),R&&S,C]})}function Fd(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,onChange:D,...B}=t,w=f?"right":"left",V=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${i} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,z={md:20,lg:20}[i];return{isLoading:n,className:V,prefix:qt(s,z,"prefix"),sufix:qt(u,z,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,readOnly:p,onFocus:g,onBlur:C,title:v,style:d,onChange:D,loadingPosition:w,iconSize:z,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:z,strokeWidth:2.5}),...B}}function Pd(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:i,id:a,error:o}=Ct(),s=i||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:g,sufix:C,iconSize:v,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:w,onFocus:O,onBlur:b,RightIcon:E,type:S,Spinner:F,...V}=Fd({...t,id:a,isError:u},e),P=B&&!D,z=E&&!D,R=d==="left"&&D,I=d==="right"&&D;function j(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function N(_){n(!0),O&&O(_)}function X(_){n(!1),b&&b(_)}return S==="hidden"?x.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:s,...V}):x.jsxs("section",{title:f,style:h,onClick:j,className:p,children:[g,R&&F,P&&x.jsx(B,{size:v,strokeWidth:2.5}),x.jsx("input",{disabled:c||D,readOnly:w,ref:s,onFocus:N,onBlur:X,type:S,...V}),z&&x.jsx(E,{size:v,strokeWidth:2.5}),I&&F,C]})}function ts(t){return t.type==="currency"?x.jsx(Ld,{...t}):t.type==="masked"?x.jsx(Od,{...t}):t.type==="cpf-cnpj"?x.jsx(Ed,{...t}):x.jsx(Pd,{...t})}function Md({onChange:t,onPlaceChanged:e,options:n,...r}){const[i,a]=l.useState(null),o=u=>a(u),s=()=>{var g,C,v,d;const c=i.getPlaces()[0],f=c==null?void 0:c.address_components;function h(D){const B=f.find(w=>w.types[0]===D);return B?B.long_name:""}function p(D){const B=f.find(w=>w.types[0]===D);return B?B.short_name:""}if(c){const D=h("route"),B=h("street_number"),w=h("sublocality_level_1"),O=h("administrative_area_level_2"),b=h("administrative_area_level_1"),E=p("administrative_area_level_1"),S=h("postal_code"),F=(C=(g=c.geometry)==null?void 0:g.location)==null?void 0:C.lat(),V=(d=(v=c.geometry)==null?void 0:v.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:b,district:w,cep:S,streetNumber:B,stateShortName:E,coordinates:{lat:F,lng:V}})}};return x.jsx(ud,{onLoad:o,onPlacesChanged:s,options:n,children:x.jsx(ts,{type:"text",onChange:u=>t(u.target.value),...r})})}function kd(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:i="md",icon:a,disabled:o,className:s="",...u}=t,c={xs:12,sm:16,md:20,lg:24},h=`arkynIconButton ${r} ${n} ${i} ${e?"loadingTrue":"loadingFalse"} ${s}`;return x.jsxs("button",{disabled:o||e,className:h.trim(),...u,children:[x.jsx("div",{className:"arkynIconButtonSpinner",children:x.jsx(Se.Loader2,{size:c[i],strokeWidth:2.5})}),x.jsx("div",{className:"arkynIconButtonContent",children:x.jsx(a,{size:c[i],strokeWidth:2.5})})]})}const ns=l.createContext({});function Td(){return l.useContext(ns)}function Rd(t){const{defaultValue:e,name:n,value:r,onChange:i,size:a="md",className:o="",...s}=t,[u,c]=l.useState(e||""),{inputRef:f,id:h}=Ct();function p(C){c(C),i&&i(C)}const g=`arkynRadioGroup ${a} ${o}`;return x.jsxs(ns.Provider,{value:{onChange:p,value:r||u,size:a},children:[x.jsx("input",{style:{display:"none"},type:"text",id:h,readOnly:!0,name:n,ref:f,value:r||u}),x.jsx("div",{className:g.trim(),...s})]})}function jd(t){const{value:e,size:n,disabled:r,children:i,className:a="",...o}=t,{onChange:s,size:u,value:c}=Td(),{error:f}=Ct(),v=`arkynRadioBox ${n||u} ${c===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${a}`;return x.jsxs("label",{className:v.trim(),children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>s(e),onFocus:()=>s(e),...o}),i]})}var Rt={};Object.defineProperty(Rt,"__esModule",{value:!0});for(var Id=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Ei={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},rs={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Id?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},wi={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},gr=1;gr<20;gr++)wi["f"+gr]=111+gr;function mr(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(o){return is(o,e)}),i=function(s){return r.some(function(u){return as(u,s)})},a=n==null?i:i(n);return a}function Nd(t,e){return mr(t,e)}function zd(t,e){return mr(t,{byKey:!0},e)}function is(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),a=i.length;for(var o in Ei)r[Ei[o]]=!1;var s=!0,u=!1,c=void 0;try{for(var f=i[Symbol.iterator](),h;!(s=(h=f.next()).done);s=!0){var p=h.value,g=p.endsWith("?")&&p.length>1;g&&(p=p.slice(0,-1));var C=Bi(p),v=Ei[C];if(p.length>1&&!v&&!rs[p]&&!wi[C])throw new TypeError('Unknown modifier: "'+p+'"');(a===1||!v)&&(n?r.key=C:r.which=os(p)),v&&(r[v]=g?null:!0)}}catch(d){u=!0,c=d}finally{try{!s&&f.return&&f.return()}finally{if(u)throw c}}return r}function as(t,e){for(var n in t){var r=t[n],i=void 0;if(r!=null&&(n==="key"&&e.key!=null?i=e.key.toLowerCase():n==="which"?i=r===91&&e.which===93?91:e.which:i=e[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function os(t){t=Bi(t);var e=wi[t]||t.toUpperCase().charCodeAt(0);return e}function Bi(t){return t=t.toLowerCase(),t=rs[t]||t,t}var _d=Rt.default=mr,xi=Rt.isHotkey=mr;Rt.isCodeHotkey=Nd,Rt.isKeyHotkey=zd,Rt.parseHotkey=is,Rt.compareHotkey=as,Rt.toKeyCode=os,Rt.toKeyName=Bi;/*!
71
+ </svg>`,s=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(yt.isAdvancedMarkerAvailable(a)){const h=new DOMParser().parseFromString(o,"image/svg+xml").documentElement;h.setAttribute("transform","translate(0 25)");const p={map:a,position:n,zIndex:u,title:s,content:h};return new google.maps.marker.AdvancedMarkerElement(p)}const c={position:n,zIndex:u,title:s,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function If(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}class ya{constructor(){If(ya,google.maps.OverlayView)}}var zn;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"})(zn||(zn={}));const Nf=(t,e,n)=>{n.fitBounds(e.bounds)};class zf extends ya{constructor({map:e,markers:n=[],algorithmOptions:r={},algorithm:a=new Tf(r),renderer:i=new jf,onClusterClick:o=Nf}){super(),this.markers=[...n],this.clusters=[],this.algorithm=a,this.renderer=i,this.onClusterClick=o,e&&this.setMap(e)}addMarker(e,n){this.markers.includes(e)||(this.markers.push(e),n||this.render())}addMarkers(e,n){e.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(e,n){const r=this.markers.indexOf(e);return r===-1?!1:(yt.setMap(e,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(e,n){let r=!1;return e.forEach(a=>{r=this.removeMarker(a,!0)||r}),r&&!n&&this.render(),r}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,zn.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(r||r==null){const a=new Set;for(const o of n)o.markers.length==1&&a.add(o.markers[0]);const i=[];for(const o of this.clusters)o.marker!=null&&(o.markers.length==1?a.has(o.marker)||yt.setMap(o.marker,null):i.push(o.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>i.forEach(o=>yt.setMap(o,null)))}google.maps.event.trigger(this,zn.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>yt.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Rf(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{r.markers.length===1?r.marker=r.markers[0]:(r.marker=this.renderer.render(r,e,n),r.markers.forEach(a=>yt.setMap(a,null)),this.onClusterClick&&r.marker.addListener("click",a=>{google.maps.event.trigger(this,zn.CLUSTER_CLICK,r),this.onClusterClick(a,r,n)})),yt.setMap(r.marker,n)})}}function _f(t){var e=Yc(),n=l.useState(null),r=n[0],a=n[1];return l.useEffect(function(){if(e&&r===null){var i=new zf(me(me({},t),{map:e}));a(i)}},[e]),r}function Wf(t){var e=t.children,n=t.options,r=_f(n);return r!==null?e(r):null}l.memo(Wf);var Co={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},Do={options:function(t,e){t.setOptions(e)},position:function(t,e){t.setPosition(e)},zIndex:function(t,e){t.setZIndex(e)}};function Uf(t){var e=t.children,n=t.anchor,r=t.options,a=t.position,i=t.zIndex,o=t.onCloseClick,s=t.onDomReady,u=t.onContentChanged,c=t.onPositionChanged,f=t.onZindexChanged,h=t.onLoad,p=t.onUnmount,v=l.useContext(Le),C=l.useState(null),g=C[0],d=C[1],D=l.useState(null),B=D[0],E=D[1],O=l.useState(null),b=O[0],w=O[1],S=l.useState(null),P=S[0],V=S[1],F=l.useState(null),j=F[0],k=F[1],I=l.useState(null),N=I[0],z=I[1],X=l.useRef(null);return l.useEffect(function(){g!==null&&(g.close(),n?g.open(v,n):g.getPosition()&&g.open(v))},[v,g,n]),l.useEffect(function(){r&&g!==null&&g.setOptions(r)},[g,r]),l.useEffect(function(){a&&g!==null&&g.setPosition(a)},[a]),l.useEffect(function(){typeof i=="number"&&g!==null&&g.setZIndex(i)},[i]),l.useEffect(function(){g&&o&&(B!==null&&google.maps.event.removeListener(B),E(google.maps.event.addListener(g,"closeclick",o)))},[o]),l.useEffect(function(){g&&s&&(b!==null&&google.maps.event.removeListener(b),w(google.maps.event.addListener(g,"domready",s)))},[s]),l.useEffect(function(){g&&u&&(P!==null&&google.maps.event.removeListener(P),V(google.maps.event.addListener(g,"content_changed",u)))},[u]),l.useEffect(function(){g&&c&&(j!==null&&google.maps.event.removeListener(j),k(google.maps.event.addListener(g,"position_changed",c)))},[c]),l.useEffect(function(){g&&f&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(g,"zindex_changed",f)))},[f]),l.useEffect(function(){var _=new google.maps.InfoWindow(me({},r||{}));return d(_),X.current=document.createElement("div"),o&&E(google.maps.event.addListener(_,"closeclick",o)),s&&w(google.maps.event.addListener(_,"domready",s)),u&&V(google.maps.event.addListener(_,"content_changed",u)),c&&k(google.maps.event.addListener(_,"position_changed",c)),f&&z(google.maps.event.addListener(_,"zindex_changed",f)),_.setContent(X.current),a&&_.setPosition(a),i&&_.setZIndex(i),n?_.open(v,n):_.getPosition()?_.open(v):tt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>."),h&&h(_),function(){B&&google.maps.event.removeListener(B),P&&google.maps.event.removeListener(P),b&&google.maps.event.removeListener(b),j&&google.maps.event.removeListener(j),N&&google.maps.event.removeListener(N),p&&p(_),_.close()}},[]),X.current?Wt.createPortal(l.Children.only(e),X.current):null}l.memo(Uf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=null,n.state={infoWindow:null},n.open=function(r,a){a?r.open(n.context,a):r.getPosition()?r.open(n.context):tt(!1,"You must provide either an anchor (typically render it inside a <Marker>) or a position props for <InfoWindow>.")},n.setInfoWindowCallback=function(){n.state.infoWindow!==null&&n.containerElement!==null&&(n.state.infoWindow.setContent(n.containerElement),n.open(n.state.infoWindow,n.props.anchor),n.props.onLoad&&n.props.onLoad(n.state.infoWindow))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.InfoWindow(me({},this.props.options||{}));this.containerElement=document.createElement("div"),this.registeredEvents=Fe({updaterMap:Do,eventMap:Co,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{infoWindow:n}},this.setInfoWindowCallback)},e.prototype.componentDidUpdate=function(n){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Do,eventMap:Co,prevProps:n,nextProps:this.props,instance:this.state.infoWindow}))},e.prototype.componentWillUnmount=function(){this.state.infoWindow!==null&&(Pe(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())},e.prototype.render=function(){return this.containerElement?Wt.createPortal(l.Children.only(this.props.children),this.containerElement):null},e.contextType=Le,e}(l.PureComponent);var bo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Eo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},visible:function(t,e){t.setVisible(e)}},Hf={};function Vf(t){var e=t.options,n=t.draggable,r=t.editable,a=t.visible,i=t.path,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,v=t.onMouseUp,C=t.onRightClick,g=t.onClick,d=t.onDrag,D=t.onLoad,B=t.onUnmount,E=l.useContext(Le),O=l.useState(null),b=O[0],w=O[1],S=l.useState(null),P=S[0],V=S[1],F=l.useState(null),j=F[0],k=F[1],I=l.useState(null),N=I[0],z=I[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),T=re[0],R=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ie=l.useState(null),de=ie[0],pe=ie[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1];return l.useEffect(function(){b!==null&&b.setMap(E)},[E]),l.useEffect(function(){typeof e<"u"&&b!==null&&b.setOptions(e)},[b,e]),l.useEffect(function(){typeof n<"u"&&b!==null&&b.setDraggable(n)},[b,n]),l.useEffect(function(){typeof r<"u"&&b!==null&&b.setEditable(r)},[b,r]),l.useEffect(function(){typeof a<"u"&&b!==null&&b.setVisible(a)},[b,a]),l.useEffect(function(){typeof i<"u"&&b!==null&&b.setPath(i)},[b,i]),l.useEffect(function(){b&&o&&(P!==null&&google.maps.event.removeListener(P),V(google.maps.event.addListener(b,"dblclick",o)))},[o]),l.useEffect(function(){b&&s&&(j!==null&&google.maps.event.removeListener(j),k(google.maps.event.addListener(b,"dragend",s)))},[s]),l.useEffect(function(){b&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(b,"dragstart",u)))},[u]),l.useEffect(function(){b&&c&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(b,"mousedown",c)))},[c]),l.useEffect(function(){b&&f&&(T!==null&&google.maps.event.removeListener(T),R(google.maps.event.addListener(b,"mousemove",f)))},[f]),l.useEffect(function(){b&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(b,"mouseout",h)))},[h]),l.useEffect(function(){b&&p&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(b,"mouseover",p)))},[p]),l.useEffect(function(){b&&v&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(b,"mouseup",v)))},[v]),l.useEffect(function(){b&&C&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(b,"rightclick",C)))},[C]),l.useEffect(function(){b&&g&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(b,"click",g)))},[g]),l.useEffect(function(){b&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(b,"drag",d)))},[d]),l.useEffect(function(){var ve=new google.maps.Polyline(me(me({},e||Hf),{map:E}));return i&&ve.setPath(i),typeof a<"u"&&ve.setVisible(a),typeof r<"u"&&ve.setEditable(r),typeof n<"u"&&ve.setDraggable(n),o&&V(google.maps.event.addListener(ve,"dblclick",o)),s&&k(google.maps.event.addListener(ve,"dragend",s)),u&&z(google.maps.event.addListener(ve,"dragstart",u)),c&&$(google.maps.event.addListener(ve,"mousedown",c)),f&&R(google.maps.event.addListener(ve,"mousemove",f)),h&&Q(google.maps.event.addListener(ve,"mouseout",h)),p&&U(google.maps.event.addListener(ve,"mouseover",p)),v&&J(google.maps.event.addListener(ve,"mouseup",v)),C&&ue(google.maps.event.addListener(ve,"rightclick",C)),g&&pe(google.maps.event.addListener(ve,"click",g)),d&&ge(google.maps.event.addListener(ve,"drag",d)),w(ve),D&&D(ve),function(){P!==null&&google.maps.event.removeListener(P),j!==null&&google.maps.event.removeListener(j),N!==null&&google.maps.event.removeListener(N),_!==null&&google.maps.event.removeListener(_),T!==null&&google.maps.event.removeListener(T),H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),B&&B(ve),ve.setMap(null)}},[]),null}l.memo(Vf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polyline:null},n.setPolylineCallback=function(){n.state.polyline!==null&&n.props.onLoad&&n.props.onLoad(n.state.polyline)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polyline(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Eo,eventMap:bo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polyline:n}},this.setPolylineCallback)},e.prototype.componentDidUpdate=function(n){this.state.polyline!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Eo,eventMap:bo,prevProps:n,nextProps:this.props,instance:this.state.polyline}))},e.prototype.componentWillUnmount=function(){this.state.polyline!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),Pe(this.registeredEvents),this.state.polyline.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var wo={onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Bo={draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},path:function(t,e){t.setPath(e)},paths:function(t,e){t.setPaths(e)},visible:function(t,e){t.setVisible(e)}};function qf(t){var e=t.options,n=t.draggable,r=t.editable,a=t.visible,i=t.path,o=t.paths,s=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,v=t.onMouseOver,C=t.onMouseUp,g=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onLoad,E=t.onUnmount,O=t.onEdit,b=l.useContext(Le),w=l.useState(null),S=w[0],P=w[1],V=l.useState(null),F=V[0],j=V[1],k=l.useState(null),I=k[0],N=k[1],z=l.useState(null),X=z[0],_=z[1],$=l.useState(null),re=$[0],T=$[1],R=l.useState(null),Z=R[0],H=R[1],Q=l.useState(null),K=Q[0],y=Q[1],U=l.useState(null),W=U[0],M=U[1],J=l.useState(null),ne=J[0],G=J[1],ue=l.useState(null),ie=ue[0],de=ue[1],pe=l.useState(null),Ce=pe[0],ye=pe[1],ge=l.useState(null),ve=ge[0],Ie=ge[1];return l.useEffect(function(){S!==null&&S.setMap(b)},[b]),l.useEffect(function(){typeof e<"u"&&S!==null&&S.setOptions(e)},[S,e]),l.useEffect(function(){typeof n<"u"&&S!==null&&S.setDraggable(n)},[S,n]),l.useEffect(function(){typeof r<"u"&&S!==null&&S.setEditable(r)},[S,r]),l.useEffect(function(){typeof a<"u"&&S!==null&&S.setVisible(a)},[S,a]),l.useEffect(function(){typeof i<"u"&&S!==null&&S.setPath(i)},[S,i]),l.useEffect(function(){typeof o<"u"&&S!==null&&S.setPaths(o)},[S,o]),l.useEffect(function(){S&&s&&(F!==null&&google.maps.event.removeListener(F),j(google.maps.event.addListener(S,"dblclick",s)))},[s]),l.useEffect(function(){S&&(google.maps.event.addListener(S.getPath(),"insert_at",function(){O==null||O(S)}),google.maps.event.addListener(S.getPath(),"set_at",function(){O==null||O(S)}))},[S,O]),l.useEffect(function(){S&&u&&(I!==null&&google.maps.event.removeListener(I),N(google.maps.event.addListener(S,"dragend",u)))},[u]),l.useEffect(function(){S&&c&&(X!==null&&google.maps.event.removeListener(X),_(google.maps.event.addListener(S,"dragstart",c)))},[c]),l.useEffect(function(){S&&f&&(re!==null&&google.maps.event.removeListener(re),T(google.maps.event.addListener(S,"mousedown",f)))},[f]),l.useEffect(function(){S&&h&&(Z!==null&&google.maps.event.removeListener(Z),H(google.maps.event.addListener(S,"mousemove",h)))},[h]),l.useEffect(function(){S&&p&&(K!==null&&google.maps.event.removeListener(K),y(google.maps.event.addListener(S,"mouseout",p)))},[p]),l.useEffect(function(){S&&v&&(W!==null&&google.maps.event.removeListener(W),M(google.maps.event.addListener(S,"mouseover",v)))},[v]),l.useEffect(function(){S&&C&&(ne!==null&&google.maps.event.removeListener(ne),G(google.maps.event.addListener(S,"mouseup",C)))},[C]),l.useEffect(function(){S&&g&&(ie!==null&&google.maps.event.removeListener(ie),de(google.maps.event.addListener(S,"rightclick",g)))},[g]),l.useEffect(function(){S&&d&&(Ce!==null&&google.maps.event.removeListener(Ce),ye(google.maps.event.addListener(S,"click",d)))},[d]),l.useEffect(function(){S&&D&&(ve!==null&&google.maps.event.removeListener(ve),Ie(google.maps.event.addListener(S,"drag",D)))},[D]),l.useEffect(function(){var se=new google.maps.Polygon(me(me({},e||{}),{map:b}));return i&&se.setPath(i),o&&se.setPaths(o),typeof a<"u"&&se.setVisible(a),typeof r<"u"&&se.setEditable(r),typeof n<"u"&&se.setDraggable(n),s&&j(google.maps.event.addListener(se,"dblclick",s)),u&&N(google.maps.event.addListener(se,"dragend",u)),c&&_(google.maps.event.addListener(se,"dragstart",c)),f&&T(google.maps.event.addListener(se,"mousedown",f)),h&&H(google.maps.event.addListener(se,"mousemove",h)),p&&y(google.maps.event.addListener(se,"mouseout",p)),v&&M(google.maps.event.addListener(se,"mouseover",v)),C&&G(google.maps.event.addListener(se,"mouseup",C)),g&&de(google.maps.event.addListener(se,"rightclick",g)),d&&ye(google.maps.event.addListener(se,"click",d)),D&&Ie(google.maps.event.addListener(se,"drag",D)),P(se),B&&B(se),function(){F!==null&&google.maps.event.removeListener(F),I!==null&&google.maps.event.removeListener(I),X!==null&&google.maps.event.removeListener(X),re!==null&&google.maps.event.removeListener(re),Z!==null&&google.maps.event.removeListener(Z),K!==null&&google.maps.event.removeListener(K),W!==null&&google.maps.event.removeListener(W),ne!==null&&google.maps.event.removeListener(ne),ie!==null&&google.maps.event.removeListener(ie),Ce!==null&&google.maps.event.removeListener(Ce),E&&E(se),se.setMap(null)}},[]),null}l.memo(qf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={polygon:null},n.setPolygonCallback=function(){n.state.polygon!==null&&n.props.onLoad&&n.props.onLoad(n.state.polygon)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Polygon(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Bo,eventMap:wo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{polygon:n}},this.setPolygonCallback)},e.prototype.componentDidUpdate=function(n){this.state.polygon!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Bo,eventMap:wo,prevProps:n,nextProps:this.props,instance:this.state.polygon}))},e.prototype.componentWillUnmount=function(){this.state.polygon!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.polygon),Pe(this.registeredEvents),this.state.polygon&&this.state.polygon.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var xo={onBoundsChanged:"bounds_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Lo={bounds:function(t,e){t.setBounds(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},visible:function(t,e){t.setVisible(e)}};function Zf(t){var e=t.options,n=t.bounds,r=t.draggable,a=t.editable,i=t.visible,o=t.onDblClick,s=t.onDragEnd,u=t.onDragStart,c=t.onMouseDown,f=t.onMouseMove,h=t.onMouseOut,p=t.onMouseOver,v=t.onMouseUp,C=t.onRightClick,g=t.onClick,d=t.onDrag,D=t.onBoundsChanged,B=t.onLoad,E=t.onUnmount,O=l.useContext(Le),b=l.useState(null),w=b[0],S=b[1],P=l.useState(null),V=P[0],F=P[1],j=l.useState(null),k=j[0],I=j[1],N=l.useState(null),z=N[0],X=N[1],_=l.useState(null),$=_[0],re=_[1],T=l.useState(null),R=T[0],Z=T[1],H=l.useState(null),Q=H[0],K=H[1],y=l.useState(null),U=y[0],W=y[1],M=l.useState(null),J=M[0],ne=M[1],G=l.useState(null),ue=G[0],ie=G[1],de=l.useState(null),pe=de[0],Ce=de[1],ye=l.useState(null),ge=ye[0],ve=ye[1],Ie=l.useState(null),se=Ie[0],Ne=Ie[1];return l.useEffect(function(){w!==null&&w.setMap(O)},[O]),l.useEffect(function(){typeof e<"u"&&w!==null&&w.setOptions(e)},[w,e]),l.useEffect(function(){typeof r<"u"&&w!==null&&w.setDraggable(r)},[w,r]),l.useEffect(function(){typeof a<"u"&&w!==null&&w.setEditable(a)},[w,a]),l.useEffect(function(){typeof i<"u"&&w!==null&&w.setVisible(i)},[w,i]),l.useEffect(function(){typeof n<"u"&&w!==null&&w.setBounds(n)},[w,n]),l.useEffect(function(){w&&o&&(V!==null&&google.maps.event.removeListener(V),F(google.maps.event.addListener(w,"dblclick",o)))},[o]),l.useEffect(function(){w&&s&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(w,"dragend",s)))},[s]),l.useEffect(function(){w&&u&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(w,"dragstart",u)))},[u]),l.useEffect(function(){w&&c&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(w,"mousedown",c)))},[c]),l.useEffect(function(){w&&f&&(R!==null&&google.maps.event.removeListener(R),Z(google.maps.event.addListener(w,"mousemove",f)))},[f]),l.useEffect(function(){w&&h&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(w,"mouseout",h)))},[h]),l.useEffect(function(){w&&p&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(w,"mouseover",p)))},[p]),l.useEffect(function(){w&&v&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(w,"mouseup",v)))},[v]),l.useEffect(function(){w&&C&&(ue!==null&&google.maps.event.removeListener(ue),ie(google.maps.event.addListener(w,"rightclick",C)))},[C]),l.useEffect(function(){w&&g&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(w,"click",g)))},[g]),l.useEffect(function(){w&&d&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(w,"drag",d)))},[d]),l.useEffect(function(){w&&D&&(se!==null&&google.maps.event.removeListener(se),Ne(google.maps.event.addListener(w,"bounds_changed",D)))},[D]),l.useEffect(function(){var fe=new google.maps.Rectangle(me(me({},e||{}),{map:O}));return typeof i<"u"&&fe.setVisible(i),typeof a<"u"&&fe.setEditable(a),typeof r<"u"&&fe.setDraggable(r),typeof n<"u"&&fe.setBounds(n),o&&F(google.maps.event.addListener(fe,"dblclick",o)),s&&I(google.maps.event.addListener(fe,"dragend",s)),u&&X(google.maps.event.addListener(fe,"dragstart",u)),c&&re(google.maps.event.addListener(fe,"mousedown",c)),f&&Z(google.maps.event.addListener(fe,"mousemove",f)),h&&K(google.maps.event.addListener(fe,"mouseout",h)),p&&W(google.maps.event.addListener(fe,"mouseover",p)),v&&ne(google.maps.event.addListener(fe,"mouseup",v)),C&&ie(google.maps.event.addListener(fe,"rightclick",C)),g&&Ce(google.maps.event.addListener(fe,"click",g)),d&&ve(google.maps.event.addListener(fe,"drag",d)),D&&Ne(google.maps.event.addListener(fe,"bounds_changed",D)),S(fe),B&&B(fe),function(){V!==null&&google.maps.event.removeListener(V),k!==null&&google.maps.event.removeListener(k),z!==null&&google.maps.event.removeListener(z),$!==null&&google.maps.event.removeListener($),R!==null&&google.maps.event.removeListener(R),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),E&&E(fe),fe.setMap(null)}},[]),null}l.memo(Zf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={rectangle:null},n.setRectangleCallback=function(){n.state.rectangle!==null&&n.props.onLoad&&n.props.onLoad(n.state.rectangle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Rectangle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Lo,eventMap:xo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{rectangle:n}},this.setRectangleCallback)},e.prototype.componentDidUpdate=function(n){this.state.rectangle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Lo,eventMap:xo,prevProps:n,nextProps:this.props,instance:this.state.rectangle}))},e.prototype.componentWillUnmount=function(){this.state.rectangle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),Pe(this.registeredEvents),this.state.rectangle.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var So={onCenterChanged:"center_changed",onRadiusChanged:"radius_changed",onClick:"click",onDblClick:"dblclick",onDrag:"drag",onDragEnd:"dragend",onDragStart:"dragstart",onMouseDown:"mousedown",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick"},Ao={center:function(t,e){t.setCenter(e)},draggable:function(t,e){t.setDraggable(e)},editable:function(t,e){t.setEditable(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},radius:function(t,e){t.setRadius(e)},visible:function(t,e){t.setVisible(e)}},Gf={};function Yf(t){var e=t.options,n=t.center,r=t.radius,a=t.draggable,i=t.editable,o=t.visible,s=t.onDblClick,u=t.onDragEnd,c=t.onDragStart,f=t.onMouseDown,h=t.onMouseMove,p=t.onMouseOut,v=t.onMouseOver,C=t.onMouseUp,g=t.onRightClick,d=t.onClick,D=t.onDrag,B=t.onCenterChanged,E=t.onRadiusChanged,O=t.onLoad,b=t.onUnmount,w=l.useContext(Le),S=l.useState(null),P=S[0],V=S[1],F=l.useState(null),j=F[0],k=F[1],I=l.useState(null),N=I[0],z=I[1],X=l.useState(null),_=X[0],$=X[1],re=l.useState(null),T=re[0],R=re[1],Z=l.useState(null),H=Z[0],Q=Z[1],K=l.useState(null),y=K[0],U=K[1],W=l.useState(null),M=W[0],J=W[1],ne=l.useState(null),G=ne[0],ue=ne[1],ie=l.useState(null),de=ie[0],pe=ie[1],Ce=l.useState(null),ye=Ce[0],ge=Ce[1],ve=l.useState(null),Ie=ve[0],se=ve[1],Ne=l.useState(null),fe=Ne[0],we=Ne[1],Me=l.useState(null),He=Me[0],qe=Me[1];return l.useEffect(function(){P!==null&&P.setMap(w)},[w]),l.useEffect(function(){typeof e<"u"&&P!==null&&P.setOptions(e)},[P,e]),l.useEffect(function(){typeof a<"u"&&P!==null&&P.setDraggable(a)},[P,a]),l.useEffect(function(){typeof i<"u"&&P!==null&&P.setEditable(i)},[P,i]),l.useEffect(function(){typeof o<"u"&&P!==null&&P.setVisible(o)},[P,o]),l.useEffect(function(){typeof r=="number"&&P!==null&&P.setRadius(r)},[P,r]),l.useEffect(function(){typeof n<"u"&&P!==null&&P.setCenter(n)},[P,n]),l.useEffect(function(){P&&s&&(j!==null&&google.maps.event.removeListener(j),k(google.maps.event.addListener(P,"dblclick",s)))},[s]),l.useEffect(function(){P&&u&&(N!==null&&google.maps.event.removeListener(N),z(google.maps.event.addListener(P,"dragend",u)))},[u]),l.useEffect(function(){P&&c&&(_!==null&&google.maps.event.removeListener(_),$(google.maps.event.addListener(P,"dragstart",c)))},[c]),l.useEffect(function(){P&&f&&(T!==null&&google.maps.event.removeListener(T),R(google.maps.event.addListener(P,"mousedown",f)))},[f]),l.useEffect(function(){P&&h&&(H!==null&&google.maps.event.removeListener(H),Q(google.maps.event.addListener(P,"mousemove",h)))},[h]),l.useEffect(function(){P&&p&&(y!==null&&google.maps.event.removeListener(y),U(google.maps.event.addListener(P,"mouseout",p)))},[p]),l.useEffect(function(){P&&v&&(M!==null&&google.maps.event.removeListener(M),J(google.maps.event.addListener(P,"mouseover",v)))},[v]),l.useEffect(function(){P&&C&&(G!==null&&google.maps.event.removeListener(G),ue(google.maps.event.addListener(P,"mouseup",C)))},[C]),l.useEffect(function(){P&&g&&(de!==null&&google.maps.event.removeListener(de),pe(google.maps.event.addListener(P,"rightclick",g)))},[g]),l.useEffect(function(){P&&d&&(ye!==null&&google.maps.event.removeListener(ye),ge(google.maps.event.addListener(P,"click",d)))},[d]),l.useEffect(function(){P&&D&&(Ie!==null&&google.maps.event.removeListener(Ie),se(google.maps.event.addListener(P,"drag",D)))},[D]),l.useEffect(function(){P&&B&&(fe!==null&&google.maps.event.removeListener(fe),we(google.maps.event.addListener(P,"center_changed",B)))},[d]),l.useEffect(function(){P&&E&&(He!==null&&google.maps.event.removeListener(He),qe(google.maps.event.addListener(P,"radius_changed",E)))},[E]),l.useEffect(function(){var Ee=new google.maps.Circle(me(me({},e||Gf),{map:w}));return typeof r=="number"&&Ee.setRadius(r),typeof n<"u"&&Ee.setCenter(n),typeof r=="number"&&Ee.setRadius(r),typeof o<"u"&&Ee.setVisible(o),typeof i<"u"&&Ee.setEditable(i),typeof a<"u"&&Ee.setDraggable(a),s&&k(google.maps.event.addListener(Ee,"dblclick",s)),u&&z(google.maps.event.addListener(Ee,"dragend",u)),c&&$(google.maps.event.addListener(Ee,"dragstart",c)),f&&R(google.maps.event.addListener(Ee,"mousedown",f)),h&&Q(google.maps.event.addListener(Ee,"mousemove",h)),p&&U(google.maps.event.addListener(Ee,"mouseout",p)),v&&J(google.maps.event.addListener(Ee,"mouseover",v)),C&&ue(google.maps.event.addListener(Ee,"mouseup",C)),g&&pe(google.maps.event.addListener(Ee,"rightclick",g)),d&&ge(google.maps.event.addListener(Ee,"click",d)),D&&se(google.maps.event.addListener(Ee,"drag",D)),B&&we(google.maps.event.addListener(Ee,"center_changed",B)),E&&qe(google.maps.event.addListener(Ee,"radius_changed",E)),V(Ee),O&&O(Ee),function(){j!==null&&google.maps.event.removeListener(j),N!==null&&google.maps.event.removeListener(N),_!==null&&google.maps.event.removeListener(_),T!==null&&google.maps.event.removeListener(T),H!==null&&google.maps.event.removeListener(H),y!==null&&google.maps.event.removeListener(y),M!==null&&google.maps.event.removeListener(M),G!==null&&google.maps.event.removeListener(G),de!==null&&google.maps.event.removeListener(de),ye!==null&&google.maps.event.removeListener(ye),fe!==null&&google.maps.event.removeListener(fe),He!==null&&google.maps.event.removeListener(He),b&&b(Ee),Ee.setMap(null)}},[]),null}l.memo(Yf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={circle:null},n.setCircleCallback=function(){n.state.circle!==null&&n.props.onLoad&&n.props.onLoad(n.state.circle)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.Circle(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Ao,eventMap:So,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{circle:n}},this.setCircleCallback)},e.prototype.componentDidUpdate=function(n){this.state.circle!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Ao,eventMap:So,prevProps:n,nextProps:this.props,instance:this.state.circle}))},e.prototype.componentWillUnmount=function(){var n;this.state.circle!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),Pe(this.registeredEvents),(n=this.state.circle)===null||n===void 0||n.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Oo={onClick:"click",onDblClick:"dblclick",onMouseDown:"mousedown",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseUp:"mouseup",onRightClick:"rightclick",onAddFeature:"addfeature",onRemoveFeature:"removefeature",onRemoveProperty:"removeproperty",onSetGeometry:"setgeometry",onSetProperty:"setproperty"},Fo={add:function(t,e){t.add(e)},addgeojson:function(t,e,n){t.addGeoJson(e,n)},contains:function(t,e){t.contains(e)},foreach:function(t,e){t.forEach(e)},loadgeojson:function(t,e,n,r){t.loadGeoJson(e,n,r)},overridestyle:function(t,e,n){t.overrideStyle(e,n)},remove:function(t,e){t.remove(e)},revertstyle:function(t,e){t.revertStyle(e)},controlposition:function(t,e){t.setControlPosition(e)},controls:function(t,e){t.setControls(e)},drawingmode:function(t,e){t.setDrawingMode(e)},map:function(t,e){t.setMap(e)},style:function(t,e){t.setStyle(e)},togeojson:function(t,e){t.toGeoJson(e)}};function Kf(t){var e=t.options,n=t.onClick,r=t.onDblClick,a=t.onMouseDown,i=t.onMouseMove,o=t.onMouseOut,s=t.onMouseOver,u=t.onMouseUp,c=t.onRightClick,f=t.onAddFeature,h=t.onRemoveFeature,p=t.onRemoveProperty,v=t.onSetGeometry,C=t.onSetProperty,g=t.onLoad,d=t.onUnmount,D=l.useContext(Le),B=l.useState(null),E=B[0],O=B[1],b=l.useState(null),w=b[0],S=b[1],P=l.useState(null),V=P[0],F=P[1],j=l.useState(null),k=j[0],I=j[1],N=l.useState(null),z=N[0],X=N[1],_=l.useState(null),$=_[0],re=_[1],T=l.useState(null),R=T[0],Z=T[1],H=l.useState(null),Q=H[0],K=H[1],y=l.useState(null),U=y[0],W=y[1],M=l.useState(null),J=M[0],ne=M[1],G=l.useState(null),ue=G[0],ie=G[1],de=l.useState(null),pe=de[0],Ce=de[1],ye=l.useState(null),ge=ye[0],ve=ye[1],Ie=l.useState(null),se=Ie[0],Ne=Ie[1];return l.useEffect(function(){E!==null&&E.setMap(D)},[D]),l.useEffect(function(){E&&r&&(w!==null&&google.maps.event.removeListener(w),S(google.maps.event.addListener(E,"dblclick",r)))},[r]),l.useEffect(function(){E&&a&&(V!==null&&google.maps.event.removeListener(V),F(google.maps.event.addListener(E,"mousedown",a)))},[a]),l.useEffect(function(){E&&i&&(k!==null&&google.maps.event.removeListener(k),I(google.maps.event.addListener(E,"mousemove",i)))},[i]),l.useEffect(function(){E&&o&&(z!==null&&google.maps.event.removeListener(z),X(google.maps.event.addListener(E,"mouseout",o)))},[o]),l.useEffect(function(){E&&s&&($!==null&&google.maps.event.removeListener($),re(google.maps.event.addListener(E,"mouseover",s)))},[s]),l.useEffect(function(){E&&u&&(R!==null&&google.maps.event.removeListener(R),Z(google.maps.event.addListener(E,"mouseup",u)))},[u]),l.useEffect(function(){E&&c&&(Q!==null&&google.maps.event.removeListener(Q),K(google.maps.event.addListener(E,"rightclick",c)))},[c]),l.useEffect(function(){E&&n&&(U!==null&&google.maps.event.removeListener(U),W(google.maps.event.addListener(E,"click",n)))},[n]),l.useEffect(function(){E&&f&&(J!==null&&google.maps.event.removeListener(J),ne(google.maps.event.addListener(E,"addfeature",f)))},[f]),l.useEffect(function(){E&&h&&(ue!==null&&google.maps.event.removeListener(ue),ie(google.maps.event.addListener(E,"removefeature",h)))},[h]),l.useEffect(function(){E&&p&&(pe!==null&&google.maps.event.removeListener(pe),Ce(google.maps.event.addListener(E,"removeproperty",p)))},[p]),l.useEffect(function(){E&&v&&(ge!==null&&google.maps.event.removeListener(ge),ve(google.maps.event.addListener(E,"setgeometry",v)))},[v]),l.useEffect(function(){E&&C&&(se!==null&&google.maps.event.removeListener(se),Ne(google.maps.event.addListener(E,"setproperty",C)))},[C]),l.useEffect(function(){if(D!==null){var fe=new google.maps.Data(me(me({},e||{}),{map:D}));r&&S(google.maps.event.addListener(fe,"dblclick",r)),a&&F(google.maps.event.addListener(fe,"mousedown",a)),i&&I(google.maps.event.addListener(fe,"mousemove",i)),o&&X(google.maps.event.addListener(fe,"mouseout",o)),s&&re(google.maps.event.addListener(fe,"mouseover",s)),u&&Z(google.maps.event.addListener(fe,"mouseup",u)),c&&K(google.maps.event.addListener(fe,"rightclick",c)),n&&W(google.maps.event.addListener(fe,"click",n)),f&&ne(google.maps.event.addListener(fe,"addfeature",f)),h&&ie(google.maps.event.addListener(fe,"removefeature",h)),p&&Ce(google.maps.event.addListener(fe,"removeproperty",p)),v&&ve(google.maps.event.addListener(fe,"setgeometry",v)),C&&Ne(google.maps.event.addListener(fe,"setproperty",C)),O(fe),g&&g(fe)}return function(){E&&(w!==null&&google.maps.event.removeListener(w),V!==null&&google.maps.event.removeListener(V),k!==null&&google.maps.event.removeListener(k),z!==null&&google.maps.event.removeListener(z),$!==null&&google.maps.event.removeListener($),R!==null&&google.maps.event.removeListener(R),Q!==null&&google.maps.event.removeListener(Q),U!==null&&google.maps.event.removeListener(U),J!==null&&google.maps.event.removeListener(J),ue!==null&&google.maps.event.removeListener(ue),pe!==null&&google.maps.event.removeListener(pe),ge!==null&&google.maps.event.removeListener(ge),se!==null&&google.maps.event.removeListener(se),d&&d(E),E.setMap(null))}},[]),null}l.memo(Kf),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={data:null},n.setDataCallback=function(){n.state.data!==null&&n.props.onLoad&&n.props.onLoad(n.state.data)},n}return e.prototype.componentDidMount=function(){if(this.context!==null){var n=new google.maps.Data(me(me({},this.props.options||{}),{map:this.context}));this.registeredEvents=Fe({updaterMap:Fo,eventMap:Oo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{data:n}},this.setDataCallback)}},e.prototype.componentDidUpdate=function(n){this.state.data!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Fo,eventMap:Oo,prevProps:n,nextProps:this.props,instance:this.state.data}))},e.prototype.componentWillUnmount=function(){this.state.data!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),Pe(this.registeredEvents),this.state.data&&this.state.data.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Po={onClick:"click",onDefaultViewportChanged:"defaultviewport_changed",onStatusChanged:"status_changed"},Mo={options:function(t,e){t.setOptions(e)},url:function(t,e){t.setUrl(e)},zIndex:function(t,e){t.setZIndex(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={kmlLayer:null},n.setKmlLayerCallback=function(){n.state.kmlLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.kmlLayer)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.KmlLayer(me(me({},this.props.options),{map:this.context}));this.registeredEvents=Fe({updaterMap:Mo,eventMap:Po,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{kmlLayer:n}},this.setKmlLayerCallback)},e.prototype.componentDidUpdate=function(n){this.state.kmlLayer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Mo,eventMap:Po,prevProps:n,nextProps:this.props,instance:this.state.kmlLayer}))},e.prototype.componentWillUnmount=function(){this.state.kmlLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),Pe(this.registeredEvents),this.state.kmlLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e})(l.PureComponent);function ko(t,e){return typeof e=="function"?e(t.offsetWidth,t.offsetHeight):{x:0,y:0}}function Xf(t,e){return new e(t.lat,t.lng)}function Jf(t,e){return new e(new google.maps.LatLng(t.ne.lat,t.ne.lng),new google.maps.LatLng(t.sw.lat,t.sw.lng))}function Qf(t,e,n){return t instanceof e?t:n(t,e)}function $f(t,e,n){return t instanceof e?t:n(t,e)}function ed(t,e,n){var r=t&&t.fromLatLngToDivPixel(n.getNorthEast()),a=t&&t.fromLatLngToDivPixel(n.getSouthWest());return r&&a?{left:"".concat(a.x+e.x,"px"),top:"".concat(r.y+e.y,"px"),width:"".concat(r.x-a.x-e.x,"px"),height:"".concat(a.y-r.y-e.y,"px")}:{left:"-9999px",top:"-9999px"}}function td(t,e,n){var r=t&&t.fromLatLngToDivPixel(n);if(r){var a=r.x,i=r.y;return{left:"".concat(a+e.x,"px"),top:"".concat(i+e.y,"px")}}return{left:"-9999px",top:"-9999px"}}function To(t,e,n,r){return n!==void 0?ed(t,e,$f(n,google.maps.LatLngBounds,Jf)):td(t,e,Qf(r,google.maps.LatLng,Xf))}function nd(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.height&&t.height===e.height}function rd(t,e,n,r,a){var i=function(o){Ve(s,o);function s(u,c,f,h){var p=o.call(this)||this;return p.container=u,p.pane=c,p.position=f,p.bounds=h,p}return s.prototype.onAdd=function(){var u,c=(u=this.getPanes())===null||u===void 0?void 0:u[this.pane];c==null||c.appendChild(this.container)},s.prototype.draw=function(){for(var u=this.getProjection(),c=me({},this.container?ko(this.container,a):{x:0,y:0}),f=To(u,c,this.bounds,this.position),h=0,p=Object.entries(f);h<p.length;h++){var v=p[h],C=v[0],g=v[1];this.container.style[C]=g}},s.prototype.onRemove=function(){this.container.parentNode!==null&&this.container.parentNode.removeChild(this.container)},s}(google.maps.OverlayView);return new i(t,e,n,r)}function Ro(t){if(!t)return"";var e=t instanceof google.maps.LatLng?t:new google.maps.LatLng(t.lat,t.lng);return e+""}function jo(t){if(!t)return"";var e=t instanceof google.maps.LatLngBounds?t:new google.maps.LatLngBounds(new google.maps.LatLng(t.south,t.east),new google.maps.LatLng(t.north,t.west));return e+""}function ad(t){var e=t.position,n=t.bounds,r=t.mapPaneName,a=t.zIndex,i=t.onLoad,o=t.onUnmount,s=t.getPixelPositionOffset,u=t.children,c=l.useContext(Le),f=l.useMemo(function(){var p=document.createElement("div");return p.style.position="absolute",p},[]),h=l.useMemo(function(){return rd(f,r,e,n,s)},[f,r,e,n]);return l.useEffect(function(){return i==null||i(h),h==null||h.setMap(c),function(){o==null||o(h),h==null||h.setMap(null)}},[c,h]),l.useEffect(function(){f.style.zIndex="".concat(a)},[a,f]),Ii.createPortal(u,f)}l.memo(ad),function(t){Ve(e,t);function e(n){var r=t.call(this,n)||this;r.state={paneEl:null,containerStyle:{position:"absolute"}},r.updatePane=function(){var i=r.props.mapPaneName,o=r.overlayView.getPanes();tt(!!i,"OverlayView requires props.mapPaneName but got %s",i),o?r.setState({paneEl:o[i]}):r.setState({paneEl:null})},r.onAdd=function(){var i,o;r.updatePane(),(o=(i=r.props).onLoad)===null||o===void 0||o.call(i,r.overlayView)},r.onPositionElement=function(){var i=r.overlayView.getProjection(),o=me({x:0,y:0},r.containerRef.current?ko(r.containerRef.current,r.props.getPixelPositionOffset):{}),s=To(i,o,r.props.bounds,r.props.position),u=r.state.containerStyle,c=u.left,f=u.top,h=u.width,p=u.height;nd(s,{left:c,top:f,width:h,height:p})||r.setState({containerStyle:{top:s.top||0,left:s.left||0,width:s.width||0,height:s.height||0,position:"absolute"}})},r.draw=function(){r.onPositionElement()},r.onRemove=function(){var i,o;r.setState(function(){return{paneEl:null}}),(o=(i=r.props).onUnmount)===null||o===void 0||o.call(i,r.overlayView)},r.containerRef=l.createRef();var a=new google.maps.OverlayView;return a.onAdd=r.onAdd,a.draw=r.draw,a.onRemove=r.onRemove,r.overlayView=a,r}return e.prototype.componentDidMount=function(){this.overlayView.setMap(this.context)},e.prototype.componentDidUpdate=function(n){var r=Ro(n.position),a=Ro(this.props.position),i=jo(n.bounds),o=jo(this.props.bounds);(r!==a||i!==o)&&this.overlayView.draw(),n.mapPaneName!==this.props.mapPaneName&&this.updatePane()},e.prototype.componentWillUnmount=function(){this.overlayView.setMap(null)},e.prototype.render=function(){var n=this.state.paneEl;return n?Ii.createPortal(x.jsx("div",{ref:this.containerRef,style:this.state.containerStyle,children:l.Children.only(this.props.children)}),n):null},e.FLOAT_PANE="floatPane",e.MAP_PANE="mapPane",e.MARKER_LAYER="markerLayer",e.OVERLAY_LAYER="overlayLayer",e.OVERLAY_MOUSE_TARGET="overlayMouseTarget",e.contextType=Le,e}(l.PureComponent);function id(){}var Io={onDblClick:"dblclick",onClick:"click"},No={opacity:function(t,e){t.setOpacity(e)}};function od(t){var e=t.url,n=t.bounds,r=t.options,a=t.visible,i=l.useContext(Le),o=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east)),s=l.useMemo(function(){var u=new google.maps.GroundOverlay(e,o,me({},r));return u},[]);return l.useEffect(function(){s!==null&&s.setMap(i)},[i]),l.useEffect(function(){typeof e<"u"&&s!==null&&(s.set("url",e),s.setMap(i))},[s,e]),l.useEffect(function(){typeof a<"u"&&s!==null&&s.setOpacity(a?1:0)},[s,a]),l.useEffect(function(){var u=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));typeof n<"u"&&s!==null&&(s.set("bounds",u),s.setMap(i))},[s,n]),null}l.memo(od),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={groundOverlay:null},n.setGroundOverlayCallback=function(){n.state.groundOverlay!==null&&n.props.onLoad&&n.props.onLoad(n.state.groundOverlay)},n}return e.prototype.componentDidMount=function(){tt(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var n=new google.maps.GroundOverlay(this.props.url,this.props.bounds,me(me({},this.props.options),{map:this.context}));this.registeredEvents=Fe({updaterMap:No,eventMap:Io,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{groundOverlay:n}},this.setGroundOverlayCallback)},e.prototype.componentDidUpdate=function(n){this.state.groundOverlay!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:No,eventMap:Io,prevProps:n,nextProps:this.props,instance:this.state.groundOverlay}))},e.prototype.componentWillUnmount=function(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))},e.prototype.render=function(){return null},e.defaultProps={onLoad:id},e.contextType=Le,e}(l.PureComponent);var zo={},_o={data:function(t,e){t.setData(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)}};function sd(t){var e=t.data,n=t.onLoad,r=t.onUnmount,a=t.options,i=l.useContext(Le),o=l.useState(null),s=o[0],u=o[1];return l.useEffect(function(){google.maps.visualization||tt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)},[]),l.useEffect(function(){tt(!!e,"data property is required in HeatmapLayer %s",e)},[e]),l.useEffect(function(){s!==null&&s.setMap(i)},[i]),l.useEffect(function(){a&&s!==null&&s.setOptions(a)},[s,a]),l.useEffect(function(){var c=new google.maps.visualization.HeatmapLayer(me(me({},a||{}),{data:e,map:i}));return u(c),n&&n(c),function(){s!==null&&(r&&r(s),s.setMap(null))}},[]),null}l.memo(sd),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={heatmapLayer:null},n.setHeatmapLayerCallback=function(){n.state.heatmapLayer!==null&&n.props.onLoad&&n.props.onLoad(n.state.heatmapLayer)},n}return e.prototype.componentDidMount=function(){tt(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to <LoadScript />? %s',google.maps.visualization),tt(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var n=new google.maps.visualization.HeatmapLayer(me(me({},this.props.options||{}),{data:this.props.data,map:this.context}));this.registeredEvents=Fe({updaterMap:_o,eventMap:zo,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{heatmapLayer:n}},this.setHeatmapLayerCallback)},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:_o,eventMap:zo,prevProps:n,nextProps:this.props,instance:this.state.heatmapLayer})},e.prototype.componentWillUnmount=function(){this.state.heatmapLayer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),Pe(this.registeredEvents),this.state.heatmapLayer.setMap(null))},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent);var Wo={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Uo={register:function(t,e,n){t.registerPanoProvider(e,n)},links:function(t,e){t.setLinks(e)},motionTracking:function(t,e){t.setMotionTracking(e)},options:function(t,e){t.setOptions(e)},pano:function(t,e){t.setPano(e)},position:function(t,e){t.setPosition(e)},pov:function(t,e){t.setPov(e)},visible:function(t,e){t.setVisible(e)},zoom:function(t,e){t.setZoom(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={streetViewPanorama:null},n.setStreetViewPanoramaCallback=function(){n.state.streetViewPanorama!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewPanorama)},n}return e.prototype.componentDidMount=function(){var n,r,a=(r=(n=this.context)===null||n===void 0?void 0:n.getStreetView())!==null&&r!==void 0?r:null;this.registeredEvents=Fe({updaterMap:Uo,eventMap:Wo,prevProps:{},nextProps:this.props,instance:a}),this.setState(function(){return{streetViewPanorama:a}},this.setStreetViewPanoramaCallback)},e.prototype.componentDidUpdate=function(n){this.state.streetViewPanorama!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Uo,eventMap:Wo,prevProps:n,nextProps:this.props,instance:this.state.streetViewPanorama}))},e.prototype.componentWillUnmount=function(){this.state.streetViewPanorama!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),Pe(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))},e.prototype.render=function(){return null},e.contextType=Le,e})(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={streetViewService:null},n.setStreetViewServiceCallback=function(){n.state.streetViewService!==null&&n.props.onLoad&&n.props.onLoad(n.state.streetViewService)},n}return e.prototype.componentDidMount=function(){var n=new google.maps.StreetViewService;this.setState(function(){return{streetViewService:n}},this.setStreetViewServiceCallback)},e.prototype.componentWillUnmount=function(){this.state.streetViewService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)},e.prototype.render=function(){return null},e.contextType=Le,e}(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={directionsService:null},n.setDirectionsServiceCallback=function(){n.state.directionsService!==null&&n.props.onLoad&&n.props.onLoad(n.state.directionsService)},n}return e.prototype.componentDidMount=function(){tt(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var n=new google.maps.DirectionsService;this.setState(function(){return{directionsService:n}},this.setDirectionsServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.directionsService!==null&&this.state.directionsService.route(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.directionsService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)},e.prototype.render=function(){return null},e}(l.PureComponent);var Ho={onDirectionsChanged:"directions_changed"},Vo={directions:function(t,e){t.setDirections(e)},map:function(t,e){t.setMap(e)},options:function(t,e){t.setOptions(e)},panel:function(t,e){t.setPanel(e)},routeIndex:function(t,e){t.setRouteIndex(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.state={directionsRenderer:null},n.setDirectionsRendererCallback=function(){n.state.directionsRenderer!==null&&(n.state.directionsRenderer.setMap(n.context),n.props.onLoad&&n.props.onLoad(n.state.directionsRenderer))},n}return e.prototype.componentDidMount=function(){var n=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=Fe({updaterMap:Vo,eventMap:Ho,prevProps:{},nextProps:this.props,instance:n}),this.setState(function(){return{directionsRenderer:n}},this.setDirectionsRendererCallback)},e.prototype.componentDidUpdate=function(n){this.state.directionsRenderer!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Vo,eventMap:Ho,prevProps:n,nextProps:this.props,instance:this.state.directionsRenderer}))},e.prototype.componentWillUnmount=function(){this.state.directionsRenderer!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),Pe(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))},e.prototype.render=function(){return x.jsx(x.Fragment,{})},e.contextType=Le,e})(l.PureComponent),function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={distanceMatrixService:null},n.setDistanceMatrixServiceCallback=function(){n.state.distanceMatrixService!==null&&n.props.onLoad&&n.props.onLoad(n.state.distanceMatrixService)},n}return e.prototype.componentDidMount=function(){tt(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var n=new google.maps.DistanceMatrixService;this.setState(function(){return{distanceMatrixService:n}},this.setDistanceMatrixServiceCallback)},e.prototype.componentDidUpdate=function(){this.state.distanceMatrixService!==null&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)},e.prototype.componentWillUnmount=function(){this.state.distanceMatrixService!==null&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)},e.prototype.render=function(){return null},e}(l.PureComponent);var qo={onPlacesChanged:"places_changed"},Zo={bounds:function(t,e){t.setBounds(e)}},ud=function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=l.createRef(),n.state={searchBox:null},n.setSearchBoxCallback=function(){n.state.searchBox!==null&&n.props.onLoad&&n.props.onLoad(n.state.searchBox)},n}return e.prototype.componentDidMount=function(){if(tt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places),this.containerElement!==null&&this.containerElement.current!==null){var n=this.containerElement.current.querySelector("input");if(n!==null){var r=new google.maps.places.SearchBox(n,this.props.options);this.registeredEvents=Fe({updaterMap:Zo,eventMap:qo,prevProps:{},nextProps:this.props,instance:r}),this.setState(function(){return{searchBox:r}},this.setSearchBoxCallback)}}},e.prototype.componentDidUpdate=function(n){this.state.searchBox!==null&&(Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Zo,eventMap:qo,prevProps:n,nextProps:this.props,instance:this.state.searchBox}))},e.prototype.componentWillUnmount=function(){this.state.searchBox!==null&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),Pe(this.registeredEvents))},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,children:l.Children.only(this.props.children)})},e.contextType=Le,e}(l.PureComponent),Go={onPlaceChanged:"place_changed"},Yo={bounds:function(t,e){t.setBounds(e)},restrictions:function(t,e){t.setComponentRestrictions(e)},fields:function(t,e){t.setFields(e)},options:function(t,e){t.setOptions(e)},types:function(t,e){t.setTypes(e)}};(function(t){Ve(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.registeredEvents=[],n.containerElement=l.createRef(),n.state={autocomplete:null},n.setAutocompleteCallback=function(){n.state.autocomplete!==null&&n.props.onLoad&&n.props.onLoad(n.state.autocomplete)},n}return e.prototype.componentDidMount=function(){var n;tt(!!google.maps.places,'You need to provide libraries={["places"]} prop to <LoadScript /> component %s',google.maps.places);var r=(n=this.containerElement.current)===null||n===void 0?void 0:n.querySelector("input");if(r){var a=new google.maps.places.Autocomplete(r,this.props.options);this.registeredEvents=Fe({updaterMap:Yo,eventMap:Go,prevProps:{},nextProps:this.props,instance:a}),this.setState(function(){return{autocomplete:a}},this.setAutocompleteCallback)}},e.prototype.componentDidUpdate=function(n){Pe(this.registeredEvents),this.registeredEvents=Fe({updaterMap:Yo,eventMap:Go,prevProps:n,nextProps:this.props,instance:this.state.autocomplete})},e.prototype.componentWillUnmount=function(){this.state.autocomplete!==null&&Pe(this.registeredEvents)},e.prototype.render=function(){return x.jsx("div",{ref:this.containerElement,className:this.props.className,children:l.Children.only(this.props.children)})},e.defaultProps={className:""},e.contextType=Le,e})(l.PureComponent);function ld({coordinates:t,zoom:e=18,draggable:n=!1,className:r,...a}){return t?x.jsx("div",{className:"arkynGoogleMapPinned "+r,...a,children:x.jsx(tf,{zoom:e,center:t,mapContainerStyle:{borderRadius:"var(--rounded-cards)",width:"100%",height:"100%"},children:x.jsx(df,{draggable:n,position:t})})}):x.jsx("div",{className:"arkynGoogleMapPinnedEmpty "+r,...a,children:x.jsx(Se.MapPinned,{})})}function cd(t){const{className:e,...n}=t,r=`arkynSkeleton ${e}`;return x.jsx("aside",{className:r.trim(),...n})}function fd(t){const{emptyMessage:e="Nenhum dado adicionado.",className:n,children:r,...a}=t,i=`arkynTableBody ${n}`,o=l.Children.count(r)===0;return x.jsx("tbody",{className:i.trim(),...a,children:o?x.jsx("tr",{className:"arkynTableBodyEmptyLine",children:x.jsx("td",{colSpan:100,children:x.jsx("div",{children:e})})}):r})}function dd(t){const{className:e,children:n,...r}=t,a=`arkynTableCaption ${e}`;return x.jsx("caption",{className:a.trim(),...r,children:x.jsx("div",{className:"arkynTableCaptionContent",children:n})})}function pd(t){const{children:e,className:n,...r}=t,a=`arkynTableContainer ${n}`;return x.jsx("div",{className:a.trim(),...r,children:x.jsx("table",{children:e})})}function hd(t){const{className:e,children:n,...r}=t,a=`arkynTableFooter ${e}`;return x.jsxs("tfoot",{className:a.trim(),...r,children:[x.jsx("tr",{className:"spacingRow"}),x.jsx("tr",{children:x.jsx("th",{colSpan:100,children:x.jsx("div",{className:"arkynTableFooterContent",children:n})})})]})}function vd(t){const{className:e,children:n,...r}=t,a=`arkynTableHeader ${e}`;return x.jsxs("thead",{className:a.trim(),...r,children:[x.jsx("tr",{children:n}),x.jsx("tr",{className:"spacingRow"})]})}function gd(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",loadingText:a,size:i="md",leftIcon:o,rightIcon:s,disabled:u,className:c="",children:f,...h}=t,v={xs:12,sm:16,md:20,lg:24}[i],d=`arkynButton ${e?"loadingTrue":"loadingFalse"} ${r} ${n} ${i} ${a?"loadingTextTrue":"loadingTextFalse"} ${c}`;return x.jsxs("button",{className:d,disabled:u||e,...h,children:[x.jsxs("div",{className:"arkynButtonSpinner",children:[x.jsx(Se.Loader2,{size:v,strokeWidth:2.5}),a&&a]}),x.jsxs("div",{className:"arkynButtonContent",children:[fr(v,o),f,fr(v,s)]})]})}const Ko=l.createContext({});function md(t){var h,p;const e=Dn.useActionData(),{children:n,className:r,id:a,...i}=t,o=l.useRef(null),s=((h=o.current)==null?void 0:h.name)||"",u=((p=e==null?void 0:e.fieldErrors)==null?void 0:p[s])||null,c=l.useId(),f=`arkynFormController ${r}`;return x.jsx(Ko.Provider,{value:{error:u,id:c,inputRef:o},children:x.jsx("section",{id:a||s||void 0,className:f.trim(),...i,children:n})})}function Ct(){return l.useContext(Ko)}function yd(t){const{name:e,className:n="",size:r="md",isError:a,defaultChecked:i=!1,checked:o=null,onCheck:s,value:u,...c}=t,{id:f,inputRef:h,error:p}=Ct(),v=a||!!p,[C,g]=l.useState(i||!1),d=typeof o=="boolean"?o:C,E=`arkynCheckbox ${r} ${v?"errorTrue":"errorFalse"} ${d?"checkedTrue":"checkedFalse"} ${n}`;function O(){const b=C;g(!b),s&&s(b?"":u||"checked")}return x.jsxs("button",{id:f,type:"button",className:E,onClick:O,...c,children:[x.jsx("input",{type:"hidden",name:e,ref:h,value:d?u||"checked":""}),x.jsx(Se.Check,{})]})}function Cd(t){const{children:e,className:n,...r}=t,a=`arkynFormError ${n}`,{error:i}=Ct();return e?x.jsx("strong",{className:a.trim(),...r,children:e}):i?x.jsx("strong",{className:a.trim(),...r,children:i}):x.jsx(x.Fragment,{})}function Dd(t){const{showAsterisk:e=!1,className:n="",...r}=t,{id:a}=Ct(),o=`arkynFormLabel ${e?"asteriskTrue":"asteriskFalse"} ${n}`;return x.jsx("label",{className:o.trim(),htmlFor:a,...r})}function qt(t,e,n){if(!t)return x.jsx(x.Fragment,{});if(typeof t=="string")return x.jsx("p",{className:n,children:t});const r=t;return x.jsx("p",{className:n,children:x.jsx(r,{color:"var(--secondary-600)",size:e,strokeWidth:2.5})})}function Ca(t){return t&&t.replace(/[^0-9]/g,"")}function Xo(t,e){let n="",r=0;return Array.from(t).forEach((a,i)=>{e[i+r].match(/[0-9]/)||(n+=e[i+r],r++),n+=a}),n}function Jo(t){return t.length>11?"CNPJ":"CPF"}const Da={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},Qo=Ca(Da.CNPJ).length;function bd(t,e){const{isLoading:n,isError:r,size:a="md",className:i="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,defaultValue:p,readOnly:v,onFocus:C,onBlur:g,title:d,style:D,onChange:B,...E}=t;function O(N){let z=Ca(N);const X=Jo(z);if(!(z.length>Qo))return z=Xo(z,Da[X]),z}const b=f?"right":"left",j=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${a} ${h||v||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${i}`,I={md:20,lg:20}[a];return{isLoading:n,className:j,prefix:qt(s,I,"prefix"),sufix:qt(u,I,"sufix"),LeftIcon:c,RightIcon:f,defaultValue:O(p||""),disabled:h,readOnly:v,onFocus:C,onBlur:g,title:d,style:D,onChange:B,loadingPosition:b,iconSize:I,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...E}}function Ed(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:a,id:i,error:o}=Ct(),s=a||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:v,sufix:C,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,Spinner:S,onChange:P,value:V,defaultValue:F,...j}=bd({...t,id:i,isError:u},e),[k,I]=l.useState(F),N=B&&!D,z=w&&!D,X=d==="left"&&D,_=d==="right"&&D;function $(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function re(Z){let H=Ca(Z.target.value);const Q=Jo(H);H.length>Qo||(H=Xo(H,Da[Q]),Z.target.value=H,I(H),P&&P(Z))}function T(Z){n(!0),O&&O(Z)}function R(Z){n(!1),b&&b(Z)}return x.jsxs("section",{title:f,style:h,onClick:$,className:p,children:[v,X&&S,N&&x.jsx(B,{size:g,strokeWidth:2.5}),x.jsx("input",{disabled:c||D,readOnly:E,ref:s,value:V||k,onFocus:T,onChange:re,onBlur:R,...j}),z&&x.jsx(w,{size:g,strokeWidth:2.5}),_&&S,C]})}const wd=3,Bd=(t="pt-BR",e,n="BRL",r=!0)=>new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"symbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e).slice(r?wd:0),vr=2,$o=t=>typeof t=="number"?t:Number(t.toString().replace(/[^0-9-]/g,"")),ba=t=>{let e=t;return typeof t=="string"?(e=$o(t),e%1!==0&&(e=e.toFixed(vr))):e=Number.isInteger(t)?Number(t)*10**vr:t.toFixed(vr),$o(e)/10**vr},es=(t,e,n)=>{if(!e)return[0,""];const r=ba(e),a=Bd(t,r,n);return[r,a]};function xd(t,e){const{isLoading:n,isError:r,size:a="md",className:i="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:v,onBlur:C,title:g,style:d,max:D=1e9,locale:B="pt-BR",currency:E="BRL",...O}=t,b=f?"right":"left",j=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${a} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${i}`,I={md:20,lg:20}[a];return{isLoading:n,className:j,prefix:qt(s,I,"prefix"),sufix:qt(u,I,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,locale:B,currency:E,readOnly:p,onFocus:v,onBlur:C,title:g,style:d,max:D,loadingPosition:b,iconSize:I,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...O}}function Ld(t){const[e,n]=l.useState(!1),[r,a]=l.useState("0"),i=l.useRef(null),{inputRef:o,id:s,error:u}=Ct(),c=o||i,f=t.isError||!!u,{disabled:h,title:p,style:v,className:C,prefix:g,sufix:d,iconSize:D,loadingPosition:B,isLoading:E,LeftIcon:O,readOnly:b,onFocus:w,onBlur:S,RightIcon:P,Spinner:V,value:F,max:j,onChangeValue:k,onKeyPress:I,currency:N,locale:z,name:X,defaultValue:_,...$}=xd({...t,id:s,isError:f},e),re=O&&!E,T=P&&!E,R=B==="left"&&E,Z=B==="right"&&E;function H(){h||!(c!=null&&c.current)||(n(!0),c.current.focus())}function Q(M){n(!0),w&&w(M)}function K(M){n(!1),S&&S(M)}const y=M=>{const[J,ne]=es(z,M,N);return!j||J<=j?(a(ne),[J,ne]):[ba(r),r]},U=M=>{M.preventDefault();const[J,ne]=y(M.target.value);k(M,String(J),String(ne))},W=M=>I&&I(M,M.key,M.key);return l.useEffect(()=>{const M=F||+_||void 0,[,J]=es(z,M,N);a(J)},[N,_,F]),x.jsxs("section",{title:p,style:v,onClick:H,className:C,children:[g,R&&V,re&&x.jsx(O,{size:D,strokeWidth:2.5}),x.jsx("input",{value:r,onChange:U,onBlur:K,onFocus:Q,onKeyUp:W,disabled:h||E,readOnly:b,...$}),x.jsx("input",{type:"hidden",ref:c,name:X,value:ba(r)}),Z&&V,T&&x.jsx(P,{size:D,strokeWidth:2.5}),d]})}function Sd(t,e){const{isLoading:n,isError:r,size:a="md",className:i="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:v,onBlur:C,title:g,style:d,onChange:D,showMask:B=!1,type:E,...O}=t,b=f?"right":"left",j=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${a} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${i}`,I={md:20,lg:20}[a];return{isLoading:n,className:j,prefix:qt(s,I,"prefix"),sufix:qt(u,I,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,readOnly:p,onFocus:v,onBlur:C,title:g,style:d,onChange:D,loadingPosition:b,iconSize:I,showMask:B,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...O}}const Ad=l.forwardRef((t,e)=>x.jsx("input",{ref:e,...t}));function Od(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:a,id:i,error:o}=Ct(),s=a||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:v,sufix:C,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,Spinner:S,...P}=Sd({...t,id:i,isError:u},e),V=B&&!D,F=w&&!D,j=d==="left"&&D,k=d==="right"&&D;function I(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function N(X){n(!0),O&&O(X)}function z(X){n(!1),b&&b(X)}return x.jsxs("section",{title:f,style:h,onClick:I,className:p,children:[v,j&&S,V&&x.jsx(B,{size:g,strokeWidth:2.5}),x.jsx(Ac.InputMask,{component:Ad,ref:s,onFocus:N,onBlur:z,disabled:c,...P}),F&&x.jsx(w,{size:g,strokeWidth:2.5}),k&&S,C]})}function Fd(t,e){const{isLoading:n,isError:r,size:a="md",className:i="",variant:o="solid",prefix:s,sufix:u,leftIcon:c,rightIcon:f,disabled:h,readOnly:p,onFocus:v,onBlur:C,title:g,style:d,onChange:D,...B}=t,E=f?"right":"left",V=`arkyn_input ${s?"hasPrefix":""} ${u?"hasSufix":""} ${o} ${a} ${h||p||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${i}`,j={md:20,lg:20}[a];return{isLoading:n,className:V,prefix:qt(s,j,"prefix"),sufix:qt(u,j,"sufix"),LeftIcon:c,RightIcon:f,disabled:h,readOnly:p,onFocus:v,onBlur:C,title:g,style:d,onChange:D,loadingPosition:E,iconSize:j,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...B}}function Pd(t){const[e,n]=l.useState(!1),r=l.useRef(null),{inputRef:a,id:i,error:o}=Ct(),s=a||r,u=t.isError||!!o,{disabled:c,title:f,style:h,className:p,prefix:v,sufix:C,iconSize:g,loadingPosition:d,isLoading:D,LeftIcon:B,readOnly:E,onFocus:O,onBlur:b,RightIcon:w,type:S,Spinner:P,...V}=Fd({...t,id:i,isError:u},e),F=B&&!D,j=w&&!D,k=d==="left"&&D,I=d==="right"&&D;function N(){c||!(s!=null&&s.current)||(n(!0),s.current.focus())}function z(_){n(!0),O&&O(_)}function X(_){n(!1),b&&b(_)}return S==="hidden"?x.jsx("input",{style:{display:"none"},readOnly:!0,type:"text",ref:s,...V}):x.jsxs("section",{title:f,style:h,onClick:N,className:p,children:[v,k&&P,F&&x.jsx(B,{size:g,strokeWidth:2.5}),x.jsx("input",{disabled:c||D,readOnly:E,ref:s,onFocus:z,onBlur:X,type:S,...V}),j&&x.jsx(w,{size:g,strokeWidth:2.5}),I&&P,C]})}function ts(t){return t.type==="currency"?x.jsx(Ld,{...t}):t.type==="masked"?x.jsx(Od,{...t}):t.type==="cpf-cnpj"?x.jsx(Ed,{...t}):x.jsx(Pd,{...t})}function Md({onChange:t,onPlaceChanged:e,options:n,...r}){const[a,i]=l.useState(null),o=u=>i(u),s=()=>{var v,C,g,d;const c=a.getPlaces()[0],f=c==null?void 0:c.address_components;function h(D){const B=f.find(E=>E.types[0]===D);return B?B.long_name:""}function p(D){const B=f.find(E=>E.types[0]===D);return B?B.short_name:""}if(c){const D=h("route"),B=h("street_number"),E=h("sublocality_level_1"),O=h("administrative_area_level_2"),b=h("administrative_area_level_1"),w=p("administrative_area_level_1"),S=h("postal_code"),P=(C=(v=c.geometry)==null?void 0:v.location)==null?void 0:C.lat(),V=(d=(g=c.geometry)==null?void 0:g.location)==null?void 0:d.lng();e&&e({street:D,city:O,state:b,district:E,cep:S,streetNumber:B,stateShortName:w,coordinates:{lat:P,lng:V}})}};return x.jsx(ud,{onLoad:o,onPlacesChanged:s,options:n,children:x.jsx(ts,{type:"text",onChange:u=>t(u.target.value),...r})})}function kd(t){const{isLoading:e=!1,scheme:n="primary",variant:r="solid",size:a="md",icon:i,disabled:o,className:s="",...u}=t,c={xs:12,sm:16,md:20,lg:24},h=`arkynIconButton ${r} ${n} ${a} ${e?"loadingTrue":"loadingFalse"} ${s}`;return x.jsxs("button",{disabled:o||e,className:h.trim(),...u,children:[x.jsx("div",{className:"arkynIconButtonSpinner",children:x.jsx(Se.Loader2,{size:c[a],strokeWidth:2.5})}),x.jsx("div",{className:"arkynIconButtonContent",children:x.jsx(i,{size:c[a],strokeWidth:2.5})})]})}const ns=l.createContext({});function Td(){return l.useContext(ns)}function Rd(t){const{defaultValue:e,name:n,value:r,onChange:a,size:i="md",className:o="",...s}=t,[u,c]=l.useState(e||""),{inputRef:f,id:h}=Ct();function p(C){c(C),a&&a(C)}const v=`arkynRadioGroup ${i} ${o}`;return x.jsxs(ns.Provider,{value:{onChange:p,value:r||u,size:i},children:[x.jsx("input",{style:{display:"none"},type:"text",id:h,readOnly:!0,name:n,ref:f,value:r||u}),x.jsx("div",{className:v.trim(),...s})]})}function jd(t){const{value:e,size:n,disabled:r,children:a,className:i="",...o}=t,{onChange:s,size:u,value:c}=Td(),{error:f}=Ct(),g=`arkynRadioBox ${n||u} ${c===e?"checkedTrue":"checkedFalse"} ${f?"errorTrue":"errorFalse"} ${r?"disabledTrue":"disabledFalse"} ${i}`;return x.jsxs("label",{className:g.trim(),children:[x.jsx("button",{type:"button",disabled:r,onClick:()=>s(e),onFocus:()=>s(e),...o}),a]})}var Rt={};Object.defineProperty(Rt,"__esModule",{value:!0});for(var Id=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Ea={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},rs={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:Id?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},wa={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},gr=1;gr<20;gr++)wa["f"+gr]=111+gr;function mr(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map(function(o){return as(o,e)}),a=function(s){return r.some(function(u){return is(u,s)})},i=n==null?a:a(n);return i}function Nd(t,e){return mr(t,e)}function zd(t,e){return mr(t,{byKey:!0},e)}function as(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var a=t.split("+"),i=a.length;for(var o in Ea)r[Ea[o]]=!1;var s=!0,u=!1,c=void 0;try{for(var f=a[Symbol.iterator](),h;!(s=(h=f.next()).done);s=!0){var p=h.value,v=p.endsWith("?")&&p.length>1;v&&(p=p.slice(0,-1));var C=Ba(p),g=Ea[C];if(p.length>1&&!g&&!rs[p]&&!wa[C])throw new TypeError('Unknown modifier: "'+p+'"');(i===1||!g)&&(n?r.key=C:r.which=os(p)),g&&(r[g]=v?null:!0)}}catch(d){u=!0,c=d}finally{try{!s&&f.return&&f.return()}finally{if(u)throw c}}return r}function is(t,e){for(var n in t){var r=t[n],a=void 0;if(r!=null&&(n==="key"&&e.key!=null?a=e.key.toLowerCase():n==="which"?a=r===91&&e.which===93?91:e.which:a=e[n],!(a==null&&r===!1)&&a!==r))return!1}return!0}function os(t){t=Ba(t);var e=wa[t]||t.toUpperCase().charCodeAt(0);return e}function Ba(t){return t=t.toLowerCase(),t=rs[t]||t,t}var _d=Rt.default=mr,xa=Rt.isHotkey=mr;Rt.isCodeHotkey=Nd,Rt.isKeyHotkey=zd,Rt.parseHotkey=as,Rt.compareHotkey=is,Rt.toKeyCode=os,Rt.toKeyName=Ba;/*!
72
72
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
73
73
  *
74
74
  * Copyright (c) 2014-2017, Jon Schlinkert.
75
75
  * Released under the MIT License.
76
- */function ss(t){return Object.prototype.toString.call(t)==="[object Object]"}function ct(t){var e,n;return ss(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(ss(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var us=Symbol.for("immer-nothing"),ls=Symbol.for("immer-draftable"),Dt=Symbol.for("immer-state"),Wd=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function gt(t,...e){if(process.env.NODE_ENV!=="production"){const n=Wd[t],r=typeof n=="function"?n.apply(null,e):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var bn=Object.getPrototypeOf;function on(t){return!!t&&!!t[Dt]}function sn(t){var e;return t?cs(t)||Array.isArray(t)||!!t[ls]||!!((e=t.constructor)!=null&&e[ls])||Dr(t)||br(t):!1}var Ud=Object.prototype.constructor.toString();function cs(t){if(!t||typeof t!="object")return!1;const e=bn(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Ud}function yr(t,e){Cr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Cr(t){const e=t[Dt];return e?e.type_:Array.isArray(t)?1:Dr(t)?2:br(t)?3:0}function Li(t,e){return Cr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function fs(t,e,n){const r=Cr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Hd(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Dr(t){return t instanceof Map}function br(t){return t instanceof Set}function un(t){return t.copy_||t.base_}function Si(t,e){if(Dr(t))return new Map(t);if(br(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=cs(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Dt];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],s=r[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(bn(t),r)}else{const r=bn(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Ai(t,e=!1){return Er(t)||on(t)||!sn(t)||(Cr(t)>1&&(t.set=t.add=t.clear=t.delete=Vd),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Ai(r,!0))),t}function Vd(){gt(2)}function Er(t){return Object.isFrozen(t)}var qd={};function ln(t){const e=qd[t];return e||gt(0,t),e}var _n;function ds(){return _n}function Zd(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ps(t,e){e&&(ln("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Oi(t){Fi(t),t.drafts_.forEach(Gd),t.drafts_=null}function Fi(t){t===_n&&(_n=t.parent_)}function hs(t){return _n=Zd(_n,t)}function Gd(t){const e=t[Dt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function vs(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Dt].modified_&&(Oi(e),gt(4)),sn(t)&&(t=wr(e,t),e.parent_||Br(e,t)),e.patches_&&ln("Patches").generateReplacementPatches_(n[Dt].base_,t,e.patches_,e.inversePatches_)):t=wr(e,n,[]),Oi(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==us?t:void 0}function wr(t,e,n){if(Er(e))return e;const r=e[Dt];if(!r)return yr(e,(i,a)=>gs(t,r,e,i,a,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Br(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let a=i,o=!1;r.type_===3&&(a=new Set(i),i.clear(),o=!0),yr(a,(s,u)=>gs(t,r,i,s,u,n,o)),Br(t,i,!1),n&&t.patches_&&ln("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function gs(t,e,n,r,i,a,o){if(process.env.NODE_ENV!=="production"&&i===n&&gt(5),on(i)){const s=a&&e&&e.type_!==3&&!Li(e.assigned_,r)?a.concat(r):void 0,u=wr(t,i,s);if(fs(n,r,u),on(u))t.canAutoFreeze_=!1;else return}else o&&n.add(i);if(sn(i)&&!Er(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;wr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Br(t,i)}}function Br(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Ai(e,n)}function Yd(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:ds(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=Pi;n&&(i=[r],a=Wn);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,s}var Pi={get(t,e){if(e===Dt)return t;const n=un(t);if(!Li(n,e))return Kd(t,n,e);const r=n[e];return t.finalized_||!sn(r)?r:r===Mi(t.base_,e)?(Ti(t),t.copy_[e]=Ri(r,t)):r},has(t,e){return e in un(t)},ownKeys(t){return Reflect.ownKeys(un(t))},set(t,e,n){const r=ms(un(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=Mi(un(t),e),a=i==null?void 0:i[Dt];if(a&&a.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(Hd(n,i)&&(n!==void 0||Li(t.base_,e)))return!0;Ti(t),ki(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Mi(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Ti(t),ki(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=un(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){gt(11)},getPrototypeOf(t){return bn(t.base_)},setPrototypeOf(){gt(12)}},Wn={};yr(Pi,(t,e)=>{Wn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Wn.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&gt(13),Wn.set.call(this,t,e,void 0)},Wn.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&gt(14),Pi.set.call(this,t[0],e,n,t[0])};function Mi(t,e){const n=t[Dt];return(n?un(n):t)[e]}function Kd(t,e,n){var i;const r=ms(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function ms(t,e){if(!(e in t))return;let n=bn(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=bn(n)}}function ki(t){t.modified_||(t.modified_=!0,t.parent_&&ki(t.parent_))}function Ti(t){t.copy_||(t.copy_=Si(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Xd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const a=n;n=e;const o=this;return function(u=a,...c){return o.produce(u,f=>n.call(this,f,...c))}}typeof n!="function"&&gt(6),r!==void 0&&typeof r!="function"&&gt(7);let i;if(sn(e)){const a=hs(this),o=Ri(e,void 0);let s=!0;try{i=n(o),s=!1}finally{s?Oi(a):Fi(a)}return ps(a,r),vs(i,a)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===us&&(i=void 0),this.autoFreeze_&&Ai(i,!0),r){const a=[],o=[];ln("Patches").generateReplacementPatches_(e,i,a,o),r(a,o)}return i}else gt(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,u=>e(u,...s));let r,i;return[this.produce(e,n,(o,s)=>{r=o,i=s}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){sn(t)||gt(8),on(t)&&(t=Jd(t));const e=hs(this),n=Ri(t,void 0);return n[Dt].isManual_=!0,Fi(e),n}finishDraft(t,e){const n=t&&t[Dt];(!n||!n.isManual_)&&gt(9);const{scope_:r}=n;return ps(r,e),vs(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=ln("Patches").applyPatches_;return on(t)?r(t,e):this.produce(t,i=>r(i,e))}};function Ri(t,e){const n=Dr(t)?ln("MapSet").proxyMap_(t,e):br(t)?ln("MapSet").proxySet_(t,e):Yd(t,e);return(e?e.scope_:ds()).drafts_.push(n),n}function Jd(t){return on(t)||gt(10,t),ys(t)}function ys(t){if(!sn(t)||Er(t))return t;const e=t[Dt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Si(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Si(t,!0);return yr(n,(r,i)=>{fs(n,r,ys(i))}),e&&(e.finalized_=!1),n}var bt=new Xd,ji=bt.produce;bt.produceWithPatches.bind(bt),bt.setAutoFreeze.bind(bt),bt.setUseStrictShallowCopy.bind(bt),bt.applyPatches.bind(bt);var Cs=bt.createDraft.bind(bt),Ds=bt.finishDraft.bind(bt),Qd={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=A.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},$d={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=Ae.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},ep={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var i=q.transform(n,e,{affinity:r});t.current=i,i==null&&t.unref()}}},xr=new WeakMap,Lr=new WeakMap,Un=new WeakMap,bs=new WeakMap,Es=new WeakMap,ws=new WeakMap,Bs=new WeakMap,A={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=A.levels(t,e);return n?r=r.slice(1):r=r.slice(0,-1),r},common(t,e){for(var n=[],r=0;r<t.length&&r<e.length;r++){var i=t[r],a=e[r];if(i!==a)break;n.push(i)}return n},compare(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return 0},endsAfter(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return A.equals(r,i)&&a>o},endsAt(t,e){var n=t.length,r=t.slice(0,n),i=e.slice(0,n);return A.equals(r,i)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return A.equals(r,i)&&a<o},equals(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return A.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&A.compare(t,e)===0},isBefore(t,e){return A.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&A.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&A.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&A.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&A.compare(t,e)===0},isPath(t){return Array.isArray(t)&&(t.length===0||typeof t[0]=="number")},isSibling(t,e){if(t.length!==e.length)return!1;var n=t.slice(0,-1),r=e.slice(0,-1),i=t[t.length-1],a=e[e.length-1];return i!==a&&A.equals(n,r)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=[],i=0;i<=t.length;i++)r.push(t.slice(0,i));return n&&r.reverse(),r},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},operationCanTransformPath(t){switch(t.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!A.isAncestor(e,t)&&!A.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var r=[...t],{affinity:i="forward"}=n;if(t.length===0)return r;switch(e.type){case"insert_node":{var{path:a}=e;(A.equals(a,r)||A.endsBefore(a,r)||A.isAncestor(a,r))&&(r[a.length-1]+=1);break}case"remove_node":{var{path:o}=e;if(A.equals(o,r)||A.isAncestor(o,r))return null;A.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=e;A.equals(s,r)||A.endsBefore(s,r)?r[s.length-1]-=1:A.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break}case"split_node":{var{path:c,position:f}=e;if(A.equals(c,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else A.endsBefore(c,r)?r[c.length-1]+=1:A.isAncestor(c,r)&&t[c.length]>=f&&(r[c.length-1]+=1,r[c.length]-=f);break}case"move_node":{var{path:h,newPath:p}=e;if(A.equals(h,p))return r;if(A.isAncestor(h,r)||A.equals(h,r)){var g=p.slice();return A.endsBefore(h,p)&&h.length<p.length&&(g[h.length-1]-=1),g.concat(r.slice(h.length))}else A.isSibling(h,p)&&(A.isAncestor(p,r)||A.equals(p,r))?A.endsBefore(h,r)?r[h.length-1]-=1:r[h.length-1]+=1:A.endsBefore(p,r)||A.equals(p,r)||A.isAncestor(p,r)?(A.endsBefore(h,r)&&(r[h.length-1]-=1),r[p.length-1]+=1):A.endsBefore(h,r)&&(A.equals(p,r)&&(r[p.length-1]+=1),r[h.length-1]-=1);break}}return r}};function Hn(t){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hn(t)}function tp(t,e){if(Hn(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Hn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function np(t){var e=tp(t,"string");return Hn(e)==="symbol"?e:String(e)}function ft(t,e,n){return e=np(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rp=(t,e,n)=>{switch(n.type){case"insert_node":{var{path:r,node:i}=n,a=ie.parent(t,r),o=r[r.length-1];if(o>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(a.children.splice(o,0,i),e)for(var[s,u]of q.points(e))e[u]=Ae.transform(s,n);break}case"insert_text":{var{path:c,offset:f,text:h}=n;if(h.length===0)break;var p=ie.leaf(t,c),g=p.text.slice(0,f),C=p.text.slice(f);if(p.text=g+h+C,e)for(var[v,d]of q.points(e))e[d]=Ae.transform(v,n);break}case"merge_node":{var{path:D}=n,B=ie.get(t,D),w=A.previous(D),O=ie.get(t,w),b=ie.parent(t,D),E=D[D.length-1];if(ce.isText(B)&&ce.isText(O))O.text+=B.text;else if(!ce.isText(B)&&!ce.isText(O))O.children.push(...B.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(st.stringify(B)," ").concat(st.stringify(O)));if(b.children.splice(E,1),e)for(var[S,F]of q.points(e))e[F]=Ae.transform(S,n);break}case"move_node":{var{path:V,newPath:P}=n;if(A.isAncestor(V,P))throw new Error("Cannot move a path [".concat(V,"] to new path [").concat(P,"] because the destination is inside itself."));var z=ie.get(t,V),R=ie.parent(t,V),I=V[V.length-1];R.children.splice(I,1);var j=A.transform(V,n),N=ie.get(t,A.parent(j)),X=j[j.length-1];if(N.children.splice(X,0,z),e)for(var[_,$]of q.points(e))e[$]=Ae.transform(_,n);break}case"remove_node":{var{path:re}=n,k=re[re.length-1],T=ie.parent(t,re);if(T.children.splice(k,1),e)for(var[Z,H]of q.points(e)){var Q=Ae.transform(Z,n);if(e!=null&&Q!=null)e[H]=Q;else{var K=void 0,y=void 0;for(var[U,W]of ie.texts(t))if(A.compare(W,re)===-1)K=[U,W];else{y=[U,W];break}var M=!1;K&&y&&(A.equals(y[1],re)?M=!A.hasPrevious(y[1]):M=A.common(K[1],re).length<A.common(y[1],re).length),K&&!M?(Z.path=K[1],Z.offset=K[0].text.length):y?(Z.path=y[1],Z.offset=0):e=null}}break}case"remove_text":{var{path:J,offset:ne,text:G}=n;if(G.length===0)break;var ue=ie.leaf(t,J),ae=ue.text.slice(0,ne),de=ue.text.slice(ne+G.length);if(ue.text=ae+de,e)for(var[pe,Ce]of q.points(e))e[Ce]=Ae.transform(pe,n);break}case"set_node":{var{path:ye,properties:ge,newProperties:ve}=n;if(ye.length===0)throw new Error("Cannot set properties on the root node!");var Ie=ie.get(t,ye);for(var se in ve){if(se==="children"||se==="text")throw new Error('Cannot set the "'.concat(se,'" property of nodes!'));var Ne=ve[se];Ne==null?delete Ie[se]:Ie[se]=Ne}for(var fe in ge)ve.hasOwnProperty(fe)||delete Ie[fe];break}case"set_selection":{var{newProperties:we}=n;if(we==null)e=we;else{if(e==null){if(!q.isRange(we))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(st.stringify(we)," when there is no current selection."));e=Vn({},we)}for(var Me in we){var He=we[Me];if(He==null){if(Me==="anchor"||Me==="focus")throw new Error('Cannot remove the "'.concat(Me,'" selection property'));delete e[Me]}else e[Me]=He}}break}case"split_node":{var{path:qe,position:Ee,properties:ut}=n;if(qe.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(qe,"] because the root node cannot be split."));var at=ie.get(t,qe),At=ie.parent(t,qe),ht=qe[qe.length-1],wt;if(ce.isText(at)){var Tt=at.text.slice(0,Ee),vt=at.text.slice(Ee);at.text=Tt,wt=Vn(Vn({},ut),{},{text:vt})}else{var tn=at.children.slice(0,Ee),be=at.children.slice(Ee);at.children=tn,wt=Vn(Vn({},ut),{},{children:be})}if(At.children.splice(ht+1,0,wt),e)for(var[Te,Re]of q.points(e))e[Re]=Ae.transform(Te,n);break}}return e},ip={transform(t,e){t.children=Cs(t.children);var n=t.selection&&Cs(t.selection);try{n=rp(t,n,e)}finally{t.children=Ds(t.children),n?t.selection=on(n)?Ds(n):n:t.selection=null}}},ap={insertNodes(t,e,n){t.insertNodes(e,n)},liftNodes(t,e){t.liftNodes(e)},mergeNodes(t,e){t.mergeNodes(e)},moveNodes(t,e){t.moveNodes(e)},removeNodes(t,e){t.removeNodes(e)},setNodes(t,e,n){t.setNodes(e,n)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,n){t.unsetNodes(e,n)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,n){t.wrapNodes(e,n)}},op={collapse(t,e){t.collapse(e)},deselect(t){t.deselect()},move(t,e){t.move(e)},select(t,e){t.select(e)},setPoint(t,e,n){t.setPoint(e,n)},setSelection(t,e){t.setSelection(e)}},Ls=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(ct(r)&&ct(i)){if(!Ls(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==i[a])return!1}else if(r!==i)return!1}for(var o in e)if(t[o]===void 0&&e[o]!==void 0)return!1;return!0};function sp(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function jt(t,e){if(t==null)return{};var n=sp(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var up=["anchor","focus"];function Ss(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function lp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ss(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ss(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var q={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:i}=t;return q.isBackward(t)===n?[r,i]:[i,r]},end(t){var[,e]=q.edges(t);return e},equals(t,e){return Ae.equals(t.anchor,e.anchor)&&Ae.equals(t.focus,e.focus)},includes(t,e){if(q.isRange(e)){if(q.includes(t,e.anchor)||q.includes(t,e.focus))return!0;var[n,r]=q.edges(t),[i,a]=q.edges(e);return Ae.isBefore(n,i)&&Ae.isAfter(r,a)}var[o,s]=q.edges(t),u=!1,c=!1;return Ae.isPoint(e)?(u=Ae.compare(e,o)>=0,c=Ae.compare(e,s)<=0):(u=A.compare(e,o.path)>=0,c=A.compare(e,s.path)<=0),u&&c},intersection(t,e){var n=jt(t,up),[r,i]=q.edges(t),[a,o]=q.edges(e),s=Ae.isBefore(r,a)?a:r,u=Ae.isBefore(i,o)?i:o;return Ae.isBefore(u,s)?null:lp({anchor:s,focus:u},n)},isBackward(t){var{anchor:e,focus:n}=t;return Ae.isAfter(e,n)},isCollapsed(t){var{anchor:e,focus:n}=t;return Ae.equals(e,n)},isExpanded(t){return!q.isCollapsed(t)},isForward(t){return!q.isBackward(t)},isRange(t){return ct(t)&&Ae.isPoint(t.anchor)&&Ae.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=q.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ji(t,r=>{if(r===null)return null;var{affinity:i="inward"}=n,a,o;if(i==="inward"){var s=q.isCollapsed(r);q.isForward(r)?(a="forward",o=s?a:"backward"):(a="backward",o=s?a:"forward")}else i==="outward"?q.isForward(r)?(a="backward",o="forward"):(a="forward",o="backward"):(a=i,o=i);var u=Ae.transform(r.anchor,e,{affinity:a}),c=Ae.transform(r.focus,e,{affinity:o});if(!u||!c)return null;r.anchor=u,r.focus=c})}},As=t=>ct(t)&&ie.isNodeList(t.children)&&!m.isEditor(t),le={isAncestor(t){return ct(t)&&ie.isNodeList(t.children)},isElement:As,isElementList(t){return Array.isArray(t)&&t.every(e=>le.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return As(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},cp=["children"],fp=["text"],Os=new WeakMap,ie={ancestor(t,e){var n=ie.get(t,e);if(ce.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(st.stringify(n)));return n},ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of A.ancestors(e,n)){var i=ie.ancestor(t,r),a=[i,r];yield a}}()},child(t,e){if(ce.isText(t))throw new Error("Cannot get the child of a text node: ".concat(st.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(st.stringify(t)));return n},children(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,i=ie.ancestor(t,e),{children:a}=i,o=r?a.length-1:0;r?o>=0:o<a.length;){var s=ie.child(i,o),u=e.concat(o);yield[s,u],o=r?o-1:o+1}}()},common(t,e,n){var r=A.common(e,n),i=ie.get(t,r);return[i,r]},descendant(t,e){var n=ie.get(t,e);if(m.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(st.stringify(n)));return n},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))r.length!==0&&(yield[n,r])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))le.isElement(n)&&(yield[n,r])}()},extractProps(t){if(le.isAncestor(t)){var e=jt(t,cp);return e}else{var e=jt(t,fp);return e}},first(t,e){for(var n=e.slice(),r=ie.get(t,n);r&&!(ce.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(t,e){if(ce.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(st.stringify(t)));var n=ji({children:t.children},r=>{var[i,a]=q.edges(e),o=ie.nodes(r,{reverse:!0,pass:p=>{var[,g]=p;return!q.includes(e,g)}});for(var[,s]of o){if(!q.includes(e,s)){var u=ie.parent(r,s),c=s[s.length-1];u.children.splice(c,1)}if(A.equals(s,a.path)){var f=ie.leaf(r,s);f.text=f.text.slice(0,a.offset)}if(A.equals(s,i.path)){var h=ie.leaf(r,s);h.text=h.text.slice(i.offset)}}m.isEditor(r)&&(r.selection=null)});return n.children},get(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(st.stringify(t)));n=n.children[i]}return n},has(t,e){for(var n=t,r=0;r<e.length;r++){var i=e[r];if(ce.isText(n)||!n.children[i])return!1;n=n.children[i]}return!0},isNode(t){return ce.isText(t)||le.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=Os.get(t);if(e!==void 0)return e;var n=t.every(r=>ie.isNode(r));return Os.set(t,n),n},last(t,e){for(var n=e.slice(),r=ie.get(t,n);r&&!(ce.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(t,e){var n=ie.get(t,e);if(!ce.isText(n))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(st.stringify(n)));return n},levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of A.levels(e,n)){var i=ie.get(t,r);yield[i,r]}}()},matches(t,e){return le.isElement(t)&&le.isElementProps(e)&&le.matches(t,e)||ce.isText(t)&&ce.isTextProps(e)&&ce.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=e,{from:i=[],to:a}=e,o=new Set,s=[],u=t;!(a&&(r?A.isBefore(s,a):A.isAfter(s,a)));){if(o.has(u)||(yield[u,s]),!o.has(u)&&!ce.isText(u)&&u.children.length!==0&&(n==null||n([u,s])===!1)){o.add(u);var c=r?u.children.length-1:0;A.isAncestor(s,i)&&(c=i[s.length]),s=s.concat(c),u=ie.get(t,s);continue}if(s.length===0)break;if(!r){var f=A.next(s);if(ie.has(t,f)){s=f,u=ie.get(t,s);continue}}if(r&&s[s.length-1]!==0){var h=A.previous(s);s=h,u=ie.get(t,s);continue}s=A.parent(s),u=ie.get(t,s),o.add(u)}}()},parent(t,e){var n=A.parent(e),r=ie.get(t,n);if(ce.isText(r))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return r},string(t){return ce.isText(t)?t.text:t.children.map(ie.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ie.nodes(t,e))ce.isText(n)&&(yield[n,r])}()}};function Fs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ze(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zt={isNodeOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!ct(t))return!1;switch(t.type){case"insert_node":return A.isPath(t.path)&&ie.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&A.isPath(t.path);case"merge_node":return typeof t.position=="number"&&A.isPath(t.path)&&ct(t.properties);case"move_node":return A.isPath(t.path)&&A.isPath(t.newPath);case"remove_node":return A.isPath(t.path)&&ie.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&A.isPath(t.path);case"set_node":return A.isPath(t.path)&&ct(t.properties)&&ct(t.newProperties);case"set_selection":return t.properties===null&&q.isRange(t.newProperties)||t.newProperties===null&&q.isRange(t.properties)||ct(t.properties)&&ct(t.newProperties);case"split_node":return A.isPath(t.path)&&typeof t.position=="number"&&ct(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>Zt.isOperation(e))},isSelectionOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return Ze(Ze({},t),{},{type:"remove_node"});case"insert_text":return Ze(Ze({},t),{},{type:"remove_text"});case"merge_node":return Ze(Ze({},t),{},{type:"split_node",path:A.previous(t.path)});case"move_node":{var{newPath:e,path:n}=t;if(A.equals(e,n))return t;if(A.isSibling(n,e))return Ze(Ze({},t),{},{path:e,newPath:n});var r=A.transform(n,t),i=A.transform(A.next(n),t);return Ze(Ze({},t),{},{path:r,newPath:i})}case"remove_node":return Ze(Ze({},t),{},{type:"insert_node"});case"remove_text":return Ze(Ze({},t),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:o}=t;return Ze(Ze({},t),{},{properties:o,newProperties:a})}case"set_selection":{var{properties:s,newProperties:u}=t;return s==null?Ze(Ze({},t),{},{properties:u,newProperties:null}):u==null?Ze(Ze({},t),{},{properties:null,newProperties:s}):Ze(Ze({},t),{},{properties:u,newProperties:s})}case"split_node":return Ze(Ze({},t),{},{type:"merge_node",path:A.next(t.path)})}}},Ps=new WeakMap,dp=t=>{var e=Ps.get(t);if(e!==void 0)return e;if(!ct(t))return!1;var n=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isInline=="function"&&typeof t.isSelectable=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&typeof t.getDirtyPaths=="function"&&(t.marks===null||ct(t.marks))&&(t.selection===null||q.isRange(t.selection))&&ie.isNodeList(t.children)&&Zt.isOperationList(t.operations);return Ps.set(t,n),n},m={above(t,e){return t.above(e)},addMark(t,e,n){t.addMark(e,n)},after(t,e,n){return t.after(e,n)},before(t,e,n){return t.before(e,n)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteBackward(n)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteForward(n)},deleteFragment(t,e){t.deleteFragment(e)},edges(t,e){return t.edges(e)},elementReadOnly(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.elementReadOnly(e)},end(t,e){return t.end(e)},first(t,e){return t.first(e)},fragment(t,e){return t.fragment(e)},hasBlocks(t,e){return t.hasBlocks(e)},hasInlines(t,e){return t.hasInlines(e)},hasPath(t,e){return t.hasPath(e)},hasTexts(t,e){return t.hasTexts(e)},insertBreak(t){t.insertBreak()},insertFragment(t,e,n){t.insertFragment(e,n)},insertNode(t,e){t.insertNode(e)},insertSoftBreak(t){t.insertSoftBreak()},insertText(t,e){t.insertText(e)},isBlock(t,e){return t.isBlock(e)},isEdge(t,e,n){return t.isEdge(e,n)},isEditor(t){return dp(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,n){return t.isEnd(e,n)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,n){return t.isStart(e,n)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,n){return t.leaf(e,n)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,n){return t.node(e,n)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,n){return t.parent(e,n)},path(t,e,n){return t.path(e,n)},pathRef(t,e,n){return t.pathRef(e,n)},pathRefs(t){return t.pathRefs()},point(t,e,n){return t.point(e,n)},pointRef(t,e,n){return t.pointRef(e,n)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,n){return t.range(e,n)},rangeRef(t,e,n){return t.rangeRef(e,n)},rangeRefs(t){return t.rangeRefs()},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){t.setNormalizing(e)},start(t,e){return t.start(e)},string(t,e,n){return t.string(e,n)},unhangRange(t,e,n){return t.unhangRange(e,n)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,n)=>t.shouldMergeNodesRemovePrevNode(e,n)},pp={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(A.isPath)}};function Ms(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ks(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ms(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ms(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ae={compare(t,e){var n=A.compare(t.path,e.path);return n===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:n},isAfter(t,e){return Ae.compare(t,e)===1},isBefore(t,e){return Ae.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&A.equals(t.path,e.path)},isPoint(t){return ct(t)&&typeof t.offset=="number"&&A.isPath(t.path)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ji(t,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:a,offset:o}=r;switch(e.type){case"insert_node":case"move_node":{r.path=A.transform(a,e,n);break}case"insert_text":{A.equals(e.path,a)&&(e.offset<o||e.offset===o&&i==="forward")&&(r.offset+=e.text.length);break}case"merge_node":{A.equals(e.path,a)&&(r.offset+=e.position),r.path=A.transform(a,e,n);break}case"remove_text":{A.equals(e.path,a)&&e.offset<=o&&(r.offset-=Math.min(o-e.offset,e.text.length));break}case"remove_node":{if(A.equals(e.path,a)||A.isAncestor(e.path,a))return null;r.path=A.transform(a,e,n);break}case"split_node":{if(A.equals(e.path,a)){if(e.position===o&&i==null)return null;(e.position<o||e.position===o&&i==="forward")&&(r.offset-=e.position,r.path=A.transform(a,e,ks(ks({},n),{},{affinity:"forward"})))}else r.path=A.transform(a,e,n);break}}})}},Ts=void 0,st={setScrubber(t){Ts=t},stringify(t){return JSON.stringify(t,Ts)}},hp=["text"],vp=["anchor","focus"];function Rs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function It(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ce={equals(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(a){var o=jt(a,hp);return o}return Ls(r?i(t):t,r?i(e):e)},isText(t){return ct(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ce.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var n in e)if(n!=="text"&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0},decorations(t,e){var n=[It({},t)];for(var r of e){var i=jt(r,vp),[a,o]=q.edges(r),s=[],u=0,c=a.offset,f=o.offset;for(var h of n){var{length:p}=h.text,g=u;if(u+=p,c<=g&&u<=f){Object.assign(h,i),s.push(h);continue}if(c!==f&&(c===u||f===g)||c>u||f<g||f===g&&g!==0){s.push(h);continue}var C=h,v=void 0,d=void 0;if(f<u){var D=f-g;d=It(It({},C),{},{text:C.text.slice(D)}),C=It(It({},C),{},{text:C.text.slice(0,D)})}if(c>g){var B=c-g;v=It(It({},C),{},{text:C.text.slice(0,B)}),C=It(It({},C),{},{text:C.text.slice(B)})}Object.assign(C,i),v&&s.push(v),s.push(C),d&&s.push(d)}n=s}return n}},Ii=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],En=(t,e)=>{var[n]=m.node(t,e);return r=>r===n},Ni=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?bp(e):e,a=xe.None,o=xe.None,s=0,u=null,c=null;for(var f of i){var h=f.codePointAt(0);if(!h)break;var p=kp(f,h);if([a,o]=r?[o,p]:[p,a],wn(a,xe.ZWJ)&&wn(o,xe.ExtPict)&&(r?u=js(e.substring(0,s)):u=js(e.substring(0,e.length-s)),!u)||wn(a,xe.RI)&&wn(o,xe.RI)&&(c!==null?c=!c:r?c=!0:c=Np(e.substring(0,e.length-s)),!c)||a!==xe.None&&o!==xe.None&&Rp(a,o))break;s+=f.length}return s||1},gp=/\s/,mp=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,yp=/['\u2018\u2019]/,Cp=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;e.length>0;){var a=Ni(e,n),[o,s]=zi(e,a,n);if(Dp(o,s,n))i=!0,r+=a;else if(!i)r+=a;else break;e=s}return r},zi=(t,e,n)=>{if(n){var r=t.length-e;return[t.slice(r,t.length),t.slice(0,r)]}return[t.slice(0,e),t.slice(e)]},Dp=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(gp.test(e))return!1;if(yp.test(e)){var i=Ni(n,r),[a,o]=zi(n,i,r);if(t(a,o,r))return!0}return!mp.test(e)},bp=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var i=e.charAt(n-r);if(wp(i.charCodeAt(0))){var a=e.charAt(n-r-1);if(Ep(a.charCodeAt(0))){yield a+i,r++;continue}}yield i}},Ep=t=>t>=55296&&t<=56319,wp=t=>t>=56320&&t<=57343,xe;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(xe||(xe={}));var Bp=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,xp=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Lp=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Sp=/^[\u1100-\u115F\uA960-\uA97C]$/,Ap=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Op=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Fp=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Pp=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Mp=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,kp=(t,e)=>{var n=xe.Any;return t.search(Bp)!==-1&&(n|=xe.Extend),e===8205&&(n|=xe.ZWJ),e>=127462&&e<=127487&&(n|=xe.RI),t.search(xp)!==-1&&(n|=xe.Prepend),t.search(Lp)!==-1&&(n|=xe.SpacingMark),t.search(Sp)!==-1&&(n|=xe.L),t.search(Ap)!==-1&&(n|=xe.V),t.search(Op)!==-1&&(n|=xe.T),t.search(Fp)!==-1&&(n|=xe.LV),t.search(Pp)!==-1&&(n|=xe.LVT),t.search(Mp)!==-1&&(n|=xe.ExtPict),n};function wn(t,e){return(t&e)!==0}var Tp=[[xe.L,xe.L|xe.V|xe.LV|xe.LVT],[xe.LV|xe.V,xe.V|xe.T],[xe.LVT|xe.T,xe.T],[xe.Any,xe.Extend|xe.ZWJ],[xe.Any,xe.SpacingMark],[xe.Prepend,xe.Any],[xe.ZWJ,xe.ExtPict],[xe.RI,xe.RI]];function Rp(t,e){return Tp.findIndex(n=>wn(t,n[0])&&wn(e,n[1]))===-1}var jp=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,js=t=>t.search(jp)!==-1,Ip=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Np=t=>{var e=t.match(Ip);if(e===null)return!1;var n=e[0].length/2;return n%2===1},zp={delete(t,e){t.delete(e)},insertFragment(t,e,n){t.insertFragment(e,n)},insertText(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(t,()=>{var{voids:r=!1}=n,{at:i=Ii(t)}=n;if(A.isPath(i)&&(i=m.range(t,i)),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var a=q.end(i);if(!r&&m.void(t,{at:a}))return;var o=q.start(i),s=m.pointRef(t,o),u=m.pointRef(t,a);ee.delete(t,{at:i,voids:r});var c=s.unref(),f=u.unref();i=c||f,ee.setSelection(t,{anchor:i,focus:i})}if(!(!r&&m.void(t,{at:i})||m.elementReadOnly(t,{at:i}))){var{path:h,offset:p}=i;e.length>0&&t.apply({type:"insert_text",path:h,offset:p,text:e})}})}};function Is(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Is(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Is(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ee=Sr(Sr(Sr(Sr({},ip),ap),op),zp),Ar=new WeakMap,_p=t=>Ar.get(t)||!1,Wp=(t,e,n)=>{var r=Ar.get(t)||!1;Ar.set(t,!0);try{e(),n()}finally{Ar.set(t,r)}};function Ns(t,e,n){var r=xr.get(t)||[],i=Lr.get(t)||new Set,a,o,s=h=>{if(h){var p=h.join(",");o.has(p)||(o.add(p),a.push(h))}};if(n){a=[],o=new Set;for(var u of r){var c=n(u);s(c)}}else a=r,o=i;for(var f of e)s(f);xr.set(t,a),Lr.set(t,o)}var Up=(t,e)=>{for(var n of m.pathRefs(t))Qd.transform(n,e);for(var r of m.pointRefs(t))$d.transform(r,e);for(var i of m.rangeRefs(t))ep.transform(i,e);if(!_p(t)){var a=A.operationCanTransformPath(e)?o=>A.transform(o,e):void 0;Ns(t,t.getDirtyPaths(e),a)}ee.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Un.get(t)||(Un.set(t,!0),Promise.resolve().then(()=>{Un.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},Hp=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=e;return A.levels(n)}case"insert_node":{var{node:r,path:i}=e,a=A.levels(i),o=ce.isText(r)?[]:Array.from(ie.nodes(r),P=>{var[,z]=P;return i.concat(z)});return[...a,...o]}case"merge_node":{var{path:s}=e,u=A.ancestors(s),c=A.previous(s);return[...u,c]}case"move_node":{var{path:f,newPath:h}=e;if(A.equals(f,h))return[];var p=[],g=[];for(var C of A.ancestors(f)){var v=A.transform(C,e);p.push(v)}for(var d of A.ancestors(h)){var D=A.transform(d,e);g.push(D)}var B=g[g.length-1],w=h[h.length-1],O=B.concat(w);return[...p,...g,O]}case"remove_node":{var{path:b}=e,E=A.ancestors(b);return[...E]}case"split_node":{var{path:S}=e,F=A.levels(S),V=A.next(S);return[...F,V]}default:return[]}},Vp=t=>{var{selection:e}=t;return e?ie.fragment(t,e):[]},qp=(t,e)=>{var[n,r]=e;if(!ce.isText(n)){if(le.isElement(n)&&n.children.length===0){var i={text:""};ee.insertNodes(t,i,{at:r.concat(0),voids:!0});return}for(var a=m.isEditor(n)?!1:le.isElement(n)&&(t.isInline(n)||n.children.length===0||ce.isText(n.children[0])||t.isInline(n.children[0])),o=0,s=0;s<n.children.length;s++,o++){var u=ie.get(t,r);if(!ce.isText(u)){var c=u.children[o],f=u.children[o-1],h=s===n.children.length-1,p=ce.isText(c)||le.isElement(c)&&t.isInline(c);if(p!==a)ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--;else if(le.isElement(c)){if(t.isInline(c)){if(f==null||!ce.isText(f)){var g={text:""};ee.insertNodes(t,g,{at:r.concat(o),voids:!0}),o++}else if(h){var C={text:""};ee.insertNodes(t,C,{at:r.concat(o+1),voids:!0}),o++}}}else{if(!ce.isText(c)&&!("children"in c)){var v=c;v.children=[]}f!=null&&ce.isText(f)&&(ce.equals(c,f,{loose:!0})?(ee.mergeNodes(t,{at:r.concat(o),voids:!0}),o--):f.text===""?(ee.removeNodes(t,{at:r.concat(o-1),voids:!0}),o--):c.text===""&&(ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--))}}}}},Zp=(t,e)=>{var{iteration:n,initialDirtyPathsLength:r}=e,i=r*42;if(n>i)throw new Error("Could not completely normalize the editor after ".concat(i," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},Gp=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:i="lowest",at:a=e.selection,match:o}=n;if(a){var s=m.path(e,a),u=i==="lowest";for(var[c,f]of m.levels(e,{at:s,voids:r,match:o,reverse:u}))if(!ce.isText(c)){if(q.isRange(a)){if(A.isAncestor(f,a.anchor.path)&&A.isAncestor(f,a.focus.path))return[c,f]}else if(!A.equals(s,f))return[c,f]}}};function zs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _s(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Yp=(t,e,n)=>{var{selection:r}=t;if(r){var i=(h,p)=>{if(!ce.isText(h))return!1;var[g,C]=m.parent(t,p);return!t.isVoid(g)||t.markableVoid(g)},a=q.isExpanded(r),o=!1;if(!a){var[s,u]=m.node(t,r);if(s&&i(s,u)){var[c]=m.parent(t,u);o=c&&t.markableVoid(c)}}if(a||o)ee.setNodes(t,{[e]:n},{match:i,split:!0,voids:!0});else{var f=_s(_s({},m.marks(t)||{}),{},{[e]:n});t.marks=f,Un.get(t)||t.onChange()}}};function Ws(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Us(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ws(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Kp=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.point(e,n,{edge:"end"}),a=m.end(e,[]),o={anchor:i,focus:a},{distance:s=1}=r,u=0,c;for(var f of m.positions(e,Us(Us({},r),{},{at:o}))){if(u>s)break;u!==0&&(c=f),u++}return c};function Hs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Xp=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.start(e,[]),a=m.point(e,n,{edge:"start"}),o={anchor:i,focus:a},{distance:s=1}=r,u=0,c;for(var f of m.positions(e,Vs(Vs({},r),{},{at:o,reverse:!0}))){if(u>s)break;u!==0&&(c=f),u++}return c},Jp=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e,reverse:!0})},Qp=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e})},$p=function(e){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&q.isExpanded(r)&&ee.delete(e,{reverse:n==="backward"})},eh=(t,e)=>[m.start(t,e),m.end(t,e)];function qs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var th=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Zs(Zs({},n),{},{match:r=>le.isElement(r)&&m.isElementReadOnly(e,r)}))},nh=(t,e)=>m.point(t,e,{edge:"end"}),rh=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},ih=(t,e)=>{var n=m.range(t,e);return ie.fragment(t,n)};function Gs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ys(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ah=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ys(Ys({},n),{},{match:r=>le.isElement(r)&&m.isVoid(e,r)}))},oh=(t,e)=>e.children.some(n=>le.isElement(n)&&m.isBlock(t,n)),sh=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),uh=(t,e)=>ie.has(t,e),lh=(t,e)=>e.children.every(n=>ce.isText(n)),ch=t=>{ee.splitNodes(t,{always:!0})},fh=(t,e,n)=>{ee.insertNodes(t,e,n)},dh=t=>{ee.splitNodes(t,{always:!0})};function Ks(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ph(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ks(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ks(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var hh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i,marks:a}=e;if(i){if(a){var o=ph({text:n},a);ee.insertNodes(e,o,{at:r.at,voids:r.voids})}else ee.insertText(e,n,r);e.marks=null}},vh=(t,e)=>!t.isInline(e),gh=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),mh=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},yh=(t,e,n)=>{var r=m.end(t,n);return Ae.equals(e,r)},Ch=t=>{var e=bs.get(t);return e===void 0?!0:e},Dh=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Ae.equals(e,r)},bh=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},Eh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=ie.leaf(e,i);return[a,i]};function wh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,reverse:r=!1,voids:i=!1}=e,{match:a}=e;if(a==null&&(a=()=>!0),!!n){var o=[],s=m.path(t,n);for(var[u,c]of ie.levels(t,s))if(a(u,c)&&(o.push([u,c]),!i&&le.isElement(u)&&m.isVoid(t,u)))break;r&&o.reverse(),yield*o}}()}var Bh=["text"],xh=["text"],Lh=function(e){var{marks:n,selection:r}=e;if(!r)return null;var{anchor:i,focus:a}=r;if(n)return n;if(q.isExpanded(r)){var o=m.isEnd(e,i,i.path);if(o){var s=m.after(e,i);s&&(i=s)}var[u]=m.nodes(e,{match:ce.isText,at:{anchor:i,focus:a}});if(u){var[c]=u,f=jt(c,Bh);return f}else return{}}var{path:h}=i,[p]=m.leaf(e,h);if(i.offset===0){var g=m.previous(e,{at:h,match:ce.isText}),C=m.above(e,{match:O=>le.isElement(O)&&m.isVoid(e,O)&&e.markableVoid(O)});if(!C){var v=m.above(e,{match:O=>le.isElement(O)&&m.isBlock(e,O)});if(g&&v){var[d,D]=g,[,B]=v;A.isAncestor(B,D)&&(p=d)}}}var w=jt(p,xh);return w},Sh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection}=n;if(o){var s=m.after(e,o,{voids:i});if(s){var[,u]=m.last(e,[]),c=[s.path,u];if(A.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if(A.isPath(o)){var[f]=m.parent(e,o);a=p=>f.children.includes(p)}else a=()=>!0;var[h]=m.nodes(e,{at:c,match:a,mode:r,voids:i});return h}}},Ah=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=ie.get(e,i);return[a,i]};function Oh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,mode:r="all",universal:i=!1,reverse:a=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!n){var c,f;if(pp.isSpan(n))c=n[0],f=n[1];else{var h=m.path(t,n,{edge:"start"}),p=m.path(t,n,{edge:"end"});c=a?p:h,f=a?h:p}var g=ie.nodes(t,{reverse:a,from:c,to:f,pass:O=>{var[b]=O;return le.isElement(b)?!!(!o&&(m.isVoid(t,b)||m.isElementReadOnly(t,b))||s&&!m.isSelectable(t,b)):!1}}),C=[],v;for(var[d,D]of g)if(!(s&&le.isElement(d)&&!m.isSelectable(t,d))){var B=v&&A.compare(D,v[1])===0;if(!(r==="highest"&&B)){if(!u(d,D)){if(i&&!B&&ce.isText(d))return;continue}if(r==="lowest"&&B){v=[d,D];continue}var w=r==="lowest"?v:[d,D];w&&(i?C.push(w):yield w),v=[d,D]}}r==="lowest"&&v&&(i?C.push(v):yield v),i&&(yield*C)}}()}var Fh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:i}=n,a=f=>xr.get(f)||[],o=f=>Lr.get(f)||new Set,s=f=>{var h=a(f).pop(),p=h.join(",");return o(f).delete(p),h};if(m.isNormalizing(e)){if(r){var u=Array.from(ie.nodes(e),f=>{var[,h]=f;return h}),c=new Set(u.map(f=>f.join(",")));xr.set(e,u),Lr.set(e,c)}a(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of a(e))if(ie.has(e,f)){var h=m.node(e,f),[p,g]=h;le.isElement(p)&&p.children.length===0&&e.normalizeNode(h,{operation:i})}for(var C=a(e),v=C.length,d=0;C.length!==0;){if(!e.shouldNormalize({dirtyPaths:C,iteration:d,initialDirtyPathsLength:v,operation:i}))return;var D=s(e);if(ie.has(e,D)){var B=m.node(e,D);e.normalizeNode(B,{operation:i})}d++,C=a(e)}})}},Ph=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=m.path(e,n,r),a=A.parent(i),o=m.node(e,a);return o},Mh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.pathRefs(e);return u.delete(a),a.current=null,s}},o=m.pathRefs(e);return o.add(a),a},kh=t=>{var e=Es.get(t);return e||(e=new Set,Es.set(t,e)),e},Th=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:i,edge:a}=r;if(A.isPath(n)){if(a==="start"){var[,o]=ie.first(e,n);n=o}else if(a==="end"){var[,s]=ie.last(e,n);n=s}}return q.isRange(n)&&(a==="start"?n=q.start(n):a==="end"?n=q.end(n):n=A.common(n.anchor.path,n.focus.path)),Ae.isPoint(n)&&(n=n.path),i!=null&&(n=n.slice(0,i)),n},Rh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.pointRefs(e);return u.delete(a),a.current=null,s}},o=m.pointRefs(e);return o.add(a),a},jh=t=>{var e=ws.get(t);return e||(e=new Set,ws.set(t,e)),e},Ih=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:i="start"}=r;if(A.isPath(n)){var a;if(i==="end"){var[,o]=ie.last(e,n);a=o}else{var[,s]=ie.first(e,n);a=s}var u=ie.get(e,a);if(!ce.isText(u))throw new Error("Cannot get the ".concat(i," point in the node at path [").concat(n,"] because it has no ").concat(i," text node."));return{path:a,offset:i==="end"?u.text.length:0}}if(q.isRange(n)){var[c,f]=q.edges(n);return i==="start"?c:f}return n};function Nh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,unit:r="offset",reverse:i=!1,voids:a=!1,ignoreNonSelectable:o=!1}=e;if(!n)return;var s=m.range(t,n),[u,c]=q.edges(s),f=i?c:u,h=!1,p="",g=0,C=0,v=0;for(var[d,D]of m.nodes(t,{at:n,reverse:i,voids:a,ignoreNonSelectable:o})){if(le.isElement(d)){if(!a&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var B=A.isAncestor(D,c.path)?c:m.end(t,D),w=A.isAncestor(D,u.path)?u:m.start(t,D);p=m.string(t,{anchor:w,focus:B},{voids:a}),h=!0}}if(ce.isText(d)){var O=A.equals(D,f.path);for(O?(C=i?f.offset:d.text.length-f.offset,v=f.offset):(C=d.text.length,v=i?C:0),(O||h||r==="offset")&&(yield{path:D,offset:v},h=!1);;){if(g===0){if(p==="")break;g=b(p,r,i),p=zi(p,g,i)[1]}if(v=i?v-g:v+g,C=C-g,C<0){g=-C;break}g=0,yield{path:D,offset:v}}}}function b(E,S,F){return S==="character"?Ni(E,F):S==="word"?Cp(E,F):S==="line"||S==="block"?E.length:1}}()}var zh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection}=n;if(o){var s=m.before(e,o,{voids:i});if(s){var[,u]=m.first(e,[]),c=[s.path,u];if(A.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if(A.isPath(o)){var[f]=m.parent(e,o);a=p=>f.children.includes(p)}else a=()=>!0;var[h]=m.nodes(e,{reverse:!0,at:c,match:a,mode:r,voids:i});return h}}},_h=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:i="forward"}=r,a={current:n,affinity:i,unref(){var{current:s}=a,u=m.rangeRefs(e);return u.delete(a),a.current=null,s}},o=m.rangeRefs(e);return o.add(a),a},Wh=t=>{var e=Bs.get(t);return e||(e=new Set,Bs.set(t,e)),e},Uh=(t,e,n)=>{if(q.isRange(e)&&!n)return e;var r=m.start(t,e),i=m.end(t,n||e);return{anchor:r,focus:i}};function Xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Vh=(t,e)=>{var{selection:n}=t;if(n){var r=(f,h)=>{if(!ce.isText(f))return!1;var[p,g]=m.parent(t,h);return!t.isVoid(p)||t.markableVoid(p)},i=q.isExpanded(n),a=!1;if(!i){var[o,s]=m.node(t,n);if(o&&r(o,s)){var[u]=m.parent(t,s);a=u&&t.markableVoid(u)}}if(i||a)ee.unsetNodes(t,e,{match:r,split:!0,voids:!0});else{var c=Hh({},m.marks(t)||{});delete c[e],t.marks=c,Un.get(t)||t.onChange()}}},qh=(t,e)=>{bs.set(t,e)},Zh=(t,e)=>m.point(t,e,{edge:"start"}),Gh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,a=m.range(e,n),[o,s]=q.edges(a),u="";for(var[c,f]of m.nodes(e,{at:a,match:ce.isText,voids:i})){var h=c.text;A.equals(f,s.path)&&(h=h.slice(0,s.offset)),A.equals(f,o.path)&&(h=h.slice(o.offset)),u+=h}return u},Yh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:i=!1}=r,[a,o]=q.edges(n);if(a.offset!==0||o.offset!==0||q.isCollapsed(n)||A.hasPrevious(o.path))return n;var s=m.above(e,{at:o,match:C=>le.isElement(C)&&m.isBlock(e,C),voids:i}),u=s?s[1]:[],c=m.start(e,a),f={anchor:c,focus:o},h=!0;for(var[p,g]of m.nodes(e,{at:f,match:ce.isText,reverse:!0,voids:i})){if(h){h=!1;continue}if(p.text!==""||A.isBefore(g,u)){o={path:g,offset:p.text.length};break}}return{anchor:a,focus:o}},Kh=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},Xh=(t,e,n)=>{var[r,i]=e;return le.isElement(r)&&m.isEmpty(t,r)||ce.isText(r)&&r.text===""&&i[i.length-1]!==0},Jh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var r,i,{reverse:a=!1,unit:o="character",distance:s=1,voids:u=!1}=n,{at:c=e.selection,hanging:f=!1}=n;if(c){var h=!1;if(q.isRange(c)&&q.isCollapsed(c)&&(h=!0,c=c.anchor),Ae.isPoint(c)){var p=m.void(e,{at:c,mode:"highest"});if(!u&&p){var[,g]=p;c=g}else{var C={unit:o,distance:s},v=a?m.before(e,c,C)||m.start(e,[]):m.after(e,c,C)||m.end(e,[]);c={anchor:c,focus:v},f=!0}}if(A.isPath(c)){ee.removeNodes(e,{at:c,voids:u});return}if(!q.isCollapsed(c)){if(!f){var[,d]=q.edges(c),D=m.end(e,[]);Ae.equals(d,D)||(c=m.unhangRange(e,c,{voids:u}))}var[B,w]=q.edges(c),O=m.above(e,{match:ae=>le.isElement(ae)&&m.isBlock(e,ae),at:B,voids:u}),b=m.above(e,{match:ae=>le.isElement(ae)&&m.isBlock(e,ae),at:w,voids:u}),E=O&&b&&!A.equals(O[1],b[1]),S=A.equals(B.path,w.path),F=u?null:(r=m.void(e,{at:B,mode:"highest"}))!==null&&r!==void 0?r:m.elementReadOnly(e,{at:B,mode:"highest"}),V=u?null:(i=m.void(e,{at:w,mode:"highest"}))!==null&&i!==void 0?i:m.elementReadOnly(e,{at:w,mode:"highest"});if(F){var P=m.before(e,B);P&&O&&A.isAncestor(O[1],P.path)&&(B=P)}if(V){var z=m.after(e,w);z&&b&&A.isAncestor(b[1],z.path)&&(w=z)}var R=[],I;for(var j of m.nodes(e,{at:c,voids:u})){var[N,X]=j;I&&A.compare(X,I)===0||(!u&&le.isElement(N)&&(m.isVoid(e,N)||m.isElementReadOnly(e,N))||!A.isCommon(X,B.path)&&!A.isCommon(X,w.path))&&(R.push(j),I=X)}var _=Array.from(R,ae=>{var[,de]=ae;return m.pathRef(e,de)}),$=m.pointRef(e,B),re=m.pointRef(e,w),k="";if(!S&&!F){var T=$.current,[Z]=m.leaf(e,T),{path:H}=T,{offset:Q}=B,K=Z.text.slice(Q);K.length>0&&(e.apply({type:"remove_text",path:H,offset:Q,text:K}),k=K)}if(_.reverse().map(ae=>ae.unref()).filter(ae=>ae!==null).forEach(ae=>ee.removeNodes(e,{at:ae,voids:u})),!V){var y=re.current,[U]=m.leaf(e,y),{path:W}=y,M=S?B.offset:0,J=U.text.slice(M,w.offset);J.length>0&&(e.apply({type:"remove_text",path:W,offset:M,text:J}),k=J)}!S&&E&&re.current&&$.current&&ee.mergeNodes(e,{at:re.current,hanging:!0,voids:u}),h&&a&&o==="character"&&k.length>1&&k.match(/[\u0E00-\u0E7F]+/)&&ee.insertText(e,k.slice(0,k.length-s));var ne=$.unref(),G=re.unref(),ue=a?ne||G:G||ne;n.at==null&&ue&&ee.select(e,ue)}}})},Qh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1}=r,{at:o=Ii(e),batchDirty:s=!0}=r;if(n.length){if(q.isRange(o))if(i||(o=m.unhangRange(e,o,{voids:a})),q.isCollapsed(o))o=o.anchor;else{var[,u]=q.edges(o);if(!a&&m.void(e,{at:u}))return;var c=m.pointRef(e,u);ee.delete(e,{at:o}),o=c.unref()}else A.isPath(o)&&(o=m.start(e,o));if(!(!a&&m.void(e,{at:o}))){var f=m.above(e,{at:o,match:K=>le.isElement(K)&&m.isInline(e,K),mode:"highest",voids:a});if(f){var[,h]=f;if(m.isEnd(e,o,h)){var p=m.after(e,h);o=p}else if(m.isStart(e,o,h)){var g=m.before(e,h);o=g}}var C=m.above(e,{match:K=>le.isElement(K)&&m.isBlock(e,K),at:o,voids:a}),[,v]=C,d=m.isStart(e,o,v),D=m.isEnd(e,o,v),B=d&&D,w=!d||d&&D,O=!D,[,b]=ie.first({children:n},[]),[,E]=ie.last({children:n},[]),S=[],F=K=>{var[y,U]=K,W=U.length===0;return W?!1:B?!0:!(w&&A.isAncestor(U,b)&&le.isElement(y)&&!e.isVoid(y)&&!e.isInline(y)||O&&A.isAncestor(U,E)&&le.isElement(y)&&!e.isVoid(y)&&!e.isInline(y))};for(var V of ie.nodes({children:n},{pass:F}))F(V)&&S.push(V);var P=[],z=[],R=[],I=!0,j=!1;for(var[N]of S)le.isElement(N)&&!e.isInline(N)?(I=!1,j=!0,z.push(N)):I?P.push(N):R.push(N);var[X]=m.nodes(e,{at:o,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a}),[,_]=X,$=m.isStart(e,o,_),re=m.isEnd(e,o,_),k=m.pathRef(e,D&&!R.length?A.next(v):v),T=m.pathRef(e,re?A.next(_):_);ee.splitNodes(e,{at:o,match:K=>j?le.isElement(K)&&m.isBlock(e,K):ce.isText(K)||m.isInline(e,K),mode:j?"lowest":"highest",always:j&&(!d||P.length>0)&&(!D||R.length>0),voids:a});var Z=m.pathRef(e,!$||$&&re?A.next(_):_);if(ee.insertNodes(e,P,{at:Z.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a,batchDirty:s}),B&&!P.length&&z.length&&!R.length&&ee.delete(e,{at:v,voids:a}),ee.insertNodes(e,z,{at:k.current,match:K=>le.isElement(K)&&m.isBlock(e,K),mode:"lowest",voids:a,batchDirty:s}),ee.insertNodes(e,R,{at:T.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:a,batchDirty:s}),!r.at){var H;if(R.length>0&&T.current?H=A.previous(T.current):z.length>0&&k.current?H=A.previous(k.current):Z.current&&(H=A.previous(Z.current)),H){var Q=m.end(e,H);ee.select(e,Q)}}Z.unref(),k.unref(),T.unref()}}})},$h=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:i}=e;if(i){if(r==="anchor")ee.select(e,i.anchor);else if(r==="focus")ee.select(e,i.focus);else if(r==="start"){var[a]=q.edges(i);ee.select(e,a)}else if(r==="end"){var[,o]=q.edges(i);ee.select(e,o)}}else return},ev=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},tv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:i=1,unit:a="character",reverse:o=!1}=n,{edge:s=null}=n;if(r){s==="start"&&(s=q.isBackward(r)?"focus":"anchor"),s==="end"&&(s=q.isBackward(r)?"anchor":"focus");var{anchor:u,focus:c}=r,f={distance:i,unit:a,ignoreNonSelectable:!0},h={};if(s==null||s==="anchor"){var p=o?m.before(e,u,f):m.after(e,u,f);p&&(h.anchor=p)}if(s==null||s==="focus"){var g=o?m.before(e,c,f):m.after(e,c,f);g&&(h.focus=g)}ee.setSelection(e,h)}},nv=(t,e)=>{var{selection:n}=t;if(e=m.range(t,e),n){ee.setSelection(t,e);return}if(!q.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(st.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})};function Js(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Js(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:i}=e,{edge:a="both"}=r;if(i){a==="start"&&(a=q.isBackward(i)?"focus":"anchor"),a==="end"&&(a=q.isBackward(i)?"anchor":"focus");var{anchor:o,focus:s}=i,u=a==="anchor"?o:s;ee.setSelection(e,{[a==="anchor"?"anchor":"focus"]:Qs(Qs({},u),n)})}},iv=(t,e)=>{var{selection:n}=t,r={},i={};if(n){for(var a in e)(a==="anchor"&&e.anchor!=null&&!Ae.equals(e.anchor,n.anchor)||a==="focus"&&e.focus!=null&&!Ae.equals(e.focus,n.focus)||a!=="anchor"&&a!=="focus"&&e[a]!==n[a])&&(r[a]=n[a],i[a]=e[a]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:i})}},av=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:i=!1,voids:a=!1,mode:o="lowest",batchDirty:s=!0}=r,{at:u,match:c,select:f}=r;if(ie.isNode(n)&&(n=[n]),n.length!==0){var[h]=n;if(u||(u=Ii(e),f!==!1&&(f=!0)),f==null&&(f=!1),q.isRange(u))if(i||(u=m.unhangRange(e,u,{voids:a})),q.isCollapsed(u))u=u.anchor;else{var[,p]=q.edges(u),g=m.pointRef(e,p);ee.delete(e,{at:u}),u=g.unref()}if(Ae.isPoint(u)){c==null&&(ce.isText(h)?c=P=>ce.isText(P):e.isInline(h)?c=P=>ce.isText(P)||m.isInline(e,P):c=P=>le.isElement(P)&&m.isBlock(e,P));var[C]=m.nodes(e,{at:u.path,match:c,mode:o,voids:a});if(C){var[,v]=C,d=m.pathRef(e,v),D=m.isEnd(e,u,v);ee.splitNodes(e,{at:u,match:c,mode:o,voids:a});var B=d.unref();u=D?A.next(B):B}else return}var w=A.parent(u),O=u[u.length-1];if(!(!a&&m.void(e,{at:w}))){if(s){var b=[],E=A.levels(w);Wp(e,()=>{var P=function(){var I=w.concat(O);O++;var j={type:"insert_node",path:I,node:z};e.apply(j),u=A.next(u),b.push(j),ce.isText?E.push(...Array.from(ie.nodes(z),N=>{var[,X]=N;return I.concat(X)})):E.push(I)};for(var z of n)P()},()=>{Ns(e,E,P=>{var z=P;for(var R of b)if(A.operationCanTransformPath(R)&&(z=A.transform(z,R),!z))return null;return z})})}else for(var S of n){var F=w.concat(O);O++,e.apply({type:"insert_node",path:F,node:S}),u=A.next(u)}if(u=A.previous(u),f){var V=m.end(e,u);V&&ee.select(e,V)}}}})},ov=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:i="lowest",voids:a=!1}=n,{match:o}=n;if(o==null&&(o=A.isPath(r)?En(e,r):O=>le.isElement(O)&&m.isBlock(e,O)),!!r){var s=m.nodes(e,{at:r,match:o,mode:i,voids:a}),u=Array.from(s,O=>{var[,b]=O;return m.pathRef(e,b)});for(var c of u){var f=c.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var h=m.node(e,A.parent(f)),[p,g]=h,C=f[f.length-1],{length:v}=p.children;if(v===1){var d=A.next(g);ee.moveNodes(e,{at:f,to:d,voids:a}),ee.removeNodes(e,{at:g,voids:a})}else if(C===0)ee.moveNodes(e,{at:f,to:g,voids:a});else if(C===v-1){var D=A.next(g);ee.moveNodes(e,{at:f,to:D,voids:a})}else{var B=A.next(f),w=A.next(g);ee.splitNodes(e,{at:B,voids:a}),ee.moveNodes(e,{at:f,to:w,voids:a})}}}})},sv=["text"],uv=["children"],$s=(t,e)=>{if(le.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?$s(t,n.children[0]):!1}else return!m.isEditor(e)},lv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:a=!1,voids:o=!1,mode:s="lowest"}=n;if(i){if(r==null)if(A.isPath(i)){var[u]=m.parent(e,i);r=P=>u.children.includes(P)}else r=P=>le.isElement(P)&&m.isBlock(e,P);if(!a&&q.isRange(i)&&(i=m.unhangRange(e,i,{voids:o})),q.isRange(i))if(q.isCollapsed(i))i=i.anchor;else{var[,c]=q.edges(i),f=m.pointRef(e,c);ee.delete(e,{at:i}),i=f.unref(),n.at==null&&ee.select(e,i)}var[h]=m.nodes(e,{at:i,match:r,voids:o,mode:s}),p=m.previous(e,{at:i,match:r,voids:o,mode:s});if(!(!h||!p)){var[g,C]=h,[v,d]=p;if(!(C.length===0||d.length===0)){var D=A.next(d),B=A.common(C,d),w=A.isSibling(C,d),O=Array.from(m.levels(e,{at:C}),P=>{var[z]=P;return z}).slice(B.length).slice(0,-1),b=m.above(e,{at:C,mode:"highest",match:P=>O.includes(P)&&$s(e,P)}),E=b&&m.pathRef(e,b[1]),S,F;if(ce.isText(g)&&ce.isText(v)){var V=jt(g,sv);F=v.text.length,S=V}else if(le.isElement(g)&&le.isElement(v)){var V=jt(g,uv);F=v.children.length,S=V}else throw new Error("Cannot merge the node at path [".concat(C,"] with the previous sibling because it is not the same kind: ").concat(st.stringify(g)," ").concat(st.stringify(v)));w||ee.moveNodes(e,{at:C,to:D,voids:o}),E&&ee.removeNodes(e,{at:E.current,voids:o}),m.shouldMergeNodesRemovePrevNode(e,p,h)?ee.removeNodes(e,{at:d,voids:o}):e.apply({type:"merge_node",path:D,position:F,properties:S}),E&&E.unref()}}}})},cv=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:i="lowest",voids:a=!1}=e,{match:o}=e;if(r){o==null&&(o=A.isPath(r)?En(t,r):g=>le.isElement(g)&&m.isBlock(t,g));var s=m.pathRef(t,n),u=m.nodes(t,{at:r,match:o,mode:i,voids:a}),c=Array.from(u,g=>{var[,C]=g;return m.pathRef(t,C)});for(var f of c){var h=f.unref(),p=s.current;h.length!==0&&t.apply({type:"move_node",path:h,newPath:p}),s.current&&A.isSibling(p,h)&&A.isAfter(p,h)&&(s.current=A.next(s.current))}s.unref()}})},fv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:a="lowest"}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=A.isPath(o)?En(e,o):g=>le.isElement(g)&&m.isBlock(e,g)),!r&&q.isRange(o)&&(o=m.unhangRange(e,o,{voids:i}));var u=m.nodes(e,{at:o,match:s,mode:a,voids:i}),c=Array.from(u,g=>{var[,C]=g;return m.pathRef(e,C)});for(var f of c){var h=f.unref();if(h){var[p]=m.node(e,h);e.apply({type:"remove_node",path:h,node:p})}}}})},dv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:i,at:a=e.selection,compare:o,merge:s}=r,{hanging:u=!1,mode:c="lowest",split:f=!1,voids:h=!1}=r;if(a){if(i==null&&(i=A.isPath(a)?En(e,a):F=>le.isElement(F)&&m.isBlock(e,F)),!u&&q.isRange(a)&&(a=m.unhangRange(e,a,{voids:h})),f&&q.isRange(a)){if(q.isCollapsed(a)&&m.leaf(e,a.anchor)[0].text.length>0)return;var p=m.rangeRef(e,a,{affinity:"inward"}),[g,C]=q.edges(a),v=c==="lowest"?"lowest":"highest",d=m.isEnd(e,C,C.path);ee.splitNodes(e,{at:C,match:i,mode:v,voids:h,always:!d});var D=m.isStart(e,g,g.path);ee.splitNodes(e,{at:g,match:i,mode:v,voids:h,always:!D}),a=p.unref(),r.at==null&&ee.select(e,a)}o||(o=(F,V)=>F!==V);for(var[B,w]of m.nodes(e,{at:a,match:i,mode:c,voids:h})){var O={},b={};if(w.length!==0){var E=!1;for(var S in n)S==="children"||S==="text"||o(n[S],B[S])&&(E=!0,B.hasOwnProperty(S)&&(O[S]=B[S]),s?n[S]!=null&&(b[S]=s(B[S],n[S])):n[S]!=null&&(b[S]=n[S]));E&&e.apply({type:"set_node",path:w,properties:O,newProperties:b})}}}})},pv=(t,e)=>{if(q.isCollapsed(e))return e.anchor;var[,n]=q.edges(e),r=m.pointRef(t,n);return ee.delete(t,{at:e}),r.unref()},hv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:i=!1}=n,{match:a,at:o=e.selection,height:s=0,always:u=!1}=n;if(a==null&&(a=re=>le.isElement(re)&&m.isBlock(e,re)),q.isRange(o)&&(o=pv(e,o)),A.isPath(o)){var c=o,f=m.point(e,c),[h]=m.parent(e,c);a=re=>re===h,s=f.path.length-c.length+1,o=f,u=!0}if(o){var p=m.pointRef(e,o,{affinity:"backward"}),g;try{var[C]=m.nodes(e,{at:o,match:a,mode:r,voids:i});if(!C)return;var v=m.void(e,{at:o,mode:"highest"}),d=0;if(!i&&v){var[D,B]=v;if(le.isElement(D)&&e.isInline(D)){var w=m.after(e,B);if(!w){var O={text:""},b=A.next(B);ee.insertNodes(e,O,{at:b,voids:i}),w=m.point(e,b)}o=w,u=!0}var E=o.path.length-B.length;s=E+1,u=!0}g=m.pointRef(e,o);var S=o.path.length-s,[,F]=C,V=o.path.slice(0,S),P=s===0?o.offset:o.path[S]+d;for(var[z,R]of m.levels(e,{at:V,reverse:!0,voids:i})){var I=!1;if(R.length<F.length||R.length===0||!i&&le.isElement(z)&&m.isVoid(e,z))break;var j=p.current,N=m.isEnd(e,j,R);if(u||!p||!m.isEdge(e,j,R)){I=!0;var X=ie.extractProps(z);e.apply({type:"split_node",path:R,position:P,properties:X})}P=R[R.length-1]+(I||N?1:0)}if(n.at==null){var _=g.current||m.end(e,[]);ee.select(e,_)}}finally{var $;p.unref(),($=g)===null||$===void 0||$.unref()}}})},vv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var i={};for(var a of n)i[a]=null;ee.setNodes(e,i,r)},gv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:a=!1}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=A.isPath(o)?En(e,o):g=>le.isElement(g)&&m.isBlock(e,g)),A.isPath(o)&&(o=m.range(e,o));var u=q.isRange(o)?m.rangeRef(e,o):null,c=m.nodes(e,{at:o,match:s,mode:r,voids:a}),f=Array.from(c,g=>{var[,C]=g;return m.pathRef(e,C)}).reverse(),h=function(){var C=p.unref(),[v]=m.node(e,C),d=m.range(e,C);i&&u&&(d=q.intersection(u.current,d)),ee.liftNodes(e,{at:d,match:D=>le.isAncestor(v)&&v.children.includes(D),voids:a})};for(var p of f)h();u&&u.unref()}})};function eu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function tu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var mv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:i="lowest",split:a=!1,voids:o=!1}=r,{match:s,at:u=e.selection}=r;if(u){if(s==null&&(A.isPath(u)?s=En(e,u):e.isInline(n)?s=d=>le.isElement(d)&&m.isInline(e,d)||ce.isText(d):s=d=>le.isElement(d)&&m.isBlock(e,d)),a&&q.isRange(u)){var[c,f]=q.edges(u),h=m.rangeRef(e,u,{affinity:"inward"});ee.splitNodes(e,{at:f,match:s,voids:o}),ee.splitNodes(e,{at:c,match:s,voids:o}),u=h.unref(),r.at==null&&ee.select(e,u)}var p=Array.from(m.nodes(e,{at:u,match:e.isInline(n)?d=>le.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:o})),g=function(){var D=q.isRange(u)?q.intersection(u,m.range(e,v)):u;if(!D)return 0;var B=Array.from(m.nodes(e,{at:D,match:s,mode:i,voids:o}));if(B.length>0){var[w]=B,O=B[B.length-1],[,b]=w,[,E]=O;if(b.length===0&&E.length===0)return 0;var S=A.equals(b,E)?A.parent(b):A.common(b,E),F=m.range(e,b,E),V=m.node(e,S),[P]=V,z=S.length+1,R=A.next(E.slice(0,z)),I=tu(tu({},n),{},{children:[]});ee.insertNodes(e,I,{at:R,voids:o}),ee.moveNodes(e,{at:F,match:j=>le.isAncestor(P)&&P.children.includes(j),to:R.concat(0),voids:o})}},C;for(var[,v]of p)C=g()}})},yv=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Up(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yp(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jp(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qp(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $p(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vp(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ch(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dh(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qh(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fh(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hh(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qp(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vh(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hp(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zp(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gp(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kp(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xp(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $h(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Jh(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ev(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eh(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return th(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return nh(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rh(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ih(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Lh(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return oh(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return sh(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return uh(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lh(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return av(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vh(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gh(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mh(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return yh(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ch(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Dh(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bh(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Eh(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return wh(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ov(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lv(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tv(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cv(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Sh(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ah(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Oh(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fh(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ph(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Th(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Mh(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return kh(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ih(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Rh(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return jh(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Nh(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return zh(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uh(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _h(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Wh(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fv(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return nv(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return dv(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qh(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return rv(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return iv(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hv(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zh(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Gh(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Yh(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return vv(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gv(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ah(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Kh(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mv(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Xh(t,...r)}};return t};/*!
76
+ */function ss(t){return Object.prototype.toString.call(t)==="[object Object]"}function ct(t){var e,n;return ss(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(ss(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var us=Symbol.for("immer-nothing"),ls=Symbol.for("immer-draftable"),Dt=Symbol.for("immer-state"),Wd=process.env.NODE_ENV!=="production"?[function(t){return`The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`},function(t){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${t}'`},"This object has been frozen and should not be mutated",function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(t){return`'current' expects a draft, got: ${t}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(t){return`'original' expects a draft, got: ${t}`}]:[];function gt(t,...e){if(process.env.NODE_ENV!=="production"){const n=Wd[t],r=typeof n=="function"?n.apply(null,e):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var bn=Object.getPrototypeOf;function on(t){return!!t&&!!t[Dt]}function sn(t){var e;return t?cs(t)||Array.isArray(t)||!!t[ls]||!!((e=t.constructor)!=null&&e[ls])||Dr(t)||br(t):!1}var Ud=Object.prototype.constructor.toString();function cs(t){if(!t||typeof t!="object")return!1;const e=bn(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Ud}function yr(t,e){Cr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Cr(t){const e=t[Dt];return e?e.type_:Array.isArray(t)?1:Dr(t)?2:br(t)?3:0}function La(t,e){return Cr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function fs(t,e,n){const r=Cr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Hd(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Dr(t){return t instanceof Map}function br(t){return t instanceof Set}function un(t){return t.copy_||t.base_}function Sa(t,e){if(Dr(t))return new Map(t);if(br(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=cs(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Dt];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const o=a[i],s=r[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:t[o]})}return Object.create(bn(t),r)}else{const r=bn(t);if(r!==null&&n)return{...t};const a=Object.create(r);return Object.assign(a,t)}}function Aa(t,e=!1){return Er(t)||on(t)||!sn(t)||(Cr(t)>1&&(t.set=t.add=t.clear=t.delete=Vd),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Aa(r,!0))),t}function Vd(){gt(2)}function Er(t){return Object.isFrozen(t)}var qd={};function ln(t){const e=qd[t];return e||gt(0,t),e}var _n;function ds(){return _n}function Zd(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ps(t,e){e&&(ln("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Oa(t){Fa(t),t.drafts_.forEach(Gd),t.drafts_=null}function Fa(t){t===_n&&(_n=t.parent_)}function hs(t){return _n=Zd(_n,t)}function Gd(t){const e=t[Dt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function vs(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Dt].modified_&&(Oa(e),gt(4)),sn(t)&&(t=wr(e,t),e.parent_||Br(e,t)),e.patches_&&ln("Patches").generateReplacementPatches_(n[Dt].base_,t,e.patches_,e.inversePatches_)):t=wr(e,n,[]),Oa(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==us?t:void 0}function wr(t,e,n){if(Er(e))return e;const r=e[Dt];if(!r)return yr(e,(a,i)=>gs(t,r,e,a,i,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Br(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const a=r.copy_;let i=a,o=!1;r.type_===3&&(i=new Set(a),a.clear(),o=!0),yr(i,(s,u)=>gs(t,r,a,s,u,n,o)),Br(t,a,!1),n&&t.patches_&&ln("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function gs(t,e,n,r,a,i,o){if(process.env.NODE_ENV!=="production"&&a===n&&gt(5),on(a)){const s=i&&e&&e.type_!==3&&!La(e.assigned_,r)?i.concat(r):void 0,u=wr(t,a,s);if(fs(n,r,u),on(u))t.canAutoFreeze_=!1;else return}else o&&n.add(a);if(sn(a)&&!Er(a)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;wr(t,a),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Br(t,a)}}function Br(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Aa(e,n)}function Yd(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:ds(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=Pa;n&&(a=[r],i=Wn);const{revoke:o,proxy:s}=Proxy.revocable(a,i);return r.draft_=s,r.revoke_=o,s}var Pa={get(t,e){if(e===Dt)return t;const n=un(t);if(!La(n,e))return Kd(t,n,e);const r=n[e];return t.finalized_||!sn(r)?r:r===Ma(t.base_,e)?(Ta(t),t.copy_[e]=Ra(r,t)):r},has(t,e){return e in un(t)},ownKeys(t){return Reflect.ownKeys(un(t))},set(t,e,n){const r=ms(un(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const a=Ma(un(t),e),i=a==null?void 0:a[Dt];if(i&&i.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(Hd(n,a)&&(n!==void 0||La(t.base_,e)))return!0;Ta(t),ka(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Ma(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Ta(t),ka(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=un(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){gt(11)},getPrototypeOf(t){return bn(t.base_)},setPrototypeOf(){gt(12)}},Wn={};yr(Pa,(t,e)=>{Wn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Wn.deleteProperty=function(t,e){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(e))&&gt(13),Wn.set.call(this,t,e,void 0)},Wn.set=function(t,e,n){return process.env.NODE_ENV!=="production"&&e!=="length"&&isNaN(parseInt(e))&&gt(14),Pa.set.call(this,t[0],e,n,t[0])};function Ma(t,e){const n=t[Dt];return(n?un(n):t)[e]}function Kd(t,e,n){var a;const r=ms(e,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(t.draft_):void 0}function ms(t,e){if(!(e in t))return;let n=bn(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=bn(n)}}function ka(t){t.modified_||(t.modified_=!0,t.parent_&&ka(t.parent_))}function Ta(t){t.copy_||(t.copy_=Sa(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Xd=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const i=n;n=e;const o=this;return function(u=i,...c){return o.produce(u,f=>n.call(this,f,...c))}}typeof n!="function"&&gt(6),r!==void 0&&typeof r!="function"&&gt(7);let a;if(sn(e)){const i=hs(this),o=Ra(e,void 0);let s=!0;try{a=n(o),s=!1}finally{s?Oa(i):Fa(i)}return ps(i,r),vs(a,i)}else if(!e||typeof e!="object"){if(a=n(e),a===void 0&&(a=e),a===us&&(a=void 0),this.autoFreeze_&&Aa(a,!0),r){const i=[],o=[];ln("Patches").generateReplacementPatches_(e,a,i,o),r(i,o)}return a}else gt(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(o,...s)=>this.produceWithPatches(o,u=>e(u,...s));let r,a;return[this.produce(e,n,(o,s)=>{r=o,a=s}),r,a]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){sn(t)||gt(8),on(t)&&(t=Jd(t));const e=hs(this),n=Ra(t,void 0);return n[Dt].isManual_=!0,Fa(e),n}finishDraft(t,e){const n=t&&t[Dt];(!n||!n.isManual_)&&gt(9);const{scope_:r}=n;return ps(r,e),vs(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const a=e[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(e=e.slice(n+1));const r=ln("Patches").applyPatches_;return on(t)?r(t,e):this.produce(t,a=>r(a,e))}};function Ra(t,e){const n=Dr(t)?ln("MapSet").proxyMap_(t,e):br(t)?ln("MapSet").proxySet_(t,e):Yd(t,e);return(e?e.scope_:ds()).drafts_.push(n),n}function Jd(t){return on(t)||gt(10,t),ys(t)}function ys(t){if(!sn(t)||Er(t))return t;const e=t[Dt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Sa(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Sa(t,!0);return yr(n,(r,a)=>{fs(n,r,ys(a))}),e&&(e.finalized_=!1),n}var bt=new Xd,ja=bt.produce;bt.produceWithPatches.bind(bt),bt.setAutoFreeze.bind(bt),bt.setUseStrictShallowCopy.bind(bt),bt.applyPatches.bind(bt);var Cs=bt.createDraft.bind(bt),Ds=bt.finishDraft.bind(bt),Qd={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var a=A.transform(n,e,{affinity:r});t.current=a,a==null&&t.unref()}}},$d={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var a=Ae.transform(n,e,{affinity:r});t.current=a,a==null&&t.unref()}}},ep={transform(t,e){var{current:n,affinity:r}=t;if(n!=null){var a=q.transform(n,e,{affinity:r});t.current=a,a==null&&t.unref()}}},xr=new WeakMap,Lr=new WeakMap,Un=new WeakMap,bs=new WeakMap,Es=new WeakMap,ws=new WeakMap,Bs=new WeakMap,A={ancestors(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=A.levels(t,e);return n?r=r.slice(1):r=r.slice(0,-1),r},common(t,e){for(var n=[],r=0;r<t.length&&r<e.length;r++){var a=t[r],i=e[r];if(a!==i)break;n.push(a)}return n},compare(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return 0},endsAfter(t,e){var n=t.length-1,r=t.slice(0,n),a=e.slice(0,n),i=t[n],o=e[n];return A.equals(r,a)&&i>o},endsAt(t,e){var n=t.length,r=t.slice(0,n),a=e.slice(0,n);return A.equals(r,a)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),a=e.slice(0,n),i=t[n],o=e[n];return A.equals(r,a)&&i<o},equals(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return A.compare(t,e)===1},isAncestor(t,e){return t.length<e.length&&A.compare(t,e)===0},isBefore(t,e){return A.compare(t,e)===-1},isChild(t,e){return t.length===e.length+1&&A.compare(t,e)===0},isCommon(t,e){return t.length<=e.length&&A.compare(t,e)===0},isDescendant(t,e){return t.length>e.length&&A.compare(t,e)===0},isParent(t,e){return t.length+1===e.length&&A.compare(t,e)===0},isPath(t){return Array.isArray(t)&&(t.length===0||typeof t[0]=="number")},isSibling(t,e){if(t.length!==e.length)return!1;var n=t.slice(0,-1),r=e.slice(0,-1),a=t[t.length-1],i=e[e.length-1];return a!==i&&A.equals(n,r)},levels(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,r=[],a=0;a<=t.length;a++)r.push(t.slice(0,a));return n&&r.reverse(),r},next(t){if(t.length===0)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},operationCanTransformPath(t){switch(t.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(t){if(t.length===0)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(t.length===0)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!A.isAncestor(e,t)&&!A.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t)return null;var r=[...t],{affinity:a="forward"}=n;if(t.length===0)return r;switch(e.type){case"insert_node":{var{path:i}=e;(A.equals(i,r)||A.endsBefore(i,r)||A.isAncestor(i,r))&&(r[i.length-1]+=1);break}case"remove_node":{var{path:o}=e;if(A.equals(o,r)||A.isAncestor(o,r))return null;A.endsBefore(o,r)&&(r[o.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=e;A.equals(s,r)||A.endsBefore(s,r)?r[s.length-1]-=1:A.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break}case"split_node":{var{path:c,position:f}=e;if(A.equals(c,r)){if(a==="forward")r[r.length-1]+=1;else if(a!=="backward")return null}else A.endsBefore(c,r)?r[c.length-1]+=1:A.isAncestor(c,r)&&t[c.length]>=f&&(r[c.length-1]+=1,r[c.length]-=f);break}case"move_node":{var{path:h,newPath:p}=e;if(A.equals(h,p))return r;if(A.isAncestor(h,r)||A.equals(h,r)){var v=p.slice();return A.endsBefore(h,p)&&h.length<p.length&&(v[h.length-1]-=1),v.concat(r.slice(h.length))}else A.isSibling(h,p)&&(A.isAncestor(p,r)||A.equals(p,r))?A.endsBefore(h,r)?r[h.length-1]-=1:r[h.length-1]+=1:A.endsBefore(p,r)||A.equals(p,r)||A.isAncestor(p,r)?(A.endsBefore(h,r)&&(r[h.length-1]-=1),r[p.length-1]+=1):A.endsBefore(h,r)&&(A.equals(p,r)&&(r[p.length-1]+=1),r[h.length-1]-=1);break}}return r}};function Hn(t){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hn(t)}function tp(t,e){if(Hn(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Hn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function np(t){var e=tp(t,"string");return Hn(e)==="symbol"?e:String(e)}function ft(t,e,n){return e=np(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rp=(t,e,n)=>{switch(n.type){case"insert_node":{var{path:r,node:a}=n,i=ae.parent(t,r),o=r[r.length-1];if(o>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(i.children.splice(o,0,a),e)for(var[s,u]of q.points(e))e[u]=Ae.transform(s,n);break}case"insert_text":{var{path:c,offset:f,text:h}=n;if(h.length===0)break;var p=ae.leaf(t,c),v=p.text.slice(0,f),C=p.text.slice(f);if(p.text=v+h+C,e)for(var[g,d]of q.points(e))e[d]=Ae.transform(g,n);break}case"merge_node":{var{path:D}=n,B=ae.get(t,D),E=A.previous(D),O=ae.get(t,E),b=ae.parent(t,D),w=D[D.length-1];if(ce.isText(B)&&ce.isText(O))O.text+=B.text;else if(!ce.isText(B)&&!ce.isText(O))O.children.push(...B.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(st.stringify(B)," ").concat(st.stringify(O)));if(b.children.splice(w,1),e)for(var[S,P]of q.points(e))e[P]=Ae.transform(S,n);break}case"move_node":{var{path:V,newPath:F}=n;if(A.isAncestor(V,F))throw new Error("Cannot move a path [".concat(V,"] to new path [").concat(F,"] because the destination is inside itself."));var j=ae.get(t,V),k=ae.parent(t,V),I=V[V.length-1];k.children.splice(I,1);var N=A.transform(V,n),z=ae.get(t,A.parent(N)),X=N[N.length-1];if(z.children.splice(X,0,j),e)for(var[_,$]of q.points(e))e[$]=Ae.transform(_,n);break}case"remove_node":{var{path:re}=n,T=re[re.length-1],R=ae.parent(t,re);if(R.children.splice(T,1),e)for(var[Z,H]of q.points(e)){var Q=Ae.transform(Z,n);if(e!=null&&Q!=null)e[H]=Q;else{var K=void 0,y=void 0;for(var[U,W]of ae.texts(t))if(A.compare(W,re)===-1)K=[U,W];else{y=[U,W];break}var M=!1;K&&y&&(A.equals(y[1],re)?M=!A.hasPrevious(y[1]):M=A.common(K[1],re).length<A.common(y[1],re).length),K&&!M?(Z.path=K[1],Z.offset=K[0].text.length):y?(Z.path=y[1],Z.offset=0):e=null}}break}case"remove_text":{var{path:J,offset:ne,text:G}=n;if(G.length===0)break;var ue=ae.leaf(t,J),ie=ue.text.slice(0,ne),de=ue.text.slice(ne+G.length);if(ue.text=ie+de,e)for(var[pe,Ce]of q.points(e))e[Ce]=Ae.transform(pe,n);break}case"set_node":{var{path:ye,properties:ge,newProperties:ve}=n;if(ye.length===0)throw new Error("Cannot set properties on the root node!");var Ie=ae.get(t,ye);for(var se in ve){if(se==="children"||se==="text")throw new Error('Cannot set the "'.concat(se,'" property of nodes!'));var Ne=ve[se];Ne==null?delete Ie[se]:Ie[se]=Ne}for(var fe in ge)ve.hasOwnProperty(fe)||delete Ie[fe];break}case"set_selection":{var{newProperties:we}=n;if(we==null)e=we;else{if(e==null){if(!q.isRange(we))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(st.stringify(we)," when there is no current selection."));e=Vn({},we)}for(var Me in we){var He=we[Me];if(He==null){if(Me==="anchor"||Me==="focus")throw new Error('Cannot remove the "'.concat(Me,'" selection property'));delete e[Me]}else e[Me]=He}}break}case"split_node":{var{path:qe,position:Ee,properties:ut}=n;if(qe.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(qe,"] because the root node cannot be split."));var it=ae.get(t,qe),At=ae.parent(t,qe),ht=qe[qe.length-1],wt;if(ce.isText(it)){var Tt=it.text.slice(0,Ee),vt=it.text.slice(Ee);it.text=Tt,wt=Vn(Vn({},ut),{},{text:vt})}else{var tn=it.children.slice(0,Ee),be=it.children.slice(Ee);it.children=tn,wt=Vn(Vn({},ut),{},{children:be})}if(At.children.splice(ht+1,0,wt),e)for(var[Te,Re]of q.points(e))e[Re]=Ae.transform(Te,n);break}}return e},ap={transform(t,e){t.children=Cs(t.children);var n=t.selection&&Cs(t.selection);try{n=rp(t,n,e)}finally{t.children=Ds(t.children),n?t.selection=on(n)?Ds(n):n:t.selection=null}}},ip={insertNodes(t,e,n){t.insertNodes(e,n)},liftNodes(t,e){t.liftNodes(e)},mergeNodes(t,e){t.mergeNodes(e)},moveNodes(t,e){t.moveNodes(e)},removeNodes(t,e){t.removeNodes(e)},setNodes(t,e,n){t.setNodes(e,n)},splitNodes(t,e){t.splitNodes(e)},unsetNodes(t,e,n){t.unsetNodes(e,n)},unwrapNodes(t,e){t.unwrapNodes(e)},wrapNodes(t,e,n){t.wrapNodes(e,n)}},op={collapse(t,e){t.collapse(e)},deselect(t){t.deselect()},move(t,e){t.move(e)},select(t,e){t.select(e)},setPoint(t,e,n){t.setPoint(e,n)},setSelection(t,e){t.setSelection(e)}},Ls=(t,e)=>{for(var n in t){var r=t[n],a=e[n];if(ct(r)&&ct(a)){if(!Ls(r,a))return!1}else if(Array.isArray(r)&&Array.isArray(a)){if(r.length!==a.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==a[i])return!1}else if(r!==a)return!1}for(var o in e)if(t[o]===void 0&&e[o]!==void 0)return!1;return!0};function sp(t,e){if(t==null)return{};var n={},r=Object.keys(t),a,i;for(i=0;i<r.length;i++)a=r[i],!(e.indexOf(a)>=0)&&(n[a]=t[a]);return n}function jt(t,e){if(t==null)return{};var n=sp(t,e),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var up=["anchor","focus"];function Ss(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function lp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ss(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ss(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var q={edges(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:a}=t;return q.isBackward(t)===n?[r,a]:[a,r]},end(t){var[,e]=q.edges(t);return e},equals(t,e){return Ae.equals(t.anchor,e.anchor)&&Ae.equals(t.focus,e.focus)},includes(t,e){if(q.isRange(e)){if(q.includes(t,e.anchor)||q.includes(t,e.focus))return!0;var[n,r]=q.edges(t),[a,i]=q.edges(e);return Ae.isBefore(n,a)&&Ae.isAfter(r,i)}var[o,s]=q.edges(t),u=!1,c=!1;return Ae.isPoint(e)?(u=Ae.compare(e,o)>=0,c=Ae.compare(e,s)<=0):(u=A.compare(e,o.path)>=0,c=A.compare(e,s.path)<=0),u&&c},intersection(t,e){var n=jt(t,up),[r,a]=q.edges(t),[i,o]=q.edges(e),s=Ae.isBefore(r,i)?i:r,u=Ae.isBefore(a,o)?a:o;return Ae.isBefore(u,s)?null:lp({anchor:s,focus:u},n)},isBackward(t){var{anchor:e,focus:n}=t;return Ae.isAfter(e,n)},isCollapsed(t){var{anchor:e,focus:n}=t;return Ae.equals(e,n)},isExpanded(t){return!q.isCollapsed(t)},isForward(t){return!q.isBackward(t)},isRange(t){return ct(t)&&Ae.isPoint(t.anchor)&&Ae.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=q.edges(t);return e},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ja(t,r=>{if(r===null)return null;var{affinity:a="inward"}=n,i,o;if(a==="inward"){var s=q.isCollapsed(r);q.isForward(r)?(i="forward",o=s?i:"backward"):(i="backward",o=s?i:"forward")}else a==="outward"?q.isForward(r)?(i="backward",o="forward"):(i="forward",o="backward"):(i=a,o=a);var u=Ae.transform(r.anchor,e,{affinity:i}),c=Ae.transform(r.focus,e,{affinity:o});if(!u||!c)return null;r.anchor=u,r.focus=c})}},As=t=>ct(t)&&ae.isNodeList(t.children)&&!m.isEditor(t),le={isAncestor(t){return ct(t)&&ae.isNodeList(t.children)},isElement:As,isElementList(t){return Array.isArray(t)&&t.every(e=>le.isElement(e))},isElementProps(t){return t.children!==void 0},isElementType:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return As(e)&&e[r]===n},matches(t,e){for(var n in e)if(n!=="children"&&t[n]!==e[n])return!1;return!0}},cp=["children"],fp=["text"],Os=new WeakMap,ae={ancestor(t,e){var n=ae.get(t,e);if(ce.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(st.stringify(n)));return n},ancestors(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of A.ancestors(e,n)){var a=ae.ancestor(t,r),i=[a,r];yield i}}()},child(t,e){if(ce.isText(t))throw new Error("Cannot get the child of a text node: ".concat(st.stringify(t)));var n=t.children[e];if(n==null)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(st.stringify(t)));return n},children(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,a=ae.ancestor(t,e),{children:i}=a,o=r?i.length-1:0;r?o>=0:o<i.length;){var s=ae.child(a,o),u=e.concat(o);yield[s,u],o=r?o-1:o+1}}()},common(t,e,n){var r=A.common(e,n),a=ae.get(t,r);return[a,r]},descendant(t,e){var n=ae.get(t,e);if(m.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(e,"] because it refers to the root editor node instead: ").concat(st.stringify(n)));return n},descendants(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ae.nodes(t,e))r.length!==0&&(yield[n,r])}()},elements(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ae.nodes(t,e))le.isElement(n)&&(yield[n,r])}()},extractProps(t){if(le.isAncestor(t)){var e=jt(t,cp);return e}else{var e=jt(t,fp);return e}},first(t,e){for(var n=e.slice(),r=ae.get(t,n);r&&!(ce.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(t,e){if(ce.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(st.stringify(t)));var n=ja({children:t.children},r=>{var[a,i]=q.edges(e),o=ae.nodes(r,{reverse:!0,pass:p=>{var[,v]=p;return!q.includes(e,v)}});for(var[,s]of o){if(!q.includes(e,s)){var u=ae.parent(r,s),c=s[s.length-1];u.children.splice(c,1)}if(A.equals(s,i.path)){var f=ae.leaf(r,s);f.text=f.text.slice(0,i.offset)}if(A.equals(s,a.path)){var h=ae.leaf(r,s);h.text=h.text.slice(a.offset)}}m.isEditor(r)&&(r.selection=null)});return n.children},get(t,e){for(var n=t,r=0;r<e.length;r++){var a=e[r];if(ce.isText(n)||!n.children[a])throw new Error("Cannot find a descendant at path [".concat(e,"] in node: ").concat(st.stringify(t)));n=n.children[a]}return n},has(t,e){for(var n=t,r=0;r<e.length;r++){var a=e[r];if(ce.isText(n)||!n.children[a])return!1;n=n.children[a]}return!0},isNode(t){return ce.isText(t)||le.isElement(t)||m.isEditor(t)},isNodeList(t){if(!Array.isArray(t))return!1;var e=Os.get(t);if(e!==void 0)return e;var n=t.every(r=>ae.isNode(r));return Os.set(t,n),n},last(t,e){for(var n=e.slice(),r=ae.get(t,n);r&&!(ce.isText(r)||r.children.length===0);){var a=r.children.length-1;r=r.children[a],n.push(a)}return[r,n]},leaf(t,e){var n=ae.get(t,e);if(!ce.isText(n))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(st.stringify(n)));return n},levels(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function*(){for(var r of A.levels(e,n)){var a=ae.get(t,r);yield[a,r]}}()},matches(t,e){return le.isElement(t)&&le.isElementProps(e)&&le.matches(t,e)||ce.isText(t)&&ce.isTextProps(e)&&ce.matches(t,e)},nodes(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=e,{from:a=[],to:i}=e,o=new Set,s=[],u=t;!(i&&(r?A.isBefore(s,i):A.isAfter(s,i)));){if(o.has(u)||(yield[u,s]),!o.has(u)&&!ce.isText(u)&&u.children.length!==0&&(n==null||n([u,s])===!1)){o.add(u);var c=r?u.children.length-1:0;A.isAncestor(s,a)&&(c=a[s.length]),s=s.concat(c),u=ae.get(t,s);continue}if(s.length===0)break;if(!r){var f=A.next(s);if(ae.has(t,f)){s=f,u=ae.get(t,s);continue}}if(r&&s[s.length-1]!==0){var h=A.previous(s);s=h,u=ae.get(t,s);continue}s=A.parent(s),u=ae.get(t,s),o.add(u)}}()},parent(t,e){var n=A.parent(e),r=ae.get(t,n);if(ce.isText(r))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return r},string(t){return ce.isText(t)?t.text:t.children.map(ae.string).join("")},texts(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){for(var[n,r]of ae.nodes(t,e))ce.isText(n)&&(yield[n,r])}()}};function Fs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Ze(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Zt={isNodeOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_node")},isOperation(t){if(!ct(t))return!1;switch(t.type){case"insert_node":return A.isPath(t.path)&&ae.isNode(t.node);case"insert_text":return typeof t.offset=="number"&&typeof t.text=="string"&&A.isPath(t.path);case"merge_node":return typeof t.position=="number"&&A.isPath(t.path)&&ct(t.properties);case"move_node":return A.isPath(t.path)&&A.isPath(t.newPath);case"remove_node":return A.isPath(t.path)&&ae.isNode(t.node);case"remove_text":return typeof t.offset=="number"&&typeof t.text=="string"&&A.isPath(t.path);case"set_node":return A.isPath(t.path)&&ct(t.properties)&&ct(t.newProperties);case"set_selection":return t.properties===null&&q.isRange(t.newProperties)||t.newProperties===null&&q.isRange(t.properties)||ct(t.properties)&&ct(t.newProperties);case"split_node":return A.isPath(t.path)&&typeof t.position=="number"&&ct(t.properties);default:return!1}},isOperationList(t){return Array.isArray(t)&&t.every(e=>Zt.isOperation(e))},isSelectionOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return Zt.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return Ze(Ze({},t),{},{type:"remove_node"});case"insert_text":return Ze(Ze({},t),{},{type:"remove_text"});case"merge_node":return Ze(Ze({},t),{},{type:"split_node",path:A.previous(t.path)});case"move_node":{var{newPath:e,path:n}=t;if(A.equals(e,n))return t;if(A.isSibling(n,e))return Ze(Ze({},t),{},{path:e,newPath:n});var r=A.transform(n,t),a=A.transform(A.next(n),t);return Ze(Ze({},t),{},{path:r,newPath:a})}case"remove_node":return Ze(Ze({},t),{},{type:"insert_node"});case"remove_text":return Ze(Ze({},t),{},{type:"insert_text"});case"set_node":{var{properties:i,newProperties:o}=t;return Ze(Ze({},t),{},{properties:o,newProperties:i})}case"set_selection":{var{properties:s,newProperties:u}=t;return s==null?Ze(Ze({},t),{},{properties:u,newProperties:null}):u==null?Ze(Ze({},t),{},{properties:null,newProperties:s}):Ze(Ze({},t),{},{properties:u,newProperties:s})}case"split_node":return Ze(Ze({},t),{},{type:"merge_node",path:A.next(t.path)})}}},Ps=new WeakMap,dp=t=>{var e=Ps.get(t);if(e!==void 0)return e;if(!ct(t))return!1;var n=typeof t.addMark=="function"&&typeof t.apply=="function"&&typeof t.deleteFragment=="function"&&typeof t.insertBreak=="function"&&typeof t.insertSoftBreak=="function"&&typeof t.insertFragment=="function"&&typeof t.insertNode=="function"&&typeof t.insertText=="function"&&typeof t.isElementReadOnly=="function"&&typeof t.isInline=="function"&&typeof t.isSelectable=="function"&&typeof t.isVoid=="function"&&typeof t.normalizeNode=="function"&&typeof t.onChange=="function"&&typeof t.removeMark=="function"&&typeof t.getDirtyPaths=="function"&&(t.marks===null||ct(t.marks))&&(t.selection===null||q.isRange(t.selection))&&ae.isNodeList(t.children)&&Zt.isOperationList(t.operations);return Ps.set(t,n),n},m={above(t,e){return t.above(e)},addMark(t,e,n){t.addMark(e,n)},after(t,e,n){return t.after(e,n)},before(t,e,n){return t.before(e,n)},deleteBackward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteBackward(n)},deleteForward(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=e;t.deleteForward(n)},deleteFragment(t,e){t.deleteFragment(e)},edges(t,e){return t.edges(e)},elementReadOnly(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.elementReadOnly(e)},end(t,e){return t.end(e)},first(t,e){return t.first(e)},fragment(t,e){return t.fragment(e)},hasBlocks(t,e){return t.hasBlocks(e)},hasInlines(t,e){return t.hasInlines(e)},hasPath(t,e){return t.hasPath(e)},hasTexts(t,e){return t.hasTexts(e)},insertBreak(t){t.insertBreak()},insertFragment(t,e,n){t.insertFragment(e,n)},insertNode(t,e){t.insertNode(e)},insertSoftBreak(t){t.insertSoftBreak()},insertText(t,e){t.insertText(e)},isBlock(t,e){return t.isBlock(e)},isEdge(t,e,n){return t.isEdge(e,n)},isEditor(t){return dp(t)},isElementReadOnly(t,e){return t.isElementReadOnly(e)},isEmpty(t,e){return t.isEmpty(e)},isEnd(t,e,n){return t.isEnd(e,n)},isInline(t,e){return t.isInline(e)},isNormalizing(t){return t.isNormalizing()},isSelectable(t,e){return t.isSelectable(e)},isStart(t,e,n){return t.isStart(e,n)},isVoid(t,e){return t.isVoid(e)},last(t,e){return t.last(e)},leaf(t,e,n){return t.leaf(e,n)},levels(t,e){return t.levels(e)},marks(t){return t.getMarks()},next(t,e){return t.next(e)},node(t,e,n){return t.node(e,n)},nodes(t,e){return t.nodes(e)},normalize(t,e){t.normalize(e)},parent(t,e,n){return t.parent(e,n)},path(t,e,n){return t.path(e,n)},pathRef(t,e,n){return t.pathRef(e,n)},pathRefs(t){return t.pathRefs()},point(t,e,n){return t.point(e,n)},pointRef(t,e,n){return t.pointRef(e,n)},pointRefs(t){return t.pointRefs()},positions(t,e){return t.positions(e)},previous(t,e){return t.previous(e)},range(t,e,n){return t.range(e,n)},rangeRef(t,e,n){return t.rangeRef(e,n)},rangeRefs(t){return t.rangeRefs()},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){t.setNormalizing(e)},start(t,e){return t.start(e)},string(t,e,n){return t.string(e,n)},unhangRange(t,e,n){return t.unhangRange(e,n)},void(t,e){return t.void(e)},withoutNormalizing(t,e){t.withoutNormalizing(e)},shouldMergeNodesRemovePrevNode:(t,e,n)=>t.shouldMergeNodesRemovePrevNode(e,n)},pp={isSpan(t){return Array.isArray(t)&&t.length===2&&t.every(A.isPath)}};function Ms(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function ks(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ms(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ms(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ae={compare(t,e){var n=A.compare(t.path,e.path);return n===0?t.offset<e.offset?-1:t.offset>e.offset?1:0:n},isAfter(t,e){return Ae.compare(t,e)===1},isBefore(t,e){return Ae.compare(t,e)===-1},equals(t,e){return t.offset===e.offset&&A.equals(t.path,e.path)},isPoint(t){return ct(t)&&typeof t.offset=="number"&&A.isPath(t.path)},transform(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ja(t,r=>{if(r===null)return null;var{affinity:a="forward"}=n,{path:i,offset:o}=r;switch(e.type){case"insert_node":case"move_node":{r.path=A.transform(i,e,n);break}case"insert_text":{A.equals(e.path,i)&&(e.offset<o||e.offset===o&&a==="forward")&&(r.offset+=e.text.length);break}case"merge_node":{A.equals(e.path,i)&&(r.offset+=e.position),r.path=A.transform(i,e,n);break}case"remove_text":{A.equals(e.path,i)&&e.offset<=o&&(r.offset-=Math.min(o-e.offset,e.text.length));break}case"remove_node":{if(A.equals(e.path,i)||A.isAncestor(e.path,i))return null;r.path=A.transform(i,e,n);break}case"split_node":{if(A.equals(e.path,i)){if(e.position===o&&a==null)return null;(e.position<o||e.position===o&&a==="forward")&&(r.offset-=e.position,r.path=A.transform(i,e,ks(ks({},n),{},{affinity:"forward"})))}else r.path=A.transform(i,e,n);break}}})}},Ts=void 0,st={setScrubber(t){Ts=t},stringify(t){return JSON.stringify(t,Ts)}},hp=["text"],vp=["anchor","focus"];function Rs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function It(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ce={equals(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function a(i){var o=jt(i,hp);return o}return Ls(r?a(t):t,r?a(e):e)},isText(t){return ct(t)&&typeof t.text=="string"},isTextList(t){return Array.isArray(t)&&t.every(e=>ce.isText(e))},isTextProps(t){return t.text!==void 0},matches(t,e){for(var n in e)if(n!=="text"&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0},decorations(t,e){var n=[It({},t)];for(var r of e){var a=jt(r,vp),[i,o]=q.edges(r),s=[],u=0,c=i.offset,f=o.offset;for(var h of n){var{length:p}=h.text,v=u;if(u+=p,c<=v&&u<=f){Object.assign(h,a),s.push(h);continue}if(c!==f&&(c===u||f===v)||c>u||f<v||f===v&&v!==0){s.push(h);continue}var C=h,g=void 0,d=void 0;if(f<u){var D=f-v;d=It(It({},C),{},{text:C.text.slice(D)}),C=It(It({},C),{},{text:C.text.slice(0,D)})}if(c>v){var B=c-v;g=It(It({},C),{},{text:C.text.slice(0,B)}),C=It(It({},C),{},{text:C.text.slice(B)})}Object.assign(C,a),g&&s.push(g),s.push(C),d&&s.push(d)}n=s}return n}},Ia=t=>t.selection?t.selection:t.children.length>0?m.end(t,[]):[0],En=(t,e)=>{var[n]=m.node(t,e);return r=>r===n},Na=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,a=n?bp(e):e,i=xe.None,o=xe.None,s=0,u=null,c=null;for(var f of a){var h=f.codePointAt(0);if(!h)break;var p=kp(f,h);if([i,o]=r?[o,p]:[p,i],wn(i,xe.ZWJ)&&wn(o,xe.ExtPict)&&(r?u=js(e.substring(0,s)):u=js(e.substring(0,e.length-s)),!u)||wn(i,xe.RI)&&wn(o,xe.RI)&&(c!==null?c=!c:r?c=!0:c=Np(e.substring(0,e.length-s)),!c)||i!==xe.None&&o!==xe.None&&Rp(i,o))break;s+=f.length}return s||1},gp=/\s/,mp=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,yp=/['\u2018\u2019]/,Cp=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,a=!1;e.length>0;){var i=Na(e,n),[o,s]=za(e,i,n);if(Dp(o,s,n))a=!0,r+=i;else if(!a)r+=i;else break;e=s}return r},za=(t,e,n)=>{if(n){var r=t.length-e;return[t.slice(r,t.length),t.slice(0,r)]}return[t.slice(0,e),t.slice(e)]},Dp=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(gp.test(e))return!1;if(yp.test(e)){var a=Na(n,r),[i,o]=za(n,a,r);if(t(i,o,r))return!0}return!mp.test(e)},bp=function*(e){for(var n=e.length-1,r=0;r<e.length;r++){var a=e.charAt(n-r);if(wp(a.charCodeAt(0))){var i=e.charAt(n-r-1);if(Ep(i.charCodeAt(0))){yield i+a,r++;continue}}yield a}},Ep=t=>t>=55296&&t<=56319,wp=t=>t>=56320&&t<=57343,xe;(function(t){t[t.None=0]="None",t[t.Extend=1]="Extend",t[t.ZWJ=2]="ZWJ",t[t.RI=4]="RI",t[t.Prepend=8]="Prepend",t[t.SpacingMark=16]="SpacingMark",t[t.L=32]="L",t[t.V=64]="V",t[t.T=128]="T",t[t.LV=256]="LV",t[t.LVT=512]="LVT",t[t.ExtPict=1024]="ExtPict",t[t.Any=2048]="Any"})(xe||(xe={}));var Bp=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,xp=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,Lp=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Sp=/^[\u1100-\u115F\uA960-\uA97C]$/,Ap=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Op=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Fp=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Pp=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Mp=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,kp=(t,e)=>{var n=xe.Any;return t.search(Bp)!==-1&&(n|=xe.Extend),e===8205&&(n|=xe.ZWJ),e>=127462&&e<=127487&&(n|=xe.RI),t.search(xp)!==-1&&(n|=xe.Prepend),t.search(Lp)!==-1&&(n|=xe.SpacingMark),t.search(Sp)!==-1&&(n|=xe.L),t.search(Ap)!==-1&&(n|=xe.V),t.search(Op)!==-1&&(n|=xe.T),t.search(Fp)!==-1&&(n|=xe.LV),t.search(Pp)!==-1&&(n|=xe.LVT),t.search(Mp)!==-1&&(n|=xe.ExtPict),n};function wn(t,e){return(t&e)!==0}var Tp=[[xe.L,xe.L|xe.V|xe.LV|xe.LVT],[xe.LV|xe.V,xe.V|xe.T],[xe.LVT|xe.T,xe.T],[xe.Any,xe.Extend|xe.ZWJ],[xe.Any,xe.SpacingMark],[xe.Prepend,xe.Any],[xe.ZWJ,xe.ExtPict],[xe.RI,xe.RI]];function Rp(t,e){return Tp.findIndex(n=>wn(t,n[0])&&wn(e,n[1]))===-1}var jp=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,js=t=>t.search(jp)!==-1,Ip=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Np=t=>{var e=t.match(Ip);if(e===null)return!1;var n=e[0].length/2;return n%2===1},zp={delete(t,e){t.delete(e)},insertFragment(t,e,n){t.insertFragment(e,n)},insertText(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(t,()=>{var{voids:r=!1}=n,{at:a=Ia(t)}=n;if(A.isPath(a)&&(a=m.range(t,a)),q.isRange(a))if(q.isCollapsed(a))a=a.anchor;else{var i=q.end(a);if(!r&&m.void(t,{at:i}))return;var o=q.start(a),s=m.pointRef(t,o),u=m.pointRef(t,i);ee.delete(t,{at:a,voids:r});var c=s.unref(),f=u.unref();a=c||f,ee.setSelection(t,{anchor:a,focus:a})}if(!(!r&&m.void(t,{at:a})||m.elementReadOnly(t,{at:a}))){var{path:h,offset:p}=a;e.length>0&&t.apply({type:"insert_text",path:h,offset:p,text:e})}})}};function Is(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Sr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Is(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Is(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ee=Sr(Sr(Sr(Sr({},ap),ip),op),zp),Ar=new WeakMap,_p=t=>Ar.get(t)||!1,Wp=(t,e,n)=>{var r=Ar.get(t)||!1;Ar.set(t,!0);try{e(),n()}finally{Ar.set(t,r)}};function Ns(t,e,n){var r=xr.get(t)||[],a=Lr.get(t)||new Set,i,o,s=h=>{if(h){var p=h.join(",");o.has(p)||(o.add(p),i.push(h))}};if(n){i=[],o=new Set;for(var u of r){var c=n(u);s(c)}}else i=r,o=a;for(var f of e)s(f);xr.set(t,i),Lr.set(t,o)}var Up=(t,e)=>{for(var n of m.pathRefs(t))Qd.transform(n,e);for(var r of m.pointRefs(t))$d.transform(r,e);for(var a of m.rangeRefs(t))ep.transform(a,e);if(!_p(t)){var i=A.operationCanTransformPath(e)?o=>A.transform(o,e):void 0;Ns(t,t.getDirtyPaths(e),i)}ee.transform(t,e),t.operations.push(e),m.normalize(t,{operation:e}),e.type==="set_selection"&&(t.marks=null),Un.get(t)||(Un.set(t,!0),Promise.resolve().then(()=>{Un.set(t,!1),t.onChange({operation:e}),t.operations=[]}))},Hp=(t,e)=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:n}=e;return A.levels(n)}case"insert_node":{var{node:r,path:a}=e,i=A.levels(a),o=ce.isText(r)?[]:Array.from(ae.nodes(r),F=>{var[,j]=F;return a.concat(j)});return[...i,...o]}case"merge_node":{var{path:s}=e,u=A.ancestors(s),c=A.previous(s);return[...u,c]}case"move_node":{var{path:f,newPath:h}=e;if(A.equals(f,h))return[];var p=[],v=[];for(var C of A.ancestors(f)){var g=A.transform(C,e);p.push(g)}for(var d of A.ancestors(h)){var D=A.transform(d,e);v.push(D)}var B=v[v.length-1],E=h[h.length-1],O=B.concat(E);return[...p,...v,O]}case"remove_node":{var{path:b}=e,w=A.ancestors(b);return[...w]}case"split_node":{var{path:S}=e,P=A.levels(S),V=A.next(S);return[...P,V]}default:return[]}},Vp=t=>{var{selection:e}=t;return e?ae.fragment(t,e):[]},qp=(t,e)=>{var[n,r]=e;if(!ce.isText(n)){if(le.isElement(n)&&n.children.length===0){var a={text:""};ee.insertNodes(t,a,{at:r.concat(0),voids:!0});return}for(var i=m.isEditor(n)?!1:le.isElement(n)&&(t.isInline(n)||n.children.length===0||ce.isText(n.children[0])||t.isInline(n.children[0])),o=0,s=0;s<n.children.length;s++,o++){var u=ae.get(t,r);if(!ce.isText(u)){var c=u.children[o],f=u.children[o-1],h=s===n.children.length-1,p=ce.isText(c)||le.isElement(c)&&t.isInline(c);if(p!==i)ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--;else if(le.isElement(c)){if(t.isInline(c)){if(f==null||!ce.isText(f)){var v={text:""};ee.insertNodes(t,v,{at:r.concat(o),voids:!0}),o++}else if(h){var C={text:""};ee.insertNodes(t,C,{at:r.concat(o+1),voids:!0}),o++}}}else{if(!ce.isText(c)&&!("children"in c)){var g=c;g.children=[]}f!=null&&ce.isText(f)&&(ce.equals(c,f,{loose:!0})?(ee.mergeNodes(t,{at:r.concat(o),voids:!0}),o--):f.text===""?(ee.removeNodes(t,{at:r.concat(o-1),voids:!0}),o--):c.text===""&&(ee.removeNodes(t,{at:r.concat(o),voids:!0}),o--))}}}}},Zp=(t,e)=>{var{iteration:n,initialDirtyPathsLength:r}=e,a=r*42;if(n>a)throw new Error("Could not completely normalize the editor after ".concat(a," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},Gp=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:a="lowest",at:i=e.selection,match:o}=n;if(i){var s=m.path(e,i),u=a==="lowest";for(var[c,f]of m.levels(e,{at:s,voids:r,match:o,reverse:u}))if(!ce.isText(c)){if(q.isRange(i)){if(A.isAncestor(f,i.anchor.path)&&A.isAncestor(f,i.focus.path))return[c,f]}else if(!A.equals(s,f))return[c,f]}}};function zs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function _s(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Yp=(t,e,n)=>{var{selection:r}=t;if(r){var a=(h,p)=>{if(!ce.isText(h))return!1;var[v,C]=m.parent(t,p);return!t.isVoid(v)||t.markableVoid(v)},i=q.isExpanded(r),o=!1;if(!i){var[s,u]=m.node(t,r);if(s&&a(s,u)){var[c]=m.parent(t,u);o=c&&t.markableVoid(c)}}if(i||o)ee.setNodes(t,{[e]:n},{match:a,split:!0,voids:!0});else{var f=_s(_s({},m.marks(t)||{}),{},{[e]:n});t.marks=f,Un.get(t)||t.onChange()}}};function Ws(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Us(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ws(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Kp=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=m.point(e,n,{edge:"end"}),i=m.end(e,[]),o={anchor:a,focus:i},{distance:s=1}=r,u=0,c;for(var f of m.positions(e,Us(Us({},r),{},{at:o}))){if(u>s)break;u!==0&&(c=f),u++}return c};function Hs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Vs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Xp=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=m.start(e,[]),i=m.point(e,n,{edge:"start"}),o={anchor:a,focus:i},{distance:s=1}=r,u=0,c;for(var f of m.positions(e,Vs(Vs({},r),{},{at:o,reverse:!0}))){if(u>s)break;u!==0&&(c=f),u++}return c},Jp=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e,reverse:!0})},Qp=(t,e)=>{var{selection:n}=t;n&&q.isCollapsed(n)&&ee.delete(t,{unit:e})},$p=function(e){var{direction:n="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&q.isExpanded(r)&&ee.delete(e,{reverse:n==="backward"})},eh=(t,e)=>[m.start(t,e),m.end(t,e)];function qs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Zs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var th=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Zs(Zs({},n),{},{match:r=>le.isElement(r)&&m.isElementReadOnly(e,r)}))},nh=(t,e)=>m.point(t,e,{edge:"end"}),rh=(t,e)=>{var n=m.path(t,e,{edge:"start"});return m.node(t,n)},ah=(t,e)=>{var n=m.range(t,e);return ae.fragment(t,n)};function Gs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Ys(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var ih=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Ys(Ys({},n),{},{match:r=>le.isElement(r)&&m.isVoid(e,r)}))},oh=(t,e)=>e.children.some(n=>le.isElement(n)&&m.isBlock(t,n)),sh=(t,e)=>e.children.some(n=>ce.isText(n)||m.isInline(t,n)),uh=(t,e)=>ae.has(t,e),lh=(t,e)=>e.children.every(n=>ce.isText(n)),ch=t=>{ee.splitNodes(t,{always:!0})},fh=(t,e,n)=>{ee.insertNodes(t,e,n)},dh=t=>{ee.splitNodes(t,{always:!0})};function Ks(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function ph(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ks(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ks(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var hh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:a,marks:i}=e;if(a){if(i){var o=ph({text:n},i);ee.insertNodes(e,o,{at:r.at,voids:r.voids})}else ee.insertText(e,n,r);e.marks=null}},vh=(t,e)=>!t.isInline(e),gh=(t,e,n)=>m.isStart(t,e,n)||m.isEnd(t,e,n),mh=(t,e)=>{var{children:n}=e,[r]=n;return n.length===0||n.length===1&&ce.isText(r)&&r.text===""&&!t.isVoid(e)},yh=(t,e,n)=>{var r=m.end(t,n);return Ae.equals(e,r)},Ch=t=>{var e=bs.get(t);return e===void 0?!0:e},Dh=(t,e,n)=>{if(e.offset!==0)return!1;var r=m.start(t,n);return Ae.equals(e,r)},bh=(t,e)=>{var n=m.path(t,e,{edge:"end"});return m.node(t,n)},Eh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=m.path(e,n,r),i=ae.leaf(e,a);return[i,a]};function wh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,reverse:r=!1,voids:a=!1}=e,{match:i}=e;if(i==null&&(i=()=>!0),!!n){var o=[],s=m.path(t,n);for(var[u,c]of ae.levels(t,s))if(i(u,c)&&(o.push([u,c]),!a&&le.isElement(u)&&m.isVoid(t,u)))break;r&&o.reverse(),yield*o}}()}var Bh=["text"],xh=["text"],Lh=function(e){var{marks:n,selection:r}=e;if(!r)return null;var{anchor:a,focus:i}=r;if(n)return n;if(q.isExpanded(r)){var o=m.isEnd(e,a,a.path);if(o){var s=m.after(e,a);s&&(a=s)}var[u]=m.nodes(e,{match:ce.isText,at:{anchor:a,focus:i}});if(u){var[c]=u,f=jt(c,Bh);return f}else return{}}var{path:h}=a,[p]=m.leaf(e,h);if(a.offset===0){var v=m.previous(e,{at:h,match:ce.isText}),C=m.above(e,{match:O=>le.isElement(O)&&m.isVoid(e,O)&&e.markableVoid(O)});if(!C){var g=m.above(e,{match:O=>le.isElement(O)&&m.isBlock(e,O)});if(v&&g){var[d,D]=v,[,B]=g;A.isAncestor(B,D)&&(p=d)}}}var E=jt(p,xh);return E},Sh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:a=!1}=n,{match:i,at:o=e.selection}=n;if(o){var s=m.after(e,o,{voids:a});if(s){var[,u]=m.last(e,[]),c=[s.path,u];if(A.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(A.isPath(o)){var[f]=m.parent(e,o);i=p=>f.children.includes(p)}else i=()=>!0;var[h]=m.nodes(e,{at:c,match:i,mode:r,voids:a});return h}}},Ah=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=m.path(e,n,r),i=ae.get(e,a);return[i,a]};function Oh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,mode:r="all",universal:a=!1,reverse:i=!1,voids:o=!1,ignoreNonSelectable:s=!1}=e,{match:u}=e;if(u||(u=()=>!0),!!n){var c,f;if(pp.isSpan(n))c=n[0],f=n[1];else{var h=m.path(t,n,{edge:"start"}),p=m.path(t,n,{edge:"end"});c=i?p:h,f=i?h:p}var v=ae.nodes(t,{reverse:i,from:c,to:f,pass:O=>{var[b]=O;return le.isElement(b)?!!(!o&&(m.isVoid(t,b)||m.isElementReadOnly(t,b))||s&&!m.isSelectable(t,b)):!1}}),C=[],g;for(var[d,D]of v)if(!(s&&le.isElement(d)&&!m.isSelectable(t,d))){var B=g&&A.compare(D,g[1])===0;if(!(r==="highest"&&B)){if(!u(d,D)){if(a&&!B&&ce.isText(d))return;continue}if(r==="lowest"&&B){g=[d,D];continue}var E=r==="lowest"?g:[d,D];E&&(a?C.push(E):yield E),g=[d,D]}}r==="lowest"&&g&&(a?C.push(g):yield g),a&&(yield*C)}}()}var Fh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:a}=n,i=f=>xr.get(f)||[],o=f=>Lr.get(f)||new Set,s=f=>{var h=i(f).pop(),p=h.join(",");return o(f).delete(p),h};if(m.isNormalizing(e)){if(r){var u=Array.from(ae.nodes(e),f=>{var[,h]=f;return h}),c=new Set(u.map(f=>f.join(",")));xr.set(e,u),Lr.set(e,c)}i(e).length!==0&&m.withoutNormalizing(e,()=>{for(var f of i(e))if(ae.has(e,f)){var h=m.node(e,f),[p,v]=h;le.isElement(p)&&p.children.length===0&&e.normalizeNode(h,{operation:a})}for(var C=i(e),g=C.length,d=0;C.length!==0;){if(!e.shouldNormalize({dirtyPaths:C,iteration:d,initialDirtyPathsLength:g,operation:a}))return;var D=s(e);if(ae.has(e,D)){var B=m.node(e,D);e.normalizeNode(B,{operation:a})}d++,C=i(e)}})}},Ph=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=m.path(e,n,r),i=A.parent(a),o=m.node(e,i);return o},Mh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:a="forward"}=r,i={current:n,affinity:a,unref(){var{current:s}=i,u=m.pathRefs(e);return u.delete(i),i.current=null,s}},o=m.pathRefs(e);return o.add(i),i},kh=t=>{var e=Es.get(t);return e||(e=new Set,Es.set(t,e)),e},Th=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:a,edge:i}=r;if(A.isPath(n)){if(i==="start"){var[,o]=ae.first(e,n);n=o}else if(i==="end"){var[,s]=ae.last(e,n);n=s}}return q.isRange(n)&&(i==="start"?n=q.start(n):i==="end"?n=q.end(n):n=A.common(n.anchor.path,n.focus.path)),Ae.isPoint(n)&&(n=n.path),a!=null&&(n=n.slice(0,a)),n},Rh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:a="forward"}=r,i={current:n,affinity:a,unref(){var{current:s}=i,u=m.pointRefs(e);return u.delete(i),i.current=null,s}},o=m.pointRefs(e);return o.add(i),i},jh=t=>{var e=ws.get(t);return e||(e=new Set,ws.set(t,e)),e},Ih=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:a="start"}=r;if(A.isPath(n)){var i;if(a==="end"){var[,o]=ae.last(e,n);i=o}else{var[,s]=ae.first(e,n);i=s}var u=ae.get(e,i);if(!ce.isText(u))throw new Error("Cannot get the ".concat(a," point in the node at path [").concat(n,"] because it has no ").concat(a," text node."));return{path:i,offset:a==="end"?u.text.length:0}}if(q.isRange(n)){var[c,f]=q.edges(n);return a==="start"?c:f}return n};function Nh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function*(){var{at:n=t.selection,unit:r="offset",reverse:a=!1,voids:i=!1,ignoreNonSelectable:o=!1}=e;if(!n)return;var s=m.range(t,n),[u,c]=q.edges(s),f=a?c:u,h=!1,p="",v=0,C=0,g=0;for(var[d,D]of m.nodes(t,{at:n,reverse:a,voids:i,ignoreNonSelectable:o})){if(le.isElement(d)){if(!i&&(t.isVoid(d)||t.isElementReadOnly(d))){yield m.start(t,D);continue}if(t.isInline(d))continue;if(m.hasInlines(t,d)){var B=A.isAncestor(D,c.path)?c:m.end(t,D),E=A.isAncestor(D,u.path)?u:m.start(t,D);p=m.string(t,{anchor:E,focus:B},{voids:i}),h=!0}}if(ce.isText(d)){var O=A.equals(D,f.path);for(O?(C=a?f.offset:d.text.length-f.offset,g=f.offset):(C=d.text.length,g=a?C:0),(O||h||r==="offset")&&(yield{path:D,offset:g},h=!1);;){if(v===0){if(p==="")break;v=b(p,r,a),p=za(p,v,a)[1]}if(g=a?g-v:g+v,C=C-v,C<0){v=-C;break}v=0,yield{path:D,offset:g}}}}function b(w,S,P){return S==="character"?Na(w,P):S==="word"?Cp(w,P):S==="line"||S==="block"?w.length:1}}()}var zh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:a=!1}=n,{match:i,at:o=e.selection}=n;if(o){var s=m.before(e,o,{voids:a});if(s){var[,u]=m.first(e,[]),c=[s.path,u];if(A.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(A.isPath(o)){var[f]=m.parent(e,o);i=p=>f.children.includes(p)}else i=()=>!0;var[h]=m.nodes(e,{reverse:!0,at:c,match:i,mode:r,voids:a});return h}}},_h=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:a="forward"}=r,i={current:n,affinity:a,unref(){var{current:s}=i,u=m.rangeRefs(e);return u.delete(i),i.current=null,s}},o=m.rangeRefs(e);return o.add(i),i},Wh=t=>{var e=Bs.get(t);return e||(e=new Set,Bs.set(t,e)),e},Uh=(t,e,n)=>{if(q.isRange(e)&&!n)return e;var r=m.start(t,e),a=m.end(t,n||e);return{anchor:r,focus:a}};function Xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Hh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xs(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Vh=(t,e)=>{var{selection:n}=t;if(n){var r=(f,h)=>{if(!ce.isText(f))return!1;var[p,v]=m.parent(t,h);return!t.isVoid(p)||t.markableVoid(p)},a=q.isExpanded(n),i=!1;if(!a){var[o,s]=m.node(t,n);if(o&&r(o,s)){var[u]=m.parent(t,s);i=u&&t.markableVoid(u)}}if(a||i)ee.unsetNodes(t,e,{match:r,split:!0,voids:!0});else{var c=Hh({},m.marks(t)||{});delete c[e],t.marks=c,Un.get(t)||t.onChange()}}},qh=(t,e)=>{bs.set(t,e)},Zh=(t,e)=>m.point(t,e,{edge:"start"}),Gh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:a=!1}=r,i=m.range(e,n),[o,s]=q.edges(i),u="";for(var[c,f]of m.nodes(e,{at:i,match:ce.isText,voids:a})){var h=c.text;A.equals(f,s.path)&&(h=h.slice(0,s.offset)),A.equals(f,o.path)&&(h=h.slice(o.offset)),u+=h}return u},Yh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:a=!1}=r,[i,o]=q.edges(n);if(i.offset!==0||o.offset!==0||q.isCollapsed(n)||A.hasPrevious(o.path))return n;var s=m.above(e,{at:o,match:C=>le.isElement(C)&&m.isBlock(e,C),voids:a}),u=s?s[1]:[],c=m.start(e,i),f={anchor:c,focus:o},h=!0;for(var[p,v]of m.nodes(e,{at:f,match:ce.isText,reverse:!0,voids:a})){if(h){h=!1;continue}if(p.text!==""||A.isBefore(v,u)){o={path:v,offset:p.text.length};break}}return{anchor:i,focus:o}},Kh=(t,e)=>{var n=m.isNormalizing(t);m.setNormalizing(t,!1);try{e()}finally{m.setNormalizing(t,n)}m.normalize(t)},Xh=(t,e,n)=>{var[r,a]=e;return le.isElement(r)&&m.isEmpty(t,r)||ce.isText(r)&&r.text===""&&a[a.length-1]!==0},Jh=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var r,a,{reverse:i=!1,unit:o="character",distance:s=1,voids:u=!1}=n,{at:c=e.selection,hanging:f=!1}=n;if(c){var h=!1;if(q.isRange(c)&&q.isCollapsed(c)&&(h=!0,c=c.anchor),Ae.isPoint(c)){var p=m.void(e,{at:c,mode:"highest"});if(!u&&p){var[,v]=p;c=v}else{var C={unit:o,distance:s},g=i?m.before(e,c,C)||m.start(e,[]):m.after(e,c,C)||m.end(e,[]);c={anchor:c,focus:g},f=!0}}if(A.isPath(c)){ee.removeNodes(e,{at:c,voids:u});return}if(!q.isCollapsed(c)){if(!f){var[,d]=q.edges(c),D=m.end(e,[]);Ae.equals(d,D)||(c=m.unhangRange(e,c,{voids:u}))}var[B,E]=q.edges(c),O=m.above(e,{match:ie=>le.isElement(ie)&&m.isBlock(e,ie),at:B,voids:u}),b=m.above(e,{match:ie=>le.isElement(ie)&&m.isBlock(e,ie),at:E,voids:u}),w=O&&b&&!A.equals(O[1],b[1]),S=A.equals(B.path,E.path),P=u?null:(r=m.void(e,{at:B,mode:"highest"}))!==null&&r!==void 0?r:m.elementReadOnly(e,{at:B,mode:"highest"}),V=u?null:(a=m.void(e,{at:E,mode:"highest"}))!==null&&a!==void 0?a:m.elementReadOnly(e,{at:E,mode:"highest"});if(P){var F=m.before(e,B);F&&O&&A.isAncestor(O[1],F.path)&&(B=F)}if(V){var j=m.after(e,E);j&&b&&A.isAncestor(b[1],j.path)&&(E=j)}var k=[],I;for(var N of m.nodes(e,{at:c,voids:u})){var[z,X]=N;I&&A.compare(X,I)===0||(!u&&le.isElement(z)&&(m.isVoid(e,z)||m.isElementReadOnly(e,z))||!A.isCommon(X,B.path)&&!A.isCommon(X,E.path))&&(k.push(N),I=X)}var _=Array.from(k,ie=>{var[,de]=ie;return m.pathRef(e,de)}),$=m.pointRef(e,B),re=m.pointRef(e,E),T="";if(!S&&!P){var R=$.current,[Z]=m.leaf(e,R),{path:H}=R,{offset:Q}=B,K=Z.text.slice(Q);K.length>0&&(e.apply({type:"remove_text",path:H,offset:Q,text:K}),T=K)}if(_.reverse().map(ie=>ie.unref()).filter(ie=>ie!==null).forEach(ie=>ee.removeNodes(e,{at:ie,voids:u})),!V){var y=re.current,[U]=m.leaf(e,y),{path:W}=y,M=S?B.offset:0,J=U.text.slice(M,E.offset);J.length>0&&(e.apply({type:"remove_text",path:W,offset:M,text:J}),T=J)}!S&&w&&re.current&&$.current&&ee.mergeNodes(e,{at:re.current,hanging:!0,voids:u}),h&&i&&o==="character"&&T.length>1&&T.match(/[\u0E00-\u0E7F]+/)&&ee.insertText(e,T.slice(0,T.length-s));var ne=$.unref(),G=re.unref(),ue=i?ne||G:G||ne;n.at==null&&ue&&ee.select(e,ue)}}})},Qh=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:a=!1,voids:i=!1}=r,{at:o=Ia(e),batchDirty:s=!0}=r;if(n.length){if(q.isRange(o))if(a||(o=m.unhangRange(e,o,{voids:i})),q.isCollapsed(o))o=o.anchor;else{var[,u]=q.edges(o);if(!i&&m.void(e,{at:u}))return;var c=m.pointRef(e,u);ee.delete(e,{at:o}),o=c.unref()}else A.isPath(o)&&(o=m.start(e,o));if(!(!i&&m.void(e,{at:o}))){var f=m.above(e,{at:o,match:K=>le.isElement(K)&&m.isInline(e,K),mode:"highest",voids:i});if(f){var[,h]=f;if(m.isEnd(e,o,h)){var p=m.after(e,h);o=p}else if(m.isStart(e,o,h)){var v=m.before(e,h);o=v}}var C=m.above(e,{match:K=>le.isElement(K)&&m.isBlock(e,K),at:o,voids:i}),[,g]=C,d=m.isStart(e,o,g),D=m.isEnd(e,o,g),B=d&&D,E=!d||d&&D,O=!D,[,b]=ae.first({children:n},[]),[,w]=ae.last({children:n},[]),S=[],P=K=>{var[y,U]=K,W=U.length===0;return W?!1:B?!0:!(E&&A.isAncestor(U,b)&&le.isElement(y)&&!e.isVoid(y)&&!e.isInline(y)||O&&A.isAncestor(U,w)&&le.isElement(y)&&!e.isVoid(y)&&!e.isInline(y))};for(var V of ae.nodes({children:n},{pass:P}))P(V)&&S.push(V);var F=[],j=[],k=[],I=!0,N=!1;for(var[z]of S)le.isElement(z)&&!e.isInline(z)?(I=!1,N=!0,j.push(z)):I?F.push(z):k.push(z);var[X]=m.nodes(e,{at:o,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:i}),[,_]=X,$=m.isStart(e,o,_),re=m.isEnd(e,o,_),T=m.pathRef(e,D&&!k.length?A.next(g):g),R=m.pathRef(e,re?A.next(_):_);ee.splitNodes(e,{at:o,match:K=>N?le.isElement(K)&&m.isBlock(e,K):ce.isText(K)||m.isInline(e,K),mode:N?"lowest":"highest",always:N&&(!d||F.length>0)&&(!D||k.length>0),voids:i});var Z=m.pathRef(e,!$||$&&re?A.next(_):_);if(ee.insertNodes(e,F,{at:Z.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:i,batchDirty:s}),B&&!F.length&&j.length&&!k.length&&ee.delete(e,{at:g,voids:i}),ee.insertNodes(e,j,{at:T.current,match:K=>le.isElement(K)&&m.isBlock(e,K),mode:"lowest",voids:i,batchDirty:s}),ee.insertNodes(e,k,{at:R.current,match:K=>ce.isText(K)||m.isInline(e,K),mode:"highest",voids:i,batchDirty:s}),!r.at){var H;if(k.length>0&&R.current?H=A.previous(R.current):j.length>0&&T.current?H=A.previous(T.current):Z.current&&(H=A.previous(Z.current)),H){var Q=m.end(e,H);ee.select(e,Q)}}Z.unref(),T.unref(),R.unref()}}})},$h=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=n,{selection:a}=e;if(a){if(r==="anchor")ee.select(e,a.anchor);else if(r==="focus")ee.select(e,a.focus);else if(r==="start"){var[i]=q.edges(a);ee.select(e,i)}else if(r==="end"){var[,o]=q.edges(a);ee.select(e,o)}}else return},ev=t=>{var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},tv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:a=1,unit:i="character",reverse:o=!1}=n,{edge:s=null}=n;if(r){s==="start"&&(s=q.isBackward(r)?"focus":"anchor"),s==="end"&&(s=q.isBackward(r)?"anchor":"focus");var{anchor:u,focus:c}=r,f={distance:a,unit:i,ignoreNonSelectable:!0},h={};if(s==null||s==="anchor"){var p=o?m.before(e,u,f):m.after(e,u,f);p&&(h.anchor=p)}if(s==null||s==="focus"){var v=o?m.before(e,c,f):m.after(e,c,f);v&&(h.focus=v)}ee.setSelection(e,h)}},nv=(t,e)=>{var{selection:n}=t;if(e=m.range(t,e),n){ee.setSelection(t,e);return}if(!q.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(st.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})};function Js(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Qs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Js(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Js(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var rv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:a}=e,{edge:i="both"}=r;if(a){i==="start"&&(i=q.isBackward(a)?"focus":"anchor"),i==="end"&&(i=q.isBackward(a)?"anchor":"focus");var{anchor:o,focus:s}=a,u=i==="anchor"?o:s;ee.setSelection(e,{[i==="anchor"?"anchor":"focus"]:Qs(Qs({},u),n)})}},av=(t,e)=>{var{selection:n}=t,r={},a={};if(n){for(var i in e)(i==="anchor"&&e.anchor!=null&&!Ae.equals(e.anchor,n.anchor)||i==="focus"&&e.focus!=null&&!Ae.equals(e.focus,n.focus)||i!=="anchor"&&i!=="focus"&&e[i]!==n[i])&&(r[i]=n[i],a[i]=e[i]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:a})}},iv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:a=!1,voids:i=!1,mode:o="lowest",batchDirty:s=!0}=r,{at:u,match:c,select:f}=r;if(ae.isNode(n)&&(n=[n]),n.length!==0){var[h]=n;if(u||(u=Ia(e),f!==!1&&(f=!0)),f==null&&(f=!1),q.isRange(u))if(a||(u=m.unhangRange(e,u,{voids:i})),q.isCollapsed(u))u=u.anchor;else{var[,p]=q.edges(u),v=m.pointRef(e,p);ee.delete(e,{at:u}),u=v.unref()}if(Ae.isPoint(u)){c==null&&(ce.isText(h)?c=F=>ce.isText(F):e.isInline(h)?c=F=>ce.isText(F)||m.isInline(e,F):c=F=>le.isElement(F)&&m.isBlock(e,F));var[C]=m.nodes(e,{at:u.path,match:c,mode:o,voids:i});if(C){var[,g]=C,d=m.pathRef(e,g),D=m.isEnd(e,u,g);ee.splitNodes(e,{at:u,match:c,mode:o,voids:i});var B=d.unref();u=D?A.next(B):B}else return}var E=A.parent(u),O=u[u.length-1];if(!(!i&&m.void(e,{at:E}))){if(s){var b=[],w=A.levels(E);Wp(e,()=>{var F=function(){var I=E.concat(O);O++;var N={type:"insert_node",path:I,node:j};e.apply(N),u=A.next(u),b.push(N),ce.isText?w.push(...Array.from(ae.nodes(j),z=>{var[,X]=z;return I.concat(X)})):w.push(I)};for(var j of n)F()},()=>{Ns(e,w,F=>{var j=F;for(var k of b)if(A.operationCanTransformPath(k)&&(j=A.transform(j,k),!j))return null;return j})})}else for(var S of n){var P=E.concat(O);O++,e.apply({type:"insert_node",path:P,node:S}),u=A.next(u)}if(u=A.previous(u),f){var V=m.end(e,u);V&&ee.select(e,V)}}}})},ov=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:a="lowest",voids:i=!1}=n,{match:o}=n;if(o==null&&(o=A.isPath(r)?En(e,r):O=>le.isElement(O)&&m.isBlock(e,O)),!!r){var s=m.nodes(e,{at:r,match:o,mode:a,voids:i}),u=Array.from(s,O=>{var[,b]=O;return m.pathRef(e,b)});for(var c of u){var f=c.unref();if(f.length<2)throw new Error("Cannot lift node at a path [".concat(f,"] because it has a depth of less than `2`."));var h=m.node(e,A.parent(f)),[p,v]=h,C=f[f.length-1],{length:g}=p.children;if(g===1){var d=A.next(v);ee.moveNodes(e,{at:f,to:d,voids:i}),ee.removeNodes(e,{at:v,voids:i})}else if(C===0)ee.moveNodes(e,{at:f,to:v,voids:i});else if(C===g-1){var D=A.next(v);ee.moveNodes(e,{at:f,to:D,voids:i})}else{var B=A.next(f),E=A.next(v);ee.splitNodes(e,{at:B,voids:i}),ee.moveNodes(e,{at:f,to:E,voids:i})}}}})},sv=["text"],uv=["children"],$s=(t,e)=>{if(le.isElement(e)){var n=e;return m.isVoid(t,e)?!0:n.children.length===1?$s(t,n.children[0]):!1}else return!m.isEditor(e)},lv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:a=e.selection}=n,{hanging:i=!1,voids:o=!1,mode:s="lowest"}=n;if(a){if(r==null)if(A.isPath(a)){var[u]=m.parent(e,a);r=F=>u.children.includes(F)}else r=F=>le.isElement(F)&&m.isBlock(e,F);if(!i&&q.isRange(a)&&(a=m.unhangRange(e,a,{voids:o})),q.isRange(a))if(q.isCollapsed(a))a=a.anchor;else{var[,c]=q.edges(a),f=m.pointRef(e,c);ee.delete(e,{at:a}),a=f.unref(),n.at==null&&ee.select(e,a)}var[h]=m.nodes(e,{at:a,match:r,voids:o,mode:s}),p=m.previous(e,{at:a,match:r,voids:o,mode:s});if(!(!h||!p)){var[v,C]=h,[g,d]=p;if(!(C.length===0||d.length===0)){var D=A.next(d),B=A.common(C,d),E=A.isSibling(C,d),O=Array.from(m.levels(e,{at:C}),F=>{var[j]=F;return j}).slice(B.length).slice(0,-1),b=m.above(e,{at:C,mode:"highest",match:F=>O.includes(F)&&$s(e,F)}),w=b&&m.pathRef(e,b[1]),S,P;if(ce.isText(v)&&ce.isText(g)){var V=jt(v,sv);P=g.text.length,S=V}else if(le.isElement(v)&&le.isElement(g)){var V=jt(v,uv);P=g.children.length,S=V}else throw new Error("Cannot merge the node at path [".concat(C,"] with the previous sibling because it is not the same kind: ").concat(st.stringify(v)," ").concat(st.stringify(g)));E||ee.moveNodes(e,{at:C,to:D,voids:o}),w&&ee.removeNodes(e,{at:w.current,voids:o}),m.shouldMergeNodesRemovePrevNode(e,p,h)?ee.removeNodes(e,{at:d,voids:o}):e.apply({type:"merge_node",path:D,position:P,properties:S}),w&&w.unref()}}}})},cv=(t,e)=>{m.withoutNormalizing(t,()=>{var{to:n,at:r=t.selection,mode:a="lowest",voids:i=!1}=e,{match:o}=e;if(r){o==null&&(o=A.isPath(r)?En(t,r):v=>le.isElement(v)&&m.isBlock(t,v));var s=m.pathRef(t,n),u=m.nodes(t,{at:r,match:o,mode:a,voids:i}),c=Array.from(u,v=>{var[,C]=v;return m.pathRef(t,C)});for(var f of c){var h=f.unref(),p=s.current;h.length!==0&&t.apply({type:"move_node",path:h,newPath:p}),s.current&&A.isSibling(p,h)&&A.isAfter(p,h)&&(s.current=A.next(s.current))}s.unref()}})},fv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:a=!1,mode:i="lowest"}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=A.isPath(o)?En(e,o):v=>le.isElement(v)&&m.isBlock(e,v)),!r&&q.isRange(o)&&(o=m.unhangRange(e,o,{voids:a}));var u=m.nodes(e,{at:o,match:s,mode:i,voids:a}),c=Array.from(u,v=>{var[,C]=v;return m.pathRef(e,C)});for(var f of c){var h=f.unref();if(h){var[p]=m.node(e,h);e.apply({type:"remove_node",path:h,node:p})}}}})},dv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:a,at:i=e.selection,compare:o,merge:s}=r,{hanging:u=!1,mode:c="lowest",split:f=!1,voids:h=!1}=r;if(i){if(a==null&&(a=A.isPath(i)?En(e,i):P=>le.isElement(P)&&m.isBlock(e,P)),!u&&q.isRange(i)&&(i=m.unhangRange(e,i,{voids:h})),f&&q.isRange(i)){if(q.isCollapsed(i)&&m.leaf(e,i.anchor)[0].text.length>0)return;var p=m.rangeRef(e,i,{affinity:"inward"}),[v,C]=q.edges(i),g=c==="lowest"?"lowest":"highest",d=m.isEnd(e,C,C.path);ee.splitNodes(e,{at:C,match:a,mode:g,voids:h,always:!d});var D=m.isStart(e,v,v.path);ee.splitNodes(e,{at:v,match:a,mode:g,voids:h,always:!D}),i=p.unref(),r.at==null&&ee.select(e,i)}o||(o=(P,V)=>P!==V);for(var[B,E]of m.nodes(e,{at:i,match:a,mode:c,voids:h})){var O={},b={};if(E.length!==0){var w=!1;for(var S in n)S==="children"||S==="text"||o(n[S],B[S])&&(w=!0,B.hasOwnProperty(S)&&(O[S]=B[S]),s?n[S]!=null&&(b[S]=s(B[S],n[S])):n[S]!=null&&(b[S]=n[S]));w&&e.apply({type:"set_node",path:E,properties:O,newProperties:b})}}}})},pv=(t,e)=>{if(q.isCollapsed(e))return e.anchor;var[,n]=q.edges(e),r=m.pointRef(t,n);return ee.delete(t,{at:e}),r.unref()},hv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:a=!1}=n,{match:i,at:o=e.selection,height:s=0,always:u=!1}=n;if(i==null&&(i=re=>le.isElement(re)&&m.isBlock(e,re)),q.isRange(o)&&(o=pv(e,o)),A.isPath(o)){var c=o,f=m.point(e,c),[h]=m.parent(e,c);i=re=>re===h,s=f.path.length-c.length+1,o=f,u=!0}if(o){var p=m.pointRef(e,o,{affinity:"backward"}),v;try{var[C]=m.nodes(e,{at:o,match:i,mode:r,voids:a});if(!C)return;var g=m.void(e,{at:o,mode:"highest"}),d=0;if(!a&&g){var[D,B]=g;if(le.isElement(D)&&e.isInline(D)){var E=m.after(e,B);if(!E){var O={text:""},b=A.next(B);ee.insertNodes(e,O,{at:b,voids:a}),E=m.point(e,b)}o=E,u=!0}var w=o.path.length-B.length;s=w+1,u=!0}v=m.pointRef(e,o);var S=o.path.length-s,[,P]=C,V=o.path.slice(0,S),F=s===0?o.offset:o.path[S]+d;for(var[j,k]of m.levels(e,{at:V,reverse:!0,voids:a})){var I=!1;if(k.length<P.length||k.length===0||!a&&le.isElement(j)&&m.isVoid(e,j))break;var N=p.current,z=m.isEnd(e,N,k);if(u||!p||!m.isEdge(e,N,k)){I=!0;var X=ae.extractProps(j);e.apply({type:"split_node",path:k,position:F,properties:X})}F=k[k.length-1]+(I||z?1:0)}if(n.at==null){var _=v.current||m.end(e,[]);ee.select(e,_)}}finally{var $;p.unref(),($=v)===null||$===void 0||$.unref()}}})},vv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(n)||(n=[n]);var a={};for(var i of n)a[i]=null;ee.setNodes(e,a,r)},gv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:a=!1,voids:i=!1}=n,{at:o=e.selection,match:s}=n;if(o){s==null&&(s=A.isPath(o)?En(e,o):v=>le.isElement(v)&&m.isBlock(e,v)),A.isPath(o)&&(o=m.range(e,o));var u=q.isRange(o)?m.rangeRef(e,o):null,c=m.nodes(e,{at:o,match:s,mode:r,voids:i}),f=Array.from(c,v=>{var[,C]=v;return m.pathRef(e,C)}).reverse(),h=function(){var C=p.unref(),[g]=m.node(e,C),d=m.range(e,C);a&&u&&(d=q.intersection(u.current,d)),ee.liftNodes(e,{at:d,match:D=>le.isAncestor(g)&&g.children.includes(D),voids:i})};for(var p of f)h();u&&u.unref()}})};function eu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function tu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(n),!0).forEach(function(r){ft(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var mv=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:a="lowest",split:i=!1,voids:o=!1}=r,{match:s,at:u=e.selection}=r;if(u){if(s==null&&(A.isPath(u)?s=En(e,u):e.isInline(n)?s=d=>le.isElement(d)&&m.isInline(e,d)||ce.isText(d):s=d=>le.isElement(d)&&m.isBlock(e,d)),i&&q.isRange(u)){var[c,f]=q.edges(u),h=m.rangeRef(e,u,{affinity:"inward"});ee.splitNodes(e,{at:f,match:s,voids:o}),ee.splitNodes(e,{at:c,match:s,voids:o}),u=h.unref(),r.at==null&&ee.select(e,u)}var p=Array.from(m.nodes(e,{at:u,match:e.isInline(n)?d=>le.isElement(d)&&m.isBlock(e,d):d=>m.isEditor(d),mode:"lowest",voids:o})),v=function(){var D=q.isRange(u)?q.intersection(u,m.range(e,g)):u;if(!D)return 0;var B=Array.from(m.nodes(e,{at:D,match:s,mode:a,voids:o}));if(B.length>0){var[E]=B,O=B[B.length-1],[,b]=E,[,w]=O;if(b.length===0&&w.length===0)return 0;var S=A.equals(b,w)?A.parent(b):A.common(b,w),P=m.range(e,b,w),V=m.node(e,S),[F]=V,j=S.length+1,k=A.next(w.slice(0,j)),I=tu(tu({},n),{},{children:[]});ee.insertNodes(e,I,{at:k,voids:o}),ee.moveNodes(e,{at:P,match:N=>le.isAncestor(F)&&F.children.includes(N),to:k.concat(0),voids:o})}},C;for(var[,g]of p)C=v()}})},yv=()=>{var t={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Up(t,...r)},addMark:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Yp(t,...r)},deleteBackward:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Jp(t,...r)},deleteForward:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Qp(t,...r)},deleteFragment:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return $p(t,...r)},getFragment:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Vp(t,...r)},insertBreak:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return ch(t,...r)},insertSoftBreak:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return dh(t,...r)},insertFragment:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Qh(t,...r)},insertNode:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return fh(t,...r)},insertText:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return hh(t,...r)},normalizeNode:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return qp(t,...r)},removeMark:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Vh(t,...r)},getDirtyPaths:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Hp(t,...r)},shouldNormalize:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Zp(t,...r)},above:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Gp(t,...r)},after:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Kp(t,...r)},before:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Xp(t,...r)},collapse:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return $h(t,...r)},delete:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Jh(t,...r)},deselect:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return ev(t,...r)},edges:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return eh(t,...r)},elementReadOnly:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return th(t,...r)},end:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return nh(t,...r)},first:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return rh(t,...r)},fragment:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return ah(t,...r)},getMarks:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Lh(t,...r)},hasBlocks:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return oh(t,...r)},hasInlines:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return sh(t,...r)},hasPath:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return uh(t,...r)},hasTexts:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return lh(t,...r)},insertNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return iv(t,...r)},isBlock:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return vh(t,...r)},isEdge:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return gh(t,...r)},isEmpty:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return mh(t,...r)},isEnd:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return yh(t,...r)},isNormalizing:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Ch(t,...r)},isStart:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Dh(t,...r)},last:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return bh(t,...r)},leaf:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Eh(t,...r)},levels:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return wh(t,...r)},liftNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return ov(t,...r)},mergeNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return lv(t,...r)},move:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return tv(t,...r)},moveNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return cv(t,...r)},next:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Sh(t,...r)},node:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Ah(t,...r)},nodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Oh(t,...r)},normalize:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Fh(t,...r)},parent:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Ph(t,...r)},path:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Th(t,...r)},pathRef:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Mh(t,...r)},pathRefs:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return kh(t,...r)},point:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Ih(t,...r)},pointRef:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Rh(t,...r)},pointRefs:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return jh(t,...r)},positions:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Nh(t,...r)},previous:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return zh(t,...r)},range:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Uh(t,...r)},rangeRef:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return _h(t,...r)},rangeRefs:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Wh(t,...r)},removeNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return fv(t,...r)},select:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return nv(t,...r)},setNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return dv(t,...r)},setNormalizing:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return qh(t,...r)},setPoint:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return rv(t,...r)},setSelection:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return av(t,...r)},splitNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return hv(t,...r)},start:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Zh(t,...r)},string:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Gh(t,...r)},unhangRange:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Yh(t,...r)},unsetNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return vv(t,...r)},unwrapNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return gv(t,...r)},void:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return ih(t,...r)},withoutNormalizing:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Kh(t,...r)},wrapNodes:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return mv(t,...r)},shouldMergeNodesRemovePrevNode:function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return Xh(t,...r)}};return t};/*!
77
77
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
78
78
  *
79
79
  * Copyright (c) 2014-2017, Jon Schlinkert.
80
80
  * Released under the MIT License.
81
- */function nu(t){return Object.prototype.toString.call(t)==="[object Object]"}function Cv(t){var e,n;return nu(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(nu(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var Dv={isHistory(t){return Cv(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Zt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Zt.isOperationList(t.undos[0].operations))}},_i=new WeakMap,qn=new WeakMap,cn={isHistoryEditor(t){return Dv.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return qn.get(t)},isSaving(t){return _i.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=cn.isMerging(t);qn.set(t,!0),e(),qn.set(t,n)},withoutMerging(t,e){var n=cn.isMerging(t);qn.set(t,!1),e(),qn.set(t,n)},withoutSaving(t,e){var n=cn.isSaving(t);_i.set(t,!1),e(),_i.set(t,n)}},bv=t=>{var e=t,{apply:n}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:r}=e,{redos:i}=r;if(i.length>0){var a=i[i.length-1];a.selectionBefore&&ee.setSelection(e,a.selectionBefore),cn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var o of a.operations)e.apply(o)})}),r.redos.pop(),e.writeHistory("undos",a)}},e.undo=()=>{var{history:r}=e,{undos:i}=r;if(i.length>0){var a=i[i.length-1];cn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var o=a.operations.map(Zt.inverse).reverse();for(var s of o)e.apply(s);a.selectionBefore&&ee.setSelection(e,a.selectionBefore)})}),e.writeHistory("redos",a),r.undos.pop()}},e.apply=r=>{var{operations:i,history:a}=e,{undos:o}=a,s=o[o.length-1],u=s&&s.operations[s.operations.length-1],c=cn.isSaving(e),f=cn.isMerging(e);if(c==null&&(c=wv(r)),c){if(f==null&&(s==null?f=!1:i.length!==0?f=!0:f=Ev(r,u)),s&&f)s.operations.push(r);else{var h={operations:[r],selectionBefore:e.selection};e.writeHistory("undos",h)}for(;o.length>100;)o.shift();a.redos=[]}n(r)},e.writeHistory=(r,i)=>{e.history[r].push(i)},e},Ev=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&A.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&A.equals(t.path,e.path)),wv=(t,e)=>t.type!=="set_selection",Bv=Sv,ru="֑-߿יִ-﷽ﹰ-ﻼ",iu="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",xv=new RegExp("^[^"+iu+"]*["+ru+"]"),Lv=new RegExp("^[^"+ru+"]*["+iu+"]");function Sv(t){return t=String(t||""),xv.test(t)?"rtl":Lv.test(t)?"ltr":"neutral"}const au=si(Bv);function Av(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Wi=Av,Ov=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,Fv=Ov,Pv=Fv,Mv=typeof self=="object"&&self&&self.Object===Object&&self,kv=Pv||Mv||Function("return this")(),ou=kv,Tv=ou,Rv=function(){return Tv.Date.now()},jv=Rv,Iv=/\s/;function Nv(t){for(var e=t.length;e--&&Iv.test(t.charAt(e)););return e}var zv=Nv,_v=zv,Wv=/^\s+/;function Uv(t){return t&&t.slice(0,_v(t)+1).replace(Wv,"")}var Hv=Uv,Vv=ou,qv=Vv.Symbol,su=qv,uu=su,lu=Object.prototype,Zv=lu.hasOwnProperty,Gv=lu.toString,Zn=uu?uu.toStringTag:void 0;function Yv(t){var e=Zv.call(t,Zn),n=t[Zn];try{t[Zn]=void 0;var r=!0}catch{}var i=Gv.call(t);return r&&(e?t[Zn]=n:delete t[Zn]),i}var Kv=Yv,Xv=Object.prototype,Jv=Xv.toString;function Qv(t){return Jv.call(t)}var $v=Qv,cu=su,eg=Kv,tg=$v,ng="[object Null]",rg="[object Undefined]",fu=cu?cu.toStringTag:void 0;function ig(t){return t==null?t===void 0?rg:ng:fu&&fu in Object(t)?eg(t):tg(t)}var ag=ig;function og(t){return t!=null&&typeof t=="object"}var sg=og,ug=ag,lg=sg,cg="[object Symbol]";function fg(t){return typeof t=="symbol"||lg(t)&&ug(t)==cg}var dg=fg,pg=Hv,du=Wi,hg=dg,pu=NaN,vg=/^[-+]0x[0-9a-f]+$/i,gg=/^0b[01]+$/i,mg=/^0o[0-7]+$/i,yg=parseInt;function Cg(t){if(typeof t=="number")return t;if(hg(t))return pu;if(du(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=du(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=pg(t);var n=gg.test(t);return n||mg.test(t)?yg(t.slice(2),n?2:8):vg.test(t)?pu:+t}var Dg=Cg,bg=Wi,Ui=jv,hu=Dg,Eg="Expected a function",wg=Math.max,Bg=Math.min;function xg(t,e,n){var r,i,a,o,s,u,c=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Eg);e=hu(e)||0,bg(n)&&(f=!!n.leading,h="maxWait"in n,a=h?wg(hu(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p);function g(E){var S=r,F=i;return r=i=void 0,c=E,o=t.apply(F,S),o}function C(E){return c=E,s=setTimeout(D,e),f?g(E):o}function v(E){var S=E-u,F=E-c,V=e-S;return h?Bg(V,a-F):V}function d(E){var S=E-u,F=E-c;return u===void 0||S>=e||S<0||h&&F>=a}function D(){var E=Ui();if(d(E))return B(E);s=setTimeout(D,v(E))}function B(E){return s=void 0,p&&r?g(E):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),c=0,r=u=i=s=void 0}function O(){return s===void 0?o:B(Ui())}function b(){var E=Ui(),S=d(E);if(r=arguments,i=this,u=E,S){if(s===void 0)return C(u);if(h)return clearTimeout(s),s=setTimeout(D,e),g(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=w,b.flush=O,b}var vu=xg;const Lg=si(vu);var Sg=vu,Ag=Wi,Og="Expected a function";function Fg(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Og);return Ag(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Sg(t,e,{leading:r,maxWait:e,trailing:i})}var Pg=Fg;const Mg=si(Pg),gu=t=>typeof t=="object"&&t!=null&&t.nodeType===1,mu=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Hi=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return mu(n.overflowY,e)||mu(n.overflowX,e)||(r=>{const i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(t)}return!1},Or=(t,e,n,r,i,a,o,s)=>a<t&&o>e||a>t&&o<e?0:a<=t&&s<=n||o>=e&&s>=n?a-t-r:o>e&&s<n||a<t&&s>n?o-e+i:0,kg=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},yu=(t,e)=>{var n,r,i,a;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:u,boundary:c,skipOverflowHiddenElements:f}=e,h=typeof c=="function"?c:X=>X!==c;if(!gu(t))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,g=[];let C=t;for(;gu(C)&&h(C);){if(C=kg(C),C===p){g.push(C);break}C!=null&&C===document.body&&Hi(C)&&!Hi(document.documentElement)||C!=null&&Hi(C,f)&&g.push(C)}const v=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,d=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:D,scrollY:B}=window,{height:w,width:O,top:b,right:E,bottom:S,left:F}=t.getBoundingClientRect(),{top:V,right:P,bottom:z,left:R}=(X=>{const _=window.getComputedStyle(X);return{top:parseFloat(_.scrollMarginTop)||0,right:parseFloat(_.scrollMarginRight)||0,bottom:parseFloat(_.scrollMarginBottom)||0,left:parseFloat(_.scrollMarginLeft)||0}})(t);let I=s==="start"||s==="nearest"?b-V:s==="end"?S+z:b+w/2-V+z,j=u==="center"?F+O/2-R+P:u==="end"?E+P:F-R;const N=[];for(let X=0;X<g.length;X++){const _=g[X],{height:$,width:re,top:k,right:T,bottom:Z,left:H}=_.getBoundingClientRect();if(o==="if-needed"&&b>=0&&F>=0&&S<=d&&E<=v&&b>=k&&S<=Z&&F>=H&&E<=T)return N;const Q=getComputedStyle(_),K=parseInt(Q.borderLeftWidth,10),y=parseInt(Q.borderTopWidth,10),U=parseInt(Q.borderRightWidth,10),W=parseInt(Q.borderBottomWidth,10);let M=0,J=0;const ne="offsetWidth"in _?_.offsetWidth-_.clientWidth-K-U:0,G="offsetHeight"in _?_.offsetHeight-_.clientHeight-y-W:0,ue="offsetWidth"in _?_.offsetWidth===0?0:re/_.offsetWidth:0,ae="offsetHeight"in _?_.offsetHeight===0?0:$/_.offsetHeight:0;if(p===_)M=s==="start"?I:s==="end"?I-d:s==="nearest"?Or(B,B+d,d,y,W,B+I,B+I+w,w):I-d/2,J=u==="start"?j:u==="center"?j-v/2:u==="end"?j-v:Or(D,D+v,v,K,U,D+j,D+j+O,O),M=Math.max(0,M+B),J=Math.max(0,J+D);else{M=s==="start"?I-k-y:s==="end"?I-Z+W+G:s==="nearest"?Or(k,Z,$,y,W+G,I,I+w,w):I-(k+$/2)+G/2,J=u==="start"?j-H-K:u==="center"?j-(H+re/2)+ne/2:u==="end"?j-T+U+ne:Or(H,T,re,K,U+ne,j,j+O,O);const{scrollLeft:de,scrollTop:pe}=_;M=ae===0?0:Math.max(0,Math.min(pe+M/ae,_.scrollHeight-$/ae+G)),J=ue===0?0:Math.max(0,Math.min(de+J/ue,_.scrollWidth-re/ue+ne)),I+=pe-M,j+=de-J}N.push({el:_,top:M,left:J})}return N},Tg=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function Rg(t,e){if(!t.isConnected||!(i=>{let a=i;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(t))return;const n=(i=>{const a=window.getComputedStyle(i);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(yu(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:a,left:o}of yu(t,Tg(e))){const s=a-n.top+n.bottom,u=o-n.left+n.right;i.scroll({top:s,left:u,behavior:r})}}var fn=[],jg=function(){return fn.some(function(t){return t.activeTargets.length>0})},Ig=function(){return fn.some(function(t){return t.skippedTargets.length>0})},Cu="ResizeObserver loop completed with undelivered notifications.",Ng=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Cu}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Cu),window.dispatchEvent(t)},Gn;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Gn||(Gn={}));var dn=function(t){return Object.freeze(t)},zg=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,dn(this)}return t}(),Du=function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,dn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,u=e.width,c=e.height;return{x:n,y:r,top:i,right:a,bottom:o,left:s,width:u,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Vi=function(t){return t instanceof SVGElement&&"getBBox"in t},bu=function(t){if(Vi(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||t.getClientRects().length)},Eu=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},_g=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Yn=typeof window<"u"?window:{},Fr=new WeakMap,wu=/auto|scroll/,Wg=/^tb|vertical/,Ug=/msie|trident/i.test(Yn.navigator&&Yn.navigator.userAgent),Ft=function(t){return parseFloat(t||"0")},Bn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new zg((n?e:t)||0,(n?t:e)||0)},Bu=dn({devicePixelContentBoxSize:Bn(),borderBoxSize:Bn(),contentBoxSize:Bn(),contentRect:new Du(0,0,0,0)}),xu=function(t,e){if(e===void 0&&(e=!1),Fr.has(t)&&!e)return Fr.get(t);if(bu(t))return Fr.set(t,Bu),Bu;var n=getComputedStyle(t),r=Vi(t)&&t.ownerSVGElement&&t.getBBox(),i=!Ug&&n.boxSizing==="border-box",a=Wg.test(n.writingMode||""),o=!r&&wu.test(n.overflowY||""),s=!r&&wu.test(n.overflowX||""),u=r?0:Ft(n.paddingTop),c=r?0:Ft(n.paddingRight),f=r?0:Ft(n.paddingBottom),h=r?0:Ft(n.paddingLeft),p=r?0:Ft(n.borderTopWidth),g=r?0:Ft(n.borderRightWidth),C=r?0:Ft(n.borderBottomWidth),v=r?0:Ft(n.borderLeftWidth),d=h+c,D=u+f,B=v+g,w=p+C,O=s?t.offsetHeight-w-t.clientHeight:0,b=o?t.offsetWidth-B-t.clientWidth:0,E=i?d+B:0,S=i?D+w:0,F=r?r.width:Ft(n.width)-E-b,V=r?r.height:Ft(n.height)-S-O,P=F+d+b+B,z=V+D+O+w,R=dn({devicePixelContentBoxSize:Bn(Math.round(F*devicePixelRatio),Math.round(V*devicePixelRatio),a),borderBoxSize:Bn(P,z,a),contentBoxSize:Bn(F,V,a),contentRect:new Du(h,u,F,V)});return Fr.set(t,R),R},Lu=function(t,e,n){var r=xu(t,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case Gn.DEVICE_PIXEL_CONTENT_BOX:return o;case Gn.BORDER_BOX:return i;default:return a}},Hg=function(){function t(e){var n=xu(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=dn([n.borderBoxSize]),this.contentBoxSize=dn([n.contentBoxSize]),this.devicePixelContentBoxSize=dn([n.devicePixelContentBoxSize])}return t}(),Su=function(t){if(bu(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Vg=function(){var t=1/0,e=[];fn.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(c){var f=new Hg(c.target),h=Su(c.target);s.push(f),c.lastReportedSize=Lu(c.target,c.observedBox),h<t&&(t=h)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Au=function(t){fn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Su(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},qg=function(){var t=0;for(Au(t);jg();)t=Vg(),Au(t);return Ig()&&Ng(),t>0},qi,Ou=[],Zg=function(){return Ou.splice(0).forEach(function(t){return t()})},Gg=function(t){if(!qi){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Zg()}).observe(n,r),qi=function(){n.textContent="".concat(e?e--:e++)}}Ou.push(t),qi()},Yg=function(t){Gg(function(){requestAnimationFrame(t)})},Pr=0,Kg=function(){return!!Pr},Xg=250,Jg={attributes:!0,characterData:!0,childList:!0,subtree:!0},Fu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Pu=function(t){return t===void 0&&(t=0),Date.now()+t},Zi=!1,Qg=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=Xg),!Zi){Zi=!0;var r=Pu(e);Yg(function(){var i=!1;try{i=qg()}finally{if(Zi=!1,e=r-Pu(),!Kg())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Jg)};document.body?n():Yn.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Fu.forEach(function(n){return Yn.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Fu.forEach(function(n){return Yn.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Gi=new Qg,Mu=function(t){!Pr&&t>0&&Gi.start(),Pr+=t,!Pr&&Gi.stop()},$g=function(t){return!Vi(t)&&!_g(t)&&getComputedStyle(t).display==="inline"},em=function(){function t(e,n){this.target=e,this.observedBox=n||Gn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Lu(this.target,this.observedBox,!0);return $g(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),tm=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Mr=new WeakMap,ku=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},kr=function(){function t(){}return t.connect=function(e,n){var r=new tm(e,n);Mr.set(e,r)},t.observe=function(e,n,r){var i=Mr.get(e),a=i.observationTargets.length===0;ku(i.observationTargets,n)<0&&(a&&fn.push(i),i.observationTargets.push(new em(n,r&&r.box)),Mu(1),Gi.schedule())},t.unobserve=function(e,n){var r=Mr.get(e),i=ku(r.observationTargets,n),a=r.observationTargets.length===1;i>=0&&(a&&fn.splice(fn.indexOf(r),1),r.observationTargets.splice(i,1),Mu(-1))},t.disconnect=function(e){var n=this,r=Mr.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),nm=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");kr.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Eu(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");kr.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Eu(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");kr.unobserve(this,e)},t.prototype.disconnect=function(){kr.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function rm(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function xn(t,e){if(t==null)return{};var n=rm(t,e),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Kn(t){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(t)}function im(t,e){if(Kn(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Kn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function am(t){var e=im(t,"string");return Kn(e)==="symbol"?e:String(e)}function xt(t,e,n){return e=am(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yi=l.createContext(null),Gt=()=>{var t=l.useContext(Yi);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},Ki,Xi,Tu=parseInt(l.version.split(".")[0],10),Ru=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ju=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),dt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Ln=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),pn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),om=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Iu=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),sm=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),um=dt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),lm=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),cm=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),fm=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Tr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Ki=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Ki!==void 0&&Ki[1]&&parseInt((Xi=navigator.userAgent.match(/Version\/(\d+)/))===null||Xi===void 0?void 0:Xi[1],10)<17);var Yt=(!sm||!um)&&!om&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Ji=new WeakMap,Qi=new WeakMap,Nu=new WeakMap,Rr=new WeakMap,$i=new WeakMap,Xn=new WeakMap,hn=new WeakMap,jr=new WeakMap,Ir=new WeakMap,ea=new WeakMap,Kt=new WeakMap,vn=new WeakMap,Jn=new WeakMap,ta=new WeakMap,na=new WeakMap,St=new WeakMap,Nt=new WeakMap,mt=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,zu=new WeakMap,Sn=Symbol("placeholder"),_u=Symbol("mark-placeholder"),Wu=globalThis.Node,dm=globalThis.Text,ra=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,pm=t=>Qt(t)&&t.nodeType===8,Lt=t=>Qt(t)&&t.nodeType===1,Qt=t=>{var e=ra(t);return!!e&&t instanceof e.Node},ia=t=>{var e=t&&t.anchorNode&&ra(t.anchorNode);return!!e&&t instanceof e.Selection},Uu=t=>Qt(t)&&t.nodeType===3,hm=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,vm=t=>{var[e,n]=t;if(Lt(e)&&e.childNodes.length){var r=n===e.childNodes.length,i=r?n-1:n;for([e,i]=Hu(e,i,r?"backward":"forward"),r=i<n;Lt(e)&&e.childNodes.length;){var a=r?e.childNodes.length-1:0;e=mm(e,a,r?"backward":"forward")}n=r&&e.textContent!=null?e.textContent.length:0}return[e,n]},gm=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},Hu=(t,e,n)=>{for(var{childNodes:r}=t,i=r[e],a=e,o=!1,s=!1;(pm(i)||Lt(i)&&i.childNodes.length===0||Lt(i)&&i.getAttribute("contenteditable")==="false")&&!(o&&s);){if(a>=r.length){o=!0,a=e-1,n="backward";continue}if(a<0){s=!0,a=e+1,n="forward";continue}i=r[a],e=a,a+=n==="forward"?1:-1}return[i,e]},mm=(t,e,n)=>{var[r]=Hu(t,e,n);return r},Vu=t=>{var e="";if(Uu(t)&&t.nodeValue)return t.nodeValue;if(Lt(t)){for(var n of Array.from(t.childNodes))e+=Vu(n);var r=getComputedStyle(t).getPropertyValue("display");(r==="block"||r==="list"||t.tagName==="BR")&&(e+=`
82
- `)}return e},ym=/data-slate-fragment="(.+?)"/m,Cm=t=>{var e=t.getData("text/html"),[,n]=e.match(ym)||[];return n},Qn=t=>t.getSelection!=null?t.getSelection():document.getSelection(),aa=(t,e,n)=>{var{target:r}=e;if(Lt(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:i}=Y.getWindow(t);if(i.contains(r))return Y.hasDOMNode(t,r,{editable:!0});var a=n.find(o=>{var{addedNodes:s,removedNodes:u}=o;for(var c of s)if(c===r||c.contains(r))return!0;for(var f of u)if(f===r||f.contains(r))return!0});return!a||a===e?!1:aa(t,a,n)},Dm=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(n=t.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var e,n,r;t=(r=t)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return t},qu=(t,e)=>!!(t.compareDocumentPosition(e)&Wu.DOCUMENT_POSITION_PRECEDING),bm=(t,e)=>!!(t.compareDocumentPosition(e)&Wu.DOCUMENT_POSITION_FOLLOWING),Em=0;class wm{constructor(){xt(this,"id",void 0),this.id="".concat(Em++)}}var Y={androidPendingDiffs:t=>mt.get(t),androidScheduleFlush:t=>{var e;(e=na.get(t))===null||e===void 0||e()},blur:t=>{var e=Y.toDOMNode(t,t),n=Y.findDocumentOrShadowRoot(t);Kt.set(t,!1),n.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,n=Y.findDocumentOrShadowRoot(t),r=Qn(n);r&&r.rangeCount>0&&r.removeAllRanges(),e&&ee.deselect(t)},findDocumentOrShadowRoot:t=>{var e=Y.toDOMNode(t,t),n=e.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:n,clientY:r,target:i}=e;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var a=Y.toSlateNode(t,e.target),o=Y.findPath(t,a);if(le.isElement(a)&&m.isVoid(t,a)){var s=i.getBoundingClientRect(),u=t.isInline(a)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,c=m.point(t,o,{edge:u?"start":"end"}),f=u?m.before(t,c):m.after(t,c);if(f){var h=m.range(t,f);return h}}var p,{document:g}=Y.getWindow(t);if(g.caretRangeFromPoint)p=g.caretRangeFromPoint(n,r);else{var C=g.caretPositionFromPoint(n,r);C&&(p=g.createRange(),p.setStart(C.offsetNode,C.offset),p.setEnd(C.offsetNode,C.offset))}if(!p)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var v=Y.toSlateRange(t,p,{exactMatch:!1,suppressThrow:!1});return v},findKey:(t,e)=>{var n=jr.get(e);return n||(n=new wm,jr.set(e,n)),n},findPath:(t,e)=>{for(var n=[],r=e;;){var i=Qi.get(r);if(i==null){if(m.isEditor(r))return n;break}var a=Ji.get(r);if(a==null)break;n.unshift(a),r=i}throw new Error("Unable to find the path for Slate node: ".concat(st.stringify(e)))},focus:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Kt.get(e)){if(n.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Y.focus(e,{retries:n.retries-1})},10);return}var r=Y.toDOMNode(e,e),i=Y.findDocumentOrShadowRoot(e);if(i.activeElement!==r){if(e.selection&&i instanceof Document){var a=Qn(i),o=Y.toDOMRange(e,e.selection);a==null||a.removeAllRanges(),a==null||a.addRange(o)}e.selection||ee.select(e,m.start(e,[])),Kt.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:t=>{var e=Nu.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:i=!1}=r,a=Y.toDOMNode(e,e),o;try{o=Lt(n)?n:n.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return o?o.closest("[data-slate-editor]")===a&&(!i||o.isContentEditable?!0:typeof o.isContentEditable=="boolean"&&o.closest('[contenteditable="false"]')===a||!!o.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>Qt(e)&&Y.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:n,focus:r}=e;return m.hasPath(t,n.path)&&m.hasPath(t,r.path)},hasSelectableTarget:(t,e)=>Y.hasEditableTarget(t,e)||Y.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>Qt(e)&&Y.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!vn.get(t),isFocused:t=>!!Kt.get(t),isReadOnly:t=>!!ea.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(ea.get(t))return!1;var n=Y.hasTarget(t,e)&&Y.toSlateNode(t,e);return le.isElement(n)&&m.isVoid(t,n)},setFragmentData:(t,e,n)=>t.setFragmentData(e,n),toDOMNode:(t,e)=>{var n=Ir.get(t),r=m.isEditor(e)?Rr.get(t):n==null?void 0:n.get(Y.findKey(t,e));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(st.stringify(e)));return r},toDOMPoint:(t,e)=>{var[n]=m.node(t,e.path),r=Y.toDOMNode(t,n),i;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",o=Array.from(r.querySelectorAll(a)),s=0,u=0;u<o.length;u++){var c=o[u],f=c.childNodes[0];if(!(f==null||f.textContent==null)){var{length:h}=f.textContent,p=c.getAttribute("data-slate-length"),g=p==null?h:parseInt(p,10),C=s+g,v=o[u+1];if(e.offset===C&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var d,D=v.childNodes[0];i=[D instanceof dm?D:v,(d=v.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=C){var B=Math.min(h,Math.max(0,e.offset-s));i=[f,B];break}s=C}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(st.stringify(e)));return i},toDOMRange:(t,e)=>{var{anchor:n,focus:r}=e,i=q.isBackward(e),a=Y.toDOMPoint(t,n),o=q.isCollapsed(e)?a:Y.toDOMPoint(t,r),s=Y.getWindow(t),u=s.document.createRange(),[c,f]=i?o:a,[h,p]=i?a:o,g=Lt(c)?c:c.parentElement,C=!!g.getAttribute("data-slate-zero-width"),v=Lt(h)?h:h.parentElement,d=!!v.getAttribute("data-slate-zero-width");return u.setStart(c,C?1:f),u.setEnd(h,d?1:p),u},toSlateNode:(t,e)=>{var n=Lt(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Xn.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(t,e,n)=>{var{exactMatch:r,suppressThrow:i,searchDirection:a="backward"}=n,[o,s]=r?e:vm(e),u=o.parentNode,c=null,f=0;if(u){var h,p,g=Y.toDOMNode(t,t),C=u.closest('[data-slate-void="true"]'),v=C&&g.contains(C)?C:null,d=u.closest('[contenteditable="false"]'),D=d&&g.contains(d)?d:null,B=u.closest("[data-slate-leaf]"),w=null;if(B){if(c=B.closest('[data-slate-node="text"]'),c){var O=Y.getWindow(t),b=O.document.createRange();b.setStart(c,0),b.setEnd(o,s);var E=b.cloneContents(),S=[...Array.prototype.slice.call(E.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(E.querySelectorAll("[contenteditable=false]"))];S.forEach(H=>{if(dt&&!r&&H.hasAttribute("data-slate-zero-width")&&H.textContent.length>0&&H.textContext!=="\uFEFF"){H.textContent.startsWith("\uFEFF")&&(H.textContent=H.textContent.slice(1));return}H.parentNode.removeChild(H)}),f=E.textContent.length,w=c}}else if(v){for(var F=v.querySelectorAll("[data-slate-leaf]"),V=0;V<F.length;V++){var P=F[V];if(Y.hasDOMNode(t,P)){B=P;break}}B?(c=B.closest('[data-slate-node="text"]'),w=B,f=w.textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})):f=1}else if(D){var z=H=>H?H.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],R=D.closest('[data-slate-node="element"]');if(a==="forward"){var I,j=[...z(R),...z(R==null?void 0:R.nextElementSibling)];B=(I=j.find(H=>bm(D,H)))!==null&&I!==void 0?I:null}else{var N,X=[...z(R==null?void 0:R.previousElementSibling),...z(R)];B=(N=X.findLast(H=>qu(D,H)))!==null&&N!==void 0?N:null}B&&(c=B.closest('[data-slate-node="text"]'),w=B,a==="forward"?f=0:(f=w.textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})))}w&&f===w.textContent.length&&dt&&w.getAttribute("data-slate-zero-width")==="z"&&(h=w.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Ln&&(p=w.textContent)!==null&&p!==void 0&&p.endsWith(`
81
+ */function nu(t){return Object.prototype.toString.call(t)==="[object Object]"}function Cv(t){var e,n;return nu(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(nu(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}var Dv={isHistory(t){return Cv(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||Zt.isOperationList(t.redos[0].operations))&&(t.undos.length===0||Zt.isOperationList(t.undos[0].operations))}},_a=new WeakMap,qn=new WeakMap,cn={isHistoryEditor(t){return Dv.isHistory(t.history)&&m.isEditor(t)},isMerging(t){return qn.get(t)},isSaving(t){return _a.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,e){var n=cn.isMerging(t);qn.set(t,!0),e(),qn.set(t,n)},withoutMerging(t,e){var n=cn.isMerging(t);qn.set(t,!1),e(),qn.set(t,n)},withoutSaving(t,e){var n=cn.isSaving(t);_a.set(t,!1),e(),_a.set(t,n)}},bv=t=>{var e=t,{apply:n}=e;return e.history={undos:[],redos:[]},e.redo=()=>{var{history:r}=e,{redos:a}=r;if(a.length>0){var i=a[a.length-1];i.selectionBefore&&ee.setSelection(e,i.selectionBefore),cn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{for(var o of i.operations)e.apply(o)})}),r.redos.pop(),e.writeHistory("undos",i)}},e.undo=()=>{var{history:r}=e,{undos:a}=r;if(a.length>0){var i=a[a.length-1];cn.withoutSaving(e,()=>{m.withoutNormalizing(e,()=>{var o=i.operations.map(Zt.inverse).reverse();for(var s of o)e.apply(s);i.selectionBefore&&ee.setSelection(e,i.selectionBefore)})}),e.writeHistory("redos",i),r.undos.pop()}},e.apply=r=>{var{operations:a,history:i}=e,{undos:o}=i,s=o[o.length-1],u=s&&s.operations[s.operations.length-1],c=cn.isSaving(e),f=cn.isMerging(e);if(c==null&&(c=wv(r)),c){if(f==null&&(s==null?f=!1:a.length!==0?f=!0:f=Ev(r,u)),s&&f)s.operations.push(r);else{var h={operations:[r],selectionBefore:e.selection};e.writeHistory("undos",h)}for(;o.length>100;)o.shift();i.redos=[]}n(r)},e.writeHistory=(r,a)=>{e.history[r].push(a)},e},Ev=(t,e)=>!!(e&&t.type==="insert_text"&&e.type==="insert_text"&&t.offset===e.offset+e.text.length&&A.equals(t.path,e.path)||e&&t.type==="remove_text"&&e.type==="remove_text"&&t.offset+t.text.length===e.offset&&A.equals(t.path,e.path)),wv=(t,e)=>t.type!=="set_selection",Bv=Sv,ru="֑-߿יִ-﷽ﹰ-ﻼ",au="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",xv=new RegExp("^[^"+au+"]*["+ru+"]"),Lv=new RegExp("^[^"+ru+"]*["+au+"]");function Sv(t){return t=String(t||""),xv.test(t)?"rtl":Lv.test(t)?"ltr":"neutral"}const iu=sa(Bv);function Av(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Wa=Av,Ov=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,Fv=Ov,Pv=Fv,Mv=typeof self=="object"&&self&&self.Object===Object&&self,kv=Pv||Mv||Function("return this")(),ou=kv,Tv=ou,Rv=function(){return Tv.Date.now()},jv=Rv,Iv=/\s/;function Nv(t){for(var e=t.length;e--&&Iv.test(t.charAt(e)););return e}var zv=Nv,_v=zv,Wv=/^\s+/;function Uv(t){return t&&t.slice(0,_v(t)+1).replace(Wv,"")}var Hv=Uv,Vv=ou,qv=Vv.Symbol,su=qv,uu=su,lu=Object.prototype,Zv=lu.hasOwnProperty,Gv=lu.toString,Zn=uu?uu.toStringTag:void 0;function Yv(t){var e=Zv.call(t,Zn),n=t[Zn];try{t[Zn]=void 0;var r=!0}catch{}var a=Gv.call(t);return r&&(e?t[Zn]=n:delete t[Zn]),a}var Kv=Yv,Xv=Object.prototype,Jv=Xv.toString;function Qv(t){return Jv.call(t)}var $v=Qv,cu=su,eg=Kv,tg=$v,ng="[object Null]",rg="[object Undefined]",fu=cu?cu.toStringTag:void 0;function ag(t){return t==null?t===void 0?rg:ng:fu&&fu in Object(t)?eg(t):tg(t)}var ig=ag;function og(t){return t!=null&&typeof t=="object"}var sg=og,ug=ig,lg=sg,cg="[object Symbol]";function fg(t){return typeof t=="symbol"||lg(t)&&ug(t)==cg}var dg=fg,pg=Hv,du=Wa,hg=dg,pu=NaN,vg=/^[-+]0x[0-9a-f]+$/i,gg=/^0b[01]+$/i,mg=/^0o[0-7]+$/i,yg=parseInt;function Cg(t){if(typeof t=="number")return t;if(hg(t))return pu;if(du(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=du(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=pg(t);var n=gg.test(t);return n||mg.test(t)?yg(t.slice(2),n?2:8):vg.test(t)?pu:+t}var Dg=Cg,bg=Wa,Ua=jv,hu=Dg,Eg="Expected a function",wg=Math.max,Bg=Math.min;function xg(t,e,n){var r,a,i,o,s,u,c=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Eg);e=hu(e)||0,bg(n)&&(f=!!n.leading,h="maxWait"in n,i=h?wg(hu(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p);function v(w){var S=r,P=a;return r=a=void 0,c=w,o=t.apply(P,S),o}function C(w){return c=w,s=setTimeout(D,e),f?v(w):o}function g(w){var S=w-u,P=w-c,V=e-S;return h?Bg(V,i-P):V}function d(w){var S=w-u,P=w-c;return u===void 0||S>=e||S<0||h&&P>=i}function D(){var w=Ua();if(d(w))return B(w);s=setTimeout(D,g(w))}function B(w){return s=void 0,p&&r?v(w):(r=a=void 0,o)}function E(){s!==void 0&&clearTimeout(s),c=0,r=u=a=s=void 0}function O(){return s===void 0?o:B(Ua())}function b(){var w=Ua(),S=d(w);if(r=arguments,a=this,u=w,S){if(s===void 0)return C(u);if(h)return clearTimeout(s),s=setTimeout(D,e),v(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=E,b.flush=O,b}var vu=xg;const Lg=sa(vu);var Sg=vu,Ag=Wa,Og="Expected a function";function Fg(t,e,n){var r=!0,a=!0;if(typeof t!="function")throw new TypeError(Og);return Ag(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),Sg(t,e,{leading:r,maxWait:e,trailing:a})}var Pg=Fg;const Mg=sa(Pg),gu=t=>typeof t=="object"&&t!=null&&t.nodeType===1,mu=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Ha=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return mu(n.overflowY,e)||mu(n.overflowX,e)||(r=>{const a=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!a&&(a.clientHeight<r.scrollHeight||a.clientWidth<r.scrollWidth)})(t)}return!1},Or=(t,e,n,r,a,i,o,s)=>i<t&&o>e||i>t&&o<e?0:i<=t&&s<=n||o>=e&&s>=n?i-t-r:o>e&&s<n||i<t&&s>n?o-e+a:0,kg=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},yu=(t,e)=>{var n,r,a,i;if(typeof document>"u")return[];const{scrollMode:o,block:s,inline:u,boundary:c,skipOverflowHiddenElements:f}=e,h=typeof c=="function"?c:X=>X!==c;if(!gu(t))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,v=[];let C=t;for(;gu(C)&&h(C);){if(C=kg(C),C===p){v.push(C);break}C!=null&&C===document.body&&Ha(C)&&!Ha(document.documentElement)||C!=null&&Ha(C,f)&&v.push(C)}const g=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,d=(i=(a=window.visualViewport)==null?void 0:a.height)!=null?i:innerHeight,{scrollX:D,scrollY:B}=window,{height:E,width:O,top:b,right:w,bottom:S,left:P}=t.getBoundingClientRect(),{top:V,right:F,bottom:j,left:k}=(X=>{const _=window.getComputedStyle(X);return{top:parseFloat(_.scrollMarginTop)||0,right:parseFloat(_.scrollMarginRight)||0,bottom:parseFloat(_.scrollMarginBottom)||0,left:parseFloat(_.scrollMarginLeft)||0}})(t);let I=s==="start"||s==="nearest"?b-V:s==="end"?S+j:b+E/2-V+j,N=u==="center"?P+O/2-k+F:u==="end"?w+F:P-k;const z=[];for(let X=0;X<v.length;X++){const _=v[X],{height:$,width:re,top:T,right:R,bottom:Z,left:H}=_.getBoundingClientRect();if(o==="if-needed"&&b>=0&&P>=0&&S<=d&&w<=g&&b>=T&&S<=Z&&P>=H&&w<=R)return z;const Q=getComputedStyle(_),K=parseInt(Q.borderLeftWidth,10),y=parseInt(Q.borderTopWidth,10),U=parseInt(Q.borderRightWidth,10),W=parseInt(Q.borderBottomWidth,10);let M=0,J=0;const ne="offsetWidth"in _?_.offsetWidth-_.clientWidth-K-U:0,G="offsetHeight"in _?_.offsetHeight-_.clientHeight-y-W:0,ue="offsetWidth"in _?_.offsetWidth===0?0:re/_.offsetWidth:0,ie="offsetHeight"in _?_.offsetHeight===0?0:$/_.offsetHeight:0;if(p===_)M=s==="start"?I:s==="end"?I-d:s==="nearest"?Or(B,B+d,d,y,W,B+I,B+I+E,E):I-d/2,J=u==="start"?N:u==="center"?N-g/2:u==="end"?N-g:Or(D,D+g,g,K,U,D+N,D+N+O,O),M=Math.max(0,M+B),J=Math.max(0,J+D);else{M=s==="start"?I-T-y:s==="end"?I-Z+W+G:s==="nearest"?Or(T,Z,$,y,W+G,I,I+E,E):I-(T+$/2)+G/2,J=u==="start"?N-H-K:u==="center"?N-(H+re/2)+ne/2:u==="end"?N-R+U+ne:Or(H,R,re,K,U+ne,N,N+O,O);const{scrollLeft:de,scrollTop:pe}=_;M=ie===0?0:Math.max(0,Math.min(pe+M/ie,_.scrollHeight-$/ie+G)),J=ue===0?0:Math.max(0,Math.min(de+J/ue,_.scrollWidth-re/ue+ne)),I+=pe-M,N+=de-J}z.push({el:_,top:M,left:J})}return z},Tg=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function Rg(t,e){if(!t.isConnected||!(a=>{let i=a;for(;i&&i.parentNode;){if(i.parentNode===document)return!0;i=i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}return!1})(t))return;const n=(a=>{const i=window.getComputedStyle(a);return{top:parseFloat(i.scrollMarginTop)||0,right:parseFloat(i.scrollMarginRight)||0,bottom:parseFloat(i.scrollMarginBottom)||0,left:parseFloat(i.scrollMarginLeft)||0}})(t);if((a=>typeof a=="object"&&typeof a.behavior=="function")(e))return e.behavior(yu(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:a,top:i,left:o}of yu(t,Tg(e))){const s=i-n.top+n.bottom,u=o-n.left+n.right;a.scroll({top:s,left:u,behavior:r})}}var fn=[],jg=function(){return fn.some(function(t){return t.activeTargets.length>0})},Ig=function(){return fn.some(function(t){return t.skippedTargets.length>0})},Cu="ResizeObserver loop completed with undelivered notifications.",Ng=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Cu}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Cu),window.dispatchEvent(t)},Gn;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Gn||(Gn={}));var dn=function(t){return Object.freeze(t)},zg=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,dn(this)}return t}(),Du=function(){function t(e,n,r,a){return this.x=e,this.y=n,this.width=r,this.height=a,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,dn(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,a=e.top,i=e.right,o=e.bottom,s=e.left,u=e.width,c=e.height;return{x:n,y:r,top:a,right:i,bottom:o,left:s,width:u,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Va=function(t){return t instanceof SVGElement&&"getBBox"in t},bu=function(t){if(Va(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var a=t,i=a.offsetWidth,o=a.offsetHeight;return!(i||o||t.getClientRects().length)},Eu=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},_g=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Yn=typeof window<"u"?window:{},Fr=new WeakMap,wu=/auto|scroll/,Wg=/^tb|vertical/,Ug=/msie|trident/i.test(Yn.navigator&&Yn.navigator.userAgent),Ft=function(t){return parseFloat(t||"0")},Bn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new zg((n?e:t)||0,(n?t:e)||0)},Bu=dn({devicePixelContentBoxSize:Bn(),borderBoxSize:Bn(),contentBoxSize:Bn(),contentRect:new Du(0,0,0,0)}),xu=function(t,e){if(e===void 0&&(e=!1),Fr.has(t)&&!e)return Fr.get(t);if(bu(t))return Fr.set(t,Bu),Bu;var n=getComputedStyle(t),r=Va(t)&&t.ownerSVGElement&&t.getBBox(),a=!Ug&&n.boxSizing==="border-box",i=Wg.test(n.writingMode||""),o=!r&&wu.test(n.overflowY||""),s=!r&&wu.test(n.overflowX||""),u=r?0:Ft(n.paddingTop),c=r?0:Ft(n.paddingRight),f=r?0:Ft(n.paddingBottom),h=r?0:Ft(n.paddingLeft),p=r?0:Ft(n.borderTopWidth),v=r?0:Ft(n.borderRightWidth),C=r?0:Ft(n.borderBottomWidth),g=r?0:Ft(n.borderLeftWidth),d=h+c,D=u+f,B=g+v,E=p+C,O=s?t.offsetHeight-E-t.clientHeight:0,b=o?t.offsetWidth-B-t.clientWidth:0,w=a?d+B:0,S=a?D+E:0,P=r?r.width:Ft(n.width)-w-b,V=r?r.height:Ft(n.height)-S-O,F=P+d+b+B,j=V+D+O+E,k=dn({devicePixelContentBoxSize:Bn(Math.round(P*devicePixelRatio),Math.round(V*devicePixelRatio),i),borderBoxSize:Bn(F,j,i),contentBoxSize:Bn(P,V,i),contentRect:new Du(h,u,P,V)});return Fr.set(t,k),k},Lu=function(t,e,n){var r=xu(t,n),a=r.borderBoxSize,i=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case Gn.DEVICE_PIXEL_CONTENT_BOX:return o;case Gn.BORDER_BOX:return a;default:return i}},Hg=function(){function t(e){var n=xu(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=dn([n.borderBoxSize]),this.contentBoxSize=dn([n.contentBoxSize]),this.devicePixelContentBoxSize=dn([n.devicePixelContentBoxSize])}return t}(),Su=function(t){if(bu(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Vg=function(){var t=1/0,e=[];fn.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(c){var f=new Hg(c.target),h=Su(c.target);s.push(f),c.lastReportedSize=Lu(c.target,c.observedBox),h<t&&(t=h)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var a=r[n];a()}return t},Au=function(t){fn.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(a){a.isActive()&&(Su(a.target)>t?n.activeTargets.push(a):n.skippedTargets.push(a))})})},qg=function(){var t=0;for(Au(t);jg();)t=Vg(),Au(t);return Ig()&&Ng(),t>0},qa,Ou=[],Zg=function(){return Ou.splice(0).forEach(function(t){return t()})},Gg=function(t){if(!qa){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Zg()}).observe(n,r),qa=function(){n.textContent="".concat(e?e--:e++)}}Ou.push(t),qa()},Yg=function(t){Gg(function(){requestAnimationFrame(t)})},Pr=0,Kg=function(){return!!Pr},Xg=250,Jg={attributes:!0,characterData:!0,childList:!0,subtree:!0},Fu=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Pu=function(t){return t===void 0&&(t=0),Date.now()+t},Za=!1,Qg=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=Xg),!Za){Za=!0;var r=Pu(e);Yg(function(){var a=!1;try{a=qg()}finally{if(Za=!1,e=r-Pu(),!Kg())return;a?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Jg)};document.body?n():Yn.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Fu.forEach(function(n){return Yn.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Fu.forEach(function(n){return Yn.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ga=new Qg,Mu=function(t){!Pr&&t>0&&Ga.start(),Pr+=t,!Pr&&Ga.stop()},$g=function(t){return!Va(t)&&!_g(t)&&getComputedStyle(t).display==="inline"},em=function(){function t(e,n){this.target=e,this.observedBox=n||Gn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Lu(this.target,this.observedBox,!0);return $g(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),tm=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),Mr=new WeakMap,ku=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},kr=function(){function t(){}return t.connect=function(e,n){var r=new tm(e,n);Mr.set(e,r)},t.observe=function(e,n,r){var a=Mr.get(e),i=a.observationTargets.length===0;ku(a.observationTargets,n)<0&&(i&&fn.push(a),a.observationTargets.push(new em(n,r&&r.box)),Mu(1),Ga.schedule())},t.unobserve=function(e,n){var r=Mr.get(e),a=ku(r.observationTargets,n),i=r.observationTargets.length===1;a>=0&&(i&&fn.splice(fn.indexOf(r),1),r.observationTargets.splice(a,1),Mu(-1))},t.disconnect=function(e){var n=this,r=Mr.get(e);r.observationTargets.slice().forEach(function(a){return n.unobserve(e,a.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),nm=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");kr.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Eu(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");kr.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Eu(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");kr.unobserve(this,e)},t.prototype.disconnect=function(){kr.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();function rm(t,e){if(t==null)return{};var n={},r=Object.keys(t),a,i;for(i=0;i<r.length;i++)a=r[i],!(e.indexOf(a)>=0)&&(n[a]=t[a]);return n}function xn(t,e){if(t==null)return{};var n=rm(t,e),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Kn(t){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(t)}function am(t,e){if(Kn(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Kn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function im(t){var e=am(t,"string");return Kn(e)==="symbol"?e:String(e)}function xt(t,e,n){return e=im(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ya=l.createContext(null),Gt=()=>{var t=l.useContext(Ya);if(!t)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return t},Ka,Xa,Tu=parseInt(l.version.split(".")[0],10),Ru=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ju=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),dt=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Ln=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),pn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),om=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Iu=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),sm=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),um=dt&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),lm=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),cm=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),fm=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Tr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&((Ka=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Ka!==void 0&&Ka[1]&&parseInt((Xa=navigator.userAgent.match(/Version\/(\d+)/))===null||Xa===void 0?void 0:Xa[1],10)<17);var Yt=(!sm||!um)&&!om&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Ja=new WeakMap,Qa=new WeakMap,Nu=new WeakMap,Rr=new WeakMap,$a=new WeakMap,Xn=new WeakMap,hn=new WeakMap,jr=new WeakMap,Ir=new WeakMap,ei=new WeakMap,Kt=new WeakMap,vn=new WeakMap,Jn=new WeakMap,ti=new WeakMap,ni=new WeakMap,St=new WeakMap,Nt=new WeakMap,mt=new WeakMap,Xt=new WeakMap,Jt=new WeakMap,zu=new WeakMap,Sn=Symbol("placeholder"),_u=Symbol("mark-placeholder"),Wu=globalThis.Node,dm=globalThis.Text,ri=t=>t&&t.ownerDocument&&t.ownerDocument.defaultView||null,pm=t=>Qt(t)&&t.nodeType===8,Lt=t=>Qt(t)&&t.nodeType===1,Qt=t=>{var e=ri(t);return!!e&&t instanceof e.Node},ai=t=>{var e=t&&t.anchorNode&&ri(t.anchorNode);return!!e&&t instanceof e.Selection},Uu=t=>Qt(t)&&t.nodeType===3,hm=t=>t.clipboardData&&t.clipboardData.getData("text/plain")!==""&&t.clipboardData.types.length===1,vm=t=>{var[e,n]=t;if(Lt(e)&&e.childNodes.length){var r=n===e.childNodes.length,a=r?n-1:n;for([e,a]=Hu(e,a,r?"backward":"forward"),r=a<n;Lt(e)&&e.childNodes.length;){var i=r?e.childNodes.length-1:0;e=mm(e,i,r?"backward":"forward")}n=r&&e.textContent!=null?e.textContent.length:0}return[e,n]},gm=t=>{for(var e=t&&t.parentNode;e;){if(e.toString()==="[object ShadowRoot]")return!0;e=e.parentNode}return!1},Hu=(t,e,n)=>{for(var{childNodes:r}=t,a=r[e],i=e,o=!1,s=!1;(pm(a)||Lt(a)&&a.childNodes.length===0||Lt(a)&&a.getAttribute("contenteditable")==="false")&&!(o&&s);){if(i>=r.length){o=!0,i=e-1,n="backward";continue}if(i<0){s=!0,i=e+1,n="forward";continue}a=r[i],e=i,i+=n==="forward"?1:-1}return[a,e]},mm=(t,e,n)=>{var[r]=Hu(t,e,n);return r},Vu=t=>{var e="";if(Uu(t)&&t.nodeValue)return t.nodeValue;if(Lt(t)){for(var n of Array.from(t.childNodes))e+=Vu(n);var r=getComputedStyle(t).getPropertyValue("display");(r==="block"||r==="list"||t.tagName==="BR")&&(e+=`
82
+ `)}return e},ym=/data-slate-fragment="(.+?)"/m,Cm=t=>{var e=t.getData("text/html"),[,n]=e.match(ym)||[];return n},Qn=t=>t.getSelection!=null?t.getSelection():document.getSelection(),ii=(t,e,n)=>{var{target:r}=e;if(Lt(r)&&r.matches('[contentEditable="false"]'))return!1;var{document:a}=Y.getWindow(t);if(a.contains(r))return Y.hasDOMNode(t,r,{editable:!0});var i=n.find(o=>{var{addedNodes:s,removedNodes:u}=o;for(var c of s)if(c===r||c.contains(r))return!0;for(var f of u)if(f===r||f.contains(r))return!0});return!i||i===e?!1:ii(t,i,n)},Dm=()=>{for(var t=document.activeElement;(e=t)!==null&&e!==void 0&&e.shadowRoot&&(n=t.shadowRoot)!==null&&n!==void 0&&n.activeElement;){var e,n,r;t=(r=t)===null||r===void 0||(r=r.shadowRoot)===null||r===void 0?void 0:r.activeElement}return t},qu=(t,e)=>!!(t.compareDocumentPosition(e)&Wu.DOCUMENT_POSITION_PRECEDING),bm=(t,e)=>!!(t.compareDocumentPosition(e)&Wu.DOCUMENT_POSITION_FOLLOWING),Em=0;class wm{constructor(){xt(this,"id",void 0),this.id="".concat(Em++)}}var Y={androidPendingDiffs:t=>mt.get(t),androidScheduleFlush:t=>{var e;(e=ni.get(t))===null||e===void 0||e()},blur:t=>{var e=Y.toDOMNode(t,t),n=Y.findDocumentOrShadowRoot(t);Kt.set(t,!1),n.activeElement===e&&e.blur()},deselect:t=>{var{selection:e}=t,n=Y.findDocumentOrShadowRoot(t),r=Qn(n);r&&r.rangeCount>0&&r.removeAllRanges(),e&&ee.deselect(t)},findDocumentOrShadowRoot:t=>{var e=Y.toDOMNode(t,t),n=e.getRootNode();return n instanceof Document||n instanceof ShadowRoot?n:e.ownerDocument},findEventRange:(t,e)=>{"nativeEvent"in e&&(e=e.nativeEvent);var{clientX:n,clientY:r,target:a}=e;if(n==null||r==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var i=Y.toSlateNode(t,e.target),o=Y.findPath(t,i);if(le.isElement(i)&&m.isVoid(t,i)){var s=a.getBoundingClientRect(),u=t.isInline(i)?n-s.left<s.left+s.width-n:r-s.top<s.top+s.height-r,c=m.point(t,o,{edge:u?"start":"end"}),f=u?m.before(t,c):m.after(t,c);if(f){var h=m.range(t,f);return h}}var p,{document:v}=Y.getWindow(t);if(v.caretRangeFromPoint)p=v.caretRangeFromPoint(n,r);else{var C=v.caretPositionFromPoint(n,r);C&&(p=v.createRange(),p.setStart(C.offsetNode,C.offset),p.setEnd(C.offsetNode,C.offset))}if(!p)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(e));var g=Y.toSlateRange(t,p,{exactMatch:!1,suppressThrow:!1});return g},findKey:(t,e)=>{var n=jr.get(e);return n||(n=new wm,jr.set(e,n)),n},findPath:(t,e)=>{for(var n=[],r=e;;){var a=Qa.get(r);if(a==null){if(m.isEditor(r))return n;break}var i=Ja.get(r);if(i==null)break;n.unshift(i),r=a}throw new Error("Unable to find the path for Slate node: ".concat(st.stringify(e)))},focus:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Kt.get(e)){if(n.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{Y.focus(e,{retries:n.retries-1})},10);return}var r=Y.toDOMNode(e,e),a=Y.findDocumentOrShadowRoot(e);if(a.activeElement!==r){if(e.selection&&a instanceof Document){var i=Qn(a),o=Y.toDOMRange(e,e.selection);i==null||i.removeAllRanges(),i==null||i.addRange(o)}e.selection||ee.select(e,m.start(e,[])),Kt.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:t=>{var e=Nu.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},hasDOMNode:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:a=!1}=r,i=Y.toDOMNode(e,e),o;try{o=Lt(n)?n:n.parentElement}catch(s){if(s instanceof Error&&!s.message.includes('Permission denied to access property "nodeType"'))throw s}return o?o.closest("[data-slate-editor]")===i&&(!a||o.isContentEditable?!0:typeof o.isContentEditable=="boolean"&&o.closest('[contenteditable="false"]')===i||!!o.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(t,e)=>Qt(e)&&Y.hasDOMNode(t,e,{editable:!0}),hasRange:(t,e)=>{var{anchor:n,focus:r}=e;return m.hasPath(t,n.path)&&m.hasPath(t,r.path)},hasSelectableTarget:(t,e)=>Y.hasEditableTarget(t,e)||Y.isTargetInsideNonReadonlyVoid(t,e),hasTarget:(t,e)=>Qt(e)&&Y.hasDOMNode(t,e),insertData:(t,e)=>{t.insertData(e)},insertFragmentData:(t,e)=>t.insertFragmentData(e),insertTextData:(t,e)=>t.insertTextData(e),isComposing:t=>!!vn.get(t),isFocused:t=>!!Kt.get(t),isReadOnly:t=>!!ei.get(t),isTargetInsideNonReadonlyVoid:(t,e)=>{if(ei.get(t))return!1;var n=Y.hasTarget(t,e)&&Y.toSlateNode(t,e);return le.isElement(n)&&m.isVoid(t,n)},setFragmentData:(t,e,n)=>t.setFragmentData(e,n),toDOMNode:(t,e)=>{var n=Ir.get(t),r=m.isEditor(e)?Rr.get(t):n==null?void 0:n.get(Y.findKey(t,e));if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(st.stringify(e)));return r},toDOMPoint:(t,e)=>{var[n]=m.node(t,e.path),r=Y.toDOMNode(t,n),a;m.void(t,{at:e})&&(e={path:e.path,offset:0});for(var i="[data-slate-string], [data-slate-zero-width]",o=Array.from(r.querySelectorAll(i)),s=0,u=0;u<o.length;u++){var c=o[u],f=c.childNodes[0];if(!(f==null||f.textContent==null)){var{length:h}=f.textContent,p=c.getAttribute("data-slate-length"),v=p==null?h:parseInt(p,10),C=s+v,g=o[u+1];if(e.offset===C&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var d,D=g.childNodes[0];a=[D instanceof dm?D:g,(d=g.textContent)!==null&&d!==void 0&&d.startsWith("\uFEFF")?1:0];break}if(e.offset<=C){var B=Math.min(h,Math.max(0,e.offset-s));a=[f,B];break}s=C}}if(!a)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(st.stringify(e)));return a},toDOMRange:(t,e)=>{var{anchor:n,focus:r}=e,a=q.isBackward(e),i=Y.toDOMPoint(t,n),o=q.isCollapsed(e)?i:Y.toDOMPoint(t,r),s=Y.getWindow(t),u=s.document.createRange(),[c,f]=a?o:i,[h,p]=a?i:o,v=Lt(c)?c:c.parentElement,C=!!v.getAttribute("data-slate-zero-width"),g=Lt(h)?h:h.parentElement,d=!!g.getAttribute("data-slate-zero-width");return u.setStart(c,C?1:f),u.setEnd(h,d?1:p),u},toSlateNode:(t,e)=>{var n=Lt(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Xn.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},toSlatePoint:(t,e,n)=>{var{exactMatch:r,suppressThrow:a,searchDirection:i="backward"}=n,[o,s]=r?e:vm(e),u=o.parentNode,c=null,f=0;if(u){var h,p,v=Y.toDOMNode(t,t),C=u.closest('[data-slate-void="true"]'),g=C&&v.contains(C)?C:null,d=u.closest('[contenteditable="false"]'),D=d&&v.contains(d)?d:null,B=u.closest("[data-slate-leaf]"),E=null;if(B){if(c=B.closest('[data-slate-node="text"]'),c){var O=Y.getWindow(t),b=O.document.createRange();b.setStart(c,0),b.setEnd(o,s);var w=b.cloneContents(),S=[...Array.prototype.slice.call(w.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(w.querySelectorAll("[contenteditable=false]"))];S.forEach(H=>{if(dt&&!r&&H.hasAttribute("data-slate-zero-width")&&H.textContent.length>0&&H.textContext!=="\uFEFF"){H.textContent.startsWith("\uFEFF")&&(H.textContent=H.textContent.slice(1));return}H.parentNode.removeChild(H)}),f=w.textContent.length,E=c}}else if(g){for(var P=g.querySelectorAll("[data-slate-leaf]"),V=0;V<P.length;V++){var F=P[V];if(Y.hasDOMNode(t,F)){B=F;break}}B?(c=B.closest('[data-slate-node="text"]'),E=B,f=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})):f=1}else if(D){var j=H=>H?H.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],k=D.closest('[data-slate-node="element"]');if(i==="forward"){var I,N=[...j(k),...j(k==null?void 0:k.nextElementSibling)];B=(I=N.find(H=>bm(D,H)))!==null&&I!==void 0?I:null}else{var z,X=[...j(k==null?void 0:k.previousElementSibling),...j(k)];B=(z=X.findLast(H=>qu(D,H)))!==null&&z!==void 0?z:null}B&&(c=B.closest('[data-slate-node="text"]'),E=B,i==="forward"?f=0:(f=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(H=>{f-=H.textContent.length})))}E&&f===E.textContent.length&&dt&&E.getAttribute("data-slate-zero-width")==="z"&&(h=E.textContent)!==null&&h!==void 0&&h.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Ln&&(p=E.textContent)!==null&&p!==void 0&&p.endsWith(`
83
83
 
84
- `))&&f--}if(dt&&!c&&!r){var _=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(_&&Y.hasDOMNode(t,_,{editable:!0})){var $=Y.toSlateNode(t,_),{path:re,offset:k}=m.start(t,Y.findPath(t,$));return _.querySelector("[data-slate-leaf]")||(k=s),{path:re,offset:k}}}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var T=Y.toSlateNode(t,c),Z=Y.findPath(t,T);return{path:Z,offset:f}},toSlateRange:(t,e,n)=>{var r,{exactMatch:i,suppressThrow:a}=n,o=ia(e)?e.anchorNode:e.startContainer,s,u,c,f,h;if(o)if(ia(e)){if(Ln&&e.rangeCount>1){c=e.focusNode;var p=e.getRangeAt(0),g=e.getRangeAt(e.rangeCount-1);if(c instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement){let E=function(S){return S.childElementCount>0?E(S.children[0]):S};var C=p.startContainer,v=g.startContainer,d=E(C.children[p.startOffset]),D=E(v.children[g.startOffset]);f=0,D.childNodes.length>0?s=D.childNodes[0]:s=D,d.childNodes.length>0?c=d.childNodes[0]:c=d,D instanceof HTMLElement?u=D.innerHTML.length:u=0}else p.startContainer===c?(s=g.endContainer,u=g.endOffset,f=p.startOffset):(s=p.startContainer,u=p.endOffset,f=g.startOffset)}else s=e.anchorNode,u=e.anchorOffset,c=e.focusNode,f=e.focusOffset;Iu&&gm(s)||Ln?h=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:h=e.isCollapsed}else s=e.startContainer,u=e.startOffset,c=e.endContainer,f=e.endOffset,h=e.collapsed;if(s==null||c==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Ln&&(r=c.textContent)!==null&&r!==void 0&&r.endsWith(`
84
+ `))&&f--}if(dt&&!c&&!r){var _=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(_&&Y.hasDOMNode(t,_,{editable:!0})){var $=Y.toSlateNode(t,_),{path:re,offset:T}=m.start(t,Y.findPath(t,$));return _.querySelector("[data-slate-leaf]")||(T=s),{path:re,offset:T}}}if(!c){if(a)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var R=Y.toSlateNode(t,c),Z=Y.findPath(t,R);return{path:Z,offset:f}},toSlateRange:(t,e,n)=>{var r,{exactMatch:a,suppressThrow:i}=n,o=ai(e)?e.anchorNode:e.startContainer,s,u,c,f,h;if(o)if(ai(e)){if(Ln&&e.rangeCount>1){c=e.focusNode;var p=e.getRangeAt(0),v=e.getRangeAt(e.rangeCount-1);if(c instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement&&v.startContainer instanceof HTMLTableRowElement){let w=function(S){return S.childElementCount>0?w(S.children[0]):S};var C=p.startContainer,g=v.startContainer,d=w(C.children[p.startOffset]),D=w(g.children[v.startOffset]);f=0,D.childNodes.length>0?s=D.childNodes[0]:s=D,d.childNodes.length>0?c=d.childNodes[0]:c=d,D instanceof HTMLElement?u=D.innerHTML.length:u=0}else p.startContainer===c?(s=v.endContainer,u=v.endOffset,f=p.startOffset):(s=p.startContainer,u=p.endOffset,f=v.startOffset)}else s=e.anchorNode,u=e.anchorOffset,c=e.focusNode,f=e.focusOffset;Iu&&gm(s)||Ln?h=e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset:h=e.isCollapsed}else s=e.startContainer,u=e.startOffset,c=e.endContainer,f=e.endOffset,h=e.collapsed;if(s==null||c==null||u==null||f==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(e));Ln&&(r=c.textContent)!==null&&r!==void 0&&r.endsWith(`
85
85
 
86
- `)&&f===c.textContent.length&&f--;var B=Y.toSlatePoint(t,[s,u],{exactMatch:i,suppressThrow:a});if(!B)return null;var w=qu(s,c)||s===c&&f<u,O=h?B:Y.toSlatePoint(t,[c,f],{exactMatch:i,suppressThrow:a,searchDirection:w?"forward":"backward"});if(!O)return null;var b={anchor:B,focus:O};return q.isExpanded(b)&&q.isForward(b)&&Lt(c)&&m.void(t,{at:b.focus,mode:"highest"})&&(b=m.unhangRange(t,b,{voids:!0})),b}};function Bm(t,e){var{path:n,diff:r}=e;if(!m.hasPath(t,n))return!1;var i=ie.get(t,n);if(!ce.isText(i))return!1;if(r.start!==i.text.length||r.text.length===0)return i.text.slice(r.start,r.start+r.text.length)===r.text;var a=A.next(n);if(!m.hasPath(t,a))return!1;var o=ie.get(t,a);return ce.isText(o)&&o.text.startsWith(r.text)}function Zu(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.reduce((i,a)=>i.slice(0,a.start)+a.text+i.slice(a.end),t)}function xm(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r))return r;return n}function Lm(t,e,n){for(var r=Math.min(t.length,e.length,n),i=0;i<r;i++)if(t.charAt(t.length-i-1)!==e.charAt(e.length-i-1))return i;return r}function Gu(t,e){var{start:n,end:r,text:i}=e,a=t.slice(n,r),o=xm(a,i),s=Math.min(a.length-o,i.length-o),u=Lm(a,i,s),c={start:n+o,end:r-u,text:i.slice(o,i.length-u)};return c.start===c.end&&c.text.length===0?null:c}function Sm(t,e,n){var r=Math.min(e.start,n.start),i=Math.max(0,Math.min(e.start+e.text.length,n.end)-n.start),a=Zu(t,e,n),o=Math.max(n.start+n.text.length,e.start+e.text.length+(e.start+e.text.length>n.start?n.text.length:0)-i),s=a.slice(r,o),u=Math.max(e.end,n.end-e.text.length+(e.end-e.start));return Gu(t,{start:r,end:u,text:s})}function Am(t){var{path:e,diff:n}=t;return{anchor:{path:e,offset:n.start},focus:{path:e,offset:n.end}}}function oa(t,e){var{path:n,offset:r}=e;if(!m.hasPath(t,n))return null;var i=ie.get(t,n);if(!ce.isText(i))return null;var a=m.above(t,{match:s=>le.isElement(s)&&m.isBlock(t,s),at:n});if(!a)return null;for(;r>i.text.length;){var o=m.next(t,{at:n,match:ce.isText});if(!o||!A.isDescendant(o[1],a[1]))return null;r-=i.text.length,i=o[0],n=o[1]}return{path:n,offset:r}}function Yu(t,e){var n=oa(t,e.anchor);if(!n)return null;if(q.isCollapsed(e))return{anchor:n,focus:n};var r=oa(t,e.focus);return r?{anchor:n,focus:r}:null}function sa(t,e,n){var r=mt.get(t),i=r==null?void 0:r.find(f=>{var{path:h}=f;return A.equals(h,e.path)});if(!i||e.offset<=i.diff.start)return Ae.transform(e,n,{affinity:"backward"});var{diff:a}=i;if(e.offset<=a.start+a.text.length){var o={path:e.path,offset:a.start},s=Ae.transform(o,n,{affinity:"backward"});return s?{path:s.path,offset:s.offset+e.offset-a.start}:null}var u={path:e.path,offset:e.offset-a.text.length+a.end-a.start},c=Ae.transform(u,n,{affinity:"backward"});return c?n.type==="split_node"&&A.equals(n.path,e.path)&&u.offset<n.position&&a.start<n.position?c:{path:c.path,offset:c.offset+a.text.length-a.end+a.start}:null}function Ku(t,e,n){var r=sa(t,e.anchor,n);if(!r)return null;if(q.isCollapsed(e))return{anchor:r,focus:r};var i=sa(t,e.focus,n);return i?{anchor:r,focus:i}:null}function Om(t,e){var{path:n,diff:r,id:i}=t;switch(e.type){case"insert_text":return!A.equals(e.path,n)||e.offset>=r.end?t:e.offset<=r.start?{diff:{start:e.text.length+r.start,end:e.text.length+r.end,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end+e.text.length,text:r.text},id:i,path:n};case"remove_text":return!A.equals(e.path,n)||e.offset>=r.end?t:e.offset+e.text.length<=r.start?{diff:{start:r.start-e.text.length,end:r.end-e.text.length,text:r.text},id:i,path:n}:{diff:{start:r.start,end:r.end-e.text.length,text:r.text},id:i,path:n};case"split_node":return!A.equals(e.path,n)||e.position>=r.end?{diff:r,id:i,path:A.transform(n,e,{affinity:"backward"})}:e.position>r.start?{diff:{start:r.start,end:Math.min(e.position,r.end),text:r.text},id:i,path:n}:{diff:{start:r.start-e.position,end:r.end-e.position,text:r.text},id:i,path:A.transform(n,e,{affinity:"forward"})};case"merge_node":return A.equals(e.path,n)?{diff:{start:r.start+e.position,end:r.end+e.position,text:r.text},id:i,path:A.transform(n,e)}:{diff:r,id:i,path:A.transform(n,e)}}var a=A.transform(n,e);return a?{diff:r,path:a,id:i}:null}function Xu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Nr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xu(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Fm=25,Pm=200,Mm=function(){},km=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function Tm(t){var{editor:e,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=t,i=!1,a=null,o=null,s=null,u=0,c=!1,f=()=>{var R=Jt.get(e);if(Jt.delete(e),R){var{selection:I}=e,j=Yu(e,R);j&&(!I||!q.equals(j,I))&&ee.select(e,j)}},h=()=>{var R=Xt.get(e);if(Xt.delete(e),!!R){if(R.at){var I=Ae.isPoint(R.at)?oa(e,R.at):Yu(e,R.at);if(!I)return;var j=m.range(e,I);(!e.selection||!q.equals(e.selection,j))&&ee.select(e,I)}R.run()}},p=()=>{if(o&&(clearTimeout(o),o=null),s&&(clearTimeout(s),s=null),!O()&&!w()){f();return}i||(i=!0,setTimeout(()=>i=!1)),w()&&(i="action");var R=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Nt.set(e,e.marks),Mm("flush",Xt.get(e),mt.get(e));for(var I=O(),j;j=(N=mt.get(e))===null||N===void 0?void 0:N[0];){var N,X,_=St.get(e);_!==void 0&&(St.delete(e),e.marks=_),_&&c===!1&&(c=null);var $=Am(j);(!e.selection||!q.equals(e.selection,$))&&ee.select(e,$),j.diff.text?m.insertText(e,j.diff.text):m.deleteFragment(e),mt.set(e,(X=mt.get(e))===null||X===void 0?void 0:X.filter(T=>{var{id:Z}=T;return Z!==j.id})),Bm(e,j)||(I=!1,Xt.delete(e),Nt.delete(e),i="action",Jt.delete(e),n.cancel(),r.cancel(),R==null||R.unref())}var re=R==null?void 0:R.unref();if(re&&!Jt.get(e)&&(!e.selection||!q.equals(re,e.selection))&&ee.select(e,re),w()){h();return}I&&n(),n.flush(),r.flush(),f();var k=Nt.get(e);Nt.delete(e),k!==void 0&&(e.marks=k,e.onChange())},g=R=>{a&&clearTimeout(a),a=setTimeout(()=>{vn.set(e,!1),p()},Fm)},C=R=>{vn.set(e,!0),a&&(clearTimeout(a),a=null)},v=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,j=$i.get(e);if(j){if(O()||I){j.style.display="none";return}j.style.removeProperty("display")}},d=(R,I)=>{var j,N=(j=mt.get(e))!==null&&j!==void 0?j:[];mt.set(e,N);var X=ie.leaf(e,R),_=N.findIndex(k=>A.equals(k.path,R));if(_<0){var $=Gu(X.text,I);$&&N.push({path:R,diff:I,id:u++}),v();return}var re=Sm(X.text,N[_].diff,I);if(!re){N.splice(_,1),v();return}N[_]=Nr(Nr({},N[_]),{},{diff:re})},D=function(I){var{at:j}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};c=!1,Jt.delete(e),n.cancel(),r.cancel(),w()&&p(),Xt.set(e,{at:j,run:I}),s=setTimeout(p)},B=R=>{var I;o&&(clearTimeout(o),o=null);var{inputType:j}=R,N=null,X=R.dataTransfer||R.data||void 0;c!==!1&&j!=="insertText"&&j!=="insertCompositionText"&&(c=!1);var[_]=R.getTargetRanges();_&&(N=Y.toSlateRange(e,_,{exactMatch:!1,suppressThrow:!0}));var $=Y.getWindow(e),re=$.getSelection();if(!N&&re&&(_=re,N=Y.toSlateRange(e,re,{exactMatch:!1,suppressThrow:!0})),N=(I=N)!==null&&I!==void 0?I:e.selection,!!N){var k=!0;if(j.startsWith("delete")){if(q.isExpanded(N)){var[T,Z]=q.edges(N),H=ie.leaf(e,T.path);if(H.text.length===T.offset&&Z.offset===0){var Q=m.next(e,{at:T.path,match:ce.isText});Q&&A.equals(Q[1],Z.path)&&(N={anchor:Z,focus:Z})}}var K=j.endsWith("Backward")?"backward":"forward",[y,U]=q.edges(N),[W,M]=m.leaf(e,y.path),J={text:"",start:y.offset,end:U.offset},ne=mt.get(e),G=ne==null?void 0:ne.find(qe=>A.equals(qe.path,M)),ue=G?[G.diff,J]:[J],ae=Zu(W.text,...ue);if(ae.length===0&&(k=!1),q.isExpanded(N)){if(k&&A.equals(N.anchor.path,N.focus.path)){var de={path:N.anchor.path,offset:y.offset},pe=m.range(e,de,de);return S(pe),d(N.anchor.path,{text:"",end:U.offset,start:y.offset})}return D(()=>m.deleteFragment(e,{direction:K}),{at:N})}}switch(j){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return D(()=>m.deleteFragment(e),{at:N});case"deleteContent":case"deleteContentForward":{var{anchor:Ce}=N;if(k&&q.isCollapsed(N)){var ye=ie.leaf(e,Ce.path);if(Ce.offset<ye.text.length)return d(Ce.path,{text:"",start:Ce.offset,end:Ce.offset+1})}return D(()=>m.deleteForward(e),{at:N})}case"deleteContentBackward":{var ge,{anchor:ve}=N,Ie=ia(_)?_.isCollapsed:!!((ge=_)!==null&&ge!==void 0&&ge.collapsed);return k&&Ie&&q.isCollapsed(N)&&ve.offset>0?d(ve.path,{text:"",start:ve.offset-1,end:ve.offset}):D(()=>m.deleteBackward(e),{at:N})}case"deleteEntireSoftLine":return D(()=>{m.deleteBackward(e,{unit:"line"}),m.deleteForward(e,{unit:"line"})},{at:N});case"deleteHardLineBackward":return D(()=>m.deleteBackward(e,{unit:"block"}),{at:N});case"deleteSoftLineBackward":return D(()=>m.deleteBackward(e,{unit:"line"}),{at:N});case"deleteHardLineForward":return D(()=>m.deleteForward(e,{unit:"block"}),{at:N});case"deleteSoftLineForward":return D(()=>m.deleteForward(e,{unit:"line"}),{at:N});case"deleteWordBackward":return D(()=>m.deleteBackward(e,{unit:"word"}),{at:N});case"deleteWordForward":return D(()=>m.deleteForward(e,{unit:"word"}),{at:N});case"insertLineBreak":return D(()=>m.insertSoftBreak(e),{at:N});case"insertParagraph":return D(()=>m.insertBreak(e),{at:N});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(km(X))return D(()=>Y.insertData(e,X),{at:N});var se=X??"";if(St.get(e)&&(se=se.replace("\uFEFF","")),j==="insertText"&&/.*\n.*\n$/.test(se)&&(se=se.slice(0,-1)),se.includes(`
86
+ `)&&f===c.textContent.length&&f--;var B=Y.toSlatePoint(t,[s,u],{exactMatch:a,suppressThrow:i});if(!B)return null;var E=qu(s,c)||s===c&&f<u,O=h?B:Y.toSlatePoint(t,[c,f],{exactMatch:a,suppressThrow:i,searchDirection:E?"forward":"backward"});if(!O)return null;var b={anchor:B,focus:O};return q.isExpanded(b)&&q.isForward(b)&&Lt(c)&&m.void(t,{at:b.focus,mode:"highest"})&&(b=m.unhangRange(t,b,{voids:!0})),b}};function Bm(t,e){var{path:n,diff:r}=e;if(!m.hasPath(t,n))return!1;var a=ae.get(t,n);if(!ce.isText(a))return!1;if(r.start!==a.text.length||r.text.length===0)return a.text.slice(r.start,r.start+r.text.length)===r.text;var i=A.next(n);if(!m.hasPath(t,i))return!1;var o=ae.get(t,i);return ce.isText(o)&&o.text.startsWith(r.text)}function Zu(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.reduce((a,i)=>a.slice(0,i.start)+i.text+a.slice(i.end),t)}function xm(t,e){for(var n=Math.min(t.length,e.length),r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r))return r;return n}function Lm(t,e,n){for(var r=Math.min(t.length,e.length,n),a=0;a<r;a++)if(t.charAt(t.length-a-1)!==e.charAt(e.length-a-1))return a;return r}function Gu(t,e){var{start:n,end:r,text:a}=e,i=t.slice(n,r),o=xm(i,a),s=Math.min(i.length-o,a.length-o),u=Lm(i,a,s),c={start:n+o,end:r-u,text:a.slice(o,a.length-u)};return c.start===c.end&&c.text.length===0?null:c}function Sm(t,e,n){var r=Math.min(e.start,n.start),a=Math.max(0,Math.min(e.start+e.text.length,n.end)-n.start),i=Zu(t,e,n),o=Math.max(n.start+n.text.length,e.start+e.text.length+(e.start+e.text.length>n.start?n.text.length:0)-a),s=i.slice(r,o),u=Math.max(e.end,n.end-e.text.length+(e.end-e.start));return Gu(t,{start:r,end:u,text:s})}function Am(t){var{path:e,diff:n}=t;return{anchor:{path:e,offset:n.start},focus:{path:e,offset:n.end}}}function oi(t,e){var{path:n,offset:r}=e;if(!m.hasPath(t,n))return null;var a=ae.get(t,n);if(!ce.isText(a))return null;var i=m.above(t,{match:s=>le.isElement(s)&&m.isBlock(t,s),at:n});if(!i)return null;for(;r>a.text.length;){var o=m.next(t,{at:n,match:ce.isText});if(!o||!A.isDescendant(o[1],i[1]))return null;r-=a.text.length,a=o[0],n=o[1]}return{path:n,offset:r}}function Yu(t,e){var n=oi(t,e.anchor);if(!n)return null;if(q.isCollapsed(e))return{anchor:n,focus:n};var r=oi(t,e.focus);return r?{anchor:n,focus:r}:null}function si(t,e,n){var r=mt.get(t),a=r==null?void 0:r.find(f=>{var{path:h}=f;return A.equals(h,e.path)});if(!a||e.offset<=a.diff.start)return Ae.transform(e,n,{affinity:"backward"});var{diff:i}=a;if(e.offset<=i.start+i.text.length){var o={path:e.path,offset:i.start},s=Ae.transform(o,n,{affinity:"backward"});return s?{path:s.path,offset:s.offset+e.offset-i.start}:null}var u={path:e.path,offset:e.offset-i.text.length+i.end-i.start},c=Ae.transform(u,n,{affinity:"backward"});return c?n.type==="split_node"&&A.equals(n.path,e.path)&&u.offset<n.position&&i.start<n.position?c:{path:c.path,offset:c.offset+i.text.length-i.end+i.start}:null}function Ku(t,e,n){var r=si(t,e.anchor,n);if(!r)return null;if(q.isCollapsed(e))return{anchor:r,focus:r};var a=si(t,e.focus,n);return a?{anchor:r,focus:a}:null}function Om(t,e){var{path:n,diff:r,id:a}=t;switch(e.type){case"insert_text":return!A.equals(e.path,n)||e.offset>=r.end?t:e.offset<=r.start?{diff:{start:e.text.length+r.start,end:e.text.length+r.end,text:r.text},id:a,path:n}:{diff:{start:r.start,end:r.end+e.text.length,text:r.text},id:a,path:n};case"remove_text":return!A.equals(e.path,n)||e.offset>=r.end?t:e.offset+e.text.length<=r.start?{diff:{start:r.start-e.text.length,end:r.end-e.text.length,text:r.text},id:a,path:n}:{diff:{start:r.start,end:r.end-e.text.length,text:r.text},id:a,path:n};case"split_node":return!A.equals(e.path,n)||e.position>=r.end?{diff:r,id:a,path:A.transform(n,e,{affinity:"backward"})}:e.position>r.start?{diff:{start:r.start,end:Math.min(e.position,r.end),text:r.text},id:a,path:n}:{diff:{start:r.start-e.position,end:r.end-e.position,text:r.text},id:a,path:A.transform(n,e,{affinity:"forward"})};case"merge_node":return A.equals(e.path,n)?{diff:{start:r.start+e.position,end:r.end+e.position,text:r.text},id:a,path:A.transform(n,e)}:{diff:r,id:a,path:A.transform(n,e)}}var i=A.transform(n,e);return i?{diff:r,path:i,id:a}:null}function Xu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Nr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xu(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Fm=25,Pm=200,Mm=function(){},km=t=>(t==null?void 0:t.constructor.name)==="DataTransfer";function Tm(t){var{editor:e,scheduleOnDOMSelectionChange:n,onDOMSelectionChange:r}=t,a=!1,i=null,o=null,s=null,u=0,c=!1,f=()=>{var k=Jt.get(e);if(Jt.delete(e),k){var{selection:I}=e,N=Yu(e,k);N&&(!I||!q.equals(N,I))&&ee.select(e,N)}},h=()=>{var k=Xt.get(e);if(Xt.delete(e),!!k){if(k.at){var I=Ae.isPoint(k.at)?oi(e,k.at):Yu(e,k.at);if(!I)return;var N=m.range(e,I);(!e.selection||!q.equals(e.selection,N))&&ee.select(e,I)}k.run()}},p=()=>{if(o&&(clearTimeout(o),o=null),s&&(clearTimeout(s),s=null),!O()&&!E()){f();return}a||(a=!0,setTimeout(()=>a=!1)),E()&&(a="action");var k=e.selection&&m.rangeRef(e,e.selection,{affinity:"forward"});Nt.set(e,e.marks),Mm("flush",Xt.get(e),mt.get(e));for(var I=O(),N;N=(z=mt.get(e))===null||z===void 0?void 0:z[0];){var z,X,_=St.get(e);_!==void 0&&(St.delete(e),e.marks=_),_&&c===!1&&(c=null);var $=Am(N);(!e.selection||!q.equals(e.selection,$))&&ee.select(e,$),N.diff.text?m.insertText(e,N.diff.text):m.deleteFragment(e),mt.set(e,(X=mt.get(e))===null||X===void 0?void 0:X.filter(R=>{var{id:Z}=R;return Z!==N.id})),Bm(e,N)||(I=!1,Xt.delete(e),Nt.delete(e),a="action",Jt.delete(e),n.cancel(),r.cancel(),k==null||k.unref())}var re=k==null?void 0:k.unref();if(re&&!Jt.get(e)&&(!e.selection||!q.equals(re,e.selection))&&ee.select(e,re),E()){h();return}I&&n(),n.flush(),r.flush(),f();var T=Nt.get(e);Nt.delete(e),T!==void 0&&(e.marks=T,e.onChange())},v=k=>{i&&clearTimeout(i),i=setTimeout(()=>{vn.set(e,!1),p()},Fm)},C=k=>{vn.set(e,!0),i&&(clearTimeout(i),i=null)},g=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,N=$a.get(e);if(N){if(O()||I){N.style.display="none";return}N.style.removeProperty("display")}},d=(k,I)=>{var N,z=(N=mt.get(e))!==null&&N!==void 0?N:[];mt.set(e,z);var X=ae.leaf(e,k),_=z.findIndex(T=>A.equals(T.path,k));if(_<0){var $=Gu(X.text,I);$&&z.push({path:k,diff:I,id:u++}),g();return}var re=Sm(X.text,z[_].diff,I);if(!re){z.splice(_,1),g();return}z[_]=Nr(Nr({},z[_]),{},{diff:re})},D=function(I){var{at:N}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};c=!1,Jt.delete(e),n.cancel(),r.cancel(),E()&&p(),Xt.set(e,{at:N,run:I}),s=setTimeout(p)},B=k=>{var I;o&&(clearTimeout(o),o=null);var{inputType:N}=k,z=null,X=k.dataTransfer||k.data||void 0;c!==!1&&N!=="insertText"&&N!=="insertCompositionText"&&(c=!1);var[_]=k.getTargetRanges();_&&(z=Y.toSlateRange(e,_,{exactMatch:!1,suppressThrow:!0}));var $=Y.getWindow(e),re=$.getSelection();if(!z&&re&&(_=re,z=Y.toSlateRange(e,re,{exactMatch:!1,suppressThrow:!0})),z=(I=z)!==null&&I!==void 0?I:e.selection,!!z){var T=!0;if(N.startsWith("delete")){if(q.isExpanded(z)){var[R,Z]=q.edges(z),H=ae.leaf(e,R.path);if(H.text.length===R.offset&&Z.offset===0){var Q=m.next(e,{at:R.path,match:ce.isText});Q&&A.equals(Q[1],Z.path)&&(z={anchor:Z,focus:Z})}}var K=N.endsWith("Backward")?"backward":"forward",[y,U]=q.edges(z),[W,M]=m.leaf(e,y.path),J={text:"",start:y.offset,end:U.offset},ne=mt.get(e),G=ne==null?void 0:ne.find(qe=>A.equals(qe.path,M)),ue=G?[G.diff,J]:[J],ie=Zu(W.text,...ue);if(ie.length===0&&(T=!1),q.isExpanded(z)){if(T&&A.equals(z.anchor.path,z.focus.path)){var de={path:z.anchor.path,offset:y.offset},pe=m.range(e,de,de);return S(pe),d(z.anchor.path,{text:"",end:U.offset,start:y.offset})}return D(()=>m.deleteFragment(e,{direction:K}),{at:z})}}switch(N){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return D(()=>m.deleteFragment(e),{at:z});case"deleteContent":case"deleteContentForward":{var{anchor:Ce}=z;if(T&&q.isCollapsed(z)){var ye=ae.leaf(e,Ce.path);if(Ce.offset<ye.text.length)return d(Ce.path,{text:"",start:Ce.offset,end:Ce.offset+1})}return D(()=>m.deleteForward(e),{at:z})}case"deleteContentBackward":{var ge,{anchor:ve}=z,Ie=ai(_)?_.isCollapsed:!!((ge=_)!==null&&ge!==void 0&&ge.collapsed);return T&&Ie&&q.isCollapsed(z)&&ve.offset>0?d(ve.path,{text:"",start:ve.offset-1,end:ve.offset}):D(()=>m.deleteBackward(e),{at:z})}case"deleteEntireSoftLine":return D(()=>{m.deleteBackward(e,{unit:"line"}),m.deleteForward(e,{unit:"line"})},{at:z});case"deleteHardLineBackward":return D(()=>m.deleteBackward(e,{unit:"block"}),{at:z});case"deleteSoftLineBackward":return D(()=>m.deleteBackward(e,{unit:"line"}),{at:z});case"deleteHardLineForward":return D(()=>m.deleteForward(e,{unit:"block"}),{at:z});case"deleteSoftLineForward":return D(()=>m.deleteForward(e,{unit:"line"}),{at:z});case"deleteWordBackward":return D(()=>m.deleteBackward(e,{unit:"word"}),{at:z});case"deleteWordForward":return D(()=>m.deleteForward(e,{unit:"word"}),{at:z});case"insertLineBreak":return D(()=>m.insertSoftBreak(e),{at:z});case"insertParagraph":return D(()=>m.insertBreak(e),{at:z});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(km(X))return D(()=>Y.insertData(e,X),{at:z});var se=X??"";if(St.get(e)&&(se=se.replace("\uFEFF","")),N==="insertText"&&/.*\n.*\n$/.test(se)&&(se=se.slice(0,-1)),se.includes(`
87
87
  `))return D(()=>{var qe=se.split(`
88
- `);qe.forEach((Ee,ut)=>{Ee&&m.insertText(e,Ee),ut!==qe.length-1&&m.insertSoftBreak(e)})},{at:N});if(A.equals(N.anchor.path,N.focus.path)){var[Ne,fe]=q.edges(N),we={start:Ne.offset,end:fe.offset,text:se};if(se&&c&&j==="insertCompositionText"){var Me=c.start+c.text.search(/\S|$/),He=we.start+we.text.search(/\S|$/);He===Me+1&&we.end===c.start+c.text.length?(we.start-=1,c=null,P()):c=!1}else j==="insertText"?c===null?c=we:c&&q.isCollapsed(N)&&c.end+c.text.length===Ne.offset?c=Nr(Nr({},c),{},{text:c.text+se}):c=!1:c=!1;if(k){d(Ne.path,we);return}}return D(()=>m.insertText(e,se),{at:N})}}}},w=()=>!!Xt.get(e),O=()=>{var R;return!!((R=mt.get(e))!==null&&R!==void 0&&R.length)},b=()=>w()||O(),E=()=>i,S=R=>{Jt.set(e,R),o&&(clearTimeout(o),o=null);var{selection:I}=e;if(R){var j=!I||!A.equals(I.anchor.path,R.anchor.path),N=!I||!A.equals(I.anchor.path.slice(0,-1),R.anchor.path.slice(0,-1));(j&&c||N)&&(c=!1),(j||O())&&(o=setTimeout(p,Pm))}},F=()=>{(w()||!O())&&p()},V=R=>{O()||(v(!0),setTimeout(v))},P=()=>{w()||(s=setTimeout(p))},z=R=>{if(!(O()||w())&&R.some(j=>aa(e,j,R))){var I;(I=zu.get(e))===null||I===void 0||I()}};return{flush:p,scheduleFlush:P,hasPendingDiffs:O,hasPendingAction:w,hasPendingChanges:b,isFlushing:E,handleUserSelect:S,handleCompositionEnd:g,handleCompositionStart:C,handleDOMBeforeInput:B,handleKeyDown:V,handleDomMutations:z,handleInput:F}}function Rm(){var t=l.useRef(!1);return l.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var $n=Tr?l.useLayoutEffect:l.useEffect;function jm(t,e,n){var[r]=l.useState(()=>new MutationObserver(e));$n(()=>{r.takeRecords()}),l.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(t.current,n),()=>r.disconnect()},[r,t,n])}var Im=["node"];function Ju(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Nm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ju(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ju(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var zm={subtree:!0,childList:!0,characterData:!0},_m=dt?t=>{var{node:e}=t,n=xn(t,Im);if(!dt)return null;var r=Gt(),i=Rm(),[a]=l.useState(()=>Tm(Nm({editor:r},n)));return jm(e,a.handleDomMutations,zm),na.set(r,a.scheduleFlush),i&&a.flush(),a}:()=>null,Wm=["anchor","focus"],Um=["anchor","focus"],Hm=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>e.hasOwnProperty(n)&&t[n]===e[n]),Qu=(t,e)=>{var n=xn(t,Wm),r=xn(e,Um);return t[Sn]===e[Sn]&&Hm(n,r)},Vm=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(!q.equals(r,i)||!Qu(r,i))return!1}return!0},qm=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],i=e[n];if(r.anchor.offset!==i.anchor.offset||r.focus.offset!==i.focus.offset||!Qu(r,i))return!1}return!0};function $u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$u(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$u(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Gm=t=>{var{isLast:e,leaf:n,parent:r,text:i}=t,a=Gt(),o=Y.findPath(a,i),s=A.parent(o),u=!!n[_u];return a.isVoid(r)?l.createElement(ua,{length:ie.string(r).length}):n.text===""&&r.children[r.children.length-1]===i&&!a.isInline(r)&&m.string(a,s)===""?l.createElement(ua,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?l.createElement(ua,{isMarkPlaceholder:u}):e&&n.text.slice(-1)===`
89
- `?l.createElement(el,{isTrailing:!0,text:n.text}):l.createElement(el,{text:n.text})},el=t=>{var{text:e,isTrailing:n=!1}=t,r=l.useRef(null),i=()=>"".concat(e??"").concat(n?`
90
- `:""),[a]=l.useState(i);return $n(()=>{var o=i();r.current&&r.current.textContent!==o&&(r.current.textContent=o)}),l.createElement(Ym,{ref:r},a)},Ym=l.memo(l.forwardRef((t,e)=>l.createElement("span",{"data-slate-string":!0,ref:e},t.children))),ua=t=>{var{length:e=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=t,i={"data-slate-zero-width":n?"n":"z","data-slate-length":e};return r&&(i["data-slate-mark-placeholder"]=!0),l.createElement("span",Zm({},i),!(dt||Ru)||!n?"\uFEFF":null,n?l.createElement("br",null):null)};function tl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function nl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tl(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Km=dt?300:0;function Xm(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function rl(t){t.current&&(clearTimeout(t.current),t.current=null)}var Jm=t=>{var{leaf:e,isLast:n,text:r,parent:i,renderPlaceholder:a,renderLeaf:o=B=>l.createElement($m,nl({},B))}=t,s=Gt(),u=l.useRef(null),c=l.useRef(null),[f,h]=l.useState(!1),p=l.useRef(null),g=l.useCallback(B=>{if(Xm(u,B==null),B==null){var w;$i.delete(s),(w=e.onPlaceholderResize)===null||w===void 0||w.call(e,null)}else{if($i.set(s,B),!u.current){var O=window.ResizeObserver||nm;u.current=new O(()=>{var b;(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,B)})}u.current.observe(B),c.current=B}},[c,e,s]),C=l.createElement(Gm,{isLast:n,leaf:e,parent:i,text:r}),v=!!e[Sn];if(l.useEffect(()=>(v?p.current||(p.current=setTimeout(()=>{h(!0),p.current=null},Km)):(rl(p),h(!1)),()=>rl(p)),[v,h]),v&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:pn?"inherit":void 0},contentEditable:!1,ref:g}};C=l.createElement(l.Fragment,null,a(d),C)}var D={"data-slate-leaf":!0};return o({attributes:D,children:C,leaf:e,text:r})},Qm=l.memo(Jm,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ce.equals(e.leaf,t.leaf)&&e.leaf[Sn]===t.leaf[Sn]),$m=t=>{var{attributes:e,children:n}=t;return l.createElement("span",nl({},e),n)},e0=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:i,renderLeaf:a,text:o}=t,s=Gt(),u=l.useRef(null),c=ce.decorations(o,e),f=Y.findKey(s,o),h=[],p=0;p<c.length;p++){var g=c[p];h.push(l.createElement(Qm,{isLast:n&&p===c.length-1,key:"".concat(f.id,"-").concat(p),renderPlaceholder:i,leaf:g,text:o,parent:r,renderLeaf:a}))}var C=l.useCallback(v=>{var d=Ir.get(s);v?(d==null||d.set(f,v),hn.set(o,v),Xn.set(v,o)):(d==null||d.delete(f),hn.delete(o),u.current&&Xn.delete(u.current)),u.current=v},[u,s,f,o]);return l.createElement("span",{"data-slate-node":"text",ref:C},h)},il=l.memo(e0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&qm(e.decorations,t.decorations));function al(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function la(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?al(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var t0=t=>{var{decorations:e,element:n,renderElement:r=B=>l.createElement(r0,la({},B)),renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=Gt(),u=o0(),c=s.isInline(n),f=Y.findKey(s,n),h=l.useCallback(B=>{var w=Ir.get(s);B?(w==null||w.set(f,B),hn.set(n,B),Xn.set(B,n)):(w==null||w.delete(f),hn.delete(n))},[s,f,n]),p=sl({decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:o}),g={"data-slate-node":"element",ref:h};if(c&&(g["data-slate-inline"]=!0),!c&&m.hasInlines(s,n)){var C=ie.string(n),v=au(C);v==="rtl"&&(g.dir=v)}if(m.isVoid(s,n)){g["data-slate-void"]=!0,!u&&c&&(g.contentEditable=!1);var d=c?"span":"div",[[D]]=ie.texts(n);p=l.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},l.createElement(il,{renderPlaceholder:i,decorations:[],isLast:!1,parent:n,text:D})),Ji.set(D,0),Qi.set(D,n)}return r({attributes:g,children:p,element:n})},n0=l.memo(t0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&Vm(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&q.equals(t.selection,e.selection))),r0=t=>{var{attributes:e,children:n,element:r}=t,i=Gt(),a=i.isInline(r)?"span":"div";return l.createElement(a,la(la({},e),{},{style:{position:"relative"}}),n)},ol=l.createContext(()=>[]),i0=()=>l.useContext(ol),a0=l.createContext(!1),sl=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:o}=t,s=i0(),u=Gt(),c=Y.findPath(u,n),f=[],h=le.isElement(n)&&!u.isInline(n)&&m.hasInlines(u,n),p=0;p<n.children.length;p++){var g=c.concat(p),C=n.children[p],v=Y.findKey(u,C),d=m.range(u,g),D=o&&q.intersection(d,o),B=s([C,g]);for(var w of e){var O=q.intersection(w,d);O&&B.push(O)}le.isElement(C)?f.push(l.createElement(a0.Provider,{key:"provider-".concat(v.id),value:!!D},l.createElement(n0,{decorations:B,element:C,key:v.id,renderElement:r,renderPlaceholder:i,renderLeaf:a,selection:D}))):f.push(l.createElement(il,{decorations:B,key:v.id,isLast:h&&p===n.children.length-1,parent:n,renderPlaceholder:i,renderLeaf:a,text:C})),Ji.set(C,p),Qi.set(C,n)}return f},ul=l.createContext(!1),o0=()=>l.useContext(ul),ll=l.createContext(null),ca=()=>{var t=l.useContext(ll);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function s0(){var t=Gt(),e=l.useRef(!1),n=l.useRef(0),r=l.useCallback(()=>{if(!e.current){e.current=!0;var i=Y.getWindow(t);i.cancelAnimationFrame(n.current),n.current=i.requestAnimationFrame(()=>{e.current=!1})}},[t]);return l.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var u0=3,l0={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},c0={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},f0={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ge=t=>{var e=l0[t],n=c0[t],r=f0[t],i=e&&xi(e),a=n&&xi(n),o=r&&xi(r);return s=>!!(i&&i(s)||ju&&a&&a(s)||!ju&&o&&o(s))},Xe={isBold:Ge("bold"),isCompose:Ge("compose"),isMoveBackward:Ge("moveBackward"),isMoveForward:Ge("moveForward"),isDeleteBackward:Ge("deleteBackward"),isDeleteForward:Ge("deleteForward"),isDeleteLineBackward:Ge("deleteLineBackward"),isDeleteLineForward:Ge("deleteLineForward"),isDeleteWordBackward:Ge("deleteWordBackward"),isDeleteWordForward:Ge("deleteWordForward"),isExtendBackward:Ge("extendBackward"),isExtendForward:Ge("extendForward"),isExtendLineBackward:Ge("extendLineBackward"),isExtendLineForward:Ge("extendLineForward"),isItalic:Ge("italic"),isMoveLineBackward:Ge("moveLineBackward"),isMoveLineForward:Ge("moveLineForward"),isMoveWordBackward:Ge("moveWordBackward"),isMoveWordForward:Ge("moveWordForward"),isRedo:Ge("redo"),isSoftBreak:Ge("insertSoftBreak"),isSplitBlock:Ge("splitBlock"),isTransposeCharacter:Ge("transposeCharacter"),isUndo:Ge("undo")},d0=(t,e)=>{var n=[],r=()=>{n=[]},i=o=>{if(e.current){var s=o.filter(u=>aa(t,u,o));n.push(...s)}};function a(){n.length>0&&(n.reverse().forEach(o=>{o.type!=="characterData"&&(o.removedNodes.forEach(s=>{o.target.insertBefore(s,o.nextSibling)}),o.addedNodes.forEach(s=>{o.target.removeChild(s)}))}),r())}return{registerMutations:i,restoreDOM:a,clear:r}},p0={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class cl extends l.Component{constructor(){super(...arguments),xt(this,"context",null),xt(this,"manager",null),xt(this,"mutationObserver",null)}observe(){var e,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(n.current,p0)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=d0(n,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,n,r,i=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(i!=null&&i.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(i)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}xt(cl,"contextType",Yi);var h0=dt?cl:t=>{var{children:e}=t;return l.createElement(l.Fragment,null,e)},v0=l.createContext(!1),g0=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],m0=["text"];function fl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fl(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var y0=t=>l.createElement(l.Fragment,null,sl(t)),C0=l.forwardRef((t,e)=>{var n=l.useCallback(y=>l.createElement(D0,Pt({},y)),[]),{autoFocus:r,decorate:i=b0,onDOMBeforeInput:a,placeholder:o,readOnly:s=!1,renderElement:u,renderLeaf:c,renderPlaceholder:f=n,scrollSelectionIntoView:h=E0,style:p={},as:g="div",disableDefaultStyles:C=!1}=t,v=xn(t,g0),d=ca(),[D,B]=l.useState(!1),w=l.useRef(null),O=l.useRef([]),[b,E]=l.useState(),S=l.useRef(!1),{onUserInput:F,receivedUserInput:V}=s0(),[,P]=l.useReducer(y=>y+1,0);zu.set(d,P),ea.set(d,s);var z=l.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);l.useEffect(()=>{w.current&&r&&w.current.focus()},[r]);var R=l.useRef(),I=l.useMemo(()=>Mg(()=>{var y=Y.toDOMNode(d,d),U=y.getRootNode();if(!S.current&&pn&&U instanceof ShadowRoot){S.current=!0;var W=Dm();W?document.execCommand("indent"):ee.deselect(d),S.current=!1;return}var M=R.current;if((dt||!Y.isComposing(d))&&(!z.isUpdatingSelection||M!=null&&M.isFlushing())&&!z.isDraggingInternally){var J=Y.findDocumentOrShadowRoot(d),{activeElement:ne}=J,G=Y.toDOMNode(d,d),ue=Qn(J);if(ne===G?(z.latestElement=ne,Kt.set(d,!0)):Kt.delete(d),!ue)return ee.deselect(d);var{anchorNode:ae,focusNode:de}=ue,pe=Y.hasEditableTarget(d,ae)||Y.isTargetInsideNonReadonlyVoid(d,ae),Ce=Y.hasTarget(d,de);if(pe&&Ce){var ye=Y.toSlateRange(d,ue,{exactMatch:!1,suppressThrow:!0});ye&&(!Y.isComposing(d)&&!(M!=null&&M.hasPendingChanges())&&!(M!=null&&M.isFlushing())?ee.select(d,ye):M==null||M.handleUserSelect(ye))}s&&(!pe||!Ce)&&ee.deselect(d)}},100),[d,s,z]),j=l.useMemo(()=>Lg(I,0),[I]);R.current=_m({node:w,onDOMSelectionChange:I,scheduleOnDOMSelectionChange:j}),$n(()=>{var y,U,W;w.current&&(W=ra(w.current))?(Nu.set(d,W),Rr.set(d,w.current),hn.set(d,w.current),Xn.set(w.current,d)):hn.delete(d);var{selection:M}=d,J=Y.findDocumentOrShadowRoot(d),ne=Qn(J);if(!(!ne||!Y.isFocused(d)||(y=R.current)!==null&&y!==void 0&&y.hasPendingAction())){var G=pe=>{var Ce=ne.type!=="None";if(!(!M&&!Ce)){var ye=ne.focusNode,ge;if(Ln&&ne.rangeCount>1){var ve=ne.getRangeAt(0),Ie=ne.getRangeAt(ne.rangeCount-1);ve.startContainer===ye?ge=Ie.endContainer:ge=ve.startContainer}else ge=ne.anchorNode;var se=Rr.get(d),Ne=!1;if(se.contains(ge)&&se.contains(ye)&&(Ne=!0),Ce&&Ne&&M&&!pe){var fe=Y.toSlateRange(d,ne,{exactMatch:!0,suppressThrow:!0});if(fe&&q.equals(fe,M)){var we;if(!z.hasMarkPlaceholder||(we=ge)!==null&&we!==void 0&&(we=we.parentElement)!==null&&we!==void 0&&we.hasAttribute("data-slate-mark-placeholder"))return}}if(M&&!Y.hasRange(d,M)){d.selection=Y.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!0});return}z.isUpdatingSelection=!0;var Me=M&&Y.toDOMRange(d,M);return Me?(Y.isComposing(d)&&!dt?ne.collapseToEnd():q.isBackward(M)?ne.setBaseAndExtent(Me.endContainer,Me.endOffset,Me.startContainer,Me.startOffset):ne.setBaseAndExtent(Me.startContainer,Me.startOffset,Me.endContainer,Me.endOffset),h(d,Me)):ne.removeAllRanges(),Me}};ne.rangeCount<=1&&G();var ue=((U=R.current)===null||U===void 0?void 0:U.isFlushing())==="action";if(!dt||!ue){setTimeout(()=>{z.isUpdatingSelection=!1});return}var ae=null,de=requestAnimationFrame(()=>{if(ue){var pe=Ce=>{try{var ye=Y.toDOMNode(d,d);ye.focus(),G(Ce)}catch{}};pe(),ae=setTimeout(()=>{pe(!0),z.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(de),ae&&clearTimeout(ae)}}});var N=l.useCallback(y=>{var U=Y.toDOMNode(d,d),W=U.getRootNode();if(S!=null&&S.current&&pn&&W instanceof ShadowRoot){var M=y.getTargetRanges(),J=M[0],ne=new window.Range;ne.setStart(J.startContainer,J.startOffset),ne.setEnd(J.endContainer,J.endOffset);var G=Y.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!1});ee.select(d,G),y.preventDefault(),y.stopImmediatePropagation();return}if(F(),!s&&Y.hasEditableTarget(d,y.target)&&!w0(y,a)){var ue;if(R.current)return R.current.handleDOMBeforeInput(y);j.flush(),I.flush();var{selection:ae}=d,{inputType:de}=y,pe=y.dataTransfer||y.data||void 0,Ce=de==="insertCompositionText"||de==="deleteCompositionText";if(Ce&&Y.isComposing(d))return;var ye=!1;if(de==="insertText"&&ae&&q.isCollapsed(ae)&&y.data&&y.data.length===1&&/[a-z ]/i.test(y.data)&&ae.anchor.offset!==0){var ge,ve;ye=!0,d.marks&&(ye=!1);var{anchor:Ie}=ae,[se,Ne]=Y.toDOMPoint(d,Ie),fe=(ge=se.parentElement)===null||ge===void 0?void 0:ge.closest("a"),we=Y.getWindow(d);if(ye&&fe&&Y.hasDOMNode(d,fe)){var Me,He=we==null?void 0:we.document.createTreeWalker(fe,NodeFilter.SHOW_TEXT).lastChild();He===se&&((Me=He.textContent)===null||Me===void 0?void 0:Me.length)===Ne&&(ye=!1)}if(ye&&se.parentElement&&(we==null||(ve=we.getComputedStyle(se.parentElement))===null||ve===void 0?void 0:ve.whiteSpace)==="pre"){var qe=m.above(d,{at:Ie.path,match:wt=>le.isElement(wt)&&m.isBlock(d,wt)});qe&&ie.string(qe[0]).includes(" ")&&(ye=!1)}}if(!de.startsWith("delete")||de.startsWith("deleteBy")){var[Ee]=y.getTargetRanges();if(Ee){var ut=Y.toSlateRange(d,Ee,{exactMatch:!1,suppressThrow:!1});if(!ae||!q.equals(ae,ut)){ye=!1;var at=!Ce&&d.selection&&m.rangeRef(d,d.selection);ee.select(d,ut),at&&Jn.set(d,at)}}}if(Ce)return;if(ye||y.preventDefault(),ae&&q.isExpanded(ae)&&de.startsWith("delete")){var At=de.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:At});return}switch(de){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{m.deleteFragment(d);break}case"deleteContent":case"deleteContentForward":{m.deleteForward(d);break}case"deleteContentBackward":{m.deleteBackward(d);break}case"deleteEntireSoftLine":{m.deleteBackward(d,{unit:"line"}),m.deleteForward(d,{unit:"line"});break}case"deleteHardLineBackward":{m.deleteBackward(d,{unit:"block"});break}case"deleteSoftLineBackward":{m.deleteBackward(d,{unit:"line"});break}case"deleteHardLineForward":{m.deleteForward(d,{unit:"block"});break}case"deleteSoftLineForward":{m.deleteForward(d,{unit:"line"});break}case"deleteWordBackward":{m.deleteBackward(d,{unit:"word"});break}case"deleteWordForward":{m.deleteForward(d,{unit:"word"});break}case"insertLineBreak":m.insertSoftBreak(d);break;case"insertParagraph":{m.insertBreak(d);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{de==="insertFromComposition"&&Y.isComposing(d)&&(B(!1),vn.set(d,!1)),(pe==null?void 0:pe.constructor.name)==="DataTransfer"?Y.insertData(d,pe):typeof pe=="string"&&(ye?O.current.push(()=>m.insertText(d,pe)):m.insertText(d,pe));break}}var ht=(ue=Jn.get(d))===null||ue===void 0?void 0:ue.unref();Jn.delete(d),ht&&(!d.selection||!q.equals(d.selection,ht))&&ee.select(d,ht)}},[d,I,F,a,s,j]),X=l.useCallback(y=>{y==null?(I.cancel(),j.cancel(),Rr.delete(d),hn.delete(d),w.current&&Yt&&w.current.removeEventListener("beforeinput",N)):Yt&&y.addEventListener("beforeinput",N),w.current=y,typeof e=="function"?e(y):e&&(e.current=y)},[I,j,d,N,e]);$n(()=>{var y=Y.getWindow(d);y.document.addEventListener("selectionchange",j);var U=()=>{z.isDraggingInternally=!1};return y.document.addEventListener("dragend",U),y.document.addEventListener("drop",U),()=>{y.document.removeEventListener("selectionchange",j),y.document.removeEventListener("dragend",U),y.document.removeEventListener("drop",U)}},[j,z]);var _=i([d,[]]),$=o&&d.children.length===1&&Array.from(ie.texts(d)).length===1&&ie.string(d)===""&&!D,re=l.useCallback(y=>{if(y&&$){var U;E((U=y.getBoundingClientRect())===null||U===void 0?void 0:U.height)}else E(void 0)},[$]);if($){var k=m.start(d,[]);_.push({[Sn]:!0,placeholder:o,onPlaceholderResize:re,anchor:k,focus:k})}var{marks:T}=d;if(z.hasMarkPlaceholder=!1,d.selection&&q.isCollapsed(d.selection)&&T){var{anchor:Z}=d.selection,H=ie.leaf(d,Z.path),Q=xn(H,m0);if(!ce.equals(H,T,{loose:!0})){z.hasMarkPlaceholder=!0;var K=Object.fromEntries(Object.keys(Q).map(y=>[y,null]));_.push(Pt(Pt(Pt({[_u]:!0},K),T),{},{anchor:Z,focus:Z}))}}return l.useEffect(()=>{setTimeout(()=>{var{selection:y}=d;if(y){var{anchor:U}=y,W=ie.leaf(d,U.path);if(T&&!ce.equals(W,T,{loose:!0})){St.set(d,T);return}}St.delete(d)})}),l.createElement(ul.Provider,{value:s},l.createElement(v0.Provider,{value:D},l.createElement(ol.Provider,{value:i},l.createElement(h0,{node:w,receivedUserInput:V},l.createElement(g,Pt(Pt({role:s?void 0:"textbox","aria-multiline":s?void 0:!0},v),{},{spellCheck:Yt||!Tr?v.spellCheck:!1,autoCorrect:Yt||!Tr?v.autoCorrect:"false",autoCapitalize:Yt||!Tr?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:X,style:Pt(Pt({},C?{}:Pt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},b?{minHeight:b}:{})),p),onBeforeInput:l.useCallback(y=>{if(!Yt&&!s&&!pt(y,v.onBeforeInput)&&Y.hasSelectableTarget(d,y.target)&&(y.preventDefault(),!Y.isComposing(d))){var U=y.data;m.insertText(d,U)}},[v.onBeforeInput,d,s]),onInput:l.useCallback(y=>{if(!pt(y,v.onInput)){if(R.current){R.current.handleInput();return}for(var U of O.current)U();O.current=[]}},[v.onInput]),onBlur:l.useCallback(y=>{if(!(s||z.isUpdatingSelection||!Y.hasSelectableTarget(d,y.target)||pt(y,v.onBlur))){var U=Y.findDocumentOrShadowRoot(d);if(z.latestElement!==U.activeElement){var{relatedTarget:W}=y,M=Y.toDOMNode(d,d);if(W!==M&&!(Lt(W)&&W.hasAttribute("data-slate-spacer"))){if(W!=null&&Qt(W)&&Y.hasDOMNode(d,W)){var J=Y.toSlateNode(d,W);if(le.isElement(J)&&!d.isVoid(J))return}if(pn){var ne=Qn(U);ne==null||ne.removeAllRanges()}Kt.delete(d)}}}},[s,z.isUpdatingSelection,z.latestElement,d,v.onBlur]),onClick:l.useCallback(y=>{if(Y.hasTarget(d,y.target)&&!pt(y,v.onClick)&&Qt(y.target)){var U=Y.toSlateNode(d,y.target),W=Y.findPath(d,U);if(!m.hasPath(d,W)||ie.get(d,W)!==U)return;if(y.detail===u0&&W.length>=1){var M=W;if(!(le.isElement(U)&&m.isBlock(d,U))){var J,ne=m.above(d,{match:ye=>le.isElement(ye)&&m.isBlock(d,ye),at:W});M=(J=ne==null?void 0:ne[1])!==null&&J!==void 0?J:W.slice(0,1)}var G=m.range(d,M);ee.select(d,G);return}if(s)return;var ue=m.start(d,W),ae=m.end(d,W),de=m.void(d,{at:ue}),pe=m.void(d,{at:ae});if(de&&pe&&A.equals(de[1],pe[1])){var Ce=m.range(d,ue);ee.select(d,Ce)}}},[d,v.onClick,s]),onCompositionEnd:l.useCallback(y=>{if(Y.hasSelectableTarget(d,y.target)){var U;if(Y.isComposing(d)&&Promise.resolve().then(()=>{B(!1),vn.set(d,!1)}),(U=R.current)===null||U===void 0||U.handleCompositionEnd(y),pt(y,v.onCompositionEnd)||dt)return;if(!pn&&!lm&&!Ru&&!fm&&!cm&&y.data){var W=St.get(d);St.delete(d),W!==void 0&&(Nt.set(d,d.marks),d.marks=W),m.insertText(d,y.data);var M=Nt.get(d);Nt.delete(d),M!==void 0&&(d.marks=M)}}},[v.onCompositionEnd,d]),onCompositionUpdate:l.useCallback(y=>{Y.hasSelectableTarget(d,y.target)&&!pt(y,v.onCompositionUpdate)&&(Y.isComposing(d)||(B(!0),vn.set(d,!0)))},[v.onCompositionUpdate,d]),onCompositionStart:l.useCallback(y=>{if(Y.hasSelectableTarget(d,y.target)){var U;if((U=R.current)===null||U===void 0||U.handleCompositionStart(y),pt(y,v.onCompositionStart)||dt)return;B(!0);var{selection:W}=d;if(W&&q.isExpanded(W)){m.deleteFragment(d);return}}},[v.onCompositionStart,d]),onCopy:l.useCallback(y=>{Y.hasSelectableTarget(d,y.target)&&!pt(y,v.onCopy)&&!dl(y)&&(y.preventDefault(),Y.setFragmentData(d,y.clipboardData,"copy"))},[v.onCopy,d]),onCut:l.useCallback(y=>{if(!s&&Y.hasSelectableTarget(d,y.target)&&!pt(y,v.onCut)&&!dl(y)){y.preventDefault(),Y.setFragmentData(d,y.clipboardData,"cut");var{selection:U}=d;if(U)if(q.isExpanded(U))m.deleteFragment(d);else{var W=ie.parent(d,U.anchor.path);m.isVoid(d,W)&&ee.delete(d)}}},[s,d,v.onCut]),onDragOver:l.useCallback(y=>{if(Y.hasTarget(d,y.target)&&!pt(y,v.onDragOver)){var U=Y.toSlateNode(d,y.target);le.isElement(U)&&m.isVoid(d,U)&&y.preventDefault()}},[v.onDragOver,d]),onDragStart:l.useCallback(y=>{if(!s&&Y.hasTarget(d,y.target)&&!pt(y,v.onDragStart)){var U=Y.toSlateNode(d,y.target),W=Y.findPath(d,U),M=le.isElement(U)&&m.isVoid(d,U)||m.void(d,{at:W,voids:!0});if(M){var J=m.range(d,W);ee.select(d,J)}z.isDraggingInternally=!0,Y.setFragmentData(d,y.dataTransfer,"drag")}},[s,d,v.onDragStart,z]),onDrop:l.useCallback(y=>{if(!s&&Y.hasTarget(d,y.target)&&!pt(y,v.onDrop)){y.preventDefault();var U=d.selection,W=Y.findEventRange(d,y),M=y.dataTransfer;ee.select(d,W),z.isDraggingInternally&&U&&!q.equals(U,W)&&!m.void(d,{at:W,voids:!0})&&ee.delete(d,{at:U}),Y.insertData(d,M),Y.isFocused(d)||Y.focus(d)}},[s,d,v.onDrop,z]),onDragEnd:l.useCallback(y=>{!s&&z.isDraggingInternally&&v.onDragEnd&&Y.hasTarget(d,y.target)&&v.onDragEnd(y)},[s,z,v,d]),onFocus:l.useCallback(y=>{if(!s&&!z.isUpdatingSelection&&Y.hasEditableTarget(d,y.target)&&!pt(y,v.onFocus)){var U=Y.toDOMNode(d,d),W=Y.findDocumentOrShadowRoot(d);if(z.latestElement=W.activeElement,Ln&&y.target!==U){U.focus();return}Kt.set(d,!0)}},[s,z,d,v.onFocus]),onKeyDown:l.useCallback(y=>{if(!s&&Y.hasEditableTarget(d,y.target)){var U;(U=R.current)===null||U===void 0||U.handleKeyDown(y);var{nativeEvent:W}=y;if(Y.isComposing(d)&&W.isComposing===!1&&(vn.set(d,!1),B(!1)),pt(y,v.onKeyDown)||Y.isComposing(d))return;var{selection:M}=d,J=d.children[M!==null?M.focus.path[0]:0],ne=au(ie.string(J))==="rtl";if(Xe.isRedo(W)){y.preventDefault();var G=d;typeof G.redo=="function"&&G.redo();return}if(Xe.isUndo(W)){y.preventDefault();var ue=d;typeof ue.undo=="function"&&ue.undo();return}if(Xe.isMoveLineBackward(W)){y.preventDefault(),ee.move(d,{unit:"line",reverse:!0});return}if(Xe.isMoveLineForward(W)){y.preventDefault(),ee.move(d,{unit:"line"});return}if(Xe.isExtendLineBackward(W)){y.preventDefault(),ee.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Xe.isExtendLineForward(W)){y.preventDefault(),ee.move(d,{unit:"line",edge:"focus"});return}if(Xe.isMoveBackward(W)){y.preventDefault(),M&&q.isCollapsed(M)?ee.move(d,{reverse:!ne}):ee.collapse(d,{edge:ne?"end":"start"});return}if(Xe.isMoveForward(W)){y.preventDefault(),M&&q.isCollapsed(M)?ee.move(d,{reverse:ne}):ee.collapse(d,{edge:ne?"start":"end"});return}if(Xe.isMoveWordBackward(W)){y.preventDefault(),M&&q.isExpanded(M)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:!ne});return}if(Xe.isMoveWordForward(W)){y.preventDefault(),M&&q.isExpanded(M)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:ne});return}if(Yt){if((Iu||pn)&&M&&(Xe.isDeleteBackward(W)||Xe.isDeleteForward(W))&&q.isCollapsed(M)){var ae=ie.parent(d,M.anchor.path);if(le.isElement(ae)&&m.isVoid(d,ae)&&(m.isInline(d,ae)||m.isBlock(d,ae))){y.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Xe.isBold(W)||Xe.isItalic(W)||Xe.isTransposeCharacter(W)){y.preventDefault();return}if(Xe.isSoftBreak(W)){y.preventDefault(),m.insertSoftBreak(d);return}if(Xe.isSplitBlock(W)){y.preventDefault(),m.insertBreak(d);return}if(Xe.isDeleteBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Xe.isDeleteForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Xe.isDeleteLineBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Xe.isDeleteLineForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Xe.isDeleteWordBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Xe.isDeleteWordForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[s,d,v.onKeyDown]),onPaste:l.useCallback(y=>{!s&&Y.hasEditableTarget(d,y.target)&&!pt(y,v.onPaste)&&(!Yt||hm(y.nativeEvent)||pn)&&(y.preventDefault(),Y.insertData(d,y.clipboardData))},[s,d,v.onPaste])}),l.createElement(y0,{decorations:_,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:c,selection:d.selection}))))))}),D0=t=>{var{attributes:e,children:n}=t;return l.createElement("span",Pt({},e),n,dt&&l.createElement("br",null))},b0=()=>[],E0=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&q.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),Rg(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},pt=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},dl=t=>Qt(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),w0=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},B0=l.createContext(!1),x0=l.createContext({});function L0(t){var e=l.useRef([]).current,n=l.useRef({editor:t}).current,r=l.useCallback(a=>{n.editor=a,e.forEach(o=>o(a))},[e,n]),i=l.useMemo(()=>({getSlate:()=>n.editor,addEventListener:a=>(e.push(a),()=>{e.splice(e.indexOf(a),1)})}),[e,n]);return{selectorContext:i,onChange:r}}var S0=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],A0=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:i,onValueChange:a,initialValue:o}=t,s=xn(t,S0),[u,c]=l.useState(()=>{if(!ie.isNodeList(o))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(st.stringify(o)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(st.stringify(e)));return e.children=o,Object.assign(e,s),{v:0,editor:e}}),{selectorContext:f,onChange:h}=L0(e),p=l.useCallback(v=>{var d;switch(r&&r(e.children),v==null||(d=v.operation)===null||d===void 0?void 0:d.type){case"set_selection":i==null||i(e.selection);break;default:a==null||a(e.children)}c(D=>({v:D.v+1,editor:e})),h(e)},[e,h,r,i,a]);l.useEffect(()=>(ta.set(e,p),()=>{ta.set(e,()=>{})}),[e,p]);var[g,C]=l.useState(Y.isFocused(e));return l.useEffect(()=>{C(Y.isFocused(e))},[e]),$n(()=>{var v=()=>C(Y.isFocused(e));return Tu>=17?(document.addEventListener("focusin",v),document.addEventListener("focusout",v),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",v)}):(document.addEventListener("focus",v,!0),document.addEventListener("blur",v,!0),()=>{document.removeEventListener("focus",v,!0),document.removeEventListener("blur",v,!0)})},[]),l.createElement(x0.Provider,{value:f},l.createElement(ll.Provider,{value:u},l.createElement(Yi.Provider,{value:u.editor},l.createElement(B0.Provider,{value:g},n))))},pl=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},hl=(t,e,n)=>{var r=Y.toDOMRange(t,e).getBoundingClientRect(),i=Y.toDOMRange(t,n).getBoundingClientRect();return pl(r,i)&&pl(i,r)},O0=(t,e)=>{var n=m.range(t,q.end(e)),r=Array.from(m.positions(t,{at:e})),i=0,a=r.length,o=Math.floor(a/2);if(hl(t,m.range(t,r[i]),n))return m.range(t,r[i],n);if(r.length<2)return m.range(t,r[r.length-1],n);for(;o!==r.length&&o!==i;)hl(t,m.range(t,r[o]),n)?a=o:i=o,o=Math.floor((i+a)/2);return m.range(t,r[a],n)};function vl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function gl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vl(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var F0=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:i,onChange:a,deleteBackward:o,addMark:s,removeMark:u}=r;return Ir.set(r,new WeakMap),r.addMark=(c,f)=>{var h,p;(h=na.get(r))===null||h===void 0||h(),!St.get(r)&&(p=mt.get(r))!==null&&p!==void 0&&p.length&&St.set(r,null),Nt.delete(r),s(c,f)},r.removeMark=c=>{var f;!St.get(r)&&(f=mt.get(r))!==null&&f!==void 0&&f.length&&St.set(r,null),Nt.delete(r),u(c)},r.deleteBackward=c=>{if(c!=="line")return o(c);if(r.selection&&q.isCollapsed(r.selection)){var f=m.above(r,{match:C=>le.isElement(C)&&m.isBlock(r,C),at:r.selection});if(f){var[,h]=f,p=m.range(r,h,r.selection.anchor),g=O0(r,p);q.isCollapsed(g)||ee.delete(r,{at:g})}}},r.apply=c=>{var f=[],h=[],p=mt.get(r);if(p!=null&&p.length){var g=p.map(j=>Om(j,c)).filter(Boolean);mt.set(r,g)}var C=Jt.get(r);C&&Jt.set(r,Ku(r,C,c));var v=Xt.get(r);if(v!=null&&v.at){var d=Ae.isPoint(v==null?void 0:v.at)?sa(r,v.at,c):Ku(r,v.at,c);Xt.set(r,d?gl(gl({},v),{},{at:d}):null)}switch(c.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...An(r,c.path));break}case"set_selection":{var D;(D=Jn.get(r))===null||D===void 0||D.unref(),Jn.delete(r);break}case"insert_node":case"remove_node":{f.push(...An(r,A.parent(c.path)));break}case"merge_node":{var B=A.previous(c.path);f.push(...An(r,B));break}case"move_node":{var w=A.common(A.parent(c.path),A.parent(c.newPath));f.push(...An(r,w));var O;A.isBefore(c.path,c.newPath)?(f.push(...An(r,A.parent(c.path))),O=c.newPath):(f.push(...An(r,A.parent(c.newPath))),O=c.path);var b=ie.get(e,A.parent(O)),E=Y.findKey(r,b),S=m.pathRef(r,A.parent(O));h.push([S,E]);break}}i(c);for(var[F,V]of f){var[P]=m.node(r,F);jr.set(P,V)}for(var[z,R]of h)if(z.current){var[I]=m.node(r,z.current);jr.set(I,R)}},r.setFragmentData=c=>{var{selection:f}=r;if(f){var[h,p]=q.edges(f),g=m.void(r,{at:h.path}),C=m.void(r,{at:p.path});if(!(q.isCollapsed(f)&&!g)){var v=Y.toDOMRange(r,f),d=v.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(P=>{P.textContent&&P.textContent.trim()!==""&&(D=P)}),C){var[B]=C,w=v.cloneRange(),O=Y.toDOMNode(r,B);w.setEndAfter(O),d=w.cloneContents()}if(g&&(D=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(P=>{var z=P.getAttribute("data-slate-zero-width")==="n";P.textContent=z?`
91
- `:""}),Uu(D)){var b=D.ownerDocument.createElement("span");b.style.whiteSpace="pre",b.appendChild(D),d.appendChild(b),D=b}var E=r.getFragment(),S=JSON.stringify(E),F=window.btoa(encodeURIComponent(S));D.setAttribute("data-slate-fragment",F),c.setData("application/".concat(n),F);var V=d.ownerDocument.createElement("div");return V.appendChild(d),V.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(V),c.setData("text/html",V.innerHTML),c.setData("text/plain",Vu(V)),d.ownerDocument.body.removeChild(V),c}}},r.insertData=c=>{r.insertFragmentData(c)||r.insertTextData(c)},r.insertFragmentData=c=>{var f=c.getData("application/".concat(n))||Cm(c);if(f){var h=decodeURIComponent(window.atob(f)),p=JSON.parse(h);return r.insertFragment(p),!0}return!1},r.insertTextData=c=>{var f=c.getData("text/plain");if(f){var h=f.split(/\r\n|\r|\n/),p=!1;for(var g of h)p&&ee.splitNodes(r,{always:!0}),r.insertText(g),p=!0;return!0}return!1},r.onChange=c=>{var f=Tu<18?Wt.unstable_batchedUpdates:h=>h();f(()=>{var h=ta.get(r);h&&h(c),a(c)})},r},An=(t,e)=>{var n=[];for(var[r,i]of m.levels(t,{at:e})){var a=Y.findKey(t,r);n.push([i,a])}return n};function ml(t,e,n="type"){const{selection:r}=t;if(!r)return!1;const[i]=Array.from(m.nodes(t,{at:m.unhangRange(t,r),match:a=>!m.isEditor(a)&&le.isElement(a)&&a[n]===e}));return!!i}const yl=["listItem","numberedList"],zr=["left","center","right","justify"];function P0(t,e){const n=zr.includes(e)?"align":"type",r=ml(t,e,n),i=yl.includes(e);ee.unwrapNodes(t,{match:o=>!m.isEditor(o)&&le.isElement(o)&&yl.includes(o.type)&&!zr.includes(e),split:!0});let a;if(zr.includes(e)?a={align:r?void 0:e}:a={type:r?"paragraph":i?"listItem":e},ee.setNodes(t,a),!r&&i){const o={type:e,children:[]};ee.wrapNodes(t,o)}}function gn({format:t,icon:e}){const n=ca(),r=zr.includes(t)?"align":"type",a=ml(n,t,r)?"activeTrue":"activeFalse";function o(s){s.preventDefault(),P0(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+a,onMouseDown:o,children:x.jsx(e,{})})}function M0({attributes:t,children:e,element:n}){const r={textAlign:n.align};switch(n.type){case"blockQuote":return x.jsx("blockquote",{className:"arkynElementBlockquote",style:r,...t,children:e});case"bulletedList":return x.jsx("ul",{className:"arkynElementBulletList",style:r,...t,children:e});case"headingOne":return x.jsx("h1",{className:"arkynElementHeadingOne",style:r,...t,children:e});case"headingTwo":return x.jsx("h2",{className:"arkynElementHeadingTwo",style:r,...t,children:e});case"listItem":return x.jsx("li",{className:"arkynElementListItem",style:r,...t,children:e});case"numberedList":return x.jsx("ol",{className:"arkynElementNumberedList",style:r,...t,children:e});default:return x.jsx("p",{className:"arkynElementParagraph",style:r,...t,children:e})}}function k0({attributes:t,children:e,leaf:n}){return n.bold&&(e=x.jsx("strong",{children:e})),n.code&&(e=x.jsx("code",{children:e})),n.italic&&(e=x.jsx("em",{children:e})),n.underline&&(e=x.jsx("u",{children:e})),x.jsx("span",{...t,children:e})}function Cl(t,e){const n=m.marks(t);return n?n[e]===!0:!1}function Dl(t,e){Cl(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function _r({format:t,icon:e}){const n=ca(),i=Cl(n,t)?"activeTrue":"activeFalse";function a(o){o.preventDefault(),Dl(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+i,onMouseDown:a,children:x.jsx(e,{})})}function T0({children:t}){return x.jsx("div",{className:"arkynRichTextToolbar",children:t})}const bl={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},El=[{type:"paragraph",children:[{text:""}]}];function R0({name:t,defaultValue:e,onValueChange:n,onChange:r,isError:i}){const[a,o]=l.useState(e?JSON.parse(e):El),[s,u]=l.useState(!1),{id:c,inputRef:f,error:h}=Ct(),p=l.useRef(null),g=f||p,C=i||!!h,v=l.useMemo(()=>bv(F0(yv())),[]),d=l.useCallback(k0,[]),D=l.useCallback(M0,[]);function B(E){o(E),r&&r(E),n&&n(JSON.stringify(E))}const b=`arkynRichText ${C?"errorTrue":"errorFalse"} ${s?"focusTrue":"focusFalse"}`;return x.jsxs(A0,{editor:v,initialValue:e?JSON.parse(e):El,onChange:B,onValueChange:B,children:[x.jsxs("div",{className:b,children:[x.jsxs(T0,{children:[x.jsx(gn,{format:"headingOne",icon:Se.Heading1}),x.jsx(gn,{format:"headingTwo",icon:Se.Heading2}),x.jsx(gn,{format:"blockQuote",icon:Se.Quote}),x.jsx(_r,{format:"bold",icon:Se.Bold}),x.jsx(_r,{format:"italic",icon:Se.Italic}),x.jsx(_r,{format:"underline",icon:Se.Underline}),x.jsx(_r,{format:"code",icon:Se.Code}),x.jsx(gn,{format:"left",icon:Se.AlignLeft}),x.jsx(gn,{format:"right",icon:Se.AlignRight}),x.jsx(gn,{format:"center",icon:Se.AlignCenter}),x.jsx(gn,{format:"justify",icon:Se.AlignJustify})]}),x.jsx(C0,{className:"editorContainer",renderElement:D,renderLeaf:d,spellCheck:!0,id:c,onFocus:()=>u(!0),onBlur:()=>u(!1),onKeyDown:E=>{for(const S in bl)if(_d(S,E)){E.preventDefault();const F=bl[S];Dl(v,F)}}})]}),x.jsx("input",{ref:g,type:"hidden",name:t,value:JSON.stringify(a)})]})}function j0(t,e){const{isLoading:n,isError:r,size:i="md",className:a="",variant:o="solid",prefix:s,leftIcon:u,disabled:c,readOnly:f,onFocus:h,onBlur:p,title:g,style:C,closeOnSelect:v=!0,...d}=t,b=`arkyn_select ${s?"hasPrefix":""} ${o} ${i} ${c||f||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${a}`,S={md:20,lg:20}[i];return{isLoading:n,className:b,prefix:zc(s,S,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:h,onBlur:p,title:g,closeOnSelect:v,style:C,iconSize:S,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:S,strokeWidth:2.5}),...d}}function I0(t){var Z;const[e,n]=l.useState(!1),{inputRef:r,id:i,error:a}=Ct(),o=l.useRef(null),s=r||o,u=t.isError||!!a,{disabled:c,title:f,style:h,className:p,prefix:g,iconSize:C,isLoading:v,LeftIcon:d,value:D=null,defaultValue:B="",onFocus:w,onBlur:O,Spinner:b,name:E,placeholder:S,onSelect:F,options:V,optionMaxHeight:P,closeOnSelect:z,...R}=j0({...t,id:i,isError:u},e),[I,j]=l.useState(B);function N(){c||!(s!=null&&s.current)||e||(n(!0),s.current.focus())}function X(H){e||(n(!0),w&&w(H))}function _(){n(!1),O&&s.current&&s.current.blur()}function $(H){const{label:Q,value:K}=H;j(I!==K?K:""),F&&F({label:Q,value:K}),z&&_()}const re=typeof D=="string"?D:I,k=((Z=V.find(H=>H.value===re))==null?void 0:Z.label)||"",T=()=>{if(!e&&k)return!0;if(!e&&!k)return!1;if(e&&k)return!0;if(e&&!k)return!1};return x.jsxs(x.Fragment,{children:[x.jsxs("section",{title:f,style:h,onClick:N,className:`${p} placeholder_dark_${T()}`,children:[g,d&&x.jsx(d,{size:C,strokeWidth:2.5}),x.jsx("input",{disabled:c,readOnly:!0,placeholder:k||S,onFocus:X,...R}),x.jsx("input",{type:"hidden",ref:s,name:E,value:re||"",readOnly:!0}),e&&x.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:P},children:[V.map(({label:H,value:Q})=>x.jsxs("div",{onClick:()=>$({label:H,value:Q}),className:re===Q?"arkyn_select_option active":"arkyn_select_option",children:[H," ",x.jsx(Se.Check,{})]},Q)),V.length<=0&&x.jsx("p",{children:"Sem opções disponíveis"})]}),!v&&x.jsx(Se.ChevronDown,{className:"arkyn_select_arrow",size:C,strokeWidth:2.5}),v&&b]}),e&&x.jsx("aside",{className:"arkyn_select_overlay",onClick:_})]})}function N0(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:i,unCheckedValue:a="",name:o,className:s="",onCheck:u,...c}=t,[f,h]=l.useState(n),{id:p,inputRef:g}=Ct(),C=typeof r=="boolean"?r:f;function v(){h(!f),u&&u(C?a:i||"checked")}const D=`arkynSwitch ${C?"checkedTrue":"checkedFalse"} ${e} ${s}`;return x.jsx("button",{type:"button",onClick:v,className:D,...c,children:x.jsx("input",{id:p,type:"hidden",name:o,ref:g,onClick:v,value:C?i||"checked":a})})}function z0(t){const{variant:e="solid",size:n="md",className:r,disabled:i=!1,readOnly:a=!1,onFocus:o,onBlur:s,title:u,style:c,...f}=t,[h,p]=l.useState(!1),{inputRef:g,id:C,error:v}=Ct(),d=l.useRef(null),D=g||d,w=t.isError||!!v?"errorTrue":"errorFalse",E=`arkynTextarea ${e} ${n} ${i||a?"opacityTrue":"opacityFalse"} ${w} ${h?"focusedTrue":"focusedFalse"} ${r}`;function S(){i||!(D!=null&&D.current)||(p(!0),D.current.focus())}function F(P){p(!0),o&&o(P)}function V(P){p(!1),s&&s(P)}return x.jsx("section",{title:u,style:c,onClick:S,className:E,children:x.jsx("textarea",{id:C,disabled:i,readOnly:a,ref:D,onFocus:F,onBlur:V,...f})})}function _0(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return x.jsx("nav",{className:r,...n})}function W0(t){const{pathname:e}=Dn.useLocation(),{className:n="",disabled:r=!1,children:i,to:a,...o}=t,u=`arkynBreadcrumbLink ${e===a?"active":"inactive"} ${n}`;return r?x.jsxs("p",{className:u,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),i]}):x.jsxs(Dn.Link,{to:a,className:u,...o,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),i]})}function wl(t=""){const e=Dn.useLocation(),n=new URLSearchParams(e.search),r=t?`${t}:`:"",i=a=>{Object.entries(a).forEach(([o,s])=>{s===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(s))})};return{getParam:a=>n.get(`${r}${a}`),getScopedSearch:a=>{i(a);let o=n.toString();return o&&(o="?"+o),o}}}function U0(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:i="page",siblingsCount:a=2,...o}=t,s=Dn.useNavigate(),{getParam:u,getScopedSearch:c}=wl(e),f=Number(u(i))||1,h=Number(u(r))||20,p=Math.ceil(n/h),g=Nc(f,a),C=Ic(f,a,p);function v(d){s(c({page:d}))}return x.jsxs("div",{className:"arkynPagination",...o,children:[x.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>v(f-1),children:x.jsx(Se.ChevronLeft,{})}),f>1+a&&x.jsxs(x.Fragment,{children:[x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(1),children:"1"}),f>2+a&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Se.Ellipsis,{})})]}),g.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),x.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),C.map((d,D)=>x.jsx("button",{onClick:()=>v(d),className:"arkynPaginationPageButton",children:d},D)),f+a<p&&x.jsxs(x.Fragment,{children:[f+1+a<p&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Se.Ellipsis,{})}),x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>v(p),children:p})]}),x.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=p,onClick:()=>v(f+1),children:x.jsx(Se.ChevronRight,{})})]})}const fa=l.createContext({});function H0(){if(!fa)throw new Error("useTabContext must be used within a TabProvider");return l.useContext(fa)}function V0(t){const{children:e,onClick:n,defaultActive:r,className:i,...a}=t,[o,s]=l.useState(r||""),[u,c]=l.useState(!0),f=l.useRef(null),h=`arkynTabContainer ${i||""}`,[p,g]=l.useState({width:"0px",left:"0px",transition:"none"}),C=(d,D)=>{const B=d.getBoundingClientRect(),w=f.current.getBoundingClientRect(),O=D?void 0:"none";c(!1),g({transition:O,width:`${B.width}px`,left:`${B.left-w.left}px`})};l.useEffect(()=>{const d=f.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&C(D)},[]);const v=d=>{const D=d.target;D&&(s(D.value),D.classList.add("activeTrue"),C(D,!0),n&&n(D.value))};return x.jsxs("nav",{ref:f,className:h.trim(),...a,children:[x.jsx(fa.Provider,{value:{handleTabClick:v,showInitialTab:u,value:o},children:e}),x.jsx("div",{className:"activeLine",style:p})]})}function q0(t){const{children:e,className:n="",onClick:r,...i}=t,{value:a,showInitialTab:o,handleTabClick:s}=H0(),u=a===i.value&&a?"activeTrue":"activeFalse",f=`arkynTabButton ${a===i.value&&o?"showBorderBottom":""} ${u} ${n}`;function h(p){s(p),r&&r(p)}return x.jsx("button",{onClick:h,className:f.trim(),...i,children:e})}const Bl=l.createContext({});function Z0(t){const{isVisibled:e,makeInvisible:n,orientation:r="left",children:i,className:a,...o}=t,s=r==="left"?"-100%":"100%",c=`arkynDrawerContainer ${r} ${e?"visibleTrue":"visibleFalse"} ${a}`;return x.jsx(Bl.Provider,{value:{makeInvisible:n},children:x.jsx(nn.AnimatePresence,{children:e&&x.jsxs("aside",{className:c.trim(),...o,children:[x.jsx(nn.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(nn.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${s})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${s})`},children:i})]})})})}function G0(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:a}=l.useContext(Bl),o=`arkynDrawerHeader ${n}`;return x.jsxs("header",{className:o.trim(),...i,children:[r,e&&x.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:a,"aria-label":"Close drawer",children:x.jsx(Se.X,{size:24})})]})}const xl=l.createContext({});function Y0(t){const{isVisibled:e,makeInvisible:n,children:r,className:i="",...a}=t,s=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${i}`;return x.jsx(xl.Provider,{value:{makeInvisible:n},children:x.jsx(nn.AnimatePresence,{children:e&&x.jsxs("aside",{className:s.trim(),...a,children:[x.jsx(nn.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(nn.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function K0(t){const{alignment:e="right",className:n,...r}=t,i=`arkynModalFooter ${e} ${n}`;return x.jsx("footer",{className:i.trim(),...r})}function X0(t){const{showCloseButton:e=!0,className:n,children:r,...i}=t,{makeInvisible:a}=l.useContext(xl),o=`arkynModalHeader ${n}`;return x.jsxs("header",{className:o.trim(),...i,children:[r,e&&x.jsx("button",{type:"button",onClick:a,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:x.jsx(Se.X,{size:24})})]})}function J0(t){const{children:e,button:n,closeOnClick:r,orientation:i="bottomLeft"}=t,[a,o]=l.useState(!1),u=`arkynPopover ${i} ${a?"visibleTrue":"visibleFalse"}`;function c(){a||o(!0)}return x.jsxs("div",{className:u,onClick:c,children:[n,x.jsx(nn.motion.div,{style:{visibility:a?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:a?1:0},exit:{opacity:0},onClick:()=>r&&o(!1),className:"arkynPopoverContent",children:e}),a&&x.jsx("div",{onClick:()=>o(!1),className:"arkynPopoverOverlay"})]})}function Ll(t){const{message:e,title:n,type:r,size:i="lg"}=t,a=`arkynToast ${r} ${i}`;function o(){switch(r){case"info":return x.jsx(Se.Info,{});case"success":return x.jsx(Se.CheckCircle2,{});case"danger":return x.jsx(Se.XCircle,{});case"warning":return x.jsx(Se.AlertCircle,{});default:return x.jsx(Se.Info,{})}}return x.jsxs("aside",{className:a,children:[x.jsxs("div",{children:[x.jsx("div",{className:"bg"}),x.jsx(o,{})]}),x.jsxs("p",{children:[x.jsx("strong",{title:n,children:n}),x.jsx("span",{children:e})]})]})}function Q0(t){const{text:e,size:n="lg",children:r,orientation:i="top",className:a="",...o}=t,s=`arkynTooltip ${n} ${i} ${a}`;return x.jsxs("div",{className:s.trim(),...o,children:[r,x.jsx("div",{className:"arkynTooltipText",children:e})]})}var et={},da={},er={},tr={},Sl="Expected a function",Al=NaN,$0="[object Symbol]",ey=/^\s+|\s+$/g,ty=/^[-+]0x[0-9a-f]+$/i,ny=/^0b[01]+$/i,ry=/^0o[0-7]+$/i,iy=parseInt,ay=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,oy=typeof self=="object"&&self&&self.Object===Object&&self,sy=ay||oy||Function("return this")(),uy=Object.prototype,ly=uy.toString,cy=Math.max,fy=Math.min,pa=function(){return sy.Date.now()};function dy(t,e,n){var r,i,a,o,s,u,c=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Sl);e=Ol(e)||0,Wr(n)&&(f=!!n.leading,h="maxWait"in n,a=h?cy(Ol(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p);function g(E){var S=r,F=i;return r=i=void 0,c=E,o=t.apply(F,S),o}function C(E){return c=E,s=setTimeout(D,e),f?g(E):o}function v(E){var S=E-u,F=E-c,V=e-S;return h?fy(V,a-F):V}function d(E){var S=E-u,F=E-c;return u===void 0||S>=e||S<0||h&&F>=a}function D(){var E=pa();if(d(E))return B(E);s=setTimeout(D,v(E))}function B(E){return s=void 0,p&&r?g(E):(r=i=void 0,o)}function w(){s!==void 0&&clearTimeout(s),c=0,r=u=i=s=void 0}function O(){return s===void 0?o:B(pa())}function b(){var E=pa(),S=d(E);if(r=arguments,i=this,u=E,S){if(s===void 0)return C(u);if(h)return s=setTimeout(D,e),g(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=w,b.flush=O,b}function py(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Sl);return Wr(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),dy(t,e,{leading:r,maxWait:e,trailing:i})}function Wr(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function hy(t){return!!t&&typeof t=="object"}function vy(t){return typeof t=="symbol"||hy(t)&&ly.call(t)==$0}function Ol(t){if(typeof t=="number")return t;if(vy(t))return Al;if(Wr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Wr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(ey,"");var n=ny.test(t);return n||ry.test(t)?iy(t.slice(2),n?2:8):ty.test(t)?Al:+t}var gy=py,nr={};Object.defineProperty(nr,"__esModule",{value:!0}),nr.addPassiveEventListener=function(e,n,r){var i=r.name;i||(i=n,console.warn("Listener must be a named function.")),Ur.has(n)||Ur.set(n,new Set);var a=Ur.get(n);if(!a.has(i)){var o=function(){var s=!1;try{var u=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("test",null,u)}catch{}return s}();e.addEventListener(n,r,o?{passive:!0}:!1),a.add(i)}},nr.removePassiveEventListener=function(e,n,r){e.removeEventListener(n,r),Ur.get(n).delete(r.name||n)};var Ur=new Map;Object.defineProperty(tr,"__esModule",{value:!0});var my=gy,yy=Dy(my),Cy=nr;function Dy(t){return t&&t.__esModule?t:{default:t}}var by=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,yy.default)(e,n)},Je={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=by(function(i){Je.scrollHandler(e)},n);Je.scrollSpyContainers.push(e),(0,Cy.addPassiveEventListener)(e,"scroll",r)}},isMounted:function(e){return Je.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=Je.scrollSpyContainers[Je.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(r){return r(Je.currentPositionX(e),Je.currentPositionY(e))})},addStateHandler:function(e){Je.spySetState.push(e)},addSpyHandler:function(e,n){var r=Je.scrollSpyContainers[Je.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(e),e(Je.currentPositionX(n),Je.currentPositionY(n))},updateStates:function(){Je.spySetState.forEach(function(e){return e()})},unmount:function(e,n){Je.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),Je.spySetState&&Je.spySetState.length&&Je.spySetState.indexOf(e)>-1&&Je.spySetState.splice(Je.spySetState.indexOf(e),1),document.removeEventListener("scroll",Je.scrollHandler)},update:function(){return Je.scrollSpyContainers.forEach(function(e){return Je.scrollHandler(e)})}};tr.default=Je;var On={},rr={};Object.defineProperty(rr,"__esModule",{value:!0});var Ey=function(e,n){var r=e.indexOf("#")===0?e.substring(1):e,i=r?"#"+r:"",a=window&&window.location,o=i?a.pathname+a.search+i:a.pathname+a.search;n?history.pushState(history.state,"",o):history.replaceState(history.state,"",o)},wy=function(){return window.location.hash.replace(/^#/,"")},By=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},xy=function(e){return getComputedStyle(e).position!=="static"},ha=function(e,n){for(var r=e.offsetTop,i=e.offsetParent;i&&!n(i);)r+=i.offsetTop,i=i.offsetParent;return{offsetTop:r,offsetParent:i}},Ly=function(e,n,r){if(r)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(xy(e)){if(n.offsetParent!==e){var i=function(f){return f===e||f===document},a=ha(n,i),o=a.offsetTop,s=a.offsetParent;if(s!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return o}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return ha(n,u).offsetTop-ha(e,u).offsetTop};rr.default={updateHash:Ey,getHash:wy,filterElementInContainer:By,scrollOffset:Ly};var Hr={},va={};Object.defineProperty(va,"__esModule",{value:!0}),va.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var ga={};Object.defineProperty(ga,"__esModule",{value:!0});var Sy=nr,Ay=["mousedown","mousewheel","touchmove","keydown"];ga.default={subscribe:function(e){return typeof document<"u"&&Ay.forEach(function(n){return(0,Sy.addPassiveEventListener)(document,n,e)})}};var ir={};Object.defineProperty(ir,"__esModule",{value:!0});var ma={registered:{},scrollEvent:{register:function(e,n){ma.registered[e]=n},remove:function(e){ma.registered[e]=null}}};ir.default=ma,Object.defineProperty(Hr,"__esModule",{value:!0});var Oy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Fy=rr;Vr(Fy);var Py=va,Fl=Vr(Py),My=ga,ky=Vr(My),Ty=ir,Mt=Vr(Ty);function Vr(t){return t&&t.__esModule?t:{default:t}}var Pl=function(e){return Fl.default[e.smooth]||Fl.default.defaultEasing},Ry=function(e){return typeof e=="function"?e:function(){return e}},jy=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},ya=function(){return jy()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Ml=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},kl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:i?document.documentElement.scrollLeft:document.body.scrollLeft},Tl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var r=window.pageXOffset!==void 0,i=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:i?document.documentElement.scrollTop:document.body.scrollTop},Iy=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var r=document.body,i=document.documentElement;return Math.max(r.scrollWidth,r.offsetWidth,i.clientWidth,i.scrollWidth,i.offsetWidth)},Ny=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var r=document.body,i=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},zy=function t(e,n,r){var i=n.data;if(!n.ignoreCancelEvents&&i.cancel){Mt.default.registered.end&&Mt.default.registered.end(i.to,i.target,i.currentPositionY);return}if(i.delta=Math.round(i.targetPosition-i.startPosition),i.start===null&&(i.start=r),i.progress=r-i.start,i.percent=i.progress>=i.duration?1:e(i.progress/i.duration),i.currentPosition=i.startPosition+Math.ceil(i.delta*i.percent),i.containerElement&&i.containerElement!==document&&i.containerElement!==document.body?n.horizontal?i.containerElement.scrollLeft=i.currentPosition:i.containerElement.scrollTop=i.currentPosition:n.horizontal?window.scrollTo(i.currentPosition,0):window.scrollTo(0,i.currentPosition),i.percent<1){var a=t.bind(null,e,n);ya.call(window,a);return}Mt.default.registered.end&&Mt.default.registered.end(i.to,i.target,i.currentPosition)},Ca=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},ar=function(e,n,r,i){n.data=n.data||Ml(),window.clearTimeout(n.data.delayTimeout);var a=function(){n.data.cancel=!0};if(ky.default.subscribe(a),Ca(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?kl(n):Tl(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Mt.default.registered.end&&Mt.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=Ry(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=r,n.data.target=i;var o=Pl(n),s=zy.bind(null,o,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),ya.call(window,s)},n.delay);return}Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),ya.call(window,s)},qr=function(e){return e=Oy({},e),e.data=e.data||Ml(),e.absolute=!0,e},_y=function(e){ar(0,qr(e))},Wy=function(e,n){ar(e,qr(n))},Uy=function(e){e=qr(e),Ca(e),ar(e.horizontal?Iy(e):Ny(e),e)},Hy=function(e,n){n=qr(n),Ca(n);var r=n.horizontal?kl(n):Tl(n);ar(e+r,n)};Hr.default={animateTopScroll:ar,getAnimationType:Pl,scrollToTop:_y,scrollToBottom:Uy,scrollTo:Wy,scrollMore:Hy},Object.defineProperty(On,"__esModule",{value:!0});var Vy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qy=rr,Zy=Da(qy),Gy=Hr,Yy=Da(Gy),Ky=ir,Zr=Da(Ky);function Da(t){return t&&t.__esModule?t:{default:t}}var Gr={},Rl=void 0;On.default={unmount:function(){Gr={}},register:function(e,n){Gr[e]=n},unregister:function(e){delete Gr[e]},get:function(e){return Gr[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return Rl=e},getActiveLink:function(){return Rl},scrollTo:function(e,n){var r=this.get(e);if(!r){console.warn("target Element not found");return}n=Vy({},n,{absolute:!1});var i=n.containerId,a=n.container,o=void 0;i?o=document.getElementById(i):a&&a.nodeType?o=a:o=document,n.absolute=!0;var s=n.horizontal,u=Zy.default.scrollOffset(o,r,s)+(n.offset||0);if(!n.smooth){Zr.default.registered.begin&&Zr.default.registered.begin(e,r),o===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):o.scrollTop=u,Zr.default.registered.end&&Zr.default.registered.end(e,r);return}Yy.default.animateTopScroll(u,n,e,r)}};var ba={exports:{}},Yr={exports:{}},We={};/** @license React v16.13.1
88
+ `);qe.forEach((Ee,ut)=>{Ee&&m.insertText(e,Ee),ut!==qe.length-1&&m.insertSoftBreak(e)})},{at:z});if(A.equals(z.anchor.path,z.focus.path)){var[Ne,fe]=q.edges(z),we={start:Ne.offset,end:fe.offset,text:se};if(se&&c&&N==="insertCompositionText"){var Me=c.start+c.text.search(/\S|$/),He=we.start+we.text.search(/\S|$/);He===Me+1&&we.end===c.start+c.text.length?(we.start-=1,c=null,F()):c=!1}else N==="insertText"?c===null?c=we:c&&q.isCollapsed(z)&&c.end+c.text.length===Ne.offset?c=Nr(Nr({},c),{},{text:c.text+se}):c=!1:c=!1;if(T){d(Ne.path,we);return}}return D(()=>m.insertText(e,se),{at:z})}}}},E=()=>!!Xt.get(e),O=()=>{var k;return!!((k=mt.get(e))!==null&&k!==void 0&&k.length)},b=()=>E()||O(),w=()=>a,S=k=>{Jt.set(e,k),o&&(clearTimeout(o),o=null);var{selection:I}=e;if(k){var N=!I||!A.equals(I.anchor.path,k.anchor.path),z=!I||!A.equals(I.anchor.path.slice(0,-1),k.anchor.path.slice(0,-1));(N&&c||z)&&(c=!1),(N||O())&&(o=setTimeout(p,Pm))}},P=()=>{(E()||!O())&&p()},V=k=>{O()||(g(!0),setTimeout(g))},F=()=>{E()||(s=setTimeout(p))},j=k=>{if(!(O()||E())&&k.some(N=>ii(e,N,k))){var I;(I=zu.get(e))===null||I===void 0||I()}};return{flush:p,scheduleFlush:F,hasPendingDiffs:O,hasPendingAction:E,hasPendingChanges:b,isFlushing:w,handleUserSelect:S,handleCompositionEnd:v,handleCompositionStart:C,handleDOMBeforeInput:B,handleKeyDown:V,handleDomMutations:j,handleInput:P}}function Rm(){var t=l.useRef(!1);return l.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t.current}var $n=Tr?l.useLayoutEffect:l.useEffect;function jm(t,e,n){var[r]=l.useState(()=>new MutationObserver(e));$n(()=>{r.takeRecords()}),l.useEffect(()=>{if(!t.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return r.observe(t.current,n),()=>r.disconnect()},[r,t,n])}var Im=["node"];function Ju(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Nm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ju(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ju(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var zm={subtree:!0,childList:!0,characterData:!0},_m=dt?t=>{var{node:e}=t,n=xn(t,Im);if(!dt)return null;var r=Gt(),a=Rm(),[i]=l.useState(()=>Tm(Nm({editor:r},n)));return jm(e,i.handleDomMutations,zm),ni.set(r,i.scheduleFlush),a&&i.flush(),i}:()=>null,Wm=["anchor","focus"],Um=["anchor","focus"],Hm=(t,e)=>Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(n=>e.hasOwnProperty(n)&&t[n]===e[n]),Qu=(t,e)=>{var n=xn(t,Wm),r=xn(e,Um);return t[Sn]===e[Sn]&&Hm(n,r)},Vm=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],a=e[n];if(!q.equals(r,a)||!Qu(r,a))return!1}return!0},qm=(t,e)=>{if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var r=t[n],a=e[n];if(r.anchor.offset!==a.anchor.offset||r.focus.offset!==a.focus.offset||!Qu(r,a))return!1}return!0};function $u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Zm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?$u(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$u(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Gm=t=>{var{isLast:e,leaf:n,parent:r,text:a}=t,i=Gt(),o=Y.findPath(i,a),s=A.parent(o),u=!!n[_u];return i.isVoid(r)?l.createElement(ui,{length:ae.string(r).length}):n.text===""&&r.children[r.children.length-1]===a&&!i.isInline(r)&&m.string(i,s)===""?l.createElement(ui,{isLineBreak:!0,isMarkPlaceholder:u}):n.text===""?l.createElement(ui,{isMarkPlaceholder:u}):e&&n.text.slice(-1)===`
89
+ `?l.createElement(el,{isTrailing:!0,text:n.text}):l.createElement(el,{text:n.text})},el=t=>{var{text:e,isTrailing:n=!1}=t,r=l.useRef(null),a=()=>"".concat(e??"").concat(n?`
90
+ `:""),[i]=l.useState(a);return $n(()=>{var o=a();r.current&&r.current.textContent!==o&&(r.current.textContent=o)}),l.createElement(Ym,{ref:r},i)},Ym=l.memo(l.forwardRef((t,e)=>l.createElement("span",{"data-slate-string":!0,ref:e},t.children))),ui=t=>{var{length:e=0,isLineBreak:n=!1,isMarkPlaceholder:r=!1}=t,a={"data-slate-zero-width":n?"n":"z","data-slate-length":e};return r&&(a["data-slate-mark-placeholder"]=!0),l.createElement("span",Zm({},a),!(dt||Ru)||!n?"\uFEFF":null,n?l.createElement("br",null):null)};function tl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function nl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tl(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Km=dt?300:0;function Xm(t,e){t.current&&(t.current.disconnect(),e&&(t.current=null))}function rl(t){t.current&&(clearTimeout(t.current),t.current=null)}var Jm=t=>{var{leaf:e,isLast:n,text:r,parent:a,renderPlaceholder:i,renderLeaf:o=B=>l.createElement($m,nl({},B))}=t,s=Gt(),u=l.useRef(null),c=l.useRef(null),[f,h]=l.useState(!1),p=l.useRef(null),v=l.useCallback(B=>{if(Xm(u,B==null),B==null){var E;$a.delete(s),(E=e.onPlaceholderResize)===null||E===void 0||E.call(e,null)}else{if($a.set(s,B),!u.current){var O=window.ResizeObserver||nm;u.current=new O(()=>{var b;(b=e.onPlaceholderResize)===null||b===void 0||b.call(e,B)})}u.current.observe(B),c.current=B}},[c,e,s]),C=l.createElement(Gm,{isLast:n,leaf:e,parent:a,text:r}),g=!!e[Sn];if(l.useEffect(()=>(g?p.current||(p.current=setTimeout(()=>{h(!0),p.current=null},Km)):(rl(p),h(!1)),()=>rl(p)),[g,h]),g&&f){var d={children:e.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:pn?"inherit":void 0},contentEditable:!1,ref:v}};C=l.createElement(l.Fragment,null,i(d),C)}var D={"data-slate-leaf":!0};return o({attributes:D,children:C,leaf:e,text:r})},Qm=l.memo(Jm,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&ce.equals(e.leaf,t.leaf)&&e.leaf[Sn]===t.leaf[Sn]),$m=t=>{var{attributes:e,children:n}=t;return l.createElement("span",nl({},e),n)},e0=t=>{for(var{decorations:e,isLast:n,parent:r,renderPlaceholder:a,renderLeaf:i,text:o}=t,s=Gt(),u=l.useRef(null),c=ce.decorations(o,e),f=Y.findKey(s,o),h=[],p=0;p<c.length;p++){var v=c[p];h.push(l.createElement(Qm,{isLast:n&&p===c.length-1,key:"".concat(f.id,"-").concat(p),renderPlaceholder:a,leaf:v,text:o,parent:r,renderLeaf:i}))}var C=l.useCallback(g=>{var d=Ir.get(s);g?(d==null||d.set(f,g),hn.set(o,g),Xn.set(g,o)):(d==null||d.delete(f),hn.delete(o),u.current&&Xn.delete(u.current)),u.current=g},[u,s,f,o]);return l.createElement("span",{"data-slate-node":"text",ref:C},h)},al=l.memo(e0,(t,e)=>e.parent===t.parent&&e.isLast===t.isLast&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&e.text===t.text&&qm(e.decorations,t.decorations));function il(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function li(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?il(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):il(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var t0=t=>{var{decorations:e,element:n,renderElement:r=B=>l.createElement(r0,li({},B)),renderPlaceholder:a,renderLeaf:i,selection:o}=t,s=Gt(),u=o0(),c=s.isInline(n),f=Y.findKey(s,n),h=l.useCallback(B=>{var E=Ir.get(s);B?(E==null||E.set(f,B),hn.set(n,B),Xn.set(B,n)):(E==null||E.delete(f),hn.delete(n))},[s,f,n]),p=sl({decorations:e,node:n,renderElement:r,renderPlaceholder:a,renderLeaf:i,selection:o}),v={"data-slate-node":"element",ref:h};if(c&&(v["data-slate-inline"]=!0),!c&&m.hasInlines(s,n)){var C=ae.string(n),g=iu(C);g==="rtl"&&(v.dir=g)}if(m.isVoid(s,n)){v["data-slate-void"]=!0,!u&&c&&(v.contentEditable=!1);var d=c?"span":"div",[[D]]=ae.texts(n);p=l.createElement(d,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},l.createElement(al,{renderPlaceholder:a,decorations:[],isLast:!1,parent:n,text:D})),Ja.set(D,0),Qa.set(D,n)}return r({attributes:v,children:p,element:n})},n0=l.memo(t0,(t,e)=>t.element===e.element&&t.renderElement===e.renderElement&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&Vm(t.decorations,e.decorations)&&(t.selection===e.selection||!!t.selection&&!!e.selection&&q.equals(t.selection,e.selection))),r0=t=>{var{attributes:e,children:n,element:r}=t,a=Gt(),i=a.isInline(r)?"span":"div";return l.createElement(i,li(li({},e),{},{style:{position:"relative"}}),n)},ol=l.createContext(()=>[]),a0=()=>l.useContext(ol),i0=l.createContext(!1),sl=t=>{for(var{decorations:e,node:n,renderElement:r,renderPlaceholder:a,renderLeaf:i,selection:o}=t,s=a0(),u=Gt(),c=Y.findPath(u,n),f=[],h=le.isElement(n)&&!u.isInline(n)&&m.hasInlines(u,n),p=0;p<n.children.length;p++){var v=c.concat(p),C=n.children[p],g=Y.findKey(u,C),d=m.range(u,v),D=o&&q.intersection(d,o),B=s([C,v]);for(var E of e){var O=q.intersection(E,d);O&&B.push(O)}le.isElement(C)?f.push(l.createElement(i0.Provider,{key:"provider-".concat(g.id),value:!!D},l.createElement(n0,{decorations:B,element:C,key:g.id,renderElement:r,renderPlaceholder:a,renderLeaf:i,selection:D}))):f.push(l.createElement(al,{decorations:B,key:g.id,isLast:h&&p===n.children.length-1,parent:n,renderPlaceholder:a,renderLeaf:i,text:C})),Ja.set(C,p),Qa.set(C,n)}return f},ul=l.createContext(!1),o0=()=>l.useContext(ul),ll=l.createContext(null),ci=()=>{var t=l.useContext(ll);if(!t)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:e}=t;return e};function s0(){var t=Gt(),e=l.useRef(!1),n=l.useRef(0),r=l.useCallback(()=>{if(!e.current){e.current=!0;var a=Y.getWindow(t);a.cancelAnimationFrame(n.current),n.current=a.requestAnimationFrame(()=>{e.current=!1})}},[t]);return l.useEffect(()=>()=>cancelAnimationFrame(n.current),[]),{receivedUserInput:e,onUserInput:r}}var u0=3,l0={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},c0={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},f0={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ge=t=>{var e=l0[t],n=c0[t],r=f0[t],a=e&&xa(e),i=n&&xa(n),o=r&&xa(r);return s=>!!(a&&a(s)||ju&&i&&i(s)||!ju&&o&&o(s))},Xe={isBold:Ge("bold"),isCompose:Ge("compose"),isMoveBackward:Ge("moveBackward"),isMoveForward:Ge("moveForward"),isDeleteBackward:Ge("deleteBackward"),isDeleteForward:Ge("deleteForward"),isDeleteLineBackward:Ge("deleteLineBackward"),isDeleteLineForward:Ge("deleteLineForward"),isDeleteWordBackward:Ge("deleteWordBackward"),isDeleteWordForward:Ge("deleteWordForward"),isExtendBackward:Ge("extendBackward"),isExtendForward:Ge("extendForward"),isExtendLineBackward:Ge("extendLineBackward"),isExtendLineForward:Ge("extendLineForward"),isItalic:Ge("italic"),isMoveLineBackward:Ge("moveLineBackward"),isMoveLineForward:Ge("moveLineForward"),isMoveWordBackward:Ge("moveWordBackward"),isMoveWordForward:Ge("moveWordForward"),isRedo:Ge("redo"),isSoftBreak:Ge("insertSoftBreak"),isSplitBlock:Ge("splitBlock"),isTransposeCharacter:Ge("transposeCharacter"),isUndo:Ge("undo")},d0=(t,e)=>{var n=[],r=()=>{n=[]},a=o=>{if(e.current){var s=o.filter(u=>ii(t,u,o));n.push(...s)}};function i(){n.length>0&&(n.reverse().forEach(o=>{o.type!=="characterData"&&(o.removedNodes.forEach(s=>{o.target.insertBefore(s,o.nextSibling)}),o.addedNodes.forEach(s=>{o.target.removeChild(s)}))}),r())}return{registerMutations:a,restoreDOM:i,clear:r}},p0={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class cl extends l.Component{constructor(){super(...arguments),xt(this,"context",null),xt(this,"manager",null),xt(this,"mutationObserver",null)}observe(){var e,{node:n}=this.props;if(!n.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(e=this.mutationObserver)===null||e===void 0||e.observe(n.current,p0)}componentDidMount(){var{receivedUserInput:e}=this.props,n=this.context;this.manager=d0(n,e),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var e,n,r,a=(e=this.mutationObserver)===null||e===void 0?void 0:e.takeRecords();if(a!=null&&a.length){var i;(i=this.manager)===null||i===void 0||i.registerMutations(a)}return(n=this.mutationObserver)===null||n===void 0||n.disconnect(),(r=this.manager)===null||r===void 0||r.restoreDOM(),null}componentDidUpdate(){var e;(e=this.manager)===null||e===void 0||e.clear(),this.observe()}componentWillUnmount(){var e;(e=this.mutationObserver)===null||e===void 0||e.disconnect()}render(){return this.props.children}}xt(cl,"contextType",Ya);var h0=dt?cl:t=>{var{children:e}=t;return l.createElement(l.Fragment,null,e)},v0=l.createContext(!1),g0=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],m0=["text"];function fl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fl(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var y0=t=>l.createElement(l.Fragment,null,sl(t)),C0=l.forwardRef((t,e)=>{var n=l.useCallback(y=>l.createElement(D0,Pt({},y)),[]),{autoFocus:r,decorate:a=b0,onDOMBeforeInput:i,placeholder:o,readOnly:s=!1,renderElement:u,renderLeaf:c,renderPlaceholder:f=n,scrollSelectionIntoView:h=E0,style:p={},as:v="div",disableDefaultStyles:C=!1}=t,g=xn(t,g0),d=ci(),[D,B]=l.useState(!1),E=l.useRef(null),O=l.useRef([]),[b,w]=l.useState(),S=l.useRef(!1),{onUserInput:P,receivedUserInput:V}=s0(),[,F]=l.useReducer(y=>y+1,0);zu.set(d,F),ei.set(d,s);var j=l.useMemo(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);l.useEffect(()=>{E.current&&r&&E.current.focus()},[r]);var k=l.useRef(),I=l.useMemo(()=>Mg(()=>{var y=Y.toDOMNode(d,d),U=y.getRootNode();if(!S.current&&pn&&U instanceof ShadowRoot){S.current=!0;var W=Dm();W?document.execCommand("indent"):ee.deselect(d),S.current=!1;return}var M=k.current;if((dt||!Y.isComposing(d))&&(!j.isUpdatingSelection||M!=null&&M.isFlushing())&&!j.isDraggingInternally){var J=Y.findDocumentOrShadowRoot(d),{activeElement:ne}=J,G=Y.toDOMNode(d,d),ue=Qn(J);if(ne===G?(j.latestElement=ne,Kt.set(d,!0)):Kt.delete(d),!ue)return ee.deselect(d);var{anchorNode:ie,focusNode:de}=ue,pe=Y.hasEditableTarget(d,ie)||Y.isTargetInsideNonReadonlyVoid(d,ie),Ce=Y.hasTarget(d,de);if(pe&&Ce){var ye=Y.toSlateRange(d,ue,{exactMatch:!1,suppressThrow:!0});ye&&(!Y.isComposing(d)&&!(M!=null&&M.hasPendingChanges())&&!(M!=null&&M.isFlushing())?ee.select(d,ye):M==null||M.handleUserSelect(ye))}s&&(!pe||!Ce)&&ee.deselect(d)}},100),[d,s,j]),N=l.useMemo(()=>Lg(I,0),[I]);k.current=_m({node:E,onDOMSelectionChange:I,scheduleOnDOMSelectionChange:N}),$n(()=>{var y,U,W;E.current&&(W=ri(E.current))?(Nu.set(d,W),Rr.set(d,E.current),hn.set(d,E.current),Xn.set(E.current,d)):hn.delete(d);var{selection:M}=d,J=Y.findDocumentOrShadowRoot(d),ne=Qn(J);if(!(!ne||!Y.isFocused(d)||(y=k.current)!==null&&y!==void 0&&y.hasPendingAction())){var G=pe=>{var Ce=ne.type!=="None";if(!(!M&&!Ce)){var ye=ne.focusNode,ge;if(Ln&&ne.rangeCount>1){var ve=ne.getRangeAt(0),Ie=ne.getRangeAt(ne.rangeCount-1);ve.startContainer===ye?ge=Ie.endContainer:ge=ve.startContainer}else ge=ne.anchorNode;var se=Rr.get(d),Ne=!1;if(se.contains(ge)&&se.contains(ye)&&(Ne=!0),Ce&&Ne&&M&&!pe){var fe=Y.toSlateRange(d,ne,{exactMatch:!0,suppressThrow:!0});if(fe&&q.equals(fe,M)){var we;if(!j.hasMarkPlaceholder||(we=ge)!==null&&we!==void 0&&(we=we.parentElement)!==null&&we!==void 0&&we.hasAttribute("data-slate-mark-placeholder"))return}}if(M&&!Y.hasRange(d,M)){d.selection=Y.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!0});return}j.isUpdatingSelection=!0;var Me=M&&Y.toDOMRange(d,M);return Me?(Y.isComposing(d)&&!dt?ne.collapseToEnd():q.isBackward(M)?ne.setBaseAndExtent(Me.endContainer,Me.endOffset,Me.startContainer,Me.startOffset):ne.setBaseAndExtent(Me.startContainer,Me.startOffset,Me.endContainer,Me.endOffset),h(d,Me)):ne.removeAllRanges(),Me}};ne.rangeCount<=1&&G();var ue=((U=k.current)===null||U===void 0?void 0:U.isFlushing())==="action";if(!dt||!ue){setTimeout(()=>{j.isUpdatingSelection=!1});return}var ie=null,de=requestAnimationFrame(()=>{if(ue){var pe=Ce=>{try{var ye=Y.toDOMNode(d,d);ye.focus(),G(Ce)}catch{}};pe(),ie=setTimeout(()=>{pe(!0),j.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(de),ie&&clearTimeout(ie)}}});var z=l.useCallback(y=>{var U=Y.toDOMNode(d,d),W=U.getRootNode();if(S!=null&&S.current&&pn&&W instanceof ShadowRoot){var M=y.getTargetRanges(),J=M[0],ne=new window.Range;ne.setStart(J.startContainer,J.startOffset),ne.setEnd(J.endContainer,J.endOffset);var G=Y.toSlateRange(d,ne,{exactMatch:!1,suppressThrow:!1});ee.select(d,G),y.preventDefault(),y.stopImmediatePropagation();return}if(P(),!s&&Y.hasEditableTarget(d,y.target)&&!w0(y,i)){var ue;if(k.current)return k.current.handleDOMBeforeInput(y);N.flush(),I.flush();var{selection:ie}=d,{inputType:de}=y,pe=y.dataTransfer||y.data||void 0,Ce=de==="insertCompositionText"||de==="deleteCompositionText";if(Ce&&Y.isComposing(d))return;var ye=!1;if(de==="insertText"&&ie&&q.isCollapsed(ie)&&y.data&&y.data.length===1&&/[a-z ]/i.test(y.data)&&ie.anchor.offset!==0){var ge,ve;ye=!0,d.marks&&(ye=!1);var{anchor:Ie}=ie,[se,Ne]=Y.toDOMPoint(d,Ie),fe=(ge=se.parentElement)===null||ge===void 0?void 0:ge.closest("a"),we=Y.getWindow(d);if(ye&&fe&&Y.hasDOMNode(d,fe)){var Me,He=we==null?void 0:we.document.createTreeWalker(fe,NodeFilter.SHOW_TEXT).lastChild();He===se&&((Me=He.textContent)===null||Me===void 0?void 0:Me.length)===Ne&&(ye=!1)}if(ye&&se.parentElement&&(we==null||(ve=we.getComputedStyle(se.parentElement))===null||ve===void 0?void 0:ve.whiteSpace)==="pre"){var qe=m.above(d,{at:Ie.path,match:wt=>le.isElement(wt)&&m.isBlock(d,wt)});qe&&ae.string(qe[0]).includes(" ")&&(ye=!1)}}if(!de.startsWith("delete")||de.startsWith("deleteBy")){var[Ee]=y.getTargetRanges();if(Ee){var ut=Y.toSlateRange(d,Ee,{exactMatch:!1,suppressThrow:!1});if(!ie||!q.equals(ie,ut)){ye=!1;var it=!Ce&&d.selection&&m.rangeRef(d,d.selection);ee.select(d,ut),it&&Jn.set(d,it)}}}if(Ce)return;if(ye||y.preventDefault(),ie&&q.isExpanded(ie)&&de.startsWith("delete")){var At=de.endsWith("Backward")?"backward":"forward";m.deleteFragment(d,{direction:At});return}switch(de){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{m.deleteFragment(d);break}case"deleteContent":case"deleteContentForward":{m.deleteForward(d);break}case"deleteContentBackward":{m.deleteBackward(d);break}case"deleteEntireSoftLine":{m.deleteBackward(d,{unit:"line"}),m.deleteForward(d,{unit:"line"});break}case"deleteHardLineBackward":{m.deleteBackward(d,{unit:"block"});break}case"deleteSoftLineBackward":{m.deleteBackward(d,{unit:"line"});break}case"deleteHardLineForward":{m.deleteForward(d,{unit:"block"});break}case"deleteSoftLineForward":{m.deleteForward(d,{unit:"line"});break}case"deleteWordBackward":{m.deleteBackward(d,{unit:"word"});break}case"deleteWordForward":{m.deleteForward(d,{unit:"word"});break}case"insertLineBreak":m.insertSoftBreak(d);break;case"insertParagraph":{m.insertBreak(d);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{de==="insertFromComposition"&&Y.isComposing(d)&&(B(!1),vn.set(d,!1)),(pe==null?void 0:pe.constructor.name)==="DataTransfer"?Y.insertData(d,pe):typeof pe=="string"&&(ye?O.current.push(()=>m.insertText(d,pe)):m.insertText(d,pe));break}}var ht=(ue=Jn.get(d))===null||ue===void 0?void 0:ue.unref();Jn.delete(d),ht&&(!d.selection||!q.equals(d.selection,ht))&&ee.select(d,ht)}},[d,I,P,i,s,N]),X=l.useCallback(y=>{y==null?(I.cancel(),N.cancel(),Rr.delete(d),hn.delete(d),E.current&&Yt&&E.current.removeEventListener("beforeinput",z)):Yt&&y.addEventListener("beforeinput",z),E.current=y,typeof e=="function"?e(y):e&&(e.current=y)},[I,N,d,z,e]);$n(()=>{var y=Y.getWindow(d);y.document.addEventListener("selectionchange",N);var U=()=>{j.isDraggingInternally=!1};return y.document.addEventListener("dragend",U),y.document.addEventListener("drop",U),()=>{y.document.removeEventListener("selectionchange",N),y.document.removeEventListener("dragend",U),y.document.removeEventListener("drop",U)}},[N,j]);var _=a([d,[]]),$=o&&d.children.length===1&&Array.from(ae.texts(d)).length===1&&ae.string(d)===""&&!D,re=l.useCallback(y=>{if(y&&$){var U;w((U=y.getBoundingClientRect())===null||U===void 0?void 0:U.height)}else w(void 0)},[$]);if($){var T=m.start(d,[]);_.push({[Sn]:!0,placeholder:o,onPlaceholderResize:re,anchor:T,focus:T})}var{marks:R}=d;if(j.hasMarkPlaceholder=!1,d.selection&&q.isCollapsed(d.selection)&&R){var{anchor:Z}=d.selection,H=ae.leaf(d,Z.path),Q=xn(H,m0);if(!ce.equals(H,R,{loose:!0})){j.hasMarkPlaceholder=!0;var K=Object.fromEntries(Object.keys(Q).map(y=>[y,null]));_.push(Pt(Pt(Pt({[_u]:!0},K),R),{},{anchor:Z,focus:Z}))}}return l.useEffect(()=>{setTimeout(()=>{var{selection:y}=d;if(y){var{anchor:U}=y,W=ae.leaf(d,U.path);if(R&&!ce.equals(W,R,{loose:!0})){St.set(d,R);return}}St.delete(d)})}),l.createElement(ul.Provider,{value:s},l.createElement(v0.Provider,{value:D},l.createElement(ol.Provider,{value:a},l.createElement(h0,{node:E,receivedUserInput:V},l.createElement(v,Pt(Pt({role:s?void 0:"textbox","aria-multiline":s?void 0:!0},g),{},{spellCheck:Yt||!Tr?g.spellCheck:!1,autoCorrect:Yt||!Tr?g.autoCorrect:"false",autoCapitalize:Yt||!Tr?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!s,zindex:-1,suppressContentEditableWarning:!0,ref:X,style:Pt(Pt({},C?{}:Pt({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},b?{minHeight:b}:{})),p),onBeforeInput:l.useCallback(y=>{if(!Yt&&!s&&!pt(y,g.onBeforeInput)&&Y.hasSelectableTarget(d,y.target)&&(y.preventDefault(),!Y.isComposing(d))){var U=y.data;m.insertText(d,U)}},[g.onBeforeInput,d,s]),onInput:l.useCallback(y=>{if(!pt(y,g.onInput)){if(k.current){k.current.handleInput();return}for(var U of O.current)U();O.current=[]}},[g.onInput]),onBlur:l.useCallback(y=>{if(!(s||j.isUpdatingSelection||!Y.hasSelectableTarget(d,y.target)||pt(y,g.onBlur))){var U=Y.findDocumentOrShadowRoot(d);if(j.latestElement!==U.activeElement){var{relatedTarget:W}=y,M=Y.toDOMNode(d,d);if(W!==M&&!(Lt(W)&&W.hasAttribute("data-slate-spacer"))){if(W!=null&&Qt(W)&&Y.hasDOMNode(d,W)){var J=Y.toSlateNode(d,W);if(le.isElement(J)&&!d.isVoid(J))return}if(pn){var ne=Qn(U);ne==null||ne.removeAllRanges()}Kt.delete(d)}}}},[s,j.isUpdatingSelection,j.latestElement,d,g.onBlur]),onClick:l.useCallback(y=>{if(Y.hasTarget(d,y.target)&&!pt(y,g.onClick)&&Qt(y.target)){var U=Y.toSlateNode(d,y.target),W=Y.findPath(d,U);if(!m.hasPath(d,W)||ae.get(d,W)!==U)return;if(y.detail===u0&&W.length>=1){var M=W;if(!(le.isElement(U)&&m.isBlock(d,U))){var J,ne=m.above(d,{match:ye=>le.isElement(ye)&&m.isBlock(d,ye),at:W});M=(J=ne==null?void 0:ne[1])!==null&&J!==void 0?J:W.slice(0,1)}var G=m.range(d,M);ee.select(d,G);return}if(s)return;var ue=m.start(d,W),ie=m.end(d,W),de=m.void(d,{at:ue}),pe=m.void(d,{at:ie});if(de&&pe&&A.equals(de[1],pe[1])){var Ce=m.range(d,ue);ee.select(d,Ce)}}},[d,g.onClick,s]),onCompositionEnd:l.useCallback(y=>{if(Y.hasSelectableTarget(d,y.target)){var U;if(Y.isComposing(d)&&Promise.resolve().then(()=>{B(!1),vn.set(d,!1)}),(U=k.current)===null||U===void 0||U.handleCompositionEnd(y),pt(y,g.onCompositionEnd)||dt)return;if(!pn&&!lm&&!Ru&&!fm&&!cm&&y.data){var W=St.get(d);St.delete(d),W!==void 0&&(Nt.set(d,d.marks),d.marks=W),m.insertText(d,y.data);var M=Nt.get(d);Nt.delete(d),M!==void 0&&(d.marks=M)}}},[g.onCompositionEnd,d]),onCompositionUpdate:l.useCallback(y=>{Y.hasSelectableTarget(d,y.target)&&!pt(y,g.onCompositionUpdate)&&(Y.isComposing(d)||(B(!0),vn.set(d,!0)))},[g.onCompositionUpdate,d]),onCompositionStart:l.useCallback(y=>{if(Y.hasSelectableTarget(d,y.target)){var U;if((U=k.current)===null||U===void 0||U.handleCompositionStart(y),pt(y,g.onCompositionStart)||dt)return;B(!0);var{selection:W}=d;if(W&&q.isExpanded(W)){m.deleteFragment(d);return}}},[g.onCompositionStart,d]),onCopy:l.useCallback(y=>{Y.hasSelectableTarget(d,y.target)&&!pt(y,g.onCopy)&&!dl(y)&&(y.preventDefault(),Y.setFragmentData(d,y.clipboardData,"copy"))},[g.onCopy,d]),onCut:l.useCallback(y=>{if(!s&&Y.hasSelectableTarget(d,y.target)&&!pt(y,g.onCut)&&!dl(y)){y.preventDefault(),Y.setFragmentData(d,y.clipboardData,"cut");var{selection:U}=d;if(U)if(q.isExpanded(U))m.deleteFragment(d);else{var W=ae.parent(d,U.anchor.path);m.isVoid(d,W)&&ee.delete(d)}}},[s,d,g.onCut]),onDragOver:l.useCallback(y=>{if(Y.hasTarget(d,y.target)&&!pt(y,g.onDragOver)){var U=Y.toSlateNode(d,y.target);le.isElement(U)&&m.isVoid(d,U)&&y.preventDefault()}},[g.onDragOver,d]),onDragStart:l.useCallback(y=>{if(!s&&Y.hasTarget(d,y.target)&&!pt(y,g.onDragStart)){var U=Y.toSlateNode(d,y.target),W=Y.findPath(d,U),M=le.isElement(U)&&m.isVoid(d,U)||m.void(d,{at:W,voids:!0});if(M){var J=m.range(d,W);ee.select(d,J)}j.isDraggingInternally=!0,Y.setFragmentData(d,y.dataTransfer,"drag")}},[s,d,g.onDragStart,j]),onDrop:l.useCallback(y=>{if(!s&&Y.hasTarget(d,y.target)&&!pt(y,g.onDrop)){y.preventDefault();var U=d.selection,W=Y.findEventRange(d,y),M=y.dataTransfer;ee.select(d,W),j.isDraggingInternally&&U&&!q.equals(U,W)&&!m.void(d,{at:W,voids:!0})&&ee.delete(d,{at:U}),Y.insertData(d,M),Y.isFocused(d)||Y.focus(d)}},[s,d,g.onDrop,j]),onDragEnd:l.useCallback(y=>{!s&&j.isDraggingInternally&&g.onDragEnd&&Y.hasTarget(d,y.target)&&g.onDragEnd(y)},[s,j,g,d]),onFocus:l.useCallback(y=>{if(!s&&!j.isUpdatingSelection&&Y.hasEditableTarget(d,y.target)&&!pt(y,g.onFocus)){var U=Y.toDOMNode(d,d),W=Y.findDocumentOrShadowRoot(d);if(j.latestElement=W.activeElement,Ln&&y.target!==U){U.focus();return}Kt.set(d,!0)}},[s,j,d,g.onFocus]),onKeyDown:l.useCallback(y=>{if(!s&&Y.hasEditableTarget(d,y.target)){var U;(U=k.current)===null||U===void 0||U.handleKeyDown(y);var{nativeEvent:W}=y;if(Y.isComposing(d)&&W.isComposing===!1&&(vn.set(d,!1),B(!1)),pt(y,g.onKeyDown)||Y.isComposing(d))return;var{selection:M}=d,J=d.children[M!==null?M.focus.path[0]:0],ne=iu(ae.string(J))==="rtl";if(Xe.isRedo(W)){y.preventDefault();var G=d;typeof G.redo=="function"&&G.redo();return}if(Xe.isUndo(W)){y.preventDefault();var ue=d;typeof ue.undo=="function"&&ue.undo();return}if(Xe.isMoveLineBackward(W)){y.preventDefault(),ee.move(d,{unit:"line",reverse:!0});return}if(Xe.isMoveLineForward(W)){y.preventDefault(),ee.move(d,{unit:"line"});return}if(Xe.isExtendLineBackward(W)){y.preventDefault(),ee.move(d,{unit:"line",edge:"focus",reverse:!0});return}if(Xe.isExtendLineForward(W)){y.preventDefault(),ee.move(d,{unit:"line",edge:"focus"});return}if(Xe.isMoveBackward(W)){y.preventDefault(),M&&q.isCollapsed(M)?ee.move(d,{reverse:!ne}):ee.collapse(d,{edge:ne?"end":"start"});return}if(Xe.isMoveForward(W)){y.preventDefault(),M&&q.isCollapsed(M)?ee.move(d,{reverse:ne}):ee.collapse(d,{edge:ne?"start":"end"});return}if(Xe.isMoveWordBackward(W)){y.preventDefault(),M&&q.isExpanded(M)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:!ne});return}if(Xe.isMoveWordForward(W)){y.preventDefault(),M&&q.isExpanded(M)&&ee.collapse(d,{edge:"focus"}),ee.move(d,{unit:"word",reverse:ne});return}if(Yt){if((Iu||pn)&&M&&(Xe.isDeleteBackward(W)||Xe.isDeleteForward(W))&&q.isCollapsed(M)){var ie=ae.parent(d,M.anchor.path);if(le.isElement(ie)&&m.isVoid(d,ie)&&(m.isInline(d,ie)||m.isBlock(d,ie))){y.preventDefault(),m.deleteBackward(d,{unit:"block"});return}}}else{if(Xe.isBold(W)||Xe.isItalic(W)||Xe.isTransposeCharacter(W)){y.preventDefault();return}if(Xe.isSoftBreak(W)){y.preventDefault(),m.insertSoftBreak(d);return}if(Xe.isSplitBlock(W)){y.preventDefault(),m.insertBreak(d);return}if(Xe.isDeleteBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d);return}if(Xe.isDeleteForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d);return}if(Xe.isDeleteLineBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"line"});return}if(Xe.isDeleteLineForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"line"});return}if(Xe.isDeleteWordBackward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"backward"}):m.deleteBackward(d,{unit:"word"});return}if(Xe.isDeleteWordForward(W)){y.preventDefault(),M&&q.isExpanded(M)?m.deleteFragment(d,{direction:"forward"}):m.deleteForward(d,{unit:"word"});return}}}},[s,d,g.onKeyDown]),onPaste:l.useCallback(y=>{!s&&Y.hasEditableTarget(d,y.target)&&!pt(y,g.onPaste)&&(!Yt||hm(y.nativeEvent)||pn)&&(y.preventDefault(),Y.insertData(d,y.clipboardData))},[s,d,g.onPaste])}),l.createElement(y0,{decorations:_,node:d,renderElement:u,renderPlaceholder:f,renderLeaf:c,selection:d.selection}))))))}),D0=t=>{var{attributes:e,children:n}=t;return l.createElement("span",Pt({},e),n,dt&&l.createElement("br",null))},b0=()=>[],E0=(t,e)=>{if(e.getBoundingClientRect&&(!t.selection||t.selection&&q.isCollapsed(t.selection))){var n=e.startContainer.parentElement;n.getBoundingClientRect=e.getBoundingClientRect.bind(e),Rg(n,{scrollMode:"if-needed"}),delete n.getBoundingClientRect}},pt=(t,e)=>{if(!e)return!1;var n=e(t);return n??(t.isDefaultPrevented()||t.isPropagationStopped())},dl=t=>Qt(t.target)&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement),w0=(t,e)=>{if(!e)return!1;var n=e(t);return n??t.defaultPrevented},B0=l.createContext(!1),x0=l.createContext({});function L0(t){var e=l.useRef([]).current,n=l.useRef({editor:t}).current,r=l.useCallback(i=>{n.editor=i,e.forEach(o=>o(i))},[e,n]),a=l.useMemo(()=>({getSlate:()=>n.editor,addEventListener:i=>(e.push(i),()=>{e.splice(e.indexOf(i),1)})}),[e,n]);return{selectorContext:a,onChange:r}}var S0=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],A0=t=>{var{editor:e,children:n,onChange:r,onSelectionChange:a,onValueChange:i,initialValue:o}=t,s=xn(t,S0),[u,c]=l.useState(()=>{if(!ae.isNodeList(o))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(st.stringify(o)));if(!m.isEditor(e))throw new Error("[Slate] editor is invalid! You passed: ".concat(st.stringify(e)));return e.children=o,Object.assign(e,s),{v:0,editor:e}}),{selectorContext:f,onChange:h}=L0(e),p=l.useCallback(g=>{var d;switch(r&&r(e.children),g==null||(d=g.operation)===null||d===void 0?void 0:d.type){case"set_selection":a==null||a(e.selection);break;default:i==null||i(e.children)}c(D=>({v:D.v+1,editor:e})),h(e)},[e,h,r,a,i]);l.useEffect(()=>(ti.set(e,p),()=>{ti.set(e,()=>{})}),[e,p]);var[v,C]=l.useState(Y.isFocused(e));return l.useEffect(()=>{C(Y.isFocused(e))},[e]),$n(()=>{var g=()=>C(Y.isFocused(e));return Tu>=17?(document.addEventListener("focusin",g),document.addEventListener("focusout",g),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",g)}):(document.addEventListener("focus",g,!0),document.addEventListener("blur",g,!0),()=>{document.removeEventListener("focus",g,!0),document.removeEventListener("blur",g,!0)})},[]),l.createElement(x0.Provider,{value:f},l.createElement(ll.Provider,{value:u},l.createElement(Ya.Provider,{value:u.editor},l.createElement(B0.Provider,{value:v},n))))},pl=(t,e)=>{var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},hl=(t,e,n)=>{var r=Y.toDOMRange(t,e).getBoundingClientRect(),a=Y.toDOMRange(t,n).getBoundingClientRect();return pl(r,a)&&pl(a,r)},O0=(t,e)=>{var n=m.range(t,q.end(e)),r=Array.from(m.positions(t,{at:e})),a=0,i=r.length,o=Math.floor(i/2);if(hl(t,m.range(t,r[a]),n))return m.range(t,r[a],n);if(r.length<2)return m.range(t,r[r.length-1],n);for(;o!==r.length&&o!==a;)hl(t,m.range(t,r[o]),n)?i=o:a=o,o=Math.floor((a+i)/2);return m.range(t,r[i],n)};function vl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function gl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vl(Object(n),!0).forEach(function(r){xt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var F0=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:a,onChange:i,deleteBackward:o,addMark:s,removeMark:u}=r;return Ir.set(r,new WeakMap),r.addMark=(c,f)=>{var h,p;(h=ni.get(r))===null||h===void 0||h(),!St.get(r)&&(p=mt.get(r))!==null&&p!==void 0&&p.length&&St.set(r,null),Nt.delete(r),s(c,f)},r.removeMark=c=>{var f;!St.get(r)&&(f=mt.get(r))!==null&&f!==void 0&&f.length&&St.set(r,null),Nt.delete(r),u(c)},r.deleteBackward=c=>{if(c!=="line")return o(c);if(r.selection&&q.isCollapsed(r.selection)){var f=m.above(r,{match:C=>le.isElement(C)&&m.isBlock(r,C),at:r.selection});if(f){var[,h]=f,p=m.range(r,h,r.selection.anchor),v=O0(r,p);q.isCollapsed(v)||ee.delete(r,{at:v})}}},r.apply=c=>{var f=[],h=[],p=mt.get(r);if(p!=null&&p.length){var v=p.map(N=>Om(N,c)).filter(Boolean);mt.set(r,v)}var C=Jt.get(r);C&&Jt.set(r,Ku(r,C,c));var g=Xt.get(r);if(g!=null&&g.at){var d=Ae.isPoint(g==null?void 0:g.at)?si(r,g.at,c):Ku(r,g.at,c);Xt.set(r,d?gl(gl({},g),{},{at:d}):null)}switch(c.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{f.push(...An(r,c.path));break}case"set_selection":{var D;(D=Jn.get(r))===null||D===void 0||D.unref(),Jn.delete(r);break}case"insert_node":case"remove_node":{f.push(...An(r,A.parent(c.path)));break}case"merge_node":{var B=A.previous(c.path);f.push(...An(r,B));break}case"move_node":{var E=A.common(A.parent(c.path),A.parent(c.newPath));f.push(...An(r,E));var O;A.isBefore(c.path,c.newPath)?(f.push(...An(r,A.parent(c.path))),O=c.newPath):(f.push(...An(r,A.parent(c.newPath))),O=c.path);var b=ae.get(e,A.parent(O)),w=Y.findKey(r,b),S=m.pathRef(r,A.parent(O));h.push([S,w]);break}}a(c);for(var[P,V]of f){var[F]=m.node(r,P);jr.set(F,V)}for(var[j,k]of h)if(j.current){var[I]=m.node(r,j.current);jr.set(I,k)}},r.setFragmentData=c=>{var{selection:f}=r;if(f){var[h,p]=q.edges(f),v=m.void(r,{at:h.path}),C=m.void(r,{at:p.path});if(!(q.isCollapsed(f)&&!v)){var g=Y.toDOMRange(r,f),d=g.cloneContents(),D=d.childNodes[0];if(d.childNodes.forEach(F=>{F.textContent&&F.textContent.trim()!==""&&(D=F)}),C){var[B]=C,E=g.cloneRange(),O=Y.toDOMNode(r,B);E.setEndAfter(O),d=E.cloneContents()}if(v&&(D=d.querySelector("[data-slate-spacer]")),Array.from(d.querySelectorAll("[data-slate-zero-width]")).forEach(F=>{var j=F.getAttribute("data-slate-zero-width")==="n";F.textContent=j?`
91
+ `:""}),Uu(D)){var b=D.ownerDocument.createElement("span");b.style.whiteSpace="pre",b.appendChild(D),d.appendChild(b),D=b}var w=r.getFragment(),S=JSON.stringify(w),P=window.btoa(encodeURIComponent(S));D.setAttribute("data-slate-fragment",P),c.setData("application/".concat(n),P);var V=d.ownerDocument.createElement("div");return V.appendChild(d),V.setAttribute("hidden","true"),d.ownerDocument.body.appendChild(V),c.setData("text/html",V.innerHTML),c.setData("text/plain",Vu(V)),d.ownerDocument.body.removeChild(V),c}}},r.insertData=c=>{r.insertFragmentData(c)||r.insertTextData(c)},r.insertFragmentData=c=>{var f=c.getData("application/".concat(n))||Cm(c);if(f){var h=decodeURIComponent(window.atob(f)),p=JSON.parse(h);return r.insertFragment(p),!0}return!1},r.insertTextData=c=>{var f=c.getData("text/plain");if(f){var h=f.split(/\r\n|\r|\n/),p=!1;for(var v of h)p&&ee.splitNodes(r,{always:!0}),r.insertText(v),p=!0;return!0}return!1},r.onChange=c=>{var f=Tu<18?Wt.unstable_batchedUpdates:h=>h();f(()=>{var h=ti.get(r);h&&h(c),i(c)})},r},An=(t,e)=>{var n=[];for(var[r,a]of m.levels(t,{at:e})){var i=Y.findKey(t,r);n.push([a,i])}return n};function ml(t,e,n="type"){const{selection:r}=t;if(!r)return!1;const[a]=Array.from(m.nodes(t,{at:m.unhangRange(t,r),match:i=>!m.isEditor(i)&&le.isElement(i)&&i[n]===e}));return!!a}const yl=["listItem","numberedList"],zr=["left","center","right","justify"];function P0(t,e){const n=zr.includes(e)?"align":"type",r=ml(t,e,n),a=yl.includes(e);ee.unwrapNodes(t,{match:o=>!m.isEditor(o)&&le.isElement(o)&&yl.includes(o.type)&&!zr.includes(e),split:!0});let i;if(zr.includes(e)?i={align:r?void 0:e}:i={type:r?"paragraph":a?"listItem":e},ee.setNodes(t,i),!r&&a){const o={type:e,children:[]};ee.wrapNodes(t,o)}}function gn({format:t,icon:e}){const n=ci(),r=zr.includes(t)?"align":"type",i=ml(n,t,r)?"activeTrue":"activeFalse";function o(s){s.preventDefault(),P0(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextBlockButton "+i,onMouseDown:o,children:x.jsx(e,{})})}function M0({attributes:t,children:e,element:n}){const r={textAlign:n.align};switch(n.type){case"blockQuote":return x.jsx("blockquote",{className:"arkynElementBlockquote",style:r,...t,children:e});case"bulletedList":return x.jsx("ul",{className:"arkynElementBulletList",style:r,...t,children:e});case"headingOne":return x.jsx("h1",{className:"arkynElementHeadingOne",style:r,...t,children:e});case"headingTwo":return x.jsx("h2",{className:"arkynElementHeadingTwo",style:r,...t,children:e});case"listItem":return x.jsx("li",{className:"arkynElementListItem",style:r,...t,children:e});case"numberedList":return x.jsx("ol",{className:"arkynElementNumberedList",style:r,...t,children:e});default:return x.jsx("p",{className:"arkynElementParagraph",style:r,...t,children:e})}}function k0({attributes:t,children:e,leaf:n}){return n.bold&&(e=x.jsx("strong",{children:e})),n.code&&(e=x.jsx("code",{children:e})),n.italic&&(e=x.jsx("em",{children:e})),n.underline&&(e=x.jsx("u",{children:e})),x.jsx("span",{...t,children:e})}function Cl(t,e){const n=m.marks(t);return n?n[e]===!0:!1}function Dl(t,e){Cl(t,e)?m.removeMark(t,e):m.addMark(t,e,!0)}function _r({format:t,icon:e}){const n=ci(),a=Cl(n,t)?"activeTrue":"activeFalse";function i(o){o.preventDefault(),Dl(n,t)}return x.jsx("button",{type:"button",className:"arkynRichTextMarkButton "+a,onMouseDown:i,children:x.jsx(e,{})})}function T0({children:t}){return x.jsx("div",{className:"arkynRichTextToolbar",children:t})}const bl={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},El=[{type:"paragraph",children:[{text:""}]}];function R0({name:t,defaultValue:e,maxLimit:n=2e3,onValueChange:r,onChange:a,isError:i}){const[o,s]=l.useState(0),[u,c]=l.useState(e?JSON.parse(e):El),[f,h]=l.useState(!1),{id:p,inputRef:v,error:C}=Ct(),g=l.useRef(null),d=v||g,D=i||!!C,B=l.useMemo(()=>bv(F0(yv())),[]),E=l.useCallback(k0,[]),O=l.useCallback(M0,[]);function b(j){return j.map(k=>ae.string(k)).join("")}function w(j){const k=b(j);k.length>n||(s(k.length),r&&r(k),c(j),a&&a(j))}const V=`arkynRichText ${D||n===o?"errorTrue":"errorFalse"} ${f?"focusTrue":"focusFalse"}`,F=n-o;return x.jsxs(A0,{editor:B,initialValue:e?JSON.parse(e):El,onChange:w,onValueChange:w,children:[x.jsxs("div",{className:V,children:[x.jsxs(T0,{children:[x.jsx(gn,{format:"headingOne",icon:Se.Heading1}),x.jsx(gn,{format:"headingTwo",icon:Se.Heading2}),x.jsx(gn,{format:"blockQuote",icon:Se.Quote}),x.jsx(_r,{format:"bold",icon:Se.Bold}),x.jsx(_r,{format:"italic",icon:Se.Italic}),x.jsx(_r,{format:"underline",icon:Se.Underline}),x.jsx(_r,{format:"code",icon:Se.Code}),x.jsx(gn,{format:"left",icon:Se.AlignLeft}),x.jsx(gn,{format:"right",icon:Se.AlignRight}),x.jsx(gn,{format:"center",icon:Se.AlignCenter}),x.jsx(gn,{format:"justify",icon:Se.AlignJustify})]}),x.jsx(C0,{className:"editorContainer",renderElement:O,renderLeaf:E,spellCheck:!0,id:p,onFocus:()=>h(!0),onBlur:()=>h(!1),onKeyDown:j=>{for(const k in bl)if(_d(k,j)){j.preventDefault();const I=bl[k];Dl(B,I)}}}),F<=0&&x.jsx("div",{className:"restatesCharacters",children:F})]}),x.jsx("input",{ref:d,type:"hidden",name:t,value:JSON.stringify(u)})]})}function j0(t,e){const{isLoading:n,isError:r,size:a="md",className:i="",variant:o="solid",prefix:s,leftIcon:u,disabled:c,readOnly:f,onFocus:h,onBlur:p,title:v,style:C,closeOnSelect:g=!0,...d}=t,b=`arkyn_select ${s?"hasPrefix":""} ${o} ${a} ${c||f||n?"opacity":""} ${r?"errored":""} ${e?"focused":""} ${i}`,S={md:20,lg:20}[a];return{isLoading:n,className:b,prefix:zc(s,S,"prefix"),LeftIcon:u,disabled:c||n||f,onFocus:h,onBlur:p,title:v,closeOnSelect:g,style:C,iconSize:S,Spinner:x.jsx(Se.Loader2,{className:"spinner",size:S,strokeWidth:2.5}),...d}}function I0(t){var Z;const[e,n]=l.useState(!1),{inputRef:r,id:a,error:i}=Ct(),o=l.useRef(null),s=r||o,u=t.isError||!!i,{disabled:c,title:f,style:h,className:p,prefix:v,iconSize:C,isLoading:g,LeftIcon:d,value:D=null,defaultValue:B="",onFocus:E,onBlur:O,Spinner:b,name:w,placeholder:S,onSelect:P,options:V,optionMaxHeight:F,closeOnSelect:j,...k}=j0({...t,id:a,isError:u},e),[I,N]=l.useState(B);function z(){c||!(s!=null&&s.current)||e||(n(!0),s.current.focus())}function X(H){e||(n(!0),E&&E(H))}function _(){n(!1),O&&s.current&&s.current.blur()}function $(H){const{label:Q,value:K}=H;N(I!==K?K:""),P&&P({label:Q,value:K}),j&&_()}const re=typeof D=="string"?D:I,T=((Z=V.find(H=>H.value===re))==null?void 0:Z.label)||"",R=()=>{if(!e&&T)return!0;if(!e&&!T)return!1;if(e&&T)return!0;if(e&&!T)return!1};return x.jsxs(x.Fragment,{children:[x.jsxs("section",{title:f,style:h,onClick:z,className:`${p} placeholder_dark_${R()}`,children:[v,d&&x.jsx(d,{size:C,strokeWidth:2.5}),x.jsx("input",{disabled:c,readOnly:!0,placeholder:T||S,onFocus:X,...k}),x.jsx("input",{type:"hidden",ref:s,name:w,value:re||"",readOnly:!0}),e&&x.jsxs("div",{className:"arkyn_select_content",style:{overflow:"auto",maxHeight:F},children:[V.map(({label:H,value:Q})=>x.jsxs("div",{onClick:()=>$({label:H,value:Q}),className:re===Q?"arkyn_select_option active":"arkyn_select_option",children:[H," ",x.jsx(Se.Check,{})]},Q)),V.length<=0&&x.jsx("p",{children:"Sem opções disponíveis"})]}),!g&&x.jsx(Se.ChevronDown,{className:"arkyn_select_arrow",size:C,strokeWidth:2.5}),g&&b]}),e&&x.jsx("aside",{className:"arkyn_select_overlay",onClick:_})]})}function N0(t){const{size:e="lg",defaultChecked:n=!1,checked:r=null,value:a,unCheckedValue:i="",name:o,className:s="",onCheck:u,...c}=t,[f,h]=l.useState(n),{id:p,inputRef:v}=Ct(),C=typeof r=="boolean"?r:f;function g(){h(!f),u&&u(C?i:a||"checked")}const D=`arkynSwitch ${C?"checkedTrue":"checkedFalse"} ${e} ${s}`;return x.jsx("button",{type:"button",onClick:g,className:D,...c,children:x.jsx("input",{id:p,type:"hidden",name:o,ref:v,onClick:g,value:C?a||"checked":i})})}function z0(t){const{variant:e="solid",size:n="md",className:r,disabled:a=!1,readOnly:i=!1,onFocus:o,onBlur:s,title:u,style:c,...f}=t,[h,p]=l.useState(!1),{inputRef:v,id:C,error:g}=Ct(),d=l.useRef(null),D=v||d,E=t.isError||!!g?"errorTrue":"errorFalse",w=`arkynTextarea ${e} ${n} ${a||i?"opacityTrue":"opacityFalse"} ${E} ${h?"focusedTrue":"focusedFalse"} ${r}`;function S(){a||!(D!=null&&D.current)||(p(!0),D.current.focus())}function P(F){p(!0),o&&o(F)}function V(F){p(!1),s&&s(F)}return x.jsx("section",{title:u,style:c,onClick:S,className:w,children:x.jsx("textarea",{id:C,disabled:a,readOnly:i,ref:D,onFocus:P,onBlur:V,...f})})}function _0(t){const{className:e="",...n}=t,r=`arkynBreadcrumbContainer ${e}`;return x.jsx("nav",{className:r,...n})}function W0(t){const{pathname:e}=Dn.useLocation(),{className:n="",disabled:r=!1,children:a,to:i,...o}=t,u=`arkynBreadcrumbLink ${e===i?"active":"inactive"} ${n}`;return r?x.jsxs("p",{className:u,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),a]}):x.jsxs(Dn.Link,{to:i,className:u,...o,children:[x.jsx(Se.ChevronRight,{size:14,strokeWidth:2.5}),a]})}function wl(t=""){const e=Dn.useLocation(),n=new URLSearchParams(e.search),r=t?`${t}:`:"",a=i=>{Object.entries(i).forEach(([o,s])=>{s===void 0?n.delete(`${r}${o}`):n.set(`${r}${o}`,String(s))})};return{getParam:i=>n.get(`${r}${i}`),getScopedSearch:i=>{a(i);let o=n.toString();return o&&(o="?"+o),o}}}function U0(t){const{scope:e,totalCountRegisters:n,perPageKey:r="per_page",pageKey:a="page",siblingsCount:i=2,...o}=t,s=Dn.useNavigate(),{getParam:u,getScopedSearch:c}=wl(e),f=Number(u(a))||1,h=Number(u(r))||20,p=Math.ceil(n/h),v=Nc(f,i),C=Ic(f,i,p);function g(d){s(c({page:d}))}return x.jsxs("div",{className:"arkynPagination",...o,children:[x.jsx("button",{className:"arkynPaginationIconButton",disabled:f<=1,onClick:()=>g(f-1),children:x.jsx(Se.ChevronLeft,{})}),f>1+i&&x.jsxs(x.Fragment,{children:[x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>g(1),children:"1"}),f>2+i&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Se.Ellipsis,{})})]}),v.map((d,D)=>x.jsx("button",{onClick:()=>g(d),className:"arkynPaginationPageButton",children:d},D)),x.jsx("button",{className:"arkynPaginationCurrent",disabled:!0,children:f}),C.map((d,D)=>x.jsx("button",{onClick:()=>g(d),className:"arkynPaginationPageButton",children:d},D)),f+i<p&&x.jsxs(x.Fragment,{children:[f+1+i<p&&x.jsx("button",{disabled:!0,className:"arkynPaginationSpread",children:x.jsx(Se.Ellipsis,{})}),x.jsx("button",{className:"arkynPaginationPageButton",onClick:()=>g(p),children:p})]}),x.jsx("button",{className:"arkynPaginationIconButton",disabled:f>=p,onClick:()=>g(f+1),children:x.jsx(Se.ChevronRight,{})})]})}const fi=l.createContext({});function H0(){if(!fi)throw new Error("useTabContext must be used within a TabProvider");return l.useContext(fi)}function V0(t){const{children:e,onClick:n,defaultActive:r,className:a,...i}=t,[o,s]=l.useState(r||""),[u,c]=l.useState(!0),f=l.useRef(null),h=`arkynTabContainer ${a||""}`,[p,v]=l.useState({width:"0px",left:"0px",transition:"none"}),C=(d,D)=>{const B=d.getBoundingClientRect(),E=f.current.getBoundingClientRect(),O=D?void 0:"none";c(!1),v({transition:O,width:`${B.width}px`,left:`${B.left-E.left}px`})};l.useEffect(()=>{const d=f.current;if(!d)return;let D=null;D=d.querySelector("button.activeTrue"),D&&C(D)},[]);const g=d=>{const D=d.target;D&&(s(D.value),D.classList.add("activeTrue"),C(D,!0),n&&n(D.value))};return x.jsxs("nav",{ref:f,className:h.trim(),...i,children:[x.jsx(fi.Provider,{value:{handleTabClick:g,showInitialTab:u,value:o},children:e}),x.jsx("div",{className:"activeLine",style:p})]})}function q0(t){const{children:e,className:n="",onClick:r,...a}=t,{value:i,showInitialTab:o,handleTabClick:s}=H0(),u=i===a.value&&i?"activeTrue":"activeFalse",f=`arkynTabButton ${i===a.value&&o?"showBorderBottom":""} ${u} ${n}`;function h(p){s(p),r&&r(p)}return x.jsx("button",{onClick:h,className:f.trim(),...a,children:e})}const Bl=l.createContext({});function Z0(t){const{isVisibled:e,makeInvisible:n,orientation:r="left",children:a,className:i,...o}=t,s=r==="left"?"-100%":"100%",c=`arkynDrawerContainer ${r} ${e?"visibleTrue":"visibleFalse"} ${i}`;return x.jsx(Bl.Provider,{value:{makeInvisible:n},children:x.jsx(nn.AnimatePresence,{children:e&&x.jsxs("aside",{className:c.trim(),...o,children:[x.jsx(nn.motion.div,{className:"arkynDrawerContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(nn.motion.div,{className:"arkynDrawerContainerContent",transition:{ease:"easeOut",duration:.15},initial:{transform:`translateX(${s})`},animate:{transform:"translateX(0px)"},exit:{transform:`translateX(${s})`},children:a})]})})})}function G0(t){const{showCloseButton:e=!0,className:n,children:r,...a}=t,{makeInvisible:i}=l.useContext(Bl),o=`arkynDrawerHeader ${n}`;return x.jsxs("header",{className:o.trim(),...a,children:[r,e&&x.jsx("button",{className:"arkynDrawerHeaderCloseButton",type:"button",onClick:i,"aria-label":"Close drawer",children:x.jsx(Se.X,{size:24})})]})}const xl=l.createContext({});function Y0(t){const{isVisibled:e,makeInvisible:n,children:r,className:a="",...i}=t,s=`arkynModalContainer ${e?"visibleTrue":"visibleFalse"} ${a}`;return x.jsx(xl.Provider,{value:{makeInvisible:n},children:x.jsx(nn.AnimatePresence,{children:e&&x.jsxs("aside",{className:s.trim(),...i,children:[x.jsx(nn.motion.div,{className:"arkynModalContainerOverlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:n}),x.jsx(nn.motion.div,{className:"arkynModalContainerContent",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:r})]})})})}function K0(t){const{alignment:e="right",className:n,...r}=t,a=`arkynModalFooter ${e} ${n}`;return x.jsx("footer",{className:a.trim(),...r})}function X0(t){const{showCloseButton:e=!0,className:n,children:r,...a}=t,{makeInvisible:i}=l.useContext(xl),o=`arkynModalHeader ${n}`;return x.jsxs("header",{className:o.trim(),...a,children:[r,e&&x.jsx("button",{type:"button",onClick:i,"aria-label":"Close modal button",className:"arkynModalHeaderCloseButton",children:x.jsx(Se.X,{size:24})})]})}function J0(t){const{children:e,button:n,closeOnClick:r,orientation:a="bottomLeft"}=t,[i,o]=l.useState(!1),u=`arkynPopover ${a} ${i?"visibleTrue":"visibleFalse"}`;function c(){i||o(!0)}return x.jsxs("div",{className:u,onClick:c,children:[n,x.jsx(nn.motion.div,{style:{visibility:i?"visible":"hidden"},transition:{ease:"easeOut",duration:0},initial:{opacity:0},animate:{opacity:i?1:0},exit:{opacity:0},onClick:()=>r&&o(!1),className:"arkynPopoverContent",children:e}),i&&x.jsx("div",{onClick:()=>o(!1),className:"arkynPopoverOverlay"})]})}function Ll(t){const{message:e,title:n,type:r,size:a="lg"}=t,i=`arkynToast ${r} ${a}`;function o(){switch(r){case"info":return x.jsx(Se.Info,{});case"success":return x.jsx(Se.CheckCircle2,{});case"danger":return x.jsx(Se.XCircle,{});case"warning":return x.jsx(Se.AlertCircle,{});default:return x.jsx(Se.Info,{})}}return x.jsxs("aside",{className:i,children:[x.jsxs("div",{children:[x.jsx("div",{className:"bg"}),x.jsx(o,{})]}),x.jsxs("p",{children:[x.jsx("strong",{title:n,children:n}),x.jsx("span",{children:e})]})]})}function Q0(t){const{text:e,size:n="lg",children:r,orientation:a="top",className:i="",...o}=t,s=`arkynTooltip ${n} ${a} ${i}`;return x.jsxs("div",{className:s.trim(),...o,children:[r,x.jsx("div",{className:"arkynTooltipText",children:e})]})}var et={},di={},er={},tr={},Sl="Expected a function",Al=NaN,$0="[object Symbol]",ey=/^\s+|\s+$/g,ty=/^[-+]0x[0-9a-f]+$/i,ny=/^0b[01]+$/i,ry=/^0o[0-7]+$/i,ay=parseInt,iy=typeof Ut=="object"&&Ut&&Ut.Object===Object&&Ut,oy=typeof self=="object"&&self&&self.Object===Object&&self,sy=iy||oy||Function("return this")(),uy=Object.prototype,ly=uy.toString,cy=Math.max,fy=Math.min,pi=function(){return sy.Date.now()};function dy(t,e,n){var r,a,i,o,s,u,c=0,f=!1,h=!1,p=!0;if(typeof t!="function")throw new TypeError(Sl);e=Ol(e)||0,Wr(n)&&(f=!!n.leading,h="maxWait"in n,i=h?cy(Ol(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p);function v(w){var S=r,P=a;return r=a=void 0,c=w,o=t.apply(P,S),o}function C(w){return c=w,s=setTimeout(D,e),f?v(w):o}function g(w){var S=w-u,P=w-c,V=e-S;return h?fy(V,i-P):V}function d(w){var S=w-u,P=w-c;return u===void 0||S>=e||S<0||h&&P>=i}function D(){var w=pi();if(d(w))return B(w);s=setTimeout(D,g(w))}function B(w){return s=void 0,p&&r?v(w):(r=a=void 0,o)}function E(){s!==void 0&&clearTimeout(s),c=0,r=u=a=s=void 0}function O(){return s===void 0?o:B(pi())}function b(){var w=pi(),S=d(w);if(r=arguments,a=this,u=w,S){if(s===void 0)return C(u);if(h)return s=setTimeout(D,e),v(u)}return s===void 0&&(s=setTimeout(D,e)),o}return b.cancel=E,b.flush=O,b}function py(t,e,n){var r=!0,a=!0;if(typeof t!="function")throw new TypeError(Sl);return Wr(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),dy(t,e,{leading:r,maxWait:e,trailing:a})}function Wr(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function hy(t){return!!t&&typeof t=="object"}function vy(t){return typeof t=="symbol"||hy(t)&&ly.call(t)==$0}function Ol(t){if(typeof t=="number")return t;if(vy(t))return Al;if(Wr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Wr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(ey,"");var n=ny.test(t);return n||ry.test(t)?ay(t.slice(2),n?2:8):ty.test(t)?Al:+t}var gy=py,nr={};Object.defineProperty(nr,"__esModule",{value:!0}),nr.addPassiveEventListener=function(e,n,r){var a=r.name;a||(a=n,console.warn("Listener must be a named function.")),Ur.has(n)||Ur.set(n,new Set);var i=Ur.get(n);if(!i.has(a)){var o=function(){var s=!1;try{var u=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("test",null,u)}catch{}return s}();e.addEventListener(n,r,o?{passive:!0}:!1),i.add(a)}},nr.removePassiveEventListener=function(e,n,r){e.removeEventListener(n,r),Ur.get(n).delete(r.name||n)};var Ur=new Map;Object.defineProperty(tr,"__esModule",{value:!0});var my=gy,yy=Dy(my),Cy=nr;function Dy(t){return t&&t.__esModule?t:{default:t}}var by=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:66;return(0,yy.default)(e,n)},Je={spyCallbacks:[],spySetState:[],scrollSpyContainers:[],mount:function(e,n){if(e){var r=by(function(a){Je.scrollHandler(e)},n);Je.scrollSpyContainers.push(e),(0,Cy.addPassiveEventListener)(e,"scroll",r)}},isMounted:function(e){return Je.scrollSpyContainers.indexOf(e)!==-1},currentPositionX:function(e){if(e===document){var n=window.pageYOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageXOffset:r?document.documentElement.scrollLeft:document.body.scrollLeft}else return e.scrollLeft},currentPositionY:function(e){if(e===document){var n=window.pageXOffset!==void 0,r=(document.compatMode||"")==="CSS1Compat";return n?window.pageYOffset:r?document.documentElement.scrollTop:document.body.scrollTop}else return e.scrollTop},scrollHandler:function(e){var n=Je.scrollSpyContainers[Je.scrollSpyContainers.indexOf(e)].spyCallbacks||[];n.forEach(function(r){return r(Je.currentPositionX(e),Je.currentPositionY(e))})},addStateHandler:function(e){Je.spySetState.push(e)},addSpyHandler:function(e,n){var r=Je.scrollSpyContainers[Je.scrollSpyContainers.indexOf(n)];r.spyCallbacks||(r.spyCallbacks=[]),r.spyCallbacks.push(e),e(Je.currentPositionX(n),Je.currentPositionY(n))},updateStates:function(){Je.spySetState.forEach(function(e){return e()})},unmount:function(e,n){Je.scrollSpyContainers.forEach(function(r){return r.spyCallbacks&&r.spyCallbacks.length&&r.spyCallbacks.indexOf(n)>-1&&r.spyCallbacks.splice(r.spyCallbacks.indexOf(n),1)}),Je.spySetState&&Je.spySetState.length&&Je.spySetState.indexOf(e)>-1&&Je.spySetState.splice(Je.spySetState.indexOf(e),1),document.removeEventListener("scroll",Je.scrollHandler)},update:function(){return Je.scrollSpyContainers.forEach(function(e){return Je.scrollHandler(e)})}};tr.default=Je;var On={},rr={};Object.defineProperty(rr,"__esModule",{value:!0});var Ey=function(e,n){var r=e.indexOf("#")===0?e.substring(1):e,a=r?"#"+r:"",i=window&&window.location,o=a?i.pathname+i.search+a:i.pathname+i.search;n?history.pushState(history.state,"",o):history.replaceState(history.state,"",o)},wy=function(){return window.location.hash.replace(/^#/,"")},By=function(e){return function(n){return e.contains?e!=n&&e.contains(n):!!(e.compareDocumentPosition(n)&16)}},xy=function(e){return getComputedStyle(e).position!=="static"},hi=function(e,n){for(var r=e.offsetTop,a=e.offsetParent;a&&!n(a);)r+=a.offsetTop,a=a.offsetParent;return{offsetTop:r,offsetParent:a}},Ly=function(e,n,r){if(r)return e===document?n.getBoundingClientRect().left+(window.scrollX||window.pageXOffset):getComputedStyle(e).position!=="static"?n.offsetLeft:n.offsetLeft-e.offsetLeft;if(e===document)return n.getBoundingClientRect().top+(window.scrollY||window.pageYOffset);if(xy(e)){if(n.offsetParent!==e){var a=function(f){return f===e||f===document},i=hi(n,a),o=i.offsetTop,s=i.offsetParent;if(s!==e)throw new Error("Seems containerElement is not an ancestor of the Element");return o}return n.offsetTop}if(n.offsetParent===e.offsetParent)return n.offsetTop-e.offsetTop;var u=function(f){return f===document};return hi(n,u).offsetTop-hi(e,u).offsetTop};rr.default={updateHash:Ey,getHash:wy,filterElementInContainer:By,scrollOffset:Ly};var Hr={},vi={};Object.defineProperty(vi,"__esModule",{value:!0}),vi.default={defaultEasing:function(e){return e<.5?Math.pow(e*2,2)/2:1-Math.pow((1-e)*2,2)/2},linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var gi={};Object.defineProperty(gi,"__esModule",{value:!0});var Sy=nr,Ay=["mousedown","mousewheel","touchmove","keydown"];gi.default={subscribe:function(e){return typeof document<"u"&&Ay.forEach(function(n){return(0,Sy.addPassiveEventListener)(document,n,e)})}};var ar={};Object.defineProperty(ar,"__esModule",{value:!0});var mi={registered:{},scrollEvent:{register:function(e,n){mi.registered[e]=n},remove:function(e){mi.registered[e]=null}}};ar.default=mi,Object.defineProperty(Hr,"__esModule",{value:!0});var Oy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Fy=rr;Vr(Fy);var Py=vi,Fl=Vr(Py),My=gi,ky=Vr(My),Ty=ar,Mt=Vr(Ty);function Vr(t){return t&&t.__esModule?t:{default:t}}var Pl=function(e){return Fl.default[e.smooth]||Fl.default.defaultEasing},Ry=function(e){return typeof e=="function"?e:function(){return e}},jy=function(){if(typeof window<"u")return window.requestAnimationFrame||window.webkitRequestAnimationFrame},yi=function(){return jy()||function(t,e,n){window.setTimeout(t,n||1e3/60,new Date().getTime())}}(),Ml=function(){return{currentPosition:0,startPosition:0,targetPosition:0,progress:0,duration:0,cancel:!1,target:null,containerElement:null,to:null,start:null,delta:null,percent:null,delayTimeout:null}},kl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollLeft;var r=window.pageXOffset!==void 0,a=(document.compatMode||"")==="CSS1Compat";return r?window.pageXOffset:a?document.documentElement.scrollLeft:document.body.scrollLeft},Tl=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollTop;var r=window.pageXOffset!==void 0,a=(document.compatMode||"")==="CSS1Compat";return r?window.pageYOffset:a?document.documentElement.scrollTop:document.body.scrollTop},Iy=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollWidth-n.offsetWidth;var r=document.body,a=document.documentElement;return Math.max(r.scrollWidth,r.offsetWidth,a.clientWidth,a.scrollWidth,a.offsetWidth)},Ny=function(e){var n=e.data.containerElement;if(n&&n!==document&&n!==document.body)return n.scrollHeight-n.offsetHeight;var r=document.body,a=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,a.clientHeight,a.scrollHeight,a.offsetHeight)},zy=function t(e,n,r){var a=n.data;if(!n.ignoreCancelEvents&&a.cancel){Mt.default.registered.end&&Mt.default.registered.end(a.to,a.target,a.currentPositionY);return}if(a.delta=Math.round(a.targetPosition-a.startPosition),a.start===null&&(a.start=r),a.progress=r-a.start,a.percent=a.progress>=a.duration?1:e(a.progress/a.duration),a.currentPosition=a.startPosition+Math.ceil(a.delta*a.percent),a.containerElement&&a.containerElement!==document&&a.containerElement!==document.body?n.horizontal?a.containerElement.scrollLeft=a.currentPosition:a.containerElement.scrollTop=a.currentPosition:n.horizontal?window.scrollTo(a.currentPosition,0):window.scrollTo(0,a.currentPosition),a.percent<1){var i=t.bind(null,e,n);yi.call(window,i);return}Mt.default.registered.end&&Mt.default.registered.end(a.to,a.target,a.currentPosition)},Ci=function(e){e.data.containerElement=e?e.containerId?document.getElementById(e.containerId):e.container&&e.container.nodeType?e.container:document:null},ir=function(e,n,r,a){n.data=n.data||Ml(),window.clearTimeout(n.data.delayTimeout);var i=function(){n.data.cancel=!0};if(ky.default.subscribe(i),Ci(n),n.data.start=null,n.data.cancel=!1,n.data.startPosition=n.horizontal?kl(n):Tl(n),n.data.targetPosition=n.absolute?e:e+n.data.startPosition,n.data.startPosition===n.data.targetPosition){Mt.default.registered.end&&Mt.default.registered.end(n.data.to,n.data.target,n.data.currentPosition);return}n.data.delta=Math.round(n.data.targetPosition-n.data.startPosition),n.data.duration=Ry(n.duration)(n.data.delta),n.data.duration=isNaN(parseFloat(n.data.duration))?1e3:parseFloat(n.data.duration),n.data.to=r,n.data.target=a;var o=Pl(n),s=zy.bind(null,o,n);if(n&&n.delay>0){n.data.delayTimeout=window.setTimeout(function(){Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),yi.call(window,s)},n.delay);return}Mt.default.registered.begin&&Mt.default.registered.begin(n.data.to,n.data.target),yi.call(window,s)},qr=function(e){return e=Oy({},e),e.data=e.data||Ml(),e.absolute=!0,e},_y=function(e){ir(0,qr(e))},Wy=function(e,n){ir(e,qr(n))},Uy=function(e){e=qr(e),Ci(e),ir(e.horizontal?Iy(e):Ny(e),e)},Hy=function(e,n){n=qr(n),Ci(n);var r=n.horizontal?kl(n):Tl(n);ir(e+r,n)};Hr.default={animateTopScroll:ir,getAnimationType:Pl,scrollToTop:_y,scrollToBottom:Uy,scrollTo:Wy,scrollMore:Hy},Object.defineProperty(On,"__esModule",{value:!0});var Vy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qy=rr,Zy=Di(qy),Gy=Hr,Yy=Di(Gy),Ky=ar,Zr=Di(Ky);function Di(t){return t&&t.__esModule?t:{default:t}}var Gr={},Rl=void 0;On.default={unmount:function(){Gr={}},register:function(e,n){Gr[e]=n},unregister:function(e){delete Gr[e]},get:function(e){return Gr[e]||document.getElementById(e)||document.getElementsByName(e)[0]||document.getElementsByClassName(e)[0]},setActiveLink:function(e){return Rl=e},getActiveLink:function(){return Rl},scrollTo:function(e,n){var r=this.get(e);if(!r){console.warn("target Element not found");return}n=Vy({},n,{absolute:!1});var a=n.containerId,i=n.container,o=void 0;a?o=document.getElementById(a):i&&i.nodeType?o=i:o=document,n.absolute=!0;var s=n.horizontal,u=Zy.default.scrollOffset(o,r,s)+(n.offset||0);if(!n.smooth){Zr.default.registered.begin&&Zr.default.registered.begin(e,r),o===document?n.horizontal?window.scrollTo(u,0):window.scrollTo(0,u):o.scrollTop=u,Zr.default.registered.end&&Zr.default.registered.end(e,r);return}Yy.default.animateTopScroll(u,n,e,r)}};var bi={exports:{}},Yr={exports:{}},We={};/** @license React v16.13.1
92
92
  * react-is.production.min.js
93
93
  *
94
94
  * Copyright (c) Facebook, Inc. and its affiliates.
95
95
  *
96
96
  * This source code is licensed under the MIT license found in the
97
97
  * LICENSE file in the root directory of this source tree.
98
- */var jl;function Xy(){if(jl)return We;jl=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function w(b){if(typeof b=="object"&&b!==null){var E=b.$$typeof;switch(E){case e:switch(b=b.type,b){case u:case c:case r:case a:case i:case h:return b;default:switch(b=b&&b.$$typeof,b){case s:case f:case C:case g:case o:return b;default:return E}}case n:return E}}}function O(b){return w(b)===c}return We.AsyncMode=u,We.ConcurrentMode=c,We.ContextConsumer=s,We.ContextProvider=o,We.Element=e,We.ForwardRef=f,We.Fragment=r,We.Lazy=C,We.Memo=g,We.Portal=n,We.Profiler=a,We.StrictMode=i,We.Suspense=h,We.isAsyncMode=function(b){return O(b)||w(b)===u},We.isConcurrentMode=O,We.isContextConsumer=function(b){return w(b)===s},We.isContextProvider=function(b){return w(b)===o},We.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},We.isForwardRef=function(b){return w(b)===f},We.isFragment=function(b){return w(b)===r},We.isLazy=function(b){return w(b)===C},We.isMemo=function(b){return w(b)===g},We.isPortal=function(b){return w(b)===n},We.isProfiler=function(b){return w(b)===a},We.isStrictMode=function(b){return w(b)===i},We.isSuspense=function(b){return w(b)===h},We.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===c||b===a||b===i||b===h||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===C||b.$$typeof===g||b.$$typeof===o||b.$$typeof===s||b.$$typeof===f||b.$$typeof===d||b.$$typeof===D||b.$$typeof===B||b.$$typeof===v)},We.typeOf=w,We}var Ue={};/** @license React v16.13.1
98
+ */var jl;function Xy(){if(jl)return We;jl=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function E(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type,b){case u:case c:case r:case i:case a:case h:return b;default:switch(b=b&&b.$$typeof,b){case s:case f:case C:case v:case o:return b;default:return w}}case n:return w}}}function O(b){return E(b)===c}return We.AsyncMode=u,We.ConcurrentMode=c,We.ContextConsumer=s,We.ContextProvider=o,We.Element=e,We.ForwardRef=f,We.Fragment=r,We.Lazy=C,We.Memo=v,We.Portal=n,We.Profiler=i,We.StrictMode=a,We.Suspense=h,We.isAsyncMode=function(b){return O(b)||E(b)===u},We.isConcurrentMode=O,We.isContextConsumer=function(b){return E(b)===s},We.isContextProvider=function(b){return E(b)===o},We.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},We.isForwardRef=function(b){return E(b)===f},We.isFragment=function(b){return E(b)===r},We.isLazy=function(b){return E(b)===C},We.isMemo=function(b){return E(b)===v},We.isPortal=function(b){return E(b)===n},We.isProfiler=function(b){return E(b)===i},We.isStrictMode=function(b){return E(b)===a},We.isSuspense=function(b){return E(b)===h},We.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===c||b===i||b===a||b===h||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===C||b.$$typeof===v||b.$$typeof===o||b.$$typeof===s||b.$$typeof===f||b.$$typeof===d||b.$$typeof===D||b.$$typeof===B||b.$$typeof===g)},We.typeOf=E,We}var Ue={};/** @license React v16.13.1
99
99
  * react-is.development.js
100
100
  *
101
101
  * Copyright (c) Facebook, Inc. and its affiliates.
102
102
  *
103
103
  * This source code is licensed under the MIT license found in the
104
104
  * LICENSE file in the root directory of this source tree.
105
- */var Il;function Jy(){return Il||(Il=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function w(G){return typeof G=="string"||typeof G=="function"||G===r||G===c||G===a||G===i||G===h||G===p||typeof G=="object"&&G!==null&&(G.$$typeof===C||G.$$typeof===g||G.$$typeof===o||G.$$typeof===s||G.$$typeof===f||G.$$typeof===d||G.$$typeof===D||G.$$typeof===B||G.$$typeof===v)}function O(G){if(typeof G=="object"&&G!==null){var ue=G.$$typeof;switch(ue){case e:var ae=G.type;switch(ae){case u:case c:case r:case a:case i:case h:return ae;default:var de=ae&&ae.$$typeof;switch(de){case s:case f:case C:case g:case o:return de;default:return ue}}case n:return ue}}}var b=u,E=c,S=s,F=o,V=e,P=f,z=r,R=C,I=g,j=n,N=a,X=i,_=h,$=!1;function re(G){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),k(G)||O(G)===u}function k(G){return O(G)===c}function T(G){return O(G)===s}function Z(G){return O(G)===o}function H(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function Q(G){return O(G)===f}function K(G){return O(G)===r}function y(G){return O(G)===C}function U(G){return O(G)===g}function W(G){return O(G)===n}function M(G){return O(G)===a}function J(G){return O(G)===i}function ne(G){return O(G)===h}Ue.AsyncMode=b,Ue.ConcurrentMode=E,Ue.ContextConsumer=S,Ue.ContextProvider=F,Ue.Element=V,Ue.ForwardRef=P,Ue.Fragment=z,Ue.Lazy=R,Ue.Memo=I,Ue.Portal=j,Ue.Profiler=N,Ue.StrictMode=X,Ue.Suspense=_,Ue.isAsyncMode=re,Ue.isConcurrentMode=k,Ue.isContextConsumer=T,Ue.isContextProvider=Z,Ue.isElement=H,Ue.isForwardRef=Q,Ue.isFragment=K,Ue.isLazy=y,Ue.isMemo=U,Ue.isPortal=W,Ue.isProfiler=M,Ue.isStrictMode=J,Ue.isSuspense=ne,Ue.isValidElementType=w,Ue.typeOf=O}()),Ue}var Nl;function zl(){return Nl||(Nl=1,process.env.NODE_ENV==="production"?Yr.exports=Xy():Yr.exports=Jy()),Yr.exports}/*
105
+ */var Il;function Jy(){return Il||(Il=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,d=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,B=t?Symbol.for("react.scope"):60119;function E(G){return typeof G=="string"||typeof G=="function"||G===r||G===c||G===i||G===a||G===h||G===p||typeof G=="object"&&G!==null&&(G.$$typeof===C||G.$$typeof===v||G.$$typeof===o||G.$$typeof===s||G.$$typeof===f||G.$$typeof===d||G.$$typeof===D||G.$$typeof===B||G.$$typeof===g)}function O(G){if(typeof G=="object"&&G!==null){var ue=G.$$typeof;switch(ue){case e:var ie=G.type;switch(ie){case u:case c:case r:case i:case a:case h:return ie;default:var de=ie&&ie.$$typeof;switch(de){case s:case f:case C:case v:case o:return de;default:return ue}}case n:return ue}}}var b=u,w=c,S=s,P=o,V=e,F=f,j=r,k=C,I=v,N=n,z=i,X=a,_=h,$=!1;function re(G){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),T(G)||O(G)===u}function T(G){return O(G)===c}function R(G){return O(G)===s}function Z(G){return O(G)===o}function H(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function Q(G){return O(G)===f}function K(G){return O(G)===r}function y(G){return O(G)===C}function U(G){return O(G)===v}function W(G){return O(G)===n}function M(G){return O(G)===i}function J(G){return O(G)===a}function ne(G){return O(G)===h}Ue.AsyncMode=b,Ue.ConcurrentMode=w,Ue.ContextConsumer=S,Ue.ContextProvider=P,Ue.Element=V,Ue.ForwardRef=F,Ue.Fragment=j,Ue.Lazy=k,Ue.Memo=I,Ue.Portal=N,Ue.Profiler=z,Ue.StrictMode=X,Ue.Suspense=_,Ue.isAsyncMode=re,Ue.isConcurrentMode=T,Ue.isContextConsumer=R,Ue.isContextProvider=Z,Ue.isElement=H,Ue.isForwardRef=Q,Ue.isFragment=K,Ue.isLazy=y,Ue.isMemo=U,Ue.isPortal=W,Ue.isProfiler=M,Ue.isStrictMode=J,Ue.isSuspense=ne,Ue.isValidElementType=E,Ue.typeOf=O}()),Ue}var Nl;function zl(){return Nl||(Nl=1,process.env.NODE_ENV==="production"?Yr.exports=Xy():Yr.exports=Jy()),Yr.exports}/*
106
106
  object-assign
107
107
  (c) Sindre Sorhus
108
108
  @license MIT
109
- */var Ea,_l;function Qy(){if(_l)return Ea;_l=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ea=i()?Object.assign:function(a,o){for(var s,u=r(a),c,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var h in s)e.call(s,h)&&(u[h]=s[h]);if(t){c=t(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(u[c[p]]=s[c[p]])}}return u},Ea}var wa,Wl;function Ba(){if(Wl)return wa;Wl=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return wa=t,wa}var xa,Ul;function Hl(){return Ul||(Ul=1,xa=Function.call.bind(Object.prototype.hasOwnProperty)),xa}var La,Vl;function $y(){if(Vl)return La;Vl=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Ba(),n={},r=Hl();t=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,u,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(r(a,f)){var h;try{if(typeof a[f]!="function"){var p=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=a[f](o,f,u,s,null,e)}catch(C){h=C}if(h&&!(h instanceof Error)&&t((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=c?c():"";t("Failed "+s+" type: "+h.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},La=i,La}var Sa,ql;function eC(){if(ql)return Sa;ql=1;var t=zl(),e=Qy(),n=Ba(),r=Hl(),i=$y(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return Sa=function(s,u){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(k){var T=k&&(c&&k[c]||k[f]);if(typeof T=="function")return T}var p="<<anonymous>>",g={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:B(),arrayOf:w,element:O(),elementType:b(),instanceOf:E,node:P(),objectOf:F,oneOf:S,oneOfType:V,shape:R,exact:I};function C(k,T){return k===T?k!==0||1/k===1/T:k!==k&&T!==T}function v(k,T){this.message=k,this.data=T&&typeof T=="object"?T:{},this.stack=""}v.prototype=Error.prototype;function d(k){if(process.env.NODE_ENV!=="production")var T={},Z=0;function H(K,y,U,W,M,J,ne){if(W=W||p,J=J||U,ne!==n){if(u){var G=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 G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=W+":"+U;!T[ue]&&Z<3&&(a("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),T[ue]=!0,Z++)}}return y[U]==null?K?y[U]===null?new v("The "+M+" `"+J+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new v("The "+M+" `"+J+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:k(y,U,W,M,J)}var Q=H.bind(null,!1);return Q.isRequired=H.bind(null,!0),Q}function D(k){function T(Z,H,Q,K,y,U){var W=Z[H],M=X(W);if(M!==k){var J=_(W);return new v("Invalid "+K+" `"+y+"` of type "+("`"+J+"` supplied to `"+Q+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return d(T)}function B(){return d(o)}function w(k){function T(Z,H,Q,K,y){if(typeof k!="function")return new v("Property `"+y+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var U=Z[H];if(!Array.isArray(U)){var W=X(U);return new v("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var M=0;M<U.length;M++){var J=k(U,M,Q,K,y+"["+M+"]",n);if(J instanceof Error)return J}return null}return d(T)}function O(){function k(T,Z,H,Q,K){var y=T[Z];if(!s(y)){var U=X(y);return new v("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return d(k)}function b(){function k(T,Z,H,Q,K){var y=T[Z];if(!t.isValidElementType(y)){var U=X(y);return new v("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return d(k)}function E(k){function T(Z,H,Q,K,y){if(!(Z[H]instanceof k)){var U=k.name||p,W=re(Z[H]);return new v("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+U+"`."))}return null}return d(T)}function S(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function T(Z,H,Q,K,y){for(var U=Z[H],W=0;W<k.length;W++)if(C(U,k[W]))return null;var M=JSON.stringify(k,function(ne,G){var ue=_(G);return ue==="symbol"?String(G):G});return new v("Invalid "+K+" `"+y+"` of value `"+String(U)+"` "+("supplied to `"+Q+"`, expected one of "+M+"."))}return d(T)}function F(k){function T(Z,H,Q,K,y){if(typeof k!="function")return new v("Property `"+y+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var U=Z[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var M in U)if(r(U,M)){var J=k(U,M,Q,K,y+"."+M,n);if(J instanceof Error)return J}return null}return d(T)}function V(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var T=0;T<k.length;T++){var Z=k[T];if(typeof Z!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(Z)+" at index "+T+"."),o}function H(Q,K,y,U,W){for(var M=[],J=0;J<k.length;J++){var ne=k[J],G=ne(Q,K,y,U,W,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&M.push(G.data.expectedType)}var ue=M.length>0?", expected one of type ["+M.join(", ")+"]":"";return new v("Invalid "+U+" `"+W+"` supplied to "+("`"+y+"`"+ue+"."))}return d(H)}function P(){function k(T,Z,H,Q,K){return j(T[Z])?null:new v("Invalid "+Q+" `"+K+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return d(k)}function z(k,T,Z,H,Q){return new v((k||"React class")+": "+T+" type `"+Z+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function R(k){function T(Z,H,Q,K,y){var U=Z[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+y+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var M in k){var J=k[M];if(typeof J!="function")return z(Q,K,y,M,_(J));var ne=J(U,M,Q,K,y+"."+M,n);if(ne)return ne}return null}return d(T)}function I(k){function T(Z,H,Q,K,y){var U=Z[H],W=X(U);if(W!=="object")return new v("Invalid "+K+" `"+y+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var M=e({},Z[H],k);for(var J in M){var ne=k[J];if(r(k,J)&&typeof ne!="function")return z(Q,K,y,J,_(ne));if(!ne)return new v("Invalid "+K+" `"+y+"` key `"+J+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(Z[H],null," ")+`
110
- Valid keys: `+JSON.stringify(Object.keys(k),null," "));var G=ne(U,J,Q,K,y+"."+J,n);if(G)return G}return null}return d(T)}function j(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(j);if(k===null||s(k))return!0;var T=h(k);if(T){var Z=T.call(k),H;if(T!==k.entries){for(;!(H=Z.next()).done;)if(!j(H.value))return!1}else for(;!(H=Z.next()).done;){var Q=H.value;if(Q&&!j(Q[1]))return!1}}else return!1;return!0;default:return!1}}function N(k,T){return k==="symbol"?!0:T?T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol:!1}function X(k){var T=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":N(T,k)?"symbol":T}function _(k){if(typeof k>"u"||k===null)return""+k;var T=X(k);if(T==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return T}function $(k){var T=_(k);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function re(k){return!k.constructor||!k.constructor.name?p:k.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},Sa}var Aa,Zl;function tC(){if(Zl)return Aa;Zl=1;var t=Ba();function e(){}function n(){}return n.resetWarningCache=e,Aa=function(){function r(o,s,u,c,f,h){if(h!==t){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return a.PropTypes=a,a},Aa}if(process.env.NODE_ENV!=="production"){var nC=zl(),rC=!0;ba.exports=eC()(nC.isElement,rC)}else ba.exports=tC()();var Kr=ba.exports,Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});var iC=rr,Oa=aC(iC);function aC(t){return t&&t.__esModule?t:{default:t}}var oC={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,n){this.containers[e]=n},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,n=this.getHash();n?window.setTimeout(function(){e.scrollTo(n,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,n){var r=this.scroller,i=r.get(e);if(i&&(n||e!==r.getActiveLink())){var a=this.containers[e]||document;r.scrollTo(e,{container:a})}},getHash:function(){return Oa.default.getHash()},changeHash:function(e,n){this.isInitialized()&&Oa.default.getHash()!==e&&Oa.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};Xr.default=oC,Object.defineProperty(er,"__esModule",{value:!0});var Jr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sC=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),uC=l,Gl=or(uC),lC=tr,Qr=or(lC),cC=On,fC=or(cC),dC=Kr,Ye=or(dC),pC=Xr,$t=or(pC);function or(t){return t&&t.__esModule?t:{default:t}}function hC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Yl={to:Ye.default.string.isRequired,containerId:Ye.default.string,container:Ye.default.object,activeClass:Ye.default.string,activeStyle:Ye.default.object,spy:Ye.default.bool,horizontal:Ye.default.bool,smooth:Ye.default.oneOfType([Ye.default.bool,Ye.default.string]),offset:Ye.default.number,delay:Ye.default.number,isDynamic:Ye.default.bool,onClick:Ye.default.func,duration:Ye.default.oneOfType([Ye.default.number,Ye.default.func]),absolute:Ye.default.bool,onSetActive:Ye.default.func,onSetInactive:Ye.default.func,ignoreCancelEvents:Ye.default.bool,hashSpy:Ye.default.bool,saveHashHistory:Ye.default.bool,spyThrottle:Ye.default.number};er.default=function(t,e){var n=e||fC.default,r=function(a){gC(o,a);function o(s){hC(this,o);var u=vC(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,s));return i.call(u),u.state={active:!1},u}return sC(o,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,c=this.props.container;return u&&!c?document.getElementById(u):c&&c.nodeType?c:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();Qr.default.isMounted(u)||Qr.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&($t.default.isMounted()||$t.default.mount(n),$t.default.mapContainer(this.props.to,u)),Qr.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){Qr.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var u="";this.state&&this.state.active?u=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():u=this.props.className;var c={};this.state&&this.state.active?c=Jr({},this.props.style,this.props.activeStyle):c=Jr({},this.props.style);var f=Jr({},this.props);for(var h in Yl)f.hasOwnProperty(h)&&delete f[h];return f.className=u,f.style=c,f.onClick=this.handleClick,Gl.default.createElement(t,f)}}]),o}(Gl.default.PureComponent),i=function(){var o=this;this.scrollTo=function(s,u){n.scrollTo(s,Jr({},o.state,u))},this.handleClick=function(s){o.props.onClick&&o.props.onClick(s),s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),o.scrollTo(o.props.to,o.props)},this.spyHandler=function(s,u){var c=o.getScrollSpyContainer();if(!($t.default.isMounted()&&!$t.default.isInitialized())){var f=o.props.horizontal,h=o.props.to,p=null,g=void 0,C=void 0;if(f){var v=0,d=0,D=0;if(c.getBoundingClientRect){var B=c.getBoundingClientRect();D=B.left}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var w=p.getBoundingClientRect();v=w.left-D+s,d=v+w.width}var O=s-o.props.offset;g=O>=Math.floor(v)&&O<Math.floor(d),C=O<Math.floor(v)||O>=Math.floor(d)}else{var b=0,E=0,S=0;if(c.getBoundingClientRect){var F=c.getBoundingClientRect();S=F.top}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var V=p.getBoundingClientRect();b=V.top-S+u,E=b+V.height}var P=u-o.props.offset;g=P>=Math.floor(b)&&P<Math.floor(E),C=P<Math.floor(b)||P>=Math.floor(E)}var z=n.getActiveLink();if(C){if(h===z&&n.setActiveLink(void 0),o.props.hashSpy&&$t.default.getHash()===h){var R=o.props.saveHashHistory,I=R===void 0?!1:R;$t.default.changeHash("",I)}o.props.spy&&o.state.active&&(o.setState({active:!1}),o.props.onSetInactive&&o.props.onSetInactive(h,p))}if(g&&(z!==h||o.state.active===!1)){n.setActiveLink(h);var j=o.props.saveHashHistory,N=j===void 0?!1:j;o.props.hashSpy&&$t.default.changeHash(h,N),o.props.spy&&(o.setState({active:!0}),o.props.onSetActive&&o.props.onSetActive(h,p))}}}};return r.propTypes=Yl,r.defaultProps={offset:0},r},Object.defineProperty(da,"__esModule",{value:!0});var mC=l,Kl=Xl(mC),yC=er,CC=Xl(yC);function Xl(t){return t&&t.__esModule?t:{default:t}}function DC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jl(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function bC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var EC=function(t){bC(e,t);function e(){var n,r,i,a;DC(this,e);for(var o=arguments.length,s=Array(o),u=0;u<o;u++)s[u]=arguments[u];return a=(r=(i=Jl(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(s))),i),i.render=function(){return Kl.default.createElement("a",i.props,i.props.children)},r),Jl(i,a)}return e}(Kl.default.Component);da.default=(0,CC.default)(EC);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});var wC=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),BC=l,Ql=$l(BC),xC=er,LC=$l(xC);function $l(t){return t&&t.__esModule?t:{default:t}}function SC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function OC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var FC=function(t){OC(e,t);function e(){return SC(this,e),AC(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return wC(e,[{key:"render",value:function(){return Ql.default.createElement("button",this.props,this.props.children)}}]),e}(Ql.default.Component);Fa.default=(0,LC.default)(FC);var Pa={},$r={};Object.defineProperty($r,"__esModule",{value:!0});var PC=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},MC=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),kC=l,ec=ei(kC),TC=Wt;ei(TC);var RC=On,tc=ei(RC),jC=Kr,nc=ei(jC);function ei(t){return t&&t.__esModule?t:{default:t}}function IC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function NC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function zC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}$r.default=function(t){var e=function(n){zC(r,n);function r(i){IC(this,r);var a=NC(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,i));return a.childBindings={domNode:null},a}return MC(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(a){this.props.name!==a.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;tc.default.unregister(this.props.name)}},{key:"registerElems",value:function(a){tc.default.register(a,this.childBindings.domNode)}},{key:"render",value:function(){return ec.default.createElement(t,PC({},this.props,{parentBindings:this.childBindings}))}}]),r}(ec.default.Component);return e.propTypes={name:nc.default.string,id:nc.default.string},e},Object.defineProperty(Pa,"__esModule",{value:!0});var rc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_C=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),WC=l,ic=Ma(WC),UC=$r,HC=Ma(UC),VC=Kr,ac=Ma(VC);function Ma(t){return t&&t.__esModule?t:{default:t}}function qC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function GC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var oc=function(t){GC(e,t);function e(){return qC(this,e),ZC(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _C(e,[{key:"render",value:function(){var r=this,i=rc({},this.props);return delete i.name,i.parentBindings&&delete i.parentBindings,ic.default.createElement("div",rc({},i,{ref:function(o){r.props.parentBindings.domNode=o}}),this.props.children)}}]),e}(ic.default.Component);oc.propTypes={name:ac.default.string,id:ac.default.string},Pa.default=(0,HC.default)(oc);var ka=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sc=function(){function t(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function uc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function cc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ti=l,mn=tr,Ta=On,Qe=Kr,en=Xr,fc={to:Qe.string.isRequired,containerId:Qe.string,container:Qe.object,activeClass:Qe.string,spy:Qe.bool,smooth:Qe.oneOfType([Qe.bool,Qe.string]),offset:Qe.number,delay:Qe.number,isDynamic:Qe.bool,onClick:Qe.func,duration:Qe.oneOfType([Qe.number,Qe.func]),absolute:Qe.bool,onSetActive:Qe.func,onSetInactive:Qe.func,ignoreCancelEvents:Qe.bool,hashSpy:Qe.bool,spyThrottle:Qe.number},YC={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||Ta,i=function(o){cc(s,o);function s(u){uc(this,s);var c=lc(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u));return a.call(c),c.state={active:!1},c}return sc(s,[{key:"getScrollSpyContainer",value:function(){var c=this.props.containerId,f=this.props.container;return c?document.getElementById(c):f&&f.nodeType?f:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var c=this.getScrollSpyContainer();mn.isMounted(c)||mn.mount(c,this.props.spyThrottle),this.props.hashSpy&&(en.isMounted()||en.mount(r),en.mapContainer(this.props.to,c)),this.props.spy&&mn.addStateHandler(this.stateHandler),mn.addSpyHandler(this.spyHandler,c),this.setState({container:c})}}},{key:"componentWillUnmount",value:function(){mn.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var c="";this.state&&this.state.active?c=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():c=this.props.className;var f=ka({},this.props);for(var h in fc)f.hasOwnProperty(h)&&delete f[h];return f.className=c,f.onClick=this.handleClick,ti.createElement(e,f)}}]),s}(ti.Component),a=function(){var s=this;this.scrollTo=function(u,c){r.scrollTo(u,ka({},s.state,c))},this.handleClick=function(u){s.props.onClick&&s.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),s.scrollTo(s.props.to,s.props)},this.stateHandler=function(){r.getActiveLink()!==s.props.to&&(s.state!==null&&s.state.active&&s.props.onSetInactive&&s.props.onSetInactive(),s.setState({active:!1}))},this.spyHandler=function(u){var c=s.getScrollSpyContainer();if(!(en.isMounted()&&!en.isInitialized())){var f=s.props.to,h=null,p=0,g=0,C=0;if(c.getBoundingClientRect){var v=c.getBoundingClientRect();C=v.top}if(!h||s.props.isDynamic){if(h=r.get(f),!h)return;var d=h.getBoundingClientRect();p=d.top-C+u,g=p+d.height}var D=u-s.props.offset,B=D>=Math.floor(p)&&D<Math.floor(g),w=D<Math.floor(p)||D>=Math.floor(g),O=r.getActiveLink();if(w)return f===O&&r.setActiveLink(void 0),s.props.hashSpy&&en.getHash()===f&&en.changeHash(),s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive()),mn.updateStates();if(B&&O!==f)return r.setActiveLink(f),s.props.hashSpy&&en.changeHash(f),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(f)),mn.updateStates()}}};return i.propTypes=fc,i.defaultProps={offset:0},i},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){cc(i,r);function i(a){uc(this,i);var o=lc(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,a));return o.childBindings={domNode:null},o}return sc(i,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(o){this.props.name!==o.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Ta.unregister(this.props.name)}},{key:"registerElems",value:function(o){Ta.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return ti.createElement(e,ka({},this.props,{parentBindings:this.childBindings}))}}]),i}(ti.Component);return n.propTypes={name:Qe.string,id:Qe.string},n}},KC=YC;Object.defineProperty(et,"__esModule",{value:!0}),et.Helpers=et.ScrollElement=et.ScrollLink=Ec=et.animateScroll=et.scrollSpy=et.Events=et.scroller=et.Element=et.Button=et.Link=void 0;var XC=da,dc=kt(XC),JC=Fa,pc=kt(JC),QC=Pa,hc=kt(QC),$C=On,vc=kt($C),eD=ir,gc=kt(eD),tD=tr,mc=kt(tD),nD=Hr,yc=kt(nD),rD=er,Cc=kt(rD),iD=$r,Dc=kt(iD),aD=KC,bc=kt(aD);function kt(t){return t&&t.__esModule?t:{default:t}}et.Link=dc.default,et.Button=pc.default,et.Element=hc.default,et.scroller=vc.default,et.Events=gc.default,et.scrollSpy=mc.default;var Ec=et.animateScroll=yc.default;et.ScrollLink=Cc.default,et.ScrollElement=Dc.default,et.Helpers=bc.default,et.default={Link:dc.default,Button:pc.default,Element:hc.default,scroller:vc.default,Events:gc.default,scrollSpy:mc.default,animateScroll:yc.default,ScrollLink:Cc.default,ScrollElement:Dc.default,Helpers:bc.default};const Ra=l.createContext({}),wc=l.createContext({});function Bc(){const t=l.useContext(wc);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function xc(t){return t&&typeof t.title=="string"&&typeof t.message=="string"&&(t.size===void 0||t.size==="md"||t.size==="lg")&&(t.type==="info"||t.type==="success"||t.type==="danger"||t.type==="warning")}function oD(){const t=Dn.useActionData(),{closeModal:e}=l.useContext(Ra),{showToast:n}=Bc();l.useEffect(()=>{const r=t==null?void 0:t.closeModalKey;r&&e(r)},[t]),l.useEffect(()=>{const r=t==null?void 0:t.toast,i=t==null?void 0:t.message;xc(r)&&n(r),!xc(r)&&i&&n({message:i,title:"Atenção!",type:"warning"})},[t]),l.useEffect(()=>{var r,i;if(typeof((r=t==null?void 0:t.data)==null?void 0:r.scrollTo)=="string"){const a=document.getElementById((i=t==null?void 0:t.data)==null?void 0:i.scrollTo);a&&Ec.scrollTo(a.offsetTop-200)}},[t])}const Lc=l.createContext({});function sD(t){const e=l.useContext(Lc);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:n,drawerIsOpen:r,openDrawer:i,closeDrawer:a}=e,o=r(t),s=n(t);return{drawerIsOpen:o,drawerData:s,openDrawer:f=>i(t,f),closeDrawer:()=>a(t)}}else return e}function uD(t){const e=l.useContext(Ra);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:n,modalIsOpen:r,openModal:i,closeModal:a}=e,o=r(t),s=n(t);return{modalIsOpen:o,modalData:s,openModal:f=>i(t,f),closeModal:()=>a(t)}}else return e}function lD(t){const{children:e=!1}=t,[n,r]=l.useState([]);function i(u){return!!n.some(c=>c.key===u)}function a(u){var c;return(c=n.find(f=>f.key===u))==null?void 0:c.data}function o(u,c){const f=i(u);r(f?h=>[...h.filter(g=>g.key!==u),{key:u,data:c}]:[...n,{key:u,data:c}])}function s(u){r(n.filter(c=>c.key!==u))}return x.jsx(Lc.Provider,{value:{drawerIsOpen:i,drawerData:a,openDrawer:o,closeDrawer:s},children:e})}function cD({googleMapsApiKey:t,children:e,...n}){return x.jsx(nf,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function fD(t){const{children:e=!1}=t,[n,r]=l.useState([]);function i(u){return!!n.some(c=>c.key===u)}function a(u){var c;return(c=n.find(f=>f.key===u))==null?void 0:c.data}function o(u,c){const f=i(u);r(f?h=>[...h.filter(g=>g.key!==u),{key:u,data:c}]:[...n,{key:u,data:c}])}function s(u){r(n.filter(c=>c.key!==u))}return x.jsx(Ra.Provider,{value:{modalIsOpen:i,modalData:a,openModal:o,closeModal:s},children:e})}var dD=t=>{switch(t){case"success":return vD;case"info":return mD;case"warning":return gD;case"error":return yD;default:return null}},pD=Array(12).fill(0),hD=({visible:t})=>l.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},l.createElement("div",{className:"sonner-spinner"},pD.map((e,n)=>l.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),vD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),yD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),CD=()=>{let[t,e]=l.useState(document.hidden);return l.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},ja=1,DD=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:ja++,a=this.toasts.find(s=>s.id===i),o=t.dismissible===void 0?!0:t.dismissible;return a?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...t,id:i,title:n}),{...s,...t,id:i,dismissible:o,title:n}):s):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),i=n!==void 0;return r.then(async a=>{if(ED(a)&&!a.ok){i=!1;let o=typeof e.error=="function"?await e.error(`HTTP error! status: ${a.status}`):e.error,s=typeof e.description=="function"?await e.description(`HTTP error! status: ${a.status}`):e.description;this.create({id:n,type:"error",message:o,description:s})}else if(e.success!==void 0){i=!1;let o=typeof e.success=="function"?await e.success(a):e.success,s=typeof e.description=="function"?await e.description(a):e.description;this.create({id:n,type:"success",message:o,description:s})}}).catch(async a=>{if(e.error!==void 0){i=!1;let o=typeof e.error=="function"?await e.error(a):e.error,s=typeof e.description=="function"?await e.description(a):e.description;this.create({id:n,type:"error",message:o,description:s})}}).finally(()=>{var a;i&&(this.dismiss(n),n=void 0),(a=e.finally)==null||a.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||ja++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},Et=new DD,bD=(t,e)=>{let n=(e==null?void 0:e.id)||ja++;return Et.addToast({title:t,...e,id:n}),n},ED=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",wD=bD,BD=()=>Et.toasts,xD=Object.assign(wD,{success:Et.success,info:Et.info,warning:Et.warning,error:Et.error,custom:Et.custom,message:Et.message,promise:Et.promise,dismiss:Et.dismiss,loading:Et.loading},{getHistory:BD});function LD(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}LD(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
111
- `);function ni(t){return t.label!==void 0}var SD=3,AD="32px",OD=4e3,FD=356,PD=14,MD=20,kD=200;function TD(...t){return t.filter(Boolean).join(" ")}var RD=t=>{var e,n,r,i,a,o,s,u,c,f;let{invert:h,toast:p,unstyled:g,interacting:C,setHeights:v,visibleToasts:d,heights:D,index:B,toasts:w,expanded:O,removeToast:b,defaultRichColors:E,closeButton:S,style:F,cancelButtonStyle:V,actionButtonStyle:P,className:z="",descriptionClassName:R="",duration:I,position:j,gap:N,loadingIcon:X,expandByDefault:_,classNames:$,icons:re,closeButtonAriaLabel:k="Close toast",pauseWhenPageIsHidden:T,cn:Z}=t,[H,Q]=l.useState(!1),[K,y]=l.useState(!1),[U,W]=l.useState(!1),[M,J]=l.useState(!1),[ne,G]=l.useState(0),[ue,ae]=l.useState(0),de=l.useRef(null),pe=l.useRef(null),Ce=B===0,ye=B+1<=d,ge=p.type,ve=p.dismissible!==!1,Ie=p.className||"",se=p.descriptionClassName||"",Ne=l.useMemo(()=>D.findIndex(be=>be.toastId===p.id)||0,[D,p.id]),fe=l.useMemo(()=>{var be;return(be=p.closeButton)!=null?be:S},[p.closeButton,S]),we=l.useMemo(()=>p.duration||I||OD,[p.duration,I]),Me=l.useRef(0),He=l.useRef(0),qe=l.useRef(0),Ee=l.useRef(null),[ut,at]=j.split("-"),At=l.useMemo(()=>D.reduce((be,Te,Re)=>Re>=Ne?be:be+Te.height,0),[D,Ne]),ht=CD(),wt=p.invert||h,Tt=ge==="loading";He.current=l.useMemo(()=>Ne*N+At,[Ne,At]),l.useEffect(()=>{Q(!0)},[]),l.useLayoutEffect(()=>{if(!H)return;let be=pe.current,Te=be.style.height;be.style.height="auto";let Re=be.getBoundingClientRect().height;be.style.height=Te,ae(Re),v(nt=>nt.find(ot=>ot.toastId===p.id)?nt.map(ot=>ot.toastId===p.id?{...ot,height:Re}:ot):[{toastId:p.id,height:Re,position:p.position},...nt])},[H,p.title,p.description,v,p.id]);let vt=l.useCallback(()=>{y(!0),G(He.current),v(be=>be.filter(Te=>Te.toastId!==p.id)),setTimeout(()=>{b(p)},kD)},[p,b,v,He]);l.useEffect(()=>{if(p.promise&&ge==="loading"||p.duration===1/0||p.type==="loading")return;let be,Te=we;return O||C||T&&ht?(()=>{if(qe.current<Me.current){let Re=new Date().getTime()-Me.current;Te=Te-Re}qe.current=new Date().getTime()})():Te!==1/0&&(Me.current=new Date().getTime(),be=setTimeout(()=>{var Re;(Re=p.onAutoClose)==null||Re.call(p,p),vt()},Te)),()=>clearTimeout(be)},[O,C,_,p,we,vt,p.promise,ge,T,ht]),l.useEffect(()=>{let be=pe.current;if(be){let Te=be.getBoundingClientRect().height;return ae(Te),v(Re=>[{toastId:p.id,height:Te,position:p.position},...Re]),()=>v(Re=>Re.filter(nt=>nt.toastId!==p.id))}},[v,p.id]),l.useEffect(()=>{p.delete&&vt()},[vt,p.delete]);function tn(){return re!=null&&re.loading?l.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},re.loading):X?l.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},X):l.createElement(hD,{visible:ge==="loading"})}return l.createElement("li",{"aria-live":p.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:pe,className:Z(z,Ie,$==null?void 0:$.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,$==null?void 0:$.default,$==null?void 0:$[ge],(n=p==null?void 0:p.classNames)==null?void 0:n[ge]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":H,"data-promise":!!p.promise,"data-removed":K,"data-visible":ye,"data-y-position":ut,"data-x-position":at,"data-index":B,"data-front":Ce,"data-swiping":U,"data-dismissible":ve,"data-type":ge,"data-invert":wt,"data-swipe-out":M,"data-expanded":!!(O||_&&H),style:{"--index":B,"--toasts-before":B,"--z-index":w.length-B,"--offset":`${K?ne:He.current}px`,"--initial-height":_?"auto":`${ue}px`,...F,...p.style},onPointerDown:be=>{Tt||!ve||(de.current=new Date,G(He.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(W(!0),Ee.current={x:be.clientX,y:be.clientY}))},onPointerUp:()=>{var be,Te,Re,nt;if(M||!ve)return;Ee.current=null;let ot=Number(((be=pe.current)==null?void 0:be.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ot=new Date().getTime()-((Te=de.current)==null?void 0:Te.getTime()),yn=Math.abs(ot)/Ot;if(Math.abs(ot)>=MD||yn>.11){G(He.current),(Re=p.onDismiss)==null||Re.call(p,p),vt(),J(!0);return}(nt=pe.current)==null||nt.style.setProperty("--swipe-amount","0px"),W(!1)},onPointerMove:be=>{var Te;if(!Ee.current||!ve)return;let Re=be.clientY-Ee.current.y,nt=be.clientX-Ee.current.x,ot=(ut==="top"?Math.min:Math.max)(0,Re),Ot=be.pointerType==="touch"?10:2;Math.abs(ot)>Ot?(Te=pe.current)==null||Te.style.setProperty("--swipe-amount",`${Re}px`):Math.abs(nt)>Ot&&(Ee.current=null)}},fe&&!p.jsx?l.createElement("button",{"aria-label":k,"data-disabled":Tt,"data-close-button":!0,onClick:Tt||!ve?()=>{}:()=>{var be;vt(),(be=p.onDismiss)==null||be.call(p,p)},className:Z($==null?void 0:$.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},l.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,p.jsx||l.isValidElement(p.title)?p.jsx||p.title:l.createElement(l.Fragment,null,ge||p.icon||p.promise?l.createElement("div",{"data-icon":"",className:Z($==null?void 0:$.icon,(a=p==null?void 0:p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||tn():null,p.type!=="loading"?p.icon||(re==null?void 0:re[ge])||dD(ge):null):null,l.createElement("div",{"data-content":"",className:Z($==null?void 0:$.content,(o=p==null?void 0:p.classNames)==null?void 0:o.content)},l.createElement("div",{"data-title":"",className:Z($==null?void 0:$.title,(s=p==null?void 0:p.classNames)==null?void 0:s.title)},p.title),p.description?l.createElement("div",{"data-description":"",className:Z(R,se,$==null?void 0:$.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},p.description):null),l.isValidElement(p.cancel)?p.cancel:p.cancel&&ni(p.cancel)?l.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||V,onClick:be=>{var Te,Re;ni(p.cancel)&&ve&&((Re=(Te=p.cancel).onClick)==null||Re.call(Te,be),vt())},className:Z($==null?void 0:$.cancelButton,(c=p==null?void 0:p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,l.isValidElement(p.action)?p.action:p.action&&ni(p.action)?l.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:be=>{var Te,Re;ni(p.action)&&(be.defaultPrevented||((Re=(Te=p.action).onClick)==null||Re.call(Te,be),vt()))},className:Z($==null?void 0:$.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function Sc(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var jD=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:i,closeButton:a,className:o,offset:s,theme:u="light",richColors:c,duration:f,style:h,visibleToasts:p=SD,toastOptions:g,dir:C=Sc(),gap:v=PD,loadingIcon:d,icons:D,containerAriaLabel:B="Notifications",pauseWhenPageIsHidden:w,cn:O=TD}=t,[b,E]=l.useState([]),S=l.useMemo(()=>Array.from(new Set([n].concat(b.filter(T=>T.position).map(T=>T.position)))),[b,n]),[F,V]=l.useState([]),[P,z]=l.useState(!1),[R,I]=l.useState(!1),[j,N]=l.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=l.useRef(null),_=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=l.useRef(null),re=l.useRef(!1),k=l.useCallback(T=>{var Z;(Z=b.find(H=>H.id===T.id))!=null&&Z.delete||Et.dismiss(T.id),E(H=>H.filter(({id:Q})=>Q!==T.id))},[b]);return l.useEffect(()=>Et.subscribe(T=>{if(T.dismiss){E(Z=>Z.map(H=>H.id===T.id?{...H,delete:!0}:H));return}setTimeout(()=>{Wt.flushSync(()=>{E(Z=>{let H=Z.findIndex(Q=>Q.id===T.id);return H!==-1?[...Z.slice(0,H),{...Z[H],...T},...Z.slice(H+1)]:[T,...Z]})})})}),[]),l.useEffect(()=>{if(u!=="system"){N(u);return}u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?N("dark"):N("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:T})=>{N(T?"dark":"light")})},[u]),l.useEffect(()=>{b.length<=1&&z(!1)},[b]),l.useEffect(()=>{let T=Z=>{var H,Q;r.every(K=>Z[K]||Z.code===K)&&(z(!0),(H=X.current)==null||H.focus()),Z.code==="Escape"&&(document.activeElement===X.current||(Q=X.current)!=null&&Q.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[r]),l.useEffect(()=>{if(X.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,re.current=!1)}},[X.current]),b.length?l.createElement("section",{"aria-label":`${B} ${_}`,tabIndex:-1},S.map((T,Z)=>{var H;let[Q,K]=T.split("-");return l.createElement("ol",{key:T,dir:C==="auto"?Sc():C,tabIndex:-1,ref:X,className:o,"data-sonner-toaster":!0,"data-theme":j,"data-y-position":Q,"data-x-position":K,style:{"--front-toast-height":`${((H=F[0])==null?void 0:H.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||AD,"--width":`${FD}px`,"--gap":`${v}px`,...h},onBlur:y=>{re.current&&!y.currentTarget.contains(y.relatedTarget)&&(re.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:y=>{y.target instanceof HTMLElement&&y.target.dataset.dismissible==="false"||re.current||(re.current=!0,$.current=y.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{R||z(!1)},onPointerDown:y=>{y.target instanceof HTMLElement&&y.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},b.filter(y=>!y.position&&Z===0||y.position===T).map((y,U)=>{var W,M;return l.createElement(RD,{key:y.id,icons:D,index:U,toast:y,defaultRichColors:c,duration:(W=g==null?void 0:g.duration)!=null?W:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:e,visibleToasts:p,closeButton:(M=g==null?void 0:g.closeButton)!=null?M:a,interacting:R,position:T,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:k,toasts:b.filter(J=>J.position==y.position),heights:F.filter(J=>J.position==y.position),setHeights:V,expandByDefault:i,gap:v,loadingIcon:d,expanded:P,pauseWhenPageIsHidden:w,cn:O})}))})):null};function ID({children:t}){function e(n){xD.custom(r=>x.jsx(Ll,{...n}))}return x.jsxs(wc.Provider,{value:{showToast:e},children:[x.jsx(jD,{}),t]})}he.AlertContainer=kc,he.AlertContent=Tc,he.AlertDescription=Rc,he.AlertIcon=jc,he.AlertTitle=_a,he.Badge=_c,he.BreadcrumbContainer=_0,he.BreadcrumbLink=W0,he.Button=gd,he.Card=Wc,he.Checkbox=yd,he.Divider=Uc,he.DrawerContainer=Z0,he.DrawerHeader=G0,he.DrawerProvider=lD,he.FormController=md,he.FormError=Cd,he.FormLabel=Dd,he.GoogleMap=ld,he.GoogleProvider=cD,he.GoogleSearchPlaces=Md,he.IconButton=kd,he.Input=ts,he.ModalContainer=Y0,he.ModalFooter=K0,he.ModalHeader=X0,he.ModalProvider=fD,he.Pagination=U0,he.Popover=J0,he.RadioBox=jd,he.RadioGroup=Rd,he.RichText=R0,he.Select=I0,he.Skeleton=cd,he.Switch=N0,he.TabButton=q0,he.TabContainer=V0,he.TableBody=fd,he.TableCaption=dd,he.TableContainer=pd,he.TableFooter=hd,he.TableHeader=vd,he.Textarea=z0,he.Toast=Ll,he.ToastProvider=ID,he.Tooltip=Q0,he.useAutomation=oD,he.useDrawer=sD,he.useModal=uD,he.useScopedParams=wl,he.useToast=Bc,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
109
+ */var Ei,_l;function Qy(){if(_l)return Ei;_l=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ei=a()?Object.assign:function(i,o){for(var s,u=r(i),c,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var h in s)e.call(s,h)&&(u[h]=s[h]);if(t){c=t(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(u[c[p]]=s[c[p]])}}return u},Ei}var wi,Wl;function Bi(){if(Wl)return wi;Wl=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return wi=t,wi}var xi,Ul;function Hl(){return Ul||(Ul=1,xi=Function.call.bind(Object.prototype.hasOwnProperty)),xi}var Li,Vl;function $y(){if(Vl)return Li;Vl=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Bi(),n={},r=Hl();t=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,u,c){if(process.env.NODE_ENV!=="production"){for(var f in i)if(r(i,f)){var h;try{if(typeof i[f]!="function"){var p=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=i[f](o,f,u,s,null,e)}catch(C){h=C}if(h&&!(h instanceof Error)&&t((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var v=c?c():"";t("Failed "+s+" type: "+h.message+(v??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Li=a,Li}var Si,ql;function eC(){if(ql)return Si;ql=1;var t=zl(),e=Qy(),n=Bi(),r=Hl(),a=$y(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return Si=function(s,u){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(T){var R=T&&(c&&T[c]||T[f]);if(typeof R=="function")return R}var p="<<anonymous>>",v={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:B(),arrayOf:E,element:O(),elementType:b(),instanceOf:w,node:F(),objectOf:P,oneOf:S,oneOfType:V,shape:k,exact:I};function C(T,R){return T===R?T!==0||1/T===1/R:T!==T&&R!==R}function g(T,R){this.message=T,this.data=R&&typeof R=="object"?R:{},this.stack=""}g.prototype=Error.prototype;function d(T){if(process.env.NODE_ENV!=="production")var R={},Z=0;function H(K,y,U,W,M,J,ne){if(W=W||p,J=J||U,ne!==n){if(u){var G=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 G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=W+":"+U;!R[ue]&&Z<3&&(i("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+W+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[ue]=!0,Z++)}}return y[U]==null?K?y[U]===null?new g("The "+M+" `"+J+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new g("The "+M+" `"+J+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:T(y,U,W,M,J)}var Q=H.bind(null,!1);return Q.isRequired=H.bind(null,!0),Q}function D(T){function R(Z,H,Q,K,y,U){var W=Z[H],M=X(W);if(M!==T){var J=_(W);return new g("Invalid "+K+" `"+y+"` of type "+("`"+J+"` supplied to `"+Q+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return d(R)}function B(){return d(o)}function E(T){function R(Z,H,Q,K,y){if(typeof T!="function")return new g("Property `"+y+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var U=Z[H];if(!Array.isArray(U)){var W=X(U);return new g("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an array."))}for(var M=0;M<U.length;M++){var J=T(U,M,Q,K,y+"["+M+"]",n);if(J instanceof Error)return J}return null}return d(R)}function O(){function T(R,Z,H,Q,K){var y=R[Z];if(!s(y)){var U=X(y);return new g("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return d(T)}function b(){function T(R,Z,H,Q,K){var y=R[Z];if(!t.isValidElementType(y)){var U=X(y);return new g("Invalid "+Q+" `"+K+"` of type "+("`"+U+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return d(T)}function w(T){function R(Z,H,Q,K,y){if(!(Z[H]instanceof T)){var U=T.name||p,W=re(Z[H]);return new g("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected ")+("instance of `"+U+"`."))}return null}return d(R)}function S(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function R(Z,H,Q,K,y){for(var U=Z[H],W=0;W<T.length;W++)if(C(U,T[W]))return null;var M=JSON.stringify(T,function(ne,G){var ue=_(G);return ue==="symbol"?String(G):G});return new g("Invalid "+K+" `"+y+"` of value `"+String(U)+"` "+("supplied to `"+Q+"`, expected one of "+M+"."))}return d(R)}function P(T){function R(Z,H,Q,K,y){if(typeof T!="function")return new g("Property `"+y+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var U=Z[H],W=X(U);if(W!=="object")return new g("Invalid "+K+" `"+y+"` of type "+("`"+W+"` supplied to `"+Q+"`, expected an object."));for(var M in U)if(r(U,M)){var J=T(U,M,Q,K,y+"."+M,n);if(J instanceof Error)return J}return null}return d(R)}function V(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var R=0;R<T.length;R++){var Z=T[R];if(typeof Z!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(Z)+" at index "+R+"."),o}function H(Q,K,y,U,W){for(var M=[],J=0;J<T.length;J++){var ne=T[J],G=ne(Q,K,y,U,W,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&M.push(G.data.expectedType)}var ue=M.length>0?", expected one of type ["+M.join(", ")+"]":"";return new g("Invalid "+U+" `"+W+"` supplied to "+("`"+y+"`"+ue+"."))}return d(H)}function F(){function T(R,Z,H,Q,K){return N(R[Z])?null:new g("Invalid "+Q+" `"+K+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return d(T)}function j(T,R,Z,H,Q){return new g((T||"React class")+": "+R+" type `"+Z+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function k(T){function R(Z,H,Q,K,y){var U=Z[H],W=X(U);if(W!=="object")return new g("Invalid "+K+" `"+y+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));for(var M in T){var J=T[M];if(typeof J!="function")return j(Q,K,y,M,_(J));var ne=J(U,M,Q,K,y+"."+M,n);if(ne)return ne}return null}return d(R)}function I(T){function R(Z,H,Q,K,y){var U=Z[H],W=X(U);if(W!=="object")return new g("Invalid "+K+" `"+y+"` of type `"+W+"` "+("supplied to `"+Q+"`, expected `object`."));var M=e({},Z[H],T);for(var J in M){var ne=T[J];if(r(T,J)&&typeof ne!="function")return j(Q,K,y,J,_(ne));if(!ne)return new g("Invalid "+K+" `"+y+"` key `"+J+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(Z[H],null," ")+`
110
+ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var G=ne(U,J,Q,K,y+"."+J,n);if(G)return G}return null}return d(R)}function N(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every(N);if(T===null||s(T))return!0;var R=h(T);if(R){var Z=R.call(T),H;if(R!==T.entries){for(;!(H=Z.next()).done;)if(!N(H.value))return!1}else for(;!(H=Z.next()).done;){var Q=H.value;if(Q&&!N(Q[1]))return!1}}else return!1;return!0;default:return!1}}function z(T,R){return T==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function X(T){var R=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":z(R,T)?"symbol":R}function _(T){if(typeof T>"u"||T===null)return""+T;var R=X(T);if(R==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return R}function $(T){var R=_(T);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function re(T){return!T.constructor||!T.constructor.name?p:T.constructor.name}return v.checkPropTypes=a,v.resetWarningCache=a.resetWarningCache,v.PropTypes=v,v},Si}var Ai,Zl;function tC(){if(Zl)return Ai;Zl=1;var t=Bi();function e(){}function n(){}return n.resetWarningCache=e,Ai=function(){function r(o,s,u,c,f,h){if(h!==t){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},Ai}if(process.env.NODE_ENV!=="production"){var nC=zl(),rC=!0;bi.exports=eC()(nC.isElement,rC)}else bi.exports=tC()();var Kr=bi.exports,Xr={};Object.defineProperty(Xr,"__esModule",{value:!0});var aC=rr,Oi=iC(aC);function iC(t){return t&&t.__esModule?t:{default:t}}var oC={mountFlag:!1,initialized:!1,scroller:null,containers:{},mount:function(e){this.scroller=e,this.handleHashChange=this.handleHashChange.bind(this),window.addEventListener("hashchange",this.handleHashChange),this.initStateFromHash(),this.mountFlag=!0},mapContainer:function(e,n){this.containers[e]=n},isMounted:function(){return this.mountFlag},isInitialized:function(){return this.initialized},initStateFromHash:function(){var e=this,n=this.getHash();n?window.setTimeout(function(){e.scrollTo(n,!0),e.initialized=!0},10):this.initialized=!0},scrollTo:function(e,n){var r=this.scroller,a=r.get(e);if(a&&(n||e!==r.getActiveLink())){var i=this.containers[e]||document;r.scrollTo(e,{container:i})}},getHash:function(){return Oi.default.getHash()},changeHash:function(e,n){this.isInitialized()&&Oi.default.getHash()!==e&&Oi.default.updateHash(e,n)},handleHashChange:function(){this.scrollTo(this.getHash())},unmount:function(){this.scroller=null,this.containers=null,window.removeEventListener("hashchange",this.handleHashChange)}};Xr.default=oC,Object.defineProperty(er,"__esModule",{value:!0});var Jr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sC=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),uC=l,Gl=or(uC),lC=tr,Qr=or(lC),cC=On,fC=or(cC),dC=Kr,Ye=or(dC),pC=Xr,$t=or(pC);function or(t){return t&&t.__esModule?t:{default:t}}function hC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Yl={to:Ye.default.string.isRequired,containerId:Ye.default.string,container:Ye.default.object,activeClass:Ye.default.string,activeStyle:Ye.default.object,spy:Ye.default.bool,horizontal:Ye.default.bool,smooth:Ye.default.oneOfType([Ye.default.bool,Ye.default.string]),offset:Ye.default.number,delay:Ye.default.number,isDynamic:Ye.default.bool,onClick:Ye.default.func,duration:Ye.default.oneOfType([Ye.default.number,Ye.default.func]),absolute:Ye.default.bool,onSetActive:Ye.default.func,onSetInactive:Ye.default.func,ignoreCancelEvents:Ye.default.bool,hashSpy:Ye.default.bool,saveHashHistory:Ye.default.bool,spyThrottle:Ye.default.number};er.default=function(t,e){var n=e||fC.default,r=function(i){gC(o,i);function o(s){hC(this,o);var u=vC(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,s));return a.call(u),u.state={active:!1},u}return sC(o,[{key:"getScrollSpyContainer",value:function(){var u=this.props.containerId,c=this.props.container;return u&&!c?document.getElementById(u):c&&c.nodeType?c:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var u=this.getScrollSpyContainer();Qr.default.isMounted(u)||Qr.default.mount(u,this.props.spyThrottle),this.props.hashSpy&&($t.default.isMounted()||$t.default.mount(n),$t.default.mapContainer(this.props.to,u)),Qr.default.addSpyHandler(this.spyHandler,u),this.setState({container:u})}}},{key:"componentWillUnmount",value:function(){Qr.default.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var u="";this.state&&this.state.active?u=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():u=this.props.className;var c={};this.state&&this.state.active?c=Jr({},this.props.style,this.props.activeStyle):c=Jr({},this.props.style);var f=Jr({},this.props);for(var h in Yl)f.hasOwnProperty(h)&&delete f[h];return f.className=u,f.style=c,f.onClick=this.handleClick,Gl.default.createElement(t,f)}}]),o}(Gl.default.PureComponent),a=function(){var o=this;this.scrollTo=function(s,u){n.scrollTo(s,Jr({},o.state,u))},this.handleClick=function(s){o.props.onClick&&o.props.onClick(s),s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),o.scrollTo(o.props.to,o.props)},this.spyHandler=function(s,u){var c=o.getScrollSpyContainer();if(!($t.default.isMounted()&&!$t.default.isInitialized())){var f=o.props.horizontal,h=o.props.to,p=null,v=void 0,C=void 0;if(f){var g=0,d=0,D=0;if(c.getBoundingClientRect){var B=c.getBoundingClientRect();D=B.left}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var E=p.getBoundingClientRect();g=E.left-D+s,d=g+E.width}var O=s-o.props.offset;v=O>=Math.floor(g)&&O<Math.floor(d),C=O<Math.floor(g)||O>=Math.floor(d)}else{var b=0,w=0,S=0;if(c.getBoundingClientRect){var P=c.getBoundingClientRect();S=P.top}if(!p||o.props.isDynamic){if(p=n.get(h),!p)return;var V=p.getBoundingClientRect();b=V.top-S+u,w=b+V.height}var F=u-o.props.offset;v=F>=Math.floor(b)&&F<Math.floor(w),C=F<Math.floor(b)||F>=Math.floor(w)}var j=n.getActiveLink();if(C){if(h===j&&n.setActiveLink(void 0),o.props.hashSpy&&$t.default.getHash()===h){var k=o.props.saveHashHistory,I=k===void 0?!1:k;$t.default.changeHash("",I)}o.props.spy&&o.state.active&&(o.setState({active:!1}),o.props.onSetInactive&&o.props.onSetInactive(h,p))}if(v&&(j!==h||o.state.active===!1)){n.setActiveLink(h);var N=o.props.saveHashHistory,z=N===void 0?!1:N;o.props.hashSpy&&$t.default.changeHash(h,z),o.props.spy&&(o.setState({active:!0}),o.props.onSetActive&&o.props.onSetActive(h,p))}}}};return r.propTypes=Yl,r.defaultProps={offset:0},r},Object.defineProperty(di,"__esModule",{value:!0});var mC=l,Kl=Xl(mC),yC=er,CC=Xl(yC);function Xl(t){return t&&t.__esModule?t:{default:t}}function DC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jl(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function bC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var EC=function(t){bC(e,t);function e(){var n,r,a,i;DC(this,e);for(var o=arguments.length,s=Array(o),u=0;u<o;u++)s[u]=arguments[u];return i=(r=(a=Jl(this,(n=e.__proto__||Object.getPrototypeOf(e)).call.apply(n,[this].concat(s))),a),a.render=function(){return Kl.default.createElement("a",a.props,a.props.children)},r),Jl(a,i)}return e}(Kl.default.Component);di.default=(0,CC.default)(EC);var Fi={};Object.defineProperty(Fi,"__esModule",{value:!0});var wC=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),BC=l,Ql=$l(BC),xC=er,LC=$l(xC);function $l(t){return t&&t.__esModule?t:{default:t}}function SC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function OC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var FC=function(t){OC(e,t);function e(){return SC(this,e),AC(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return wC(e,[{key:"render",value:function(){return Ql.default.createElement("button",this.props,this.props.children)}}]),e}(Ql.default.Component);Fi.default=(0,LC.default)(FC);var Pi={},$r={};Object.defineProperty($r,"__esModule",{value:!0});var PC=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},MC=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),kC=l,ec=ea(kC),TC=Wt;ea(TC);var RC=On,tc=ea(RC),jC=Kr,nc=ea(jC);function ea(t){return t&&t.__esModule?t:{default:t}}function IC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function NC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function zC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}$r.default=function(t){var e=function(n){zC(r,n);function r(a){IC(this,r);var i=NC(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,a));return i.childBindings={domNode:null},i}return MC(r,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(i){this.props.name!==i.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;tc.default.unregister(this.props.name)}},{key:"registerElems",value:function(i){tc.default.register(i,this.childBindings.domNode)}},{key:"render",value:function(){return ec.default.createElement(t,PC({},this.props,{parentBindings:this.childBindings}))}}]),r}(ec.default.Component);return e.propTypes={name:nc.default.string,id:nc.default.string},e},Object.defineProperty(Pi,"__esModule",{value:!0});var rc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_C=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),WC=l,ac=Mi(WC),UC=$r,HC=Mi(UC),VC=Kr,ic=Mi(VC);function Mi(t){return t&&t.__esModule?t:{default:t}}function qC(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZC(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function GC(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var oc=function(t){GC(e,t);function e(){return qC(this,e),ZC(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _C(e,[{key:"render",value:function(){var r=this,a=rc({},this.props);return delete a.name,a.parentBindings&&delete a.parentBindings,ac.default.createElement("div",rc({},a,{ref:function(o){r.props.parentBindings.domNode=o}}),this.props.children)}}]),e}(ac.default.Component);oc.propTypes={name:ic.default.string,id:ic.default.string},Pi.default=(0,HC.default)(oc);var ki=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sc=function(){function t(e,n){for(var r=0;r<n.length;r++){var a=n[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();function uc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function cc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ta=l,mn=tr,Ti=On,Qe=Kr,en=Xr,fc={to:Qe.string.isRequired,containerId:Qe.string,container:Qe.object,activeClass:Qe.string,spy:Qe.bool,smooth:Qe.oneOfType([Qe.bool,Qe.string]),offset:Qe.number,delay:Qe.number,isDynamic:Qe.bool,onClick:Qe.func,duration:Qe.oneOfType([Qe.number,Qe.func]),absolute:Qe.bool,onSetActive:Qe.func,onSetInactive:Qe.func,ignoreCancelEvents:Qe.bool,hashSpy:Qe.bool,spyThrottle:Qe.number},YC={Scroll:function(e,n){console.warn("Helpers.Scroll is deprecated since v1.7.0");var r=n||Ti,a=function(o){cc(s,o);function s(u){uc(this,s);var c=lc(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,u));return i.call(c),c.state={active:!1},c}return sc(s,[{key:"getScrollSpyContainer",value:function(){var c=this.props.containerId,f=this.props.container;return c?document.getElementById(c):f&&f.nodeType?f:document}},{key:"componentDidMount",value:function(){if(this.props.spy||this.props.hashSpy){var c=this.getScrollSpyContainer();mn.isMounted(c)||mn.mount(c,this.props.spyThrottle),this.props.hashSpy&&(en.isMounted()||en.mount(r),en.mapContainer(this.props.to,c)),this.props.spy&&mn.addStateHandler(this.stateHandler),mn.addSpyHandler(this.spyHandler,c),this.setState({container:c})}}},{key:"componentWillUnmount",value:function(){mn.unmount(this.stateHandler,this.spyHandler)}},{key:"render",value:function(){var c="";this.state&&this.state.active?c=((this.props.className||"")+" "+(this.props.activeClass||"active")).trim():c=this.props.className;var f=ki({},this.props);for(var h in fc)f.hasOwnProperty(h)&&delete f[h];return f.className=c,f.onClick=this.handleClick,ta.createElement(e,f)}}]),s}(ta.Component),i=function(){var s=this;this.scrollTo=function(u,c){r.scrollTo(u,ki({},s.state,c))},this.handleClick=function(u){s.props.onClick&&s.props.onClick(u),u.stopPropagation&&u.stopPropagation(),u.preventDefault&&u.preventDefault(),s.scrollTo(s.props.to,s.props)},this.stateHandler=function(){r.getActiveLink()!==s.props.to&&(s.state!==null&&s.state.active&&s.props.onSetInactive&&s.props.onSetInactive(),s.setState({active:!1}))},this.spyHandler=function(u){var c=s.getScrollSpyContainer();if(!(en.isMounted()&&!en.isInitialized())){var f=s.props.to,h=null,p=0,v=0,C=0;if(c.getBoundingClientRect){var g=c.getBoundingClientRect();C=g.top}if(!h||s.props.isDynamic){if(h=r.get(f),!h)return;var d=h.getBoundingClientRect();p=d.top-C+u,v=p+d.height}var D=u-s.props.offset,B=D>=Math.floor(p)&&D<Math.floor(v),E=D<Math.floor(p)||D>=Math.floor(v),O=r.getActiveLink();if(E)return f===O&&r.setActiveLink(void 0),s.props.hashSpy&&en.getHash()===f&&en.changeHash(),s.props.spy&&s.state.active&&(s.setState({active:!1}),s.props.onSetInactive&&s.props.onSetInactive()),mn.updateStates();if(B&&O!==f)return r.setActiveLink(f),s.props.hashSpy&&en.changeHash(f),s.props.spy&&(s.setState({active:!0}),s.props.onSetActive&&s.props.onSetActive(f)),mn.updateStates()}}};return a.propTypes=fc,a.defaultProps={offset:0},a},Element:function(e){console.warn("Helpers.Element is deprecated since v1.7.0");var n=function(r){cc(a,r);function a(i){uc(this,a);var o=lc(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,i));return o.childBindings={domNode:null},o}return sc(a,[{key:"componentDidMount",value:function(){if(typeof window>"u")return!1;this.registerElems(this.props.name)}},{key:"componentDidUpdate",value:function(o){this.props.name!==o.name&&this.registerElems(this.props.name)}},{key:"componentWillUnmount",value:function(){if(typeof window>"u")return!1;Ti.unregister(this.props.name)}},{key:"registerElems",value:function(o){Ti.register(o,this.childBindings.domNode)}},{key:"render",value:function(){return ta.createElement(e,ki({},this.props,{parentBindings:this.childBindings}))}}]),a}(ta.Component);return n.propTypes={name:Qe.string,id:Qe.string},n}},KC=YC;Object.defineProperty(et,"__esModule",{value:!0}),et.Helpers=et.ScrollElement=et.ScrollLink=Ec=et.animateScroll=et.scrollSpy=et.Events=et.scroller=et.Element=et.Button=et.Link=void 0;var XC=di,dc=kt(XC),JC=Fi,pc=kt(JC),QC=Pi,hc=kt(QC),$C=On,vc=kt($C),eD=ar,gc=kt(eD),tD=tr,mc=kt(tD),nD=Hr,yc=kt(nD),rD=er,Cc=kt(rD),aD=$r,Dc=kt(aD),iD=KC,bc=kt(iD);function kt(t){return t&&t.__esModule?t:{default:t}}et.Link=dc.default,et.Button=pc.default,et.Element=hc.default,et.scroller=vc.default,et.Events=gc.default,et.scrollSpy=mc.default;var Ec=et.animateScroll=yc.default;et.ScrollLink=Cc.default,et.ScrollElement=Dc.default,et.Helpers=bc.default,et.default={Link:dc.default,Button:pc.default,Element:hc.default,scroller:vc.default,Events:gc.default,scrollSpy:mc.default,animateScroll:yc.default,ScrollLink:Cc.default,ScrollElement:Dc.default,Helpers:bc.default};const Ri=l.createContext({}),wc=l.createContext({});function Bc(){const t=l.useContext(wc);if(Object.entries(t).length===0)throw new Error("useToast must be used within a Provider");return t}function xc(t){return t&&typeof t.title=="string"&&typeof t.message=="string"&&(t.size===void 0||t.size==="md"||t.size==="lg")&&(t.type==="info"||t.type==="success"||t.type==="danger"||t.type==="warning")}function oD(){const t=Dn.useActionData(),{closeModal:e}=l.useContext(Ri),{showToast:n}=Bc();l.useEffect(()=>{const r=t==null?void 0:t.closeModalKey;r&&e(r)},[t]),l.useEffect(()=>{const r=t==null?void 0:t.toast,a=t==null?void 0:t.message;xc(r)&&n(r),!xc(r)&&a&&n({message:a,title:"Atenção!",type:"warning"})},[t]),l.useEffect(()=>{var r,a;if(typeof((r=t==null?void 0:t.data)==null?void 0:r.scrollTo)=="string"){const i=document.getElementById((a=t==null?void 0:t.data)==null?void 0:a.scrollTo);i&&Ec.scrollTo(i.offsetTop-200)}},[t])}const Lc=l.createContext({});function sD(t){const e=l.useContext(Lc);if(Object.entries(e).length===0)throw new Error("useDrawer must be used within a Provider");if(t){const{drawerData:n,drawerIsOpen:r,openDrawer:a,closeDrawer:i}=e,o=r(t),s=n(t);return{drawerIsOpen:o,drawerData:s,openDrawer:f=>a(t,f),closeDrawer:()=>i(t)}}else return e}function uD(t){const e=l.useContext(Ri);if(Object.entries(e).length===0)throw new Error("useModal must be used within a Provider");if(t){const{modalData:n,modalIsOpen:r,openModal:a,closeModal:i}=e,o=r(t),s=n(t);return{modalIsOpen:o,modalData:s,openModal:f=>a(t,f),closeModal:()=>i(t)}}else return e}function lD(t){const{children:e=!1}=t,[n,r]=l.useState([]);function a(u){return!!n.some(c=>c.key===u)}function i(u){var c;return(c=n.find(f=>f.key===u))==null?void 0:c.data}function o(u,c){const f=a(u);r(f?h=>[...h.filter(v=>v.key!==u),{key:u,data:c}]:[...n,{key:u,data:c}])}function s(u){r(n.filter(c=>c.key!==u))}return x.jsx(Lc.Provider,{value:{drawerIsOpen:a,drawerData:i,openDrawer:o,closeDrawer:s},children:e})}function cD({googleMapsApiKey:t,children:e,...n}){return x.jsx(nf,{libraries:["places","marker","maps"],googleMapsApiKey:t,...n,children:e})}function fD(t){const{children:e=!1}=t,[n,r]=l.useState([]);function a(u){return!!n.some(c=>c.key===u)}function i(u){var c;return(c=n.find(f=>f.key===u))==null?void 0:c.data}function o(u,c){const f=a(u);r(f?h=>[...h.filter(v=>v.key!==u),{key:u,data:c}]:[...n,{key:u,data:c}])}function s(u){r(n.filter(c=>c.key!==u))}return x.jsx(Ri.Provider,{value:{modalIsOpen:a,modalData:i,openModal:o,closeModal:s},children:e})}var dD=t=>{switch(t){case"success":return vD;case"info":return mD;case"warning":return gD;case"error":return yD;default:return null}},pD=Array(12).fill(0),hD=({visible:t})=>l.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},l.createElement("div",{className:"sonner-spinner"},pD.map((e,n)=>l.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),vD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),yD=l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),CD=()=>{let[t,e]=l.useState(document.hidden);return l.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},ji=1,DD=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,a=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:ji++,i=this.toasts.find(s=>s.id===a),o=t.dismissible===void 0?!0:t.dismissible;return i?this.toasts=this.toasts.map(s=>s.id===a?(this.publish({...s,...t,id:a,title:n}),{...s,...t,id:a,dismissible:o,title:n}):s):this.addToast({title:n,...r,dismissible:o,id:a}),a},this.dismiss=t=>(t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),a=n!==void 0;return r.then(async i=>{if(ED(i)&&!i.ok){a=!1;let o=typeof e.error=="function"?await e.error(`HTTP error! status: ${i.status}`):e.error,s=typeof e.description=="function"?await e.description(`HTTP error! status: ${i.status}`):e.description;this.create({id:n,type:"error",message:o,description:s})}else if(e.success!==void 0){a=!1;let o=typeof e.success=="function"?await e.success(i):e.success,s=typeof e.description=="function"?await e.description(i):e.description;this.create({id:n,type:"success",message:o,description:s})}}).catch(async i=>{if(e.error!==void 0){a=!1;let o=typeof e.error=="function"?await e.error(i):e.error,s=typeof e.description=="function"?await e.description(i):e.description;this.create({id:n,type:"error",message:o,description:s})}}).finally(()=>{var i;a&&(this.dismiss(n),n=void 0),(i=e.finally)==null||i.call(e)}),n},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||ji++;return this.create({jsx:t(n),id:n,...e}),n},this.subscribers=[],this.toasts=[]}},Et=new DD,bD=(t,e)=>{let n=(e==null?void 0:e.id)||ji++;return Et.addToast({title:t,...e,id:n}),n},ED=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",wD=bD,BD=()=>Et.toasts,xD=Object.assign(wD,{success:Et.success,info:Et.info,warning:Et.warning,error:Et.error,custom:Et.custom,message:Et.message,promise:Et.promise,dismiss:Et.dismiss,loading:Et.loading},{getHistory:BD});function LD(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}LD(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
111
+ `);function na(t){return t.label!==void 0}var SD=3,AD="32px",OD=4e3,FD=356,PD=14,MD=20,kD=200;function TD(...t){return t.filter(Boolean).join(" ")}var RD=t=>{var e,n,r,a,i,o,s,u,c,f;let{invert:h,toast:p,unstyled:v,interacting:C,setHeights:g,visibleToasts:d,heights:D,index:B,toasts:E,expanded:O,removeToast:b,defaultRichColors:w,closeButton:S,style:P,cancelButtonStyle:V,actionButtonStyle:F,className:j="",descriptionClassName:k="",duration:I,position:N,gap:z,loadingIcon:X,expandByDefault:_,classNames:$,icons:re,closeButtonAriaLabel:T="Close toast",pauseWhenPageIsHidden:R,cn:Z}=t,[H,Q]=l.useState(!1),[K,y]=l.useState(!1),[U,W]=l.useState(!1),[M,J]=l.useState(!1),[ne,G]=l.useState(0),[ue,ie]=l.useState(0),de=l.useRef(null),pe=l.useRef(null),Ce=B===0,ye=B+1<=d,ge=p.type,ve=p.dismissible!==!1,Ie=p.className||"",se=p.descriptionClassName||"",Ne=l.useMemo(()=>D.findIndex(be=>be.toastId===p.id)||0,[D,p.id]),fe=l.useMemo(()=>{var be;return(be=p.closeButton)!=null?be:S},[p.closeButton,S]),we=l.useMemo(()=>p.duration||I||OD,[p.duration,I]),Me=l.useRef(0),He=l.useRef(0),qe=l.useRef(0),Ee=l.useRef(null),[ut,it]=N.split("-"),At=l.useMemo(()=>D.reduce((be,Te,Re)=>Re>=Ne?be:be+Te.height,0),[D,Ne]),ht=CD(),wt=p.invert||h,Tt=ge==="loading";He.current=l.useMemo(()=>Ne*z+At,[Ne,At]),l.useEffect(()=>{Q(!0)},[]),l.useLayoutEffect(()=>{if(!H)return;let be=pe.current,Te=be.style.height;be.style.height="auto";let Re=be.getBoundingClientRect().height;be.style.height=Te,ie(Re),g(nt=>nt.find(ot=>ot.toastId===p.id)?nt.map(ot=>ot.toastId===p.id?{...ot,height:Re}:ot):[{toastId:p.id,height:Re,position:p.position},...nt])},[H,p.title,p.description,g,p.id]);let vt=l.useCallback(()=>{y(!0),G(He.current),g(be=>be.filter(Te=>Te.toastId!==p.id)),setTimeout(()=>{b(p)},kD)},[p,b,g,He]);l.useEffect(()=>{if(p.promise&&ge==="loading"||p.duration===1/0||p.type==="loading")return;let be,Te=we;return O||C||R&&ht?(()=>{if(qe.current<Me.current){let Re=new Date().getTime()-Me.current;Te=Te-Re}qe.current=new Date().getTime()})():Te!==1/0&&(Me.current=new Date().getTime(),be=setTimeout(()=>{var Re;(Re=p.onAutoClose)==null||Re.call(p,p),vt()},Te)),()=>clearTimeout(be)},[O,C,_,p,we,vt,p.promise,ge,R,ht]),l.useEffect(()=>{let be=pe.current;if(be){let Te=be.getBoundingClientRect().height;return ie(Te),g(Re=>[{toastId:p.id,height:Te,position:p.position},...Re]),()=>g(Re=>Re.filter(nt=>nt.toastId!==p.id))}},[g,p.id]),l.useEffect(()=>{p.delete&&vt()},[vt,p.delete]);function tn(){return re!=null&&re.loading?l.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},re.loading):X?l.createElement("div",{className:"sonner-loader","data-visible":ge==="loading"},X):l.createElement(hD,{visible:ge==="loading"})}return l.createElement("li",{"aria-live":p.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:pe,className:Z(j,Ie,$==null?void 0:$.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,$==null?void 0:$.default,$==null?void 0:$[ge],(n=p==null?void 0:p.classNames)==null?void 0:n[ge]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:w,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":H,"data-promise":!!p.promise,"data-removed":K,"data-visible":ye,"data-y-position":ut,"data-x-position":it,"data-index":B,"data-front":Ce,"data-swiping":U,"data-dismissible":ve,"data-type":ge,"data-invert":wt,"data-swipe-out":M,"data-expanded":!!(O||_&&H),style:{"--index":B,"--toasts-before":B,"--z-index":E.length-B,"--offset":`${K?ne:He.current}px`,"--initial-height":_?"auto":`${ue}px`,...P,...p.style},onPointerDown:be=>{Tt||!ve||(de.current=new Date,G(He.current),be.target.setPointerCapture(be.pointerId),be.target.tagName!=="BUTTON"&&(W(!0),Ee.current={x:be.clientX,y:be.clientY}))},onPointerUp:()=>{var be,Te,Re,nt;if(M||!ve)return;Ee.current=null;let ot=Number(((be=pe.current)==null?void 0:be.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Ot=new Date().getTime()-((Te=de.current)==null?void 0:Te.getTime()),yn=Math.abs(ot)/Ot;if(Math.abs(ot)>=MD||yn>.11){G(He.current),(Re=p.onDismiss)==null||Re.call(p,p),vt(),J(!0);return}(nt=pe.current)==null||nt.style.setProperty("--swipe-amount","0px"),W(!1)},onPointerMove:be=>{var Te;if(!Ee.current||!ve)return;let Re=be.clientY-Ee.current.y,nt=be.clientX-Ee.current.x,ot=(ut==="top"?Math.min:Math.max)(0,Re),Ot=be.pointerType==="touch"?10:2;Math.abs(ot)>Ot?(Te=pe.current)==null||Te.style.setProperty("--swipe-amount",`${Re}px`):Math.abs(nt)>Ot&&(Ee.current=null)}},fe&&!p.jsx?l.createElement("button",{"aria-label":T,"data-disabled":Tt,"data-close-button":!0,onClick:Tt||!ve?()=>{}:()=>{var be;vt(),(be=p.onDismiss)==null||be.call(p,p)},className:Z($==null?void 0:$.closeButton,(a=p==null?void 0:p.classNames)==null?void 0:a.closeButton)},l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},l.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,p.jsx||l.isValidElement(p.title)?p.jsx||p.title:l.createElement(l.Fragment,null,ge||p.icon||p.promise?l.createElement("div",{"data-icon":"",className:Z($==null?void 0:$.icon,(i=p==null?void 0:p.classNames)==null?void 0:i.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||tn():null,p.type!=="loading"?p.icon||(re==null?void 0:re[ge])||dD(ge):null):null,l.createElement("div",{"data-content":"",className:Z($==null?void 0:$.content,(o=p==null?void 0:p.classNames)==null?void 0:o.content)},l.createElement("div",{"data-title":"",className:Z($==null?void 0:$.title,(s=p==null?void 0:p.classNames)==null?void 0:s.title)},p.title),p.description?l.createElement("div",{"data-description":"",className:Z(k,se,$==null?void 0:$.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},p.description):null),l.isValidElement(p.cancel)?p.cancel:p.cancel&&na(p.cancel)?l.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||V,onClick:be=>{var Te,Re;na(p.cancel)&&ve&&((Re=(Te=p.cancel).onClick)==null||Re.call(Te,be),vt())},className:Z($==null?void 0:$.cancelButton,(c=p==null?void 0:p.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,l.isValidElement(p.action)?p.action:p.action&&na(p.action)?l.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||F,onClick:be=>{var Te,Re;na(p.action)&&(be.defaultPrevented||((Re=(Te=p.action).onClick)==null||Re.call(Te,be),vt()))},className:Z($==null?void 0:$.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function Sc(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var jD=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:a,closeButton:i,className:o,offset:s,theme:u="light",richColors:c,duration:f,style:h,visibleToasts:p=SD,toastOptions:v,dir:C=Sc(),gap:g=PD,loadingIcon:d,icons:D,containerAriaLabel:B="Notifications",pauseWhenPageIsHidden:E,cn:O=TD}=t,[b,w]=l.useState([]),S=l.useMemo(()=>Array.from(new Set([n].concat(b.filter(R=>R.position).map(R=>R.position)))),[b,n]),[P,V]=l.useState([]),[F,j]=l.useState(!1),[k,I]=l.useState(!1),[N,z]=l.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=l.useRef(null),_=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=l.useRef(null),re=l.useRef(!1),T=l.useCallback(R=>{var Z;(Z=b.find(H=>H.id===R.id))!=null&&Z.delete||Et.dismiss(R.id),w(H=>H.filter(({id:Q})=>Q!==R.id))},[b]);return l.useEffect(()=>Et.subscribe(R=>{if(R.dismiss){w(Z=>Z.map(H=>H.id===R.id?{...H,delete:!0}:H));return}setTimeout(()=>{Wt.flushSync(()=>{w(Z=>{let H=Z.findIndex(Q=>Q.id===R.id);return H!==-1?[...Z.slice(0,H),{...Z[H],...R},...Z.slice(H+1)]:[R,...Z]})})})}),[]),l.useEffect(()=>{if(u!=="system"){z(u);return}u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:R})=>{z(R?"dark":"light")})},[u]),l.useEffect(()=>{b.length<=1&&j(!1)},[b]),l.useEffect(()=>{let R=Z=>{var H,Q;r.every(K=>Z[K]||Z.code===K)&&(j(!0),(H=X.current)==null||H.focus()),Z.code==="Escape"&&(document.activeElement===X.current||(Q=X.current)!=null&&Q.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[r]),l.useEffect(()=>{if(X.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,re.current=!1)}},[X.current]),b.length?l.createElement("section",{"aria-label":`${B} ${_}`,tabIndex:-1},S.map((R,Z)=>{var H;let[Q,K]=R.split("-");return l.createElement("ol",{key:R,dir:C==="auto"?Sc():C,tabIndex:-1,ref:X,className:o,"data-sonner-toaster":!0,"data-theme":N,"data-y-position":Q,"data-x-position":K,style:{"--front-toast-height":`${((H=P[0])==null?void 0:H.height)||0}px`,"--offset":typeof s=="number"?`${s}px`:s||AD,"--width":`${FD}px`,"--gap":`${g}px`,...h},onBlur:y=>{re.current&&!y.currentTarget.contains(y.relatedTarget)&&(re.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:y=>{y.target instanceof HTMLElement&&y.target.dataset.dismissible==="false"||re.current||(re.current=!0,$.current=y.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{k||j(!1)},onPointerDown:y=>{y.target instanceof HTMLElement&&y.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},b.filter(y=>!y.position&&Z===0||y.position===R).map((y,U)=>{var W,M;return l.createElement(RD,{key:y.id,icons:D,index:U,toast:y,defaultRichColors:c,duration:(W=v==null?void 0:v.duration)!=null?W:f,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:e,visibleToasts:p,closeButton:(M=v==null?void 0:v.closeButton)!=null?M:i,interacting:k,position:R,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:T,toasts:b.filter(J=>J.position==y.position),heights:P.filter(J=>J.position==y.position),setHeights:V,expandByDefault:a,gap:g,loadingIcon:d,expanded:F,pauseWhenPageIsHidden:E,cn:O})}))})):null};function ID({children:t}){function e(n){xD.custom(r=>x.jsx(Ll,{...n}))}return x.jsxs(wc.Provider,{value:{showToast:e},children:[x.jsx(jD,{}),t]})}he.AlertContainer=kc,he.AlertContent=Tc,he.AlertDescription=Rc,he.AlertIcon=jc,he.AlertTitle=_i,he.Badge=_c,he.BreadcrumbContainer=_0,he.BreadcrumbLink=W0,he.Button=gd,he.Card=Wc,he.Checkbox=yd,he.Divider=Uc,he.DrawerContainer=Z0,he.DrawerHeader=G0,he.DrawerProvider=lD,he.FormController=md,he.FormError=Cd,he.FormLabel=Dd,he.GoogleMap=ld,he.GoogleProvider=cD,he.GoogleSearchPlaces=Md,he.IconButton=kd,he.Input=ts,he.ModalContainer=Y0,he.ModalFooter=K0,he.ModalHeader=X0,he.ModalProvider=fD,he.Pagination=U0,he.Popover=J0,he.RadioBox=jd,he.RadioGroup=Rd,he.RichText=R0,he.Select=I0,he.Skeleton=cd,he.Switch=N0,he.TabButton=q0,he.TabContainer=V0,he.TableBody=fd,he.TableCaption=dd,he.TableContainer=pd,he.TableFooter=hd,he.TableHeader=vd,he.Textarea=z0,he.Toast=Ll,he.ToastProvider=ID,he.Tooltip=Q0,he.useAutomation=oD,he.useDrawer=sD,he.useModal=uD,he.useScopedParams=wl,he.useToast=Bc,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});