@yext/pages-components 1.2.4 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,61 +0,0 @@
1
- "use strict";var Tp=Object.defineProperty;var Op=(n,e,t)=>e in n?Tp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var m=(n,e,t)=>Op(n,typeof e!="symbol"?e+"":e,t);const W=require("react"),Np=require("react-dom"),Oo=require("mapbox-gl");function Ap(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Fp=Ap(W);var No=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ao={exports:{}},xr={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Dl;function Mp(){if(Dl)return xr;Dl=1;var n=W,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,u){var c,d={},h=null,f=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(f=l.ref);for(c in l)r.call(l,c)&&!s.hasOwnProperty(c)&&(d[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)d[c]===void 0&&(d[c]=l[c]);return{$$typeof:e,type:a,key:h,ref:f,props:d,_owner:i.current}}return xr.Fragment=t,xr.jsx=o,xr.jsxs=o,xr}var br={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Ll;function Ip(){return Ll||(Ll=1,process.env.NODE_ENV!=="production"&&function(){var n=W,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),p=Symbol.iterator,_="@@iterator";function y(w){if(w===null||typeof w!="object")return null;var F=p&&w[p]||w[_];return typeof F=="function"?F:null}var x=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(w){{for(var F=arguments.length,$=new Array(F>1?F-1:0),V=1;V<F;V++)$[V-1]=arguments[V];v("error",w,$)}}function v(w,F,$){{var V=x.ReactDebugCurrentFrame,ne=V.getStackAddendum();ne!==""&&(F+="%s",$=$.concat([ne]));var ae=$.map(function(J){return String(J)});ae.unshift("Warning: "+F),Function.prototype.apply.call(console[w],console,ae)}}var C=!1,S=!1,b=!1,k=!1,T=!1,E;E=Symbol.for("react.module.reference");function O(w){return!!(typeof w=="string"||typeof w=="function"||w===r||w===s||T||w===i||w===u||w===c||k||w===f||C||S||b||typeof w=="object"&&w!==null&&(w.$$typeof===h||w.$$typeof===d||w.$$typeof===o||w.$$typeof===a||w.$$typeof===l||w.$$typeof===E||w.getModuleId!==void 0))}function D(w,F,$){var V=w.displayName;if(V)return V;var ne=F.displayName||F.name||"";return ne!==""?$+"("+ne+")":$}function Z(w){return w.displayName||"Context"}function j(w){if(w==null)return null;if(typeof w.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case r:return"Fragment";case t:return"Portal";case s:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case a:var F=w;return Z(F)+".Consumer";case o:var $=w;return Z($._context)+".Provider";case l:return D(w,w.render,"ForwardRef");case d:var V=w.displayName||null;return V!==null?V:j(w.type)||"Memo";case h:{var ne=w,ae=ne._payload,J=ne._init;try{return j(J(ae))}catch{return null}}}return null}var K=Object.assign,te=0,me,be,le,he,ze,xt,ke;function jt(){}jt.__reactDisabledLog=!0;function He(){{if(te===0){me=console.log,be=console.info,le=console.warn,he=console.error,ze=console.group,xt=console.groupCollapsed,ke=console.groupEnd;var w={configurable:!0,enumerable:!0,value:jt,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}te++}}function rt(){{if(te--,te===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},w,{value:me}),info:K({},w,{value:be}),warn:K({},w,{value:le}),error:K({},w,{value:he}),group:K({},w,{value:ze}),groupCollapsed:K({},w,{value:xt}),groupEnd:K({},w,{value:ke})})}te<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Fe=x.ReactCurrentDispatcher,it;function Ve(w,F,$){{if(it===void 0)try{throw Error()}catch(ne){var V=ne.stack.trim().match(/\n( *(at )?)/);it=V&&V[1]||""}return`
18
- `+it+w}}var dt=!1,ht;{var zn=typeof WeakMap=="function"?WeakMap:Map;ht=new zn}function bi(w,F){if(!w||dt)return"";{var $=ht.get(w);if($!==void 0)return $}var V;dt=!0;var ne=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ae;ae=Fe.current,Fe.current=null,He();try{if(F){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(Ze){V=Ze}Reflect.construct(w,[],J)}else{try{J.call()}catch(Ze){V=Ze}w.call(J.prototype)}}else{try{throw Error()}catch(Ze){V=Ze}w()}}catch(Ze){if(Ze&&V&&typeof Ze.stack=="string"){for(var q=Ze.stack.split(`
19
- `),Be=V.stack.split(`
20
- `),_e=q.length-1,ve=Be.length-1;_e>=1&&ve>=0&&q[_e]!==Be[ve];)ve--;for(;_e>=1&&ve>=0;_e--,ve--)if(q[_e]!==Be[ve]){if(_e!==1||ve!==1)do if(_e--,ve--,ve<0||q[_e]!==Be[ve]){var st=`
21
- `+q[_e].replace(" at new "," at ");return w.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",w.displayName)),typeof w=="function"&&ht.set(w,st),st}while(_e>=1&&ve>=0);break}}}finally{dt=!1,Fe.current=ae,rt(),Error.prepareStackTrace=ne}var Bn=w?w.displayName||w.name:"",ln=Bn?Ve(Bn):"";return typeof w=="function"&&ht.set(w,ln),ln}function vr(w,F,$){return bi(w,!1)}function ip(w){var F=w.prototype;return!!(F&&F.isReactComponent)}function Si(w,F,$){if(w==null)return"";if(typeof w=="function")return bi(w,ip(w));if(typeof w=="string")return Ve(w);switch(w){case u:return Ve("Suspense");case c:return Ve("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case l:return vr(w.render);case d:return Si(w.type,F,$);case h:{var V=w,ne=V._payload,ae=V._init;try{return Si(ae(ne),F,$)}catch{}}}return""}var wr=Object.prototype.hasOwnProperty,wl={},xl=x.ReactDebugCurrentFrame;function Ci(w){if(w){var F=w._owner,$=Si(w.type,w._source,F?F.type:null);xl.setExtraStackFrame($)}else xl.setExtraStackFrame(null)}function sp(w,F,$,V,ne){{var ae=Function.call.bind(wr);for(var J in w)if(ae(w,J)){var q=void 0;try{if(typeof w[J]!="function"){var Be=Error((V||"React class")+": "+$+" type `"+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[J]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Be.name="Invariant Violation",Be}q=w[J](F,J,V,$,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_e){q=_e}q&&!(q instanceof Error)&&(Ci(ne),g("%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).",V||"React class",$,J,typeof q),Ci(null)),q instanceof Error&&!(q.message in wl)&&(wl[q.message]=!0,Ci(ne),g("Failed %s type: %s",$,q.message),Ci(null))}}}var op=Array.isArray;function qs(w){return op(w)}function ap(w){{var F=typeof Symbol=="function"&&Symbol.toStringTag,$=F&&w[Symbol.toStringTag]||w.constructor.name||"Object";return $}}function lp(w){try{return bl(w),!1}catch{return!0}}function bl(w){return""+w}function Sl(w){if(lp(w))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ap(w)),bl(w)}var Cl=x.ReactCurrentOwner,up={key:!0,ref:!0,__self:!0,__source:!0},El,kl;function cp(w){if(wr.call(w,"ref")){var F=Object.getOwnPropertyDescriptor(w,"ref").get;if(F&&F.isReactWarning)return!1}return w.ref!==void 0}function dp(w){if(wr.call(w,"key")){var F=Object.getOwnPropertyDescriptor(w,"key").get;if(F&&F.isReactWarning)return!1}return w.key!==void 0}function hp(w,F){typeof w.ref=="string"&&Cl.current}function fp(w,F){{var $=function(){El||(El=!0,g("%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)",F))};$.isReactWarning=!0,Object.defineProperty(w,"key",{get:$,configurable:!0})}}function pp(w,F){{var $=function(){kl||(kl=!0,g("%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)",F))};$.isReactWarning=!0,Object.defineProperty(w,"ref",{get:$,configurable:!0})}}var gp=function(w,F,$,V,ne,ae,J){var q={$$typeof:e,type:w,key:F,ref:$,props:J,_owner:ae};return q._store={},Object.defineProperty(q._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(q,"_self",{configurable:!1,enumerable:!1,writable:!1,value:V}),Object.defineProperty(q,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ne}),Object.freeze&&(Object.freeze(q.props),Object.freeze(q)),q};function mp(w,F,$,V,ne){{var ae,J={},q=null,Be=null;$!==void 0&&(Sl($),q=""+$),dp(F)&&(Sl(F.key),q=""+F.key),cp(F)&&(Be=F.ref,hp(F,ne));for(ae in F)wr.call(F,ae)&&!up.hasOwnProperty(ae)&&(J[ae]=F[ae]);if(w&&w.defaultProps){var _e=w.defaultProps;for(ae in _e)J[ae]===void 0&&(J[ae]=_e[ae])}if(q||Be){var ve=typeof w=="function"?w.displayName||w.name||"Unknown":w;q&&fp(J,ve),Be&&pp(J,ve)}return gp(w,q,Be,ne,V,Cl.current,J)}}var Ys=x.ReactCurrentOwner,Tl=x.ReactDebugCurrentFrame;function Hn(w){if(w){var F=w._owner,$=Si(w.type,w._source,F?F.type:null);Tl.setExtraStackFrame($)}else Tl.setExtraStackFrame(null)}var Js;Js=!1;function Xs(w){return typeof w=="object"&&w!==null&&w.$$typeof===e}function Ol(){{if(Ys.current){var w=j(Ys.current.type);if(w)return`
22
-
23
- Check the render method of \``+w+"`."}return""}}function _p(w){return""}var Nl={};function yp(w){{var F=Ol();if(!F){var $=typeof w=="string"?w:w.displayName||w.name;$&&(F=`
24
-
25
- Check the top-level render call using <`+$+">.")}return F}}function Al(w,F){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var $=yp(F);if(Nl[$])return;Nl[$]=!0;var V="";w&&w._owner&&w._owner!==Ys.current&&(V=" It was passed a child from "+j(w._owner.type)+"."),Hn(w),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,V),Hn(null)}}function Fl(w,F){{if(typeof w!="object")return;if(qs(w))for(var $=0;$<w.length;$++){var V=w[$];Xs(V)&&Al(V,F)}else if(Xs(w))w._store&&(w._store.validated=!0);else if(w){var ne=y(w);if(typeof ne=="function"&&ne!==w.entries)for(var ae=ne.call(w),J;!(J=ae.next()).done;)Xs(J.value)&&Al(J.value,F)}}}function vp(w){{var F=w.type;if(F==null||typeof F=="string")return;var $;if(typeof F=="function")$=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===l||F.$$typeof===d))$=F.propTypes;else return;if($){var V=j(F);sp($,w.props,"prop",V,w)}else if(F.PropTypes!==void 0&&!Js){Js=!0;var ne=j(F);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ne||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function wp(w){{for(var F=Object.keys(w.props),$=0;$<F.length;$++){var V=F[$];if(V!=="children"&&V!=="key"){Hn(w),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",V),Hn(null);break}}w.ref!==null&&(Hn(w),g("Invalid attribute `ref` supplied to `React.Fragment`."),Hn(null))}}var Ml={};function Il(w,F,$,V,ne,ae){{var J=O(w);if(!J){var q="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(q+=" 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 Be=_p();Be?q+=Be:q+=Ol();var _e;w===null?_e="null":qs(w)?_e="array":w!==void 0&&w.$$typeof===e?(_e="<"+(j(w.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):_e=typeof w,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_e,q)}var ve=mp(w,F,$,ne,ae);if(ve==null)return ve;if(J){var st=F.children;if(st!==void 0)if(V)if(qs(st)){for(var Bn=0;Bn<st.length;Bn++)Fl(st[Bn],w);Object.freeze&&Object.freeze(st)}else g("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 Fl(st,w)}if(wr.call(F,"key")){var ln=j(w),Ze=Object.keys(F).filter(function(kp){return kp!=="key"}),Qs=Ze.length>0?"{key: someKey, "+Ze.join(": ..., ")+": ...}":"{key: someKey}";if(!Ml[ln+Qs]){var Ep=Ze.length>0?"{"+Ze.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
26
- let props = %s;
27
- <%s {...props} />
28
- React keys must be passed directly to JSX without using spread:
29
- let props = %s;
30
- <%s key={someKey} {...props} />`,Qs,ln,Ep,ln),Ml[ln+Qs]=!0}}return w===r?wp(ve):vp(ve),ve}}function xp(w,F,$){return Il(w,F,$,!0)}function bp(w,F,$){return Il(w,F,$,!1)}var Sp=bp,Cp=xp;br.Fragment=r,br.jsx=Sp,br.jsxs=Cp}()),br}process.env.NODE_ENV==="production"?Ao.exports=Mp():Ao.exports=Ip();var M=Ao.exports;function Dp(n){switch(n){case"AD":case"AM":case"AT":case"AX":case"AZ":case"BA":case"BY":case"CY":case"CZ":case"DK":case"DZ":case"EC":case"EH":case"ET":case"FI":case"FR":case"GE":case"GF":case"GI":case"GP":case"GW":case"HT":case"KE":case"KV":case"KW":case"LA":case"LU":case"MC":case"MD":case"ME":case"MG":case"MK":case"MQ":case"MZ":case"NC":case"NL":case"NO":case"PL":case"PT":case"PY":case"RE":case"RS":case"SA":case"SE":case"SJ":case"SM":case"SN":case"TC":case"TJ":case"TM":case"TN":case"TZ":case"UY":case"VG":case"ZM":return[["line1"],["line2"],["postalCode","city"],["countryCode"]];case"AF":case"IR":return[["line1"],["line2"],["city"],["region"],["postalCode"],["countryCode"]];case"AG":case"AO":case"AW":case"BJ":case"BO":case"BS":case"BZ":case"CI":case"CW":case"DJ":case"FJ":case"GA":case"GH":case"GM":case"GY":case"JM":case"KI":case"LY":case"MW":case"NA":case"NR":case"PS":case"QA":case"RW":case"SC":case"SR":case"SX":case"TG":case"TT":case"UG":case"VU":return[["line1"],["line2"],["city"],["countryCode"]];case"AL":case"EE":case"IS":return[["line1"],["line2"],["postalCode","city"]];case"AR":return[["line1"],["line2"],["postalCode","city",",","region"],["countryCode"]];case"AS":case"BB":case"BD":case"BM":case"BN":case"BT":case"CR":case"DO":case"FK":case"FM":case"GR":case"GU":case"JO":case"KZ":case"LB":case"LK":case"LS":case"MA":case"MH":case"MM":case"MR":case"MT":case"MV":case"NG":case"PG":case"PK":case"PR":case"RO":case"SG":case"VC":case"WS":return[["line1"],["line2"],["city","postalCode"],["countryCode"]];case"AU":case"CA":case"SZ":case"US":case"VI":return[["line1"],["line2"],["city",",","region","postalCode"],["countryCode"]];case"BE":case"PE":return[["line1"],["line2"],["postalCode","sublocality","city"],["countryCode"]];case"BF":case"BI":case"BQ":case"BW":case"CF":case"CG":case"CM":case"DM":case"ER":case"GQ":case"KM":case"ML":case"SY":case"TD":case"ZW":return[["line1"],["line2"],["city"],["region"],["countryCode"]];case"BG":return[["line1"],["postalCode","region"],["countryCode"]];case"BH":return[["line1"],["line2"],["sublocality","city"],["countryCode"]];case"BR":return[["line1"],["line2"],["sublocality"],["city","region"],["postalCode"],["countryCode"]];case"CH":case"DE":case"GT":case"IT":case"LI":case"MY":case"NI":case"OM":case"SK":case"VA":return[["line1"],["line2"],["postalCode","city","region"],["countryCode"]];case"CL":case"PF":return[["line1"],["line2"],["city","postalCode","region"],["countryCode"]];case"CN":return[["region","city","sublocality"],["line1"],["line2"],["countryCode"]];case"CO":case"ID":case"IQ":case"KH":case"MP":case"NP":case"PW":case"UA":return[["line1"],["line2"],["city","region","postalCode"],["countryCode"]];case"EG":return[["line1"],["line2"],["sublocality","city","region","postalCode"],["countryCode"]];case"ES":case"IL":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"GB":case"MN":case"ZA":return[["line1"],["line2"],["sublocality","city","postalCode"],["countryCode"]];case"GG":case"IM":case"JE":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"GN":return[["line1","line2","city"],["countryCode"]];case"HK":return[["line1"],["line2"],["sublocality"],["city"],["region"],["countryCode"]];case"HR":return[["line1"],["postalCode","city","region"],["countryCode"]];case"HU":case"SI":return[["postalCode","city"],["line1"],["line2"],["countryCode"]];case"IE":return[["line1"],["line2"],["sublocality"],["city","region","postalCode"],["countryCode"]];case"IN":case"VE":return[["line1"],["line2"],["city","postalCode"],["region"],["countryCode"]];case"JP":return[["line2"],["line1","sublocality"],["city","region"],["postalCode"],["countryCode"]];case"KR":return[["countryCode"],["region","city","sublocality","line1"],["line2"],["postalCode"]];case"KY":return[["line1"],["line2"],["postalCode"],["countryCode"]];case"LT":return[["line1"],["postalCode","city","sublocality","region"],["countryCode"]];case"LV":return[["line1"],["city",",","postalCode"],["countryCode"]];case"MO":return[["line1"],["line2"],["sublocality"],["city"],["countryCode"]];case"MU":return[["line1"],["line2"],["city"],["region","postalCode"],["countryCode"]];case"MX":return[["line1"],["line2"],["sublocality"],["postalCode","city",",","region"],["countryCode"]];case"NE":case"SD":return[["line1"],["line2"],["postalCode"],["city"],["region"],["countryCode"]];case"NZ":return[["line1"],["line2"],["sublocality"],["city"],["postalCode"],["countryCode"]];case"PH":case"TW":case"VN":return[["line1"],["line2"],["sublocality","city"],["region","postalCode"],["countryCode"]];case"RU":return[["line1"],["line2"],["city"],["postalCode"],["countryCode"]];case"SB":case"SL":case"ST":case"TL":case"TO":case"TV":return[["line1"],["line2"],["city",",","region"],["countryCode"]];case"TH":case"TR":return[["line1"],["line2"],["sublocality"],["postalCode","city"],["countryCode"]];case"UZ":return[["line1"],["line2"],["region","postalCode"],["countryCode"]]}return[["line1","line2"],["city","region","postalCode"],["countryCode"]]}const Zc={GOOGLEMYBUSINESS:"GOOGLEMYBUSINESS"},Fo={GOOGLE:"google",APPLE:"apple",BING:"bing"},Lp=(n,e)=>{const r={region:"localizedRegionName",countryCode:"localizedCountryName"}[n];return r&&e[r]},Pp=(n,e=[],t,r={route:!1},i)=>{const s="Failed to construct query for maps service.";let o=n&&Wl([n.line1,n.line2,n.city,n.region,n.postalCode,n.countryCode]);switch(r.provider){case Fo.APPLE:{if(i!=null&&i.latitude&&(i!=null&&i.longitude))return Pl(`${i.latitude},${i.longitude}`,r.route);if(!o){console.warn(`${s} Check that you've provided a valid Yext Address.`);break}return Pl(o,r.route)}case Fo.BING:{if(i!=null&&i.latitude&&(i!=null&&i.longitude))return Rl(`${i.latitude},${i.longitude}`,r.route);if(o=n&&Wl([n.line1,n.city,n.region,n.postalCode]),!o){console.warn(`${s} Check that you've provided a valid Yext Address.`);break}return Rl(o,r.route)}default:{if(i!=null&&i.latitude&&(i!=null&&i.longitude))return $l(`${i.latitude},${i.longitude}`,r.route);const a=e.find(l=>{var u;return((u=l==null?void 0:l.publisher)==null?void 0:u.toUpperCase())===Zc.GOOGLEMYBUSINESS});if(a!=null&&a.listingUrl)return a.listingUrl;if(t)return Rp(t,o,r.route);if(!o){console.warn(`${s} Check that you've provided a valid Yext Address, Yext ListingType, or Google Place ID.`);break}return $l(o,r.route)}}},Pl=(n,e)=>e?`https://maps.apple.com/?daddr=${n}`:`https://maps.apple.com/?address=${n}`,Rl=(n,e)=>e?`https://bing.com/maps/default.aspx?rtp=adr.${n}`:`https://bing.com/maps/default.aspx?where1=${n}`,Rp=(n,e,t)=>{const r=e?`&query=${e}`:"";return t?`https://maps.google.com/maps/dir/?api=1${r}&destination_place_id=${n}&destination=direct`:r?`https://maps.google.com/maps/search/?api=1${r}&query_place_id=${n}`:`https://maps.google.com/maps/dir/?api=1&destination_place_id=${n}&destination=direct`},$l=(n,e)=>e?`https://maps.google.com/maps/dir/?api=1&destination=${n}`:`https://maps.google.com/maps/search/?api=1&query=${n}`,Wl=(n=[])=>{if(!n.length)return"";const e=n.filter(Boolean).join(", ");return encodeURIComponent(e)},$p=({address:n,lines:e,separator:t=",",...r})=>{const i=(e||Dp(n.countryCode)).map(s=>M.jsx(Wp,{address:n,line:s,separator:t},s.toString()));return W.createElement("div",{...r,key:n.toString()},i)},Wp=({address:n,line:e,separator:t})=>{const r=[];let i=0;for(const s of e){if(s===","){r.push(M.jsx("span",{children:t},`separator-${i++}`));continue}const o=n[s];if(!o)continue;const a=Lp(s,n);if(a){r.push(M.jsxs(Fp.Fragment,{children:[" ",M.jsx("abbr",{title:a,children:o})]},s));continue}r.push(M.jsx("span",{children:" "+o},s))}return M.jsx("div",{className:"address-line",children:r})};var zl=typeof window<"u"&&typeof window.document<"u",zp=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&"userAgent"in navigator&&typeof navigator.userAgent=="string"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));var Hp=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u";typeof process<"u"&&process.versions!=null&&process.versions.bun!=null;class Bp{constructor(){m(this,"name");m(this,"isServerSide");m(this,"version");var e;Hp?(this.name="deno",this.version="",zl&&(this.version=((e=window.Deno)==null?void 0:e.version.deno)||""),this.isServerSide=!0):zp?(this.name="node",this.version=process.versions.node,this.isServerSide=!0):zl?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if(this.name!=="node")throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const or=()=>new Bp,Up=(...n)=>{var e;if(typeof window<"u"){if(window.IS_PRODUCTION)return!0;const t=(e=window.location)==null?void 0:e.hostname;return n==null?void 0:n.some(r=>r==null?void 0:r.includes(t))}return!1};function eo(n){if(!ba(n))throw new Error("Parameter was not an error")}function ba(n){return!!n&&typeof n=="object"&&jp(n)==="[object Error]"||n instanceof Error}function jp(n){return Object.prototype.toString.call(n)}const Vp="Layerr";let Zp=Vp;function Kp(){return Zp}function Gp(n){let e,t="";if(n.length===0)e={};else if(ba(n[0]))e={cause:n[0]},t=n.slice(1).join(" ")||"";else if(n[0]&&typeof n[0]=="object")e=Object.assign({},n[0]),t=n.slice(1).join(" ")||"";else if(typeof n[0]=="string")e={},t=t=n.join(" ")||"";else throw new Error("Invalid arguments passed to Layerr");return{options:e,shortMessage:t}}class Et extends Error{constructor(e,t){const r=[...arguments],{options:i,shortMessage:s}=Gp(r);let o=s;if(i.cause&&(o=`${o}: ${i.cause.message}`),super(o),this.message=o,i.name&&typeof i.name=="string"?this.name=i.name:this.name=Kp(),i.cause&&Object.defineProperty(this,"_cause",{value:i.cause}),Object.defineProperty(this,"_info",{value:{}}),i.info&&typeof i.info=="object"&&Object.assign(this._info,i.info),Error.captureStackTrace){const a=i.constructorOpt||this.constructor;Error.captureStackTrace(this,a)}}static cause(e){return eo(e),e._cause&&ba(e._cause)?e._cause:null}static fullStack(e){eo(e);const t=Et.cause(e);return t?`${e.stack}
31
- caused by: ${Et.fullStack(t)}`:e.stack??""}static info(e){eo(e);const t={},r=Et.cause(e);return r&&Object.assign(t,Et.info(r)),e._info&&Object.assign(t,e._info),t}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}}const Kc="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Wr=32,Hl=0xffffffffffff,qp=10,Yp=16,Ar=Object.freeze({source:"ulid"});function Jp(n){const e=Xp(),t=e&&(e.crypto||e.msCrypto)||null;if(typeof(t==null?void 0:t.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]/255};if(typeof(t==null?void 0:t.randomBytes)=="function")return()=>t.randomBytes(1).readUInt8()/255;throw new Et({info:{code:"PRNG_DETECT",...Ar}},"Failed to find a reliable PRNG")}function Xp(){return tg()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function Qp(n,e){let t="";for(;n>0;n--)t=ng(e)+t;return t}function eg(n,e){if(isNaN(n))throw new Et({info:{code:"ENC_TIME_NAN",...Ar}},`Time must be a number: ${n}`);if(n>Hl)throw new Et({info:{code:"ENC_TIME_SIZE_EXCEED",...Ar}},`Cannot encode a time larger than ${Hl}: ${n}`);if(n<0)throw new Et({info:{code:"ENC_TIME_NEG",...Ar}},`Time must be positive: ${n}`);if(Number.isInteger(n)===!1)throw new Et({info:{code:"ENC_TIME_TYPE",...Ar}},`Time must be an integer: ${n}`);let t,r="";for(let i=e;i>0;i--)t=n%Wr,r=Kc.charAt(t)+r,n=(n-t)/Wr;return r}function tg(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function ng(n){let e=Math.floor(n()*Wr);return e===Wr&&(e=Wr-1),Kc.charAt(e)}function rg(n,e){const t=Jp(),r=isNaN(n)?Date.now():n;return eg(r,qp)+Qp(Yp,t)}var Bl="yext_analytics_session_id";function ig(){if(typeof window>"u")return null;try{var n=window.sessionStorage.getItem(Bl);return n||(n=rg(),window.sessionStorage.setItem(Bl,n)),n}catch(e){return console.warn(`Unable to use browser sessionStorage for sessionId.
32
- `,e),null}}const sg="1.0.0",Ul={version:sg};function og(n,e,t){return t.debug?(Gc(!0,e,t),!0):navigator.sendBeacon(n,JSON.stringify(e))}function ag(n,e,t){return t.debug?(Gc(!1,e,t),Promise.resolve(new Response)):fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0})}function lg(n,e){return!e&&!!navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox")}function Gc(n,e,t){var r=n?"Beacon":"fetch()";console.log("[DEBUG] AnalyticsConfig object at time of call to report():",t),console.log("[DEBUG] The following EventPayload would be sent to the Yext Events API using ".concat(r,":"),e)}var Mo=function(){return Mo=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},Mo.apply(this,arguments)},Io=function(n,e){if(!e||Object.keys(e).length===0)return n;if(!n||Object.keys(n).length===0)return e;var t=JSON.parse(JSON.stringify(n));for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];i==null?delete t[r]:typeof i!="object"?t[r]=i:t[r]=Io(t[r],i)}return Mo({},t)},ug="yextevents.com/accounts/me/events";function cg(n,e){var t=n==="SANDBOX",r=e==null?void 0:e.toLowerCase();if(t&&r==="eu")throw new Error("Sandbox environment is not available in the EU region.");return"https://"+(t?"sbx.":"")+(r??"us")+"."+ug}var dg=function(n,e,t,r){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((r=r.apply(n,e||[])).next())})},hg=function(n,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(t=0)),t;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){t.label=u[1];break}if(u[0]===6&&t.label<s[1]){t.label=s[1],s=u;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(u);break}s[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(n,t)}catch(c){u=[6,c],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},fg=function(){function n(e,t){if(e.authorizationType!=="apiKey"&&e.authorizationType!=="bearer")throw new Error("Authorization type must be either apiKey or bearer.");if(!e.authorization)throw new Error("Authorization must be provided.");this.config=e,this.payload=t}return n.prototype.with=function(e){var t=this.payload===void 0?e:Io(this.payload,e);return new n(this.config,t)},n.prototype.report=function(e){var t;return dg(this,void 0,void 0,function(){var r,i,s,o,a=this;return hg(this,function(l){return r=Io((t=this.payload)!==null&&t!==void 0?t:{},e??{}),this.config.sessionTrackingEnabled?r.sessionId||(r.sessionId=ig()):r.sessionId=void 0,r.clientSdk?r.clientSdk.ANALYTICS=Ul.version:r.clientSdk=(o={},o.ANALYTICS=Ul.version,o),r.authorization=this.config.authorizationType==="apiKey"?"KEY "+this.config.authorization:"Bearer "+this.config.authorization,i=lg(r,this.config.forceFetch),s=cg(this.config.env,this.config.region),i?[2,new Promise(function(u,c){og(s,r,a.config)?u(""):c("Failed Beacon Call")})]:[2,ag(s,r,this.config).then(function(u){return u}).catch(function(u){return u})]})})},n}();function pg(n){return new fg(n)}function Do(n){return n?n.toLowerCase().trim().replace(/\s/g,""):""}function qc(n,e){return[n,e].filter(t=>!!t).map(t=>Do(t)).join("_")}const gg=n=>{switch(Math.floor(n/1e8%10)){case 0:return"US";case 1:return"EU";default:return""}},Sa=W.createContext(null),mg=W.lazy(()=>Promise.resolve().then(()=>require("./debugger-DjyiKj4B.cjs")));function _g(n){const{children:e,apiKey:t,currency:r,templateData:i,requireOptIn:s,disableSessionTracking:o,enableDebugging:a,productionDomains:l}=n;if(!t)throw new Error("API Key is required for AnalyticsProvider");const u=W.useRef(null),[c,d]=W.useState(!1);W.useEffect(()=>{d(!0)},[]),u.current===null&&(u.current=new Yc(t,r,i,s,o,l,a??qi()));const h=u.current;return W.useEffect(()=>(window.enableYextAnalytics=()=>{h.optIn()},()=>{delete window.enableYextAnalytics}),[h]),M.jsxs(M.Fragment,{children:[M.jsx(Sa.Provider,{value:h,children:e}),c&&(a||qi())&&or().name==="browser"?M.jsx(W.Suspense,{fallback:M.jsx(M.Fragment,{}),children:M.jsx(mg,{})}):null]})}function qi(){return or().name!=="browser"||typeof window>"u"?!1:!!new URL(window.location.href).searchParams.get("xYextDebug")}class Yc{constructor(e,t,r,i,s,o,a=!1){m(this,"_optedIn");m(this,"_sessionTrackingEnabled");m(this,"_analyticsEventService");m(this,"_pageViewFired",!1);this.apiKey=e,this.defaultCurrency=t,this.templateData=r,this.productionDomains=o,this.enableDebugging=a,this._optedIn=!i,this._sessionTrackingEnabled=!s,this.makeReporter(),this.pageView()}makeReporter(){if(or().name!=="browser"||!this._optedIn)return;if(!Up(...this.productionDomains??[])&&!this.getDebugEnabled()){console.warn("Yext Analytics disabled for non-production domains");return}const e=gg(this.templateData.document.businessId),t={authorizationType:"apiKey",authorization:this.apiKey,env:"PRODUCTION",region:e||"US",sessionTrackingEnabled:this._sessionTrackingEnabled,debug:this.getDebugEnabled()},r={pages:{siteUid:this.templateData.document.siteId,template:this.templateData.document.__.name},entity:this.templateData.document.uid||void 0,pageUrl:document.URL,referrerUrl:document.referrer!==""?document.referrer:void 0};this._analyticsEventService=pg(t).with(r)}canTrack(){return or().name==="browser"&&this._optedIn&&!!this._analyticsEventService}identify(e){this.canTrack()&&this._analyticsEventService&&(this._analyticsEventService=this._analyticsEventService.with({visitor:e}))}async optIn(){this._optedIn=!0,this.makeReporter(),this._pageViewFired||await this.pageView()}async pageView(){var e;if(!this.canTrack())return Promise.resolve(void 0);await((e=this._analyticsEventService)==null?void 0:e.report({action:"PAGE_VIEW"})),this._pageViewFired=!0}async track(e){var d;if(!this.canTrack())return Promise.resolve();const{action:t,scope:r,eventName:i,currency:s,amount:o,destinationUrl:a,customTags:l,customValues:u}=e;let c;o&&(c={amount:o,currency:s||this.defaultCurrency}),await((d=this._analyticsEventService)==null?void 0:d.report({action:t,pages:{scope:Do(r)||void 0,originalEventName:qc(r||"",Do(i)||"")},value:c,destinationUrl:a||void 0,customTags:l,customValues:u}))}getDebugEnabled(){return this.enableDebugging||qi()}}const Lo=W.createContext({name:""}),Ca=()=>W.useContext(Lo).name;function yg(n){var o;const e=Ca(),[t]=W.useState({name:qc(e,n.name)}),r=(o=dr())==null?void 0:o.getDebugEnabled(),[i,s]=W.useState(!1);return W.useEffect(()=>{s(!0)},[]),r&&i?M.jsx("section",{"data-ya-scope":t.name,children:M.jsx(Lo.Provider,{value:t,children:n.children})}):M.jsx(Lo.Provider,{value:t,children:n.children})}function dr(){const n=W.useContext(Sa);if(!n)return n;or().name==="browser"&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await n.optIn()});const e=Ca();return{getDebugEnabled(){return n.getDebugEnabled()},identify(t){return n.identify(t)},optIn(){return n.optIn()},pageView(){return n.pageView()},track(t){return n.track({...t,scope:t.scope??e})}}}const vg=()=>{var n;return(n=dr())==null?void 0:n.track},wg=()=>{var n;return(n=dr())==null?void 0:n.pageView},xg=()=>{var n;return(n=dr())==null?void 0:n.identify},Pt={INTRINSIC:"intrinsic",FIXED:"fixed",ASPECT:"aspect",FILL:"fill"},bg=n=>{const e=n.protocol.slice(0,-1);if(e!=="http"&&e!=="https"){console.error(`Invalid scheme: ${n}`);return}const t=n.hostname;let r;if(t==="a.mktgcdn.com")r="us";else{if(t.replace("a.","").replace(".mktgcdn.com","")!=="eu"){console.error(`Invalid host: ${n}`);return}r="eu"}if(!n.pathname.startsWith("/f")){console.error(`Invalid path: ${n}`);return}const i=n.pathname.replace(/^\//,"").split("/");if(i.length<2||i.length>3){console.error(`Invalid path: ${n}`);return}let s;if(i[0]==="f")s="prod";else switch(i[0].replace("f-","")){case"sandbox":{s="sbx";break}case"qa":{s="qa";break}case"dev":{s="dev";break}default:{console.error(`Invalid path: ${n}`);return}}if(r==="eu"&&(s==="dev"||s==="sbx")){console.error(`Invalid path: ${n}`);return}let o;if(i.length===3&&(o=parseInt(i[1]),Number.isNaN(o))){console.error(`Invalid account id: ${n}`);return}const a=i[i.length-1].split("."),l=a.length===2?`.${a[1]}`:"",u=a[0];return{scheme:e,partition:r,env:s,accountId:o,contentHash:u,extension:l}},Sg=(n,e,t,r)=>{const i=`https://dyn${n.partition==="us"?"":`.${n.partition}`}.mktgcdn.com`;let s="f";switch(n.env){case"prod":break;case"sbx":{s+="-sandbox";break}default:s+=`-${n.env.toString()}`}const o=n.accountId!==void 0?`${n.accountId}/`:"",a=Xc(r);return`${i}/${s}/${o}${n.contentHash}${n.extension}/width=${Math.round(e)},height=${Math.round(t)}${a}`},Cg=n=>{const e=n.protocol.slice(0,-1);if(e!=="http"&&e!=="https"){console.error(`Invalid scheme: ${n}`);return}if(n.hostname!=="a.mktgcdn.com"){console.error(`Invalid host: ${n}`);return}if(!n.pathname.startsWith("/p")){console.error(`Invalid path: ${n}`);return}const t=n.pathname.replace(/^\//,"").split("/");if(t.length<3||t.length>4){console.error(`Invalid path: ${n}`);return}let r;if(t[0]==="p")r="prod";else switch(t[0].replace("p-","")){case"sandbox":{r="sbx";break}case"qa":{r="qa";break}case"dev":{r="dev";break}default:{console.error(`Invalid path: ${n}`);return}}const i=t[1];let s;if(t.length===4){if(!t[2].includes(".")){console.error(`Invalid aspect ratio: ${n}`);return}if(s=parseFloat(t[2]),Number.isNaN(s)||t[2].split(".")[1].length!==4){console.error(`Invalid aspect ratio: ${n}`);return}}const o=t[t.length-1].split("."),a=o.length===2?`.${o[1]}`:"",l=o[0];return{scheme:e,env:r,contentHash:i,aspectRatio:s,name:l,extension:a}},Eg=(n,e,t,r)=>{const i="https://dyn.mktgcdn.com";let s="p";switch(n.env){case"prod":break;case"sbx":{s+="-sandbox";break}default:s+=`-${n.env.toString()}`}const o=Xc(r);return`${i}/${s}/${n.contentHash}/width=${Math.round(e)},height=${Math.round(t)}${o}`},kg=n=>n.endsWith(".mktgcdn.com")||n==="mktgcdn.com",Yi=(n,e,t,r)=>{if(!Jc(n)){console.error(`Invalid image url: ${n}.`);return}const i=new URL(n);if(!kg(i.hostname))return n;if(i.pathname.startsWith("/p")){const s=Cg(i);if(s)return Eg(s,e,t,r)}else if(i.pathname.startsWith("/f")){const s=bg(i);if(s)return Sg(s,e,t,r)}return n},Jc=n=>{let e;try{e=new URL(n)}catch{return!1}return e.protocol==="http:"||e.protocol==="https:"},Xc=n=>{if(!n||Object.keys(n).length===0)return"";const e=Object.entries(n).filter(([,t])=>t!==void 0&&String(t)!=="").map(([t,r])=>`${t}=${r}`).join(",");return e.length>0?`,${e}`:""},Tg=({image:n,className:e,width:t,height:r,aspectRatio:i,layout:s=Pt.INTRINSIC,placeholder:o,imgOverrides:a,style:l={},imageTransformations:u,loading:c="lazy"})=>{const d=W.useRef(null),[h,f]=W.useState(!1),p="image"in n?n.image:n;W.useEffect(()=>{var O;(O=d.current)!=null&&O.complete&&f(!0)},[]),Og(s,p.width,p.height,t,r,i);const _=Math.abs(p.width);_||console.warn("Invalid image width.");const y=Math.abs(p.height);if(y||console.warn("Invalid image height."),!Jc(p.url))return console.error(`Invalid image url: ${p.url}`),M.jsx(M.Fragment,{children:o!=null&&o});const x=t&&t>0?t:void 0,g=r&&r>0?r:void 0,{src:v,imgStyle:C,widths:S,updatedImageTransformations:b}=Ng(s,_,y,l,p.url,x,g,i,u),k=S.map(O=>`${Yi(p.url,O,(s===Pt.ASPECT&&i?1/i:y/_)*O,b)} ${O}w`).join(", "),T=[640,768,1024,1280,1536],E=S.map((O,D)=>D===S.length-1?`${O}px`:`(max-width: ${T[D]}px) ${O}px`).join(", ");return M.jsxs(M.Fragment,{children:[!h&&o!=null&&o,M.jsx("img",{ref:d,style:C,src:v,className:e,width:x,height:g,srcSet:k,sizes:E,loading:c,alt:p.alternateText||"",...a})]})},Og=(n,e,t,r,i,s)=>{if(e<0&&console.warn(`Invalid image width: ${e}.`),t<0&&console.warn(`Invalid image height: ${t}.`),n===Pt.FIXED){if(!r&&!i){console.warn("Using fixed layout but neither width nor height is passed as props.");return}r&&r<0&&console.warn(`Using fixed layout but width is invalid: ${r}.`),i&&i<0&&console.warn(`Using fixed layout but height is invalid: ${i}.`);return}(r||i)&&console.warn("Width or height is passed in but layout is not fixed. These will have no impact. If you want to have a fixed height or width then set layout to fixed."),n===Pt.ASPECT&&!s&&console.warn("Using aspect layout but aspectRatio is not passed as a prop.")},Ng=(n,e,t,r,i,s,o,a,l)=>{let u=[100,320,640,960,1280,1920],c=Yi(i,500,a?500/a:500,l);const d={...r},h=l?{...l}:{};switch(d.objectFit=d.objectFit||"cover",d.objectPosition=d.objectPosition||"center",n){case Pt.INTRINSIC:d.maxWidth=e,d.width="100%",d.aspectRatio=a?`${a}`:`${e} / ${t}`;break;case Pt.FIXED:{const{fixedWidth:f,fixedHeight:p,fixedWidths:_}=Ag(e,t,u,s,o);d.width=f,d.height=p,u=_,c=Yi(i,f,p,h);break}case Pt.ASPECT:d.aspectRatio=a?`${a}`:`${e} / ${t}`,h.fit=(h==null?void 0:h.fit)||"cover";break;case Pt.FILL:d.width="100%",d.aspectRatio=a?`${a}`:`${e} / ${t}`;break;default:console.warn(`Unrecognized layout: ${n}.`);break}return{src:c,imgStyle:d,widths:u,updatedImageTransformations:h}},Ag=(n,e,t,r,i)=>r&&i?{fixedWidth:r,fixedHeight:i,fixedWidths:[r]}:r?{fixedWidth:r,fixedHeight:r*e/n,fixedWidths:[r]}:i?{fixedWidth:i/e*n,fixedHeight:i,fixedWidths:[i/e*n]}:{fixedWidth:n,fixedHeight:e,fixedWidths:t};var Qc={exports:{}};/*!
33
- Copyright (c) 2018 Jed Watson.
34
- Licensed under the MIT License (MIT), see
35
- http://jedwatson.github.io/classnames
36
- */(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return t.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}n.exports?(t.default=t,n.exports=t):window.classNames=t})()})(Qc);var Fg=Qc.exports;const Sn=Vc(Fg),Mg="phonecall",Ig="drivingdirection",jl="calltoactionclick",Dg="clicktowebsite",Lg="other",Vl="link",Pg="cta",Rg=n=>{const e={...n.cta??{link:n.href}};if(!e.link)throw n.cta?new Error("CTA's link is undefined"):new Error("Link's href is undefined");if(typeof e.link!="string")throw n.cta?new Error("CTA's link is not a valid string"):new Error("Link's href is not a valid string");return e.linkType||(e.linkType=zg(e.link)),e.link=Hg(e),e},$g=(n,e)=>{switch(n.linkType){case"EMAIL":return"CTA_CLICK";case"PHONE":return"TAP_TO_CALL";case"CLICK_TO_WEBSITE":return"WEBSITE";case"DRIVING_DIRECTIONS":return"DRIVING_DIRECTIONS";case"OTHER":return"CTA_CLICK";case"URL":return"LINK";default:return e?"CTA_CLICK":"LINK"}},Wg=(n,e,t)=>{if(n)return n;if(e)switch(e){case"PHONE":return Mg;case"EMAIL":return jl;case"URL":return Vl;case"DRIVING_DIRECTIONS":return Ig;case"CLICK_TO_WEBSITE":return Dg;case"OTHER":return Lg;default:return t?jl:Vl}return Pg},zg=n=>Bg(n)?"EMAIL":n.startsWith("tel:")?"PHONE":"URL",Hg=n=>n.linkType==="EMAIL"?n.link.startsWith("mailto:")?n.link:`mailto:${n.link}`:n.linkType==="PHONE"?n.link.startsWith("tel:")?n.link:`tel:${n.link}`:n.link,Bg=n=>n.startsWith("mailto:")?!0:/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(n),ed=W.forwardRef(function(e,t){const{children:r,onClick:i,className:s,eventName:o,scope:a,currency:l,amount:u,cta:c,obfuscate:d,customTags:h,customValues:f,...p}=e,_=Rg(e),y=$g(_,!!c),x=Wg(o,_.linkType,!!c),g=dr(),v=d||d!==!1&&_.linkType==="EMAIL",C=async k=>{const T=k.currentTarget;let E="";if(v){k.preventDefault();const O=T.href.split("/").at(-1);O&&(E=atob(O))}if(g!==null)try{await g.track({action:y,scope:a,eventName:x,currency:l,amount:u,destinationUrl:E||T.href,customTags:h,customValues:f})}catch{console.error("Failed to report click Analytics Event")}i&&i(k),E&&(window.location.href=E)},S=v?"Obfuscated, set a label or child":_.link,b={className:Sn("Link",s),href:v?btoa(_.link):_.link,onClick:C,rel:e.target&&!e.rel?"noopener":e.rel,ref:t};return g!=null&&g.getDebugEnabled()&&(b["data-ya-action"]=y,b["data-ya-scopeoverride"]=a,b["data-ya-eventname"]=x),M.jsx("a",{...p,...b,suppressHydrationWarning:!0,children:r||_.label||S})});var ue=(n=>(n.DEGREE="deg",n.KILOMETER="km",n.MILE="mi",n.RADIAN="r",n))(ue||{}),Qe=(n=>(n.MERCATOR="mercator",n.SPHERICAL="spherical",n))(Qe||{});const to=3959,no=6371,Ug=["latitude","lat"],jg=["longitude","lon","lng","long"];function Zl(n,e){for(const t of e)if(n[t]||n[t]===0)return n[t]}function Kl(n){switch(typeof n){case"string":case"number":const e=Number.parseFloat(n);if(Number.isNaN(e))throw new Error(`'${n}' must be convertible to a Number'`);return e;default:throw new Error(`typeof '${n}' must be a number or a string that can be converted to a number, is '${typeof n}'`)}}function pn(n){return n*Math.PI/180}function Ot(n){return n/Math.PI*180}function Vg(n,e){const t=pn(n.latitude),r=pn(e.latitude),i=r-t,s=pn(e.longitude-n.longitude),o=Math.pow(Math.sin(i/2),2)+Math.cos(t)*Math.cos(r)*Math.pow(Math.sin(s/2),2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}function Zg(n,e){const t=Math.tan(Math.PI/360*(n+90)),r=Math.tan(Math.PI/360*(e+90));return Math.log(r/t)}function Kg(n,e){const r=Math.tan(Math.PI/360*(n+90))*Math.pow(Math.E,e);return Math.atan(r)*360/Math.PI-90}class oe{constructor(e,t){m(this,"_lat");m(this,"_lon");let r=e,i=t;this._lat=0,this._lon=0,typeof e=="object"?(r=Zl(e,Ug)??0,i=Zl(e,jg)??0,this.latitude=typeof r=="function"?r():r,this.longitude=typeof i=="function"?i():i):typeof r=="number"&&typeof i=="number"&&(this.latitude=r,this.longitude=i)}get latitude(){return this._lat}set latitude(e){this._lat=Math.max(-90,Math.min(Kl(e),90))}get longitude(){return this._lon}set longitude(e){this._lon=Kl(e)}get normalLon(){return((this._lon+180)%360+360)%360-180}add(e,t,r=ue.DEGREE,i=Qe.SPHERICAL){if(i===Qe.MERCATOR&&(r===ue.DEGREE||r===ue.RADIAN)){const s=r===ue.DEGREE?pn(e):e,o=r===ue.DEGREE?t:Ot(t);this.latitude=Kg(this.latitude,s),this.longitude+=o}else switch(r){case ue.DEGREE:this.latitude+=e,this.longitude+=t;break;case ue.KILOMETER:this.latitude+=Ot(e)*no,this.longitude+=Ot(t)*no*Math.cos(pn(this.latitude));break;case ue.MILE:this.latitude+=Ot(e)*to,this.longitude+=Ot(t)*to*Math.cos(pn(this.latitude));break;case ue.RADIAN:this.latitude+=Ot(e),this.longitude+=Ot(t);break;default:throw new Error(`unit unhandled: ${String(r)}`)}}distanceTo(e,t=ue.MILE,r=Qe.SPHERICAL){if(r===Qe.MERCATOR&&(t===ue.DEGREE||t===ue.RADIAN)){const i=Zg(this.latitude,e.latitude),s=Math.abs(e.normalLon-this.normalLon),o=pn(Math.min(s,360-s)),a=Math.sqrt(Math.pow(i,2)+Math.pow(o,2));switch(t){case ue.DEGREE:return Ot(a);case ue.RADIAN:return a;default:throw new Error(`unit unhandled: ${String(t)}`)}}else{const i=Vg(this,e);switch(t){case ue.DEGREE:return Ot(i);case ue.KILOMETER:return i*no;case ue.MILE:return i*to;case ue.RADIAN:return i;default:throw new Error(`unit unhandled: ${String(t)}`)}}}equals(e){return e&&e.latitude===this.latitude&&e.longitude===this.longitude}searchQueryString(){return`${this.latitude},${this.longitude}`}}function td(n,e=()=>null){const t=document.createElement("script");t.async=!0,t.onload=e,t.src=n,document.head.appendChild(t)}var je=(n=>(n.UNDEFINED="undefined",n.NULL="object",n.BOOLEAN="boolean",n.NUMBER="number",n.BIGINT="bigint",n.STRING="string",n.SYMBOL="symbol",n.FUNCTION="function",n.OBJECT="object",n))(je||{});function Ye(n,e){if(typeof e!="string")throw new Error("Assertion error: 'type' must be a string");if(typeof n!==e)throw new Error(`Expected an object of type '${e}' but received '${typeof n}'`)}function Ea(n){if(!(n!==null&&typeof n=="object"&&n.nodeType===1&&typeof n.tagName=="string"))throw new Error(`Value with name ${n.constructor.name} is not a valid HTMLElement.`)}function ut(n,e){let t;try{t=n instanceof e}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!t)throw new Error(`Expected an instance of '${e.name}' but received '${n.constructor.name}'`)}class nd{constructor(e,t){m(this,"providerMapClass");m(this,"wrapper");m(this,"controlEnabled");m(this,"panHandler");m(this,"panStartHandler");m(this,"providerOptions");m(this,"iframeWindow");m(this,"apiKey");ut(e,nn),t&&Ea(t),this.providerMapClass=e.getMapClass(),this.wrapper=t,this.controlEnabled=!0,this.panHandler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(e){return this.controlEnabled=e,this}withPanHandler(e){return Ye(e,je.FUNCTION),this.panHandler=e,this}withPanStartHandler(e){return Ye(e,je.FUNCTION),this.panStartHandler=e,this}withProviderOptions(e){return this.providerOptions=e,this}withIframeWindow(e){return this.iframeWindow=e,this}withApiKey(e){return this.apiKey=e,this}build(){const e=this.providerMapClass;return new e(this)}}class hr{constructor(e){m(this,"_panHandler");m(this,"_panStartHandler");ut(e,nd),this._panHandler=e.panHandler,this._panStartHandler=e.panStartHandler}getCenter(){throw new Error("not implemented")}getZoom(){throw new Error("not implemented")}setCenter(e,t){throw new Error("not implemented")}setZoom(e,t){throw new Error("not implemented")}setZoomCenter(e,t,r){this.setZoom(e,r),this.setCenter(t,r)}}class rd{constructor(e){m(this,"providerPinClass");m(this,"clickHandler");m(this,"focusHandler");m(this,"hoverHandler");m(this,"icons");m(this,"hasPinUrl");ut(e,nn),this.providerPinClass=e.getPinClass(),this.clickHandler=()=>null,this.focusHandler=t=>null,this.hoverHandler=t=>null,this.icons={},this.hasPinUrl=!1}withClickHandler(e){return Ye(e,je.FUNCTION),this.clickHandler=e,this}withFocusHandler(e){return Ye(e,je.FUNCTION),this.focusHandler=e,this}withHoverHandler(e){return Ye(e,je.FUNCTION),this.hoverHandler=e,this}withIcons(e){return this.icons=e,this}withHasPinUrl(e){return this.hasPinUrl=e,this}build(){const e=this.providerPinClass;return new e(this)}}class ka{constructor(e){m(this,"_clickHandler");m(this,"_focusHandler");m(this,"_hoverHandler");m(this,"_icons");ut(e,rd),this._clickHandler=e.clickHandler,this._focusHandler=e.focusHandler,this._hoverHandler=e.hoverHandler,this._icons=e.icons}setCoordinate(e){throw new Error("not implemented")}setMap(e,t){throw new Error("not implemented")}setProperties(e){throw new Error("not implemented")}}const Gg=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class fr extends ka{constructor(t){super(t);m(this,"_pinEl");m(this,"_pinAlt");m(this,"_wrapper");this._pinEl=t.hasPinUrl?document.createElement("div"):document.createElement("button"),Object.assign(this._pinEl.style,fr.baseStyle),this._pinAlt=document.createElement("span"),this._pinAlt.classList.add("sr-only"),this._pinEl.appendChild(this._pinAlt),this._wrapper=document.createElement("div"),this._wrapper.style.pointerEvents="none",this._wrapper.appendChild(this._pinEl),this.addListeners()}static get baseStyle(){return Gg}addListeners(){this._wrapper&&(this._wrapper.addEventListener("click",()=>this._clickHandler()),this._wrapper.addEventListener("focusin",()=>this._focusHandler(!0)),this._wrapper.addEventListener("focusout",()=>this._focusHandler(!1)),this._wrapper.addEventListener("mouseover",()=>this._hoverHandler(!0)),this._wrapper.addEventListener("mouseout",()=>this._hoverHandler(!1)))}getPinElement(){return this._pinEl}getWrapperElement(){return this._wrapper}setProperties(t){this.setElementProperties(t);const r=t.getClass(),i=t.getElement()||this._pinEl,s=t.getZIndex();i.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=s.toString(),this._wrapper.setAttribute("class",r),i!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(i)))}setElementProperties(t){const r=t.getAnchorX(),i=t.getAnchorY(),s=t.getHeight(),o=this._icons[t.getIcon()],a=t.getSRText(),l=t.getWidth();Object.assign(this._pinEl.style,{backgroundImage:o?`url("${o}")`:"",height:s+"px",transform:`translate(${-100*r}%, ${-100*i}%)`,width:l+"px"}),this._pinAlt.innerText=a}}class Rn{constructor(){m(this,"loadFunction");m(this,"mapClass");m(this,"pinClass");m(this,"providerName");this.loadFunction=(e,t,r,i)=>e(),this.mapClass=hr,this.pinClass=ka,this.providerName=""}withLoadFunction(e){return Ye(e,je.FUNCTION),this.loadFunction=e,this}withMapClass(e){return this.mapClass=e,this}withPinClass(e){return this.pinClass=e,this}withProviderName(e){return this.providerName=e,this}build(){return new nn(this)}}class nn{constructor(e){m(this,"_loadFunction");m(this,"_mapClass");m(this,"_pinClass");m(this,"_providerName");m(this,"_loadPromise");m(this,"_resolveLoad");m(this,"_rejectLoad");m(this,"_apiKey");m(this,"_loadInvoked");m(this,"_loaded");m(this,"_options");ut(e,Rn),this._loadFunction=e.loadFunction,this._mapClass=e.mapClass,this._pinClass=e.pinClass,this._providerName=e.providerName,this._loadPromise=new Promise((t,r)=>{this._resolveLoad=t,this._rejectLoad=r}),this._apiKey="",this._loadInvoked=!1,this._loaded=!1,this._options={}}get loaded(){return this._loaded}getMapClass(){return this._mapClass}getPinClass(){return this._pinClass}getProviderName(){return this._providerName}async load(e=this._apiKey,t=this._options){!this._loadInvoked&&this._resolveLoad&&this._rejectLoad&&(this._loadInvoked=!0,this._loadFunction(this._resolveLoad,this._rejectLoad,e,t)),await this.ready(),this._loaded=!0}async ready(){await this._loadPromise}setLoadOptions(e,t=null){this._loadInvoked||(this._apiKey=e,this._options=t||this._options)}}class qg extends hr{constructor(t){super(t);m(this,"map");m(this,"_moving");t.wrapper&&(this.map=new google.maps.Map(t.wrapper,{disableDefaultUI:!t.controlEnabled,fullscreenControl:!1,gestureHandling:t.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:t.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...t.providerOptions}),this._moving=!1,google.maps.event.addListener(this.map,"bounds_changed",()=>{this._moving||(this._moving=!0,this._panStartHandler())}),google.maps.event.addListener(this.map,"idle",()=>{this._moving=!1,this._panHandler()}))}getCenter(){var t;return new oe(((t=this.map)==null?void 0:t.getCenter())??{lat:0,lng:0})}getZoom(){var t;return((t=this.map)==null?void 0:t.getZoom())??0}setCenter(t,r){var s,o;const i=new google.maps.LatLng(t.latitude,t.longitude);r?(s=this.map)==null||s.panTo(i):(o=this.map)==null||o.setCenter(i)}setZoom(t,r){var i;(i=this.map)==null||i.setZoom(Math.floor(t))}setZoomCenter(t,r,i){this.setCenter(r,i),this.setZoom(t,i)}}class Yg extends fr{constructor(t){super(t);m(this,"_latLng");m(this,"pin");this._wrapper&&(this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper));class r extends google.maps.OverlayView{constructor(o){super();m(this,"pin");this.pin=o}draw(){var a;const o=(a=this.getProjection())==null?void 0:a.fromLatLngToDivPixel(this.pin._latLng??null);o&&this.pin._wrapper&&(this.pin._wrapper.style.left=o.x+"px",this.pin._wrapper.style.top=o.y+"px")}onAdd(){var o;this.pin._wrapper&&((o=this.getPanes())==null||o.floatPane.appendChild(this.pin._wrapper))}onRemove(){var o,a;(a=(o=this.pin._wrapper)==null?void 0:o.parentNode)==null||a.removeChild(this.pin._wrapper)}}this.pin=new r(this)}setCoordinate(t){this._latLng=new google.maps.LatLng(t.latitude,t.longitude),this.pin.draw()}setMap(t,r){var s;const i=(s=t==null?void 0:t.getProviderMap())==null?void 0:s.map;this.pin.setMap(i??null)}}const Gl="GoogleMapsCallback_b7d77ff2",Jg="https://maps.googleapis.com/maps/api/js";function Xg(n,e,t,{autocomplete:r=!1,channel:i=window.location.hostname,client:s,language:o,region:a,libraries:l=[],loading:u="async",params:c={}}={}){window[Gl]=n,r&&l.push("geocoder","places");const d={callback:Gl,channel:i,libraries:l.join(","),...c};t&&(d.key=t),s&&(d.client=s),o&&(d.language=o),a&&(d.region=a),u&&(d.loading=u),td(Jg+"?"+Object.entries(d).map(([h,f])=>h+"="+f).join("&"))}const id=new Rn().withLoadFunction(Xg).withMapClass(qg).withPinClass(Yg).withProviderName("Google").build();class hn{constructor(e,t){m(this,"_ne");m(this,"_sw");this._ne=new oe(t),this._sw=new oe(e)}static fit(e){const t=e.map(u=>u.latitude),r=Math.max(...t),i=Math.min(...t),s=e.map(u=>u.normalLon).sort((u,c)=>u-c),o=s.map((u,c)=>({distance:(c<s.length-1?s[c+1]:s[0]+360)-u,index:c})).reduce((u,c)=>c.distance>u.distance?c:u).index,a=s[o],l=s[(o+1)%s.length];return new this(new oe(i,l),new oe(r,a))}get ne(){return this._ne}set ne(e){this._ne=new oe(e)}get sw(){return this._sw}set sw(e){this._sw=new oe(e)}contains(e){const t=this._sw.latitude<=e.latitude&&e.latitude<=this._ne.latitude,r=this._ne.longitude-this._sw.longitude>=360,i=this._sw.normalLon<=this._ne.normalLon?this._sw.normalLon<=e.normalLon&&e.normalLon<=this._ne.normalLon:this._sw.normalLon<=e.normalLon||e.normalLon<=this._ne.normalLon;return t&&(r||i)}extend(e){if(this._ne.latitude=Math.max(this._ne.latitude,e.latitude),this._sw.latitude=Math.min(this._sw.latitude,e.latitude),!this.contains(e)){const t=((e.longitude-this._ne.longitude)%360+360)%360,r=((this._sw.longitude-e.longitude)%360+360)%360;t<r?this._ne.longitude+=t:this._sw.longitude-=r}}getCenter(e=Qe.SPHERICAL){const t=new oe(this._ne.latitude,this._sw.longitude),r=this._sw.distanceTo(t,ue.DEGREE,e),i=(t.longitude+this._ne.longitude)/2+(this._ne.longitude<t.longitude?180:0);return t.add(-r/2,0,ue.DEGREE,e),t.longitude=i,t}}class Qg{constructor(){m(this,"_anchorX");m(this,"_anchorY");m(this,"_height");m(this,"_icon");m(this,"_srText");m(this,"_width");m(this,"_zIndex");m(this,"_class");m(this,"_element");this._anchorX=.5,this._anchorY=1,this._height=39,this._icon="default",this._srText="map pin",this._width=33,this._zIndex=0,this._class="",this._element=null}getAnchorX(){return this._anchorX}getAnchorY(){return this._anchorY}getClass(){return this._class}getElement(){return this._element}getHeight(){return this._height}getIcon(){return this._icon}getSRText(){return this._srText}getWidth(){return this._width}getZIndex(){return this._zIndex}setAnchorX(e){return this._anchorX=e,this}setAnchorY(e){return this._anchorY=e,this}setClass(e){return this._class=e,this}setElement(e){return this._element=e,this}setHeight(e){return this._height=e,this}setIcon(e){return this._icon=e,this}setSRText(e){return this._srText=e,this}setWidth(e){return this._width=e,this}setZIndex(e){return this._zIndex=e,this}}class Ta{constructor(){m(this,"coordinate");m(this,"hideOffscreen");m(this,"icons");m(this,"propertiesForStatus");m(this,"provider");m(this,"type");m(this,"hasPinUrl");this.coordinate=new oe(0,0),this.hideOffscreen=!1,this.icons={},this.propertiesForStatus=e=>new Qg,this.provider=null,this.type="",this.hasPinUrl=!1}withCoordinate(e){return this.coordinate=new oe(e),this}withHideOffscreen(e){return this.hideOffscreen=e,this}withIcon(e,t){return this.icons[e]=t,this}withPropertiesForStatus(e){return Ye(e,je.FUNCTION),this.propertiesForStatus=e,this}withProvider(e){return e&&(ut(e,nn),this.provider=e),this}withHasPinUrl(e){return this.hasPinUrl=e,this}withType(e){return this.type=e,this}build(){return new em(this)}}class em{constructor(e){m(this,"_coordinate");m(this,"_hideOffscreen");m(this,"_icons");m(this,"_propertiesForStatus");m(this,"_type");m(this,"_clickHandler");m(this,"_focusHandler");m(this,"_hoverHandler");m(this,"_hidden");m(this,"_cancelHiddenUpdater");m(this,"_map");m(this,"_pin");m(this,"_status");var t,r;if(ut(e,Ta),e.provider&&ut(e.provider,nn),!((t=e.provider)!=null&&t.loaded))throw new Error(`MapProvider '${(r=e.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling MapPin constructor.`);this._coordinate=e.coordinate,this._hideOffscreen=e.hideOffscreen,this._icons={...e.icons},this._propertiesForStatus=e.propertiesForStatus,this._type=e.type,this._clickHandler=()=>null,this._focusHandler=i=>this._hoverHandler(i),this._hoverHandler=i=>null,this._hidden=!1,this._cancelHiddenUpdater=()=>null,this._map=null,this._pin=new rd(e.provider).withIcons({...this._icons}).withClickHandler(()=>this._clickHandler()).withFocusHandler(i=>this._focusHandler(i)).withHoverHandler(i=>this._hoverHandler(i)).withHasPinUrl(e.hasPinUrl).build(),this._pin.setCoordinate(e.coordinate),this._status={},this.setStatus(this._status)}getCoordinate(){return this._coordinate}getIcon(e){return this._icons[e]}getMap(){return this._map}getProviderPin(){return this._pin}getType(){return this._type}remove(){this.setMap(null)}setClickHandler(e){Ye(e,je.FUNCTION),this._clickHandler=e}setCoordinate(e){this._coordinate=new oe(e),this._pin.setCoordinate(this._coordinate),this._hideOffscreen&&this._hideIfOffscreen()}setFocusHandler(e){Ye(e,je.FUNCTION),this._focusHandler=e}setHoverHandler(e){Ye(e,je.FUNCTION),this._hoverHandler=e}setMap(e){if(e!==this._map&&(e!==null&&ut(e,od),this._pin.setMap(e,this._hidden?null:this._map),this._map=e,this._hidden=!1,this._cancelHiddenUpdater(),e&&this._hideOffscreen)){let t=!1;const r=new Promise(i=>{this._cancelHiddenUpdater=()=>{t=!0,i()}});(async()=>{for(;!t;)this._hideIfOffscreen(),await Promise.race([r,e.moving()]),await Promise.race([r,e.idle()])})()}}setStatus(e){Object.assign(this._status,e),this._pin.setProperties(this._propertiesForStatus(this._status))}_hideIfOffscreen(){if(this._map){const e=this._map.getBounds().contains(this._coordinate);this._hidden&&e?this._pin.setMap(this._map,null):!this._hidden&&!e&&this._pin.setMap(null,this._map),this._hidden=!e}}}const Vt=.98;function Ei(n,e){return Math.max(n instanceof Function?n():n||0,0)/e}class sd{constructor(){m(this,"controlEnabled");m(this,"defaultCenter");m(this,"defaultZoom");m(this,"legendPins");m(this,"padding");m(this,"panHandler");m(this,"panStartHandler");m(this,"provider");m(this,"providerOptions");m(this,"singlePinZoom");m(this,"wrapper");m(this,"iframeWindow");m(this,"apiKey");this.controlEnabled=!0,this.defaultCenter=new oe(39.83,-98.58),this.defaultZoom=4,this.legendPins=[],this.padding={bottom:()=>50,left:()=>50,right:()=>50,top:()=>50},this.panHandler=(e,t)=>null,this.panStartHandler=e=>null,this.provider=null,this.providerOptions={},this.singlePinZoom=14,this.wrapper=null}withControlEnabled(e){return this.controlEnabled=e,this}withDefaultCenter(e){return this.defaultCenter=new oe(e),this}withDefaultZoom(e){return this.defaultZoom=e,this}withLegendPins(e){return this.legendPins=Array.from(e),this}withPadding(e){return this.padding=e,this}withPanHandler(e){return Ye(e,je.FUNCTION),this.panHandler=e,this}withPanStartHandler(e){return Ye(e,je.FUNCTION),this.panStartHandler=e,this}withProvider(e){return ut(e,nn),this.provider=e,this}withProviderOptions(e){return this.providerOptions=e,this}withSinglePinZoom(e){return this.singlePinZoom=e,this}withWrapper(e){return e?(Ea(e),this.wrapper=e,this):this}withIframeWindow(e){return this.iframeWindow=e,this}withApiKey(e){return this.apiKey=e,this}build(){return new od(this)}}let od=class{constructor(e){m(this,"_defaultCenter");m(this,"_defaultZoom");m(this,"_legendPins");m(this,"_padding");m(this,"_provider");m(this,"_singlePinZoom");m(this,"_wrapper");m(this,"_cachedBounds");m(this,"_resolveIdle");m(this,"_resolveMoving");m(this,"_idlePromise");m(this,"_panHandlerRunning");m(this,"_panStartHandlerRunning");m(this,"_currentBounds");m(this,"_movingPromise");m(this,"_panHandler");m(this,"_panStartHandler");m(this,"_map");var t,r,i;if(ut(e,sd),e.provider&&ut(e.provider,nn),e.wrapper&&Ea(e.wrapper),!((t=e.provider)!=null&&t.loaded))throw new Error(`MapProvider '${(r=e.provider)==null?void 0:r.getProviderName()}' is not loaded. The MapProvider must be loaded before calling Map constructor.`);for(this._defaultCenter=e.defaultCenter,this._defaultZoom=e.defaultZoom,this._legendPins=e.legendPins,this._provider=e.provider,this._singlePinZoom=e.singlePinZoom,this._wrapper=e.wrapper,this._padding={},this.setPadding(e.padding),this._cachedBounds=null,this._resolveIdle=()=>null,this._resolveMoving=()=>null,this._idlePromise=Promise.resolve(),this._setIdle(),this.setPanHandler(e.panHandler),this.setPanStartHandler(e.panStartHandler);(i=this._wrapper)!=null&&i.lastChild;)this._wrapper.removeChild(this._wrapper.lastChild);this._panHandlerRunning=!1,this._panStartHandlerRunning=!1,this._map=new nd(e.provider,this._wrapper).withControlEnabled(e.controlEnabled).withPanHandler(()=>this.panHandler()).withPanStartHandler(()=>this.panStartHandler()).withProviderOptions(e.providerOptions).withIframeWindow(e.iframeWindow).withApiKey(e.apiKey).build(),this.setZoomCenter(this._defaultZoom,this._defaultCenter),this._currentBounds=this.getBounds()}fitCoordinates(e,t=!1,r=this._singlePinZoom){e.length?this.setBounds(hn.fit(e),t,this._padding,r):this.setZoomCenter(this._defaultZoom,this._defaultCenter,t)}getBounds(){var e,t;if(!this._cachedBounds){const r=((e=this._wrapper)==null?void 0:e.offsetHeight)??0,i=((t=this._wrapper)==null?void 0:t.offsetWidth)??0,s=this.getZoom(),o=this.getCenter(),a=360/Math.pow(2,s+8),l=i*a,u=r*a;this._cachedBounds=new hn(o,o),this._cachedBounds.ne.add(u/2,l/2,ue.DEGREE,Qe.MERCATOR),this._cachedBounds.sw.add(-u/2,-l/2,ue.DEGREE,Qe.MERCATOR),this.moving().then(()=>this._cachedBounds=null)}return new hn(this._cachedBounds.sw,this._cachedBounds.ne)}getCenter(){return this._map.getCenter()}getProviderMap(){return this._map}getZoom(){return this._map.getZoom()}async idle(){await this._idlePromise}async moving(){await this._movingPromise}newPinOptions(){return new Ta().withProvider(this._provider)}panHandler(){this._panHandlerRunning||(this._panHandlerRunning=!0,requestAnimationFrame(()=>{const e=this._currentBounds;this._currentBounds=this.getBounds(),this._panHandler&&this._panHandler(e,new hn(new oe(this._currentBounds.sw),new oe(this._currentBounds.ne))),this._panHandlerRunning=!1}),this._setIdle())}panStartHandler(){this._panStartHandlerRunning||(this._panStartHandlerRunning=!0,requestAnimationFrame(()=>{this._panStartHandler&&this._panStartHandler(new hn(new oe(this._currentBounds.sw),new oe(this._currentBounds.ne))),this._panStartHandlerRunning=!1}),this._setMoving())}setBounds({ne:e,sw:t},r=!1,i={},s=1/0){var O,D;const o=(O=this._wrapper)==null?void 0:O.offsetHeight,a=(D=this._wrapper)==null?void 0:D.offsetWidth;if(!o||!a)return;let l=Ei(i.bottom,o),u=Ei(i.left,a),c=Ei(i.right,a),d=Ei(i.top,o),h=u+c,f=l+d;h>Vt&&(u*=Vt/h,c*=Vt/h,h=Vt),f>Vt&&(l*=Vt/f,d*=Vt/f,f=Vt);const p=o*(1-f),_=a*(1-h),y=new hn(t,e),x=new oe(y.ne.latitude,y.sw.longitude),g=y.sw.distanceTo(x,ue.DEGREE,Qe.MERCATOR),v=(y.ne.longitude-x.longitude+360)%360;let C=Math.max(g,v*p/_)/(1-f),S=Math.max(v,g*_/p)/(1-h),b=Math.log2(a*360/S)-8;b>s&&(b=s,S=a*360/2**(b+8),C=S*o/a);const k=y.getCenter(Qe.MERCATOR),T=(d-l)/2*C,E=(c-u)/2*S;k.add(T,E,ue.DEGREE,Qe.MERCATOR),this.setZoomCenter(b,k,r)}setCenter(e,t=!1){this._map.setCenter(new oe(e),t)}setPadding({bottom:e=this._padding.bottom,left:t=this._padding.left,right:r=this._padding.right,top:i=this._padding.top}){return this._padding={bottom:e,left:t,right:r,top:i},this}setPanHandler(e){Ye(e,je.FUNCTION),this._panHandler=e}setPanStartHandler(e){Ye(e,je.FUNCTION),this._panStartHandler=e}setZoom(e,t=!1){this._map.setZoom(e,t)}setZoomCenter(e,t,r=!1){this._map.setZoomCenter(e,t,r)}_setIdle(){this._resolveMoving(),this._movingPromise=new Promise(e=>this._resolveMoving=e),this._resolveIdle()}_setMoving(){this._resolveIdle(),this._idlePromise=new Promise(e=>this._resolveIdle=e),this._resolveMoving()}};const ws=W.createContext(null);function tm(){const n=W.useContext(ws);if(!n||n.map===void 0)throw new Error("Attempted to call useMapContext() outside of <Map>.");return n.map}const ad=({apiKey:n,bounds:e,children:t,className:r,clientKey:i,controls:s=!0,defaultCenter:o={latitude:39.83,longitude:-98.58},defaultZoom:a=4,mapRef:l,padding:u={bottom:50,left:50,right:50,top:50},panHandler:c=()=>null,panStartHandler:d=()=>null,provider:h=id,providerOptions:f={},singleZoom:p=14,iframeId:_})=>{const y=W.useRef(null),[x,g]=W.useState(new oe(o)),[v,C]=W.useState(!1),[S,b]=W.useState(),[k,T]=W.useState(a),E=(O,D)=>{c(O,D),D&&g(D.getCenter())};return W.useEffect(()=>{!v||!S||T(S.getZoom())},[x]),W.useEffect(()=>{if(!e||!v||!S)return;const O=e.map(D=>new oe(D));S.fitCoordinates(O)},[JSON.stringify(e),S]),W.useEffect(()=>{var Z;if(!v||S)return;const O=_&&typeof document<"u"?((Z=document.getElementById(_))==null?void 0:Z.contentWindow)??void 0:void 0,D=new sd().withControlEnabled(s).withDefaultCenter(x).withDefaultZoom(k).withPadding(u).withPanHandler(E).withPanStartHandler(d).withProvider(h).withProviderOptions(f).withSinglePinZoom(p).withWrapper(y.current).withIframeWindow(O).withApiKey(n).build();b(D),l&&(l.current=D)},[v]),W.useEffect(()=>{v||S||!y.current||h instanceof nn&&h.load(n,{...f,...i&&{client:i}}).then(()=>C(!0))},[]),M.jsx("div",{className:Sn({"is-loaded":v},r),id:"map",ref:y,"data-testid":"map",children:S&&M.jsx(ws.Provider,{value:{map:S,provider:h},children:t})})},nm=({count:n})=>M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",children:M.jsxs("g",{fill:"none",fillRule:"evenodd",children:[M.jsx("circle",{fill:"red",fillRule:"nonzero",stroke:"white",cx:"11",cy:"11",r:"11"}),M.jsx("text",{fill:"white",fontFamily:"Arial-BoldMT,Arial",fontSize:"12",fontWeight:"bold",children:M.jsx("tspan",{x:"50%",y:"15",textAnchor:"middle",children:n})})]})}),Oa=W.createContext(null);function rm(){const n=W.useContext(Oa);if(!n)throw new Error("Attempted to call useClustererContext() outside of <Clusterer>.");return n}const im=({clusterRadius:n=50,children:e,ClusterTemplate:t=nm})=>{const{map:r}=W.useContext(ws),[i,s]=W.useState([]),[o,a]=W.useState(),[l,u]=W.useState([]),[c,d]=W.useState([]);return W.useEffect(()=>{a(sm(i,r.getZoom(),n))},[i,r.getZoom()]),W.useEffect(()=>{d(()=>[]),u(()=>[]),(o==null?void 0:o.length)!==0&&(o==null||o.forEach(h=>{if(h.length===1){h[0].pin.setMap(r);return}if(h.length>1){const f=hn.fit(h.map(_=>_.pin.getCoordinate())).getCenter(Qe.MERCATOR),p=`cluster-{${f._lat},${f._lon}}`;h.forEach(_=>_.pin.setMap(null)),u(_=>[..._,p]),d(_=>[..._,M.jsx(Na,{coordinate:f,id:p,onClick:()=>r.fitCoordinates(h.map(y=>y.pin.getCoordinate()),!0,1/0),children:M.jsx(t,{count:h.length})},p)])}}))},[o]),M.jsx(Oa.Provider,{value:{clusters:o??[],clusterIds:l,setPinStore:s},children:M.jsxs(M.Fragment,{children:[c.map((h,f)=>M.jsx(W.Fragment,{children:h},f)),e]})})},sm=(n,e,t)=>{const r=t*Math.PI/2**(e+7),i=n.map((a,l)=>[l]),s=[];n.forEach((a,l)=>{for(let u=l;u<n.length;u++)u!==l&&new oe(a.pin.getCoordinate()).distanceTo(new oe(n[u].pin.getCoordinate()),ue.RADIAN,Qe.MERCATOR)<=r&&(i[l].push(u),i[u].push(l))});let o=1;for(;o;){o=0;let a;if(i.forEach((c,d)=>{c.length>o&&(o=c.length,a=d)}),!o)break;const l=i[a??0],u=[];i[a??0]=[];for(const c of l){const d=i[c];u.push(n[c]),i[c]=[],d.forEach(h=>i[h].splice(i[h].indexOf(c),1))}s.push(u)}return s},om=M.jsx("svg",{width:"30",height:"38",viewBox:"0 0 30 38",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:M.jsx("path",{d:"M30 15.0882C30 23.4212 23.3333 30.7353 15 38C7.22222 31.2941 0 23.4212 0 15.0882C0 6.75523 6.71573 0 15 0C23.2843 0 30 6.75523 30 15.0882Z",fill:"red"})}),Na=({children:n,coordinate:e,hideOffscreen:t=!1,id:r,icon:i=om,onClick:s=()=>null,onFocus:o=()=>null,onHover:a=()=>null,zIndex:l,hasPinUrl:u=!1})=>{const{map:c,provider:d}=W.useContext(ws),h=W.useContext(Oa),f=W.useMemo(()=>new Ta().withCoordinate(e).withHideOffscreen(t).withProvider(d).withHasPinUrl(u).build(),[]);W.useEffect(()=>{if(l!==0&&!l)return;const _=f.getProviderPin().getWrapperElement();_&&(_.style.zIndex=l.toString())},[l]),W.useEffect(()=>{f.setMap(c),f.setClickHandler(()=>s(r)),f.setFocusHandler(y=>o(y,r)),f.setHoverHandler(y=>a(y,r));const _=h==null?void 0:h.clusterIds.includes(r);return h&&!_&&h.setPinStore(y=>[...y,{pin:f,id:r}]),()=>{f.setMap(null),h&&h.setPinStore(y=>y.filter(x=>x.id!==r))}},[]);const p=n||i;if(p){const _=f.getProviderPin().getPinElement();return Object.assign(_.style,{height:"auto",width:"auto"}),Np.createPortal(p,_)}return null},am=({children:n,coordinate:e,linkSameTab:t,pinUrl:r,onClick:i=()=>null,onHover:s=()=>null,onFocus:o=()=>null,...a})=>{var l;return M.jsx(ad,{bounds:[e],...a,children:M.jsx(Na,{coordinate:e,id:"location-map-marker",onClick:i,onHover:s,onFocus:o,hasPinUrl:((l=r||"")==null?void 0:l.length)>0,children:r?M.jsx(ed,{href:r,target:t?"_self":"_blank","aria-label":"map-marker",children:n}):n||void 0})})},ld=W.createContext(null);function lm(n,e){return{getTheme:function(){return e??null}}}function Aa(){const n=W.useContext(ld);return n==null&&function(e,...t){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",e);for(const s of t)i.append("v",s);throw r.search=i.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),n}function A(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ud(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const wt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,um=wt&&"documentMode"in document?document.documentMode:null,gt=wt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Cn=wt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ji=!(!wt||!("InputEvent"in window)||um)&&"getTargetRanges"in new window.InputEvent("input"),Kr=wt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ar=wt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,cm=wt&&/Android/.test(navigator.userAgent),cd=wt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),ql=wt&&cm&&cd,Gr=wt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&gt&&!cd;function dd(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const dm=0,hm=1,fm=2,hd=128,pm=1,gm=2,mm=3,_m=4,ym=5,vm=6,xs=Kr||ar||Gr?" ":"​",en=`
37
-
38
- `,wm=Cn?" ":xs,En={bold:1,capitalize:1024,code:16,highlight:hd,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},xm={directionless:1,unmergeable:2},Yl={center:2,end:6,justify:4,left:1,right:3,start:5},bm={[gm]:"center",[vm]:"end",[_m]:"justify",[pm]:"left",[mm]:"right",[ym]:"start"},Sm={normal:0,segmented:2,token:1},Cm={[dm]:"normal",[fm]:"segmented",[hm]:"token"},Jl="$config";function fd(n,e,t,r,i,s){let o=n.getFirstChild();for(;o!==null;){const a=o.__key;o.__parent===e&&(N(o)&&fd(o,a,t,r,i,s),t.has(a)||s.delete(a),i.push(a)),o=o.getNextSibling()}}let Po=!1,Fa=0;function Em(n){Fa=n.timeStamp}function ro(n,e,t){const r=n.nodeName==="BR",i=e.__lexicalLineBreak;return i&&(n===i||r&&n.previousSibling===i)||r&&Fs(n,t)!==void 0}function km(n,e,t){const r=Wt(ct(t));let i=null,s=null;r!==null&&r.anchorNode===n&&(i=r.anchorOffset,s=r.focusOffset);const o=n.nodeValue;o!==null&&Ha(e,o,i,s,!1)}function Tm(n,e,t){if(B(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return Ut(e)&&t.isAttached()}function Om(n,e,t,r){for(let i=n;i&&!W_(i);i=li(i)){const s=Fs(i,e);if(s!==void 0){const o=Ce(s,t);if(o)return ce(o)||!de(i)?void 0:[i,o]}else if(i===r)return[r,ih(t)]}}function pd(n,e,t){Po=!0;const r=performance.now()-Fa>100;try{Xe(n,()=>{const i=Q()||function(h){return h.getEditorState().read(()=>{const f=Q();return f!==null?f.clone():null})}(n),s=new Map,o=n.getRootElement(),a=n._editorState,l=n._blockCursorElement;let u=!1,c="";for(let h=0;h<e.length;h++){const f=e[h],p=f.type,_=f.target,y=Om(_,n,a,o);if(!y)continue;const[x,g]=y;if(p==="characterData")r&&z(g)&&Ut(_)&&Tm(i,_,g)&&km(_,g,n);else if(p==="childList"){u=!0;const v=f.addedNodes;for(let b=0;b<v.length;b++){const k=v[b],T=nh(k),E=k.parentNode;if(E!=null&&k!==l&&T===null&&!ro(k,E,n)){if(Cn){const O=(de(k)?k.innerText:null)||k.nodeValue;O&&(c+=O)}E.removeChild(k)}}const C=f.removedNodes,S=C.length;if(S>0){let b=0;for(let k=0;k<S;k++){const T=C[k];(ro(T,_,n)||l===T)&&(_.appendChild(T),b++)}S!==b&&s.set(x,g)}}}if(s.size>0)for(const[h,f]of s)f.reconcileObservedMutation(h,n);const d=t.takeRecords();if(d.length>0){for(let h=0;h<d.length;h++){const f=d[h],p=f.addedNodes,_=f.target;for(let y=0;y<p.length;y++){const x=p[y],g=x.parentNode;g==null||x.nodeName!=="BR"||ro(x,_,n)||g.removeChild(x)}}t.takeRecords()}i!==null&&(u&&nt(i),Cn&&lh(n)&&i.insertRawText(c))})}finally{Po=!1}}function gd(n){const e=n._observer;e!==null&&pd(n,e.takeRecords(),e)}function md(n){(function(e){Fa===0&&ct(e).addEventListener("textInput",Em,!0)})(n),n._observer=new MutationObserver((e,t)=>{pd(n,e,t)})}function Nm(n){const e=new Map,t=new Set;for(let r=typeof n=="function"?n:n.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=Is(r);if(i&&i.stateConfigs)for(const s of i.stateConfigs){let o;"stateConfig"in s?(o=s.stateConfig,s.flat&&t.add(o.key)):o=s,e.set(o.key,o)}}return{flatKeys:t,sharedConfigMap:e}}let Am=class _d{constructor(e,t,r=void 0,i=new Map,s=void 0){m(this,"node");m(this,"knownState");m(this,"unknownState");m(this,"sharedNodeState");m(this,"size");this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=i;const{sharedConfigMap:o}=this.sharedNodeState,a=s!==void 0?s:function(l,u,c){let d=c.size;if(u)for(const h in u){const f=l.get(h);f&&c.has(f)||d++}return d}(o,r,i);this.size=a}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const i=this.unknownState[e.key];i!==void 0&&(r=e.parse(i)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return Xl(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,i=new Map(this.knownState);return new _d(e,t,function(s,o,a){let l;if(a)for(const[u,c]of Object.entries(a)){const d=s.get(u);d?o.has(d)||o.set(d,d.parse(c)):(l=l||{},l[u]=c)}return l}(t.sharedConfigMap,i,r),i,this.size)}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:i,unknownState:s}=this;i.has(e)||s&&r in s||(s&&(delete s[r],this.unknownState=Xl(s)),this.size++),i.set(e,t)}updateFromUnknown(e,t){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[r,i]of Object.entries(e))this.updateFromUnknown(r,i)}};function Fm(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new Am(e,yd(e));return e.__state=t,t}function yd(n){return n.__state?n.__state.sharedNodeState:Qd(ja(),n.getType()).sharedNodeState}function Xl(n){if(n)for(const e in n)return n}function Ql(n,e,t){for(const[r,i]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const s=t?t.getValue(r):r.defaultValue;if(s!==i&&!r.isEqual(s,i))return!0}return!1}function eu(n,e,t){const{unknownState:r}=e,i=t?t.unknownState:void 0;if(r){for(const[s,o]of Object.entries(r))if(!n.has(s)&&(n.add(s),o!==(i?i[s]:void 0)))return!0}return!1}function tu(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function nu(n,e){const t=n.__mode,r=n.__format,i=n.__style,s=e.__mode,o=e.__format,a=e.__style,l=n.__state,u=e.__state;return(t===null||t===s)&&(r===null||r===o)&&(i===null||i===a)&&(n.__state===null||l===u||function(c,d){if(c===d)return!0;if(c&&d&&c.size!==d.size)return!1;const h=new Set;return!(c&&Ql(h,c,d)||d&&Ql(h,d,c)||c&&eu(h,c,d)||d&&eu(h,d,c))}(l,u))}function ru(n,e){const t=n.mergeWithSibling(e),r=ge()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function iu(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&z(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(nu(e,r)){r=ru(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&z(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(nu(r,t)){r=ru(r,t);break}break}t.remove()}}else r.remove()}function Mm(n){return su(n.anchor),su(n.focus),n}function su(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,i;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),i=!0):(r=e.getChildAtIndex(t),i=!1),z(r)){n.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!N(r))break;n.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let kn,$e,qr,bs,Ro,$o,Tn,_t,Wo,Yr,Se="",bt=null,St="",Dt="",Gn=!1,Xi=!1;function Qi(n,e){const t=Tn.get(n);if(e!==null){const r=Uo(n);r.parentNode===e&&e.removeChild(r)}if(_t.has(n)||$e._keyToDOMMap.delete(n),N(t)){const r=ts(t,Tn);zo(r,0,r.length-1,null)}t!==void 0&&Ba(Yr,qr,bs,t,"destroyed")}function zo(n,e,t,r){let i=e;for(;i<=t;++i){const s=n[i];s!==void 0&&Qi(s,r)}}function un(n,e){n.setProperty("text-align",e)}const Im="40px";function vd(n,e){const t=kn.theme.indent;if(typeof t=="string"){const i=n.classList.contains(t);e>0&&!i?n.classList.add(t):e<1&&i&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||Im;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function wd(n,e){const t=n.style;e===0?un(t,""):e===1?un(t,"left"):e===2?un(t,"center"):e===3?un(t,"right"):e===4?un(t,"justify"):e===5?un(t,"start"):e===6&&un(t,"end")}function Ho(n,e){const t=function(r){const i=r.__dir;if(i!==null)return i;if(De(r))return null;const s=r.getParentOrThrow();return De(s)&&s.__dir===null?"auto":null}(e);t!==null?n.dir=t:n.removeAttribute("dir")}function es(n,e){const t=_t.get(n);t===void 0&&A(60);const r=t.createDOM(kn,$e);if(function(i,s,o){const a=o._keyToDOMMap;(function(l,u,c){const d=`__lexicalKey_${u._key}`;l[d]=c})(s,o,i),a.set(i,s)}(n,r,$e),z(t)?r.setAttribute("data-lexical-text","true"):ce(t)&&r.setAttribute("data-lexical-decorator","true"),N(t)){const i=t.__indent,s=t.__size;if(Ho(r,t),i!==0&&vd(r,i),s!==0){const a=s-1;Bo(ts(t,_t),t,0,a,t.getDOMSlot(r))}const o=t.__format;o!==0&&wd(r,o),t.isInline()||xd(null,t,r),Ms(t)&&(Se+=en,Dt+=en)}else{const i=t.getTextContent();if(ce(t)){const s=t.decorate($e,kn);s!==null&&bd(n,s),r.contentEditable="false"}Se+=i,Dt+=i}return e!==null&&e.insertChild(r),Ba(Yr,qr,bs,t,"created"),r}function Bo(n,e,t,r,i){const s=Se;Se="";let o=t;for(;o<=r;++o){es(n[o],i);const a=_t.get(n[o]);a!==null&&z(a)&&(bt===null&&(bt=a.getFormat()),St===""&&(St=a.getStyle()))}Ms(e)&&(Se+=en),i.element.__lexicalTextContent=Se,Se=s+Se}function ou(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return yn(r)?"line-break":ce(r)&&r.isInline()?"decorator":null}return"empty"}return null}function xd(n,e,t){const r=ou(n,Tn),i=ou(e,_t);r!==i&&e.getDOMSlot(t).setManagedLineBreak(i)}function Dm(n,e,t){var r;bt=null,St="",function(i,s,o){const a=Se,l=i.__size,u=s.__size;Se="";const c=o.element;if(l===1&&u===1){const d=i.__first,h=s.__first;if(d===h)Fr(d,c);else{const p=Uo(d),_=es(h,null);try{c.replaceChild(_,p)}catch(y){if(typeof y=="object"&&y!=null){const x=`${y.toString()} Parent: ${c.tagName}, new child: {tag: ${_.tagName} key: ${h}}, old child: {tag: ${p.tagName}, key: ${d}}.`;throw new Error(x)}throw y}Qi(d,null)}const f=_t.get(h);z(f)&&(bt===null&&(bt=f.getFormat()),St===""&&(St=f.getStyle()))}else{const d=ts(i,Tn),h=ts(s,_t);if(d.length!==l&&A(227),h.length!==u&&A(228),l===0)u!==0&&Bo(h,s,0,u-1,o);else if(u===0){if(l!==0){const f=o.after==null&&o.before==null&&o.element.__lexicalLineBreak==null;zo(d,0,l-1,f?null:c),f&&(c.textContent="")}}else(function(f,p,_,y,x,g){const v=y-1,C=x-1;let S,b,k=g.getFirstChild(),T=0,E=0;for(;T<=v&&E<=C;){const Z=p[T],j=_[E];if(Z===j)k=io(Fr(j,g.element)),T++,E++;else{S===void 0&&(S=new Set(p)),b===void 0&&(b=new Set(_));const te=b.has(Z),me=S.has(j);if(te)if(me){const be=An($e,j);be===k?k=io(Fr(j,g.element)):(g.withBefore(k).insertChild(be),Fr(j,g.element)),T++,E++}else es(j,g.withBefore(k)),E++;else k=io(Uo(Z)),Qi(Z,g.element),T++}const K=_t.get(j);K!==null&&z(K)&&(bt===null&&(bt=K.getFormat()),St===""&&(St=K.getStyle()))}const O=T>v,D=E>C;if(O&&!D){const Z=_[C+1],j=Z===void 0?null:$e.getElementByKey(Z);Bo(_,f,E,C,g.withBefore(j))}else D&&!O&&zo(p,T,v,g.element)})(s,d,h,l,u,o)}Ms(s)&&(Se+=en),c.__lexicalTextContent=Se,Se=a+Se}(n,e,e.getDOMSlot(t)),r=e,bt==null||bt===r.__textFormat||Xi||r.setTextFormat(bt),function(i){St===""||St===i.__textStyle||Xi||i.setTextStyle(St)}(e)}function ts(n,e){const t=[];let r=n.__first;for(;r!==null;){const i=e.get(r);i===void 0&&A(101),t.push(r),r=i.__next}return t}function Fr(n,e){const t=Tn.get(n);let r=_t.get(n);t!==void 0&&r!==void 0||A(61);const i=Gn||$o.has(n)||Ro.has(n),s=An($e,n);if(t===r&&!i){if(N(t)){const o=s.__lexicalTextContent;o!==void 0&&(Se+=o,Dt+=o)}else{const o=t.getTextContent();Dt+=o,Se+=o}return s}if(t!==r&&i&&Ba(Yr,qr,bs,r,"updated"),r.updateDOM(t,s,kn)){const o=es(n,null);return e===null&&A(62),e.replaceChild(o,s),Qi(n,null),o}if(N(t)&&N(r)){const o=r.__indent;(Gn||o!==t.__indent)&&vd(s,o);const a=r.__format;if((Gn||a!==t.__format)&&wd(s,a),i&&(Dm(t,r,s),De(r)||r.isInline()||xd(t,r,s)),Ms(r)&&(Se+=en,Dt+=en),(Gn||r.__dir!==t.__dir)&&(Ho(s,r),De(r)&&!Gn))for(const l of r.getChildren())N(l)&&Ho(An($e,l.getKey()),l)}else{const o=r.getTextContent();if(ce(r)){const a=r.decorate($e,kn);a!==null&&bd(n,a)}Se+=o,Dt+=o}if(!Xi&&De(r)&&r.__cachedText!==Dt){const o=r.getWritable();o.__cachedText=Dt,r=o}return s}function bd(n,e){let t=$e._pendingDecorators;const r=$e._decorators;if(t===null){if(r[n]===e)return;t=rh($e)}t[n]=e}function io(n){let e=n.nextSibling;return e!==null&&e===$e._blockCursorElement&&(e=e.nextSibling),e}function Lm(n,e,t,r,i,s){Se="",Dt="",Gn=r===2,$e=t,kn=t._config,qr=t._nodes,bs=$e._listeners.mutation,Ro=i,$o=s,Tn=n._nodeMap,_t=e._nodeMap,Xi=e._readOnly,Wo=new Map(t._keyToDOMMap);const o=new Map;return Yr=o,Fr("root",null),$e=void 0,qr=void 0,Ro=void 0,$o=void 0,Tn=void 0,_t=void 0,kn=void 0,Wo=void 0,Yr=void 0,o}function Uo(n){const e=Wo.get(n);return e===void 0&&A(75,n),e}function Y(n){return{type:n}}const Sd=Y("SELECTION_CHANGE_COMMAND"),Cd=Y("CLICK_COMMAND"),ns=Y("DELETE_CHARACTER_COMMAND"),$i=Y("INSERT_LINE_BREAK_COMMAND"),au=Y("INSERT_PARAGRAPH_COMMAND"),zr=Y("CONTROLLED_TEXT_INSERTION_COMMAND"),Ed=Y("PASTE_COMMAND"),lu=Y("REMOVE_TEXT_COMMAND"),rs=Y("DELETE_WORD_COMMAND"),is=Y("DELETE_LINE_COMMAND"),gn=Y("FORMAT_TEXT_COMMAND"),kd=Y("UNDO_COMMAND"),Td=Y("REDO_COMMAND"),Pm=Y("KEYDOWN_COMMAND"),Rm=Y("KEY_ARROW_RIGHT_COMMAND"),$m=Y("MOVE_TO_END"),Wm=Y("KEY_ARROW_LEFT_COMMAND"),zm=Y("MOVE_TO_START"),Hm=Y("KEY_ARROW_UP_COMMAND"),Bm=Y("KEY_ARROW_DOWN_COMMAND"),jo=Y("KEY_ENTER_COMMAND"),Um=Y("KEY_SPACE_COMMAND"),jm=Y("KEY_BACKSPACE_COMMAND"),Vm=Y("KEY_ESCAPE_COMMAND"),Zm=Y("KEY_DELETE_COMMAND"),Km=Y("KEY_TAB_COMMAND"),Gm=Y("DROP_COMMAND"),qm=Y("DRAGSTART_COMMAND"),Ym=Y("DRAGOVER_COMMAND"),Jm=Y("DRAGEND_COMMAND"),Od=Y("COPY_COMMAND"),Nd=Y("CUT_COMMAND"),uu=Y("SELECT_ALL_COMMAND"),Xm=Y("FOCUS_COMMAND"),Qm=Y("BLUR_COMMAND"),e_=Y("KEY_MODIFIER_COMMAND"),Nt=Object.freeze({}),Vo=[["keydown",function(n,e){if(Hr=n.timeStamp,Ad=n.key,!e.isComposing()&&!R(e,Pm,n)&&n.key!=null){if(so&&Ru(n))return Xe(e,()=>{ki(e,oo)}),so=!1,void(oo="");if(function(t){return se(t,"ArrowRight",{shiftKey:"any"})}(n))R(e,Rm,n);else if(function(t){return se(t,"ArrowRight",Mt)}(n))R(e,$m,n);else if(function(t){return se(t,"ArrowLeft",{shiftKey:"any"})}(n))R(e,Wm,n);else if(function(t){return se(t,"ArrowLeft",Mt)}(n))R(e,zm,n);else if(function(t){return se(t,"ArrowUp",{altKey:"any",shiftKey:"any"})}(n))R(e,Hm,n);else if(function(t){return se(t,"ArrowDown",{altKey:"any",shiftKey:"any"})}(n))R(e,Bm,n);else if(function(t){return se(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(n))Br=!0,R(e,jo,n);else if(function(t){return t.key===" "}(n))R(e,Um,n);else if(function(t){return gt&&se(t,"o",{ctrlKey:!0})}(n))n.preventDefault(),Br=!0,R(e,$i,!0);else if(function(t){return se(t,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(n))Br=!1,R(e,jo,n);else if(function(t){return se(t,"Backspace",{shiftKey:"any"})||gt&&se(t,"h",{ctrlKey:!0})}(n))Ru(n)?R(e,jm,n):(n.preventDefault(),R(e,ns,!0));else if(function(t){return t.key==="Escape"}(n))R(e,Vm,n);else if(function(t){return se(t,"Delete",{})||gt&&se(t,"d",{ctrlKey:!0})}(n))(function(t){return t.key==="Delete"})(n)?R(e,Zm,n):(n.preventDefault(),R(e,ns,!1));else if(function(t){return se(t,"Backspace",Pu)}(n))n.preventDefault(),R(e,rs,!0);else if(function(t){return se(t,"Delete",Pu)}(n))n.preventDefault(),R(e,rs,!1);else if(function(t){return gt&&se(t,"Backspace",{metaKey:!0})}(n))n.preventDefault(),R(e,is,!0);else if(function(t){return gt&&(se(t,"Delete",{metaKey:!0})||se(t,"k",{ctrlKey:!0}))}(n))n.preventDefault(),R(e,is,!1);else if(function(t){return se(t,"b",Mt)}(n))n.preventDefault(),R(e,gn,"bold");else if(function(t){return se(t,"u",Mt)}(n))n.preventDefault(),R(e,gn,"underline");else if(function(t){return se(t,"i",Mt)}(n))n.preventDefault(),R(e,gn,"italic");else if(function(t){return se(t,"Tab",{shiftKey:"any"})}(n))R(e,Km,n);else if(function(t){return se(t,"z",Mt)}(n))n.preventDefault(),R(e,kd,void 0);else if(function(t){return gt?se(t,"z",{metaKey:!0,shiftKey:!0}):se(t,"y",{ctrlKey:!0})||se(t,"z",{ctrlKey:!0,shiftKey:!0})}(n))n.preventDefault(),R(e,Td,void 0);else{const t=e._editorState._selection;t===null||B(t)?$u(n)&&(n.preventDefault(),R(e,uu,n)):function(r){return se(r,"c",Mt)}(n)?(n.preventDefault(),R(e,Od,n)):function(r){return se(r,"x",Mt)}(n)?(n.preventDefault(),R(e,Nd,n)):$u(n)&&(n.preventDefault(),R(e,uu,n))}(function(t){return t.ctrlKey||t.shiftKey||t.altKey||t.metaKey})(n)&&R(e,e_,n)}}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;ui(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&Xe(e,()=>{Iu(t)||(Go=!0)})}],["compositionstart",function(n,e){Xe(e,()=>{const t=Q();if(B(t)&&!e.isComposing()){const r=t.anchor,i=t.anchor.getNode();Ie(r.key),(n.timeStamp<Hr+30||r.type==="element"||!t.isCollapsed()||i.getFormat()!==t.format||z(i)&&i.getStyle()!==t.style)&&R(e,zr,wm)}})}],["compositionend",function(n,e){Cn?Sr=!0:ar||!Kr&&!Gr?Xe(e,()=>{ki(e,n.data)}):(so=!0,oo=n.data)}],["input",function(n,e){n.stopPropagation(),Xe(e,()=>{if(de(n.target)&&Iu(n.target))return;const t=Q(),r=n.data,i=Ld(n);if(r!=null&&B(t)&&Id(t,i,r,n.timeStamp,!1)){Sr&&(ki(e,r),Sr=!1);const s=t.anchor.getNode(),o=Wt(ct(e));if(o===null)return;const a=t.isBackward(),l=a?t.anchor.offset:t.focus.offset,u=a?t.focus.offset:t.anchor.offset;Ji&&!t.isCollapsed()&&z(s)&&o.anchorNode!==null&&s.getTextContent().slice(0,l)+r+s.getTextContent().slice(l+u)===ah(o.anchorNode)||R(e,zr,r);const c=r.length;Cn&&c>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=c),Kr||ar||Gr||!e.isComposing()||(Hr=0,Ie(null))}else za(!1,e,r!==null?r:void 0),Sr&&(ki(e,r||void 0),Sr=!1);(function(){Me();const s=ge();gd(s)})()},{event:n}),qn=null}],["click",function(n,e){Xe(e,()=>{const t=Q(),r=Wt(ct(e)),i=ri();if(r){if(B(t)){const s=t.anchor,o=s.getNode();if(s.type==="element"&&s.offset===0&&t.isCollapsed()&&!De(o)&&tt().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&t.is(i))r.removeAllRanges(),t.dirty=!0;else if(n.detail===3&&!t.isCollapsed()&&o!==t.focus.getNode()){const a=Bi(o,l=>N(l)&&!l.isInline());N(a)&&a.select(0)}}else if(n.pointerType==="touch"||n.pointerType==="pen"){const s=r.anchorNode;(de(s)||Ut(s))&&nt(Da(i,r,e,n))}}R(e,Cd,n)})}],["cut",Nt],["copy",Nt],["dragstart",Nt],["dragover",Nt],["dragend",Nt],["paste",Nt],["focus",Nt],["blur",Nt],["drop",Nt]];Ji&&Vo.push(["beforeinput",(n,e)=>function(t,r){const i=t.inputType,s=Ld(t);i==="deleteCompositionText"||Cn&&lh(r)||i!=="insertCompositionText"&&Xe(r,()=>{const o=Q();if(i==="deleteContentBackward"){if(o===null){const f=ri();if(!B(f))return;nt(f.clone())}if(B(o)){const f=o.anchor.key===o.focus.key;if(a=t.timeStamp,Ad==="MediaLast"&&a<Hr+30&&r.isComposing()&&f){if(Ie(null),Hr=0,setTimeout(()=>{Xe(r,()=>{Ie(null)})},30),B(o)){const p=o.anchor.getNode();p.markDirty(),z(p)||A(142),Dd(o,p)}}else{Ie(null),t.preventDefault();const p=o.anchor.getNode(),_=p.getTextContent(),y=p.canInsertTextAfter(),x=o.anchor.offset===0&&o.focus.offset===_.length;let g=ql&&f&&!x&&y;if(g&&o.isCollapsed()&&(g=!ce(O_(o.anchor,!0))),!g){R(r,ns,!0);const v=Q();ql&&B(v)&&v.isCollapsed()&&(fn=v,setTimeout(()=>fn=null))}}return}}var a;if(!B(o))return;const l=t.data;qn!==null&&za(!1,r,qn),o.dirty&&qn===null||!o.isCollapsed()||De(o.anchor.getNode())||s===null||o.applyDOMRange(s),qn=null;const u=o.anchor,c=o.focus,d=u.getNode(),h=c.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(t.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":R(r,zr,t);break;case"insertFromComposition":Ie(null),R(r,zr,t);break;case"insertLineBreak":Ie(null),R(r,$i,!1);break;case"insertParagraph":Ie(null),Br&&!ar?(Br=!1,R(r,$i,!1)):R(r,au,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":R(r,Ed,t);break;case"deleteByComposition":(function(f,p){return f!==p||N(f)||N(p)||!vn(f)||!vn(p)})(d,h)&&R(r,lu,t);break;case"deleteByDrag":case"deleteByCut":R(r,lu,t);break;case"deleteContent":R(r,ns,!1);break;case"deleteWordBackward":R(r,rs,!0);break;case"deleteWordForward":R(r,rs,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":R(r,is,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":R(r,is,!1);break;case"formatStrikeThrough":R(r,gn,"strikethrough");break;case"formatBold":R(r,gn,"bold");break;case"formatItalic":R(r,gn,"italic");break;case"formatUnderline":R(r,gn,"underline");break;case"historyUndo":R(r,kd,void 0);break;case"historyRedo":R(r,Td,void 0)}else{if(l===`
39
- `)t.preventDefault(),R(r,$i,!1);else if(l===en)t.preventDefault(),R(r,au,void 0);else if(l==null&&t.dataTransfer){const f=t.dataTransfer.getData("text/plain");t.preventDefault(),o.insertRawText(f)}else l!=null&&Id(o,s,l,t.timeStamp,!0)?(t.preventDefault(),R(r,zr,l)):qn=l;Fd=t.timeStamp}})}(n,e)]);let Hr=0,Ad=null,Fd=0,qn=null;const Zo=new WeakMap,ss=new WeakMap;let Ko=!1,Go=!1,Br=!1,Sr=!1,so=!1,oo="",fn=null,Md=[0,"",0,"root",0];function Id(n,e,t,r,i){const s=n.anchor,o=n.focus,a=s.getNode(),l=ge(),u=Wt(ct(l)),c=u!==null?u.anchorNode:null,d=s.key,h=l.getElementByKey(d),f=t.length;return d!==o.key||!z(a)||(!i&&(!Ji||Fd<r+50)||a.isDirty()&&f<2||sh(t))&&s.offset!==o.offset&&!a.isComposing()||It(a)||a.isDirty()&&f>1||(i||!Ji)&&h!==null&&!a.isComposing()&&c!==lr(h)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||a.getFormat()!==n.format||a.getStyle()!==n.style||function(p,_){if(_.isSegmented())return!0;if(!p.isCollapsed())return!1;const y=p.anchor.offset,x=_.getParentOrThrow(),g=vn(_);return y===0?!_.canInsertTextBefore()||!x.canInsertTextBefore()&&!_.isComposing()||g||function(v){const C=v.getPreviousSibling();return(z(C)||N(C)&&C.isInline())&&!C.canInsertTextAfter()}(_):y===_.getTextContentSize()&&(!_.canInsertTextAfter()||!x.canInsertTextAfter()&&!_.isComposing()||g)}(n,a)}function cu(n,e){return Ut(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function du(n,e,t){const{anchorNode:r,anchorOffset:i,focusNode:s,focusOffset:o}=n;Ko&&(Ko=!1,cu(r,i)&&cu(s,o)&&!fn)||Xe(e,()=>{if(!t)return void nt(null);if(!Ns(e,r,s))return;let a=Q();if(fn&&B(a)&&a.isCollapsed()){const l=a.anchor,u=fn.anchor;(l.key===u.key&&l.offset===u.offset+1||l.offset===1&&u.getNode().is(l.getNode().getPreviousSibling()))&&(a=fn.clone(),nt(a))}if(fn=null,B(a)){const l=a.anchor,u=l.getNode();if(a.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(a.dirty=!0);const c=ct(e).event,d=c?c.timeStamp:performance.now(),[h,f,p,_,y]=Md,x=tt(),g=e.isComposing()===!1&&x.getTextContent()==="";if(d<y+200&&l.offset===p&&l.key===_)Wi(a,h,f);else if(l.type==="text")z(u)||A(141),Dd(a,u);else if(l.type==="element"&&!g){N(u)||A(259);const v=l.getNode();v.isEmpty()?function(C,S){const b=S.getTextFormat(),k=S.getTextStyle();Wi(C,b,k)}(a,v):Wi(a,0,"")}}else{const c=l.key,d=a.focus.key,h=a.getNodes(),f=h.length,p=a.isBackward(),_=p?o:i,y=p?i:o,x=p?d:c,g=p?c:d;let v=2047,C=!1;for(let S=0;S<f;S++){const b=h[S],k=b.getTextContentSize();if(z(b)&&k!==0&&!(S===0&&b.__key===x&&_===k||S===f-1&&b.__key===g&&y===0)&&(C=!0,v&=b.getFormat(),v===0))break}a.format=C?v:0}}R(e,Sd,void 0)})}function Wi(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function Dd(n,e){Wi(n,e.getFormat(),e.getStyle())}function Ld(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function ki(n,e){const t=n._compositionKey;if(Ie(null),t!==null&&e!=null){if(e===""){const r=Ce(t),i=lr(n.getElementByKey(t));return void(i!==null&&i.nodeValue!==null&&z(r)&&Ha(r,i.nodeValue,null,null,!0))}if(e[e.length-1]===`
40
- `){const r=Q();if(B(r)){const i=r.focus;return r.anchor.set(i.key,i.offset,i.type),void R(n,jo,null)}}}za(!0,n,e)}function Pd(n){let e=n.__lexicalEventHandles;return e===void 0&&(e=[],n.__lexicalEventHandles=e),e}const Qn=new Map;function Rd(n){const e=D_(n.target);if(e===null)return;const t=th(e.anchorNode);if(t===null)return;Go&&(Go=!1,Xe(t,()=>{const l=ri(),u=e.anchorNode;(de(u)||Ut(u))&&nt(Da(l,e,t,n))}));const r=Wa(t),i=r[r.length-1],s=i._key,o=Qn.get(s),a=o||i;a!==t&&du(e,a,!1),du(e,t,!0),t!==i?Qn.set(s,t):o&&Qn.delete(s)}function hu(n){n._lexicalHandled=!0}function fu(n){return n._lexicalHandled===!0}function t_(n){const e=Zo.get(n);if(e===void 0)return;const t=ss.get(e);if(t===void 0)return;const r=t-1;r>=0||A(164),Zo.delete(n),ss.set(e,r),r===0&&e.removeEventListener("selectionchange",Rd);const i=As(n);$a(i)?(function(o){if(o._parentEditor!==null){const a=Wa(o),l=a[a.length-1]._key;Qn.get(l)===o&&Qn.delete(l)}else Qn.delete(o._key)}(i),n.__lexicalEditor=null):i&&A(198);const s=Pd(n);for(let o=0;o<s.length;o++)s[o]();n.__lexicalEventHandles=[]}function qo(n,e,t){Me();const r=n.__key,i=n.getParent();if(i===null)return;const s=function(a){const l=Q();if(!B(l)||!N(a))return l;const{anchor:u,focus:c}=l,d=u.getNode(),h=c.getNode();return Xo(d,a)&&u.set(a.__key,0,"element"),Xo(h,a)&&c.set(a.__key,0,"element"),l}(n);let o=!1;if(B(s)&&e){const a=s.anchor,l=s.focus;a.key===r&&(ls(a,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0),l.key===r&&(ls(l,n,i,n.getPreviousSibling(),n.getNextSibling()),o=!0)}else er(s)&&e&&n.isSelected()&&n.selectPrevious();if(B(s)&&e&&!o){const a=n.getIndexWithinParent();wn(n),as(s,i,a,-1)}else wn(n);t||on(i)||i.canBeEmpty()||!i.isEmpty()||qo(i,e),e&&s&&De(i)&&i.isEmpty()&&i.selectEnd()}const $d=Symbol.for("ephemeral");function os(n){return n[$d]||!1}class yt{constructor(e){m(this,"__type");m(this,"__key");m(this,"__parent");m(this,"__prev");m(this,"__next");m(this,"__state");this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),k_(this,e)}static getType(){const{ownNodeType:e}=Is(this);return e===void 0&&A(64,this.name),e}static clone(e){A(65,this.name)}$config(){return{}}config(e,t){const r=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:r,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}getType(){return this.__type}isInline(){A(137,this.constructor.name)}isAttached(){let e=this.__key;for(;e!==null;){if(e==="root")return!0;const t=Ce(e);if(t===null)break;e=t.__parent}return!1}isSelected(e){const t=e||Q();if(t==null)return!1;const r=t.getNodes().some(i=>i.__key===this.__key);if(z(this))return r;if(B(t)&&t.anchor.type==="element"&&t.focus.type==="element"){if(t.isCollapsed())return!1;const i=this.getParent();if(ce(this)&&this.isInline()&&i){const s=t.isBackward()?t.focus:t.anchor;if(i.is(s.getNode())&&s.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(e===null)return-1;let t=e.getFirstChild(),r=0;for(;t!==null;){if(this.is(t))return r;r++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return e===null?null:Ce(e)}getParentOrThrow(){const e=this.getParent();return e===null&&A(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){const t=e.getParent();if(on(t))return N(e)||e===this&&ce(e)||A(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return e===null&&A(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;t!==null;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return e===null?null:Ce(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(t===null)return e;let r=t.getFirstChild();for(;r!==null&&!r.is(this);)e.push(r),r=r.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return e===null?null:Ce(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;t!==null;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=N(this)?this:this.getParent(),r=N(e)?e:e.getParent(),i=t&&r?Ui(t,r):null;return i?i.commonAncestor:null}is(e){return e!=null&&this.__key===e.__key}isBefore(e){const t=Ui(this,e);return t!==null&&(t.type==="descendant"||(t.type==="branch"?gh(t)===-1:(t.type!=="same"&&t.type!=="ancestor"&&A(279),!1)))}isParentOf(e){const t=Ui(this,e);return t!==null&&t.type==="ancestor"}getNodesBetween(e){const t=this.isBefore(e),r=[],i=new Set;let s=this;for(;s!==null;){const o=s.__key;if(i.has(o)||(i.add(o),r.push(s)),s===e)break;const a=N(s)?t?s.getFirstChild():s.getLastChild():null;if(a!==null){s=a;continue}const l=t?s.getNextSibling():s.getPreviousSibling();if(l!==null){s=l;continue}const u=s.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===e)break;let c=null,d=u;do{if(d===null&&A(68),c=t?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;c!==null||i.has(d.__key)||r.push(d)}while(c===null);s=c}return t||r.reverse(),r}isDirty(){const e=ge()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){if(os(this))return this;const e=Ce(this.__key);return e===null&&A(113),e}getWritable(){if(os(this))return this;Me();const e=sn(),t=ge(),r=e._nodeMap,i=this.__key,s=this.getLatest(),o=t._cloneNotNeeded,a=Q();if(a!==null&&a.setCachedNodes(null),o.has(i))return cs(s),s;const l=dh(s);return o.add(i),cs(l),r.set(i,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){A(70)}updateDOM(e,t,r){A(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){const e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){A(18,this.name)}updateFromJSON(e){return function(t,r){const i=t.getWritable(),s=r.$;let o=s;for(const a of yd(i).flatKeys)a in r&&(o!==void 0&&o!==s||(o={...s}),o[a]=r[a]);return(i.__state||o)&&Fm(t).updateFromJSON(o),i}(this,e)}static transform(){return null}remove(e){qo(this,!0,e)}replace(e,t){Me();let r=Q();r!==null&&(r=r.clone()),fo(this,e);const i=this.getLatest(),s=this.__key,o=e.__key,a=e.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size;wn(a);const c=i.getPreviousSibling(),d=i.getNextSibling(),h=i.__prev,f=i.__next,p=i.__parent;if(qo(i,!1,!0),c===null?l.__first=o:c.getWritable().__next=o,a.__prev=h,d===null?l.__last=o:d.getWritable().__prev=o,a.__next=f,a.__parent=p,l.__size=u,t&&(N(this)&&N(a)||A(139),this.getChildren().forEach(_=>{a.append(_)})),B(r)){nt(r);const _=r.anchor,y=r.focus;_.key===s&&_u(_,a),y.key===s&&_u(y,a)}return Yt()===s&&Ie(o),a}insertAfter(e,t=!0){Me(),fo(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.getParent(),o=Q();let a=!1,l=!1;if(s!==null){const f=e.getIndexWithinParent();if(wn(i),B(o)){const p=s.__key,_=o.anchor,y=o.focus;a=_.type==="element"&&_.key===p&&_.offset===f+1,l=y.type==="element"&&y.key===p&&y.offset===f+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=i.__key,h=r.__next;if(u===null?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,i.__next=h,i.__prev=r.__key,i.__parent=r.__parent,t&&B(o)){const f=this.getIndexWithinParent();as(o,c,f+1);const p=c.__key;a&&o.anchor.set(p,f+2,"element"),l&&o.focus.set(p,f+2,"element")}return e}insertBefore(e,t=!0){Me(),fo(this,e);const r=this.getWritable(),i=e.getWritable(),s=i.__key;wn(i);const o=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),l=r.__prev,u=this.getIndexWithinParent();o===null?a.__first=s:o.getWritable().__next=s,a.__size++,r.__prev=s,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const c=Q();return t&&B(c)&&as(c,this.getParentOrThrow(),u),e}isParentRequired(){return!1}createParentElementNode(){return Ee()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Me();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(N(r))return r.select();if(!z(r)){const s=r.getIndexWithinParent()+1;return i.select(s,s)}return r.select(e,t)}selectNext(e,t){Me();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(N(r))return r.select(0,0);if(!z(r)){const s=r.getIndexWithinParent();return i.select(s,s)}return r.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}m(yt,"importDOM");const zi="history-merge",n_="collaboration",r_="skip-scroll-into-view",i_="skip-dom-selection",s_="skip-selection-focus";class ti extends yt{static getType(){return"linebreak"}static clone(e){return new ti(e.__key)}constructor(e){super(e)}getTextContent(){return`
41
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>function(t){const r=t.parentElement;if(r!==null&&zu(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&Ti(i)){const s=r.lastChild;if(s===t||s.previousSibling===t&&Ti(s))return!0}}return!1}(e)||function(t){const r=t.parentElement;if(r!==null&&zu(r)){const i=r.firstChild;if(i===t||i.nextSibling===t&&Ti(i))return!1;const s=r.lastChild;if(s===t||s.previousSibling===t&&Ti(s))return!0}return!1}(e)?null:{conversion:o_,priority:0}}}static importJSON(e){return On().updateFromJSON(e)}}function o_(n){return{node:On()}}function On(){return Ae(new ti)}function yn(n){return n instanceof ti}function Ti(n){return Ut(n)&&/^( |\t|\r?\n)+$/.test(n.textContent||"")}function ao(n,e){return 16&e?"code":e&hd?"mark":32&e?"sub":64&e?"sup":null}function lo(n,e){return 1&e?"strong":2&e?"em":"span"}function Wd(n,e,t,r,i){const s=r.classList;let o=tr(i,"base");o!==void 0&&s.add(...o),o=tr(i,"underlineStrikethrough");let a=!1;const l=8&e&&4&e;o!==void 0&&(8&t&&4&t?(a=!0,l||s.add(...o)):l&&s.remove(...o));for(const u in En){const c=En[u];if(o=tr(i,u),o!==void 0)if(t&c){if(a&&(u==="underline"||u==="strikethrough")){e&c&&s.remove(...o);continue}(!(e&c)||l&&u==="underline"||u==="strikethrough")&&s.add(...o)}else e&c&&s.remove(...o)}}function zd(n,e,t){const r=e.firstChild,i=t.isComposing(),s=n+(i?xs:"");if(r==null)e.textContent=s;else{const o=r.nodeValue;if(o!==s)if(i||Cn){const[a,l,u]=function(c,d){const h=c.length,f=d.length;let p=0,_=0;for(;p<h&&p<f&&c[p]===d[p];)p++;for(;_+p<h&&_+p<f&&c[h-_-1]===d[f-_-1];)_++;return[p,h-p-_,d.slice(p,f-_)]}(o,s);l!==0&&r.deleteData(a,l),r.insertData(a,u)}else r.nodeValue=s}}function pu(n,e,t,r,i,s){zd(i,n,e);const o=s.theme.text;o!==void 0&&Wd(0,0,r,n,o)}function Oi(n,e){const t=document.createElement(e);return t.appendChild(n),t}class rn extends yt{constructor(t="",r){super(r);m(this,"__text");m(this,"__format");m(this,"__style");m(this,"__mode");m(this,"__detail");this.__text=t,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}static getType(){return"text"}static clone(t){return new rn(t.__text,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text,this.__format=t.__format,this.__style=t.__style,this.__mode=t.__mode,this.__detail=t.__detail}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const t=this.getLatest();return Cm[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Yt()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(t){const r=En[t];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,r){return us(this.getLatest().__format,t,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(t,r){const i=this.__format,s=ao(0,i),o=lo(0,i),a=s===null?o:s,l=document.createElement(a);let u=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),s!==null&&(u=document.createElement(o),l.appendChild(u)),pu(u,this,0,i,this.__text,t);const c=this.__style;return c!==""&&(l.style.cssText=c),l}updateDOM(t,r,i){const s=this.__text,o=t.__format,a=this.__format,l=ao(0,o),u=ao(0,a),c=lo(0,o),d=lo(0,a);if((l===null?c:l)!==(u===null?d:u))return!0;if(l===u&&c!==d){const y=r.firstChild;y==null&&A(48);const x=document.createElement(d);return pu(x,this,0,a,s,i),r.replaceChild(x,y),!1}let h=r;u!==null&&l!==null&&(h=r.firstChild,h==null&&A(49)),zd(s,h,this);const f=i.theme.text;f!==void 0&&o!==a&&Wd(0,o,a,h,f);const p=t.__style,_=this.__style;return p!==_&&(r.style.cssText=_),!1}static importDOM(){return{"#text":()=>({conversion:c_,priority:0}),b:()=>({conversion:l_,priority:0}),code:()=>({conversion:At,priority:0}),em:()=>({conversion:At,priority:0}),i:()=>({conversion:At,priority:0}),mark:()=>({conversion:At,priority:0}),s:()=>({conversion:At,priority:0}),span:()=>({conversion:a_,priority:0}),strong:()=>({conversion:At,priority:0}),sub:()=>({conversion:At,priority:0}),sup:()=>({conversion:At,priority:0}),u:()=>({conversion:At,priority:0})}}static importJSON(t){return Te().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTextContent(t.text).setFormat(t.format).setDetail(t.detail).setMode(t.mode).setStyle(t.style)}exportDOM(t){let{element:r}=super.exportDOM(t);return de(r)||A(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=Oi(r,"b")),this.hasFormat("italic")&&(r=Oi(r,"i")),this.hasFormat("strikethrough")&&(r=Oi(r,"s")),this.hasFormat("underline")&&(r=Oi(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(t,r){}setFormat(t){const r=this.getWritable();return r.__format=typeof t=="string"?En[t]:t,r}setDetail(t){const r=this.getWritable();return r.__detail=typeof t=="string"?xm[t]:t,r}setStyle(t){const r=this.getWritable();return r.__style=t,r}toggleFormat(t){const r=us(this.getFormat(),t,null);return this.setFormat(r)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const r=Sm[t];if(this.__mode===r)return this;const i=this.getWritable();return i.__mode=r,i}setTextContent(t){if(this.__text===t)return this;const r=this.getWritable();return r.__text=t,r}select(t,r){Me();let i=t,s=r;const o=Q(),a=this.getTextContent(),l=this.__key;if(typeof a=="string"){const u=a.length;i===void 0&&(i=u),s===void 0&&(s=u)}else i=0,s=0;if(!B(o))return Ud(l,i,l,s,"text","text");{const u=Yt();u!==o.anchor.key&&u!==o.focus.key||Ie(l),o.setTextNodeRange(this,i,this,s)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,r,i,s){const o=this.getWritable(),a=o.__text,l=i.length;let u=t;u<0&&(u=l+u,u<0&&(u=0));const c=Q();if(s&&B(c)){const h=t+l;c.setTextNodeRange(o,h,o,h)}const d=a.slice(0,u)+i+a.slice(u+r);return o.__text=d,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Me();const r=this.getLatest(),i=r.getTextContent();if(i==="")return[];const s=r.__key,o=Yt(),a=i.length;t.sort((E,O)=>E-O),t.push(a);const l=[],u=t.length;for(let E=0,O=0;E<a&&O<=u;O++){const D=t[O];D>E&&(l.push(i.slice(E,D)),E=D)}const c=l.length;if(c===1)return[r];const d=l[0],h=r.getParent();let f;const p=r.getFormat(),_=r.getStyle(),y=r.__detail;let x=!1,g=null,v=null;const C=Q();if(B(C)){const[E,O]=C.isBackward()?[C.focus,C.anchor]:[C.anchor,C.focus];E.type==="text"&&E.key===s&&(g=E),O.type==="text"&&O.key===s&&(v=O)}r.isSegmented()?(f=Te(d),f.__format=p,f.__style=_,f.__detail=y,f.__state=tu(r,f),x=!0):f=r.setTextContent(d);const S=[f];for(let E=1;E<c;E++){const O=Te(l[E]);O.__format=p,O.__style=_,O.__detail=y,O.__state=tu(r,O);const D=O.__key;o===s&&Ie(D),S.push(O)}const b=g?g.offset:null,k=v?v.offset:null;let T=0;for(const E of S){if(!g&&!v)break;const O=T+E.getTextContentSize();if(g!==null&&b!==null&&b<=O&&b>=T&&(g.set(E.getKey(),b-T,"text"),b<O&&(g=null)),v!==null&&k!==null&&k<=O&&k>=T){v.set(E.getKey(),k-T,"text");break}T=O}if(h!==null){(function(D){const Z=D.getPreviousSibling(),j=D.getNextSibling();Z!==null&&cs(Z),j!==null&&cs(j)})(this);const E=h.getWritable(),O=this.getIndexWithinParent();x?(E.splice(O,0,S),this.remove()):E.splice(O,1,S),B(C)&&as(C,h,O,c-1)}return S}mergeWithSibling(t){const r=t===this.getPreviousSibling();r||t===this.getNextSibling()||A(50);const i=this.__key,s=t.__key,o=this.__text,a=o.length;Yt()===s&&Ie(i);const l=Q();if(B(l)){const h=l.anchor,f=l.focus;h!==null&&h.key===s&&Cu(h,r,i,t,a),f!==null&&f.key===s&&Cu(f,r,i,t,a)}const u=t.__text,c=r?u+o:o+u;this.setTextContent(c);const d=this.getWritable();return t.remove(),d}isTextEntity(){return!1}}function a_(n){return{forChild:Ma(n.style),node:null}}function l_(n){const e=n,t=e.style.fontWeight==="normal";return{forChild:Ma(e.style,t?void 0:"bold"),node:null}}const gu=new WeakMap;function u_(n){if(!de(n))return!1;if(n.nodeName==="PRE")return!0;const e=n.style.whiteSpace;return typeof e=="string"&&e.startsWith("pre")}function c_(n){const e=n;n.parentElement===null&&A(129);let t=e.textContent||"";if(function(r){let i,s=r.parentNode;const o=[r];for(;s!==null&&(i=gu.get(s))===void 0&&!u_(s);)o.push(s),s=s.parentNode;const a=i===void 0?s:i;for(let l=0;l<o.length;l++)gu.set(o[l],a);return a}(e)!==null){const r=t.split(/(\r?\n|\t)/),i=[],s=r.length;for(let o=0;o<s;o++){const a=r[o];a===`
42
- `||a===`\r
43
- `?i.push(On()):a===" "?i.push(Ss()):a!==""&&i.push(Te(a))}return{node:i}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){let r=e,i=!0;for(;r!==null&&(r=mu(r,!1))!==null;){const s=r.textContent||"";if(s.length>0){/[ \t\n]$/.test(s)&&(t=t.slice(1)),i=!1;break}}i&&(t=t.slice(1))}if(t[t.length-1]===" "){let r=e,i=!0;for(;r!==null&&(r=mu(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Te(t)}}function mu(n,e){let t=n;for(;;){let r;for(;(r=e?t.nextSibling:t.previousSibling)===null;){const s=t.parentElement;if(s===null)return null;t=s}if(t=r,de(t)){const s=t.style.display;if(s===""&&!L_(t)||s!==""&&!s.startsWith("inline"))return null}let i=t;for(;(i=e?t.firstChild:t.lastChild)!==null;)t=i;if(Ut(t))return t;if(t.nodeName==="BR")return null}}const d_={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function At(n){const e=d_[n.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:Ma(n.style,e),node:null}}function Te(n=""){return Ae(new rn(n))}function z(n){return n instanceof rn}function Ma(n,e){const t=n.fontWeight,r=n.textDecoration.split(" "),i=t==="700"||t==="bold",s=r.includes("line-through"),o=n.fontStyle==="italic",a=r.includes("underline"),l=n.verticalAlign;return u=>(z(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),s&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),o&&!u.hasFormat("italic")&&u.toggleFormat("italic"),a&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),e&&!u.hasFormat(e)&&u.toggleFormat(e)),u)}class ni extends rn{static getType(){return"tab"}static clone(e){return new ni(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){const t=super.createDOM(e),r=tr(e.theme,"tab");return r!==void 0&&t.classList.add(...r),t}static importJSON(e){return Ss().updateFromJSON(e)}setTextContent(e){return e!==" "&&e!==""&&ud(126),super.setTextContent(" ")}spliceText(e,t,r,i){return r===""&&t===0||r===" "&&t===1||A(286),this}setDetail(e){return e!==2&&A(127),this}setMode(e){return e!=="normal"&&A(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ss(){return Ae(new ni)}function Cs(n){return n instanceof ni}class h_{constructor(e,t,r){m(this,"key");m(this,"offset");m(this,"type");m(this,"_selection");this._selection=null,this.key=e,this.offset=t,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:ph(kt(Pn(this,"next")),kt(Pn(e,"next")))<0}getNode(){const e=Ce(this.key);return e===null&&A(20),e}set(e,t,r,i){const s=this._selection,o=this.key;i&&this.key===e&&this.offset===t&&this.type===r||(this.key=e,this.offset=t,this.type=r,ii()||(Yt()===o&&Ie(e),s!==null&&(s.setCachedNodes(null),s.dirty=!0)))}}function Tt(n,e,t){return new h_(n,e,t)}function uo(n,e){let t=e.__key,r=n.offset,i="element";if(z(e)){i="text";const s=e.getTextContentSize();r>s&&(r=s)}else if(!N(e)){const s=e.getNextSibling();if(z(s))t=s.__key,r=0,i="text";else{const o=e.getParent();o&&(t=o.__key,r=e.getIndexWithinParent()+1)}}n.set(t,r,i)}function _u(n,e){if(N(e)){const t=e.getLastDescendant();N(t)||z(t)?uo(n,t):uo(n,e)}else uo(n,e)}class Es{constructor(e){m(this,"_nodes");m(this,"_cachedNodes");m(this,"dirty");this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!er(e))return!1;const t=this._nodes,r=e._nodes;return t.size===r.size&&Array.from(t).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Es(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),r=t.length,i=t[r-1];let s;if(z(i))s=i.select();else{const o=i.getIndexWithinParent()+1;s=i.getParentOrThrow().select(o,o)}s.insertNodes(e);for(let o=0;o<r;o++)t[o].remove()}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=this._nodes,r=[];for(const i of t){const s=Ce(i);s!==null&&r.push(s)}return ii()||(this._cachedNodes=r),r}getTextContent(){const e=this.getNodes();let t="";for(let r=0;r<e.length;r++)t+=e[r].getTextContent();return t}deleteNodes(){const e=this.getNodes();if((Q()||ri())===this&&e[0]){const t=Le(e[0],"next");G_(Ln(t,t))}for(const t of e)t.remove()}}function B(n){return n instanceof $n}class $n{constructor(e,t,r,i){m(this,"format");m(this,"style");m(this,"anchor");m(this,"focus");m(this,"_cachedNodes");m(this,"dirty");this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!B(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(e!==null)return e;const t=function(r){const i=[],[s,o]=r.getTextSlices();s&&i.push(s.caret.origin);const a=new Set,l=new Set;for(const u of r)if(Rt(u)){const{origin:c}=u;i.length===0?a.add(c):(l.add(c),i.push(c))}else{const{origin:c}=u;N(c)&&l.has(c)||i.push(c)}if(o&&i.push(o.caret.origin),In(r.focus)&&N(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=zt(r.focus.origin,"previous");Rt(u)&&a.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=Ga(u))a.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!N(u)||l.has(u)||u.isEmpty()||a.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=kt(r.anchor),c=kt(r.anchor.getFlipped()),d=f=>xn(f)?f.origin:f.getNodeAtCaret(),h=d(u)||d(c)||(r.anchor.getNodeAtCaret()?u.origin:c.origin);i.push(h)}return i}(mh(Vu(this),"next"));return ii()||(this._cachedNodes=t),t}setTextNodeRange(e,t,r,i){this.anchor.set(e.__key,t,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const e=this.getNodes();if(e.length===0)return"";const t=e[0],r=e[e.length-1],i=this.anchor,s=this.focus,o=i.isBefore(s),[a,l]=Yo(this);let u="",c=!0;for(let d=0;d<e.length;d++){const h=e[d];if(N(h)&&!h.isInline())c||(u+=`
44
- `),c=!h.isEmpty();else if(c=!1,z(h)){let f=h.getTextContent();h===t?h===r?i.type==="element"&&s.type==="element"&&s.offset!==i.offset||(f=a<l?f.slice(a,l):f.slice(l,a)):f=o?f.slice(a):f.slice(l):h===r&&(f=o?f.slice(0,l):f.slice(0,a)),u+=f}else!ce(h)&&!yn(h)||h===r&&this.isCollapsed()||(u+=h.getTextContent())}return u}applyDOMRange(e){const t=ge(),r=t.getEditorState()._selection,i=Bd(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,r);if(i===null)return;const[s,o]=i;this.anchor.set(s.key,s.offset,s.type,!0),this.focus.set(o.key,o.offset,o.type,!0),Mm(this)}clone(){const e=this.anchor,t=this.focus;return new $n(Tt(e.key,e.offset,e.type),Tt(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=us(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=En[e];return(this.format&t)!==0}insertRawText(e){const t=e.split(/(\r?\n|\t)/),r=[],i=t.length;for(let s=0;s<i;s++){const o=t[s];o===`
45
- `||o===`\r
46
- `?r.push(On()):o===" "?r.push(Ss()):r.push(Te(o))}this.insertNodes(r)}insertText(e){const t=this.anchor,r=this.focus,i=this.format,s=this.style;let o=t,a=r;!this.isCollapsed()&&r.isBefore(t)&&(o=r,a=t),o.type==="element"&&function(y,x,g,v){const C=y.getNode(),S=C.getChildAtIndex(y.offset),b=Te();if(b.setFormat(g),b.setStyle(v),Jd(S))S.splice(0,0,[b]);else{const k=De(C)?Ee().append(b):b;S===null?C.append(k):S.insertBefore(k)}y.is(x)&&x.set(b.__key,0,"text"),y.set(b.__key,0,"text")}(o,a,i,s),a.type==="element"&&Xr(a,kt(Pn(a,"next")));const l=o.offset;let u=a.offset;const c=this.getNodes(),d=c.length;let h=c[0];z(h)||A(26);const f=h.getTextContent().length,p=h.getParentOrThrow();let _=c[d-1];if(d===1&&a.type==="element"&&(u=f,a.set(o.key,u,"text")),this.isCollapsed()&&l===f&&(It(h)||!h.canInsertTextAfter()||!p.canInsertTextAfter()&&h.getNextSibling()===null)){let y=h.getNextSibling();if(z(y)&&y.canInsertTextBefore()&&!It(y)||(y=Te(),y.setFormat(i),y.setStyle(s),p.canInsertTextAfter()?h.insertAfter(y):p.insertAfter(y)),y.select(0,0),h=y,e!=="")return void this.insertText(e)}else if(this.isCollapsed()&&l===0&&(It(h)||!h.canInsertTextBefore()||!p.canInsertTextBefore()&&h.getPreviousSibling()===null)){let y=h.getPreviousSibling();if(z(y)&&!It(y)||(y=Te(),y.setFormat(i),p.canInsertTextBefore()?h.insertBefore(y):p.insertBefore(y)),y.select(),h=y,e!=="")return void this.insertText(e)}else if(h.isSegmented()&&l!==f){const y=Te(h.getTextContent());y.setFormat(i),h.replace(y),h=y}else if(!this.isCollapsed()&&e!==""){const y=_.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||N(y)&&(!y.canInsertTextBefore()||!y.canInsertTextAfter()))return this.insertText(""),Hd(this.anchor,this.focus,null),void this.insertText(e)}if(d===1){if(vn(h)){const v=Te(e);return v.select(),void h.replace(v)}const y=h.getFormat(),x=h.getStyle();if(l!==u||y===i&&x===s){if(Cs(h)){const v=Te(e);return v.setFormat(i),v.setStyle(s),v.select(),void h.replace(v)}}else{if(h.getTextContent()!==""){const v=Te(e);if(v.setFormat(i),v.setStyle(s),v.select(),l===0)h.insertBefore(v,!1);else{const[C]=h.splitText(l);C.insertAfter(v,!1)}return void(v.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length))}h.setFormat(i),h.setStyle(s)}const g=u-l;h=h.spliceText(l,g,e,!0),h.getTextContent()===""?h.remove():this.anchor.type==="text"&&(h.isComposing()?this.anchor.offset-=e.length:(this.format=y,this.style=x))}else{const y=new Set([...h.getParentKeys(),..._.getParentKeys()]),x=N(h)?h:h.getParentOrThrow();let g=N(_)?_:_.getParentOrThrow(),v=_;if(!x.is(g)&&g.isInline())do v=g,g=g.getParentOrThrow();while(g.isInline());if(a.type==="text"&&(u!==0||_.getTextContent()==="")||a.type==="element"&&_.getIndexWithinParent()<u)if(z(_)&&!vn(_)&&u!==_.getTextContentSize()){if(_.isSegmented()){const T=Te(_.getTextContent());_.replace(T),_=T}De(a.getNode())||a.type!=="text"||(_=_.spliceText(0,u,"")),y.add(_.__key)}else{const T=_.getParentOrThrow();T.canBeEmpty()||T.getChildrenSize()!==1?_.remove():T.remove()}else y.add(_.__key);const C=g.getChildren(),S=new Set(c),b=x.is(g),k=x.isInline()&&h.getNextSibling()===null?x:h;for(let T=C.length-1;T>=0;T--){const E=C[T];if(E.is(h)||N(E)&&E.isParentOf(h))break;E.isAttached()&&(!S.has(E)||E.is(v)?b||k.insertAfter(E,!1):E.remove())}if(!b){let T=g,E=null;for(;T!==null;){const O=T.getChildren(),D=O.length;(D===0||O[D-1].is(E))&&(y.delete(T.__key),E=T),T=T.getParent()}}if(vn(h))if(l===f)h.select();else{const T=Te(e);T.select(),h.replace(T)}else h=h.spliceText(l,f-l,e,!0),h.getTextContent()===""?h.remove():h.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length);for(let T=1;T<d;T++){const E=c[T],O=E.__key;y.has(O)||E.remove()}}}removeText(){const e=Q()===this;ji(this,q_(Vu(this))),e&&Q()!==this&&nt(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void Ie(null);const r=this.getNodes(),i=[];for(const C of r)z(C)&&i.push(C);const s=C=>{r.forEach(S=>{if(N(S)){const b=S.getFormatFlags(e,C);S.setTextFormat(b)}})},o=i.length;if(o===0)return this.toggleFormat(e),Ie(null),void s(t);const a=this.anchor,l=this.focus,u=this.isBackward(),c=u?l:a,d=u?a:l;let h=0,f=i[0],p=c.type==="element"?0:c.offset;if(c.type==="text"&&p===f.getTextContentSize()&&(h=1,f=i[1],p=0),f==null)return;const _=f.getFormatFlags(e,t);s(_);const y=o-1;let x=i[y];const g=d.type==="text"?d.offset:x.getTextContentSize();if(f.is(x)){if(p===g)return;if(It(f)||p===0&&g===f.getTextContentSize())f.setFormat(_);else{const C=f.splitText(p,g),S=p===0?C[0]:C[1];S.setFormat(_),c.type==="text"&&c.set(S.__key,0,"text"),d.type==="text"&&d.set(S.__key,g-p,"text")}return void(this.format=_)}p===0||It(f)||([,f]=f.splitText(p),p=0),f.setFormat(_);const v=x.getFormatFlags(e,_);g>0&&(g===x.getTextContentSize()||It(x)||([x]=x.splitText(g)),x.setFormat(v));for(let C=h+1;C<y;C++){const S=i[C],b=S.getFormatFlags(e,v);S.setFormat(b)}c.type==="text"&&c.set(f.__key,p,"text"),d.type==="text"&&d.set(x.__key,g,"text"),this.format=_|v}insertNodes(e){if(e.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const p=Q();return B(p)||A(134),p.insertNodes(e)}const t=(this.isBackward()?this.focus:this.anchor).getNode(),r=Bi(t,Gt),i=e[e.length-1];if(N(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const p=co(this);r.splice(p,0,e),i.selectEnd()}return}if(!e.some(p=>(N(p)||ce(p))&&!p.isInline())){N(r)||A(211,t.constructor.name,t.getType());const p=co(this);return r.splice(p,0,e),void i.selectEnd()}const s=function(p){const _=Ee();let y=null;for(let x=0;x<p.length;x++){const g=p[x],v=yn(g);if(v||ce(g)&&g.isInline()||N(g)&&g.isInline()||z(g)||g.isParentRequired()){if(y===null&&(y=g.createParentElementNode(),_.append(y),v))continue;y!==null&&y.append(g)}else _.append(g),y=null}return _}(e),o=s.getLastDescendant(),a=s.getChildren(),l=!N(r)||!r.isEmpty()?this.insertParagraph():null,u=a[a.length-1];let c=a[0];var d;N(d=c)&&Gt(d)&&!d.isEmpty()&&N(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(N(r)||A(211,t.constructor.name,t.getType()),r.append(...c.getChildren()),c=a[1]),c&&(r===null&&A(212,t.constructor.name,t.getType()),function(p,_){const y=_.getParentOrThrow().getLastChild();let x=_;const g=[_];for(;x!==y;)x.getNextSibling()||A(140),x=x.getNextSibling(),g.push(x);let v=p;for(const C of g)v=v.insertAfter(C)}(r,c));const h=Bi(o,Gt);l&&N(h)&&(l.canMergeWhenEmpty()||Gt(u))&&(h.append(...l.getChildren()),l.remove()),N(r)&&r.isEmpty()&&r.remove(),o.selectEnd();const f=N(r)?r.getLastChild():null;yn(f)&&h!==r&&f.remove()}insertParagraph(){if(this.anchor.key==="root"){const o=Ee();return tt().splice(this.anchor.offset,0,[o]),o.select(),o}const e=co(this),t=Bi(this.anchor.getNode(),Gt);N(t)||A(213);const r=t.getChildAtIndex(e),i=r?[r,...r.getNextSiblings()]:[],s=t.insertNewAfter(this,!1);return s?(s.append(...i),s.selectStart(),s):null}insertLineBreak(e){const t=On();if(this.insertNodes([t]),e){const r=t.getParentOrThrow(),i=t.getIndexWithinParent();r.select(i,i)}}extract(){const e=[...this.getNodes()],t=e.length;let r=e[0],i=e[t-1];const[s,o]=Yo(this),a=this.isBackward(),[l,u]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[c,d]=a?[o,s]:[s,o];if(t===0)return[];if(t===1){if(z(r)&&!this.isCollapsed()){const h=r.splitText(c,d),f=c===0?h[0]:h[1];return f?(l.set(f.getKey(),0,"text"),u.set(f.getKey(),f.getTextContentSize(),"text"),[f]):[]}return[r]}if(z(r)&&(c===r.getTextContentSize()?e.shift():c!==0&&([,r]=r.splitText(c),e[0]=r,l.set(r.getKey(),0,"text"))),z(i)){const h=i.getTextContent().length;d===0?e.pop():d!==h&&([i]=i.splitText(d),e[e.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return e}modify(e,t,r){if(Eu(this,e,t,r))return;const i=e==="move",s=ge(),o=Wt(ct(s));if(!o)return;const a=s._blockCursorElement,l=s._rootElement,u=this.focus.getNode();if(l===null||a===null||!N(u)||u.isInline()||u.canBeEmpty()||Qo(a,s,l),this.dirty){let c=An(s,this.anchor.key),d=An(s,this.focus.key);this.anchor.type==="text"&&(c=lr(c)),this.focus.type==="text"&&(d=lr(d)),c&&d&&jd(o,c,this.anchor.offset,d,this.focus.offset)}if(function(c,d,h,f){c.modify(d,h,f)}(o,e,t?"backward":"forward",r),o.rangeCount>0){const c=o.getRangeAt(0),d=this.anchor.getNode(),h=De(d)?d:M_(d);if(this.applyDOMRange(c),this.dirty=!0,!i){const f=this.getNodes(),p=[];let _=!1;for(let y=0;y<f.length;y++){const x=f[y];Xo(x,h)?p.push(x):_=!0}if(_&&p.length>0)if(t){const y=p[0];N(y)?y.selectStart():y.getParentOrThrow().selectStart()}else{const y=p[p.length-1];N(y)?y.selectEnd():y.getParentOrThrow().selectEnd()}o.anchorNode===c.startContainer&&o.anchorOffset===c.startOffset||function(y){const x=y.focus,g=y.anchor,v=g.key,C=g.offset,S=g.type;g.set(x.key,x.offset,x.type,!0),x.set(v,C,S,!0)}(this)}}r==="lineboundary"&&Eu(this,e,t,r,"decorators")}forwardDeletion(e,t,r){if(!r&&(e.type==="element"&&N(t)&&e.offset===t.getChildrenSize()||e.type==="text"&&e.offset===t.getTextContentSize())){const i=t.getParent(),s=t.getNextSibling()||(i===null?null:i.getNextSibling());if(N(s)&&s.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,e))return;const s=fh(Pn(r,e?"previous":"next"));if(s.getTextSlices().every(a=>a===null||a.distance===0)){let a={type:"initial"};for(const l of s.iterNodeCarets("shadowRoot"))if(Rt(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(a.type==="merge-block")break;if(N(s.anchor.origin)&&s.anchor.origin.isEmpty()){const u=kt(l);ji(this,Ln(u,u)),s.anchor.origin.remove()}return}a.type!=="merge-next-block"&&a.type!=="merge-block"||(a={block:a.block,caret:l,type:"merge-block"})}}else{if(a.type==="merge-block")break;if(In(l)){if(N(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(s.anchor.origin))break}else a={block:l.origin,type:"merge-next-block"};continue}if(ce(l.origin)){if(!l.origin.isIsolated())if(a.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&N(s.anchor.origin)&&s.anchor.origin.isEmpty()){s.anchor.origin.remove();const u=Ia();u.add(l.origin.getKey()),nt(u)}else l.origin.remove();return}break}}if(a.type==="merge-block"){const{caret:l,block:u}=a;return ji(this,Ln(!l.origin.isEmpty()&&u.isEmpty()?Ja(Le(u,l.direction)):s.anchor,l)),this.removeText()}}const o=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&vu(this,r.getNode()))return}else{const a=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,a!==null&&a.isSegmented()){const l=o.offset,u=a.getTextContentSize();if(a.is(i)||e&&l!==u||!e&&l!==0)return void wu(a,e,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(a)||e&&l!==0||!e&&l!==u)return void wu(i,e,l)}(function(l,u){const c=l.anchor,d=l.focus,h=c.getNode(),f=d.getNode();if(h===f&&c.type==="text"&&d.type==="text"){const p=c.offset,_=d.offset,y=p<_,x=y?p:_,g=y?_:p,v=g-1;x!==v&&function(C){return!(sh(C)||f_(C))}(h.getTextContent().slice(x,g))&&(u?d.set(d.key,v,d.type):c.set(c.key,v,c.type))}})(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&De(r.getParent())&&r.getPreviousSibling()===null&&vu(this,r)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,r=t.getNode();if(this.forwardDeletion(t,r,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function er(n){return n instanceof Es}function yu(n){const e=n.offset;if(n.type==="text")return e;const t=n.getNode();return e===t.getChildrenSize()?t.getTextContent().length:0}function Yo(n){const e=n.getStartEndPoints();if(e===null)return[0,0];const[t,r]=e;return t.type==="element"&&r.type==="element"&&t.key===r.key&&t.offset===r.offset?[0,0]:[yu(t),yu(r)]}function vu(n,e){for(let t=e;t;t=t.getParent()){if(N(t)){if(t.collapseAtStart(n))return!0;if(on(t))break}if(t.getPreviousSibling())break}return!1}const f_=(()=>{try{const n=new RegExp("\\p{Emoji}","u"),e=n.test.bind(n);if(e("❤️")&&e("#️⃣")&&e("👍"))return e}catch{}return()=>!1})();function wu(n,e,t){const r=n,i=r.getTextContent().split(/(?=\s)/g),s=i.length;let o=0,a=0;for(let u=0;u<s;u++){const c=u===s-1;if(a=o,o+=i[u].length,e&&o===t||o>t||c){i.splice(u,1),c&&(a=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(a,a))}function xu(n,e,t,r){let i,s=e;if(de(n)){let o=!1;const a=n.childNodes,l=a.length,u=r._blockCursorElement;s===l&&(o=!0,s=l-1);let c=a[s],d=!1;if(c===u)c=a[s+1],d=!0;else if(u!==null){const h=u.parentNode;n===h&&e>Array.prototype.indexOf.call(h.children,u)&&s--}if(i=Jn(c),z(i))s=Jt(i,o?"next":"previous");else{let h=Jn(n);if(h===null)return null;if(N(h)){const f=r.getElementByKey(h.getKey());f===null&&A(214),[h,s]=h.getDOMSlot(f).resolveChildIndex(h,f,n,e),N(h)||A(215),o&&s>=h.getChildrenSize()&&(s=Math.max(0,h.getChildrenSize()-1));let _=h.getChildAtIndex(s);if(N(_)&&function(y,x,g){const v=y.getParent();return g===null||v===null||!v.canBeEmpty()||v!==g.getNode()}(_,0,t)){const y=o?_.getLastDescendant():_.getFirstDescendant();y===null?h=_:(_=y,h=N(_)?_:_.getParentOrThrow()),s=0}z(_)?(i=_,h=null,s=Jt(_,o?"next":"previous")):_!==h&&o&&!d&&(N(h)||A(216),s=Math.min(h.getChildrenSize(),s+1))}else{const f=h.getIndexWithinParent();s=e===0&&ce(h)&&Jn(n)===h?f:f+1,h=h.getParentOrThrow()}if(N(h))return Tt(h.__key,s,"element")}}else i=Jn(n);return z(i)?Tt(i.__key,Jt(i,s,"clamp"),"text"):null}function bu(n,e,t){const r=n.offset,i=n.getNode();if(r===0){const s=i.getPreviousSibling(),o=i.getParent();if(e){if((t||!e)&&s===null&&N(o)&&o.isInline()){const a=o.getPreviousSibling();z(a)&&n.set(a.__key,a.getTextContent().length,"text")}}else N(s)&&!t&&s.isInline()?n.set(s.__key,s.getChildrenSize(),"element"):z(s)&&n.set(s.__key,s.getTextContent().length,"text")}else if(r===i.getTextContent().length){const s=i.getNextSibling(),o=i.getParent();if(e&&N(s)&&s.isInline())n.set(s.__key,0,"element");else if((t||e)&&s===null&&N(o)&&o.isInline()&&!o.canInsertTextAfter()){const a=o.getNextSibling();z(a)&&n.set(a.__key,0,"text")}}}function Hd(n,e,t){if(n.type==="text"&&e.type==="text"){const r=n.isBefore(e),i=n.is(e);bu(n,r,i),bu(e,!r,i),i&&e.set(n.key,n.offset,n.type);const s=ge();if(s.isComposing()&&s._compositionKey!==n.key&&B(t)){const o=t.anchor,a=t.focus;n.set(o.key,o.offset,o.type,!0),e.set(a.key,a.offset,a.type,!0)}}}function Bd(n,e,t,r,i,s){if(n===null||t===null||!Ns(i,n,t))return null;const o=xu(n,e,B(s)?s.anchor:null,i);if(o===null)return null;const a=xu(t,r,B(s)?s.focus:null,i);if(a===null)return null;if(o.type==="element"&&a.type==="element"){const l=Jn(n),u=Jn(t);if(ce(l)&&ce(u))return null}return Hd(o,a,s),[o,a]}function Ud(n,e,t,r,i,s){const o=sn(),a=new $n(Tt(n,e,i),Tt(t,r,s),0,"");return a.dirty=!0,o._selection=a,a}function p_(){const n=Tt("root",0,"element"),e=Tt("root",0,"element");return new $n(n,e,0,"")}function Ia(){return new Es(new Set)}function Da(n,e,t,r){const i=t._window;if(i===null)return null;const s=r||i.event,o=s?s.type:void 0,a=o==="selectionchange",l=!Po&&(a||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&s&&s.detail===3||o==="drop"||o===void 0);let u,c,d,h;if(B(n)&&!l)return n.clone();if(e===null)return null;if(u=e.anchorNode,c=e.focusNode,d=e.anchorOffset,h=e.focusOffset,(a||o===void 0)&&B(n)&&!Ns(t,u,c))return n.clone();const f=Bd(u,d,c,h,t,n);if(f===null)return null;const[p,_]=f;return new $n(p,_,B(n)?n.format:0,B(n)?n.style:"")}function Q(){return sn()._selection}function ri(){return ge()._editorState._selection}function as(n,e,t,r=1){const i=n.anchor,s=n.focus,o=i.getNode(),a=s.getNode();if(!e.is(o)&&!e.is(a))return;const l=e.__key;if(n.isCollapsed()){const u=i.offset;if(t<=u&&r>0||t<u&&r<0){const c=Math.max(0,u+r);i.set(l,c,"element"),s.set(l,c,"element"),Su(n)}}else{const u=n.isBackward(),c=u?s:i,d=c.getNode(),h=u?i:s,f=h.getNode();if(e.is(d)){const p=c.offset;(t<=p&&r>0||t<p&&r<0)&&c.set(l,Math.max(0,p+r),"element")}if(e.is(f)){const p=h.offset;(t<=p&&r>0||t<p&&r<0)&&h.set(l,Math.max(0,p+r),"element")}}Su(n)}function Su(n){const e=n.anchor,t=e.offset,r=n.focus,i=r.offset,s=e.getNode(),o=r.getNode();if(n.isCollapsed()){if(!N(s))return;const a=s.getChildrenSize(),l=t>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(t);if(z(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text"),r.set(u.__key,c,"text")}return}if(N(s)){const a=s.getChildrenSize(),l=t>=a,u=l?s.getChildAtIndex(a-1):s.getChildAtIndex(t);if(z(u)){let c=0;l&&(c=u.getTextContentSize()),e.set(u.__key,c,"text")}}if(N(o)){const a=o.getChildrenSize(),l=i>=a,u=l?o.getChildAtIndex(a-1):o.getChildAtIndex(i);if(z(u)){let c=0;l&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}function ls(n,e,t,r,i){let s=null,o=0,a=null;r!==null?(s=r.__key,z(r)?(o=r.getTextContentSize(),a="text"):N(r)&&(o=r.getChildrenSize(),a="element")):i!==null&&(s=i.__key,z(i)?a="text":N(i)&&(a="element")),s!==null&&a!==null?n.set(s,o,a):(o=e.getIndexWithinParent(),o===-1&&(o=t.getChildrenSize()),n.set(t.__key,o,"element"))}function Cu(n,e,t,r,i){n.type==="text"?n.set(t,n.offset+(e?0:i),"text"):n.offset>r.getIndexWithinParent()&&n.set(n.key,n.offset-1,"element")}function jd(n,e,t,r,i){try{n.setBaseAndExtent(e,t,r,i)}catch{}}function g_(n,e,t,r,i,s,o){const a=r.anchorNode,l=r.focusNode,u=r.anchorOffset,c=r.focusOffset,d=document.activeElement;if(i.has(n_)&&d!==s||d!==null&&eh(d))return;if(!B(e))return void(n!==null&&Ns(t,a,l)&&r.removeAllRanges());const h=e.anchor,f=e.focus,p=h.key,_=f.key,y=An(t,p),x=An(t,_),g=h.offset,v=f.offset,C=e.format,S=e.style,b=e.isCollapsed();let k=y,T=x,E=!1;if(h.type==="text"){k=lr(y);const te=h.getNode();E=te.getFormat()!==C||te.getStyle()!==S}else B(n)&&n.anchor.type==="text"&&(E=!0);var O,D,Z,j,K;if(f.type==="text"&&(T=lr(x)),k!==null&&T!==null&&(b&&(n===null||E||B(n)&&(n.format!==C||n.style!==S))&&(O=C,D=S,Z=g,j=p,K=performance.now(),Md=[O,D,Z,j,K]),u!==g||c!==v||a!==k||l!==T||r.type==="Range"&&b||(d!==null&&s.contains(d)||i.has(s_)||s.focus({preventScroll:!0}),h.type==="element"))){if(jd(r,k,g,T,v),!i.has(r_)&&e.isCollapsed()&&s!==null&&s===document.activeElement){const te=B(e)&&e.anchor.type==="element"?k.childNodes[g]||null:r.rangeCount>0?r.getRangeAt(0):null;if(te!==null){let me;if(te instanceof Text){const be=document.createRange();be.selectNode(te),me=be.getBoundingClientRect()}else me=te.getBoundingClientRect();(function(be,le,he){const ze=uh(he),xt=Ua(ze);if(ze===null||xt===null)return;let{top:ke,bottom:jt}=le,He=0,rt=0,Fe=he;for(;Fe!==null;){const it=Fe===ze.body;if(it)He=0,rt=ct(be).innerHeight;else{const dt=Fe.getBoundingClientRect();He=dt.top,rt=dt.bottom}let Ve=0;if(ke<He?Ve=-(He-ke):jt>rt&&(Ve=jt-rt),Ve!==0)if(it)xt.scrollBy(0,Ve);else{const dt=Fe.scrollTop;Fe.scrollTop+=Ve;const ht=Fe.scrollTop-dt;ke-=ht,jt-=ht}if(it)break;Fe=li(Fe)}})(t,me,s)}}Ko=!0}}function co(n){let e=n;n.isCollapsed()||e.removeText();const t=Q();B(t)&&(e=t),B(e)||A(161);const r=e.anchor;let i=r.getNode(),s=r.offset;for(;!Gt(i);){const o=i;if([i,s]=m_(i,s),o.is(i))break}return s}function m_(n,e){const t=n.getParent();if(!t){const i=Ee();return tt().append(i),i.select(),[tt(),0]}if(z(n)){const i=n.splitText(e);if(i.length===0)return[t,n.getIndexWithinParent()];const s=e===0?0:1;return[t,i[0].getIndexWithinParent()+s]}if(!N(n)||e===0)return[t,n.getIndexWithinParent()];const r=n.getChildAtIndex(e);if(r){const i=new $n(Tt(n.__key,e,"element"),Tt(n.__key,e,"element"),0,""),s=n.insertNewAfter(i);s&&s.append(r,...r.getNextSiblings())}return[t,n.getIndexWithinParent()+1]}function Eu(n,e,t,r,i="decorators-and-blocks"){if(e==="move"&&r==="character"&&!n.isCollapsed()){const[c,d]=t===n.isBackward()?[n.focus,n.anchor]:[n.anchor,n.focus];return d.set(c.key,c.offset,c.type),!0}const s=Pn(n.focus,t?"previous":"next"),o=r==="lineboundary",a=e==="move";let l=s,u=i==="decorators-and-blocks";if(!Y_(l)){for(const c of l){u=!1;const{origin:d}=c;if(!ce(d)||d.isIsolated()||(l=c,!o||!d.isInline()))break}if(u)for(const c of fh(s).iterNodeCarets(e==="extend"?"shadowRoot":"root")){if(Rt(c))c.origin.isInline()||(l=c);else{if(N(c.origin))continue;ce(c.origin)&&!c.origin.isInline()&&(l=c)}break}}if(l===s)return!1;if(a&&!o&&ce(l.origin)&&l.origin.isKeyboardSelectable()){const c=Ia();return c.add(l.origin.getKey()),nt(c),!0}return l=kt(l),a&&Xr(n.anchor,l),Xr(n.focus,l),u||!o}let Oe=null,Ne=null,Je=!1,ho=!1,Hi=0;const ku={characterData:!0,childList:!0,subtree:!0};function ii(){return Je||Oe!==null&&Oe._readOnly}function Me(){Je&&A(13)}function Vd(){Hi>99&&A(14)}function sn(){return Oe===null&&A(195,Zd()),Oe}function ge(){return Ne===null&&A(196,Zd()),Ne}function Zd(){let n=0;const e=new Set,t=Nn.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const s=As(i);if($a(s))n++;else if(s){let o=String(s.constructor.version||"<0.17.1");o===t&&(o+=" (separately built, likely a bundler configuration issue)"),e.add(o)}}let r=` Detected on the page: ${n} compatible editor(s) with version ${t}`;return e.size&&(r+=` and incompatible editors with versions ${Array.from(e).join(", ")}`),r}function __(){return Ne}function Tu(n,e,t){const r=e.__type,i=Qd(n,r);let s=t.get(r);s===void 0&&(s=Array.from(i.transforms),t.set(r,s));const o=s.length;for(let a=0;a<o&&(s[a](e),e.isAttached());a++);}function Ou(n,e){return n!==void 0&&n.__key!==e&&n.isAttached()}function Kd(n,e){if(!e)return;const t=n._updateTags;let r=e;Array.isArray(e)||(r=[e]);for(const i of r)t.add(i)}function Gd(n,e){const t=n.type,r=e.get(t);r===void 0&&A(17,t);const i=r.klass;n.type!==i.getType()&&A(18,i.name);const s=i.importJSON(n),o=n.children;if(N(s)&&Array.isArray(o))for(let a=0;a<o.length;a++){const l=Gd(o[a],e);s.append(l)}return s}function Nu(n,e,t){const r=Oe,i=Je,s=Ne;Oe=e,Je=!0,Ne=n;try{return t()}finally{Oe=r,Je=i,Ne=s}}function Lt(n,e){const t=n._pendingEditorState,r=n._rootElement,i=n._headless||r===null;if(t===null)return;const s=n._editorState,o=s._selection,a=t._selection,l=n._dirtyType!==0,u=Oe,c=Je,d=Ne,h=n._updating,f=n._observer;let p=null;if(n._pendingEditorState=null,n._editorState=t,!i&&l&&f!==null){Ne=n,Oe=t,Je=!1,n._updating=!0;try{const b=n._dirtyType,k=n._dirtyElements,T=n._dirtyLeaves;f.disconnect(),p=Lm(s,t,n,b,k,T)}catch(b){if(b instanceof Error&&n._onError(b),ho)throw b;return Xd(n,null,r,t),md(n),n._dirtyType=2,ho=!0,Lt(n,s),void(ho=!1)}finally{f.observe(r,ku),n._updating=h,Oe=u,Je=c,Ne=d}}t._readOnly||(t._readOnly=!0);const _=n._dirtyLeaves,y=n._dirtyElements,x=n._normalizedNodes,g=n._updateTags,v=n._deferred;l&&(n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements=new Map,n._normalizedNodes=new Set,n._updateTags=new Set),function(b,k){const T=b._decorators;let E=b._pendingDecorators||T;const O=k._nodeMap;let D;for(D in E)O.has(D)||(E===T&&(E=rh(b)),delete E[D])}(n,t);const C=i?null:Wt(ct(n));if(n._editable&&C!==null&&(l||a===null||a.dirty||!a.is(o))&&r!==null&&!g.has(i_)){Ne=n,Oe=t;try{if(f!==null&&f.disconnect(),l||a===null||a.dirty){const b=n._blockCursorElement;b!==null&&Qo(b,n,r),g_(o,a,n,C,g,r)}(function(b,k,T){let E=b._blockCursorElement;if(B(T)&&T.isCollapsed()&&T.anchor.type==="element"&&k.contains(document.activeElement)){const O=T.anchor,D=O.getNode(),Z=O.offset;let j=!1,K=null;if(Z===D.getChildrenSize())po(D.getChildAtIndex(Z-1))&&(j=!0);else{const te=D.getChildAtIndex(Z);if(te!==null&&po(te)){const me=te.getPreviousSibling();(me===null||po(me))&&(j=!0,K=b.getElementByKey(te.__key))}}if(j){const te=b.getElementByKey(D.__key);return E===null&&(b._blockCursorElement=E=function(me){const be=me.theme,le=document.createElement("div");le.contentEditable="false",le.setAttribute("data-lexical-cursor","true");let he=be.blockCursor;if(he!==void 0){if(typeof he=="string"){const ze=dd(he);he=be.blockCursor=ze}he!==void 0&&le.classList.add(...he)}return le}(b._config)),k.style.caretColor="transparent",void(K===null?te.appendChild(E):te.insertBefore(E,K))}}E!==null&&Qo(E,b,k)})(n,r,a)}finally{f!==null&&f.observe(r,ku),Ne=d,Oe=u}}p!==null&&function(b,k,T,E,O){const D=Array.from(b._listeners.mutation),Z=D.length;for(let j=0;j<Z;j++){const[K,te]=D[j];for(const me of te){const be=k.get(me);be!==void 0&&K(be,{dirtyLeaves:E,prevEditorState:O,updateTags:T})}}}(n,p,g,_,s),B(a)||a===null||o!==null&&o.is(a)||n.dispatchCommand(Sd,void 0);const S=n._pendingDecorators;S!==null&&(n._decorators=S,n._pendingDecorators=null,Ur("decorator",n,!0,S)),function(b,k,T){const E=Du(k),O=Du(T);E!==O&&Ur("textcontent",b,!0,O)}(n,e||s,t),Ur("update",n,!0,{dirtyElements:y,dirtyLeaves:_,editorState:t,mutatedNodes:p,normalizedNodes:x,prevEditorState:e||s,tags:g}),function(b,k){if(b._deferred=[],k.length!==0){const T=b._updating;b._updating=!0;try{for(let E=0;E<k.length;E++)k[E]()}finally{b._updating=T}}}(n,v),function(b){const k=b._updates;if(k.length!==0){const T=k.shift();if(T){const[E,O]=T;ks(b,E,O)}}}(n)}function Ur(n,e,t,...r){const i=e._updating;e._updating=t;try{const s=Array.from(e._listeners[n]);for(let o=0;o<s.length;o++)s[o].apply(null,r)}finally{e._updating=i}}function Au(n,e){const t=n._updates;let r=e||!1;for(;t.length!==0;){const i=t.shift();if(i){const[s,o]=i,a=n._pendingEditorState;let l;o!==void 0&&(l=o.onUpdate,o.skipTransforms&&(r=!0),o.discrete&&(a===null&&A(191),a._flushSync=!0),l&&n._deferred.push(l),Kd(n,o.tag)),a==null?ks(n,s,o):s()}}return r}function ks(n,e,t){const r=n._updateTags;let i,s=!1,o=!1;t!==void 0&&(i=t.onUpdate,Kd(n,t.tag),s=t.skipTransforms||!1,o=t.discrete||!1),i&&n._deferred.push(i);const a=n._editorState;let l=n._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=n._pendingEditorState=qd(l||a),u=!0),l._flushSync=o;const c=Oe,d=Je,h=Ne,f=n._updating;Oe=l,Je=!1,n._updating=!0,Ne=n;const p=n._headless||n.getRootElement()===null;Pa(null);try{u&&(p?a._selection!==null&&(l._selection=a._selection.clone()):l._selection=function(g,v){const C=g.getEditorState()._selection,S=Wt(ct(g));return B(C)||C==null?Da(C,S,g,v):C.clone()}(n,t&&t.event||null));const y=n._compositionKey;e(),s=Au(n,s),function(g,v){const C=v.getEditorState()._selection,S=g._selection;if(B(S)){const b=S.anchor,k=S.focus;let T;if(b.type==="text"&&(T=b.getNode(),T.selectionTransform(C,S)),k.type==="text"){const E=k.getNode();T!==E&&E.selectionTransform(C,S)}}}(l,n),n._dirtyType!==0&&(s?function(g,v){const C=v._dirtyLeaves,S=g._nodeMap;for(const b of C){const k=S.get(b);z(k)&&k.isAttached()&&k.isSimpleText()&&!k.isUnmergeable()&&iu(k)}}(l,n):function(g,v){const C=v._dirtyLeaves,S=v._dirtyElements,b=g._nodeMap,k=Yt(),T=new Map;let E=C,O=E.size,D=S,Z=D.size;for(;O>0||Z>0;){if(O>0){v._dirtyLeaves=new Set;for(const j of E){const K=b.get(j);z(K)&&K.isAttached()&&K.isSimpleText()&&!K.isUnmergeable()&&iu(K),K!==void 0&&Ou(K,k)&&Tu(v,K,T),C.add(j)}if(E=v._dirtyLeaves,O=E.size,O>0){Hi++;continue}}v._dirtyLeaves=new Set,v._dirtyElements=new Map,D.delete("root")&&D.set("root",!0);for(const j of D){const K=j[0],te=j[1];if(S.set(K,te),!te)continue;const me=b.get(K);me!==void 0&&Ou(me,k)&&Tu(v,me,T)}E=v._dirtyLeaves,O=E.size,D=v._dirtyElements,Z=D.size,Hi++}v._dirtyLeaves=C,v._dirtyElements=S}(l,n),Au(n),function(g,v,C,S){const b=g._nodeMap,k=v._nodeMap,T=[];for(const[E]of S){const O=k.get(E);O!==void 0&&(O.isAttached()||(N(O)&&fd(O,E,b,k,T,S),b.has(E)||S.delete(E),T.push(E)))}for(const E of T)k.delete(E);for(const E of C){const O=k.get(E);O===void 0||O.isAttached()||(b.has(E)||C.delete(E),k.delete(E))}}(a,l,n._dirtyLeaves,n._dirtyElements)),y!==n._compositionKey&&(l._flushSync=!0);const x=l._selection;if(B(x)){const g=l._nodeMap,v=x.anchor.key,C=x.focus.key;g.get(v)!==void 0&&g.get(C)!==void 0||A(19)}else er(x)&&x._nodes.size===0&&(l._selection=null)}catch(y){return y instanceof Error&&n._onError(y),n._pendingEditorState=a,n._dirtyType=2,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),void Lt(n)}finally{Oe=c,Je=d,Ne=h,n._updating=f,Hi=0}n._dirtyType!==0||n._deferred.length>0||function(y,x){const g=x.getEditorState()._selection,v=y._selection;if(v!==null){if(v.dirty||!v.is(g))return!0}else if(g!==null)return!0;return!1}(l,n)?l._flushSync?(l._flushSync=!1,Lt(n)):u&&C_(()=>{Lt(n)}):(l._flushSync=!1,u&&(r.clear(),n._deferred=[],n._pendingEditorState=null))}function Xe(n,e,t){Ne===n&&t===void 0?e():ks(n,e,t)}class jr{constructor(e,t,r){m(this,"element");m(this,"before");m(this,"after");this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new jr(this.element,e,this.after)}withAfter(e){return new jr(this.element,this.before,e)}withElement(e){return this.element===e?this:new jr(e,this.before,this.after)}insertChild(e){const t=this.before||this.getManagedLineBreak();return t!==null&&t.parentElement!==this.element&&A(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&A(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&A(224),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(Gr||ar||Kr);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,s=document.createElement("br");if(r.insertBefore(s,i),e){const o=document.createElement("img");o.setAttribute("data-lexical-linebreak","true"),o.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",o.alt="",r.insertBefore(o,s),r.__lexicalLineBreak=o}else r.__lexicalLineBreak=s}getFirstChildOffset(){let e=0;for(let t=this.after;t!==null;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,r,i){if(r===this.element){const l=this.getFirstChildOffset();return[e,Math.min(l+e.getChildrenSize(),Math.max(l,i))]}const s=Fu(t,r);s.push(i);const o=Fu(t,this.element);let a=e.getIndexWithinParent();for(let l=0;l<o.length;l++){const u=s[l],c=o[l];if(u===void 0||u<c)break;if(u>c){a+=1;break}}return[e.getParentOrThrow(),a]}}function Fu(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let i=0;for(let s=r.previousSibling;s!==null;s=s.previousSibling)i++;t.push(i)}return r!==n&&A(225),t.reverse()}class We extends yt{constructor(t){super(t);m(this,"__first");m(this,"__last");m(this,"__size");m(this,"__format");m(this,"__style");m(this,"__indent");m(this,"__dir");m(this,"__textFormat");m(this,"__textStyle");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(t){super.afterCloneFrom(t),this.__key===t.__key&&(this.__first=t.__first,this.__last=t.__last,this.__size=t.__size),this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir,this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return bm[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r),r=r.getNextSibling();return t}getChildrenKeys(){const t=[];let r=this.getFirstChild();for(;r!==null;)t.push(r.__key),r=r.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=ge()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(t)}getAllTextNodes(){const t=[];let r=this.getFirstChild();for(;r!==null;){if(z(r)&&t.push(r),N(r)){const i=r.getAllTextNodes();t.push(...i)}r=r.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;N(t);){const r=t.getFirstChild();if(r===null)break;t=r}return t}getLastDescendant(){let t=this.getLastChild();for(;N(t);){const r=t.getLastChild();if(r===null)break;t=r}return t}getDescendantByIndex(t){const r=this.getChildren(),i=r.length;if(t>=i){const o=r[i-1];return N(o)&&o.getLastDescendant()||o||null}const s=r[t];return N(s)&&s.getFirstDescendant()||s||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:Ce(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&A(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:Ce(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&A(96,this.__key),t}getChildAtIndex(t){const r=this.getChildrenSize();let i,s;if(t<r/2){for(i=this.getFirstChild(),s=0;i!==null&&s<=t;){if(s===t)return i;i=i.getNextSibling(),s++}return null}for(i=this.getLastChild(),s=r-1;i!==null&&s>=t;){if(s===t)return i;i=i.getPreviousSibling(),s--}return null}getTextContent(){let t="";const r=this.getChildren(),i=r.length;for(let s=0;s<i;s++){const o=r[s];t+=o.getTextContent(),N(o)&&s!==i-1&&!o.isInline()&&(t+=en)}return t}getTextContentSize(){let t=0;const r=this.getChildren(),i=r.length;for(let s=0;s<i;s++){const o=r[s];t+=o.getTextContentSize(),N(o)&&s!==i-1&&!o.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(t){if(t!==""){const r=Yl[t];return(this.getFormat()&r)!==0}return!1}hasTextFormat(t){const r=En[t];return(this.getTextFormat()&r)!==0}getFormatFlags(t,r){return us(this.getLatest().__textFormat,t,r)}getTextStyle(){return this.getLatest().__textStyle}select(t,r){Me();const i=Q();let s=t,o=r;const a=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&r===0){const u=this.getFirstChild();if(z(u)||N(u))return u.select(0,0)}else if(!(t!==void 0&&t!==a||r!==void 0&&r!==a)){const u=this.getLastChild();if(z(u)||N(u))return u.select()}}s===void 0&&(s=a),o===void 0&&(o=a);const l=this.__key;return B(i)?(i.anchor.set(l,s,"element"),i.focus.set(l,o,"element"),i.dirty=!0,i):Ud(l,s,l,o,"element","element")}selectStart(){const t=this.getFirstDescendant();return t?t.selectStart():this.select()}selectEnd(){const t=this.getLastDescendant();return t?t.selectEnd():this.select()}clear(){const t=this.getWritable();return this.getChildren().forEach(r=>r.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const r=this.getWritable();return r.__dir=t,r}setFormat(t){return this.getWritable().__format=t!==""?Yl[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setTextFormat(t){const r=this.getWritable();return r.__textFormat=t,r}setTextStyle(t){const r=this.getWritable();return r.__textStyle=t,r}setIndent(t){return this.getWritable().__indent=t,this}splice(t,r,i){os(this)&&A(324,this.__key,this.__type);const s=this.getChildrenSize(),o=this.getWritable();t+r<=s||A(226,String(t),String(r),String(s));const a=o.__key,l=[],u=[],c=this.getChildAtIndex(t+r);let d=null,h=s-r+i.length;if(t!==0)if(t===s)d=this.getLastChild();else{const p=this.getChildAtIndex(t);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let _=0;_<r;_++){p===null&&A(100);const y=p.getNextSibling(),x=p.__key;wn(p.getWritable()),u.push(x),p=y}}let f=d;for(const p of i){f!==null&&p.is(f)&&(d=f=f.getPreviousSibling());const _=p.getWritable();_.__parent===a&&h--,wn(_);const y=p.__key;if(f===null)o.__first=y,_.__prev=null;else{const x=f.getWritable();x.__next=y,_.__prev=x.__key}p.__key===a&&A(76),_.__parent=a,l.push(y),f=p}if(t+r===s)f!==null&&(f.getWritable().__next=null,o.__last=f.__key);else if(c!==null){const p=c.getWritable();if(f!==null){const _=f.getWritable();p.__prev=f.__key,_.__next=c.__key}else p.__prev=null}if(o.__size=h,u.length){const p=Q();if(B(p)){const _=new Set(u),y=new Set(l),{anchor:x,focus:g}=p;Mu(x,_,y)&&ls(x,x.getNode(),this,d,c),Mu(g,_,y)&&ls(g,g.getNode(),this,d,c),h!==0||this.canBeEmpty()||on(this)||this.remove()}}return o}getDOMSlot(t){return new jr(t)}exportDOM(t){const{element:r}=super.exportDOM(t);if(de(r)){const i=this.getIndent();i>0&&(r.style.paddingInlineStart=40*i+"px");const s=this.getDirection();s&&(r.dir=s)}return{element:r}}exportJSON(){const t={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),i=this.getTextStyle();return r!==0&&(t.textFormat=r),i!==""&&(t.textStyle=i),t}updateFromJSON(t){return super.updateFromJSON(t).setFormat(t.format).setIndent(t.indent).setDirection(t.direction).setTextFormat(t.textFormat||0).setTextStyle(t.textStyle||"")}insertNewAfter(t,r){return null}canIndent(){return!0}collapseAtStart(t){return!1}excludeFromCopy(t){return!1}canReplaceWith(t){return!0}canInsertAfter(t){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(t){return!1}extractWithChild(t,r,i){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(t,r){const i=this.getDOMSlot(t);let s=i.getFirstChild();for(let o=this.getFirstChild();o;o=o.getNextSibling()){const a=r.getElementByKey(o.getKey());a!==null&&(s==null?(i.insertChild(a),s=a):s!==a&&i.replaceChild(a,s),s=s.nextSibling)}}}function N(n){return n instanceof We}function Mu(n,e,t){let r=n.getNode();for(;r;){const i=r.__key;if(e.has(i)&&!t.has(i))return!0;r=r.getParent()}return!1}class Ts extends yt{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function ce(n){return n instanceof Ts}class si extends We{constructor(){super("root");m(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new si}getTopLevelElementOrThrow(){A(51)}getTextContent(){const t=this.__cachedText;return!ii()&&ge()._dirtyType!==0||t===null?super.getTextContent():t}remove(){A(52)}replace(t){A(53)}insertBefore(t){A(54)}insertAfter(t){A(55)}updateDOM(t,r){return!1}splice(t,r,i){for(const s of i)N(s)||ce(s)||A(282);return super.splice(t,r,i)}static importJSON(t){return tt().updateFromJSON(t)}collapseAtStart(){return!0}}function De(n){return n instanceof si}function qd(n){return new Os(new Map(n._nodeMap))}function La(){return new Os(new Map([["root",new si]]))}function Yd(n){const e=n.exportJSON(),t=n.constructor;if(e.type!==t.getType()&&A(130,t.name),N(n)){const r=e.children;Array.isArray(r)||A(59,t.name);const i=n.getChildren();for(let s=0;s<i.length;s++){const o=Yd(i[s]);r.push(o)}}return e}class Os{constructor(e,t){m(this,"_nodeMap");m(this,"_selection");m(this,"_flushSync");m(this,"_readOnly");this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e,t){return Nu(t&&t.editor||null,this,e)}clone(e){const t=new Os(this._nodeMap,e===void 0?this._selection:e);return t._readOnly=!0,t}toJSON(){return Nu(null,this,()=>({root:Yd(tt())}))}}class y_ extends We{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class oi extends We{static getType(){return"paragraph"}static clone(e){return new oi(e.__key)}createDOM(e){const t=document.createElement("p"),r=tr(e.theme,"paragraph");return r!==void 0&&t.classList.add(...r),t}updateDOM(e,t,r){return!1}static importDOM(){return{p:e=>({conversion:v_,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(de(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r)}return{element:t}}static importJSON(e){return Ee().updateFromJSON(e)}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle()}}insertNewAfter(e,t){const r=Ee();r.setTextFormat(e.format),r.setTextStyle(e.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,t),r}collapseAtStart(){const e=this.getChildren();if(e.length===0||z(e[0])&&e[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function v_(n){const e=Ee();return n.style&&(e.setFormat(n.style.textAlign),Va(n,e)),{node:e}}function Ee(){return Ae(new oi)}function Jd(n){return n instanceof oi}const w_=1;function Xd(n,e,t,r){const i=n._keyToDOMMap;i.clear(),n._editorState=La(),n._pendingEditorState=r,n._compositionKey=null,n._dirtyType=0,n._cloneNotNeeded.clear(),n._dirtyLeaves=new Set,n._dirtyElements.clear(),n._normalizedNodes=new Set,n._updateTags=new Set,n._updates=[],n._blockCursorElement=null;const s=n._observer;s!==null&&(s.disconnect(),n._observer=null),e!==null&&(e.textContent=""),t!==null&&(t.textContent="",i.set("root",t))}function x_(n){const e=new Set,t=new Set;let r=n;for(;r;){const{ownNodeConfig:i}=Is(r),s=r.transform;if(!t.has(s)){t.add(s);const o=r.transform();o&&e.add(o)}if(i){const o=i.$transform;o&&e.add(o),r=i.extends}else{const o=Object.getPrototypeOf(r);r=o.prototype instanceof yt&&o!==yt?o:void 0}}return e}function b_(n){const e=n||{},t=__(),r=e.theme||{},i=n===void 0?t:e.parentEditor||null,s=e.disableEvents||!1,o=La(),a=e.namespace||(i!==null?i._config.namespace:oh()),l=e.editorState,u=[si,rn,ti,ni,oi,y_,...e.nodes||[]],{onError:c,html:d}=e,h=e.editable===void 0||e.editable;let f;if(n===void 0&&t!==null)f=t._nodes;else{f=new Map;for(let _=0;_<u.length;_++){let y=u[_],x=null,g=null;if(typeof y!="function"){const S=y;y=S.replace,x=S.with,g=S.withKlass||null}Is(y);const v=y.getType(),C=x_(y);f.set(v,{exportDOM:d&&d.export?d.export.get(y):void 0,klass:y,replace:x,replaceWithKlass:g,sharedNodeState:Nm(u[_]),transforms:C})}}const p=new Nn(o,i,f,{disableEvents:s,namespace:a,theme:r},c||console.error,function(_,y){const x=new Map,g=new Set,v=C=>{Object.keys(C).forEach(S=>{let b=x.get(S);b===void 0&&(b=[],x.set(S,b)),b.push(C[S])})};return _.forEach(C=>{const S=C.klass.importDOM;if(S==null||g.has(S))return;g.add(S);const b=S.call(C.klass);b!==null&&v(b)}),y&&v(y),x}(f,d?d.import:void 0),h,n);return l!==void 0&&(p._pendingEditorState=l,p._dirtyType=2),p}class Nn{constructor(e,t,r,i,s,o,a,l){m(this,"_headless");m(this,"_parentEditor");m(this,"_rootElement");m(this,"_editorState");m(this,"_pendingEditorState");m(this,"_compositionKey");m(this,"_deferred");m(this,"_keyToDOMMap");m(this,"_updates");m(this,"_updating");m(this,"_listeners");m(this,"_commands");m(this,"_nodes");m(this,"_decorators");m(this,"_pendingDecorators");m(this,"_config");m(this,"_dirtyType");m(this,"_cloneNotNeeded");m(this,"_dirtyLeaves");m(this,"_dirtyElements");m(this,"_normalizedNodes");m(this,"_updateTags");m(this,"_observer");m(this,"_key");m(this,"_onError");m(this,"_htmlConversions");m(this,"_window");m(this,"_editable");m(this,"_blockCursorElement");m(this,"_createEditorArgs");this._createEditorArgs=l,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=oh(),this._onError=s,this._htmlConversions=o,this._editable=a,this._headless=t!==null&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,r){r===void 0&&A(35);const i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);const s=i.get(e);s===void 0&&A(36,String(e));const o=s[r];return o.add(t),()=>{o.delete(t),s.every(a=>a.size===0)&&i.delete(e)}}registerMutationListener(e,t,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,s=this._listeners.mutation;let o=s.get(t);o===void 0&&(o=new Set,s.set(t,o)),o.add(i);const a=r&&r.skipInitialization;return a!==void 0&&a||this.initializeMutationListener(t,i),()=>{o.delete(i),o.size===0&&s.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return t===void 0&&A(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const r=this._editorState,i=Bu(r).get(t.getType());if(!i)return;const s=new Map;for(const o of i.keys())s.set(o,"created");s.size>0&&e(s,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const r=this.getRegisteredNode(e);return r.transforms.add(t),r}registerNodeTransform(e,t){const r=this.registerNodeTransformToKlass(e,t),i=[r],s=r.replaceWithKlass;if(s!=null){const o=this.registerNodeTransformToKlass(s,t);i.push(o)}return function(o,a){const l=Bu(o.getEditorState()),u=[];for(const c of a){const d=l.get(c);d&&u.push(d)}u.length!==0&&o.update(()=>{for(const c of u)for(const d of c.keys()){const h=Ce(d);h&&h.markDirty()}},o._pendingEditorState===null?{tag:zi}:void 0)}(this,i.map(o=>o.klass.getType())),()=>{i.forEach(o=>o.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return R(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const r=tr(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=e,Xd(this,t,e,i),t!==null&&(this._config.disableEvents||t_(t),r!=null&&t.classList.remove(...r)),e!==null){const s=Ua(e),o=e.style;o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=s,this._dirtyType=2,md(this),this._updateTags.add(zi),Lt(this),this._config.disableEvents||function(a,l){const u=a.ownerDocument;Zo.set(a,u);const c=ss.get(u)??0;c<1&&u.addEventListener("selectionchange",Rd),ss.set(u,c+1),a.__lexicalEditor=l;const d=Pd(a);for(let h=0;h<Vo.length;h++){const[f,p]=Vo[h],_=typeof p=="function"?y=>{fu(y)||(hu(y),(l.isEditable()||f==="click")&&p(y,l))}:y=>{if(fu(y))return;hu(y);const x=l.isEditable();switch(f){case"cut":return x&&R(l,Nd,y);case"copy":return R(l,Od,y);case"paste":return x&&R(l,Ed,y);case"dragstart":return x&&R(l,qm,y);case"dragover":return x&&R(l,Ym,y);case"dragend":return x&&R(l,Jm,y);case"focus":return x&&R(l,Xm,y);case"blur":return x&&R(l,Qm,y);case"drop":return x&&R(l,Gm,y)}};a.addEventListener(f,_),d.push(()=>{a.removeEventListener(f,_)})}}(e,this),r!=null&&e.classList.add(...r)}else this._window=null,this._updateTags.add(zi),Lt(this);Ur("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&A(38);let r=e;r._readOnly&&(r=qd(e),r._selection=e._selection?e._selection.clone():null),gd(this);const i=this._pendingEditorState,s=this._updateTags,o=t!==void 0?t.tag:null;i===null||i.isEmpty()||(o!=null&&s.add(o),Lt(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&s.add(o),this._updating||Lt(this)}parseEditorState(e,t){return function(r,i,s){const o=La(),a=Oe,l=Je,u=Ne,c=i._dirtyElements,d=i._dirtyLeaves,h=i._cloneNotNeeded,f=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,Oe=o,Je=!1,Ne=i,Pa(null);try{const p=i._nodes;Gd(r.root,p),s&&s(),o._readOnly=!0}catch(p){p instanceof Error&&i._onError(p)}finally{i._dirtyElements=c,i._dirtyLeaves=d,i._cloneNotNeeded=h,i._dirtyType=f,Oe=a,Je=l,Ne=u}return o}(typeof e=="string"?JSON.parse(e):e,this,t)}read(e){return Lt(this),this.getEditorState().read(e,{editor:this})}update(e,t){(function(r,i,s){r._updating?r._updates.push([i,s]):ks(r,i,s)})(this,e,t)}focus(e,t={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Xe(this,()=>{const i=Q(),s=tt();i!==null?i.dirty||nt(i.clone()):s.getChildrenSize()!==0&&(t.defaultSelection==="rootStart"?s.selectStart():s.selectEnd()),N_("focus"),A_(()=>{r.removeAttribute("autocapitalize"),e&&e()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;e!==null&&e.blur();const t=Wt(this._window);t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Ur("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}m(Nn,"version");Nn.version="0.38.2+prod.esm";let Jo=null;function Pa(n){Jo=n}let S_=1;function Qd(n,e){const t=Ra(n,e);return t===void 0&&A(30,e),t}function Ra(n,e){return n._nodes.get(e)}const C_=typeof queueMicrotask=="function"?queueMicrotask:n=>{Promise.resolve().then(n)};function Iu(n){return ce(ai(n))}function eh(n){const e=document.activeElement;if(!de(e))return!1;const t=e.nodeName;return ce(ai(n))&&(t==="INPUT"||t==="TEXTAREA"||e.contentEditable==="true"&&As(e)==null)}function Ns(n,e,t){const r=n.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(t)&&e!==null&&!eh(e)&&th(e)===n}catch{return!1}}function $a(n){return n instanceof Nn}function th(n){let e=n;for(;e!=null;){const t=As(e);if($a(t))return t;e=li(e)}return null}function As(n){return n?n.__lexicalEditor:null}function vn(n){return Cs(n)||n.isToken()}function It(n){return vn(n)||n.isSegmented()}function Ut(n){return ui(n)&&n.nodeType===3}function E_(n){return ui(n)&&n.nodeType===9}function lr(n){let e=n;for(;e!=null;){if(Ut(e))return e;e=e.firstChild}return null}function us(n,e,t){const r=En[e];if(t!==null&&(n&r)===(t&r))return n;let i=n^r;return e==="subscript"?i&=-65:e==="superscript"?i&=-33:e==="lowercase"?(i&=-513,i&=-1025):e==="uppercase"?(i&=-257,i&=-1025):e==="capitalize"&&(i&=-257,i&=-513),i}function k_(n,e){const t=function(){const o=Jo;return Jo=null,o}();if((e=e||t&&t.__key)!=null)return void(n.__key=e);Me(),Vd();const r=ge(),i=sn(),s=""+S_++;i._nodeMap.set(s,n),N(n)?r._dirtyElements.set(s,!0):r._dirtyLeaves.add(s),r._cloneNotNeeded.add(s),r._dirtyType=1,n.__key=s}function wn(n){const e=n.getParent();if(e!==null){const t=n.getWritable(),r=e.getWritable(),i=n.getPreviousSibling(),s=n.getNextSibling(),o=s!==null?s.__key:null,a=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=s!==null?s.getWritable():null;i===null&&(r.__first=o),s===null&&(r.__last=a),l!==null&&(l.__next=o),u!==null&&(u.__prev=a),t.__prev=null,t.__next=null,t.__parent=null,r.__size--}}function cs(n){Vd(),os(n)&&A(323,n.__key,n.__type);const e=n.getLatest(),t=e.__parent,r=sn(),i=ge(),s=r._nodeMap,o=i._dirtyElements;t!==null&&function(l,u,c){let d=l;for(;d!==null;){if(c.has(d))return;const h=u.get(d);if(h===void 0)break;c.set(d,!1),d=h.__parent}}(t,s,o);const a=e.__key;i._dirtyType=1,N(n)?o.set(a,!0):i._dirtyLeaves.add(a)}function Ie(n){Me();const e=ge(),t=e._compositionKey;if(n!==t){if(e._compositionKey=n,t!==null){const r=Ce(t);r!==null&&r.getWritable()}if(n!==null){const r=Ce(n);r!==null&&r.getWritable()}}}function Yt(){return ii()?null:ge()._compositionKey}function Ce(n,e){const t=(e||sn())._nodeMap.get(n);return t===void 0?null:t}function nh(n,e){const t=Fs(n,ge());return t!==void 0?Ce(t,e):null}function Fs(n,e){return n[`__lexicalKey_${e._key}`]}function ai(n,e){let t=n;for(;t!=null;){const r=nh(t,e);if(r!==null)return r;t=li(t)}return null}function rh(n){const e=n._decorators,t=Object.assign({},e);return n._pendingDecorators=t,t}function Du(n){return n.read(()=>tt().getTextContent())}function tt(){return ih(sn())}function ih(n){return n._nodeMap.get("root")}function nt(n){Me();const e=sn();n!==null&&(n.dirty=!0,n.setCachedNodes(null)),e._selection=n}function Jn(n){const e=ge(),t=function(r,i){let s=r;for(;s!=null;){const o=Fs(s,i);if(o!==void 0)return o;s=li(s)}return null}(n,e);return t===null?n===e.getRootElement()?Ce("root"):null:Ce(t)}function sh(n){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n)}function Wa(n){const e=[];let t=n;for(;t!==null;)e.push(t),t=t._parentEditor;return e}function oh(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function ah(n){return Ut(n)?n.nodeValue:null}function za(n,e,t){const r=Wt(ct(e));if(r===null)return;const i=r.anchorNode;let{anchorOffset:s,focusOffset:o}=r;if(i!==null){let a=ah(i);const l=ai(i);if(a!==null&&z(l)){if(a===xs&&t){const u=t.length;a=t,s=u,o=u}a!==null&&Ha(l,a,s,o,n)}}}function Ha(n,e,t,r,i){let s=n;if(s.isAttached()&&(i||!s.isDirty())){const o=s.isComposing();let a=e;(o||i)&&e[e.length-1]===xs&&(a=e.slice(0,-1));const l=s.getTextContent();if(i||a!==l){if(a===""){if(Ie(null),Kr||ar||Gr)s.remove();else{const _=ge();setTimeout(()=>{_.update(()=>{s.isAttached()&&s.remove()})},20)}return}const u=s.getParent(),c=ri(),d=s.getTextContentSize(),h=Yt(),f=s.getKey();if(s.isToken()||h!==null&&f===h&&!o||B(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===n.__key&&c.anchor.offset===0&&!s.canInsertTextBefore()&&!o||c.focus.key===n.__key&&c.focus.offset===d&&!s.canInsertTextAfter()&&!o))return void s.markDirty();const p=Q();if(!B(p)||t===null||r===null)return void Lu(s,a,p);if(p.setTextNodeRange(s,t,s,r),s.isSegmented()){const _=Te(s.getTextContent());s.replace(_),s=_}Lu(s,a,p)}}}function Lu(n,e,t){if(n.setTextContent(e),B(t)){const r=n.getKey();for(const i of["anchor","focus"]){const s=t[i];s.type==="text"&&s.key===r&&(s.offset=Jt(n,s.offset,"clamp"))}}}function Ni(n,e,t){const r=e[t]||!1;return r==="any"||r===n[t]}function T_(n,e){return Ni(n,e,"altKey")&&Ni(n,e,"ctrlKey")&&Ni(n,e,"shiftKey")&&Ni(n,e,"metaKey")}function se(n,e,t){return T_(n,t)&&n.key.toLowerCase()===e.toLowerCase()}const Mt={ctrlKey:!gt,metaKey:gt},Pu={altKey:gt,ctrlKey:!gt};function Ru(n){return n.key==="Backspace"}function $u(n){return se(n,"a",Mt)}function tr(n,e){n.__lexicalClassNameCache===void 0&&(n.__lexicalClassNameCache={});const t=n.__lexicalClassNameCache,r=t[e];if(r!==void 0)return r;const i=n[e];if(typeof i=="string"){const s=dd(i);return t[e]=s,s}return i}function Ba(n,e,t,r,i){if(t.size===0)return;const s=r.__type,o=r.__key,a=e.get(s);a===void 0&&A(33,s);const l=a.klass;let u=n.get(l);u===void 0&&(u=new Map,n.set(l,u));const c=u.get(o),d=c==="destroyed"&&i==="created";(c===void 0||d)&&u.set(o,d?"updated":i)}function Wu(n,e,t){const r=n.getParent();let i=t,s=n;return r!==null&&(t===0&&(i=s.getIndexWithinParent(),s=r)),s.getChildAtIndex(i-1)}function O_(n,e){const t=n.offset;if(n.type==="element")return Wu(n.getNode(),e,t);{const r=n.getNode();if(t===0){const i=r.getPreviousSibling();return i===null?Wu(r.getParentOrThrow(),e,r.getIndexWithinParent()+0):i}}return null}function lh(n){const e=ct(n).event,t=e&&e.inputType;return t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function R(n,e,t){return function(r,i,s){const o=Wa(r);for(let a=4;a>=0;a--)for(let l=0;l<o.length;l++){const u=o[l],c=u._commands.get(i);if(c!==void 0){const d=c[a];if(d!==void 0){const h=Array.from(d),f=h.length;let p=!1;if(Xe(u,()=>{for(let _=0;_<f;_++)if(h[_](s,r))return void(p=!0)}),p)return p}}}return!1}(n,e,t)}function Ms(n){return!De(n)&&!n.isLastChild()&&!n.isInline()}function An(n,e){const t=n._keyToDOMMap.get(e);return t===void 0&&A(75,e),t}function li(n){const e=n.assignedSlot||n.parentElement;return ea(e)?e.host:e}function uh(n){return E_(n)?n:de(n)?n.ownerDocument:null}function N_(n){Me(),ge()._updateTags.add(n)}function A_(n){Me(),ge()._deferred.push(n)}function Xo(n,e){let t=n.getParent();for(;t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function Ua(n){const e=uh(n);return e?e.defaultView:null}function ct(n){const e=n._window;return e===null&&A(78),e}function F_(n){return N(n)&&n.isInline()||ce(n)&&n.isInline()}function M_(n){let e=n.getParentOrThrow();for(;e!==null;){if(on(e))return e;e=e.getParentOrThrow()}return e}function on(n){return De(n)||N(n)&&n.isShadowRoot()}function Ae(n){const e=ge(),t=n.getType(),r=Ra(e,t);r===void 0&&A(200,n.constructor.name,t);const{replace:i,replaceWithKlass:s}=r;if(i!==null){const o=i(n),a=o.constructor;return s!==null?o instanceof s||A(201,s.name,s.getType(),a.name,a.getType(),n.constructor.name,t):o instanceof n.constructor&&a!==n.constructor||A(202,a.name,a.getType(),n.constructor.name,t),o.__key===n.__key&&A(203,n.constructor.name,t,a.name,a.getType()),o}return n}function fo(n,e){!De(n.getParent())||N(e)||ce(e)||A(99)}function I_(n){const e=Ce(n);return e===null&&A(63,n),e}function po(n){return(ce(n)||N(n)&&!n.canBeEmpty())&&!n.isInline()}function Qo(n,e,t){t.style.removeProperty("caret-color"),e._blockCursorElement=null;const r=n.parentElement;r!==null&&r.removeChild(n)}function Wt(n){return wt?(n||window).getSelection():null}function D_(n){const e=Ua(n);return e?e.getSelection():null}function ch(n){return de(n)&&n.tagName==="A"}function de(n){return ui(n)&&n.nodeType===1}function ui(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"}function ea(n){return ui(n)&&n.nodeType===11}function L_(n){const e=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return n.nodeName.match(e)!==null}function zu(n){const e=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return n.nodeName.match(e)!==null}function Gt(n){if(ce(n)&&!n.isInline())return!0;if(!N(n)||on(n))return!1;const e=n.getFirstChild(),t=e===null||yn(e)||z(e)||e.isInline();return!n.isInline()&&n.canBeEmpty()!==!1&&t}function ja(){return ge()}const Hu=new WeakMap,P_=new Map;function Bu(n){if(!n._readOnly&&n.isEmpty())return P_;n._readOnly||A(192);let e=Hu.get(n);return e||(e=function(t){const r=new Map;for(const[i,s]of t._nodeMap){const o=s.__type;let a=r.get(o);a||(a=new Map,r.set(o,a)),a.set(i,s)}return r}(n),Hu.set(n,e)),e}function dh(n){const e=n.constructor.clone(n);return e.afterCloneFrom(n),e}function R_(n){return(e=dh(n))[$d]=!0,e;var e}function Va(n,e){const t=parseInt(n.style.paddingInlineStart,10)||0,r=Math.round(t/40);e.setIndent(r)}function $_(n){n.__lexicalUnmanaged=!0}function W_(n){return n.__lexicalUnmanaged===!0}function Cr(n,e){return function(t,r){return Object.prototype.hasOwnProperty.call(t,r)}(n,e)&&n[e]!==yt[e]}function Is(n){const e=Jl in n.prototype?n.prototype[Jl]():void 0,t=function(o){if(!(o===yt||o.prototype instanceof yt)){let a="<unknown>",l="<unknown>";try{a=o.getType()}catch{}try{Nn.version&&(l=JSON.parse(Nn.version))}catch{}A(290,o.name,a,l)}return o===Ts||o===We||o===yt}(n),r=!t&&Cr(n,"getType")?n.getType():void 0;let i,s=r;if(e)if(r)i=e[r];else for(const[o,a]of Object.entries(e))s=o,i=a;if(!t&&s&&(Cr(n,"getType")||(n.getType=()=>s),Cr(n,"clone")||(n.clone=o=>(Pa(o),new n)),Cr(n,"importJSON")||(n.importJSON=i&&i.$importJSON||(o=>new n().updateFromJSON(o))),!Cr(n,"importDOM")&&i)){const{importDOM:o}=i;o&&(n.importDOM=()=>o)}return{ownNodeConfig:i,ownNodeType:s}}function hh(n){const e=ja();return Me(),new(e.resolveRegisteredNodeAfterReplacements(e.getRegisteredNode(n))).klass}const Bi=(n,e)=>{let t=n;for(;t!=null&&!De(t);){if(e(t))return t;t=t.getParent()}return null},z_={next:"previous",previous:"next"};class Za{constructor(e){m(this,"origin");this.origin=e}[Symbol.iterator](){return Ya({hasNext:In,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return Le(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return Le(this.origin,this.direction)}remove(){const e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){const r=this.getNodeAtCaret();return e.is(this.origin)||e.is(r)||(r===null?this.insert(e):r.replace(e,t)),this}splice(e,t,r="next"){const i=r===this.direction?t:Array.from(t).reverse();let s=this;const o=this.getParentAtCaret(),a=new Map;for(let l=s.getAdjacentCaret();l!==null&&a.size<e;l=l.getAdjacentCaret()){const u=l.origin.getWritable();a.set(u.getKey(),u)}for(const l of i){if(a.size>0){const u=s.getNodeAtCaret();if(u){if(a.delete(u.getKey()),a.delete(l.getKey()),!(u.is(l)||s.origin.is(l))){const c=l.getParent();c&&c.is(o)&&l.remove(),u.replace(l)}}else u===null&&A(263,Array.from(a).join(" "))}else s.insert(l);s=Le(l,this.direction)}for(const l of a.values())l.remove();return this}}class Jr extends Za{constructor(){super(...arguments);m(this,"type","child")}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:zt(t,this.direction)}getParentCaret(t="root"){return Le(Ka(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=pr(this.direction);return Le(this.getNodeAtCaret(),t)||zt(this.origin,t)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(t){return t instanceof Jr&&this.direction===t.direction&&this.origin.is(t.origin)}isSamePointCaret(t){return this.isSameNodeCaret(t)}}const H_={root:De,shadowRoot:on};function pr(n){return z_[n]}function Ka(n,e="root"){return H_[e](n)?null:n}class Fn extends Za{constructor(){super(...arguments);m(this,"type","sibling")}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Le(t,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return N(this.origin)?zt(this.origin,this.direction):null}getParentCaret(t="root"){return Le(Ka(this.getParentAtCaret(),t),this.direction)}getFlipped(){const t=pr(this.direction);return Le(this.getNodeAtCaret(),t)||zt(this.origin.getParentOrThrow(),t)}isSamePointCaret(t){return t instanceof Fn&&this.direction===t.direction&&this.origin.is(t.origin)}isSameNodeCaret(t){return(t instanceof Fn||t instanceof Mn)&&this.direction===t.direction&&this.origin.is(t.origin)}}class Mn extends Za{constructor(t,r){super(t);m(this,"type","text");m(this,"offset");this.offset=r}getLatest(){const t=this.origin.getLatest();return t===this.origin?this:Dn(t,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(t="root"){return Le(Ka(this.getParentAtCaret(),t),this.direction)}getFlipped(){return Dn(this.origin,pr(this.direction),this.offset)}isSamePointCaret(t){return t instanceof Mn&&this.direction===t.direction&&this.origin.is(t.origin)&&this.offset===t.offset}isSameNodeCaret(t){return(t instanceof Fn||t instanceof Mn)&&this.direction===t.direction&&this.origin.is(t.origin)}getSiblingCaret(){return Le(this.origin,this.direction)}}function xn(n){return n instanceof Mn}function In(n){return n instanceof Fn}function Rt(n){return n instanceof Jr}const B_={next:class extends Mn{constructor(){super(...arguments);m(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Mn{constructor(){super(...arguments);m(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},U_={next:class extends Fn{constructor(){super(...arguments);m(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends Fn{constructor(){super(...arguments);m(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},j_={next:class extends Jr{constructor(){super(...arguments);m(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends Jr{constructor(){super(...arguments);m(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function Le(n,e){return n?new U_[e](n):null}function Dn(n,e,t){return n?new B_[e](n,Jt(n,t)):null}function Jt(n,e,t="error"){const r=n.getTextContentSize();let i=e==="next"?r:e==="previous"?0:e;return(i<0||i>r)&&(t!=="clamp"&&ud(284,String(e),String(r),n.getKey()),i=i<0?0:r),i}function Uu(n,e){return new Z_(n,e)}function zt(n,e){return N(n)?new j_[e](n):null}function V_(n){return n&&n.getChildCaret()||n}function Ga(n){return n&&V_(n.getAdjacentCaret())}class qa{constructor(e,t,r){m(this,"type","node-caret-range");m(this,"direction");m(this,"anchor");m(this,"focus");this.anchor=e,this.focus=t,this.direction=r}getLatest(){const e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new qa(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const e=i=>{const s=this[i].getLatest();return xn(s)?function(o,a){const{direction:l,origin:u}=o,c=Jt(u,a==="focus"?pr(l):l);return Uu(o,c-o.offset)}(s,i):null},t=e("anchor"),r=e("focus");if(t&&r){const{caret:i}=t,{caret:s}=r;if(i.isSameNodeCaret(s))return[Uu(i,s.offset-i.offset),null]}return[t,r]}iterNodeCarets(e="root"){const t=xn(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=xn(r),s=o=>o.isSameNodeCaret(r)?null:Ga(o)||o.getParentCaret(e);return Ya({hasNext:o=>o!==null&&!(i&&r.isSameNodeCaret(o)),initial:t.isSameNodeCaret(r)?null:s(t),map:o=>o,step:s})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class Z_{constructor(e,t){m(this,"type","slice");m(this,"caret");m(this,"distance");this.caret=e,this.distance=t}getSliceIndices(){const{distance:e,caret:{offset:t}}=this,r=t+e;return r<t?[r,t]:[t,r]}getTextContent(){const[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:e,direction:t}}=this,[r,i]=this.getSliceIndices(),s=e.getTextContent();return Dn(e.setTextContent(s.slice(0,r)+s.slice(i)),t,r)}}function fh(n){return Ln(n,Le(tt(),n.direction))}function K_(n){return Ln(n,n)}function Ln(n,e){return n.direction!==e.direction&&A(265),new qa(n,e,n.direction)}function Ya(n){const{initial:e,hasNext:t,step:r,map:i}=n;let s=e;return{[Symbol.iterator](){return this},next(){if(!t(s))return{done:!0,value:void 0};const o={done:!1,value:i(s)};return s=r(s),o}}}function ph(n,e){const t=Ui(n.origin,e.origin);switch(t===null&&A(275,n.origin.getKey(),e.origin.getKey()),t.type){case"same":{const r=n.type==="text",i=e.type==="text";return r&&i?function(s,o){return Math.sign(s-o)}(n.offset,e.offset):n.type===e.type?0:r?-1:i?1:n.type==="child"?-1:1}case"ancestor":return n.type==="child"?-1:1;case"descendant":return e.type==="child"?1:-1;case"branch":return gh(t)}}function gh(n){const{a:e,b:t}=n,r=e.__key,i=t.__key;let s=e,o=t;for(;s&&o;s=s.getNextSibling(),o=o.getNextSibling()){if(s.__key===i)return-1;if(o.__key===r)return 1}return s===null?1:-1}function Ai(n,e){return e.is(n)}function ju(n){return N(n)?[n.getLatest(),null]:[n.getParent(),n.getLatest()]}function Ui(n,e){if(n.is(e))return{commonAncestor:n,type:"same"};const t=new Map;for(let[r,i]=ju(n);r;i=r,r=r.getParent())t.set(r,i);for(let[r,i]=ju(e);r;i=r,r=r.getParent()){const s=t.get(r);if(s!==void 0)return s===null?(Ai(n,r)||A(276),{commonAncestor:r,type:"ancestor"}):i===null?(Ai(e,r)||A(277),{commonAncestor:r,type:"descendant"}):((N(s)||Ai(n,s))&&(N(i)||Ai(e,i))&&r.is(s.getParent())&&r.is(i.getParent())||A(278),{a:s,b:i,commonAncestor:r,type:"branch"})}return null}function Pn(n,e){const{type:t,key:r,offset:i}=n,s=I_(n.key);return t==="text"?(z(s)||A(266,s.getType(),r),Dn(s,e,i)):(N(s)||A(267,s.getType(),r),J_(s,n.offset,e))}function Xr(n,e){const{origin:t,direction:r}=e,i=r==="next";xn(e)?n.set(t.getKey(),e.offset,"text"):In(e)?z(t)?n.set(t.getKey(),Jt(t,r),"text"):n.set(t.getParentOrThrow().getKey(),t.getIndexWithinParent()+(i?1:0),"element"):(Rt(e)&&N(t)||A(268),n.set(t.getKey(),i?0:t.getChildrenSize(),"element"))}function G_(n){const e=Q(),t=B(e)?e:p_();return ji(t,n),nt(t),t}function ji(n,e){Xr(n.anchor,e.anchor),Xr(n.focus,e.focus)}function Vu(n){const{anchor:e,focus:t}=n,r=Pn(e,"next"),i=Pn(t,"next"),s=ph(r,i)<=0?"next":"previous";return Ln(ur(r,s),ur(i,s))}function Ja(n){const{direction:e,origin:t}=n,r=Le(t,pr(e)).getNodeAtCaret();return r?Le(r,e):zt(t.getParentOrThrow(),e)}function Zu(n,e="root"){const t=[n];for(let r=Rt(n)?n.getParentCaret(e):n.getSiblingCaret();r!==null;r=r.getParentCaret(e))t.push(Ja(r));return t}function go(n){return!!n&&n.origin.isAttached()}function q_(n,e="removeEmptySlices"){if(n.isCollapsed())return n;const t="root",r="next";let i=e;const s=mh(n,r),o=Zu(s.anchor,t),a=Zu(s.focus.getFlipped(),t),l=new Set,u=[];for(const p of s.iterNodeCarets(t))if(Rt(p))l.add(p.origin.getKey());else if(In(p)){const{origin:_}=p;N(_)&&!l.has(_.getKey())||u.push(_)}for(const p of u)p.remove();for(const p of s.getTextSlices()){if(!p)continue;const{origin:_}=p.caret,y=_.getTextContentSize(),x=Ja(Le(_,r)),g=_.getMode();if(Math.abs(p.distance)===y&&i==="removeEmptySlices"||g==="token"&&p.distance!==0)x.remove();else if(p.distance!==0){i="removeEmptySlices";let v=p.removeTextSlice();const C=p.caret.origin;if(g==="segmented"){const S=v.origin,b=Te(S.getTextContent()).setStyle(S.getStyle()).setFormat(S.getFormat());x.replaceOrInsert(b),v=Dn(b,r,v.offset)}C.is(o[0].origin)&&(o[0]=v),C.is(a[0].origin)&&(a[0]=v.getFlipped())}}let c,d;for(const p of o)if(go(p)){c=kt(p);break}for(const p of a)if(go(p)){d=kt(p);break}const h=function(p,_,y){if(!p||!_)return null;const x=p.getParentAtCaret(),g=_.getParentAtCaret();if(!x||!g)return null;const v=x.getParents().reverse();v.push(x);const C=g.getParents().reverse();C.push(g);const S=Math.min(v.length,C.length);let b;for(b=0;b<S&&v[b]===C[b];b++);const k=(O,D)=>{let Z;for(let j=b;j<O.length;j++){const K=O[j];if(on(K))return;!Z&&D(K)&&(Z=K)}return Z},T=k(v,Gt),E=T&&k(C,O=>y.has(O.getKey())&&Gt(O));return T&&E?[T,E]:null}(c,d,l);if(h){const[p,_]=h;zt(p,"previous").splice(0,_.getChildren()),_.remove()}const f=[c,d,...o,...a].find(go);if(f)return K_(ur(kt(f),n.direction));A(269,JSON.stringify(o.map(p=>p.origin.__key)))}function kt(n){const e=function(i){let s=i;for(;Rt(s);){const o=Ga(s);if(!Rt(o))break;s=o}return s}(n.getLatest()),{direction:t}=e;if(z(e.origin))return xn(e)?e:Dn(e.origin,t,t);const r=e.getAdjacentCaret();return In(r)&&z(r.origin)?Dn(r.origin,t,pr(t)):e}function Y_(n){return xn(n)&&n.offset!==Jt(n.origin,n.direction)}function ur(n,e){return n.direction===e?n:n.getFlipped()}function mh(n,e){return n.direction===e?n:Ln(ur(n.focus,e),ur(n.anchor,e))}function J_(n,e,t){let r=zt(n,"next");for(let i=0;i<e;i++){const s=r.getAdjacentCaret();if(s===null)break;r=s}return ur(r,t)}const _h=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,X_=_h?W.useLayoutEffect:W.useEffect,Fi={tag:zi};function Q_({initialConfig:n,children:e}){const t=W.useMemo(()=>{const{theme:r,namespace:i,nodes:s,onError:o,editorState:a,html:l}=n,u=lm(null,r),c=b_({editable:n.editable,html:l,namespace:i,nodes:s,onError:d=>o(d,c),theme:r});return function(d,h){if(h!==null){if(h===void 0)d.update(()=>{const f=tt();if(f.isEmpty()){const p=Ee();f.append(p);const _=_h?document.activeElement:null;(Q()!==null||_!==null&&_===d.getRootElement())&&p.select()}},Fi);else if(h!==null)switch(typeof h){case"string":{const f=d.parseEditorState(h);d.setEditorState(f,Fi);break}case"object":d.setEditorState(h,Fi);break;case"function":d.update(()=>{tt().isEmpty()&&h(d)},Fi)}}}(c,a),[c,u]},[]);return X_(()=>{const r=n.editable,[i]=t;i.setEditable(r===void 0||r)},[]),M.jsx(ld.Provider,{value:t,children:e})}const Ku=new Map;function ey(n){const e={};if(!n)return e;const t=n.split(";");for(const r of t)if(r!==""){const[i,s]=r.split(/:([^]+)/);i&&s&&(e[i.trim()]=s.trim())}return e}function Gu(n){let e=Ku.get(n);return e===void 0&&(e=ey(n),Ku.set(n,e)),e}function ty(n,e,t="self"){const r=n.getStartEndPoints();if(e.isSelected(n)&&!It(e)&&r!==null){const[i,s]=r,o=n.isBackward(),a=i.getNode(),l=s.getNode(),u=e.is(a),c=e.is(l);if(u||c){const[d,h]=Yo(n),f=a.is(l),p=e.is(o?l:a),_=e.is(o?a:l);let y,x=0;f?(x=d>h?h:d,y=d>h?d:h):p?(x=o?h:d,y=void 0):_&&(x=0,y=o?d:h);const g=e.__text.slice(x,y);g!==e.__text&&(t==="clone"&&(e=R_(e)),e.__text=g)}}return e}const yh=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,ny=yh&&"documentMode"in document?document.documentMode:null;!(!yh||!("InputEvent"in window)||ny)&&"getTargetRanges"in new window.InputEvent("input");function vh(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}function ry(...n){return()=>{for(let e=n.length-1;e>=0;e--)n[e]();n.length=0}}function xe(n,...e){const t=vh(...e);t.length>0&&n.classList.add(...t)}function Xt(n,...e){const t=vh(...e);t.length>0&&n.classList.remove(...t)}function iy(n){return n?n.getAdjacentCaret():null}function wh(n,e){const t=[],r=Array.from(n).reverse();for(let i=r.pop();i!==void 0;i=r.pop())if(e(i))t.push(i);else if(N(i))for(const s of sy(i))r.push(s);return t}function sy(n){return oy(zt(n,"previous"))}function oy(n){return Ya({hasNext:In,initial:n.getAdjacentCaret(),map:e=>e.origin.getLatest(),step:e=>e.getAdjacentCaret()})}const ay=Symbol.for("preact-signals");function Xa(){if(nr>1)return void nr--;let n,e=!1;for(;Vr!==void 0;){let t=Vr;for(Vr=void 0,ta++;t!==void 0;){const r=t.o;if(t.o=void 0,t.f&=-3,!(8&t.f)&&xh(t))try{t.c()}catch(i){e||(n=i,e=!0)}t=r}}if(ta=0,nr--,e)throw n}let re,Vr;function qu(n){const e=re;re=void 0;try{return n()}finally{re=e}}let nr=0,ta=0,Vi=0;function Yu(n){if(re===void 0)return;let e=n.n;return e===void 0||e.t!==re?(e={i:0,S:n,p:re.s,n:void 0,t:re,e:void 0,x:void 0,r:e},re.s!==void 0&&(re.s.n=e),re.s=e,n.n=e,32&re.f&&n.S(e),e):e.i===-1?(e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=re.s,e.n=void 0,re.s.n=e,re.s=e),e):void 0}function Ke(n,e){this.v=n,this.i=0,this.n=void 0,this.t=void 0,this.W=e==null?void 0:e.watched,this.Z=e==null?void 0:e.unwatched,this.name=e==null?void 0:e.name}function xh(n){for(let e=n.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Ju(n){for(let e=n.s;e!==void 0;e=e.n){const t=e.S.n;if(t!==void 0&&(e.r=t),e.S.n=e,e.i=-1,e.n===void 0){n.s=e;break}}}function bh(n){let e,t=n.s;for(;t!==void 0;){const r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):e=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}n.s=e}function Un(n,e){Ke.call(this,void 0),this.x=n,this.s=void 0,this.g=Vi-1,this.f=4,this.W=e==null?void 0:e.watched,this.Z=e==null?void 0:e.unwatched,this.name=e==null?void 0:e.name}function Sh(n){const e=n.u;if(n.u=void 0,typeof e=="function"){nr++;const t=re;re=void 0;try{e()}catch(r){throw n.f&=-2,n.f|=8,Qa(n),r}finally{re=t,Xa()}}}function Qa(n){for(let e=n.s;e!==void 0;e=e.n)e.S.U(e);n.x=void 0,n.s=void 0,Sh(n)}function ly(n){if(re!==this)throw new Error("Out-of-order effect");bh(this),re=n,this.f&=-2,8&this.f&&Qa(this),Xa()}function Yn(n,e){this.x=n,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=e==null?void 0:e.name}function uy(n,e){const t=new Yn(n,e);try{t.c()}catch(i){throw t.d(),i}const r=t.d.bind(t);return r[Symbol.dispose]=r,r}Ke.prototype.brand=ay,Ke.prototype.h=function(){return!0},Ke.prototype.S=function(n){const e=this.t;e!==n&&n.e===void 0&&(n.x=e,this.t=n,e!==void 0?e.e=n:qu(()=>{var t;(t=this.W)==null||t.call(this)}))},Ke.prototype.U=function(n){if(this.t!==void 0){const e=n.e,t=n.x;e!==void 0&&(e.x=t,n.e=void 0),t!==void 0&&(t.e=e,n.x=void 0),n===this.t&&(this.t=t,t===void 0&&qu(()=>{var r;(r=this.Z)==null||r.call(this)}))}},Ke.prototype.subscribe=function(n){return uy(()=>{const e=this.value,t=re;re=void 0;try{n(e)}finally{re=t}},{name:"sub"})},Ke.prototype.valueOf=function(){return this.value},Ke.prototype.toString=function(){return this.value+""},Ke.prototype.toJSON=function(){return this.value},Ke.prototype.peek=function(){const n=re;re=void 0;try{return this.value}finally{re=n}},Object.defineProperty(Ke.prototype,"value",{get(){const n=Yu(this);return n!==void 0&&(n.i=this.i),this.v},set(n){if(n!==this.v){if(ta>100)throw new Error("Cycle detected");this.v=n,this.i++,Vi++,nr++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Xa()}}}}),Un.prototype=new Ke,Un.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Vi))return!0;if(this.g=Vi,this.f|=1,this.i>0&&!xh(this))return this.f&=-2,!0;const n=re;try{Ju(this),re=this;const e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return re=n,bh(this),this.f&=-2,!0},Un.prototype.S=function(n){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}Ke.prototype.S.call(this,n)},Un.prototype.U=function(n){if(this.t!==void 0&&(Ke.prototype.U.call(this,n),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Un.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let n=this.t;n!==void 0;n=n.x)n.t.N()}},Object.defineProperty(Un.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const n=Yu(this);if(this.h(),n!==void 0&&(n.i=this.i),16&this.f)throw this.v;return this.v}}),Yn.prototype.c=function(){const n=this.S();try{if(8&this.f||this.x===void 0)return;const e=this.x();typeof e=="function"&&(this.u=e)}finally{n()}},Yn.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Sh(this),Ju(this),nr++;const n=re;return re=this,ly.bind(this,n)},Yn.prototype.N=function(){2&this.f||(this.f|=2,this.o=Vr,Vr=this)},Yn.prototype.d=function(){this.f|=8,1&this.f||Qa(this)},Yn.prototype.dispose=function(){this.d()};class Ds extends Ts{static getType(){return"horizontalrule"}static clone(e){return new Ds(e.__key)}static importJSON(e){return Ch().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:cy,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const t=document.createElement("hr");return xe(t,e.theme.hr),t}getTextContent(){return`
47
- `}isInline(){return!1}updateDOM(){return!1}}function cy(){return{node:Ch()}}function Ch(){return hh(Ds)}function dy(n,e){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const t=document.createElement("div"),r=tt().getChildren();for(let i=0;i<r.length;i++)Eh(n,r[i],t,e);return t.innerHTML}function Eh(n,e,t,r=null){let i=r===null||e.isSelected(r);const s=N(e)&&e.excludeFromCopy("html");let o=e;r!==null&&z(e)&&(o=ty(r,e,"clone"));const a=N(o)?o.getChildren():[],l=Ra(n,o.getType());let u;u=l&&l.exportDOM!==void 0?l.exportDOM(n,o):o.exportDOM(n);const{element:c,after:d}=u;if(!c)return!1;const h=document.createDocumentFragment();for(let f=0;f<a.length;f++){const p=a[f],_=Eh(n,p,h,r);!i&&N(e)&&_&&e.extractWithChild(p,r,"html")&&(i=!0)}if(i&&!s){if((de(c)||ea(c))&&c.append(h),t.append(c),d){const f=d.call(o,c);f&&(ea(c)?c.replaceChildren(f):c.replaceWith(f))}}else t.append(h);return i}const el=/^(\d+(?:\.\d+)?)px$/,rr={BOTH:3,NO_STATUS:0,ROW:1};class ci extends We{constructor(t=rr.NO_STATUS,r=1,i,s){super(s);m(this,"__colSpan");m(this,"__rowSpan");m(this,"__headerState");m(this,"__width");m(this,"__backgroundColor");m(this,"__verticalAlign");this.__colSpan=r,this.__rowSpan=1,this.__headerState=t,this.__width=i,this.__backgroundColor=null,this.__verticalAlign=void 0}static getType(){return"tablecell"}static clone(t){return new ci(t.__headerState,t.__colSpan,t.__width,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__rowSpan=t.__rowSpan,this.__backgroundColor=t.__backgroundColor,this.__verticalAlign=t.__verticalAlign}static importDOM(){return{td:t=>({conversion:Xu,priority:0}),th:t=>({conversion:Xu,priority:0})}}static importJSON(t){return kh().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHeaderStyles(t.headerState).setColSpan(t.colSpan||1).setRowSpan(t.rowSpan||1).setWidth(t.width||void 0).setBackgroundColor(t.backgroundColor||null).setVerticalAlign(t.verticalAlign||void 0)}createDOM(t){const r=document.createElement(this.getTag());return this.__width&&(r.style.width=`${this.__width}px`),this.__colSpan>1&&(r.colSpan=this.__colSpan),this.__rowSpan>1&&(r.rowSpan=this.__rowSpan),this.__backgroundColor!==null&&(r.style.backgroundColor=this.__backgroundColor),na(this.__verticalAlign)&&(r.style.verticalAlign=this.__verticalAlign),xe(r,t.theme.tableCell,this.hasHeader()&&t.theme.tableCellHeader),r}exportDOM(t){const r=super.exportDOM(t);if(de(r.element)){const i=r.element;i.setAttribute("data-temporary-table-cell-lexical-key",this.getKey()),i.style.border="1px solid black",this.__colSpan>1&&(i.colSpan=this.__colSpan),this.__rowSpan>1&&(i.rowSpan=this.__rowSpan),i.style.width=`${this.getWidth()||75}px`,i.style.verticalAlign=this.getVerticalAlign()||"top",i.style.textAlign="start",this.__backgroundColor===null&&this.hasHeader()&&(i.style.backgroundColor="#f2f3f5")}return r}exportJSON(){return{...super.exportJSON(),...na(this.__verticalAlign)&&{verticalAlign:this.__verticalAlign},backgroundColor:this.getBackgroundColor(),colSpan:this.__colSpan,headerState:this.__headerState,rowSpan:this.__rowSpan,width:this.getWidth()}}getColSpan(){return this.getLatest().__colSpan}setColSpan(t){const r=this.getWritable();return r.__colSpan=t,r}getRowSpan(){return this.getLatest().__rowSpan}setRowSpan(t){const r=this.getWritable();return r.__rowSpan=t,r}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(t,r=rr.BOTH){const i=this.getWritable();return i.__headerState=t&r|i.__headerState&~r,i}getHeaderStyles(){return this.getLatest().__headerState}setWidth(t){const r=this.getWritable();return r.__width=t,r}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(t){const r=this.getWritable();return r.__backgroundColor=t,r}getVerticalAlign(){return this.getLatest().__verticalAlign}setVerticalAlign(t){const r=this.getWritable();return r.__verticalAlign=t||void 0,r}toggleHeaderStyle(t){const r=this.getWritable();return(r.__headerState&t)===t?r.__headerState-=t:r.__headerState+=t,r}hasHeaderState(t){return(this.getHeaderStyles()&t)===t}hasHeader(){return this.getLatest().__headerState!==rr.NO_STATUS}updateDOM(t){return t.__headerState!==this.__headerState||t.__width!==this.__width||t.__colSpan!==this.__colSpan||t.__rowSpan!==this.__rowSpan||t.__backgroundColor!==this.__backgroundColor||t.__verticalAlign!==this.__verticalAlign}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function na(n){return n==="middle"||n==="bottom"}function Xu(n){const e=n,t=n.nodeName.toLowerCase();let r;el.test(e.style.width)&&(r=parseFloat(e.style.width));const i=kh(t==="th"?rr.ROW:rr.NO_STATUS,e.colSpan,r);i.__rowSpan=e.rowSpan;const s=e.style.backgroundColor;s!==""&&(i.__backgroundColor=s);const o=e.style.verticalAlign;na(o)&&(i.__verticalAlign=o);const a=e.style,l=(a&&a.textDecoration||"").split(" "),u=a.fontWeight==="700"||a.fontWeight==="bold",c=l.includes("line-through"),d=a.fontStyle==="italic",h=l.includes("underline");return{after:f=>{const p=[];let _=null;const y=()=>{if(_){const x=_.getFirstChild();yn(x)&&_.getChildrenSize()===1&&x.remove()}};for(const x of f)F_(x)||z(x)||yn(x)?(z(x)&&(u&&x.toggleFormat("bold"),c&&x.toggleFormat("strikethrough"),d&&x.toggleFormat("italic"),h&&x.toggleFormat("underline")),_?_.append(x):(_=Ee().append(x),p.push(_))):(p.push(x),y(),_=null);return y(),p.length===0&&p.push(Ee()),p},node:i}}function kh(n=rr.NO_STATUS,e=1,t){return Ae(new ci(n,e,t))}function Qr(n){return n instanceof ci}function ra(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class di extends We{constructor(t,r){super(r);m(this,"__height");this.__height=t}static getType(){return"tablerow"}static clone(t){return new di(t.__height,t.__key)}static importDOM(){return{tr:t=>({conversion:hy,priority:0})}}static importJSON(t){return Th().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHeight(t.height)}exportJSON(){const t=this.getHeight();return{...super.exportJSON(),...t===void 0?void 0:{height:t}}}createDOM(t){const r=document.createElement("tr");return this.__height&&(r.style.height=`${this.__height}px`),xe(r,t.theme.tableRow),r}extractWithChild(t,r,i){return i==="html"}isShadowRoot(){return!0}setHeight(t){const r=this.getWritable();return r.__height=t,r}getHeight(){return this.getLatest().__height}updateDOM(t){return t.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function hy(n){const e=n;let t;return el.test(e.style.height)&&(t=parseFloat(e.style.height)),{after:r=>wh(r,Qr),node:Th(t)}}function Th(n){return Ae(new di(n))}function Oh(n){return n instanceof di}const Nh=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,fy=Nh&&"documentMode"in document?document.documentMode:null;Nh&&"InputEvent"in window&&!fy&&new window.InputEvent("input");function py(n,e,t){const r=[];let i=null,s=null;function o(l){let u=r[l];return u===void 0&&(r[l]=u=[]),u}const a=n.getChildren();for(let l=0;l<a.length;l++){const u=a[l];Oh(u)||ra(209);const c=o(l);for(let d=u.getFirstChild(),h=0;d!=null;d=d.getNextSibling()){for(Qr(d)||ra(147);c[h]!==void 0;)h++;const f={cell:d,startColumn:h,startRow:l},{__rowSpan:p,__colSpan:_}=d;for(let y=0;y<p&&!(l+y>=a.length);y++){const x=o(l+y);for(let g=0;g<_;g++)x[h+g]=f}}}return[r,i,s]}function Er(n){return de(n)&&n.nodeName==="TABLE"}function gy(n,e){for(let t=e,r=null;t!==null;t=t.getParent()){if(n.is(t))return r;Qr(t)&&(r=t)}return null}function my(n,e,t){return gy(n,ai(e,t))}function Qu(n,e,t){if(!e.theme.tableAlignment)return;const r=[],i=[];for(const s of["center","right"]){const o=e.theme.tableAlignment[s];o&&(s===t?i:r).push(o)}Xt(n,...r),xe(n,...i)}const _y=new WeakSet;function ec(n=ja()){return _y.has(n)}class Ls extends We{constructor(t){super(t);m(this,"__rowStriping");m(this,"__frozenColumnCount");m(this,"__frozenRowCount");m(this,"__colWidths");this.__rowStriping=!1,this.__frozenColumnCount=0,this.__frozenRowCount=0,this.__colWidths=void 0}static getType(){return"table"}getColWidths(){return this.getLatest().__colWidths}setColWidths(t){const r=this.getWritable();return r.__colWidths=t,r}static clone(t){return new Ls(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__colWidths=t.__colWidths,this.__rowStriping=t.__rowStriping,this.__frozenColumnCount=t.__frozenColumnCount,this.__frozenRowCount=t.__frozenRowCount}static importDOM(){return{table:t=>({conversion:yy,priority:1})}}static importJSON(t){return Ah().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setRowStriping(t.rowStriping||!1).setFrozenColumns(t.frozenColumnCount||0).setFrozenRows(t.frozenRowCount||0).setColWidths(t.colWidths)}exportJSON(){return{...super.exportJSON(),colWidths:this.getColWidths(),frozenColumnCount:this.__frozenColumnCount?this.__frozenColumnCount:void 0,frozenRowCount:this.__frozenRowCount?this.__frozenRowCount:void 0,rowStriping:this.__rowStriping?this.__rowStriping:void 0}}extractWithChild(t,r,i){return i==="html"}getDOMSlot(t){const r=Er(t)?t:t.querySelector("table");return Er(r)||ra(229),super.getDOMSlot(t).withElement(r).withAfter(r.querySelector("colgroup"))}createDOM(t,r){const i=document.createElement("table");this.__style&&(i.style.cssText=this.__style);const s=document.createElement("colgroup");if(i.appendChild(s),$_(s),xe(i,t.theme.table),this.updateTableElement(null,i,t),ec(r)){const o=document.createElement("div"),a=t.theme.tableScrollableWrapper;return a?xe(o,a):o.style.cssText="overflow-x: auto;",o.appendChild(i),this.updateTableWrapper(null,o,i,t),o}return i}updateTableWrapper(t,r,i,s){this.__frozenColumnCount!==(t?t.__frozenColumnCount:0)&&function(o,a,l,u){u>0?(xe(o,l.theme.tableFrozenColumn),a.setAttribute("data-lexical-frozen-column","true")):(Xt(o,l.theme.tableFrozenColumn),a.removeAttribute("data-lexical-frozen-column"))}(r,i,s,this.__frozenColumnCount),this.__frozenRowCount!==(t?t.__frozenRowCount:0)&&function(o,a,l,u){u>0?(xe(o,l.theme.tableFrozenRow),a.setAttribute("data-lexical-frozen-row","true")):(Xt(o,l.theme.tableFrozenRow),a.removeAttribute("data-lexical-frozen-row"))}(r,i,s,this.__frozenRowCount)}updateTableElement(t,r,i){this.__style!==(t?t.__style:"")&&(r.style.cssText=this.__style),this.__rowStriping!==(!!t&&t.__rowStriping)&&function(s,o,a){a?(xe(s,o.theme.tableRowStriping),s.setAttribute("data-lexical-row-striping","true")):(Xt(s,o.theme.tableRowStriping),s.removeAttribute("data-lexical-row-striping"))}(r,i,this.__rowStriping),function(s,o,a,l){const u=s.querySelector("colgroup");if(!u)return;const c=[];for(let d=0;d<a;d++){const h=document.createElement("col"),f=l&&l[d];f&&(h.style.width=`${f}px`),c.push(h)}u.replaceChildren(...c)}(r,0,this.getColumnCount(),this.getColWidths()),Qu(r,i,this.getFormatType())}updateDOM(t,r,i){const s=this.getDOMSlot(r).element;return r===s===ec()||(de(o=r)&&o.nodeName==="DIV"&&this.updateTableWrapper(t,r,s,i),this.updateTableElement(t,s,i),!1);var o}exportDOM(t){const r=super.exportDOM(t),{element:i}=r;return{after:s=>{if(r.after&&(s=r.after(s)),!Er(s)&&de(s)&&(s=s.querySelector("table")),!Er(s))return null;Qu(s,t._config,this.getFormatType());const[o]=py(this),a=new Map;for(const d of o)for(const h of d){const f=h.cell.getKey();a.has(f)||a.set(f,{colSpan:h.cell.getColSpan(),startColumn:h.startColumn})}const l=new Set;for(const d of s.querySelectorAll(":scope > tr > [data-temporary-table-cell-lexical-key]")){const h=d.getAttribute("data-temporary-table-cell-lexical-key");if(h){const f=a.get(h);if(d.removeAttribute("data-temporary-table-cell-lexical-key"),f){a.delete(h);for(let p=0;p<f.colSpan;p++)l.add(p+f.startColumn)}}}const u=s.querySelector(":scope > colgroup");if(u){const d=Array.from(s.querySelectorAll(":scope > colgroup > col")).filter((h,f)=>l.has(f));u.replaceChildren(...d)}const c=s.querySelectorAll(":scope > tr");if(c.length>0){const d=document.createElement("tbody");for(const h of c)d.appendChild(h);s.append(d)}return s},element:!Er(i)&&de(i)?i.querySelector("table"):i}}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(t,r){const{rows:i,domRows:s}=r;for(let o=0;o<i;o++){const a=s[o];if(a!=null)for(let l=0;l<a.length;l++){const u=a[l];if(u==null)continue;const{elem:c}=u,d=my(this,c);if(d!==null&&t.is(d))return{x:l,y:o}}}throw new Error("Cell not found in table.")}getDOMCellFromCords(t,r,i){const{domRows:s}=i,o=s[r];if(o==null)return null;const a=o[t<o.length?t:o.length-1];return a??null}getDOMCellFromCordsOrThrow(t,r,i){const s=this.getDOMCellFromCords(t,r,i);if(!s)throw new Error("Cell not found at cords.");return s}getCellNodeFromCords(t,r,i){const s=this.getDOMCellFromCords(t,r,i);if(s==null)return null;const o=ai(s.elem);return Qr(o)?o:null}getCellNodeFromCordsOrThrow(t,r,i){const s=this.getCellNodeFromCords(t,r,i);if(!s)throw new Error("Node at cords not TableCellNode.");return s}getRowStriping(){return!!this.getLatest().__rowStriping}setRowStriping(t){const r=this.getWritable();return r.__rowStriping=t,r}setFrozenColumns(t){const r=this.getWritable();return r.__frozenColumnCount=t,r}getFrozenColumns(){return this.getLatest().__frozenColumnCount}setFrozenRows(t){const r=this.getWritable();return r.__frozenRowCount=t,r}getFrozenRows(){return this.getLatest().__frozenRowCount}canSelectBefore(){return!0}canIndent(){return!1}getColumnCount(){const t=this.getFirstChild();if(!t)return 0;let r=0;return t.getChildren().forEach(i=>{Qr(i)&&(r+=i.getColSpan())}),r}}function yy(n){const e=Ah();n.hasAttribute("data-lexical-row-striping")&&e.setRowStriping(!0),n.hasAttribute("data-lexical-frozen-column")&&e.setFrozenColumns(1),n.hasAttribute("data-lexical-frozen-row")&&e.setFrozenRows(1);const t=n.querySelector(":scope > colgroup");if(t){let r=[];for(const i of t.querySelectorAll(":scope > col")){let s=i.style.width||"";if(!el.test(s)&&(s=i.getAttribute("width")||"",!/^\d+$/.test(s))){r=void 0;break}r.push(parseFloat(s))}r&&e.setColWidths(r)}return{after:r=>wh(r,Oh),node:e}}function Ah(){return Ae(new Ls)}function Mr(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const i of e)r.append("v",i);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function vy(n){let e=1,t=n.getParent();for(;t!=null;){if(Ge(t)){const r=t.getParent();if(ye(r)){e++,t=r.getParent();continue}Mr(40)}return e}return e}function Ct(n){return Ge(n)&&ye(n.getFirstChild())}function tc(n){return tn().append(n)}function Fh(n,e){n.splice(n.getChildrenSize(),0,e)}function tl(n,e){const t=n.getLastChild(),r=e.getFirstChild();t&&r&&Ct(t)&&Ct(r)&&(tl(t.getFirstChild(),r.getFirstChild()),r.remove());const i=e.getChildren();i.length>0&&n.append(...i),e.remove()}function wy(n){const e=n.getListType()!=="check";let t=n.getStart();for(const r of n.getChildren())Ge(r)&&(r.getValue()!==t&&r.setValue(t),e&&r.getLatest().__checked!=null&&r.setChecked(void 0),ye(r.getFirstChild())||t++)}function xy(n){const e=new Set;if(Ct(n)||e.has(n.getKey()))return;const t=n.getParent(),r=n.getNextSibling(),i=n.getPreviousSibling();if(Ct(r)&&Ct(i)){const s=i.getFirstChild();if(ye(s)){s.append(n);const o=r.getFirstChild();ye(o)&&(Fh(s,o.getChildren()),r.remove(),e.add(r.getKey()))}}else if(Ct(r)){const s=r.getFirstChild();if(ye(s)){const o=s.getFirstChild();o!==null&&o.insertBefore(n)}}else if(Ct(i)){const s=i.getFirstChild();ye(s)&&s.append(n)}else if(ye(t)){const s=tn().setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle()),o=$t(t.getListType()).setTextFormat(t.getTextFormat()).setTextStyle(t.getTextStyle());s.append(o),o.append(n),i?i.insertAfter(s):r?r.insertBefore(s):t.append(s)}}function by(n){if(Ct(n))return;const e=n.getParent(),t=e?e.getParent():void 0;if(ye(t?t.getParent():void 0)&&Ge(t)&&ye(e)){const r=e?e.getFirstChild():void 0,i=e?e.getLastChild():void 0;if(n.is(r))t.insertBefore(n),e.isEmpty()&&t.remove();else if(n.is(i))t.insertAfter(n),e.isEmpty()&&t.remove();else{const s=e.getListType(),o=tn(),a=$t(s);o.append(a),n.getPreviousSiblings().forEach(c=>a.append(c));const l=tn(),u=$t(s);l.append(u),Fh(u,n.getNextSiblings()),t.insertBefore(o),t.insertAfter(l),t.replace(n)}}}function ds(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}let nl=class extends We{constructor(t=1,r=void 0,i){super(i);m(this,"__value");m(this,"__checked");this.__value=t===void 0?1:t,this.__checked=r}$config(){return this.config("listitem",{$transform:t=>{if(t.__checked==null)return;const r=t.getParent();ye(r)&&r.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0)},extends:We,importDOM:{li:()=>({conversion:Sy,priority:0})}})}afterCloneFrom(t){super.afterCloneFrom(t),this.__value=t.__value,this.__checked=t.__checked}createDOM(t){const r=document.createElement("li");return this.updateListItemDOM(null,r,t),r}updateListItemDOM(t,r,i){(function(a,l,u){const c=l.getParent();!ye(c)||c.getListType()!=="check"||ye(l.getFirstChild())?(a.removeAttribute("role"),a.removeAttribute("tabIndex"),a.removeAttribute("aria-checked")):(a.setAttribute("role","checkbox"),a.setAttribute("tabIndex","-1"),u&&l.__checked===u.__checked||a.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,t),r.value=this.__value,function(a,l,u){const c=[],d=[],h=l.list,f=h?h.listitem:void 0;let p;if(h&&h.nested&&(p=h.nested.listitem),f!==void 0&&c.push(...ds(f)),h){const _=u.getParent(),y=ye(_)&&_.getListType()==="check",x=u.getChecked();y&&!x||d.push(h.listitemUnchecked),y&&x||d.push(h.listitemChecked),y&&c.push(x?h.listitemChecked:h.listitemUnchecked)}if(p!==void 0){const _=ds(p);u.getChildren().some(y=>ye(y))?c.push(..._):d.push(..._)}d.length>0&&Xt(a,...d),c.length>0&&xe(a,...c)}(r,i.theme,this);const s=t?t.__style:"",o=this.__style;s!==o&&(o===""?r.removeAttribute("style"):r.style.cssText=o),function(a,l,u){const c=Gu(l.__textStyle);for(const d in c)a.style.setProperty(`--listitem-marker-${d}`,c[d]);if(u)for(const d in Gu(u.__textStyle))d in c||a.style.removeProperty(`--listitem-marker-${d}`)}(r,this,t)}updateDOM(t,r,i){const s=r;return this.updateListItemDOM(t,s,i),!1}updateFromJSON(t){return super.updateFromJSON(t).setValue(t.value).setChecked(t.checked)}exportDOM(t){const r=this.createDOM(t._config),i=this.getFormatType();i&&(r.style.textAlign=i);const s=this.getDirection();return s&&(r.dir=s),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...t){for(let r=0;r<t.length;r++){const i=t[r];if(N(i)&&this.canMergeWith(i)){const s=i.getChildren();this.append(...s),i.remove()}else super.append(i)}return this}replace(t,r){if(Ge(t))return super.replace(t);this.setIndent(0);const i=this.getParentOrThrow();if(!ye(i))return t;if(i.__first===this.getKey())i.insertBefore(t);else if(i.__last===this.getKey())i.insertAfter(t);else{const s=$t(i.getListType());let o=this.getNextSibling();for(;o;){const a=o;o=o.getNextSibling(),s.append(a)}i.insertAfter(t),t.insertAfter(s)}return r&&(N(t)||Mr(139),this.getChildren().forEach(s=>{t.append(s)})),this.remove(),i.getChildrenSize()===0&&i.remove(),t}insertAfter(t,r=!0){const i=this.getParentOrThrow();if(ye(i)||Mr(39),Ge(t))return super.insertAfter(t,r);const s=this.getNextSiblings();if(i.insertAfter(t,r),s.length!==0){const o=$t(i.getListType());s.forEach(a=>o.append(a)),t.insertAfter(o,r)}return t}remove(t){const r=this.getPreviousSibling(),i=this.getNextSibling();super.remove(t),r&&i&&Ct(r)&&Ct(i)&&(tl(r.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(t,r=!0){const i=tn().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(i,r),i}collapseAtStart(t){const r=Ee();this.getChildren().forEach(a=>r.append(a));const i=this.getParentOrThrow(),s=i.getParentOrThrow(),o=Ge(s);if(i.getChildrenSize()===1)if(o)i.remove(),s.select();else{i.insertBefore(r),i.remove();const a=t.anchor,l=t.focus,u=r.getKey();a.type==="element"&&a.getNode().is(this)&&a.set(u,a.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(u,l.offset,"element")}else i.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(t){const r=this.getWritable();return r.__value=t,r}getChecked(){const t=this.getLatest();let r;const i=this.getParent();return ye(i)&&(r=i.getListType()),r==="check"?!!t.__checked:void 0}setChecked(t){const r=this.getWritable();return r.__checked=t,r}toggleChecked(){const t=this.getWritable();return t.setChecked(!t.__checked)}getIndent(){const t=this.getParent();if(t===null||!this.isAttached())return this.getLatest().__indent;let r=t.getParentOrThrow(),i=0;for(;Ge(r);)r=r.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(t){typeof t!="number"&&Mr(117),(t=Math.floor(t))>=0||Mr(199);let r=this.getIndent();for(;r!==t;)r<t?(xy(this),r++):(by(this),r--);return this}canInsertAfter(t){return Ge(t)}canReplaceWith(t){return Ge(t)}canMergeWith(t){return Ge(t)||Jd(t)}extractWithChild(t,r){if(!B(r))return!1;const i=r.anchor.getNode(),s=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(s)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return $t("bullet")}canMergeWhenEmpty(){return!0}};function Sy(n){if(n.classList.contains("task-list-item")){for(const t of n.children)if(t.tagName==="INPUT")return nc(t)}if(n.classList.contains("joplin-checkbox")){for(const t of n.children)if(t.classList.contains("checkbox-wrapper")&&t.children.length>0&&t.children[0].tagName==="INPUT")return nc(t.children[0])}const e=n.getAttribute("aria-checked");return{node:tn(e==="true"||e!=="false"&&void 0)}}function nc(n){return n.getAttribute("type")!=="checkbox"?{node:null}:{node:tn(n.hasAttribute("checked"))}}function tn(n){return Ae(new nl(void 0,n))}function Ge(n){return n instanceof nl}class rl extends We{constructor(t="number",r=1,i){super(i);m(this,"__tag");m(this,"__start");m(this,"__listType");const s=Ey[t]||t;this.__listType=s,this.__tag=s==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:t=>{(function(r){const i=r.getNextSibling();ye(i)&&r.getListType()===i.getListType()&&tl(r,i)})(t),wy(t)},extends:We,importDOM:{ol:()=>({conversion:ic,priority:0}),ul:()=>({conversion:ic,priority:0})}})}afterCloneFrom(t){super.afterCloneFrom(t),this.__listType=t.__listType,this.__tag=t.__tag,this.__start=t.__start}getTag(){return this.getLatest().__tag}setListType(t){const r=this.getWritable();return r.__listType=t,r.__tag=t==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(t){const r=this.getWritable();return r.__start=t,r}createDOM(t,r){const i=this.__tag,s=document.createElement(i);return this.__start!==1&&s.setAttribute("start",String(this.__start)),s.__lexicalListType=this.__listType,rc(s,t.theme,this),s}updateDOM(t,r,i){return t.__tag!==this.__tag||t.__listType!==this.__listType||(rc(r,i.theme,this),!1)}updateFromJSON(t){return super.updateFromJSON(t).setListType(t.listType).setStart(t.start)}exportDOM(t){const r=this.createDOM(t._config,t);return de(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(t,r,i){let s=i;for(let o=0;o<i.length;o++){const a=i[o];Ge(a)||(s===i&&(s=[...i]),s[o]=tn().append(!N(a)||ye(a)||a.isInline()?a:Te(a.getTextContent())))}return super.splice(t,r,s)}extractWithChild(t){return Ge(t)}}function rc(n,e,t){const r=[],i=[],s=e.list;if(s!==void 0){const o=s[`${t.__tag}Depth`]||[],a=vy(t)-1,l=a%o.length,u=o[l],c=s[t.__tag];let d;const h=s.nested,f=s.checklist;if(h!==void 0&&h.list&&(d=h.list),c!==void 0&&r.push(c),f!==void 0&&t.__listType==="check"&&r.push(f),u!==void 0){r.push(...ds(u));for(let p=0;p<o.length;p++)p!==l&&i.push(t.__tag+p)}if(d!==void 0){const p=ds(d);a>1?r.push(...p):i.push(...p)}}i.length>0&&Xt(n,...i),r.length>0&&xe(n,...r)}function Cy(n){const e=[];for(let t=0;t<n.length;t++){const r=n[t];if(Ge(r)){e.push(r);const i=r.getChildren();i.length>1&&i.forEach(s=>{ye(s)&&e.push(tc(s))})}else e.push(tc(r))}return e}function ic(n){const e=n.nodeName.toLowerCase();let t=null;return e==="ol"?t=$t("number",n.start):e==="ul"&&(t=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const i of r.childNodes)if(de(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(n)?$t("check"):$t("bullet")),{after:Cy,node:t}}const Ey={ol:"number",ul:"bullet"};function $t(n="number",e=1){return Ae(new rl(n,e))}function ye(n){return n instanceof rl}var ky={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
48
- * Prism: Lightweight, robust, elegant syntax highlighting
49
- *
50
- * @license MIT <https://opensource.org/licenses/MIT>
51
- * @author Lea Verou <https://lea.verou.me>
52
- * @namespace
53
- * @public
54
- */var t=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,o={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function g(v){return v instanceof l?new l(v.type,g(v.content),v.alias):Array.isArray(v)?v.map(g):v.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(g){return Object.prototype.toString.call(g).slice(8,-1)},objId:function(g){return g.__id||Object.defineProperty(g,"__id",{value:++s}),g.__id},clone:function g(v,C){C=C||{};var S,b;switch(a.util.type(v)){case"Object":if(b=a.util.objId(v),C[b])return C[b];S={},C[b]=S;for(var k in v)v.hasOwnProperty(k)&&(S[k]=g(v[k],C));return S;case"Array":return b=a.util.objId(v),C[b]?C[b]:(S=[],C[b]=S,v.forEach(function(T,E){S[E]=g(T,C)}),S);default:return v}},getLanguage:function(g){for(;g;){var v=i.exec(g.className);if(v)return v[1].toLowerCase();g=g.parentElement}return"none"},setLanguage:function(g,v){g.className=g.className.replace(RegExp(i,"gi"),""),g.classList.add("language-"+v)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(S){var g=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(S.stack)||[])[1];if(g){var v=document.getElementsByTagName("script");for(var C in v)if(v[C].src==g)return v[C]}return null}},isActive:function(g,v,C){for(var S="no-"+v;g;){var b=g.classList;if(b.contains(v))return!0;if(b.contains(S))return!1;g=g.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(g,v){var C=a.util.clone(a.languages[g]);for(var S in v)C[S]=v[S];return C},insertBefore:function(g,v,C,S){S=S||a.languages;var b=S[g],k={};for(var T in b)if(b.hasOwnProperty(T)){if(T==v)for(var E in C)C.hasOwnProperty(E)&&(k[E]=C[E]);C.hasOwnProperty(T)||(k[T]=b[T])}var O=S[g];return S[g]=k,a.languages.DFS(a.languages,function(D,Z){Z===O&&D!=g&&(this[D]=k)}),k},DFS:function g(v,C,S,b){b=b||{};var k=a.util.objId;for(var T in v)if(v.hasOwnProperty(T)){C.call(v,T,v[T],S||T);var E=v[T],O=a.util.type(E);O==="Object"&&!b[k(E)]?(b[k(E)]=!0,g(E,C,null,b)):O==="Array"&&!b[k(E)]&&(b[k(E)]=!0,g(E,C,T,b))}}},plugins:{},highlightAll:function(g,v){a.highlightAllUnder(document,g,v)},highlightAllUnder:function(g,v,C){var S={callback:C,container:g,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",S),S.elements=Array.prototype.slice.apply(S.container.querySelectorAll(S.selector)),a.hooks.run("before-all-elements-highlight",S);for(var b=0,k;k=S.elements[b++];)a.highlightElement(k,v===!0,S.callback)},highlightElement:function(g,v,C){var S=a.util.getLanguage(g),b=a.languages[S];a.util.setLanguage(g,S);var k=g.parentElement;k&&k.nodeName.toLowerCase()==="pre"&&a.util.setLanguage(k,S);var T=g.textContent,E={element:g,language:S,grammar:b,code:T};function O(Z){E.highlightedCode=Z,a.hooks.run("before-insert",E),E.element.innerHTML=E.highlightedCode,a.hooks.run("after-highlight",E),a.hooks.run("complete",E),C&&C.call(E.element)}if(a.hooks.run("before-sanity-check",E),k=E.element.parentElement,k&&k.nodeName.toLowerCase()==="pre"&&!k.hasAttribute("tabindex")&&k.setAttribute("tabindex","0"),!E.code){a.hooks.run("complete",E),C&&C.call(E.element);return}if(a.hooks.run("before-highlight",E),!E.grammar){O(a.util.encode(E.code));return}if(v&&r.Worker){var D=new Worker(a.filename);D.onmessage=function(Z){O(Z.data)},D.postMessage(JSON.stringify({language:E.language,code:E.code,immediateClose:!0}))}else O(a.highlight(E.code,E.grammar,E.language))},highlight:function(g,v,C){var S={code:g,grammar:v,language:C};if(a.hooks.run("before-tokenize",S),!S.grammar)throw new Error('The language "'+S.language+'" has no grammar.');return S.tokens=a.tokenize(S.code,S.grammar),a.hooks.run("after-tokenize",S),l.stringify(a.util.encode(S.tokens),S.language)},tokenize:function(g,v){var C=v.rest;if(C){for(var S in C)v[S]=C[S];delete v.rest}var b=new d;return h(b,b.head,g),c(g,b,v,b.head,0),p(b)},hooks:{all:{},add:function(g,v){var C=a.hooks.all;C[g]=C[g]||[],C[g].push(v)},run:function(g,v){var C=a.hooks.all[g];if(!(!C||!C.length))for(var S=0,b;b=C[S++];)b(v)}},Token:l};r.Prism=a;function l(g,v,C,S){this.type=g,this.content=v,this.alias=C,this.length=(S||"").length|0}l.stringify=function g(v,C){if(typeof v=="string")return v;if(Array.isArray(v)){var S="";return v.forEach(function(O){S+=g(O,C)}),S}var b={type:v.type,content:g(v.content,C),tag:"span",classes:["token",v.type],attributes:{},language:C},k=v.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(b.classes,k):b.classes.push(k)),a.hooks.run("wrap",b);var T="";for(var E in b.attributes)T+=" "+E+'="'+(b.attributes[E]||"").replace(/"/g,"&quot;")+'"';return"<"+b.tag+' class="'+b.classes.join(" ")+'"'+T+">"+b.content+"</"+b.tag+">"};function u(g,v,C,S){g.lastIndex=v;var b=g.exec(C);if(b&&S&&b[1]){var k=b[1].length;b.index+=k,b[0]=b[0].slice(k)}return b}function c(g,v,C,S,b,k){for(var T in C)if(!(!C.hasOwnProperty(T)||!C[T])){var E=C[T];E=Array.isArray(E)?E:[E];for(var O=0;O<E.length;++O){if(k&&k.cause==T+","+O)return;var D=E[O],Z=D.inside,j=!!D.lookbehind,K=!!D.greedy,te=D.alias;if(K&&!D.pattern.global){var me=D.pattern.toString().match(/[imsuy]*$/)[0];D.pattern=RegExp(D.pattern.source,me+"g")}for(var be=D.pattern||D,le=S.next,he=b;le!==v.tail&&!(k&&he>=k.reach);he+=le.value.length,le=le.next){var ze=le.value;if(v.length>g.length)return;if(!(ze instanceof l)){var xt=1,ke;if(K){if(ke=u(be,he,g,j),!ke||ke.index>=g.length)break;var Fe=ke.index,jt=ke.index+ke[0].length,He=he;for(He+=le.value.length;Fe>=He;)le=le.next,He+=le.value.length;if(He-=le.value.length,he=He,le.value instanceof l)continue;for(var rt=le;rt!==v.tail&&(He<jt||typeof rt.value=="string");rt=rt.next)xt++,He+=rt.value.length;xt--,ze=g.slice(he,He),ke.index-=he}else if(ke=u(be,0,ze,j),!ke)continue;var Fe=ke.index,it=ke[0],Ve=ze.slice(0,Fe),dt=ze.slice(Fe+it.length),ht=he+ze.length;k&&ht>k.reach&&(k.reach=ht);var zn=le.prev;Ve&&(zn=h(v,zn,Ve),he+=Ve.length),f(v,zn,xt);var bi=new l(T,Z?a.tokenize(it,Z):it,te,it);if(le=h(v,zn,bi),dt&&h(v,le,dt),xt>1){var vr={cause:T+","+O,reach:ht};c(g,v,C,le.prev,he,vr),k&&vr.reach>k.reach&&(k.reach=vr.reach)}}}}}}function d(){var g={value:null,prev:null,next:null},v={value:null,prev:g,next:null};g.next=v,this.head=g,this.tail=v,this.length=0}function h(g,v,C){var S=v.next,b={value:C,prev:v,next:S};return v.next=b,S.prev=b,g.length++,b}function f(g,v,C){for(var S=v.next,b=0;b<C&&S!==g.tail;b++)S=S.next;v.next=S,S.prev=v,g.length-=b}function p(g){for(var v=[],C=g.head.next;C!==g.tail;)v.push(C.value),C=C.next;return v}if(!r.document)return r.addEventListener&&(a.disableWorkerMessageHandler||r.addEventListener("message",function(g){var v=JSON.parse(g.data),C=v.language,S=v.code,b=v.immediateClose;r.postMessage(a.highlight(S,a.languages[C],C)),b&&r.close()},!1)),a;var _=a.util.currentScript();_&&(a.filename=_.src,_.hasAttribute("data-manual")&&(a.manual=!0));function y(){a.manual||a.highlightAll()}if(!a.manual){var x=document.readyState;x==="loading"||x==="interactive"&&_&&_.defer?document.addEventListener("DOMContentLoaded",y):window.requestAnimationFrame?window.requestAnimationFrame(y):window.setTimeout(y,16)}return a}(e);n.exports&&(n.exports=t),typeof No<"u"&&(No.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(i,s){var o={};o["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[s]},o.cdata=/^<!\[CDATA\[|\]\]>$/i;var a={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:o}};a["language-"+s]={pattern:/[\s\S]+/,inside:t.languages[s]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:a},t.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(r,i){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:t.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var s=r.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(_,y){return"✖ Error "+_+" while fetching file: "+y},s="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},a="data-src-status",l="loading",u="loaded",c="failed",d="pre[data-src]:not(["+a+'="'+u+'"]):not(['+a+'="'+l+'"])';function h(_,y,x){var g=new XMLHttpRequest;g.open("GET",_,!0),g.onreadystatechange=function(){g.readyState==4&&(g.status<400&&g.responseText?y(g.responseText):g.status>=400?x(i(g.status,g.statusText)):x(s))},g.send(null)}function f(_){var y=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(_||"");if(y){var x=Number(y[1]),g=y[2],v=y[3];return g?v?[x,Number(v)]:[x,void 0]:[x,x]}}t.hooks.add("before-highlightall",function(_){_.selector+=", "+d}),t.hooks.add("before-sanity-check",function(_){var y=_.element;if(y.matches(d)){_.code="",y.setAttribute(a,l);var x=y.appendChild(document.createElement("CODE"));x.textContent=r;var g=y.getAttribute("data-src"),v=_.language;if(v==="none"){var C=(/\.(\w+)$/.exec(g)||[,"none"])[1];v=o[C]||C}t.util.setLanguage(x,v),t.util.setLanguage(y,v);var S=t.plugins.autoloader;S&&S.loadLanguages(v),h(g,function(b){y.setAttribute(a,u);var k=f(y.getAttribute("data-range"));if(k){var T=b.split(/\r\n?|\n/g),E=k[0],O=k[1]==null?T.length:k[1];E<0&&(E+=T.length),E=Math.max(0,Math.min(E-1,T.length)),O<0&&(O+=T.length),O=Math.max(0,Math.min(O,T.length)),b=T.slice(E,O).join(`
55
- `),y.hasAttribute("data-start")||y.setAttribute("data-start",String(E+1))}x.textContent=b,t.highlightElement(x)},function(b){y.setAttribute(a,c),x.textContent=b})}}),t.plugins.fileHighlight={highlight:function(y){for(var x=(y||document).querySelectorAll(d),g=0,v;v=x[g++];)t.highlightElement(v)}};var p=!1;t.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(ky);Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]};Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity;Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup;Prism.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&amp;/,"&"))});Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var s={};s[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",s)}});Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(n,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}});Prism.languages.html=Prism.languages.markup;Prism.languages.mathml=Prism.languages.markup;Prism.languages.svg=Prism.languages.markup;Prism.languages.xml=Prism.languages.extend("markup",{});Prism.languages.ssml=Prism.languages.xml;Prism.languages.atom=Prism.languages.xml;Prism.languages.rss=Prism.languages.xml;(function(n){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function t(c){return c=c.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),s=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+s+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+s+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+s+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:t(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:t(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:t(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:t(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(n.languages.markdown[c].inside.content.inside[d]=n.languages.markdown[d])})}),n.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(h){if(!(!h||typeof h=="string"))for(var f=0,p=h.length;f<p;f++){var _=h[f];if(_.type!=="code"){d(_.content);continue}var y=_.content[1],x=_.content[3];if(y&&x&&y.type==="code-language"&&x.type==="code-block"&&typeof y.content=="string"){var g=y.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");g=(/[a-z][\w-]*/i.exec(g)||[""])[0].toLowerCase();var v="language-"+g;x.alias?typeof x.alias=="string"?x.alias=[x.alias,v]:x.alias.push(v):x.alias=[v]}}}d(c.tokens)}),n.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",h=0,f=c.classes.length;h<f;h++){var p=c.classes[h],_=/language-(.+)/.exec(p);if(_){d=_[1];break}}var y=n.languages[d];if(y)c.content=n.highlight(u(c.content),y,d);else if(d&&d!=="none"&&n.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=x,n.plugins.autoloader.loadLanguages(d,function(){var g=document.getElementById(x);g&&(g.innerHTML=n.highlight(g.textContent,n.languages[d],d))})}}});var o=RegExp(n.languages.markup.tag.pattern.source,"gi"),a={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(o,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(h,f){if(f=f.toLowerCase(),f[0]==="#"){var p;return f[1]==="x"?p=parseInt(f.slice(2),16):p=Number(f.slice(1)),l(p)}else{var _=a[f];return _||h}}),d}n.languages.md=n.languages.markdown})(Prism);Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/});Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}});Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}});Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/});delete Prism.languages.c.boolean;(function(n){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var t=n.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(Prism);Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/});delete Prism.languages.objectivec["class-name"];Prism.languages.objc=Prism.languages.objectivec;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};(function(n){var e=n.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(n){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,t=0;t<2;t++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(Prism);Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/};Prism.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=Prism.languages.swift});(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var e=n.languages.extend("typescript",{});delete e["class-name"],n.languages.typescript["class-name"].inside=e,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),n.languages.ts=n.languages.typescript})(Prism);(function(n){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,t=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+t+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+t+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+t+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+t+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism);(function(n){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,t=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return t})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(Prism);function Mh(n,e){for(const t of n.childNodes){if(de(t)&&t.tagName===e)return!0;Mh(t,e)}return!1}const Ir="data-language",kr="data-highlight-language",Mi="data-theme";class hi extends We{constructor(t,r){super(r);m(this,"__language");m(this,"__theme");m(this,"__isSyntaxHighlightSupported");this.__language=t||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}static getType(){return"code"}static clone(t){return new hi(t.__language,t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__language=t.__language,this.__theme=t.__theme,this.__isSyntaxHighlightSupported=t.__isSyntaxHighlightSupported}createDOM(t){const r=document.createElement("code");xe(r,t.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(Ir,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(kr,i));const s=this.getTheme();s&&r.setAttribute(Mi,s);const o=this.getStyle();return o&&r.setAttribute("style",o),r}updateDOM(t,r,i){const s=this.__language,o=t.__language;s?s!==o&&r.setAttribute(Ir,s):o&&r.removeAttribute(Ir);const a=this.__isSyntaxHighlightSupported;t.__isSyntaxHighlightSupported&&o?a&&s?s!==o&&r.setAttribute(kr,s):r.removeAttribute(kr):a&&s&&r.setAttribute(kr,s);const l=this.__theme,u=t.__theme;l?l!==u&&r.setAttribute(Mi,l):u&&r.removeAttribute(Mi);const c=this.__style,d=t.__style;return c?c!==d&&r.setAttribute("style",c):d&&r.removeAttribute("style"),!1}exportDOM(t){const r=document.createElement("pre");xe(r,t._config.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(Ir,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(kr,i));const s=this.getTheme();s&&r.setAttribute(Mi,s);const o=this.getStyle();return o&&r.setAttribute("style",o),{element:r}}static importDOM(){return{code:t=>t.textContent!=null&&(/\r?\n/.test(t.textContent)||Mh(t,"BR"))?{conversion:sc,priority:1}:null,div:()=>({conversion:Oy,priority:1}),pre:()=>({conversion:sc,priority:0}),table:t=>mo(t)?{conversion:Ny,priority:3}:null,td:t=>{const r=t,i=r.closest("table");return r.classList.contains("js-file-line")||i&&mo(i)?{conversion:oc,priority:3}:null},tr:t=>{const r=t.closest("table");return r&&mo(r)?{conversion:oc,priority:3}:null}}}static importJSON(t){return fi().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setLanguage(t.language).setTheme(t.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(t,r=!0){const i=this.getChildren(),s=i.length;if(s>=2&&i[s-1].getTextContent()===`
56
- `&&i[s-2].getTextContent()===`
57
- `&&t.isCollapsed()&&t.anchor.key===this.__key&&t.anchor.offset===s){i[s-1].remove(),i[s-2].remove();const u=Ee();return this.insertAfter(u,r),u}const{anchor:o,focus:a}=t,l=(o.isBefore(a)?o:a).getNode();if(z(l)){let u=Fy(l);const c=[];for(;;)if(Cs(u))c.push(Ss()),u=u.getNextSibling();else{if(!Dh(u))break;{let x=0;const g=u.getTextContent(),v=u.getTextContentSize();for(;x<v&&g[x]===" ";)x++;if(x!==0&&c.push(Ih(" ".repeat(x))),x!==v)break;u=u.getNextSibling()}}const d=l.splitText(o.offset)[0],h=o.offset===0?0:1,f=d.getIndexWithinParent()+h,p=l.getParentOrThrow(),_=[On(),...c];p.splice(f,0,_);const y=c[c.length-1];y?y.select():o.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(Ty(l)){const{offset:u}=t.anchor;l.splice(u,0,[On()]),l.select(u+1,u+1)}return null}canIndent(){return!1}collapseAtStart(){const t=Ee();return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}setLanguage(t){const r=this.getWritable();return r.__language=t||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(t){const r=this.getWritable();return r.__isSyntaxHighlightSupported=t,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(t){const r=this.getWritable();return r.__theme=t||void 0,r}getTheme(){return this.getLatest().__theme}}function fi(n,e){return hh(hi).setLanguage(n).setTheme(e)}function Ty(n){return n instanceof hi}function sc(n){return{node:fi(n.getAttribute(Ir))}}function Oy(n){const e=n,t=ac(e);return t||function(r){let i=r.parentElement;for(;i!==null;){if(ac(i))return!0;i=i.parentElement}return!1}(e)?{node:t?fi():null}:{node:null}}function Ny(){return{node:fi()}}function oc(){return{node:null}}function ac(n){return n.style.fontFamily.match("monospace")!==null}function mo(n){return n.classList.contains("js-file-line-container")}class pi extends rn{constructor(t="",r,i){super(t,i);m(this,"__highlightType");this.__highlightType=r}static getType(){return"code-highlight"}static clone(t){return new pi(t.__text,t.__highlightType||void 0,t.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(t){const r=this.getWritable();return r.__highlightType=t||void 0,r}canHaveFormat(){return!1}createDOM(t){const r=super.createDOM(t),i=_o(t.theme,this.__highlightType);return xe(r,i),r}updateDOM(t,r,i){const s=super.updateDOM(t,r,i),o=_o(i.theme,t.__highlightType),a=_o(i.theme,this.__highlightType);return o!==a&&(o&&Xt(r,o),a&&xe(r,a)),s}static importJSON(t){return Ih().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setHighlightType(t.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(t){return this}isParentRequired(){return!0}createParentElementNode(){return fi()}}function _o(n,e){return e&&n&&n.codeHighlight&&n.codeHighlight[e]}function Ih(n="",e){return Ae(new pi(n,e))}function Dh(n){return n instanceof pi}function Ay(n,e){let t=n;for(let r=Le(n,e);r&&(Dh(r.origin)||Cs(r.origin));r=iy(r))t=r.origin;return t}function Fy(n){return Ay(n,"previous")}(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach(function(t){var r=e[t],i=[];/^\w+$/.test(t)||i.push(/\w+/.exec(t)[0]),t==="diff"&&i.push("bold"),n.languages.diff[t]={pattern:RegExp("^(?:["+r+`].*(?:\r
58
- ?|
59
- |(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(t)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:e})})(Prism);const My=new Set(["http:","https:","mailto:","sms:","tel:"]);class gi extends We{constructor(t="",r={},i){super(i);m(this,"__url");m(this,"__target");m(this,"__rel");m(this,"__title");const{target:s=null,rel:o=null,title:a=null}=r;this.__url=t,this.__target=s,this.__rel=o,this.__title=a}static getType(){return"link"}static clone(t){return new gi(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}createDOM(t){const r=document.createElement("a");return this.updateLinkDOM(null,r,t),xe(r,t.theme.link),r}updateLinkDOM(t,r,i){if(ch(r)){t&&t.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const s of["target","rel","title"]){const o=`__${s}`,a=this[o];t&&t[o]===a||(a?r[s]=a:r.removeAttribute(s))}}}updateDOM(t,r,i){return this.updateLinkDOM(t,r,i),!1}static importDOM(){return{a:t=>({conversion:Iy,priority:1})}}static importJSON(t){return ia().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setURL(t.url).setRel(t.rel||null).setTarget(t.target||null).setTitle(t.title||null)}sanitizeUrl(t){t=uc(t);try{const r=new URL(uc(t));if(!My.has(r.protocol))return"about:blank"}catch{return t}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(t){const r=this.getWritable();return r.__url=t,r}getTarget(){return this.getLatest().__target}setTarget(t){const r=this.getWritable();return r.__target=t,r}getRel(){return this.getLatest().__rel}setRel(t){const r=this.getWritable();return r.__rel=t,r}getTitle(){return this.getLatest().__title}setTitle(t){const r=this.getWritable();return r.__title=t,r}insertNewAfter(t,r=!0){const i=ia(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,r),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,r,i){if(!B(r))return!1;const s=r.anchor.getNode(),o=r.focus.getNode();return this.isParentOf(s)&&this.isParentOf(o)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}}function Iy(n){let e=null;if(ch(n)){const t=n.textContent;(t!==null&&t!==""||n.children.length>0)&&(e=ia(n.getAttribute("href")||"",{rel:n.getAttribute("rel"),target:n.getAttribute("target"),title:n.getAttribute("title")}))}return{node:e}}function ia(n="",e){return Ae(new gi(n,e))}class Ps extends gi{constructor(t="",r={},i){super(t,r,i);m(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(t){return new Ps(t.__url,{isUnlinked:t.__isUnlinked,rel:t.__rel,target:t.__target,title:t.__title},t.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(t){const r=this.getWritable();return r.__isUnlinked=t,r}createDOM(t){return this.__isUnlinked?document.createElement("span"):super.createDOM(t)}updateDOM(t,r,i){return super.updateDOM(t,r,i)||t.__isUnlinked!==this.__isUnlinked}static importJSON(t){return lc().updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(t,r=!0){const i=this.getParentOrThrow().insertNewAfter(t,r);if(N(i)){const s=lc(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return i.append(s),s}return null}}function lc(n="",e){return Ae(new Ps(n,e))}const Dy=/^\+?[0-9\s()-]{5,}$/;function uc(n){return n.match(/^[a-z][a-z0-9+.-]*:/i)||n.match(/^[/#.]/)?n:n.includes("@")?`mailto:${n}`:Dy.test(n)?`tel:${n}`:`https://${n}`}const Lh=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Ly=Lh&&"documentMode"in document?document.documentMode:null;!(!Lh||!("InputEvent"in window)||Ly)&&"getTargetRanges"in new window.InputEvent("input");class Rs extends We{static getType(){return"quote"}static clone(e){return new Rs(e.__key)}createDOM(e){const t=document.createElement("blockquote");return xe(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:Py,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(de(t)){this.isEmpty()&&t.append(document.createElement("br"));const r=this.getFormatType();r&&(t.style.textAlign=r);const i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){return Ph().updateFromJSON(e)}insertNewAfter(e,t){const r=Ee(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,t),r}collapseAtStart(){const e=Ee();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function Ph(){return Ae(new Rs)}class $s extends We{constructor(t,r){super(r);m(this,"__tag");this.__tag=t}static getType(){return"heading"}static clone(t){return new $s(t.__tag,t.__key)}getTag(){return this.__tag}setTag(t){const r=this.getWritable();return this.__tag=t,r}createDOM(t){const r=this.__tag,i=document.createElement(r),s=t.theme.heading;if(s!==void 0){const o=s[r];xe(i,o)}return i}updateDOM(t,r,i){return t.__tag!==this.__tag}static importDOM(){return{h1:t=>({conversion:jn,priority:0}),h2:t=>({conversion:jn,priority:0}),h3:t=>({conversion:jn,priority:0}),h4:t=>({conversion:jn,priority:0}),h5:t=>({conversion:jn,priority:0}),h6:t=>({conversion:jn,priority:0}),p:t=>{const r=t.firstChild;return r!==null&&cc(r)?{conversion:()=>({node:null}),priority:3}:null},span:t=>cc(t)?{conversion:r=>({node:Dr("h1")}),priority:3}:null}}exportDOM(t){const{element:r}=super.exportDOM(t);if(de(r)){this.isEmpty()&&r.append(document.createElement("br"));const i=this.getFormatType();i&&(r.style.textAlign=i);const s=this.getDirection();s&&(r.dir=s)}return{element:r}}static importJSON(t){return Dr(t.tag).updateFromJSON(t)}updateFromJSON(t){return super.updateFromJSON(t).setTag(t.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(t,r=!0){const i=t?t.anchor.offset:0,s=this.getLastDescendant(),o=!s||t&&t.anchor.key===s.getKey()&&i===s.getTextContentSize()||!t?Ee():Dr(this.getTag()),a=this.getDirection();if(o.setDirection(a),this.insertAfter(o,r),i===0&&!this.isEmpty()&&t){const l=Ee();l.select(),this.replace(l,!0)}return o}collapseAtStart(){const t=this.isEmpty()?Ee():Dr(this.getTag());return this.getChildren().forEach(r=>t.append(r)),this.replace(t),!0}extractWithChild(){return!0}}function cc(n){return n.nodeName.toLowerCase()==="span"&&n.style.fontSize==="26pt"}function jn(n){const e=n.nodeName.toLowerCase();let t=null;return e!=="h1"&&e!=="h2"&&e!=="h3"&&e!=="h4"&&e!=="h5"&&e!=="h6"||(t=Dr(e),n.style!==null&&(Va(n,t),t.setFormat(n.style.textAlign))),{node:t}}function Py(n){const e=Ph();return n.style!==null&&(e.setFormat(n.style.textAlign),Va(n,e)),{node:e}}function Dr(n="h1"){return Ae(new $s(n))}let Rh=class $h extends rn{static getType(){return"hashtag"}static clone(e){return new $h(e.__text,e.__key)}createDOM(e){const t=super.createDOM(e);return xe(t,e.theme.hashtag),t}static importJSON(e){return Ry().updateFromJSON(e)}canInsertTextBefore(){return!1}isTextEntity(){return!0}};function Ry(n=""){return Ae(new Rh(n))}const P={"yext-default-richtextv2-theme__ul1":"_yext-default-richtextv2-theme__ul1_13v3w_17","yext-default-richtextv2-theme__ul2":"_yext-default-richtextv2-theme__ul2_13v3w_25","yext-default-richtextv2-theme__ul3":"_yext-default-richtextv2-theme__ul3_13v3w_33","yext-default-richtextv2-theme__ltr":"_yext-default-richtextv2-theme__ltr_13v3w_55","yext-default-richtextv2-theme__rtl":"_yext-default-richtextv2-theme__rtl_13v3w_58","yext-default-richtextv2-theme__paragraph":"_yext-default-richtextv2-theme__paragraph_13v3w_61","yext-default-richtextv2-theme__quote":"_yext-default-richtextv2-theme__quote_13v3w_70","yext-default-richtextv2-theme__h1":"_yext-default-richtextv2-theme__h1_13v3w_81","yext-default-richtextv2-theme__h2":"_yext-default-richtextv2-theme__h2_13v3w_89","yext-default-richtextv2-theme__h3":"_yext-default-richtextv2-theme__h3_13v3w_97","yext-default-richtextv2-theme__h4":"_yext-default-richtextv2-theme__h4_13v3w_105","yext-default-richtextv2-theme__h5":"_yext-default-richtextv2-theme__h5_13v3w_113","yext-default-richtextv2-theme__h6":"_yext-default-richtextv2-theme__h6_13v3w_121","yext-default-richtextv2-theme__textBold":"_yext-default-richtextv2-theme__textBold_13v3w_130","yext-default-richtextv2-theme__textItalic":"_yext-default-richtextv2-theme__textItalic_13v3w_133","yext-default-richtextv2-theme__textUnderline":"_yext-default-richtextv2-theme__textUnderline_13v3w_136","yext-default-richtextv2-theme__textStrikethrough":"_yext-default-richtextv2-theme__textStrikethrough_13v3w_139","yext-default-richtextv2-theme__textUnderlineStrikethrough":"_yext-default-richtextv2-theme__textUnderlineStrikethrough_13v3w_142","yext-default-richtextv2-theme__textSubscript":"_yext-default-richtextv2-theme__textSubscript_13v3w_145","yext-default-richtextv2-theme__textSuperscript":"_yext-default-richtextv2-theme__textSuperscript_13v3w_149","yext-default-richtextv2-theme__textCode":"_yext-default-richtextv2-theme__textCode_13v3w_153","yext-default-richtextv2-theme__hashtag":"_yext-default-richtextv2-theme__hashtag_13v3w_159","yext-default-richtextv2-theme__link":"_yext-default-richtextv2-theme__link_13v3w_163","yext-default-richtextv2-theme__code":"_yext-default-richtextv2-theme__code_13v3w_171","yext-default-richtextv2-theme__table":"_yext-default-richtextv2-theme__table_13v3w_199","yext-default-richtextv2-theme__tableCell":"_yext-default-richtextv2-theme__tableCell_13v3w_208","yext-default-richtextv2-theme__tableCellHeader":"_yext-default-richtextv2-theme__tableCellHeader_13v3w_218","yext-default-richtextv2-theme__characterLimit":"_yext-default-richtextv2-theme__characterLimit_13v3w_222","yext-default-richtextv2-theme__ol1":"_yext-default-richtextv2-theme__ol1_13v3w_226","yext-default-richtextv2-theme__ol2":"_yext-default-richtextv2-theme__ol2_13v3w_233","yext-default-richtextv2-theme__ol3":"_yext-default-richtextv2-theme__ol3_13v3w_240","yext-default-richtextv2-theme__ol4":"_yext-default-richtextv2-theme__ol4_13v3w_247","yext-default-richtextv2-theme__ol5":"_yext-default-richtextv2-theme__ol5_13v3w_254","yext-default-richtextv2-theme__listItem":"_yext-default-richtextv2-theme__listItem_13v3w_267","yext-default-richtextv2-theme__listItemChecked":"_yext-default-richtextv2-theme__listItemChecked_13v3w_270","yext-default-richtextv2-theme__listItemUnchecked":"_yext-default-richtextv2-theme__listItemUnchecked_13v3w_271","yext-default-richtextv2-theme__nestedListItem":"_yext-default-richtextv2-theme__nestedListItem_13v3w_330","yext-default-richtextv2-theme__tokenComment":"_yext-default-richtextv2-theme__tokenComment_13v3w_337","yext-default-richtextv2-theme__tokenPunctuation":"_yext-default-richtextv2-theme__tokenPunctuation_13v3w_340","yext-default-richtextv2-theme__tokenProperty":"_yext-default-richtextv2-theme__tokenProperty_13v3w_343","yext-default-richtextv2-theme__tokenSelector":"_yext-default-richtextv2-theme__tokenSelector_13v3w_346","yext-default-richtextv2-theme__tokenOperator":"_yext-default-richtextv2-theme__tokenOperator_13v3w_349","yext-default-richtextv2-theme__tokenAttr":"_yext-default-richtextv2-theme__tokenAttr_13v3w_352","yext-default-richtextv2-theme__tokenVariable":"_yext-default-richtextv2-theme__tokenVariable_13v3w_355","yext-default-richtextv2-theme__tokenFunction":"_yext-default-richtextv2-theme__tokenFunction_13v3w_358","yext-default-richtextv2-theme__mark":"_yext-default-richtextv2-theme__mark_13v3w_361","yext-default-richtextv2-theme__markOverlap":"_yext-default-richtextv2-theme__markOverlap_13v3w_366","yext-default-richtextv2-theme__embedBlock":"_yext-default-richtextv2-theme__embedBlock_13v3w_378","yext-default-richtextv2-theme__embedBlockFocus":"_yext-default-richtextv2-theme__embedBlockFocus_13v3w_381","yext-default-richtextv2-theme__image":"_yext-default-richtextv2-theme__image_13v3w_385"},$y={characterLimit:P["yext-default-richtextv2-theme__characterLimit"],code:P["yext-default-richtextv2-theme__code"],codeHighlight:{atrule:P["yext-default-richtextv2-theme__tokenAttr"],attr:P["yext-default-richtextv2-theme__tokenAttr"],boolean:P["yext-default-richtextv2-theme__tokenProperty"],builtin:P["yext-default-richtextv2-theme__tokenSelector"],cdata:P["yext-default-richtextv2-theme__tokenComment"],char:P["yext-default-richtextv2-theme__tokenSelector"],class:P["yext-default-richtextv2-theme__tokenFunction"],"class-name":P["yext-default-richtextv2-theme__tokenFunction"],comment:P["yext-default-richtextv2-theme__tokenComment"],constant:P["yext-default-richtextv2-theme__tokenProperty"],deleted:P["yext-default-richtextv2-theme__tokenProperty"],doctype:P["yext-default-richtextv2-theme__tokenComment"],entity:P["yext-default-richtextv2-theme__tokenOperator"],function:P["yext-default-richtextv2-theme__tokenFunction"],important:P["yext-default-richtextv2-theme__tokenVariable"],inserted:P["yext-default-richtextv2-theme__tokenSelector"],keyword:P["yext-default-richtextv2-theme__tokenAttr"],namespace:P["yext-default-richtextv2-theme__tokenVariable"],number:P["yext-default-richtextv2-theme__tokenProperty"],operator:P["yext-default-richtextv2-theme__tokenOperator"],prolog:P["yext-default-richtextv2-theme__tokenComment"],property:P["yext-default-richtextv2-theme__tokenProperty"],punctuation:P["yext-default-richtextv2-theme__tokenPunctuation"],regex:P["yext-default-richtextv2-theme__tokenVariable"],selector:P["yext-default-richtextv2-theme__tokenSelector"],string:P["yext-default-richtextv2-theme__tokenSelector"],symbol:P["yext-default-richtextv2-theme__tokenProperty"],tag:P["yext-default-richtextv2-theme__tokenProperty"],url:P["yext-default-richtextv2-theme__tokenOperator"],variable:P["yext-default-richtextv2-theme__tokenVariable"]},embedBlock:{base:P["yext-default-richtextv2-theme__embedBlock"],focus:P["yext-default-richtextv2-theme__embedBlockFocus"]},hashtag:P["yext-default-richtextv2-theme__hashtag"],heading:{h1:P["yext-default-richtextv2-theme__h1"],h2:P["yext-default-richtextv2-theme__h2"],h3:P["yext-default-richtextv2-theme__h3"],h4:P["yext-default-richtextv2-theme__h4"],h5:P["yext-default-richtextv2-theme__h5"],h6:P["yext-default-richtextv2-theme__h6"]},image:P["yext-default-richtextv2-theme__image"],link:P["yext-default-richtextv2-theme__link"],list:{listitem:P["yext-default-richtextv2-theme__listItem"],listitemChecked:P["yext-default-richtextv2-theme__listItemChecked"],listitemUnchecked:P["yext-default-richtextv2-theme__listItemUnchecked"],nested:{listitem:P["yext-default-richtextv2-theme__nestedListItem"]},olDepth:[P["yext-default-richtextv2-theme__ol1"],P["yext-default-richtextv2-theme__ol2"],P["yext-default-richtextv2-theme__ol3"],P["yext-default-richtextv2-theme__ol4"],P["yext-default-richtextv2-theme__ol5"]],ulDepth:[P["yext-default-richtextv2-theme__ul1"],P["yext-default-richtextv2-theme__ul2"],P["yext-default-richtextv2-theme__ul3"]]},ltr:P["yext-default-richtextv2-theme__ltr"],mark:P["yext-default-richtextv2-theme__mark"],markOverlap:P["yext-default-richtextv2-theme__markOverlap"],paragraph:P["yext-default-richtextv2-theme__paragraph"],quote:P["yext-default-richtextv2-theme__quote"],rtl:P["yext-default-richtextv2-theme__rtl"],table:P["yext-default-richtextv2-theme__table"],tableCell:P["yext-default-richtextv2-theme__tableCell"],tableCellHeader:P["yext-default-richtextv2-theme__tableCellHeader"],text:{bold:P["yext-default-richtextv2-theme__textBold"],code:P["yext-default-richtextv2-theme__textCode"],italic:P["yext-default-richtextv2-theme__textItalic"],strikethrough:P["yext-default-richtextv2-theme__textStrikethrough"],subscript:P["yext-default-richtextv2-theme__textSubscript"],superscript:P["yext-default-richtextv2-theme__textSuperscript"],underline:P["yext-default-richtextv2-theme__textUnderline"],underlineStrikethrough:P["yext-default-richtextv2-theme__textUnderlineStrikethrough"]}};function Wy({src:n,altText:e,width:t,height:r,maxWidth:i}){const s=W.useMemo(()=>({height:r,width:t,maxWidth:i}),[r,t,i]);return M.jsx("img",{src:n,alt:e,style:s})}function zy({altText:n,height:e,maxWidth:t=500,src:r,width:i,key:s}){return Ae(new Ws(r,n,t,i,e,s))}class Ws extends Ts{constructor(t,r,i,s,o,a){super(a);m(this,"__src");m(this,"__altText");m(this,"__width");m(this,"__height");m(this,"__maxWidth");this.__src=t,this.__altText=r,this.__maxWidth=i,this.__width=s||"inherit",this.__height=o||"inherit"}static getType(){return"image"}static clone(t){return new Ws(t.__src,t.__altText,t.__maxWidth,t.__width,t.__height,t.__key)}getSrc(){return this.getLatest().__src}getAltText(){return this.getLatest().__altText}exportJSON(){return{altText:this.getAltText(),height:this.__height==="inherit"?0:this.__height,maxWidth:this.__maxWidth,src:this.getSrc(),type:"image",version:1,width:this.__width==="inherit"?0:this.__width}}static importJSON(t){return zy(t)}createDOM(t){const r=document.createElement("span"),i=t.theme.image;return i&&(r.className=i),r}exportDOM(t){const r=document.createElement("span"),i=t._config.theme.image;i&&(r.className=i);const s=document.createElement("img");return s.src=this.__src,this.__altText&&(s.alt=this.__altText),this.__width!=="inherit"&&this.__width&&(s.width=Number(this.__width)),this.__height!=="inherit"&&this.__height&&(s.height=Number(this.__height)),this.__maxWidth&&(s.style.maxWidth=`${this.__maxWidth}px`),s.loading="lazy",s.decoding="async",r.appendChild(s),{element:r}}updateDOM(){return!1}decorate(){return M.jsx(Wy,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth})}}function dc(n,e){return n.getEditorState().read(()=>{const t=Ce(e);return t!==null&&t.isSelected()})}function Hy(n){const[e]=Aa(),[t,r]=W.useState(()=>dc(e,n));return W.useEffect(()=>{let i=!0;const s=e.registerUpdateListener(()=>{i&&r(dc(e,n))});return()=>{i=!1,s()}},[e,n]),[t,W.useCallback(i=>{e.update(()=>{let s=Q();er(s)||(s=Ia(),nt(s)),er(s)&&(i?s.add(n):s.delete(n))})},[e,n]),W.useCallback(()=>{e.update(()=>{const i=Q();er(i)&&i.clear()})},[e])]}function By({nodeKey:n}){const[e]=Aa(),[t,r,i]=Hy(n);return W.useEffect(()=>ry(e.registerCommand(Cd,s=>{const o=e.getElementByKey(n);return s.target===o&&(s.shiftKey||i(),r(!t),!0)},w_)),[i,e,t,n,r]),W.useEffect(()=>{const s=e.getElementByKey(n),o=e._config.theme.hrSelected??"selected";s!==null&&(t?xe(s,o):Xt(s,o))},[e,t,n]),null}class zs extends Ds{static getType(){return"horizontalrule"}static clone(e){return new zs(e.__key)}static importJSON(e){return Wh().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:Uy,priority:0})}}decorate(){return M.jsx(By,{nodeKey:this.__key})}}function Uy(){return{node:Wh()}}function Wh(){return Ae(new zs)}class hs extends ci{static getType(){return"tablecell"}static clone(e){const t=new hs(e.__headerState,e.__colSpan,e.__width,e.__key);return t.__rowSpan=e.__rowSpan,t.__backgroundColor=e.__backgroundColor,t}static importJSON(e){const t=e.colSpan||1,r=e.rowSpan||1,i=Ae(new hs(e.headerState,t,e.width||void 0));return i.__rowSpan=r,i.__backgroundColor=e.backgroundColor||null,i}exportJSON(){return super.exportJSON()}exportDOM(e){const t=super.exportDOM(e);if(t.element){const r=t.element;return r.removeAttribute("style"),r.style.width=this.getWidth()?`${this.getWidth()}px`:"",{...t,element:r}}return t}}function jy(n,e){return{namespace:"",editable:!1,onError:t=>{throw t},editorState:n,theme:e??$y,nodes:[$s,Rh,Ws,rl,nl,Rs,hi,pi,Ls,hs,di,Ps,gi,zs]}}const yo={"editor-inner":"_editor-inner_1mmqo_6","no-border":"_no-border_1mmqo_10"};function Vy({serializedAST:n,nodeClassNames:e}){const[t,r]=W.useState("");return M.jsx(M.Fragment,{children:M.jsxs(Q_,{initialConfig:jy(n,e),children:[M.jsx(Zy,{onHTML:r}),M.jsx("div",{className:`${yo["editor-inner"]} ${yo["no-border"]}`,children:M.jsx("div",{className:yo["editor-inner"],children:M.jsx("div",{dangerouslySetInnerHTML:{__html:t}})})})]})})}function Zy({onHTML:n}){const[e]=Aa();return W.useEffect(()=>{e.update(()=>{const t=dy(e);n(t)})},[e,n]),null}function il(n,e,t,r){const i=n.length;let s=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(e,t),[].splice.apply(n,o);else for(t&&[].splice.apply(n,[e,t]);s<r.length;)o=r.slice(s,s+1e4),o.unshift(e,0),[].splice.apply(n,o),s+=1e4,e+=1e4}function Tr(n,e){return n.length>0?(il(n,n.length,0,e),n):e}const hc={}.hasOwnProperty;function Ky(n){const e={};let t=-1;for(;++t<n.length;)Gy(e,n[t]);return e}function Gy(n,e){let t;for(t in e){const i=(hc.call(n,t)?n[t]:void 0)||(n[t]={}),s=e[t];let o;for(o in s){hc.call(i,o)||(i[o]=[]);const a=s[o];qy(i[o],Array.isArray(a)?a:a?[a]:[])}}}function qy(n,e){let t=-1;const r=[];for(;++t<e.length;)(e[t].add==="after"?n:r).push(e[t]);il(n,0,0,r)}const Ht={plusSign:43,caret:94,tilde:126},Yy=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\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]/;function Jy(n){return n!==null&&(n<0||n===32)}const Xy=zh(Yy),Qy=zh(/\s/);function zh(n){return e;function e(t){return t!==null&&n.test(String.fromCharCode(t))}}function fs(n){if(n===null||Jy(n)||Qy(n))return 1;if(Xy(n))return 2}const ps={characterGroupPunctuation:2};function ev(n,e){const t=this.previous,r=fs(t);return i;function i(o){if(o!==Ht.tilde)throw new Error("expected code to be `~` but got: "+o);return n.enter("tildeSequenceTemporary"),s(o)}function s(o){if(o===Ht.tilde)return n.consume(o),s;const a=n.exit("tildeSequenceTemporary"),l=fs(o);return a._open=!l||l===ps.characterGroupPunctuation&&!!r,a._close=!r||r===ps.characterGroupPunctuation&&!!l,e(o)}}function tv(n,e,t){const r=[];let i=-1;for(;++i<n.length;){const s=n[i].resolveAll;s&&!r.includes(s)&&(e=s(e,t),r.push(s))}return e}const nv={data:"data"};function sl(n,e){return!!(n[0]==="enter"&&n[1].type===`${e}SequenceTemporary`&&n[1]._close)}function ol(n,e){return!!(n[0]==="exit"&&n[1].type===`${e}SequenceTemporary`&&n[1]._open)}function al(n,e,t,r,i,s){const[o,a,l,u]=rv(n[e],n[t],i,s);n[e][1].end=Object.assign({},o.start),n[t][1].start=Object.assign({},a.end);let c=[];n[e][1].end.offset-n[e][1].start.offset&&(c=Tr(c,[["enter",n[e][1],r],["exit",n[e][1],r]])),c=Tr(c,[["enter",u,r],["enter",o,r],["exit",o,r],["enter",l,r]]),c=Tr(c,tv(r.parser.constructs.insideSpan.null,n.slice(e+1,t),r)),c=Tr(c,[["exit",l,r],["enter",a,r],["exit",a,r],["exit",u,r]]);let d=0;return n[t][1].end.offset-n[t][1].start.offset&&(d=2,c=Tr(c,[["enter",n[t][1],r],["exit",n[t][1],r]])),il(n,e-1,t-e+3,c),e+c.length-d-2}function rv(n,e,t,r){const i=Object.assign({},n[1].end),s=Object.assign({},e[1].start);fc(i,-r),fc(s,r);const o={type:`${t}Sequence`,start:i,end:Object.assign({},n[1].end)},a={type:`${t}Sequence`,start:Object.assign({},e[1].start),end:s},l={type:`${t}Text`,start:Object.assign({},n[1].end),end:Object.assign({},e[1].start)},u={type:`${t}`,start:Object.assign({},o.start),end:Object.assign({},a.end)};return[o,a,l,u]}function fc(n,e){n.column+=e,n.offset+=e,n._bufferIndex+=e}function ll(n,e){n.forEach(t=>{t[1].type===`${e}SequenceTemporary`&&(t[1].type=nv.data)})}function iv(n,e){let t=-1;for(;++t<n.length;)if(sl(n[t],"tilde")){let r=t;for(;r--;)if(ol(n[r],"tilde")){const i=sv(n[r],n[t]);t=al(n,r,t,e,i===1?"subscript":"strikethrough",i);break}}return ll(n,"tilde"),n}function sv(n,e){const t=n[1].end.offset-n[1].start.offset,r=e[1].end.offset-e[1].start.offset;return t<3||r<3?r<t?r:t:r%2===0?2:1}function ov(){const n={tokenize:ev,resolveAll:iv};return{text:{[Ht.tilde]:n},insideSpan:{null:[n]}}}function av(n,e){let t=-1;for(;++t<n.length;)if(sl(n[t],"superscript")){let r=t;for(;r--;)if(ol(n[r],"superscript")){t=al(n,r,t,e,"superscript",1);break}}return ll(n,"superscript"),n}function lv(n,e){return t;function t(i){if(i!==Ht.caret)throw new Error("expected code to be `^` but got: "+i);return n.enter("superscriptSequenceTemporary"),r(i)}function r(i){if(i===Ht.caret)return n.consume(i),r;const s=n.exit("superscriptSequenceTemporary");return s._open=!0,s._close=!0,e(i)}}function uv(){const n={tokenize:lv,resolveAll:av};return{text:{[Ht.caret]:n},insideSpan:{null:[n]}}}function cv(n,e,t){const r=this.previous,i=fs(r);let s=0;return o;function o(l){if(l!==Ht.plusSign)throw new Error("expected code to be `+` but got: "+l);return n.enter("underlineSequenceTemporary"),a(l)}function a(l){if(l===Ht.plusSign)return n.consume(l),s++,a;if(s<2)return t(l);const u=n.exit("underlineSequenceTemporary"),c=fs(l);return u._open=!c||c===ps.characterGroupPunctuation&&!!i,u._close=!i||i===ps.characterGroupPunctuation&&!!c,e(l)}}function dv(n,e){let t=-1;for(;++t<n.length;)if(sl(n[t],"underline")&&n[t][1].end.offset-n[t][1].start.offset>1){let r=t;for(;r--;)if(ol(n[r],"underline")&&n[r][1].end.offset-n[r][1].start.offset>1){t=al(n,r,t,e,"underline",2);break}}return ll(n,"underline"),n}function hv(){const n={tokenize:cv,resolveAll:dv};return{text:{[Ht.plusSign]:n},insideSpan:{null:[n]}}}function fv(){return Ky([hv(),uv(),ov()])}const pv={canContainEols:["strikethrough"],enter:{strikethrough:gv},exit:{strikethrough:mv}};function gv(n){this.enter({type:"strikethrough",children:[]},n)}function mv(n){this.exit(n)}const _v={canContainEols:["subscript"],enter:{subscript:yv},exit:{subscript:vv}};function yv(n){this.enter({type:"subscript",children:[]},n)}function vv(n){this.exit(n)}const wv={canContainEols:["superscript"],enter:{superscript:xv},exit:{superscript:bv}};function xv(n){this.enter({type:"superscript",children:[]},n)}function bv(n){this.exit(n)}const Sv={canContainEols:["underline"],enter:{underline:Cv},exit:{underline:Ev}};function Cv(n){this.enter({type:"underline",children:[]},n)}function Ev(n){this.exit(n)}function kv(){return[Sv,pv,_v,wv]}function Tv(){const n=this.data();e("micromarkExtensions",fv()),e("fromMarkdownExtensions",kv());function e(t,r){const i=n[t];if(i){if(!Array.isArray(i))throw new Error(`Expected data.${t} to be an array but got: ${typeof i} - ${JSON.stringify(i)}`);i.push(r)}else n[t]=[r]}}const sa={}.hasOwnProperty;function Ov(n,e,t){const r=e&&e.type;if(!r)throw new Error("Expected node, got `"+e+"`");return sa.call(n.handlers,r)?n.handlers[r](n,e,t):n.passThrough&&n.passThrough.includes(r)?"children"in e?{...e,children:an(n,e)}:e:n.unknownHandler?n.unknownHandler(n,e,t):Nv(n,e)}function an(n,e){const t=[];if("children"in e){const r=e.children;let i=-1;for(;++i<r.length;){const s=Ov(n,r[i],e);if(s){if(i&&r[i-1].type==="break"&&(!Array.isArray(s)&&s.type==="text"&&(s.value=s.value.replace(/^\s+/,"")),!Array.isArray(s)&&s.type==="element")){const o=s.children[0];o&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,""))}Array.isArray(s)?t.push(...s):t.push(s)}}}return t}function Nv(n,e){const t=e.data||{},r="value"in e&&!(sa.call(t,"hProperties")||sa.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:an(n,e)};return n.patch(e,r),n.applyData(e,r)}const Av=(n,e)=>n(e,"i",an(n,e)),Fv=(n,e)=>n(e,"b",an(n,e)),Mv=(n,e)=>n(e,"u",an(n,e)),Iv=(n,e)=>n(e,"s",an(n,e)),Dv=(n,e)=>n(e,"sub",an(n,e)),Lv=(n,e)=>n(e,"sup",an(n,e)),Pv={emphasis:Av,strong:Fv,underline:Mv,strikethrough:Iv,subscript:Dv,superscript:Lv},Rv=n=>{const[e,t]=W.useState();let r;return W.useEffect(()=>{(async()=>{if(!r)try{r=(await Promise.resolve().then(()=>require("./index-O3Mt_gby.cjs"))).default}catch{throw new Error("Failed to import React Markdown, cannot properly render LegacyRichText.")}const s=r({children:n.markdown,remarkPlugins:[Tv],remarkRehypeOptions:{handlers:Pv}});t(s)})()},[n.markdown]),e||null};class Wn extends Error{}class $v extends Wn{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Wv extends Wn{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class zv extends Wn{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Xn extends Wn{}class Hh extends Wn{constructor(e){super(`Invalid unit ${e}`)}}class Pe extends Wn{}class Zt extends Wn{constructor(){super("Zone is an abstract class")}}const I="numeric",vt="short",et="long",gs={year:I,month:I,day:I},Bh={year:I,month:vt,day:I},Hv={year:I,month:vt,day:I,weekday:vt},Uh={year:I,month:et,day:I},jh={year:I,month:et,day:I,weekday:et},Vh={hour:I,minute:I},Zh={hour:I,minute:I,second:I},Kh={hour:I,minute:I,second:I,timeZoneName:vt},Gh={hour:I,minute:I,second:I,timeZoneName:et},qh={hour:I,minute:I,hourCycle:"h23"},Yh={hour:I,minute:I,second:I,hourCycle:"h23"},Jh={hour:I,minute:I,second:I,hourCycle:"h23",timeZoneName:vt},Xh={hour:I,minute:I,second:I,hourCycle:"h23",timeZoneName:et},Qh={year:I,month:I,day:I,hour:I,minute:I},ef={year:I,month:I,day:I,hour:I,minute:I,second:I},tf={year:I,month:vt,day:I,hour:I,minute:I},nf={year:I,month:vt,day:I,hour:I,minute:I,second:I},Bv={year:I,month:vt,day:I,weekday:vt,hour:I,minute:I},rf={year:I,month:et,day:I,hour:I,minute:I,timeZoneName:vt},sf={year:I,month:et,day:I,hour:I,minute:I,second:I,timeZoneName:vt},of={year:I,month:et,day:I,weekday:et,hour:I,minute:I,timeZoneName:et},af={year:I,month:et,day:I,weekday:et,hour:I,minute:I,second:I,timeZoneName:et};class mi{get type(){throw new Zt}get name(){throw new Zt}get ianaName(){return this.name}get isUniversal(){throw new Zt}offsetName(e,t){throw new Zt}formatOffset(e,t){throw new Zt}offset(e){throw new Zt}equals(e){throw new Zt}get isValid(){throw new Zt}}let vo=null;class Hs extends mi{static get instance(){return vo===null&&(vo=new Hs),vo}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return yf(e,t,r)}formatOffset(e,t){return Zr(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const oa=new Map;function Uv(n){let e=oa.get(n);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),oa.set(n,e)),e}const jv={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Vv(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,s,o,a,l,u,c]=r;return[o,i,s,a,l,u,c]}function Zv(n,e){const t=n.formatToParts(e),r=[];for(let i=0;i<t.length;i++){const{type:s,value:o}=t[i],a=jv[s];s==="era"?r[a]=o:U(a)||(r[a]=parseInt(o,10))}return r}const wo=new Map;class Bt extends mi{static create(e){let t=wo.get(e);return t===void 0&&wo.set(e,t=new Bt(e)),t}static resetCache(){wo.clear(),oa.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=Bt.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return yf(e,t,r,this.name)}formatOffset(e,t){return Zr(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const r=Uv(this.name);let[i,s,o,a,l,u,c]=r.formatToParts?Zv(r,t):Vv(r,t);a==="BC"&&(i=-Math.abs(i)+1);const h=Us({year:i,month:s,day:o,hour:l===24?0:l,minute:u,second:c,millisecond:0});let f=+t;const p=f%1e3;return f-=p>=0?p:1e3+p,(h-f)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let pc={};function Kv(n,e={}){const t=JSON.stringify([n,e]);let r=pc[t];return r||(r=new Intl.ListFormat(n,e),pc[t]=r),r}const aa=new Map;function la(n,e={}){const t=JSON.stringify([n,e]);let r=aa.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(n,e),aa.set(t,r)),r}const ua=new Map;function Gv(n,e={}){const t=JSON.stringify([n,e]);let r=ua.get(t);return r===void 0&&(r=new Intl.NumberFormat(n,e),ua.set(t,r)),r}const ca=new Map;function qv(n,e={}){const{base:t,...r}=e,i=JSON.stringify([n,r]);let s=ca.get(i);return s===void 0&&(s=new Intl.RelativeTimeFormat(n,e),ca.set(i,s)),s}let Lr=null;function Yv(){return Lr||(Lr=new Intl.DateTimeFormat().resolvedOptions().locale,Lr)}const da=new Map;function lf(n){let e=da.get(n);return e===void 0&&(e=new Intl.DateTimeFormat(n).resolvedOptions(),da.set(n,e)),e}const ha=new Map;function Jv(n){let e=ha.get(n);if(!e){const t=new Intl.Locale(n);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...uf,...e}),ha.set(n,e)}return e}function Xv(n){const e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));const t=n.indexOf("-u-");if(t===-1)return[n];{let r,i;try{r=la(n).resolvedOptions(),i=n}catch{const l=n.substring(0,t);r=la(l).resolvedOptions(),i=l}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function Qv(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function ew(n){const e=[];for(let t=1;t<=12;t++){const r=H.utc(2009,t,1);e.push(n(r))}return e}function tw(n){const e=[];for(let t=1;t<=7;t++){const r=H.utc(2016,11,13+t);e.push(n(r))}return e}function Ii(n,e,t,r){const i=n.listingMode();return i==="error"?null:i==="en"?t(e):r(e)}function nw(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||lf(n.locale).numberingSystem==="latn"}class rw{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:s,...o}=r;if(!t||Object.keys(o).length>0){const a={useGrouping:!1,...r};r.padTo>0&&(a.minimumIntegerDigits=r.padTo),this.inf=Gv(e,a)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):fl(e,3);return we(t,this.padTo)}}}class iw{constructor(e,t,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Bt.create(a).valid?(i=a,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=la(t,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:r}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class sw{constructor(e,t,r){this.opts={style:"long",...r},!t&&mf()&&(this.rtf=qv(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):Tw(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const uf={firstDay:1,minimalDays:4,weekend:[6,7]};class ie{static fromOpts(e){return ie.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,r,i,s=!1){const o=e||pe.defaultLocale,a=o||(s?"en-US":Yv()),l=t||pe.defaultNumberingSystem,u=r||pe.defaultOutputCalendar,c=pa(i)||pe.defaultWeekSettings;return new ie(a,l,u,c,o)}static resetCache(){Lr=null,aa.clear(),ua.clear(),ca.clear(),da.clear(),ha.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:r,weekSettings:i}={}){return ie.create(e,t,r,i)}constructor(e,t,r,i,s){const[o,a,l]=Xv(e);this.locale=o,this.numberingSystem=t||a||null,this.outputCalendar=r||l||null,this.weekSettings=i,this.intl=Qv(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=nw(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ie.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,pa(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Ii(this,e,xf,()=>{const r=this.intl==="ja"||this.intl.startsWith("ja-");t&=!r;const i=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";if(!this.monthsCache[s][e]){const o=r?a=>this.dtFormatter(a,i).format():a=>this.extract(a,i,"month");this.monthsCache[s][e]=ew(o)}return this.monthsCache[s][e]})}weekdays(e,t=!1){return Ii(this,e,Cf,()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=tw(s=>this.extract(s,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Ii(this,void 0,()=>Ef,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[H.utc(2016,11,13,9),H.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Ii(this,e,kf,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[H.utc(-40,1,1),H.utc(2017,1,1)].map(r=>this.extract(r,t,"era"))),this.eraCache[e]})}extract(e,t,r){const i=this.dtFormatter(e,t),s=i.formatToParts(),o=s.find(a=>a.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new rw(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new iw(e,this.intl,t)}relFormatter(e={}){return new sw(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Kv(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||lf(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:_f()?Jv(this.locale):uf}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let xo=null;class Ue extends mi{static get utcInstance(){return xo===null&&(xo=new Ue(0)),xo}static instance(e){return e===0?Ue.utcInstance:new Ue(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Ue(js(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Zr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Zr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Zr(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class ow extends mi{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function qt(n,e){if(U(n)||n===null)return e;if(n instanceof mi)return n;if(hw(n)){const t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Hs.instance:t==="utc"||t==="gmt"?Ue.utcInstance:Ue.parseSpecifier(t)||Bt.create(n)}else return Qt(n)?Ue.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new ow(n)}const ul={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},gc={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},aw=ul.hanidec.replace(/[\[|\]]/g,"").split("");function lw(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t<n.length;t++){const r=n.charCodeAt(t);if(n[t].search(ul.hanidec)!==-1)e+=aw.indexOf(n[t]);else for(const i in gc){const[s,o]=gc[i];r>=s&&r<=o&&(e+=r-s)}}return parseInt(e,10)}else return e}const fa=new Map;function uw(){fa.clear()}function ft({numberingSystem:n},e=""){const t=n||"latn";let r=fa.get(t);r===void 0&&(r=new Map,fa.set(t,r));let i=r.get(e);return i===void 0&&(i=new RegExp(`${ul[t]}${e}`),r.set(e,i)),i}let mc=()=>Date.now(),_c="system",yc=null,vc=null,wc=null,xc=60,bc,Sc=null;class pe{static get now(){return mc}static set now(e){mc=e}static set defaultZone(e){_c=e}static get defaultZone(){return qt(_c,Hs.instance)}static get defaultLocale(){return yc}static set defaultLocale(e){yc=e}static get defaultNumberingSystem(){return vc}static set defaultNumberingSystem(e){vc=e}static get defaultOutputCalendar(){return wc}static set defaultOutputCalendar(e){wc=e}static get defaultWeekSettings(){return Sc}static set defaultWeekSettings(e){Sc=pa(e)}static get twoDigitCutoffYear(){return xc}static set twoDigitCutoffYear(e){xc=e%100}static get throwOnInvalid(){return bc}static set throwOnInvalid(e){bc=e}static resetCaches(){ie.resetCache(),Bt.resetCache(),H.resetCache(),uw()}}class mt{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const cf=[0,31,59,90,120,151,181,212,243,273,304,334],df=[0,31,60,91,121,152,182,213,244,274,305,335];function at(n,e){return new mt("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function cl(n,e,t){const r=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function hf(n,e,t){return t+(_i(n)?df:cf)[e-1]}function ff(n,e){const t=_i(n)?df:cf,r=t.findIndex(s=>s<e),i=e-t[r];return{month:r+1,day:i}}function dl(n,e){return(n-e+7)%7+1}function ms(n,e=4,t=1){const{year:r,month:i,day:s}=n,o=hf(r,i,s),a=dl(cl(r,i,s),t);let l=Math.floor((o-a+14-e)/7),u;return l<1?(u=r-1,l=ei(u,e,t)):l>ei(r,e,t)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:a,...Vs(n)}}function Cc(n,e=4,t=1){const{weekYear:r,weekNumber:i,weekday:s}=n,o=dl(cl(r,1,e),t),a=ir(r);let l=i*7+s-o-7+e,u;l<1?(u=r-1,l+=ir(u)):l>a?(u=r+1,l-=ir(r)):u=r;const{month:c,day:d}=ff(u,l);return{year:u,month:c,day:d,...Vs(n)}}function bo(n){const{year:e,month:t,day:r}=n,i=hf(e,t,r);return{year:e,ordinal:i,...Vs(n)}}function Ec(n){const{year:e,ordinal:t}=n,{month:r,day:i}=ff(e,t);return{year:e,month:r,day:i,...Vs(n)}}function kc(n,e){if(!U(n.localWeekday)||!U(n.localWeekNumber)||!U(n.localWeekYear)){if(!U(n.weekday)||!U(n.weekNumber)||!U(n.weekYear))throw new Xn("Cannot mix locale-based week fields with ISO-based week fields");return U(n.localWeekday)||(n.weekday=n.localWeekday),U(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),U(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function cw(n,e=4,t=1){const r=Bs(n.weekYear),i=lt(n.weekNumber,1,ei(n.weekYear,e,t)),s=lt(n.weekday,1,7);return r?i?s?!1:at("weekday",n.weekday):at("week",n.weekNumber):at("weekYear",n.weekYear)}function dw(n){const e=Bs(n.year),t=lt(n.ordinal,1,ir(n.year));return e?t?!1:at("ordinal",n.ordinal):at("year",n.year)}function pf(n){const e=Bs(n.year),t=lt(n.month,1,12),r=lt(n.day,1,_s(n.year,n.month));return e?t?r?!1:at("day",n.day):at("month",n.month):at("year",n.year)}function gf(n){const{hour:e,minute:t,second:r,millisecond:i}=n,s=lt(e,0,23)||e===24&&t===0&&r===0&&i===0,o=lt(t,0,59),a=lt(r,0,59),l=lt(i,0,999);return s?o?a?l?!1:at("millisecond",i):at("second",r):at("minute",t):at("hour",e)}function U(n){return typeof n>"u"}function Qt(n){return typeof n=="number"}function Bs(n){return typeof n=="number"&&n%1===0}function hw(n){return typeof n=="string"}function fw(n){return Object.prototype.toString.call(n)==="[object Date]"}function mf(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function _f(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function pw(n){return Array.isArray(n)?n:[n]}function Tc(n,e,t){if(n.length!==0)return n.reduce((r,i)=>{const s=[e(i),i];return r&&t(r[0],s[0])===r[0]?r:s},null)[1]}function gw(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function cr(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function pa(n){if(n==null)return null;if(typeof n!="object")throw new Pe("Week settings must be an object");if(!lt(n.firstDay,1,7)||!lt(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(e=>!lt(e,1,7)))throw new Pe("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function lt(n,e,t){return Bs(n)&&n>=e&&n<=t}function mw(n,e){return n-e*Math.floor(n/e)}function we(n,e=2){const t=n<0;let r;return t?r="-"+(""+-n).padStart(e,"0"):r=(""+n).padStart(e,"0"),r}function Kt(n){if(!(U(n)||n===null||n===""))return parseInt(n,10)}function cn(n){if(!(U(n)||n===null||n===""))return parseFloat(n)}function hl(n){if(!(U(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function fl(n,e,t="round"){const r=10**e;switch(t){case"expand":return n>0?Math.ceil(n*r)/r:Math.floor(n*r)/r;case"trunc":return Math.trunc(n*r)/r;case"round":return Math.round(n*r)/r;case"floor":return Math.floor(n*r)/r;case"ceil":return Math.ceil(n*r)/r;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function _i(n){return n%4===0&&(n%100!==0||n%400===0)}function ir(n){return _i(n)?366:365}function _s(n,e){const t=mw(e-1,12)+1,r=n+(e-t)/12;return t===2?_i(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Us(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(n.year,n.month-1,n.day)),+e}function Oc(n,e,t){return-dl(cl(n,1,e),t)+e-1}function ei(n,e=4,t=1){const r=Oc(n,e,t),i=Oc(n+1,e,t);return(ir(n)-r+i)/7}function ga(n){return n>99?n:n>pe.twoDigitCutoffYear?1900+n:2e3+n}function yf(n,e,t,r=null){const i=new Date(n),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const o={timeZoneName:e,...s},a=new Intl.DateTimeFormat(t,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function js(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const r=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-r:r;return t*60+i}function vf(n){const e=Number(n);if(typeof n=="boolean"||n===""||!Number.isFinite(e))throw new Pe(`Invalid unit value ${n}`);return e}function ys(n,e){const t={};for(const r in n)if(cr(n,r)){const i=n[r];if(i==null)continue;t[e(r)]=vf(i)}return t}function Zr(n,e){const t=Math.trunc(Math.abs(n/60)),r=Math.trunc(Math.abs(n%60)),i=n>=0?"+":"-";switch(e){case"short":return`${i}${we(t,2)}:${we(r,2)}`;case"narrow":return`${i}${t}${r>0?`:${r}`:""}`;case"techie":return`${i}${we(t,2)}${we(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Vs(n){return gw(n,["hour","minute","second","millisecond"])}const _w=["January","February","March","April","May","June","July","August","September","October","November","December"],wf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yw=["J","F","M","A","M","J","J","A","S","O","N","D"];function xf(n){switch(n){case"narrow":return[...yw];case"short":return[...wf];case"long":return[..._w];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const bf=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Sf=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],vw=["M","T","W","T","F","S","S"];function Cf(n){switch(n){case"narrow":return[...vw];case"short":return[...Sf];case"long":return[...bf];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Ef=["AM","PM"],ww=["Before Christ","Anno Domini"],xw=["BC","AD"],bw=["B","A"];function kf(n){switch(n){case"narrow":return[...bw];case"short":return[...xw];case"long":return[...ww];default:return null}}function Sw(n){return Ef[n.hour<12?0:1]}function Cw(n,e){return Cf(e)[n.weekday-1]}function Ew(n,e){return xf(e)[n.month-1]}function kw(n,e){return kf(e)[n.year<0?0:1]}function Tw(n,e,t="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&s){const d=n==="days";switch(e){case 1:return d?"tomorrow":`next ${i[n][0]}`;case-1:return d?"yesterday":`last ${i[n][0]}`;case 0:return d?"today":`this ${i[n][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,u=i[n],c=r?l?u[1]:u[2]||u[1]:l?i[n][0]:n;return o?`${a} ${c} ago`:`in ${a} ${c}`}function Nc(n,e){let t="";for(const r of n)r.literal?t+=r.val:t+=e(r.val);return t}const Ow={D:gs,DD:Bh,DDD:Uh,DDDD:jh,t:Vh,tt:Zh,ttt:Kh,tttt:Gh,T:qh,TT:Yh,TTT:Jh,TTTT:Xh,f:Qh,ff:tf,fff:rf,ffff:of,F:ef,FF:nf,FFF:sf,FFFF:af};class Re{static create(e,t={}){return new Re(e,t)}static parseFormat(e){let t=null,r="",i=!1;const s=[];for(let o=0;o<e.length;o++){const a=e.charAt(o);a==="'"?((r.length>0||i)&&s.push({literal:i||/^\s+$/.test(r),val:r===""?"'":r}),t=null,r="",i=!i):i||a===t?r+=a:(r.length>0&&s.push({literal:/^\s+$/.test(r),val:r}),r=a,t=a)}return r.length>0&&s.push({literal:i||/^\s+$/.test(r),val:r}),s}static macroTokenToFormatOpts(e){return Ow[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,r=void 0){if(this.opts.forceSimple)return we(e,t);const i={...this.opts};return t>0&&(i.padTo=t),r&&(i.signDisplay=r),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(f,p)=>this.loc.extract(e,f,p),o=f=>e.isOffsetFixed&&e.offset===0&&f.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,f.format):"",a=()=>r?Sw(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(f,p)=>r?Ew(e,f):s(p?{month:f}:{month:f,day:"numeric"},"month"),u=(f,p)=>r?Cw(e,f):s(p?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),c=f=>{const p=Re.macroTokenToFormatOpts(f);return p?this.formatWithSystemDefault(e,p):f},d=f=>r?kw(e,f):s({era:f},"era"),h=f=>{switch(f){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(f)}};return Nc(Re.parseFormat(t),h)}formatDurationFromString(e,t){const r=this.opts.signMode==="negativeLargestOnly"?-1:1,i=c=>{switch(c[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=(c,d)=>h=>{const f=i(h);if(f){const p=d.isNegativeDuration&&f!==d.largestUnit?r:1;let _;return this.opts.signMode==="negativeLargestOnly"&&f!==d.largestUnit?_="never":this.opts.signMode==="all"?_="always":_="auto",this.num(c.get(f)*p,h.length,_)}else return h},o=Re.parseFormat(t),a=o.reduce((c,{literal:d,val:h})=>d?c:c.concat(h),[]),l=e.shiftTo(...a.map(i).filter(c=>c)),u={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return Nc(o,s(l,u))}}const Tf=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function gr(...n){const e=n.reduce((t,r)=>t+r.source,"");return RegExp(`^${e}$`)}function mr(...n){return e=>n.reduce(([t,r,i],s)=>{const[o,a,l]=s(e,i);return[{...t,...o},a||r,l]},[{},null,1]).slice(0,2)}function _r(n,...e){if(n==null)return[null,null];for(const[t,r]of e){const i=t.exec(n);if(i)return r(i)}return[null,null]}function Of(...n){return(e,t)=>{const r={};let i;for(i=0;i<n.length;i++)r[n[i]]=Kt(e[t+i]);return[r,null,t+i]}}const Nf=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Nw=`(?:${Nf.source}?(?:\\[(${Tf.source})\\])?)?`,pl=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Af=RegExp(`${pl.source}${Nw}`),gl=RegExp(`(?:[Tt]${Af.source})?`),Aw=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Fw=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Mw=/(\d{4})-?(\d{3})/,Iw=Of("weekYear","weekNumber","weekDay"),Dw=Of("year","ordinal"),Lw=/(\d{4})-(\d\d)-(\d\d)/,Ff=RegExp(`${pl.source} ?(?:${Nf.source}|(${Tf.source}))?`),Pw=RegExp(`(?: ${Ff.source})?`);function sr(n,e,t){const r=n[e];return U(r)?t:Kt(r)}function Rw(n,e){return[{year:sr(n,e),month:sr(n,e+1,1),day:sr(n,e+2,1)},null,e+3]}function yr(n,e){return[{hours:sr(n,e,0),minutes:sr(n,e+1,0),seconds:sr(n,e+2,0),milliseconds:hl(n[e+3])},null,e+4]}function yi(n,e){const t=!n[e]&&!n[e+1],r=js(n[e+1],n[e+2]),i=t?null:Ue.instance(r);return[{},i,e+3]}function vi(n,e){const t=n[e]?Bt.create(n[e]):null;return[{},t,e+1]}const $w=RegExp(`^T?${pl.source}$`),Ww=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function zw(n){const[e,t,r,i,s,o,a,l,u]=n,c=e[0]==="-",d=l&&l[0]==="-",h=(f,p=!1)=>f!==void 0&&(p||f&&c)?-f:f;return[{years:h(cn(t)),months:h(cn(r)),weeks:h(cn(i)),days:h(cn(s)),hours:h(cn(o)),minutes:h(cn(a)),seconds:h(cn(l),l==="-0"),milliseconds:h(hl(u),d)}]}const Hw={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function ml(n,e,t,r,i,s,o){const a={year:e.length===2?ga(Kt(e)):Kt(e),month:wf.indexOf(t)+1,day:Kt(r),hour:Kt(i),minute:Kt(s)};return o&&(a.second=Kt(o)),n&&(a.weekday=n.length>3?bf.indexOf(n)+1:Sf.indexOf(n)+1),a}const Bw=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Uw(n){const[,e,t,r,i,s,o,a,l,u,c,d]=n,h=ml(e,i,r,t,s,o,a);let f;return l?f=Hw[l]:u?f=0:f=js(c,d),[h,new Ue(f)]}function jw(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Vw=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Zw=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Kw=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ac(n){const[,e,t,r,i,s,o,a]=n;return[ml(e,i,r,t,s,o,a),Ue.utcInstance]}function Gw(n){const[,e,t,r,i,s,o,a]=n;return[ml(e,a,t,r,i,s,o),Ue.utcInstance]}const qw=gr(Aw,gl),Yw=gr(Fw,gl),Jw=gr(Mw,gl),Xw=gr(Af),Mf=mr(Rw,yr,yi,vi),Qw=mr(Iw,yr,yi,vi),ex=mr(Dw,yr,yi,vi),tx=mr(yr,yi,vi);function nx(n){return _r(n,[qw,Mf],[Yw,Qw],[Jw,ex],[Xw,tx])}function rx(n){return _r(jw(n),[Bw,Uw])}function ix(n){return _r(n,[Vw,Ac],[Zw,Ac],[Kw,Gw])}function sx(n){return _r(n,[Ww,zw])}const ox=mr(yr);function ax(n){return _r(n,[$w,ox])}const lx=gr(Lw,Pw),ux=gr(Ff),cx=mr(yr,yi,vi);function dx(n){return _r(n,[lx,Mf],[ux,cx])}const Fc="Invalid Duration",If={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},hx={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...If},ot=146097/400,Vn=146097/4800,fx={years:{quarters:4,months:12,weeks:ot/7,days:ot,hours:ot*24,minutes:ot*24*60,seconds:ot*24*60*60,milliseconds:ot*24*60*60*1e3},quarters:{months:3,weeks:ot/28,days:ot/4,hours:ot*24/4,minutes:ot*24*60/4,seconds:ot*24*60*60/4,milliseconds:ot*24*60*60*1e3/4},months:{weeks:Vn/7,days:Vn,hours:Vn*24,minutes:Vn*24*60,seconds:Vn*24*60*60,milliseconds:Vn*24*60*60*1e3},...If},mn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],px=mn.slice(0).reverse();function Ft(n,e,t=!1){const r={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy,matrix:e.matrix||n.matrix};return new X(r)}function Df(n,e){let t=e.milliseconds??0;for(const r of px.slice(1))e[r]&&(t+=e[r]*n[r].milliseconds);return t}function Mc(n,e){const t=Df(n,e)<0?-1:1;mn.reduceRight((r,i)=>{if(U(e[i]))return r;if(r){const s=e[r]*t,o=n[i][r],a=Math.floor(s/o);e[i]+=a*t,e[r]-=a*o*t}return i},null),mn.reduce((r,i)=>{if(U(e[i]))return r;if(r){const s=e[r]%1;e[r]-=s,e[i]+=s*n[r][i]}return i},null)}function Ic(n){const e={};for(const[t,r]of Object.entries(n))r!==0&&(e[t]=r);return e}class X{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let r=t?fx:hx;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||ie.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return X.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Pe(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new X({values:ys(e,X.normalizeUnit),loc:ie.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Qt(e))return X.fromMillis(e);if(X.isDuration(e))return e;if(typeof e=="object")return X.fromObject(e);throw new Pe(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=sx(e);return r?X.fromObject(r,t):X.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=ax(e);return r?X.fromObject(r,t):X.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Pe("need to specify a reason the Duration is invalid");const r=e instanceof mt?e:new mt(e,t);if(pe.throwOnInvalid)throw new zv(r);return new X({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Hh(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?Re.create(this.loc,r).formatDurationFromString(this,e):Fc}toHuman(e={}){if(!this.isValid)return Fc;const t=e.showZeros!==!1,r=mn.map(i=>{const s=this.values[i];return U(s)||s===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=fl(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},H.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Df(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=X.fromDurationLike(e),r={};for(const i of mn)(cr(t.values,i)||cr(this.values,i))&&(r[i]=t.get(i)+this.get(i));return Ft(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=X.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=vf(e(this.values[r],r));return Ft(this,{values:t},!0)}get(e){return this[X.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...ys(e,X.normalizeUnit)};return Ft(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:r};return Ft(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Mc(this.matrix,e),Ft(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Ic(this.normalize().shiftToAll().toObject());return Ft(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>X.normalizeUnit(o));const t={},r={},i=this.toObject();let s;for(const o of mn)if(e.indexOf(o)>=0){s=o;let a=0;for(const u in r)a+=this.matrix[u][o]*r[u],r[u]=0;Qt(i[o])&&(a+=i[o]);const l=Math.trunc(a);t[o]=l,r[o]=(a*1e3-l*1e3)/1e3}else Qt(i[o])&&(r[o]=i[o]);for(const o in r)r[o]!==0&&(t[s]+=o===s?r[o]:r[o]/this.matrix[s][o]);return Mc(this.matrix,t),Ft(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Ft(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=Ic(this.values);return Ft(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of mn)if(!t(this.values[r],e.values[r]))return!1;return!0}}const Zn="Invalid Interval";function gx(n,e){return!n||!n.isValid?fe.invalid("missing or invalid start"):!e||!e.isValid?fe.invalid("missing or invalid end"):e<n?fe.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}class fe{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new Pe("need to specify a reason the Interval is invalid");const r=e instanceof mt?e:new mt(e,t);if(pe.throwOnInvalid)throw new Wv(r);return new fe({invalid:r})}static fromDateTimes(e,t){const r=Or(e),i=Or(t),s=gx(r,i);return s??new fe({start:r,end:i})}static after(e,t){const r=X.fromDurationLike(t),i=Or(e);return fe.fromDateTimes(i,i.plus(r))}static before(e,t){const r=X.fromDurationLike(t),i=Or(e);return fe.fromDateTimes(i.minus(r),i)}static fromISO(e,t){const[r,i]=(e||"").split("/",2);if(r&&i){let s,o;try{s=H.fromISO(r,t),o=s.isValid}catch{o=!1}let a,l;try{a=H.fromISO(i,t),l=a.isValid}catch{l=!1}if(o&&l)return fe.fromDateTimes(s,a);if(o){const u=X.fromISO(i,t);if(u.isValid)return fe.after(s,u)}else if(l){const u=X.fromISO(r,t);if(u.isValid)return fe.before(a,u)}}return fe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const r=this.start.startOf(e,t);let i;return t!=null&&t.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,t),Math.floor(i.diff(r,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?fe.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Or).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),r=[];let{s:i}=this,s=0;for(;i<this.e;){const o=t[s]||this.e,a=+o>+this.e?this.e:o;r.push(fe.fromDateTimes(i,a)),i=a,s+=1}return r}splitBy(e){const t=X.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:r}=this,i=1,s;const o=[];for(;r<this.e;){const a=this.start.plus(t.mapUnits(l=>l*i));s=+a>+this.e?this.e:a,o.push(fe.fromDateTimes(r,s)),r=s,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:fe.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return fe.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[i,s.union(o)]:[i.concat([s]),o]:[i,o],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const i=[],s=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...s),a=o.sort((l,u)=>l.time-u.time);for(const l of a)r+=l.type==="s"?1:-1,r===1?t=l.time:(t&&+t!=+l.time&&i.push(fe.fromDateTimes(t,l.time)),t=null);return fe.merge(i)}difference(...e){return fe.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Zn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=gs,t={}){return this.isValid?Re.create(this.s.loc.clone(t),e).formatInterval(this):Zn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Zn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Zn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Zn}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Zn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):X.invalid(this.invalidReason)}mapEndpoints(e){return fe.fromDateTimes(e(this.s),e(this.e))}}class Di{static hasDST(e=pe.defaultZone){const t=H.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Bt.isValidZone(e)}static normalizeZone(e){return qt(e,pe.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||ie.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||ie.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||ie.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||ie.create(t,r,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||ie.create(t,r,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null}={}){return(i||ie.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:i=null}={}){return(i||ie.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ie.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ie.create(t,null,"gregory").eras(e)}static features(){return{relative:mf(),localeWeek:_f()}}}function Dc(n,e){const t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=t(e)-t(n);return Math.floor(X.fromMillis(r).as("days"))}function mx(n,e,t){const r=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const c=Dc(l,u);return(c-c%7)/7}],["days",Dc]],i={},s=n;let o,a;for(const[l,u]of r)t.indexOf(l)>=0&&(o=l,i[l]=u(n,e),a=s.plus(i),a>e?(i[l]--,n=s.plus(i),n>e&&(a=n,i[l]--,n=s.plus(i))):n=a);return[n,i,a,o]}function _x(n,e,t,r){let[i,s,o,a]=mx(n,e,t);const l=e-i,u=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o<e&&(o=i.plus({[a]:1})),o!==i&&(s[a]=(s[a]||0)+l/(o-i)));const c=X.fromObject(s,r);return u.length>0?X.fromMillis(l,r).shiftTo(...u).plus(c):c}const yx="missing Intl.DateTimeFormat.formatToParts support";function ee(n,e=t=>t){return{regex:n,deser:([t])=>e(lw(t))}}const vx=" ",Lf=`[ ${vx}]`,Pf=new RegExp(Lf,"g");function wx(n){return n.replace(/\./g,"\\.?").replace(Pf,Lf)}function Lc(n){return n.replace(/\./g,"").replace(Pf," ").toLowerCase()}function pt(n,e){return n===null?null:{regex:RegExp(n.map(wx).join("|")),deser:([t])=>n.findIndex(r=>Lc(t)===Lc(r))+e}}function Pc(n,e){return{regex:n,deser:([,t,r])=>js(t,r),groups:e}}function Li(n){return{regex:n,deser:([e])=>e}}function xx(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function bx(n,e){const t=ft(e),r=ft(e,"{2}"),i=ft(e,"{3}"),s=ft(e,"{4}"),o=ft(e,"{6}"),a=ft(e,"{1,2}"),l=ft(e,"{1,3}"),u=ft(e,"{1,6}"),c=ft(e,"{1,9}"),d=ft(e,"{2,4}"),h=ft(e,"{4,6}"),f=y=>({regex:RegExp(xx(y.val)),deser:([x])=>x,literal:!0}),_=(y=>{if(n.literal)return f(y);switch(y.val){case"G":return pt(e.eras("short"),0);case"GG":return pt(e.eras("long"),0);case"y":return ee(u);case"yy":return ee(d,ga);case"yyyy":return ee(s);case"yyyyy":return ee(h);case"yyyyyy":return ee(o);case"M":return ee(a);case"MM":return ee(r);case"MMM":return pt(e.months("short",!0),1);case"MMMM":return pt(e.months("long",!0),1);case"L":return ee(a);case"LL":return ee(r);case"LLL":return pt(e.months("short",!1),1);case"LLLL":return pt(e.months("long",!1),1);case"d":return ee(a);case"dd":return ee(r);case"o":return ee(l);case"ooo":return ee(i);case"HH":return ee(r);case"H":return ee(a);case"hh":return ee(r);case"h":return ee(a);case"mm":return ee(r);case"m":return ee(a);case"q":return ee(a);case"qq":return ee(r);case"s":return ee(a);case"ss":return ee(r);case"S":return ee(l);case"SSS":return ee(i);case"u":return Li(c);case"uu":return Li(a);case"uuu":return ee(t);case"a":return pt(e.meridiems(),0);case"kkkk":return ee(s);case"kk":return ee(d,ga);case"W":return ee(a);case"WW":return ee(r);case"E":case"c":return ee(t);case"EEE":return pt(e.weekdays("short",!1),1);case"EEEE":return pt(e.weekdays("long",!1),1);case"ccc":return pt(e.weekdays("short",!0),1);case"cccc":return pt(e.weekdays("long",!0),1);case"Z":case"ZZ":return Pc(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return Pc(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return Li(/[a-z_+-/]{1,256}?/i);case" ":return Li(/[^\S\n\r]/);default:return f(y)}})(n)||{invalidReason:yx};return _.token=n,_}const Sx={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Cx(n,e,t){const{type:r,value:i}=n;if(r==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const s=e[r];let o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=t.hour12?"hour12":"hour24");let a=Sx[o];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function Ex(n){return[`^${n.map(t=>t.regex).reduce((t,r)=>`${t}(${r.source})`,"")}$`,n]}function kx(n,e,t){const r=n.match(e);if(r){const i={};let s=1;for(const o in t)if(cr(t,o)){const a=t[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(r.slice(s,s+l))),s+=l}return[r,i]}else return[r,{}]}function Tx(n){const e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,r;return U(n.z)||(t=Bt.create(n.z)),U(n.Z)||(t||(t=new Ue(n.Z)),r=n.Z),U(n.q)||(n.M=(n.q-1)*3+1),U(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),U(n.u)||(n.S=hl(n.u)),[Object.keys(n).reduce((s,o)=>{const a=e(o);return a&&(s[a]=n[o]),s},{}),t,r]}let So=null;function Ox(){return So||(So=H.fromMillis(1555555555555)),So}function Nx(n,e){if(n.literal)return n;const t=Re.macroTokenToFormatOpts(n.val),r=zf(t,e);return r==null||r.includes(void 0)?n:r}function Rf(n,e){return Array.prototype.concat(...n.map(t=>Nx(t,e)))}class $f{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Rf(Re.parseFormat(t),e),this.units=this.tokens.map(r=>bx(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,i]=Ex(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[t,r]=kx(e,this.regex,this.handlers),[i,s,o]=r?Tx(r):[null,null,void 0];if(cr(r,"a")&&cr(r,"H"))throw new Xn("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:r,result:i,zone:s,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Wf(n,e,t){return new $f(n,t).explainFromTokens(e)}function Ax(n,e,t){const{result:r,zone:i,specificOffset:s,invalidReason:o}=Wf(n,e,t);return[r,i,s,o]}function zf(n,e){if(!n)return null;const r=Re.create(e,n).dtFormatter(Ox()),i=r.formatToParts(),s=r.resolvedOptions();return i.map(o=>Cx(o,n,s))}const Co="Invalid DateTime",Fx=864e13;function Pr(n){return new mt("unsupported zone",`the zone "${n.name}" is not supported`)}function Eo(n){return n.weekData===null&&(n.weekData=ms(n.c)),n.weekData}function ko(n){return n.localWeekData===null&&(n.localWeekData=ms(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function dn(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new H({...t,...e,old:t})}function Hf(n,e,t){let r=n-e*60*1e3;const i=t.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const s=t.offset(r);return i===s?[r,i]:[n-Math.min(i,s)*60*1e3,Math.max(i,s)]}function Pi(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Zi(n,e,t){return Hf(Us(n),e,t)}function Rc(n,e){const t=n.o,r=n.c.year+Math.trunc(e.years),i=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...n.c,year:r,month:i,day:Math.min(n.c.day,_s(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=X.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=Us(s);let[l,u]=Hf(a,t,n.zone);return o!==0&&(l+=o,u=n.zone.offset(l)),{ts:l,o:u}}function Kn(n,e,t,r,i,s){const{setZone:o,zone:a}=t;if(n&&Object.keys(n).length!==0||e){const l=e||a,u=H.fromObject(n,{...t,zone:l,specificOffset:s});return o?u:u.setZone(a)}else return H.invalid(new mt("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Ri(n,e,t=!0){return n.isValid?Re.create(ie.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function To(n,e,t){const r=n.c.year>9999||n.c.year<0;let i="";if(r&&n.c.year>=0&&(i+="+"),i+=we(n.c.year,r?6:4),t==="year")return i;if(e){if(i+="-",i+=we(n.c.month),t==="month")return i;i+="-"}else if(i+=we(n.c.month),t==="month")return i;return i+=we(n.c.day),i}function $c(n,e,t,r,i,s,o){let a=!t||n.c.millisecond!==0||n.c.second!==0,l="";switch(o){case"day":case"month":case"year":break;default:if(l+=we(n.c.hour),o==="hour")break;if(e){if(l+=":",l+=we(n.c.minute),o==="minute")break;a&&(l+=":",l+=we(n.c.second))}else{if(l+=we(n.c.minute),o==="minute")break;a&&(l+=we(n.c.second))}if(o==="second")break;a&&(!r||n.c.millisecond!==0)&&(l+=".",l+=we(n.c.millisecond,3))}return i&&(n.isOffsetFixed&&n.offset===0&&!s?l+="Z":n.o<0?(l+="-",l+=we(Math.trunc(-n.o/60)),l+=":",l+=we(Math.trunc(-n.o%60))):(l+="+",l+=we(Math.trunc(n.o/60)),l+=":",l+=we(Math.trunc(n.o%60)))),s&&(l+="["+n.zone.ianaName+"]"),l}const Bf={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Mx={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Ix={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ki=["year","month","day","hour","minute","second","millisecond"],Dx=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Lx=["year","ordinal","hour","minute","second","millisecond"];function Gi(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new Hh(n);return e}function Wc(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Gi(n)}}function Px(n){if(Rr===void 0&&(Rr=pe.now()),n.type!=="iana")return n.offset(Rr);const e=n.name;let t=ma.get(e);return t===void 0&&(t=n.offset(Rr),ma.set(e,t)),t}function zc(n,e){const t=qt(e.zone,pe.defaultZone);if(!t.isValid)return H.invalid(Pr(t));const r=ie.fromObject(e);let i,s;if(U(n.year))i=pe.now();else{for(const l of Ki)U(n[l])&&(n[l]=Bf[l]);const o=pf(n)||gf(n);if(o)return H.invalid(o);const a=Px(t);[i,s]=Zi(n,a,t)}return new H({ts:i,zone:t,loc:r,o:s})}function Hc(n,e,t){const r=U(t.round)?!0:t.round,i=U(t.rounding)?"trunc":t.rounding,s=(a,l)=>(a=fl(a,r||t.calendary?0:2,t.calendary?"round":i),e.loc.clone(t).relFormatter(t).format(a,l)),o=a=>t.calendary?e.hasSame(n,a)?0:e.startOf(a).diff(n.startOf(a),a).get(a):e.diff(n,a).get(a);if(t.unit)return s(o(t.unit),t.unit);for(const a of t.units){const l=o(a);if(Math.abs(l)>=1)return s(l,a)}return s(n>e?-0:0,t.units[t.units.length-1])}function Bc(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}let Rr;const ma=new Map;class H{constructor(e){const t=e.zone||pe.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new mt("invalid input"):null)||(t.isValid?null:Pr(t));this.ts=U(e.ts)?pe.now():e.ts;let i=null,s=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,s]=[e.old.c,e.old.o];else{const a=Qt(e.o)&&!e.old?e.o:t.offset(this.ts);i=Pi(this.ts,a),r=Number.isNaN(i.year)?new mt("invalid input"):null,i=r?null:i,s=r?null:a}this._zone=t,this.loc=e.loc||ie.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new H({})}static local(){const[e,t]=Bc(arguments),[r,i,s,o,a,l,u]=t;return zc({year:r,month:i,day:s,hour:o,minute:a,second:l,millisecond:u},e)}static utc(){const[e,t]=Bc(arguments),[r,i,s,o,a,l,u]=t;return e.zone=Ue.utcInstance,zc({year:r,month:i,day:s,hour:o,minute:a,second:l,millisecond:u},e)}static fromJSDate(e,t={}){const r=fw(e)?e.valueOf():NaN;if(Number.isNaN(r))return H.invalid("invalid input");const i=qt(t.zone,pe.defaultZone);return i.isValid?new H({ts:r,zone:i,loc:ie.fromObject(t)}):H.invalid(Pr(i))}static fromMillis(e,t={}){if(Qt(e))return e<-864e13||e>Fx?H.invalid("Timestamp out of range"):new H({ts:e,zone:qt(t.zone,pe.defaultZone),loc:ie.fromObject(t)});throw new Pe(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Qt(e))return new H({ts:e*1e3,zone:qt(t.zone,pe.defaultZone),loc:ie.fromObject(t)});throw new Pe("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=qt(t.zone,pe.defaultZone);if(!r.isValid)return H.invalid(Pr(r));const i=ie.fromObject(t),s=ys(e,Wc),{minDaysInFirstWeek:o,startOfWeek:a}=kc(s,i),l=pe.now(),u=U(t.specificOffset)?r.offset(l):t.specificOffset,c=!U(s.ordinal),d=!U(s.year),h=!U(s.month)||!U(s.day),f=d||h,p=s.weekYear||s.weekNumber;if((f||c)&&p)throw new Xn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&c)throw new Xn("Can't mix ordinal dates with month/day");const _=p||s.weekday&&!f;let y,x,g=Pi(l,u);_?(y=Dx,x=Mx,g=ms(g,o,a)):c?(y=Lx,x=Ix,g=bo(g)):(y=Ki,x=Bf);let v=!1;for(const O of y){const D=s[O];U(D)?v?s[O]=x[O]:s[O]=g[O]:v=!0}const C=_?cw(s,o,a):c?dw(s):pf(s),S=C||gf(s);if(S)return H.invalid(S);const b=_?Cc(s,o,a):c?Ec(s):s,[k,T]=Zi(b,u,r),E=new H({ts:k,zone:r,o:T,loc:i});return s.weekday&&f&&e.weekday!==E.weekday?H.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${E.toISO()}`):E.isValid?E:H.invalid(E.invalid)}static fromISO(e,t={}){const[r,i]=nx(e);return Kn(r,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,i]=rx(e);return Kn(r,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,i]=ix(e);return Kn(r,i,t,"HTTP",t)}static fromFormat(e,t,r={}){if(U(e)||U(t))throw new Pe("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=r,o=ie.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[a,l,u,c]=Ax(o,e,t);return c?H.invalid(c):Kn(a,l,r,`format ${t}`,e,u)}static fromString(e,t,r={}){return H.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,i]=dx(e);return Kn(r,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Pe("need to specify a reason the DateTime is invalid");const r=e instanceof mt?e:new mt(e,t);if(pe.throwOnInvalid)throw new $v(r);return new H({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=zf(e,ie.fromObject(t));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return Rf(Re.parseFormat(e),ie.fromObject(t)).map(i=>i.val).join("")}static resetCache(){Rr=void 0,ma.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Eo(this).weekYear:NaN}get weekNumber(){return this.isValid?Eo(this).weekNumber:NaN}get weekday(){return this.isValid?Eo(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ko(this).weekday:NaN}get localWeekNumber(){return this.isValid?ko(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ko(this).weekYear:NaN}get ordinal(){return this.isValid?bo(this.c).ordinal:NaN}get monthShort(){return this.isValid?Di.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Di.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Di.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Di.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,r=Us(this.c),i=this.zone.offset(r-e),s=this.zone.offset(r+e),o=this.zone.offset(r-i*t),a=this.zone.offset(r-s*t);if(o===a)return[this];const l=r-o*t,u=r-a*t,c=Pi(l,o),d=Pi(u,a);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[dn(this,{ts:l}),dn(this,{ts:u})]:[this]}get isInLeapYear(){return _i(this.year)}get daysInMonth(){return _s(this.year,this.month)}get daysInYear(){return this.isValid?ir(this.year):NaN}get weeksInWeekYear(){return this.isValid?ei(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ei(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:i}=Re.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(Ue.instance(e),t)}toLocal(){return this.setZone(pe.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if(e=qt(e,pe.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||r){const s=e.offset(this.ts),o=this.toObject();[i]=Zi(o,s,e)}return dn(this,{ts:i,zone:e})}else return H.invalid(Pr(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r});return dn(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ys(e,Wc),{minDaysInFirstWeek:r,startOfWeek:i}=kc(t,this.loc),s=!U(t.weekYear)||!U(t.weekNumber)||!U(t.weekday),o=!U(t.ordinal),a=!U(t.year),l=!U(t.month)||!U(t.day),u=a||l,c=t.weekYear||t.weekNumber;if((u||o)&&c)throw new Xn("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new Xn("Can't mix ordinal dates with month/day");let d;s?d=Cc({...ms(this.c,r,i),...t},r,i):U(t.ordinal)?(d={...this.toObject(),...t},U(t.day)&&(d.day=Math.min(_s(d.year,d.month),d.day))):d=Ec({...bo(this.c),...t});const[h,f]=Zi(d,this.o,this.zone);return dn(this,{ts:h,o:f})}plus(e){if(!this.isValid)return this;const t=X.fromDurationLike(e);return dn(this,Rc(this,t))}minus(e){if(!this.isValid)return this;const t=X.fromDurationLike(e).negate();return dn(this,Rc(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const r={},i=X.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(t){const s=this.loc.getStartOfWeek(),{weekday:o}=this;o<s&&(r.weekNumber=this.weekNumber-1),r.weekday=s}else r.weekday=1;if(i==="quarters"){const s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Re.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Co}toLocaleString(e=gs,t={}){return this.isValid?Re.create(this.loc.clone(t),e).formatDateTime(this):Co}toLocaleParts(e={}){return this.isValid?Re.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:s=!1,precision:o="milliseconds"}={}){if(!this.isValid)return null;o=Gi(o);const a=e==="extended";let l=To(this,a,o);return Ki.indexOf(o)>=3&&(l+="T"),l+=$c(this,a,t,r,i,s,o),l}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?To(this,e==="extended",Gi(t)):null}toISOWeekDate(){return Ri(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:s=!1,format:o="extended",precision:a="milliseconds"}={}){return this.isValid?(a=Gi(a),(i&&Ki.indexOf(a)>=3?"T":"")+$c(this,o==="extended",t,e,r,s,a)):null}toRFC2822(){return Ri(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ri(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?To(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(r&&(i+=" "),t?i+="z":e&&(i+="ZZ")),Ri(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Co}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return X.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},s=pw(t).map(X.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,l=o?e:this,u=_x(a,l,s,i);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(H.now(),e,t)}until(e){return this.isValid?fe.fromDateTimes(this,e):this}hasSame(e,t,r){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,r)<=i&&i<=s.endOf(t,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||H.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(i=e.unit,s=void 0),Hc(t,this.plus(r),{...e,numeric:"always",units:i,unit:s})}toRelativeCalendar(e={}){return this.isValid?Hc(e.base||H.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(H.isDateTime))throw new Pe("min requires all arguments be DateTimes");return Tc(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(H.isDateTime))throw new Pe("max requires all arguments be DateTimes");return Tc(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:i=null,numberingSystem:s=null}=r,o=ie.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return Wf(o,e,t)}static fromStringExplain(e,t,r={}){return H.fromFormatExplain(e,t,r)}static buildFormatParser(e,t={}){const{locale:r=null,numberingSystem:i=null}=t,s=ie.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new $f(s,e)}static fromFormatParser(e,t,r={}){if(U(e)||U(t))throw new Pe("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:s=null}=r,o=ie.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!o.equals(t.locale))throw new Pe(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:a,zone:l,specificOffset:u,invalidReason:c}=t.explainFromTokens(e);return c?H.invalid(c):Kn(a,l,r,`format ${t.format}`,e,u)}static get DATE_SHORT(){return gs}static get DATE_MED(){return Bh}static get DATE_MED_WITH_WEEKDAY(){return Hv}static get DATE_FULL(){return Uh}static get DATE_HUGE(){return jh}static get TIME_SIMPLE(){return Vh}static get TIME_WITH_SECONDS(){return Zh}static get TIME_WITH_SHORT_OFFSET(){return Kh}static get TIME_WITH_LONG_OFFSET(){return Gh}static get TIME_24_SIMPLE(){return qh}static get TIME_24_WITH_SECONDS(){return Yh}static get TIME_24_WITH_SHORT_OFFSET(){return Jh}static get TIME_24_WITH_LONG_OFFSET(){return Xh}static get DATETIME_SHORT(){return Qh}static get DATETIME_SHORT_WITH_SECONDS(){return ef}static get DATETIME_MED(){return tf}static get DATETIME_MED_WITH_SECONDS(){return nf}static get DATETIME_MED_WITH_WEEKDAY(){return Bv}static get DATETIME_FULL(){return rf}static get DATETIME_FULL_WITH_SECONDS(){return sf}static get DATETIME_HUGE(){return of}static get DATETIME_HUGE_WITH_SECONDS(){return af}}function Or(n){if(H.isDateTime(n))return n;if(n&&n.valueOf&&Qt(n.valueOf()))return H.fromJSDate(n);if(n&&typeof n=="object")return H.fromObject(n);throw new Pe(`Unknown datetime argument: ${n}, of type ${typeof n}`)}var G=(n=>(n.Monday="MONDAY",n.Tuesday="TUESDAY",n.Wednesday="WEDNESDAY",n.Thursday="THURSDAY",n.Friday="FRIDAY",n.Saturday="SATURDAY",n.Sunday="SUNDAY",n))(G||{});function Zs(n){const e={1:G.Monday,2:G.Tuesday,3:G.Wednesday,4:G.Thursday,5:G.Friday,6:G.Saturday,7:G.Sunday};if(n.weekday in e)return e[n.weekday];throw new Error(`Invalid DateTime.weekday property: ${n}, ${n.weekday}`)}function bn(n){return{[G.Monday]:"Monday",[G.Tuesday]:"Tuesday",[G.Wednesday]:"Wednesday",[G.Thursday]:"Thursday",[G.Friday]:"Friday",[G.Saturday]:"Saturday",[G.Sunday]:"Sunday"}[n]}const _a=[G.Monday,G.Tuesday,G.Wednesday,G.Thursday,G.Friday,G.Saturday,G.Sunday],$r={[G.Monday]:"monday",[G.Tuesday]:"tuesday",[G.Wednesday]:"wednesday",[G.Thursday]:"thursday",[G.Friday]:"friday",[G.Saturday]:"saturday",[G.Sunday]:"sunday"};class vs{constructor(e,t,r){m(this,"end");m(this,"start");this.end=e.setZone(r),this.start=e.setZone(r),[t.start,t.end].forEach(u=>{if(u.split(":").length!==2)throw new Error('expected interval start and end data to be in the format "HH:MM"')});const[i,s]=t.start.split(":").map(Number),[o,a]=t.end.split(":").map(Number);let l=0;o<i&&(l=1),this.end=this.end.set({hour:o,minute:a,day:this.end.day+l}),this.start=this.start.set({hour:i,minute:s}),this.end.minute===59&&(this.end=this.end.set({minute:60}))}contains(e){return this.start<=e&&e<this.end}getStartTime(e,t){const r={hour:"numeric",minute:"numeric",...t};return this.start.setLocale(e||"en-US").toLocaleString(r).replace(" "," ")}getEndTime(e,t){const r={hour:"numeric",minute:"numeric",...t};return this.end.setLocale(e||"en-US").toLocaleString(r).replace(" "," ")}timeIsEqualTo(e){const t=this.getStartTime()===e.getStartTime(),r=this.getEndTime()===e.getEndTime();return t&&r}is24h(){const e=this.start.minute===0&&this.start.hour===0,t=this.end.minute===0&&this.end.hour===0,r=this.end.day-this.start.day===1||this.end.day===1;return e&&t&&r}}class Uf{constructor(e,t){m(this,"holidayHoursByDate");m(this,"hours");m(this,"timezone");this.holidayHoursByDate=Object.fromEntries((e.holidayHours||[]).map(r=>[r.date,r])),this.hours=e,this.timezone=t}getInterval(e){if(this.isTemporarilyClosedAt(e))return null;const t=e.minus({days:1});for(const r of[t,e]){const i=this.getHours(r);if(i&&!i.isClosed)for(const s of i.openIntervals||[]){const o=new vs(r,s,this.timezone);if(o.contains(e))return o}}return null}getCurrentInterval(){return this.getInterval(H.now())}getIntervalAfter(e){const t=this.getIntervalsForNDays(8,e),r=(s,o)=>s.start===o.start?0:s.start>o.start?1:-1,i=t.sort(r);for(const[s,o]of i.entries())if(o.contains(e)&&i.length>s+1)return i[s+1];for(const s of i)if(s.start>e)return s;return null}getIntervalsForNDays(e,t){const r=[];for(let i=0;i<e;i++){let s=t;s=s.plus({days:i});const o=this.getHours(s);o!=null&&o.openIntervals&&!o.isClosed&&r.push(...o.openIntervals.map(a=>new vs(s,a,this.timezone)))}return r}getHolidayHours(e){return this.isTemporarilyClosedAt(e)?null:this.holidayHoursByDate[(e.toISO()||"").replace(/T.*/,"")]||null}getNormalHours(e){if(this.isTemporarilyClosedAt(e))return null;const t=bn(Zs(e)).toLowerCase();return this.hours[t]}getHours(e){const t=this.getHolidayHours(e);return!t||t.isRegularHours?this.getNormalHours(e):t}getNextInterval(){return this.getIntervalAfter(H.now())}isHoliday(e){return!!this.getHolidayHours(e)}isTemporarilyClosedAt(e){if(!this.hours.reopenDate)return!1;const t=this.hours.reopenDate.split("-");if(t.length===3){const[r,i,s]=t,o=H.fromObject({year:Number(r),month:Number(i),day:Number(s)},{zone:this.timezone});if(e<o)return!0}return!1}isOpenAt(e){return this.isTemporarilyClosedAt(e)?!1:!!this.getInterval(e)}isOpenNow(){return this.isOpenAt(H.now())}}function Rx(n,e){const t=[...n];return e=e%t.length,t.concat(t.splice(0,t.length-e))}function $x(n,e){if(n.length!==e.length)return!1;for(const[t,r]of n.entries())if(!r.timeIsEqualTo(e[t]))return!1;return!0}function wi(n){var e,t;return((t=(e=n==null?void 0:n.currentInterval)==null?void 0:e.is24h)==null?void 0:t.call(e))||!1}function xi(n){return!n.futureInterval}function Wx(n){return wi(n)?M.jsx("span",{className:"HoursStatus-current",children:"Open 24 Hours"}):xi(n)?M.jsx("span",{className:"HoursStatus-current",children:"Temporarily Closed"}):M.jsx("span",{className:"HoursStatus-current",children:n.isOpen?"Open Now":"Closed"})}function zx(n){return wi(n)||xi(n)?null:M.jsx("span",{className:"HoursStatus-separator",children:" • "})}function Hx(n){return wi(n)||xi(n)?null:M.jsx("span",{className:"HoursStatus-future",children:n.isOpen?"Closes at":"Opens at"})}function Bx(n){if(wi(n)||xi(n))return null;let e="";if(n.isOpen){const t=n.currentInterval;e+=t?t.getEndTime("en-US",n.timeOptions):""}else{const t=n.futureInterval;e+=t?t.getStartTime("en-US",n.timeOptions):""}return M.jsxs("span",{className:"HoursStatus-time",children:[" ",e]})}function Ux(n){var r,i;if(wi(n)||xi(n))return null;const e={weekday:"long",...n.dayOptions};let t="";if(n.isOpen){const s=n.currentInterval;t+=((r=s==null?void 0:s.end)==null?void 0:r.setLocale("en-US").toLocaleString(e))||""}else{const s=n.futureInterval;t+=((i=s==null?void 0:s.start)==null?void 0:i.setLocale("en-US").toLocaleString(e))||""}return M.jsxs("span",{className:"HoursStatus-dayOfWeek",children:[" ",t]})}function jx(n,e){const t=n.currentTemplate||Wx,r=n.separatorTemplate||zx,i=n.futureTemplate||Hx,s=n.timeTemplate||Bx,o=n.dayOfWeekTemplate||Ux;return M.jsxs("div",{className:Sn("HoursStatus",(e==null?void 0:e.className)||""),children:[t(n),r(n),i(n),s(n),o(n)]})}const Vx={minHeight:`${1.5}em`},Zx=n=>{const[e,t]=W.useState(!1),[r,i]=W.useState(!1);if(W.useEffect(()=>{i(!0)},[]),!n.hours)return M.jsx(M.Fragment,{});const s=n.statusTemplate||jx,o=new Uf(n.hours,n.timezone),a=o.isOpenNow(),l=o.getCurrentInterval(),u=o.getNextInterval(),c=(l==null?void 0:l.end)||(u==null?void 0:u.start);if(c&&!e){t(!0);const h=c.toMillis()-H.now().toMillis();setTimeout(()=>t(!1),h)}const d={isOpen:a,currentInterval:l,futureInterval:u,...n};return M.jsx(M.Fragment,{children:r?s(d,n):M.jsx("div",{style:Vx,className:Sn("HoursStatus",(n==null?void 0:n.className)||"")})})};function Kx(n,e){const t=[];return n.forEach(r=>{const i=t[t.length-1];i?$x(i.intervals,r.intervals)?(i.endDay=r.endDay,i.isToday=i.isToday||r.isToday):t.push({...r}):t.push({...r})}),t.map(r=>{const i=e&&$r[r.startDay]in e?e[$r[r.startDay]]||"":bn(r.startDay),s=e&&$r[r.endDay]in e?e[$r[r.endDay]]||"":bn(r.endDay);return{...r,dayOfWeek:"Collapsed",dayName:r.startDay===r.endDay?`${i}`:`${i} - ${s}`}})}function Gx(n,e,t){const r=[],i=n.intervals.length>0&&n.intervals[0].is24h();return n.intervals.length===0?r.push((t==null?void 0:t.isClosed)||"Closed"):i?r.push((t==null?void 0:t.open24Hours)||"Open 24 hours"):n.intervals.forEach(s=>{const o=s.getStartTime((t==null?void 0:t.timeFormatLocale)||"en-US",e),a=s.getEndTime((t==null?void 0:t.timeFormatLocale)||"en-US",e);r.push(`${o} - ${a}`)}),r}function qx(n,e,t){const r=[];for(let i=1;i<=7;i++){const s=H.fromObject({weekday:i}),o=Zs(s);r.push({startDay:o,endDay:o,dayName:t&&bn(o).toLowerCase()in t?t[bn(o).toLowerCase()]||"":bn(o),intervals:n.filter(a=>a.start.weekday===i),isToday:(e==null?void 0:e.weekday)===i})}return r}const Yx=n=>{const[e,t]=W.useState(!1);return W.useEffect(()=>{t(!0)},[]),n.hours?M.jsx(M.Fragment,{children:e?M.jsx(Jx,{...n}):M.jsx(Xx,{...n})}):M.jsx(M.Fragment,{})},Jx=n=>{const e=new Uf(n.hours,Intl.DateTimeFormat().resolvedOptions().timeZone),t=H.now(),r=e.getIntervalsForNDays(7,t),i=qx(r,t,n.dayOfWeekNames);return M.jsx(ya,{...n,hoursData:i,isClient:!0})},Xx=n=>{var o;const{hours:e,dayOfWeekNames:t,intervalTranslations:r}=n,i=_a.map(a=>{var u,c;const l=$r[a];return{dayName:(t==null?void 0:t[l])||bn(a),startDay:a,endDay:a,isToday:!1,intervals:((c=(u=e[l])==null?void 0:u.openIntervals)==null?void 0:c.map(d=>new vs(H.now(),d,"UTC")))??[]}}),s=(o=e.holidayHours)==null?void 0:o.map(a=>{var c,d;const l=H.fromFormat(a.date,"yyyy-MM-dd"),u=Zs(l);return{dayName:l.setLocale((r==null?void 0:r.timeFormatLocale)||"en-US").toLocaleString(),isToday:!1,startDay:u,endDay:u,intervals:(a.isRegularHours?(c=a.openIntervals)==null?void 0:c.map(h=>new vs(l,h,"UTC")):(d=i.find(h=>h.startDay===u))==null?void 0:d.intervals)??[]}});return M.jsxs(M.Fragment,{children:[M.jsx(ya,{...n,hoursData:i,isClient:!1}),s&&s.length>0&&M.jsx(ya,{...n,hoursData:s,isClient:!1,isHolidayHours:!0}),e.reopenDate&&M.jsxs("div",{className:"HoursTable-row",children:[M.jsx("span",{className:"HoursTable-day",children:(r==null?void 0:r.reopenDate)||"Reopen Date"}),M.jsx("span",{className:"HoursTable-intervals",children:H.fromFormat(e.reopenDate,"yyyy-MM-dd").setLocale((r==null?void 0:r.timeFormatLocale)||"en-US").toLocaleString()})]})]})},ya=n=>{const{intervalStringsBuilderFn:e,className:t,timeOptions:r,intervalTranslations:i,dayOfWeekNames:s,startOfWeek:o,isClient:a,isHolidayHours:l}=n;let u=n.hoursData;function c(f){return f?{today:Zs(H.now()),monday:G.Monday,tuesday:G.Tuesday,wednesday:G.Wednesday,thursday:G.Thursday,friday:G.Friday,saturday:G.Saturday,sunday:G.Sunday}[f]:G.Sunday}const d=_a.indexOf(c(a||o!=="today"?o:"sunday")),h=Rx(_a,7-d);return l||(u.sort((f,p)=>h.indexOf(f.startDay)-h.indexOf(p.startDay)),n.collapseDays&&(u=Kx(u,s))),M.jsx("div",{className:Sn("HoursTable",t),children:u.map(f=>{const _=(e||Gx)(f,r,i);return M.jsxs("div",{className:Sn("HoursTable-row",{"is-today":f.isToday}),children:[M.jsx("span",{className:"HoursTable-day",children:f.dayName}),M.jsx("span",{className:"HoursTable-intervals",children:_.map((y,x)=>M.jsx("span",{className:"HoursTable-interval",children:y},x))})]},f.dayName)})})},Qx=n=>`<script type="application/ld+json">
60
- ${JSON.stringify(n)}
61
- <\/script>`,Ks=(n,e)=>{if(!(!n.name||typeof n.name!="string"))return{"@context":"https://schema.org","@type":e,name:n.name}},eb=n=>typeof n!="object"?!1:!!n.name||!!n.address,tb=n=>typeof n!="object"?!1:!!n.line1||!!n.city||!!n.region||!!n.postalCode||!!n.countryCode,_l=n=>tb(n)&&{address:{"@type":"PostalAddress",streetAddress:n.line1,addressLocality:n.city,addressRegion:n.region,postalCode:n.postalCode,addressCountry:n.countryCode}},jf=n=>eb(n)&&{"@type":"Place",name:n.name,..._l(n.address)},Vf=n=>typeof n!="object"||!("image"in n)?!1:"url"in n.image&&typeof n.image.url=="string",Gs=n=>{if(!n)return{};const e=new Array;for(const t of n)Vf(t)&&e.push(t.image.url);return{image:e}},nb=n=>Vf(n)&&{image:n.image.url},rb=n=>typeof n!="object"?!1:!!n.name,ib=n=>Array.isArray(n)&&n.length>0,Zf=n=>ib(n)&&{performer:{"@type":"PerformingGroup",name:n.join(" and ")}},Kf=n=>rb(n)&&{organizer:{"@type":"Organization",name:n.name,...n.url&&{url:n.url}}},sb=["BackOrder","Discontinued","InStock","InStoreOnly","LimitedAvailability","MadeToOrder","OnlineOnly","OutOfStock","PreOrder","PreSale","Reserved","SoldOut"],ob=n=>typeof n!="object"?!1:"priceCurrency"in n&&"price"in n&&"availability"in n&&sb.includes(n.availability),yl=n=>ob(n)&&{offers:{"@type":"Offer",url:n.url,priceCurrency:n.priceCurrency,price:n.price,priceValidUntil:n.priceValidUntil,itemCondition:n.itemCondition,availability:n.availability}},ab=(n,e)=>{const t=jf({name:n.geomodifier,address:n.address});return{...Ks(n,e??"Event"),...Gs(n.photoGallery),...t&&{location:t},...Zf(n.performers),...Kf({name:n.organizerName}),...yl({url:"",priceCurrency:n.c_currency,price:n.price,priceValidUntil:n.expirationDate,itemCondition:n.condition,availability:n.stockStatus}),...n.c_startDate&&{startDate:n.c_startDate},...n.c_endDate&&{endDate:n.c_endDate},...n.description&&{description:n.description},...n.attendance&&{eventAttendanceMode:n.attendance},...n.eventStatus&&{eventStatus:n.eventStatus}}},Gf=n=>typeof n!="object"?!1:"monday"in n||"tuesday"in n||"wednesday"in n||"thursday"in n||"friday"in n||"saturday"in n||"sunday"in n,lb=n=>typeof n!="object"?!1:n.isClosed?!0:"openIntervals"in n&&Array.isArray(n.openIntervals)&&n.openIntervals.length?n.openIntervals.every(e=>typeof e=="object"&&"start"in e&&"end"in e):!1,qf=n=>{if(!Gf(n))return{};let e=new Map;e=qe(n.monday,e,"Mo"),e=qe(n.tuesday,e,"Tu"),e=qe(n.wednesday,e,"We"),e=qe(n.thursday,e,"Th"),e=qe(n.friday,e,"Fr"),e=qe(n.saturday,e,"Sa"),e=qe(n.sunday,e,"Su");const t=new Array;for(const[r,i]of e){const s=i.join(",");t.push(s+" "+r)}return{openingHours:t}},ub=n=>{if(!Gf(n))return{};let e=new Map;e=qe(n.monday,e,"Monday"),e=qe(n.tuesday,e,"Tuesday"),e=qe(n.wednesday,e,"Wednesday"),e=qe(n.thursday,e,"Thursday"),e=qe(n.friday,e,"Friday"),e=qe(n.saturday,e,"Saturday"),e=qe(n.sunday,e,"Sunday");const t=[];e.forEach((s,o)=>{o.split("-").length===2&&t.push({"@type":"OpeningHoursSpecification",dayOfWeek:s.length===1?`https://schema.org/${s[0]}`:s.map(a=>`https://schema.org/${a}`),opens:o.split("-")[0],closes:o.split("-")[1]})});const r={openingHoursSpecification:t},i=cb(n.holidayHours);return i!=null&&i.length&&(r.specialOpeningHoursSpecification=i),r},cb=n=>{var t;if(!n||!Array.isArray(n))return[];const e=[];for(const r of n)r.isRegularHours||!r.date||(r.isClosed?e.push({"@type":"OpeningHoursSpecification",validFrom:r.date,validThrough:r.date,opens:"00:00",closes:"00:00"}):(t=r.openIntervals)==null||t.forEach(i=>{!i.start||!i.end||e.push({"@type":"OpeningHoursSpecification",validFrom:r.date,validThrough:r.date,opens:i.start,closes:i.end})}));return e},qe=(n,e,t)=>{if(!lb(n))return e;if(n.isClosed||!n.openIntervals){const r="00:00-00:00",i=e.get(r)??[];return i.push(t),e.set(r,i),e}for(let r=0;r<n.openIntervals.length;r++){const i=n.openIntervals[r].start+"-"+n.openIntervals[r].end,s=e.get(i)??[];s.push(t),e.set(i,s)}return e},db=(n,e)=>({...Ks(n,e??"LocalBusiness"),..._l(n.address),...qf(n.hours),...Gs(n.photoGallery),description:n.description,telephone:n.mainPhone,email:n.email}),hb=n=>typeof n!="object"?!1:"ratingValue"in n,fb=n=>typeof n!="object"?!1:"ratingValue"in n&&"reviewCount"in n,Yf=n=>hb(n)&&{review:{"@type":"Review",reviewRating:{"@type":"Rating",ratingValue:n.ratingValue,bestRating:n.bestRating},...n.author&&{author:{"@type":"Person",name:n.author}}}},Jf=n=>fb(n)?{aggregateRating:{"@type":"AggregateRating",ratingValue:n.ratingValue,reviewCount:n.reviewCount}}:void 0,pb=(n,e)=>({...Ks(n,e??"Product"),...Gs(n.photoGallery),...Yf(n.c_reviews),...Jf(n.c_aggregateRating),...yl({url:"",priceCurrency:n.c_currency,price:n.price,priceValidUntil:n.expirationDate,itemCondition:n.condition,availability:n.stockStatus}),description:n.description,sku:n.sku,mpn:n.mpn,...n.brand&&{brand:{"@type":"Brand",name:n.brand}}}),gb=n=>!n||typeof n!="object"?!1:"question"in n&&"answer"in n,mb=n=>!n||typeof n!="object"?!1:"question"in n&&"answerV2"in n?"json"in n.answerV2&&typeof n.answerV2.json=="object":!1;function va(n,e){for(const t in n)if(typeof n[t]=="object")if(Array.isArray(n[t]))for(let r=0;r<n[t].length;r++)va(n[t][r],e);else va(n[t],e);else t==="text"&&e.push(n[t])}function Xf(n){if(n.json){const e=[];return va(n.json,e),e.join("")}return""}const _b=n=>{const e=n.map(t=>{if(gb(t)||mb(t))return{"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:"answer"in t?t.answer:Xf(t.answerV2)}}}).filter(Boolean);if(e.length)return{"@context":"http://www.schema.org","@type":"FAQPage",mainEntity:e}},wa=Math.log2(1.6745627884839434),yb=4,vb=19,xa="js-baidu-neg-lng-fix";let Qf;const wb=new Promise(n=>Qf=n),xb="https://api.map.baidu.com/geoconv/v1/";let Nr=[];const bb="gcj02ToBD09Callback_b872c21c";let Sb=0,Uc;async function ep(n){return await new Promise((e,t)=>{Nr.push({coordinates:n,resolve:e,reject:t}),Nr.length===1&&(Uc=setTimeout(r,100)),Nr.length>40&&(clearTimeout(Uc),r());function r(){const i=Nr;Nr=[];const s=[].concat(...i.map(l=>l.coordinates)),o=bb+"_"+Sb++,a=document.createElement("script");window[o]=l=>{var d;if(l.status){const h=new Error(`Unable to convert coordinates to BD-09: Received status code ${l.status}${l.message?": "+l.message:""}`);i.forEach(f=>f.reject(h))}const u=l.result.map(h=>new oe(h.y,h.x));let c=0;i.forEach(h=>{h.resolve(u.slice(c,c+=h.coordinates.length))}),delete window[o],(d=a.parentNode)==null||d.removeChild(a)},wb.then(l=>{const u={ak:l,callback:o,coords:s.map(c=>`${c.longitude},${c.latitude}`).join(";"),from:3,to:5};a.src=xb+"?"+Object.entries(u).map(([c,d])=>c+"="+d).join("&"),document.head.appendChild(a)})}})}class Cb extends hr{constructor(t){super(t);m(this,"_wrapper");m(this,"map");m(this,"_panStartHandler");m(this,"_panHandler");m(this,"_centerReady");const r=!!(window.MSInputMethodContext&&document.DOCUMENT_NODE);this._wrapper=t.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:t.controlEnabled,maxZoom:r?14:18,...t.providerOptions}),t.controlEnabled?(this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))):(this.map.disableDragging(),this.map.disableDoubleClickZoom(),this.map.disablePinchToZoom()),this._panStartHandler=()=>null,this._panHandler=()=>null,this.map.addEventListener("movestart",()=>this._panStartHandler()),this.map.addEventListener("moveend",()=>this._panHandler()),this.map.addEventListener("zoomstart",()=>this._panStartHandler()),this.map.addEventListener("zoomend",()=>{this._wrapper&&(this._wrapper.dataset.baiduZoom=this.map.getZoom()),this._panHandler()}),this._centerReady=Promise.resolve()}getCenter(){return new oe(this.map.getCenter())}getZoom(){return this.map.getZoom()-wa}setCenter(t,r){this._centerReady=ep([t]).then(([i])=>{const s=new BMap.Point(i.longitude,i.latitude);this.map.panTo(s,{noAnimation:!r})})}setZoom(t,r){this._centerReady.then(()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(t+wa)},{enableAnimation:r})})}}class Eb extends fr{constructor(t){super(t);m(this,"_wrapper");m(this,"_zIndex");m(this,"_wrapperClass");m(this,"_originalWrapperClass");m(this,"_element");m(this,"_coordinateReady");m(this,"_negativeLngFix");m(this,"pin");this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Promise.resolve(),this._negativeLngFix=!1;class r extends BMap.Marker{constructor(a,l){super(a);m(this,"pin");this.pin=l}initialize(a){return this.pin._wrapper=super.initialize(a),this.pin._wrapper&&(this.pin._wrapper.style.zIndex=this.pin._zIndex.toString(),this.pin._originalWrapperClass=this.pin._wrapper.getAttribute("class")??"",this.pin._wrapper.setAttribute("class",this.pin._getClass()),this.pin._wrapper.appendChild(this.pin._element),this.pin.addListeners()),this.pin._wrapper}draw(){if(this.pin._wrapper){const a=this.pin._wrapper.style.zIndex;super.draw(),this.pin._wrapper.style.height="",this.pin._wrapper.style.width="",this.pin._wrapper.style.pointerEvents="none",this.pin._wrapper.style.zIndex=a}else super.draw()}}this.pin=new r(new BMap.Point(0,0),this);const i=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(i),this.pin.setShadow(i)}addListeners(){super.addListeners(),this._wrapper&&this._wrapper.addEventListener("touchend",()=>this._clickHandler())}setCoordinate(t){this._coordinateReady=ep([t]).then(([r])=>{this._negativeLngFix=r.longitude<0,this.pin.setPosition(new BMap.Point(r.longitude+(this._negativeLngFix?180:0),r.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](xa)})}setMap(t,r){this._coordinateReady.then(()=>{r&&r.getProviderMap().map.removeOverlay(this.pin),t&&t.getProviderMap().map.addOverlay(this.pin)})}setProperties(t){super.setProperties(t),this._wrapperClass=t.getClass(),this._element=t.getElement()||this._pinEl,this._zIndex=t.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?xa:""} ${this._wrapperClass}`}}const kb="https://api.map.baidu.com/getscript";function Tb(n,e,t,{params:r={},version:i="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=new Date().getTime();const s=t,o={ak:s,v:i,...r};Qf(s);const a=document.createElement("script");a.src=kb+"?"+Object.entries(o).map(([c,d])=>c+"="+d).join("&"),a.onload=()=>n(),document.head.appendChild(a);let l="";for(let c=yb;c<=vb;c++){const d=2**(c-wa+7);l+=`[data-baidu-zoom="${c}"] .${xa}{transform:translateX(-${d}px);}`}const u=document.createElement("style");u.appendChild(document.createTextNode(l)),document.head.appendChild(u)}const Ob=new Rn().withLoadFunction(Tb).withMapClass(Cb).withPinClass(Eb).withProviderName("Baidu").build();let tp;function Nb(){class n extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1});m(this,"_container");m(this,"_pins");m(this,"_viewChangeEventHandler");m(this,"_map");this._container=document.createElement("div"),this._pins=new Set,this._viewChangeEventHandler=null,this._container.style.position="absolute",this._container.style.left="0",this._container.style.top="0"}addPin(r){this._pins.add(r),r._wrapper&&(r._wrapper.style.position="absolute",this._container.appendChild(r._wrapper)),this._map&&this.updatePinPosition(r)}onAdd(){this._map=this.getMap(),this.setHtmlElement(this._container)}onLoad(){this._viewChangeEventHandler=Microsoft.Maps.Events.addHandler(this._map,"viewchange",()=>this.updatePinPositions()),this.updatePinPositions()}onRemove(){this._viewChangeEventHandler&&Microsoft.Maps.Events.removeHandler(this._viewChangeEventHandler),this._map=null}removePin(r){this._pins.delete(r),r._wrapper&&this._container.removeChild(r._wrapper)}updatePinPosition(r){if(!this._map)return;const i=this._map.tryLocationToPixel(r._location,Microsoft.Maps.PixelReference.control);r._wrapper&&i instanceof Microsoft.Maps.Point&&(r._wrapper.style.left=i.x+"px",r._wrapper.style.top=i.y+"px")}updatePinPositions(){this._pins.forEach(r=>this.updatePinPosition(r))}}tp=n}class Ab extends hr{constructor(t){super(t);m(this,"wrapper");m(this,"map");m(this,"pinOverlay");this.wrapper=t.wrapper,this.wrapper&&(this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!t.controlEnabled,disableZooming:!t.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...t.providerOptions}),this.pinOverlay=new tp(this.map),this.map.layers.insert(this.pinOverlay),Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",()=>this._panStartHandler()),Microsoft.Maps.Events.addHandler(this.map,"viewchangeend",()=>this._panHandler()))}getCenter(){var t;return new oe(((t=this.map)==null?void 0:t.getCenter())??{lat:0,lng:0})}getZoom(){var t;return((t=this.map)==null?void 0:t.getZoom())??0}setCenter(t,r){var s;const i=new Microsoft.Maps.Location(t.latitude,t.longitude);(s=this.map)==null||s.setView({center:i}),this.pinOverlay.updatePinPositions()}setZoom(t,r){var i;(i=this.map)==null||i.setView({zoom:Math.floor(t)}),this.pinOverlay.updatePinPositions()}}class np extends fr{constructor(t){super(t);m(this,"_location");m(this,"_map");this._map=null,this._location=new Microsoft.Maps.Location(0,0)}static getId(){return this._pinId=(this._pinId||0)+1,this._pinId}setCoordinate(t){this._location=new Microsoft.Maps.Location(t.latitude,t.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(t,r){r&&r.getProviderMap().pinOverlay.removePin(this),t&&t.getProviderMap().pinOverlay.addPin(this),this._map=t}}m(np,"_pinId");const jc="BingMapsCallback_593d7d33",Fb="https://www.bing.com/api/maps/mapcontrol";function Mb(n,e,t,{params:r={}}={}){window[jc]=()=>{Nb(),n()};const i={callback:jc,key:t,...r};td(Fb+"?"+Object.entries(i).map(([s,o])=>s+"="+o).join("&"))}const Ib=new Rn().withLoadFunction(Mb).withMapClass(Ab).withPinClass(np).withProviderName("Bing").build();class Db extends hr{constructor(t){var i,s,o,a;super(t);m(this,"instance");m(this,"map");const r=((i=t==null?void 0:t.iframeWindow)==null?void 0:i.mapboxgl)??Oo;if(r.accessToken=(t==null?void 0:t.apiKey)??"",this.instance=r,t.wrapper&&(this.map=new this.instance.Map({container:t.wrapper,interactive:t.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...t.providerOptions})),t.controlEnabled){const l=new this.instance.NavigationControl({showCompass:!1});(s=this.map)==null||s.addControl(l)}(o=this.map)==null||o.on("movestart",()=>this._panStartHandler()),(a=this.map)==null||a.on("moveend",()=>this._panHandler())}getCenter(){var t;return new oe(((t=this.map)==null?void 0:t.getCenter())??{lat:0,lng:0})}getZoom(){var t;return(((t=this.map)==null?void 0:t.getZoom())??0)+1}setCenter(t,r){const i=new this.instance.LngLat(t.longitude,t.latitude);this.map&&this.map[r?"panTo":"setCenter"](i)}setZoom(t,r){this.map&&this.map[r?"zoomTo":"setZoom"](t-1)}setZoomCenter(t,r,i){const s=new this.instance.LngLat(r.longitude,r.latitude);this.map&&this.map[i?"easeTo":"jumpTo"]({center:s,zoom:t-1})}}class Lb extends fr{constructor(t){super(t);m(this,"pin");this._wrapper&&(this._wrapper.style.position="relative",this.pin=new Oo.Marker({anchor:"top-left",element:this._wrapper}))}setCoordinate(t){var r;(r=this.pin)==null||r.setLngLat(new Oo.LngLat(t.longitude,t.latitude))}setMap(t,r){var i,s;if(t){const o=t.getProviderMap().map;o&&((i=this.pin)==null||i.addTo(o))}else(s=this.pin)==null||s.remove()}}function Pb(n,e,t,{version:r="v1.13.0"}={}){const i=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,s=document.createElement("link");s.rel="stylesheet",s.href=i+".css";const o=document.createElement("script");o.src=i+".js",o.onload=()=>{n()},document.head.appendChild(s),document.head.appendChild(o)}const Rb=new Rn().withLoadFunction(Pb).withMapClass(Db).withPinClass(Lb).withProviderName("Mapbox").build();var _n;let rp=(_n=class extends hr{constructor(t){var r,i,s;super(t);m(this,"map");this._initMap(t),t.controlEnabled&&((r=this.map)==null||r.zoomControl.setPosition("topright")),(i=this.map)==null||i.on("movestart",()=>this._panStartHandler()),(s=this.map)==null||s.on("moveend",()=>this._panHandler())}getCenter(){var t;return new oe(((t=this.map)==null?void 0:t.getCenter())??{lat:0,lng:0})}getZoom(){var t;return((t=this.map)==null?void 0:t.getZoom())??0}setCenter(t,r){var s;const i=new L.LatLng(t.latitude,t.longitude);(s=this.map)==null||s.panTo(i,{animate:r})}setZoom(t,r){var i;(i=this.map)==null||i.setZoom(t,{animate:r})}setZoomCenter(t,r,i){var o;const s=new L.LatLng(r.latitude,r.longitude);(o=this.map)==null||o.setView(s,t,{animate:i})}_initMap(t){t.wrapper&&(this.map=new L.Map(t.wrapper,{boxZoom:t.controlEnabled,doubleClickZoom:t.controlEnabled,dragging:t.controlEnabled,zoom:0,zoomControl:t.controlEnabled,zoomSnap:0,...t.providerOptions}));const r=t.providerOptions,i=r.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",s=r.tileLayerOptions||{attribution:'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};s.accessToken=_n.apiKey,this.map&&L.tileLayer(i,s).addTo(this.map)}},m(_n,"apiKey"),_n),$b=class extends ka{constructor(t){super(t);m(this,"pin");this.pin=new L.Marker(new L.LatLng(0,0)),this.pin.on("click",()=>this._clickHandler()),this.pin.on("mouseover",()=>this._hoverHandler(!0)),this.pin.on("mouseout",()=>this._hoverHandler(!1))}setCoordinate(t){const r=new L.LatLng(t.latitude,t.longitude);this.pin.setLatLng(r)}setMap(t,r){if(t){const i=t.getProviderMap().map;i&&this.pin.addTo(i)}else this.pin.remove()}setProperties(t){const r=t.getWidth(),i=t.getHeight(),s=t.getAnchorX(),o=t.getAnchorY();this.pin.setIcon(new L.Icon({iconUrl:this._icons[t.getIcon()],iconSize:[r,i],iconAnchor:[s*r,o*i],className:t.getClass()})),this.pin.setZIndexOffset(t.getZIndex())}};function Wb(n,e,t,{version:r="1.7.1"}={}){const i=`https://unpkg.com/leaflet@${r}/dist/leaflet`;rp.apiKey=t;const s=document.createElement("link");s.rel="stylesheet",s.href=i+".css";const o=document.createElement("script");o.src=i+".js",o.onload=()=>n(),document.head.appendChild(s),document.head.appendChild(o)}const vl=new Rn().withLoadFunction(Wb).withMapClass(rp).withPinClass($b).withProviderName("Leaflet").build(),zb=vl.getMapClass(),Hb=vl.getPinClass();class Bb extends zb{constructor(){super(...arguments);m(this,"map")}_initMap(t){this.map=L.mapquest.map(t.wrapper,{boxZoom:t.controlEnabled,center:new L.LatLng(0,0),doubleClickZoom:t.controlEnabled,dragging:t.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:t.controlEnabled,zoomSnap:0,...t.providerOptions})}}class Ub extends Hb{}function jb(n,e,t,{version:r="v1.3.2"}={}){const i=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,s=document.createElement("link");s.rel="stylesheet",s.href=i+".css";const o=document.createElement("script");o.src=i+".js",o.onload=()=>{L.mapquest.key=t,n()},document.head.appendChild(s),document.head.appendChild(o)}const Vb=new Rn().withLoadFunction(jb).withMapClass(Bb).withPinClass(Ub).withProviderName("MapQuest").build();exports.Address=$p;exports.AddressSchema=_l;exports.AggregateRatingSchema=Jf;exports.Analytics=Yc;exports.AnalyticsContext=Sa;exports.AnalyticsProvider=_g;exports.AnalyticsScopeProvider=yg;exports.BaiduMaps=Ob;exports.BaseSchema=Ks;exports.BingMaps=Ib;exports.Clusterer=im;exports.Coordinate=oe;exports.Day=G;exports.Event=ab;exports.FAQPage=_b;exports.GoogleMaps=id;exports.HoursStatus=Zx;exports.HoursTable=Yx;exports.Image=Tg;exports.ImageLayoutOption=Pt;exports.LeafletMaps=vl;exports.LegacyRichText=Rv;exports.LexicalRichText=Vy;exports.Link=ed;exports.ListingPublisherOption=Zc;exports.LocalBusiness=db;exports.LocationMap=am;exports.LocationSchema=jf;exports.Map=ad;exports.MapProviderOption=Fo;exports.MapQuestMaps=Vb;exports.MapboxMaps=Rb;exports.Marker=Na;exports.OfferSchema=yl;exports.OpeningHoursSchema=qf;exports.OpeningHoursSpecificationSchema=ub;exports.OrganizationSchema=Kf;exports.PerformerSchema=Zf;exports.PhotoGallerySchema=Gs;exports.PhotoSchema=nb;exports.Product=pb;exports.ReviewSchema=Yf;exports.SchemaWrapper=Qx;exports.c=Sn;exports.commonjsGlobal=No;exports.debuggingParamDetected=qi;exports.getDefaultExportFromCjs=Vc;exports.getDirections=Pp;exports.getImageUrl=Yi;exports.getRichTextContent=Xf;exports.getRuntime=or;exports.jsxRuntimeExports=M;exports.useAnalytics=dr;exports.useClusterContext=rm;exports.useIdentify=xg;exports.useMapContext=tm;exports.usePageView=wg;exports.useScope=Ca;exports.useTrack=vg;