PageSourceSearch

https://www.thousandislandsvet.ca/_next/static/chunks/d369ad99-06592a49c9fc9413.js

js thousandislandsvet.ca collected 2026-09-28 10:35:27 UTC 341,885 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[734],{95627:function(e,t,n){n.d(t,{T:function(){return ni},a:function(){return mo},b:function(){return u},c:function(){return J},d:function(){return Hi},e:function(){return Zi},f:function(){return $i},g:function(){return x},h:function(){return Ii},i:function(){return Fi},j:function(){return g},k:function(){return Li},l:function(){return Ki},m:function(){return Ui},n:function(){return Ji},o:function(){return zi},p:function(){return ii},q:function(){return Bi},r:function(){return Vi},s:function(){return ri},t:function(){return Wi},u:function(){return ai},v:function(){return ho}});var r=n(67294),i=n(73935),o=n(34155),a=Object.defineProperty,s=(e,t,n)=>((e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d,c={exports:{}},h={};c.exports=function(){if(d)return h;d=1;var e=r,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,r){var s,l={},u=null,d=null;for(s in void 0!==r&&(u=""+r),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(d=n.ref),n)i.call(n,s)&&!a.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:u,ref:d,props:l,_owner:o.current}}return h.Fragment=n,h.jsx=s,h.jsxs=s,h}();var g=c.exports;var p={};Object.defineProperty(p,"__esModule",{value:!0});var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m=typeof window<"u"&&typeof window.document<"u",_=typeof o<"u"&&null!=o.versions&&null!=o.versions.node,y="object"===(typeof self>"u"?"undefined":f(self))&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name,v=typeof window<"u"&&"nodejs"===window.name||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),E=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",N=p.isBrowser=m;p.isWebWorker=y;var C=p.isNode=_;p.isJsDom=v;var b=p.isDeno=E;class T{constructor(){var e;s(this,"name"),s(this,"isServerSide"),s(this,"version"),b?(this.name="deno",this.version="",N&&(this.version=(null==(e=window.Deno)?void 0:e.version.deno)||""),this.isServerSide=!0):C?(this.name="node",this.version=o.versions.node,this.isServerSide=!0):N?(this.name="browser",this.version=navigator.userAgent,this.isServerSide=!1):(this.name="unknown",this.version="",this.isServerSide=!1)}getNodeMajorVersion(){if("node"!==this.name)throw new Error("Not running in Node.");return+this.version.split(".")[0]}}const x=()=>new T;function w(e){if(!S(e))throw new Error("Parameter was not an error")}function S(e){return!!e&&"object"==typeof e&&"[object Error]"===function(e){return Object.prototype.toString.call(e)}(e)||e instanceof Error}class A extends Error{constructor(e,t){const n=[...arguments],{options:r,shortMessage:i}=function(e){let t,n="";if(0===e.length)t={};else if(S(e[0]))t={cause:e[0]},n=e.slice(1).join(" ")||"";else if(e[0]&&"object"==typeof e[0])t=Object.assign({},e[0]),n=e.slice(1).join(" ")||"";else{if("string"!=typeof e[0])throw new Error("Invalid arguments passed to Layerr");t={},n=n=e.join(" ")||""}return{options:t,shortMessage:n}}(n);let o=i;if(r.cause&&(o=`${o}: ${r.cause.message}`),super(o),this.message=o,r.name&&"string"==typeof r.name?this.name=r.name:this.name="Layerr",r.cause&&Object.defineProperty(this,"_cause",{value:r.cause}),Object.defineProperty(this,"_info",{value:{}}),r.info&&"object"==typeof r.info&&Object.assign(this._info,r.info),Error.captureStackTrace){const e=r.constructorOpt||this.constructor;Error.captureStackTrace(this,e)}}static cause(e){return w(e),e._cause&&S(e._cause)?e._cause:null}static fullStack(e){w(e);const t=A.cause(e);return t?`${e.stack}\ncaused by: ${A.fullStack(t)}`:e.stack??""}static info(e){w(e);const t={},n=A.cause(e);return n&&Object.assign(t,A.info(n)),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 O="0123456789ABCDEFGHJKMNPQRSTVWXYZ",R=0xffffffffffff,k=Object.freeze({source:"ulid"});function D(e){const t=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null,n=t&&(t.crypto||t.msCrypto)||null;if("function"==typeof(null==n?void 0:n.getRandomValues))return()=>{const e=new Uint8Array(1);return n.getRandomValues(e),e[0]/255};if("function"==typeof(null==n?void 0:n.randomBytes))return()=>n.randomBytes(1).readUInt8()/255;throw new A({info:{code:"PRNG_DETECT",...k}},"Failed to find a reliable PRNG")}
1function M(e){let t=Math.floor(32*e());return 32===t&&(t=31),O.charAt(t)}function P(e,t){const n=D();return function(e,t){if(isNaN(e))throw new A({info:{code:"ENC_TIME_NAN",...k}},`Time must be a number: ${e}`);if(e>R)throw new A({info:{code:"ENC_TIME_SIZE_EXCEED",...k}},`Cannot encode a time larger than ${R}: ${e}`);if(e<0)throw new A({info:{code:"ENC_TIME_NEG",...k}},`Time must be positive: ${e}`);if(!1===Number.isInteger(e))throw new A({info:{code:"ENC_TIME_TYPE",...k}},`Time must be an integer: ${e}`);let n,r="";for(let i=t;i>0;i--)n=e%32,r=O.charAt(n)+r,e=(e-n)/32;return r}(isNaN(e)?Date.now():e,10)+function(e,t){let n="";for(;e>0;e--)n=M(t)+n;return n}(16,n)}var $="yext_analytics_session_id";const I="1.0.0";function F(e,t,n){return n.debug?(B(!1,t,n),Promise.resolve(new Response)):fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0})}function B(e,t,n){var r=e?"Beacon":"fetch()";console.log("[DEBUG] AnalyticsConfig object at time of call to report():",n),console.log("[DEBUG] The following EventPayload would be sent to the Yext Events API using ".concat(r,":"),t)}var z=function(){return z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},z.apply(this,arguments)},K=function(e,t){if(!t||0===Object.keys(t).length)return e;if(!e||0===Object.keys(e).length)return t;var n=JSON.parse(JSON.stringify(e));for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];null==i?delete n[r]:n[r]="object"!=typeof i?i:K(n[r],i)}return z({},n)};var H=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))},W=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(l){s=[6,l],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};!function(){function e(e,t){if("apiKey"!==e.authorizationType&&"bearer"!==e.authorizationType)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}e.prototype.with=function(t){var n=void 0===this.payload?t:K(this.payload,t);return new e(this.config,n)},e.prototype.report=function(e){var t;return H(this,void 0,void 0,(function(){var n,r,i,o,a=this;return W(this,(function(s){return n=K(null!==(t=this.payload)&&void 0!==t?t:{},e??{}),this.config.sessionTrackingEnabled?n.sessionId||(n.sessionId=function(){if(typeof window>"u")return null;try{var t=window.sessionStorage.getItem($);return t||(t=P(),window.sessionStorage.setItem($,t)),t}catch(e){return console.warn("Unable to use browser sessionStorage for sessionId.\n",e),null}}()):n.sessionId=void 0,n.clientSdk?n.clientSdk.ANALYTICS=I:n.clientSdk=((o={}).ANALYTICS=I,o),n.authorization="apiKey"===this.config.authorizationType?"KEY "+this.config.authorization:"Bearer "+this.config.authorization,r=function(e,t){return!t&&!!navigator.userAgent&&navigator.userAgent.toLowerCase().includes("firefox")}
1(0,this.config.forceFetch),i=function(e,t){var n="SANDBOX"===e,r=null==t?void 0:t.toLowerCase();if(n&&"eu"===r)throw new Error("Sandbox environment is not available in the EU region.");return"https://"+(n?"sbx.":"")+(r??"us")+".yextevents.com/accounts/me/events"}(this.config.env,this.config.region),r?[2,new Promise((function(e,t){!function(e,t,n){return n.debug?(B(!0,t,n),!0):navigator.sendBeacon(e,JSON.stringify(t))}(i,n,a.config)?t("Failed Beacon Call"):e("")}))]:[2,F(i,n,this.config).then((function(e){return e})).catch((function(e){return e}))]}))}))}}();const U=(0,r.createContext)(null);(0,r.lazy)((()=>n.e(3612).then(n.bind(n,23612))));const j=(0,r.createContext)({name:""}),G=()=>(0,r.useContext)(j).name;function Y(){const e=(0,r.useContext)(U);if(!e)return e;"browser"===x().name&&!window.setAnalyticsOptIn&&(window.setAnalyticsOptIn=async()=>{await e.optIn()});const t=G();return{getDebugEnabled:()=>e.getDebugEnabled(),identify:t=>e.identify(t),optIn:()=>e.optIn(),pageView:()=>e.pageView(),track:n=>e.track({...n,scope:n.scope??t})}}var Z,V={exports:{}};Z=V,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var i=arguments[t];i&&(e=r(e,n(i)))}return e}
1function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var o in n)e.call(n,o)&&n[o]&&(i=r(i,o));return i}function r(e,t){return t?e?e+" "+t:e+t:e}Z.exports?(t.default=t,Z.exports=t):window.classNames=t}();const J=u(V.exports),q="calltoactionclick",X="link",Q=e=>te(e)?"EMAIL":e.startsWith("tel:")?"PHONE":"URL",ee=e=>"EMAIL"===e.linkType?e.link.startsWith("mailto:")?e.link:`mailto:${e.link}`:"PHONE"===e.linkType?e.link.startsWith("tel:")?e.link:`tel:${e.link}`:e.link,te=e=>!!e.startsWith("mailto:")||/^[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(e);(0,r.forwardRef)((function(e,t){const{children:n,onClick:r,className:i,eventName:o,scope:a,currency:s,amount:l,cta:u,obfuscate:d,customTags:c,customValues:h,...p}=e,f=(e=>{const t=e.cta??{link:e.href};if(!t.link)throw e.cta?new Error("CTA's link is undefined"):new Error("Link's href is undefined");return t.linkType||(t.linkType=Q(t.link)),t.link=ee(t),t})(e),m=((e,t)=>{switch(e.linkType){case"EMAIL":case"OTHER":return"CTA_CLICK";case"PHONE":return"TAP_TO_CALL";case"CLICK_TO_WEBSITE":return"WEBSITE";case"DRIVING_DIRECTIONS":return"DRIVING_DIRECTIONS";case"URL":return"LINK";default:return t?"CTA_CLICK":"LINK"}})(f,!!u),_=((e,t,n)=>{if(e)return e;if(t)switch(t){case"PHONE":return"phonecall";case"EMAIL":return q;case"URL":return X;case"DRIVING_DIRECTIONS":return"drivingdirection";case"CLICK_TO_WEBSITE":return"clicktowebsite";case"OTHER":return"other";default:return n?q:X}return"cta"})(o,f.linkType,!!u),y=Y(),v=d||!1!==d&&"EMAIL"===f.linkType,E=v?"Obfuscated, set a label or child":f.link,N={className:J("Link",i),href:v?btoa(f.link):f.link,onClick:async e=>{const t=e.currentTarget;let n="";if(v){e.preventDefault();const r=t.href.split("/").at(-1);r&&(n=atob(r))}if(null!==y)try{await y.track({action:m,scope:a,eventName:_,currency:s,amount:l,destinationUrl:n||t.href,customTags:c,customValues:h})}catch{console.error("Failed to report click Analytics Event")}r&&r(e),n&&(window.location.href=n)},rel:e.target&&!e.rel?"noopener":void 0,ref:t};return null!=y&&y.getDebugEnabled()&&(N["data-ya-action"]=m,N["data-ya-scopeoverride"]=a,N["data-ya-eventname"]=_),g.jsx("a",{...p,...N,suppressHydrationWarning:!0,children:n||f.label||E})}));var ne=(e=>(e.DEGREE="deg",e.KILOMETER="km",e.MILE="mi",e.RADIAN="r",e))(ne||{}),re=(e=>(e.MERCATOR="mercator",e.SPHERICAL="spherical",e))(re||{});const ie=3959,oe=6371,ae=["latitude","lat"],se=["longitude","lon","lng","long"];function le(e,t){for(const n of t)if(e[n]||0===e[n])return e[n]}function ue(e){switch(typeof e){case"string":case"number":const t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error(`'${e}' must be convertible to a Number'`);return t;default:throw new Error(`typeof '${e}' must be a number or a string that can be converted to a number, is '${typeof e}'`)}}function de(e){return e*Math.PI/180}function ce(e){return e/Math.PI*180}class he{constructor(e,t){s(this,"_lat"),s(this,"_lon");let n=e,r=t;this._lat=0,this._lon=0,"object"==typeof e?(n=le(e,ae)??0,r=le(e,se)??0,this.latitude="function"==typeof n?n():n,this.longitude="function"==typeof r?r():r):"number"==typeof n&&"number"==typeof r&&(this.latitude=n,this.longitude=r)}get latitude(){return this._lat}set latitude(e){this._lat=Math.max(-90,Math.min(ue(e),90))}get longitude(){return this._lon}set longitude(e){this._lon=ue(e)}get normalLon(){return((this._lon+180)%360+360)%360-180}add(e,t,n=ne.DEGREE,r=re.SPHERICAL){if(r!==re.MERCATOR||n!==ne.DEGREE&&n!==ne.RADIAN)switch(n){case ne.DEGREE:this.latitude+=e,this.longitude+=t;break;case ne.KILOMETER:this.latitude+=ce(e)*oe,this.longitude+=ce(t)*oe*Math.cos(de(this.latitude));break;case ne.MILE:this.latitude+=ce(e)*ie,this.longitude+=ce(t)*ie*Math.cos(de(this.latitude));break;case ne.RADIAN:this.latitude+=ce(e),this.longitude+=ce(t);break;default:throw new Error(`unit unhandled: ${String(n)}`)}else{const r=n===ne.DEGREE?de(e):e,i=n===ne.DEGREE?t:ce(t);this.latitude=function(e,t){const n=Math.tan(Math.PI/360*(e+90))*Math.pow(Math.E,t);return 360*Math.atan(n)/Math.PI-90}(this.latitude,r),this.longitude+=i}}distanceTo(e,t=ne.MILE,n=re.SPHERICAL){if(n!==re.MERCATOR||t!==ne.DEGREE&&t!==ne.RADIAN){const n=function(e,t){const n=de(e.latitude),r=de(t.latitude),i=r-n,o=de(t.longitude-e.longitude),a=Math.pow(Math.sin(i/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(o/2),2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}(this,e);switch(t){case ne.DEGREE:return ce(n);case ne.KILOMETER:return n*oe;case ne.MILE:return n*ie;
1case ne.RADIAN:return n;default:throw new Error(`unit unhandled: ${String(t)}`)}}else{const n=function(e,t){const n=Math.tan(Math.PI/360*(e+90)),r=Math.tan(Math.PI/360*(t+90));return Math.log(r/n)}(this.latitude,e.latitude),r=Math.abs(e.normalLon-this.normalLon),i=de(Math.min(r,360-r)),o=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));switch(t){case ne.DEGREE:return ce(o);case ne.RADIAN:return o;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 ge(e,t=(()=>null)){const n=document.createElement("script");n.async=!0,n.onload=t,n.src=e,document.head.appendChild(n)}var pe=(e=>(e.UNDEFINED="undefined",e.NULL="object",e.BOOLEAN="boolean",e.NUMBER="number",e.BIGINT="bigint",e.STRING="string",e.SYMBOL="symbol",e.FUNCTION="function",e.OBJECT="object",e))(pe||{});function fe(e,t){if("string"!=typeof t)throw new Error("Assertion error: 'type' must be a string");if(typeof e!==t)throw new Error(`Expected an object of type '${t}' but received '${typeof e}'`)}function me(e,t){let n;try{n=e instanceof t}catch{throw new Error("Assertion error: 'instanceClass' is not a valid constructor")}if(!n)throw new Error(`Expected an instance of '${t.name}' but received '${e.constructor.name}'`)}class _e{constructor(e,t){s(this,"providerMapClass"),s(this,"wrapper"),s(this,"controlEnabled"),s(this,"panHandler"),s(this,"panStartHandler"),s(this,"providerOptions"),me(e,Te),t&&me(t,HTMLElement),this.providerMapClass=e.getMapClass(),this.wrapper=t,this.controlEnabled=!0,this.panH
1andler=()=>null,this.panStartHandler=()=>null,this.providerOptions={}}withControlEnabled(e){return this.controlEnabled=e,this}withPanHandler(e){return fe(e,pe.FUNCTION),this.panHandler=e,this}withPanStartHandler(e){return fe(e,pe.FUNCTION),this.panStartHandler=e,this}withProviderOptions(e){return this.providerOptions=e,this}build(){return new(0,this.providerMapClass)(this)}}class ye{constructor(e){s(this,"_panHandler"),s(this,"_panStartHandler"),me(e,_e),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,n){this.setZoom(e,n),this.setCenter(t,n)}}class ve{constructor(e){s(this,"providerPinClass"),s(this,"clickHandler"),s(this,"focusHandler"),s(this,"hoverHandler"),s(this,"icons"),s(this,"hasPinUrl"),me(e,Te),this.providerPinClass=e.getPinClass(),this.clickHandler=()=>null,this.focusHandler=e=>null,this.hoverHandler=e=>null,this.icons={},this.hasPinUrl=!1}withClickHandler(e){return fe(e,pe.FUNCTION),this.clickHandler=e,this}withFocusHandler(e){return fe(e,pe.FUNCTION),this.focusHandler=e,this}withHoverHandler(e){return fe(e,pe.FUNCTION),this.hoverHandler=e,this}withIcons(e){return this.icons=e,this}withHasPinUrl(e){return this.hasPinUrl=e,this}build(){return new(0,this.providerPinClass)(this)}}class Ee{constructor(e){s(this,"_clickHandler"),s(this,"_focusHandler"),s(this,"_hoverHandler"),s(this,"_icons"),me(e,ve),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 Ne=Object.freeze({backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"contain",left:"0",outline:"none",pointerEvents:"auto",position:"absolute",top:"0"});class Ce extends Ee{constructor(e){super(e),s(this,"_pinEl"),s(this,"_pinAlt"),s(this,"_wrapper"),this._pinEl=e.hasPinUrl?document.createElement("div"):document.createElement("button"),Object.assign(this._pinEl.style,Ce.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 Ne}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(e){this.setElementProperties(e);const t=e.getClass(),n=e.getElement()||this._pinEl,r=e.getZIndex();n.style.pointerEvents="auto",this._wrapper&&(this._wrapper.style.zIndex=r.toString(),this._wrapper.setAttribute("class",t),n!==this._wrapper.children[0]&&(this._wrapper.children[0].style.pointerEvents="",this._wrapper.removeChild(this._wrapper.children[0]),this._wrapper.appendChild(n)))}setElementProperties(e){const t=e.getAnchorX(),n=e.getAnchorY(),r=e.getHeight(),i=this._icons[e.getIcon()],o=e.getSRText(),a=e.getWidth();Object.assign(this._pinEl.style,{backgroundImage:i?`url("${i}")`:"",height:r+"px",transform:`translate(${-100*t}%, ${-100*n}%)`,width:a+"px"}),this._pinAlt.innerText=o}}class be{constructor(){s(this,"loadFunction"),s(this,"mapClass"),s(this,"pinClass"),s(this,"providerName"),this.loadFunction=(e,t,n,r)=>e(),this.mapClass=ye,this.pinClass=Ee,this.providerName=""}withLoadFunction(e){return fe(e,pe.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 Te(this)}}class Te{constructor(e){s(this,"_loadFunction"),s(this,"_mapClass"),s(this,"_pinClass"),s(this,"_providerName"),s(this,"_loadPromise"),s(this,"_resolveLoad"),s(this,"_rejectLoad"),s(this,"_apiKey"),s(this,"_loadInvoked"),s(this,"_loaded"),s(this,"_options"),me(e,be),this._loadFunction=e.loadFunction,this._mapClass=e.mapClass,this._pinClass=e.pinClass,this._providerName=e.providerName,this._loadPromise=new Promise(((e,t)=>{this._resolveLoad=e,this._rejectLoad=t})),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)}}const xe="GoogleMapsCallback_b7d77ff2";
1(new be).withLoadFunction((function(e,t,n,{autocomplete:r=!1,channel:i=window.location.hostname,client:o,language:a,region:s,libraries:l=[],loading:u="async",params:d={}}={}){window[xe]=e,r&&l.push("geocoder","places");const c={callback:xe,channel:i,libraries:l.join(","),...d};n&&(c.key=n),o&&(c.client=o),a&&(c.language=a),s&&(c.region=s),u&&(c.loading=u),ge("https://maps.googleapis.com/maps/api/js?"+Object.entries(c).map((([e,t])=>e+"="+t)).join("&"))})).withMapClass(class extends ye{constructor(e){super(e),s(this,"map"),s(this,"_moving"),e.wrapper&&(this.map=new google.maps.Map(e.wrapper,{disableDefaultUI:!e.controlEnabled,fullscreenControl:!1,gestureHandling:e.controlEnabled?"auto":"none",mapTypeControl:!1,rotateControl:!1,scaleControl:!1,streetViewControl:!1,zoomControl:e.controlEnabled,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP},...e.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 e;return new he((null==(e=this.map)?void 0:e.getCenter())??{lat:0,lng:0})}getZoom(){var e;return(null==(e=this.map)?void 0:e.getZoom())??0}setCenter(e,t){var n,r;const i=new google.maps.LatLng(e.latitude,e.longitude);t?null==(n=this.map)||n.panTo(i):null==(r=this.map)||r.setCenter(i)}setZoom(e,t){var n;null==(n=this.map)||n.setZoom(Math.floor(e))}setZoomCenter(e,t,n){this.setCenter(t,n),this.setZoom(e,n)}}).withPinClass(class extends Ce{constructor(e){super(e),s(this,"_latLng"),s(this,"pin"),this._wrapper&&(this._wrapper.style.position="absolute",google.maps.OverlayView.preventMapHitsAndGesturesFrom(this._wrapper));class t extends google.maps.OverlayView{constructor(e){super(),s(this,"pin"),this.pin=e}draw(){var e;const t=null==(e=this.getProjection())?void 0:e.fromLatLngToDivPixel(this.pin._latLng??null);t&&this.pin._wrapper&&(this.pin._wrapper.style.left=t.x+"px",this.pin._wrapper.style.top=t.y+"px")}onAdd(){var e;this.pin._wrapper&&(null==(e=this.getPanes())||e.floatPane.appendChild(this.pin._wrapper))}onRemove(){var e,t;null==(t=null==(e=this.pin._wrapper)?void 0:e.parentNode)||t.removeChild(this.pin._wrapper)}}this.pin=new t(this)}setCoordinate(e){this._latLng=new google.maps.LatLng(e.latitude,e.longitude),this.pin.draw()}setMap(e,t){var n;const r=null==(n=null==e?void 0:e.getProviderMap())?void 0:n.map;this.pin.setMap(r??null)}}).withProviderName("Google").build();(0,r.createContext)(null);(0,r.createContext)(null);var we,Se,Ae,Oe={};function Re(){if(we)return Oe;we=1;var e=r;let t=e.createContext(null);return Oe.LexicalComposerContext=t,Oe.createLexicalComposerContext=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return t??(null!=n?n.getTheme():null)}}},Oe.useLexicalComposerContext=function(){let n=e.useContext(t);return null==n&&function(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),n},Oe}function ke(){return Ae||(Ae=1,Se=Re()),Se}var De,Me,Pe,$e={};function Ie(){if(De)return $e;De=1;let e={},t={},n={},r={},i={},o={},a={},s={},l={},u={},d={},c={},h={},g={},p={},f={},m={},_={},y={},v={},E={},N={},C={},b={},T={},x={},w={},S={},A={},O={},R={},k={},D={},M={},P={},$={};function I(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let L=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",F=L&&"documentMode"in document?document.documentMode:null,B=L&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),z=L&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),K=!(!L||!("InputEvent"in window)||F)&&"getTargetRanges"in new window.InputEvent("input"),H=L&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),W=L&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,U=L&&/Android/.test(navigator.userAgent),j=L&&/^(?=.*Chrome).*/i.test(navigator.userAgent),G=L&&/AppleWeb
1Kit\/[\d.]+/.test(navigator.userAgent)&&!j,Y=H||W||G?"\xa0":"\u200b",Z=z?"\xa0":Y,V=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,J=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,q={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},X={directionless:1,unmergeable:2},Q={center:2,end:6,justify:4,left:1,right:3,start:5},ee={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},te={normal:0,segmented:2,token:1},ne={0:"normal",2:"segmented",1:"token"},re=!1,ie=0;function oe(e){ie=e.timeStamp}function ae(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function se(e,t,n){re=!0;let r=100<performance.now()-ie;try{Rr(e,(()=>{let i=rr()||function(e){return e.getEditorState().read((()=>{let e=rr();return null!==e?e.clone():null}))}(e);var o=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let u=!1,d="";for(var c=0;c<t.length;c++){var h=t[c],g=h.type,p=h.target,f=Re(p,s);if(!(null===f&&p!==a||Dr(f)))if("characterData"===g){if(h=r&&kn(f))e:{g=p;var m=f;if(Wn(h=i)){var _=h.anchor.getNode();if(_.is(m)&&h.format!==_.getFormat()){h=!1;break e}}h=3===g.nodeType&&m.isAttached()}h&&(g=h=null,null!==(m=at(e._window))&&m.anchorNode===p&&(h=m.anchorOffset,g=m.focu
1sOffset),null!==(p=p.nodeValue)&&He(f,p,h,g,!1))}else if("childList"===g){for(u=!0,g=h.addedNodes,m=0;m<g.length;m++){var y=Oe(_=g[m]),v=_.parentNode;null==v||_===l||null!==y||"BR"===_.nodeName&&ae(_,v,e)||(z&&(y=_.innerText||_.nodeValue)&&(d+=y),v.removeChild(_))}if(0<(g=(h=h.removedNodes).length)){for(m=0,_=0;_<g;_++)("BR"===(v=h[_]).nodeName&&ae(v,p,e)||l===v)&&(p.appendChild(v),m++);g!==m&&(p===a&&(f=s._nodeMap.get("root")),o.set(p,f))}}}if(0<o.size)for(let[t,n]of o)if(Pr(n))for(o=n.getChildrenKeys(),a=t.firstChild,s=0;s<o.length;s++)null!==(l=e.getElementByKey(o[s]))&&(null==a?(t.appendChild(l),a=l):a!==l&&t.replaceChild(l,a),a=a.nextSibling);else kn(n)&&n.markDirty();if(0<(o=n.takeRecords()).length){for(a=0;a<o.length;a++)for(s=(l=o[a]).addedNodes,l=l.target,c=0;c<s.length;c++)null==(p=(f=s[c]).parentNode)||"BR"!==f.nodeName||ae(f,l,e)||p.removeChild(f);n.takeRecords()}null!==i&&(u&&(i.dirty=!0,Ie(i)),z&&Ye(e)&&i.insertRawText(d))}))}finally{re=!1}}function le(e){let t=e._observer;if(null!==t){se(e,t.takeRecords(),t)}}function ue(e){0===ie&&Xe(e).addEventListener("textInput",oe,!0),e._observer=new MutationObserver(((t,n)=>{se(e,t,n)}))}function de(e,t){let n=e.__mode,r=e.__format;e=e.__style;let i=t.__mode,o=t.__format;return t=t.__style,(null===n||n===i)&&(null===r||r===o)&&(null===e||e===t)}function ce(e,t){let n=e.mergeWithSibling(t),r=Nr()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function he(e){if(""===e.__text&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;null!==(t=e.getPreviousSibling())&&kn(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){de(t,e)&&(e=ce(t,e));break}t.remove()}for(var n;null!==(n=e.getNextSibling())&&kn(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){de(e,n)&&ce(e,n);break}n.remove()}}}function ge(e){return pe(e.anchor),pe(e.focus),e}function pe(e){for(;"element"===e.type;){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),kn(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}if(!Pr(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let fe=1,me="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function _e(e){let t=document.activeElement;if(null===t)return!1;let n=t.nodeName;return Dr(Re(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==t.__lexicalEditor)}function ye(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!_e(t)&&ve(t)===e}catch{return!1}}function ve(e){for(;null!=e;){let t=e.__lexicalEditor;if(null!=t)return t;e=Je(e)}return null}function Ee(e){return e.isToken()||e.isSegmented()}function Ne(e){for(;null!=e;){if(3===e.nodeType)return e;e=e.firstChild}return null}function Ce(e,t,n){let r=q[t];return null!==n&&(e&r)===(n&r)||(e^=r,"subscript"===t?e&=-65:"superscript"===t&&(e&=-33)),e}function be(e,t){if(null!=t)e.__key=t;else{vr(),99<mr&&I(14),t=Nr();var n=Er(),r=""+fe++;n._nodeMap.set(r,e),Pr(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function Te(e){var t=e.getParent();if(null!==t){let i=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),null===n)if(null!==e){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),null!==e){let t=e.getWritable();t.__prev=r.__key,r.__next=t.__key}else r.__next=null;i.__prev=null}null===e?null!==n?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),null!==n?((n=n.getWritable()).__next=e.__key,e.__prev=n.__key):e.__prev=null,i.__next=null),t.__size--,i.__parent=null}}function xe(e){99<mr&&I(14);var t=e.getLatest(),n=t.__parent,r=Er();let i=Nr(),o=r._nodeMap;if(r=i._dirtyElements,null!==n)e:for(;null!==n&&!r.has(n);){let e=o.get(n);if(void 0===e)break;r.set(n,!1),n=e.__parent}t=t.__key,i._dirtyType=1,Pr(e)?r.set(t,!0):i._dirtyLeaves.add(t)}function we(e){vr();var t=Nr();let n=t._compositionKey;e!==n&&(t._compositionKey=e,null!==n&&(null!==(t=Ae(n))&&t.getWritable()),null!==e&&(null!==(e=Ae(e))&&e.getWritable()))}function Se(){return yr()?null:Nr()._compositionKey}function Ae(e,t){return void 0===(e=(t||Er())._nodeMap.get(e))?null:e}function Oe(e,t){return void 0!==(e=e[`__lexicalKey_${Nr()._key}`])?Ae(e,t):null}function Re(e,t){for(;null!=e;){let n=Oe(e,t);if(null!==n)return n;e=Je(e)}return null}function ke(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function Me(e){return e.read((()=>Pe().getTextContent()))}function Pe(){return Er()._nodeMap.get("root")}function Ie(e){vr();let t=Er();
1null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Le(e){var t,n=Nr();e:{for(t=e;null!=t;){let e=t[`__lexicalKey_${n._key}`];if(void 0!==e){t=e;break e}t=Je(t)}t=null}return null===t?e===(n=n.getRootElement())?Ae("root"):null:Ae(t)}function Fe(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Be(e){let t=[];for(;null!==e;)t.push(e),e=e._parentEditor;return t}function ze(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Ke(e,t,n){if(null!==(t=at(t._window))){var r=t.anchorNode,{anchorOffset:i,focusOffset:o}=t;if(null!==r&&(t=3===r.nodeType?r.nodeValue:null,r=Re(r),null!==t&&kn(r))){if(t===Y&&n){t=n,o=i=n.length}null!==t&&He(r,t,i,o,e)}}}function He(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){let u=o.isComposing(),d=t;if((u||i)&&t[t.length-1]===Y&&(d=t.slice(0,-1)),t=o.getTextContent(),i||d!==t)if(""===d)if(we(null),H||W||G)o.remove();else{let e=Nr();setTimeout((()=>{e.update((()=>{o.isAttached()&&o.remove()}))}),20)}else{i=o.getParent(),t=ir();var a=o.getTextContentSize(),s=Se(),l=o.getKey();o.isToken()||null!==s&&l===s&&!u||Wn(t)&&(null!==i&&!i.canInsertTextBefore()&&0===t.anchor.offset||t.anchor.key===e.__key&&0===t.anchor.offset&&!o.canInsertTextBefore()&&!u||t.focus.key===e.__key&&t.focus.offset===a&&!o.canInsertTextAfter()&&!u)?o.markDirty():(Wn(e=rr())&&null!==n&&null!==r&&(e.setTextNodeRange(o,n,o,r),o.isSegmented()&&(n=Rn(n=o.getTextContent()),o.replace(n),o=n)),o.setTextContent(d))}}}function We(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return void 0!==r?r:"string"==typeof(e=e[t])?(e=e.split(" "),n[t]=e):e}function Ue(e,t,n,r,i){0!==n.size&&(n=r.__type,r=r.__key,void 0===(t=t.get(n))&&I(33,n),n=t.klass,void 0===(t=e.get(n))&&(t=new Map,e.set(n,t)),n="destroyed"===(e=t.get(r))&&"created"===i,(void 0===e||n)&&t.set(r,n?"updated":i))}function je(e,t,n){let r=e.getParent(),i=n;return null!==r&&(t&&0===n?(i=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(i=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?i-1:i)}function Ge(e,t){var n=e.offset;return"element"===e.type?je(e=e.getNode(),t,n):(e=e.getNode(),t&&0===n||!t&&n===e.getTextContentSize()?null===(n=t?e.getPreviousSibling():e.getNextSibling())?je(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n:null)}function Ye(e){return"insertFromPaste"===(e=(e=Xe(e).event)&&e.inputType)||"insertFromPasteAsQuotation"===e}function Ze(e){return!Lr(e)&&!e.isLastChild()&&!e.isInline()}function Ve(e,t){return void 0===(e=e._keyToDOMMap.get(t))&&I(75,t),e}function Je(e){return null!==(e=e.assignedSlot||e.parentElement)&&11===e.nodeType?e.host:e}function qe(e,t){for(e=e.getParent();null!==e;){if(e.is(t))return!0;e=e.getParent()}return!1}function Xe(e){return null===(e=e._window)&&I(78),e}function Qe(e){for(e=e.getParentOrThrow();null!==e&&!et(e);)e=e.getParentOrThrow();return e}function et(e){return Lr(e)||Pr(e)&&e.isShadowRoot()}function tt(e){return be(e=e.constructor.clone(e),null),e}function nt(e){var t=Nr();let n=e.constructor.getType();return void 0===(t=t._nodes.get(n))&&I(97),null!==(t=t.replace)?((t=t(e))instanceof e.constructor||I(98),t):e}function rt(e,t){!Lr(e=e.getParent())||Pr(t)||Dr(t)||I(99)}function it(e){return(Dr(e)||Pr(e)&&!e.canBeEmpty())&&!e.isInline()}function ot(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,null!==(t=e.parentElement)&&t.removeChild(e)}function at(e){return L?(e||window).getSelection():null}function st(e,t){for(;e!==Pe()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}function lt(e){return 1===e.nodeType}function ut(e){if(Dr(e)&&!e.isInline())return!0;if(!Pr(e)||et(e))return!1;var t=e.getFirstChild();return t=null===t||fn(t)||kn(t)||t.isInline(),!e.isInline()&&!1!==e.canBeEmpty()&&t}function dt(e,t){for(;null!==e&&null!==e.getParent()&&!t(e);)e=e.getParentOrThrow();return t(e)?e:null}function ct(e,t,n,r,i,o){for(e=e.getFirstChild();null!==e;){let a=e.__key;e.__parent===t&&(Pr(e)&&ct(e,a,n,r,i,o),n.has(a)||o.delete(a),i.push(a)),e=e.getNextSibling()}}let ht,gt,pt,ft,mt,_t,yt,vt,Et,Nt,Ct="",bt="",Tt="",xt=!1,wt=!1,St=null;function At(e,t){let n=yt.get(e);if(null!==t){let n=Ht(e);n.parentNode===t&&t.removeChild(n)}vt.has(e)||gt._keyToDOMMap.delete(e),Pr(n)&&Ot(e=Ft(n,yt),0,e.length-1,null),void 0!==n&&Ue(Nt,pt,ft,n,"destroyed")}function Ot(e,t,n,r){for(;t<=n;++t){let n=e[t];void 0!==n&&At(n,r)}}function Rt(e,t){e.setProperty("text-align",t)}function kt(e,t){var n=ht.theme.indent;if("string"==typeof n){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${n})`)}function Dt(e,t){e=e.style,0===t?Rt(e,""):1===t?Rt(e,"left"):2===t?Rt(e,"center"):3===t?Rt(e,"right"):4===t?Rt(e,"justify"):5===t?Rt(e,"start"):6===t&&Rt(e,"end")}function Mt(e,t,n){let r=vt.get(e);void 0===r&&I(60);let i=r.createDOM(ht,gt);var o=gt._keyToDOMMap;if(i["__lexicalKey_"+gt._key]=e,o.set(e,i),kn(r)?i.setAttribute("data-lexical-text","true"):Dr(r)&&i.setAttribute("data-lexical-decorator","true"),Pr(r)){if(e=r.__indent,o=r.__size,0!==e&&kt(i,e),0!==o){--o,e=Ft(r,vt);var a=bt;bt="",Pt(e,r,0,o,i,null),Lt(r,i),bt=a}0!==(e=r.__format)&&Dt(i,e),r.isInline()||It(null,r,i),Ze(r)&&(Ct+="\n\n",Tt+="\n\n")}else o=r.getTextContent(),Dr(r)?(null!==(a=r.decorate(gt,ht))&&zt(e,a),i.contentEditable="false"):kn(r)&&(r.isDirectionless()||(bt+=o)),Ct+=o,Tt+=o;return null!==t&&(null!=n?t.insertBefore(i,n):null!=(n=t.__lexicalLineBreak)?t.insertBefore(i,n):t.appendChild(i)),Ue(Nt,pt,ft,r,"created"),i}function Pt(e,t,n,r,i,o){let a=Ct;
1for(Ct="";n<=r;++n)Mt(e[n],i,o);Ze(t)&&(Ct+="\n\n"),i.__lexicalTextContent=Ct,Ct=a+Ct}function $t(e,t){return fn(e=t.get(e))||Dr(e)&&e.isInline()}function It(e,t,n){e=null!==e&&(0===e.__size||$t(e.__last,yt)),t=0===t.__size||$t(t.__last,vt),e?t||(null!=(t=n.__lexicalLineBreak)&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function Lt(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==bt||n!==St){let o=""===bt;if(o)var r=St;else r=bt,r=V.test(r)?"rtl":J.test(r)?"ltr":null;if(r!==n){let a=t.classList,s=ht.theme;var i=null!==n?s[n]:void 0;let l=null!==r?s[r]:void 0;void 0!==i&&("string"==typeof i&&(i=i.split(" "),i=s[n]=i),a.remove(...i)),null===r||o&&"ltr"===r?t.removeAttribute("dir"):(void 0!==l&&("string"==typeof l&&(n=l.split(" "),l=s[r]=n),void 0!==l&&a.add(...l)),t.dir=r),wt||(e.getWritable().__dir=r)}St=r,t.__lexicalDirTextContent=bt,t.__lexicalDir=r}}function Ft(e,t){let n=[];for(e=e.__first;null!==e;){let r=t.get(e);void 0===r&&I(101),n.push(e),e=r.__next}return n}function Bt(e,t){var n=yt.get(e),r=vt.get(e);void 0!==n&&void 0!==r||I(61);var i=xt||_t.has(e)||mt.has(e);let o=Ve(gt,e);if(n===r&&!i)return Pr(n)?(void 0!==(r=o.__lexicalTextContent)&&(Ct+=r,Tt+=r),void 0!==(r=o.__lexicalDirTextContent)&&(bt+=r)):(r=n.getTextContent(),kn(n)&&!n.isDirectionless()&&(bt+=r),Tt+=r,Ct+=r),o;if(n!==r&&i&&Ue(Nt,pt,ft,r,"updated"),r.updateDOM(n,o,ht))return r=Mt(e,null,null),null===t&&I(62),t.replaceChild(r,o),At(e,null),r;if(Pr(n)&&Pr(r)){if((e=r.__indent)!==n.__indent&&kt(o,e),(e=r.__format)!==n.__format&&Dt(o,e),i){e=bt,bt="",i=Ct;var a=n.__size,s=r.__size;if(Ct="",1===a&&1===s){var l=n.__first;if(l===(t=r.__first))Bt(l,o);else{var u=Ht(l);t=Mt(t,null,null),o.replaceChild(t,u),At(l,null)}}else{t=Ft(n,yt);var d=Ft(r,vt);if(0===a)0!==s&&Pt(d,r,0,s-1,o,null);else if(0===s)0!==a&&(Ot(t,0,a-1,(l=null==o.__lexicalLineBreak)?null:o),l&&(o.textContent=""));else{var c=t;t=d,d=a-1,a=s-1;let e=o.firstChild,n=0;for(s=0;n<=d&&s<=a;){var h=c[n];let r=t[s];if(h===r)e=Kt(Bt(r,o)),n++,s++;else{void 0===l&&(l=new Set(c)),void 0===u&&(u=new Set(t));let i=u.has(h),a=l.has(r);i?(a?((h=Ve(gt,r))===e?e=Kt(Bt(r,o)):(null!=e?o.insertBefore(h,e):o.appendChild(h),Bt(r,o)),n++):Mt(r,o,e),s++):(e=Kt(Ht(h)),At(h,o),n++)}}u=s>a,(l=n>d)&&!u?Pt(t,r,s,a,o,l=void 0===(l=t[a+1])?null:gt.getElementByKey(l)):u&&!l&&Ot(c,n,d,o)}}Ze(r)&&(Ct+="\n\n"),o.__lexicalTextContent=Ct,Ct=i+Ct,Lt(r,o),bt=e,Lr(r)||r.isInline()||It(n,r,o)}Ze(r)&&(Ct+="\n\n",Tt+="\n\n")}else n=r.getTextContent(),Dr(r)?null!==(i=r.decorate(gt,ht))&&zt(e,i):kn(r)&&!r.isDirectionless()&&(bt+=n),Ct+=n,Tt+=n;return!wt&&Lr(r)&&r.__cachedText!==Tt&&(r.getWritable().__cachedText=Tt),o}function zt(e,t){let n=gt._pendingDecorators,r=gt._decorators;if(null===n){if(r[e]===t)return;n=ke(gt)}n[e]=t}function Kt(e){return null!==(e=e.nextSibling)&&e===gt._blockCursorElement&&(e=e.nextSibling),e}function Ht(e){let t=Et.get(e);return void 0===t&&I(75,e),t}let Wt=Object.freeze({}),Ut=[["keydown",function(e,t){if(jt=e.timeStamp,Gt=e.keyCode,!t.isComposing()){var{keyCode:i,shiftKey:o,ctrlKey:a,metaKey:s,altKey:w}=e;if(!Sr(t,g,e)){if(39!==i||a||s||w)if(39!==i||w||o||!a&&!s)if(37!==i||a||s||w)if(37!==i||w||o||!a&&!s)if(38!==i||a||s)if(40!==i||a||s)if(13===i&&o)Xt=!0,Sr(t,E,e);else if(32===i)Sr(t,N,e);else if(B&&a&&79===i)e.preventDefault(),Xt=!0,Sr(t,r,!0);else if(13!==i||o){var S=B?!w&&!s&&(8===i||72===i&&a):!(a||w||s)&&8===i;S?8===i?Sr(t,C,e):(e.preventDefault(),Sr(t,n,!0)):27===i?Sr(t,b,e):(S=B?!(o||w||s)&&(46===i||68===i&&a):!(a||w||s)&&46===i)?46===i?Sr(t,T,e):(e.preventDefault(),Sr(t,n,!1)):8===i&&(B?w:a)?(e.preventDefault(),Sr(t,l,!0)):46===i&&(B?w:a)?(e.preventDefault(),Sr(t,l,!1)):B&&s&&8===i?(e.preventDefault(),Sr(t,u,!0)):B&&s&&46===i?(e.preventDefault(),Sr(t,u,!1)):66===i&&!w&&(B?s:a)?(e.preventDefault(),Sr(t,d,"bold")):85===i&&!w&&(B?s:a)?(e.preventDefault(),Sr(t,d,"underline")):73===i&&!w&&(B?s:a)?(e.preventDefault(),Sr(t,d,"italic")):9!==i||w||a||s?90===i&&!o&&(B?s:a)?(e.preventDefault(),Sr(t,c,void 0)):(S=B?90===i&&s&&o:89===i&&a||90===i&&a&&o)?(e.preventDefault(),Sr(t,h,void 0)):Gn(t._editorState._selection)?(S=!o&&(67===i&&(B?s:a)))?(e.preventDefault(),Sr(t,R,e)):(S=!o&&(88===i&&(B?s:a)))?(e.preventDefault(),Sr(t,k,e)):65===i&&(B?s:a)&&(e.preventDefault(),Sr(t,D,e)):!z&&65===i&&(B?s:a)&&(e.preventDefault(),Sr(t,D,e)):Sr(t,x,e)}else Xt=!1,Sr(t,E,e);else Sr(t,v,e);else Sr(t,y,e);else Sr(t,_,e);else Sr(t,m,e);else Sr(t,f,e);else Sr(t,p,e);(a||o||w||s)&&Sr(t,$,e)}}}],["pointerdown",function(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&"touch"!==e&&Rr(t,(()=>{Dr(Re(n))||(qt=!0)}))}],["compositionstart",function(e,t){Rr(t,(()=>{let n=rr();if(Wn(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();we(r.key),(e.timeStamp<jt+30||"element"===r.type||!n.isCollapsed()||i.getFormat()!==n.format||kn(i)&&i.getStyle()!==n.style)&&Sr(t,o,Z)}}))}],["compositionend",function(e,t){z?Qt=!0:Rr(t,(()=>{an(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),Rr(t,(()=>{var n=rr(),r=e.data,i=on(e);if(null!=r&&Wn(n)&&tn(n,i,r,e.timeStamp,!1)){Qt&&(an(t,r),Qt=!1);var a=n.anchor,s=a.getNode();if(null===(i=at(t._window)))return;let l=a.offset;(a=K&&!n.isCollapsed()&&kn(s)&&null!==i.anchorNode)&&(a=(s=s.getTextContent().slice(0,l)+r+s.getTextContent().slice(l+n.focus.offset))===(3===(i=i.anchorNode).nodeType?i.nodeValue:null)),a||Sr(t,o,r),r=r.length,z&&1<r&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=r),H||W||G||!t.isComposing()||(jt=0,we(null))}else Ke(!1,t,null!==r?r:void 0),Qt&&(an(t,r||void 0),Qt=!1);vr(),le(n=Nr())}
1)),Zt=null}],["click",function(e,n){Rr(n,(()=>{let r=rr();var i=at(n._window);let o=ir();if(i)if(Wn(r)){let t=r.anchor;var a=t.getNode();"element"===t.type&&0===t.offset&&r.isCollapsed()&&!Lr(a)&&1===Pe().getChildrenSize()&&a.getTopLevelElementOrThrow().isEmpty()&&null!==o&&r.is(o)?(i.removeAllRanges(),r.dirty=!0):3!==e.detail||r.isCollapsed()||a!==(i=r.focus.getNode())&&(Pr(a)?a.select(0):a.getParentOrThrow().select(0))}else"touch"===e.pointerType&&(null!==(a=i.anchorNode)&&(1===(a=a.nodeType)||3===a))&&Ie(i=nr(o,i,n,e));Sr(n,t,e)}))}],["cut",Wt],["copy",Wt],["dragstart",Wt],["dragover",Wt],["dragend",Wt],["paste",Wt],["focus",Wt],["blur",Wt],["drop",Wt]];K&&Ut.push(["beforeinput",(e,t)=>function(e,t){let g=e.inputType,p=on(e);"deleteCompositionText"===g||z&&Ye(t)||"insertCompositionText"!==g&&Rr(t,(()=>{let f=rr();if("deleteContentBackward"===g){if(null===f){var m=ir();if(!Wn(m))return;Ie(m.clone())}if(Wn(f)){if(U&&we(f.anchor.key),229===Gt&&e.timeStamp<jt+30&&t.isComposing()&&f.anchor.key===f.focus.key){if(we(null),jt=0,setTimeout((()=>{Rr(t,(()=>{we(null)}))}),30),Wn(f)){if((m=f.anchor.getNode()).markDirty(),f.format=m.getFormat(),!kn(m))throw Error("Anchor node must be a TextNode");f.style=m.getStyle()}1>=f.anchor.getNode().getTextContent().length&&(e.preventDefault(),Sr(t,n,!0))}else we(null),e.preventDefault(),Sr(t,n,!0);return}}if(Wn(f)){m=e.data,null!==Zt&&Ke(!1,t,Zt),f.dirty&&null===Zt||!f.isCollapsed()||Lr(f.anchor.getNode())||null===p||f.applyDOMRange(p),Zt=null;var _=f.focus,y=f.anchor.getNode();if(_=_.getNode(),"insertText"===g||"insertTranspose"===g)"\n"===m?(e.preventDefault(),Sr(t,r,!1)):"\n\n"===m?(e.preventDefault(),Sr(t,i,void 0)):null==m&&e.dataTransfer?(m=e.dataTransfer.getData("text/plain"),e.preventDefault(),f.insertRawText(m)):null!=m&&tn(f,p,m,e.timeStamp,!0)?(e.preventDefault(),Sr(t,o,m)):Zt=m,Yt=e.timeStamp;else switch(e.preventDefault(),g){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Sr(t,o,e);break;case"insertFromComposition":we(null),Sr(t,o,e);break;case"insertLineBreak":we(null),Sr(t,r,!1);break;case"insertParagraph":we(null),Xt&&!W?(Xt=!1,Sr(t,r,!1)):Sr(t,i,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Sr(t,a,e);break;case"deleteByComposition":(function(e,t){return e!==t||Pr(e)||Pr(t)||!e.isToken()||!t.isToken()})(y,_)&&Sr(t,s,e);break;case"deleteByDrag":case"deleteByCut":Sr(t,s,e);break;case"deleteContent":Sr(t,n,!1);break;case"deleteWordBackward":Sr(t,l,!0);break;
1case"deleteWordForward":Sr(t,l,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Sr(t,u,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Sr(t,u,!1);break;case"formatStrikeThrough":Sr(t,d,"strikethrough");break;case"formatBold":Sr(t,d,"bold");break;case"formatItalic":Sr(t,d,"italic");break;case"formatUnderline":Sr(t,d,"underline");break;case"historyUndo":Sr(t,c,void 0);break;case"historyRedo":Sr(t,h,void 0)}}}))}(e,t)]);let jt=0,Gt=0,Yt=0,Zt=null,Vt=0,Jt=!1,qt=!1,Xt=!1,Qt=!1,en=[0,"",0,"root",0];function tn(e,t,n,r,i){let o=e.anchor,a=e.focus,s=o.getNode();var l=Nr();let u=at(l._window),d=null!==u?u.anchorNode:null,c=o.key;l=l.getElementByKey(c);let h=n.length;return c!==a.key||!kn(s)||(!i&&(!K||Yt<r+50)||s.isDirty()&&2>h||Fe(n))&&o.offset!==a.offset&&!s.isComposing()||Ee(s)||s.isDirty()&&1<h||(i||!K)&&null!==l&&!s.isComposing()&&d!==Ne(l)||null!==u&&null!==t&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return 0===e?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(e=(kn(t=t.getPreviousSibling())||Pr(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()&&(!t.canInsertTextAfter()||!n.canInsertTextAfter()||r)}(e,s)}function nn(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function rn(t,n,r){let{anchorNode:i,anchorOffset:o,focusNode:a,focusOffset:s}=t;Jt&&(Jt=!1,nn(i,o)&&nn(a,s))||Rr(n,(()=>{if(r){if(ye(n,i,a)){var o=rr();if(Wn(o)){var s=o.anchor,l=s.getNode();if(o.isCollapsed()){"Range"===t.type&&t.anchorNode===t.focusNode&&(o.dirty=!0);var u=Xe(n).event;u=u?u.timeStamp:performance.now();let[e,r,i,a,c]=en;var d=Pe();if(d=!1===n.isComposing()&&""===d.getTextContent(),u<c+200&&s.offset===i&&s.key===a)o.format=e,o.style=r;else if("text"===s.type){if(!kn(l))throw Error("Point.getNode() must return TextNode when type is text");o.format=l.getFormat(),o.style=l.getStyle()}else"element"!==s.type||d||(o.format=0,o.style="")}else{s=255,l=!1,d=(u=o.getNodes()).length;for(let e=0;e<d;e++){let t=u[e];if(kn(t)&&(l=!0,0===(s&=t.getFormat())))break}o.format=l?s:0}}Sr(n,e,void 0)}}else Ie(null)}))}function on(e){return e.getTargetRanges?0===(e=e.getTargetRanges()).length?null:e[0]:null}function an(e,t){var n=e._compositionKey;if(we(null),null!==n&&null!=t){if(""===t)return t=Ae(n),void(null!==(e=Ne(e.getElementByKey(n)))&&null!==e.nodeValue&&kn(t)&&He(t,e.nodeValue,null,null,!0));if("\n"===t[t.length-1]&&Wn(n=rr()))return t=n.focus,n.anchor.set(t.key,t.offset,t.type),void Sr(e,E,null)}Ke(!0,e,t)}function sn(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}let ln=new Map;function un(e){var t=e.target;let n=at(null==t?null:9===t.nodeType?t.defaultView:t.ownerDocument.defaultView);if(null!==n){var r=ve(n.anchorNode);if(null!==r){qt&&(qt=!1,Rr(r,(()=>{var t=ir(),i=n.anchorNode;null!==i&&(1===(i=i.nodeType)||3===i)&&Ie(t=nr(t,n,r,e))})));var i=(t=(t=Be(r))[t.length-1])._key,o=ln.get(i),a=o||t;a!==r&&rn(n,a,!1),rn(n,r,!0),r!==t?ln.set(i,r):o&&ln.delete(i)}}}function dn(e,t,n){vr();var r=e.__key;let i=e.getParent();if(null!==i){var o=rr();if(Wn(o)&&Pr(e)){var{anchor:a,focus:s}=o,l=a.getNode(),u=s.getNode();qe(l,e)&&a.set(e.__key,0,"element"),qe(u,e)&&s.set(e.__key,0,"element")}if(u=!1,Wn(l=o)&&t){o=l.anchor;let t=l.focus;o.key===r&&(sr(o,e,i,e.getPreviousSibling(),e.getNextSibling()),u=!0),t.key===r&&(sr(t,e,i,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Gn(l)&&t&&e.isSelected()&&e.selectPrevious();Wn(l)&&t&&!u?(r=e.getIndexWithinParent(),Te(e),or(l,i,r,-1)):Te(e),n||et(i)||i.canBeEmpty()||!i.isEmpty()||dn(i,t),t&&Lr(i)&&i.isEmpty()&&i.selectEnd()}}class cn{static getType(){I(64,this.name)}static clone(){I(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,be(this,e)}getType(){return this.__type}isInline(){throw Error(`LexicalNode: Node ${this.constructor.name} does not implement .isInline().`)}isAttached(){for(var e=this.__key;null!==e;){if("root"===e)return!0;
1if(null===(e=Ae(e)))break;e=e.__parent}return!1}isSelected(e){if(null==(e=e||rr()))return!1;let t=e.getNodes().some((e=>e.__key===this.__key));return(kn(this)||!Wn(e)||"element"!==e.anchor.type||"element"!==e.focus.type||e.anchor.key!==e.focus.key||e.anchor.offset!==e.focus.offset)&&t}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(null===e)return-1;e=e.getFirstChild();let t=0;for(;null!==e;){if(this.is(e))return t;t++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return null===e?null:Ae(e)}getParentOrThrow(){let e=this.getParent();return null===e&&I(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(et(t)){if(!Pr(e))throw Error("Children of root nodes must be elements");return e}e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&I(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:Ae(e)}getPreviousSiblings(){let e=[];var t=this.getParent();if(null===t)return e;for(t=t.getFirstChild();null!==t&&!t.is(this);)e.push(t),t=t.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:Ae(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=this.getParents();var n=e.getParents();Pr(this)&&t.unshift(this),Pr(e)&&n.unshift(e),e=t.length;var r=n.length;if(0===e||0===r||t[e-1]!==n[r-1])return null;for(n=new Set(n),r=0;r<e;r++){let e=t[r];if(n.has(e))return e}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;var t=this.getCommonAncestor(e);let n=this;for(;;){var r=n.getParentOrThrow();if(r===t){r=n.getIndexWithinParent();break}n=r}for(n=e;;){if((e=n.getParentOrThrow())===t){t=n.getIndexWithinParent();break}n=e}return r<t}isParentOf(e){let t=this.__key;if(t===e.__key)return!1;for(;null!==e;){if(e.__key===t)return!0;e=e.getParent()}return!1}getNodesBetween(e){let t=this.isBefore(e),n=[],r=new Set;for(var i=this;;){var o=i.__key;if(r.has(o)||(r.add(o),n.push(i)),i===e)break;if(null!==(o=Pr(i)?t?i.getFirstChild():i.getLastChild():null))i=o;else if(null!==(o=t?i.getNextSibling():i.getPreviousSibling()))i=o;else{if(i=i.getParentOrThrow(),r.has(i.__key)||n.push(i),i===e)break;o=i;do{null===o&&I(68),i=t?o.getNextSibling():o.getPreviousSibling(),null!==(o=o.getParent())&&(null!==i||r.has(o.__key)||n.push(o))}while(null===i)}}return t||n.reverse(),n}isDirty(){let e=Nr()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){let e=Ae(this.__key);return null===e&&I(113),e}getWritable(){vr();var e=Er(),t=Nr();e=e._nodeMap;let n=this.__key,r=this.getLatest(),i=r.__parent;t=t._cloneNotNeeded;var o=rr();return Un(o)&&o.setCachedNodes(null),t.has(n)?(xe(r),r):((o=r.constructor.clone(r)).__parent=i,o.__next=r.__next,o.__prev=r.__prev,Pr(r)&&Pr(o)?(o.__first=r.__first,o.__last=r.__last,o.__size=r.__size,o.__indent=r.__indent,o.__format=r.__format,o.__dir=r.__dir):kn(r)&&kn(o)&&(o.__format=r.__format,o.__style=r.__style,o.__mode=r.__mode,o.__detail=r.__detail),t.add(n),o.__key=n,xe(o),e.set(n,o),o)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){I(70)}updateDOM(){I(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){I(72)}static importJSON(){I(18,this.name)}static transform(){return null}remove(e){dn(this,!0,e)}replace(e,t){vr();var n=rr();null!==n&&(n=n.clone()),rt(this,e);let r=this.getLatest(),i=this.__key,o=e.__key,a=e.getWritable(),s=(e=this.getParentOrThrow().getWritable()).__size;Te(a);let l=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,c=r.__next,h=r.__parent;if(dn(r,!1,!0),null===l?e.__first=o:l.getWritable().__next=o,a.__prev=d,null===u?e.__last=o:u.getWritable().__prev=o,a.__next=c,a.__parent=h,e.__size=s,t){if(!Pr(this)||!Pr(a))throw Error("includeChildren should only be true for ElementNodes");
1this.getChildren().forEach((e=>{a.append(e)}))}return Wn(n)&&(Ie(n),t=n.anchor,n=n.focus,t.key===i&&Fn(t,a),n.key===i&&Fn(n,a)),Se()===i&&we(o),a}insertAfter(e,t=!0){vr(),rt(this,e);var n=this.getWritable();let r=e.getWritable();var i=r.getParent();let o=rr();var a=!1,s=!1;if(null!==i){var l=e.getIndexWithinParent();Te(r),Wn(o)&&(s=i.__key,a=o.anchor,i=o.focus,a="element"===a.type&&a.key===s&&a.offset===l+1,s="element"===i.type&&i.key===s&&i.offset===l+1)}i=this.getNextSibling(),l=this.getParentOrThrow().getWritable();let u=r.__key,d=n.__next;return null===i?l.__last=u:i.getWritable().__prev=u,l.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&Wn(o)&&(or(o,l,(t=this.getIndexWithinParent())+1),n=l.__key,a&&o.anchor.set(n,t+2,"element"),s&&o.focus.set(n,t+2,"element")),e}insertBefore(e,t=!0){vr(),rt(this,e);var n=this.getWritable();let r=e.getWritable(),i=r.__key;Te(r);let o=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();return null===o?a.__first=i:o.getWritable().__next=i,a.__size++,n.__prev=i,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent,n=rr(),t&&Wn(n)&&or(n,t=this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return Wr()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){vr();let n=this.getPreviousSibling(),r=this.getParentOrThrow();return null===n?r.select(0,0):Pr(n)?n.select():kn(n)?n.select(e,t):(e=n.getIndexWithinParent()+1,r.select(e,e))}selectNext(e,t){vr();let n=this.getNextSibling(),r=this.getParentOrThrow();return null===n?r.select():Pr(n)?n.select(0,0):kn(n)?n.select(e,t):(e=n.getIndexWithinParent(),r.select(e,e))}markDirty(){this.getWritable()}}class hn extends cn{static getType(){return"linebreak"}static clone(e){return new hn(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{let t,n,r=e.parentElement;return null!==r&&((t=r.firstChild)===e||t.nextSibling===e&&3===t.nodeType&&null!==(t.textContent||"").match(/^( |\t|\r?\n)+$/))&&((n=r.lastChild)===e||n.previousSibling===e&&3===n.nodeType&&null!==(n.textContent||"").match(/^( |\t|\r?\n)+$/))?null:{conversion:gn,priority:0}}}}static importJSON(){return pn()}exportJSON(){return{type:"linebreak",version:1}}}function gn(){return{node:pn()}}function pn(){return nt(new hn)}function fn(e){return e instanceof hn}function mn(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function _n(e,t){return 1&t?"strong":2&t?"em":"span"}function yn(e,t,n,r,i){e=r.classList,void 0!==(r=We(i,"base"))&&e.add(...r);let o=!1,a=8&t&&4&t;var s=8&n&&4&n;void 0!==(r=We(i,"underlineStrikethrough"))&&(s?(o=!0,a||e.add(...r)):a&&e.remove(...r));for(let l in q)s=q[l],void 0!==(r=We(i,l))&&(n&s&&(!o||"underline"!==l&&"strikethrough"!==l)?(!(t&s)||a&&"underline"===l||"strikethrough"===l)&&e.add(...r):t&s&&e.remove(...r))}
1function vn(e,t,n){let r=t.firstChild;if(e+=(n=n.isComposing())?Y:"",null==r)t.textContent=e;else if((t=r.nodeValue)!==e)if(n||z){n=t.length;let i=e.length,o=0,a=0;for(;o<n&&o<i&&t[o]===e[o];)o++;for(;a+o<n&&a+o<i&&t[n-a-1]===e[i-a-1];)a++;e=[o,n-o-a,e.slice(o,i-a)];let[s,l,u]=e;0!==l&&r.deleteData(s,l),r.insertData(s,u)}else r.nodeValue=e}function En(e,t){return(t=document.createElement(t)).appendChild(e),t}class Nn extends cn{static getType(){return"text"}static clone(e){return new Nn(e.__text,e.__key)}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let e=this.getLatest();return ne[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===Se()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return 0!==(1&this.getLatest().__detail)}isUnmergeable(){return 0!==(2&this.getLatest().__detail)}hasFormat(e){return e=q[e],0!==(this.getFormat()&e)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Ce(this.getLatest().__format,e,t)}createDOM(e){var t=this.__format,n=mn(0,t);let r=_n(0,t),i=document.createElement(null===n?r:n),o=i;return this.hasFormat("code")&&i.setAttribute("spellcheck","false"),null!==n&&(o=document.createElement(r),i.appendChild(o)),n=o,vn(this.__text,n,this),void 0!==(e=e.theme.text)&&yn(r,0,t,n,e),""!==(t=this.__style)&&(i.style.cssText=t),i}updateDOM(e,t,n){let r=this.__text;var i=e.__format,o=this.__format,a=mn(0,i);let s=mn(0,o);var l=_n(0,i);let u=_n(0,o);return(null===a?l:a)!==(null===s?u:s)||(a===s&&l!==u?(null==(i=t.firstChild)&&I(48),vn(r,e=a=document.createElement(u),this),void 0!==(n=n.theme.text)&&yn(u,0,o,e,n),t.replaceChild(a,i),!1):(l=t,null!==s&&null!==a&&(null==(l=t.firstChild)&&I(49)),vn(r,l,this),void 0!==(n=n.theme.text)&&i!==o&&yn(u,i,o,l,n),o=this.__style,e.__style!==o&&(t.style.cssText=o),!1))}static importDOM(){return{"#text":()=>({conversion:xn,priority:0}),b:()=>({conversion:bn,priority:0}),code:()=>({conversion:On,priority:0}),em:()=>({conversion:On,priority:0}),i:()=>({conversion:On,priority:0}),s:()=>({conversion:On,priority:0}),span:()=>({conversion:Cn,priority:0}),strong:()=>({conversion:On,priority:0}),sub:()=>({conversion:On,priority:0}),sup:()=>({conversion:On,priority:0}),u:()=>({conversion:On,priority:0})}}static importJSON(e){let t=Rn(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){return({element:e}=super.exportDOM(e)),null!==e&&lt(e)||I(132),e.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(e=En(e,"b")),this.hasFormat("italic")&&(e=En(e,"i")),this.hasFormat("strikethrough")&&(e=En(e,"s")),this.hasFormat("underline")&&(e=En(e,"u")),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?q[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?X[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){return e=Ce(this.getFormat(),e,null),this.setFormat(e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=te[e],this.__mode===e)return this;let t=this.getWritable();return t.__mode=e,t}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){vr();let n=rr();var r=this.getTextContent();let i=this.__key;return"string"==typeof r?(r=r.length,void 0===e&&(e=r),void 0===t&&(t=r)):t=e=0,Wn(n)?((r=Se())!==n.anchor.key&&r!==n.focus.key||we(i),n.setTextNodeRange(this,e,this,t),n):er(i,e,i,t,"text","text")}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){let i=this.getWritable(),o=i.__text,a=n.length,s=e;0>s&&(s=a+s,0>s&&(s=0));let l=rr();return r&&Wn(l)&&(e+=a,l.setTextNodeRange(i,e,i,e)),t=o.slice(0,s)+n+o.slice(s+t),i.__text=t,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){vr();var t=this.getLatest(),n=t.getTextContent(),r=t.__key,i=Se(),o=new Set(e);e=[];for(var a=n.length,s="",l=0;l<a;l++)""!==s&&o.has(l)&&(e.push(s),s=""),s+=n[l];if(""!==s&&e.push(s),0===(o=e.length))return[];if(e[0]===n)return[t];var u=e[0];n=t.getParentOrThrow(),l=t.getFormat();let d=t.getStyle(),c=t.__detail;a=!1,t.isSegmented()?((s=Rn(u)).__format=l,s.__style=d,s.__detail=c,a=!0):(s=t.getWritable()).__text=u,t=rr(),s=[s],u=u.length;for(let p=1;p<o;p++){var h=e[p],g=h.length;(h=Rn(h).getWritable()).__format=l,h.__style=d,h.__detail=c;let n=h.__key;if(g=u+g,Wn(t)){let e=t.anchor,i=t.focus;e.key===r&&"text"===e.type&&e.offset>u&&e.offset<=g&&(e.key=n,e.offset-=u,t.dirty=!0),i.key===r&&"text"===i.type&&i.offset>u&&i.offset<=g&&(i.key=n,i.offset-=u,t.dirty=!0)}i===r&&we(n),u=g,s.push(h)}return r=this.getPreviousSibling(),i=this.getNextSibling(),null!==r&&xe(r),null!==i&&xe(i),r=n.getWritable(),i=this.getIndexWithinParent(),a?(r.splice(i,0,s),this.remove()):r.splice(i,1,s),Wn(t)&&or(t,n,i,o-1),s}mergeWithSibling(e){var t=e===this.getPreviousSibling();t||e===this.getNextSibling()||I(50);var n=this.__key;let r=e.__key,i=this.__text,o=i.length;Se()===r&&we(n);let a=rr();if(Wn(a)){let i=a.anchor,s=a.focus;null!==i&&i.key===r&&(lr(i,t,n,e,o),a.dirty=!0),null!==s&&s.key===r&&(lr(s,t,n,e,o),a.dirty=!0)}return n=e.__text,this.setTextContent(t?n+i:i+n),t=this.getWritable(),e.remove(),t}isTextEntity(){return!1}}
1function Cn(e){let t="700"===e.style.fontWeight,n="line-through"===e.style.textDecoration,r="italic"===e.style.fontStyle,i="underline"===e.style.textDecoration,o=e.style.verticalAlign;return{forChild:e=>(kn(e)&&(t&&e.toggleFormat("bold"),n&&e.toggleFormat("strikethrough"),r&&e.toggleFormat("italic"),i&&e.toggleFormat("underline"),"sub"===o&&e.toggleFormat("subscript"),"super"===o&&e.toggleFormat("superscript")),e),node:null}}function bn(e){let t="normal"===e.style.fontWeight;return{forChild:e=>(kn(e)&&!t&&e.toggleFormat("bold"),e),node:null}}let Tn=new WeakMap;function xn(e){null===e.parentElement&&I(129);for(var t,n=e.textContent||"",r=e.parentNode,i=[e];null!==r&&void 0===(t=Tn.get(r))&&!("PRE"===r.nodeName||1===r.nodeType&&void 0!==r.style&&void 0!==r.style.whiteSpace&&r.style.whiteSpace.startsWith("pre"));)i.push(r),r=r.parentNode;for(t=void 0===t?r:t,r=0;r<i.length;r++)Tn.set(i[r],t);if(null!==t){for(e=[],i=(n=n.split(/(\r?\n|\t)/)).length,t=0;t<i;t++)"\n"===(r=n[t])||"\r\n"===r?e.push(pn()):"\t"===r?e.push(Mn()):""!==r&&e.push(Rn(r));return{node:e}}if(""===(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," ")))return{node:null};if(" "===n[0]){for(i=e,t=!0;null!==i&&null!==(i=Sn(i,!1));)if(0<(r=i.textContent||"").length){/[ \t\n]$/.test(r)&&(n=n.slice(1)),t=!1;break}t&&(n=n.slice(1))}if(" "===n[n.length-1]){for(i=!0;null!==e&&null!==(e=Sn(e,!0));)if(0<(e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){i=!1;break}i&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Rn(n)}}let wn=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function Sn(e,t){for(;;){for(var n=void 0;null===(n=t?e.nextSibling:e.previousSibling);)if(null===(e=e.parentElement))return null;
1if(1===(e=n).nodeType&&(""===(n=e.style.display)&&null===e.nodeName.match(wn)||""!==n&&!n.startsWith("inline")))return null;for(;null!==(n=t?e.firstChild:e.lastChild);)e=n;if(3===e.nodeType)return e;if("BR"===e.nodeName)return null}}let An={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function On(e){let t=An[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:e=>(kn(e)&&!e.hasFormat(t)&&e.toggleFormat(t),e),node:null}}function Rn(e=""){return nt(new Nn(e))}function kn(e){return e instanceof Nn}class Dn extends Nn{static getType(){return"tab"}static clone(e){let t=new Dn(e.__key);return t.__text=e.__text,t.__format=e.__format,t.__style=e.__style,t}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){let t=Mn();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){I(126)}setDetail(){I(127)}setMode(){I(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Mn(){return nt(new Dn)}function Pn(e){return e instanceof Dn}class $n{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode(),r=this.offset;if(e=e.offset,Pr(t)){var i=t.getDescendantByIndex(r);t=i??t}return Pr(n)&&(i=n.getDescendantByIndex(e),n=i??n),t===n?r<e:t.isBefore(n)}getNode(){let e=Ae(this.key);return null===e&&I(20),e}set(e,t,n){let r=this._selection,i=this.key;this.key=e,this.offset=t,this.type=n,yr()||(Se()===i&&we(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function In(e,t,n){return new $n(e,t,n)}function Ln(e,t){let n=t.__key,r=e.offset,i="element";if(kn(t))i="text",r>(t=t.getTextContentSize())&&(r=t);else if(!Pr(t)){var o=t.getNextSibling();kn(o)?(n=o.__key,r=0,i="text"):(o=t.getParent())&&(n=o.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,i)}function Fn(e,t){if(Pr(t)){let n=t.getLastDescendant();Pr(n)||kn(n)?Ln(e,n):Ln(e,t)}else Ln(e,t)}function Bn(e,t,n,r){let i=e.getNode(),o=i.getChildAtIndex(e.offset),a=Rn(),s=Lr(i)?Wr().append(a):a;a.setFormat(n),a.setStyle(r),null===o?i.append(s):o.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}function zn(e,t,n,r){e.key=t,e.offset=n,e.type=r}class Kn{constructor(e,t){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Un(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus))}isCollapsed(){return!1}extract(){return this.getNodes()}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Zn(this)}}class Hn{constructor(e){this.dirty=!1,this._nodes=e,this._cachedNodes=null}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Gn(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}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 Hn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e){let t=this.getNodes(),n=t.length;var r=t[n-1];if(kn(r))r=r.select();else{let e=r.getIndexWithinParent()+1;r=r.getParentOrThrow().select(e,e)}for(r.insertNodes(e),e=0;e<n;e++)t[e].remove()}getNodes(){var e=this._cachedNodes;if(null!==e)return e;var t=this._nodes;e=[];for(let n of t)null!==(t=Ae(n))&&e.push(t);return yr()||(this._cachedNodes=e),e}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function Wn(e){return e instanceof jn}function Un(e){return e instanceof Kn}class jn extends Kn{constructor(e,t,n,r){super(e,t),this.format=n,this.style=r}is(e){return!!Wn(e)&&(this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style)}
1isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var e=this._cachedNodes;if(null!==e)return e;e=this.anchor;var t=this.focus,n=e.isBefore(t),r=n?e:t;n=n?t:e,e=r.getNode(),t=n.getNode();let i=r.offset;return r=n.offset,Pr(e)&&(n=e.getDescendantByIndex(i),e=n??e),Pr(t)&&(null!==(n=t.getDescendantByIndex(r))&&n!==e&&t.getChildAtIndex(r)===n&&(n=n.getPreviousSibling()),t=n??t),e=e.is(t)?Pr(e)&&0<e.getChildrenSize()?[]:[e]:e.getNodesBetween(t),yr()||(this._cachedNodes=e),e}setTextNodeRange(e,t,n,r){zn(this.anchor,e.__key,t,"text"),zn(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],n=e[e.length-1],r=this.anchor,i=this.focus,o=r.isBefore(i),[a,s]=Zn(this),l="",u=!0;for(let d=0;d<e.length;d++){let c=e[d];if(Pr(c)&&!c.isInline())u||(l+="\n"),u=!c.isEmpty();else if(u=!1,kn(c)){let e=c.getTextContent();c===t?c===n?("element"!==r.type||"element"!==i.type||i.offset===r.offset)&&(e=a<s?e.slice(a,s):e.slice(s,a)):e=o?e.slice(a):e.slice(s):c===n&&(e=o?e.slice(0,s):e.slice(0,a)),l+=e}else!Dr(c)&&!fn(c)||c===n&&this.isCollapsed()||(l+=c.getTextContent())}return l}applyDOMRange(e){let t=Nr(),n=t.getEditorState()._selection;if(null!==(e=Qn(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n))){var[r,i]=e;zn(this.anchor,r.key,r.offset,r.type),zn(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}}clone(){let e=this.anchor,t=this.focus;return new jn(In(e.key,e.offset,e.type),In(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Ce(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){return 0!==(this.format&q[e])}insertRawText(e){let t=[],n=(e=e.split(/(\r?\n|\t)/)).length;for(let r=0;r<n;r++){let n=e[r];"\n"===n||"\r\n"===n?t.push(pn()):"\t"===n?t.push(Mn()):t.push(Rn(n))}this.insertNodes(t)}insertText(e){var t=this.anchor,n=this.focus,r=this.isCollapsed()||t.isBefore(n),i=this.format,o=this.style;r&&"element"===t.type?Bn(t,n,i,o):r||"element"!==n.type||Bn(n,t,i,o);var a=this.getNodes(),s=a.length,l=r?n:t;n=(r?t:n).offset;var u=l.offset;kn(t=a[0])||I(26),r=t.getTextContent().length;var d=t.getParentOrThrow(),c=a[s-1];if(this.isCollapsed()&&n===r&&(t.isSegmented()||t.isToken()||!t.canInsertTextAfter()||!d.canInsertTextAfter()&&null===t.getNextSibling())){var h=t.getNextSibling();if(kn(h)&&h.canInsertTextBefore()&&!Ee(h)||((h=Rn()).setFormat(i),d.canInsertTextAfter()?t.insertAfter(h):d.insertAfter(h)),h.select(0,0),t=h,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===n&&(t.isSegmented()||t.isToken()||!t.canInsertTextBefore()||!d.canInsertTextBefore()&&null===t.getPreviousSibling())){if((!kn(h=t.getPreviousSibling())||Ee(h))&&((h=Rn()).setFormat(i),d.canInsertTextBefore()?t.insertBefore(h):d.insertBefore(h)),h.select(),t=h,""!==e)return void this.insertText(e)}else if(t.isSegmented()&&n!==r)(d=Rn(t.getTextContent())).setFormat(i),t.replace(d),t=d;else if(!(this.isCollapsed()||""===e||(h=c.getParent(),d.canInsertTextBefore()&&d.canInsertTextAfter()&&(!Pr(h)||h.canInsertTextBefore()&&h.canInsertTextAfter()))))return this.insertText(""),Xn(this.anchor,this.focus,null),void this.insertText(e);if(1===s)if(t.isToken())(e=Rn(e)).select(),t.replace(e);else{if(a=t.getFormat(),s=t.getStyle(),n!==u||a===i&&s===o){if(Pn(t))return(e=Rn(e)).setFormat(i),e.setStyle(o),e.select(),void t.replace(e)}else{if(""!==t.getTextContent())return(a=Rn(e)).setFormat(i),a.setStyle(o),a.select(),0===n?t.insertBefore(a,!1):([s]=t.splitText(n),s.insertAfter(a,!1)),void(a.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length));t.setFormat(i),t.setStyle(o)}""===(t=t.spliceText(n,u-n,e,!0)).getTextContent()?t.remove():"text"===this.anchor.type&&(t.isComposing()?this.anchor.offset-=e.length:(this.format=a,this.style=s))}else{if(i=new Set([...t.getParentKeys(),...c.getParentKeys()]),h=Pr(t)?t:t.getParentOrThrow(),o=Pr(c)?c:c.getParentOrThrow(),d=c,!h.is(o)&&o.isInline())do{d=o,o=o.getParentOrThrow()}while(o.isInline());if("text"===l.type&&(0!==u||""===c.getTextContent())||"element"===l.type&&c.getIndexWithinParent()<u)if(kn(c)&&
1!c.isToken()&&u!==c.getTextContentSize()){if(c.isSegmented()){var g=Rn(c.getTextContent());c.replace(g),c=g}Lr(l.getNode())||"text"!==l.type||(c=c.spliceText(0,u,"")),i.add(c.__key)}else(l=c.getParentOrThrow()).canBeEmpty()||1!==l.getChildrenSize()?c.remove():l.remove();else i.add(c.__key);for(l=o.getChildren(),u=new Set(a),c=h.is(o),h=h.isInline()&&null===t.getNextSibling()?h:t,g=l.length-1;0<=g;g--){let e=l[g];if(e.is(t)||Pr(e)&&e.isParentOf(t))break;e.isAttached()&&(!u.has(e)||e.is(d)?c||h.insertAfter(e,!1):e.remove())}if(!c)for(l=o,o=null;null!==l;)(0===(c=(u=l.getChildren()).length)||u[c-1].is(o))&&(i.delete(l.__key),o=l),l=l.getParent();for(t.isToken()?n===r?t.select():((e=Rn(e)).select(),t.replace(e)):""===(t=t.spliceText(n,r-n,e,!0)).getTextContent()?t.remove():t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length),e=1;e<s;e++)t=a[e],i.has(t.__key)||t.remove()}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())this.toggleFormat(e),we(null);else{var t=this.getNodes(),n=[];for(var r of t)kn(r)&&n.push(r);var i=n.length;if(0===i)this.toggleFormat(e),we(null);else{r=this.anchor;var o=this.focus,a=this.isBackward();t=a?o:r,r=a?r:o;var s=0,l=n[0];if(o="element"===t.type?0:t.offset,"text"===t.type&&o===l.getTextContentSize()&&(s=1,l=n[1],o=0),null!=l){a=l.getFormatFlags(e,null);var u=i-1,d=n[u];if(i="text"===r.type?r.offset:d.getTextContentSize(),l.is(d))o!==i&&(0===o&&i===l.getTextContentSize()?l.setFormat(a):(e=l.splitText(o,i),(e=0===o?e[0]:e[1]).setFormat(a),"text"===t.type&&t.set(e.__key,0,"text"),"text"===r.type&&r.set(e.__key,i-o,"text")),this.format=a);else{0!==o&&([,l]=l.splitText(o),o=0),l.setFormat(a);var c=d.getFormatFlags(e,a);for(0<i&&(i!==d.getTextContentSize()&&([d]=d.splitText(i)),d.setFormat(c)),s+=1;s<u;s++){let t=n[s];if(!t.isToken()){let n=t.getFormatFlags(e,c);t.setFormat(n)}}"text"===t.type&&t.set(l.__key,o,"text"),"text"===r.type&&r.set(d.__key,i,"text"),this.format=a|c}}}}}insertNodes(e){if(0!==e.length){if("root"===this.anchor.key){this.insertParagraph();var t=rr();if(!Wn(t))throw Error("Expected RangeSelection after insertParagraph");return t.insertNodes(e)}var n=dt(this.anchor.getNode(),ut);if(t=e[e.length-1],"__language"in n&&Pr(n))if("__language"in e[0])this.insertText(e[0].getTextContent());else{var r=dr(this);n.splice(r,0,e),t.selectEnd()}else if(e.some((e=>(Pr(e)||Dr(e))&&!e.isInline()))){t=function(e){let t=Wr(),n=null;for(let r=0;r<e.length;r++){let i=e[r],o=fn(i);if(o||Dr(i)&&i.isInline()||Pr(i)&&i.isInline()||kn(i)||i.isParentRequired()){if(null===n&&(n=i.createParentElementNode(),t.append(n),o))continue;null!==n&&n.append(i)}else t.append(i),n=null}return t}(e),e=t.getLastDescendant();var i=t.getChildren();t=Pr(n)&&n.isEmpty()?null:this.insertParagraph(),r=i[i.length-1];var o=i[0];if(Pr(a=o)&&ut(a)&&!a.isEmpty()&&Pr(n)&&(!n.isEmpty()||"__value"in n&&"__checked"in n)){if(!Pr(n))throw Error("Expected 'firstBlock' to be an ElementNode");n.append(...o.getChildren()),o=i[1]}o&&function(e,t,n){n=n||t.getParentOrThrow().getLastChild();let r=t;for(t=[t];r!==n;){if(!r.getNextSibling())throw Error("insertRangeAfter: lastToInsert must be a later sibling of firstToInsert");r=r.getNextSibling(),t.push(r)}for(let i of t)e=e.insertAfter(i)}(n,o),i=dt(e,ut),t&&Pr(i)&&("__value"in t&&"__checked"in t||ut(r))&&(i.append(...t.getChildren()),t.remove()),Pr(n)&&n.isEmpty()&&n.remove(),e.selectEnd(),fn(e=Pr(n)?n.getLastChild():null)&&i!==n&&e.remove()}else{if(!Pr(n))throw Error("Expected 'firstBlock' to be an ElementNode");r=dr(this),n.splice(r,0,e),t.selectEnd()}}var a}insertParagraph(){if("root"===this.anchor.key){var e=Wr();return Pe().splice(this.anchor.offset,0,[e]),e.select(),e}var t=dr(this);if(!Pr(e=dt(this.anchor.getNode(),ut)))throw Error("Expected ancestor to be an ElementNode");return t=(t=e.getChildAtIndex(t))?[t,...t.getNextSiblings()]:[],(e=e.insertNewAfter(this,!1))?(e.append(...t),e.selectStart(),e):null}insertLineBreak(e){var t=pn();this.insertNodes([t]),e&&(e=t.getParentOrThrow(),t=t.getIndexWithinParent(),e.select(t,t))}extract(){var e=this.getNodes(),t=e.length,n=t-1,r=this.anchor;let i=this.focus;var o=e[0];let a=e[n],[s,l]=Zn(this);return 0===t?[]:1===t?kn(o)&&!this.isCollapsed()?(e=s>l?l:s,n=o.splitText(e,s>l?s:l),null!=(e=0===e?n[0]:n[1])?[e]:[]):[o]:(t=r.isBefore(i),kn(o)&&((r=t?s:l)===o.getTextContentSize()?e.shift():0!==r&&([,o]=o.splitText(r),e[0]=o)),kn(a)&&(o=a.getTextContent().length,0===(t=t?l:s)?e.pop():t!==o&&([a]=a.splitText(t),e[n]=a)),e)}
1modify(e,t,n){var r=this.focus,i=this.anchor,o="move"===e,a=Ge(r,t);if(Dr(a)&&!a.isIsolated())o&&a.isKeyboardSelectable()?((t=tr()).add(a.__key),Ie(t)):kn(e=t?a.getPreviousSibling():a.getNextSibling())?(a=e.__key,t=t?e.getTextContent().length:0,r.set(a,t,"text"),o&&i.set(a,t,"text")):(n=a.getParentOrThrow(),Pr(e)?(n=e.__key,a=t?e.getChildrenSize():0):(a=a.getIndexWithinParent(),n=n.__key,t||a++),r.set(n,a,"element"),o&&i.set(n,a,"element"));else if(r=at((i=Nr())._window)){var s=i._blockCursorElement,l=i._rootElement;if(null===l||null===s||!Pr(a)||a.isInline()||a.canBeEmpty()||ot(s,i,l),r.modify(e,t?"backward":"forward",n),0<r.rangeCount&&(a=r.getRangeAt(0),i=Lr(i=this.anchor.getNode())?i:Qe(i),this.applyDOMRange(a),this.dirty=!0,!o)){for(o=this.getNodes(),e=[],n=!1,s=0;s<o.length;s++)qe(l=o[s],i)?e.push(l):n=!0;n&&0<e.length&&(t?Pr(t=e[0])?t.selectStart():t.getParentOrThrow().selectStart():Pr(t=e[e.length-1])?t.selectEnd():t.getParentOrThrow().selectEnd()),(r.anchorNode!==a.startContainer||r.anchorOffset!==a.startOffset)&&(t=this.focus,r=(o=this.anchor).key,a=o.offset,i=o.type,zn(o,t.key,t.offset,t.type),zn(t,r,a,i),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,i=this.focus,o=r.getNode();if(!t&&("element"===r.type&&Pr(o)&&r.offset===o.getChildrenSize()||"text"===r.type&&r.offset===o.getTextContentSize())){var a=o.getParent();if(Pr(a=o.getNextSibling()||(null===a?null:a.getNextSibling()))&&a.isShadowRoot())return}if(Dr(a=Ge(i,t))&&!a.isIsolated())return void(a.isKeyboardSelectable()&&Pr(o)&&0===o.getChildrenSize()?(o.remove(),t=tr(),t.add(a.__key),Ie(t)):(a.remove(),Nr().dispatchCommand(e,void 0)));if(!t&&Pr(a)&&Pr(o)&&o.isEmpty())return o.remove(),void a.selectStart();if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&0===r.offset&&("element"===r.type?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(a="text"===i.type?i.getNode():null,o="text"===r.type?r.getNode():null,null!==a&&a.isSegmented()){if(r=i.offset,i=a.getTextContentSize(),a.is(o)||t&&r!==i||!t&&0!==r)return void Vn(a,t,r)}else if(null!==o&&o.isSegmented()&&(r=r.offset,i=o.getTextContentSize(),o.is(a)||t&&0!==r||!t&&r!==i))return void Vn(o,t,r);if(o=this.anchor,a=this.focus,(r=o.getNode())===(i=a.getNode())&&"text"===o.type&&"text"===a.type){var s=o.offset,l=a.offset;let e=s<l;(i=e?s:l)!==(s=(l=e?l:s)-1)&&(Fe(r=r.getTextContent().slice(i,l))||(t?a.offset=s:o.offset=s))}}}this.removeText(),t&&!n&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset&&((t=this.anchor.getNode()).isEmpty()&&Lr(t.getParent())&&0===t.getIndexWithinParent()&&t.collapseAtStart(this))}deleteLine(e){this.isCollapsed()&&("text"===this.anchor.type&&this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character")),this.removeText()}deleteWord(e){this.isCollapsed()&&this.modify("extend",e,"word"),this.removeText()}}function Gn(e){return e instanceof Hn}function Yn(e){let t=e.offset;return"text"===e.type?t:t===(e=e.getNode()).getChildrenSize()?e.getTextContent().length:0}function Zn(e){let t=e.anchor;return e=e.focus,"element"===t.type&&"element"===e.type&&t.key===e.key&&t.offset===e.offset?[0,0]:[Yn(t),Yn(e)]}function Vn(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),i=r.length,o=0,a=0;for(let s=0;s<i;s++){let e=s===i-1;if(a=o,o+=r[s].length,t&&o===n||o>n||e){r.splice(s,1),e&&(a=void 0);break}}""===(t=r.join("").trim())?e.remove():(e.setTextContent(t),e.select(a,a))}function Jn(e,t,n,r){var i=t;if(1===e.nodeType){let s=!1;var o=e.childNodes,a=o.length;i===a&&(s=!0,i=a-1);let l=o[i];if(a=!1,l===r._blockCursorElement?(l=o[i+1],a=!0):null!==r._blockCursorElement&&i--,kn(r=Le(l)))i=s?r.getTextContentSize():0;else{if(null===(o=Le(e)))return null;if(Pr(o)?((t=Pr(e=o.getChildAtIndex(i)))&&(t=e.getParent(),t=null===n||null===t||!t.canBeEmpty()||t!==n.getNode()),t&&(null===(n=s?e.getLastDescendant():e.getFirstDescendant())?(o=e,i=0):o=Pr(e=n)?e:e.getParentOrThrow()),kn(e)?(r=e,o=null,i=s?e.getTextContentSize():0):e!==o&&s&&!a&&i++):(i=o.getIndexWithinParent(),i=0===t&&Dr(o)&&Le(e)===o?i:i+1,o=o.getParentOrThrow()),Pr(o))return In(o.__key,i,"element")}}else r=Le(e);return kn(r)?In(r.__key,i,"text"):null}
1function qn(e,t,n){var r=e.offset,i=e.getNode();0===r?(r=i.getPreviousSibling(),i=i.getParent(),t?(n||!t)&&null===r&&Pr(i)&&i.isInline()&&(kn(t=i.getPreviousSibling())&&(e.key=t.__key,e.offset=t.getTextContent().length)):Pr(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):kn(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===i.getTextContent().length&&(r=i.getNextSibling(),i=i.getParent(),t&&Pr(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&null===r&&Pr(i)&&i.isInline()&&!i.canInsertTextAfter()&&(kn(t=i.getNextSibling())&&(e.key=t.__key,e.offset=0)))}function Xn(e,t,n){if("text"===e.type&&"text"===t.type){var r=e.isBefore(t);let i=e.is(t);qn(e,r,i),qn(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type),(r=Nr()).isComposing()&&r._compositionKey!==e.key&&Wn(n)&&(r=n.anchor,n=n.focus,zn(e,r.key,r.offset,r.type),zn(t,n.key,n.offset,n.type))}}function Qn(e,t,n,r,i,o){return null===e||null===n||!ye(i,e,n)||null===(t=Jn(e,t,Wn(o)?o.anchor:null,i))||(null===(r=Jn(n,r,Wn(o)?o.focus:null,i))||"element"===t.type&&"element"===r.type&&(e=Le(e),n=Le(n),Dr(e)&&Dr(n)))?null:(Xn(t,r,o),[t,r])}function er(e,t,n,r,i,o){let a=Er();return(e=new jn(In(e,t,i),In(n,r,o),0,"")).dirty=!0,a._selection=e}function tr(){return new Hn(new Set)}function nr(e,t,n,r){var i=n._window;if(null===i)return null;var o=(i=r||i.event)?i.type:void 0;let a;if(r="selectionchange"===o,i=!re&&(r||"beforeinput"===o||"compositionstart"===o||"compositionend"===o||"click"===o&&i&&3===i.detail||"drop"===o||void 0===o),Wn(e)&&!i)return e.clone();if(null===t)return null;if(i=t.anchorNode,o=t.focusNode,a=t.anchorOffset,t=t.focusOffset,r&&Wn(e)&&!ye(n,i,o))return e.clone();if(null===(n=Qn(i,a,o,t,n,e)))return null;let[s,l]=n;return new jn(s,l,Wn(e)?e.format:0,Wn(e)?e.style:"")}function rr(){return Er()._selection}function ir(){return Nr()._editorState._selection}function or(e,t,n,r=1){var i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(t.is(a)||t.is(s)){if(a=t.__key,e.isCollapsed())(n<=(t=i.offset)&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),i.set(a,n,"element"),o.set(a,n,"element"),ar(e));else{let u=e.isBackward();var l=(s=u?o:i).getNode();o=(i=u?i:o).getNode(),t.is(l)&&((n<=(l=s.offset)&&0<r||n<l&&0>r)&&s.set(a,Math.max(0,l+r),"element")),t.is(o)&&((n<=(t=i.offset)&&0<r||n<t&&0>r)&&i.set(a,Math.max(0,t+r),"element"))}ar(e)}}function ar(e){var t=e.anchor,n=t.offset;let r=e.focus;var i=r.offset,o=t.getNode(),a=r.getNode();if(e.isCollapsed())Pr(o)&&(kn(a=(i=n>=(a=o.getChildrenSize()))?o.getChildAtIndex(a-1):o.getChildAtIndex(n))&&(n=0,i&&(n=a.getTextContentSize()),t.set(a.__key,n,"text"),r.set(a.__key,n,"text")));else{if(Pr(o)){let r=o.getChildrenSize();kn(n=(e=n>=r)?o.getChildAtIndex(r-1):o.getChildAtIndex(n))&&(o=0,e&&(o=n.getTextContentSize()),t.set(n.__key,o,"text"))}Pr(a)&&(kn(i=(t=i>=(n=a.getChildrenSize()))?a.getChildAtIndex(n-1):a.getChildAtIndex(i))&&(a=0,t&&(a=i.getTextContentSize()),r.set(i.__key,a,"text")))}}function sr(e,t,n,r,i){let o=null,a=0,s=null;null!==r?(o=r.__key,kn(r)?(a=r.getTextContentSize(),s="text"):Pr(r)&&(a=r.getChildrenSize(),s="element")):null!==i&&(o=i.__key,kn(i)?s="text":Pr(i)&&(s="element")),null!==o&&null!==s?e.set(o,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function lr(e,t,n,r,i){"text"===e.type?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&--e.offset}function ur(e){e instanceof Gr||(e instanceof cn?Yr(e=st(e,Yr))||I(114):Yr(e=st(e.getNode(),Yr))||I(114));let t=e.getParent();qr(t)||I(115);let n=t.getParent();return Vr(n)||I(116),[e,t,n]}function dr(e){e.isCollapsed()||e.removeText();var t=e.anchor;for(e=t.getNode(),t=t.offset;!ut(e);)[e,t]=cr(e,t);return t}function cr(e,t){var n=e.getParent();if(!n)return n=Wr(),Pe().append(n),n.select(),[Pe(),0];if(kn(e)){var r=e.splitText(t);return 0===r.length?[n,e.getIndexWithinParent()]:(e=0===t?0:1,[n,e=r[0].getIndexWithinParent()+e])}return Pr(e)&&0!==t?((r=e.getChildAtIndex(t))&&(t=new jn(In(e.__key,t,"element"),In(e.__key,t,"element"),0,""),(t=e.insertNewAfter(t))&&t.append(r,...r.getNextSiblings())
1),[n,e.getIndexWithinParent()+1]):[n,e.getIndexWithinParent()]}let hr=null,gr=null,pr=!1,fr=!1,mr=0,_r={characterData:!0,childList:!0,subtree:!0};function yr(){return pr||null!==hr&&hr._readOnly}function vr(){pr&&I(13)}function Er(){return null===hr&&I(15),hr}function Nr(){return null===gr&&I(16),gr}function Cr(e,t,n){var r=t.__type;let i=e._nodes.get(r);for(void 0===i&&I(30,r),void 0===(e=n.get(r))&&(e=Array.from(i.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function br(e,t){var n=e.type,r=t.get(n);if(void 0===r&&I(17,n),n=r.klass,e.type!==n.getType()&&I(18,n.name),n=n.importJSON(e),e=e.children,Pr(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let i=br(e[r],t);n.append(i)}return n}function Tr(e,t){let n=hr,r=pr,i=gr;hr=e,pr=!0,gr=null;try{return t()}finally{hr=n,pr=r,gr=i}}function xr(t,n){let r=t._pendingEditorState,i=t._rootElement,o=t._headless||null===i;if(null!==r){var a=t._editorState,s=a._selection,l=r._selection,u=0!==t._dirtyType,d=hr,c=pr,h=gr,g=t._updating,p=t._observer,f=null;if(t._pendingEditorState=null,t._editorState=r,!o&&u&&null!==p){gr=t,hr=r,pr=!1,t._updating=!0;try{let e=t._dirtyType,n=t._dirtyElements,o=t._dirtyLeaves;p.disconnect();var m=n,_=o;bt=Tt=Ct="",xt=2===e,St=null,gt=t,ht=t._config,pt=t._nodes,ft=gt._listeners.mutation,mt=m,_t=_,yt=a._nodeMap,vt=r._nodeMap,wt=r._readOnly,Et=new Map(t._keyToDOMMap);let s=new Map;Nt=s,Bt("root",null),Nt=Et=ht=vt=yt=_t=mt=pt=gt=void 0,f=s}catch(Q){if(Q instanceof Error&&t._onError(Q),fr)throw Q;return Ur(t,null,i,r),ue(t),t._dirtyType=2,fr=!0,xr(t,a),void(fr=!1)}finally{p.observe(i,_r),t._updating=g,hr=d,pr=c,gr=h}}r._readOnly||(r._readOnly=!0);var y=t._dirtyLeaves,v=t._dirtyElements,E=t._normalizedNodes,N=t._updateTags,C=t._deferred;u&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set);var b,T=t._decorators,x=t._pendingDecorators||T,w=r._nodeMap;for(b in x)w.has(b)||(x===T&&(x=ke(t)),delete x[b]);var S=o?null:at(t._window);if(t._editable&&null!==S&&(u||null===l||l.dirty)){gr=t,hr=r;try{if(null!==p&&p.disconnect(),u||null===l||l.dirty){let e=t._blockCursorElement;null!==e&&ot(e,t,i);e:{let e=S.anchorNode,n=S.focusNode,r=S.anchorOffset,o=S.focusOffset,a=document.activeElement;if(!(N.has("collaboration")&&a!==i||null!==a&&_e(a)))if(Wn(l)){var A=l.anchor,O=l.focus,R=A.key,k=O.key,D=Ve(t,R),M=Ve(t,k),P=A.offset,$=O.offset,I=l.format,L=l.style,F=l.isCollapsed(),B=D,z=M,K=!1;if("text"===A.type){B=Ne(D);let e=A.getNode();K=e.getFormat()!==I||e.getStyle()!==L}else Wn(s)&&"text"===s.anchor.type&&(K=!0);if("text"===O.type&&(z=Ne(M)),null!==B&&null!==z){if(F&&(null===s||K||Wn(s)&&(s.format!==I||s.style!==L))){var H=performance.now();en=[I,L,P,R,H]}if(r===P&&o===$&&e===B&&n===z&&("Range"!==S.type||!F)&&(null!==a&&i.contains(a)||i.focus({preventScroll:!0}),"element"!==A.type))break e;try{S.setBaseAndExtent(B,P,z,$)}catch{}if(!N.has("skip-scroll-into-view")&&l.isCollapsed()&&null!==i&&i===document.activeElement){let e=l instanceof jn&&"element"===l.anchor.type?B.childNodes[P]||null:0<S.rangeCount?S.getRangeAt(0):null;if(null!==e){let n;if(e instanceof Text){let t=document.createRange();t.selectNode(e),n=t.getBoundingClientRect()}else n=e.getBoundingClientRect();let r=i.ownerDocument,o=r.defaultView;if(null!==o)for(var W,U,{top:j,bottom:G}=n,Y=i;null!==Y;){let e=Y===r.body;if(e)W=0,U=Xe(t).innerHeight;else{let e=Y.getBoundingClientRect();W=e.top,U=e.bottom}let n=0;if(j<W?n=-(W-j):G>U&&(n=G-U),0!==n)if(e)o.scrollBy(0,n);else{let e=Y.scrollTop;Y.scrollTop+=n;let t=Y.scrollTop-e;j-=t,G-=t}if(e)break;Y=Je(Y)}}}Jt=!0}}else null!==s&&ye(t,e,n)&&S.removeAllRanges()}}e:{let e=t._blockCursorElement;if(Wn(l)&&l.isCollapsed()&&"element"===l.anchor.type&&i.contains(document.activeElement)){let n=l.anchor,r=n.getNode(),o=n.offset,a=r.getChildrenSize(),s=!1,u=null;if(o===a){it(r.getChildAtIndex(o-1))&&(s=!0)}else{let e=r.getChildAtIndex(o);if(it(e)){let n=e.getPreviousSibling();(null===n||it(n))&&(s=!0,u=t.getElementByKey(e.__key))}}if(s){let n=t.getElementByKey(r.__key);if(null===e){let n=t._config.theme,r=document.createElement("div");r.contentEditable="false",r.setAttribute("data-lexical-cursor","true");let i=n.blockCursor;if(void 0!==i){if("string"==typeof i){let e=i.split(" ");i=n.blockCursor=e}void 0!==i&&r.classList.add(...i)}t._blockCursorElement=e=r}i.style.caretColor="transparent",null===u?n.appendChild(e):n.insertBefore(e,u);break e}}null!==e&&ot(e,t,i)}null!==p&&p.observe(i,_r)}finally{gr=h,hr=d}}if(null!==f){var Z=f;let e=Array.from(t._listeners.mutation),n=e.length;for(let t=0;t<n;t++){let[n,r]=e[t],i=Z.get(r);void 0!==i&&n(i,{dirtyLeaves:y,prevEditorState:a,updateTags:N})}}Wn(l)||null===l||null!==s&&s.is(l)||t.dispatchCommand(e,void 0);var V=t._pendingDecorators;null!==V&&(t._decorators=V,t._pendingDecorators=null,wr("decorator",t,!0,V));var J=Me(n||a),q=Me(r);if(J!==q&&wr("textcontent",t,!0,q),wr("update",t,!0,{dirtyElements:v,dirtyLeaves:y,editorState:r,normalizedNodes:E,prevEditorState:n||a,tags:N}),t._deferred=[],0!==C.length){let e=t._updating;t._updating=!0;try{for(let e=0;e<C.length;e++)C[e]()}finally{t._updating=e}}var X=t._updates;if(0!==X.length){let e=X.shift();if(e){let[n,r]=e;Or(t,n,r)}}}}function wr(e,t,n,...r){let i=t._updating;t._updating=n;try{let n=Array.from(t._listeners[e]);for(e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=i}}function Sr(e,t,n){if(!1===e._updating||gr!==e){let r=!1;return e.update((()=>{r=Sr(e,t,n)})),r}let r=Be(e);for(let o=4;0<=o;o--)for(let a=0;a<r.length;a++){var i=r[a]._commands.get(t);if(void 0!==i&&void 0!==(i=i[o])){let t=(i=Array.from(i)).length;for(let r=0;r<t;r++)if(!0===i[r](n,e))return!0}}return!1}function Ar(e,t){let n=e._updates;for(t=t||!1;0!==n.length;){var r=n.shift();if(r){let n,[i,o]=r;void 0!==o&&(r=o.onUpdate,n=o.tag,o.skipTransforms&&(t=!0),r&&e._deferred.push(r),n&&e._updateTags.add(n)),i()}}return t}function Or(e,t,n){let r=e._updateTags;var i,o=i=!1;if(void 0!==n){var a=n.onUpdate;
1null!=(i=n.tag)&&r.add(i),i=n.skipTransforms||!1,o=n.discrete||!1}a&&e._deferred.push(a),n=e._editorState;let s=!1;(null===(a=e._pendingEditorState)||a._readOnly)&&(a=e._pendingEditorState=new zr(new Map((a||n)._nodeMap)),s=!0),a._flushSync=o,o=hr;let l=pr,u=gr,d=e._updating;hr=a,pr=!1,e._updating=!0,gr=e;try{s&&(e._headless?null!=n._selection&&(a._selection=n._selection.clone()):a._selection=function(e){let t=e.getEditorState()._selection,n=at(e._window);return Wn(t)||null==t?nr(t,n,e,null):t.clone()}(e));let r=e._compositionKey;t(),i=Ar(e,i),function(e,t){if(t=t.getEditorState()._selection,Wn(e=e._selection)){var n=e.anchor;let r,i=e.focus;"text"===n.type&&(r=n.getNode(),r.selectionTransform(t,e)),"text"===i.type&&r!==(n=i.getNode())&&n.selectionTransform(t,e)}}(a,e),0!==e._dirtyType&&(i?function(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)kn(t=e.get(n))&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&he(t)}(a,e):function(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let i=Se(),o=new Map;var a=n;let s=a.size;for(var l=r,u=l.size;0<s||0<u;){if(0<s){t._dirtyLeaves=new Set;for(let r of a)kn(a=e.get(r))&&a.isAttached()&&a.isSimpleText()&&!a.isUnmergeable()&&he(a),void 0!==a&&void 0!==a&&a.__key!==i&&a.isAttached()&&Cr(t,a,o),n.add(r);if(s=(a=t._dirtyLeaves).size,0<s){mr++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let n of l)l=n[0],u=n[1],("root"===l||u)&&(void 0!==(a=e.get(l))&&void 0!==a&&a.__key!==i&&a.isAttached()&&Cr(t,a,o),r.set(l,u));s=(a=t._dirtyLeaves).size,u=(l=t._dirtyElements).size,mr++}t._dirtyLeaves=n,t._dirtyElements=r}(a,e),Ar(e),function(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let i=[];for(let[o]of r){let n=t.get(o);void 0===n||n.isAttached()||(Pr(n)&&ct(n,o,e,t,i,r),e.has(o)||r.delete(o),i.push(o))}for(let o of i)t.delete(o);for(let o of n)void 0===(r=t.get(o))||r.isAttached()||(e.has(o)||n.delete(o),t.delete(o))}(n,a,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(a._flushSync=!0);let c=a._selection;if(Wn(c)){let e=a._nodeMap,t=c.focus.key;void 0!==e.get(c.anchor.key)&&void 0!==e.get(t)||I(19)}else Gn(c)&&0===c._nodes.size&&(a._selection=null)}catch(c){return c instanceof Error&&e._onError(c),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void xr(e)}finally{hr=o,pr=l,gr=u,e._updating=d,mr=0}0!==e._dirtyType||function(e,t){if(t=t.getEditorState()._selection,null!==(e=e._selection)){if(e.dirty||!e.is(t))return!0}else if(null!==t)return!0;return!1}(a,e)?a._flushSync?(a._flushSync=!1,xr(e)):s&&me((()=>{xr(e)})):(a._flushSync=!1,s&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Rr(e,t,n){e._updating?e._updates.push([t,n]):Or(e,t,n)}class kr extends cn{constructor(e){super(e)}decorate(){I(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Dr(e){return e instanceof kr}class Mr extends cn{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return ee[e]||""}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=Nr()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(kn(t)&&e.push(t),Pr(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;null!==e;){if(Pr(e)){let t=e.getFirstChild();if(null!==t){e=t;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;null!==e;){if(Pr(e)){let t=e.getLastChild();if(null!==t){e=t;continue}}break}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;return e>=n?Pr(e=t[n-1])&&e.getLastDescendant()||e||null:Pr(e=t[e])&&e.getFirstDescendant()||e||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:Ae(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&I(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:Ae(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&I(96,this.__key),e}getChildAtIndex(e){var t=this.getChildrenSize();let n;if(e<t/2){for(n=this.getFirstChild(),t=0;
1null!==n&&t<=e;){if(t===e)return n;n=n.getNextSibling(),t++}return null}for(n=this.getLastChild(),--t;null!==n&&t>=e;){if(t===e)return n;n=n.getPreviousSibling(),t--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContent(),Pr(i)&&r!==n-1&&!i.isInline()&&(e+="\n\n")}return e}getTextContentSize(){let e=0,t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){let i=t[r];e+=i.getTextContentSize(),Pr(i)&&r!==n-1&&!i.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){return""!==e&&(e=Q[e],0!==(this.getFormat()&e))}select(e,t){vr();let n=rr(),r=e,i=t;var o=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){if(kn(e=this.getFirstChild())||Pr(e))return e.select(0,0)}else if(!(void 0!==e&&e!==o||void 0!==t&&t!==o)&&(kn(e=this.getLastChild())||Pr(e)))return e.select();return void 0===r&&(r=o),void 0===i&&(i=o),o=this.__key,Wn(n)?(n.anchor.set(o,r,"element"),n.focus.set(o,i,"element"),n.dirty=!0,n):er(o,r,o,i,"element","element")}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();
1return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Q[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){let r=n.length,i=this.getChildrenSize(),o=this.getWritable(),a=o.__key;var s=[],l=[];let u=this.getChildAtIndex(e+t),d=null,c=i-t+r;if(0!==e)if(e===i)d=this.getLastChild();else{var h=this.getChildAtIndex(e);null!==h&&(d=h.getPreviousSibling())}if(0<t){var g=null===d?this.getFirstChild():d.getNextSibling();for(h=0;h<t;h++){null===g&&I(100);var p=g.getNextSibling(),f=g.__key;Te(g=g.getWritable()),l.push(f),g=p}}for(h=d,p=0;p<r;p++){f=n[p],null!==h&&f.is(h)&&(d=h=h.getPreviousSibling()),(g=f.getWritable()).__parent===a&&c--,Te(g);let e=f.__key;null===h?(o.__first=e,g.__prev=null):((h=h.getWritable()).__next=e,g.__prev=h.__key),f.__key===a&&I(76),g.__parent=a,s.push(e),h=f}if(e+t===i?null!==h&&(h.getWritable().__next=null,o.__last=h.__key):null!==u&&(e=u.getWritable(),null!==h?(t=h.getWritable(),e.__prev=h.__key,t.__next=u.__key):e.__prev=null),o.__size=c,l.length&&Wn(e=rr())){l=new Set(l),s=new Set(s);let{anchor:t,focus:n}=e;$r(t,l,s)&&sr(t,t.getNode(),this,d,u),$r(n,l,s)&&sr(n,n.getNode(),this,d,u),0!==c||this.canBeEmpty()||et(this)||this.remove()}return o}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function Pr(e){return e instanceof Mr}function $r(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Ir extends Mr{static getType(){return"root"}static clone(){return new Ir}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){I(51)}getTextContent(){let e=this.__cachedText;return!yr()&&0!==Nr()._dirtyType||null===e?super.getTextContent():e}remove(){I(52)}replace(){I(53)}insertBefore(){I(54)}insertAfter(){I(55)}updateDOM(){return!1}append(...e){for(let t=0;t<e.length;t++){let n=e[t];Pr(n)||Dr(n)||I(56)}return super.append(...e)}static importJSON(e){let t=Pe();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function Lr(e){return e instanceof Ir}function Fr(){return new zr(new Map([["root",new Ir]]))}function Br(e){let t=e.exportJSON();var n=e.constructor;if(t.type!==n.getType()&&I(130,n.name),Pr(e)){let r=t.children;for(Array.isArray(r)||I(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let t=Br(e[n]);r.push(t)}}return t}
1class zr{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._readOnly=this._flushSync=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e){return Tr(this,e)}clone(e){return(e=new zr(this._nodeMap,void 0===e?this._selection:e))._readOnly=!0,e}toJSON(){return Tr(this,(()=>({root:Br(Pe())})))}}class Kr extends Mr{static getType(){return"paragraph"}static clone(e){return new Kr(e.__key)}createDOM(e){let t=document.createElement("p");return void 0!==(e=We(e.theme,"paragraph"))&&t.classList.add(...e),t}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:Hr,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&lt(e)){this.isEmpty()&&e.append(document.createElement("br"));var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t),0<(t=this.getIndent())&&(e.style.textIndent=20*t+"px")}return{element:e}}static importJSON(e){let t=Wr();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(e,t){e=Wr();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.getChildren();if(0===e.length||kn(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Hr(e){let t=Wr();return e.style&&(t.setFormat(e.style.textAlign),0<(e=parseInt(e.style.textIndent,10)/20)&&t.setIndent(e)),{node:t}}function Wr(){return nt(new Kr)}function Ur(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=Fr(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,null!==(r=e._observer)&&(r.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",i.set("root",n))}class jr{constructor(e,t,n,r,i,o,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=ze(),this._onError=i,this._htmlConversions=o,this._editable=a,this._headless=null!==t&&t._headless,this._blockCursorElement=this._window=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&I(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let i=r.get(e);void 0===i&&I(36,String(e));let o=i[n];return o.add(t),()=>{o.delete(t),i.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t){void 0===this._nodes.get(e.getType())&&I(37,e.name);let n=this._listeners.mutation;return n.set(t,e),()=>{n.delete(t)}}registerNodeTransformToKlass(e,t){var n=e.getType();return void 0===(n=this._nodes.get(n))&&I(37,e.name),n.transforms.add(t),n}registerNodeTransform(e,t){var n=this.registerNodeTransformToKlass(e,t);let r=[n];return null!=(n=n.replaceWithKlass)&&(n=this.registerNodeTransformToKlass(n,t),r.push(n)),function(e,t){Rr(e,(()=>{var e=Er();if(!e.isEmpty())if("root"===t)Pe().markDirty();else{e=e._nodeMap;for(let[,t]of e)t.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}
1(this,e.getType()),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return Sr(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let o=We(this._config.theme,"root");var n=this._pendingEditorState||this._editorState;if(this._rootElement=e,Ur(this,t,e,n),null!==t){if(!this._config.disableEvents){0!==Vt&&(Vt--,0===Vt&&t.ownerDocument.removeEventListener("selectionchange",un));var r=t.__lexicalEditor;if(null!=r){if(null!==r._parentEditor){var i=Be(r);i=i[i.length-1]._key,ln.get(i)===r&&ln.delete(i)}else ln.delete(r._key);t.__lexicalEditor=null}for(r=sn(t),i=0;i<r.length;i++)r[i]();t.__lexicalEventHandles=[]}null!=o&&t.classList.remove(...o)}null!==e?(n=(n=e.ownerDocument)&&n.defaultView||null,(r=e.style).userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=n,this._dirtyType=2,ue(this),this._updateTags.add("history-merge"),xr(this),this._config.disableEvents||function(e,t){0===Vt&&e.ownerDocument.addEventListener("selectionchange",un),Vt++,e.__lexicalEditor=t;let n=sn(e);for(let r=0;r<Ut.length;r++){let[i,o]=Ut[r],s="function"==typeof o?e=>{!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()&&o(e,t))}:e=>{if(!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()))switch(i){case"cut":return Sr(t,k,e);case"copy":return Sr(t,R,e);case"paste":return Sr(t,a,e);case"dragstart":return Sr(t,S,e);case"dragover":return Sr(t,A,e);case"dragend":return Sr(t,O,e);case"focus":return Sr(t,M,e);case"blur":return Sr(t,P,e);case"drop":return Sr(t,w,e)}};e.addEventListener(i,s),n.push((()=>{e.removeEventListener(i,s)}))}}(e,this),null!=o&&e.classList.add(...o)):(this._editorState=n,this._window=this._pendingEditorState=null),wr("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&I(38),le(this);let n=this._pendingEditorState,r=this._updateTags;t=void 0!==t?t.tag:null,null===n||n.isEmpty()||(null!=t&&r.add(t),xr(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=t&&r.add(t),xr(this)}parseEditorState(e,t){e="string"==typeof e?JSON.parse(e):e;let n=Fr(),r=hr,i=pr,o=gr,a=this._dirtyElements,s=this._dirtyLeaves,l=this._cloneNotNeeded,u=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,hr=n,pr=!1,gr=this;try{br(e.root,this._nodes),t&&t(),n._readOnly=!0}catch(d){d instanceof Error&&this._onError(d)}finally{this._dirtyElements=a,this._dirtyLeaves=s,this._cloneNotNeeded=l,this._dirtyType=u,hr=r,pr=i,gr=o}return n}update(e,t){Rr(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Rr(this,(()=>{let e=rr(),n=Pe();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;null!==e&&e.blur(),null!==(e=at(this._window))&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,wr("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Gr extends Mr{constructor(e,t){super(t),this.__colSpan=e,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}}function Yr(e){return e instanceof Gr}class Zr extends Mr{}function Vr(e){return e instanceof Zr}class Jr extends Mr{}function qr(e){return e instanceof Jr}return $e.$INTERNAL_isPointSelection=Un,$e.$addUpdateTag=function(e){vr(),Nr()._updateTags.add(e)},$e.$applyNodeReplacement=nt,$e.$copyNode=tt,$e.$createLineBreakNode=pn,$e.$createNodeSelection=tr,$e.$createParagraphNode=Wr,$e.$createPoint=In,$e.$createRangeSelection=function(){let e=In("root",0,"element"),t=In("root",0,"element");return new jn(e,t,0,"")},$e.$createTabNode=Mn,$e.$createTextNode=Rn,$e.$getAdjacentNode=Ge,$e.$getNearestNodeFromDOMNode=Re,$e.$getNearestRootOrShadowRoot=Qe,$e.$getNodeByKey=Ae,$e.$getPreviousSelection=ir,$e.$getRoot=Pe,$e.$getSelection=rr,$e.$getTextContent=function(){let e=rr();return null===e?"":e.getTextContent()},$e.$hasAncestor=qe,$e.$hasUpdateTag=function(e){return Nr()._updateTags.has(e)}
1,$e.$insertNodes=function(e){let t=rr()||ir();null===t&&(t=Pe().selectEnd()),t.insertNodes(e)},$e.$isBlockElementNode=function(e){return Pr(e)&&!e.isInline()},$e.$isDecoratorNode=Dr,$e.$isElementNode=Pr,$e.$isInlineElementOrDecoratorNode=function(e){return Pr(e)&&e.isInline()||Dr(e)&&e.isInline()},$e.$isLeafNode=function(e){return kn(e)||fn(e)||Dr(e)},$e.$isLineBreakNode=fn,$e.$isNodeSelection=Gn,$e.$isParagraphNode=function(e){return e instanceof Kr},$e.$isRangeSelection=Wn,$e.$isRootNode=Lr,$e.$isRootOrShadowRoot=et,$e.$isTabNode=Pn,$e.$isTextNode=kn,$e.$nodesOfType=function(e){var t=Er();let n=t._readOnly,r=e.getType();t=t._nodeMap;let i=[];for(let[,o]of t)o instanceof e&&o.__type===r&&(n||o.isAttached())&&i.push(o);return i},$e.$normalizeSelection__EXPERIMENTAL=ge,$e.$parseSerializedNode=function(e){return br(e,Nr()._nodes)},$e.$selectAll=function(){var e=Pe();Ie(ge(e=e.select(0,e.getChildrenSize())))},$e.$setCompositionKey=we,$e.$setSelection=Ie,$e.$splitNode=function(e,t){let n=e.getChildAtIndex(t);null==n&&(n=e),et(e)&&I(102);let r=e=>{const t=e.getParentOrThrow(),i=et(t),o=e!==n||i?tt(e):e;if(i){if(!Pr(e)||!Pr(o))throw Error("Children of a root must be ElementNode");return e.insertAfter(o),[e,o,o]}const[a,s,l]=r(t);return e=e.getNextSiblings(),l.append(o,...e),[a,s,o]},[i,o]=r(n);return[i,o]},$e.BLUR_COMMAND=P,$e.CAN_REDO_COMMAND={},$e.CAN_UNDO_COMMAND={},$e.CLEAR_EDITOR_COMMAND={},$e.CLEAR_HISTORY_COMMAND={},$e.CLICK_COMMAND=t,$e.COMMAND_PRIORITY_CRITICAL=4,$e.COMMAND_PRIORITY_EDITOR=0,$e.COMMAND_PRIORITY_HIGH=3,$e.COMMAND_PRIORITY_LOW=1,$e.COMMAND_PRIORITY_NORMAL=2,$e.CONTROLLED_TEXT_INSERTION_COMMAND=o,$e.COPY_COMMAND=R,$e.CUT_COMMAND=k,$e.DELETE_CHARACTER_COMMAND=n,$e.DELETE_LINE_COMMAND=u,$e.DELETE_WORD_COMMAND=l,$e.DEPRECATED_$computeGridMap=function(e,t,n){let r=[],i=null,o=null;e=e.getChildren();for(let d=0;d<e.length;d++){var a=e[d];qr(a)||I(108);var s=a.getChildren();a=0;for(let e of s){for(Yr(e)||I(109);void 0!==r[d]&&void 0!==r[d][a];)a++;var l=a,u=e;let c={cell:u,startColumn:l,startRow:s=d},h=u.__rowSpan,g=u.__colSpan;for(let e=0;e<h;e++){void 0===r[s+e]&&(r[s+e]=[]);for(let t=0;t<g;t++)r[s+e][l+t]=c}t.is(u)&&(i=c),n.is(u)&&(o=c),a+=e.__colSpan}}return null===i&&I(110),null===o&&I(111),[r,i,o]},$e.DEPRECATED_$getGridCellNodeRect=function(e){let[t,,n]=ur(e),r=(e=n.getChildren()).length;var i=e[0].getChildren().length;let o=Array(r);for(var a=0;a<r;a++)o[a]=Array(i);for(i=0;i<r;i++){a=e[i].getChildren();let n=0;for(let e=0;e<a.length;e++){for(;o[i][n];)n++;let r=a[e],s=r.__rowSpan||1,l=r.__colSpan||1;for(let e=0;e<s;e++)for(let t=0;t<l;t++)o[i+e][n+t]=r;if(t===r)return{colSpan:l,columnIndex:n,rowIndex:i,rowSpan:s};n+=l}}return null},$e.DEPRECATED_$getNodeTriplet=ur,$e.DEPRECATED_$isGridCellNode=Yr,$e.DEPRECATED_$isGridNode=Vr,$e.DEPRECATED_$isGridRowNode=qr,$e.DEPRECATED_GridCellNode=Gr,$e.DEPRECATED_GridNode=Zr,$e.DEPRECATED_GridRowNode=Jr,$e.DRAGEND_COMMAND=O,$e.DRAGOVER_COMMAND=A,$e.DRAGSTART_COMMAND=S,$e.DROP_COMMAND=w,$e.DecoratorNode=kr,$e.ElementNode=Mr,$e.FOCUS_COMMAND=M,$e.FORMAT_ELEMENT_COMMAND={},$e.FORMAT_TEXT_COMMAND=d,$e.INDENT_CONTENT_COMMAND={},$e.INSERT_LINE_BREAK_COMMAND=r,$e.INSERT_PARAGRAPH_COMMAND=i,$e.INSERT_TAB_COMMAND={},$e.INTERNAL_PointSelection=Kn,$e.KEY_ARROW_DOWN_COMMAND=v,$e.KEY_ARROW_LEFT_COMMAND=m,$e.KEY_ARROW_RIGHT_COMMAND=p,$e.KEY_ARROW_UP_COMMAND=y,$e.KEY_BACKSPACE_COMMAND=C,$e.KEY_DELETE_COMMAND=T,$e.KEY_DOWN_COMMAND=g,$e.KEY_ENTER_COMMAND=E,$e.KEY_ESCAPE_COMMAND=b,$e.KEY_MODIFIER_COMMAND=$,$e.KEY_SPACE_COMMAND=N,$e.KEY_TAB_COMMAND=x,$e.LineBreakNode=hn,$e.MOVE_TO_END=f,$e.MOVE_TO_START=_,$e.OUTDENT_CONTENT_COMMAND={},$e.PASTE_COMMAND=a,$e.ParagraphNode=Kr,$e.REDO_COMMAND=h,$e.REMOVE_TEXT_COMMAND=s,$e.RootNode=Ir,$e.SELECTION_CHANGE_COMMAND=e,$e.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND={},$e.SELECT_ALL_COMMAND=D,$e.TabNode=Dn,$e.TextNode=Nn,$e.UNDO_COMMAND=c,$e.createCommand=function(){return{}},$e.createEditor=function(e){var t=e||{},n=gr,r=t.theme||{};let i=void 0===e?n:t.parentEditor||null,o=t.disableEvents||!1,a=Fr(),s=t.namespace||(null!==i?i._config.namespace:ze()),l=t.editorState,u=[Ir,Nn,hn,Dn,Kr,...t.nodes||[]],{onError:d,html:c}=t;if(t=void 0===t.editable||t.editable,void 0===e&&null!==n)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let t=u[n],r=null;var h=null;"function"!=typeof t&&(t=(h=t).replace,r=h.with,h=h.withKlass||null);let i=t.getType(),o=t.transform(),a=new Set;null!==o&&a.add(o),e.set(i,{exportDOM:c&&c.export?c.export.get(t):void 0,klass:t,replace:r,replaceWithKlass:h,transforms:a})}return r=new jr(a,i,e,{disableEvents:o,namespace:s,theme:r},d||console.error,function(e,t){let n=new Map,r=new Set,i=e=>{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{null==(e=null!=e.klass.importDOM?e.klass.importDOM.bind(e.klass):null)||r.has(e)||(r.add(e),null!==(e=e())&&i(e))})),t&&i(t),n}(e,c?c.import:void 0),t),void 0!==l&&(r._pendingEditorState=l,r._dirtyType=2),r},$e.getNearestEditorFromDOMNode=ve,$e.isCurrentlyReadOnlyMode=yr,$e.isHTMLAnchorElement=function(e){return lt(e)&&"A"===e.tagName},$e.isHTMLElement=lt,$e.isSelectionCapturedInDecoratorInput=_e,$e.isSelectionWithinEditor=ye,$e}function Le(){return Pe||(Pe=1,Me=Ie()),Me}var Fe,Be={};const ze=function(){if(Fe)return Be;
1Fe=1;var e=ke(),t=Le(),n=r;let i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var o=i?n.useLayoutEffect:n.useEffect;let a={tag:"history-merge"};return Be.LexicalComposer=function({initialConfig:r,children:s}){let l=n.useMemo((()=>{const{theme:n,namespace:o,editor__DEPRECATED:s,nodes:l,onError:u,editorState:d,html:c}=r,h=e.createLexicalComposerContext(null,n);let g=s||null;if(null===g){const e=t.createEditor({editable:r.editable,html:c,namespace:o,nodes:l,onError:t=>u(t,e),theme:n});(function(e,n){if(null!==n)if(void 0===n)e.update((()=>{var n=t.$getRoot();if(n.isEmpty()){let r=t.$createParagraphNode();n.append(r),n=i?document.activeElement:null,(null!==t.$getSelection()||null!==n&&n===e.getRootElement())&&r.select()}}),a);else if(null!==n)switch(typeof n){case"string":let r=e.parseEditorState(n);e.setEditorState(r,a);break;case"object":e.setEditorState(n,a);break;case"function":e.update((()=>{t.$getRoot().isEmpty()&&n(e)}),a)}})(e,d),g=e}return[g,h]}),[]);return o((()=>{let e=r.editable,[t]=l;t.setEditable(void 0===e||e)}),[]),n.createElement(e.LexicalComposerContext.Provider,{value:l},s)},Be}();var Ke,He,We,Ue,je=ze;function Ge(){if(He)return Ke;He=1;var e=ke(),t=r,n=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;function i(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}return Ke=function(){return function(r){let[i]=e.useLexicalComposerContext(),o=t.useMemo((()=>r(i)),[i,r]),a=t.useRef(o.initialValueFn()),[s,l]=t.useState(a.current);return n((()=>{let{initialValueFn:e,subscribe:t}=o,n=e();return a.current!==n&&(a.current=n,l(n)),t((e=>{a.current=e,l(e)}))}),[o,r]),s}(i)}}function Ye(){return Ue||(Ue=1,We=Ge()),We}var Ze,Ve,Je,qe={};function Xe(){return Je||(Je=1,Ve=function(){if(Ze)return qe;Ze=1;var e=Le();function t(e,t=!0){return!e&&(e=n(),t&&(e=e.trim()),""===e)}function n(){return e.$getRoot().getTextContent()}function r(n){if(!t(n,!1))return!1;let r=(n=e.$getRoot().getChildren()).length;if(1<r)return!1;for(let t=0;t<r;t++){var i=n[t];if(e.$isDecoratorNode(i))return!1;if(e.$isElementNode(i)){if(!e.$isParagraphNode(i)||0!==i.__indent)return!1;let n=(i=i.getChildren()).length;for(let r=0;r<n;r++)if(!e.$isTextNode(i[t]))return!1}}return!0}return qe.$canShowPlaceholder=r,qe.$canShowPlaceholderCurry=function(e){return()=>r(e)},qe.$findTextIntersectionFromCharacters=function(t,n){var r=t.getFirstChild();t=0;e:for(;null!==r;){if(e.$isElementNode(r)){var i=r.getFirstChild();if(null!==i){r=i;continue}}else if(e.$isTextNode(r)){if(t+(i=r.getTextContentSize())>n)return{node:r,offset:n-t};t+=i}if(null===(i=r.getNextSibling())){for(r=r.getParent();null!==r;){if(null!==(i=r.getNextSibling())){r=i;continue e}r=r.getParent()}break}r=i}return null},qe.$isRootTextContentEmpty=t,qe.$isRootTextContentEmptyCurry=function(e,n){return()=>t(e,n)},qe.$rootTextContent=n,qe.registerLexicalTextEntity=function(t,n,r,i){let o=t=>{const n=e.$createTextNode(t.getTextContent());n.setFormat(t.getFormat()),t.replace(n)};return[t.registerNodeTransform(e.TextNode,(t=>{if(t.isSimpleText()){var a=t.getPreviousSibling(),s=t.getTextContent(),l=t;if(e.$isTextNode(a)){var u=a.getTextContent(),d=n(u+s);if(a instanceof r){if(null===d||0!==a.getLatest().__mode)return void o(a);if(0<(d=d.end-u.length))return l=u+(l=s.slice(0,d)),a.select(),a.setTextContent(l),void(d===s.length?t.remove():(a=s.slice(d),t.setTextContent(a)))}else if(null===d||d.start<u.length)return}for(;;){if(s=d=null===(t=n(s))?"":s.slice(t.end),""===d){if(u=l.getNextSibling(),e.$isTextNode(u)){if(d=l.getTextContent()+u.getTextContent(),null===(d=n(d))){u instanceof r?o(u):u.markDirty();break}if(0!==d.start)break}}else if(null!==(u=n(d))&&0===u.start)break;if(null===t)break;if(0===t.start&&e.$isTextNode(a)&&a.isTextEntity())continue;let c;if(0===t.start?[c,l]=l.splitText(t.end):[,c,l]=l.splitText(t.start,t.end),(t=i(c)).setFormat(c.getFormat()),c.replace(t),null==l)break}}})),t=t.registerNodeTransform(r,(t=>{var i=t.getTextContent();const a=n(i);null===a||0!==a.start?o(t):i.length>a.end?t.splitText(a.end):(i=t.getPreviousSibling(),e.$isTextNode(i)&&i.isTextEntity()&&(o(i),o(t)),i=t.getNextSibling(),e.$isTextNode(i)&&i.isTextEntity()&&(o(i),t instanceof r&&o(t)))}))]},qe}()),Ve}var Qe,et,tt,nt={};function rt(){return tt||(tt=1,et=function(){if(Qe)return nt;Qe=1;var e=Le();let t=new Map;function n(e){for(;null!=e;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function r(e){let t=e.parentNode;if(null==t)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function i(e){let t={};e=e.split(";");for(let n of e)if(""!==n){let[e,r]=n.split(/:([^]+)/);e&&r&&(t[e.trim()]=r.trim())}return t}function o(e){let n=t.get(e);return void 0===n&&(n=i(e),t.set(e,n)),n}function a(e,n){var r=o("getStyle"in e?e.getStyle():e.style);r=function(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}(n=Object.entries(n).reduce(((e,[t,n])=>(null===n?delete e[t]:e[t]=n,e)),{...r})),e.setStyle(r),t.set(r,n)}function s(t){for(;null!==t&&!e.$isRootOrShadowRoot(t);){let e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function l(t,n,r,i,o=null){if(0!==n.length){var a=n[0],l=new Map,u=[];(a=e.$isElementNode(a)?a:a.getParentOrThrow()).isInline()&&(a=a.getParentOrThrow());for(var d=!1;null!==a;){var c=a.getPreviousSibling();if(null!==c){a=c,d=!0;break}
1if(a=a.getParentOrThrow(),e.$isRootOrShadowRoot(a))break}c=new Set;for(var h=0;h<r;h++){var g=n[h];e.$isElementNode(g)&&0===g.getChildrenSize()&&c.add(g.getKey())}var p=new Set;for(h=0;h<r;h++){var f=(g=n[h]).getParent();if(null!==f&&f.isInline()&&(f=f.getParent()),null!==f&&e.$isLeafNode(g)&&!p.has(g.getKey())){if(g=f.getKey(),void 0===l.get(g)){let t=i();t.setFormat(f.getFormatType()),t.setIndent(f.getIndent()),u.push(t),l.set(g,t),f.getChildren().forEach((n=>{t.append(n),p.add(n.getKey()),e.$isElementNode(n)&&n.getChildrenKeys().forEach((e=>p.add(e)))})),s(f)}}else if(c.has(g.getKey())){if(!e.$isElementNode(g))throw Error("Expected node in emptyElements to be an ElementNode");(f=i()).setFormat(g.getFormatType()),f.setIndent(g.getIndent()),u.push(f),g.remove(!0)}}if(null!==o)for(n=0;n<u.length;n++)o.append(u[n]);if(n=null,e.$isRootOrShadowRoot(a))if(d)if(null!==o)a.insertAfter(o);else for(o=u.length-1;0<=o;o--)a.insertAfter(u[o]);else if(d=a.getFirstChild(),e.$isElementNode(d)&&(a=d),null===d)if(o)a.append(o);else for(o=0;o<u.length;o++)d=u[o],a.append(d),n=d;else if(null!==o)d.insertBefore(o);else for(a=0;a<u.length;a++)o=u[a],d.insertBefore(o),n=o;else if(o)a.insertAfter(o);else for(o=u.length-1;0<=o;o--)d=u[o],a.insertAfter(d),n=d;u=e.$getPreviousSelection(),e.$isRangeSelection(u)&&u.anchor.getNode().isAttached()&&u.focus.getNode().isAttached()?e.$setSelection(u.clone()):null!==n?n.selectEnd():t.dirty=!0}}function u(e,t,n,r){e.modify(t?"extend":"move",n,r)}function d(t){return t=t.anchor.getNode(),"rtl"===(e.$isRootNode(t)?t:t.getParentOrThrow()).getDirection()}function c(t){if(e.$isDecoratorNode(t)&&!t.isInline())return!0;if(!e.$isElementNode(t)||e.$isRootOrShadowRoot(t))return!1;var n=t.getFirstChild();return n=null===n||e.$isLineBreakNode(n)||e.$isTextNode(n)||n.isInline(),!t.isInline()&&!1!==t.canBeEmpty()&&n}return nt.$addNodeStyle=function(e){let n=i(e=e.getStyle());t.set(e,n)},nt.$cloneWithProperties=function(t){let n=t.constructor.clone(t);return n.__parent=t.__parent,n.__next=t.__next,n.__prev=t.__prev,e.$isElementNode(t)&&e.$isElementNode(n)?(n.__first=t.__first,n.__last=t.__last,n.__size=t.__size,n.__format=t.__format,n.__indent=t.__indent,n.__dir=t.__dir,n):(e.$isTextNode(t)&&e.$isTextNode(n)&&(n.__format=t.__format,n.__style=t.__style,n.__mode=t.__mode,n.__detail=t.__detail),n)},nt.$getSelectionStyleValueForProperty=function(t,n,r=""){let i=null,a=t.getNodes();var s=t.anchor,l=t.focus,u=t.isBackward();let d=u?l.offset:s.offset;if(s=u?l.getNode():s.getNode(),t.isCollapsed()&&""!==t.style&&null!==(t=o(t.style))&&n in t)return t[n];for(t=0;t<a.length;t++){var c=a[t];
1if((0===t||0!==d||!c.is(s))&&e.$isTextNode(c))if(l=n,u=r,l=null!==(c=o(c=c.getStyle()))&&c[l]||u,null===i)i=l;else if(i!==l){i="";break}}return null===i?r:i},nt.$isAtNodeEnd=function(t){if("text"===t.type)return t.offset===t.getNode().getTextContentSize();let n=t.getNode();if(!e.$isElementNode(n))throw Error("isAtNodeEnd: node must be a TextNode or ElementNode");return t.offset===n.getChildrenSize()},nt.$isParentElementRTL=d,nt.$moveCaretSelection=u,nt.$moveCharacter=function(e,t,n){let r=d(e);u(e,t,n?!r:r,"character")},nt.$patchStyleText=function t(n,r){var i=n.getNodes(),o=i.length;if(e.$isRangeSelection(n)){--o;var s=i[0],l=i[o];if(n.isCollapsed()&&e.$isRangeSelection(n))a(n,r);else{var u=n.anchor,d=n.focus,c=s.getTextContent().length,h=d.offset,g=u.offset,p=u.isBefore(d),f=p?g:h;n=p?h:g;var m=p?u.type:d.type,_=p?d.type:u.type;if(d=p?d.key:u.key,e.$isTextNode(s)&&f===c&&(p=s.getNextSibling(),e.$isTextNode(p)&&(f=g=0,s=p)),1===i.length)e.$isTextNode(s)&&(f="element"===m?0:g>h?h:g)!==(n="element"===_?c:g>h?g:h)&&(0===f&&n===c?(a(s,r),s.select(f,n)):(i=s.splitText(f,n),a(i=0===f?i[0]:i[1],r),i.select(0,n-f)));else for(e.$isTextNode(s)&&f<s.getTextContentSize()&&(0!==f&&(s=s.splitText(f)[1],f=0,u.set(s.getKey(),f,"text")),a(s,r)),e.$isTextNode(l)&&(f=l.getTextContent().length,l.__key!==d&&0!==n&&(n=f),n!==f&&([l]=l.splitText(n)),0!==n&&a(l,r)),n=1;n<o;n++)u=(f=i[n]).getKey(),e.$isTextNode(f)&&u!==s.getKey()&&u!==l.getKey()&&!f.isToken()&&a(f,r)}}else{for(l=(s=e.$createRangeSelection()).anchor,f=s.focus,u=0;u<o;u++)c=i[u],e.DEPRECATED_$isGridCellNode(c)&&(l.set(c.getKey(),0,"element"),f.set(c.getKey(),c.getChildrenSize(),"element"),t(e.$normalizeSelection__EXPERIMENTAL(s),r));e.$setSelection(n)}},nt.$selectAll=function(t){let n=t.anchor;t=t.focus;var r=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();let i=r.getFirstDescendant();r=r.getLastDescendant();let o="element",a="element",s=0;e.$isTextNode(i)?o="text":e.$isElementNode(i)||null===i||(i=i.getParentOrThrow()),e.$isTextNode(r)?(a="text",s=r.getTextContentSize()):e.$isElementNode(r)||null===r||(r=r.getParentOrThrow()),i&&r&&(n.set(i.getKey(),0,o),t.set(r.getKey(),s,a))},nt.$setBlocksType=function(t,n){if("root"===t.anchor.key){n=n();var r=e.$getRoot();(t=r.getFirstChild())?t.replace(n,!0):r.append(n)}else{for(r=t.getNodes(),t=t.anchor.getNode();null!==t&&null!==t.getParent()&&!c(t);)t=t.getParentOrThrow();for((t=c(t)?t:null)&&-1===r.indexOf(t)&&r.push(t),t=0;t<r.length;t++){let i=r[t];if(!c(i))continue;if(!e.$isElementNode(i))throw Error("Expected block node to be an ElementNode");let o=n();o.setFormat(i.getFormatType()),o.setIndent(i.getIndent()),i.replace(o,!0)}}},nt.$shouldOverrideDefaultCharacterSelection=function(t,n){return t=e.$getAdjacentNode(t.focus,n),e.$isDecoratorNode(t)&&!t.isIsolated()||e.$isElementNode(t)&&!t.isInline()&&!t.canBeEmpty()},nt.$sliceSelectedTextNodeContent=function(t,n){if(n.isSelected(t)&&!n.isSegmented()&&!n.isToken()&&e.$INTERNAL_isPointSelection(t)){var r=t.anchor.getNode(),i=t.focus.getNode(),o=n.is(r),a=n.is(i);if(o||a){o=t.isBackward();let e,[s,l]=t.getCharacterOffsets();t=r.is(i),a=n.is(o?i:r),i=n.is(o?r:i),r=0,t?(r=s>l?l:s,e=s>l?s:l):a?(r=o?l:s,e=void 0):i&&(r=0,e=o=o?s:l),n.__text=n.__text.slice(r,e)}}return n},nt.$wrapNodes=function(t,n,r=null){var i=t.getNodes();let o=i.length;var a=t.anchor;if(0===o||1===o&&"element"===a.type&&0===a.getNode().getChildrenSize()){i=(t="text"===a.type?a.getNode().getParentOrThrow():a.getNode()).getChildren();let e=n();e.setFormat(t.getFormatType()),e.setIndent(t.getIndent()),i.forEach((t=>e.append(t))),r&&(e=r.append(e)),t.replace(e)}else{a=null;var s=[];for(let u=0;u<o;u++){let o=i[u];e.$isRootOrShadowRoot(o)?(l(t,s,s.length,n,r),s=[],a=o):null===a||null!==a&&e.$hasAncestor(o,a)?s.push(o):(l(t,s,s.length,n,r),s=[o])}l(t,s,s.length,n,r)}},nt.createDOMRange=function(t,i,o,a,s){let l=i.getKey(),u=a.getKey(),d=document.createRange(),c=t.getElementByKey(l);if(t=t.getElementByKey(u),e.$isTextNode(i)&&(c=n(c)),e.$isTextNode(a)&&(t=n(t)),void 0===i||void 0===a||null===c||null===t)return null;"BR"===c.nodeName&&([c,o]=r(c)),"BR"===t.nodeName&&([t,s]=r(t)),i=c.firstChild,c===t&&null!=i&&"BR"===i.nodeName&&0===o&&0===s&&(s=1);try{d.setStart(c,o),d.setEnd(t,s)}catch{return null}return!d.collapsed||o===s&&l===u||(d.setStart(t,s),d.setEnd(c,o)),d},nt.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(null===n)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight);let r,i=(t=Array.from(t.getClientRects())).length;t.sort(((e,t)=>{let n=e.top-t.top;return 3>=Math.abs(n)?e.left-t.left:n}));for(let o=0;o<i;o++){let a=t[o],s=a.width+n===e.width;r&&r.top<=a.top&&r.top+r.height>
1a.top&&r.left+r.width>a.left||s?(t.splice(o--,1),i--):r=a}return t},nt.getStyleObjectFromCSS=o,nt.trimTextContentFromAnchor=function(t,n,r){let i=n.getNode();if(e.$isElementNode(i)){var o=i.getDescendantByIndex(n.offset);null!==o&&(i=o)}for(;0<r&&null!==i;){e.$isElementNode(i)&&null!==(o=i.getLastDescendant())&&(i=o);var a=i.getPreviousSibling(),s=0;if(null===a){for(var l=(o=i.getParentOrThrow()).getPreviousSibling();null===l;){if(null===(o=o.getParent())){a=null;break}l=o.getPreviousSibling()}null!==o&&(s=o.isInline()?0:2,a=l)}if(""===(l=i.getTextContent())&&e.$isElementNode(i)&&!i.isInline()&&(l="\n\n"),o=l.length,!e.$isTextNode(i)||r>=o)l=i.getParent(),i.remove(),null==l||0!==l.getChildrenSize()||e.$isRootNode(l)||l.remove(),r-=o+s,i=a;else{let u=i.getKey();s=t.getEditorState().read((()=>{const t=e.$getNodeByKey(u);return e.$isTextNode(t)&&t.isSimpleText()?t.getTextContent():null})),a=o-r;let d=l.slice(0,a);null!==s&&s!==l?(r=e.$getPreviousSelection(),o=i,i.isSimpleText()?i.setTextContent(s):(o=e.$createTextNode(s),i.replace(o)),e.$isRangeSelection(r)&&r.isCollapsed()&&(r=r.anchor.offset,o.select(r,r))):i.isSimpleText()?(s=n.key===u,(l=n.offset)<r&&(l=o),r=s?l-r:0,o=s?l:a,s&&0===r?([r]=i.splitText(r,o),r.remove()):([,r]=i.splitText(r,o),r.remove())):(r=e.$createTextNode(d),i.replace(r)),r=0}}},nt}()),et}var it,ot,at,st={};function lt(){if(it)return st;it=1;var e=rt(),t=Le();function n(...e){return()=>{e.forEach((e=>e()))}}let r={attributes:!0,characterData:!0,childList:!0,subtree:!0};function i(t,n,i){function o(){if(null===s)throw Error("Unexpected null rootDOMNode");if(null===l)throw Error("Unexpected null parentDOMNode");let{left:r,top:o}=s.getBoundingClientRect();var a=l;let u=e.createRectsFromDOMRange(t,n);c.isConnected||a.append(c),a=!1;for(let e=0;e<u.length;e++){var h=u[e];let t=d[e]||document.createElement("div"),n=t.style;"absolute"!==n.position&&(n.position="absolute",a=!0);var g=h.left-r+"px";n.left!==g&&(n.left=g,a=!0),g=h.top-o+"px",n.top!==g&&(t.style.top=g,a=!0),g=`${h.width}px`,n.width!==g&&(t.style.width=g,a=!0),h=`${h.height}px`,n.height!==h&&(t.style.height=h,a=!0),t.parentNode!==c&&(c.append(t),a=!0),d[e]=t}for(;d.length>u.length;)d.pop();a&&i(d)}function a(){s=l=null,null!==u&&u.disconnect(),u=null,c.remove();for(let e of d)e.remove();d=[]}let s=null,l=null,u=null,d=[],c=document.createElement("div"),h=t.registerRootListener((function e(){let n=t.getRootElement();if(null===n)return a();let i=n.parentElement;if(!(i instanceof HTMLElement))return a();a(),s=n,l=i,u=new MutationObserver((n=>{let r=t.getRootElement(),i=r&&r.parentElement;if(r!==s||i!==l)return e();for(let e of n)if(!c.contains(e.target))return o()})),u.observe(i,r),o()}));return()=>{h(),a()}}function o(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}let a=(e,n)=>{for(;e!==t.$getRoot()&&null!=e;){if(n(e))return e;e=e.getParent()}return null};return st.$splitNode=t.$splitNode,st.isHTMLAnchorElement=t.isHTMLAnchorElement,st.isHTMLElement=t.isHTMLElement,st.$dfs=function(e,n){let r=[];e=(e||t.$getRoot()).getLatest(),n=n||(t.$isElementNode(e)?e.getLastDescendant():e);for(var i=e,o=0;null!==(i=i.getParent());)o++;for(i=o;null!==e&&!e.is(n);)if(r.push({depth:i,node:e}),t.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),i++;else for(o=null;null===o&&null!==e;)null===(o=e.getNextSibling())?(e=e.getParent(),i--):e=o;return null!==e&&e.is(n)&&r.push({depth:i,node:e}),r},st.$filter=function(e,t){let n=[];for(let r=0;r<e.length;r++){let i=t(e[r]);null!==i&&n.push(i)}return n},st.$findMatchingParent=a,st.$getNearestBlockElementAncestorOrThrow=function(e){let n=a(e,(e=>t.$isElementNode(e)&&!e.isInline()));return t.$isElementNode(n)||function(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(4,e.__key),n},st.$getNearestNodeOfType=function(e,t){for(;null!=e;){if(e instanceof t)return e;e=e.getParent()}return null},st.$insertFirst=function(e,t){let n=e.getFirstChild();null!==n?n.insertBefore(t):e.append(t)}
1,st.$insertNodeToNearestRoot=function(e){var n=t.$getSelection()||t.$getPreviousSelection();if(t.$isRangeSelection(n)){var{focus:r}=n;if(n=r.getNode(),r=r.offset,t.$isRootOrShadowRoot(n))null==(r=n.getChildAtIndex(r))?n.append(e):r.insertBefore(e),e.selectNext();else{let i,o;t.$isTextNode(n)?(i=n.getParentOrThrow(),o=n.getIndexWithinParent(),0<r&&(o+=1,n.splitText(r))):(i=n,o=r),[,n]=t.$splitNode(i,o),n.insertBefore(e),n.selectStart()}}else null!=n?(n=n.getNodes())[n.length-1].getTopLevelElementOrThrow().insertAfter(e):t.$getRoot().append(e),n=t.$createParagraphNode(),e.insertAfter(n),n.select();return e.getLatest()},st.$restoreEditorState=function(n,r){let i=new Map,o=n._pendingEditorState;for(let[a,s]of r._nodeMap){let n=e.$cloneWithProperties(s);if(t.$isTextNode(n)){if(!t.$isTextNode(s))throw Error("Expected node be a TextNode");n.__text=s.__text}i.set(a,n)}o&&(o._nodeMap=i),n._dirtyType=2,n=r._selection,t.$setSelection(null===n?null:n.clone())},st.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t},st.addClassNamesToElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&(t=t.split(" ").filter((e=>""!==e)),e.classList.add(...t))}))},st.isMimeType=o,st.markSelection=function(e,r){function o(n){n.read((()=>{var n=t.$getSelection();if(t.$isRangeSelection(n)){var{anchor:o,focus:c}=n,h=(n=o.getNode()).getKey(),g=o.offset,p=c.getNode(),f=p.getKey(),m=c.offset,_=e.getElementByKey(h),y=e.getElementByKey(f);if(h=null===a||null===_||g!==s||h!==a.getKey()||n!==a&&(!(a instanceof t.TextNode)||n.updateDOM(a,_,e._config)),f=null===l||null===y||m!==u||f!==l.getKey()||p!==l&&(!(l instanceof t.TextNode)||p.updateDOM(l,y,e._config)),h||f){_=e.getElementByKey(o.getNode().getKey());var v=e.getElementByKey(c.getNode().getKey());if(null!==_&&null!==v&&"SPAN"===_.tagName&&"SPAN"===v.tagName){if(f=document.createRange(),c.isBefore(o)?(h=v,y=c.offset,v=_,_=o.offset):(h=_,y=o.offset,_=c.offset),null===(h=h.firstChild)||null===(v=v.firstChild))throw Error("Expected text node to be first child of span");f.setStart(h,y),f.setEnd(v,_),d(),d=i(e,f,(e=>{for(let t of e){let e=t.style;"Highlight"!==e.background&&(e.background="Highlight"),"HighlightText"!==e.color&&(e.color="HighlightText"),"-1"!==e.zIndex&&(e.zIndex="-1"),"none"!==e.pointerEvents&&(e.pointerEvents="none"),"-1.5px"!==e.marginTop&&(e.marginTop="-1.5px"),"4px"!==e.paddingTop&&(e.paddingTop="4px"),"0px"!==e.paddingBottom&&(e.paddingBottom="0px")}void 0!==r&&r(e)}))}}a=n,s=g,l=p,u=m}else u=l=s=a=null,d(),d=()=>{}}))}let a=null,s=null,l=null,u=null,d=()=>{};return o(e.getEditorState()),n(e.registerUpdateListener((({editorState:e})=>o(e))),d,(()=>{d()}))},st.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise(((e,r)=>{let i=[],a=()=>{const{done:s,value:l}=n.next();if(s)return e(i);const u=new FileReader;u.addEventListener("error",r),u.addEventListener("load",(()=>{const e=u.result;
1"string"==typeof e&&i.push({file:l,result:e}),a()})),o(l,t)?u.readAsDataURL(l):a()};a()}))},st.mergeRegister=n,st.objectKlassEquals=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name},st.positionNodeOnRange=i,st.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,(e=>{e:{for(var i=e.getChildren(),o=0;o<i.length;o++)if(i[o]instanceof t){i=null;break e}for(i=e;null!==i;)if(o=i,(i=i.getParent())instanceof t){i={child:o,parent:i};break e}i=null}if(null!==i){const{child:t,parent:a}=i;if(t.is(e)){if(r(a,e),i=(e=t.getNextSiblings()).length,a.insertAfter(t),0!==i){o=n(a),t.insertAfter(o);for(let t=0;t<i;t++)o.append(e[t])}a.canBeEmpty()||0!==a.getChildrenSize()||a.remove()}}}))},st.removeClassNamesFromElement=function(e,...t){t.forEach((t=>{"string"==typeof t&&e.classList.remove(...t.split(" "))}))},st}function ut(){return at||(at=1,ot=lt()),ot}var dt,ct,ht,gt={};function pt(){return ht||(ht=1,ct=function(){if(dt)return gt;dt=1;var e=Le();return gt.registerDragonSupport=function(t){let n=window.location.origin,r=r=>{if(r.origin===n){var i=t.getRootElement();if(document.activeElement===i&&"string"==typeof(i=r.data)){try{var o=JSON.parse(i)}catch{return}if(o&&"nuanria_messaging"===o.protocol&&"request"===o.type&&(o=o.payload)&&"makeChanges"===o.functionId&&(o=o.args)){const[n,i,a,s,l]=o;t.update((()=>{const t=e.$getSelection();if(e.$isRangeSelection(t)){var o=t.anchor;let u=o.getNode(),d=0,c=0;e.$isTextNode(u)&&0<=n&&0<=i&&(d=n,c=n+i,t.setTextNodeRange(u,d,u,c)),(d!==c||""!==a)&&(t.insertRawText(a),u=o.getNode()),e.$isTextNode(u)&&(d=s,c=s+l,d=d>(o=u.getTextContentSize())?o:d,c=c>o?o:c,t.setTextNodeRange(u,d,u,c)),r.stopImmediatePropagation()}}))}}}};return window.addEventListener("message",r,!0),()=>{window.removeEventListener("message",r,!0)}},gt}()),ct}var ft,mt,_t,yt={};function vt(){return _t||(_t=1,mt=function(){if(ft)return yt;ft=1;var e=rt(),t=ut(),n=Le();function r(i,o,a,s=null){let l=null==s||o.isSelected(s),u=n.$isElementNode(o)&&o.excludeFromCopy("html");var d=o;null!==s&&(d=e.$cloneWithProperties(o),d=n.$isTextNode(d)&&null!=s?e.$sliceSelectedTextNodeContent(s,d):d);let c=n.$isElementNode(d)?d.getChildren():[];var h=i._nodes.get(d.getType());h=h&&void 0!==h.exportDOM?h.exportDOM(i,d):d.exportDOM(i);let{element:g,after:p}=h;if(!g)return!1;h=document.createDocumentFragment();for(let e=0;e<c.length;e++){let t=c[e],a=r(i,t,h,s);!l&&n.$isElementNode(o)&&a&&o.extractWithChild(t,s,"html")&&(l=!0)}return l&&!u?(t.isHTMLElement(g)&&g.append(h),a.append(g),p&&(i=p.call(d,g))&&g.replaceWith(i)):a.append(h),l}let i=new Set(["STYLE","SCRIPT"]);function o(e,t,r=new Map,a){let s=[];if(i.has(e.nodeName))return s;let l=null;var u,{nodeName:d}=e,c=t._htmlConversions.get(d.toLowerCase());if(d=null,void 0!==c)for(u of c)null!==(c=u(e))&&(null===d||(d.priority||0)<(c.priority||0))&&(d=c);if(d=(u=null!==d?d.conversion:null)?u(e):null,u=null,null!==d){if(u=d.after,c=d.node,l=Array.isArray(c)?c[c.length-1]:c,null!==l){for(var[,h]of r)if(l=h(l,a),!l)break;l&&s.push(...Array.isArray(c)?c:[l])}null!=d.forChild&&r.set(e.nodeName,d.forChild)}for(e=e.childNodes,a=[],h=0;h<e.length;h++)a.push(...o(e[h],t,new Map(r),l));return null!=u&&(a=u(a)),null==l?s=s.concat(a):n.$isElementNode(l)&&l.append(...a),s}return yt.$generateHtmlFromNodes=function(e,t){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let i=document.createElement("div"),o=n.$getRoot().getChildren();for(let n=0;n<o.length;n++)r(e,o[n],i,t);return i.innerHTML},yt.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let a=0;a<t.length;a++){var r=t[a];i.has(r.nodeName)||null!==(r=o(r,e))&&(n=n.concat(r))}return n},yt}()),mt}var Et,Nt,Ct,bt={};function Tt(){return Ct||(Ct=1,Nt=function(){if(Et)return bt;Et=1;var e=vt(),t=rt(),n=ut(),r=Le();function i(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let o=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function a(t){let n=r.$getSelection();if(null==n)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(n)&&n.isCollapsed()||0===n.getNodes().length?"":e.$generateHtmlFromNodes(t,n)}function s(e){let t=r.$getSelection();if(null==t)throw Error("Expected valid LexicalSelection");return r.$isRangeSelection(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(d(e,t))}function l(e,t,n){e.dispatchCommand(r.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,{nodes:t,selection:n})||n.insertNodes(t)}function u(e,n,o,a=[]){let s=null==n||o.isSelected(n),l=r.$isElementNode(o)&&o.excludeFromCopy("html");var d=o;if(null!==n){var c=t.$cloneWithProperties(o);d=c=r.$isTextNode(c)&&null!=n?t.$sliceSelectedTextNodeContent(n,c):c}let h=r.$isElementNode(d)?d.getChildren():[];var g=d;c=g.exportJSON();var p=g.constructor;for(c.type!==p.getType()&&i(58,p.name),r.$isElementNode(g)&&(Array.isArray(c.children)||i(59,p.name)),r.$isTextNode(d
1)&&(0<(d=d.__text).length?c.text=d:s=!1),d=0;d<h.length;d++)p=u(e,n,g=h[d],c.children),!s&&r.$isElementNode(o)&&p&&o.extractWithChild(g,n,"clone")&&(s=!0);if(s&&!l)a.push(c);else if(Array.isArray(c.children))for(e=0;e<c.children.length;e++)a.push(c.children[e]);return s}function d(e,t){let n=[],i=r.$getRoot().getChildren();for(let r=0;r<i.length;r++)u(e,t,i[r],n);return{namespace:e._config.namespace,nodes:n}}function c(e){let n=[];for(let i=0;i<e.length;i++){let o=r.$parseSerializedNode(e[i]);r.$isTextNode(o)&&t.$addNodeStyle(o),n.push(o)}return n}let h=null;function g(e,t){var n=o?(e._window||window).getSelection():null;if(!n)return!1;var i=n.anchorNode;if(n=n.focusNode,null!==i&&null!==n&&!r.isSelectionWithinEditor(e,i,n)||(t.preventDefault(),t=t.clipboardData,i=r.$getSelection(),null===t||null===i))return!1;n=a(e),e=s(e);let l="";return null!==i&&(l=i.getTextContent()),null!==n&&t.setData("text/html",n),null!==e&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",l),!0}return bt.$generateJSONFromSelectedNodes=d,bt.$generateNodesFromSerializedNodes=c,bt.$getHtmlContent=a,bt.$getLexicalContent=s,bt.$insertDataTransferForPlainText=function(e,t){null!=(e=e.getData("text/plain")||e.getData("text/uri-list"))&&t.insertRawText(e)},bt.$insertDataTransferForRichText=function(t,n,i){var o=t.getData("application/x-lexical-editor");if(o)try{let e=JSON.parse(o);if(e.namespace===i._config.namespace&&Array.isArray(e.nodes))return l(i,c(e.nodes),n)}catch{}if(o=t.getData("text/html"))try{var a=(new DOMParser).parseFromString(o,"text/html");return l(i,e.$generateNodesFromDOM(i,a),n)}catch{}if(null!=(t=t.getData("text/plain")||t.getData("text/uri-list")))if(r.$isRangeSelection(n))for(""===(t=t.split(/(\r?\n|\t)/))[t.length-1]&&t.pop(),i=0;i<t.length;i++)"\n"===(a=t[i])||"\r\n"===a?n.insertParagraph():"\t"===a?n.insertNodes([r.$createTabNode()]):n.insertText(a);else n.insertRawText(t)},bt.$insertGeneratedNodes=l,bt.copyToClipboard=async function(e,t){if(null!==h)return!1;if(null!==t)return new Promise((n=>{e.update((()=>{n(g(e,t))}))}));var i=e.getRootElement();let a=null==e._window?window.document:e._window.document,s=o?(e._window||window).getSelection():null;if(null===i||null===s)return!1;let l=a.createElement("span");return l.style.cssText="position: fixed; top: -1000px;",l.append(a.createTextNode("#")),i.append(l),(i=new Range).setStart(l,0),i.setEnd(l,1),s.removeAllRanges(),s.addRange(i),new Promise((t=>{let i=e.registerCommand(r.COPY_COMMAND,(r=>(n.objectKlassEquals(r,ClipboardEvent)&&(i(),null!==h&&(window.clearTimeout(h),h=null),t(g(e,r))),!0)),r.COMMAND_PRIORITY_CRITICAL);h=window.setTimeout((()=>{i(),h=null,t(!1)}),50),a.execCommand("copy"),l.remove()}))},bt}()),Nt}var xt,wt,St,At={};function Ot(){if(xt)return At;xt=1;var e=Tt(),t=rt(),n=ut(),r=Le();function i(e,t){return typeof document.caretRangeFromPoint<"u"?null===(e=document.caretRangeFromPoint(e,t))?null:{node:e.startContainer,offset:e.startOffset}:"undefined"!==document.caretPositionFromPoint?null===(e=document.caretPositionFromPoint(e,t))?null:{node:e.offsetNode,offset:e.offset}:null}let o=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",a=o&&"documentMode"in document?document.documentMode:null,s=!(!o||!("InputEvent"in window)||a)&&"getTargetRanges"in new window.InputEvent("input"),l=o&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),u=o&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,d=o&&/^(?=.*Chrome).*/i.test(navigator.userAgent),c=o&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!d,h=r.createCommand("DRAG_DROP_PASTE_FILE");class g extends r.ElementNode{static getType(){return"quote"}static clone(e){return new g(e.__key)}constructor(e){super(e)}createDOM(e){let t=document.createElement("blockquote");return n.addClassNamesToElement(t,e.theme.quote),t}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:y,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&n.isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=p();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,t){e=r.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=r.$createParagraphNode();
1return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}}function p(){return r.$applyNodeReplacement(new g)}class f extends r.ElementNode{static getType(){return"heading"}static clone(e){return new f(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){let t=this.__tag,r=document.createElement(t);return void 0!==(e=e.theme.heading)&&n.addClassNamesToElement(r,e[t]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:_,priority:0}),h2:()=>({conversion:_,priority:0}),h3:()=>({conversion:_,priority:0}),h4:()=>({conversion:_,priority:0}),h5:()=>({conversion:_,priority:0}),h6:()=>({conversion:_,priority:0}),p:e=>null!==(e=e.firstChild)&&m(e)?{conversion:()=>({node:null}),priority:3}:null,span:e=>m(e)?{conversion:()=>({node:v("h1")}),priority:3}:null}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&n.isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=v(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,t=!0){let n=e?e.anchor.offset:0,i=n!==this.getTextContentSize()&&e?v(this.getTag()):r.$createParagraphNode(),o=this.getDirection();return i.setDirection(o),this.insertAfter(i,t),0===n&&!this.isEmpty()&&e&&((e=r.$createParagraphNode()).select(),this.replace(e,!0)),i}collapseAtStart(){let e=this.isEmpty()?r.$createParagraphNode():v(this.getTag());
1return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function m(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function _(e){let t=e.nodeName.toLowerCase(),n=null;return("h1"===t||"h2"===t||"h3"===t||"h4"===t||"h5"===t||"h6"===t)&&(n=v(t),null!==e.style&&n.setFormat(e.style.textAlign)),{node:n}}function y(e){let t=p();return null!==e.style&&t.setFormat(e.style.textAlign),{node:t}}function v(e){return r.$applyNodeReplacement(new f(e))}function E(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),null===t)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function N(e){var t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;let i=new Set;t=t.getNodes();for(let r=0;r<t.length;r++){var o=t[r],a=o.getKey();i.has(a)||(a=(o=n.$getNearestBlockElementAncestorOrThrow(o)).getKey(),o.canIndent()&&!i.has(a)&&(i.add(a),e(o)))}return 0<i.size}function C(e){return e=r.$getNearestNodeFromDOMNode(e),r.$isDecoratorNode(e)}return At.$createHeadingNode=v,At.$createQuoteNode=p,At.$isHeadingNode=function(e){return e instanceof f},At.$isQuoteNode=function(e){return e instanceof g},At.DRAG_DROP_PASTE=h,At.HeadingNode=f,At.QuoteNode=g,At.eventFiles=E,At.registerRichText=function(o){return n.mergeRegister(o.registerCommand(r.CLICK_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isNodeSelection(e)&&(e.clear(),!0)}),0),o.registerCommand(r.DELETE_CHARACTER_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteCharacter(e),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.DELETE_WORD_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteWord(e),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.DELETE_LINE_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.deleteLine(e),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,(t=>{const n=r.$getSelection();if("string"==typeof t)r.$INTERNAL_isPointSelection(n)&&n.insertText(t);else{if(!r.$INTERNAL_isPointSelection(n))return!1;const i=t.dataTransfer;null!=i?e.$insertDataTransferForRichText(i,n,o):r.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.REMOVE_TEXT_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.removeText(),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.FORMAT_TEXT_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.formatText(e),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.FORMAT_ELEMENT_COMMAND,(e=>{var t=r.$getSelection();if(!r.$isRangeSelection(t)&&!r.$isNodeSelection(t))return!1;t=t.getNodes();for(const i of t)null!==(t=n.$findMatchingParent(i,(e=>r.$isElementNode(e)&&!e.isInline())))&&t.setFormat(e);return!0}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.INSERT_LINE_BREAK_COMMAND,(e=>{const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(t.insertLineBreak(e),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.INSERT_PARAGRAPH_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(e.insertParagraph(),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.INSERT_TAB_COMMAND,(()=>(r.$insertNodes([r.$createTabNode()]),!0)),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.INDENT_CONTENT_COMMAND,(()=>N((e=>{const t=e.getIndent();e.setIndent(t+1)}))),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.OUTDENT_CONTENT_COMMAND,(()=>N((e=>{const t=e.getIndent();0<t&&e.setIndent(t-1)}))),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.KEY_ARROW_UP_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)&&!C(e.target)){if(0<(e=t.getNodes()).length)return e[0].selectPrevious(),!0}else if(r.$isRangeSelection(t)&&(t=r.$getAdjacentNode(t.focus,!0),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline()))return t.selectPrevious(),e.preventDefault(),!0;return!1}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.KEY_ARROW_DOWN_COMMAND,(e=>{var t=r.$getSelection();if(r.$isNodeSelection(t)){if(0<(e=t.getNodes()).length)return e[0].selectNext(0,0),!0}else if(r.$isRangeSelection(t)){let n=t.focus;if("root"===n.key&&n.offset===r.$getRoot().getChildrenSize())return e.preventDefault(),!0;if(t=r.$getAdjacentNode(t.focus,!1),!e.shiftKey&&r.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),e.preventDefault(),!0}return!1}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.KEY_ARROW_LEFT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)){var i=n.getNodes();if(0<i.length)return e.preventDefault(),i[0].selectPrevious(),!0}return!(!r.$isRangeSelection(n)||!t.$shouldOverrideDefaultCharacterSelection(n,!0))&&(i=e.shiftKey,e.preventDefault(),t.$moveCharacter(n,i,!0),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,(e=>{const n=r.$getSelection();if(r.$isNodeSelection(n)&&!C(e.target)){var i=n.getNodes();if(0<i.length)return e.preventDefault(),i[0].selectNext(0,0),!0}return!!r.$isRangeSelection(n)&&(i=e.shiftKey,!!t.$shouldOverrideDefaultCharacterSelection(n,!1)&&(e.preventDefault(),t.$moveCharacter(n,i,!1),!0))}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.KEY_BACKSPACE_COMMAND,(e=>{if(C(e.target))return!1;const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;e.preventDefault(),({anchor:e}=t);const i=e.getNode();return t.isCollapsed()&&0===e.offset&&!r.$isRootNode(i)&&0<n.$getNearestBlockElementAncestorOrThrow(i).getIndent()?o.dispatchCommand(r.OUTDENT_CONTENT_COMMAND,void 0):o.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.KEY_DELETE_COMMAND,(e=>{if(C(e.target))return!1;const t=r.$getSelection();return!!r.$isRangeSelection(t)&&(e.preventDefault(),o.dispatchCommand(r.DELETE_CHARACTER_COMMAND,!1))}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.KEY_ENTER_COMMAND,(e=>{const t=r.$getSelection();if(!r.$isRangeSelection(t))return!1;if(null!==e){if((u||l||c)&&s)return!1;if(e.preventDefault(),e.shiftKey)return o.dispatchCommand(r.INSERT_LINE_BREAK_COMMAND,!1)}return o.dispatchCommand(r.INSERT_PARAGRAPH_COMMAND,void 0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.KEY_ESCAPE_COMMAND,(()=>{const e=r.$getSelection();return!!r.$isRangeSelection(e)&&(o.blur(),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.DROP_COMMAND,(e=>{const[,t]=E(e);if(0<t.length){var n=i(e.clientX,e.clientY);if(null!==n){const{offset:e,node:i}
1=n;var a=r.$getNearestNodeFromDOMNode(i);if(null!==a){if(n=r.$createRangeSelection(),r.$isTextNode(a))n.anchor.set(a.getKey(),e,"text"),n.focus.set(a.getKey(),e,"text");else{const e=a.getParentOrThrow().getKey();a=a.getIndexWithinParent()+1,n.anchor.set(e,a,"element"),n.focus.set(e,a,"element")}n=r.$normalizeSelection__EXPERIMENTAL(n),r.$setSelection(n)}o.dispatchCommand(h,t)}return e.preventDefault(),!0}return e=r.$getSelection(),!!r.$isRangeSelection(e)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.DRAGSTART_COMMAND,(e=>{[e]=E(e);const t=r.$getSelection();return!(e&&!r.$isRangeSelection(t))}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.DRAGOVER_COMMAND,(e=>{var[t]=E(e);const n=r.$getSelection();return!(t&&!r.$isRangeSelection(n))&&(null!==(t=i(e.clientX,e.clientY))&&(t=r.$getNearestNodeFromDOMNode(t.node),r.$isDecoratorNode(t)&&e.preventDefault()),!0)}),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.SELECT_ALL_COMMAND,(()=>(r.$selectAll(),!0)),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.COPY_COMMAND,(t=>(e.copyToClipboard(o,n.objectKlassEquals(t,ClipboardEvent)?t:null),!0)),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.CUT_COMMAND,(t=>(async function(t,i){await e.copyToClipboard(i,n.objectKlassEquals(t,ClipboardEvent)?t:null),i.update((()=>{let e=r.$getSelection();r.$isRangeSelection(e)?e.removeText():r.$isNodeSelection(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,o),!0)),r.COMMAND_PRIORITY_EDITOR),o.registerCommand(r.PASTE_COMMAND,(t=>{const[,n,i]=E(t);if(0<n.length&&!i)return o.dispatchCommand(h,n),!0;if(r.isSelectionCapturedInDecoratorInput(t.target))return!1;const a=r.$getSelection();return!!r.$INTERNAL_isPointSelection(a)&&(function(t,n){t.preventDefault(),n.update((()=>{let i=r.$getSelection(),o=t instanceof InputEvent||t instanceof KeyboardEvent?null:t.clipboardData;null!=o&&r.$INTERNAL_isPointSelection(i)&&e.$insertDataTransferForRichText(o,i,n)}),{tag:"paste"})}(t,o),!0)}),r.COMMAND_PRIORITY_EDITOR))},At}function Rt(){return St||(St=1,wt=Ot()),wt}var kt,Dt={};const Mt=function(){if(kt)return Dt;kt=1;var e=ke(),t=Ye(),n=r,o=Xe(),a=ut(),s=i,l=pt(),u=Rt(),d=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?n.useLayoutEffect:n.useEffect;function c(e){return e.getEditorState().read(o.$canShowPlaceholderCurry(e.isComposing()))}function h({content:r}){var[i]=e.useLexicalComposerContext();i=function(e){let[t,r]=n.useState((()=>c(e)));return d((()=>{function t(){let t=c(e);r(t)}return t(),a.mergeRegister(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(i);let o=t();return i?"function"==typeof r?r(o):r:null}return Dt.RichTextPlugin=function({contentEditable:t,placeholder:r,ErrorBoundary:i}){let[o]=e.useLexicalComposerContext();return i=function(e,t){let[r,i]=n.useState((()=>e.getDecorators()));return d((()=>e.registerDecoratorListener((e=>{s.flushSync((()=>{i(e)}))}))),[e]),n.useEffect((()=>{i(e.getDecorators())}),[e]),n.useMemo((()=>{let i=[],o=Object.keys(r);for(let a=0;a<o.length;a++){let l=o[a],u=n.createElement(t,{onError:t=>e._onError(t)},n.createElement(n.Suspense,{fallback:null},r[l])),d=e.getElementByKey(l);null!==d&&i.push(s.createPortal(u,d,l))}return i}),[t,r,e])}(o,i),function(e){d((()=>a.mergeRegister(u.registerRichText(e),l.registerDragonSupport(e))),[e])}(o),n.createElement(n.Fragment,null,t,n.createElement(h,{content:r}),i)},Dt}();var Pt=Mt;var $t,It={};const Lt=function(){if($t)return It;$t=1;var e=ke(),t=r;function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var i=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?t.useLayoutEffect:t.useEffect;return It.ContentEditable=function({ariaActiveDescendant:r,ariaAutoComplete:o,ariaControls:a,ariaDescribedBy:s,ariaExpanded:l,ariaLabel:u,ariaLabelledBy:d,ariaMultiline:c,ariaOwns:h,ariaRequired:g,autoCapitalize:p,className:f,id:m,role:_="textbox",spellCheck:y=!0,style:v,tabIndex:E,"data-testid":N,...C}
1){let[b]=e.useLexicalComposerContext(),[T,x]=t.useState(!1),w=t.useCallback((e=>{b.setRootElement(e)}),[b]);return i((()=>(x(b.isEditable()),b.registerEditableListener((e=>{x(e)})))),[b]),t.createElement("div",n({},C,{"aria-activedescendant":T?r:void 0,"aria-autocomplete":T?o:"none","aria-controls":T?a:void 0,"aria-describedby":s,"aria-expanded":T&&"combobox"===_?!!l:void 0,"aria-label":u,"aria-labelledby":d,"aria-multiline":c,"aria-owns":T?h:void 0,"aria-readonly":!T||void 0,"aria-required":g,autoCapitalize:p,className:f,contentEditable:T,"data-testid":N,id:m,ref:w,role:_,spellCheck:y,style:v,tabIndex:E}))},It}();var Ft,Bt,zt=Lt;const Kt=function(){if(Bt)return Ft;Bt=1;var e=r;function t(e,n){return(t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,n)}var n={error:null},i=function(r){function i(){for(var e,t=arguments.length,i=Array(t),o=0;o<t;o++)i[o]=arguments[o];return(e=r.call.apply(r,[this].concat(i))||this).state=n,e.resetErrorBoundary=function(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];null==e.props.onReset||(t=e.props).onReset.apply(t,r),e.reset()},e}(function(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,t(e,n)})(i,r),i.getDerivedStateFromError=function(e){return{error:e}};var o=i.prototype;return o.reset=function(){this.setState(n)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,i=this.props.resetKeys;null!==this.state.error&&null!==t.error&&function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),e.length!==t.length||e.some((function(e,n){return!Object.is(e,t[n])}))}(e.resetKeys,i)&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,i),this.reset())},o.render=function(){var t=this.state.error,n=this.props,r=n.fallbackRender,i=n.FallbackComponent;if(n=n.fallback,null!==t){if(t={error:t,resetErrorBoundary:this.resetErrorBoundary},e.isValidElement(n))return n;if("function"==typeof r)return r(t);if(i)return e.createElement(i,t);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},i}(e.Component);return Ft=function({children:t,onError:n}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:n},t)}}();const Ht=u(Kt);var Wt,Ut,jt,Gt={};function Yt(){if(Wt)return Gt;Wt=1;var e=Le(),t=ut();function n(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r(e){let t=1;for(e=e.getParent();null!=e;){if(v(e)){if(w(e=e.getParent())){t++,e=e.getParent();continue}n(40)}break}return t}function i(e){w(e=e.getParent())||n(40);let t=e;for(;null!==t;)t=t.getParent(),w(t)&&(e=t);return e}function o(e){let t=[];e=e.getChildren().filter(v);for(let n=0;n<e.length;n++){let r=e[n],i=r.getFirstChild();w(i)?t=t.concat(o(i)):t.push(r)}return t}function a(e){return v(e)&&w(e.getFirstChild())}function s(e){return y().append(e)}function l(e,t){return v(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function u(e,t){e.splice(e.getChildrenSize(),0,t)}function d(e,t){if(w(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),i=y();return i.setFormat(e.getFormatType()),i.setIndent(e.getIndent()),u(i,e.getChildren()),w(n)&&t===n.getListType()?(n.append(i),e.remove(),w(r)&&t===r.getListType()&&(u(n,r.getChildren()),r.remove()),n):w(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(i),e.remove(),r):((t=x(t)).append(i),e.replace(t),h(t),t)}function c(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&a(n)&&a(r)&&(c(n.getFirstChild(),r.getFirstChild()),r.remove()),0<(n=t.getChildren()).length&&(e.append(...n),h(e)),t.remove()}function h(e,t){if(void 0!==(e=t||e.getChildren()))for(t=0;t<e.length;t++){let a=e[t];if(v(a)){let e=a.getValue();var r=a,i=r.getParent(),o=1;
1for(null!=i&&(w(i)?o=i.getStart():n(44)),r=r.getPreviousSiblings(),i=0;i<r.length;i++){let e=r[i];v(e)&&!w(e.getFirstChild())&&o++}e!==o&&a.setValue(o)}}}function g(e){if(!a(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(w(r)&&v(n)&&w(t)){var i=t?t.getFirstChild():void 0,o=t?t.getLastChild():void 0;if(e.is(i))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(o))n.insertAfter(e),t.isEmpty()&&n.remove();else{var s=t.getListType();i=y();let r=x(s);i.append(r),e.getPreviousSiblings().forEach((e=>r.append(e))),o=y(),s=x(s),o.append(s),u(s,e.getNextSiblings()),n.insertBefore(i),n.insertAfter(o),n.replace(e)}h(t),h(r)}}}class p extends e.ElementNode{static getType(){return"listitem"}static clone(e){return new p(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){let t=document.createElement("li"),n=this.getParent();return w(n)&&"check"===n.getListType()&&m(t,this,null),t.value=this.__value,f(t,e.theme,this),t}updateDOM(e,t,n){let r=this.getParent();return w(r)&&"check"===r.getListType()&&m(t,this,e),t.value=this.__value,f(t,n.theme,this),!1}static transform(){return e=>{let t=e.getParent();if(w(t)){if(h(t),!v(e))throw Error("node is not a ListItemNode");"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)}}}static importDOM(){return{li:()=>({conversion:_,priority:0})}}static importJSON(e){let t=y();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportDOM(e){return(e=this.createDOM(e._config)).style.textAlign=this.getFormatType(),{element:e}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...t){for(let n=0;n<t.length;n++){let r=t[n];if(e.$isElementNode(r)&&this.canMergeWith(r)){let e=r.getChildren();this.append(...e),r.remove()}else super.append(r)}return this}replace(t,n){if(v(t))return super.replace(t);this.setIndent(0);let r=this.getParentOrThrow();if(!w(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{let e=x(r.getListType()),n=this.getNextSibling();for(;n;){let t=n;n=n.getNextSibling(),e.append(t)}r.insertAfter(t),t.insertAfter(e)}if(n){if(!e.$isElementNode(t))throw Error("includeChildren should only be true for ElementNodes");
1this.getChildren().forEach((e=>{t.append(e)}))}return this.remove(),0===r.getChildrenSize()&&r.remove(),t}insertAfter(e,t=!0){var r=this.getParentOrThrow();w(r)||n(39);var i=this.getNextSiblings();if(v(e))return t=super.insertAfter(e,t),w(e=e.getParentOrThrow())&&h(e),t;if(w(e)){for(r=e,i=(e=e.getChildren()).length-1;0<=i;i--)r=e[i],this.insertAfter(r,t);return r}if(r.insertAfter(e,t),0!==i.length){let n=x(r.getListType());i.forEach((e=>n.append(e))),e.insertAfter(n,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&a(t)&&a(n)?(c(t.getFirstChild(),n.getFirstChild()),n.remove()):n&&(w(e=n.getParent())&&h(e))}insertNewAfter(e,t=!0){return e=y(null==this.__checked&&void 0),this.insertAfter(e,t),e}collapseAtStart(t){let n=e.$createParagraphNode();this.getChildren().forEach((e=>n.append(e)));var r=this.getParentOrThrow(),i=r.getParentOrThrow();let o=v(i);return 1===r.getChildrenSize()?o?(r.remove(),i.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,i=n.getKey(),"element"===r.type&&r.getNode().is(this)&&r.set(i,r.offset,"element"),"element"===t.type&&t.getNode().is(this)&&t.set(i,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(null===e)return this.getLatest().__indent;e=e.getParentOrThrow();let t=0;for(;v(e);)e=e.getParentOrThrow().getParentOrThrow(),t++;return t}setIndent(e){"number"==typeof e&&-1<e||n(117);let t=this.getIndent();for(;t!==e;)if(t<e){e:{var r=new Set;if(a(this)||r.has(this.getKey()))break e;let e=this.getParent();var i=this.getNextSibling(),o=this.getPreviousSibling();if(a(i)&&a(o)){if(w(o=o.getFirstChild())){o.append(this);var s=i.getFirstChild();w(s)&&(u(o,s=s.getChildren()),i.remove(),r.add(i.getKey())),h(o)}}else a(i)?w(i=i.getFirstChild())&&(null!==(r=i.getFirstChild())&&r.insertBefore(this),h(i)):a(o)?w(i=o.getFirstChild())&&(i.append(this),h(i)):w(e)&&(r=y(),s=x(e.getListType()),r.append(s),s.append(this),o?o.insertAfter(r):i?i.insertBefore(r):e.append(r),h(s));w(e)&&h(e)}t++}else g(this),t--;return this}insertBefore(e){if(v(e)){let e=this.getParentOrThrow();if(w(e)){h(e,this.getNextSiblings())}}return super.insertBefore(e)}canInsertAfter(e){return v(e)}canReplaceWith(e){return v(e)}canMergeWith(t){return e.$isParagraphNode(t)||v(t)}extractWithChild(t,n){if(!e.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return x("bullet")}}function f(e,n,r){let i=[],o=[];var a=(n=n.list)?n.listitem:void 0;if(n&&n.nested)var s=n.nested.listitem;if(void 0!==a&&(a=a.split(" "),i.push(...a)),n){a=w(a=r.getParent())&&"check"===a.getListType();let e=r.getChecked();a&&!e||o.push(n.listitemUnchecked),a&&e||o.push(n.listitemChecked),a&&i.push(e?n.listitemChecked:n.listitemUnchecked)}void 0!==s&&(s=s.split(" "),r.getChildren().some((e=>w(e)))?i.push(...s):o.push(...s)),0<o.length&&t.removeClassNamesFromElement(e,...o),0<i.length&&t.addClassNamesToElement(e,...i)}function m(e,t,n){w(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function _(e){return{node:y(e=t.isHTMLElement(e)&&"true"===e.getAttribute("aria-checked"))}}function y(t){return e.$applyNodeReplacement(new p(void 0,t))}function v(e){return e instanceof p}class E extends e.ElementNode{static getType(){return"list"}static clone(e){return new E(e.__listType||T[e.__tag],e.__start,e.__key)}constructor(e,t,n){super(n),this.__listType=e=T[e]||e,this.__tag="number"===e?"ol":"ul",this.__start=t}getTag(){return this.__tag}setListType(e){let t=this.getWritable();t.__listType=e,t.__tag="number"===e?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e){let t=document.createElement(this.__tag);return 1!==this.__start&&t.setAttribute("start",String(this.__start)),t.__lexicalListType=this.__listType,N(t,e.theme,this),t}updateDOM(e,t,n){return e.__tag!==this.__tag||(N(t,n.theme,this),!1)}
1static importDOM(){return{ol:()=>({conversion:b,priority:0}),ul:()=>({conversion:b,priority:0})}}static importJSON(e){let t=x(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){return({element:e}=super.exportDOM(e)),e&&t.isHTMLElement(e)&&(1!==this.__start&&e.setAttribute("start",String(this.__start)),"check"===this.__listType&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let r=0;r<t.length;r++){var n=t[r];if(v(n))super.append(n);else{let t=y();w(n)||e.$isElementNode(n)&&(n=e.$createTextNode(n.getTextContent())),t.append(n),super.append(t)}}return h(this),this}extractWithChild(e){return v(e)}}function N(e,n,i){let o=[],a=[];var s=n.list;if(void 0!==s){let e=s[`${i.__tag}Depth`]||[],t=(n=r(i)-1)%e.length;var l=e[t];let u,d=s[i.__tag];if(void 0!==(s=s.nested)&&s.list&&(u=s.list),void 0!==d&&o.push(d),void 0!==l)for(l=l.split(" "),o.push(...l),l=0;l<e.length;l++)l!==t&&a.push(i.__tag+l);void 0!==u&&(i=u.split(" "),1<n?o.push(...i):a.push(...i))}0<a.length&&t.removeClassNamesFromElement(e,...a),0<o.length&&t.addClassNamesToElement(e,...o)}function C(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];v(n)?(t.push(n),1<(n=n.getChildren()).length&&n.forEach((e=>{w(e)&&t.push(s(e))}))):t.push(s(n))}return t}function b(e){let n=e.nodeName.toLowerCase(),r=null;return"ol"===n?r=x("number",e.start):"ul"===n&&(r=t.isHTMLElement(e)&&"check"===e.getAttribute("__lexicallisttype")?x("check"):x("bullet")),{after:C,node:r}}let T={ol:"number",ul:"bullet"};function x(t,n=1){return e.$applyNodeReplacement(new E(t,n))}function w(e){return e instanceof E}let S=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),A=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),O=e.createCommand("INSERT_CHECK_LIST_COMMAND"),R=e.createCommand("REMOVE_LIST_COMMAND");return Gt.$createListItemNode=y,Gt.$createListNode=x,Gt.$getListDepth=r,Gt.$handleListInsertParagraph=function(){var t=e.$getSelection();if(!e.$isRangeSelection(t)||!t.isCollapsed()||(!v(t=t.anchor.getNode())||0!==t.getChildrenSize()))return!1;var r=i(t),o=t.getParent();w(o)||n(40);let a,s=o.getParent();if(e.$isRootOrShadowRoot(s))a=e.$createParagraphNode(),r.insertAfter(a);else{if(!v(s))return!1;a=y(),s.insertAfter(a)}if(a.select(),0<(r=t.getNextSiblings()).length){let t=x(o.getListType());e.$isParagraphNode(a)?a.insertAfter(t):((o=y()).append(t),a.insertAfter(o)),r.forEach((e=>{e.remove(),t.append(e)}))}return function(e){for(;null==e.getNextSibling()&&null==e.getPreviousSibling();){let t=e.getParent();if(null==t||!v(e)&&!w(e))break;e=t}e.remove()}(t),!0},Gt.$isListItemNode=v,Gt.$isListNode=w,Gt.INSERT_CHECK_LIST_COMMAND=O,Gt.INSERT_ORDERED_LIST_COMMAND=A,Gt.INSERT_UNORDERED_LIST_COMMAND=S,Gt.ListItemNode=p,Gt.ListNode=E,Gt.REMOVE_LIST_COMMAND=R,Gt.insertList=function(t,n){t.update((()=>{var t=e.$getSelection();if(e.$INTERNAL_isPointSelection(t)){var r=t.getNodes(),i=(t=t.anchor.getNode()).getParent();if(l(t,r))r=x(n),e.$isRootOrShadowRoot(i)?(t.replace(r),i=y(),e.$isElementNode(t)&&(i.setFormat(t.getFormatType()),i.setIndent(t.getIndent())),r.append(i)):v(t)&&(u(r,(t=t.getParentOrThrow()).getChildren()),t.replace(r));else for(t=new Set,i=0;i<r.length;i++){var o=r[i];if(e.$isElementNode(o)&&o.isEmpty()&&!v(o)&&!t.has(o.getKey()))d(o,n);else if(e.$isLeafNode(o))for(o=o.getParent();null!=o;){let r=o.getKey();if(w(o)){if(!t.has(r)){var a=x(n);u(a,o.getChildren()),o.replace(a),h(a),t.add(r)}break}if(a=o.getParent(),e.$isRootOrShadowRoot(a)&&!t.has(r)){t.add(r),d(o,n);break}o=a}}}}))},Gt.removeList=function(n){n.update((()=>{let n=e.$getSelection();if(e.$isRangeSelection(n)){var r=new Set,a=n.getNodes(),s=n.anchor.getNode();if(l(s,a))r.add(i(s));else for(s=0;s<a.length;s++){var d=a[s];e.$isLeafNode(d)&&(null!=(d=t.$getNearestNodeOfType(d,p))&&r.add(i(d)))}for(let t of r){r=t,a=o(t);for(let t of a)u(a=e.$createParagraphNode(),t.getChildren()),r.insertAfter(a),r=a,t.__key===n.anchor.key&&n.anchor.set(a.getKey(),0,"element"),t.__key===n.focus.key&&n.focus.set(a.getKey(),0,"element"),t.remove();t.remove()}}}))},Gt}function Zt(){return jt||(jt=1,Ut=Yt()),Ut}var Vt,Jt={};const qt=function(){if(Vt)return Jt;Vt=1;var e=Zt(),t=ke(),n=r,i=ut(),o=Le();return Jt.ListPlugin=function(){let[r]=t.useLexicalComposerContext();return n.useEffect((()=>
1{if(!r.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[r]),function(t){n.useEffect((()=>i.mergeRegister(t.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,(()=>(e.insertList(t,"number"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,(()=>(e.insertList(t,"bullet"),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(e.REMOVE_LIST_COMMAND,(()=>(e.removeList(t),!0)),o.COMMAND_PRIORITY_LOW),t.registerCommand(o.INSERT_PARAGRAPH_COMMAND,(()=>!!e.$handleListInsertParagraph()),o.COMMAND_PRIORITY_LOW))),[t])}(r),null},Jt}();var Xt=qt;var Qt,en,tn,nn={};function rn(){return tn||(tn=1,en=function(){if(Qt)return nn;Qt=1;var e=ut(),t=Le();let n=new Set(["http:","https:","mailto:","sms:","tel:"]);class r extends t.ElementNode{static getType(){return"link"}static clone(e){return new r(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},n){super(n);let{target:r=null,rel:i=null,title:o=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=o}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),null!==this.__target&&(n.target=this.__target),null!==this.__rel&&(n.rel=this.__rel),null!==this.__title&&(n.title=this.__title),e.addClassNamesToElement(n,t.theme.link),n}updateDOM(e,t){let n=this.__url,r=this.__target,i=this.__rel,o=this.__title;return n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),i!==e.__rel&&(i?t.rel=i:t.removeAttribute("rel")),o!==e.__title&&(o?t.title=o:t.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:i,priority:1})}}static importJSON(e){let t=o(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{let t=new URL(e);if(!n.has(t.protocol))return"about:blank"}catch{}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,t=!0){return e=o(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),this.insertAfter(e,t),e}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n){if(!t.$isRangeSelection(n))return!1;e=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(e)&&this.isParentOf(r)&&0<n.getTextContent().length}}function i(t){let n=null;if(e.isHTMLAnchorElement(t)){let e=t.textContent;(null!==e&&""!==e||0<t.children.length)&&(n=o(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:n}}function o(e,n){return t.$applyNodeReplacement(new r(e,n))}function a(e){return e instanceof r}class s extends r{static getType(){return"autolink"}static clone(e){return new s(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}static importJSON(e){let t=l(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),t.$isElementNode(e)?(n=l(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),e.append(n),n):null}}function l(e,n){return t.$applyNodeReplacement(new s(e,n))}let u=t.createCommand("TOGGLE_LINK_COMMAND");return nn.$createAutoLinkNode=l,nn.$createLinkNode=o,nn.$isAutoLinkNode=function(e){return e instanceof s},nn.$isLinkNode=a,nn.AutoLinkNode=s,nn.LinkNode=r,nn.TOGGLE_LINK_COMMAND=u,nn.toggleLink=function(e,n={}){let{target:r,title:i}=n,s=void 0===n.rel?"noreferrer":n.rel;if(n=t.$getSelection(),t.$isRangeSelection(n))if(n=n.extract(),null===e)n.forEach((e=>{if(a(e=e.getParent())){let t=e.getChildren();for(let n=0;n<t.length;n++)e.insertBefore(t[n]);e.remove()}}));else{if(1===n.length){let t=function(e,t){for(;null!==e&&null!==e.getParent()&&!t(e);)e=e.getParentOrThrow();return t(e)?e:null}(n[0],a);if(null!==t)return t.setURL(e),void 0!==r&&t.setTarget(r),null!==s&&t.setRel(s),void(void 0!==i&&t.setTitle(i))}let l=null,u=null;
1n.forEach((n=>{var d=n.getParent();if(d!==u&&null!==d&&(!t.$isElementNode(n)||n.isInline()))if(a(d))u=d,d.setURL(e),void 0!==r&&d.setTarget(r),null!==s&&u.setRel(s),void 0!==i&&u.setTitle(i);else if(d.is(l)||(l=d,u=o(e,{rel:s,target:r,title:i}),a(d)?null===n.getPreviousSibling()?d.insertBefore(u):d.insertAfter(u):n.insertBefore(u)),a(n)){if(!n.is(u)){if(null!==u){d=n.getChildren();for(let e=0;e<d.length;e++)u.append(d[e])}n.remove()}}else null!==u&&u.append(n)}))}},nn}()),en}var on,an={};const sn=function(){if(on)return an;on=1;var e=rn(),t=ke(),n=ut(),i=Le(),o=r;return an.LinkPlugin=function({validateUrl:r}){let[a]=t.useLexicalComposerContext();return o.useEffect((()=>{if(!a.hasNodes([e.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return n.mergeRegister(a.registerCommand(e.TOGGLE_LINK_COMMAND,(t=>{if(null===t)return e.toggleLink(t),!0;if("string"==typeof t)return!(void 0!==r&&!r(t))&&(e.toggleLink(t),!0);let{url:n,target:i,rel:o,title:a}=t;return e.toggleLink(n,{rel:o,target:i,title:a}),!0}),i.COMMAND_PRIORITY_LOW),void 0!==r?a.registerCommand(i.PASTE_COMMAND,(t=>{let n=i.$getSelection();if(!i.$isRangeSelection(n)||n.isCollapsed()||!(t instanceof ClipboardEvent)||null==t.clipboardData)return!1;let o=t.clipboardData.getData("text");return!!r(o)&&(!n.getNodes().some((e=>i.$isElementNode(e)))&&(a.dispatchCommand(e.TOGGLE_LINK_COMMAND,o),t.preventDefault(),!0))}),i.COMMAND_PRIORITY_LOW):()=>{})}),[a,r]),null},an}();var ln=sn;var un,dn,cn,hn={};function gn(){if(un)return hn;un=1;var e=Le(),t=ut();function n(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}class r extends e.INTERNAL_PointSelection{constructor(e,t,n){super(t,n),this.gridKey=e}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!i(e)&&(this.gridKey===e.gridKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus))}set(e,t,n){this.dirty=!0,this.gridKey=e,this.anchor.key=t,this.focus.key=n,this._cachedNodes=null}clone(){return new r(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t){let n=this.focus.getNode();if(!e.$isElementNode(n))throw Error("Expected GridSelection focus to be an ElementNode");e.$normalizeSelection__EXPERIMENTAL(n.select(0,n.getChildrenSize())).insertNodes(t)}getShape(){var t=e.$getNodeByKey(this.anchor.key);if(e.DEPRECATED_$isGridCellNode(t)||n(103),null===(t=e.DEPRECATED_$getGridCellNodeRect(t)))throw Error("getCellRect: expected to find AnchorNode");var r=e.$getNodeByKey(this.focus.key);e.DEPRECATED_$isGridCellNode(r)||n(104);let i=e.DEPRECATED_$getGridCellNodeRect(r);if(null===i)throw Error("getCellRect: expected to find focusCellNode");r=Math.min(t.columnIndex,i.columnIndex);let o=Math.max(t.columnIndex,i.columnIndex),a=Math.min(t.rowIndex,i.rowIndex);return t=Math.max(t.rowIndex,i.rowIndex),{fromX:Math.min(r,o),fromY:Math.min(a,t),toX:Math.max(r,o),toY:Math.max(a,t)}}getNodes(){function r(e){let{cell:t,startColumn:n,startRow:r}=e;h=Math.min(h,n),g=Math.min(g,r),p=Math.max(p,n+t.__colSpan-1),f=Math.max(f,r+t.__rowSpan-1)}var i=this._cachedNodes;if(null!==i)return i;var o=this.anchor.getNode();i=this.focus.getNode();var s=t.$findMatchingParent(o,e.DEPRECATED_$isGridCellNode);o=t.$findMatchingParent(i,e.DEPRECATED_$isGridCellNode),e.DEPRECATED_$isGridCellNode(s)||n(103),e.DEPRECATED_$isGridCellNode(o)||n(104),i=s.getParent(),e.DEPRECATED_$isGridRowNode(i)||n(105),i=i.getParent(),e.DEPRECATED_$isGridNode(i)||n(106);var l=o.getParents()[1];if(l!==i){if(i.isParentOf(o)){if(null==(i=l.getParent()))throw Error("Expected focusCellParent to have a parent");this.set(this.gridKey,o.getKey(),i.getKey())}else{if(null==(i=i.getParent()))throw Error("Expected gridParent to have a parent");this.set(this.gridKey,i.getKey(),o.getKey())}return this.getNodes()}let[u,d,c]=e.DEPRECATED_$computeGridMap(i,s,o),h=Math.min(d.startColumn,c.startColumn),g=Math.min(d.startRow,c.startRow),p=Math.max(d.startColumn+d.cell.__colSpan-1,c.startColumn+c.cell.__colSpan-1),f=Math.max(d.startRow+d.cell.__rowSpan-1,c.startRow+c.cell.__rowSpan-1);o=h,s=g,l=h;for(var m=g;h<o||g<s||p>l||f>m;){if(h<o){var _=m-s;--o;for(var y=0;y<=_;y++)r(u[s+y][o])}if(g<s)for(_=l-o,--s,y=0;y<=_;y++)r(u[s][o+y]);if(p>l)for(_=m-s,l+=1,y=0;y<=_;y++)r(u[s+y][l]);if(f>m)for(_=l-o,m+=1,y=0;y<=_;y++)r(u[m][o+y])}for(i=[i],o=null,s=g;s<=f;s++)for(l=h;l<=p;l++)({cell:m}=u[s][l]),_=m.getParent(),e.DEPRECATED_$isGridRowNode(_)||n(107),_!==o&&i.push(_),i.push(m,...a(m)),o=_;return e.isCurrentlyReadOnlyMode()||(this._cachedNodes=i),i}getTextContent(){let e=this.getNodes(),t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}}function i(e){return e instanceof r}function o(){let t=e.$createPoint("root",0,"element"),n=e.$createPoint("root",0,"element");return new r("root",t,n)}function a(t){let r=[],i=[t];for(;0<i.length;){let o=i.pop();void 0===o&&n(112),e.$isElementNode(o)&&i.unshift(...o.getChildren()),o!==t&&r.push(o)}return r}let s=/^(\d+(?:\.\d+)?)px$/,l={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class u extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(e){let t=new u(e.__headerState,e.__colSpan,e.__width,e.__key);return t.__rowSpan=e.__rowSpan,t.__backgroundColor=e.__backgroundColor,t}static importDOM(){return{td:()=>({conversion:d,priority:0}),th:()=>({conversion:d,priority:0})}}static importJSON(e){let t=e.rowSpan||1,n=c(e.headerState,e.colSpan||1,e.width||void 0);return n.__rowSpan=t,n.__backgroundColor=e.backgroundColor||null,n}constructor(e=l.NO_STATUS,t=1,n,r){super(t,r),this.__headerState=e,this.__width=n,this.__backgroundColor=null}createDOM(e){let n=document.createElement(this.getTag());return this.__width&&(n.style.width=`${this.__width}px`),1<this.__colSpan&&(n.colSpan=this.__colSpan),1<this.__rowSpan&&(n.rowSpan=this.__rowSpan),null!==this.__backgroundColor&&(n.style.backgroundColor=this.__backgroundColor),t.addClassNamesToElement(n,e.theme.tableCell,this.hasHeader()&&e.theme.tableCellHeader),n}exportDOM(e){if(({element:e}=super.exportDOM(e)),e){var t=this.getParentOrThrow().getChildrenSize();e.style.border="1px solid black",1<this.__colSpan&&(e.colSpan=this.__colSpan),1<this.__rowSpan&&(e.rowSpan=this.__rowSpan),e.style.width=`${this.getWidth()||Math.max(90,700/t)}px`,e.style.verticalAlign="top",e.style.textAlign="start",null!==(t=this.getBackgroun
1dColor())?e.style.backgroundColor=t:this.hasHeader()&&(e.style.backgroundColor="#f2f3f5")}return{element:e}}exportJSON(){return{...super.exportJSON(),backgroundColor:this.getBackgroundColor(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(e){return this.getWritable().__headerState=e,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(e){return this.getWritable().__width=e,this.__width}getWidth(){return this.getLatest().__width}getBackgroundColor(){return this.getLatest().__backgroundColor}setBackgroundColor(e){this.getWritable().__backgroundColor=e}toggleHeaderStyle(e){let t=this.getWritable();return t.__headerState=(t.__headerState&e)===e?t.__headerState-e:t.__headerState+e,t}hasHeaderState(e){return(this.getHeaderStyles()&e)===e}hasHeader(){return this.getLatest().__headerState!==l.NO_STATUS}updateDOM(e){return e.__headerState!==this.__headerState||e.__width!==this.__width||e.__colSpan!==this.__colSpan||e.__rowSpan!==this.__rowSpan||e.__backgroundColor!==this.__backgroundColor}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function d(t){var n=t.nodeName.toLowerCase();let r;return s.test(t.style.width)&&(r=parseFloat(t.style.width)),(n=c("th"===n?l.ROW:l.NO_STATUS,t.colSpan,r)).__rowSpan=t.rowSpan,""!==(t=t.style.backgroundColor)&&(n.__backgroundColor=t),{forChild:(t,n)=>h(n)&&!e.$isElementNode(t)?(n=e.$createParagraphNode(),e.$isLineBreakNode(t)&&"\n"===t.getTextContent()?null:(n.append(t),n)):t,node:n}}function c(t,n=1,r){return e.$applyNodeReplacement(new u(t,n,r))}function h(e){return e instanceof u}class g extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(e){return new g(e.__height,e.__key)}static importDOM(){return{tr:()=>({conversion:p,priority:0})}}static importJSON(e){return f(e.height)}constructor(e,t){super(t),this.__height=e}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(e){let n=document.createElement("tr");return this.__height&&(n.style.height=`${this.__height}px`),t.addClassNamesToElement(n,e.theme.tableRow),n}isShadowRoot(){return!0}setHeight(e){return this.getWritable().__height=e,this.__height}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(e){let t;return s.test(e.style.height)&&(t=parseFloat(e.style.height)),{node:f(t)}}function f(t){return e.$applyNodeReplacement(new g(t))}function m(e){return e instanceof g}let _=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";class y{constructor(e,t){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=t,this.editor=e,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach((e=>e()))}trackTableGrid(){let e=new MutationObserver((e=>{this.editor.update((()=>{var t=!1;for(let n=0;n<e.length;n++){const r=e[n].target.nodeName;if("TABLE"===r||"TR"===r){t=!0;break}}if(t){if(!(t=this.editor.getElementByKey(this.tableNodeKey)))throw Error("Expected to find TableElement in DOM");this.grid=E(t)}}))}));this.editor.update((()=>{let t=this.editor.getElementByKey(this.tableNodeKey);if(!t)throw Error("Expected to find TableElement in DOM");this.grid=E(t),e.observe(t,{childList:!0,subtree:!0})}))}clearHighlight(){let t=this.editor;this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),t.update((()=>{var n=e.$getNodeByKey(this.tableNodeKey);if(!$(n))throw Error("Expected TableNode.");if(!(n=t.getElementByKey(this.tableNodeKey)))throw Error("Expected to find TableElement in DOM");n=E(n),N(t,n,null),e.$setSelection(null),t.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)}))}enableHighlightStyle(){let e=this.editor;e.update((()=>{let n=e.getElementByKey(this.tableNodeKey);if(!n)throw Error("Expected to find TableElement in DOM");t.removeClassNamesFromElement(n,e._config.theme.tableSelection),n.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}))}disableHighlightStyle(){let e=this.editor;e.update((()=>{let n=e.getElementByKey(this.tableNodeKey);if(!n)throw Error("Expected to find TableElement in DOM");t.addClassNamesToElement(n,e._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}))}updateTableGridSelection(e){if(null!=e&&e.gridKey===this.tableNodeKey){let t=this.editor;this.gridSelection=e,this.isHighlightingCells=!0,this.disableHighlightStyle(),N(t,this.grid,this.gridSelection)}else null==e?this.clearHighlight():(this.tableNodeKey=e.gridKey,this.updateTableGridSelection(e))}setFocusCellForSelection(t,n=!1){let r=this.editor;r.update((()=>{var i=e.$getNodeByKey(this.tableNodeKey);if(!$(i))throw Error("Expected TableNode.");if(!r.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");i=t.x;let a=t.y;if(this.focusCell=t,null!==this.anchorCell){let e=_?(r._window||window).getSelection():null;e&&e.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(this.isHighlightingCells||this.anchorX===i&&this.anchorY===a&&!n){if(i===this.focusX&&a===this.focusY)return}else this.isHighlightingCells=!0,this.disableHighlightStyle();this.focusX=i,this.focusY=a,this.isHighlightingCells&&(i=e.$getNearestNodeFromDOMNode(t.elem),null!=this.gridSelection&&null!=this.anchorCellNodeKey&&h(i)&&(i=i.getKey(),this.gridSelection=this.gridSelection.clone()||o(),this.focusCellNodeKey=i,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),r.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),N(r,this.grid,this.gridSelection)))}))}
1setAnchorCellForSelection(t){this.isHighlightingCells=!1,this.anchorCell=t,this.anchorX=t.x,this.anchorY=t.y,this.editor.update((()=>{var n=e.$getNearestNodeFromDOMNode(t.elem);h(n)&&(n=n.getKey(),this.gridSelection=null!=this.gridSelection?this.gridSelection.clone():o(),this.anchorCellNodeKey=n)}))}formatCells(t){this.editor.update((()=>{let r=e.$getSelection();i(r)||n(11);let o=e.$createRangeSelection(),a=o.anchor,s=o.focus;r.getNodes().forEach((e=>{h(e)&&0!==e.getTextContentSize()&&(a.set(e.getKey(),0,"element"),s.set(e.getKey(),e.getChildrenSize(),"element"),o.formatText(t))})),e.$setSelection(r),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)}))}clearText(){let t=this.editor;t.update((()=>{let r=e.$getNodeByKey(this.tableNodeKey);if(!$(r))throw Error("Expected TableNode.");var o=e.$getSelection();i(o)||n(11),(o=o.getNodes().filter(h)).length===this.grid.columns*this.grid.rows?(r.selectPrevious(),r.remove(),e.$getRoot().selectStart()):(o.forEach((t=>{if(e.$isElementNode(t)){let n=e.$createParagraphNode(),r=e.$createTextNode();
1n.append(r),t.append(n),t.getChildren().forEach((e=>{e!==n&&e.remove()}))}})),N(t,this.grid,null),e.$setSelection(null),t.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0))}))}}function v(e){for(;null!=e;){let t=e.nodeName;if("TD"===t||"TH"===t){if(void 0===(e=e._cell))break;return e}e=e.parentNode}return null}function E(e){let t=[],n={cells:t,columns:0,rows:0};var r=e.firstChild;let i=e=0;for(t.length=0;null!=r;){var o=r.nodeName;if("TD"===o||"TH"===o){o={elem:o=r,hasBackgroundColor:""!==o.style.backgroundColor,highlighted:!1,x:e,y:i},r._cell=o;let n=t[i];void 0===n&&(n=t[i]=[]),n[e]=o}else if(null!=(o=r.firstChild)){r=o;continue}if(null!=(o=r.nextSibling))e++,r=o;else if(null!=(o=r.parentNode)){if(null==(r=o.nextSibling))break;i++,e=0}}return n.columns=e+1,n.rows=i+1,n}function N(e,t,n){let r=new Set(n?n.getNodes():[]);C(t,((t,n)=>{let i=t.elem;r.has(n)?(t.highlighted=!0,w(e,t)):(t.highlighted=!1,S(e,t),i.getAttribute("style")||i.removeAttribute("style"))}))}function C(t,n){({cells:t}=t);for(let r=0;r<t.length;r++){let i=t[r];if(i)for(let t=0;t<i.length;t++){let o=i[t];if(!o)continue;let a=e.$getNearestNodeFromDOMNode(o.elem);null!==a&&n(o,a,{x:t,y:r})}}}function b(e,t){t.disableHighlightStyle(),C(t.grid,(t=>{t.highlighted=!0,w(e,t)}))}let T=(e,t,n,r,i)=>{const o="forward"===i;switch(i){case"backward":case"forward":return n!==(o?e.grid.columns-1:0)?(e=t.getCellNodeFromCordsOrThrow(n+(o?1:-1),r,e.grid),o?e.selectStart():e.selectEnd()):r!==(o?e.grid.rows-1:0)?(e=t.getCellNodeFromCordsOrThrow(o?0:e.grid.columns-1,r+(o?1:-1),e.grid),o?e.selectStart():e.selectEnd()):o?t.selectNext():t.selectPrevious(),!0;case"up":return 0!==r?t.getCellNodeFromCordsOrThrow(n,r-1,e.grid).selectEnd():t.selectPrevious(),!0;case"down":return r!==e.grid.rows-1?t.getCellNodeFromCordsOrThrow(n,r+1,e.grid).selectStart():t.selectNext(),!0;default:return!1}};function x(t,n){if(e.$isRangeSelection(t)||i(t)){let e=n.isParentOf(t.anchor.getNode());return t=n.isParentOf(t.focus.getNode()),e&&t}return!1}function w(t,r){t=r.elem,h(r=e.$getNearestNodeFromDOMNode(t))||n(131),null===r.getBackgroundColor()?t.style.setProperty("background-color","rgb(172,206,247)"):t.style.setProperty("background-image","linear-gradient(to right, rgba(172,206,247,0.85), rgba(172,206,247,0.85))"),t.style.setProperty("caret-color","transparent")}function S(t,r){t=r.elem,h(r=e.$getNearestNodeFromDOMNode(t))||n(131),null===r.getBackgroundColor()&&t.style.removeProperty("background-color"),t.style.removeProperty("background-image"),t.style.removeProperty("caret-color")}function A(e){return h(e=t.$findMatchingParent(e,h))?e:null}function O(e){return $(e=t.$findMatchingParent(e,$))?e:null}function R(n,r,o,a,s){let l=e.$getSelection();if(!x(l,a))return!1;if(e.$isRangeSelection(l)&&l.isCollapsed()){if("backward"===o||"forward"===o)return!1;let{anchor:e,focus:i}=l;var u=t.$findMatchingParent(e.getNode(),h),d=t.$findMatchingParent(i.getNode(),h);if(!h(u)||!u.is(d))return!1;if((d=O(u))!==a&&null!=d){var c=n.getElementByKey(d.getKey());if(null!=c)return s.grid=E(c),R(n,r,o,d,s)}if(d=n.getElementByKey(u.__key),null==(c=n.getElementByKey(e.key))||null==d)return!1;if("element"===e.type)d=c.getBoundingClientRect();else{if(null===(d=window.getSelection())||0===d.rangeCount)return!1;d=d.getRangeAt(0).getBoundingClientRect()}if(null==(c="up"===o?u.getFirstChild():u.getLastChild())||null==(n=n.getElementByKey(c.__key)))return!1;if(n=n.getBoundingClientRect(),"up"===o?n.top>d.top-d.height:d.bottom+d.height>n.bottom)return k(r),n=a.getCordsFromCellNode(u,s.grid),r.shiftKey?(o=a.getCellFromCordsOrThrow(n.x,n.y,s.grid),s.setAnchorCellForSelection(o),s.setFocusCellForSelection(o,!0),!0):T(s,a,n.x,n.y,o)}else if(i(l)){let{anchor:e,focus:i}=l;return c=t.$findMatchingParent(e.getNode(),h),d=t.$findMatchingParent(i.getNode(),h),[u]=l.getNodes(),n=n.getElementByKey(u.getKey()),!!(h(c)&&h(d)&&$(u)&&null!=n)&&(s.updateTableGridSelection(l),n=E(n),c=a.getCordsFromCellNode(c,n),c=a.getCellFromCordsOrThrow(c.x,c.y,n),s.setAnchorCellForSelection(c),k(r),r.shiftKey?((e,t,n,r,i)=>{const o="forward"===i;switch(i){case"backward":case"forward":return n!==(o?e.grid.columns-1:0)&&e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n+(o?1:-1),r,e.grid)),!0;case"up":return 0!==r&&(e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n,r-1,e.grid)),!0);case"down":return r!==e.grid.rows-1&&(e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n,r+1,e.grid)),!0);default:return!1}})(s,u,(r=a.getCordsFromCellNode(d,n)).x,r.y,o):(d.selectEnd(),!0))}return!1}function k(e){e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation()}class D extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(e){return new D(e.__key)}static importDOM(){return{table:()=>({conversion:M,priority:1})}}static importJSON(){return P()}constructor(e){super(e)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(e){let n=document.createElement("table");return t.addClassNamesToElement(n,e.theme.table),n}updateDOM(){return!1}exportDOM(e){return{...super.exportDOM(e),after:e=>{if(e){let n=e.cloneNode(),r=document.createElement("colgroup"),i=document.createElement("tbody");if(t.isHTMLElement(e)&&i.append(...e.children),!m(e=this.getFirstChildOrThrow()))throw Error("Expected to find row 
1node.");e=e.getChildrenSize();for(let t=0;t<e;t++){let e=document.createElement("col");r.append(e)}return n.replaceChildren(r,i),n}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(t,n){let{rows:r,cells:i}=n;for(n=0;n<r;n++){var o=i[n];if(null!=o&&-1!==(o=o.findIndex((n=>{if(n)return({elem:n}=n),e.$getNearestNodeFromDOMNode(n)===t}))))return{x:o,y:n}}throw Error("Cell not found in table.")}getCellFromCords(e,t,n){return({cells:n}=n),null==(t=n[t])?null:(e=t[e])??null}getCellFromCordsOrThrow(e,t,n){if(!(e=this.getCellFromCords(e,t,n)))throw Error("Cell not found at cords.");return e}getCellNodeFromCords(t,n,r){return null==(t=this.getCellFromCords(t,n,r))?null:h(t=e.$getNearestNodeFromDOMNode(t.elem))?t:null}getCellNodeFromCordsOrThrow(e,t,n){if(!(e=this.getCellNodeFromCords(e,t,n)))throw Error("Node at cords not TableCellNode.");return e}canSelectBefore(){return!0}canIndent(){return!1}}function M(){return{node:P()}}function P(){return e.$applyNodeReplacement(new D)}function $(e){return e instanceof D}function I(e){if(e=t.$findMatchingParent(e,(e=>m(e))),m(e))return e;throw Error("Expected table cell to be inside of table row.")}function L(e){if(e=t.$findMatchingParent(e,(e=>$(e))),$(e))return e;throw Error("Expected table cell to be inside of table.")}function F(e,t){let n=L(e),{x:r,y:i}=n.getCordsFromCellNode(e,t);return{above:n.getCellNodeFromCords(r,i-1,t),below:n.getCellNodeFromCords(r,i+1,t),left:n.getCellNodeFromCords(r-1,i,t),right:n.getCellNodeFromCords(r+1,i,t)}}function B(e){let t=e.getFirstDescendant();null==t?e.selectStart():t.getParentOrThrow().selectStart()}function z(e,t){let n=e.getFirstChild();null!==n?n.insertBefore(t):e.append(t)}let K=e.createCommand("INSERT_TABLE_COMMAND");return hn.$createGridSelection=o,hn.$createTableCellNode=c,hn.$createTableNode=P,hn.$createTableNodeWithDimensions=function(t,n,r=!0){let i=P();for(let a=0;a<t;a++){let t=f();for(let i=0;i<n;i++){var o=l.NO_STATUS;"object"==typeof r?(0===a&&r.rows&&(o|=l.ROW),0===i&&r.columns&&(o|=l.COLUMN)):r&&(0===a&&(o|=l.ROW),0===i&&(o|=l.COLUMN)),o=c(o);let n=e.$createParagraphNode();n.append(e.$createTextNode()),o.append(n),t.append(o)}i.append(t)}return i},hn.$createTableRowNode=f,hn.$deleteTableColumn=function(e,t){let n=e.getChildren();for(let i=0;i<n.length;i++){var r=n[i];if(m(r)){if(t>=(r=r.getChildren()).length||0>t)throw Error("Table column target index out of range");r[t].remove()}}return e},hn.$deleteTableColumn__EXPERIMENTAL=function(){var t=e.$getSelection();if(!e.$INTERNAL_isPointSelection(t))throw Error("Expected a INTERNAL_PointSelection");var n=t.anchor.getNode();t=t.focus.getNode();let[r,,i]=e.DEPRECATED_$getNodeTriplet(n);[n]=e.DEPRECATED_$getNodeTriplet(t);let[o,a,s]=e.DEPRECATED_$computeGridMap(i,r,n);var{startColumn:l}=a;let{startRow:u,startColumn:d}=s;t=Math.min(l,d);let c=(l=Math.max(l+r.__colSpan-1,d+n.__colSpan-1))-t+1;if(o[0].length===l-t+1)i.selectPrevious(),i.remove();else{var h=o.length;for(let e=0;e<h;e++)for(let n=t;n<=l;n++){let{cell:r,startColumn:i}=o[e][n];i<t?n===t&&r.setColSpan(r.__colSpan-Math.min(c,r.__colSpan-(t-i))):i+r.__colSpan-1>l?n===l&&r.setColSpan(r.__colSpan-(l-i+1)):r.remove()}void 0!==(n=(t=o[u])[d+n.__colSpan])?(({cell:n}=n),B(n)):(({cell:n}=t[d-1]),B(n))}},hn.$deleteTableRow__EXPERIMENTAL=function(){var t=e.$getSelection();if(!e.$INTERNAL_isPointSelection(t))throw Error("Expected a INTERNAL_PointSelection");var r=t.anchor.getNode();t=t.focus.getNode();let[i,,o]=e.DEPRECATED_$getNodeTriplet(r);[t]=e.DEPRECATED_$getNodeTriplet(t);let[a,s,l]=e.DEPRECATED_$computeGridMap(o,i,t);({startRow:r}=s);var{startRow:u}=l;if(t=u+t.__rowSpan-1,a.length===t-r+1)o.remove();else{u=a[0].length;var d=a[t+1],c=o.getChildAtIndex(t+1);for(let i=t;i>=r;i--){for(var h=u-1;0<=h;h--){let{cell:e,startRow:o,startColumn:s}=a[i][h];if(s===h&&(i===r&&o<r&&e.setRowSpan(e.__rowSpan-(o-r)),o>=r&&o+e.__rowSpan-1>t))if(e.setRowSpan(e.__rowSpan-(t-o+1)),null===c&&n(122),0===h)z(c,e);else{let{cell:t}=d[h-1];t.insertAfter(e)}}h=o.getChildAtIndex(i),e.DEPRECATED_$isGridRowNode(h)||n(123,String(i)),h.remove()}void 0!==d?(({cell:r}=d[0]),B(r)):(({cell:r}
1=a[r-1][0]),B(r))}},hn.$getElementGridForTableNode=function(e,t){if(null==(e=e.getElementByKey(t.getKey())))throw Error("Table Element Not Found");return E(e)},hn.$getTableCellNodeFromLexicalNode=function(e){return e=t.$findMatchingParent(e,(e=>h(e))),h(e)?e:null},hn.$getTableColumnIndexFromTableCellNode=function(e){return I(e).getChildren().findIndex((t=>t.is(e)))},hn.$getTableNodeFromLexicalNodeOrThrow=L,hn.$getTableRowIndexFromTableCellNode=function(e){let t=I(e);return L(t).getChildren().findIndex((e=>e.is(t)))},hn.$getTableRowNodeFromTableCellNodeOrThrow=I,hn.$insertTableColumn=function(t,r,i=!0,o,a){let s=t.getChildren(),u=[];for(let p=0;p<s.length;p++){let t=s[p];if(m(t))for(let i=0;i<o;i++){var d=t.getChildren();if(r>=d.length||0>r)throw Error("Table column target index out of range");h(d=d[r])||n(12);let{left:i,right:o}=F(d,a);var g=l.NO_STATUS;(i&&i.hasHeaderState(l.ROW)||o&&o.hasHeaderState(l.ROW))&&(g|=l.ROW),(g=c(g)).append(e.$createParagraphNode()),u.push({newTableCell:g,targetCell:d})}}return u.forEach((({newTableCell:e,targetCell:t})=>{i?t.insertAfter(e):t.insertBefore(e)})),t},hn.$insertTableColumn__EXPERIMENTAL=function(t=!0){function r(){let t=c(l.NO_STATUS).append(e.$createParagraphNode());return null===g&&(g=t),t}var i=e.$getSelection();if(!e.$INTERNAL_isPointSelection(i))throw Error("Expected a PointSeleciton");var o=i.anchor.getNode();i=i.focus.getNode(),[o]=e.DEPRECATED_$getNodeTriplet(o);let[a,,s]=e.DEPRECATED_$getNodeTriplet(i),[u,d,h]=e.DEPRECATED_$computeGridMap(s,a,o);o=u.length,i=t?Math.max(d.startColumn,h.startColumn):Math.min(d.startColumn,h.startColumn),t=t?i+a.__colSpan-1:i-1,i=s.getFirstChild(),e.DEPRECATED_$isGridRowNode(i)||n(120);let g=null;var p=i;e:for(i=0;i<o;i++){0!==i&&(p=p.getNextSibling(),e.DEPRECATED_$isGridRowNode(p)||n(121));let o=u[i];if(0>t){z(p,r());continue}let{cell:a,startColumn:s,startRow:l}=o[t];if(s+a.__colSpan-1<=t){let e=a,n=l,s=t;for(;n!==i&&1<e.__rowSpan;){if(s-=a.__colSpan,!(0<=s)){p.append(r());continue e}{let{cell:t,startRow:r}=o[s];e=t,n=r}}e.insertAfter(r())}else a.setColSpan(a.__colSpan+1)}null!==g&&B(g)},hn.$insertTableRow=function(t,r,i=!0,o,a){var s=t.getChildren();if(r>=s.length||0>r)throw Error("Table row target index out of range");if(!m(r=s[r]))throw Error("Row before insertion index does not exist.");for(s=0;s<o;s++){let t=r.getChildren(),o=t.length,s=f();for(let r=0;r<o;r++){var u=t[r];h(u)||n(12);let{above:i,below:o}=F(u,a);u=l.NO_STATUS;let d=i&&i.getWidth()||o&&o.getWidth()||void 0;(i&&i.hasHeaderState(l.COLUMN)||o&&o.hasHeaderState(l.COLUMN))&&(u|=l.COLUMN),(u=c(u,1,d)).append(e.$createParagraphNode()),s.append(u)}i?r.insertAfter(s):r.insertBefore(s)}return t},hn.$insertTableRow__EXPERIMENTAL=function(t=!0){var r=e.$getSelection();if(!e.$INTERNAL_isPointSelection(r))throw Error("Expected a INTERNAL_PointSelection");r=r.focus.getNode();let[i,,o]=e.DEPRECATED_$getNodeTriplet(r),[a,s]=e.DEPRECATED_$computeGridMap(o,i,i);r=a[0].length;var{startRow:u}=s;if(t){var d=a[t=u+i.__rowSpan-1];u=f();for(var h=0;h<r;h++){let{cell:n,startRow:r}=d[h];r+n.__rowSpan-1<=t?u.append(c(l.NO_STATUS).append(e.$createParagraphNode())):n.setRowSpan(n.__rowSpan+1)}r=o.getChildAtIndex(t),e.DEPRECATED_$isGridRowNode(r)||n(119),r.insertAfter(u)}else{for(d=a[u],t=f(),h=0;h<r;h++){let{cell:n,startRow:r}=d[h];r===u?t.append(c(l.NO_STATUS).append(e.$createParagraphNode())):n.setRowSpan(n.__rowSpan+1)}r=o.getChildAtIndex(u),e.DEPRECATED_$isGridRowNode(r)||n(119),r.insertBefore(t)}},hn.$isGridSelection=i,hn.$isTableCellNode=h,hn.$isTableNode=$,hn.$isTableRowNode=m,hn.$removeTableRowAtIndex=function(e,t){let n=e.getChildren();if(t>=n.length||0>t)throw Error("Expected table cell to be inside of table row.");return n[t].remove(),e},hn.$unmergeCell=function(){var t=e.$getSelection();if(!e.$INTERNAL_isPointSelection(t))throw Error("Expected a INTERNAL_PointSelection");t=t.anchor.getNode();let[r,i,o]=e.DEPRECATED_$getNodeTriplet(t);t=r.__colSpan;let a=r.__rowSpan;if(1<t){for(var s=1;s<t;s++)r.insertAfter(c(l.NO_STATUS));r.setColSpan(1)}if(1<a){let h,[g,p]=e.DEPRECATED_$computeGridMap(o,r,r),{startColumn:f,startRow:m}=p;for(s=1;s<a;s++){var u=m+s;let r=g[u];h=(h||i).getNextSibling(),e.DEPRECATED_$isGridRowNode(h)||n(125);var d=null;for(let e=0;e<f;e++){let t=r[e],n=t.cell;t.startRow===u&&(d=n),1<n.__colSpan&&(e+=n.__colSpan-1)}if(null===d)for(d=0;d<t;d++)z(h,c(l.NO_STATUS));else for(u=0;
1u<t;u++)d.insertAfter(c(l.NO_STATUS))}r.setRowSpan(1)}},hn.INSERT_TABLE_COMMAND=K,hn.TableCellHeaderStates=l,hn.TableCellNode=u,hn.TableNode=D,hn.TableRowNode=g,hn.TableSelection=y,hn.applyTableHandlers=function(n,r,a,s){function l(e){return e=n.getCordsFromCellNode(e,d.grid),n.getCellFromCordsOrThrow(e.x,e.y,d.grid)}let u=a.getRootElement();if(null===u)throw Error("No root element.");let d=new y(a,n.getKey()),c=a._window||window;r.__lexicalTableSelection=d,r.addEventListener("mousedown",(e=>{setTimeout((()=>{if(0===e.button&&c){var t=v(e.target);null!==t&&(k(e),d.setAnchorCellForSelection(t));var n=()=>{c.removeEventListener("mouseup",n),c.removeEventListener("mousemove",r)},r=e=>{const t=v(e.target);null===t||d.anchorX===t.x&&d.anchorY===t.y||(e.preventDefault(),d.setFocusCellForSelection(t))};c.addEventListener("mouseup",n),c.addEventListener("mousemove",r)}}),0)}));let g=t=>{0===t.button&&a.update((()=>{const n=e.$getSelection(),r=t.target;i(n)&&n.gridKey===d.tableNodeKey&&u.contains(r)&&d.clearHighlight()}))};c.addEventListener("mousedown",g),d.listenersToRemove.add((()=>c.removeEventListener("mousedown",g))),d.listenersToRemove.add(a.registerCommand(e.KEY_ARROW_DOWN_COMMAND,(e=>R(a,e,"down",n,d)),e.COMMAND_PRIORITY_HIGH)),d.listenersToRemove.add(a.registerCommand(e.KEY_ARROW_UP_COMMAND,(e=>R(a,e,"up",n,d)),e.COMMAND_PRIORITY_HIGH)),d.listenersToRemove.add(a.registerCommand(e.KEY_ARROW_LEFT_COMMAND,(e=>R(a,e,"backward",n,d)),e.COMMAND_PRIORITY_HIGH)),d.listenersToRemove.add(a.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,(e=>R(a,e,"forward",n,d)),e.COMMAND_PRIORITY_HIGH)),d.listenersToRemove.add(a.registerCommand(e.KEY_ESCAPE_COMMAND,(n=>{var r=e.$getSelection();return!(!i(r)||(r=t.$findMatchingParent(r.focus.getNode(),h),!h(r)))&&(k(n),r.selectEnd(),!0)}),e.COMMAND_PRIORITY_HIGH));return[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach((r=>{d.listenersToRemove.add(a.registerCommand(r,(r=>()=>{var o=e.$getSelection();if(!x(o,n))return!1;if(i(o))return d.clearText(),!0;if(e.$isRangeSelection(o)){const i=t.$findMatchingParent(o.anchor.getNode(),(e=>h(e)));if(!h(i))return!1;var a=o.anchor.getNode(),s=o.focus.getNode();if(a=n.isParentOf(a),s=n.isParentOf(s),a&&!s||s&&!a)return d.clearText(),!0;if(a=(s=t.$findMatchingParent(o.anchor.getNode(),(t=>e.$isElementNode(t))))&&t.$findMatchingParent(s,(t=>e.$isElementNode(t)&&h(t.getParent()))),!e.$isElementNode(a)||!e.$isElementNode(s))return!1;if(r===e.DELETE_LINE_COMMAND&&null===a.getPreviousSibling())return!0;if((r===e.DELETE_CHARACTER_COMMAND||r===e.DELETE_WORD_COMMAND)&&o.isCollapsed()&&0===o.anchor.offset&&s!==a){o=s.getChildren();const t=e.$createParagraphNode();return o.forEach((e=>t.append(e))),s.replace(t),s.getWritable().__parent=i.getKey(),!0}}return!1})(r),e.COMMAND_PRIORITY_CRITICAL))})),r=r=>{const o=e.$getSelection();return!!x(o,n)&&(i(o)?(r.preventDefault(),r.stopPropagation(),d.clearText(),!0):(e.$isRangeSelection(o)&&(r=t.$findMatchingParent(o.anchor.getNode(),(e=>h(e))),h(r)),!1))},d.listenersToRemove.add(a.registerCommand(e.KEY_BACKSPACE_COMMAND,r,e.COMMAND_PRIORITY_CRITICAL)),d.listenersToRemove.add(a.registerCommand(e.KEY_DELETE_COMMAND,r,e.COMMAND_PRIORITY_CRITICAL)),d.listenersToRemove.add(a.registerCommand(e.FORMAT_TEXT_COMMAND,(r=>{let o=e.$getSelection();return!!x(o,n)&&(i(o)?(d.formatCells(r),!0):(e.$isRangeSelection(o)&&(r=t.$findMatchingParent(o.anchor.getNode(),(e=>h(e))),h(r)),!1))}),e.COMMAND_PRIORITY_CRITICAL)),d.listenersToRemove.add(a.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,(()=>{var r=e.$getSelection();return x(r,n)&&(i(r)?d.clearHighlight():e.$isRangeSelection(r)&&(r=t.$findMatchingParent(r.anchor.getNode(),(e=>h(e))),h(r))),!1}),e.COMMAND_PRIORITY_CRITICAL)),s&&d.listenersToRemove.add(a.registerCommand(e.KEY_TAB_COMMAND,(t=>{var r=e.$getSelection();return!!(e.$isRangeSelection(r)&&r.isCollapsed()&&x(r,n)&&(r=A(r.anchor.getNode()),null!==r))&&(k(t),r=n.getCordsFromCellNode(r,d.grid),T(d,n,r.x,r.y,t.shiftKey?"backward":"forward"),!0)}),e.COMMAND_PRIORITY_CRITICAL)),d.listenersToRemove.add(a.registerCommand(e.FOCUS_COMMAND,(()=>n.isSelected()),e.COMMAND_PRIORITY_HIGH)),d.listenersToRemove.add(a.registerCommand(e.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,(n=>{let{nodes:r,selection:i}=n;n=e.$INTERNAL_isPointSelection(i);var a=e.$isRangeSelection(i);if(n=a&&null!==t.$findMatchingParent(i.anchor.getNode(),(t=>e.DEPRECATED_$isGridCellNode(t)))&&null!==t.$findMatchingParent(i.focus.getNode(),(t=>e.DEPRECATED_$isGridCellNode(t)))||n&&!a,1!==r.length||!e.DEPRECATED_$isGridNode(r[0])||!n)return!1;
1var{anchor:s}=i,l=r[0];n=l.getChildren(),a=l.getFirstChildOrThrow().getChildrenSize(),l=l.getChildrenSize();var u=t.$findMatchingParent(s.getNode(),(t=>e.DEPRECATED_$isGridCellNode(t))),d=(s=u&&t.$findMatchingParent(u,(t=>e.DEPRECATED_$isGridRowNode(t))))&&t.$findMatchingParent(s,(t=>e.DEPRECATED_$isGridNode(t)));if(!e.DEPRECATED_$isGridCellNode(u)||!e.DEPRECATED_$isGridRowNode(s)||!e.DEPRECATED_$isGridNode(d))return!1;var c=s.getIndexWithinParent(),h=Math.min(d.getChildrenSize()-1,c+l-1);let g,p;for(l=u.getIndexWithinParent(),u=Math.min(s.getChildrenSize()-1,l+a-1),a=Math.min(l,u),s=Math.min(c,h),l=Math.max(l,u),c=Math.max(c,h),d=d.getChildren(),h=0,u=s;u<=c;u++){var f=d[u];if(!e.DEPRECATED_$isGridRowNode(f))return!1;var m=n[h];if(!e.DEPRECATED_$isGridRowNode(m))return!1;f=f.getChildren(),m=m.getChildren();let t=0;for(let n=a;n<=l;n++){let r=f[n];if(!e.DEPRECATED_$isGridCellNode(r))return!1;let i=m[t];if(!e.DEPRECATED_$isGridCellNode(i))return!1;u===s&&n===a?g=r.getKey():u===c&&n===l&&(p=r.getKey());let o=r.getChildren();
1i.getChildren().forEach((t=>{e.$isTextNode(t)&&e.$createParagraphNode().append(t),r.append(t)})),o.forEach((e=>e.remove())),t++}h++}return g&&p&&((n=o()).set(r[0].getKey(),g,p),e.$setSelection(n)),!0}),e.COMMAND_PRIORITY_CRITICAL)),d.listenersToRemove.add(a.registerCommand(e.SELECTION_CHANGE_COMMAND,(()=>{let t=e.$getSelection(),r=e.$getPreviousSelection();if(e.$isRangeSelection(t)){let{anchor:r,focus:i}=t;var o=r.getNode(),s=i.getNode();o=A(o),s=A(s);var u=o&&n.is(O(o)),c=s&&n.is(O(s));let h=u!==c;c=u&&c,u=t.isBackward(),h?((o=t.clone()).focus.set(n.getKey(),u?0:n.getChildrenSize(),"element"),e.$setSelection(o),b(a,d)):c&&!o.is(s)&&(d.setAnchorCellForSelection(l(o)),d.setFocusCellForSelection(l(s),!0))}return t&&!t.is(r)&&(i(t)||i(r))&&d.gridSelection&&!d.gridSelection.is(r)?(i(t)&&t.gridKey===d.tableNodeKey?d.updateTableGridSelection(t):!i(t)&&i(r)&&r.gridKey===d.tableNodeKey&&d.updateTableGridSelection(null),!1):(d.hasHijackedSelectionStyles&&!n.isSelected()?function(e,t){t.enableHighlightStyle(),C(t.grid,(t=>{let n=t.elem;t.highlighted=!1,S(e,t),n.getAttribute("style")||n.removeAttribute("style")}))}(a,d):!d.hasHijackedSelectionStyles&&n.isSelected()&&b(a,d),!1)}),e.COMMAND_PRIORITY_CRITICAL)),d},hn.getCellFromTarget=v,hn.getTableSelectionFromTableElement=function(e){return e.__lexicalTableSelection},hn}function pn(){return cn||(cn=1,dn=gn()),dn}var fn,mn={};const _n=function(){if(fn)return mn;fn=1;var e=ke(),t=pn(),n=ut(),i=Le(),o=r;return mn.TablePlugin=function({hasCellMerge:r=!0,hasCellBackgroun
1dColor:a=!0,hasTabHandler:s=!0}){let[l]=e.useLexicalComposerContext();return o.useEffect((()=>(l.hasNodes([t.TableNode,t.TableCellNode,t.TableRowNode])||function(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(10),l.registerCommand(t.INSERT_TABLE_COMMAND,(({columns:e,rows:r,includeHeaders:o})=>(e=t.$createTableNodeWithDimensions(Number(r),Number(e),o),n.$insertNodeToNearestRoot(e),e=e.getFirstDescendant(),i.$isTextNode(e)&&e.select(),!0)),i.COMMAND_PRIORITY_EDITOR))),[l]),o.useEffect((()=>{let e=new Map,n=n=>{const r=n.getKey(),i=l.getElementByKey(r);i&&!e.has(r)&&(n=t.applyTableHandlers(n,i,l,s),e.set(r,n))};l.getEditorState().read((()=>{let e=i.$nodesOfType(t.TableNode);for(let r of e)t.$isTableNode(r)&&n(r)}));let r=l.registerMutationListener(t.TableNode,(r=>{for(const[o,a]of r)"created"===a?l.getEditorState().read((()=>{const e=i.$getNodeByKey(o);t.$isTableNode(e)&&n(e)})):"destroyed"===a&&(void 0!==(r=e.get(o))&&(r.removeListeners(),e.delete(o)))}));return()=>{r();for(let[,t]of e)t.removeListeners()}}),[l,s]),o.useEffect((()=>{if(!r)return l.registerNodeTransform(t.TableCellNode,(e=>{if(1<e.getColSpan()||1<e.getRowSpan()){var[,,r]=i.DEPRECATED_$getNodeTriplet(e);[e]=i.DEPRECATED_$computeGridMap(r,e,e);let a=e.length,s=e[0].length;if(r=r.getFirstChild(),!i.DEPRECATED_$isGridRowNode(r))throw Error("Expected TableNode first child to be a RowNode");let l=[];for(let u=0;u<a;u++){if(0!==u&&(r=r.getNextSibling(),!i.DEPRECATED_$isGridRowNode(r)))throw Error("Expected TableNode first child to be a RowNode");let a=null;for(let i=0;i<s;i++){var o=e[u][i];let s=o.cell;if(o.startRow===u&&o.startColumn===i)a=s,l.push(s);else if(1<s.getColSpan()||1<s.getRowSpan()){if(!t.$isTableCellNode(s))throw Error("Expected TableNode cell to be a TableCellNode");o=t.$createTableCellNode(s.__headerState),null!==a?a.insertAfter(o):n.$insertFirst(r,o)}}}for(let e of l)e.setColSpan(1),e.setRowSpan(1)}}))}),[l,r]),o.useEffect((()=>{if(!a)return l.registerNodeTransform(t.TableCellNode,(e=>{null!==e.getBackgroundColor()&&e.setBackgroundColor(null)}))}),[l,a,r]),null},mn}();var yn,vn=_n,En={exports:{}};function Nn(){return yn||(yn=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},i.util.type(t)){case"Object":if(o=i.util.objId(t),n[o])return n[o];for(var a in r={},n[o]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return o=i.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach((function(t,i){r[i]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||i.languages)[e],a={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(s)||(a[s]=o[s])}var u=r[e];return r[e]=a,i.languages.DFS(i.languages,(function(t,n){n===u&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,o){o=o||{};var a=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],u=i.util.type(l);"Object"!==u||o[a(l)]?"Array"===u&&!o[a(l)]&&(o[a(l)]=!0,e(l,n,s,o)):(o[a(l)]=!0,e(l,n,null,o))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run("before-all-elements-highlight",r);for(var o,a=0;o=r.elements[a++];)i.highlightElement(o,!0===t,r.callback)},highlightElement:function(t,n,r){var o=i.util.getLanguage(t),a=i.languages[o];i.util.setLanguage(t,o);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&i.util.setLanguage(s,o);var l={element:t,language:o,grammar:a,code:t.textContent};function u(e){l.highlightedCode=e,i.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,i.hooks.run("after-highlight",l),i.hooks.run("complete",l),r&&r.call(l.element)}if(i.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return i.hooks.run("complete",l),void(r&&r.call(l.element));if(i.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var d=new Worker(i.filename);d.onmessage=function(e){u(e.data)},d.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else u(i.highlight(l.code,l.grammar,l.language));else u(i.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run("after-tokenize",r),o.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new l;return u(i,i.head,e),s(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:o};function o(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var o=i[1].length;i.index+=o,i[0]=i[0].slice(o)}return i}function s(e,t,n,r,l,c){for(var h in n)if(n.hasOwnProperty(h)&&n[h]){var g=n[h];g=Array.isArray(g)?g:[g];for(var p=0;p<g.length;++p){if(c&&c.cause==h+","+p)return;var f=g[p],m=f.inside,_=!!f.lookbehind,y=!!f.greedy,v=f.alias;if(y&&!f.pattern.global){var E=f.pattern.toString().match(/[imsuy]*$/)[0];f.pattern=RegExp(f.pattern.source,E+"g")}for(var N=f.pattern||f,C=r.next,b=l;C!==t.tail&&!(c&&b>
vendor: 4,593 bytes, line 1
1=c.reach);b+=C.value.length,C=C.next){var T=C.value;if(t.length>e.length)return;if(!(T instanceof o)){var x,w=1;if(y){if(!(x=a(N,b,e,_))||x.index>=e.length)break;var S=x.index,A=x.index+x[0].length,O=b;for(O+=C.value.length;S>=O;)O+=(C=C.next).value.length;if(b=O-=C.value.length,C.value instanceof o)continue;for(var R=C;R!==t.tail&&(O<A||"string"==typeof R.value);R=R.next)w++,O+=R.value.length;w--,T=e.slice(b,O),x.index-=b}else if(!(x=a(N,0,T,_)))continue;S=x.index;var k=x[0],D=T.slice(0,S),M=T.slice(S+k.length),P=b+T.length;c&&P>c.reach&&(c.reach=P);var $=C.prev;if(D&&($=u(t,$,D),b+=D.length),d(t,$,w),C=u(t,$,new o(h,m?i.tokenize(k,m):k,v,k)),M&&u(t,C,M),w>1){var I={cause:h+","+p,reach:P};s(e,t,n,C.prev,b,I),c&&I.reach>c.reach&&(c.reach=I.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function d(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}if(e.Prism=i,o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(o.classes,a):o.classes.push(a)),i.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,a=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),a&&e.close()}),!1)),i;var c=i.util.currentScript();function h(){i.manual||i.highlightAll()}if(c&&(i.filename=c.src,c.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var g=document.readyState;"loading"===g||"interactive"===g&&c&&c.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return i}(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),typeof l<"u"&&(l.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(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\
1s'">=]+(?=[\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:[n,"language-"+n],inside:t.languages[n]},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(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.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\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,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:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.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}
1/.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")){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",i="loaded",o="pre[data-src]:not(["+n+'="'+i+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",(function(e){e.selector+=", "+o})),t.hooks.add("before-sanity-check",(function(a){var s=a.element;if(s.matches(o)){a.code="",s.setAttribute(n,r);var l=s.appendChild(document.createElement("CODE"));l.textContent="Loading\u2026";var u=s.getAttribute("data-src"),d=a.language;if("none"===d){var c=(/\.(\w+)$/.exec(u)||[,"none"])[1];d=e[c]||c}t.util.setLanguage(l,d),t.util.setLanguage(s,d);var h=t.plugins.autoloader;h&&h.loadLanguages(d),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n(function(e,t){return"\u2716 Error "+e+" while fetching file: "+t}(r.status,r.statusText)):n("\u2716 Error: File does not exist or is empty"))},r.send(null)}(u,(function(e){s.setAttribute(n,i);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var o=e.split(/\r\n?|\n/g),a=r[0],u=null==r[1]?o.length:r[1];a<0&&(a+=o.length),a=Math.max(0,Math.min(a-1,o.length)),u<0&&(u+=o.length),u=
vendor: 8,403 bytes, line 1
1Math.max(0,Math.min(u,o.length)),e=o.slice(a,u).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}l.textContent=e,t.highlightElement(l)}),(function(e){s.setAttribute(n,"failed"),l.textContent=e}))}})),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(o),i=0;n=r[i++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(En)),En.exports}var Cn,bn={};function Tn(){return Cn||(Cn=1,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:/[{}[\];(),.:]/}),bn}var xn,wn={};function Sn(){return xn||(xn=1,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),wn}var An,On={};function Rn(){return An||(An=1,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(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\
1s'">=]+(?=[\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:[t,"language-"+t],inside:Prism.languages[t]},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),On}var kn,Dn={};function Mn(){return kn||(kn=1,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.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:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.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:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<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:n(/!?\[(?:(?!\])<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(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var i=t[n];if("code"===i.type){var o=i.content[1],a=i.content[3];if(o&&a&&"code-language"===o.type&&"code-block"===a.type&&"string"==typeof o.content){var s=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,l]:a.alias.push(l):a.alias=[l]}}else e(i.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,i=t.classes.length;r<i;r++){var o=t.classes[r],u=/language-(.+)/.exec(o);if(u){n=u[1];break}}var d=e.languages[n];if(d)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),t}(t.content),d,n);else if(n&&"none"!==n&&e.plugins.autoloader){var c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism)),Dn}var Pn,$n={};function In(){return Pn||(Pn=1,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),$n}var Ln,Fn={};function Bn(){return Ln||(Ln=1,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]
1*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,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:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)),Fn}var zn,Kn={};function Hn(){return zn||(zn=1,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),Kn}var Wn,Un={};function jn(){return Wn||(Wn=1,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:/[;[\]()`,.]/}),Un}var Gn,Yn={};function Zn(){return Gn||(Gn=1,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
1])+|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),Yn}var Vn,Jn={};function qn(){return Vn||(Vn=1,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),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:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)),Jn}var Xn,Qn={};function er(){return Xn||(Xn=1,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]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]
1*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \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(e){e.inside.interpolation.inside=Prism.languages.swift}))),Qn}var tr,nr={};function rr(){return tr||(tr=1,function(e){e.languages.typescript=e.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/}),e.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 e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.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:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),nr}var ir,or={};function ar(){return ir||(ir=1,function(e){var t=/\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/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[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:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?
1=\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+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.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/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.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:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\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 t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),or}var sr,lr={};function ur(){return sr||(sr=1,function(e){var t=/\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/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.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:t,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/}),e.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 n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.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:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)),lr}var dr,cr={};const hr=function(){if(dr)return cr;dr=1;var e=Nn();Tn(),Sn(),Rn(),Mn(),In(),Bn(),Hn(),jn(),Zn(),qn(),er(),rr(),ar(),ur();var t=ut(),n=Le();let r=t=>null!=t&&e.languages.hasOwnProperty(t)?t:void 0;function i(e,n){for(let r of e.childNodes){if(t.isHTMLElement(r)&&r.tagName===n)return!0;
1i(r,n)}return!1}class o extends n.ElementNode{static getType(){return"code"}static clone(e){return new o(e.__language,e.__key)}constructor(e,t){super(t),this.__language=r(e)}createDOM(e){let n=document.createElement("code");return t.addClassNamesToElement(n,e.theme.code),n.setAttribute("spellcheck","false"),(e=this.getLanguage())&&n.setAttribute("data-highlight-language",e),n}updateDOM(e,t){let n=this.__language;return e=e.__language,n?n!==e&&t.setAttribute("data-highlight-language",n):e&&t.removeAttribute("data-highlight-language"),!1}exportDOM(){let e=document.createElement("pre");e.setAttribute("spellcheck","false");let t=this.getLanguage();return t&&e.setAttribute("data-highlight-language",t),{element:e}}static importDOM(){return{code:e=>null!=e.textContent&&(/\r?\n/.test(e.textContent)||i(e,"BR"))?{conversion:l,priority:1}:null,div:()=>({conversion:u,priority:1}),pre:()=>({conversion:l,priority:0}),table:e=>g(e)?{conversion:d,priority:3}:null,td:e=>{let t=e.closest("table");return e.classList.contains("js-file-line")?{conversion:h,priority:3}:t&&g(t)?{conversion:c,priority:3}:null},tr:e=>(e=e.closest("table"))&&g(e)?{conversion:c,priority:3}:null}}static importJSON(e){let t=a(e.language);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(e,t=!0){var r=this.getChildren(),i=r.length;if(2<=i&&"\n"===r[i-1].getTextContent()&&"\n"===r[i-2].getTextContent()&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===i)return r[i-1].remove(),r[i-2].remove(),e=n.$createParagraphNode(),this.insertAfter(e,t),e;let{anchor:o,focus:a}=e;if(t=(o.isBefore(a)?o:a).getNode(),n.$isTextNode(t)){for(i=N(t),r=[];;)if(n.$isTabNode(i))r.push(n.$createTabNode()),i=i.getNextSibling();else{if(!E(i))break;for(var l=0,u=i.getTextContent(),d=i.getTextContentSize();l<d&&" "===u[l];l++);if(0!==l&&r.push(v(" ".repeat(l))),l!==d)break;i=i.getNextSibling()}i=t.splitText(o.offset)[0],l=0===o.offset?0:1,l=i.getIndexWithinParent()+l,u=t.getParentOrThrow(),d=[n.$createLineBreakNode(),...r],u.splice(l,0,d),(r=r[r.length-1])?r.select():0===o.offset?i.selectPrevious():i.getNextSibling().selectNext(0,0)}return s(t)&&(({offset:e}=e.anchor),t.splice(e,0,[n.$createLineBreakNode()]),t.select(e+1,e+1)),null}canIndent(){return!1}collapseAtStart(){let e=n.$createParagraphNode();
1return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}setLanguage(e){this.getWritable().__language=r(e)}getLanguage(){return this.getLatest().__language}}function a(e){return n.$applyNodeReplacement(new o(e))}function s(e){return e instanceof o}function l(e){let n;return t.isHTMLElement(e)&&(n=e.getAttribute("data-highlight-language")),{node:a(n)}}function u(e){let t=null!==e.style.fontFamily.match("monospace");return t||function(e){for(e=e.parentElement;null!==e;){if(null!==e.style.fontFamily.match("monospace"))return!0;e=e.parentElement}return!1}(e)?{after:t=>{let r=e.parentNode;return null!=r&&e!==r.lastChild&&t.push(n.$createLineBreakNode()),t},node:t?a():null}:{node:null}}function d(){return{node:a()}}function c(){return{node:null}}function h(e){return{after:t=>(e.parentNode&&e.parentNode.nextSibling&&t.push(n.$createLineBreakNode()),t),node:null}}function g(e){return e.classList.contains("js-file-line-container")}let p={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},f={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function m(e){return f[e]||e}class _ extends n.TextNode{constructor(e,t,n){super(e,n),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new _(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(e){let n=super.createDOM(e);return e=y(e.theme,this.__highlightType),t.addClassNamesToElement(n,e),n}updateDOM(e,n,r){let i=super.updateDOM(e,n,r);return(e=y(r.theme,e.__highlightType))!==(r=y(r.theme,this.__highlightType))&&(e&&t.removeClassNamesFromElement(n,e),r&&t.addClassNamesToElement(n,r)),i}static importJSON(e){let t=v(e.text,e.highlightType);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return a()}}function y(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function v(e,t){return n.$applyNodeReplacement(new _(e,t))}function E(e){return e instanceof _}function N(e){let t=e;for(;E(e)||n.$isTabNode(e);)t=e,e=e.getPreviousSibling();return t}function C(e){let t=e;for(;E(e)||n.$isTabNode(e);)t=e,e=e.getNextSibling();return t}let b={defaultLanguage:"javascript",tokenize(t,n){return e.tokenize(t,e.languages[n||""]||e.languages[this.defaultLanguage])}};function T(e,t){let r=null;var i=null,o=e;let a=t,s=e.getTextContent();for(;;){if(0===a){if(null===(o=o.getPreviousSibling()))break;if(!(E(o)||n.$isTabNode(o)||n.$isLineBreakNode(o)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(n.$isLineBreakNode(o)){r={node:o,offset:1};break}a=Math.max(0,o.getTextContentSize()-1),s=o.getTextContent()}else a--;let e=s[a];E(o)&&" "!==e&&(i={node:o,offset:a})}if(null!==i)return i;if(i=null,t<e.getTextContentSize()?E(e)&&(i=e.getTextContent()[t]):E(o=e.getNextSibling())&&(i=o.getTextContent()[0]),null!==i&&" "!==i)return r;e:for(i=e,o=e.getTextContent(),e=e.getTextContentSize();;){if(!E(i)||t===e){if(null===(i=i.getNextSibling())||n.$isLineBreakNode(i)){e=null;break e}E(i)&&(t=0,o=i.getTextContent(),e=i.getTextContentSize())}if(E(i)){if(" "!==o[t]){e={node:i,offset:t};break e}t++}}return null!==e?e:r}function x(e){if(e=C(e),n.$isLineBreakNode(e))throw Error("Unexpected lineBreakNode in getEndOfCodeInLine");return e}function w(e,t,r){let i=e.getParent();s(i)?A(i,t,r):E(e)&&e.replace(n.$createTextNode(e.__text))}let S=new Set;function A(e,t,r){let i=e.getKey();S.has(i)||(S.add(i),void 0===e.getLanguage()&&e.setLanguage(r.defaultLanguage),t.update((()=>{!function(e,t){if(s(e=n.$getNodeByKey(e))&&e.isAttached()){var r=n.$getSelection();if(n.$isRangeSelection(r)){var i=(r=r.anchor).offset,o="element"===r.type&&n.$isLineBreakNode(e.getChildAtIndex(r.offset-1)),a=0;if(!o){let e=r.getNode();a=i+e.getPreviousSiblings().reduce(((e,t)=>e+t.getTextContentSize()),0)}
1t()&&(o?r.getNode().select(i,i):e.getChildren().some((e=>{let t=n.$isTextNode(e);if(t||n.$isLineBreakNode(e)){let n=e.getTextContentSize();if(t&&n>=a)return e.select(a,a),!0;a-=n}return!1})))}else t()}}(i,(()=>{var t=n.$getNodeByKey(i);if(!s(t)||!t.isAttached())return!1;var o=t.getTextContent();o=O(o=r.tokenize(o,t.getLanguage()||r.defaultLanguage));var a=t.getChildren();for(t=0;t<a.length&&R(a[t],o[t]);)t++;var l=a.length;let u=o.length,d=Math.min(l,u)-t,c=0;for(;c<d;)if(c++,!R(a[l-c],o[u-c])){c--;break}a=t,l-=c,o=o.slice(t,u-c);let{from:h,to:g,nodesForReplacement:p}={from:a,nodesForReplacement:o,to:l};return!(h===g&&!p.length)&&(e.splice(h,g-h,p),!0)}))}),{onUpdate:()=>{S.delete(i)},skipTransforms:!0}))}function O(e,t){let r=[];for(let i of e)if("string"==typeof i){let o=(e=i.split(/(\n|\t)/)).length;for(let i=0;i<o;i++){let o=e[i];"\n"===o||"\r\n"===o?r.push(n.$createLineBreakNode()):"\t"===o?r.push(n.$createTabNode()):0<o.length&&r.push(v(o,t))}}else({content:e}=i),"string"==typeof e?r.push(...O([e],i.type)):Array.isArray(e)&&r.push(...O(e,i.type));return r}function R(e,t){return E(e)&&E(t)&&e.__text===t.__text&&e.__highlightType===t.__highlightType||n.$isTabNode(e)&&n.$isTabNode(t)||n.$isLineBreakNode(e)&&n.$isLineBreakNode(t)}function k(e){if(!n.$isRangeSelection(e))return!1;var t=e.anchor.getNode();return e=e.focus.getNode(),!(!t.is(e)||!s(t))||s(t=t.getParent())&&t.is(e.getParent())}function D(e){let t=[[]];if(1===(e=e.getNodes()).length&&s(e[0]))return t;let r=t[0];for(let i=0;i<e.length;i++){let o=e[i];if(!(E(o)||n.$isTabNode(o)||n.$isLineBreakNode(o)))throw Error("Expected selection to be inside CodeBlock and consisting of CodeHighlightNode, TabNode and LineBreakNode");n.$isLineBreakNode(o)?0!==i&&0<r.length&&(r=[],t.push(r)):r.push(o)}return t}function M(e){var t=n.$getSelection();if(!n.$isRangeSelection(t)||!k(t))return!1;var r=D(t);let i=r.length;if(1<r.length){for(t=0;t<i;t++){var o=r[t];0<o.length&&(o=o[0],0===t&&(o=N(o)),null!==o&&(e===n.INDENT_CONTENT_COMMAND?o.insertBefore(n.$createTabNode()):n.$isTabNode(o)&&o.remove()))}return!0}if(!(s(r=t.getNodes()[0])||E(r)||n.$isTabNode(r)||n.$isLineBreakNode(r)))throw Error("Expected selection firstNode to be CodeHighlightNode or CodeTabNode");if(s(r))return e===n.INDENT_CONTENT_COMMAND&&t.insertNodes([n.$createTabNode()]),!0;if(null===(r=N(r)))throw Error("Expected getFirstCodeNodeOfLine to return a valid Code Node");return e===n.INDENT_CONTENT_COMMAND?n.$isLineBreakNode(r)?r.insertAfter(n.$createTabNode()):r.insertBefore(n.$createTabNode()):n.$isTabNode(r)&&r.remove(),!0}function P(e,t){let r=n.$getSelection();if(!n.$isRangeSelection(r))return!1;let{anchor:i,focus:o}=r,a=i.offset,s=o.offset,l=i.getNode(),u=o.getNode();var d=e===n.KEY_ARROW_UP_COMMAND;if(!k(r)||!E(l)&&!n.$isTabNode(l)||!E(u)&&!n.$isTabNode(u))return!1;if(!t.altKey){if(r.isCollapsed())if(e=l.getParentOrThrow(),d&&0===a&&null===l.getPreviousSibling()){if(null===e.getPreviousSibling())return e.selectPrevious(),t.preventDefault(),!0}else if(!d&&a===l.getTextContentSize()&&null===l.getNextSibling()&&null===e.getNextSibling())return e.selectNext(),t.preventDefault(),!0;return!1}let c;if(l.isBefore(u)){var h=N(l);c=C(u)}else h=N(u),c=C(l);if(null==h||null==c)return!1;let g=h.getNodesBetween(c);for(let f=0;f<g.length;f++){let e=g[f];if(!E(e)&&!n.$isTabNode(e)&&!n.$isLineBreakNode(e))return!1}if(t.preventDefault(),t.stopPropagation(),t=d?h.getPreviousSibling():c.getNextSibling(),!n.$isLineBreakNode(t)||null==(h=d?t.getPreviousSibling():t.getNextSibling()))return!0;let p=(d=E(h)||n.$isTabNode(h)||n.$isLineBreakNode(h)?d?N(h):C(h):null)??h;return t.remove(),g.forEach((e=>e.remove())),e===n.KEY_ARROW_UP_COMMAND?(g.forEach((e=>p.insertBefore(e))),p.insertBefore(t)):(p.insertAfter(t),p=t,g.forEach((e=>{p.insertAfter(e),p=e}))),r.setTextNodeRange(l,a,u,s),!0}function $(e,t){let r=n.$getSelection();if(!n.$isRangeSelection(r))return!1;let{anchor:i,focus:o}=r;var a=i.getNode();let s=o.getNode();if(e=e===n.MOVE_TO_START,!E(a)&&!n.$isTabNode(a)||!E(s)&&!n.$isTabNode(s))return!1;if(e)if(null!==(a=T(s,o.offset))){let{node:e,offset:t}=a;n.$isLineBreakNode(e)?e.selectNext(0,0):r.setTextNodeRange(e,t,e,t)}else s.getParentOrThrow().selectStart();else x(s).select();return t.preventDefault(),t.stopPropagation(),!0}return cr.$createCodeHighlightNode=v,cr.$createCodeNode=a,cr.$isCodeHighlightNode=E,cr.$isCodeNode=s,cr.CODE_LANGUAGE_FRIENDLY_NAME_MAP=p,cr.CODE_LANGUAGE_MAP=f,cr.CodeHighlightNode=_,cr.CodeNode=o,cr.DEFAULT_CODE_LANGUAGE="javascript",cr.PrismTokenizer=b,cr.getCodeLanguages=()=>Object.keys(e.languages).filter((t=>"function"!=typeof e.languages[t])).sort(),cr.getDefaultCodeLanguage=()=>"javascript",cr.getEndOfCodeInLine=x,cr.getFirstCodeNodeOfLine=N,cr.getLanguageFriendlyName=function(e){return e=m(e),p[e]||e},cr.getLastCodeNodeOfLine=C,cr.getStartOfCodeInLine=T,cr.normalizeCodeLang=m,cr.registerCodeHighlighting=function(e,r){if(!e.hasNodes([o,_]))throw Error("CodeHighlightPlugin: CodeNode or 
1CodeHighlightNode not registered on editor");return null==r&&(r=b),t.mergeRegister(e.registerMutationListener(o,(t=>{e.update((()=>{for(let[o,a]of t)if("destroyed"!==a){var r=n.$getNodeByKey(o);if(null!==r)e:{var i=r;if(null===(r=e.getElementByKey(i.getKey())))break e;let t=(i=i.getChildren()).length;if(t===r.__cachedChildrenLength)break e;r.__cachedChildrenLength=t;let o="1",a=1;for(let e=0;e<t;e++)n.$isLineBreakNode(i[e])&&(o+="\n"+ ++a);r.setAttribute("data-gutter",o)}}}))})),e.registerNodeTransform(o,(t=>A(t,e,r))),e.registerNodeTransform(n.TextNode,(t=>w(t,e,r))),e.registerNodeTransform(_,(t=>w(t,e,r))),e.registerCommand(n.KEY_TAB_COMMAND,(t=>{let r=function(e){var t=n.$getSelection();if(!n.$isRangeSelection(t)||!k(t))return null;let r=e?n.OUTDENT_CONTENT_COMMAND:n.INDENT_CONTENT_COMMAND;if(e=e?n.OUTDENT_CONTENT_COMMAND:n.INSERT_TAB_COMMAND,1<D(t).length)return r;var i=t.getNodes()[0];if(!(s(i)||E(i)||n.$isTabNode(i)||n.$isLineBreakNode(i)))throw Error("Expected selection firstNode to be CodeHighlightNode or TabNode");if(s(i))return r;let o=N(i);i=C(i);var a=t.anchor;let l=t.focus;return l.isBefore(a)?t=l:(t=a,a=l),null!==o&&null!==i&&t.key===o.getKey()&&0===t.offset&&a.key===i.getKey()&&a.offset===i.getTextContentSize()?r:e}(t.shiftKey);return null!==r&&(t.preventDefault(),e.dispatchCommand(r,void 0),!0)}),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.INSERT_TAB_COMMAND,(()=>!!k(n.$getSelection())&&(n.$insertNodes([n.$createTabNode()]),!0)),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.INDENT_CONTENT_COMMAND,(()=>M(n.INDENT_CONTENT_COMMAND)),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.OUTDENT_CONTENT_COMMAND,(()=>M(n.OUTDENT_CONTENT_COMMAND)),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.KEY_ARROW_UP_COMMAND,(e=>P(n.KEY_ARROW_UP_COMMAND,e)),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.KEY_ARROW_DOWN_COMMAND,(e=>P(n.KEY_ARROW_DOWN_COMMAND,e)),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.MOVE_TO_END,(e=>$(n.MOVE_TO_END,e)),n.COMMAND_PRIORITY_LOW),e.registerCommand(n.MOVE_TO_START,(e=>$(n.MOVE_TO_START,e)),n.COMMAND_PRIORITY_LOW))},cr}();var gr=hr,pr=ke();function fr(){const[e]=pr.useLexicalComposerContext();return(0,r.useEffect)((()=>gr.registerCodeHighlighting(e)),[e]),null}var mr=ut(),_r=Le();function yr({src:e,altText:t,width:n,height:i,maxWidth:o}){const a=(0,r.useMemo)((()=>({height:i,width:n,maxWidth:o})),[i,n,o]);return g.jsx("img",{src:e,alt:t,style:a})}function vr({altText:e,height:t,maxWidth:n=500,src:r,width:i,key:o}){return _r.$applyNodeReplacement(new Er(r,e,n,i,t,o))}class Er extends _r.DecoratorNode{constructor(e,t,n,r,i,o){super(o),s(this,"__src"),s(this,"__altText"),s(this,"__width"),s(this,"__height"),s(this,"__maxWidth"),this.__src=e,this.__altText=t,this.__maxWidth=n,this.__width=r||"inherit",this.__height=i||"inherit"}static getType(){return"image"}static clone(e){return new Er(e.__src,e.__altText,e.__maxWidth,e.__width,e.__height,e.__key)}getSrc(){return this.getLatest().__src}getAltText(){return this.getLatest().__altText}exportJSON(){return{altText:this.getAltText(),height:"inherit"===this.__height?0:this.__height,maxWidth:this.__maxWidth,src:this.getSrc(),type:"image",version:1,width:"inherit"===this.__width?0:this.__width}}static importJSON(e){return vr(e)}createDOM(e){const t=document.createElement("span"),n=e.theme.image;return n&&(t.className=n),t}updateDOM(){return!1}decorate(){return g.jsx(yr,{src:this.__src,altText:this.__altText,width:this.__width,height:this.__height,maxWidth:this.__maxWidth})}}const Nr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Cr=_r.createCommand("INSERT_IMAGE_COMMAND");function br(){const[e]=pr.useLexicalComposerContext();return(0,r.useEffect)((()=>{if(!e.hasNodes([Er]))throw new Error("ImagePlugin: ImageNode not registered on editor");return mr.mergeRegister(e.registerCommand(Cr,(e=>{const t=vr(e);return _r.$insertNodes([t]),_r.$isRootOrShadowRoot(t.getParentOrThrow())&&mr.$wrapNodeInElement(t,_r.$createParagraphNode).selectEnd(),!0}),_r.COMMAND_PRIORITY_EDITOR),e.registerCommand(_r.DRAGSTART_COMMAND,(e=>function(e){const t="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n=document.createElement("img");n.src=t;const r=Tr();if(!r)return!1;const i=e.dataTransfer;return!!i&&(i.setData("text/plain","_"),i.setDragImage(n,0,0),i.setData("application/x-lexical-drag",JSON.stringify({data:{altText:r.__altText,height:r.__height,key:r.getKey(),maxWidth:r.__maxWidth,src:r.__src,width:r.__width},type:"image"})),!0)}(e)),_r.COMMAND_PRIORITY_HIGH),e.registerCommand(_r.DRAGOVER_COMMAND,(e=>function(e){return!!Tr()&&(xr(e)||e.preventDefault(),!0)}(e)),_r.COMMAND_PRIORITY_LOW),e.registerCommand(_r.DROP_COMMAND,(t=>function(e,t){const n=Tr();if(!n)return!1;const r=function(e){var t;const n=null==(t=e.dataTransfer)?void 0:t.getData("application/x-lexical-drag");if(!n)return null;const{type:r,data:i}=JSON.parse(n);return"image"!==r?null:i}(e);if(!r)return!1;if(e.preventDefault(),xr(e)){const i=function(e){let t;const n=e.target,r=null!==n&&n instanceof Node?9===n.nodeType?n.defaultView:n.ownerDocument.defaultView:null,i=(e=>Nr?(e||window).getSelection():null)(r);if(document.caretRangeFromPoint)t=document.caretRangeFromPoint(e.clientX,e.clientY);else{if(!e.rangeParent||null===i)throw Error("Cannot get the selection when dragging");i.collapse(e.rangeParent,e.rangeOffset||0),t=i.getRangeAt(0)}return t}(e);n.remove();const o=_r.$createRangeSelection();
1null!=i&&o.applyDOMRange(i),_r.$setSelection(o),t.dispatchCommand(Cr,r)}return!0}(t,e)),_r.COMMAND_PRIORITY_HIGH))}),[e]),null}function Tr(){const e=_r.$getSelection();if(!_r.$isNodeSelection(e))return null;const t=e.getNodes()[0];return function(e){return e instanceof Er}(t)?t:null}function xr(e){const t=e.target;return!!(t&&t instanceof HTMLElement&&!t.closest("code, span.yext-default-richtextv2-theme__image")&&t.parentElement)}var wr=Zt();function Sr(e){const t=_r.$getSelection();if(!_r.$isRangeSelection(t))return!1;const n=function(e){const t=e.getNodes();return 0===t.length?new Set([e.anchor.getNode().getParentOrThrow(),e.focus.getNode().getParentOrThrow()]):new Set(t.map((e=>_r.$isElementNode(e)?e:e.getParentOrThrow())))}(t);let r=0;for(const i of n)if(wr.$isListNode(i))r=Math.max(wr.$getListDepth(i)+1,r);else if(wr.$isListItemNode(i)){const e=i.getParent();if(!wr.$isListNode(e))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");r=Math.max(wr.$getListDepth(e)+1,r)}return r<=e}function Ar({maxDepth:e}){const[t]=pr.useLexicalComposerContext();return(0,r.useEffect)((()=>t.registerCommand(_r.INDENT_CONTENT_COMMAND,(()=>!Sr(e||7)),3)),[t,e]),null}var Or=pn(),Rr=rn(),kr=Rt();var Dr,Mr={};const Pr=function(){if(Dr)return Mr;Dr=1;var e=ut(),t=Le();class n extends t.TextNode{static getType(){return"hashtag"}static clone(e){return new n(e.__text,e.__key)}constructor(e,t){super(e,t)}createDOM(t){let n=super.createDOM(t);return e.addClassNamesToElement(n,t.theme.hashtag),n}static importJSON(e){let t=r(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"hashtag"}}canInsertTextBefore(){return!1}isTextEntity(){return!0}}function r(e=""){return t.$applyNodeReplacement(new n(e))}return Mr.$createHashtagNode=r,Mr.$isHashtagNode=function(e){return e instanceof n},Mr.HashtagNode=n,Mr}();var $r=Pr;const Ir="_yext-default-richtextv2-theme__tokenComment_13v3w_337",Lr="_yext-default-richtextv2-theme__tokenProperty_13v3w_343",Fr="_yext-default-richtextv2-theme__tokenSelector_13v3w_346",Br="_yext-default-richtextv2-theme__tokenOperator_13v3w_349",zr="_yext-default-richtextv2-theme__tokenAttr_13v3w_352",Kr="_yext-default-richtextv2-theme__tokenVariable_13v3w_355",Hr="_yext-default-richtextv2-theme__tokenFunction_13v3w_358",Wr={characterLimit:"_yext-default-richtextv2-theme__characterLimit_13v3w_222",code:"_yext-default-richtextv2-theme__code_13v3w_171",codeHighlight:{atrule:zr,attr:zr,boolean:Lr,builtin:Fr,cdata:Ir,char:Fr,class:Hr,"class-name":Hr,comment:Ir,constant:Lr,deleted:Lr,doctype:Ir,entity:Br,function:Hr,important:Kr,inserted:Fr,keyword:zr,namespace:Kr,number:Lr,operator:Br,prolog:Ir,property:Lr,punctuation:"_yext-default-richtextv2-theme__tokenPunctuation_13v3w_340",regex:Kr,selector:Fr,string:Fr,symbol:Lr,tag:Lr,url:Br,variable:Kr},embedBlock:{base:"_yext-default-richtextv2-theme__embedBlock_13v3w_378",focu
1s:"_yext-default-richtextv2-theme__embedBlockFocus_13v3w_381"},hashtag:"_yext-default-richtextv2-theme__hashtag_13v3w_159",heading:{h1:"_yext-default-richtextv2-theme__h1_13v3w_81",h2:"_yext-default-richtextv2-theme__h2_13v3w_89",h3:"_yext-default-richtextv2-theme__h3_13v3w_97",h4:"_yext-default-richtextv2-theme__h4_13v3w_105",h5:"_yext-default-richtextv2-theme__h5_13v3w_113",h6:"_yext-default-richtextv2-theme__h6_13v3w_121"},image:"_yext-default-richtextv2-theme__image_13v3w_385",link:"_yext-default-richtextv2-theme__link_13v3w_163",list:{listitem:"_yext-default-richtextv2-theme__listItem_13v3w_267",listitemChecked:"_yext-default-richtextv2-theme__listItemChecked_13v3w_270",listitemUnchecked:"_yext-default-richtextv2-theme__listItemUnchecked_13v3w_271",nested:{listitem:"_yext-default-richtextv2-theme__nestedListItem_13v3w_330"},olDepth:["_yext-default-richtextv2-theme__ol1_13v3w_226","_yext-default-richtextv2-theme__ol2_13v3w_233","_yext-default-richtextv2-theme__ol3_13v3w_240","_yext-default-richtextv2-theme__ol4_13v3w_247","_yext-default-richtextv2-theme__ol5_13v3w_254"],ulDepth:["_yext-default-richtextv2-theme__ul1_13v3w_17","_yext-default-richtextv2-theme__ul2_13v3w_25","_yext-default-richtextv2-theme__ul3_13v3w_33"]},ltr:"_yext-default-richtextv2-theme__ltr_13v3w_55",mark:"_yext-default-richtextv2-theme__mark_13v3w_361",markOverlap:"_yext-default-richtextv2-theme__markOverlap_13v3w_366",paragraph:"_yext-default-richtextv2-theme__paragraph_13v3w_61",quote:"_yext-default-richtextv2-theme__quote_13v3w_70",rtl:"_yext-default-richtextv2-theme__rtl_13v3w_58",table:"_yext-default-richtextv2-theme__table_13v3w_199",tableCell:"_yext-default-richtextv2-theme__tableCell_13v3w_208",tableCellHeader:"_yext-default-richtextv2-theme__tableCellHeader_13v3w_218",text:{bold:"_yext-default-richtextv2-theme__textBold_13v3w_130",code:"_yext-default-richtextv2-theme__textCode_13v3w_153",italic:"_yext-default-richtextv2-theme__textItalic_13v3w_133",strikethrough:"_yext-default-richtextv2-theme__textStrikethrough_13v3w_139",subscript:"_yext-default-richtextv2-theme__textSubscript_13v3w_145",superscript:"_yext-default-richtextv2-theme__textSuperscript_13v3w_149",underline:"_yext-default-richtextv2-theme__textUnderline_13v3w_136",underlineStrikethrough:"_yext-default-richtextv2-theme__textUnderlineStrikethrough_13v3w_142"}};var Ur,jr,Gr,Yr={};function Zr(){return Gr||(Gr=1,jr=function(){if(Ur)return Yr;Ur=1;var e=ke(),t=Le(),n=r;function i(e,n){return e.getEditorState().read((()=>{let e=t.$getNodeByKey(n);return null!==e&&e.isSelected()}))}return Yr.useLexicalNodeSelection=function(r){let[o]=e.useLexicalComposerContext(),[a,s]=n.useState((()=>i(o,r)));return n.useEffect((()=>{let e=!0,t=o.registerUpdateListener((()=>{e&&s(i(o,r))}));return()=>{e=!1,t()}}),[o,r]),[a,n.useCallback((e=>{o.update((()=>{let n=t.$getSelection();t.$isNodeSelection(n)||(n=t.$createNodeSelection(),t.$setSelection(n)),t.$isNodeSelection(n)&&(e?n.add(r):n.delete(r))}))}),[o,r]),n.useCallback((()=>{o.update((()=>{const e=t.$getSelection();t.$isNodeSelection(e)&&e.clear()}))}),[o])]},Yr}()),jr}var Vr,Jr={};const qr=function(){if(Vr)return Jr;Vr=1;var e=ke(),t=Zr(),n=ut(),i=Le(),o=r;let a=i.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function s({nodeKey:r}){let[a]=e.useLexicalComposerContext(),[s,l,u]=t.useLexicalNodeSelection(r),d=o.useCallback((e=>(s&&i.$isNodeSelection(i.$getSelection())&&(e.preventDefault(),c(e=i.$getNodeByKey(r))&&e.remove()),!1)),[s,r]);return o.useEffect((()=>n.mergeRegister(a.registerCommand(i.CLICK_COMMAND,(e=>{let t=a.getElementByKey(r);return e.target===t&&(e.shiftKey||u(),l(!s),!0)}),i.COMMAND_PRIORITY_LOW),a.registerCommand(i.KEY_DELETE_COMMAND,d,i.COMMAND_PRIORITY_LOW),a.registerCommand(i.KEY_BACKSPACE_COMMAND,d,i.COMMAND_PRIORITY_LOW))),[u,a,s,r,d,l]),o.useEffect((()=>{let e=a.getElementByKey(r);null!==e&&(e.className=s?"selected":"")}),[a,s,r]),null}class l extends i.DecoratorNode{static getType(){return"horizontalrule"}static clone(e){return new l(e.__key)}static importJSON(){return d()}static importDOM(){return{hr:()=>({conversion:u,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}decorate(){return o.createElement(s,{nodeKey:this.__key})}}function u(){return{node:d()}}function d(){return i.$applyNodeReplacement(new l)}function c(e){return e instanceof l}return Jr.$createHorizontalRuleNode=d,Jr.$isHorizontalRuleNode=c,Jr.HorizontalRuleNode=l,Jr.INSERT_HORIZONTAL_RULE_COMMAND=a,Jr}();var Xr=qr;function Qr(e,t){return{namespace:"",editable:!1,onError:e=>{throw e},editorState:e,theme:t??Wr,nodes:[kr.HeadingNode,$r.HashtagNode,Er,wr.ListNode,wr.ListItemNode,kr.QuoteNode,gr.CodeNo
1de,gr.CodeHighlightNode,Or.TableNode,Or.TableCellNode,Or.TableRowNode,Rr.AutoLinkNode,Rr.LinkNode,Xr.HorizontalRuleNode]}}const ei="_editor-inner_1mmqo_6",ti="_no-border_1mmqo_10";function ni({serializedAST:e,nodeClassNames:t}){return g.jsx(je.LexicalComposer,{initialConfig:Qr(e,t),children:g.jsx("div",{className:`${ei} ${ti}`,children:g.jsxs("div",{className:ei,children:[g.jsx(Pt.RichTextPlugin,{contentEditable:g.jsx(zt.ContentEditable,{className:"editor-input",ariaLabel:"Lexical Rich Text"}),ErrorBoundary:Ht,placeholder:g.jsx("div",{})}),g.jsx(fr,{}),g.jsx(Xt.ListPlugin,{}),g.jsx(ln.LinkPlugin,{}),g.jsx(vn.TablePlugin,{}),g.jsx(br,{}),g.jsx(Ar,{maxDepth:7})]})})})}function ri(e,t,n,r){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),[].splice.apply(e,o);else for(n&&[].splice.apply(e,[t,n]);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),[].splice.apply(e,o),a+=1e4,t+=1e4}function ii(e,t){return e.length>0?(ri(e,e.length,0,t),e):t}const oi={}.hasOwnProperty;function ai(e){const t={};let n=-1;for(;++n<e.length;)si(t,e[n]);return t}function si(e,t){let n;for(n in t){const r=(oi.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;for(o in i){oi.call(r,o)||(r[o]=[]);const e=i[o];li(r[o],Array.isArray(e)?e:e?[e]:[])}}}function li(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ri(e,0,0,r)}var ui=Object.prototype.hasOwnProperty;function di(e,t,n){for(n of e.keys())if(ci(n,t))return n}function ci(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ci(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=di(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=di(t,i))||!ci(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e)if(ui.call(e,n)&&++r&&!ui.call(t,n)||!(n in t)||!ci(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}let hi,gi,pi,fi,mi=!0;typeof o<"u"&&(({FORCE_COLOR:hi,NODE_DISABLE_COLORS:gi,NO_COLOR:pi,TERM:fi}=o.env||{}),mi=o.stdout&&o.stdout.isTTY);const _i={enabled:!gi&&null==pi&&"dumb"!==fi&&(null!=hi&&"0"!==hi||mi),reset:vi(0,0),bold:vi(1,22),dim:vi(2,22),italic:vi(3,23),underline:vi(4,24),inverse:vi(7,27),hidden:vi(8,28),strikethrough:vi(9,29),black:vi(30,39),red:vi(31,39),green:vi(32,39),yellow:vi(33,39),blue:vi(34,39),magenta:vi(35,39),cyan:vi(36,39),white:vi(37,39),gray:vi(90,39),grey:vi(90,39),bgBlack:vi(40,49),bgRed:vi(41,49),bgGreen:vi(42,49),bgYellow:vi(43,49),bgBlue:vi(44,49),bgMagenta:vi(45,49),bgCyan:vi(46,49),bgWhite:vi(47,49)};function yi(e,t){let n,r=0,i="",o="";for(;r<e.length;r++)n=e[r],i+=n.open,o+=n.close,~t.indexOf(n.close)&&(t=t.replace(n.rgx,n.close+n.open));return i+t+o}function vi(e,t){let n={open:`\x1b[${e}m`,close:`\x1b[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(t){return void 0!==this&&void 0!==this.has?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(n)),void 0===t?this:_i.enabled?yi(this.keys,t+""):t+""):void 0===t?function(e,t){let n={has:e,keys:t};return n.reset=_i.reset.bind(n),n.bold=_i.bold.bind(n),n.dim=_i.dim.bind(n),n.italic=_i.italic.bind(n),n.underline=_i.underline.bind(n),n.inverse=_i.inverse.bind(n),n.hidden=_i.hidden.bind(n),n.strikethrough=_i.strikethrough.bind(n),n.black=_i.black.bind(n),n.red=_i.red.bind(n),n.green=_i.green.bind(n),n.yellow=_i.yellow.bind(n),n.blue=_i.blue.bind(n),n.magenta=_i.magenta.bind(n),n.cyan=_i.cyan.bind(n),n.white=_i.white.bind(n),n.gray=_i.gray.bind(n),n.grey=_i.grey.bind(n),n.bgBlack=_i.bgBlack.bind(n),n.bgRed=_i.bgRed.bind(n),n.bgGreen=_i.bgGreen.bind(n),n.bgYellow=_i.bgYellow.bind(n),n.bgBlue=_i.bgBlue.bind(n),n.bgMagenta=_i.bgMagenta.bind(n),n.bgCyan=_i.bgCyan.bind(n),n.bgWhite=_i.bgWhite.bind(n),n}([e],[n]):_i.enabled?yi([n],t+""):t+""}}function Ei(){}function Ni(e,t,n,r,i){for(var o,a=[];t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,l=a.length,u=0,d=0;s<l;s++){var c=a[s];if(c.removed){if(c.value=e.join(r.slice(d,d+c.count)),d+=c.count,s&&a[s-1].added){var h=a[s-1];a[s-1]=a[s],a[s]=h}}else{if(!c.added&&i){var g=n.slice(u,u+c.count);g=g.map((function(e,t){var n=r[d+t];return n.length>e.length?n:e})),c.value=e.join(g)}else c.value=e.join(n.slice(u,u+c.count));u+=c.count,c.added||(d+=c.count)}}
1var p=a[l-1];return l>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(a[l-2].value+=p.value,a.pop()),a}Ei.prototype={diff:function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.callback;"function"==typeof r&&(i=r,r={}),this.options=r;var o=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,l=e.length,u=1,d=s+l;r.maxEditLength&&(d=Math.min(d,r.maxEditLength));var c=null!==(n=r.timeout)&&void 0!==n?n:1/0,h=Date.now()+c,g=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(g[0],t,e,0);if(g[0].oldPos+1>=l&&p+1>=s)return a([{value:this.join(t),count:t.length}]);var f=-1/0,m=1/0;function _(){for(var n=Math.max(f,-u);n<=Math.min(m,u);n+=2){var r=void 0,i=g[n-1],d=g[n+1];i&&(g[n-1]=void 0);var c=!1;if(d){var h=d.oldPos-n;c=d&&0<=h&&h<s}var _=i&&i.oldPos+1<l;if(c||_){if(r=!_||c&&i.oldPos+1<d.oldPos?o.addToPath(d,!0,void 0,0):o.addToPath(i,void 0,!0,1),p=o.extractCommon(r,t,e,n),r.oldPos+1>=l&&p+1>=s)return a(Ni(o,r.lastComponent,t,e,o.useLongestToken));g[n]=r,r.oldPos+1>=l&&(m=Math.min(m,n-1)),p+1>=s&&(f=Math.max(f,n+1))}else g[n]=void 0}u++}if(i)!function e(){setTimeout((function(){if(u>d||Date.now()>h)return i();_()||e()}),0)}();else for(;u<=d&&Date.now()<=h;){var y=_();if(y)return y}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,o=n.length,a=e.oldPos,s=a-r,l=0;s+1<i&&a+1<o&&this.equals(t[s+1],n[a+1]);)s++,a++,l++;return l&&(e.lastComponent={count:l,previousComponent:e.lastComponent}),e.oldPos=a,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var Ci=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,bi=/\S/,Ti=new Ei;Ti.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!bi.test(e)&&!bi.test(t)},Ti.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&Ci.test(t[n])&&Ci.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var xi=new Ei;function wi(e){return(wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}xi.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,"\n"));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t},(new Ei).tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)},(new Ei).tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var Si=Object.prototype.toString,Ai=new Ei;function Oi(e,t,n,r,i){var o,a;for(t=t||[],n=n||[],r&&(e=r(i,e)),o=0;o<t.length;o+=1)if(t[o]===e)return n[o];if("[object Array]"===Si.call(e)){for(t.push(e),a=new Array(e.length),n.push(a),o=0;o<e.length;o+=1)a[o]=Oi(e[o],t,n,r,i);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),"object"===wi(e)&&null!==e){t.push(e),a={},n.push(a);var s,l=[];for(s in e)e.hasOwnProperty(s)&&l.push(s);for(l.sort(),o=0;o<l.length;o+=1)a[s=l[o]]=Oi(e[s],t,n,r,s);t.pop(),n.pop()}else a=e;return a}Ai.useLongestToken=!0,Ai.tokenize=xi.tokenize,Ai.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=void 0===r?function(e,t){return typeof t>"u"?n:t}:r;return"string"==typeof e?e:JSON.stringify(Oi(e,null,null,i),i,"  ")},Ai.equals=function(e,t){return Ei.prototype.equals.call(Ai,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var Ri=new Ei;function ki(e){let t=(e=e.replace(/\r?\n/g,"\n")).match(/^[ \t]*(?=\S)/gm),n=0,r=1/0,i=(t||[]).length;for(;n<i;n++)r=Math.min(r,t[n].length);return i&&r?e.replace(new RegExp(`^[ \\t]{${r}}`,"gm"),""):e}Ri.tokenize=function(e){return e.slice()},Ri.join=Ri.removeEmpty=function(e){return e},_i.red,_i.grey,_i.green,_i.dim().italic,_i.dim("\u2192"),_i.dim("\xb7"),_i.dim("\u21b5");
1class Di extends Error{constructor(e={}){super(e.message),this.name="Assertion",this.code="ERR_ASSERTION",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.details=e.details||!1,this.generated=!!e.generated,this.operator=e.operator,this.expects=e.expects,this.actual=e.actual}}function Mi(e,t,n,r,i,o,a){if(e)return;if(a instanceof Error)throw a;throw new Di({actual:t,expects:n,operator:r,message:a||o,details:i,generated:!a})}function Pi(e,t){Mi(!e,!0,!1,"not",!1,"Expected value to be falsey",t)}Pi.ok=Pi,Pi.equal=function(e,t,n){Mi(!ci(e,t),e,t,"not.equal",!1,"Expected values not to be deeply equal",n)},Pi.type=function(e,t,n){let r=typeof e;Mi(r!==t,r,t,"not.type",!1,`Expected "${r}" not to be "${t}"`,n)},Pi.instance=function(e,t,n){Mi(!(e instanceof t),e,t,"not.instance",!1,`Expected value not to be an instance of ${"`"+(t.name||t.constructor.name)+"`"}`,n)},Pi.snapshot=function(e,t,n){Mi((e=ki(e))!==(t=ki(t)),e,t,"not.snapshot",!1,"Expected value not to match snapshot",n)},Pi.fixture=function(e,t,n){Mi((e=ki(e))!==(t=ki(t)),e,t,"not.fixture",!1,"Expected value not to match fixture",n)},Pi.match=function(e,t,n){"string"==typeof t?Mi(!e.includes(t),e,t,"not.match",!1,`Expected value not to include "${t}" substring`,n):Mi(!t.test(e),e,t,"not.match",!1,`Expected value not to match \`${String(t)}\` pattern`,n)},Pi.throws=function(e,t,n){!n&&"string"==typeof t&&(n=t,t=null);try{e()}catch(r){"function"==typeof t?Mi(!t(r),!0,!1,"not.throws",!1,"Expected function not to throw matching exception",n):t instanceof RegExp?Mi(!t.test(r.message),!0,!1,"not.throws",!1,`Expected function not to throw exception matching \`${String(t)}\` pattern`,n):t||Mi(!1,!0,!1,"not.throws",!1,"Expected function not to throw",n)}};const $i=Yi(/[A-Za-z]/),Ii=Yi(/[\dA-Za-z]/),Li=Yi(/[#-'*+\--9=?A-Z^-~]/);function Fi(e){return null!==e&&(e<32||127===e)}const Bi=Yi(/\d/),zi=Yi(/[\dA-Fa-f]/),Ki=Yi(/[!-/:-@[-`{-~]/);function Hi(e){return null!==e&&e<-2}function Wi(e){return null!==e&&(e<0||32===e)}function Ui(e){return-2===e||-1===e||32===e}const ji=Yi(/[!-\/:-@\[-`\{-~\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]/),Gi=Yi(/\s/);function Yi(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function Zi(e){return null===e||Wi(e)||Gi(e)?1:ji(e)?2:void 0}function Vi(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}function Ji(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&Ii(e.charCodeAt(n+1))&&Ii(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="\ufffd"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function qi(e,t){const n=String(t.identifier).toUpperCase(),r=Ji(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;-1===i?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const a=e.footnoteCounts[n],s={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)}function Xi(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function Qi(e){return e.spread??e.children.length>1}const eo=no("start"),to=no("end");function no(e){return function(t){const n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}function ro(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(io(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(io(t.slice(i),i>0,!1)),o.join("")}function io(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const oo={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:qi,footnote:function(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},qi(e,{type:"footnoteReference",identifier:i,position:t.position})},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){const n=e.definition(t.identifier);if(!n)return Xi(e,t);const r={src:Ji(n.url||""),alt:t.alt};null!==n.title&&void 0!==n.title&&(r.title=n.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Ji(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=e.definition(t.identifier);if(!n)return Xi(e,t);const r={href:Ji(n.url||"")};null!==n.title&&void 0!==n.title&&(r.title=n.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:Ji(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Qi(n[r])}return t}(n):Qi(t),o={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const u={type:"element",tagName:"li",properties:o,children:a};
1return e.patch(t,u),e.applyData(t,u)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=eo(t.children[1]),a=to(t.children[t.children.length-1]);o.line&&a.line&&(r.position={start:o,end:a}),i.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=o?o[s]:void 0;a&&(r.align=a);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(t,u)),l.push(u)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){const n={type:"text",value:ro(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:ao,yaml:ao,definition:ao,footnoteDefinition:ao};function ao(){return null}const so=function(e){if(null==e)return uo;if("string"==typeof e)return function(e){return lo(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=so(e[n]);return lo(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}(e):function(e){return lo(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return lo(e);throw new Error("Expected function, string, or object as test")};function lo(e){return function(t,...n){return!!(t&&"object"==typeof t&&"type"in t&&e.call(this,t,...n))}}function uo(){return!0}const co=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const i=so(t),o=r?-1:1;!function e(a,s,l){const u=a&&"object"==typeof a?a:{};if("string"==typeof u.type){const e="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return d;function d(){let u,d,c,h=[];if((!t||i(a,s,l[l.length-1]||null))&&(h=function(e){return Array.isArray(e)?e:"number"==typeof e?[true,e]:[e]}(n(a,l)),false===h[0]))return h;if(a.children&&"skip"!==h[0])for(d=(r?a.children.length:-1)+o,c=l.concat(a);d>-1&&d<a.children.length;){if(u=e(a.children[d],d,c)(),false===u[0])return u;d="number"==typeof u[1]?u[1]:d+o}return h}}(e,void 0,[])()};const ho=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),co(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}
1),r)};const go={}.hasOwnProperty;function po(e){return String(e||"").toUpperCase()}const fo={}.hasOwnProperty;function mo(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return a.dangerous=r,a.clobberPrefix=void 0===n.clobberPrefix||null===n.clobberPrefix?"user-content-":n.clobberPrefix,a.footnoteLabel=n.footnoteLabel||"Footnotes",a.footnoteLabelTagName=n.footnoteLabelTagName||"h2",a.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},a.footnoteBackLabel=n.footnoteBackLabel||"Back to content",a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,a.handlers={...oo,...n.handlers},a.definition=function(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return ho(e,"definition",(e=>{const n=po(e.identifier);n&&!go.call(t,n)&&(t[n]=e)})),function(e){const n=po(e);return n&&go.call(t,n)?t[n]:null}}(e),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.patch=_o,a.applyData=yo,a.one=function(e,t){return vo(a,e,t)},a.all=function(e){return Eo(a,e)},a.wrap=No,a.augment=o,ho(e,"footnoteDefinition",(e=>{const t=String(e.identifier).toUpperCase();fo.call(i,t)||(i[t]=e)})),a;function o(e,t){if(e&&"data"in e&&e.data){const n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties={...t.properties,...n.hProperties}),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){const n="type"in e?e:{position:e};(function(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column})(n)||(t.position={start:eo(n),end:to(n)})}return t}function a(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),o(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}function _o(e,t){e.position&&(t.position=function(e){return{start:eo(e),end:to(e)}}(e))}function yo(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&i&&(n.properties={...n.properties,...i}),"children"in n&&n.children&&null!==r&&void 0!==r&&(n.children=r)}return n}function vo(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return fo.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:Eo(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){const n=t.data||{},r=!("value"in t)||fo.call(n,"hProperties")||fo.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:Eo(e,t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}(e,t)}function Eo(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i<r.length;){const o=vo(e,r[i],t);if(o){if(i&&"break"===r[i-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=e.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function No(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}class Co extends Error{}class bo extends Co{constructor(){super("Zone is an abstract class")}}class To{get type(){throw new bo}get name(){throw new bo}get ianaName(){return this.name}get isUniversal(){throw new bo}offsetName(e,t){throw new bo}formatOffset(e,t){throw new bo}offset(e){throw new bo}equals(e){throw new bo}get isValid(){throw new bo}}let xo={};const wo={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let So={};class Ao extends To{static create(e){return So[e]||(So[e]=new Ao(e)),So[e]}static resetCache(){So={},xo={}}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=Ao.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Lo(e,t,n,this.name)}formatOffset(e,t){return Bo(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){return xo[e]||(xo[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,
1year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),xo[e]}(this.name);let[r,i,o,a,s,l,u]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let i=0;i<n.length;i++){const{type:e,value:t}=n[i],o=wo[e];"era"===e?r[o]=t:Do(o)||(r[o]=parseInt(t,10))}return r}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,o,a,s,l,u,d]=r;return[a,i,o,s,l,u,d]}(n,t);"BC"===a&&(r=1-Math.abs(r));let d=+t;const c=d%1e3;return d-=c>=0?c:1e3+c,(Io({year:r,month:i,day:o,hour:24===s?0:s,minute:l,second:u,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let Oo=null;class Ro extends To{static get utcInstance(){return null===Oo&&(Oo=new Ro(0)),Oo}static instance(e){return 0===e?Ro.utcInstance:new Ro(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Ro(Fo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Bo(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Bo(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Bo(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}const ko={arab:"[\u0660-\u0669]",arabext:"[\u06f0-\u06f9]",bali:"[\u1b50-\u1b59]",beng:"[\u09e6-\u09ef]",deva:"[\u0966-\u096f]",fullwide:"[\uff10-\uff19]",gujr:"[\u0ae6-\u0aef]",hanidec:"[\u3007|\u4e00|\u4e8c|\u4e09|\u56db|\u4e94|\u516d|\u4e03|\u516b|\u4e5d]",khmr:"[\u17e0-\u17e9]",knda:"[\u0ce6-\u0cef]",laoo:"[\u0ed0-\u0ed9]",limb:"[\u1946-\u194f]",mlym:"[\u0d66-\u0d6f]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0b66-\u0b6f]",tamldec:"[\u0be6-\u0bef]",telu:"[\u0c66-\u0c6f]",thai:"[\u0e50-\u0e59]",tibt:"[\u0f20-\u0f29]",latn:"\\d"};ko.hanidec.replace(/[\[|\]]/g,"").split("");function Do(e){return typeof e>"u"}function Mo(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Po(e){if(!Do(e)&&null!==e&&""!==e)return parseInt(e,10)}function $o(e){if(!Do(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Io(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Lo(e,t,n,r=null){const i=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const a={timeZoneName:t,...o},s=new Intl.DateTimeFormat(n,a).formatToParts(i).find((e=>"timezonename"===e.type.toLowerCase()));return s?s.value:null}function Fo(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function Bo(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${Mo(n,2)}:${Mo(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Mo(n,2)}${Mo(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}const zo=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ko(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function Ho(...e){return t=>e.reduce((([e,n,r],i)=>{const[o,a,s]=i(t,r);return[{...e,...o},a||n,s]}),[{},null,1]).slice(0,2)}function Wo(...e){return(t,n)=>{const r={};let i;for(i=0;i<e.length;i++)r[e[i]]=Po(t[n+i]);return[r,null,n+i]}}const Uo=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,jo=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Go=RegExp(`${jo.source}${`(?:${Uo.source}?(?:\\[(${zo.source})\\])?)?`}`),Yo=RegExp(`(?:T${Go.source})?`),Zo=Wo("weekYear","weekNumber","weekDay"),Vo=Wo("year","ordinal"),Jo=RegExp(`${jo.source} ?(?:${Uo.source}|(${zo.source}))?`),qo=RegExp(`(?: ${Jo.source})?`);function Xo(e,t,n){const r=e[t];return Do(r)?n:Po(r)}function Qo(e,t){return[{hours:Xo(e,t,0),minutes:Xo(e,t+1,0),seconds:Xo(e,t+2,0),milliseconds:$o(e[t+3])},null,t+4]}function ea(e,t){const n=!e[t]&&!e[t+1],r=Fo(e[t+1],e[t+2]);return[{},n?null:Ro.instance(r),t+3]}function ta(e,t){return[{},e[t]?Ao.create(e[t]):null,t+1]}RegExp(`^T?${jo.source}$`);Ko(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Yo),Ko(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Yo),Ko(/(\d{4})-?(\d{3})/,Yo),Ko(Go),Ho((function(e,t){return[{year:Xo(e,t),month:Xo(e,t+1,1),day:Xo(e,t+2,1)},null,t+3]}),Qo,ea,ta),Ho(Zo,Qo,ea,ta),Ho(Vo,Qo,ea,ta),Ho(Qo,ea,ta);Ho(Qo);Ko(/(\d{4})-(\d\d)-(\d\d)/,qo),Ko(Jo),Ho(Qo,ea,ta);const na={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},ra=365.2425,ia=30.436875,oa=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"];oa.slice(0).reverse();Symbol.for("nodejs.util.inspect.custom");Symbol.for("nodejs.util.inspect.custom");const aa="[ \xa0]";new RegExp(aa,"g");Symbol.for("nodejs.util.inspect.custom");var sa=(e=>(e.Monday="MONDAY",e.Tuesday="TUESDAY",e.Wednesday="WEDNESDAY",e.Thursday="THURSDAY",e.Friday="FRIDAY",e.Saturday="SATURDAY",e.Sunday="SUNDAY",e))(sa||{});sa.Monday,sa.Tuesday,sa.Wednesday,sa.Thursday,sa.Friday,sa.Saturday,sa.Sunday,sa.Monday,sa.Tuesday,sa.Wednesday,sa.Thursday,sa.Friday,sa.Saturday,sa.Sunday;const la=Math.log2(1.6745627884839434),ua="js-baidu-neg-lng-fix";let da;const ca=new Promise((e=>da=e));let ha=[];let ga,pa=0;async function fa(e){return await new Promise(((t,n)=>{function r(){const e=ha;ha=[];const t=[].concat(...e.map((e=>
1e.coordinates))),n="gcj02ToBD09Callback_b872c21c_"+pa++,r=document.createElement("script");window[n]=t=>{var i;if(t.status){const n=new Error(`Unable to convert coordinates to BD-09: Received status code ${t.status}${t.message?": "+t.message:""}`);e.forEach((e=>e.reject(n)))}const o=t.result.map((e=>new he(e.y,e.x)));let a=0;e.forEach((e=>{e.resolve(o.slice(a,a+=e.coordinates.length))})),delete window[n],null==(i=r.parentNode)||i.removeChild(r)},ca.then((e=>{const i={ak:e,callback:n,coords:t.map((e=>`${e.longitude},${e.latitude}`)).join(";"),from:3,to:5};r.src="https://api.map.baidu.com/geoconv/v1/?"+Object.entries(i).map((([e,t])=>e+"="+t)).join("&"),document.head.appendChild(r)}))}ha.push({coordinates:e,resolve:t,reject:n}),1===ha.length&&(ga=setTimeout(r,100)),ha.length>40&&(clearTimeout(ga),r())}))}(new be).withLoadFunction((function(e,t,n,{params:r={},version:i="3.0"}={}){window.BMAP_PROTOCOL="https",window.BMap_loadScriptTime=(new Date).getTime();const o={ak:n,v:i,...r};da(n);const a=document.createElement("script");a.src="https://api.map.baidu.com/getscript?"+Object.entries(o).map((([e,t])=>e+"="+t)).join("&"),a.onload=()=>e(),document.head.appendChild(a);let s="";for(let u=4;u<=19;u++){s+=`[data-baidu-zoom="${u}"] .${ua}{transform:translateX(-${2**(u-la+7)}px);}`}const l=document.createElement("style");l.appendChild(document.createTextNode(s)),document.head.appendChild(l)})).withMapClass(class extends ye{constructor(e){super(e),s(this,"_wrapper"),s(this,"map"),s(this,"_panStartHandler"),s(this,"_panHandler"),s(this,"_centerReady");const t=!(!window.MSInputMethodContext||!document.DOCUMENT_NODE);this._wrapper=e.wrapper,this.map=new BMap.Map(this._wrapper,{enableMapClick:e.controlEnabled,maxZoom:t?14:18,...e.providerOptions}),e.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 he(this.map.getCenter())}getZoom(){return this.map.getZoom()-la}setCenter(e,t){this._centerReady=fa([e]).then((([e])=>{const n=new BMap.Point(e.longitude,e.latitude);this.map.panTo(n,{noAnimation:!t})}))}setZoom(e,t){this._centerReady.then((()=>{this.map.setViewport({center:this.map.getCenter(),zoom:Math.floor(e+la)},{enableAnimation:t})}))}}).withPinClass(class extends Ce{constructor(e){super(e),s(this,"_wrapper"),s(this,"_zIndex"),s(this,"_wrapperClass"),s(this,"_originalWrapperClass"),s(this,"_element"),s(this,"_coordinateReady"),s(this,"_negativeLngFix"),s(this,"pin"),this._wrapper=null,this._zIndex=0,this._wrapperClass="",this._originalWrapperClass="",this._element=this._pinEl,this._coordinateReady=Prom
1ise.resolve(),this._negativeLngFix=!1;class t extends BMap.Marker{constructor(e,t){super(e),s(this,"pin"),this.pin=t}initialize(e){return this.pin._wrapper=super.initialize(e),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 e=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=e}else super.draw()}}this.pin=new t(new BMap.Point(0,0),this);const n=new BMap.Icon("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",{height:0,width:0});this.pin.setIcon(n),this.pin.setShadow(n)}addListeners(){super.addListeners(),this._wrapper&&this._wrapper.addEventListener("touchend",(()=>this._clickHandler()))}setCoordinate(e){this._coordinateReady=fa([e]).then((([e])=>{this._negativeLngFix=e.longitude<0,this.pin.setPosition(new BMap.Point(e.longitude+(this._negativeLngFix?180:0),e.latitude)),this._wrapper&&this._wrapper.classList[this._negativeLngFix?"add":"remove"](ua)}))}setMap(e,t){this._coordinateReady.then((()=>{t&&t.getProviderMap().map.removeOverlay(this.pin),e&&e.getProviderMap().map.addOverlay(this.pin)}))}setProperties(e){super.setProperties(e),this._wrapperClass=e.getClass(),this._element=e.getElement()||this._pinEl,this._zIndex=e.getZIndex(),this._wrapper&&this._wrapper.setAttribute("class",this._getClass())}_getClass(){return`${this._originalWrapperClass} ${this._negativeLngFix?ua:""} ${this._wrapperClass}`}}).withProviderName("Baidu").build();let ma;class _a extends Ce{constructor(e){super(e),s(this,"_location"),s(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(e){this._location=new Microsoft.Maps.Location(e.latitude,e.longitude),this._map&&this._map.getProviderMap().pinOverlay.updatePinPosition(this)}setMap(e,t){t&&t.getProviderMap().pinOverlay.removePin(this),e&&e.getProviderMap().pinOverlay.addPin(this),this._map=e}}s(_a,"_pinId");const ya="BingMapsCallback_593d7d33";(new be).withLoadFunction((function(e,t,n,{params:r={}}={}){window[ya]=()=>{(function(){class e extends Microsoft.Maps.CustomOverlay{constructor(){super({beneathLabels:!1}),s(this,"_container"),s(this,"_pins"),s(this,"_viewChangeEventHandler"),s(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(e){this._pins.add(e),e._wrapper&&(e._wrapper.style.position="absolute",this._container.appendChild(e._wrapper)),this._map&&this.updatePinPosition(e)}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(e){this._pins.delete(e),e._wrapper&&this._container.removeChild(e._wrapper)}updatePinPosition(e){if(!this._map)return;const t=this._map.tryLocationToPixel(e._location,Microsoft.Maps.PixelReference.control);e._wrapper&&t instanceof Microsoft.Maps.Point&&(e._wrapper.style.left=t.x+"px",e._wrapper.style.top=t.y+"px")}updatePinPositions(){this._pins.forEach((e=>this.updatePinPosition(e)))}}ma=e})(),e()};const i={callback:ya,key:n,...r};ge("https://www.bing.com/api/maps/mapcontrol?"+Object.entries(i).map((([e,t])=>e+"="+t)).join("&"))})).withMapClass(class extends ye{constructor(e){super(e),s(this,"wrapper"),s(this,"map"),s(this,"pinOverlay"),this.wrapper=e.wrapper,this.wrapper&&(this.map=new Microsoft.Maps.Map(this.wrapper,{disablePanning:!e.controlEnabled,disableZooming:!e.controlEnabled,showLocateMeButton:!1,showMapTypeSelector:!1,showScalebar:!1,showTrafficButton:!1,...e.providerOptions}),this.pinOverlay=new ma(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 e;return new he((null==(e=this.map)?void 0:e.getCenter())??{lat:0,lng:0})}getZoom(){var e;return(null==(e=this.map)?void 0:e.getZoom())??0}setCenter(e,t){var n;const r=new Microsoft.Maps.Location(e.latitude,e.longitude);
1null==(n=this.map)||n.setView({center:r}),this.pinOverlay.updatePinPositions()}setZoom(e,t){var n;null==(n=this.map)||n.setView({zoom:Math.floor(e)}),this.pinOverlay.updatePinPositions()}}).withPinClass(_a).withProviderName("Bing").build();(new be).withLoadFunction((function(e,t,n,{version:r="v1.13.0"}={}){const i=`https://api.mapbox.com/mapbox-gl-js/${r}/mapbox-gl`,o=document.createElement("link");o.rel="stylesheet",o.href=i+".css";const a=document.createElement("script");a.src=i+".js",a.onload=()=>{mapboxgl.accessToken=n,e()},document.head.appendChild(o),document.head.appendChild(a)})).withMapClass(class extends ye{constructor(e){var t,n,r;if(super(e),s(this,"map"),e.wrapper&&(this.map=new mapboxgl.Map({container:e.wrapper,interactive:e.controlEnabled,style:"mapbox://styles/mapbox/streets-v9",...e.providerOptions})),e.controlEnabled){const e=new mapboxgl.NavigationControl({showCompass:!1});null==(t=this.map)||t.addControl(e)}null==(n=this.map)||n.on("movestart",(()=>this._panStartHandler())),null==(r=this.map)||r.on("moveend",(()=>this._panHandler()))}getCenter(){var e;return new he((null==(e=this.map)?void 0:e.getCenter())??{lat:0,lng:0})}getZoom(){var e;return((null==(e=this.map)?void 0:e.getZoom())??0)+1}setCenter(e,t){const n=new mapboxgl.LngLat(e.longitude,e.latitude);this.map&&this.map[t?"panTo":"setCenter"](n)}setZoom(e,t){this.map&&this.map[t?"zoomTo":"setZoom"](e-1)}setZoomCenter(e,t,n){const r=new mapboxgl.LngLat(t.longitude,t.latitude);this.map&&this.map[n?"easeTo":"jumpTo"]({center:r,zoom:e-1})}}).withPinClass(class extends Ce{constructor(e){super(e),s(this,"pin"),this._wrapper&&(this._wrapper.style.position="relative",this.pin=new mapboxgl.Marker({anchor:"top-left",element:this._wrapper}))}setCoordinate(e){var t;null==(t=this.pin)||t.setLngLat(new mapboxgl.LngLat(e.longitude,e.latitude))}setMap(e,t){var n,r;if(e){const t=e.getProviderMap().map;t&&(null==(n=this.pin)||n.addTo(t))}else null==(r=this.pin)||r.remove()}}).withProviderName("Mapbox").build();var va;let Ea=(va=class extends ye{constructor(e){var t,n,r;super(e),s(this,"map"),this._initMap(e),e.controlEnabled&&(null==(t=this.map)||t.zoomControl.setPosition("topright")),null==(n=this.map)||n.on("movestart",(()=>this._panStartHandler())),null==(r=this.map)||r.on("moveend",(()=>this._panHandler()))}getCenter(){var e;return new he((null==(e=this.map)?void 0:e.getCenter())??{lat:0,lng:0})}getZoom(){var e;return(null==(e=this.map)?void 0:e.getZoom())??0}setCenter(e,t){var n;const r=new L.LatLng(e.latitude,e.longitude);null==(n=this.map)||n.panTo(r,{animate:t})}setZoom(e,t){var n;null==(n=this.map)||n.setZoom(e,{animate:t})}setZoomCenter(e,t,n){var r;const i=new L.LatLng(t.latitude,t.longitude);null==(r=this.map)||r.setView(i,e,{animate:n})}_initMap(e){e.wrapper&&(this.map=new L.Map(e.wrapper,{boxZoom:e.controlEnabled,doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions}));const t=e.providerOptions,n=t.tileLayerSrc||"https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}",r=t.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 \xa9 <a href="https://www.mapbox.com/">Mapbox</a>',id:"mapbox/streets-v11"};r.accessToken=va.apiKey,this.map&&L.tileLayer(n,r).addTo(this.map)}},s(va,"apiKey"),va);const Na=(new be).withLoadFunction((function(e,t,n,{version:r="1.7.1"}={}){const i=`https://unpkg.com/leaflet@${r}/dist/leaflet`;Ea.apiKey=n;const o=document.createElement("link");o.rel="stylesheet",o.href=i+".css";const a=document.createElement("script");a.src=i+".js",a.onload=()=>e(),document.head.appendChild(o),document.head.appendChild(a)})).withMapClass(Ea).withPinClass(class extends Ee{constructor(e){super(e),s(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(e){const t=new L.LatLng(e.latitude,e.longitude);this.pin.setLatLng(t)}setMap(e,t){if(e){const t=e.getProviderMap().map;t&&this.pin.addTo(t)}else this.pin.remove()}setProperties(e){const t=e.getWidth(),n=e.getHeight(),r=e.getAnchorX(),i=e.getAnchorY();this.pin.setIcon(new L.Icon({iconUrl:this._icons[e.getIcon()],iconSize:[t,n],iconAnchor:[r*t,i*n],className:e.getClass()})),this.pin.setZIndexOffset(e.getZIndex())}}).withProviderName("Leaflet").build(),Ca=Na.getMapClass(),ba=Na.getPinClass();(new be).withLoadFunction((function(e,t,n,{version:r="v1.3.2"}={}){const i=`https://api.mqcdn.com/sdk/mapquest-js/${r}/mapquest-maps`,o=document.createElement("link");o.rel="stylesheet",o.href=i+".css";const a=document.createElement("script");a.src=i+".js",a.onload=()=>{L.mapquest.key=n,e()},document.head.appendChild(o),document.head.appendChild(a)})).withMapClass(class extends Ca{constructor(){super(...arguments),s(this,"map")}_initMap(e){this.map=L.mapquest.map(e.wrapper,{boxZoom:e.controlEnabled,center:new L.LatLng(0,0),doubleClickZoom:e.controlEnabled,dragging:e.controlEnabled,layers:L.mapquest.tileLayer("map"),zoom:0,zoomControl:e.controlEnabled,zoomSnap:0,...e.providerOptions})}}).withPinClass(class extends ba{}).withProviderName("MapQuest").build()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.