@ws-ui/localization-editor 1.11.12-rc2 → 1.11.12-rc4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,77 +1,77 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("react/jsx-runtime"),M=require("react"),ft=require("classnames"),st=require("@ws-ui/icons"),Se=require("@ws-ui/shared"),be=require("lodash"),en=require("@ws-ui/store"),El=require("short-uuid"),_l=require("./common.cjs.js"),B0=require("simplebar-react"),ed=require("react-dom"),z0=require("react-dropzone"),Il=require("papaparse"),$0=require("jsonschema"),U0=require("@emotion/react"),H0=require("@emotion/styled");function td(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const F=td(M),W0=td(ed),q0=e=>e&&e.length===0,K0=e=>e.length>=1,G0=e=>e.length>=1,J0=()=>T.jsx("div",{className:"flex flex-col w-full h-full p-2",children:T.jsxs("div",{className:"w-full h-full flex flex-col items-center space-y-3 mt-48 bg-grey-800 ",children:[T.jsx(st.FdInfoBold,{className:"h-8 w-8 text-grey-200"}),T.jsx("span",{className:"text-grey-200 text-sm text-center",children:"Your locales are set , you can start translating right away. Shared labels are optional, can be created from components at any time, and managed here."})]})});function _n(e){return typeof e=="function"}function Y0(e){return _n(e==null?void 0:e.lift)}function nd(e){return function(t){if(Y0(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}var Ou=function(e,t){return Ou=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ou(e,t)};function Cr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ou(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var de=function(){return de=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},de.apply(this,arguments)};function jt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Lu(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ht(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a}function Ct(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function rd(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var No=rd(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("react/jsx-runtime"),M=require("react"),ft=require("classnames"),st=require("@ws-ui/icons"),Se=require("@ws-ui/shared"),xe=require("lodash"),en=require("@ws-ui/store"),Il=require("short-uuid"),Tl=require("./common.cjs.js"),$0=require("simplebar-react"),nd=require("react-dom"),U0=require("react-dropzone"),Al=require("papaparse"),H0=require("jsonschema"),W0=require("@emotion/react"),q0=require("@emotion/styled");function rd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const j=rd(M),K0=rd(nd),G0=e=>e&&e.length===0,J0=e=>e.length>=1,Y0=e=>e.length>=1,X0=()=>T.jsx("div",{className:"flex flex-col w-full h-full p-2",children:T.jsxs("div",{className:"w-full h-full flex flex-col items-center space-y-3 mt-48 bg-grey-800 ",children:[T.jsx(st.FdInfoBold,{className:"h-8 w-8 text-grey-200"}),T.jsx("span",{className:"text-grey-200 text-sm text-center",children:"Your locales are set , you can start translating right away. Shared labels are optional, can be created from components at any time, and managed here."})]})}),id=M.createContext(null),ad=({children:e,adapter:t})=>T.jsx(id.Provider,{value:t,children:e});function nr(){const e=M.useContext(id);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e}const Oo={keys:{},userLang:{primary:"",supported:[]}};function Q0(e,t){const n=en.useAppDispatch(),r=en.useAppSelector(en.selectTabs),i=en.useAppSelector(en.selectActiveTab),a=en.useAppSelector(en.selectAllTabsByType("webform")),s=en.useAppSelector(en.selectI18nCurrent);return{getTabs:M.useCallback(()=>r??[],[r]),getI18nCurrent:M.useCallback(()=>s??"",[s]),getWebformTabs:M.useCallback(()=>a??[],[a]),getActiveTabPath:M.useCallback(()=>i??"",[i]),getFlagsByPath:M.useCallback(u=>{var l;return(l=r.find(c=>c.path===u))==null?void 0:l.flags},[r]),getSupportedLanguages:M.useCallback(async u=>Se.getSupportedLanguages(u),[]),fetchI18nFile:M.useCallback(async()=>{try{const u=await fetch(`/$shared/i18n.json?ts=${Date.now()}`);if(!u.ok)throw new Error(`HTTP ${u.status}`);const l=await u.json();return{keys:xe.get(l,"keys",Oo.keys),userLang:xe.get(l,"userLang",Oo.userLang)}}catch{return Oo}},[]),getUserComponents:M.useCallback(()=>e??{},[e]),buildResolver:t,actions:{openModal:M.useCallback(async u=>await n(en.openModal(u)).unwrap(),[n]),setTabs:M.useCallback(u=>{n(en.setTabs(u))},[n]),setI18nCurrent:M.useCallback(u=>{n(en.setI18nCurrent({current:u}))},[n]),setTabContent:M.useCallback(async u=>n(en.setTabContent(u)),[n])}}}var Du=function(e,t){return Du=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Du(e,t)};function kr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Du(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var de=function(){return de=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},de.apply(this,arguments)};function jt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Vu(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ht(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return a}function Ct(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function _n(e){return typeof e=="function"}function sd(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Lo=sd(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
2
2
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=n}});function Du(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Vs=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=Lu(s),l=u.next();!l.done;l=u.next()){var c=l.value;c.remove(this)}}catch(x){t={error:x}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else s.remove(this);var h=this.initialTeardown;if(_n(h))try{h()}catch(x){a=x instanceof No?x.errors:[x]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=Lu(f),m=d.next();!m.done;m=d.next()){var v=m.value;try{nf(v)}catch(x){a=a??[],x instanceof No?a=Ct(Ct([],ht(a)),ht(x.errors)):a.push(x)}}}catch(x){r={error:x}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}if(a)throw new No(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)nf(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Du(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Du(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),id=Vs.EMPTY;function ad(e){return e instanceof Vs||e&&"closed"in e&&_n(e.remove)&&_n(e.add)&&_n(e.unsubscribe)}function nf(e){_n(e)?e():e.unsubscribe()}var X0={Promise:void 0},Q0={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ct([e,t],ht(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Z0(e){Q0.setTimeout(function(){throw e})}function rf(){}function Ga(e){e()}var Tl=(function(e){Cr(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ad(n)&&n.add(r)):r.destination=nb,r}return t.create=function(n,r,i){return new Vu(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Vs),eb=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){wa(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){wa(r)}else wa(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){wa(n)}},e})(),Vu=(function(e){Cr(t,e);function t(n,r,i){var a=e.call(this)||this,s;return _n(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,a.destination=new eb(s),a}return t})(Tl);function wa(e){Z0(e)}function tb(e){throw e}var nb={closed:!0,next:rf,error:tb,complete:rf},rb=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function ib(e){return e}function ab(e){return e.length===0?ib:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var af=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=ob(t)?t:new Vu(t,n,r);return Ga(function(){var s=i,u=s.operator,l=s.source;a.add(u?u.call(a,l):l?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=sf(n),new n(function(i,a){var s=new Vu({next:function(u){try{t(u)}catch(l){a(l),s.unsubscribe()}},error:a,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[rb]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ab(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=sf(t),new t(function(r,i){var a;n.subscribe(function(s){return a=s},function(s){return i(s)},function(){return r(a)})})},e.create=function(t){return new e(t)},e})();function sf(e){var t;return(t=e??X0.Promise)!==null&&t!==void 0?t:Promise}function sb(e){return e&&_n(e.next)&&_n(e.error)&&_n(e.complete)}function ob(e){return e&&e instanceof Tl||sb(e)&&ad(e)}function sd(e,t,n,r,i){return new ub(e,t,n,r,i)}var ub=(function(e){Cr(t,e);function t(n,r,i,a,s,u){var l=e.call(this,n)||this;return l.onFinalize=s,l.shouldUnsubscribe=u,l._next=r?function(c){try{r(c)}catch(h){n.error(h)}}:e.prototype._next,l._error=a?function(c){try{a(c)}catch(h){n.error(h)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(Tl);function lb(e,t){return nd(function(n,r){var i=0;n.subscribe(sd(r,function(a){r.next(e.call(t,a,i++))}))})}var cb=rd(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),od=(function(e){Cr(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new of(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new cb},t.prototype.next=function(n){var r=this;Ga(function(){var i,a;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=Lu(r.currentObservers),u=s.next();!u.done;u=s.next()){var l=u.value;l.next(n)}}catch(c){i={error:c}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Ga(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Ga(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,a=i.hasError,s=i.isStopped,u=i.observers;return a||s?id:(this.currentObservers=null,u.push(n),new Vs(function(){r.currentObservers=null,Du(u,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,a=r.thrownError,s=r.isStopped;i?n.error(a):s&&n.complete()},t.prototype.asObservable=function(){var n=new af;return n.source=this,n},t.create=function(n,r){return new of(n,r)},t})(af),of=(function(e){Cr(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:id},t})(od);function fb(e,t){return nd(function(n,r){var i=0;n.subscribe(sd(r,function(a){return e.call(t,a,i++)&&r.next(a)}))})}const ud=M.createContext(void 0),Oo={i18n:{keys:{},userLang:{primary:"",supported:[]}},i18nFileFetched:!1},ld={tr_key:"__t"},{tr_key:Sa}=ld,hb={buildPathFullObject:e=>`${Sa}.${e}`,getKeyValueFromCustom:(e,t)=>be.get(e,`${Sa}.${t}.key`),getDefaultValueFromCustom:(e,t)=>be.get(e,`${Sa}.${t}.default`),getFullObject:(e,t)=>be.get(e,`${Sa}.${t}`)},cd=M.memo(({children:e,isI18nEnabled:t,onI18nChange:n})=>{const[r,i]=M.useState(Oo),a=M.useRef(!1),{i18n:s}=r,u=(S,b,k)=>{let _=1,P=S;for(;s.keys[P];)P=`${S}-${_}`,_++;const w={default:k};b.forEach(({lang:E,value:D})=>{E&&be.set(w,E,D)});const g={keys:{...s.keys,[S]:w},userLang:s.userLang};i(E=>({...E,i18n:g}))},l=()=>{const S=new window.Event("i18n:ready");window.dispatchEvent(S)},c=M.useCallback(be.debounce((S,b,k,_=!1)=>{i(P=>{const{keys:w,userLang:g}=P.i18n;if(w[S]&&b){const E={...w,[S]:{...w[S],[b]:k}};return a.current=_,{...P,i18n:{keys:E,userLang:g}}}return P})},300),[]),h=M.useCallback(be.debounce((S,b)=>{const{keys:k,userLang:_}=be.cloneDeep(s);k[S]&&b&&be.set(k,`${S}.default`,b),i(P=>({...P,i18n:{keys:k,userLang:_}}))},300),[]),f=S=>{S&&i(b=>({...b,i18n:{...b.i18n,userLang:S}}))},d=M.useCallback((S,b)=>{const{keys:k,userLang:_}=s,w={keys:Object.entries(k).reduce((g,[E,D])=>{const j={...D};return S.isocode in j&&(j[b.isocode]=j[S.isocode],delete j[S.isocode]),g[E]=j,g},{}),userLang:_};i(g=>({...g,i18n:w}))},[s]),m=M.useCallback(S=>{const{keys:b,userLang:k}=s,P={keys:Object.entries(b).reduce((w,[g,E])=>{const D={...E};return S.isocode in D&&delete D[S.isocode],w[g]=D,w},{}),userLang:k};i(w=>({...w,i18n:P}))},[s]),v=S=>{const b=[];return Object.keys(s.keys).forEach(_=>{const P=be.get(s,`keys.${_}.${S}`,be.get(s,`keys.${_}.default`,""));b.push({key:_,value:P})}),b},x=M.useCallback(be.debounce(S=>{i(b=>{const{keys:k,userLang:_}=b.i18n,P={...k};return delete P[S],{...b,i18n:{userLang:_,keys:P}}})},300),[]);return M.useEffect(()=>{(async()=>{if(!t){l();return}try{const b=await fetch(`/$shared/i18n.json?ts=${Date.now()}`);if(!b.ok)throw new Error(`HTTP ${b.status}`);try{const k=await b.json();i(_=>({..._,i18n:{keys:be.get(k,"keys",Oo.i18n.keys),userLang:be.get(k,"userLang",Oo.i18n.userLang)}}))}catch{throw new Error("Invalid JSON in response")}}catch{}finally{i(b=>({...b,i18nFileFetched:!0})),l()}})()},[]),M.useEffect(()=>{const S=Se.i18nSubject.pipe(lb(({action:b,payload:k})=>{if(b==="set_content"){const _={...s,keys:{...s.keys,...k}};i(P=>({...P,i18n:_}))}if(b==="set_locale_state"){const _={...s,...k};i(P=>({...P,i18n:_}))}})).subscribe();return()=>S.unsubscribe()},[s]),M.useEffect(()=>{r.i18nFileFetched&&(n==null||n(r.i18n))},[r]),T.jsx(ud.Provider,{value:{i18n:r.i18n,createKey:u,updateKey:c,removeKey:x,editLanguageKeys:d,updateKeyDefault:h,deleteLanguageKeys:m,getI18nAsKeyValues:v,setUserLangSettings:f,shouldRecompute:a},children:e})});function nr(){const e=M.useContext(ud);if(e===void 0)throw new Error("useI18n must be used within a I18nProviderContext");return e}const fd=M.createContext(void 0),hd=M.createContext(void 0),pb=e=>Se.getSupportedLanguages(e),pd=({children:e,getSupportedLanguages:t=pb,i18nCurrent:n="",activeTabPath:r="",flagsForActiveTab:i})=>{const{isInsideStudio:a}=Se.useStudioContext();return a?T.jsx(mb,{getSupportedLanguages:t,i18nCurrent:n,activeTabPath:r,flagsForActiveTab:i,children:e}):T.jsx(db,{getSupportedLanguages:t,children:e})},db=({children:e,getSupportedLanguages:t})=>{const{state:{currentLang:n},actions:r}=Se.useStateObject({currentLang:""}),{actions:i}=Se.useDsRendererAdapter(`${Se.QODLY_NAMESPACE}:${Se.USER_LANGUAGE_DATASOURCE_ID}`),{i18n:{userLang:{primary:a,supported:s}}}=nr(),{isInsideStudio:u}=Se.useStudioContext(),[l,c]=M.useState([]),{loaded:h}=Se.useDsChangeRenderer({datasourceId:`${Se.QODLY_NAMESPACE}:${Se.USER_LANGUAGE_DATASOURCE_ID}`,isDsBuild:!0,onChange:x=>{if(!x)return;const{selected:S}=x;S&&S.isocode&&(r.setCurrentLang(S.isocode),d(S))}}),f=(x,S)=>{i.setProperty(x,S)},d=x=>{localStorage.setItem("i18n.selected",JSON.stringify(x))},m=()=>{const x=localStorage.getItem("i18n.selected");return x?JSON.parse(x):null},v=()=>navigator.language;return M.useEffect(()=>{t(u).then(x=>{c(x)})},[t,u]),M.useEffect(()=>{if(h&&s){const x=s.map(({isocode:S})=>l.find(b=>b.isocode===S)).filter(Boolean);f("supported",x)}},[s,h]),M.useEffect(()=>{if(h){const x=m();if(x){f("selected",x);return}const S=v();if(S){const b=s.find(k=>k.isocode===S);if(b){f("selected",b);return}}if(a){const b=s.find(k=>k.isocode===a);b&&f("selected",b)}}},[h,s,a]),T.jsx(hd.Provider,{value:{selected:n,supported:l},children:e})},mb=M.memo(({children:e,getSupportedLanguages:t,i18nCurrent:n,flagsForActiveTab:r})=>{const{state:{supported:i},actions:a}=Se.useStateObject({supported:[]}),{i18n:{userLang:{primary:s,supported:u}}}=nr(),{isInsideStudio:l}=Se.useStudioContext(),c=n&&u.find(d=>d.isocode===n)?n:"",[h,f]=M.useState(c);return M.useEffect(()=>{r!=null&&r.enabled&&f("")},[r==null?void 0:r.enabled]),M.useEffect(()=>{f(c)},[c]),Se.useDsChangeRenderer({datasourceId:`${Se.QODLY_NAMESPACE}:${Se.USER_LANGUAGE_DATASOURCE_ID}`,isDsBuild:r==null?void 0:r.enabled,onChange:d=>{if(!d)return;const{selected:m}=d;m&&m.isocode&&(f(m.isocode),localStorage.setItem("i18n.selected",m.isocode))}}),M.useEffect(()=>{t(l).then(d=>{a.setSupported(d)})},[t,l,a]),T.jsx(fd.Provider,{value:{primary:s,selected:h||c,supported:i,userLangagues:u},children:e})});function dd(){const{isInsideStudio:e}=Se.useStudioContext(),t=M.useContext(fd),n=M.useContext(hd),r=e?t:n;if(r===void 0)throw new Error("useLocalization must be used within a LocalizationContext");return r}const md=M.createContext(void 0),gd=({children:e})=>{const{state:{allSupportedLanguages:t,selectedLanguage:n,languageKeys:r,addFirstLanguage:i},actions:a}=Se.useStateObject({allSupportedLanguages:[],selectedLanguage:void 0,languageKeys:[],addFirstLanguage:!1}),{supported:s}=dd(),{i18n:u,setUserLangSettings:l,updateKey:c,removeKey:h,createKey:f}=nr(),d=(v,x)=>Object.keys(x).reduce((k,_)=>{if(x[_]){const P=x[_];if(Object.hasOwn(P,v)){const w=x[_][v];k.push({key:_,value:w,isDefault:!1})}else{const w=x[_].default;k.push({key:_,value:w,isDefault:!0})}}return k},[]),m=(v,x)=>{if(n){const{isocode:S}=n;c(v,S,x,!0);const b=structuredClone(u.keys),k=be.set({...b},`${v}.${S}`,x),_=d(S,k);a.setLanguageKeys(_)}};return M.useEffect(()=>{a.setAllSupportedLanguages(s||[])},[s]),M.useEffect(()=>{if(n){const{isocode:v}=n,x=d(v,u.keys);a.setLanguageKeys(x)}},[u,n]),T.jsx(md.Provider,{value:{userLanguages:u.userLang,languageKeys:r,selectedLanguage:n,allSupportedLanguages:t,addFirstLanguage:i,isPrimary:u.userLang.primary===(n==null?void 0:n.isocode),removeKey:h,addNewKey:f,setAddFirstLanguage:a.setAddFirstLanguage,setUserLangSettings:l,setSelectedLanguage:v=>a.setSelectedLanguage(v),setLanguageKeyValue:m},children:e})},rr=()=>{const e=M.useContext(md);if(e===void 0)throw new Error("useLocalizationEditor must be used within a LocalizationEditorProvider");return e},vd=M.createContext(null),xd=({children:e,adapter:t})=>T.jsx(vd.Provider,{value:t,children:e});function kr(){const e=M.useContext(vd);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e}function gb(e,t){const n=en.useAppDispatch(),r=en.useAppSelector(en.selectTabs),i=en.useAppSelector(en.selectActiveTab),a=en.useAppSelector(en.selectAllTabsByType("webform")),s=en.useAppSelector(en.selectI18nCurrent);return{getTabs:M.useCallback(()=>r??[],[r]),getI18nCurrent:M.useCallback(()=>s??"",[s]),getWebformTabs:M.useCallback(()=>a??[],[a]),getActiveTabPath:M.useCallback(()=>i??"",[i]),getFlagsByPath:M.useCallback(u=>{var l;return(l=r.find(c=>c.path===u))==null?void 0:l.flags},[r]),getSupportedLanguages:M.useCallback(async u=>Se.getSupportedLanguages(u),[]),getUserComponents:M.useCallback(()=>e??{},[e]),buildResolver:t,actions:{openModal:M.useCallback(async u=>await n(en.openModal(u)).unwrap(),[n]),setTabs:M.useCallback(u=>{n(en.setTabs(u))},[n]),setI18nCurrent:M.useCallback(u=>{n(en.setI18nCurrent({current:u}))},[n]),setTabContent:M.useCallback(async u=>n(en.setTabContent(u)),[n])}}}const bd=new od,vb=(e,t)=>({name:e.split("/").pop()||e,type:Se.FileFolderType.WEBFORM,path:e,date:new Date().toISOString(),content:t,view:{panel:{isOpen:!1,type:"",current:""}},flags:{}});function yd(e,t){switch(t.type){case"SET_TABS":return{...e,tabs:t.payload};case"SET_I18N_CURRENT":return{...e,i18nCurrent:t.payload};case"SET_TAB_CONTENT":{const{path:n,content:r}=t.payload;return e.tabs.find(a=>a.path===n)?{...e,tabs:e.tabs.map(a=>a.path===n?{...a,content:r}:a)}:{...e,tabs:[...e.tabs,vb(n,r)]}}case"CREATE_MODAL":return{...e,modals:{...e.modals,list:[...e.modals.list,t.payload]}};case"REMOVE_MODAL":return{...e,modals:{...e.modals,list:e.modals.list.filter(n=>n.id!==t.payload)}};case"CLOSE_MODAL":{const{id:n,reason:r}=t.payload;let i;if(r)if(e.modals.list.find(s=>s.id===n))i={...e,modals:{...e.modals,list:e.modals.list.map(s=>s.id===n?{...s,closeReason:r,isOpen:!1}:s)}};else return e;else i={...e,modals:{...e.modals,list:e.modals.list.filter(a=>a.id!==n)}};return bd.next(i.modals),i}case"EDIT_MODAL":{const{id:n,...r}=t.payload;return e.modals.list.find(a=>a.id===n)?{...e,modals:{...e.modals,list:e.modals.list.map(a=>a.id===n?{...a,...r}:a)}}:e}default:return e}}const Ms=M.createContext(null),wd=(e,t)=>({tabs:e,i18nCurrent:t,modals:{list:[]}}),Sd=({children:e,tabs:t=[],i18nCurrent:n=""})=>{const[r,i]=M.useReducer(yd,wd(t,n));M.useEffect(()=>{be.isEqual(r.tabs,t)||i({type:"SET_TABS",payload:t})},[t,r.tabs]),M.useEffect(()=>{r.i18nCurrent!==n&&i({type:"SET_I18N_CURRENT",payload:n})},[n,r.i18nCurrent]);const a=M.useMemo(()=>({state:r,dispatch:i}),[r]);return T.jsx(Ms.Provider,{value:a,children:e})};function Cd(e,t,n){const r=M.useContext(Ms);if(!r)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:i,dispatch:a}=r;return{getTabs:M.useCallback(()=>i.tabs,[i.tabs]),getI18nCurrent:M.useCallback(()=>i.i18nCurrent,[i.i18nCurrent]),getWebformTabs:M.useCallback(()=>i.tabs.filter(s=>s.type===Se.FileFolderType.WEBFORM),[i.tabs]),getActiveTabPath:M.useCallback(()=>{var s;return((s=i.tabs[0])==null?void 0:s.path)??""},[i.tabs]),getFlagsByPath:M.useCallback(s=>{var u;return(u=i.tabs.find(l=>l.path===s))==null?void 0:u.flags},[i.tabs]),getSupportedLanguages:M.useCallback(async s=>n&&n.length?n:Se.getSupportedLanguages(s),[n]),getUserComponents:M.useCallback(()=>e??{},[e]),buildResolver:t,actions:{openModal:M.useCallback(async s=>{const{type:u=Se.ModalType.ALERT}=s,l=El.generate();return a({type:"CREATE_MODAL",payload:{id:l,type:u,isOpen:!0,...s}}),u===Se.ModalType.CONFIRM?new Promise(c=>{const h=bd.pipe(fb(f=>{const d=f.list.find(m=>m.id===l);return d!==void 0&&!d.isOpen})).subscribe(f=>{var m;const d=f.list.find(v=>v.id===l);if(d){const v=d.closeReason===Se.ModalCloseReason.CONFIRMED,x=be.entries(((m=d.views)==null?void 0:m.toggles)||{}).reduce((S,b)=>({...S,[b[0]]:b[1].value}),{});a({type:"REMOVE_MODAL",payload:l}),h.unsubscribe(),c({confirmed:v,options:x})}})}):{confirmed:!1}},[a]),setTabs:M.useCallback(s=>{a({type:"SET_TABS",payload:s})},[a]),setI18nCurrent:M.useCallback(s=>{a({type:"SET_I18N_CURRENT",payload:s})},[a]),setTabContent:M.useCallback(async s=>(a({type:"SET_TAB_CONTENT",payload:s}),s),[a])}}}function kd(){const e=M.useContext(Ms);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:n}=e;return{modals:t.modals.list,closeModal:M.useCallback(r=>{n({type:"CLOSE_MODAL",payload:r})},[n]),editModal:M.useCallback(r=>{n({type:"EDIT_MODAL",payload:r})},[n]),removeModal:M.useCallback(r=>{n({type:"REMOVE_MODAL",payload:r})},[n])}}const St=()=>document.querySelector(`.${_l.LOCALIZATION_EDITOR_SCOPE_CLASS}`)||document.body,xb=({container:e,...t})=>T.jsx(Se.Portal,{...t,container:e||St()}),bb=({keyName:e,value:t,isDefault:n})=>{const{state:{newValue:r,onEditValue:i},actions:a}=Se.useStateObject({newValue:t,onEditValue:!1}),{setLanguageKeyValue:s,removeKey:u}=rr(),l=kr(),[c,h]=M.useState(null),f=()=>{i&&(s(e,r),a.setOnEditValue(!1),h(null))},d=()=>{i&&(a.setNewValue(t),a.setOnEditValue(!1),h(null))},m=async()=>{const{confirmed:v}=await l.actions.openModal({title:"Delete Key",type:Se.ModalType.CONFIRM,color:Se.ModalColor.DANGER,message:"Deleting this key will remove all translations associated with it across all locales. Are you sure you want to delete it ?",icon:"FdWarningDanger"});v&&u(e)};return M.useEffect(()=>{a.setNewValue(t)},[t]),T.jsxs("tr",{"data-cy":`shared-labels-row-${e}`,className:" text-gray-50 odd:bg-grey-700 even:bg-grey-600",children:[T.jsx("td",{className:"px-2 text-xs font-normal h-10",children:e}),T.jsxs("td",{className:"p-2 whitespace-nowrap text-xs font-normal h-10",children:[i?T.jsx("textarea",{"data-cy":`shared-labels-row-${e}-input`,className:ft("min-w-[80%] bg-grey-300 h-6 p-1 p rounded focus-within:outline-none",{"ring-1 ring-red-400":c,"focus-within:ring-1 focus-within:ring-primary-dark":!c}),value:r,onChange:v=>{a.setNewValue(v.target.value),h(null)},onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),f())}}):T.jsx("span",{className:ft("text-wrap",{"italic text-gray-400":n}),onDoubleClick:()=>{a.setOnEditValue(!0)},children:t}),c&&T.jsx("div",{className:"text-red-400 left-2",children:c==null?void 0:c.message})]}),T.jsx("td",{className:"flex items-center px-2 text-xs font-normal float-right h-10",children:i?T.jsxs(T.Fragment,{children:[T.jsx(Se.Tooltip,{label:"Confirm",container:St(),children:T.jsx("button",{"data-cy":`shared-labels-row-${e}-confirm-button`,className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:f,children:T.jsx(st.FdCheckCircle,{className:"w-4 h-4"})})}),T.jsx(Se.Tooltip,{label:"Cancel",container:St(),children:T.jsx("button",{"data-cy":`shared-labels-row-${e}-cancel-button`,className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:d,children:T.jsx(st.FdClose,{className:"w-4 h-4"})})})]}):T.jsxs(T.Fragment,{children:[T.jsx(Se.Tooltip,{label:"Edit",container:St(),children:T.jsx("button",{"data-cy":`shared-labels-row-${e}-edit-button`,className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:()=>{a.setOnEditValue(!0)},children:T.jsx(st.FdPen,{className:"w-4 h-4"})})}),T.jsx(Se.Tooltip,{label:"Delete",container:St(),children:T.jsx("button",{"data-cy":`shared-labels-row-${e}-delete-button`,className:"cursor-pointerrounded p-1 hover:bg-primary-hover focus:outline-none",onClick:m,children:T.jsx(st.FdTrash,{className:"w-4 h-4"})})})]})})]})},yb=({onCancel:e,onConfirm:t,error:n,setError:r})=>{const{state:i,actions:a}=Se.useStateObject({key:"",value:""}),s=()=>{t(i.key,i.value)},u=()=>{r(null),e()};return T.jsxs("tr",{"data-cy":"shared-labels-new-row",className:" text-gray-50 odd:bg-grey-700 even:bg-grey-600",children:[T.jsx("td",{className:"px-2 text-xs font-normal h-10 min-h-4",children:T.jsxs("div",{className:ft("flex flex-col items-start h-full relative",{"pt-2":n,"justify-center":!n}),children:[T.jsx("input",{"data-cy":"shared-labels-new-row-key-input",className:ft("min-w-[80%] bg-grey-300 h-6 p-1 p rounded focus-within:outline-none",{"ring-1 ring-red-400":n,"focus-within:ring-1 focus-within:ring-primary-dark":!n}),type:"text",value:i.key,onChange:l=>{r(null),a.setKey(l.target.value)},autoFocus:!0,onKeyUp:l=>{l.key==="Escape"&&(r(null),u())}}),n&&T.jsx("div",{className:"text-red-400 left-2",children:n==null?void 0:n.message})]})}),T.jsx("td",{className:"px-2 whitespace-nowrap text-xs font-normal h-10",children:T.jsx("div",{className:ft("flex flex-col items-start h-full relative",{"pt-2":n,"justify-center":!n}),children:T.jsx("input",{"data-cy":"shared-labels-new-row-value-input",className:"min-w-[80%] bg-grey-300 h-6 p-1 p rounded focus-within:outline-none focus-within:ring-1 focus-within:ring-primary-dark",type:"text",value:i.value,onChange:l=>a.setValue(l.target.value),onKeyUp:l=>{l.key==="Enter"?s():l.key==="Escape"&&u()}})})}),T.jsxs("td",{className:"flex items-center px-2 text-xs font-normal float-right h-10",children:[T.jsx(Se.Tooltip,{label:"Confirm",container:St(),children:T.jsx("button",{"data-cy":"shared-labels-new-row-confirm-button",className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:s,children:T.jsx(st.FdCheckCircle,{className:"w-4 h-4"})})}),T.jsx(Se.Tooltip,{label:"Cancel",container:St(),children:T.jsx("button",{"data-cy":"shared-labels-new-row-cancel-button",className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:u,children:T.jsx(st.FdClose,{className:"w-4 h-4"})})})]})]})},wb=()=>{const{languageKeys:e,isPrimary:t,selectedLanguage:n,userLanguages:{supported:r},addNewKey:i,setUserLangSettings:a}=rr(),{state:s,actions:u}=Se.useStateObject({search:"",switch:t,keys:[],addNewKey:!1}),[l,c]=M.useState(null),h=q0(e),f=!!n&&!h,d=!!n,m=e.filter(_=>_.key.match(new RegExp(be.escapeRegExp(s.search),"gi"))),v=m.length===0,x=()=>{if(n){const{isocode:_}=n;a({primary:_,supported:r})}},S=()=>{u.setAddNewKey(!0)},b=(_,P)=>{const w=m.find(g=>g.key===_);if(n){const{isocode:g}=n;if(_){if(!/^[\w\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF-]+$/i.test(_)||!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(_)){c({message:"Invalid key name"});return}else if(w){c({message:"Key name already exists"});return}i(_,[{lang:g,value:P}],P)}u.setAddNewKey(!1)}},k=()=>{u.setAddNewKey(!1)};return M.useEffect(()=>{u.setSwitch(t)},[t]),T.jsx("div",{className:ft("flex w-full bg-grey-800 border-l border-black",{"justify-center items-center":!1}),children:T.jsxs("div",{className:"flex flex-col w-full py-3 px-3 min-h-0",children:[T.jsxs("div",{className:"flex flex-col space-y-3 justify-between w-full",children:[T.jsxs("div",{className:ft("flex items-center w-full justify-between",{hidden:!d}),children:[T.jsxs("div",{className:"flex space-x-2 items-center justify-center",children:[T.jsx("span",{className:"text-[12px] text-gray-50",children:"Shared Labels"}),T.jsx(Se.Tip,{tipKey:"editors:i18n:label",alwaysOn:!0})]}),T.jsxs("div",{className:"flex space-x-2 justify-center items-center",children:[T.jsx(Se.ControlledSwitch,{onChange:_=>{t||(u.setSwitch(_),x())},value:s.switch,className:"focus:outline-none"}),T.jsx("span",{className:"text-xs text-gray-50",children:"Primary Locale"})]})]}),T.jsx("div",{className:ft("w-60",{invisible:!f}),children:T.jsx(Se.SearchInput,{containerClassName:"text-grey-50",value:s.search,onChange:_=>u.setSearch(_),delay:300})})]}),h?T.jsx(J0,{}):T.jsxs("div",{className:"w-full flex-1 min-h-0 overflow-y-auto",children:[T.jsxs("table",{"data-cy":"shared-labels-table",className:"w-full text-sm text-left rtl:text-right text-grey-50 table-fixed",children:[T.jsx("thead",{className:"text-xs text-grey-50",children:T.jsxs("tr",{children:[T.jsx("th",{scope:"col",className:"px-2 py-3 text-xs font-normal",children:"Key"}),T.jsx("th",{scope:"col",className:"px-2 py-3 text-xs font-normal",children:"Value"}),T.jsx("th",{scope:"col",className:"px-2 py-3 text-xs font-normal float-right",children:T.jsx(Se.Tooltip,{label:"Add a key",container:St(),children:T.jsx("button",{className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:S,children:T.jsx(st.FdPlus,{className:"w-4 h-4"})})})})]})}),T.jsxs("tbody",{className:"border-t-[1px] border-grey-50",children:[m.map((_,P)=>T.jsx(bb,{keyName:_.key,value:_.value,isDefault:_.isDefault},`${n==null?void 0:n.isocode}/${P}`)),s.addNewKey&&T.jsx(yb,{onConfirm:b,onCancel:k,setError:c,error:l}),v&&T.jsx("span",{})]})]}),v&&T.jsxs("div",{className:"flex flex-col justify-center items-center mt-16 ml-2 text-xs space-y-3 text-green-50",children:[T.jsx(st.FdInfoBold,{className:"h-9 w-9 text-grey-200"}),T.jsx("div",{className:"text-xs text-grey-200",children:"This key doesn't exist."})]})]})]})})},$r=(e,t)=>t.find(n=>n.isocode===e);function Sb(){return{enter:{mdxFlowExpression:kb,mdxTextExpression:Eb},exit:{mdxFlowExpression:uf,mdxFlowExpressionChunk:lf,mdxTextExpression:uf,mdxTextExpressionChunk:lf}}}function Cb(){return{handlers:{mdxFlowExpression:cf,mdxTextExpression:cf},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function kb(e){this.enter({type:"mdxFlowExpression",value:""},e),this.buffer()}function Eb(e){this.enter({type:"mdxTextExpression",value:""},e),this.buffer()}function uf(e){const t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type==="mdxFlowExpression"||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function lf(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function cf(e,t,n){const r=e.value||"";return"{"+n.indentLines(r,function(a,s,u){return(s===0||u?"":" ")+a})+"}"}function os(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const _b=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],ff={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Ed(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function Ib(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Tb(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function hf(e){return Tb(e)||Ed(e)}const pf=document.createElement("i");function _i(e){const t="&"+e+";";pf.innerHTML=t;const n=pf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const Ab=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Pb(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let a=0,s=-1,u="",l,c;n.position&&("start"in n.position||"indent"in n.position?(c=n.position.indent,l=n.position.start):l=n.position);let h=(l?l.line:0)||1,f=(l?l.column:0)||1,d=v(),m;for(a--;++a<=e.length;)if(m===10&&(f=(c?c[s]:0)||1),m=e.charCodeAt(a),m===38){const b=e.charCodeAt(a+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){u+=String.fromCharCode(m),f++;continue}const k=a+1;let _=k,P=k,w;if(b===35){P=++_;const U=e.charCodeAt(P);U===88||U===120?(w="hexadecimal",P=++_):w="decimal"}else w="named";let g="",E="",D="";const j=w==="named"?hf:w==="decimal"?Ed:Ib;for(P--;++P<=e.length;){const U=e.charCodeAt(P);if(!j(U))break;D+=String.fromCharCode(U),w==="named"&&_b.includes(D)&&(g=D,E=_i(D))}let N=e.charCodeAt(P)===59;if(N){P++;const U=w==="named"?_i(D):!1;U&&(g=D,E=U)}let B=1+P-k,G="";if(!(!N&&n.nonTerminated===!1))if(!D)w!=="named"&&x(4,B);else if(w==="named"){if(N&&!E)x(5,1);else if(g!==D&&(P=_+g.length,B=1+P-_,N=!1),!N){const U=g?1:3;if(n.attribute){const re=e.charCodeAt(P);re===61?(x(U,B),E=""):hf(re)?E="":x(U,B)}else x(U,B)}G=E}else{N||x(2,B);let U=Number.parseInt(D,w==="hexadecimal"?16:10);if(Rb(U))x(7,B),G="�";else if(U in ff)x(6,B),G=ff[U];else{let re="";Nb(U)&&x(6,B),U>65535&&(U-=65536,re+=String.fromCharCode(U>>>10|55296),U=56320|U&1023),G=re+String.fromCharCode(U)}}if(G){S(),d=v(),a=P-1,f+=P-k+1,i.push(G);const U=v();U.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,G,{start:d,end:U},e.slice(k-1,P)),d=U}else D=e.slice(k-1,P),u+=D,f+=D.length,a=P-1}else m===10&&(h++,s++,f=0),Number.isNaN(m)?S():(u+=String.fromCharCode(m),f++);return i.join("");function v(){return{line:h,column:f,offset:a+((l?l.offset:0)||0)}}function x(b,k){let _;n.warning&&(_=v(),_.column+=k,_.offset+=k,n.warning.call(n.warningContext||void 0,Ab[b],_,b))}function S(){u&&(i.push(u),n.text&&n.text.call(n.textContext||void 0,u,{start:d,end:v()}),u="")}}function Rb(e){return e>=55296&&e<=57343||e>1114111}function Nb(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const Ob=/["&'<>`]/g,Lb=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Db=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Vb=/[|\\{}()[\]^$+*?.]/g,df=new WeakMap;function Mb(e,t){if(e=e.replace(t.subset?Fb(t.subset):Ob,r),t.subset||t.escapeOnly)return e;return e.replace(Lb,n).replace(Db,r);function n(i,a,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(a+2),t)}function r(i,a,s){return t.format(i.charCodeAt(0),s.charCodeAt(a+1),t)}}function Fb(e){let t=df.get(e);return t||(t=jb(e),df.set(e,t)),t}function jb(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Vb,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function Bb(e){return"&#x"+e.toString(16).toUpperCase()+";"}function zb(e,t){return Mb(e,Object.assign({format:Bb},t))}function Ln(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?mf(e.position):"start"in e||"end"in e?mf(e):"line"in e||"column"in e?Mu(e):""}function Mu(e){return gf(e&&e.line)+":"+gf(e&&e.column)}function mf(e){return Mu(e&&e.start)+"-"+Mu(e&&e.end)}function gf(e){return e&&typeof e=="number"?e:1}class nt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Ln(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nt.prototype.file="";nt.prototype.name="";nt.prototype.reason="";nt.prototype.message="";nt.prototype.stack="";nt.prototype.column=void 0;nt.prototype.line=void 0;nt.prototype.ancestors=void 0;nt.prototype.cause=void 0;nt.prototype.fatal=void 0;nt.prototype.place=void 0;nt.prototype.ruleId=void 0;nt.prototype.source=void 0;const _d=" ";function $b(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:f,mdxJsxFlowTagExpressionAttribute:d,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:s,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:f,mdxJsxTextTagExpressionAttribute:d,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:s},exit:{mdxJsxFlowTagClosingMarker:u,mdxJsxFlowTagNamePrimary:l,mdxJsxFlowTagNameMember:c,mdxJsxFlowTagNameLocal:h,mdxJsxFlowTagExpressionAttribute:m,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:v,mdxJsxFlowTagAttributeNameLocal:x,mdxJsxFlowTagAttributeValueLiteral:S,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:b,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:k,mdxJsxFlowTag:_,mdxJsxTextTagClosingMarker:u,mdxJsxTextTagNamePrimary:l,mdxJsxTextTagNameMember:c,mdxJsxTextTagNameLocal:h,mdxJsxTextTagExpressionAttribute:m,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:v,mdxJsxTextTagAttributeNameLocal:x,mdxJsxTextTagAttributeValueLiteral:S,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:b,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:k,mdxJsxTextTag:_}};function e(){this.buffer()}function t(E){return{line:E.line,column:E.column,offset:E.offset}}function n(E){this.config.enter.data.call(this,E),this.config.exit.data.call(this,E)}function r(E){const D={name:void 0,attributes:[],close:!1,selfClosing:!1,start:E.start,end:E.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=D,this.buffer()}function i(E){if(this.data.mdxJsxTagStack.length===0)throw new nt("Unexpected closing slash `/` in tag, expected an open tag first",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function a(E){if(this.data.mdxJsxTag.close)throw new nt("Unexpected attribute in closing tag, expected the end of the tag",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-attribute")}function s(E){if(this.data.mdxJsxTag.close)throw new nt("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function u(){const E=this.data.mdxJsxTag;E.close=!0}function l(E){const D=this.data.mdxJsxTag;D.name=this.sliceSerialize(E)}function c(E){const D=this.data.mdxJsxTag;D.name+="."+this.sliceSerialize(E)}function h(E){const D=this.data.mdxJsxTag;D.name+=":"+this.sliceSerialize(E)}function f(E){const D=this.data.mdxJsxTag;a.call(this,E),D.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(E.start),end:void 0}})}function d(E){const D=this.data.mdxJsxTag;a.call(this,E),D.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(E.start),end:void 0}}),this.buffer()}function m(E){const D=this.data.mdxJsxTag,j=D.attributes[D.attributes.length-1];j.type;const N=E.estree;j.value=this.resume(),j.position,j.position.end=t(E.end),N&&(j.data={estree:N})}function v(E){const D=this.data.mdxJsxTag,j=D.attributes[D.attributes.length-1];j.type,j.name=this.sliceSerialize(E),j.position,j.position.end=t(E.end)}function x(E){const D=this.data.mdxJsxTag,j=D.attributes[D.attributes.length-1];j.type,j.name+=":"+this.sliceSerialize(E),j.position,j.position.end=t(E.end)}function S(E){const D=this.data.mdxJsxTag,j=D.attributes[D.attributes.length-1];j.value=Pb(this.resume(),{nonTerminated:!1}),j.position,j.position.end=t(E.end)}function b(E){const D=this.data.mdxJsxTag,j=D.attributes[D.attributes.length-1];j.type;const N={type:"mdxJsxAttributeValueExpression",value:this.resume()},B=E.estree;B&&(N.data={estree:B}),j.value=N,j.position,j.position.end=t(E.end)}function k(){const E=this.data.mdxJsxTag;E.selfClosing=!0}function _(E){const D=this.data.mdxJsxTag,j=this.data.mdxJsxTagStack,N=j[j.length-1];if(D.close&&N.name!==D.name)throw new nt("Unexpected closing tag `"+g(D)+"`, expected corresponding closing tag for `"+g(N)+"` ("+Ln(N)+")",{start:E.start,end:E.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),D.close?j.pop():this.enter({type:E.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:D.name||null,attributes:D.attributes,children:[]},E,P),D.selfClosing||D.close?this.exit(E,w):j.push(D)}function P(E,D){const j=this.data.mdxJsxTagStack,N=j[j.length-1],B=E?" before the end of `"+E.type+"`":"",G=E?{start:E.start,end:E.end}:void 0;throw new nt("Expected a closing tag for `"+g(N)+"` ("+Ln({start:D.start,end:D.end})+")"+B,G,"mdast-util-mdx-jsx:end-tag-mismatch")}function w(E,D){const j=this.data.mdxJsxTag;throw new nt("Expected the closing tag `"+g(j)+"` either after the end of `"+D.type+"` ("+Ln(D.end)+") or another opening tag after the start of `"+D.type+"` ("+Ln(D.start)+")",{start:E.start,end:E.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function g(E){return"<"+(E.close?"/":"")+(E.name||"")+">"}}function Ub(e){const t=e||{},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||Number.POSITIVE_INFINITY,s=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return u.peek=Wb,{handlers:{mdxJsxFlowElement:u,mdxJsxTextElement:u},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function u(l,c,h,f){const d=l.type==="mdxJsxFlowElement",m=l.name?!l.children||l.children.length===0:!1,v=Id(h),x=Td(v),S=h.createTracker(f),b=h.createTracker(f),k=[],_=(d?x:"")+"<"+(l.name||""),P=h.enter(l.type);if(S.move(_),b.move(_),l.attributes&&l.attributes.length>0){if(!l.name)throw new Error("Cannot serialize fragment w/ attributes");let j=-1;for(;++j<l.attributes.length;){const N=l.attributes[j];let B;if(N.type==="mdxJsxExpressionAttribute")B="{"+(N.value||"")+"}";else{if(!N.name)throw new Error("Cannot serialize attribute w/o name");const G=N.value,U=N.name;let re="";if(G!=null)if(typeof G=="object")re="{"+(G.value||"")+"}";else{const ee=r&&os(G,n)>os(G,s)?s:n;re=ee+zb(G,{subset:[ee]})+ee}B=U+(re?"=":"")+re}k.push(B)}}let w=!1;const g=k.join(" ");d&&(/\r?\n|\r/.test(g)||S.current().now.column+g.length+(m?i?2:3:1)>a)&&(w=!0);let E=S,D=_;if(w){E=b;let j=-1;for(;++j<k.length;)k[j]=x+_d+k[j];D+=E.move(`
3
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function Mu(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Ms=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,a;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var u=Vu(s),l=u.next();!l.done;l=u.next()){var c=l.value;c.remove(this)}}catch(x){t={error:x}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else s.remove(this);var h=this.initialTeardown;if(_n(h))try{h()}catch(x){a=x instanceof Lo?x.errors:[x]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var d=Vu(f),m=d.next();!m.done;m=d.next()){var v=m.value;try{af(v)}catch(x){a=a??[],x instanceof Lo?a=Ct(Ct([],ht(a)),ht(x.errors)):a.push(x)}}}catch(x){r={error:x}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}if(a)throw new Lo(a)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)af(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Mu(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Mu(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),od=Ms.EMPTY;function ud(e){return e instanceof Ms||e&&"closed"in e&&_n(e.remove)&&_n(e.add)&&_n(e.unsubscribe)}function af(e){_n(e)?e():e.unsubscribe()}var Z0={Promise:void 0},ey={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ct([e,t],ht(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function ty(e){ey.setTimeout(function(){throw e})}function sf(){}function Ja(e){e()}var Pl=(function(e){kr(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ud(n)&&n.add(r)):r.destination=iy,r}return t.create=function(n,r,i){return new Fu(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(Ms),ny=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){wa(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){wa(r)}else wa(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){wa(n)}},e})(),Fu=(function(e){kr(t,e);function t(n,r,i){var a=e.call(this)||this,s;return _n(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,a.destination=new ny(s),a}return t})(Pl);function wa(e){ty(e)}function ry(e){throw e}var iy={closed:!0,next:sf,error:ry,complete:sf},ay=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function sy(e){return e}function oy(e){return e.length===0?sy:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var of=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,a=ly(t)?t:new Fu(t,n,r);return Ja(function(){var s=i,u=s.operator,l=s.source;a.add(u?u.call(a,l):l?i._subscribe(a):i._trySubscribe(a))}),a},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=uf(n),new n(function(i,a){var s=new Fu({next:function(u){try{t(u)}catch(l){a(l),s.unsubscribe()}},error:a,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[ay]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oy(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=uf(t),new t(function(r,i){var a;n.subscribe(function(s){return a=s},function(s){return i(s)},function(){return r(a)})})},e.create=function(t){return new e(t)},e})();function uf(e){var t;return(t=e??Z0.Promise)!==null&&t!==void 0?t:Promise}function uy(e){return e&&_n(e.next)&&_n(e.error)&&_n(e.complete)}function ly(e){return e&&e instanceof Pl||uy(e)&&ud(e)}function cy(e){return _n(e==null?void 0:e.lift)}function ld(e){return function(t){if(cy(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function cd(e,t,n,r,i){return new fy(e,t,n,r,i)}var fy=(function(e){kr(t,e);function t(n,r,i,a,s,u){var l=e.call(this,n)||this;return l.onFinalize=s,l.shouldUnsubscribe=u,l._next=r?function(c){try{r(c)}catch(h){n.error(h)}}:e.prototype._next,l._error=a?function(c){try{a(c)}catch(h){n.error(h)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(Pl),hy=sd(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),fd=(function(e){kr(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new lf(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new hy},t.prototype.next=function(n){var r=this;Ja(function(){var i,a;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=Vu(r.currentObservers),u=s.next();!u.done;u=s.next()){var l=u.value;l.next(n)}}catch(c){i={error:c}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Ja(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Ja(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,a=i.hasError,s=i.isStopped,u=i.observers;return a||s?od:(this.currentObservers=null,u.push(n),new Ms(function(){r.currentObservers=null,Mu(u,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,a=r.thrownError,s=r.isStopped;i?n.error(a):s&&n.complete()},t.prototype.asObservable=function(){var n=new of;return n.source=this,n},t.create=function(n,r){return new lf(n,r)},t})(of),lf=(function(e){kr(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:od},t})(fd);function py(e,t){return ld(function(n,r){var i=0;n.subscribe(cd(r,function(a){r.next(e.call(t,a,i++))}))})}function dy(e,t){return ld(function(n,r){var i=0;n.subscribe(cd(r,function(a){return e.call(t,a,i++)&&r.next(a)}))})}const hd=new fd,my=(e,t)=>({name:e.split("/").pop()||e,type:Se.FileFolderType.WEBFORM,path:e,date:new Date().toISOString(),content:t,view:{panel:{isOpen:!1,type:"",current:""}},flags:{}});function pd(e,t){switch(t.type){case"SET_TABS":return{...e,tabs:t.payload};case"SET_I18N_CURRENT":return{...e,i18nCurrent:t.payload};case"SET_TAB_CONTENT":{const{path:n,content:r}=t.payload;return e.tabs.find(a=>a.path===n)?{...e,tabs:e.tabs.map(a=>a.path===n?{...a,content:r}:a)}:{...e,tabs:[...e.tabs,my(n,r)]}}case"CREATE_MODAL":return{...e,modals:{...e.modals,list:[...e.modals.list,t.payload]}};case"REMOVE_MODAL":return{...e,modals:{...e.modals,list:e.modals.list.filter(n=>n.id!==t.payload)}};case"CLOSE_MODAL":{const{id:n,reason:r}=t.payload;let i;if(r)if(e.modals.list.find(s=>s.id===n))i={...e,modals:{...e.modals,list:e.modals.list.map(s=>s.id===n?{...s,closeReason:r,isOpen:!1}:s)}};else return e;else i={...e,modals:{...e.modals,list:e.modals.list.filter(a=>a.id!==n)}};return hd.next(i.modals),i}case"EDIT_MODAL":{const{id:n,...r}=t.payload;return e.modals.list.find(a=>a.id===n)?{...e,modals:{...e.modals,list:e.modals.list.map(a=>a.id===n?{...a,...r}:a)}}:e}default:return e}}const Sa={keys:{},userLang:{primary:"",supported:[]}},Fs=M.createContext(null),dd=(e,t)=>({tabs:e,i18nCurrent:t,modals:{list:[]}}),md=({children:e,tabs:t=[],i18nCurrent:n="",initialI18nFile:r})=>{const[i,a]=M.useReducer(pd,dd(t,n));M.useEffect(()=>{xe.isEqual(i.tabs,t)||a({type:"SET_TABS",payload:t})},[t,i.tabs]),M.useEffect(()=>{i.i18nCurrent!==n&&a({type:"SET_I18N_CURRENT",payload:n})},[n,i.i18nCurrent]);const s=M.useMemo(()=>({state:i,dispatch:a,initialI18nFile:r}),[i,r]);return T.jsx(Fs.Provider,{value:s,children:e})};function gd(e,t,n){const r=M.useContext(Fs);if(!r)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:i,dispatch:a,initialI18nFile:s}=r;return{getTabs:M.useCallback(()=>i.tabs,[i.tabs]),getI18nCurrent:M.useCallback(()=>i.i18nCurrent,[i.i18nCurrent]),fetchI18nFile:M.useCallback(()=>{if(!s)return Promise.resolve(Sa);if(typeof s!="string")return Promise.resolve(s);try{const u=JSON.parse(s);return Promise.resolve({keys:(u==null?void 0:u.keys)??Sa.keys,userLang:(u==null?void 0:u.userLang)??Sa.userLang})}catch{return Promise.resolve(Sa)}},[s]),getWebformTabs:M.useCallback(()=>i.tabs.filter(u=>u.type===Se.FileFolderType.WEBFORM),[i.tabs]),getActiveTabPath:M.useCallback(()=>{var u;return((u=i.tabs[0])==null?void 0:u.path)??""},[i.tabs]),getFlagsByPath:M.useCallback(u=>{var l;return(l=i.tabs.find(c=>c.path===u))==null?void 0:l.flags},[i.tabs]),getSupportedLanguages:M.useCallback(async u=>n&&n.length?n:Se.getSupportedLanguages(u),[n]),getUserComponents:M.useCallback(()=>e??{},[e]),buildResolver:t,actions:{openModal:M.useCallback(async u=>{const{type:l=Se.ModalType.ALERT}=u,c=Il.generate();return a({type:"CREATE_MODAL",payload:{id:c,type:l,isOpen:!0,...u}}),l===Se.ModalType.CONFIRM?new Promise(h=>{const f=hd.pipe(dy(d=>{const m=d.list.find(v=>v.id===c);return m!==void 0&&!m.isOpen})).subscribe(d=>{var v;const m=d.list.find(x=>x.id===c);if(m){const x=m.closeReason===Se.ModalCloseReason.CONFIRMED,S=xe.entries(((v=m.views)==null?void 0:v.toggles)||{}).reduce((y,k)=>({...y,[k[0]]:k[1].value}),{});a({type:"REMOVE_MODAL",payload:c}),f.unsubscribe(),h({confirmed:x,options:S})}})}):{confirmed:!1}},[a]),setTabs:M.useCallback(u=>{a({type:"SET_TABS",payload:u})},[a]),setI18nCurrent:M.useCallback(u=>{a({type:"SET_I18N_CURRENT",payload:u})},[a]),setTabContent:M.useCallback(async u=>(a({type:"SET_TAB_CONTENT",payload:u}),u),[a])}}}function vd(){const e=M.useContext(Fs);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:n}=e;return{modals:t.modals.list,closeModal:M.useCallback(r=>{n({type:"CLOSE_MODAL",payload:r})},[n]),editModal:M.useCallback(r=>{n({type:"EDIT_MODAL",payload:r})},[n]),removeModal:M.useCallback(r=>{n({type:"REMOVE_MODAL",payload:r})},[n])}}const xd=M.createContext(void 0),Do={i18n:{keys:{},userLang:{primary:"",supported:[]}},i18nFileFetched:!1},yd={tr_key:"__t"},{tr_key:Ca}=yd,gy={buildPathFullObject:e=>`${Ca}.${e}`,getKeyValueFromCustom:(e,t)=>xe.get(e,`${Ca}.${t}.key`),getDefaultValueFromCustom:(e,t)=>xe.get(e,`${Ca}.${t}.default`),getFullObject:(e,t)=>xe.get(e,`${Ca}.${t}`)},bd=M.memo(({children:e,isI18nEnabled:t,onI18nChange:n})=>{const r=nr(),[i,a]=M.useState(Do),s=M.useRef(!1),{i18n:u}=i,l=(y,k,_)=>{let P=1,w=y;for(;u.keys[w];)w=`${y}-${P}`,P++;const g={default:_};k.forEach(({lang:D,value:F})=>{D&&xe.set(g,D,F)});const E={keys:{...u.keys,[y]:g},userLang:u.userLang};a(D=>({...D,i18n:E}))},c=()=>{const y=new window.Event("i18n:ready");window.dispatchEvent(y)},h=M.useCallback(xe.debounce((y,k,_,P=!1)=>{a(w=>{const{keys:g,userLang:E}=w.i18n;if(g[y]&&k){const D={...g,[y]:{...g[y],[k]:_}};return s.current=P,{...w,i18n:{keys:D,userLang:E}}}return w})},300),[]),f=M.useCallback(xe.debounce((y,k)=>{const{keys:_,userLang:P}=xe.cloneDeep(u);_[y]&&k&&xe.set(_,`${y}.default`,k),a(w=>({...w,i18n:{keys:_,userLang:P}}))},300),[]),d=y=>{y&&a(k=>({...k,i18n:{...k.i18n,userLang:y}}))},m=M.useCallback((y,k)=>{const{keys:_,userLang:P}=u,g={keys:Object.entries(_).reduce((E,[D,F])=>{const R={...F};return y.isocode in R&&(R[k.isocode]=R[y.isocode],delete R[y.isocode]),E[D]=R,E},{}),userLang:P};a(E=>({...E,i18n:g}))},[u]),v=M.useCallback(y=>{const{keys:k,userLang:_}=u,w={keys:Object.entries(k).reduce((g,[E,D])=>{const F={...D};return y.isocode in F&&delete F[y.isocode],g[E]=F,g},{}),userLang:_};a(g=>({...g,i18n:w}))},[u]),x=y=>{const k=[];return Object.keys(u.keys).forEach(P=>{const w=xe.get(u,`keys.${P}.${y}`,xe.get(u,`keys.${P}.default`,""));k.push({key:P,value:w})}),k},S=M.useCallback(xe.debounce(y=>{a(k=>{const{keys:_,userLang:P}=k.i18n,w={..._};return delete w[y],{...k,i18n:{userLang:P,keys:w}}})},300),[]);return M.useEffect(()=>{(async()=>{if(!t){a(k=>({...k,i18nFileFetched:!0})),c();return}try{const k=await r.fetchI18nFile();a(_=>({..._,i18n:{keys:xe.get(k,"keys",Do.i18n.keys),userLang:xe.get(k,"userLang",Do.i18n.userLang)}}))}catch{}finally{a(k=>({...k,i18nFileFetched:!0})),c()}})()},[t,r.fetchI18nFile]),M.useEffect(()=>{const y=Se.i18nSubject.pipe(py(({action:k,payload:_})=>{if(k==="set_content"){const P={...u,keys:{...u.keys,..._}};a(w=>({...w,i18n:P}))}if(k==="set_locale_state"){const P={...u,..._};a(w=>({...w,i18n:P}))}})).subscribe();return()=>y.unsubscribe()},[u]),M.useEffect(()=>{i.i18nFileFetched&&(n==null||n(i.i18n))},[i]),T.jsx(xd.Provider,{value:{i18n:i.i18n,createKey:l,updateKey:h,removeKey:S,editLanguageKeys:m,updateKeyDefault:f,deleteLanguageKeys:v,getI18nAsKeyValues:x,setUserLangSettings:d,shouldRecompute:s},children:e})});function rr(){const e=M.useContext(xd);if(e===void 0)throw new Error("useI18n must be used within a I18nProviderContext");return e}const wd=M.createContext(void 0),Sd=M.createContext(void 0),vy=e=>Se.getSupportedLanguages(e),Cd=({children:e,getSupportedLanguages:t=vy,i18nCurrent:n="",activeTabPath:r="",flagsForActiveTab:i})=>{const{isInsideStudio:a}=Se.useStudioContext();return a?T.jsx(yy,{getSupportedLanguages:t,i18nCurrent:n,activeTabPath:r,flagsForActiveTab:i,children:e}):T.jsx(xy,{getSupportedLanguages:t,children:e})},xy=({children:e,getSupportedLanguages:t})=>{const{state:{currentLang:n},actions:r}=Se.useStateObject({currentLang:""}),{actions:i}=Se.useDsRendererAdapter(`${Se.QODLY_NAMESPACE}:${Se.USER_LANGUAGE_DATASOURCE_ID}`),{i18n:{userLang:{primary:a,supported:s}}}=rr(),{isInsideStudio:u}=Se.useStudioContext(),[l,c]=M.useState([]),{loaded:h}=Se.useDsChangeRenderer({datasourceId:`${Se.QODLY_NAMESPACE}:${Se.USER_LANGUAGE_DATASOURCE_ID}`,isDsBuild:!0,onChange:x=>{if(!x)return;const{selected:S}=x;S&&S.isocode&&(r.setCurrentLang(S.isocode),d(S))}}),f=(x,S)=>{i.setProperty(x,S)},d=x=>{localStorage.setItem("i18n.selected",JSON.stringify(x))},m=()=>{const x=localStorage.getItem("i18n.selected");return x?JSON.parse(x):null},v=()=>navigator.language;return M.useEffect(()=>{t(u).then(x=>{c(x)})},[t,u]),M.useEffect(()=>{if(h&&s){const x=s.map(({isocode:S})=>l.find(y=>y.isocode===S)).filter(Boolean);f("supported",x)}},[s,h]),M.useEffect(()=>{if(h){const x=m();if(x){f("selected",x);return}const S=v();if(S){const y=s.find(k=>k.isocode===S);if(y){f("selected",y);return}}if(a){const y=s.find(k=>k.isocode===a);y&&f("selected",y)}}},[h,s,a]),T.jsx(Sd.Provider,{value:{selected:n,supported:l},children:e})},yy=M.memo(({children:e,getSupportedLanguages:t,i18nCurrent:n,flagsForActiveTab:r})=>{const{state:{supported:i},actions:a}=Se.useStateObject({supported:[]}),{i18n:{userLang:{primary:s,supported:u}}}=rr(),{isInsideStudio:l}=Se.useStudioContext(),c=n&&u.find(d=>d.isocode===n)?n:"",[h,f]=M.useState(c);return M.useEffect(()=>{r!=null&&r.enabled&&f("")},[r==null?void 0:r.enabled]),M.useEffect(()=>{f(c)},[c]),Se.useDsChangeRenderer({datasourceId:`${Se.QODLY_NAMESPACE}:${Se.USER_LANGUAGE_DATASOURCE_ID}`,isDsBuild:r==null?void 0:r.enabled,onChange:d=>{if(!d)return;const{selected:m}=d;m&&m.isocode&&(f(m.isocode),localStorage.setItem("i18n.selected",m.isocode))}}),M.useEffect(()=>{t(l).then(d=>{a.setSupported(d)})},[t,l,a]),T.jsx(wd.Provider,{value:{primary:s,selected:h||c,supported:i,userLangagues:u},children:e})});function kd(){const{isInsideStudio:e}=Se.useStudioContext(),t=M.useContext(wd),n=M.useContext(Sd),r=e?t:n;if(r===void 0)throw new Error("useLocalization must be used within a LocalizationContext");return r}const Ed=M.createContext(void 0),_d=({children:e})=>{const{state:{allSupportedLanguages:t,selectedLanguage:n,languageKeys:r,addFirstLanguage:i},actions:a}=Se.useStateObject({allSupportedLanguages:[],selectedLanguage:void 0,languageKeys:[],addFirstLanguage:!1}),{supported:s}=kd(),{i18n:u,setUserLangSettings:l,updateKey:c,removeKey:h,createKey:f}=rr(),d=(v,x)=>Object.keys(x).reduce((k,_)=>{if(x[_]){const P=x[_];if(Object.hasOwn(P,v)){const w=x[_][v];k.push({key:_,value:w,isDefault:!1})}else{const w=x[_].default;k.push({key:_,value:w,isDefault:!0})}}return k},[]),m=(v,x)=>{if(n){const{isocode:S}=n;c(v,S,x,!0);const y=structuredClone(u.keys),k=xe.set({...y},`${v}.${S}`,x),_=d(S,k);a.setLanguageKeys(_)}};return M.useEffect(()=>{a.setAllSupportedLanguages(s||[])},[s]),M.useEffect(()=>{if(n){const{isocode:v}=n,x=d(v,u.keys);a.setLanguageKeys(x)}},[u,n]),T.jsx(Ed.Provider,{value:{userLanguages:u.userLang,languageKeys:r,selectedLanguage:n,allSupportedLanguages:t,addFirstLanguage:i,isPrimary:u.userLang.primary===(n==null?void 0:n.isocode),removeKey:h,addNewKey:f,setAddFirstLanguage:a.setAddFirstLanguage,setUserLangSettings:l,setSelectedLanguage:v=>a.setSelectedLanguage(v),setLanguageKeyValue:m},children:e})},ir=()=>{const e=M.useContext(Ed);if(e===void 0)throw new Error("useLocalizationEditor must be used within a LocalizationEditorProvider");return e},St=()=>document.querySelector(`.${Tl.LOCALIZATION_EDITOR_SCOPE_CLASS}`)||document.body,by=({container:e,...t})=>T.jsx(Se.Portal,{...t,container:e||St()}),wy=({keyName:e,value:t,isDefault:n})=>{const{state:{newValue:r,onEditValue:i},actions:a}=Se.useStateObject({newValue:t,onEditValue:!1}),{setLanguageKeyValue:s,removeKey:u}=ir(),l=nr(),[c,h]=M.useState(null),f=()=>{i&&(s(e,r),a.setOnEditValue(!1),h(null))},d=()=>{i&&(a.setNewValue(t),a.setOnEditValue(!1),h(null))},m=async()=>{const{confirmed:v}=await l.actions.openModal({title:"Delete Key",type:Se.ModalType.CONFIRM,color:Se.ModalColor.DANGER,message:"Deleting this key will remove all translations associated with it across all locales. Are you sure you want to delete it ?",icon:"FdWarningDanger"});v&&u(e)};return M.useEffect(()=>{a.setNewValue(t)},[t]),T.jsxs("tr",{"data-cy":`shared-labels-row-${e}`,className:" text-gray-50 odd:bg-grey-700 even:bg-grey-600",children:[T.jsx("td",{className:"px-2 text-xs font-normal h-10",children:e}),T.jsxs("td",{className:"p-2 whitespace-nowrap text-xs font-normal h-10",children:[i?T.jsx("textarea",{"data-cy":`shared-labels-row-${e}-input`,className:ft("min-w-[80%] bg-grey-300 h-6 p-1 p rounded focus-within:outline-none",{"ring-1 ring-red-400":c,"focus-within:ring-1 focus-within:ring-primary-dark":!c}),value:r,onChange:v=>{a.setNewValue(v.target.value),h(null)},onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),f())}}):T.jsx("span",{className:ft("text-wrap",{"italic text-gray-400":n}),onDoubleClick:()=>{a.setOnEditValue(!0)},children:t}),c&&T.jsx("div",{className:"text-red-400 left-2",children:c==null?void 0:c.message})]}),T.jsx("td",{className:"flex items-center px-2 text-xs font-normal float-right h-10",children:i?T.jsxs(T.Fragment,{children:[T.jsx(Se.Tooltip,{label:"Confirm",container:St(),children:T.jsx("button",{"data-cy":`shared-labels-row-${e}-confirm-button`,className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:f,children:T.jsx(st.FdCheckCircle,{className:"w-4 h-4"})})}),T.jsx(Se.Tooltip,{label:"Cancel",container:St(),children:T.jsx("button",{"data-cy":`shared-labels-row-${e}-cancel-button`,className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:d,children:T.jsx(st.FdClose,{className:"w-4 h-4"})})})]}):T.jsxs(T.Fragment,{children:[T.jsx(Se.Tooltip,{label:"Edit",container:St(),children:T.jsx("button",{"data-cy":`shared-labels-row-${e}-edit-button`,className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:()=>{a.setOnEditValue(!0)},children:T.jsx(st.FdPen,{className:"w-4 h-4"})})}),T.jsx(Se.Tooltip,{label:"Delete",container:St(),children:T.jsx("button",{"data-cy":`shared-labels-row-${e}-delete-button`,className:"cursor-pointerrounded p-1 hover:bg-primary-hover focus:outline-none",onClick:m,children:T.jsx(st.FdTrash,{className:"w-4 h-4"})})})]})})]})},Sy=({onCancel:e,onConfirm:t,error:n,setError:r})=>{const{state:i,actions:a}=Se.useStateObject({key:"",value:""}),s=()=>{t(i.key,i.value)},u=()=>{r(null),e()};return T.jsxs("tr",{"data-cy":"shared-labels-new-row",className:" text-gray-50 odd:bg-grey-700 even:bg-grey-600",children:[T.jsx("td",{className:"px-2 text-xs font-normal h-10 min-h-4",children:T.jsxs("div",{className:ft("flex flex-col items-start h-full relative",{"pt-2":n,"justify-center":!n}),children:[T.jsx("input",{"data-cy":"shared-labels-new-row-key-input",className:ft("min-w-[80%] bg-grey-300 h-6 p-1 p rounded focus-within:outline-none",{"ring-1 ring-red-400":n,"focus-within:ring-1 focus-within:ring-primary-dark":!n}),type:"text",value:i.key,onChange:l=>{r(null),a.setKey(l.target.value)},autoFocus:!0,onKeyUp:l=>{l.key==="Escape"&&(r(null),u())}}),n&&T.jsx("div",{className:"text-red-400 left-2",children:n==null?void 0:n.message})]})}),T.jsx("td",{className:"px-2 whitespace-nowrap text-xs font-normal h-10",children:T.jsx("div",{className:ft("flex flex-col items-start h-full relative",{"pt-2":n,"justify-center":!n}),children:T.jsx("input",{"data-cy":"shared-labels-new-row-value-input",className:"min-w-[80%] bg-grey-300 h-6 p-1 p rounded focus-within:outline-none focus-within:ring-1 focus-within:ring-primary-dark",type:"text",value:i.value,onChange:l=>a.setValue(l.target.value),onKeyUp:l=>{l.key==="Enter"?s():l.key==="Escape"&&u()}})})}),T.jsxs("td",{className:"flex items-center px-2 text-xs font-normal float-right h-10",children:[T.jsx(Se.Tooltip,{label:"Confirm",container:St(),children:T.jsx("button",{"data-cy":"shared-labels-new-row-confirm-button",className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:s,children:T.jsx(st.FdCheckCircle,{className:"w-4 h-4"})})}),T.jsx(Se.Tooltip,{label:"Cancel",container:St(),children:T.jsx("button",{"data-cy":"shared-labels-new-row-cancel-button",className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:u,children:T.jsx(st.FdClose,{className:"w-4 h-4"})})})]})]})},Cy=()=>{const{languageKeys:e,isPrimary:t,selectedLanguage:n,userLanguages:{supported:r},addNewKey:i,setUserLangSettings:a}=ir(),{state:s,actions:u}=Se.useStateObject({search:"",switch:t,keys:[],addNewKey:!1}),[l,c]=M.useState(null),h=G0(e),f=!!n&&!h,d=!!n,m=e.filter(_=>_.key.match(new RegExp(xe.escapeRegExp(s.search),"gi"))),v=m.length===0,x=()=>{if(n){const{isocode:_}=n;a({primary:_,supported:r})}},S=()=>{u.setAddNewKey(!0)},y=(_,P)=>{const w=m.find(g=>g.key===_);if(n){const{isocode:g}=n;if(_){if(!/^[\w\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF-]+$/i.test(_)||!/^[a-zA-Z\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FAF]/.test(_)){c({message:"Invalid key name"});return}else if(w){c({message:"Key name already exists"});return}i(_,[{lang:g,value:P}],P)}u.setAddNewKey(!1)}},k=()=>{u.setAddNewKey(!1)};return M.useEffect(()=>{u.setSwitch(t)},[t]),T.jsx("div",{className:ft("flex w-full bg-grey-800 border-l border-black",{"justify-center items-center":!1}),children:T.jsxs("div",{className:"flex flex-col w-full py-3 px-3 min-h-0",children:[T.jsxs("div",{className:"flex flex-col space-y-3 justify-between w-full",children:[T.jsxs("div",{className:ft("flex items-center w-full justify-between",{hidden:!d}),children:[T.jsxs("div",{className:"flex space-x-2 items-center justify-center",children:[T.jsx("span",{className:"text-[12px] text-gray-50",children:"Shared Labels"}),T.jsx(Se.Tip,{tipKey:"editors:i18n:label",alwaysOn:!0})]}),T.jsxs("div",{className:"flex space-x-2 justify-center items-center",children:[T.jsx(Se.ControlledSwitch,{onChange:_=>{t||(u.setSwitch(_),x())},value:s.switch,className:"focus:outline-none"}),T.jsx("span",{className:"text-xs text-gray-50",children:"Primary Locale"})]})]}),T.jsx("div",{className:ft("w-60",{invisible:!f}),children:T.jsx(Se.SearchInput,{containerClassName:"text-grey-50",value:s.search,onChange:_=>u.setSearch(_),delay:300})})]}),h?T.jsx(X0,{}):T.jsxs("div",{className:"w-full flex-1 min-h-0 overflow-y-auto",children:[T.jsxs("table",{"data-cy":"shared-labels-table",className:"w-full text-sm text-left rtl:text-right text-grey-50 table-fixed",children:[T.jsx("thead",{className:"text-xs text-grey-50",children:T.jsxs("tr",{children:[T.jsx("th",{scope:"col",className:"px-2 py-3 text-xs font-normal",children:"Key"}),T.jsx("th",{scope:"col",className:"px-2 py-3 text-xs font-normal",children:"Value"}),T.jsx("th",{scope:"col",className:"px-2 py-3 text-xs font-normal float-right",children:T.jsx(Se.Tooltip,{label:"Add a key",container:St(),children:T.jsx("button",{className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:S,children:T.jsx(st.FdPlus,{className:"w-4 h-4"})})})})]})}),T.jsxs("tbody",{className:"border-t-[1px] border-grey-50",children:[m.map((_,P)=>T.jsx(wy,{keyName:_.key,value:_.value,isDefault:_.isDefault},`${n==null?void 0:n.isocode}/${P}`)),s.addNewKey&&T.jsx(Sy,{onConfirm:y,onCancel:k,setError:c,error:l}),v&&T.jsx("span",{})]})]}),v&&T.jsxs("div",{className:"flex flex-col justify-center items-center mt-16 ml-2 text-xs space-y-3 text-green-50",children:[T.jsx(st.FdInfoBold,{className:"h-9 w-9 text-grey-200"}),T.jsx("div",{className:"text-xs text-grey-200",children:"This key doesn't exist."})]})]})]})})},$r=(e,t)=>t.find(n=>n.isocode===e);function ky(){return{enter:{mdxFlowExpression:_y,mdxTextExpression:Iy},exit:{mdxFlowExpression:cf,mdxFlowExpressionChunk:ff,mdxTextExpression:cf,mdxTextExpressionChunk:ff}}}function Ey(){return{handlers:{mdxFlowExpression:hf,mdxTextExpression:hf},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function _y(e){this.enter({type:"mdxFlowExpression",value:""},e),this.buffer()}function Iy(e){this.enter({type:"mdxTextExpression",value:""},e),this.buffer()}function cf(e){const t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type==="mdxFlowExpression"||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function ff(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function hf(e,t,n){const r=e.value||"";return"{"+n.indentLines(r,function(a,s,u){return(s===0||u?"":" ")+a})+"}"}function us(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Ty=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],pf={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Id(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function Ay(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Py(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function df(e){return Py(e)||Id(e)}const mf=document.createElement("i");function _i(e){const t="&"+e+";";mf.innerHTML=t;const n=mf.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}const Ry=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Ny(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let a=0,s=-1,u="",l,c;n.position&&("start"in n.position||"indent"in n.position?(c=n.position.indent,l=n.position.start):l=n.position);let h=(l?l.line:0)||1,f=(l?l.column:0)||1,d=v(),m;for(a--;++a<=e.length;)if(m===10&&(f=(c?c[s]:0)||1),m=e.charCodeAt(a),m===38){const y=e.charCodeAt(a+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||r&&y===r){u+=String.fromCharCode(m),f++;continue}const k=a+1;let _=k,P=k,w;if(y===35){P=++_;const U=e.charCodeAt(P);U===88||U===120?(w="hexadecimal",P=++_):w="decimal"}else w="named";let g="",E="",D="";const F=w==="named"?df:w==="decimal"?Id:Ay;for(P--;++P<=e.length;){const U=e.charCodeAt(P);if(!F(U))break;D+=String.fromCharCode(U),w==="named"&&Ty.includes(D)&&(g=D,E=_i(D))}let R=e.charCodeAt(P)===59;if(R){P++;const U=w==="named"?_i(D):!1;U&&(g=D,E=U)}let B=1+P-k,G="";if(!(!R&&n.nonTerminated===!1))if(!D)w!=="named"&&x(4,B);else if(w==="named"){if(R&&!E)x(5,1);else if(g!==D&&(P=_+g.length,B=1+P-_,R=!1),!R){const U=g?1:3;if(n.attribute){const re=e.charCodeAt(P);re===61?(x(U,B),E=""):df(re)?E="":x(U,B)}else x(U,B)}G=E}else{R||x(2,B);let U=Number.parseInt(D,w==="hexadecimal"?16:10);if(Oy(U))x(7,B),G="�";else if(U in pf)x(6,B),G=pf[U];else{let re="";Ly(U)&&x(6,B),U>65535&&(U-=65536,re+=String.fromCharCode(U>>>10|55296),U=56320|U&1023),G=re+String.fromCharCode(U)}}if(G){S(),d=v(),a=P-1,f+=P-k+1,i.push(G);const U=v();U.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,G,{start:d,end:U},e.slice(k-1,P)),d=U}else D=e.slice(k-1,P),u+=D,f+=D.length,a=P-1}else m===10&&(h++,s++,f=0),Number.isNaN(m)?S():(u+=String.fromCharCode(m),f++);return i.join("");function v(){return{line:h,column:f,offset:a+((l?l.offset:0)||0)}}function x(y,k){let _;n.warning&&(_=v(),_.column+=k,_.offset+=k,n.warning.call(n.warningContext||void 0,Ry[y],_,y))}function S(){u&&(i.push(u),n.text&&n.text.call(n.textContext||void 0,u,{start:d,end:v()}),u="")}}function Oy(e){return e>=55296&&e<=57343||e>1114111}function Ly(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const Dy=/["&'<>`]/g,Vy=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,My=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Fy=/[|\\{}()[\]^$+*?.]/g,gf=new WeakMap;function jy(e,t){if(e=e.replace(t.subset?By(t.subset):Dy,r),t.subset||t.escapeOnly)return e;return e.replace(Vy,n).replace(My,r);function n(i,a,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(a+2),t)}function r(i,a,s){return t.format(i.charCodeAt(0),s.charCodeAt(a+1),t)}}function By(e){let t=gf.get(e);return t||(t=zy(e),gf.set(e,t)),t}function zy(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Fy,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function $y(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Uy(e,t){return jy(e,Object.assign({format:$y},t))}function Ln(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vf(e.position):"start"in e||"end"in e?vf(e):"line"in e||"column"in e?ju(e):""}function ju(e){return xf(e&&e.line)+":"+xf(e&&e.column)}function vf(e){return ju(e&&e.start)+"-"+ju(e&&e.end)}function xf(e){return e&&typeof e=="number"?e:1}class nt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Ln(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nt.prototype.file="";nt.prototype.name="";nt.prototype.reason="";nt.prototype.message="";nt.prototype.stack="";nt.prototype.column=void 0;nt.prototype.line=void 0;nt.prototype.ancestors=void 0;nt.prototype.cause=void 0;nt.prototype.fatal=void 0;nt.prototype.place=void 0;nt.prototype.ruleId=void 0;nt.prototype.source=void 0;const Td=" ";function Hy(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:f,mdxJsxFlowTagExpressionAttribute:d,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:s,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:f,mdxJsxTextTagExpressionAttribute:d,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:s},exit:{mdxJsxFlowTagClosingMarker:u,mdxJsxFlowTagNamePrimary:l,mdxJsxFlowTagNameMember:c,mdxJsxFlowTagNameLocal:h,mdxJsxFlowTagExpressionAttribute:m,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:v,mdxJsxFlowTagAttributeNameLocal:x,mdxJsxFlowTagAttributeValueLiteral:S,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:y,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:k,mdxJsxFlowTag:_,mdxJsxTextTagClosingMarker:u,mdxJsxTextTagNamePrimary:l,mdxJsxTextTagNameMember:c,mdxJsxTextTagNameLocal:h,mdxJsxTextTagExpressionAttribute:m,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:v,mdxJsxTextTagAttributeNameLocal:x,mdxJsxTextTagAttributeValueLiteral:S,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:y,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:k,mdxJsxTextTag:_}};function e(){this.buffer()}function t(E){return{line:E.line,column:E.column,offset:E.offset}}function n(E){this.config.enter.data.call(this,E),this.config.exit.data.call(this,E)}function r(E){const D={name:void 0,attributes:[],close:!1,selfClosing:!1,start:E.start,end:E.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=D,this.buffer()}function i(E){if(this.data.mdxJsxTagStack.length===0)throw new nt("Unexpected closing slash `/` in tag, expected an open tag first",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function a(E){if(this.data.mdxJsxTag.close)throw new nt("Unexpected attribute in closing tag, expected the end of the tag",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-attribute")}function s(E){if(this.data.mdxJsxTag.close)throw new nt("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:E.start,end:E.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function u(){const E=this.data.mdxJsxTag;E.close=!0}function l(E){const D=this.data.mdxJsxTag;D.name=this.sliceSerialize(E)}function c(E){const D=this.data.mdxJsxTag;D.name+="."+this.sliceSerialize(E)}function h(E){const D=this.data.mdxJsxTag;D.name+=":"+this.sliceSerialize(E)}function f(E){const D=this.data.mdxJsxTag;a.call(this,E),D.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:t(E.start),end:void 0}})}function d(E){const D=this.data.mdxJsxTag;a.call(this,E),D.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:t(E.start),end:void 0}}),this.buffer()}function m(E){const D=this.data.mdxJsxTag,F=D.attributes[D.attributes.length-1];F.type;const R=E.estree;F.value=this.resume(),F.position,F.position.end=t(E.end),R&&(F.data={estree:R})}function v(E){const D=this.data.mdxJsxTag,F=D.attributes[D.attributes.length-1];F.type,F.name=this.sliceSerialize(E),F.position,F.position.end=t(E.end)}function x(E){const D=this.data.mdxJsxTag,F=D.attributes[D.attributes.length-1];F.type,F.name+=":"+this.sliceSerialize(E),F.position,F.position.end=t(E.end)}function S(E){const D=this.data.mdxJsxTag,F=D.attributes[D.attributes.length-1];F.value=Ny(this.resume(),{nonTerminated:!1}),F.position,F.position.end=t(E.end)}function y(E){const D=this.data.mdxJsxTag,F=D.attributes[D.attributes.length-1];F.type;const R={type:"mdxJsxAttributeValueExpression",value:this.resume()},B=E.estree;B&&(R.data={estree:B}),F.value=R,F.position,F.position.end=t(E.end)}function k(){const E=this.data.mdxJsxTag;E.selfClosing=!0}function _(E){const D=this.data.mdxJsxTag,F=this.data.mdxJsxTagStack,R=F[F.length-1];if(D.close&&R.name!==D.name)throw new nt("Unexpected closing tag `"+g(D)+"`, expected corresponding closing tag for `"+g(R)+"` ("+Ln(R)+")",{start:E.start,end:E.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),D.close?F.pop():this.enter({type:E.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:D.name||null,attributes:D.attributes,children:[]},E,P),D.selfClosing||D.close?this.exit(E,w):F.push(D)}function P(E,D){const F=this.data.mdxJsxTagStack,R=F[F.length-1],B=E?" before the end of `"+E.type+"`":"",G=E?{start:E.start,end:E.end}:void 0;throw new nt("Expected a closing tag for `"+g(R)+"` ("+Ln({start:D.start,end:D.end})+")"+B,G,"mdast-util-mdx-jsx:end-tag-mismatch")}function w(E,D){const F=this.data.mdxJsxTag;throw new nt("Expected the closing tag `"+g(F)+"` either after the end of `"+D.type+"` ("+Ln(D.end)+") or another opening tag after the start of `"+D.type+"` ("+Ln(D.start)+")",{start:E.start,end:E.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function g(E){return"<"+(E.close?"/":"")+(E.name||"")+">"}}function Wy(e){const t=e||{},n=t.quote||'"',r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||Number.POSITIVE_INFINITY,s=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return u.peek=Ky,{handlers:{mdxJsxFlowElement:u,mdxJsxTextElement:u},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function u(l,c,h,f){const d=l.type==="mdxJsxFlowElement",m=l.name?!l.children||l.children.length===0:!1,v=Ad(h),x=Pd(v),S=h.createTracker(f),y=h.createTracker(f),k=[],_=(d?x:"")+"<"+(l.name||""),P=h.enter(l.type);if(S.move(_),y.move(_),l.attributes&&l.attributes.length>0){if(!l.name)throw new Error("Cannot serialize fragment w/ attributes");let F=-1;for(;++F<l.attributes.length;){const R=l.attributes[F];let B;if(R.type==="mdxJsxExpressionAttribute")B="{"+(R.value||"")+"}";else{if(!R.name)throw new Error("Cannot serialize attribute w/o name");const G=R.value,U=R.name;let re="";if(G!=null)if(typeof G=="object")re="{"+(G.value||"")+"}";else{const ee=r&&us(G,n)>us(G,s)?s:n;re=ee+Uy(G,{subset:[ee]})+ee}B=U+(re?"=":"")+re}k.push(B)}}let w=!1;const g=k.join(" ");d&&(/\r?\n|\r/.test(g)||S.current().now.column+g.length+(m?i?2:3:1)>a)&&(w=!0);let E=S,D=_;if(w){E=y;let F=-1;for(;++F<k.length;)k[F]=x+Td+k[F];D+=E.move(`
4
4
  `+k.join(`
5
5
  `)+`
6
6
  `+x)}else g&&(D+=E.move(" "+g));return m&&(D+=E.move((i||w?"":" ")+"/")),D+=E.move(">"),l.children&&l.children.length>0&&(l.type==="mdxJsxTextElement"?D+=E.move(h.containerPhrasing(l,{...E.current(),before:">",after:"<"})):(E.shift(2),D+=E.move(`
7
- `),D+=E.move(Hb(l,h,E.current())),D+=E.move(`
8
- `))),m||(D+=E.move((d?x:"")+"</"+(l.name||"")+">")),P(),D}}function Hb(e,t,n){const r=t.indexStack,i=e.children,a=t.createTracker(n),s=Td(Id(t)),u=[];let l=-1;for(r.push(-1);++l<i.length;){const c=i[l];r[r.length-1]=l;const h={before:`
7
+ `),D+=E.move(qy(l,h,E.current())),D+=E.move(`
8
+ `))),m||(D+=E.move((d?x:"")+"</"+(l.name||"")+">")),P(),D}}function qy(e,t,n){const r=t.indexStack,i=e.children,a=t.createTracker(n),s=Pd(Ad(t)),u=[];let l=-1;for(r.push(-1);++l<i.length;){const c=i[l];r[r.length-1]=l;const h={before:`
9
9
  `,after:`
10
10
  `,...a.current()},f=t.handle(c,e,t,h),d=c.type==="mdxJsxFlowElement"?f:t.indentLines(f,function(m,v,x){return(x?"":s)+m});u.push(a.move(d)),c.type!=="list"&&(t.bulletLastUsed=void 0),l<i.length-1&&u.push(a.move(`
11
11
 
12
- `))}return r.pop(),u.join("")}function Id(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function Td(e){return _d.repeat(e)}function Wb(){return"<"}function qb(){return{enter:{mdxjsEsm:Gb},exit:{mdxjsEsm:Jb,mdxjsEsmData:Yb}}}function Kb(){return{handlers:{mdxjsEsm:Xb}}}function Gb(e){this.enter({type:"mdxjsEsm",value:""},e),this.buffer()}function Jb(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);const r=e.estree;n.value=t,r&&(n.data={estree:r})}function Yb(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Xb(e){return e.value||""}function Qb(){return[Sb(),$b(),qb()]}function Zb(e){return{extensions:[Cb(),Ub(e),Kb()]}}var ey=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],Ad=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ty="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Pd="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Lo={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Do="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ny={5:Do,"5module":Do+" export import",6:Do+" const class extends export import super"},ry=/^in(stanceof)?$/,iy=new RegExp("["+Pd+"]"),ay=new RegExp("["+Pd+ty+"]");function Fu(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function In(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&iy.test(String.fromCharCode(e)):t===!1?!1:Fu(e,Ad)}function Qn(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ay.test(String.fromCharCode(e)):t===!1?!1:Fu(e,Ad)||Fu(e,ey)}var Ze=function(t,n){n===void 0&&(n={}),this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function on(e,t){return new Ze(e,{beforeExpr:!0,binop:t})}var un={beforeExpr:!0},Ht={startsExpr:!0},Al={};function Je(e,t){return t===void 0&&(t={}),t.keyword=e,Al[e]=new Ze(e,t)}var I={num:new Ze("num",Ht),regexp:new Ze("regexp",Ht),string:new Ze("string",Ht),name:new Ze("name",Ht),privateId:new Ze("privateId",Ht),eof:new Ze("eof"),bracketL:new Ze("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Ze("]"),braceL:new Ze("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Ze("}"),parenL:new Ze("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Ze(")"),comma:new Ze(",",un),semi:new Ze(";",un),colon:new Ze(":",un),dot:new Ze("."),question:new Ze("?",un),questionDot:new Ze("?."),arrow:new Ze("=>",un),template:new Ze("template"),invalidTemplate:new Ze("invalidTemplate"),ellipsis:new Ze("...",un),backQuote:new Ze("`",Ht),dollarBraceL:new Ze("${",{beforeExpr:!0,startsExpr:!0}),eq:new Ze("=",{beforeExpr:!0,isAssign:!0}),assign:new Ze("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Ze("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Ze("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:on("||",1),logicalAND:on("&&",2),bitwiseOR:on("|",3),bitwiseXOR:on("^",4),bitwiseAND:on("&",5),equality:on("==/!=/===/!==",6),relational:on("</>/<=/>=",7),bitShift:on("<</>>/>>>",8),plusMin:new Ze("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:on("%",10),star:on("*",10),slash:on("/",10),starstar:new Ze("**",{beforeExpr:!0}),coalesce:on("??",1),_break:Je("break"),_case:Je("case",un),_catch:Je("catch"),_continue:Je("continue"),_debugger:Je("debugger"),_default:Je("default",un),_do:Je("do",{isLoop:!0,beforeExpr:!0}),_else:Je("else",un),_finally:Je("finally"),_for:Je("for",{isLoop:!0}),_function:Je("function",Ht),_if:Je("if"),_return:Je("return",un),_switch:Je("switch"),_throw:Je("throw",un),_try:Je("try"),_var:Je("var"),_const:Je("const"),_while:Je("while",{isLoop:!0}),_with:Je("with"),_new:Je("new",{beforeExpr:!0,startsExpr:!0}),_this:Je("this",Ht),_super:Je("super",Ht),_class:Je("class",Ht),_extends:Je("extends",un),_export:Je("export"),_import:Je("import",Ht),_null:Je("null",Ht),_true:Je("true",Ht),_false:Je("false",Ht),_in:Je("in",{beforeExpr:!0,binop:7}),_instanceof:Je("instanceof",{beforeExpr:!0,binop:7}),_typeof:Je("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Je("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Je("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Xt=/\r\n?|\n|\u2028|\u2029/,sy=new RegExp(Xt.source,"g");function Xr(e){return e===10||e===13||e===8232||e===8233}function Rd(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(Xr(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var Nd=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Nt=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Od=Object.prototype,oy=Od.hasOwnProperty,uy=Od.toString,Qr=Object.hasOwn||(function(e,t){return oy.call(e,t)}),vf=Array.isArray||(function(e){return uy.call(e)==="[object Array]"}),xf=Object.create(null);function Yn(e){return xf[e]||(xf[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Vn(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var ly=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ii=function(t,n){this.line=t,this.column=n};Ii.prototype.offset=function(t){return new Ii(this.line,this.column+t)};var Fs=function(t,n,r){this.start=n,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function Ld(e,t){for(var n=1,r=0;;){var i=Rd(e,r,t);if(i<0)return new Ii(n,t-r);++n,r=i}}var ju={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},bf=!1;function cy(e){var t={};for(var n in ju)t[n]=e&&Qr(e,n)?e[n]:ju[n];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!bf&&typeof console=="object"&&console.warn&&(bf=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
13
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),vf(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}return vf(t.onComment)&&(t.onComment=fy(t,t.onComment)),t}function fy(e,t){return function(n,r,i,a,s,u){var l={type:n?"Block":"Line",value:r,start:i,end:a};e.locations&&(l.loc=new Fs(this,s,u)),e.ranges&&(l.range=[i,a]),t.push(l)}}var Ti=1,Zr=2,Pl=4,Dd=8,Rl=16,Vd=32,js=64,Md=128,Er=256,$i=512,Bs=Ti|Zr|Er;function Nl(e,t){return Zr|(e?Pl:0)|(t?Dd:0)}var us=0,Ol=1,Bn=2,Fd=3,jd=4,Bd=5,kt=function(t,n,r){this.options=t=cy(t),this.sourceFile=t.sourceFile,this.keywords=Yn(ny[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=Lo[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=Yn(i);var a=(i?i+" ":"")+Lo.strict;this.reservedWordsStrict=Yn(a),this.reservedWordsStrictBind=Yn(a+" "+Lo.strictBind),this.input=String(n),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
14
- `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Xt).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=I.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Ti),this.regexpState=null,this.privateNameStack=[]},Tn={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};kt.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};Tn.inFunction.get=function(){return(this.currentVarScope().flags&Zr)>0};Tn.inGenerator.get=function(){return(this.currentVarScope().flags&Dd)>0};Tn.inAsync.get=function(){return(this.currentVarScope().flags&Pl)>0};Tn.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Er|$i))return!1;if(n&Zr)return(n&Pl)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Tn.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&js)>0||this.options.allowSuperOutsideMethod};Tn.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Md)>0};Tn.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Tn.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Er|$i)||n&Zr&&!(n&Rl))return!0}return!1};Tn.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Er)>0};kt.extend=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];for(var r=this,i=0;i<t.length;i++)r=t[i](r);return r};kt.parse=function(t,n){return new this(n,t).parse()};kt.parseExpressionAt=function(t,n,r){var i=new this(r,t,n);return i.nextToken(),i.parseExpression()};kt.tokenizer=function(t,n){return new this(n,t)};Object.defineProperties(kt.prototype,Tn);var Bt=kt.prototype,hy=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Bt.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){Nt.lastIndex=e,e+=Nt.exec(this.input)[0].length;var t=hy.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){Nt.lastIndex=e+t[0].length;var n=Nt.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||Xt.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,Nt.lastIndex=e,e+=Nt.exec(this.input)[0].length,this.input[e]===";"&&e++}};Bt.eat=function(e){return this.type===e?(this.next(),!0):!1};Bt.isContextual=function(e){return this.type===I.name&&this.value===e&&!this.containsEsc};Bt.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Bt.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Bt.canInsertSemicolon=function(){return this.type===I.eof||this.type===I.braceR||Xt.test(this.input.slice(this.lastTokEnd,this.start))};Bt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Bt.semicolon=function(){!this.eat(I.semi)&&!this.insertSemicolon()&&this.unexpected()};Bt.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};Bt.expect=function(e){this.eat(e)||this.unexpected()};Bt.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var zs=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Bt.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}};Bt.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};Bt.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};Bt.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var Le=kt.prototype;Le.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==I.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Ll={kind:"loop"},py={kind:"switch"};Le.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Nt.lastIndex=this.pos;var t=Nt.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123||r>55295&&r<56320)return!0;if(In(r,!0)){for(var i=n+1;Qn(r=this.input.charCodeAt(i),!0);)++i;if(r===92||r>55295&&r<56320)return!0;var a=this.input.slice(n,i);if(!ry.test(a))return!0}return!1};Le.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Nt.lastIndex=this.pos;var e=Nt.exec(this.input),t=this.pos+e[0].length,n;return!Xt.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Qn(n=this.input.charCodeAt(t+8))||n>55295&&n<56320))};Le.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;Nt.lastIndex=this.pos;var n=Nt.exec(this.input),r=this.pos+n[0].length;if(Xt.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!=="using"||i===this.input.length||Qn(a=this.input.charCodeAt(i))||a>55295&&a<56320)return!1;Nt.lastIndex=i;var s=Nt.exec(this.input);if(s&&Xt.test(this.input.slice(i,i+s[0].length)))return!1}if(t){var u=r+2,l;if(this.input.slice(r,u)==="of"&&(u===this.input.length||!Qn(l=this.input.charCodeAt(u))&&!(l>55295&&l<56320)))return!1}var c=this.input.charCodeAt(r);return In(c,!0)||c===92};Le.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};Le.isUsing=function(e){return this.isUsingKeyword(!1,e)};Le.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=I._var,a="let"),r){case I._break:case I._continue:return this.parseBreakContinueStatement(i,r.keyword);case I._debugger:return this.parseDebuggerStatement(i);case I._do:return this.parseDoStatement(i);case I._for:return this.parseForStatement(i);case I._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case I._class:return e&&this.unexpected(),this.parseClass(i,!0);case I._if:return this.parseIfStatement(i);case I._return:return this.parseReturnStatement(i);case I._switch:return this.parseSwitchStatement(i);case I._throw:return this.parseThrowStatement(i);case I._try:return this.parseTryStatement(i);case I._const:case I._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(i,a);case I._while:return this.parseWhileStatement(i);case I._with:return this.parseWithStatement(i);case I.braceL:return this.parseBlock(!0,i);case I.semi:return this.parseEmptyStatement(i);case I._export:case I._import:if(this.options.ecmaVersion>10&&r===I._import){Nt.lastIndex=this.pos;var s=Nt.exec(this.input),u=this.pos+s[0].length,l=this.input.charCodeAt(u);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===I._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var c=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(c)return t&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),c==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,c),this.semicolon(),this.finishNode(i,"VariableDeclaration");var h=this.value,f=this.parseExpression();return r===I.name&&f.type==="Identifier"&&this.eat(I.colon)?this.parseLabeledStatement(i,h,f,e):this.parseExpressionStatement(i,f)}};Le.parseBreakContinueStatement=function(e,t){var n=t==="break";this.next(),this.eat(I.semi)||this.insertSemicolon()?e.label=null:this.type!==I.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind==="loop")||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")};Le.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};Le.parseDoStatement=function(e){return this.next(),this.labels.push(Ll),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(I._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(I.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};Le.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ll),this.enterScope(0),this.expect(I.parenL),this.type===I.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===I._var||this.type===I._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var a=this.isContextual("let"),s=!1,u=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(u){var l=this.startNode();return this.next(),u==="await using"&&this.next(),this.parseVar(l,!0,u),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var c=this.containsEsc,h=new zs,f=this.start,d=t>-1?this.parseExprSubscripts(h,"await"):this.parseExpression(!0,h);return this.type===I._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===I._in&&this.unexpected(t),e.await=!0):s&&this.options.ecmaVersion>=8&&(d.start===f&&!c&&d.type==="Identifier"&&d.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&s&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,h),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(h,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))};Le.parseForAfterInit=function(e,t,n){return(this.type===I._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===I._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))};Le.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,mi|(n?0:Bu),!1,t)};Le.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(I._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};Le.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(I.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};Le.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(I.braceL),this.labels.push(py),this.enterScope(0);for(var t,n=!1;this.type!==I.braceR;)if(this.type===I._case||this.type===I._default){var r=this.type===I._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(I.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};Le.parseThrowStatement=function(e){return this.next(),Xt.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var dy=[];Le.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Vd:0),this.checkLValPattern(e,t?jd:Bn),this.expect(I.parenR),e};Le.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===I._catch){var t=this.startNode();this.next(),this.eat(I.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(I._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};Le.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};Le.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ll),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};Le.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};Le.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};Le.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1){var s=a[i];s.name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===I._switch?"switch":null,l=this.labels.length-1;l>=0;l--){var c=this.labels[l];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};Le.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};Le.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(I.braceL),e&&this.enterScope(0);this.type!==I.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};Le.parseFor=function(e,t){return e.init=t,this.expect(I.semi),e.test=this.type===I.semi?null:this.parseExpression(),this.expect(I.semi),e.update=this.type===I.parenR?null:this.parseExpression(),this.expect(I.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};Le.parseForIn=function(e,t){var n=this.type===I._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(I.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};Le.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(I.eq)?i.init=this.parseMaybeAssign(t):!r&&n==="const"&&!(this.type===I._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==I._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):!r&&i.id.type!=="Identifier"&&!(t&&(this.type===I._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(I.comma))break}return e};Le.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ol:Bn,!1)};var mi=1,Bu=2,zd=4;Le.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===I.star&&t&Bu&&this.unexpected(),e.generator=this.eat(I.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&mi&&(e.id=t&zd&&this.type!==I.name?null:this.parseIdent(),e.id&&!(t&Bu)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ol:Bn:Fd));var a=this.yieldPos,s=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Nl(e.async,e.generator)),t&mi||(e.id=this.type===I.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=u,this.finishNode(e,t&mi?"FunctionDeclaration":"FunctionExpression")};Le.parseFunctionParams=function(e){this.expect(I.parenL),e.params=this.parseBindingList(I.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};Le.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(I.braceL);this.type!==I.braceR;){var s=this.parseClassElement(e.superClass!==null);s&&(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"?(a&&this.raiseRecoverable(s.start,"Duplicate constructor in the same class"),a=!0):s.key&&s.key.type==="PrivateIdentifier"&&my(r,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};Le.parseClassElement=function(e){if(this.eat(I.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,a=!1,s="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(I.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===I.star?u=!0:r="static"}if(n.static=u,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===I.star)&&!this.canInsertSemicolon()?a=!0:r="async"),!r&&(t>=9||!a)&&this.eat(I.star)&&(i=!0),!r&&!a&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===I.parenL||s!=="method"||i||a){var c=!n.static&&ls(n,"constructor"),h=c&&e;c&&s!=="method"&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":s,this.parseClassMethod(n,i,a,h)}else this.parseClassField(n);return n};Le.isClassElementNameStart=function(){return this.type===I.name||this.type===I.privateId||this.type===I.num||this.type===I.string||this.type===I.bracketL||this.type.keyword};Le.parseClassElementName=function(e){this.type===I.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};Le.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&ls(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,n,r);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};Le.parseClassField=function(e){return ls(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&ls(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(I.eq)?(this.enterScope($i|js),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};Le.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Er|js);this.type!==I.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};Le.parseClassId=function(e,t){this.type===I.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Bn,!1)):(t===!0&&this.unexpected(),e.id=null)};Le.parseClassSuper=function(e){e.superClass=this.eat(I._extends)?this.parseExprSubscripts(null,!1):null};Le.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};Le.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var s=n[a];Qr(t,s.name)||(i?i.used.push(s):this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class"))}};function my(e,t){var n=t.key.name,r=e[n],i="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(i=(t.static?"s":"i")+t.kind),r==="iget"&&i==="iset"||r==="iset"&&i==="iget"||r==="sget"&&i==="sset"||r==="sset"&&i==="sget"?(e[n]="true",!1):r?!0:(e[n]=i,!1)}function ls(e,t){var n=e.computed,r=e.key;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}Le.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==I.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};Le.parseExport=function(e,t){if(this.next(),this.eat(I.star))return this.parseExportAllDeclaration(e,t);if(this.eat(I._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==I.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal"&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};Le.parseExportDeclaration=function(e){return this.parseStatement(null)};Le.parseExportDefaultDeclaration=function(){var e;if(this.type===I._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,mi|zd,!1,e)}else if(this.type===I._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};Le.checkExport=function(e,t,n){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Qr(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)};Le.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n==="ArrayPattern")for(var s=0,u=t.elements;s<u.length;s+=1){var l=u[s];l&&this.checkPatternExport(e,l)}else n==="Property"?this.checkPatternExport(e,t.value):n==="AssignmentPattern"?this.checkPatternExport(e,t.left):n==="RestElement"&&this.checkPatternExport(e,t.argument)};Le.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}};Le.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};Le.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};Le.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(I.braceL);!this.eat(I.braceR);){if(n)n=!1;else if(this.expect(I.comma),this.afterTrailingComma(I.braceR))break;t.push(this.parseExportSpecifier(e))}return t};Le.parseImport=function(e){return this.next(),this.type===I.string?(e.specifiers=dy,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===I.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};Le.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Bn),this.finishNode(e,"ImportSpecifier")};Le.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Bn),this.finishNode(e,"ImportDefaultSpecifier")};Le.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Bn),this.finishNode(e,"ImportNamespaceSpecifier")};Le.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===I.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(I.comma)))return e;if(this.type===I.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(I.braceL);!this.eat(I.braceR);){if(t)t=!1;else if(this.expect(I.comma),this.afterTrailingComma(I.braceR))break;e.push(this.parseImportSpecifier())}return e};Le.parseWithClause=function(){var e=[];if(!this.eat(I._with))return e;this.expect(I.braceL);for(var t={},n=!0;!this.eat(I.braceR);){if(n)n=!1;else if(this.expect(I.comma),this.afterTrailingComma(I.braceR))break;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;Qr(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e};Le.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===I.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(I.colon),this.type!==I.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};Le.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===I.string){var e=this.parseLiteral(this.value);return ly.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};Le.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};Le.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var hn=kt.prototype;hn.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type==="RestElement"&&(a.argument.type==="ArrayPattern"||a.argument.type==="ObjectPattern")&&this.raise(a.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e};hn.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return e};hn.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};hn.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==I.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};hn.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case I.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(I.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case I.braceL:return this.parseObj(!0)}return this.parseIdent()};hn.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(I.comma),t&&this.type===I.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===I.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===I.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(r))}return i};hn.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};hn.parseBindingListItem=function(e){return e};hn.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(I.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};hn.checkLValSimple=function(e,t,n){t===void 0&&(t=us);var r=t!==us;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===Bn&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(Qr(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t!==Bd&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};hn.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=us),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case"ArrayPattern":for(var s=0,u=e.elements;s<u.length;s+=1){var l=u[s];l&&this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}};hn.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=us),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var vn=function(t,n,r,i,a){this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i,this.generator=!!a},xt={b_stat:new vn("{",!1),b_expr:new vn("{",!0),b_tmpl:new vn("${",!1),p_stat:new vn("(",!1),p_expr:new vn("(",!0),q_tmpl:new vn("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new vn("function",!1),f_expr:new vn("function",!0),f_expr_gen:new vn("function",!0,!1,null,!0),f_gen:new vn("function",!1,!1,null,!0)},ei=kt.prototype;ei.initialContext=function(){return[xt.b_stat]};ei.curContext=function(){return this.context[this.context.length-1]};ei.braceIsBlock=function(e){var t=this.curContext();return t===xt.f_expr||t===xt.f_stat?!0:e===I.colon&&(t===xt.b_stat||t===xt.b_expr)?!t.isExpr:e===I._return||e===I.name&&this.exprAllowed?Xt.test(this.input.slice(this.lastTokEnd,this.start)):e===I._else||e===I.semi||e===I.eof||e===I.parenR||e===I.arrow?!0:e===I.braceL?t===xt.b_stat:e===I._var||e===I._const||e===I.name?!1:!this.exprAllowed};ei.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ei.updateContext=function(e){var t,n=this.type;n.keyword&&e===I.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr};ei.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};I.parenR.updateContext=I.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===xt.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};I.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?xt.b_stat:xt.b_expr),this.exprAllowed=!0};I.dollarBraceL.updateContext=function(){this.context.push(xt.b_tmpl),this.exprAllowed=!0};I.parenL.updateContext=function(e){var t=e===I._if||e===I._for||e===I._with||e===I._while;this.context.push(t?xt.p_stat:xt.p_expr),this.exprAllowed=!0};I.incDec.updateContext=function(){};I._function.updateContext=I._class.updateContext=function(e){e.beforeExpr&&e!==I._else&&!(e===I.semi&&this.curContext()!==xt.p_stat)&&!(e===I._return&&Xt.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===I.colon||e===I.braceL)&&this.curContext()===xt.b_stat)?this.context.push(xt.f_expr):this.context.push(xt.f_stat),this.exprAllowed=!1};I.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};I.backQuote.updateContext=function(){this.curContext()===xt.q_tmpl?this.context.pop():this.context.push(xt.q_tmpl),this.exprAllowed=!1};I.star.updateContext=function(e){if(e===I._function){var t=this.context.length-1;this.context[t]===xt.f_expr?this.context[t]=xt.f_expr_gen:this.context[t]=xt.f_gen}this.exprAllowed=!0};I.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==I.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var $e=kt.prototype;$e.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&a==="init"&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);return}i="$"+i;var s=t[i];if(s){var u;a==="init"?u=this.strict&&s.init||s.get||s.set:u=s.init||s[a],u&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[i]={init:!1,get:!1,set:!1};s[a]=!0}};$e.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===I.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(I.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return i};$e.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,s=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new zs,r=!0);var u=this.start,l=this.startLoc;(this.type===I.parenL||this.type===I.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var c=this.parseMaybeConditional(e,t);if(n&&(c=n.call(this,c,u,l)),this.type.isAssign){var h=this.startNodeAt(u,l);return h.operator=this.value,this.type===I.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===I.eq?this.checkLValPattern(c):this.checkLValSimple(c),h.left=c,this.next(),h.right=this.parseMaybeAssign(e),s>-1&&(t.doubleProto=s),this.finishNode(h,"AssignmentExpression")}else r&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),c};$e.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(I.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(I.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return i};$e.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,n,r,-1,e)};$e.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==I._in)&&a>r){var s=this.type===I.logicalOR||this.type===I.logicalAND,u=this.type===I.coalesce;u&&(a=I.logicalAND.binop);var l=this.value;this.next();var c=this.start,h=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),c,h,a,i),d=this.buildBinary(t,n,e,f,l,s||u);return(s&&this.type===I.coalesce||u&&(this.type===I.logicalOR||this.type===I.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,t,n,r,i)}return e};$e.buildBinary=function(e,t,n,r,i,a){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,t);return s.left=n,s.operator=i,s.right=r,this.finishNode(s,a?"LogicalExpression":"BinaryExpression")};$e.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,s;if(this.isContextual("await")&&this.canAwait)s=this.parseAwait(r),t=!0;else if(this.type.prefix){var u=this.startNode(),l=this.type===I.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&$d(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&zu(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,s=this.finishNode(u,l?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===I.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),s=this.parsePrivateIdent(),this.type!==I._in&&this.unexpected();else{if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(i,a);c.operator=this.value,c.prefix=!1,c.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(c,"UpdateExpression")}}if(!n&&this.eat(I.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return s};function $d(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&$d(e.expression)}function zu(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&zu(e.expression)||e.type==="ParenthesizedExpression"&&zu(e.expression)}$e.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type==="MemberExpression"&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a};$e.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,s=!1;;){var u=this.parseSubscript(e,t,n,r,a,s,i);if(u.optional&&(s=!0),u===e||u.type==="ArrowFunctionExpression"){if(s){var l=this.startNodeAt(t,n);l.expression=u,u=this.finishNode(l,"ChainExpression")}return u}e=u}};$e.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(I.arrow)};$e.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};$e.parseSubscript=function(e,t,n,r,i,a,s){var u=this.options.ecmaVersion>=11,l=u&&this.eat(I.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(I.bracketL);if(c||l&&this.type!==I.parenL&&this.type!==I.backQuote||this.eat(I.dot)){var h=this.startNodeAt(t,n);h.object=e,c?(h.property=this.parseExpression(),this.expect(I.bracketR)):this.type===I.privateId&&e.type!=="Super"?h.property=this.parsePrivateIdent():h.property=this.parseIdent(this.options.allowReserved!=="never"),h.computed=!!c,u&&(h.optional=l),e=this.finishNode(h,"MemberExpression")}else if(!r&&this.eat(I.parenL)){var f=new zs,d=this.yieldPos,m=this.awaitPos,v=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var x=this.parseExprList(I.parenR,this.options.ecmaVersion>=8,!1,f);if(i&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=m,this.awaitIdentPos=v,this.parseSubscriptAsyncArrow(t,n,x,s);this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=m||this.awaitPos,this.awaitIdentPos=v||this.awaitIdentPos;var S=this.startNodeAt(t,n);S.callee=e,S.arguments=x,u&&(S.optional=l),e=this.finishNode(S,"CallExpression")}else if(this.type===I.backQuote){(l||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var b=this.startNodeAt(t,n);b.tag=e,b.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(b,"TaggedTemplateExpression")}return e};$e.parseExprAtom=function(e,t,n){this.type===I.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case I._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===I.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==I.dot&&this.type!==I.bracketL&&this.type!==I.parenL&&this.unexpected(),this.finishNode(r,"Super");case I._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case I.name:var a=this.start,s=this.startLoc,u=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(I._function))return this.overrideContext(xt.f_expr),this.parseFunction(this.startNodeAt(a,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(I.arrow))return this.parseArrowExpression(this.startNodeAt(a,s),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===I.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(I.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,s),[l],!0,t)}return l;case I.regexp:var c=this.value;return r=this.parseLiteral(c.value),r.regex={pattern:c.pattern,flags:c.flags},r;case I.num:case I.string:return this.parseLiteral(this.value);case I._null:case I._true:case I._false:return r=this.startNode(),r.value=this.type===I._null?null:this.type===I._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case I.parenL:var h=this.start,f=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),f;case I.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(I.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case I.braceL:return this.overrideContext(xt.b_expr),this.parseObj(!1,e);case I._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case I._class:return this.parseClass(this.startNode(),!1);case I._new:return this.parseNew();case I.backQuote:return this.parseTemplate();case I._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}};$e.parseExprAtomDefault=function(){this.unexpected()};$e.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===I.parenL&&!e)return this.parseDynamicImport(t);if(this.type===I.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};$e.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(I.parenR)?e.options=null:(this.expect(I.comma),this.afterTrailingComma(I.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(I.parenR)||(this.expect(I.comma),this.afterTrailingComma(I.parenR)||this.unexpected())));else if(!this.eat(I.parenR)){var t=this.start;this.eat(I.comma)&&this.eat(I.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};$e.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};$e.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};$e.parseParenExpression=function(){this.expect(I.parenL);var e=this.parseExpression();return this.expect(I.parenR),e};$e.shouldParseArrow=function(e){return!this.canInsertSemicolon()};$e.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,u=this.startLoc,l=[],c=!0,h=!1,f=new zs,d=this.yieldPos,m=this.awaitPos,v;for(this.yieldPos=0,this.awaitPos=0;this.type!==I.parenR;)if(c?c=!1:this.expect(I.comma),a&&this.afterTrailingComma(I.parenR,!0)){h=!0;break}else if(this.type===I.ellipsis){v=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===I.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,f,this.parseParenItem));var x=this.lastTokEnd,S=this.lastTokEndLoc;if(this.expect(I.parenR),e&&this.shouldParseArrow(l)&&this.eat(I.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=m,this.parseParenArrowList(n,r,l,t);(!l.length||h)&&this.unexpected(this.lastTokStart),v&&this.unexpected(v),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=m||this.awaitPos,l.length>1?(i=this.startNodeAt(s,u),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",x,S)):i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var b=this.startNodeAt(n,r);return b.expression=i,this.finishNode(b,"ParenthesizedExpression")}else return i};$e.parseParenItem=function(e){return e};$e.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var gy=[];$e.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===I.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(I.parenL)?e.arguments=this.parseExprList(I.parenR,this.options.ecmaVersion>=8,!1):e.arguments=gy,this.finishNode(e,"NewExpression")};$e.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===I.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,`
12
+ `))}return r.pop(),u.join("")}function Ad(e){let t=0,n=e.stack.length;for(;--n>-1;){const r=e.stack[n];if(r==="blockquote"||r==="listItem")break;r==="mdxJsxFlowElement"&&t++}return t}function Pd(e){return Td.repeat(e)}function Ky(){return"<"}function Gy(){return{enter:{mdxjsEsm:Yy},exit:{mdxjsEsm:Xy,mdxjsEsmData:Qy}}}function Jy(){return{handlers:{mdxjsEsm:Zy}}}function Yy(e){this.enter({type:"mdxjsEsm",value:""},e),this.buffer()}function Xy(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);const r=e.estree;n.value=t,r&&(n.data={estree:r})}function Qy(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Zy(e){return e.value||""}function eb(){return[ky(),Hy(),Gy()]}function tb(e){return{extensions:[Ey(),Wy(e),Jy()]}}var nb=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],Rd=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],rb="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Nd="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Vo={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Mo="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ib={5:Mo,"5module":Mo+" export import",6:Mo+" const class extends export import super"},ab=/^in(stanceof)?$/,sb=new RegExp("["+Nd+"]"),ob=new RegExp("["+Nd+rb+"]");function Bu(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function In(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&sb.test(String.fromCharCode(e)):t===!1?!1:Bu(e,Rd)}function Qn(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&ob.test(String.fromCharCode(e)):t===!1?!1:Bu(e,Rd)||Bu(e,nb)}var Ze=function(t,n){n===void 0&&(n={}),this.label=t,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop||null,this.updateContext=null};function on(e,t){return new Ze(e,{beforeExpr:!0,binop:t})}var un={beforeExpr:!0},Ht={startsExpr:!0},Rl={};function Je(e,t){return t===void 0&&(t={}),t.keyword=e,Rl[e]=new Ze(e,t)}var I={num:new Ze("num",Ht),regexp:new Ze("regexp",Ht),string:new Ze("string",Ht),name:new Ze("name",Ht),privateId:new Ze("privateId",Ht),eof:new Ze("eof"),bracketL:new Ze("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new Ze("]"),braceL:new Ze("{",{beforeExpr:!0,startsExpr:!0}),braceR:new Ze("}"),parenL:new Ze("(",{beforeExpr:!0,startsExpr:!0}),parenR:new Ze(")"),comma:new Ze(",",un),semi:new Ze(";",un),colon:new Ze(":",un),dot:new Ze("."),question:new Ze("?",un),questionDot:new Ze("?."),arrow:new Ze("=>",un),template:new Ze("template"),invalidTemplate:new Ze("invalidTemplate"),ellipsis:new Ze("...",un),backQuote:new Ze("`",Ht),dollarBraceL:new Ze("${",{beforeExpr:!0,startsExpr:!0}),eq:new Ze("=",{beforeExpr:!0,isAssign:!0}),assign:new Ze("_=",{beforeExpr:!0,isAssign:!0}),incDec:new Ze("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new Ze("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:on("||",1),logicalAND:on("&&",2),bitwiseOR:on("|",3),bitwiseXOR:on("^",4),bitwiseAND:on("&",5),equality:on("==/!=/===/!==",6),relational:on("</>/<=/>=",7),bitShift:on("<</>>/>>>",8),plusMin:new Ze("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:on("%",10),star:on("*",10),slash:on("/",10),starstar:new Ze("**",{beforeExpr:!0}),coalesce:on("??",1),_break:Je("break"),_case:Je("case",un),_catch:Je("catch"),_continue:Je("continue"),_debugger:Je("debugger"),_default:Je("default",un),_do:Je("do",{isLoop:!0,beforeExpr:!0}),_else:Je("else",un),_finally:Je("finally"),_for:Je("for",{isLoop:!0}),_function:Je("function",Ht),_if:Je("if"),_return:Je("return",un),_switch:Je("switch"),_throw:Je("throw",un),_try:Je("try"),_var:Je("var"),_const:Je("const"),_while:Je("while",{isLoop:!0}),_with:Je("with"),_new:Je("new",{beforeExpr:!0,startsExpr:!0}),_this:Je("this",Ht),_super:Je("super",Ht),_class:Je("class",Ht),_extends:Je("extends",un),_export:Je("export"),_import:Je("import",Ht),_null:Je("null",Ht),_true:Je("true",Ht),_false:Je("false",Ht),_in:Je("in",{beforeExpr:!0,binop:7}),_instanceof:Je("instanceof",{beforeExpr:!0,binop:7}),_typeof:Je("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:Je("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:Je("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Xt=/\r\n?|\n|\u2028|\u2029/,ub=new RegExp(Xt.source,"g");function Xr(e){return e===10||e===13||e===8232||e===8233}function Od(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(Xr(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var Ld=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Nt=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Dd=Object.prototype,lb=Dd.hasOwnProperty,cb=Dd.toString,Qr=Object.hasOwn||(function(e,t){return lb.call(e,t)}),yf=Array.isArray||(function(e){return cb.call(e)==="[object Array]"}),bf=Object.create(null);function Yn(e){return bf[e]||(bf[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Vn(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var fb=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Ii=function(t,n){this.line=t,this.column=n};Ii.prototype.offset=function(t){return new Ii(this.line,this.column+t)};var js=function(t,n,r){this.start=n,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function Vd(e,t){for(var n=1,r=0;;){var i=Od(e,r,t);if(i<0)return new Ii(n,t-r);++n,r=i}}var zu={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},wf=!1;function hb(e){var t={};for(var n in zu)t[n]=e&&Qr(e,n)?e[n]:zu[n];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!wf&&typeof console=="object"&&console.warn&&(wf=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
13
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),yf(t.onToken)){var r=t.onToken;t.onToken=function(i){return r.push(i)}}return yf(t.onComment)&&(t.onComment=pb(t,t.onComment)),t}function pb(e,t){return function(n,r,i,a,s,u){var l={type:n?"Block":"Line",value:r,start:i,end:a};e.locations&&(l.loc=new js(this,s,u)),e.ranges&&(l.range=[i,a]),t.push(l)}}var Ti=1,Zr=2,Nl=4,Md=8,Ol=16,Fd=32,Bs=64,jd=128,Er=256,$i=512,zs=Ti|Zr|Er;function Ll(e,t){return Zr|(e?Nl:0)|(t?Md:0)}var ls=0,Dl=1,Bn=2,Bd=3,zd=4,$d=5,kt=function(t,n,r){this.options=t=hb(t),this.sourceFile=t.sourceFile,this.keywords=Yn(ib[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=Vo[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=Yn(i);var a=(i?i+" ":"")+Vo.strict;this.reservedWordsStrict=Yn(a),this.reservedWordsStrictBind=Yn(a+" "+Vo.strictBind),this.input=String(n),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
14
+ `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Xt).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=I.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Ti),this.regexpState=null,this.privateNameStack=[]},Tn={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};kt.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};Tn.inFunction.get=function(){return(this.currentVarScope().flags&Zr)>0};Tn.inGenerator.get=function(){return(this.currentVarScope().flags&Md)>0};Tn.inAsync.get=function(){return(this.currentVarScope().flags&Nl)>0};Tn.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Er|$i))return!1;if(n&Zr)return(n&Nl)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Tn.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Bs)>0||this.options.allowSuperOutsideMethod};Tn.allowDirectSuper.get=function(){return(this.currentThisScope().flags&jd)>0};Tn.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Tn.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],n=t.flags;if(n&(Er|$i)||n&Zr&&!(n&Ol))return!0}return!1};Tn.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Er)>0};kt.extend=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];for(var r=this,i=0;i<t.length;i++)r=t[i](r);return r};kt.parse=function(t,n){return new this(n,t).parse()};kt.parseExpressionAt=function(t,n,r){var i=new this(r,t,n);return i.nextToken(),i.parseExpression()};kt.tokenizer=function(t,n){return new this(n,t)};Object.defineProperties(kt.prototype,Tn);var Bt=kt.prototype,db=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Bt.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){Nt.lastIndex=e,e+=Nt.exec(this.input)[0].length;var t=db.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){Nt.lastIndex=e+t[0].length;var n=Nt.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===";"||i==="}"||Xt.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,Nt.lastIndex=e,e+=Nt.exec(this.input)[0].length,this.input[e]===";"&&e++}};Bt.eat=function(e){return this.type===e?(this.next(),!0):!1};Bt.isContextual=function(e){return this.type===I.name&&this.value===e&&!this.containsEsc};Bt.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};Bt.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};Bt.canInsertSemicolon=function(){return this.type===I.eof||this.type===I.braceR||Xt.test(this.input.slice(this.lastTokEnd,this.start))};Bt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};Bt.semicolon=function(){!this.eat(I.semi)&&!this.insertSemicolon()&&this.unexpected()};Bt.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};Bt.expect=function(e){this.eat(e)||this.unexpected()};Bt.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var $s=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Bt.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}};Bt.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};Bt.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};Bt.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var Le=kt.prototype;Le.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==I.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Vl={kind:"loop"},mb={kind:"switch"};Le.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Nt.lastIndex=this.pos;var t=Nt.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123||r>55295&&r<56320)return!0;if(In(r,!0)){for(var i=n+1;Qn(r=this.input.charCodeAt(i),!0);)++i;if(r===92||r>55295&&r<56320)return!0;var a=this.input.slice(n,i);if(!ab.test(a))return!0}return!1};Le.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Nt.lastIndex=this.pos;var e=Nt.exec(this.input),t=this.pos+e[0].length,n;return!Xt.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(Qn(n=this.input.charCodeAt(t+8))||n>55295&&n<56320))};Le.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;Nt.lastIndex=this.pos;var n=Nt.exec(this.input),r=this.pos+n[0].length;if(Xt.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!=="using"||i===this.input.length||Qn(a=this.input.charCodeAt(i))||a>55295&&a<56320)return!1;Nt.lastIndex=i;var s=Nt.exec(this.input);if(s&&Xt.test(this.input.slice(i,i+s[0].length)))return!1}if(t){var u=r+2,l;if(this.input.slice(r,u)==="of"&&(u===this.input.length||!Qn(l=this.input.charCodeAt(u))&&!(l>55295&&l<56320)))return!1}var c=this.input.charCodeAt(r);return In(c,!0)||c===92};Le.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};Le.isUsing=function(e){return this.isUsingKeyword(!1,e)};Le.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=I._var,a="let"),r){case I._break:case I._continue:return this.parseBreakContinueStatement(i,r.keyword);case I._debugger:return this.parseDebuggerStatement(i);case I._do:return this.parseDoStatement(i);case I._for:return this.parseForStatement(i);case I._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case I._class:return e&&this.unexpected(),this.parseClass(i,!0);case I._if:return this.parseIfStatement(i);case I._return:return this.parseReturnStatement(i);case I._switch:return this.parseSwitchStatement(i);case I._throw:return this.parseThrowStatement(i);case I._try:return this.parseTryStatement(i);case I._const:case I._var:return a=a||this.value,e&&a!=="var"&&this.unexpected(),this.parseVarStatement(i,a);case I._while:return this.parseWhileStatement(i);case I._with:return this.parseWithStatement(i);case I.braceL:return this.parseBlock(!0,i);case I.semi:return this.parseEmptyStatement(i);case I._export:case I._import:if(this.options.ecmaVersion>10&&r===I._import){Nt.lastIndex=this.pos;var s=Nt.exec(this.input),u=this.pos+s[0].length,l=this.input.charCodeAt(u);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===I._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var c=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(c)return t&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),c==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(i,!1,c),this.semicolon(),this.finishNode(i,"VariableDeclaration");var h=this.value,f=this.parseExpression();return r===I.name&&f.type==="Identifier"&&this.eat(I.colon)?this.parseLabeledStatement(i,h,f,e):this.parseExpressionStatement(i,f)}};Le.parseBreakContinueStatement=function(e,t){var n=t==="break";this.next(),this.eat(I.semi)||this.insertSemicolon()?e.label=null:this.type!==I.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind==="loop")||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")};Le.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};Le.parseDoStatement=function(e){return this.next(),this.labels.push(Vl),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(I._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(I.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};Le.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Vl),this.enterScope(0),this.expect(I.parenL),this.type===I.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===I._var||this.type===I._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var a=this.isContextual("let"),s=!1,u=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(u){var l=this.startNode();return this.next(),u==="await using"&&this.next(),this.parseVar(l,!0,u),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var c=this.containsEsc,h=new $s,f=this.start,d=t>-1?this.parseExprSubscripts(h,"await"):this.parseExpression(!0,h);return this.type===I._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===I._in&&this.unexpected(t),e.await=!0):s&&this.options.ecmaVersion>=8&&(d.start===f&&!c&&d.type==="Identifier"&&d.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&s&&this.raise(d.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(d,!1,h),this.checkLValPattern(d),this.parseForIn(e,d)):(this.checkExpressionErrors(h,!0),t>-1&&this.unexpected(t),this.parseFor(e,d))};Le.parseForAfterInit=function(e,t,n){return(this.type===I._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===I._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))};Le.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,mi|(n?0:$u),!1,t)};Le.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(I._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};Le.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(I.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};Le.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(I.braceL),this.labels.push(mb),this.enterScope(0);for(var t,n=!1;this.type!==I.braceR;)if(this.type===I._case||this.type===I._default){var r=this.type===I._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(I.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};Le.parseThrowStatement=function(e){return this.next(),Xt.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var gb=[];Le.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Fd:0),this.checkLValPattern(e,t?zd:Bn),this.expect(I.parenR),e};Le.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===I._catch){var t=this.startNode();this.next(),this.eat(I.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(I._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};Le.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")};Le.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Vl),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};Le.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};Le.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};Le.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1){var s=a[i];s.name===t&&this.raise(n.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===I._switch?"switch":null,l=this.labels.length-1;l>=0;l--){var c=this.labels[l];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")};Le.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};Le.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(I.braceL),e&&this.enterScope(0);this.type!==I.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};Le.parseFor=function(e,t){return e.init=t,this.expect(I.semi),e.test=this.type===I.semi?null:this.parseExpression(),this.expect(I.semi),e.update=this.type===I.parenR?null:this.parseExpression(),this.expect(I.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};Le.parseForIn=function(e,t){var n=this.type===I._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(I.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")};Le.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(I.eq)?i.init=this.parseMaybeAssign(t):!r&&n==="const"&&!(this.type===I._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&(n==="using"||n==="await using")&&this.options.ecmaVersion>=17&&this.type!==I._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):!r&&i.id.type!=="Identifier"&&!(t&&(this.type===I._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):i.init=null,e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(I.comma))break}return e};Le.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Dl:Bn,!1)};var mi=1,$u=2,Ud=4;Le.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===I.star&&t&$u&&this.unexpected(),e.generator=this.eat(I.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&mi&&(e.id=t&Ud&&this.type!==I.name?null:this.parseIdent(),e.id&&!(t&$u)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Dl:Bn:Bd));var a=this.yieldPos,s=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ll(e.async,e.generator)),t&mi||(e.id=this.type===I.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=s,this.awaitIdentPos=u,this.finishNode(e,t&mi?"FunctionDeclaration":"FunctionExpression")};Le.parseFunctionParams=function(e){this.expect(I.parenL),e.params=this.parseBindingList(I.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};Le.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(I.braceL);this.type!==I.braceR;){var s=this.parseClassElement(e.superClass!==null);s&&(i.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"?(a&&this.raiseRecoverable(s.start,"Duplicate constructor in the same class"),a=!0):s.key&&s.key.type==="PrivateIdentifier"&&vb(r,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};Le.parseClassElement=function(e){if(this.eat(I.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,a=!1,s="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(I.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===I.star?u=!0:r="static"}if(n.static=u,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===I.star)&&!this.canInsertSemicolon()?a=!0:r="async"),!r&&(t>=9||!a)&&this.eat(I.star)&&(i=!0),!r&&!a&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===I.parenL||s!=="method"||i||a){var c=!n.static&&cs(n,"constructor"),h=c&&e;c&&s!=="method"&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":s,this.parseClassMethod(n,i,a,h)}else this.parseClassField(n);return n};Le.isClassElementNameStart=function(){return this.type===I.name||this.type===I.privateId||this.type===I.num||this.type===I.string||this.type===I.bracketL||this.type.keyword};Le.parseClassElementName=function(e){this.type===I.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};Le.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind==="constructor"?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&cs(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var a=e.value=this.parseMethod(t,n,r);return e.kind==="get"&&a.params.length!==0&&this.raiseRecoverable(a.start,"getter should have no params"),e.kind==="set"&&a.params.length!==1&&this.raiseRecoverable(a.start,"setter should have exactly one param"),e.kind==="set"&&a.params[0].type==="RestElement"&&this.raiseRecoverable(a.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};Le.parseClassField=function(e){return cs(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&cs(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(I.eq)?(this.enterScope($i|Bs),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};Le.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Er|Bs);this.type!==I.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};Le.parseClassId=function(e,t){this.type===I.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Bn,!1)):(t===!0&&this.unexpected(),e.id=null)};Le.parseClassSuper=function(e){e.superClass=this.eat(I._extends)?this.parseExprSubscripts(null,!1):null};Le.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};Le.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var s=n[a];Qr(t,s.name)||(i?i.used.push(s):this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class"))}};function vb(e,t){var n=t.key.name,r=e[n],i="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(i=(t.static?"s":"i")+t.kind),r==="iget"&&i==="iset"||r==="iset"&&i==="iget"||r==="sget"&&i==="sset"||r==="sset"&&i==="sget"?(e[n]="true",!1):r?!0:(e[n]=i,!1)}function cs(e,t){var n=e.computed,r=e.key;return!n&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}Le.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==I.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};Le.parseExport=function(e,t){if(this.next(),this.eat(I.star))return this.parseExportAllDeclaration(e,t);if(this.eat(I._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==I.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal"&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};Le.parseExportDeclaration=function(e){return this.parseStatement(null)};Le.parseExportDefaultDeclaration=function(){var e;if(this.type===I._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,mi|Ud,!1,e)}else if(this.type===I._class){var n=this.startNode();return this.parseClass(n,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};Le.checkExport=function(e,t,n){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Qr(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)};Le.checkPatternExport=function(e,t){var n=t.type;if(n==="Identifier")this.checkExport(e,t,t.start);else if(n==="ObjectPattern")for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n==="ArrayPattern")for(var s=0,u=t.elements;s<u.length;s+=1){var l=u[s];l&&this.checkPatternExport(e,l)}else n==="Property"?this.checkPatternExport(e,t.value):n==="AssignmentPattern"?this.checkPatternExport(e,t.left):n==="RestElement"&&this.checkPatternExport(e,t.argument)};Le.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}};Le.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};Le.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};Le.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(I.braceL);!this.eat(I.braceR);){if(n)n=!1;else if(this.expect(I.comma),this.afterTrailingComma(I.braceR))break;t.push(this.parseExportSpecifier(e))}return t};Le.parseImport=function(e){return this.next(),this.type===I.string?(e.specifiers=gb,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===I.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};Le.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Bn),this.finishNode(e,"ImportSpecifier")};Le.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Bn),this.finishNode(e,"ImportDefaultSpecifier")};Le.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Bn),this.finishNode(e,"ImportNamespaceSpecifier")};Le.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===I.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(I.comma)))return e;if(this.type===I.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(I.braceL);!this.eat(I.braceR);){if(t)t=!1;else if(this.expect(I.comma),this.afterTrailingComma(I.braceR))break;e.push(this.parseImportSpecifier())}return e};Le.parseWithClause=function(){var e=[];if(!this.eat(I._with))return e;this.expect(I.braceL);for(var t={},n=!0;!this.eat(I.braceR);){if(n)n=!1;else if(this.expect(I.comma),this.afterTrailingComma(I.braceR))break;var r=this.parseImportAttribute(),i=r.key.type==="Identifier"?r.key.name:r.key.value;Qr(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e};Le.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===I.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(I.colon),this.type!==I.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};Le.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===I.string){var e=this.parseLiteral(this.value);return fb.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};Le.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};Le.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var hn=kt.prototype;hn.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type==="RestElement"&&(a.argument.type==="ArrayPattern"||a.argument.type==="ObjectPattern")&&this.raise(a.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e};hn.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type==="RestElement"&&a.argument.type!=="Identifier"&&this.unexpected(a.argument.start)}return e};hn.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};hn.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==I.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};hn.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case I.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(I.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case I.braceL:return this.parseObj(!0)}return this.parseIdent()};hn.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(I.comma),t&&this.type===I.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===I.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),i.push(s),this.type===I.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else i.push(this.parseAssignableListItem(r))}return i};hn.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};hn.parseBindingListItem=function(e){return e};hn.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(I.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};hn.checkLValSimple=function(e,t,n){t===void 0&&(t=ls);var r=t!==ls;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===Bn&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(Qr(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t!==$d&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};hn.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=ls),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case"ArrayPattern":for(var s=0,u=e.elements;s<u.length;s+=1){var l=u[s];l&&this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}};hn.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=ls),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var vn=function(t,n,r,i,a){this.token=t,this.isExpr=!!n,this.preserveSpace=!!r,this.override=i,this.generator=!!a},xt={b_stat:new vn("{",!1),b_expr:new vn("{",!0),b_tmpl:new vn("${",!1),p_stat:new vn("(",!1),p_expr:new vn("(",!0),q_tmpl:new vn("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new vn("function",!1),f_expr:new vn("function",!0),f_expr_gen:new vn("function",!0,!1,null,!0),f_gen:new vn("function",!1,!1,null,!0)},ei=kt.prototype;ei.initialContext=function(){return[xt.b_stat]};ei.curContext=function(){return this.context[this.context.length-1]};ei.braceIsBlock=function(e){var t=this.curContext();return t===xt.f_expr||t===xt.f_stat?!0:e===I.colon&&(t===xt.b_stat||t===xt.b_expr)?!t.isExpr:e===I._return||e===I.name&&this.exprAllowed?Xt.test(this.input.slice(this.lastTokEnd,this.start)):e===I._else||e===I.semi||e===I.eof||e===I.parenR||e===I.arrow?!0:e===I.braceL?t===xt.b_stat:e===I._var||e===I._const||e===I.name?!1:!this.exprAllowed};ei.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ei.updateContext=function(e){var t,n=this.type;n.keyword&&e===I.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr};ei.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};I.parenR.updateContext=I.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===xt.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};I.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?xt.b_stat:xt.b_expr),this.exprAllowed=!0};I.dollarBraceL.updateContext=function(){this.context.push(xt.b_tmpl),this.exprAllowed=!0};I.parenL.updateContext=function(e){var t=e===I._if||e===I._for||e===I._with||e===I._while;this.context.push(t?xt.p_stat:xt.p_expr),this.exprAllowed=!0};I.incDec.updateContext=function(){};I._function.updateContext=I._class.updateContext=function(e){e.beforeExpr&&e!==I._else&&!(e===I.semi&&this.curContext()!==xt.p_stat)&&!(e===I._return&&Xt.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===I.colon||e===I.braceL)&&this.curContext()===xt.b_stat)?this.context.push(xt.f_expr):this.context.push(xt.f_stat),this.exprAllowed=!1};I.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};I.backQuote.updateContext=function(){this.curContext()===xt.q_tmpl?this.context.pop():this.context.push(xt.q_tmpl),this.exprAllowed=!1};I.star.updateContext=function(e){if(e===I._function){var t=this.context.length-1;this.context[t]===xt.f_expr?this.context[t]=xt.f_expr_gen:this.context[t]=xt.f_gen}this.exprAllowed=!0};I.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==I.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var $e=kt.prototype;$e.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case"Identifier":i=r.name;break;case"Literal":i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i==="__proto__"&&a==="init"&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);return}i="$"+i;var s=t[i];if(s){var u;a==="init"?u=this.strict&&s.init||s.get||s.set:u=s.init||s[a],u&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[i]={init:!1,get:!1,set:!1};s[a]=!0}};$e.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===I.comma){var a=this.startNodeAt(n,r);for(a.expressions=[i];this.eat(I.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return i};$e.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,s=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new $s,r=!0);var u=this.start,l=this.startLoc;(this.type===I.parenL||this.type===I.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var c=this.parseMaybeConditional(e,t);if(n&&(c=n.call(this,c,u,l)),this.type.isAssign){var h=this.startNodeAt(u,l);return h.operator=this.value,this.type===I.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===I.eq?this.checkLValPattern(c):this.checkLValSimple(c),h.left=c,this.next(),h.right=this.parseMaybeAssign(e),s>-1&&(t.doubleProto=s),this.finishNode(h,"AssignmentExpression")}else r&&this.checkExpressionErrors(t,!0);return i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),c};$e.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(I.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(I.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return i};$e.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,n,r,-1,e)};$e.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==I._in)&&a>r){var s=this.type===I.logicalOR||this.type===I.logicalAND,u=this.type===I.coalesce;u&&(a=I.logicalAND.binop);var l=this.value;this.next();var c=this.start,h=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),c,h,a,i),d=this.buildBinary(t,n,e,f,l,s||u);return(s&&this.type===I.coalesce||u&&(this.type===I.logicalOR||this.type===I.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(d,t,n,r,i)}return e};$e.buildBinary=function(e,t,n,r,i,a){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,t);return s.left=n,s.operator=i,s.right=r,this.finishNode(s,a?"LogicalExpression":"BinaryExpression")};$e.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,s;if(this.isContextual("await")&&this.canAwait)s=this.parseAwait(r),t=!0;else if(this.type.prefix){var u=this.startNode(),l=this.type===I.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&Hd(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&Uu(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,s=this.finishNode(u,l?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===I.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),s=this.parsePrivateIdent(),this.type!==I._in&&this.unexpected();else{if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(i,a);c.operator=this.value,c.prefix=!1,c.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(c,"UpdateExpression")}}if(!n&&this.eat(I.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return s};function Hd(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Hd(e.expression)}function Uu(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Uu(e.expression)||e.type==="ParenthesizedExpression"&&Uu(e.expression)}$e.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type==="MemberExpression"&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a};$e.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,s=!1;;){var u=this.parseSubscript(e,t,n,r,a,s,i);if(u.optional&&(s=!0),u===e||u.type==="ArrowFunctionExpression"){if(s){var l=this.startNodeAt(t,n);l.expression=u,u=this.finishNode(l,"ChainExpression")}return u}e=u}};$e.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(I.arrow)};$e.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)};$e.parseSubscript=function(e,t,n,r,i,a,s){var u=this.options.ecmaVersion>=11,l=u&&this.eat(I.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(I.bracketL);if(c||l&&this.type!==I.parenL&&this.type!==I.backQuote||this.eat(I.dot)){var h=this.startNodeAt(t,n);h.object=e,c?(h.property=this.parseExpression(),this.expect(I.bracketR)):this.type===I.privateId&&e.type!=="Super"?h.property=this.parsePrivateIdent():h.property=this.parseIdent(this.options.allowReserved!=="never"),h.computed=!!c,u&&(h.optional=l),e=this.finishNode(h,"MemberExpression")}else if(!r&&this.eat(I.parenL)){var f=new $s,d=this.yieldPos,m=this.awaitPos,v=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var x=this.parseExprList(I.parenR,this.options.ecmaVersion>=8,!1,f);if(i&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=d,this.awaitPos=m,this.awaitIdentPos=v,this.parseSubscriptAsyncArrow(t,n,x,s);this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=m||this.awaitPos,this.awaitIdentPos=v||this.awaitIdentPos;var S=this.startNodeAt(t,n);S.callee=e,S.arguments=x,u&&(S.optional=l),e=this.finishNode(S,"CallExpression")}else if(this.type===I.backQuote){(l||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var y=this.startNodeAt(t,n);y.tag=e,y.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(y,"TaggedTemplateExpression")}return e};$e.parseExprAtom=function(e,t,n){this.type===I.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case I._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===I.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==I.dot&&this.type!==I.bracketL&&this.type!==I.parenL&&this.unexpected(),this.finishNode(r,"Super");case I._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case I.name:var a=this.start,s=this.startLoc,u=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(I._function))return this.overrideContext(xt.f_expr),this.parseFunction(this.startNodeAt(a,s),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(I.arrow))return this.parseArrowExpression(this.startNodeAt(a,s),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===I.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return l=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(I.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,s),[l],!0,t)}return l;case I.regexp:var c=this.value;return r=this.parseLiteral(c.value),r.regex={pattern:c.pattern,flags:c.flags},r;case I.num:case I.string:return this.parseLiteral(this.value);case I._null:case I._true:case I._false:return r=this.startNode(),r.value=this.type===I._null?null:this.type===I._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case I.parenL:var h=this.start,f=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(e.parenthesizedAssign=h),e.parenthesizedBind<0&&(e.parenthesizedBind=h)),f;case I.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(I.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case I.braceL:return this.overrideContext(xt.b_expr),this.parseObj(!1,e);case I._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case I._class:return this.parseClass(this.startNode(),!1);case I._new:return this.parseNew();case I.backQuote:return this.parseTemplate();case I._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}};$e.parseExprAtomDefault=function(){this.unexpected()};$e.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===I.parenL&&!e)return this.parseDynamicImport(t);if(this.type===I.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};$e.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(I.parenR)?e.options=null:(this.expect(I.comma),this.afterTrailingComma(I.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(I.parenR)||(this.expect(I.comma),this.afterTrailingComma(I.parenR)||this.unexpected())));else if(!this.eat(I.parenR)){var t=this.start;this.eat(I.comma)&&this.eat(I.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};$e.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};$e.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};$e.parseParenExpression=function(){this.expect(I.parenL);var e=this.parseExpression();return this.expect(I.parenR),e};$e.shouldParseArrow=function(e){return!this.canInsertSemicolon()};$e.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,u=this.startLoc,l=[],c=!0,h=!1,f=new $s,d=this.yieldPos,m=this.awaitPos,v;for(this.yieldPos=0,this.awaitPos=0;this.type!==I.parenR;)if(c?c=!1:this.expect(I.comma),a&&this.afterTrailingComma(I.parenR,!0)){h=!0;break}else if(this.type===I.ellipsis){v=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===I.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,f,this.parseParenItem));var x=this.lastTokEnd,S=this.lastTokEndLoc;if(this.expect(I.parenR),e&&this.shouldParseArrow(l)&&this.eat(I.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=d,this.awaitPos=m,this.parseParenArrowList(n,r,l,t);(!l.length||h)&&this.unexpected(this.lastTokStart),v&&this.unexpected(v),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=m||this.awaitPos,l.length>1?(i=this.startNodeAt(s,u),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",x,S)):i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(n,r);return y.expression=i,this.finishNode(y,"ParenthesizedExpression")}else return i};$e.parseParenItem=function(e){return e};$e.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var xb=[];$e.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===I.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(I.parenL)?e.arguments=this.parseExprList(I.parenR,this.options.ecmaVersion>=8,!1):e.arguments=xb,this.finishNode(e,"NewExpression")};$e.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===I.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,`
15
15
  `),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
16
- `),cooked:this.value},this.next(),n.tail=this.type===I.backQuote,this.finishNode(n,"TemplateElement")};$e.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===I.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(I.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(I.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")};$e.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===I.name||this.type===I.num||this.type===I.string||this.type===I.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===I.star)&&!Xt.test(this.input.slice(this.lastTokEnd,this.start))};$e.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(I.braceR);){if(r)r=!1;else if(this.expect(I.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(I.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};$e.parseProperty=function(e,t){var n=this.startNode(),r,i,a,s;if(this.options.ecmaVersion>=9&&this.eat(I.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===I.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,t),this.type===I.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,s=this.startLoc),e||(r=this.eat(I.star)));var u=this.containsEsc;return this.parsePropertyName(n),!e&&!u&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(I.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,s,t,u),this.finishNode(n,"Property")};$e.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};$e.parsePropertyValue=function(e,t,n,r,i,a,s,u){(n||r)&&this.type===I.colon&&this.unexpected(),this.eat(I.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init"):this.options.ecmaVersion>=6&&this.type===I.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==I.comma&&this.type!==I.braceR&&this.type!==I.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===I.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};$e.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(I.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(I.bracketR),e.key;e.computed=!1}return e.key=this.type===I.num||this.type===I.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};$e.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};$e.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Nl(t,r.generator)|js|(n?Md:0)),this.expect(I.parenL),r.params=this.parseBindingList(I.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")};$e.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(Nl(n,!1)|Rl),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")};$e.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==I.braceL,a=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||u)&&(s=this.strictDirective(this.end),s&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var l=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!a&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Bd),e.body=this.parseBlock(!1,void 0,s&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};$e.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(r.type!=="Identifier")return!1}return!0};$e.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,Ol,t?null:n)}};$e.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(I.comma),t&&this.afterTrailingComma(e))break;var s=void 0;n&&this.type===I.comma?s=null:this.type===I.ellipsis?(s=this.parseSpread(r),r&&this.type===I.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):s=this.parseMaybeAssign(!1,r),i.push(s)}return i};$e.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;if(this.inGenerator&&r==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Bs)&&r==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(r==="arguments"||r==="await")&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf("\\")!==-1)){var i=this.strict?this.reservedWordsStrict:this.reservedWords;i.test(r)&&(!this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))}};$e.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};$e.parseIdentNode=function(){var e=this.startNode();return this.type===I.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=I.name):this.unexpected(),e};$e.parsePrivateIdent=function(){var e=this.startNode();return this.type===I.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};$e.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===I.semi||this.canInsertSemicolon()||this.type!==I.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(I.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};$e.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var cs=kt.prototype;cs.raise=function(e,t){var n=Ld(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r};cs.raiseRecoverable=cs.raise;cs.curPosition=function(){if(this.options.locations)return new Ii(this.curLine,this.pos-this.lineStart)};var ir=kt.prototype,vy=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ir.enterScope=function(e){this.scopeStack.push(new vy(e))};ir.exitScope=function(){this.scopeStack.pop()};ir.treatFunctionsAsVarInScope=function(e){return e.flags&Zr||!this.inModule&&e.flags&Ti};ir.declareName=function(e,t,n){var r=!1;if(t===Bn){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Ti&&delete this.undefinedExports[e]}else if(t===jd){var a=this.currentScope();a.lexical.push(e)}else if(t===Fd){var s=this.currentScope();this.treatFunctionsAsVar?r=s.lexical.indexOf(e)>-1:r=s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var l=this.scopeStack[u];if(l.lexical.indexOf(e)>-1&&!(l.flags&Vd&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){r=!0;break}if(l.var.push(e),this.inModule&&l.flags&Ti&&delete this.undefinedExports[e],l.flags&Bs)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};ir.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};ir.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ir.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Bs|$i|Er))return t}};ir.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Bs|$i|Er)&&!(t.flags&Rl))return t}};var $s=function(t,n,r){this.type="",this.start=n,this.end=0,t.options.locations&&(this.loc=new Fs(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[n,0])},Ui=kt.prototype;Ui.startNode=function(){return new $s(this,this.start,this.startLoc)};Ui.startNodeAt=function(e,t){return new $s(this,e,t)};function Ud(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}Ui.finishNode=function(e,t){return Ud.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Ui.finishNodeAt=function(e,t,n,r){return Ud.call(this,e,t,n,r)};Ui.copyNode=function(e){var t=new $s(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var xy="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",Hd="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Wd=Hd+" Extended_Pictographic",qd=Wd,Kd=qd+" EBase EComp EMod EPres ExtPict",Gd=Kd,by=Gd,yy={9:Hd,10:Wd,11:qd,12:Kd,13:Gd,14:by},wy="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Sy={9:"",10:"",11:"",12:"",13:"",14:wy},yf="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Jd="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Yd=Jd+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Xd=Yd+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Qd=Xd+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Zd=Qd+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Cy=Zd+" "+xy,ky={9:Jd,10:Yd,11:Xd,12:Qd,13:Zd,14:Cy},em={};function Ey(e){var t=em[e]={binary:Yn(yy[e]+" "+yf),binaryOfStrings:Yn(Sy[e]),nonBinary:{General_Category:Yn(yf),Script:Yn(ky[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Vo=0,wf=[9,10,11,12,13,14];Vo<wf.length;Vo+=1){var _y=wf[Vo];Ey(_y)}var Oe=kt.prototype,fs=function(t,n){this.parent=t,this.base=n||this};fs.prototype.separatedFrom=function(t){for(var n=this;n;n=n.parent)for(var r=t;r;r=r.parent)if(n.base===r.base&&n!==r)return!0;return!1};fs.prototype.sibling=function(){return new fs(this.parent,this.base)};var An=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=em[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};An.prototype.reset=function(t,n,r){var i=r.indexOf("v")!==-1,a=r.indexOf("u")!==-1;this.start=t|0,this.source=n+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};An.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};An.prototype.at=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return-1;var a=r.charCodeAt(t);if(!(n||this.switchU)||a<=55295||a>=57344||t+1>=i)return a;var s=r.charCodeAt(t+1);return s>=56320&&s<=57343?(a<<10)+s-56613888:a};An.prototype.nextIndex=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return i;var a=r.charCodeAt(t),s;return!(n||this.switchU)||a<=55295||a>=57344||t+1>=i||(s=r.charCodeAt(t+1))<56320||s>57343?t+1:t+2};An.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};An.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};An.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};An.prototype.eat=function(t,n){return n===void 0&&(n=!1),this.current(n)===t?(this.advance(n),!0):!1};An.prototype.eatChars=function(t,n){n===void 0&&(n=!1);for(var r=this.pos,i=0,a=t;i<a.length;i+=1){var s=a[i],u=this.at(r,n);if(u===-1||u!==s)return!1;r=this.nextIndex(r,n)}return this.pos=r,!0};Oe.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var s=n.charAt(a);t.indexOf(s)===-1&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(s,a+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),s==="u"&&(r=!0),s==="v"&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")};function Iy(e){for(var t in e)return!0;return!1}Oe.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Iy(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};Oe.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}};Oe.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new fs(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};Oe.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};Oe.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};Oe.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1};Oe.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};Oe.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};Oe.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1};Oe.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};Oe.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};Oe.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var s=this.regexp_eatModifiers(e);!n&&!s&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var u=0;u<s.length;u++){var l=s.charAt(u);(s.indexOf(l,u+1)>-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};Oe.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};Oe.regexp_eatModifiers=function(e){for(var t="",n=0;(n=e.current())!==-1&&Ty(n);)t+=Vn(n),e.advance();return t};function Ty(e){return e===105||e===109||e===115}Oe.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};Oe.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};Oe.regexp_eatSyntaxCharacter=function(e){var t=e.current();return tm(t)?(e.lastIntValue=t,e.advance(),!0):!1};function tm(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}Oe.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!tm(n);)e.advance();return e.pos!==t};Oe.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};Oe.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1){var a=i[r];a.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};Oe.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};Oe.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Vn(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Vn(e.lastIntValue);return!0}return!1};Oe.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Ay(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Ay(e){return In(e,!0)||e===36||e===95}Oe.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Py(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Py(e){return Qn(e,!0)||e===36||e===95||e===8204||e===8205}Oe.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};Oe.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1};Oe.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};Oe.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};Oe.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};Oe.regexp_eatZero=function(e){return e.current()===48&&!Us(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};Oe.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};Oe.regexp_eatControlLetter=function(e){var t=e.current();return nm(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function nm(e){return e>=65&&e<=90||e>=97&&e<=122}Oe.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=(i-55296)*1024+(s-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ry(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1};function Ry(e){return e>=0&&e<=1114111}Oe.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};Oe.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var rm=0,Mn=1,fn=2;Oe.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Ny(t))return e.lastIntValue=-1,e.advance(),Mn;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===fn&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return rm};function Ny(e){return e===100||e===68||e===115||e===83||e===119||e===87}Oe.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),Mn}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return rm};Oe.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Qr(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")};Oe.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Mn;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return fn;e.raise("Invalid property name")};Oe.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";im(t=e.current());)e.lastStringValue+=Vn(t),e.advance();return e.lastStringValue!==""};function im(e){return nm(e)||e===95}Oe.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Oy(t=e.current());)e.lastStringValue+=Vn(t),e.advance();return e.lastStringValue!==""};function Oy(e){return im(e)||Us(e)}Oe.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};Oe.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===fn&&e.raise("Negated character class may contain strings"),!0}return!1};Oe.regexp_classContents=function(e){return e.current()===93?Mn:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Mn)};Oe.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise("Invalid character class"),t!==-1&&n!==-1&&t>n&&e.raise("Range out of order in character class")}}};Oe.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||om(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};Oe.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};Oe.regexp_classSetExpression=function(e){var t=Mn,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===fn&&(t=fn);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==fn&&(t=Mn);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===fn&&(t=fn)}};Oe.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};Oe.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Mn:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};Oe.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===fn&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};Oe.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null};Oe.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===fn&&(t=fn);return t};Oe.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Mn:fn};Oe.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&Ly(n)||Dy(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function Ly(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Dy(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}Oe.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Vy(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Vy(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}Oe.regexp_eatClassControlLetter=function(e){var t=e.current();return Us(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};Oe.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};Oe.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Us(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Us(e){return e>=48&&e<=57}Oe.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;am(n=e.current());)e.lastIntValue=16*e.lastIntValue+sm(n),e.advance();return e.pos!==t};function am(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function sm(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}Oe.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1};Oe.regexp_eatOctalDigit=function(e){var t=e.current();return om(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function om(e){return e>=48&&e<=55}Oe.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!am(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+sm(i),e.advance()}return!0};var Dl=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Fs(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Ge=kt.prototype;Ge.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Dl(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};Ge.getToken=function(){return this.next(),new Dl(this)};typeof Symbol<"u"&&(Ge[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===I.eof,value:t}}}});Ge.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(I.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};Ge.readToken=function(e){return In(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};Ge.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};Ge.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=Rd(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};Ge.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Xr(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())};Ge.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Nd.test(String.fromCharCode(e)))++this.pos;else break e}}};Ge.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)};Ge.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(I.ellipsis)):(++this.pos,this.finishToken(I.dot))};Ge.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(I.assign,2):this.finishOp(I.slash,1)};Ge.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?I.star:I.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=I.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(I.assign,n+1):this.finishOp(r,n)};Ge.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(I.assign,3)}return this.finishOp(e===124?I.logicalOR:I.logicalAND,2)}return t===61?this.finishOp(I.assign,2):this.finishOp(e===124?I.bitwiseOR:I.bitwiseAND,1)};Ge.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(I.assign,2):this.finishOp(I.bitwiseXOR,1)};Ge.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Xt.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(I.incDec,2):t===61?this.finishOp(I.assign,2):this.finishOp(I.plusMin,1)};Ge.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(I.assign,n+1):this.finishOp(I.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(I.relational,n))};Ge.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(I.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(I.arrow)):this.finishOp(e===61?I.eq:I.prefix,1)};Ge.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(I.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(I.assign,3)}return this.finishOp(I.coalesce,2)}}return this.finishOp(I.question,1)};Ge.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),In(t,!0)||t===92))return this.finishToken(I.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Vn(t)+"'")};Ge.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(I.parenL);case 41:return++this.pos,this.finishToken(I.parenR);case 59:return++this.pos,this.finishToken(I.semi);case 44:return++this.pos,this.finishToken(I.comma);case 91:return++this.pos,this.finishToken(I.bracketL);case 93:return++this.pos,this.finishToken(I.bracketR);case 123:return++this.pos,this.finishToken(I.braceL);case 125:return++this.pos,this.finishToken(I.braceR);case 58:return++this.pos,this.finishToken(I.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(I.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(I.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Vn(e)+"'")};Ge.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};Ge.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Xt.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(a);var u=this.regexpState||(this.regexpState=new An(this));u.reset(n,i,s),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var l=null;try{l=new RegExp(i,s)}catch{}return this.finishToken(I.regexp,{pattern:i,flags:s,value:l})};Ge.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,s=0,u=0,l=0,c=t??1/0;l<c;++l,++this.pos){var h=this.input.charCodeAt(this.pos),f=void 0;if(r&&h===95){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),l===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=h;continue}if(h>=97?f=h-97+10:h>=65?f=h-65+10:h>=48&&h<=57?f=h-48:f=1/0,f>=e)break;u=h,s=s*e+f}return r&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:s};function My(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function um(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}Ge.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=um(this.input.slice(t,this.pos)),++this.pos):In(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(I.num,n)};Ge.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=um(this.input.slice(t,this.pos));return++this.pos,In(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(I.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),In(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=My(this.input.slice(t,this.pos),n);return this.finishToken(I.num,a)};Ge.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};Ge.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Xr(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(I.string,t)};var lm={};Ge.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===lm)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};Ge.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw lm;this.raise(e,t)};Ge.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===I.template||this.type===I.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(I.dollarBraceL)):(++this.pos,this.finishToken(I.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(I.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Xr(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
16
+ `),cooked:this.value},this.next(),n.tail=this.type===I.backQuote,this.finishNode(n,"TemplateElement")};$e.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===I.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(I.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(I.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")};$e.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===I.name||this.type===I.num||this.type===I.string||this.type===I.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===I.star)&&!Xt.test(this.input.slice(this.lastTokEnd,this.start))};$e.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(I.braceR);){if(r)r=!1;else if(this.expect(I.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(I.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")};$e.parseProperty=function(e,t){var n=this.startNode(),r,i,a,s;if(this.options.ecmaVersion>=9&&this.eat(I.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===I.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(n,"RestElement")):(n.argument=this.parseMaybeAssign(!1,t),this.type===I.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,"SpreadElement"));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,s=this.startLoc),e||(r=this.eat(I.star)));var u=this.containsEsc;return this.parsePropertyName(n),!e&&!u&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(I.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,s,t,u),this.finishNode(n,"Property")};$e.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind==="get"?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};$e.parsePropertyValue=function(e,t,n,r,i,a,s,u){(n||r)&&this.type===I.colon&&this.unexpected(),this.eat(I.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init"):this.options.ecmaVersion>=6&&this.type===I.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==I.comma&&this.type!==I.braceR&&this.type!==I.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===I.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};$e.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(I.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(I.bracketR),e.key;e.computed=!1}return e.key=this.type===I.num||this.type===I.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};$e.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};$e.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ll(t,r.generator)|Bs|(n?jd:0)),this.expect(I.parenL),r.params=this.parseBindingList(I.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")};$e.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(Ll(n,!1)|Ol),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")};$e.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==I.braceL,a=this.strict,s=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||u)&&(s=this.strictDirective(this.end),s&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var l=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!a&&!s&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,$d),e.body=this.parseBlock(!1,void 0,s&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};$e.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(r.type!=="Identifier")return!1}return!0};$e.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,Dl,t?null:n)}};$e.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(I.comma),t&&this.afterTrailingComma(e))break;var s=void 0;n&&this.type===I.comma?s=null:this.type===I.ellipsis?(s=this.parseSpread(r),r&&this.type===I.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):s=this.parseMaybeAssign(!1,r),i.push(s)}return i};$e.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;if(this.inGenerator&&r==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&zs)&&r==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(r==="arguments"||r==="await")&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf("\\")!==-1)){var i=this.strict?this.reservedWordsStrict:this.reservedWords;i.test(r)&&(!this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))}};$e.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};$e.parseIdentNode=function(){var e=this.startNode();return this.type===I.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=I.name):this.unexpected(),e};$e.parsePrivateIdent=function(){var e=this.startNode();return this.type===I.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};$e.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===I.semi||this.canInsertSemicolon()||this.type!==I.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(I.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};$e.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var fs=kt.prototype;fs.raise=function(e,t){var n=Vd(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r};fs.raiseRecoverable=fs.raise;fs.curPosition=function(){if(this.options.locations)return new Ii(this.curLine,this.pos-this.lineStart)};var ar=kt.prototype,yb=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ar.enterScope=function(e){this.scopeStack.push(new yb(e))};ar.exitScope=function(){this.scopeStack.pop()};ar.treatFunctionsAsVarInScope=function(e){return e.flags&Zr||!this.inModule&&e.flags&Ti};ar.declareName=function(e,t,n){var r=!1;if(t===Bn){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Ti&&delete this.undefinedExports[e]}else if(t===zd){var a=this.currentScope();a.lexical.push(e)}else if(t===Bd){var s=this.currentScope();this.treatFunctionsAsVar?r=s.lexical.indexOf(e)>-1:r=s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var l=this.scopeStack[u];if(l.lexical.indexOf(e)>-1&&!(l.flags&Fd&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){r=!0;break}if(l.var.push(e),this.inModule&&l.flags&Ti&&delete this.undefinedExports[e],l.flags&zs)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")};ar.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};ar.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ar.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(zs|$i|Er))return t}};ar.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(zs|$i|Er)&&!(t.flags&Ol))return t}};var Us=function(t,n,r){this.type="",this.start=n,this.end=0,t.options.locations&&(this.loc=new js(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[n,0])},Ui=kt.prototype;Ui.startNode=function(){return new Us(this,this.start,this.startLoc)};Ui.startNodeAt=function(e,t){return new Us(this,e,t)};function Wd(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}Ui.finishNode=function(e,t){return Wd.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Ui.finishNodeAt=function(e,t,n,r){return Wd.call(this,e,t,n,r)};Ui.copyNode=function(e){var t=new Us(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var bb="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",qd="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Kd=qd+" Extended_Pictographic",Gd=Kd,Jd=Gd+" EBase EComp EMod EPres ExtPict",Yd=Jd,wb=Yd,Sb={9:qd,10:Kd,11:Gd,12:Jd,13:Yd,14:wb},Cb="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",kb={9:"",10:"",11:"",12:"",13:"",14:Cb},Sf="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Xd="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Qd=Xd+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Zd=Qd+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",em=Zd+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",tm=em+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Eb=tm+" "+bb,_b={9:Xd,10:Qd,11:Zd,12:em,13:tm,14:Eb},nm={};function Ib(e){var t=nm[e]={binary:Yn(Sb[e]+" "+Sf),binaryOfStrings:Yn(kb[e]),nonBinary:{General_Category:Yn(Sf),Script:Yn(_b[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Fo=0,Cf=[9,10,11,12,13,14];Fo<Cf.length;Fo+=1){var Tb=Cf[Fo];Ib(Tb)}var Oe=kt.prototype,hs=function(t,n){this.parent=t,this.base=n||this};hs.prototype.separatedFrom=function(t){for(var n=this;n;n=n.parent)for(var r=t;r;r=r.parent)if(n.base===r.base&&n!==r)return!0;return!1};hs.prototype.sibling=function(){return new hs(this.parent,this.base)};var An=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=nm[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};An.prototype.reset=function(t,n,r){var i=r.indexOf("v")!==-1,a=r.indexOf("u")!==-1;this.start=t|0,this.source=n+"",this.flags=r,i&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=a&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=a&&this.parser.options.ecmaVersion>=9)};An.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};An.prototype.at=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return-1;var a=r.charCodeAt(t);if(!(n||this.switchU)||a<=55295||a>=57344||t+1>=i)return a;var s=r.charCodeAt(t+1);return s>=56320&&s<=57343?(a<<10)+s-56613888:a};An.prototype.nextIndex=function(t,n){n===void 0&&(n=!1);var r=this.source,i=r.length;if(t>=i)return i;var a=r.charCodeAt(t),s;return!(n||this.switchU)||a<=55295||a>=57344||t+1>=i||(s=r.charCodeAt(t+1))<56320||s>57343?t+1:t+2};An.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};An.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};An.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};An.prototype.eat=function(t,n){return n===void 0&&(n=!1),this.current(n)===t?(this.advance(n),!0):!1};An.prototype.eatChars=function(t,n){n===void 0&&(n=!1);for(var r=this.pos,i=0,a=t;i<a.length;i+=1){var s=a[i],u=this.at(r,n);if(u===-1||u!==s)return!1;r=this.nextIndex(r,n)}return this.pos=r,!0};Oe.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var s=n.charAt(a);t.indexOf(s)===-1&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(s,a+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),s==="u"&&(r=!0),s==="v"&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")};function Ab(e){for(var t in e)return!0;return!1}Oe.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Ab(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};Oe.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}};Oe.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new hs(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};Oe.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};Oe.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};Oe.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1};Oe.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};Oe.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};Oe.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1};Oe.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};Oe.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};Oe.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var s=this.regexp_eatModifiers(e);!n&&!s&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var u=0;u<s.length;u++){var l=s.charAt(u);(s.indexOf(l,u+1)>-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};Oe.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};Oe.regexp_eatModifiers=function(e){for(var t="",n=0;(n=e.current())!==-1&&Pb(n);)t+=Vn(n),e.advance();return t};function Pb(e){return e===105||e===109||e===115}Oe.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};Oe.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};Oe.regexp_eatSyntaxCharacter=function(e){var t=e.current();return rm(t)?(e.lastIntValue=t,e.advance(),!0):!1};function rm(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}Oe.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!rm(n);)e.advance();return e.pos!==t};Oe.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};Oe.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1){var a=i[r];a.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};Oe.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};Oe.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Vn(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Vn(e.lastIntValue);return!0}return!1};Oe.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Rb(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Rb(e){return In(e,!0)||e===36||e===95}Oe.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),Nb(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function Nb(e){return Qn(e,!0)||e===36||e===95||e===8204||e===8205}Oe.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};Oe.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1};Oe.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};Oe.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};Oe.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};Oe.regexp_eatZero=function(e){return e.current()===48&&!Hs(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};Oe.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};Oe.regexp_eatControlLetter=function(e){var t=e.current();return im(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function im(e){return e>=65&&e<=90||e>=97&&e<=122}Oe.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=(i-55296)*1024+(s-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Ob(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1};function Ob(e){return e>=0&&e<=1114111}Oe.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};Oe.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var am=0,Mn=1,fn=2;Oe.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Lb(t))return e.lastIntValue=-1,e.advance(),Mn;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===fn&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return am};function Lb(e){return e===100||e===68||e===115||e===83||e===119||e===87}Oe.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),Mn}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return am};Oe.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){Qr(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")};Oe.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Mn;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return fn;e.raise("Invalid property name")};Oe.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";sm(t=e.current());)e.lastStringValue+=Vn(t),e.advance();return e.lastStringValue!==""};function sm(e){return im(e)||e===95}Oe.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Db(t=e.current());)e.lastStringValue+=Vn(t),e.advance();return e.lastStringValue!==""};function Db(e){return sm(e)||Hs(e)}Oe.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};Oe.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===fn&&e.raise("Negated character class may contain strings"),!0}return!1};Oe.regexp_classContents=function(e){return e.current()===93?Mn:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),Mn)};Oe.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise("Invalid character class"),t!==-1&&n!==-1&&t>n&&e.raise("Range out of order in character class")}}};Oe.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||lm(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};Oe.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};Oe.regexp_classSetExpression=function(e){var t=Mn,n;if(!this.regexp_eatClassSetRange(e))if(n=this.regexp_eatClassSetOperand(e)){n===fn&&(t=fn);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==fn&&(t=Mn);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===fn&&(t=fn)}};Oe.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};Oe.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?Mn:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};Oe.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===fn&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};Oe.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null};Oe.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===fn&&(t=fn);return t};Oe.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?Mn:fn};Oe.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&Vb(n)||Mb(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function Vb(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Mb(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}Oe.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Fb(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Fb(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}Oe.regexp_eatClassControlLetter=function(e){var t=e.current();return Hs(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};Oe.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};Oe.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;Hs(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function Hs(e){return e>=48&&e<=57}Oe.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;om(n=e.current());)e.lastIntValue=16*e.lastIntValue+um(n),e.advance();return e.pos!==t};function om(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function um(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}Oe.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+n*8+e.lastIntValue:e.lastIntValue=t*8+n}else e.lastIntValue=t;return!0}return!1};Oe.regexp_eatOctalDigit=function(e){var t=e.current();return lm(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function lm(e){return e>=48&&e<=55}Oe.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!om(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+um(i),e.advance()}return!0};var Ml=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new js(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},Ge=kt.prototype;Ge.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Ml(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};Ge.getToken=function(){return this.next(),new Ml(this)};typeof Symbol<"u"&&(Ge[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===I.eof,value:t}}}});Ge.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(I.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};Ge.readToken=function(e){return In(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};Ge.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};Ge.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(n===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=Od(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())};Ge.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Xr(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())};Ge.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Ld.test(String.fromCharCode(e)))++this.pos;else break e}}};Ge.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)};Ge.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(I.ellipsis)):(++this.pos,this.finishToken(I.dot))};Ge.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(I.assign,2):this.finishOp(I.slash,1)};Ge.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?I.star:I.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=I.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(I.assign,n+1):this.finishOp(r,n)};Ge.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(I.assign,3)}return this.finishOp(e===124?I.logicalOR:I.logicalAND,2)}return t===61?this.finishOp(I.assign,2):this.finishOp(e===124?I.bitwiseOR:I.bitwiseAND,1)};Ge.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(I.assign,2):this.finishOp(I.bitwiseXOR,1)};Ge.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Xt.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(I.incDec,2):t===61?this.finishOp(I.assign,2):this.finishOp(I.plusMin,1)};Ge.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(I.assign,n+1):this.finishOp(I.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(I.relational,n))};Ge.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(I.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(I.arrow)):this.finishOp(e===61?I.eq:I.prefix,1)};Ge.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(I.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(I.assign,3)}return this.finishOp(I.coalesce,2)}}return this.finishOp(I.question,1)};Ge.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),In(t,!0)||t===92))return this.finishToken(I.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Vn(t)+"'")};Ge.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(I.parenL);case 41:return++this.pos,this.finishToken(I.parenR);case 59:return++this.pos,this.finishToken(I.semi);case 44:return++this.pos,this.finishToken(I.comma);case 91:return++this.pos,this.finishToken(I.bracketL);case 93:return++this.pos,this.finishToken(I.bracketR);case 123:return++this.pos,this.finishToken(I.braceL);case 125:return++this.pos,this.finishToken(I.braceR);case 58:return++this.pos,this.finishToken(I.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(I.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(I.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Vn(e)+"'")};Ge.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};Ge.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Xt.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(a);var u=this.regexpState||(this.regexpState=new An(this));u.reset(n,i,s),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var l=null;try{l=new RegExp(i,s)}catch{}return this.finishToken(I.regexp,{pattern:i,flags:s,value:l})};Ge.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,s=0,u=0,l=0,c=t??1/0;l<c;++l,++this.pos){var h=this.input.charCodeAt(this.pos),f=void 0;if(r&&h===95){i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),l===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=h;continue}if(h>=97?f=h-97+10:h>=65?f=h-65+10:h>=48&&h<=57?f=h-48:f=1/0,f>=e)break;u=h,s=s*e+f}return r&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||t!=null&&this.pos-a!==t?null:s};function jb(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function cm(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}Ge.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=cm(this.input.slice(t,this.pos)),++this.pos):In(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(I.num,n)};Ge.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=cm(this.input.slice(t,this.pos));return++this.pos,In(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(I.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),In(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=jb(this.input.slice(t,this.pos),n);return this.finishToken(I.num,a)};Ge.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,"Code point out of bounds")}else t=this.readHexChar(4);return t};Ge.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Xr(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(I.string,t)};var fm={};Ge.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===fm)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};Ge.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw fm;this.raise(e,t)};Ge.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===I.template||this.type===I.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(I.dollarBraceL)):(++this.pos,this.finishToken(I.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(I.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Xr(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
17
17
  `;break;default:e+=String.fromCharCode(n);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};Ge.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(I.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
18
18
  `&&++this.pos;case`
19
19
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};Ge.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
20
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Vn(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Xr(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};Ge.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,"Bad character escape sequence"),n};Ge.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(Qn(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var s=this.readCodePoint();(t?In:Qn)(s,r)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=Vn(s),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};Ge.readWord=function(){var e=this.readWord1(),t=I.name;return this.keywords.test(e)&&(t=Al[e]),this.finishToken(t,e)};var Fy="8.15.0";kt.acorn={Parser:kt,version:Fy,defaultOptions:ju,Position:Ii,SourceLocation:Fs,getLineInfo:Ld,Node:$s,TokenType:Ze,tokTypes:I,keywordTypes:Al,TokContext:vn,tokContexts:xt,isIdentifierChar:Qn,isIdentifierStart:In,Token:Dl,isNewLine:Xr,lineBreak:Xt,lineBreakG:sy,nonASCIIwhitespace:Nd};var Ca=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jy(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Mo={exports:{}},Fo,Sf;function By(){return Sf||(Sf=1,Fo={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Fo}var pi={exports:{}},zy=pi.exports,Cf;function kf(){return Cf||(Cf=1,(function(e,t){(function(n,r){r(t)})(zy,(function(n){var r=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],i=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],a="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",s="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",u={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},l="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",c={5:l,"5module":l+" export import",6:l+" const class extends export import super"},h=/^in(stanceof)?$/,f=new RegExp("["+s+"]"),d=new RegExp("["+s+a+"]");function m(o,p){for(var y=65536,C=0;C<p.length;C+=2){if(y+=p[C],y>o)return!1;if(y+=p[C+1],y>=o)return!0}return!1}function v(o,p){return o<65?o===36:o<91?!0:o<97?o===95:o<123?!0:o<=65535?o>=170&&f.test(String.fromCharCode(o)):p===!1?!1:m(o,i)}function x(o,p){return o<48?o===36:o<58?!0:o<65?!1:o<91?!0:o<97?o===95:o<123?!0:o<=65535?o>=170&&d.test(String.fromCharCode(o)):p===!1?!1:m(o,i)||m(o,r)}var S=function(p,y){y===void 0&&(y={}),this.label=p,this.keyword=y.keyword,this.beforeExpr=!!y.beforeExpr,this.startsExpr=!!y.startsExpr,this.isLoop=!!y.isLoop,this.isAssign=!!y.isAssign,this.prefix=!!y.prefix,this.postfix=!!y.postfix,this.binop=y.binop||null,this.updateContext=null};function b(o,p){return new S(o,{beforeExpr:!0,binop:p})}var k={beforeExpr:!0},_={startsExpr:!0},P={};function w(o,p){return p===void 0&&(p={}),p.keyword=o,P[o]=new S(o,p)}var g={num:new S("num",_),regexp:new S("regexp",_),string:new S("string",_),name:new S("name",_),privateId:new S("privateId",_),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",k),semi:new S(";",k),colon:new S(":",k),dot:new S("."),question:new S("?",k),questionDot:new S("?."),arrow:new S("=>",k),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",k),backQuote:new S("`",_),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:b("||",1),logicalAND:b("&&",2),bitwiseOR:b("|",3),bitwiseXOR:b("^",4),bitwiseAND:b("&",5),equality:b("==/!=/===/!==",6),relational:b("</>/<=/>=",7),bitShift:b("<</>>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:b("%",10),star:b("*",10),slash:b("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:b("??",1),_break:w("break"),_case:w("case",k),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",k),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",k),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",_),_if:w("if"),_return:w("return",k),_switch:w("switch"),_throw:w("throw",k),_try:w("try"),_var:w("var"),_const:w("const"),_while:w("while",{isLoop:!0}),_with:w("with"),_new:w("new",{beforeExpr:!0,startsExpr:!0}),_this:w("this",_),_super:w("super",_),_class:w("class",_),_extends:w("extends",k),_export:w("export"),_import:w("import",_),_null:w("null",_),_true:w("true",_),_false:w("false",_),_in:w("in",{beforeExpr:!0,binop:7}),_instanceof:w("instanceof",{beforeExpr:!0,binop:7}),_typeof:w("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,D=new RegExp(E.source,"g");function j(o){return o===10||o===13||o===8232||o===8233}function N(o,p,y){y===void 0&&(y=o.length);for(var C=p;C<y;C++){var O=o.charCodeAt(C);if(j(O))return C<y-1&&O===13&&o.charCodeAt(C+1)===10?C+2:C+1}return-1}var B=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,G=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,U=Object.prototype,re=U.hasOwnProperty,ee=U.toString,se=Object.hasOwn||(function(o,p){return re.call(o,p)}),he=Array.isArray||(function(o){return ee.call(o)==="[object Array]"}),ge=Object.create(null);function ye(o){return ge[o]||(ge[o]=new RegExp("^(?:"+o.replace(/ /g,"|")+")$"))}function L(o){return o<=65535?String.fromCharCode(o):(o-=65536,String.fromCharCode((o>>10)+55296,(o&1023)+56320))}var J=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ue=function(p,y){this.line=p,this.column=y};ue.prototype.offset=function(p){return new ue(this.line,this.column+p)};var A=function(p,y,C){this.start=y,this.end=C,p.sourceFile!==null&&(this.source=p.sourceFile)};function xe(o,p){for(var y=1,C=0;;){var O=N(o,C,p);if(O<0)return new ue(y,p-C);++y,C=O}}var ie={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},fe=!1;function X(o){var p={};for(var y in ie)p[y]=o&&se(o,y)?o[y]:ie[y];if(p.ecmaVersion==="latest"?p.ecmaVersion=1e8:p.ecmaVersion==null?(!fe&&typeof console=="object"&&console.warn&&(fe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
21
- Defaulting to 2020, but this will stop working in the future.`)),p.ecmaVersion=11):p.ecmaVersion>=2015&&(p.ecmaVersion-=2009),p.allowReserved==null&&(p.allowReserved=p.ecmaVersion<5),(!o||o.allowHashBang==null)&&(p.allowHashBang=p.ecmaVersion>=14),he(p.onToken)){var C=p.onToken;p.onToken=function(O){return C.push(O)}}return he(p.onComment)&&(p.onComment=H(p,p.onComment)),p}function H(o,p){return function(y,C,O,q,Y,we){var Ce={type:y?"Block":"Line",value:C,start:O,end:q};o.locations&&(Ce.loc=new A(this,Y,we)),o.ranges&&(Ce.range=[O,q]),p.push(Ce)}}var te=1,me=2,oe=4,K=8,Z=16,Q=32,W=64,ae=128,ve=256,Ee=512,_e=te|me|ve;function Ie(o,p){return me|(o?oe:0)|(p?K:0)}var Me=0,ke=1,Ne=2,Fe=3,bt=4,le=5,ce=function(p,y,C){this.options=p=X(p),this.sourceFile=p.sourceFile,this.keywords=ye(c[p.ecmaVersion>=6?6:p.sourceType==="module"?"5module":5]);var O="";p.allowReserved!==!0&&(O=u[p.ecmaVersion>=6?6:p.ecmaVersion===5?5:3],p.sourceType==="module"&&(O+=" await")),this.reservedWords=ye(O);var q=(O?O+" ":"")+u.strict;this.reservedWordsStrict=ye(q),this.reservedWordsStrictBind=ye(q+" "+u.strictBind),this.input=String(y),this.containsEsc=!1,C?(this.pos=C,this.lineStart=this.input.lastIndexOf(`
22
- `,C-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(E).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=g.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=p.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&p.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(te),this.regexpState=null,this.privateNameStack=[]},R={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};ce.prototype.parse=function(){var p=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(p)},R.inFunction.get=function(){return(this.currentVarScope().flags&me)>0},R.inGenerator.get=function(){return(this.currentVarScope().flags&K)>0},R.inAsync.get=function(){return(this.currentVarScope().flags&oe)>0},R.canAwait.get=function(){for(var o=this.scopeStack.length-1;o>=0;o--){var p=this.scopeStack[o],y=p.flags;if(y&(ve|Ee))return!1;if(y&me)return(y&oe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},R.allowSuper.get=function(){var o=this.currentThisScope(),p=o.flags;return(p&W)>0||this.options.allowSuperOutsideMethod},R.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ae)>0},R.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},R.allowNewDotTarget.get=function(){for(var o=this.scopeStack.length-1;o>=0;o--){var p=this.scopeStack[o],y=p.flags;if(y&(ve|Ee)||y&me&&!(y&Z))return!0}return!1},R.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ve)>0},ce.extend=function(){for(var p=[],y=arguments.length;y--;)p[y]=arguments[y];for(var C=this,O=0;O<p.length;O++)C=p[O](C);return C},ce.parse=function(p,y){return new this(y,p).parse()},ce.parseExpressionAt=function(p,y,C){var O=new this(C,p,y);return O.nextToken(),O.parseExpression()},ce.tokenizer=function(p,y){return new this(y,p)},Object.defineProperties(ce.prototype,R);var Ve=ce.prototype,Ye=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Ve.strictDirective=function(o){if(this.options.ecmaVersion<5)return!1;for(;;){G.lastIndex=o,o+=G.exec(this.input)[0].length;var p=Ye.exec(this.input.slice(o));if(!p)return!1;if((p[1]||p[2])==="use strict"){G.lastIndex=o+p[0].length;var y=G.exec(this.input),C=y.index+y[0].length,O=this.input.charAt(C);return O===";"||O==="}"||E.test(y[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(O)||O==="!"&&this.input.charAt(C+1)==="=")}o+=p[0].length,G.lastIndex=o,o+=G.exec(this.input)[0].length,this.input[o]===";"&&o++}},Ve.eat=function(o){return this.type===o?(this.next(),!0):!1},Ve.isContextual=function(o){return this.type===g.name&&this.value===o&&!this.containsEsc},Ve.eatContextual=function(o){return this.isContextual(o)?(this.next(),!0):!1},Ve.expectContextual=function(o){this.eatContextual(o)||this.unexpected()},Ve.canInsertSemicolon=function(){return this.type===g.eof||this.type===g.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))},Ve.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ve.semicolon=function(){!this.eat(g.semi)&&!this.insertSemicolon()&&this.unexpected()},Ve.afterTrailingComma=function(o,p){if(this.type===o)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),p||this.next(),!0},Ve.expect=function(o){this.eat(o)||this.unexpected()},Ve.unexpected=function(o){this.raise(o??this.start,"Unexpected token")};var yt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ve.checkPatternErrors=function(o,p){if(o){o.trailingComma>-1&&this.raiseRecoverable(o.trailingComma,"Comma is not permitted after the rest element");var y=p?o.parenthesizedAssign:o.parenthesizedBind;y>-1&&this.raiseRecoverable(y,p?"Assigning to rvalue":"Parenthesized pattern")}},Ve.checkExpressionErrors=function(o,p){if(!o)return!1;var y=o.shorthandAssign,C=o.doubleProto;if(!p)return y>=0||C>=0;y>=0&&this.raise(y,"Shorthand property assignments are valid only in destructuring patterns"),C>=0&&this.raiseRecoverable(C,"Redefinition of __proto__ property")},Ve.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Ve.isSimpleAssignTarget=function(o){return o.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(o.expression):o.type==="Identifier"||o.type==="MemberExpression"};var Te=ce.prototype;Te.parseTopLevel=function(o){var p=Object.create(null);for(o.body||(o.body=[]);this.type!==g.eof;){var y=this.parseStatement(null,!0,p);o.body.push(y)}if(this.inModule)for(var C=0,O=Object.keys(this.undefinedExports);C<O.length;C+=1){var q=O[C];this.raiseRecoverable(this.undefinedExports[q].start,"Export '"+q+"' is not defined")}return this.adaptDirectivePrologue(o.body),this.next(),o.sourceType=this.options.sourceType,this.finishNode(o,"Program")};var Lt={kind:"loop"},Rn={kind:"switch"};Te.isLet=function(o){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;G.lastIndex=this.pos;var p=G.exec(this.input),y=this.pos+p[0].length,C=this.input.charCodeAt(y);if(C===91||C===92)return!0;if(o)return!1;if(C===123||C>55295&&C<56320)return!0;if(v(C,!0)){for(var O=y+1;x(C=this.input.charCodeAt(O),!0);)++O;if(C===92||C>55295&&C<56320)return!0;var q=this.input.slice(y,O);if(!h.test(q))return!0}return!1},Te.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;G.lastIndex=this.pos;var o=G.exec(this.input),p=this.pos+o[0].length,y;return!E.test(this.input.slice(this.pos,p))&&this.input.slice(p,p+8)==="function"&&(p+8===this.input.length||!(x(y=this.input.charCodeAt(p+8))||y>55295&&y<56320))},Te.isUsingKeyword=function(o,p){if(this.options.ecmaVersion<17||!this.isContextual(o?"await":"using"))return!1;G.lastIndex=this.pos;var y=G.exec(this.input),C=this.pos+y[0].length;if(E.test(this.input.slice(this.pos,C)))return!1;if(o){var O=C+5,q;if(this.input.slice(C,O)!=="using"||O===this.input.length||x(q=this.input.charCodeAt(O))||q>55295&&q<56320)return!1;G.lastIndex=O;var Y=G.exec(this.input);if(Y&&E.test(this.input.slice(O,O+Y[0].length)))return!1}if(p){var we=C+2,Ce;if(this.input.slice(C,we)==="of"&&(we===this.input.length||!x(Ce=this.input.charCodeAt(we))&&!(Ce>55295&&Ce<56320)))return!1}var je=this.input.charCodeAt(C);return v(je,!0)||je===92},Te.isAwaitUsing=function(o){return this.isUsingKeyword(!0,o)},Te.isUsing=function(o){return this.isUsingKeyword(!1,o)},Te.parseStatement=function(o,p,y){var C=this.type,O=this.startNode(),q;switch(this.isLet(o)&&(C=g._var,q="let"),C){case g._break:case g._continue:return this.parseBreakContinueStatement(O,C.keyword);case g._debugger:return this.parseDebuggerStatement(O);case g._do:return this.parseDoStatement(O);case g._for:return this.parseForStatement(O);case g._function:return o&&(this.strict||o!=="if"&&o!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(O,!1,!o);case g._class:return o&&this.unexpected(),this.parseClass(O,!0);case g._if:return this.parseIfStatement(O);case g._return:return this.parseReturnStatement(O);case g._switch:return this.parseSwitchStatement(O);case g._throw:return this.parseThrowStatement(O);case g._try:return this.parseTryStatement(O);case g._const:case g._var:return q=q||this.value,o&&q!=="var"&&this.unexpected(),this.parseVarStatement(O,q);case g._while:return this.parseWhileStatement(O);case g._with:return this.parseWithStatement(O);case g.braceL:return this.parseBlock(!0,O);case g.semi:return this.parseEmptyStatement(O);case g._export:case g._import:if(this.options.ecmaVersion>10&&C===g._import){G.lastIndex=this.pos;var Y=G.exec(this.input),we=this.pos+Y[0].length,Ce=this.input.charCodeAt(we);if(Ce===40||Ce===46)return this.parseExpressionStatement(O,this.parseExpression())}return this.options.allowImportExportEverywhere||(p||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),C===g._import?this.parseImport(O):this.parseExport(O,y);default:if(this.isAsyncFunction())return o&&this.unexpected(),this.next(),this.parseFunctionStatement(O,!0,!o);var je=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(je)return p&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),je==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(O,!1,je),this.semicolon(),this.finishNode(O,"VariableDeclaration");var Ue=this.value,ot=this.parseExpression();return C===g.name&&ot.type==="Identifier"&&this.eat(g.colon)?this.parseLabeledStatement(O,Ue,ot,o):this.parseExpressionStatement(O,ot)}},Te.parseBreakContinueStatement=function(o,p){var y=p==="break";this.next(),this.eat(g.semi)||this.insertSemicolon()?o.label=null:this.type!==g.name?this.unexpected():(o.label=this.parseIdent(),this.semicolon());for(var C=0;C<this.labels.length;++C){var O=this.labels[C];if((o.label==null||O.name===o.label.name)&&(O.kind!=null&&(y||O.kind==="loop")||o.label&&y))break}return C===this.labels.length&&this.raise(o.start,"Unsyntactic "+p),this.finishNode(o,y?"BreakStatement":"ContinueStatement")},Te.parseDebuggerStatement=function(o){return this.next(),this.semicolon(),this.finishNode(o,"DebuggerStatement")},Te.parseDoStatement=function(o){return this.next(),this.labels.push(Lt),o.body=this.parseStatement("do"),this.labels.pop(),this.expect(g._while),o.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(g.semi):this.semicolon(),this.finishNode(o,"DoWhileStatement")},Te.parseForStatement=function(o){this.next();var p=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Lt),this.enterScope(0),this.expect(g.parenL),this.type===g.semi)return p>-1&&this.unexpected(p),this.parseFor(o,null);var y=this.isLet();if(this.type===g._var||this.type===g._const||y){var C=this.startNode(),O=y?"let":this.value;return this.next(),this.parseVar(C,!0,O),this.finishNode(C,"VariableDeclaration"),this.parseForAfterInit(o,C,p)}var q=this.isContextual("let"),Y=!1,we=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(we){var Ce=this.startNode();return this.next(),we==="await using"&&this.next(),this.parseVar(Ce,!0,we),this.finishNode(Ce,"VariableDeclaration"),this.parseForAfterInit(o,Ce,p)}var je=this.containsEsc,Ue=new yt,ot=this.start,_t=p>-1?this.parseExprSubscripts(Ue,"await"):this.parseExpression(!0,Ue);return this.type===g._in||(Y=this.options.ecmaVersion>=6&&this.isContextual("of"))?(p>-1?(this.type===g._in&&this.unexpected(p),o.await=!0):Y&&this.options.ecmaVersion>=8&&(_t.start===ot&&!je&&_t.type==="Identifier"&&_t.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(o.await=!1)),q&&Y&&this.raise(_t.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(_t,!1,Ue),this.checkLValPattern(_t),this.parseForIn(o,_t)):(this.checkExpressionErrors(Ue,!0),p>-1&&this.unexpected(p),this.parseFor(o,_t))},Te.parseForAfterInit=function(o,p,y){return(this.type===g._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&p.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===g._in?y>-1&&this.unexpected(y):o.await=y>-1),this.parseForIn(o,p)):(y>-1&&this.unexpected(y),this.parseFor(o,p))},Te.parseFunctionStatement=function(o,p,y){return this.next(),this.parseFunction(o,mt|(y?0:an),!1,p)},Te.parseIfStatement=function(o){return this.next(),o.test=this.parseParenExpression(),o.consequent=this.parseStatement("if"),o.alternate=this.eat(g._else)?this.parseStatement("if"):null,this.finishNode(o,"IfStatement")},Te.parseReturnStatement=function(o){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(g.semi)||this.insertSemicolon()?o.argument=null:(o.argument=this.parseExpression(),this.semicolon()),this.finishNode(o,"ReturnStatement")},Te.parseSwitchStatement=function(o){this.next(),o.discriminant=this.parseParenExpression(),o.cases=[],this.expect(g.braceL),this.labels.push(Rn),this.enterScope(0);for(var p,y=!1;this.type!==g.braceR;)if(this.type===g._case||this.type===g._default){var C=this.type===g._case;p&&this.finishNode(p,"SwitchCase"),o.cases.push(p=this.startNode()),p.consequent=[],this.next(),C?p.test=this.parseExpression():(y&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),y=!0,p.test=null),this.expect(g.colon)}else p||this.unexpected(),p.consequent.push(this.parseStatement(null));return this.exitScope(),p&&this.finishNode(p,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(o,"SwitchStatement")},Te.parseThrowStatement=function(o){return this.next(),E.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),o.argument=this.parseExpression(),this.semicolon(),this.finishNode(o,"ThrowStatement")};var Dt=[];Te.parseCatchClauseParam=function(){var o=this.parseBindingAtom(),p=o.type==="Identifier";return this.enterScope(p?Q:0),this.checkLValPattern(o,p?bt:Ne),this.expect(g.parenR),o},Te.parseTryStatement=function(o){if(this.next(),o.block=this.parseBlock(),o.handler=null,this.type===g._catch){var p=this.startNode();this.next(),this.eat(g.parenL)?p.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),p.param=null,this.enterScope(0)),p.body=this.parseBlock(!1),this.exitScope(),o.handler=this.finishNode(p,"CatchClause")}return o.finalizer=this.eat(g._finally)?this.parseBlock():null,!o.handler&&!o.finalizer&&this.raise(o.start,"Missing catch or finally clause"),this.finishNode(o,"TryStatement")},Te.parseVarStatement=function(o,p,y){return this.next(),this.parseVar(o,!1,p,y),this.semicolon(),this.finishNode(o,"VariableDeclaration")},Te.parseWhileStatement=function(o){return this.next(),o.test=this.parseParenExpression(),this.labels.push(Lt),o.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(o,"WhileStatement")},Te.parseWithStatement=function(o){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),o.object=this.parseParenExpression(),o.body=this.parseStatement("with"),this.finishNode(o,"WithStatement")},Te.parseEmptyStatement=function(o){return this.next(),this.finishNode(o,"EmptyStatement")},Te.parseLabeledStatement=function(o,p,y,C){for(var O=0,q=this.labels;O<q.length;O+=1){var Y=q[O];Y.name===p&&this.raise(y.start,"Label '"+p+"' is already declared")}for(var we=this.type.isLoop?"loop":this.type===g._switch?"switch":null,Ce=this.labels.length-1;Ce>=0;Ce--){var je=this.labels[Ce];if(je.statementStart===o.start)je.statementStart=this.start,je.kind=we;else break}return this.labels.push({name:p,kind:we,statementStart:this.start}),o.body=this.parseStatement(C?C.indexOf("label")===-1?C+"label":C:"label"),this.labels.pop(),o.label=y,this.finishNode(o,"LabeledStatement")},Te.parseExpressionStatement=function(o,p){return o.expression=p,this.semicolon(),this.finishNode(o,"ExpressionStatement")},Te.parseBlock=function(o,p,y){for(o===void 0&&(o=!0),p===void 0&&(p=this.startNode()),p.body=[],this.expect(g.braceL),o&&this.enterScope(0);this.type!==g.braceR;){var C=this.parseStatement(null);p.body.push(C)}return y&&(this.strict=!1),this.next(),o&&this.exitScope(),this.finishNode(p,"BlockStatement")},Te.parseFor=function(o,p){return o.init=p,this.expect(g.semi),o.test=this.type===g.semi?null:this.parseExpression(),this.expect(g.semi),o.update=this.type===g.parenR?null:this.parseExpression(),this.expect(g.parenR),o.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(o,"ForStatement")},Te.parseForIn=function(o,p){var y=this.type===g._in;return this.next(),p.type==="VariableDeclaration"&&p.declarations[0].init!=null&&(!y||this.options.ecmaVersion<8||this.strict||p.kind!=="var"||p.declarations[0].id.type!=="Identifier")&&this.raise(p.start,(y?"for-in":"for-of")+" loop variable declaration may not have an initializer"),o.left=p,o.right=y?this.parseExpression():this.parseMaybeAssign(),this.expect(g.parenR),o.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(o,y?"ForInStatement":"ForOfStatement")},Te.parseVar=function(o,p,y,C){for(o.declarations=[],o.kind=y;;){var O=this.startNode();if(this.parseVarId(O,y),this.eat(g.eq)?O.init=this.parseMaybeAssign(p):!C&&y==="const"&&!(this.type===g._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!C&&(y==="using"||y==="await using")&&this.options.ecmaVersion>=17&&this.type!==g._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+y+" declaration"):!C&&O.id.type!=="Identifier"&&!(p&&(this.type===g._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):O.init=null,o.declarations.push(this.finishNode(O,"VariableDeclarator")),!this.eat(g.comma))break}return o},Te.parseVarId=function(o,p){o.id=p==="using"||p==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(o.id,p==="var"?ke:Ne,!1)};var mt=1,an=2,Vt=4;Te.parseFunction=function(o,p,y,C,O){this.initFunction(o),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!C)&&(this.type===g.star&&p&an&&this.unexpected(),o.generator=this.eat(g.star)),this.options.ecmaVersion>=8&&(o.async=!!C),p&mt&&(o.id=p&Vt&&this.type!==g.name?null:this.parseIdent(),o.id&&!(p&an)&&this.checkLValSimple(o.id,this.strict||o.generator||o.async?this.treatFunctionsAsVar?ke:Ne:Fe));var q=this.yieldPos,Y=this.awaitPos,we=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ie(o.async,o.generator)),p&mt||(o.id=this.type===g.name?this.parseIdent():null),this.parseFunctionParams(o),this.parseFunctionBody(o,y,!1,O),this.yieldPos=q,this.awaitPos=Y,this.awaitIdentPos=we,this.finishNode(o,p&mt?"FunctionDeclaration":"FunctionExpression")},Te.parseFunctionParams=function(o){this.expect(g.parenL),o.params=this.parseBindingList(g.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Te.parseClass=function(o,p){this.next();var y=this.strict;this.strict=!0,this.parseClassId(o,p),this.parseClassSuper(o);var C=this.enterClassBody(),O=this.startNode(),q=!1;for(O.body=[],this.expect(g.braceL);this.type!==g.braceR;){var Y=this.parseClassElement(o.superClass!==null);Y&&(O.body.push(Y),Y.type==="MethodDefinition"&&Y.kind==="constructor"?(q&&this.raiseRecoverable(Y.start,"Duplicate constructor in the same class"),q=!0):Y.key&&Y.key.type==="PrivateIdentifier"&&co(C,Y)&&this.raiseRecoverable(Y.key.start,"Identifier '#"+Y.key.name+"' has already been declared"))}return this.strict=y,this.next(),o.body=this.finishNode(O,"ClassBody"),this.exitClassBody(),this.finishNode(o,p?"ClassDeclaration":"ClassExpression")},Te.parseClassElement=function(o){if(this.eat(g.semi))return null;var p=this.options.ecmaVersion,y=this.startNode(),C="",O=!1,q=!1,Y="method",we=!1;if(this.eatContextual("static")){if(p>=13&&this.eat(g.braceL))return this.parseClassStaticBlock(y),y;this.isClassElementNameStart()||this.type===g.star?we=!0:C="static"}if(y.static=we,!C&&p>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===g.star)&&!this.canInsertSemicolon()?q=!0:C="async"),!C&&(p>=9||!q)&&this.eat(g.star)&&(O=!0),!C&&!q&&!O){var Ce=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?Y=Ce:C=Ce)}if(C?(y.computed=!1,y.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),y.key.name=C,this.finishNode(y.key,"Identifier")):this.parseClassElementName(y),p<13||this.type===g.parenL||Y!=="method"||O||q){var je=!y.static&&ur(y,"constructor"),Ue=je&&o;je&&Y!=="method"&&this.raise(y.key.start,"Constructor can't have get/set modifier"),y.kind=je?"constructor":Y,this.parseClassMethod(y,O,q,Ue)}else this.parseClassField(y);return y},Te.isClassElementNameStart=function(){return this.type===g.name||this.type===g.privateId||this.type===g.num||this.type===g.string||this.type===g.bracketL||this.type.keyword},Te.parseClassElementName=function(o){this.type===g.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),o.computed=!1,o.key=this.parsePrivateIdent()):this.parsePropertyName(o)},Te.parseClassMethod=function(o,p,y,C){var O=o.key;o.kind==="constructor"?(p&&this.raise(O.start,"Constructor can't be a generator"),y&&this.raise(O.start,"Constructor can't be an async method")):o.static&&ur(o,"prototype")&&this.raise(O.start,"Classes may not have a static property named prototype");var q=o.value=this.parseMethod(p,y,C);return o.kind==="get"&&q.params.length!==0&&this.raiseRecoverable(q.start,"getter should have no params"),o.kind==="set"&&q.params.length!==1&&this.raiseRecoverable(q.start,"setter should have exactly one param"),o.kind==="set"&&q.params[0].type==="RestElement"&&this.raiseRecoverable(q.params[0].start,"Setter cannot use rest params"),this.finishNode(o,"MethodDefinition")},Te.parseClassField=function(o){return ur(o,"constructor")?this.raise(o.key.start,"Classes can't have a field named 'constructor'"):o.static&&ur(o,"prototype")&&this.raise(o.key.start,"Classes can't have a static field named 'prototype'"),this.eat(g.eq)?(this.enterScope(Ee|W),o.value=this.parseMaybeAssign(),this.exitScope()):o.value=null,this.semicolon(),this.finishNode(o,"PropertyDefinition")},Te.parseClassStaticBlock=function(o){o.body=[];var p=this.labels;for(this.labels=[],this.enterScope(ve|W);this.type!==g.braceR;){var y=this.parseStatement(null);o.body.push(y)}return this.next(),this.exitScope(),this.labels=p,this.finishNode(o,"StaticBlock")},Te.parseClassId=function(o,p){this.type===g.name?(o.id=this.parseIdent(),p&&this.checkLValSimple(o.id,Ne,!1)):(p===!0&&this.unexpected(),o.id=null)},Te.parseClassSuper=function(o){o.superClass=this.eat(g._extends)?this.parseExprSubscripts(null,!1):null},Te.enterClassBody=function(){var o={declared:Object.create(null),used:[]};return this.privateNameStack.push(o),o.declared},Te.exitClassBody=function(){var o=this.privateNameStack.pop(),p=o.declared,y=o.used;if(this.options.checkPrivateFields)for(var C=this.privateNameStack.length,O=C===0?null:this.privateNameStack[C-1],q=0;q<y.length;++q){var Y=y[q];se(p,Y.name)||(O?O.used.push(Y):this.raiseRecoverable(Y.start,"Private field '#"+Y.name+"' must be declared in an enclosing class"))}};function co(o,p){var y=p.key.name,C=o[y],O="true";return p.type==="MethodDefinition"&&(p.kind==="get"||p.kind==="set")&&(O=(p.static?"s":"i")+p.kind),C==="iget"&&O==="iset"||C==="iset"&&O==="iget"||C==="sget"&&O==="sset"||C==="sset"&&O==="sget"?(o[y]="true",!1):C?!0:(o[y]=O,!1)}function ur(o,p){var y=o.computed,C=o.key;return!y&&(C.type==="Identifier"&&C.name===p||C.type==="Literal"&&C.value===p)}Te.parseExportAllDeclaration=function(o,p){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(o.exported=this.parseModuleExportName(),this.checkExport(p,o.exported,this.lastTokStart)):o.exported=null),this.expectContextual("from"),this.type!==g.string&&this.unexpected(),o.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(o.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(o,"ExportAllDeclaration")},Te.parseExport=function(o,p){if(this.next(),this.eat(g.star))return this.parseExportAllDeclaration(o,p);if(this.eat(g._default))return this.checkExport(p,"default",this.lastTokStart),o.declaration=this.parseExportDefaultDeclaration(),this.finishNode(o,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())o.declaration=this.parseExportDeclaration(o),o.declaration.type==="VariableDeclaration"?this.checkVariableExport(p,o.declaration.declarations):this.checkExport(p,o.declaration.id,o.declaration.id.start),o.specifiers=[],o.source=null,this.options.ecmaVersion>=16&&(o.attributes=[]);else{if(o.declaration=null,o.specifiers=this.parseExportSpecifiers(p),this.eatContextual("from"))this.type!==g.string&&this.unexpected(),o.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(o.attributes=this.parseWithClause());else{for(var y=0,C=o.specifiers;y<C.length;y+=1){var O=C[y];this.checkUnreserved(O.local),this.checkLocalExport(O.local),O.local.type==="Literal"&&this.raise(O.local.start,"A string literal cannot be used as an exported binding without `from`.")}o.source=null,this.options.ecmaVersion>=16&&(o.attributes=[])}this.semicolon()}return this.finishNode(o,"ExportNamedDeclaration")},Te.parseExportDeclaration=function(o){return this.parseStatement(null)},Te.parseExportDefaultDeclaration=function(){var o;if(this.type===g._function||(o=this.isAsyncFunction())){var p=this.startNode();return this.next(),o&&this.next(),this.parseFunction(p,mt|Vt,!1,o)}else if(this.type===g._class){var y=this.startNode();return this.parseClass(y,"nullableID")}else{var C=this.parseMaybeAssign();return this.semicolon(),C}},Te.checkExport=function(o,p,y){o&&(typeof p!="string"&&(p=p.type==="Identifier"?p.name:p.value),se(o,p)&&this.raiseRecoverable(y,"Duplicate export '"+p+"'"),o[p]=!0)},Te.checkPatternExport=function(o,p){var y=p.type;if(y==="Identifier")this.checkExport(o,p,p.start);else if(y==="ObjectPattern")for(var C=0,O=p.properties;C<O.length;C+=1){var q=O[C];this.checkPatternExport(o,q)}else if(y==="ArrayPattern")for(var Y=0,we=p.elements;Y<we.length;Y+=1){var Ce=we[Y];Ce&&this.checkPatternExport(o,Ce)}else y==="Property"?this.checkPatternExport(o,p.value):y==="AssignmentPattern"?this.checkPatternExport(o,p.left):y==="RestElement"&&this.checkPatternExport(o,p.argument)},Te.checkVariableExport=function(o,p){if(o)for(var y=0,C=p;y<C.length;y+=1){var O=C[y];this.checkPatternExport(o,O.id)}},Te.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},Te.parseExportSpecifier=function(o){var p=this.startNode();return p.local=this.parseModuleExportName(),p.exported=this.eatContextual("as")?this.parseModuleExportName():p.local,this.checkExport(o,p.exported,p.exported.start),this.finishNode(p,"ExportSpecifier")},Te.parseExportSpecifiers=function(o){var p=[],y=!0;for(this.expect(g.braceL);!this.eat(g.braceR);){if(y)y=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;p.push(this.parseExportSpecifier(o))}return p},Te.parseImport=function(o){return this.next(),this.type===g.string?(o.specifiers=Dt,o.source=this.parseExprAtom()):(o.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),o.source=this.type===g.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(o.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(o,"ImportDeclaration")},Te.parseImportSpecifier=function(){var o=this.startNode();return o.imported=this.parseModuleExportName(),this.eatContextual("as")?o.local=this.parseIdent():(this.checkUnreserved(o.imported),o.local=o.imported),this.checkLValSimple(o.local,Ne),this.finishNode(o,"ImportSpecifier")},Te.parseImportDefaultSpecifier=function(){var o=this.startNode();return o.local=this.parseIdent(),this.checkLValSimple(o.local,Ne),this.finishNode(o,"ImportDefaultSpecifier")},Te.parseImportNamespaceSpecifier=function(){var o=this.startNode();return this.next(),this.expectContextual("as"),o.local=this.parseIdent(),this.checkLValSimple(o.local,Ne),this.finishNode(o,"ImportNamespaceSpecifier")},Te.parseImportSpecifiers=function(){var o=[],p=!0;if(this.type===g.name&&(o.push(this.parseImportDefaultSpecifier()),!this.eat(g.comma)))return o;if(this.type===g.star)return o.push(this.parseImportNamespaceSpecifier()),o;for(this.expect(g.braceL);!this.eat(g.braceR);){if(p)p=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;o.push(this.parseImportSpecifier())}return o},Te.parseWithClause=function(){var o=[];if(!this.eat(g._with))return o;this.expect(g.braceL);for(var p={},y=!0;!this.eat(g.braceR);){if(y)y=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;var C=this.parseImportAttribute(),O=C.key.type==="Identifier"?C.key.name:C.key.value;se(p,O)&&this.raiseRecoverable(C.key.start,"Duplicate attribute key '"+O+"'"),p[O]=!0,o.push(C)}return o},Te.parseImportAttribute=function(){var o=this.startNode();return o.key=this.type===g.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(g.colon),this.type!==g.string&&this.unexpected(),o.value=this.parseExprAtom(),this.finishNode(o,"ImportAttribute")},Te.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===g.string){var o=this.parseLiteral(this.value);return J.test(o.value)&&this.raise(o.start,"An export name cannot include a lone surrogate."),o}return this.parseIdent(!0)},Te.adaptDirectivePrologue=function(o){for(var p=0;p<o.length&&this.isDirectiveCandidate(o[p]);++p)o[p].directive=o[p].expression.raw.slice(1,-1)},Te.isDirectiveCandidate=function(o){return this.options.ecmaVersion>=5&&o.type==="ExpressionStatement"&&o.expression.type==="Literal"&&typeof o.expression.value=="string"&&(this.input[o.start]==='"'||this.input[o.start]==="'")};var Et=ce.prototype;Et.toAssignable=function(o,p,y){if(this.options.ecmaVersion>=6&&o)switch(o.type){case"Identifier":this.inAsync&&o.name==="await"&&this.raise(o.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":o.type="ObjectPattern",y&&this.checkPatternErrors(y,!0);for(var C=0,O=o.properties;C<O.length;C+=1){var q=O[C];this.toAssignable(q,p),q.type==="RestElement"&&(q.argument.type==="ArrayPattern"||q.argument.type==="ObjectPattern")&&this.raise(q.argument.start,"Unexpected token")}break;case"Property":o.kind!=="init"&&this.raise(o.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(o.value,p);break;case"ArrayExpression":o.type="ArrayPattern",y&&this.checkPatternErrors(y,!0),this.toAssignableList(o.elements,p);break;case"SpreadElement":o.type="RestElement",this.toAssignable(o.argument,p),o.argument.type==="AssignmentPattern"&&this.raise(o.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":o.operator!=="="&&this.raise(o.left.end,"Only '=' operator can be used for specifying default value."),o.type="AssignmentPattern",delete o.operator,this.toAssignable(o.left,p);break;case"ParenthesizedExpression":this.toAssignable(o.expression,p,y);break;case"ChainExpression":this.raiseRecoverable(o.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!p)break;default:this.raise(o.start,"Assigning to rvalue")}else y&&this.checkPatternErrors(y,!0);return o},Et.toAssignableList=function(o,p){for(var y=o.length,C=0;C<y;C++){var O=o[C];O&&this.toAssignable(O,p)}if(y){var q=o[y-1];this.options.ecmaVersion===6&&p&&q&&q.type==="RestElement"&&q.argument.type!=="Identifier"&&this.unexpected(q.argument.start)}return o},Et.parseSpread=function(o){var p=this.startNode();return this.next(),p.argument=this.parseMaybeAssign(!1,o),this.finishNode(p,"SpreadElement")},Et.parseRestBinding=function(){var o=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==g.name&&this.unexpected(),o.argument=this.parseBindingAtom(),this.finishNode(o,"RestElement")},Et.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case g.bracketL:var o=this.startNode();return this.next(),o.elements=this.parseBindingList(g.bracketR,!0,!0),this.finishNode(o,"ArrayPattern");case g.braceL:return this.parseObj(!0)}return this.parseIdent()},Et.parseBindingList=function(o,p,y,C){for(var O=[],q=!0;!this.eat(o);)if(q?q=!1:this.expect(g.comma),p&&this.type===g.comma)O.push(null);else{if(y&&this.afterTrailingComma(o))break;if(this.type===g.ellipsis){var Y=this.parseRestBinding();this.parseBindingListItem(Y),O.push(Y),this.type===g.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(o);break}else O.push(this.parseAssignableListItem(C))}return O},Et.parseAssignableListItem=function(o){var p=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(p),p},Et.parseBindingListItem=function(o){return o},Et.parseMaybeDefault=function(o,p,y){if(y=y||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(g.eq))return y;var C=this.startNodeAt(o,p);return C.left=y,C.right=this.parseMaybeAssign(),this.finishNode(C,"AssignmentPattern")},Et.checkLValSimple=function(o,p,y){p===void 0&&(p=Me);var C=p!==Me;switch(o.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(o.name)&&this.raiseRecoverable(o.start,(C?"Binding ":"Assigning to ")+o.name+" in strict mode"),C&&(p===Ne&&o.name==="let"&&this.raiseRecoverable(o.start,"let is disallowed as a lexically bound name"),y&&(se(y,o.name)&&this.raiseRecoverable(o.start,"Argument name clash"),y[o.name]=!0),p!==le&&this.declareName(o.name,p,o.start));break;case"ChainExpression":this.raiseRecoverable(o.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":C&&this.raiseRecoverable(o.start,"Binding member expression");break;case"ParenthesizedExpression":return C&&this.raiseRecoverable(o.start,"Binding parenthesized expression"),this.checkLValSimple(o.expression,p,y);default:this.raise(o.start,(C?"Binding":"Assigning to")+" rvalue")}},Et.checkLValPattern=function(o,p,y){switch(p===void 0&&(p=Me),o.type){case"ObjectPattern":for(var C=0,O=o.properties;C<O.length;C+=1){var q=O[C];this.checkLValInnerPattern(q,p,y)}break;case"ArrayPattern":for(var Y=0,we=o.elements;Y<we.length;Y+=1){var Ce=we[Y];Ce&&this.checkLValInnerPattern(Ce,p,y)}break;default:this.checkLValSimple(o,p,y)}},Et.checkLValInnerPattern=function(o,p,y){switch(p===void 0&&(p=Me),o.type){case"Property":this.checkLValInnerPattern(o.value,p,y);break;case"AssignmentPattern":this.checkLValPattern(o.left,p,y);break;case"RestElement":this.checkLValPattern(o.argument,p,y);break;default:this.checkLValPattern(o,p,y)}};var zt=function(p,y,C,O,q){this.token=p,this.isExpr=!!y,this.preserveSpace=!!C,this.override=O,this.generator=!!q},Qe={b_stat:new zt("{",!1),b_expr:new zt("{",!0),b_tmpl:new zt("${",!1),p_stat:new zt("(",!1),p_expr:new zt("(",!0),q_tmpl:new zt("`",!0,!0,function(o){return o.tryReadTemplateToken()}),f_stat:new zt("function",!1),f_expr:new zt("function",!0),f_expr_gen:new zt("function",!0,!1,null,!0),f_gen:new zt("function",!1,!1,null,!0)},$n=ce.prototype;$n.initialContext=function(){return[Qe.b_stat]},$n.curContext=function(){return this.context[this.context.length-1]},$n.braceIsBlock=function(o){var p=this.curContext();return p===Qe.f_expr||p===Qe.f_stat?!0:o===g.colon&&(p===Qe.b_stat||p===Qe.b_expr)?!p.isExpr:o===g._return||o===g.name&&this.exprAllowed?E.test(this.input.slice(this.lastTokEnd,this.start)):o===g._else||o===g.semi||o===g.eof||o===g.parenR||o===g.arrow?!0:o===g.braceL?p===Qe.b_stat:o===g._var||o===g._const||o===g.name?!1:!this.exprAllowed},$n.inGeneratorContext=function(){for(var o=this.context.length-1;o>=1;o--){var p=this.context[o];if(p.token==="function")return p.generator}return!1},$n.updateContext=function(o){var p,y=this.type;y.keyword&&o===g.dot?this.exprAllowed=!1:(p=y.updateContext)?p.call(this,o):this.exprAllowed=y.beforeExpr},$n.overrideContext=function(o){this.curContext()!==o&&(this.context[this.context.length-1]=o)},g.parenR.updateContext=g.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var o=this.context.pop();o===Qe.b_stat&&this.curContext().token==="function"&&(o=this.context.pop()),this.exprAllowed=!o.isExpr},g.braceL.updateContext=function(o){this.context.push(this.braceIsBlock(o)?Qe.b_stat:Qe.b_expr),this.exprAllowed=!0},g.dollarBraceL.updateContext=function(){this.context.push(Qe.b_tmpl),this.exprAllowed=!0},g.parenL.updateContext=function(o){var p=o===g._if||o===g._for||o===g._with||o===g._while;this.context.push(p?Qe.p_stat:Qe.p_expr),this.exprAllowed=!0},g.incDec.updateContext=function(){},g._function.updateContext=g._class.updateContext=function(o){o.beforeExpr&&o!==g._else&&!(o===g.semi&&this.curContext()!==Qe.p_stat)&&!(o===g._return&&E.test(this.input.slice(this.lastTokEnd,this.start)))&&!((o===g.colon||o===g.braceL)&&this.curContext()===Qe.b_stat)?this.context.push(Qe.f_expr):this.context.push(Qe.f_stat),this.exprAllowed=!1},g.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},g.backQuote.updateContext=function(){this.curContext()===Qe.q_tmpl?this.context.pop():this.context.push(Qe.q_tmpl),this.exprAllowed=!1},g.star.updateContext=function(o){if(o===g._function){var p=this.context.length-1;this.context[p]===Qe.f_expr?this.context[p]=Qe.f_expr_gen:this.context[p]=Qe.f_gen}this.exprAllowed=!0},g.name.updateContext=function(o){var p=!1;this.options.ecmaVersion>=6&&o!==g.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(p=!0),this.exprAllowed=p};var Be=ce.prototype;Be.checkPropClash=function(o,p,y){if(!(this.options.ecmaVersion>=9&&o.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(o.computed||o.method||o.shorthand))){var C=o.key,O;switch(C.type){case"Identifier":O=C.name;break;case"Literal":O=String(C.value);break;default:return}var q=o.kind;if(this.options.ecmaVersion>=6){O==="__proto__"&&q==="init"&&(p.proto&&(y?y.doubleProto<0&&(y.doubleProto=C.start):this.raiseRecoverable(C.start,"Redefinition of __proto__ property")),p.proto=!0);return}O="$"+O;var Y=p[O];if(Y){var we;q==="init"?we=this.strict&&Y.init||Y.get||Y.set:we=Y.init||Y[q],we&&this.raiseRecoverable(C.start,"Redefinition of property")}else Y=p[O]={init:!1,get:!1,set:!1};Y[q]=!0}},Be.parseExpression=function(o,p){var y=this.start,C=this.startLoc,O=this.parseMaybeAssign(o,p);if(this.type===g.comma){var q=this.startNodeAt(y,C);for(q.expressions=[O];this.eat(g.comma);)q.expressions.push(this.parseMaybeAssign(o,p));return this.finishNode(q,"SequenceExpression")}return O},Be.parseMaybeAssign=function(o,p,y){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(o);this.exprAllowed=!1}var C=!1,O=-1,q=-1,Y=-1;p?(O=p.parenthesizedAssign,q=p.trailingComma,Y=p.doubleProto,p.parenthesizedAssign=p.trailingComma=-1):(p=new yt,C=!0);var we=this.start,Ce=this.startLoc;(this.type===g.parenL||this.type===g.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=o==="await");var je=this.parseMaybeConditional(o,p);if(y&&(je=y.call(this,je,we,Ce)),this.type.isAssign){var Ue=this.startNodeAt(we,Ce);return Ue.operator=this.value,this.type===g.eq&&(je=this.toAssignable(je,!1,p)),C||(p.parenthesizedAssign=p.trailingComma=p.doubleProto=-1),p.shorthandAssign>=je.start&&(p.shorthandAssign=-1),this.type===g.eq?this.checkLValPattern(je):this.checkLValSimple(je),Ue.left=je,this.next(),Ue.right=this.parseMaybeAssign(o),Y>-1&&(p.doubleProto=Y),this.finishNode(Ue,"AssignmentExpression")}else C&&this.checkExpressionErrors(p,!0);return O>-1&&(p.parenthesizedAssign=O),q>-1&&(p.trailingComma=q),je},Be.parseMaybeConditional=function(o,p){var y=this.start,C=this.startLoc,O=this.parseExprOps(o,p);if(this.checkExpressionErrors(p))return O;if(this.eat(g.question)){var q=this.startNodeAt(y,C);return q.test=O,q.consequent=this.parseMaybeAssign(),this.expect(g.colon),q.alternate=this.parseMaybeAssign(o),this.finishNode(q,"ConditionalExpression")}return O},Be.parseExprOps=function(o,p){var y=this.start,C=this.startLoc,O=this.parseMaybeUnary(p,!1,!1,o);return this.checkExpressionErrors(p)||O.start===y&&O.type==="ArrowFunctionExpression"?O:this.parseExprOp(O,y,C,-1,o)},Be.parseExprOp=function(o,p,y,C,O){var q=this.type.binop;if(q!=null&&(!O||this.type!==g._in)&&q>C){var Y=this.type===g.logicalOR||this.type===g.logicalAND,we=this.type===g.coalesce;we&&(q=g.logicalAND.binop);var Ce=this.value;this.next();var je=this.start,Ue=this.startLoc,ot=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,O),je,Ue,q,O),_t=this.buildBinary(p,y,o,ot,Ce,Y||we);return(Y&&this.type===g.coalesce||we&&(this.type===g.logicalOR||this.type===g.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(_t,p,y,C,O)}return o},Be.buildBinary=function(o,p,y,C,O,q){C.type==="PrivateIdentifier"&&this.raise(C.start,"Private identifier can only be left side of binary expression");var Y=this.startNodeAt(o,p);return Y.left=y,Y.operator=O,Y.right=C,this.finishNode(Y,q?"LogicalExpression":"BinaryExpression")},Be.parseMaybeUnary=function(o,p,y,C){var O=this.start,q=this.startLoc,Y;if(this.isContextual("await")&&this.canAwait)Y=this.parseAwait(C),p=!0;else if(this.type.prefix){var we=this.startNode(),Ce=this.type===g.incDec;we.operator=this.value,we.prefix=!0,this.next(),we.argument=this.parseMaybeUnary(null,!0,Ce,C),this.checkExpressionErrors(o,!0),Ce?this.checkLValSimple(we.argument):this.strict&&we.operator==="delete"&&Zi(we.argument)?this.raiseRecoverable(we.start,"Deleting local variable in strict mode"):we.operator==="delete"&&ri(we.argument)?this.raiseRecoverable(we.start,"Private fields can not be deleted"):p=!0,Y=this.finishNode(we,Ce?"UpdateExpression":"UnaryExpression")}else if(!p&&this.type===g.privateId)(C||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),Y=this.parsePrivateIdent(),this.type!==g._in&&this.unexpected();else{if(Y=this.parseExprSubscripts(o,C),this.checkExpressionErrors(o))return Y;for(;this.type.postfix&&!this.canInsertSemicolon();){var je=this.startNodeAt(O,q);je.operator=this.value,je.prefix=!1,je.argument=Y,this.checkLValSimple(Y),this.next(),Y=this.finishNode(je,"UpdateExpression")}}if(!y&&this.eat(g.starstar))if(p)this.unexpected(this.lastTokStart);else return this.buildBinary(O,q,Y,this.parseMaybeUnary(null,!1,!1,C),"**",!1);else return Y};function Zi(o){return o.type==="Identifier"||o.type==="ParenthesizedExpression"&&Zi(o.expression)}function ri(o){return o.type==="MemberExpression"&&o.property.type==="PrivateIdentifier"||o.type==="ChainExpression"&&ri(o.expression)||o.type==="ParenthesizedExpression"&&ri(o.expression)}Be.parseExprSubscripts=function(o,p){var y=this.start,C=this.startLoc,O=this.parseExprAtom(o,p);if(O.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return O;var q=this.parseSubscripts(O,y,C,!1,p);return o&&q.type==="MemberExpression"&&(o.parenthesizedAssign>=q.start&&(o.parenthesizedAssign=-1),o.parenthesizedBind>=q.start&&(o.parenthesizedBind=-1),o.trailingComma>=q.start&&(o.trailingComma=-1)),q},Be.parseSubscripts=function(o,p,y,C,O){for(var q=this.options.ecmaVersion>=8&&o.type==="Identifier"&&o.name==="async"&&this.lastTokEnd===o.end&&!this.canInsertSemicolon()&&o.end-o.start===5&&this.potentialArrowAt===o.start,Y=!1;;){var we=this.parseSubscript(o,p,y,C,q,Y,O);if(we.optional&&(Y=!0),we===o||we.type==="ArrowFunctionExpression"){if(Y){var Ce=this.startNodeAt(p,y);Ce.expression=we,we=this.finishNode(Ce,"ChainExpression")}return we}o=we}},Be.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(g.arrow)},Be.parseSubscriptAsyncArrow=function(o,p,y,C){return this.parseArrowExpression(this.startNodeAt(o,p),y,!0,C)},Be.parseSubscript=function(o,p,y,C,O,q,Y){var we=this.options.ecmaVersion>=11,Ce=we&&this.eat(g.questionDot);C&&Ce&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var je=this.eat(g.bracketL);if(je||Ce&&this.type!==g.parenL&&this.type!==g.backQuote||this.eat(g.dot)){var Ue=this.startNodeAt(p,y);Ue.object=o,je?(Ue.property=this.parseExpression(),this.expect(g.bracketR)):this.type===g.privateId&&o.type!=="Super"?Ue.property=this.parsePrivateIdent():Ue.property=this.parseIdent(this.options.allowReserved!=="never"),Ue.computed=!!je,we&&(Ue.optional=Ce),o=this.finishNode(Ue,"MemberExpression")}else if(!C&&this.eat(g.parenL)){var ot=new yt,_t=this.yieldPos,V=this.awaitPos,z=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ne=this.parseExprList(g.parenR,this.options.ecmaVersion>=8,!1,ot);if(O&&!Ce&&this.shouldParseAsyncArrow())return this.checkPatternErrors(ot,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=_t,this.awaitPos=V,this.awaitIdentPos=z,this.parseSubscriptAsyncArrow(p,y,ne,Y);this.checkExpressionErrors(ot,!0),this.yieldPos=_t||this.yieldPos,this.awaitPos=V||this.awaitPos,this.awaitIdentPos=z||this.awaitIdentPos;var Pe=this.startNodeAt(p,y);Pe.callee=o,Pe.arguments=ne,we&&(Pe.optional=Ce),o=this.finishNode(Pe,"CallExpression")}else if(this.type===g.backQuote){(Ce||q)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var We=this.startNodeAt(p,y);We.tag=o,We.quasi=this.parseTemplate({isTagged:!0}),o=this.finishNode(We,"TaggedTemplateExpression")}return o},Be.parseExprAtom=function(o,p,y){this.type===g.slash&&this.readRegexp();var C,O=this.potentialArrowAt===this.start;switch(this.type){case g._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),C=this.startNode(),this.next(),this.type===g.parenL&&!this.allowDirectSuper&&this.raise(C.start,"super() call outside constructor of a subclass"),this.type!==g.dot&&this.type!==g.bracketL&&this.type!==g.parenL&&this.unexpected(),this.finishNode(C,"Super");case g._this:return C=this.startNode(),this.next(),this.finishNode(C,"ThisExpression");case g.name:var q=this.start,Y=this.startLoc,we=this.containsEsc,Ce=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!we&&Ce.name==="async"&&!this.canInsertSemicolon()&&this.eat(g._function))return this.overrideContext(Qe.f_expr),this.parseFunction(this.startNodeAt(q,Y),0,!1,!0,p);if(O&&!this.canInsertSemicolon()){if(this.eat(g.arrow))return this.parseArrowExpression(this.startNodeAt(q,Y),[Ce],!1,p);if(this.options.ecmaVersion>=8&&Ce.name==="async"&&this.type===g.name&&!we&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Ce=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(g.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(q,Y),[Ce],!0,p)}return Ce;case g.regexp:var je=this.value;return C=this.parseLiteral(je.value),C.regex={pattern:je.pattern,flags:je.flags},C;case g.num:case g.string:return this.parseLiteral(this.value);case g._null:case g._true:case g._false:return C=this.startNode(),C.value=this.type===g._null?null:this.type===g._true,C.raw=this.type.keyword,this.next(),this.finishNode(C,"Literal");case g.parenL:var Ue=this.start,ot=this.parseParenAndDistinguishExpression(O,p);return o&&(o.parenthesizedAssign<0&&!this.isSimpleAssignTarget(ot)&&(o.parenthesizedAssign=Ue),o.parenthesizedBind<0&&(o.parenthesizedBind=Ue)),ot;case g.bracketL:return C=this.startNode(),this.next(),C.elements=this.parseExprList(g.bracketR,!0,!0,o),this.finishNode(C,"ArrayExpression");case g.braceL:return this.overrideContext(Qe.b_expr),this.parseObj(!1,o);case g._function:return C=this.startNode(),this.next(),this.parseFunction(C,0);case g._class:return this.parseClass(this.startNode(),!1);case g._new:return this.parseNew();case g.backQuote:return this.parseTemplate();case g._import:return this.options.ecmaVersion>=11?this.parseExprImport(y):this.unexpected();default:return this.parseExprAtomDefault()}},Be.parseExprAtomDefault=function(){this.unexpected()},Be.parseExprImport=function(o){var p=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===g.parenL&&!o)return this.parseDynamicImport(p);if(this.type===g.dot){var y=this.startNodeAt(p.start,p.loc&&p.loc.start);return y.name="import",p.meta=this.finishNode(y,"Identifier"),this.parseImportMeta(p)}else this.unexpected()},Be.parseDynamicImport=function(o){if(this.next(),o.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(g.parenR)?o.options=null:(this.expect(g.comma),this.afterTrailingComma(g.parenR)?o.options=null:(o.options=this.parseMaybeAssign(),this.eat(g.parenR)||(this.expect(g.comma),this.afterTrailingComma(g.parenR)||this.unexpected())));else if(!this.eat(g.parenR)){var p=this.start;this.eat(g.comma)&&this.eat(g.parenR)?this.raiseRecoverable(p,"Trailing comma is not allowed in import()"):this.unexpected(p)}return this.finishNode(o,"ImportExpression")},Be.parseImportMeta=function(o){this.next();var p=this.containsEsc;return o.property=this.parseIdent(!0),o.property.name!=="meta"&&this.raiseRecoverable(o.property.start,"The only valid meta property for import is 'import.meta'"),p&&this.raiseRecoverable(o.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(o.start,"Cannot use 'import.meta' outside a module"),this.finishNode(o,"MetaProperty")},Be.parseLiteral=function(o){var p=this.startNode();return p.value=o,p.raw=this.input.slice(this.start,this.end),p.raw.charCodeAt(p.raw.length-1)===110&&(p.bigint=p.value!=null?p.value.toString():p.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(p,"Literal")},Be.parseParenExpression=function(){this.expect(g.parenL);var o=this.parseExpression();return this.expect(g.parenR),o},Be.shouldParseArrow=function(o){return!this.canInsertSemicolon()},Be.parseParenAndDistinguishExpression=function(o,p){var y=this.start,C=this.startLoc,O,q=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var Y=this.start,we=this.startLoc,Ce=[],je=!0,Ue=!1,ot=new yt,_t=this.yieldPos,V=this.awaitPos,z;for(this.yieldPos=0,this.awaitPos=0;this.type!==g.parenR;)if(je?je=!1:this.expect(g.comma),q&&this.afterTrailingComma(g.parenR,!0)){Ue=!0;break}else if(this.type===g.ellipsis){z=this.start,Ce.push(this.parseParenItem(this.parseRestBinding())),this.type===g.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Ce.push(this.parseMaybeAssign(!1,ot,this.parseParenItem));var ne=this.lastTokEnd,Pe=this.lastTokEndLoc;if(this.expect(g.parenR),o&&this.shouldParseArrow(Ce)&&this.eat(g.arrow))return this.checkPatternErrors(ot,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=_t,this.awaitPos=V,this.parseParenArrowList(y,C,Ce,p);(!Ce.length||Ue)&&this.unexpected(this.lastTokStart),z&&this.unexpected(z),this.checkExpressionErrors(ot,!0),this.yieldPos=_t||this.yieldPos,this.awaitPos=V||this.awaitPos,Ce.length>1?(O=this.startNodeAt(Y,we),O.expressions=Ce,this.finishNodeAt(O,"SequenceExpression",ne,Pe)):O=Ce[0]}else O=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(y,C);return We.expression=O,this.finishNode(We,"ParenthesizedExpression")}else return O},Be.parseParenItem=function(o){return o},Be.parseParenArrowList=function(o,p,y,C){return this.parseArrowExpression(this.startNodeAt(o,p),y,!1,C)};var fo=[];Be.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var o=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===g.dot){var p=this.startNodeAt(o.start,o.loc&&o.loc.start);p.name="new",o.meta=this.finishNode(p,"Identifier"),this.next();var y=this.containsEsc;return o.property=this.parseIdent(!0),o.property.name!=="target"&&this.raiseRecoverable(o.property.start,"The only valid meta property for new is 'new.target'"),y&&this.raiseRecoverable(o.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(o.start,"'new.target' can only be used in functions and class static block"),this.finishNode(o,"MetaProperty")}var C=this.start,O=this.startLoc;return o.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),C,O,!0,!1),this.eat(g.parenL)?o.arguments=this.parseExprList(g.parenR,this.options.ecmaVersion>=8,!1):o.arguments=fo,this.finishNode(o,"NewExpression")},Be.parseTemplateElement=function(o){var p=o.isTagged,y=this.startNode();return this.type===g.invalidTemplate?(p||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),y.value={raw:this.value.replace(/\r\n?/g,`
23
- `),cooked:null}):y.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
24
- `),cooked:this.value},this.next(),y.tail=this.type===g.backQuote,this.finishNode(y,"TemplateElement")},Be.parseTemplate=function(o){o===void 0&&(o={});var p=o.isTagged;p===void 0&&(p=!1);var y=this.startNode();this.next(),y.expressions=[];var C=this.parseTemplateElement({isTagged:p});for(y.quasis=[C];!C.tail;)this.type===g.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(g.dollarBraceL),y.expressions.push(this.parseExpression()),this.expect(g.braceR),y.quasis.push(C=this.parseTemplateElement({isTagged:p}));return this.next(),this.finishNode(y,"TemplateLiteral")},Be.isAsyncProp=function(o){return!o.computed&&o.key.type==="Identifier"&&o.key.name==="async"&&(this.type===g.name||this.type===g.num||this.type===g.string||this.type===g.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===g.star)&&!E.test(this.input.slice(this.lastTokEnd,this.start))},Be.parseObj=function(o,p){var y=this.startNode(),C=!0,O={};for(y.properties=[],this.next();!this.eat(g.braceR);){if(C)C=!1;else if(this.expect(g.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(g.braceR))break;var q=this.parseProperty(o,p);o||this.checkPropClash(q,O,p),y.properties.push(q)}return this.finishNode(y,o?"ObjectPattern":"ObjectExpression")},Be.parseProperty=function(o,p){var y=this.startNode(),C,O,q,Y;if(this.options.ecmaVersion>=9&&this.eat(g.ellipsis))return o?(y.argument=this.parseIdent(!1),this.type===g.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(y,"RestElement")):(y.argument=this.parseMaybeAssign(!1,p),this.type===g.comma&&p&&p.trailingComma<0&&(p.trailingComma=this.start),this.finishNode(y,"SpreadElement"));this.options.ecmaVersion>=6&&(y.method=!1,y.shorthand=!1,(o||p)&&(q=this.start,Y=this.startLoc),o||(C=this.eat(g.star)));var we=this.containsEsc;return this.parsePropertyName(y),!o&&!we&&this.options.ecmaVersion>=8&&!C&&this.isAsyncProp(y)?(O=!0,C=this.options.ecmaVersion>=9&&this.eat(g.star),this.parsePropertyName(y)):O=!1,this.parsePropertyValue(y,o,C,O,q,Y,p,we),this.finishNode(y,"Property")},Be.parseGetterSetter=function(o){var p=o.key.name;this.parsePropertyName(o),o.value=this.parseMethod(!1),o.kind=p;var y=o.kind==="get"?0:1;if(o.value.params.length!==y){var C=o.value.start;o.kind==="get"?this.raiseRecoverable(C,"getter should have no params"):this.raiseRecoverable(C,"setter should have exactly one param")}else o.kind==="set"&&o.value.params[0].type==="RestElement"&&this.raiseRecoverable(o.value.params[0].start,"Setter cannot use rest params")},Be.parsePropertyValue=function(o,p,y,C,O,q,Y,we){(y||C)&&this.type===g.colon&&this.unexpected(),this.eat(g.colon)?(o.value=p?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,Y),o.kind="init"):this.options.ecmaVersion>=6&&this.type===g.parenL?(p&&this.unexpected(),o.method=!0,o.value=this.parseMethod(y,C),o.kind="init"):!p&&!we&&this.options.ecmaVersion>=5&&!o.computed&&o.key.type==="Identifier"&&(o.key.name==="get"||o.key.name==="set")&&this.type!==g.comma&&this.type!==g.braceR&&this.type!==g.eq?((y||C)&&this.unexpected(),this.parseGetterSetter(o)):this.options.ecmaVersion>=6&&!o.computed&&o.key.type==="Identifier"?((y||C)&&this.unexpected(),this.checkUnreserved(o.key),o.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=O),p?o.value=this.parseMaybeDefault(O,q,this.copyNode(o.key)):this.type===g.eq&&Y?(Y.shorthandAssign<0&&(Y.shorthandAssign=this.start),o.value=this.parseMaybeDefault(O,q,this.copyNode(o.key))):o.value=this.copyNode(o.key),o.kind="init",o.shorthand=!0):this.unexpected()},Be.parsePropertyName=function(o){if(this.options.ecmaVersion>=6){if(this.eat(g.bracketL))return o.computed=!0,o.key=this.parseMaybeAssign(),this.expect(g.bracketR),o.key;o.computed=!1}return o.key=this.type===g.num||this.type===g.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},Be.initFunction=function(o){o.id=null,this.options.ecmaVersion>=6&&(o.generator=o.expression=!1),this.options.ecmaVersion>=8&&(o.async=!1)},Be.parseMethod=function(o,p,y){var C=this.startNode(),O=this.yieldPos,q=this.awaitPos,Y=this.awaitIdentPos;return this.initFunction(C),this.options.ecmaVersion>=6&&(C.generator=o),this.options.ecmaVersion>=8&&(C.async=!!p),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ie(p,C.generator)|W|(y?ae:0)),this.expect(g.parenL),C.params=this.parseBindingList(g.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(C,!1,!0,!1),this.yieldPos=O,this.awaitPos=q,this.awaitIdentPos=Y,this.finishNode(C,"FunctionExpression")},Be.parseArrowExpression=function(o,p,y,C){var O=this.yieldPos,q=this.awaitPos,Y=this.awaitIdentPos;return this.enterScope(Ie(y,!1)|Z),this.initFunction(o),this.options.ecmaVersion>=8&&(o.async=!!y),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,o.params=this.toAssignableList(p,!0),this.parseFunctionBody(o,!0,!1,C),this.yieldPos=O,this.awaitPos=q,this.awaitIdentPos=Y,this.finishNode(o,"ArrowFunctionExpression")},Be.parseFunctionBody=function(o,p,y,C){var O=p&&this.type!==g.braceL,q=this.strict,Y=!1;if(O)o.body=this.parseMaybeAssign(C),o.expression=!0,this.checkParams(o,!1);else{var we=this.options.ecmaVersion>=7&&!this.isSimpleParamList(o.params);(!q||we)&&(Y=this.strictDirective(this.end),Y&&we&&this.raiseRecoverable(o.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Ce=this.labels;this.labels=[],Y&&(this.strict=!0),this.checkParams(o,!q&&!Y&&!p&&!y&&this.isSimpleParamList(o.params)),this.strict&&o.id&&this.checkLValSimple(o.id,le),o.body=this.parseBlock(!1,void 0,Y&&!q),o.expression=!1,this.adaptDirectivePrologue(o.body.body),this.labels=Ce}this.exitScope()},Be.isSimpleParamList=function(o){for(var p=0,y=o;p<y.length;p+=1){var C=y[p];if(C.type!=="Identifier")return!1}return!0},Be.checkParams=function(o,p){for(var y=Object.create(null),C=0,O=o.params;C<O.length;C+=1){var q=O[C];this.checkLValInnerPattern(q,ke,p?null:y)}},Be.parseExprList=function(o,p,y,C){for(var O=[],q=!0;!this.eat(o);){if(q)q=!1;else if(this.expect(g.comma),p&&this.afterTrailingComma(o))break;var Y=void 0;y&&this.type===g.comma?Y=null:this.type===g.ellipsis?(Y=this.parseSpread(C),C&&this.type===g.comma&&C.trailingComma<0&&(C.trailingComma=this.start)):Y=this.parseMaybeAssign(!1,C),O.push(Y)}return O},Be.checkUnreserved=function(o){var p=o.start,y=o.end,C=o.name;if(this.inGenerator&&C==="yield"&&this.raiseRecoverable(p,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&C==="await"&&this.raiseRecoverable(p,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&_e)&&C==="arguments"&&this.raiseRecoverable(p,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(C==="arguments"||C==="await")&&this.raise(p,"Cannot use "+C+" in class static initialization block"),this.keywords.test(C)&&this.raise(p,"Unexpected keyword '"+C+"'"),!(this.options.ecmaVersion<6&&this.input.slice(p,y).indexOf("\\")!==-1)){var O=this.strict?this.reservedWordsStrict:this.reservedWords;O.test(C)&&(!this.inAsync&&C==="await"&&this.raiseRecoverable(p,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(p,"The keyword '"+C+"' is reserved"))}},Be.parseIdent=function(o){var p=this.parseIdentNode();return this.next(!!o),this.finishNode(p,"Identifier"),o||(this.checkUnreserved(p),p.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=p.start)),p},Be.parseIdentNode=function(){var o=this.startNode();return this.type===g.name?o.name=this.value:this.type.keyword?(o.name=this.type.keyword,(o.name==="class"||o.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=g.name):this.unexpected(),o},Be.parsePrivateIdent=function(){var o=this.startNode();return this.type===g.privateId?o.name=this.value:this.unexpected(),this.next(),this.finishNode(o,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(o)),o},Be.parseYield=function(o){this.yieldPos||(this.yieldPos=this.start);var p=this.startNode();return this.next(),this.type===g.semi||this.canInsertSemicolon()||this.type!==g.star&&!this.type.startsExpr?(p.delegate=!1,p.argument=null):(p.delegate=this.eat(g.star),p.argument=this.parseMaybeAssign(o)),this.finishNode(p,"YieldExpression")},Be.parseAwait=function(o){this.awaitPos||(this.awaitPos=this.start);var p=this.startNode();return this.next(),p.argument=this.parseMaybeUnary(null,!0,!1,o),this.finishNode(p,"AwaitExpression")};var $t=ce.prototype;$t.raise=function(o,p){var y=xe(this.input,o);p+=" ("+y.line+":"+y.column+")",this.sourceFile&&(p+=" in "+this.sourceFile);var C=new SyntaxError(p);throw C.pos=o,C.loc=y,C.raisedAt=this.pos,C},$t.raiseRecoverable=$t.raise,$t.curPosition=function(){if(this.options.locations)return new ue(this.curLine,this.pos-this.lineStart)};var wn=ce.prototype,ho=function(p){this.flags=p,this.var=[],this.lexical=[],this.functions=[]};wn.enterScope=function(o){this.scopeStack.push(new ho(o))},wn.exitScope=function(){this.scopeStack.pop()},wn.treatFunctionsAsVarInScope=function(o){return o.flags&me||!this.inModule&&o.flags&te},wn.declareName=function(o,p,y){var C=!1;if(p===Ne){var O=this.currentScope();C=O.lexical.indexOf(o)>-1||O.functions.indexOf(o)>-1||O.var.indexOf(o)>-1,O.lexical.push(o),this.inModule&&O.flags&te&&delete this.undefinedExports[o]}else if(p===bt){var q=this.currentScope();q.lexical.push(o)}else if(p===Fe){var Y=this.currentScope();this.treatFunctionsAsVar?C=Y.lexical.indexOf(o)>-1:C=Y.lexical.indexOf(o)>-1||Y.var.indexOf(o)>-1,Y.functions.push(o)}else for(var we=this.scopeStack.length-1;we>=0;--we){var Ce=this.scopeStack[we];if(Ce.lexical.indexOf(o)>-1&&!(Ce.flags&Q&&Ce.lexical[0]===o)||!this.treatFunctionsAsVarInScope(Ce)&&Ce.functions.indexOf(o)>-1){C=!0;break}if(Ce.var.push(o),this.inModule&&Ce.flags&te&&delete this.undefinedExports[o],Ce.flags&_e)break}C&&this.raiseRecoverable(y,"Identifier '"+o+"' has already been declared")},wn.checkLocalExport=function(o){this.scopeStack[0].lexical.indexOf(o.name)===-1&&this.scopeStack[0].var.indexOf(o.name)===-1&&(this.undefinedExports[o.name]=o)},wn.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},wn.currentVarScope=function(){for(var o=this.scopeStack.length-1;;o--){var p=this.scopeStack[o];if(p.flags&(_e|Ee|ve))return p}},wn.currentThisScope=function(){for(var o=this.scopeStack.length-1;;o--){var p=this.scopeStack[o];if(p.flags&(_e|Ee|ve)&&!(p.flags&Z))return p}};var lr=function(p,y,C){this.type="",this.start=y,this.end=0,p.options.locations&&(this.loc=new A(p,C)),p.options.directSourceFile&&(this.sourceFile=p.options.directSourceFile),p.options.ranges&&(this.range=[y,0])},cr=ce.prototype;cr.startNode=function(){return new lr(this,this.start,this.startLoc)},cr.startNodeAt=function(o,p){return new lr(this,o,p)};function ea(o,p,y,C){return o.type=p,o.end=y,this.options.locations&&(o.loc.end=C),this.options.ranges&&(o.range[1]=y),o}cr.finishNode=function(o,p){return ea.call(this,o,p,this.lastTokEnd,this.lastTokEndLoc)},cr.finishNodeAt=function(o,p,y,C){return ea.call(this,o,p,y,C)},cr.copyNode=function(o){var p=new lr(this,o.start,this.startLoc);for(var y in o)p[y]=o[y];return p};var Un="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",ta="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",na=ta+" Extended_Pictographic",ra=na,ia=ra+" EBase EComp EMod EPres ExtPict",aa=ia,Hn=aa,po={9:ta,10:na,11:ra,12:ia,13:aa,14:Hn},mo="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",go={9:"",10:"",11:"",12:"",13:"",14:mo},sa="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",oa="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ua=oa+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Tr=ua+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",la=Tr+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",fr=la+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ii=fr+" "+Un,vo={9:oa,10:ua,11:Tr,12:la,13:fr,14:ii},hr={};function ca(o){var p=hr[o]={binary:ye(po[o]+" "+sa),binaryOfStrings:ye(go[o]),nonBinary:{General_Category:ye(sa),Script:ye(vo[o])}};p.nonBinary.Script_Extensions=p.nonBinary.Script,p.nonBinary.gc=p.nonBinary.General_Category,p.nonBinary.sc=p.nonBinary.Script,p.nonBinary.scx=p.nonBinary.Script_Extensions}for(var ai=0,fa=[9,10,11,12,13,14];ai<fa.length;ai+=1){var xo=fa[ai];ca(xo)}var Re=ce.prototype,Ar=function(p,y){this.parent=p,this.base=y||this};Ar.prototype.separatedFrom=function(p){for(var y=this;y;y=y.parent)for(var C=p;C;C=C.parent)if(y.base===C.base&&y!==C)return!0;return!1},Ar.prototype.sibling=function(){return new Ar(this.parent,this.base)};var sn=function(p){this.parser=p,this.validFlags="gim"+(p.options.ecmaVersion>=6?"uy":"")+(p.options.ecmaVersion>=9?"s":"")+(p.options.ecmaVersion>=13?"d":"")+(p.options.ecmaVersion>=15?"v":""),this.unicodeProperties=hr[p.options.ecmaVersion>=14?14:p.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};sn.prototype.reset=function(p,y,C){var O=C.indexOf("v")!==-1,q=C.indexOf("u")!==-1;this.start=p|0,this.source=y+"",this.flags=C,O&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=q&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=q&&this.parser.options.ecmaVersion>=9)},sn.prototype.raise=function(p){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+p)},sn.prototype.at=function(p,y){y===void 0&&(y=!1);var C=this.source,O=C.length;if(p>=O)return-1;var q=C.charCodeAt(p);if(!(y||this.switchU)||q<=55295||q>=57344||p+1>=O)return q;var Y=C.charCodeAt(p+1);return Y>=56320&&Y<=57343?(q<<10)+Y-56613888:q},sn.prototype.nextIndex=function(p,y){y===void 0&&(y=!1);var C=this.source,O=C.length;if(p>=O)return O;var q=C.charCodeAt(p),Y;return!(y||this.switchU)||q<=55295||q>=57344||p+1>=O||(Y=C.charCodeAt(p+1))<56320||Y>57343?p+1:p+2},sn.prototype.current=function(p){return p===void 0&&(p=!1),this.at(this.pos,p)},sn.prototype.lookahead=function(p){return p===void 0&&(p=!1),this.at(this.nextIndex(this.pos,p),p)},sn.prototype.advance=function(p){p===void 0&&(p=!1),this.pos=this.nextIndex(this.pos,p)},sn.prototype.eat=function(p,y){return y===void 0&&(y=!1),this.current(y)===p?(this.advance(y),!0):!1},sn.prototype.eatChars=function(p,y){y===void 0&&(y=!1);for(var C=this.pos,O=0,q=p;O<q.length;O+=1){var Y=q[O],we=this.at(C,y);if(we===-1||we!==Y)return!1;C=this.nextIndex(C,y)}return this.pos=C,!0},Re.validateRegExpFlags=function(o){for(var p=o.validFlags,y=o.flags,C=!1,O=!1,q=0;q<y.length;q++){var Y=y.charAt(q);p.indexOf(Y)===-1&&this.raise(o.start,"Invalid regular expression flag"),y.indexOf(Y,q+1)>-1&&this.raise(o.start,"Duplicate regular expression flag"),Y==="u"&&(C=!0),Y==="v"&&(O=!0)}this.options.ecmaVersion>=15&&C&&O&&this.raise(o.start,"Invalid regular expression flag")};function bo(o){for(var p in o)return!0;return!1}Re.validateRegExpPattern=function(o){this.regexp_pattern(o),!o.switchN&&this.options.ecmaVersion>=9&&bo(o.groupNames)&&(o.switchN=!0,this.regexp_pattern(o))},Re.regexp_pattern=function(o){o.pos=0,o.lastIntValue=0,o.lastStringValue="",o.lastAssertionIsQuantifiable=!1,o.numCapturingParens=0,o.maxBackReference=0,o.groupNames=Object.create(null),o.backReferenceNames.length=0,o.branchID=null,this.regexp_disjunction(o),o.pos!==o.source.length&&(o.eat(41)&&o.raise("Unmatched ')'"),(o.eat(93)||o.eat(125))&&o.raise("Lone quantifier brackets")),o.maxBackReference>o.numCapturingParens&&o.raise("Invalid escape");for(var p=0,y=o.backReferenceNames;p<y.length;p+=1){var C=y[p];o.groupNames[C]||o.raise("Invalid named capture referenced")}},Re.regexp_disjunction=function(o){var p=this.options.ecmaVersion>=16;for(p&&(o.branchID=new Ar(o.branchID,null)),this.regexp_alternative(o);o.eat(124);)p&&(o.branchID=o.branchID.sibling()),this.regexp_alternative(o);p&&(o.branchID=o.branchID.parent),this.regexp_eatQuantifier(o,!0)&&o.raise("Nothing to repeat"),o.eat(123)&&o.raise("Lone quantifier brackets")},Re.regexp_alternative=function(o){for(;o.pos<o.source.length&&this.regexp_eatTerm(o););},Re.regexp_eatTerm=function(o){return this.regexp_eatAssertion(o)?(o.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(o)&&o.switchU&&o.raise("Invalid quantifier"),!0):(o.switchU?this.regexp_eatAtom(o):this.regexp_eatExtendedAtom(o))?(this.regexp_eatQuantifier(o),!0):!1},Re.regexp_eatAssertion=function(o){var p=o.pos;if(o.lastAssertionIsQuantifiable=!1,o.eat(94)||o.eat(36))return!0;if(o.eat(92)){if(o.eat(66)||o.eat(98))return!0;o.pos=p}if(o.eat(40)&&o.eat(63)){var y=!1;if(this.options.ecmaVersion>=9&&(y=o.eat(60)),o.eat(61)||o.eat(33))return this.regexp_disjunction(o),o.eat(41)||o.raise("Unterminated group"),o.lastAssertionIsQuantifiable=!y,!0}return o.pos=p,!1},Re.regexp_eatQuantifier=function(o,p){return p===void 0&&(p=!1),this.regexp_eatQuantifierPrefix(o,p)?(o.eat(63),!0):!1},Re.regexp_eatQuantifierPrefix=function(o,p){return o.eat(42)||o.eat(43)||o.eat(63)||this.regexp_eatBracedQuantifier(o,p)},Re.regexp_eatBracedQuantifier=function(o,p){var y=o.pos;if(o.eat(123)){var C=0,O=-1;if(this.regexp_eatDecimalDigits(o)&&(C=o.lastIntValue,o.eat(44)&&this.regexp_eatDecimalDigits(o)&&(O=o.lastIntValue),o.eat(125)))return O!==-1&&O<C&&!p&&o.raise("numbers out of order in {} quantifier"),!0;o.switchU&&!p&&o.raise("Incomplete quantifier"),o.pos=y}return!1},Re.regexp_eatAtom=function(o){return this.regexp_eatPatternCharacters(o)||o.eat(46)||this.regexp_eatReverseSolidusAtomEscape(o)||this.regexp_eatCharacterClass(o)||this.regexp_eatUncapturingGroup(o)||this.regexp_eatCapturingGroup(o)},Re.regexp_eatReverseSolidusAtomEscape=function(o){var p=o.pos;if(o.eat(92)){if(this.regexp_eatAtomEscape(o))return!0;o.pos=p}return!1},Re.regexp_eatUncapturingGroup=function(o){var p=o.pos;if(o.eat(40)){if(o.eat(63)){if(this.options.ecmaVersion>=16){var y=this.regexp_eatModifiers(o),C=o.eat(45);if(y||C){for(var O=0;O<y.length;O++){var q=y.charAt(O);y.indexOf(q,O+1)>-1&&o.raise("Duplicate regular expression modifiers")}if(C){var Y=this.regexp_eatModifiers(o);!y&&!Y&&o.current()===58&&o.raise("Invalid regular expression modifiers");for(var we=0;we<Y.length;we++){var Ce=Y.charAt(we);(Y.indexOf(Ce,we+1)>-1||y.indexOf(Ce)>-1)&&o.raise("Duplicate regular expression modifiers")}}}}if(o.eat(58)){if(this.regexp_disjunction(o),o.eat(41))return!0;o.raise("Unterminated group")}}o.pos=p}return!1},Re.regexp_eatCapturingGroup=function(o){if(o.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(o):o.current()===63&&o.raise("Invalid group"),this.regexp_disjunction(o),o.eat(41))return o.numCapturingParens+=1,!0;o.raise("Unterminated group")}return!1},Re.regexp_eatModifiers=function(o){for(var p="",y=0;(y=o.current())!==-1&&yo(y);)p+=L(y),o.advance();return p};function yo(o){return o===105||o===109||o===115}Re.regexp_eatExtendedAtom=function(o){return o.eat(46)||this.regexp_eatReverseSolidusAtomEscape(o)||this.regexp_eatCharacterClass(o)||this.regexp_eatUncapturingGroup(o)||this.regexp_eatCapturingGroup(o)||this.regexp_eatInvalidBracedQuantifier(o)||this.regexp_eatExtendedPatternCharacter(o)},Re.regexp_eatInvalidBracedQuantifier=function(o){return this.regexp_eatBracedQuantifier(o,!0)&&o.raise("Nothing to repeat"),!1},Re.regexp_eatSyntaxCharacter=function(o){var p=o.current();return ha(p)?(o.lastIntValue=p,o.advance(),!0):!1};function ha(o){return o===36||o>=40&&o<=43||o===46||o===63||o>=91&&o<=94||o>=123&&o<=125}Re.regexp_eatPatternCharacters=function(o){for(var p=o.pos,y=0;(y=o.current())!==-1&&!ha(y);)o.advance();return o.pos!==p},Re.regexp_eatExtendedPatternCharacter=function(o){var p=o.current();return p!==-1&&p!==36&&!(p>=40&&p<=43)&&p!==46&&p!==63&&p!==91&&p!==94&&p!==124?(o.advance(),!0):!1},Re.regexp_groupSpecifier=function(o){if(o.eat(63)){this.regexp_eatGroupName(o)||o.raise("Invalid group");var p=this.options.ecmaVersion>=16,y=o.groupNames[o.lastStringValue];if(y)if(p)for(var C=0,O=y;C<O.length;C+=1){var q=O[C];q.separatedFrom(o.branchID)||o.raise("Duplicate capture group name")}else o.raise("Duplicate capture group name");p?(y||(o.groupNames[o.lastStringValue]=[])).push(o.branchID):o.groupNames[o.lastStringValue]=!0}},Re.regexp_eatGroupName=function(o){if(o.lastStringValue="",o.eat(60)){if(this.regexp_eatRegExpIdentifierName(o)&&o.eat(62))return!0;o.raise("Invalid capture group name")}return!1},Re.regexp_eatRegExpIdentifierName=function(o){if(o.lastStringValue="",this.regexp_eatRegExpIdentifierStart(o)){for(o.lastStringValue+=L(o.lastIntValue);this.regexp_eatRegExpIdentifierPart(o);)o.lastStringValue+=L(o.lastIntValue);return!0}return!1},Re.regexp_eatRegExpIdentifierStart=function(o){var p=o.pos,y=this.options.ecmaVersion>=11,C=o.current(y);return o.advance(y),C===92&&this.regexp_eatRegExpUnicodeEscapeSequence(o,y)&&(C=o.lastIntValue),wo(C)?(o.lastIntValue=C,!0):(o.pos=p,!1)};function wo(o){return v(o,!0)||o===36||o===95}Re.regexp_eatRegExpIdentifierPart=function(o){var p=o.pos,y=this.options.ecmaVersion>=11,C=o.current(y);return o.advance(y),C===92&&this.regexp_eatRegExpUnicodeEscapeSequence(o,y)&&(C=o.lastIntValue),So(C)?(o.lastIntValue=C,!0):(o.pos=p,!1)};function So(o){return x(o,!0)||o===36||o===95||o===8204||o===8205}Re.regexp_eatAtomEscape=function(o){return this.regexp_eatBackReference(o)||this.regexp_eatCharacterClassEscape(o)||this.regexp_eatCharacterEscape(o)||o.switchN&&this.regexp_eatKGroupName(o)?!0:(o.switchU&&(o.current()===99&&o.raise("Invalid unicode escape"),o.raise("Invalid escape")),!1)},Re.regexp_eatBackReference=function(o){var p=o.pos;if(this.regexp_eatDecimalEscape(o)){var y=o.lastIntValue;if(o.switchU)return y>o.maxBackReference&&(o.maxBackReference=y),!0;if(y<=o.numCapturingParens)return!0;o.pos=p}return!1},Re.regexp_eatKGroupName=function(o){if(o.eat(107)){if(this.regexp_eatGroupName(o))return o.backReferenceNames.push(o.lastStringValue),!0;o.raise("Invalid named reference")}return!1},Re.regexp_eatCharacterEscape=function(o){return this.regexp_eatControlEscape(o)||this.regexp_eatCControlLetter(o)||this.regexp_eatZero(o)||this.regexp_eatHexEscapeSequence(o)||this.regexp_eatRegExpUnicodeEscapeSequence(o,!1)||!o.switchU&&this.regexp_eatLegacyOctalEscapeSequence(o)||this.regexp_eatIdentityEscape(o)},Re.regexp_eatCControlLetter=function(o){var p=o.pos;if(o.eat(99)){if(this.regexp_eatControlLetter(o))return!0;o.pos=p}return!1},Re.regexp_eatZero=function(o){return o.current()===48&&!pr(o.lookahead())?(o.lastIntValue=0,o.advance(),!0):!1},Re.regexp_eatControlEscape=function(o){var p=o.current();return p===116?(o.lastIntValue=9,o.advance(),!0):p===110?(o.lastIntValue=10,o.advance(),!0):p===118?(o.lastIntValue=11,o.advance(),!0):p===102?(o.lastIntValue=12,o.advance(),!0):p===114?(o.lastIntValue=13,o.advance(),!0):!1},Re.regexp_eatControlLetter=function(o){var p=o.current();return pa(p)?(o.lastIntValue=p%32,o.advance(),!0):!1};function pa(o){return o>=65&&o<=90||o>=97&&o<=122}Re.regexp_eatRegExpUnicodeEscapeSequence=function(o,p){p===void 0&&(p=!1);var y=o.pos,C=p||o.switchU;if(o.eat(117)){if(this.regexp_eatFixedHexDigits(o,4)){var O=o.lastIntValue;if(C&&O>=55296&&O<=56319){var q=o.pos;if(o.eat(92)&&o.eat(117)&&this.regexp_eatFixedHexDigits(o,4)){var Y=o.lastIntValue;if(Y>=56320&&Y<=57343)return o.lastIntValue=(O-55296)*1024+(Y-56320)+65536,!0}o.pos=q,o.lastIntValue=O}return!0}if(C&&o.eat(123)&&this.regexp_eatHexDigits(o)&&o.eat(125)&&Co(o.lastIntValue))return!0;C&&o.raise("Invalid unicode escape"),o.pos=y}return!1};function Co(o){return o>=0&&o<=1114111}Re.regexp_eatIdentityEscape=function(o){if(o.switchU)return this.regexp_eatSyntaxCharacter(o)?!0:o.eat(47)?(o.lastIntValue=47,!0):!1;var p=o.current();return p!==99&&(!o.switchN||p!==107)?(o.lastIntValue=p,o.advance(),!0):!1},Re.regexp_eatDecimalEscape=function(o){o.lastIntValue=0;var p=o.current();if(p>=49&&p<=57){do o.lastIntValue=10*o.lastIntValue+(p-48),o.advance();while((p=o.current())>=48&&p<=57);return!0}return!1};var da=0,Ut=1,Pt=2;Re.regexp_eatCharacterClassEscape=function(o){var p=o.current();if(ko(p))return o.lastIntValue=-1,o.advance(),Ut;var y=!1;if(o.switchU&&this.options.ecmaVersion>=9&&((y=p===80)||p===112)){o.lastIntValue=-1,o.advance();var C;if(o.eat(123)&&(C=this.regexp_eatUnicodePropertyValueExpression(o))&&o.eat(125))return y&&C===Pt&&o.raise("Invalid property name"),C;o.raise("Invalid property name")}return da};function ko(o){return o===100||o===68||o===115||o===83||o===119||o===87}Re.regexp_eatUnicodePropertyValueExpression=function(o){var p=o.pos;if(this.regexp_eatUnicodePropertyName(o)&&o.eat(61)){var y=o.lastStringValue;if(this.regexp_eatUnicodePropertyValue(o)){var C=o.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(o,y,C),Ut}}if(o.pos=p,this.regexp_eatLoneUnicodePropertyNameOrValue(o)){var O=o.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(o,O)}return da},Re.regexp_validateUnicodePropertyNameAndValue=function(o,p,y){se(o.unicodeProperties.nonBinary,p)||o.raise("Invalid property name"),o.unicodeProperties.nonBinary[p].test(y)||o.raise("Invalid property value")},Re.regexp_validateUnicodePropertyNameOrValue=function(o,p){if(o.unicodeProperties.binary.test(p))return Ut;if(o.switchV&&o.unicodeProperties.binaryOfStrings.test(p))return Pt;o.raise("Invalid property name")},Re.regexp_eatUnicodePropertyName=function(o){var p=0;for(o.lastStringValue="";ma(p=o.current());)o.lastStringValue+=L(p),o.advance();return o.lastStringValue!==""};function ma(o){return pa(o)||o===95}Re.regexp_eatUnicodePropertyValue=function(o){var p=0;for(o.lastStringValue="";ga(p=o.current());)o.lastStringValue+=L(p),o.advance();return o.lastStringValue!==""};function ga(o){return ma(o)||pr(o)}Re.regexp_eatLoneUnicodePropertyNameOrValue=function(o){return this.regexp_eatUnicodePropertyValue(o)},Re.regexp_eatCharacterClass=function(o){if(o.eat(91)){var p=o.eat(94),y=this.regexp_classContents(o);return o.eat(93)||o.raise("Unterminated character class"),p&&y===Pt&&o.raise("Negated character class may contain strings"),!0}return!1},Re.regexp_classContents=function(o){return o.current()===93?Ut:o.switchV?this.regexp_classSetExpression(o):(this.regexp_nonEmptyClassRanges(o),Ut)},Re.regexp_nonEmptyClassRanges=function(o){for(;this.regexp_eatClassAtom(o);){var p=o.lastIntValue;if(o.eat(45)&&this.regexp_eatClassAtom(o)){var y=o.lastIntValue;o.switchU&&(p===-1||y===-1)&&o.raise("Invalid character class"),p!==-1&&y!==-1&&p>y&&o.raise("Range out of order in character class")}}},Re.regexp_eatClassAtom=function(o){var p=o.pos;if(o.eat(92)){if(this.regexp_eatClassEscape(o))return!0;if(o.switchU){var y=o.current();(y===99||ba(y))&&o.raise("Invalid class escape"),o.raise("Invalid escape")}o.pos=p}var C=o.current();return C!==93?(o.lastIntValue=C,o.advance(),!0):!1},Re.regexp_eatClassEscape=function(o){var p=o.pos;if(o.eat(98))return o.lastIntValue=8,!0;if(o.switchU&&o.eat(45))return o.lastIntValue=45,!0;if(!o.switchU&&o.eat(99)){if(this.regexp_eatClassControlLetter(o))return!0;o.pos=p}return this.regexp_eatCharacterClassEscape(o)||this.regexp_eatCharacterEscape(o)},Re.regexp_classSetExpression=function(o){var p=Ut,y;if(!this.regexp_eatClassSetRange(o))if(y=this.regexp_eatClassSetOperand(o)){y===Pt&&(p=Pt);for(var C=o.pos;o.eatChars([38,38]);){if(o.current()!==38&&(y=this.regexp_eatClassSetOperand(o))){y!==Pt&&(p=Ut);continue}o.raise("Invalid character in character class")}if(C!==o.pos)return p;for(;o.eatChars([45,45]);)this.regexp_eatClassSetOperand(o)||o.raise("Invalid character in character class");if(C!==o.pos)return p}else o.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(o)){if(y=this.regexp_eatClassSetOperand(o),!y)return p;y===Pt&&(p=Pt)}},Re.regexp_eatClassSetRange=function(o){var p=o.pos;if(this.regexp_eatClassSetCharacter(o)){var y=o.lastIntValue;if(o.eat(45)&&this.regexp_eatClassSetCharacter(o)){var C=o.lastIntValue;return y!==-1&&C!==-1&&y>C&&o.raise("Range out of order in character class"),!0}o.pos=p}return!1},Re.regexp_eatClassSetOperand=function(o){return this.regexp_eatClassSetCharacter(o)?Ut:this.regexp_eatClassStringDisjunction(o)||this.regexp_eatNestedClass(o)},Re.regexp_eatNestedClass=function(o){var p=o.pos;if(o.eat(91)){var y=o.eat(94),C=this.regexp_classContents(o);if(o.eat(93))return y&&C===Pt&&o.raise("Negated character class may contain strings"),C;o.pos=p}if(o.eat(92)){var O=this.regexp_eatCharacterClassEscape(o);if(O)return O;o.pos=p}return null},Re.regexp_eatClassStringDisjunction=function(o){var p=o.pos;if(o.eatChars([92,113])){if(o.eat(123)){var y=this.regexp_classStringDisjunctionContents(o);if(o.eat(125))return y}else o.raise("Invalid escape");o.pos=p}return null},Re.regexp_classStringDisjunctionContents=function(o){for(var p=this.regexp_classString(o);o.eat(124);)this.regexp_classString(o)===Pt&&(p=Pt);return p},Re.regexp_classString=function(o){for(var p=0;this.regexp_eatClassSetCharacter(o);)p++;return p===1?Ut:Pt},Re.regexp_eatClassSetCharacter=function(o){var p=o.pos;if(o.eat(92))return this.regexp_eatCharacterEscape(o)||this.regexp_eatClassSetReservedPunctuator(o)?!0:o.eat(98)?(o.lastIntValue=8,!0):(o.pos=p,!1);var y=o.current();return y<0||y===o.lookahead()&&Eo(y)||_o(y)?!1:(o.advance(),o.lastIntValue=y,!0)};function Eo(o){return o===33||o>=35&&o<=38||o>=42&&o<=44||o===46||o>=58&&o<=64||o===94||o===96||o===126}function _o(o){return o===40||o===41||o===45||o===47||o>=91&&o<=93||o>=123&&o<=125}Re.regexp_eatClassSetReservedPunctuator=function(o){var p=o.current();return Io(p)?(o.lastIntValue=p,o.advance(),!0):!1};function Io(o){return o===33||o===35||o===37||o===38||o===44||o===45||o>=58&&o<=62||o===64||o===96||o===126}Re.regexp_eatClassControlLetter=function(o){var p=o.current();return pr(p)||p===95?(o.lastIntValue=p%32,o.advance(),!0):!1},Re.regexp_eatHexEscapeSequence=function(o){var p=o.pos;if(o.eat(120)){if(this.regexp_eatFixedHexDigits(o,2))return!0;o.switchU&&o.raise("Invalid escape"),o.pos=p}return!1},Re.regexp_eatDecimalDigits=function(o){var p=o.pos,y=0;for(o.lastIntValue=0;pr(y=o.current());)o.lastIntValue=10*o.lastIntValue+(y-48),o.advance();return o.pos!==p};function pr(o){return o>=48&&o<=57}Re.regexp_eatHexDigits=function(o){var p=o.pos,y=0;for(o.lastIntValue=0;va(y=o.current());)o.lastIntValue=16*o.lastIntValue+xa(y),o.advance();return o.pos!==p};function va(o){return o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102}function xa(o){return o>=65&&o<=70?10+(o-65):o>=97&&o<=102?10+(o-97):o-48}Re.regexp_eatLegacyOctalEscapeSequence=function(o){if(this.regexp_eatOctalDigit(o)){var p=o.lastIntValue;if(this.regexp_eatOctalDigit(o)){var y=o.lastIntValue;p<=3&&this.regexp_eatOctalDigit(o)?o.lastIntValue=p*64+y*8+o.lastIntValue:o.lastIntValue=p*8+y}else o.lastIntValue=p;return!0}return!1},Re.regexp_eatOctalDigit=function(o){var p=o.current();return ba(p)?(o.lastIntValue=p-48,o.advance(),!0):(o.lastIntValue=0,!1)};function ba(o){return o>=48&&o<=55}Re.regexp_eatFixedHexDigits=function(o,p){var y=o.pos;o.lastIntValue=0;for(var C=0;C<p;++C){var O=o.current();if(!va(O))return o.pos=y,!1;o.lastIntValue=16*o.lastIntValue+xa(O),o.advance()}return!0};var Wn=function(p){this.type=p.type,this.value=p.value,this.start=p.start,this.end=p.end,p.options.locations&&(this.loc=new A(p,p.startLoc,p.endLoc)),p.options.ranges&&(this.range=[p.start,p.end])},qe=ce.prototype;qe.next=function(o){!o&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Wn(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},qe.getToken=function(){return this.next(),new Wn(this)},typeof Symbol<"u"&&(qe[Symbol.iterator]=function(){var o=this;return{next:function(){var p=o.getToken();return{done:p.type===g.eof,value:p}}}}),qe.nextToken=function(){var o=this.curContext();if((!o||!o.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(g.eof);if(o.override)return o.override(this);this.readToken(this.fullCharCodeAtPos())},qe.readToken=function(o){return v(o,this.options.ecmaVersion>=6)||o===92?this.readWord():this.getTokenFromCode(o)},qe.fullCharCodeAtPos=function(){var o=this.input.charCodeAt(this.pos);if(o<=55295||o>=56320)return o;var p=this.input.charCodeAt(this.pos+1);return p<=56319||p>=57344?o:(o<<10)+p-56613888},qe.skipBlockComment=function(){var o=this.options.onComment&&this.curPosition(),p=this.pos,y=this.input.indexOf("*/",this.pos+=2);if(y===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=y+2,this.options.locations)for(var C=void 0,O=p;(C=N(this.input,O,this.pos))>-1;)++this.curLine,O=this.lineStart=C;this.options.onComment&&this.options.onComment(!0,this.input.slice(p+2,y),p,this.pos,o,this.curPosition())},qe.skipLineComment=function(o){for(var p=this.pos,y=this.options.onComment&&this.curPosition(),C=this.input.charCodeAt(this.pos+=o);this.pos<this.input.length&&!j(C);)C=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(p+o,this.pos),p,this.pos,y,this.curPosition())},qe.skipSpace=function(){e:for(;this.pos<this.input.length;){var o=this.input.charCodeAt(this.pos);switch(o){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(o>8&&o<14||o>=5760&&B.test(String.fromCharCode(o)))++this.pos;else break e}}},qe.finishToken=function(o,p){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var y=this.type;this.type=o,this.value=p,this.updateContext(y)},qe.readToken_dot=function(){var o=this.input.charCodeAt(this.pos+1);if(o>=48&&o<=57)return this.readNumber(!0);var p=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&o===46&&p===46?(this.pos+=3,this.finishToken(g.ellipsis)):(++this.pos,this.finishToken(g.dot))},qe.readToken_slash=function(){var o=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):o===61?this.finishOp(g.assign,2):this.finishOp(g.slash,1)},qe.readToken_mult_modulo_exp=function(o){var p=this.input.charCodeAt(this.pos+1),y=1,C=o===42?g.star:g.modulo;return this.options.ecmaVersion>=7&&o===42&&p===42&&(++y,C=g.starstar,p=this.input.charCodeAt(this.pos+2)),p===61?this.finishOp(g.assign,y+1):this.finishOp(C,y)},qe.readToken_pipe_amp=function(o){var p=this.input.charCodeAt(this.pos+1);if(p===o){if(this.options.ecmaVersion>=12){var y=this.input.charCodeAt(this.pos+2);if(y===61)return this.finishOp(g.assign,3)}return this.finishOp(o===124?g.logicalOR:g.logicalAND,2)}return p===61?this.finishOp(g.assign,2):this.finishOp(o===124?g.bitwiseOR:g.bitwiseAND,1)},qe.readToken_caret=function(){var o=this.input.charCodeAt(this.pos+1);return o===61?this.finishOp(g.assign,2):this.finishOp(g.bitwiseXOR,1)},qe.readToken_plus_min=function(o){var p=this.input.charCodeAt(this.pos+1);return p===o?p===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||E.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(g.incDec,2):p===61?this.finishOp(g.assign,2):this.finishOp(g.plusMin,1)},qe.readToken_lt_gt=function(o){var p=this.input.charCodeAt(this.pos+1),y=1;return p===o?(y=o===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+y)===61?this.finishOp(g.assign,y+1):this.finishOp(g.bitShift,y)):p===33&&o===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(p===61&&(y=2),this.finishOp(g.relational,y))},qe.readToken_eq_excl=function(o){var p=this.input.charCodeAt(this.pos+1);return p===61?this.finishOp(g.equality,this.input.charCodeAt(this.pos+2)===61?3:2):o===61&&p===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(g.arrow)):this.finishOp(o===61?g.eq:g.prefix,1)},qe.readToken_question=function(){var o=this.options.ecmaVersion;if(o>=11){var p=this.input.charCodeAt(this.pos+1);if(p===46){var y=this.input.charCodeAt(this.pos+2);if(y<48||y>57)return this.finishOp(g.questionDot,2)}if(p===63){if(o>=12){var C=this.input.charCodeAt(this.pos+2);if(C===61)return this.finishOp(g.assign,3)}return this.finishOp(g.coalesce,2)}}return this.finishOp(g.question,1)},qe.readToken_numberSign=function(){var o=this.options.ecmaVersion,p=35;if(o>=13&&(++this.pos,p=this.fullCharCodeAtPos(),v(p,!0)||p===92))return this.finishToken(g.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+L(p)+"'")},qe.getTokenFromCode=function(o){switch(o){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(g.parenL);case 41:return++this.pos,this.finishToken(g.parenR);case 59:return++this.pos,this.finishToken(g.semi);case 44:return++this.pos,this.finishToken(g.comma);case 91:return++this.pos,this.finishToken(g.bracketL);case 93:return++this.pos,this.finishToken(g.bracketR);case 123:return++this.pos,this.finishToken(g.braceL);case 125:return++this.pos,this.finishToken(g.braceR);case 58:return++this.pos,this.finishToken(g.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(g.backQuote);case 48:var p=this.input.charCodeAt(this.pos+1);if(p===120||p===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(p===111||p===79)return this.readRadixNumber(8);if(p===98||p===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(o);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(o);case 124:case 38:return this.readToken_pipe_amp(o);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(o);case 60:case 62:return this.readToken_lt_gt(o);case 61:case 33:return this.readToken_eq_excl(o);case 63:return this.readToken_question();case 126:return this.finishOp(g.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+L(o)+"'")},qe.finishOp=function(o,p){var y=this.input.slice(this.pos,this.pos+p);return this.pos+=p,this.finishToken(o,y)},qe.readRegexp=function(){for(var o,p,y=this.pos;;){this.pos>=this.input.length&&this.raise(y,"Unterminated regular expression");var C=this.input.charAt(this.pos);if(E.test(C)&&this.raise(y,"Unterminated regular expression"),o)o=!1;else{if(C==="[")p=!0;else if(C==="]"&&p)p=!1;else if(C==="/"&&!p)break;o=C==="\\"}++this.pos}var O=this.input.slice(y,this.pos);++this.pos;var q=this.pos,Y=this.readWord1();this.containsEsc&&this.unexpected(q);var we=this.regexpState||(this.regexpState=new sn(this));we.reset(y,O,Y),this.validateRegExpFlags(we),this.validateRegExpPattern(we);var Ce=null;try{Ce=new RegExp(O,Y)}catch{}return this.finishToken(g.regexp,{pattern:O,flags:Y,value:Ce})},qe.readInt=function(o,p,y){for(var C=this.options.ecmaVersion>=12&&p===void 0,O=y&&this.input.charCodeAt(this.pos)===48,q=this.pos,Y=0,we=0,Ce=0,je=p??1/0;Ce<je;++Ce,++this.pos){var Ue=this.input.charCodeAt(this.pos),ot=void 0;if(C&&Ue===95){O&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),we===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),Ce===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),we=Ue;continue}if(Ue>=97?ot=Ue-97+10:Ue>=65?ot=Ue-65+10:Ue>=48&&Ue<=57?ot=Ue-48:ot=1/0,ot>=o)break;we=Ue,Y=Y*o+ot}return C&&we===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===q||p!=null&&this.pos-q!==p?null:Y};function To(o,p){return p?parseInt(o,8):parseFloat(o.replace(/_/g,""))}function ya(o){return typeof BigInt!="function"?null:BigInt(o.replace(/_/g,""))}qe.readRadixNumber=function(o){var p=this.pos;this.pos+=2;var y=this.readInt(o);return y==null&&this.raise(this.start+2,"Expected number in radix "+o),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(y=ya(this.input.slice(p,this.pos)),++this.pos):v(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(g.num,y)},qe.readNumber=function(o){var p=this.pos;!o&&this.readInt(10,void 0,!0)===null&&this.raise(p,"Invalid number");var y=this.pos-p>=2&&this.input.charCodeAt(p)===48;y&&this.strict&&this.raise(p,"Invalid number");var C=this.input.charCodeAt(this.pos);if(!y&&!o&&this.options.ecmaVersion>=11&&C===110){var O=ya(this.input.slice(p,this.pos));return++this.pos,v(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(g.num,O)}y&&/[89]/.test(this.input.slice(p,this.pos))&&(y=!1),C===46&&!y&&(++this.pos,this.readInt(10),C=this.input.charCodeAt(this.pos)),(C===69||C===101)&&!y&&(C=this.input.charCodeAt(++this.pos),(C===43||C===45)&&++this.pos,this.readInt(10)===null&&this.raise(p,"Invalid number")),v(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var q=To(this.input.slice(p,this.pos),y);return this.finishToken(g.num,q)},qe.readCodePoint=function(){var o=this.input.charCodeAt(this.pos),p;if(o===123){this.options.ecmaVersion<6&&this.unexpected();var y=++this.pos;p=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,p>1114111&&this.invalidStringToken(y,"Code point out of bounds")}else p=this.readHexChar(4);return p},qe.readString=function(o){for(var p="",y=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var C=this.input.charCodeAt(this.pos);if(C===o)break;C===92?(p+=this.input.slice(y,this.pos),p+=this.readEscapedChar(!1),y=this.pos):C===8232||C===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(j(C)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return p+=this.input.slice(y,this.pos++),this.finishToken(g.string,p)};var dr={};qe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(o){if(o===dr)this.readInvalidTemplateToken();else throw o}this.inTemplateElement=!1},qe.invalidStringToken=function(o,p){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw dr;this.raise(o,p)},qe.readTmplToken=function(){for(var o="",p=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var y=this.input.charCodeAt(this.pos);if(y===96||y===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===g.template||this.type===g.invalidTemplate)?y===36?(this.pos+=2,this.finishToken(g.dollarBraceL)):(++this.pos,this.finishToken(g.backQuote)):(o+=this.input.slice(p,this.pos),this.finishToken(g.template,o));if(y===92)o+=this.input.slice(p,this.pos),o+=this.readEscapedChar(!0),p=this.pos;else if(j(y)){switch(o+=this.input.slice(p,this.pos),++this.pos,y){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:o+=`
25
- `;break;default:o+=String.fromCharCode(y);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),p=this.pos}else++this.pos}},qe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(g.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
20
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Vn(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return Xr(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};Ge.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,"Bad character escape sequence"),n};Ge.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(Qn(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var s=this.readCodePoint();(t?In:Qn)(s,r)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=Vn(s),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)};Ge.readWord=function(){var e=this.readWord1(),t=I.name;return this.keywords.test(e)&&(t=Rl[e]),this.finishToken(t,e)};var Bb="8.15.0";kt.acorn={Parser:kt,version:Bb,defaultOptions:zu,Position:Ii,SourceLocation:js,getLineInfo:Vd,Node:Us,TokenType:Ze,tokTypes:I,keywordTypes:Rl,TokContext:vn,tokContexts:xt,isIdentifierChar:Qn,isIdentifierStart:In,Token:Ml,isNewLine:Xr,lineBreak:Xt,lineBreakG:ub,nonASCIIwhitespace:Ld};var ka=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zb(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var jo={exports:{}},Bo,kf;function $b(){return kf||(kf=1,Bo={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),Bo}var pi={exports:{}},Ub=pi.exports,Ef;function _f(){return Ef||(Ef=1,(function(e,t){(function(n,r){r(t)})(Ub,(function(n){var r=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],i=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],a="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",s="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",u={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},l="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",c={5:l,"5module":l+" export import",6:l+" const class extends export import super"},h=/^in(stanceof)?$/,f=new RegExp("["+s+"]"),d=new RegExp("["+s+a+"]");function m(o,p){for(var b=65536,C=0;C<p.length;C+=2){if(b+=p[C],b>o)return!1;if(b+=p[C+1],b>=o)return!0}return!1}function v(o,p){return o<65?o===36:o<91?!0:o<97?o===95:o<123?!0:o<=65535?o>=170&&f.test(String.fromCharCode(o)):p===!1?!1:m(o,i)}function x(o,p){return o<48?o===36:o<58?!0:o<65?!1:o<91?!0:o<97?o===95:o<123?!0:o<=65535?o>=170&&d.test(String.fromCharCode(o)):p===!1?!1:m(o,i)||m(o,r)}var S=function(p,b){b===void 0&&(b={}),this.label=p,this.keyword=b.keyword,this.beforeExpr=!!b.beforeExpr,this.startsExpr=!!b.startsExpr,this.isLoop=!!b.isLoop,this.isAssign=!!b.isAssign,this.prefix=!!b.prefix,this.postfix=!!b.postfix,this.binop=b.binop||null,this.updateContext=null};function y(o,p){return new S(o,{beforeExpr:!0,binop:p})}var k={beforeExpr:!0},_={startsExpr:!0},P={};function w(o,p){return p===void 0&&(p={}),p.keyword=o,P[o]=new S(o,p)}var g={num:new S("num",_),regexp:new S("regexp",_),string:new S("string",_),name:new S("name",_),privateId:new S("privateId",_),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",k),semi:new S(";",k),colon:new S(":",k),dot:new S("."),question:new S("?",k),questionDot:new S("?."),arrow:new S("=>",k),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",k),backQuote:new S("`",_),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:y("||",1),logicalAND:y("&&",2),bitwiseOR:y("|",3),bitwiseXOR:y("^",4),bitwiseAND:y("&",5),equality:y("==/!=/===/!==",6),relational:y("</>/<=/>=",7),bitShift:y("<</>>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:y("%",10),star:y("*",10),slash:y("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:y("??",1),_break:w("break"),_case:w("case",k),_catch:w("catch"),_continue:w("continue"),_debugger:w("debugger"),_default:w("default",k),_do:w("do",{isLoop:!0,beforeExpr:!0}),_else:w("else",k),_finally:w("finally"),_for:w("for",{isLoop:!0}),_function:w("function",_),_if:w("if"),_return:w("return",k),_switch:w("switch"),_throw:w("throw",k),_try:w("try"),_var:w("var"),_const:w("const"),_while:w("while",{isLoop:!0}),_with:w("with"),_new:w("new",{beforeExpr:!0,startsExpr:!0}),_this:w("this",_),_super:w("super",_),_class:w("class",_),_extends:w("extends",k),_export:w("export"),_import:w("import",_),_null:w("null",_),_true:w("true",_),_false:w("false",_),_in:w("in",{beforeExpr:!0,binop:7}),_instanceof:w("instanceof",{beforeExpr:!0,binop:7}),_typeof:w("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:w("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:w("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},E=/\r\n?|\n|\u2028|\u2029/,D=new RegExp(E.source,"g");function F(o){return o===10||o===13||o===8232||o===8233}function R(o,p,b){b===void 0&&(b=o.length);for(var C=p;C<b;C++){var O=o.charCodeAt(C);if(F(O))return C<b-1&&O===13&&o.charCodeAt(C+1)===10?C+2:C+1}return-1}var B=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,G=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,U=Object.prototype,re=U.hasOwnProperty,ee=U.toString,se=Object.hasOwn||(function(o,p){return re.call(o,p)}),he=Array.isArray||(function(o){return ee.call(o)==="[object Array]"}),ge=Object.create(null);function be(o){return ge[o]||(ge[o]=new RegExp("^(?:"+o.replace(/ /g,"|")+")$"))}function L(o){return o<=65535?String.fromCharCode(o):(o-=65536,String.fromCharCode((o>>10)+55296,(o&1023)+56320))}var J=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ue=function(p,b){this.line=p,this.column=b};ue.prototype.offset=function(p){return new ue(this.line,this.column+p)};var A=function(p,b,C){this.start=b,this.end=C,p.sourceFile!==null&&(this.source=p.sourceFile)};function ye(o,p){for(var b=1,C=0;;){var O=R(o,C,p);if(O<0)return new ue(b,p-C);++b,C=O}}var ie={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},fe=!1;function X(o){var p={};for(var b in ie)p[b]=o&&se(o,b)?o[b]:ie[b];if(p.ecmaVersion==="latest"?p.ecmaVersion=1e8:p.ecmaVersion==null?(!fe&&typeof console=="object"&&console.warn&&(fe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
21
+ Defaulting to 2020, but this will stop working in the future.`)),p.ecmaVersion=11):p.ecmaVersion>=2015&&(p.ecmaVersion-=2009),p.allowReserved==null&&(p.allowReserved=p.ecmaVersion<5),(!o||o.allowHashBang==null)&&(p.allowHashBang=p.ecmaVersion>=14),he(p.onToken)){var C=p.onToken;p.onToken=function(O){return C.push(O)}}return he(p.onComment)&&(p.onComment=H(p,p.onComment)),p}function H(o,p){return function(b,C,O,q,Y,we){var Ce={type:b?"Block":"Line",value:C,start:O,end:q};o.locations&&(Ce.loc=new A(this,Y,we)),o.ranges&&(Ce.range=[O,q]),p.push(Ce)}}var te=1,me=2,oe=4,K=8,Z=16,Q=32,W=64,ae=128,ve=256,Ee=512,_e=te|me|ve;function Ie(o,p){return me|(o?oe:0)|(p?K:0)}var Me=0,ke=1,Ne=2,Fe=3,yt=4,le=5,ce=function(p,b,C){this.options=p=X(p),this.sourceFile=p.sourceFile,this.keywords=be(c[p.ecmaVersion>=6?6:p.sourceType==="module"?"5module":5]);var O="";p.allowReserved!==!0&&(O=u[p.ecmaVersion>=6?6:p.ecmaVersion===5?5:3],p.sourceType==="module"&&(O+=" await")),this.reservedWords=be(O);var q=(O?O+" ":"")+u.strict;this.reservedWordsStrict=be(q),this.reservedWordsStrictBind=be(q+" "+u.strictBind),this.input=String(b),this.containsEsc=!1,C?(this.pos=C,this.lineStart=this.input.lastIndexOf(`
22
+ `,C-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(E).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=g.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=p.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&p.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(te),this.regexpState=null,this.privateNameStack=[]},N={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};ce.prototype.parse=function(){var p=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(p)},N.inFunction.get=function(){return(this.currentVarScope().flags&me)>0},N.inGenerator.get=function(){return(this.currentVarScope().flags&K)>0},N.inAsync.get=function(){return(this.currentVarScope().flags&oe)>0},N.canAwait.get=function(){for(var o=this.scopeStack.length-1;o>=0;o--){var p=this.scopeStack[o],b=p.flags;if(b&(ve|Ee))return!1;if(b&me)return(b&oe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},N.allowSuper.get=function(){var o=this.currentThisScope(),p=o.flags;return(p&W)>0||this.options.allowSuperOutsideMethod},N.allowDirectSuper.get=function(){return(this.currentThisScope().flags&ae)>0},N.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},N.allowNewDotTarget.get=function(){for(var o=this.scopeStack.length-1;o>=0;o--){var p=this.scopeStack[o],b=p.flags;if(b&(ve|Ee)||b&me&&!(b&Z))return!0}return!1},N.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&ve)>0},ce.extend=function(){for(var p=[],b=arguments.length;b--;)p[b]=arguments[b];for(var C=this,O=0;O<p.length;O++)C=p[O](C);return C},ce.parse=function(p,b){return new this(b,p).parse()},ce.parseExpressionAt=function(p,b,C){var O=new this(C,p,b);return O.nextToken(),O.parseExpression()},ce.tokenizer=function(p,b){return new this(b,p)},Object.defineProperties(ce.prototype,N);var Ve=ce.prototype,Ye=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;Ve.strictDirective=function(o){if(this.options.ecmaVersion<5)return!1;for(;;){G.lastIndex=o,o+=G.exec(this.input)[0].length;var p=Ye.exec(this.input.slice(o));if(!p)return!1;if((p[1]||p[2])==="use strict"){G.lastIndex=o+p[0].length;var b=G.exec(this.input),C=b.index+b[0].length,O=this.input.charAt(C);return O===";"||O==="}"||E.test(b[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(O)||O==="!"&&this.input.charAt(C+1)==="=")}o+=p[0].length,G.lastIndex=o,o+=G.exec(this.input)[0].length,this.input[o]===";"&&o++}},Ve.eat=function(o){return this.type===o?(this.next(),!0):!1},Ve.isContextual=function(o){return this.type===g.name&&this.value===o&&!this.containsEsc},Ve.eatContextual=function(o){return this.isContextual(o)?(this.next(),!0):!1},Ve.expectContextual=function(o){this.eatContextual(o)||this.unexpected()},Ve.canInsertSemicolon=function(){return this.type===g.eof||this.type===g.braceR||E.test(this.input.slice(this.lastTokEnd,this.start))},Ve.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},Ve.semicolon=function(){!this.eat(g.semi)&&!this.insertSemicolon()&&this.unexpected()},Ve.afterTrailingComma=function(o,p){if(this.type===o)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),p||this.next(),!0},Ve.expect=function(o){this.eat(o)||this.unexpected()},Ve.unexpected=function(o){this.raise(o??this.start,"Unexpected token")};var bt=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Ve.checkPatternErrors=function(o,p){if(o){o.trailingComma>-1&&this.raiseRecoverable(o.trailingComma,"Comma is not permitted after the rest element");var b=p?o.parenthesizedAssign:o.parenthesizedBind;b>-1&&this.raiseRecoverable(b,p?"Assigning to rvalue":"Parenthesized pattern")}},Ve.checkExpressionErrors=function(o,p){if(!o)return!1;var b=o.shorthandAssign,C=o.doubleProto;if(!p)return b>=0||C>=0;b>=0&&this.raise(b,"Shorthand property assignments are valid only in destructuring patterns"),C>=0&&this.raiseRecoverable(C,"Redefinition of __proto__ property")},Ve.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},Ve.isSimpleAssignTarget=function(o){return o.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(o.expression):o.type==="Identifier"||o.type==="MemberExpression"};var Te=ce.prototype;Te.parseTopLevel=function(o){var p=Object.create(null);for(o.body||(o.body=[]);this.type!==g.eof;){var b=this.parseStatement(null,!0,p);o.body.push(b)}if(this.inModule)for(var C=0,O=Object.keys(this.undefinedExports);C<O.length;C+=1){var q=O[C];this.raiseRecoverable(this.undefinedExports[q].start,"Export '"+q+"' is not defined")}return this.adaptDirectivePrologue(o.body),this.next(),o.sourceType=this.options.sourceType,this.finishNode(o,"Program")};var Lt={kind:"loop"},Rn={kind:"switch"};Te.isLet=function(o){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;G.lastIndex=this.pos;var p=G.exec(this.input),b=this.pos+p[0].length,C=this.input.charCodeAt(b);if(C===91||C===92)return!0;if(o)return!1;if(C===123||C>55295&&C<56320)return!0;if(v(C,!0)){for(var O=b+1;x(C=this.input.charCodeAt(O),!0);)++O;if(C===92||C>55295&&C<56320)return!0;var q=this.input.slice(b,O);if(!h.test(q))return!0}return!1},Te.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;G.lastIndex=this.pos;var o=G.exec(this.input),p=this.pos+o[0].length,b;return!E.test(this.input.slice(this.pos,p))&&this.input.slice(p,p+8)==="function"&&(p+8===this.input.length||!(x(b=this.input.charCodeAt(p+8))||b>55295&&b<56320))},Te.isUsingKeyword=function(o,p){if(this.options.ecmaVersion<17||!this.isContextual(o?"await":"using"))return!1;G.lastIndex=this.pos;var b=G.exec(this.input),C=this.pos+b[0].length;if(E.test(this.input.slice(this.pos,C)))return!1;if(o){var O=C+5,q;if(this.input.slice(C,O)!=="using"||O===this.input.length||x(q=this.input.charCodeAt(O))||q>55295&&q<56320)return!1;G.lastIndex=O;var Y=G.exec(this.input);if(Y&&E.test(this.input.slice(O,O+Y[0].length)))return!1}if(p){var we=C+2,Ce;if(this.input.slice(C,we)==="of"&&(we===this.input.length||!x(Ce=this.input.charCodeAt(we))&&!(Ce>55295&&Ce<56320)))return!1}var je=this.input.charCodeAt(C);return v(je,!0)||je===92},Te.isAwaitUsing=function(o){return this.isUsingKeyword(!0,o)},Te.isUsing=function(o){return this.isUsingKeyword(!1,o)},Te.parseStatement=function(o,p,b){var C=this.type,O=this.startNode(),q;switch(this.isLet(o)&&(C=g._var,q="let"),C){case g._break:case g._continue:return this.parseBreakContinueStatement(O,C.keyword);case g._debugger:return this.parseDebuggerStatement(O);case g._do:return this.parseDoStatement(O);case g._for:return this.parseForStatement(O);case g._function:return o&&(this.strict||o!=="if"&&o!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(O,!1,!o);case g._class:return o&&this.unexpected(),this.parseClass(O,!0);case g._if:return this.parseIfStatement(O);case g._return:return this.parseReturnStatement(O);case g._switch:return this.parseSwitchStatement(O);case g._throw:return this.parseThrowStatement(O);case g._try:return this.parseTryStatement(O);case g._const:case g._var:return q=q||this.value,o&&q!=="var"&&this.unexpected(),this.parseVarStatement(O,q);case g._while:return this.parseWhileStatement(O);case g._with:return this.parseWithStatement(O);case g.braceL:return this.parseBlock(!0,O);case g.semi:return this.parseEmptyStatement(O);case g._export:case g._import:if(this.options.ecmaVersion>10&&C===g._import){G.lastIndex=this.pos;var Y=G.exec(this.input),we=this.pos+Y[0].length,Ce=this.input.charCodeAt(we);if(Ce===40||Ce===46)return this.parseExpressionStatement(O,this.parseExpression())}return this.options.allowImportExportEverywhere||(p||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),C===g._import?this.parseImport(O):this.parseExport(O,b);default:if(this.isAsyncFunction())return o&&this.unexpected(),this.next(),this.parseFunctionStatement(O,!0,!o);var je=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(je)return p&&this.options.sourceType==="script"&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),je==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(O,!1,je),this.semicolon(),this.finishNode(O,"VariableDeclaration");var Ue=this.value,ot=this.parseExpression();return C===g.name&&ot.type==="Identifier"&&this.eat(g.colon)?this.parseLabeledStatement(O,Ue,ot,o):this.parseExpressionStatement(O,ot)}},Te.parseBreakContinueStatement=function(o,p){var b=p==="break";this.next(),this.eat(g.semi)||this.insertSemicolon()?o.label=null:this.type!==g.name?this.unexpected():(o.label=this.parseIdent(),this.semicolon());for(var C=0;C<this.labels.length;++C){var O=this.labels[C];if((o.label==null||O.name===o.label.name)&&(O.kind!=null&&(b||O.kind==="loop")||o.label&&b))break}return C===this.labels.length&&this.raise(o.start,"Unsyntactic "+p),this.finishNode(o,b?"BreakStatement":"ContinueStatement")},Te.parseDebuggerStatement=function(o){return this.next(),this.semicolon(),this.finishNode(o,"DebuggerStatement")},Te.parseDoStatement=function(o){return this.next(),this.labels.push(Lt),o.body=this.parseStatement("do"),this.labels.pop(),this.expect(g._while),o.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(g.semi):this.semicolon(),this.finishNode(o,"DoWhileStatement")},Te.parseForStatement=function(o){this.next();var p=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Lt),this.enterScope(0),this.expect(g.parenL),this.type===g.semi)return p>-1&&this.unexpected(p),this.parseFor(o,null);var b=this.isLet();if(this.type===g._var||this.type===g._const||b){var C=this.startNode(),O=b?"let":this.value;return this.next(),this.parseVar(C,!0,O),this.finishNode(C,"VariableDeclaration"),this.parseForAfterInit(o,C,p)}var q=this.isContextual("let"),Y=!1,we=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(we){var Ce=this.startNode();return this.next(),we==="await using"&&this.next(),this.parseVar(Ce,!0,we),this.finishNode(Ce,"VariableDeclaration"),this.parseForAfterInit(o,Ce,p)}var je=this.containsEsc,Ue=new bt,ot=this.start,_t=p>-1?this.parseExprSubscripts(Ue,"await"):this.parseExpression(!0,Ue);return this.type===g._in||(Y=this.options.ecmaVersion>=6&&this.isContextual("of"))?(p>-1?(this.type===g._in&&this.unexpected(p),o.await=!0):Y&&this.options.ecmaVersion>=8&&(_t.start===ot&&!je&&_t.type==="Identifier"&&_t.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(o.await=!1)),q&&Y&&this.raise(_t.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(_t,!1,Ue),this.checkLValPattern(_t),this.parseForIn(o,_t)):(this.checkExpressionErrors(Ue,!0),p>-1&&this.unexpected(p),this.parseFor(o,_t))},Te.parseForAfterInit=function(o,p,b){return(this.type===g._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&p.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===g._in?b>-1&&this.unexpected(b):o.await=b>-1),this.parseForIn(o,p)):(b>-1&&this.unexpected(b),this.parseFor(o,p))},Te.parseFunctionStatement=function(o,p,b){return this.next(),this.parseFunction(o,mt|(b?0:an),!1,p)},Te.parseIfStatement=function(o){return this.next(),o.test=this.parseParenExpression(),o.consequent=this.parseStatement("if"),o.alternate=this.eat(g._else)?this.parseStatement("if"):null,this.finishNode(o,"IfStatement")},Te.parseReturnStatement=function(o){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(g.semi)||this.insertSemicolon()?o.argument=null:(o.argument=this.parseExpression(),this.semicolon()),this.finishNode(o,"ReturnStatement")},Te.parseSwitchStatement=function(o){this.next(),o.discriminant=this.parseParenExpression(),o.cases=[],this.expect(g.braceL),this.labels.push(Rn),this.enterScope(0);for(var p,b=!1;this.type!==g.braceR;)if(this.type===g._case||this.type===g._default){var C=this.type===g._case;p&&this.finishNode(p,"SwitchCase"),o.cases.push(p=this.startNode()),p.consequent=[],this.next(),C?p.test=this.parseExpression():(b&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),b=!0,p.test=null),this.expect(g.colon)}else p||this.unexpected(),p.consequent.push(this.parseStatement(null));return this.exitScope(),p&&this.finishNode(p,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(o,"SwitchStatement")},Te.parseThrowStatement=function(o){return this.next(),E.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),o.argument=this.parseExpression(),this.semicolon(),this.finishNode(o,"ThrowStatement")};var Dt=[];Te.parseCatchClauseParam=function(){var o=this.parseBindingAtom(),p=o.type==="Identifier";return this.enterScope(p?Q:0),this.checkLValPattern(o,p?yt:Ne),this.expect(g.parenR),o},Te.parseTryStatement=function(o){if(this.next(),o.block=this.parseBlock(),o.handler=null,this.type===g._catch){var p=this.startNode();this.next(),this.eat(g.parenL)?p.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),p.param=null,this.enterScope(0)),p.body=this.parseBlock(!1),this.exitScope(),o.handler=this.finishNode(p,"CatchClause")}return o.finalizer=this.eat(g._finally)?this.parseBlock():null,!o.handler&&!o.finalizer&&this.raise(o.start,"Missing catch or finally clause"),this.finishNode(o,"TryStatement")},Te.parseVarStatement=function(o,p,b){return this.next(),this.parseVar(o,!1,p,b),this.semicolon(),this.finishNode(o,"VariableDeclaration")},Te.parseWhileStatement=function(o){return this.next(),o.test=this.parseParenExpression(),this.labels.push(Lt),o.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(o,"WhileStatement")},Te.parseWithStatement=function(o){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),o.object=this.parseParenExpression(),o.body=this.parseStatement("with"),this.finishNode(o,"WithStatement")},Te.parseEmptyStatement=function(o){return this.next(),this.finishNode(o,"EmptyStatement")},Te.parseLabeledStatement=function(o,p,b,C){for(var O=0,q=this.labels;O<q.length;O+=1){var Y=q[O];Y.name===p&&this.raise(b.start,"Label '"+p+"' is already declared")}for(var we=this.type.isLoop?"loop":this.type===g._switch?"switch":null,Ce=this.labels.length-1;Ce>=0;Ce--){var je=this.labels[Ce];if(je.statementStart===o.start)je.statementStart=this.start,je.kind=we;else break}return this.labels.push({name:p,kind:we,statementStart:this.start}),o.body=this.parseStatement(C?C.indexOf("label")===-1?C+"label":C:"label"),this.labels.pop(),o.label=b,this.finishNode(o,"LabeledStatement")},Te.parseExpressionStatement=function(o,p){return o.expression=p,this.semicolon(),this.finishNode(o,"ExpressionStatement")},Te.parseBlock=function(o,p,b){for(o===void 0&&(o=!0),p===void 0&&(p=this.startNode()),p.body=[],this.expect(g.braceL),o&&this.enterScope(0);this.type!==g.braceR;){var C=this.parseStatement(null);p.body.push(C)}return b&&(this.strict=!1),this.next(),o&&this.exitScope(),this.finishNode(p,"BlockStatement")},Te.parseFor=function(o,p){return o.init=p,this.expect(g.semi),o.test=this.type===g.semi?null:this.parseExpression(),this.expect(g.semi),o.update=this.type===g.parenR?null:this.parseExpression(),this.expect(g.parenR),o.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(o,"ForStatement")},Te.parseForIn=function(o,p){var b=this.type===g._in;return this.next(),p.type==="VariableDeclaration"&&p.declarations[0].init!=null&&(!b||this.options.ecmaVersion<8||this.strict||p.kind!=="var"||p.declarations[0].id.type!=="Identifier")&&this.raise(p.start,(b?"for-in":"for-of")+" loop variable declaration may not have an initializer"),o.left=p,o.right=b?this.parseExpression():this.parseMaybeAssign(),this.expect(g.parenR),o.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(o,b?"ForInStatement":"ForOfStatement")},Te.parseVar=function(o,p,b,C){for(o.declarations=[],o.kind=b;;){var O=this.startNode();if(this.parseVarId(O,b),this.eat(g.eq)?O.init=this.parseMaybeAssign(p):!C&&b==="const"&&!(this.type===g._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!C&&(b==="using"||b==="await using")&&this.options.ecmaVersion>=17&&this.type!==g._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+b+" declaration"):!C&&O.id.type!=="Identifier"&&!(p&&(this.type===g._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):O.init=null,o.declarations.push(this.finishNode(O,"VariableDeclarator")),!this.eat(g.comma))break}return o},Te.parseVarId=function(o,p){o.id=p==="using"||p==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(o.id,p==="var"?ke:Ne,!1)};var mt=1,an=2,Vt=4;Te.parseFunction=function(o,p,b,C,O){this.initFunction(o),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!C)&&(this.type===g.star&&p&an&&this.unexpected(),o.generator=this.eat(g.star)),this.options.ecmaVersion>=8&&(o.async=!!C),p&mt&&(o.id=p&Vt&&this.type!==g.name?null:this.parseIdent(),o.id&&!(p&an)&&this.checkLValSimple(o.id,this.strict||o.generator||o.async?this.treatFunctionsAsVar?ke:Ne:Fe));var q=this.yieldPos,Y=this.awaitPos,we=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ie(o.async,o.generator)),p&mt||(o.id=this.type===g.name?this.parseIdent():null),this.parseFunctionParams(o),this.parseFunctionBody(o,b,!1,O),this.yieldPos=q,this.awaitPos=Y,this.awaitIdentPos=we,this.finishNode(o,p&mt?"FunctionDeclaration":"FunctionExpression")},Te.parseFunctionParams=function(o){this.expect(g.parenL),o.params=this.parseBindingList(g.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Te.parseClass=function(o,p){this.next();var b=this.strict;this.strict=!0,this.parseClassId(o,p),this.parseClassSuper(o);var C=this.enterClassBody(),O=this.startNode(),q=!1;for(O.body=[],this.expect(g.braceL);this.type!==g.braceR;){var Y=this.parseClassElement(o.superClass!==null);Y&&(O.body.push(Y),Y.type==="MethodDefinition"&&Y.kind==="constructor"?(q&&this.raiseRecoverable(Y.start,"Duplicate constructor in the same class"),q=!0):Y.key&&Y.key.type==="PrivateIdentifier"&&fo(C,Y)&&this.raiseRecoverable(Y.key.start,"Identifier '#"+Y.key.name+"' has already been declared"))}return this.strict=b,this.next(),o.body=this.finishNode(O,"ClassBody"),this.exitClassBody(),this.finishNode(o,p?"ClassDeclaration":"ClassExpression")},Te.parseClassElement=function(o){if(this.eat(g.semi))return null;var p=this.options.ecmaVersion,b=this.startNode(),C="",O=!1,q=!1,Y="method",we=!1;if(this.eatContextual("static")){if(p>=13&&this.eat(g.braceL))return this.parseClassStaticBlock(b),b;this.isClassElementNameStart()||this.type===g.star?we=!0:C="static"}if(b.static=we,!C&&p>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===g.star)&&!this.canInsertSemicolon()?q=!0:C="async"),!C&&(p>=9||!q)&&this.eat(g.star)&&(O=!0),!C&&!q&&!O){var Ce=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?Y=Ce:C=Ce)}if(C?(b.computed=!1,b.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),b.key.name=C,this.finishNode(b.key,"Identifier")):this.parseClassElementName(b),p<13||this.type===g.parenL||Y!=="method"||O||q){var je=!b.static&&lr(b,"constructor"),Ue=je&&o;je&&Y!=="method"&&this.raise(b.key.start,"Constructor can't have get/set modifier"),b.kind=je?"constructor":Y,this.parseClassMethod(b,O,q,Ue)}else this.parseClassField(b);return b},Te.isClassElementNameStart=function(){return this.type===g.name||this.type===g.privateId||this.type===g.num||this.type===g.string||this.type===g.bracketL||this.type.keyword},Te.parseClassElementName=function(o){this.type===g.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),o.computed=!1,o.key=this.parsePrivateIdent()):this.parsePropertyName(o)},Te.parseClassMethod=function(o,p,b,C){var O=o.key;o.kind==="constructor"?(p&&this.raise(O.start,"Constructor can't be a generator"),b&&this.raise(O.start,"Constructor can't be an async method")):o.static&&lr(o,"prototype")&&this.raise(O.start,"Classes may not have a static property named prototype");var q=o.value=this.parseMethod(p,b,C);return o.kind==="get"&&q.params.length!==0&&this.raiseRecoverable(q.start,"getter should have no params"),o.kind==="set"&&q.params.length!==1&&this.raiseRecoverable(q.start,"setter should have exactly one param"),o.kind==="set"&&q.params[0].type==="RestElement"&&this.raiseRecoverable(q.params[0].start,"Setter cannot use rest params"),this.finishNode(o,"MethodDefinition")},Te.parseClassField=function(o){return lr(o,"constructor")?this.raise(o.key.start,"Classes can't have a field named 'constructor'"):o.static&&lr(o,"prototype")&&this.raise(o.key.start,"Classes can't have a static field named 'prototype'"),this.eat(g.eq)?(this.enterScope(Ee|W),o.value=this.parseMaybeAssign(),this.exitScope()):o.value=null,this.semicolon(),this.finishNode(o,"PropertyDefinition")},Te.parseClassStaticBlock=function(o){o.body=[];var p=this.labels;for(this.labels=[],this.enterScope(ve|W);this.type!==g.braceR;){var b=this.parseStatement(null);o.body.push(b)}return this.next(),this.exitScope(),this.labels=p,this.finishNode(o,"StaticBlock")},Te.parseClassId=function(o,p){this.type===g.name?(o.id=this.parseIdent(),p&&this.checkLValSimple(o.id,Ne,!1)):(p===!0&&this.unexpected(),o.id=null)},Te.parseClassSuper=function(o){o.superClass=this.eat(g._extends)?this.parseExprSubscripts(null,!1):null},Te.enterClassBody=function(){var o={declared:Object.create(null),used:[]};return this.privateNameStack.push(o),o.declared},Te.exitClassBody=function(){var o=this.privateNameStack.pop(),p=o.declared,b=o.used;if(this.options.checkPrivateFields)for(var C=this.privateNameStack.length,O=C===0?null:this.privateNameStack[C-1],q=0;q<b.length;++q){var Y=b[q];se(p,Y.name)||(O?O.used.push(Y):this.raiseRecoverable(Y.start,"Private field '#"+Y.name+"' must be declared in an enclosing class"))}};function fo(o,p){var b=p.key.name,C=o[b],O="true";return p.type==="MethodDefinition"&&(p.kind==="get"||p.kind==="set")&&(O=(p.static?"s":"i")+p.kind),C==="iget"&&O==="iset"||C==="iset"&&O==="iget"||C==="sget"&&O==="sset"||C==="sset"&&O==="sget"?(o[b]="true",!1):C?!0:(o[b]=O,!1)}function lr(o,p){var b=o.computed,C=o.key;return!b&&(C.type==="Identifier"&&C.name===p||C.type==="Literal"&&C.value===p)}Te.parseExportAllDeclaration=function(o,p){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(o.exported=this.parseModuleExportName(),this.checkExport(p,o.exported,this.lastTokStart)):o.exported=null),this.expectContextual("from"),this.type!==g.string&&this.unexpected(),o.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(o.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(o,"ExportAllDeclaration")},Te.parseExport=function(o,p){if(this.next(),this.eat(g.star))return this.parseExportAllDeclaration(o,p);if(this.eat(g._default))return this.checkExport(p,"default",this.lastTokStart),o.declaration=this.parseExportDefaultDeclaration(),this.finishNode(o,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())o.declaration=this.parseExportDeclaration(o),o.declaration.type==="VariableDeclaration"?this.checkVariableExport(p,o.declaration.declarations):this.checkExport(p,o.declaration.id,o.declaration.id.start),o.specifiers=[],o.source=null,this.options.ecmaVersion>=16&&(o.attributes=[]);else{if(o.declaration=null,o.specifiers=this.parseExportSpecifiers(p),this.eatContextual("from"))this.type!==g.string&&this.unexpected(),o.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(o.attributes=this.parseWithClause());else{for(var b=0,C=o.specifiers;b<C.length;b+=1){var O=C[b];this.checkUnreserved(O.local),this.checkLocalExport(O.local),O.local.type==="Literal"&&this.raise(O.local.start,"A string literal cannot be used as an exported binding without `from`.")}o.source=null,this.options.ecmaVersion>=16&&(o.attributes=[])}this.semicolon()}return this.finishNode(o,"ExportNamedDeclaration")},Te.parseExportDeclaration=function(o){return this.parseStatement(null)},Te.parseExportDefaultDeclaration=function(){var o;if(this.type===g._function||(o=this.isAsyncFunction())){var p=this.startNode();return this.next(),o&&this.next(),this.parseFunction(p,mt|Vt,!1,o)}else if(this.type===g._class){var b=this.startNode();return this.parseClass(b,"nullableID")}else{var C=this.parseMaybeAssign();return this.semicolon(),C}},Te.checkExport=function(o,p,b){o&&(typeof p!="string"&&(p=p.type==="Identifier"?p.name:p.value),se(o,p)&&this.raiseRecoverable(b,"Duplicate export '"+p+"'"),o[p]=!0)},Te.checkPatternExport=function(o,p){var b=p.type;if(b==="Identifier")this.checkExport(o,p,p.start);else if(b==="ObjectPattern")for(var C=0,O=p.properties;C<O.length;C+=1){var q=O[C];this.checkPatternExport(o,q)}else if(b==="ArrayPattern")for(var Y=0,we=p.elements;Y<we.length;Y+=1){var Ce=we[Y];Ce&&this.checkPatternExport(o,Ce)}else b==="Property"?this.checkPatternExport(o,p.value):b==="AssignmentPattern"?this.checkPatternExport(o,p.left):b==="RestElement"&&this.checkPatternExport(o,p.argument)},Te.checkVariableExport=function(o,p){if(o)for(var b=0,C=p;b<C.length;b+=1){var O=C[b];this.checkPatternExport(o,O.id)}},Te.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},Te.parseExportSpecifier=function(o){var p=this.startNode();return p.local=this.parseModuleExportName(),p.exported=this.eatContextual("as")?this.parseModuleExportName():p.local,this.checkExport(o,p.exported,p.exported.start),this.finishNode(p,"ExportSpecifier")},Te.parseExportSpecifiers=function(o){var p=[],b=!0;for(this.expect(g.braceL);!this.eat(g.braceR);){if(b)b=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;p.push(this.parseExportSpecifier(o))}return p},Te.parseImport=function(o){return this.next(),this.type===g.string?(o.specifiers=Dt,o.source=this.parseExprAtom()):(o.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),o.source=this.type===g.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(o.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(o,"ImportDeclaration")},Te.parseImportSpecifier=function(){var o=this.startNode();return o.imported=this.parseModuleExportName(),this.eatContextual("as")?o.local=this.parseIdent():(this.checkUnreserved(o.imported),o.local=o.imported),this.checkLValSimple(o.local,Ne),this.finishNode(o,"ImportSpecifier")},Te.parseImportDefaultSpecifier=function(){var o=this.startNode();return o.local=this.parseIdent(),this.checkLValSimple(o.local,Ne),this.finishNode(o,"ImportDefaultSpecifier")},Te.parseImportNamespaceSpecifier=function(){var o=this.startNode();return this.next(),this.expectContextual("as"),o.local=this.parseIdent(),this.checkLValSimple(o.local,Ne),this.finishNode(o,"ImportNamespaceSpecifier")},Te.parseImportSpecifiers=function(){var o=[],p=!0;if(this.type===g.name&&(o.push(this.parseImportDefaultSpecifier()),!this.eat(g.comma)))return o;if(this.type===g.star)return o.push(this.parseImportNamespaceSpecifier()),o;for(this.expect(g.braceL);!this.eat(g.braceR);){if(p)p=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;o.push(this.parseImportSpecifier())}return o},Te.parseWithClause=function(){var o=[];if(!this.eat(g._with))return o;this.expect(g.braceL);for(var p={},b=!0;!this.eat(g.braceR);){if(b)b=!1;else if(this.expect(g.comma),this.afterTrailingComma(g.braceR))break;var C=this.parseImportAttribute(),O=C.key.type==="Identifier"?C.key.name:C.key.value;se(p,O)&&this.raiseRecoverable(C.key.start,"Duplicate attribute key '"+O+"'"),p[O]=!0,o.push(C)}return o},Te.parseImportAttribute=function(){var o=this.startNode();return o.key=this.type===g.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(g.colon),this.type!==g.string&&this.unexpected(),o.value=this.parseExprAtom(),this.finishNode(o,"ImportAttribute")},Te.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===g.string){var o=this.parseLiteral(this.value);return J.test(o.value)&&this.raise(o.start,"An export name cannot include a lone surrogate."),o}return this.parseIdent(!0)},Te.adaptDirectivePrologue=function(o){for(var p=0;p<o.length&&this.isDirectiveCandidate(o[p]);++p)o[p].directive=o[p].expression.raw.slice(1,-1)},Te.isDirectiveCandidate=function(o){return this.options.ecmaVersion>=5&&o.type==="ExpressionStatement"&&o.expression.type==="Literal"&&typeof o.expression.value=="string"&&(this.input[o.start]==='"'||this.input[o.start]==="'")};var Et=ce.prototype;Et.toAssignable=function(o,p,b){if(this.options.ecmaVersion>=6&&o)switch(o.type){case"Identifier":this.inAsync&&o.name==="await"&&this.raise(o.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":o.type="ObjectPattern",b&&this.checkPatternErrors(b,!0);for(var C=0,O=o.properties;C<O.length;C+=1){var q=O[C];this.toAssignable(q,p),q.type==="RestElement"&&(q.argument.type==="ArrayPattern"||q.argument.type==="ObjectPattern")&&this.raise(q.argument.start,"Unexpected token")}break;case"Property":o.kind!=="init"&&this.raise(o.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(o.value,p);break;case"ArrayExpression":o.type="ArrayPattern",b&&this.checkPatternErrors(b,!0),this.toAssignableList(o.elements,p);break;case"SpreadElement":o.type="RestElement",this.toAssignable(o.argument,p),o.argument.type==="AssignmentPattern"&&this.raise(o.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":o.operator!=="="&&this.raise(o.left.end,"Only '=' operator can be used for specifying default value."),o.type="AssignmentPattern",delete o.operator,this.toAssignable(o.left,p);break;case"ParenthesizedExpression":this.toAssignable(o.expression,p,b);break;case"ChainExpression":this.raiseRecoverable(o.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!p)break;default:this.raise(o.start,"Assigning to rvalue")}else b&&this.checkPatternErrors(b,!0);return o},Et.toAssignableList=function(o,p){for(var b=o.length,C=0;C<b;C++){var O=o[C];O&&this.toAssignable(O,p)}if(b){var q=o[b-1];this.options.ecmaVersion===6&&p&&q&&q.type==="RestElement"&&q.argument.type!=="Identifier"&&this.unexpected(q.argument.start)}return o},Et.parseSpread=function(o){var p=this.startNode();return this.next(),p.argument=this.parseMaybeAssign(!1,o),this.finishNode(p,"SpreadElement")},Et.parseRestBinding=function(){var o=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==g.name&&this.unexpected(),o.argument=this.parseBindingAtom(),this.finishNode(o,"RestElement")},Et.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case g.bracketL:var o=this.startNode();return this.next(),o.elements=this.parseBindingList(g.bracketR,!0,!0),this.finishNode(o,"ArrayPattern");case g.braceL:return this.parseObj(!0)}return this.parseIdent()},Et.parseBindingList=function(o,p,b,C){for(var O=[],q=!0;!this.eat(o);)if(q?q=!1:this.expect(g.comma),p&&this.type===g.comma)O.push(null);else{if(b&&this.afterTrailingComma(o))break;if(this.type===g.ellipsis){var Y=this.parseRestBinding();this.parseBindingListItem(Y),O.push(Y),this.type===g.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(o);break}else O.push(this.parseAssignableListItem(C))}return O},Et.parseAssignableListItem=function(o){var p=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(p),p},Et.parseBindingListItem=function(o){return o},Et.parseMaybeDefault=function(o,p,b){if(b=b||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(g.eq))return b;var C=this.startNodeAt(o,p);return C.left=b,C.right=this.parseMaybeAssign(),this.finishNode(C,"AssignmentPattern")},Et.checkLValSimple=function(o,p,b){p===void 0&&(p=Me);var C=p!==Me;switch(o.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(o.name)&&this.raiseRecoverable(o.start,(C?"Binding ":"Assigning to ")+o.name+" in strict mode"),C&&(p===Ne&&o.name==="let"&&this.raiseRecoverable(o.start,"let is disallowed as a lexically bound name"),b&&(se(b,o.name)&&this.raiseRecoverable(o.start,"Argument name clash"),b[o.name]=!0),p!==le&&this.declareName(o.name,p,o.start));break;case"ChainExpression":this.raiseRecoverable(o.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":C&&this.raiseRecoverable(o.start,"Binding member expression");break;case"ParenthesizedExpression":return C&&this.raiseRecoverable(o.start,"Binding parenthesized expression"),this.checkLValSimple(o.expression,p,b);default:this.raise(o.start,(C?"Binding":"Assigning to")+" rvalue")}},Et.checkLValPattern=function(o,p,b){switch(p===void 0&&(p=Me),o.type){case"ObjectPattern":for(var C=0,O=o.properties;C<O.length;C+=1){var q=O[C];this.checkLValInnerPattern(q,p,b)}break;case"ArrayPattern":for(var Y=0,we=o.elements;Y<we.length;Y+=1){var Ce=we[Y];Ce&&this.checkLValInnerPattern(Ce,p,b)}break;default:this.checkLValSimple(o,p,b)}},Et.checkLValInnerPattern=function(o,p,b){switch(p===void 0&&(p=Me),o.type){case"Property":this.checkLValInnerPattern(o.value,p,b);break;case"AssignmentPattern":this.checkLValPattern(o.left,p,b);break;case"RestElement":this.checkLValPattern(o.argument,p,b);break;default:this.checkLValPattern(o,p,b)}};var zt=function(p,b,C,O,q){this.token=p,this.isExpr=!!b,this.preserveSpace=!!C,this.override=O,this.generator=!!q},Qe={b_stat:new zt("{",!1),b_expr:new zt("{",!0),b_tmpl:new zt("${",!1),p_stat:new zt("(",!1),p_expr:new zt("(",!0),q_tmpl:new zt("`",!0,!0,function(o){return o.tryReadTemplateToken()}),f_stat:new zt("function",!1),f_expr:new zt("function",!0),f_expr_gen:new zt("function",!0,!1,null,!0),f_gen:new zt("function",!1,!1,null,!0)},$n=ce.prototype;$n.initialContext=function(){return[Qe.b_stat]},$n.curContext=function(){return this.context[this.context.length-1]},$n.braceIsBlock=function(o){var p=this.curContext();return p===Qe.f_expr||p===Qe.f_stat?!0:o===g.colon&&(p===Qe.b_stat||p===Qe.b_expr)?!p.isExpr:o===g._return||o===g.name&&this.exprAllowed?E.test(this.input.slice(this.lastTokEnd,this.start)):o===g._else||o===g.semi||o===g.eof||o===g.parenR||o===g.arrow?!0:o===g.braceL?p===Qe.b_stat:o===g._var||o===g._const||o===g.name?!1:!this.exprAllowed},$n.inGeneratorContext=function(){for(var o=this.context.length-1;o>=1;o--){var p=this.context[o];if(p.token==="function")return p.generator}return!1},$n.updateContext=function(o){var p,b=this.type;b.keyword&&o===g.dot?this.exprAllowed=!1:(p=b.updateContext)?p.call(this,o):this.exprAllowed=b.beforeExpr},$n.overrideContext=function(o){this.curContext()!==o&&(this.context[this.context.length-1]=o)},g.parenR.updateContext=g.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var o=this.context.pop();o===Qe.b_stat&&this.curContext().token==="function"&&(o=this.context.pop()),this.exprAllowed=!o.isExpr},g.braceL.updateContext=function(o){this.context.push(this.braceIsBlock(o)?Qe.b_stat:Qe.b_expr),this.exprAllowed=!0},g.dollarBraceL.updateContext=function(){this.context.push(Qe.b_tmpl),this.exprAllowed=!0},g.parenL.updateContext=function(o){var p=o===g._if||o===g._for||o===g._with||o===g._while;this.context.push(p?Qe.p_stat:Qe.p_expr),this.exprAllowed=!0},g.incDec.updateContext=function(){},g._function.updateContext=g._class.updateContext=function(o){o.beforeExpr&&o!==g._else&&!(o===g.semi&&this.curContext()!==Qe.p_stat)&&!(o===g._return&&E.test(this.input.slice(this.lastTokEnd,this.start)))&&!((o===g.colon||o===g.braceL)&&this.curContext()===Qe.b_stat)?this.context.push(Qe.f_expr):this.context.push(Qe.f_stat),this.exprAllowed=!1},g.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},g.backQuote.updateContext=function(){this.curContext()===Qe.q_tmpl?this.context.pop():this.context.push(Qe.q_tmpl),this.exprAllowed=!1},g.star.updateContext=function(o){if(o===g._function){var p=this.context.length-1;this.context[p]===Qe.f_expr?this.context[p]=Qe.f_expr_gen:this.context[p]=Qe.f_gen}this.exprAllowed=!0},g.name.updateContext=function(o){var p=!1;this.options.ecmaVersion>=6&&o!==g.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(p=!0),this.exprAllowed=p};var Be=ce.prototype;Be.checkPropClash=function(o,p,b){if(!(this.options.ecmaVersion>=9&&o.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(o.computed||o.method||o.shorthand))){var C=o.key,O;switch(C.type){case"Identifier":O=C.name;break;case"Literal":O=String(C.value);break;default:return}var q=o.kind;if(this.options.ecmaVersion>=6){O==="__proto__"&&q==="init"&&(p.proto&&(b?b.doubleProto<0&&(b.doubleProto=C.start):this.raiseRecoverable(C.start,"Redefinition of __proto__ property")),p.proto=!0);return}O="$"+O;var Y=p[O];if(Y){var we;q==="init"?we=this.strict&&Y.init||Y.get||Y.set:we=Y.init||Y[q],we&&this.raiseRecoverable(C.start,"Redefinition of property")}else Y=p[O]={init:!1,get:!1,set:!1};Y[q]=!0}},Be.parseExpression=function(o,p){var b=this.start,C=this.startLoc,O=this.parseMaybeAssign(o,p);if(this.type===g.comma){var q=this.startNodeAt(b,C);for(q.expressions=[O];this.eat(g.comma);)q.expressions.push(this.parseMaybeAssign(o,p));return this.finishNode(q,"SequenceExpression")}return O},Be.parseMaybeAssign=function(o,p,b){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(o);this.exprAllowed=!1}var C=!1,O=-1,q=-1,Y=-1;p?(O=p.parenthesizedAssign,q=p.trailingComma,Y=p.doubleProto,p.parenthesizedAssign=p.trailingComma=-1):(p=new bt,C=!0);var we=this.start,Ce=this.startLoc;(this.type===g.parenL||this.type===g.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=o==="await");var je=this.parseMaybeConditional(o,p);if(b&&(je=b.call(this,je,we,Ce)),this.type.isAssign){var Ue=this.startNodeAt(we,Ce);return Ue.operator=this.value,this.type===g.eq&&(je=this.toAssignable(je,!1,p)),C||(p.parenthesizedAssign=p.trailingComma=p.doubleProto=-1),p.shorthandAssign>=je.start&&(p.shorthandAssign=-1),this.type===g.eq?this.checkLValPattern(je):this.checkLValSimple(je),Ue.left=je,this.next(),Ue.right=this.parseMaybeAssign(o),Y>-1&&(p.doubleProto=Y),this.finishNode(Ue,"AssignmentExpression")}else C&&this.checkExpressionErrors(p,!0);return O>-1&&(p.parenthesizedAssign=O),q>-1&&(p.trailingComma=q),je},Be.parseMaybeConditional=function(o,p){var b=this.start,C=this.startLoc,O=this.parseExprOps(o,p);if(this.checkExpressionErrors(p))return O;if(this.eat(g.question)){var q=this.startNodeAt(b,C);return q.test=O,q.consequent=this.parseMaybeAssign(),this.expect(g.colon),q.alternate=this.parseMaybeAssign(o),this.finishNode(q,"ConditionalExpression")}return O},Be.parseExprOps=function(o,p){var b=this.start,C=this.startLoc,O=this.parseMaybeUnary(p,!1,!1,o);return this.checkExpressionErrors(p)||O.start===b&&O.type==="ArrowFunctionExpression"?O:this.parseExprOp(O,b,C,-1,o)},Be.parseExprOp=function(o,p,b,C,O){var q=this.type.binop;if(q!=null&&(!O||this.type!==g._in)&&q>C){var Y=this.type===g.logicalOR||this.type===g.logicalAND,we=this.type===g.coalesce;we&&(q=g.logicalAND.binop);var Ce=this.value;this.next();var je=this.start,Ue=this.startLoc,ot=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,O),je,Ue,q,O),_t=this.buildBinary(p,b,o,ot,Ce,Y||we);return(Y&&this.type===g.coalesce||we&&(this.type===g.logicalOR||this.type===g.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(_t,p,b,C,O)}return o},Be.buildBinary=function(o,p,b,C,O,q){C.type==="PrivateIdentifier"&&this.raise(C.start,"Private identifier can only be left side of binary expression");var Y=this.startNodeAt(o,p);return Y.left=b,Y.operator=O,Y.right=C,this.finishNode(Y,q?"LogicalExpression":"BinaryExpression")},Be.parseMaybeUnary=function(o,p,b,C){var O=this.start,q=this.startLoc,Y;if(this.isContextual("await")&&this.canAwait)Y=this.parseAwait(C),p=!0;else if(this.type.prefix){var we=this.startNode(),Ce=this.type===g.incDec;we.operator=this.value,we.prefix=!0,this.next(),we.argument=this.parseMaybeUnary(null,!0,Ce,C),this.checkExpressionErrors(o,!0),Ce?this.checkLValSimple(we.argument):this.strict&&we.operator==="delete"&&Zi(we.argument)?this.raiseRecoverable(we.start,"Deleting local variable in strict mode"):we.operator==="delete"&&ri(we.argument)?this.raiseRecoverable(we.start,"Private fields can not be deleted"):p=!0,Y=this.finishNode(we,Ce?"UpdateExpression":"UnaryExpression")}else if(!p&&this.type===g.privateId)(C||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),Y=this.parsePrivateIdent(),this.type!==g._in&&this.unexpected();else{if(Y=this.parseExprSubscripts(o,C),this.checkExpressionErrors(o))return Y;for(;this.type.postfix&&!this.canInsertSemicolon();){var je=this.startNodeAt(O,q);je.operator=this.value,je.prefix=!1,je.argument=Y,this.checkLValSimple(Y),this.next(),Y=this.finishNode(je,"UpdateExpression")}}if(!b&&this.eat(g.starstar))if(p)this.unexpected(this.lastTokStart);else return this.buildBinary(O,q,Y,this.parseMaybeUnary(null,!1,!1,C),"**",!1);else return Y};function Zi(o){return o.type==="Identifier"||o.type==="ParenthesizedExpression"&&Zi(o.expression)}function ri(o){return o.type==="MemberExpression"&&o.property.type==="PrivateIdentifier"||o.type==="ChainExpression"&&ri(o.expression)||o.type==="ParenthesizedExpression"&&ri(o.expression)}Be.parseExprSubscripts=function(o,p){var b=this.start,C=this.startLoc,O=this.parseExprAtom(o,p);if(O.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return O;var q=this.parseSubscripts(O,b,C,!1,p);return o&&q.type==="MemberExpression"&&(o.parenthesizedAssign>=q.start&&(o.parenthesizedAssign=-1),o.parenthesizedBind>=q.start&&(o.parenthesizedBind=-1),o.trailingComma>=q.start&&(o.trailingComma=-1)),q},Be.parseSubscripts=function(o,p,b,C,O){for(var q=this.options.ecmaVersion>=8&&o.type==="Identifier"&&o.name==="async"&&this.lastTokEnd===o.end&&!this.canInsertSemicolon()&&o.end-o.start===5&&this.potentialArrowAt===o.start,Y=!1;;){var we=this.parseSubscript(o,p,b,C,q,Y,O);if(we.optional&&(Y=!0),we===o||we.type==="ArrowFunctionExpression"){if(Y){var Ce=this.startNodeAt(p,b);Ce.expression=we,we=this.finishNode(Ce,"ChainExpression")}return we}o=we}},Be.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(g.arrow)},Be.parseSubscriptAsyncArrow=function(o,p,b,C){return this.parseArrowExpression(this.startNodeAt(o,p),b,!0,C)},Be.parseSubscript=function(o,p,b,C,O,q,Y){var we=this.options.ecmaVersion>=11,Ce=we&&this.eat(g.questionDot);C&&Ce&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var je=this.eat(g.bracketL);if(je||Ce&&this.type!==g.parenL&&this.type!==g.backQuote||this.eat(g.dot)){var Ue=this.startNodeAt(p,b);Ue.object=o,je?(Ue.property=this.parseExpression(),this.expect(g.bracketR)):this.type===g.privateId&&o.type!=="Super"?Ue.property=this.parsePrivateIdent():Ue.property=this.parseIdent(this.options.allowReserved!=="never"),Ue.computed=!!je,we&&(Ue.optional=Ce),o=this.finishNode(Ue,"MemberExpression")}else if(!C&&this.eat(g.parenL)){var ot=new bt,_t=this.yieldPos,V=this.awaitPos,z=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ne=this.parseExprList(g.parenR,this.options.ecmaVersion>=8,!1,ot);if(O&&!Ce&&this.shouldParseAsyncArrow())return this.checkPatternErrors(ot,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=_t,this.awaitPos=V,this.awaitIdentPos=z,this.parseSubscriptAsyncArrow(p,b,ne,Y);this.checkExpressionErrors(ot,!0),this.yieldPos=_t||this.yieldPos,this.awaitPos=V||this.awaitPos,this.awaitIdentPos=z||this.awaitIdentPos;var Pe=this.startNodeAt(p,b);Pe.callee=o,Pe.arguments=ne,we&&(Pe.optional=Ce),o=this.finishNode(Pe,"CallExpression")}else if(this.type===g.backQuote){(Ce||q)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var We=this.startNodeAt(p,b);We.tag=o,We.quasi=this.parseTemplate({isTagged:!0}),o=this.finishNode(We,"TaggedTemplateExpression")}return o},Be.parseExprAtom=function(o,p,b){this.type===g.slash&&this.readRegexp();var C,O=this.potentialArrowAt===this.start;switch(this.type){case g._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),C=this.startNode(),this.next(),this.type===g.parenL&&!this.allowDirectSuper&&this.raise(C.start,"super() call outside constructor of a subclass"),this.type!==g.dot&&this.type!==g.bracketL&&this.type!==g.parenL&&this.unexpected(),this.finishNode(C,"Super");case g._this:return C=this.startNode(),this.next(),this.finishNode(C,"ThisExpression");case g.name:var q=this.start,Y=this.startLoc,we=this.containsEsc,Ce=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!we&&Ce.name==="async"&&!this.canInsertSemicolon()&&this.eat(g._function))return this.overrideContext(Qe.f_expr),this.parseFunction(this.startNodeAt(q,Y),0,!1,!0,p);if(O&&!this.canInsertSemicolon()){if(this.eat(g.arrow))return this.parseArrowExpression(this.startNodeAt(q,Y),[Ce],!1,p);if(this.options.ecmaVersion>=8&&Ce.name==="async"&&this.type===g.name&&!we&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Ce=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(g.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(q,Y),[Ce],!0,p)}return Ce;case g.regexp:var je=this.value;return C=this.parseLiteral(je.value),C.regex={pattern:je.pattern,flags:je.flags},C;case g.num:case g.string:return this.parseLiteral(this.value);case g._null:case g._true:case g._false:return C=this.startNode(),C.value=this.type===g._null?null:this.type===g._true,C.raw=this.type.keyword,this.next(),this.finishNode(C,"Literal");case g.parenL:var Ue=this.start,ot=this.parseParenAndDistinguishExpression(O,p);return o&&(o.parenthesizedAssign<0&&!this.isSimpleAssignTarget(ot)&&(o.parenthesizedAssign=Ue),o.parenthesizedBind<0&&(o.parenthesizedBind=Ue)),ot;case g.bracketL:return C=this.startNode(),this.next(),C.elements=this.parseExprList(g.bracketR,!0,!0,o),this.finishNode(C,"ArrayExpression");case g.braceL:return this.overrideContext(Qe.b_expr),this.parseObj(!1,o);case g._function:return C=this.startNode(),this.next(),this.parseFunction(C,0);case g._class:return this.parseClass(this.startNode(),!1);case g._new:return this.parseNew();case g.backQuote:return this.parseTemplate();case g._import:return this.options.ecmaVersion>=11?this.parseExprImport(b):this.unexpected();default:return this.parseExprAtomDefault()}},Be.parseExprAtomDefault=function(){this.unexpected()},Be.parseExprImport=function(o){var p=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===g.parenL&&!o)return this.parseDynamicImport(p);if(this.type===g.dot){var b=this.startNodeAt(p.start,p.loc&&p.loc.start);return b.name="import",p.meta=this.finishNode(b,"Identifier"),this.parseImportMeta(p)}else this.unexpected()},Be.parseDynamicImport=function(o){if(this.next(),o.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(g.parenR)?o.options=null:(this.expect(g.comma),this.afterTrailingComma(g.parenR)?o.options=null:(o.options=this.parseMaybeAssign(),this.eat(g.parenR)||(this.expect(g.comma),this.afterTrailingComma(g.parenR)||this.unexpected())));else if(!this.eat(g.parenR)){var p=this.start;this.eat(g.comma)&&this.eat(g.parenR)?this.raiseRecoverable(p,"Trailing comma is not allowed in import()"):this.unexpected(p)}return this.finishNode(o,"ImportExpression")},Be.parseImportMeta=function(o){this.next();var p=this.containsEsc;return o.property=this.parseIdent(!0),o.property.name!=="meta"&&this.raiseRecoverable(o.property.start,"The only valid meta property for import is 'import.meta'"),p&&this.raiseRecoverable(o.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(o.start,"Cannot use 'import.meta' outside a module"),this.finishNode(o,"MetaProperty")},Be.parseLiteral=function(o){var p=this.startNode();return p.value=o,p.raw=this.input.slice(this.start,this.end),p.raw.charCodeAt(p.raw.length-1)===110&&(p.bigint=p.value!=null?p.value.toString():p.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(p,"Literal")},Be.parseParenExpression=function(){this.expect(g.parenL);var o=this.parseExpression();return this.expect(g.parenR),o},Be.shouldParseArrow=function(o){return!this.canInsertSemicolon()},Be.parseParenAndDistinguishExpression=function(o,p){var b=this.start,C=this.startLoc,O,q=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var Y=this.start,we=this.startLoc,Ce=[],je=!0,Ue=!1,ot=new bt,_t=this.yieldPos,V=this.awaitPos,z;for(this.yieldPos=0,this.awaitPos=0;this.type!==g.parenR;)if(je?je=!1:this.expect(g.comma),q&&this.afterTrailingComma(g.parenR,!0)){Ue=!0;break}else if(this.type===g.ellipsis){z=this.start,Ce.push(this.parseParenItem(this.parseRestBinding())),this.type===g.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Ce.push(this.parseMaybeAssign(!1,ot,this.parseParenItem));var ne=this.lastTokEnd,Pe=this.lastTokEndLoc;if(this.expect(g.parenR),o&&this.shouldParseArrow(Ce)&&this.eat(g.arrow))return this.checkPatternErrors(ot,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=_t,this.awaitPos=V,this.parseParenArrowList(b,C,Ce,p);(!Ce.length||Ue)&&this.unexpected(this.lastTokStart),z&&this.unexpected(z),this.checkExpressionErrors(ot,!0),this.yieldPos=_t||this.yieldPos,this.awaitPos=V||this.awaitPos,Ce.length>1?(O=this.startNodeAt(Y,we),O.expressions=Ce,this.finishNodeAt(O,"SequenceExpression",ne,Pe)):O=Ce[0]}else O=this.parseParenExpression();if(this.options.preserveParens){var We=this.startNodeAt(b,C);return We.expression=O,this.finishNode(We,"ParenthesizedExpression")}else return O},Be.parseParenItem=function(o){return o},Be.parseParenArrowList=function(o,p,b,C){return this.parseArrowExpression(this.startNodeAt(o,p),b,!1,C)};var ho=[];Be.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var o=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===g.dot){var p=this.startNodeAt(o.start,o.loc&&o.loc.start);p.name="new",o.meta=this.finishNode(p,"Identifier"),this.next();var b=this.containsEsc;return o.property=this.parseIdent(!0),o.property.name!=="target"&&this.raiseRecoverable(o.property.start,"The only valid meta property for new is 'new.target'"),b&&this.raiseRecoverable(o.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(o.start,"'new.target' can only be used in functions and class static block"),this.finishNode(o,"MetaProperty")}var C=this.start,O=this.startLoc;return o.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),C,O,!0,!1),this.eat(g.parenL)?o.arguments=this.parseExprList(g.parenR,this.options.ecmaVersion>=8,!1):o.arguments=ho,this.finishNode(o,"NewExpression")},Be.parseTemplateElement=function(o){var p=o.isTagged,b=this.startNode();return this.type===g.invalidTemplate?(p||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),b.value={raw:this.value.replace(/\r\n?/g,`
23
+ `),cooked:null}):b.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
24
+ `),cooked:this.value},this.next(),b.tail=this.type===g.backQuote,this.finishNode(b,"TemplateElement")},Be.parseTemplate=function(o){o===void 0&&(o={});var p=o.isTagged;p===void 0&&(p=!1);var b=this.startNode();this.next(),b.expressions=[];var C=this.parseTemplateElement({isTagged:p});for(b.quasis=[C];!C.tail;)this.type===g.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(g.dollarBraceL),b.expressions.push(this.parseExpression()),this.expect(g.braceR),b.quasis.push(C=this.parseTemplateElement({isTagged:p}));return this.next(),this.finishNode(b,"TemplateLiteral")},Be.isAsyncProp=function(o){return!o.computed&&o.key.type==="Identifier"&&o.key.name==="async"&&(this.type===g.name||this.type===g.num||this.type===g.string||this.type===g.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===g.star)&&!E.test(this.input.slice(this.lastTokEnd,this.start))},Be.parseObj=function(o,p){var b=this.startNode(),C=!0,O={};for(b.properties=[],this.next();!this.eat(g.braceR);){if(C)C=!1;else if(this.expect(g.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(g.braceR))break;var q=this.parseProperty(o,p);o||this.checkPropClash(q,O,p),b.properties.push(q)}return this.finishNode(b,o?"ObjectPattern":"ObjectExpression")},Be.parseProperty=function(o,p){var b=this.startNode(),C,O,q,Y;if(this.options.ecmaVersion>=9&&this.eat(g.ellipsis))return o?(b.argument=this.parseIdent(!1),this.type===g.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(b,"RestElement")):(b.argument=this.parseMaybeAssign(!1,p),this.type===g.comma&&p&&p.trailingComma<0&&(p.trailingComma=this.start),this.finishNode(b,"SpreadElement"));this.options.ecmaVersion>=6&&(b.method=!1,b.shorthand=!1,(o||p)&&(q=this.start,Y=this.startLoc),o||(C=this.eat(g.star)));var we=this.containsEsc;return this.parsePropertyName(b),!o&&!we&&this.options.ecmaVersion>=8&&!C&&this.isAsyncProp(b)?(O=!0,C=this.options.ecmaVersion>=9&&this.eat(g.star),this.parsePropertyName(b)):O=!1,this.parsePropertyValue(b,o,C,O,q,Y,p,we),this.finishNode(b,"Property")},Be.parseGetterSetter=function(o){var p=o.key.name;this.parsePropertyName(o),o.value=this.parseMethod(!1),o.kind=p;var b=o.kind==="get"?0:1;if(o.value.params.length!==b){var C=o.value.start;o.kind==="get"?this.raiseRecoverable(C,"getter should have no params"):this.raiseRecoverable(C,"setter should have exactly one param")}else o.kind==="set"&&o.value.params[0].type==="RestElement"&&this.raiseRecoverable(o.value.params[0].start,"Setter cannot use rest params")},Be.parsePropertyValue=function(o,p,b,C,O,q,Y,we){(b||C)&&this.type===g.colon&&this.unexpected(),this.eat(g.colon)?(o.value=p?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,Y),o.kind="init"):this.options.ecmaVersion>=6&&this.type===g.parenL?(p&&this.unexpected(),o.method=!0,o.value=this.parseMethod(b,C),o.kind="init"):!p&&!we&&this.options.ecmaVersion>=5&&!o.computed&&o.key.type==="Identifier"&&(o.key.name==="get"||o.key.name==="set")&&this.type!==g.comma&&this.type!==g.braceR&&this.type!==g.eq?((b||C)&&this.unexpected(),this.parseGetterSetter(o)):this.options.ecmaVersion>=6&&!o.computed&&o.key.type==="Identifier"?((b||C)&&this.unexpected(),this.checkUnreserved(o.key),o.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=O),p?o.value=this.parseMaybeDefault(O,q,this.copyNode(o.key)):this.type===g.eq&&Y?(Y.shorthandAssign<0&&(Y.shorthandAssign=this.start),o.value=this.parseMaybeDefault(O,q,this.copyNode(o.key))):o.value=this.copyNode(o.key),o.kind="init",o.shorthand=!0):this.unexpected()},Be.parsePropertyName=function(o){if(this.options.ecmaVersion>=6){if(this.eat(g.bracketL))return o.computed=!0,o.key=this.parseMaybeAssign(),this.expect(g.bracketR),o.key;o.computed=!1}return o.key=this.type===g.num||this.type===g.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},Be.initFunction=function(o){o.id=null,this.options.ecmaVersion>=6&&(o.generator=o.expression=!1),this.options.ecmaVersion>=8&&(o.async=!1)},Be.parseMethod=function(o,p,b){var C=this.startNode(),O=this.yieldPos,q=this.awaitPos,Y=this.awaitIdentPos;return this.initFunction(C),this.options.ecmaVersion>=6&&(C.generator=o),this.options.ecmaVersion>=8&&(C.async=!!p),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Ie(p,C.generator)|W|(b?ae:0)),this.expect(g.parenL),C.params=this.parseBindingList(g.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(C,!1,!0,!1),this.yieldPos=O,this.awaitPos=q,this.awaitIdentPos=Y,this.finishNode(C,"FunctionExpression")},Be.parseArrowExpression=function(o,p,b,C){var O=this.yieldPos,q=this.awaitPos,Y=this.awaitIdentPos;return this.enterScope(Ie(b,!1)|Z),this.initFunction(o),this.options.ecmaVersion>=8&&(o.async=!!b),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,o.params=this.toAssignableList(p,!0),this.parseFunctionBody(o,!0,!1,C),this.yieldPos=O,this.awaitPos=q,this.awaitIdentPos=Y,this.finishNode(o,"ArrowFunctionExpression")},Be.parseFunctionBody=function(o,p,b,C){var O=p&&this.type!==g.braceL,q=this.strict,Y=!1;if(O)o.body=this.parseMaybeAssign(C),o.expression=!0,this.checkParams(o,!1);else{var we=this.options.ecmaVersion>=7&&!this.isSimpleParamList(o.params);(!q||we)&&(Y=this.strictDirective(this.end),Y&&we&&this.raiseRecoverable(o.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var Ce=this.labels;this.labels=[],Y&&(this.strict=!0),this.checkParams(o,!q&&!Y&&!p&&!b&&this.isSimpleParamList(o.params)),this.strict&&o.id&&this.checkLValSimple(o.id,le),o.body=this.parseBlock(!1,void 0,Y&&!q),o.expression=!1,this.adaptDirectivePrologue(o.body.body),this.labels=Ce}this.exitScope()},Be.isSimpleParamList=function(o){for(var p=0,b=o;p<b.length;p+=1){var C=b[p];if(C.type!=="Identifier")return!1}return!0},Be.checkParams=function(o,p){for(var b=Object.create(null),C=0,O=o.params;C<O.length;C+=1){var q=O[C];this.checkLValInnerPattern(q,ke,p?null:b)}},Be.parseExprList=function(o,p,b,C){for(var O=[],q=!0;!this.eat(o);){if(q)q=!1;else if(this.expect(g.comma),p&&this.afterTrailingComma(o))break;var Y=void 0;b&&this.type===g.comma?Y=null:this.type===g.ellipsis?(Y=this.parseSpread(C),C&&this.type===g.comma&&C.trailingComma<0&&(C.trailingComma=this.start)):Y=this.parseMaybeAssign(!1,C),O.push(Y)}return O},Be.checkUnreserved=function(o){var p=o.start,b=o.end,C=o.name;if(this.inGenerator&&C==="yield"&&this.raiseRecoverable(p,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&C==="await"&&this.raiseRecoverable(p,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&_e)&&C==="arguments"&&this.raiseRecoverable(p,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(C==="arguments"||C==="await")&&this.raise(p,"Cannot use "+C+" in class static initialization block"),this.keywords.test(C)&&this.raise(p,"Unexpected keyword '"+C+"'"),!(this.options.ecmaVersion<6&&this.input.slice(p,b).indexOf("\\")!==-1)){var O=this.strict?this.reservedWordsStrict:this.reservedWords;O.test(C)&&(!this.inAsync&&C==="await"&&this.raiseRecoverable(p,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(p,"The keyword '"+C+"' is reserved"))}},Be.parseIdent=function(o){var p=this.parseIdentNode();return this.next(!!o),this.finishNode(p,"Identifier"),o||(this.checkUnreserved(p),p.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=p.start)),p},Be.parseIdentNode=function(){var o=this.startNode();return this.type===g.name?o.name=this.value:this.type.keyword?(o.name=this.type.keyword,(o.name==="class"||o.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=g.name):this.unexpected(),o},Be.parsePrivateIdent=function(){var o=this.startNode();return this.type===g.privateId?o.name=this.value:this.unexpected(),this.next(),this.finishNode(o,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(o)),o},Be.parseYield=function(o){this.yieldPos||(this.yieldPos=this.start);var p=this.startNode();return this.next(),this.type===g.semi||this.canInsertSemicolon()||this.type!==g.star&&!this.type.startsExpr?(p.delegate=!1,p.argument=null):(p.delegate=this.eat(g.star),p.argument=this.parseMaybeAssign(o)),this.finishNode(p,"YieldExpression")},Be.parseAwait=function(o){this.awaitPos||(this.awaitPos=this.start);var p=this.startNode();return this.next(),p.argument=this.parseMaybeUnary(null,!0,!1,o),this.finishNode(p,"AwaitExpression")};var $t=ce.prototype;$t.raise=function(o,p){var b=ye(this.input,o);p+=" ("+b.line+":"+b.column+")",this.sourceFile&&(p+=" in "+this.sourceFile);var C=new SyntaxError(p);throw C.pos=o,C.loc=b,C.raisedAt=this.pos,C},$t.raiseRecoverable=$t.raise,$t.curPosition=function(){if(this.options.locations)return new ue(this.curLine,this.pos-this.lineStart)};var wn=ce.prototype,po=function(p){this.flags=p,this.var=[],this.lexical=[],this.functions=[]};wn.enterScope=function(o){this.scopeStack.push(new po(o))},wn.exitScope=function(){this.scopeStack.pop()},wn.treatFunctionsAsVarInScope=function(o){return o.flags&me||!this.inModule&&o.flags&te},wn.declareName=function(o,p,b){var C=!1;if(p===Ne){var O=this.currentScope();C=O.lexical.indexOf(o)>-1||O.functions.indexOf(o)>-1||O.var.indexOf(o)>-1,O.lexical.push(o),this.inModule&&O.flags&te&&delete this.undefinedExports[o]}else if(p===yt){var q=this.currentScope();q.lexical.push(o)}else if(p===Fe){var Y=this.currentScope();this.treatFunctionsAsVar?C=Y.lexical.indexOf(o)>-1:C=Y.lexical.indexOf(o)>-1||Y.var.indexOf(o)>-1,Y.functions.push(o)}else for(var we=this.scopeStack.length-1;we>=0;--we){var Ce=this.scopeStack[we];if(Ce.lexical.indexOf(o)>-1&&!(Ce.flags&Q&&Ce.lexical[0]===o)||!this.treatFunctionsAsVarInScope(Ce)&&Ce.functions.indexOf(o)>-1){C=!0;break}if(Ce.var.push(o),this.inModule&&Ce.flags&te&&delete this.undefinedExports[o],Ce.flags&_e)break}C&&this.raiseRecoverable(b,"Identifier '"+o+"' has already been declared")},wn.checkLocalExport=function(o){this.scopeStack[0].lexical.indexOf(o.name)===-1&&this.scopeStack[0].var.indexOf(o.name)===-1&&(this.undefinedExports[o.name]=o)},wn.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},wn.currentVarScope=function(){for(var o=this.scopeStack.length-1;;o--){var p=this.scopeStack[o];if(p.flags&(_e|Ee|ve))return p}},wn.currentThisScope=function(){for(var o=this.scopeStack.length-1;;o--){var p=this.scopeStack[o];if(p.flags&(_e|Ee|ve)&&!(p.flags&Z))return p}};var cr=function(p,b,C){this.type="",this.start=b,this.end=0,p.options.locations&&(this.loc=new A(p,C)),p.options.directSourceFile&&(this.sourceFile=p.options.directSourceFile),p.options.ranges&&(this.range=[b,0])},fr=ce.prototype;fr.startNode=function(){return new cr(this,this.start,this.startLoc)},fr.startNodeAt=function(o,p){return new cr(this,o,p)};function ea(o,p,b,C){return o.type=p,o.end=b,this.options.locations&&(o.loc.end=C),this.options.ranges&&(o.range[1]=b),o}fr.finishNode=function(o,p){return ea.call(this,o,p,this.lastTokEnd,this.lastTokEndLoc)},fr.finishNodeAt=function(o,p,b,C){return ea.call(this,o,p,b,C)},fr.copyNode=function(o){var p=new cr(this,o.start,this.startLoc);for(var b in o)p[b]=o[b];return p};var Un="Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz",ta="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",na=ta+" Extended_Pictographic",ra=na,ia=ra+" EBase EComp EMod EPres ExtPict",aa=ia,Hn=aa,mo={9:ta,10:na,11:ra,12:ia,13:aa,14:Hn},go="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",vo={9:"",10:"",11:"",12:"",13:"",14:go},sa="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",oa="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ua=oa+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Tr=ua+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",la=Tr+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",hr=la+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ii=hr+" "+Un,xo={9:oa,10:ua,11:Tr,12:la,13:hr,14:ii},pr={};function ca(o){var p=pr[o]={binary:be(mo[o]+" "+sa),binaryOfStrings:be(vo[o]),nonBinary:{General_Category:be(sa),Script:be(xo[o])}};p.nonBinary.Script_Extensions=p.nonBinary.Script,p.nonBinary.gc=p.nonBinary.General_Category,p.nonBinary.sc=p.nonBinary.Script,p.nonBinary.scx=p.nonBinary.Script_Extensions}for(var ai=0,fa=[9,10,11,12,13,14];ai<fa.length;ai+=1){var yo=fa[ai];ca(yo)}var Re=ce.prototype,Ar=function(p,b){this.parent=p,this.base=b||this};Ar.prototype.separatedFrom=function(p){for(var b=this;b;b=b.parent)for(var C=p;C;C=C.parent)if(b.base===C.base&&b!==C)return!0;return!1},Ar.prototype.sibling=function(){return new Ar(this.parent,this.base)};var sn=function(p){this.parser=p,this.validFlags="gim"+(p.options.ecmaVersion>=6?"uy":"")+(p.options.ecmaVersion>=9?"s":"")+(p.options.ecmaVersion>=13?"d":"")+(p.options.ecmaVersion>=15?"v":""),this.unicodeProperties=pr[p.options.ecmaVersion>=14?14:p.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};sn.prototype.reset=function(p,b,C){var O=C.indexOf("v")!==-1,q=C.indexOf("u")!==-1;this.start=p|0,this.source=b+"",this.flags=C,O&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=q&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=q&&this.parser.options.ecmaVersion>=9)},sn.prototype.raise=function(p){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+p)},sn.prototype.at=function(p,b){b===void 0&&(b=!1);var C=this.source,O=C.length;if(p>=O)return-1;var q=C.charCodeAt(p);if(!(b||this.switchU)||q<=55295||q>=57344||p+1>=O)return q;var Y=C.charCodeAt(p+1);return Y>=56320&&Y<=57343?(q<<10)+Y-56613888:q},sn.prototype.nextIndex=function(p,b){b===void 0&&(b=!1);var C=this.source,O=C.length;if(p>=O)return O;var q=C.charCodeAt(p),Y;return!(b||this.switchU)||q<=55295||q>=57344||p+1>=O||(Y=C.charCodeAt(p+1))<56320||Y>57343?p+1:p+2},sn.prototype.current=function(p){return p===void 0&&(p=!1),this.at(this.pos,p)},sn.prototype.lookahead=function(p){return p===void 0&&(p=!1),this.at(this.nextIndex(this.pos,p),p)},sn.prototype.advance=function(p){p===void 0&&(p=!1),this.pos=this.nextIndex(this.pos,p)},sn.prototype.eat=function(p,b){return b===void 0&&(b=!1),this.current(b)===p?(this.advance(b),!0):!1},sn.prototype.eatChars=function(p,b){b===void 0&&(b=!1);for(var C=this.pos,O=0,q=p;O<q.length;O+=1){var Y=q[O],we=this.at(C,b);if(we===-1||we!==Y)return!1;C=this.nextIndex(C,b)}return this.pos=C,!0},Re.validateRegExpFlags=function(o){for(var p=o.validFlags,b=o.flags,C=!1,O=!1,q=0;q<b.length;q++){var Y=b.charAt(q);p.indexOf(Y)===-1&&this.raise(o.start,"Invalid regular expression flag"),b.indexOf(Y,q+1)>-1&&this.raise(o.start,"Duplicate regular expression flag"),Y==="u"&&(C=!0),Y==="v"&&(O=!0)}this.options.ecmaVersion>=15&&C&&O&&this.raise(o.start,"Invalid regular expression flag")};function bo(o){for(var p in o)return!0;return!1}Re.validateRegExpPattern=function(o){this.regexp_pattern(o),!o.switchN&&this.options.ecmaVersion>=9&&bo(o.groupNames)&&(o.switchN=!0,this.regexp_pattern(o))},Re.regexp_pattern=function(o){o.pos=0,o.lastIntValue=0,o.lastStringValue="",o.lastAssertionIsQuantifiable=!1,o.numCapturingParens=0,o.maxBackReference=0,o.groupNames=Object.create(null),o.backReferenceNames.length=0,o.branchID=null,this.regexp_disjunction(o),o.pos!==o.source.length&&(o.eat(41)&&o.raise("Unmatched ')'"),(o.eat(93)||o.eat(125))&&o.raise("Lone quantifier brackets")),o.maxBackReference>o.numCapturingParens&&o.raise("Invalid escape");for(var p=0,b=o.backReferenceNames;p<b.length;p+=1){var C=b[p];o.groupNames[C]||o.raise("Invalid named capture referenced")}},Re.regexp_disjunction=function(o){var p=this.options.ecmaVersion>=16;for(p&&(o.branchID=new Ar(o.branchID,null)),this.regexp_alternative(o);o.eat(124);)p&&(o.branchID=o.branchID.sibling()),this.regexp_alternative(o);p&&(o.branchID=o.branchID.parent),this.regexp_eatQuantifier(o,!0)&&o.raise("Nothing to repeat"),o.eat(123)&&o.raise("Lone quantifier brackets")},Re.regexp_alternative=function(o){for(;o.pos<o.source.length&&this.regexp_eatTerm(o););},Re.regexp_eatTerm=function(o){return this.regexp_eatAssertion(o)?(o.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(o)&&o.switchU&&o.raise("Invalid quantifier"),!0):(o.switchU?this.regexp_eatAtom(o):this.regexp_eatExtendedAtom(o))?(this.regexp_eatQuantifier(o),!0):!1},Re.regexp_eatAssertion=function(o){var p=o.pos;if(o.lastAssertionIsQuantifiable=!1,o.eat(94)||o.eat(36))return!0;if(o.eat(92)){if(o.eat(66)||o.eat(98))return!0;o.pos=p}if(o.eat(40)&&o.eat(63)){var b=!1;if(this.options.ecmaVersion>=9&&(b=o.eat(60)),o.eat(61)||o.eat(33))return this.regexp_disjunction(o),o.eat(41)||o.raise("Unterminated group"),o.lastAssertionIsQuantifiable=!b,!0}return o.pos=p,!1},Re.regexp_eatQuantifier=function(o,p){return p===void 0&&(p=!1),this.regexp_eatQuantifierPrefix(o,p)?(o.eat(63),!0):!1},Re.regexp_eatQuantifierPrefix=function(o,p){return o.eat(42)||o.eat(43)||o.eat(63)||this.regexp_eatBracedQuantifier(o,p)},Re.regexp_eatBracedQuantifier=function(o,p){var b=o.pos;if(o.eat(123)){var C=0,O=-1;if(this.regexp_eatDecimalDigits(o)&&(C=o.lastIntValue,o.eat(44)&&this.regexp_eatDecimalDigits(o)&&(O=o.lastIntValue),o.eat(125)))return O!==-1&&O<C&&!p&&o.raise("numbers out of order in {} quantifier"),!0;o.switchU&&!p&&o.raise("Incomplete quantifier"),o.pos=b}return!1},Re.regexp_eatAtom=function(o){return this.regexp_eatPatternCharacters(o)||o.eat(46)||this.regexp_eatReverseSolidusAtomEscape(o)||this.regexp_eatCharacterClass(o)||this.regexp_eatUncapturingGroup(o)||this.regexp_eatCapturingGroup(o)},Re.regexp_eatReverseSolidusAtomEscape=function(o){var p=o.pos;if(o.eat(92)){if(this.regexp_eatAtomEscape(o))return!0;o.pos=p}return!1},Re.regexp_eatUncapturingGroup=function(o){var p=o.pos;if(o.eat(40)){if(o.eat(63)){if(this.options.ecmaVersion>=16){var b=this.regexp_eatModifiers(o),C=o.eat(45);if(b||C){for(var O=0;O<b.length;O++){var q=b.charAt(O);b.indexOf(q,O+1)>-1&&o.raise("Duplicate regular expression modifiers")}if(C){var Y=this.regexp_eatModifiers(o);!b&&!Y&&o.current()===58&&o.raise("Invalid regular expression modifiers");for(var we=0;we<Y.length;we++){var Ce=Y.charAt(we);(Y.indexOf(Ce,we+1)>-1||b.indexOf(Ce)>-1)&&o.raise("Duplicate regular expression modifiers")}}}}if(o.eat(58)){if(this.regexp_disjunction(o),o.eat(41))return!0;o.raise("Unterminated group")}}o.pos=p}return!1},Re.regexp_eatCapturingGroup=function(o){if(o.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(o):o.current()===63&&o.raise("Invalid group"),this.regexp_disjunction(o),o.eat(41))return o.numCapturingParens+=1,!0;o.raise("Unterminated group")}return!1},Re.regexp_eatModifiers=function(o){for(var p="",b=0;(b=o.current())!==-1&&wo(b);)p+=L(b),o.advance();return p};function wo(o){return o===105||o===109||o===115}Re.regexp_eatExtendedAtom=function(o){return o.eat(46)||this.regexp_eatReverseSolidusAtomEscape(o)||this.regexp_eatCharacterClass(o)||this.regexp_eatUncapturingGroup(o)||this.regexp_eatCapturingGroup(o)||this.regexp_eatInvalidBracedQuantifier(o)||this.regexp_eatExtendedPatternCharacter(o)},Re.regexp_eatInvalidBracedQuantifier=function(o){return this.regexp_eatBracedQuantifier(o,!0)&&o.raise("Nothing to repeat"),!1},Re.regexp_eatSyntaxCharacter=function(o){var p=o.current();return ha(p)?(o.lastIntValue=p,o.advance(),!0):!1};function ha(o){return o===36||o>=40&&o<=43||o===46||o===63||o>=91&&o<=94||o>=123&&o<=125}Re.regexp_eatPatternCharacters=function(o){for(var p=o.pos,b=0;(b=o.current())!==-1&&!ha(b);)o.advance();return o.pos!==p},Re.regexp_eatExtendedPatternCharacter=function(o){var p=o.current();return p!==-1&&p!==36&&!(p>=40&&p<=43)&&p!==46&&p!==63&&p!==91&&p!==94&&p!==124?(o.advance(),!0):!1},Re.regexp_groupSpecifier=function(o){if(o.eat(63)){this.regexp_eatGroupName(o)||o.raise("Invalid group");var p=this.options.ecmaVersion>=16,b=o.groupNames[o.lastStringValue];if(b)if(p)for(var C=0,O=b;C<O.length;C+=1){var q=O[C];q.separatedFrom(o.branchID)||o.raise("Duplicate capture group name")}else o.raise("Duplicate capture group name");p?(b||(o.groupNames[o.lastStringValue]=[])).push(o.branchID):o.groupNames[o.lastStringValue]=!0}},Re.regexp_eatGroupName=function(o){if(o.lastStringValue="",o.eat(60)){if(this.regexp_eatRegExpIdentifierName(o)&&o.eat(62))return!0;o.raise("Invalid capture group name")}return!1},Re.regexp_eatRegExpIdentifierName=function(o){if(o.lastStringValue="",this.regexp_eatRegExpIdentifierStart(o)){for(o.lastStringValue+=L(o.lastIntValue);this.regexp_eatRegExpIdentifierPart(o);)o.lastStringValue+=L(o.lastIntValue);return!0}return!1},Re.regexp_eatRegExpIdentifierStart=function(o){var p=o.pos,b=this.options.ecmaVersion>=11,C=o.current(b);return o.advance(b),C===92&&this.regexp_eatRegExpUnicodeEscapeSequence(o,b)&&(C=o.lastIntValue),So(C)?(o.lastIntValue=C,!0):(o.pos=p,!1)};function So(o){return v(o,!0)||o===36||o===95}Re.regexp_eatRegExpIdentifierPart=function(o){var p=o.pos,b=this.options.ecmaVersion>=11,C=o.current(b);return o.advance(b),C===92&&this.regexp_eatRegExpUnicodeEscapeSequence(o,b)&&(C=o.lastIntValue),Co(C)?(o.lastIntValue=C,!0):(o.pos=p,!1)};function Co(o){return x(o,!0)||o===36||o===95||o===8204||o===8205}Re.regexp_eatAtomEscape=function(o){return this.regexp_eatBackReference(o)||this.regexp_eatCharacterClassEscape(o)||this.regexp_eatCharacterEscape(o)||o.switchN&&this.regexp_eatKGroupName(o)?!0:(o.switchU&&(o.current()===99&&o.raise("Invalid unicode escape"),o.raise("Invalid escape")),!1)},Re.regexp_eatBackReference=function(o){var p=o.pos;if(this.regexp_eatDecimalEscape(o)){var b=o.lastIntValue;if(o.switchU)return b>o.maxBackReference&&(o.maxBackReference=b),!0;if(b<=o.numCapturingParens)return!0;o.pos=p}return!1},Re.regexp_eatKGroupName=function(o){if(o.eat(107)){if(this.regexp_eatGroupName(o))return o.backReferenceNames.push(o.lastStringValue),!0;o.raise("Invalid named reference")}return!1},Re.regexp_eatCharacterEscape=function(o){return this.regexp_eatControlEscape(o)||this.regexp_eatCControlLetter(o)||this.regexp_eatZero(o)||this.regexp_eatHexEscapeSequence(o)||this.regexp_eatRegExpUnicodeEscapeSequence(o,!1)||!o.switchU&&this.regexp_eatLegacyOctalEscapeSequence(o)||this.regexp_eatIdentityEscape(o)},Re.regexp_eatCControlLetter=function(o){var p=o.pos;if(o.eat(99)){if(this.regexp_eatControlLetter(o))return!0;o.pos=p}return!1},Re.regexp_eatZero=function(o){return o.current()===48&&!dr(o.lookahead())?(o.lastIntValue=0,o.advance(),!0):!1},Re.regexp_eatControlEscape=function(o){var p=o.current();return p===116?(o.lastIntValue=9,o.advance(),!0):p===110?(o.lastIntValue=10,o.advance(),!0):p===118?(o.lastIntValue=11,o.advance(),!0):p===102?(o.lastIntValue=12,o.advance(),!0):p===114?(o.lastIntValue=13,o.advance(),!0):!1},Re.regexp_eatControlLetter=function(o){var p=o.current();return pa(p)?(o.lastIntValue=p%32,o.advance(),!0):!1};function pa(o){return o>=65&&o<=90||o>=97&&o<=122}Re.regexp_eatRegExpUnicodeEscapeSequence=function(o,p){p===void 0&&(p=!1);var b=o.pos,C=p||o.switchU;if(o.eat(117)){if(this.regexp_eatFixedHexDigits(o,4)){var O=o.lastIntValue;if(C&&O>=55296&&O<=56319){var q=o.pos;if(o.eat(92)&&o.eat(117)&&this.regexp_eatFixedHexDigits(o,4)){var Y=o.lastIntValue;if(Y>=56320&&Y<=57343)return o.lastIntValue=(O-55296)*1024+(Y-56320)+65536,!0}o.pos=q,o.lastIntValue=O}return!0}if(C&&o.eat(123)&&this.regexp_eatHexDigits(o)&&o.eat(125)&&ko(o.lastIntValue))return!0;C&&o.raise("Invalid unicode escape"),o.pos=b}return!1};function ko(o){return o>=0&&o<=1114111}Re.regexp_eatIdentityEscape=function(o){if(o.switchU)return this.regexp_eatSyntaxCharacter(o)?!0:o.eat(47)?(o.lastIntValue=47,!0):!1;var p=o.current();return p!==99&&(!o.switchN||p!==107)?(o.lastIntValue=p,o.advance(),!0):!1},Re.regexp_eatDecimalEscape=function(o){o.lastIntValue=0;var p=o.current();if(p>=49&&p<=57){do o.lastIntValue=10*o.lastIntValue+(p-48),o.advance();while((p=o.current())>=48&&p<=57);return!0}return!1};var da=0,Ut=1,Pt=2;Re.regexp_eatCharacterClassEscape=function(o){var p=o.current();if(Eo(p))return o.lastIntValue=-1,o.advance(),Ut;var b=!1;if(o.switchU&&this.options.ecmaVersion>=9&&((b=p===80)||p===112)){o.lastIntValue=-1,o.advance();var C;if(o.eat(123)&&(C=this.regexp_eatUnicodePropertyValueExpression(o))&&o.eat(125))return b&&C===Pt&&o.raise("Invalid property name"),C;o.raise("Invalid property name")}return da};function Eo(o){return o===100||o===68||o===115||o===83||o===119||o===87}Re.regexp_eatUnicodePropertyValueExpression=function(o){var p=o.pos;if(this.regexp_eatUnicodePropertyName(o)&&o.eat(61)){var b=o.lastStringValue;if(this.regexp_eatUnicodePropertyValue(o)){var C=o.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(o,b,C),Ut}}if(o.pos=p,this.regexp_eatLoneUnicodePropertyNameOrValue(o)){var O=o.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(o,O)}return da},Re.regexp_validateUnicodePropertyNameAndValue=function(o,p,b){se(o.unicodeProperties.nonBinary,p)||o.raise("Invalid property name"),o.unicodeProperties.nonBinary[p].test(b)||o.raise("Invalid property value")},Re.regexp_validateUnicodePropertyNameOrValue=function(o,p){if(o.unicodeProperties.binary.test(p))return Ut;if(o.switchV&&o.unicodeProperties.binaryOfStrings.test(p))return Pt;o.raise("Invalid property name")},Re.regexp_eatUnicodePropertyName=function(o){var p=0;for(o.lastStringValue="";ma(p=o.current());)o.lastStringValue+=L(p),o.advance();return o.lastStringValue!==""};function ma(o){return pa(o)||o===95}Re.regexp_eatUnicodePropertyValue=function(o){var p=0;for(o.lastStringValue="";ga(p=o.current());)o.lastStringValue+=L(p),o.advance();return o.lastStringValue!==""};function ga(o){return ma(o)||dr(o)}Re.regexp_eatLoneUnicodePropertyNameOrValue=function(o){return this.regexp_eatUnicodePropertyValue(o)},Re.regexp_eatCharacterClass=function(o){if(o.eat(91)){var p=o.eat(94),b=this.regexp_classContents(o);return o.eat(93)||o.raise("Unterminated character class"),p&&b===Pt&&o.raise("Negated character class may contain strings"),!0}return!1},Re.regexp_classContents=function(o){return o.current()===93?Ut:o.switchV?this.regexp_classSetExpression(o):(this.regexp_nonEmptyClassRanges(o),Ut)},Re.regexp_nonEmptyClassRanges=function(o){for(;this.regexp_eatClassAtom(o);){var p=o.lastIntValue;if(o.eat(45)&&this.regexp_eatClassAtom(o)){var b=o.lastIntValue;o.switchU&&(p===-1||b===-1)&&o.raise("Invalid character class"),p!==-1&&b!==-1&&p>b&&o.raise("Range out of order in character class")}}},Re.regexp_eatClassAtom=function(o){var p=o.pos;if(o.eat(92)){if(this.regexp_eatClassEscape(o))return!0;if(o.switchU){var b=o.current();(b===99||ya(b))&&o.raise("Invalid class escape"),o.raise("Invalid escape")}o.pos=p}var C=o.current();return C!==93?(o.lastIntValue=C,o.advance(),!0):!1},Re.regexp_eatClassEscape=function(o){var p=o.pos;if(o.eat(98))return o.lastIntValue=8,!0;if(o.switchU&&o.eat(45))return o.lastIntValue=45,!0;if(!o.switchU&&o.eat(99)){if(this.regexp_eatClassControlLetter(o))return!0;o.pos=p}return this.regexp_eatCharacterClassEscape(o)||this.regexp_eatCharacterEscape(o)},Re.regexp_classSetExpression=function(o){var p=Ut,b;if(!this.regexp_eatClassSetRange(o))if(b=this.regexp_eatClassSetOperand(o)){b===Pt&&(p=Pt);for(var C=o.pos;o.eatChars([38,38]);){if(o.current()!==38&&(b=this.regexp_eatClassSetOperand(o))){b!==Pt&&(p=Ut);continue}o.raise("Invalid character in character class")}if(C!==o.pos)return p;for(;o.eatChars([45,45]);)this.regexp_eatClassSetOperand(o)||o.raise("Invalid character in character class");if(C!==o.pos)return p}else o.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(o)){if(b=this.regexp_eatClassSetOperand(o),!b)return p;b===Pt&&(p=Pt)}},Re.regexp_eatClassSetRange=function(o){var p=o.pos;if(this.regexp_eatClassSetCharacter(o)){var b=o.lastIntValue;if(o.eat(45)&&this.regexp_eatClassSetCharacter(o)){var C=o.lastIntValue;return b!==-1&&C!==-1&&b>C&&o.raise("Range out of order in character class"),!0}o.pos=p}return!1},Re.regexp_eatClassSetOperand=function(o){return this.regexp_eatClassSetCharacter(o)?Ut:this.regexp_eatClassStringDisjunction(o)||this.regexp_eatNestedClass(o)},Re.regexp_eatNestedClass=function(o){var p=o.pos;if(o.eat(91)){var b=o.eat(94),C=this.regexp_classContents(o);if(o.eat(93))return b&&C===Pt&&o.raise("Negated character class may contain strings"),C;o.pos=p}if(o.eat(92)){var O=this.regexp_eatCharacterClassEscape(o);if(O)return O;o.pos=p}return null},Re.regexp_eatClassStringDisjunction=function(o){var p=o.pos;if(o.eatChars([92,113])){if(o.eat(123)){var b=this.regexp_classStringDisjunctionContents(o);if(o.eat(125))return b}else o.raise("Invalid escape");o.pos=p}return null},Re.regexp_classStringDisjunctionContents=function(o){for(var p=this.regexp_classString(o);o.eat(124);)this.regexp_classString(o)===Pt&&(p=Pt);return p},Re.regexp_classString=function(o){for(var p=0;this.regexp_eatClassSetCharacter(o);)p++;return p===1?Ut:Pt},Re.regexp_eatClassSetCharacter=function(o){var p=o.pos;if(o.eat(92))return this.regexp_eatCharacterEscape(o)||this.regexp_eatClassSetReservedPunctuator(o)?!0:o.eat(98)?(o.lastIntValue=8,!0):(o.pos=p,!1);var b=o.current();return b<0||b===o.lookahead()&&_o(b)||Io(b)?!1:(o.advance(),o.lastIntValue=b,!0)};function _o(o){return o===33||o>=35&&o<=38||o>=42&&o<=44||o===46||o>=58&&o<=64||o===94||o===96||o===126}function Io(o){return o===40||o===41||o===45||o===47||o>=91&&o<=93||o>=123&&o<=125}Re.regexp_eatClassSetReservedPunctuator=function(o){var p=o.current();return To(p)?(o.lastIntValue=p,o.advance(),!0):!1};function To(o){return o===33||o===35||o===37||o===38||o===44||o===45||o>=58&&o<=62||o===64||o===96||o===126}Re.regexp_eatClassControlLetter=function(o){var p=o.current();return dr(p)||p===95?(o.lastIntValue=p%32,o.advance(),!0):!1},Re.regexp_eatHexEscapeSequence=function(o){var p=o.pos;if(o.eat(120)){if(this.regexp_eatFixedHexDigits(o,2))return!0;o.switchU&&o.raise("Invalid escape"),o.pos=p}return!1},Re.regexp_eatDecimalDigits=function(o){var p=o.pos,b=0;for(o.lastIntValue=0;dr(b=o.current());)o.lastIntValue=10*o.lastIntValue+(b-48),o.advance();return o.pos!==p};function dr(o){return o>=48&&o<=57}Re.regexp_eatHexDigits=function(o){var p=o.pos,b=0;for(o.lastIntValue=0;va(b=o.current());)o.lastIntValue=16*o.lastIntValue+xa(b),o.advance();return o.pos!==p};function va(o){return o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102}function xa(o){return o>=65&&o<=70?10+(o-65):o>=97&&o<=102?10+(o-97):o-48}Re.regexp_eatLegacyOctalEscapeSequence=function(o){if(this.regexp_eatOctalDigit(o)){var p=o.lastIntValue;if(this.regexp_eatOctalDigit(o)){var b=o.lastIntValue;p<=3&&this.regexp_eatOctalDigit(o)?o.lastIntValue=p*64+b*8+o.lastIntValue:o.lastIntValue=p*8+b}else o.lastIntValue=p;return!0}return!1},Re.regexp_eatOctalDigit=function(o){var p=o.current();return ya(p)?(o.lastIntValue=p-48,o.advance(),!0):(o.lastIntValue=0,!1)};function ya(o){return o>=48&&o<=55}Re.regexp_eatFixedHexDigits=function(o,p){var b=o.pos;o.lastIntValue=0;for(var C=0;C<p;++C){var O=o.current();if(!va(O))return o.pos=b,!1;o.lastIntValue=16*o.lastIntValue+xa(O),o.advance()}return!0};var Wn=function(p){this.type=p.type,this.value=p.value,this.start=p.start,this.end=p.end,p.options.locations&&(this.loc=new A(p,p.startLoc,p.endLoc)),p.options.ranges&&(this.range=[p.start,p.end])},qe=ce.prototype;qe.next=function(o){!o&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Wn(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},qe.getToken=function(){return this.next(),new Wn(this)},typeof Symbol<"u"&&(qe[Symbol.iterator]=function(){var o=this;return{next:function(){var p=o.getToken();return{done:p.type===g.eof,value:p}}}}),qe.nextToken=function(){var o=this.curContext();if((!o||!o.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(g.eof);if(o.override)return o.override(this);this.readToken(this.fullCharCodeAtPos())},qe.readToken=function(o){return v(o,this.options.ecmaVersion>=6)||o===92?this.readWord():this.getTokenFromCode(o)},qe.fullCharCodeAtPos=function(){var o=this.input.charCodeAt(this.pos);if(o<=55295||o>=56320)return o;var p=this.input.charCodeAt(this.pos+1);return p<=56319||p>=57344?o:(o<<10)+p-56613888},qe.skipBlockComment=function(){var o=this.options.onComment&&this.curPosition(),p=this.pos,b=this.input.indexOf("*/",this.pos+=2);if(b===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=b+2,this.options.locations)for(var C=void 0,O=p;(C=R(this.input,O,this.pos))>-1;)++this.curLine,O=this.lineStart=C;this.options.onComment&&this.options.onComment(!0,this.input.slice(p+2,b),p,this.pos,o,this.curPosition())},qe.skipLineComment=function(o){for(var p=this.pos,b=this.options.onComment&&this.curPosition(),C=this.input.charCodeAt(this.pos+=o);this.pos<this.input.length&&!F(C);)C=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(p+o,this.pos),p,this.pos,b,this.curPosition())},qe.skipSpace=function(){e:for(;this.pos<this.input.length;){var o=this.input.charCodeAt(this.pos);switch(o){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(o>8&&o<14||o>=5760&&B.test(String.fromCharCode(o)))++this.pos;else break e}}},qe.finishToken=function(o,p){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var b=this.type;this.type=o,this.value=p,this.updateContext(b)},qe.readToken_dot=function(){var o=this.input.charCodeAt(this.pos+1);if(o>=48&&o<=57)return this.readNumber(!0);var p=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&o===46&&p===46?(this.pos+=3,this.finishToken(g.ellipsis)):(++this.pos,this.finishToken(g.dot))},qe.readToken_slash=function(){var o=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):o===61?this.finishOp(g.assign,2):this.finishOp(g.slash,1)},qe.readToken_mult_modulo_exp=function(o){var p=this.input.charCodeAt(this.pos+1),b=1,C=o===42?g.star:g.modulo;return this.options.ecmaVersion>=7&&o===42&&p===42&&(++b,C=g.starstar,p=this.input.charCodeAt(this.pos+2)),p===61?this.finishOp(g.assign,b+1):this.finishOp(C,b)},qe.readToken_pipe_amp=function(o){var p=this.input.charCodeAt(this.pos+1);if(p===o){if(this.options.ecmaVersion>=12){var b=this.input.charCodeAt(this.pos+2);if(b===61)return this.finishOp(g.assign,3)}return this.finishOp(o===124?g.logicalOR:g.logicalAND,2)}return p===61?this.finishOp(g.assign,2):this.finishOp(o===124?g.bitwiseOR:g.bitwiseAND,1)},qe.readToken_caret=function(){var o=this.input.charCodeAt(this.pos+1);return o===61?this.finishOp(g.assign,2):this.finishOp(g.bitwiseXOR,1)},qe.readToken_plus_min=function(o){var p=this.input.charCodeAt(this.pos+1);return p===o?p===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||E.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(g.incDec,2):p===61?this.finishOp(g.assign,2):this.finishOp(g.plusMin,1)},qe.readToken_lt_gt=function(o){var p=this.input.charCodeAt(this.pos+1),b=1;return p===o?(b=o===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+b)===61?this.finishOp(g.assign,b+1):this.finishOp(g.bitShift,b)):p===33&&o===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(p===61&&(b=2),this.finishOp(g.relational,b))},qe.readToken_eq_excl=function(o){var p=this.input.charCodeAt(this.pos+1);return p===61?this.finishOp(g.equality,this.input.charCodeAt(this.pos+2)===61?3:2):o===61&&p===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(g.arrow)):this.finishOp(o===61?g.eq:g.prefix,1)},qe.readToken_question=function(){var o=this.options.ecmaVersion;if(o>=11){var p=this.input.charCodeAt(this.pos+1);if(p===46){var b=this.input.charCodeAt(this.pos+2);if(b<48||b>57)return this.finishOp(g.questionDot,2)}if(p===63){if(o>=12){var C=this.input.charCodeAt(this.pos+2);if(C===61)return this.finishOp(g.assign,3)}return this.finishOp(g.coalesce,2)}}return this.finishOp(g.question,1)},qe.readToken_numberSign=function(){var o=this.options.ecmaVersion,p=35;if(o>=13&&(++this.pos,p=this.fullCharCodeAtPos(),v(p,!0)||p===92))return this.finishToken(g.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+L(p)+"'")},qe.getTokenFromCode=function(o){switch(o){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(g.parenL);case 41:return++this.pos,this.finishToken(g.parenR);case 59:return++this.pos,this.finishToken(g.semi);case 44:return++this.pos,this.finishToken(g.comma);case 91:return++this.pos,this.finishToken(g.bracketL);case 93:return++this.pos,this.finishToken(g.bracketR);case 123:return++this.pos,this.finishToken(g.braceL);case 125:return++this.pos,this.finishToken(g.braceR);case 58:return++this.pos,this.finishToken(g.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(g.backQuote);case 48:var p=this.input.charCodeAt(this.pos+1);if(p===120||p===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(p===111||p===79)return this.readRadixNumber(8);if(p===98||p===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(o);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(o);case 124:case 38:return this.readToken_pipe_amp(o);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(o);case 60:case 62:return this.readToken_lt_gt(o);case 61:case 33:return this.readToken_eq_excl(o);case 63:return this.readToken_question();case 126:return this.finishOp(g.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+L(o)+"'")},qe.finishOp=function(o,p){var b=this.input.slice(this.pos,this.pos+p);return this.pos+=p,this.finishToken(o,b)},qe.readRegexp=function(){for(var o,p,b=this.pos;;){this.pos>=this.input.length&&this.raise(b,"Unterminated regular expression");var C=this.input.charAt(this.pos);if(E.test(C)&&this.raise(b,"Unterminated regular expression"),o)o=!1;else{if(C==="[")p=!0;else if(C==="]"&&p)p=!1;else if(C==="/"&&!p)break;o=C==="\\"}++this.pos}var O=this.input.slice(b,this.pos);++this.pos;var q=this.pos,Y=this.readWord1();this.containsEsc&&this.unexpected(q);var we=this.regexpState||(this.regexpState=new sn(this));we.reset(b,O,Y),this.validateRegExpFlags(we),this.validateRegExpPattern(we);var Ce=null;try{Ce=new RegExp(O,Y)}catch{}return this.finishToken(g.regexp,{pattern:O,flags:Y,value:Ce})},qe.readInt=function(o,p,b){for(var C=this.options.ecmaVersion>=12&&p===void 0,O=b&&this.input.charCodeAt(this.pos)===48,q=this.pos,Y=0,we=0,Ce=0,je=p??1/0;Ce<je;++Ce,++this.pos){var Ue=this.input.charCodeAt(this.pos),ot=void 0;if(C&&Ue===95){O&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),we===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),Ce===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),we=Ue;continue}if(Ue>=97?ot=Ue-97+10:Ue>=65?ot=Ue-65+10:Ue>=48&&Ue<=57?ot=Ue-48:ot=1/0,ot>=o)break;we=Ue,Y=Y*o+ot}return C&&we===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===q||p!=null&&this.pos-q!==p?null:Y};function Ao(o,p){return p?parseInt(o,8):parseFloat(o.replace(/_/g,""))}function ba(o){return typeof BigInt!="function"?null:BigInt(o.replace(/_/g,""))}qe.readRadixNumber=function(o){var p=this.pos;this.pos+=2;var b=this.readInt(o);return b==null&&this.raise(this.start+2,"Expected number in radix "+o),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(b=ba(this.input.slice(p,this.pos)),++this.pos):v(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(g.num,b)},qe.readNumber=function(o){var p=this.pos;!o&&this.readInt(10,void 0,!0)===null&&this.raise(p,"Invalid number");var b=this.pos-p>=2&&this.input.charCodeAt(p)===48;b&&this.strict&&this.raise(p,"Invalid number");var C=this.input.charCodeAt(this.pos);if(!b&&!o&&this.options.ecmaVersion>=11&&C===110){var O=ba(this.input.slice(p,this.pos));return++this.pos,v(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(g.num,O)}b&&/[89]/.test(this.input.slice(p,this.pos))&&(b=!1),C===46&&!b&&(++this.pos,this.readInt(10),C=this.input.charCodeAt(this.pos)),(C===69||C===101)&&!b&&(C=this.input.charCodeAt(++this.pos),(C===43||C===45)&&++this.pos,this.readInt(10)===null&&this.raise(p,"Invalid number")),v(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var q=Ao(this.input.slice(p,this.pos),b);return this.finishToken(g.num,q)},qe.readCodePoint=function(){var o=this.input.charCodeAt(this.pos),p;if(o===123){this.options.ecmaVersion<6&&this.unexpected();var b=++this.pos;p=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,p>1114111&&this.invalidStringToken(b,"Code point out of bounds")}else p=this.readHexChar(4);return p},qe.readString=function(o){for(var p="",b=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var C=this.input.charCodeAt(this.pos);if(C===o)break;C===92?(p+=this.input.slice(b,this.pos),p+=this.readEscapedChar(!1),b=this.pos):C===8232||C===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(F(C)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return p+=this.input.slice(b,this.pos++),this.finishToken(g.string,p)};var mr={};qe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(o){if(o===mr)this.readInvalidTemplateToken();else throw o}this.inTemplateElement=!1},qe.invalidStringToken=function(o,p){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw mr;this.raise(o,p)},qe.readTmplToken=function(){for(var o="",p=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var b=this.input.charCodeAt(this.pos);if(b===96||b===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===g.template||this.type===g.invalidTemplate)?b===36?(this.pos+=2,this.finishToken(g.dollarBraceL)):(++this.pos,this.finishToken(g.backQuote)):(o+=this.input.slice(p,this.pos),this.finishToken(g.template,o));if(b===92)o+=this.input.slice(p,this.pos),o+=this.readEscapedChar(!0),p=this.pos;else if(F(b)){switch(o+=this.input.slice(p,this.pos),++this.pos,b){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:o+=`
25
+ `;break;default:o+=String.fromCharCode(b);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),p=this.pos}else++this.pos}},qe.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(g.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
26
26
  `&&++this.pos;case`
27
27
  `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")},qe.readEscapedChar=function(o){var p=this.input.charCodeAt(++this.pos);switch(++this.pos,p){case 110:return`
28
- `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return L(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),o){var y=this.pos-1;this.invalidStringToken(y,"Invalid escape sequence in template string")}default:if(p>=48&&p<=55){var C=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],O=parseInt(C,8);return O>255&&(C=C.slice(0,-1),O=parseInt(C,8)),this.pos+=C.length-1,p=this.input.charCodeAt(this.pos),(C!=="0"||p===56||p===57)&&(this.strict||o)&&this.invalidStringToken(this.pos-1-C.length,o?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(O)}return j(p)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(p)}},qe.readHexChar=function(o){var p=this.pos,y=this.readInt(16,o);return y===null&&this.invalidStringToken(p,"Bad character escape sequence"),y},qe.readWord1=function(){this.containsEsc=!1;for(var o="",p=!0,y=this.pos,C=this.options.ecmaVersion>=6;this.pos<this.input.length;){var O=this.fullCharCodeAtPos();if(x(O,C))this.pos+=O<=65535?1:2;else if(O===92){this.containsEsc=!0,o+=this.input.slice(y,this.pos);var q=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var Y=this.readCodePoint();(p?v:x)(Y,C)||this.invalidStringToken(q,"Invalid Unicode escape"),o+=L(Y),y=this.pos}else break;p=!1}return o+this.input.slice(y,this.pos)},qe.readWord=function(){var o=this.readWord1(),p=g.name;return this.keywords.test(o)&&(p=P[o]),this.finishToken(p,o)};var Pr="8.15.0";ce.acorn={Parser:ce,version:Pr,defaultOptions:ie,Position:ue,SourceLocation:A,getLineInfo:xe,Node:lr,TokenType:S,tokTypes:g,keywordTypes:P,TokContext:zt,tokContexts:Qe,isIdentifierChar:x,isIdentifierStart:v,Token:Wn,isNewLine:j,lineBreak:E,lineBreakG:D,nonASCIIwhitespace:B};function si(o,p){return ce.parse(o,p)}function oi(o,p,y){return ce.parseExpressionAt(o,p,y)}function Ao(o,p){return ce.tokenizer(o,p)}n.Node=lr,n.Parser=ce,n.Position=ue,n.SourceLocation=A,n.TokContext=zt,n.Token=Wn,n.TokenType=S,n.defaultOptions=ie,n.getLineInfo=xe,n.isIdentifierChar=x,n.isIdentifierStart=v,n.isNewLine=j,n.keywordTypes=P,n.lineBreak=E,n.lineBreakG=D,n.nonASCIIwhitespace=B,n.parse=si,n.parseExpressionAt=oi,n.tokContexts=Qe,n.tokTypes=g,n.tokenizer=Ao,n.version=Pr}))})(pi,pi.exports)),pi.exports}var Ef;function $y(){return Ef||(Ef=1,(function(e){const t=By(),n=/^[\da-fA-F]+$/,r=/^\d+$/,i=new WeakMap;function a(l){l=l.Parser.acorn||l;let c=i.get(l);if(!c){const h=l.tokTypes,f=l.TokContext,d=l.TokenType,m=new f("<tag",!1),v=new f("</tag",!1),x=new f("<tag>...</tag>",!0,!0),S={tc_oTag:m,tc_cTag:v,tc_expr:x},b={jsxName:new d("jsxName"),jsxText:new d("jsxText",{beforeExpr:!0}),jsxTagStart:new d("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new d("jsxTagEnd")};b.jsxTagStart.updateContext=function(){this.context.push(x),this.context.push(m),this.exprAllowed=!1},b.jsxTagEnd.updateContext=function(k){let _=this.context.pop();_===m&&k===h.slash||_===v?(this.context.pop(),this.exprAllowed=this.curContext()===x):this.exprAllowed=!0},c={tokContexts:S,tokTypes:b},i.set(l,c)}return c}function s(l){if(!l)return l;if(l.type==="JSXIdentifier")return l.name;if(l.type==="JSXNamespacedName")return l.namespace.name+":"+l.name.name;if(l.type==="JSXMemberExpression")return s(l.object)+"."+s(l.property)}e.exports=function(l){return l=l||{},function(c){return u({allowNamespaces:l.allowNamespaces!==!1,allowNamespacedObjects:!!l.allowNamespacedObjects},c)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return a(kf()).tokTypes},configurable:!0,enumerable:!0});function u(l,c){const h=c.acorn||kf(),f=a(h),d=h.tokTypes,m=f.tokTypes,v=h.tokContexts,x=f.tokContexts.tc_oTag,S=f.tokContexts.tc_cTag,b=f.tokContexts.tc_expr,k=h.isNewLine,_=h.isIdentifierStart,P=h.isIdentifierChar;return class extends c{static get acornJsx(){return f}jsx_readToken(){let w="",g=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let E=this.input.charCodeAt(this.pos);switch(E){case 60:case 123:return this.pos===this.start?E===60&&this.exprAllowed?(++this.pos,this.finishToken(m.jsxTagStart)):this.getTokenFromCode(E):(w+=this.input.slice(g,this.pos),this.finishToken(m.jsxText,w));case 38:w+=this.input.slice(g,this.pos),w+=this.jsx_readEntity(),g=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(E===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:k(E)?(w+=this.input.slice(g,this.pos),w+=this.jsx_readNewLine(!0),g=this.pos):++this.pos}}}jsx_readNewLine(w){let g=this.input.charCodeAt(this.pos),E;return++this.pos,g===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,E=w?`
28
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return L(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),o){var b=this.pos-1;this.invalidStringToken(b,"Invalid escape sequence in template string")}default:if(p>=48&&p<=55){var C=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],O=parseInt(C,8);return O>255&&(C=C.slice(0,-1),O=parseInt(C,8)),this.pos+=C.length-1,p=this.input.charCodeAt(this.pos),(C!=="0"||p===56||p===57)&&(this.strict||o)&&this.invalidStringToken(this.pos-1-C.length,o?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(O)}return F(p)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(p)}},qe.readHexChar=function(o){var p=this.pos,b=this.readInt(16,o);return b===null&&this.invalidStringToken(p,"Bad character escape sequence"),b},qe.readWord1=function(){this.containsEsc=!1;for(var o="",p=!0,b=this.pos,C=this.options.ecmaVersion>=6;this.pos<this.input.length;){var O=this.fullCharCodeAtPos();if(x(O,C))this.pos+=O<=65535?1:2;else if(O===92){this.containsEsc=!0,o+=this.input.slice(b,this.pos);var q=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var Y=this.readCodePoint();(p?v:x)(Y,C)||this.invalidStringToken(q,"Invalid Unicode escape"),o+=L(Y),b=this.pos}else break;p=!1}return o+this.input.slice(b,this.pos)},qe.readWord=function(){var o=this.readWord1(),p=g.name;return this.keywords.test(o)&&(p=P[o]),this.finishToken(p,o)};var Pr="8.15.0";ce.acorn={Parser:ce,version:Pr,defaultOptions:ie,Position:ue,SourceLocation:A,getLineInfo:ye,Node:cr,TokenType:S,tokTypes:g,keywordTypes:P,TokContext:zt,tokContexts:Qe,isIdentifierChar:x,isIdentifierStart:v,Token:Wn,isNewLine:F,lineBreak:E,lineBreakG:D,nonASCIIwhitespace:B};function si(o,p){return ce.parse(o,p)}function oi(o,p,b){return ce.parseExpressionAt(o,p,b)}function Po(o,p){return ce.tokenizer(o,p)}n.Node=cr,n.Parser=ce,n.Position=ue,n.SourceLocation=A,n.TokContext=zt,n.Token=Wn,n.TokenType=S,n.defaultOptions=ie,n.getLineInfo=ye,n.isIdentifierChar=x,n.isIdentifierStart=v,n.isNewLine=F,n.keywordTypes=P,n.lineBreak=E,n.lineBreakG=D,n.nonASCIIwhitespace=B,n.parse=si,n.parseExpressionAt=oi,n.tokContexts=Qe,n.tokTypes=g,n.tokenizer=Po,n.version=Pr}))})(pi,pi.exports)),pi.exports}var If;function Hb(){return If||(If=1,(function(e){const t=$b(),n=/^[\da-fA-F]+$/,r=/^\d+$/,i=new WeakMap;function a(l){l=l.Parser.acorn||l;let c=i.get(l);if(!c){const h=l.tokTypes,f=l.TokContext,d=l.TokenType,m=new f("<tag",!1),v=new f("</tag",!1),x=new f("<tag>...</tag>",!0,!0),S={tc_oTag:m,tc_cTag:v,tc_expr:x},y={jsxName:new d("jsxName"),jsxText:new d("jsxText",{beforeExpr:!0}),jsxTagStart:new d("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new d("jsxTagEnd")};y.jsxTagStart.updateContext=function(){this.context.push(x),this.context.push(m),this.exprAllowed=!1},y.jsxTagEnd.updateContext=function(k){let _=this.context.pop();_===m&&k===h.slash||_===v?(this.context.pop(),this.exprAllowed=this.curContext()===x):this.exprAllowed=!0},c={tokContexts:S,tokTypes:y},i.set(l,c)}return c}function s(l){if(!l)return l;if(l.type==="JSXIdentifier")return l.name;if(l.type==="JSXNamespacedName")return l.namespace.name+":"+l.name.name;if(l.type==="JSXMemberExpression")return s(l.object)+"."+s(l.property)}e.exports=function(l){return l=l||{},function(c){return u({allowNamespaces:l.allowNamespaces!==!1,allowNamespacedObjects:!!l.allowNamespacedObjects},c)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return a(_f()).tokTypes},configurable:!0,enumerable:!0});function u(l,c){const h=c.acorn||_f(),f=a(h),d=h.tokTypes,m=f.tokTypes,v=h.tokContexts,x=f.tokContexts.tc_oTag,S=f.tokContexts.tc_cTag,y=f.tokContexts.tc_expr,k=h.isNewLine,_=h.isIdentifierStart,P=h.isIdentifierChar;return class extends c{static get acornJsx(){return f}jsx_readToken(){let w="",g=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let E=this.input.charCodeAt(this.pos);switch(E){case 60:case 123:return this.pos===this.start?E===60&&this.exprAllowed?(++this.pos,this.finishToken(m.jsxTagStart)):this.getTokenFromCode(E):(w+=this.input.slice(g,this.pos),this.finishToken(m.jsxText,w));case 38:w+=this.input.slice(g,this.pos),w+=this.jsx_readEntity(),g=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(E===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:k(E)?(w+=this.input.slice(g,this.pos),w+=this.jsx_readNewLine(!0),g=this.pos):++this.pos}}}jsx_readNewLine(w){let g=this.input.charCodeAt(this.pos),E;return++this.pos,g===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,E=w?`
29
29
  `:`\r
30
- `):E=String.fromCharCode(g),this.options.locations&&(++this.curLine,this.lineStart=this.pos),E}jsx_readString(w){let g="",E=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let D=this.input.charCodeAt(this.pos);if(D===w)break;D===38?(g+=this.input.slice(E,this.pos),g+=this.jsx_readEntity(),E=this.pos):k(D)?(g+=this.input.slice(E,this.pos),g+=this.jsx_readNewLine(!1),E=this.pos):++this.pos}return g+=this.input.slice(E,this.pos++),this.finishToken(d.string,g)}jsx_readEntity(){let w="",g=0,E,D=this.input[this.pos];D!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let j=++this.pos;for(;this.pos<this.input.length&&g++<10;){if(D=this.input[this.pos++],D===";"){w[0]==="#"?w[1]==="x"?(w=w.substr(2),n.test(w)&&(E=String.fromCharCode(parseInt(w,16)))):(w=w.substr(1),r.test(w)&&(E=String.fromCharCode(parseInt(w,10)))):E=t[w];break}w+=D}return E||(this.pos=j,"&")}jsx_readWord(){let w,g=this.pos;do w=this.input.charCodeAt(++this.pos);while(P(w)||w===45);return this.finishToken(m.jsxName,this.input.slice(g,this.pos))}jsx_parseIdentifier(){let w=this.startNode();return this.type===m.jsxName?w.name=this.value:this.type.keyword?w.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(w,"JSXIdentifier")}jsx_parseNamespacedName(){let w=this.start,g=this.startLoc,E=this.jsx_parseIdentifier();if(!l.allowNamespaces||!this.eat(d.colon))return E;var D=this.startNodeAt(w,g);return D.namespace=E,D.name=this.jsx_parseIdentifier(),this.finishNode(D,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===m.jsxTagEnd)return"";let w=this.start,g=this.startLoc,E=this.jsx_parseNamespacedName();for(this.type===d.dot&&E.type==="JSXNamespacedName"&&!l.allowNamespacedObjects&&this.unexpected();this.eat(d.dot);){let D=this.startNodeAt(w,g);D.object=E,D.property=this.jsx_parseIdentifier(),E=this.finishNode(D,"JSXMemberExpression")}return E}jsx_parseAttributeValue(){switch(this.type){case d.braceL:let w=this.jsx_parseExpressionContainer();return w.expression.type==="JSXEmptyExpression"&&this.raise(w.start,"JSX attributes must only be assigned a non-empty expression"),w;case m.jsxTagStart:case d.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let w=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(w,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let w=this.startNode();return this.next(),w.expression=this.type===d.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(d.braceR),this.finishNode(w,"JSXExpressionContainer")}jsx_parseAttribute(){let w=this.startNode();return this.eat(d.braceL)?(this.expect(d.ellipsis),w.argument=this.parseMaybeAssign(),this.expect(d.braceR),this.finishNode(w,"JSXSpreadAttribute")):(w.name=this.jsx_parseNamespacedName(),w.value=this.eat(d.eq)?this.jsx_parseAttributeValue():null,this.finishNode(w,"JSXAttribute"))}jsx_parseOpeningElementAt(w,g){let E=this.startNodeAt(w,g);E.attributes=[];let D=this.jsx_parseElementName();for(D&&(E.name=D);this.type!==d.slash&&this.type!==m.jsxTagEnd;)E.attributes.push(this.jsx_parseAttribute());return E.selfClosing=this.eat(d.slash),this.expect(m.jsxTagEnd),this.finishNode(E,D?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(w,g){let E=this.startNodeAt(w,g),D=this.jsx_parseElementName();return D&&(E.name=D),this.expect(m.jsxTagEnd),this.finishNode(E,D?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(w,g){let E=this.startNodeAt(w,g),D=[],j=this.jsx_parseOpeningElementAt(w,g),N=null;if(!j.selfClosing){e:for(;;)switch(this.type){case m.jsxTagStart:if(w=this.start,g=this.startLoc,this.next(),this.eat(d.slash)){N=this.jsx_parseClosingElementAt(w,g);break e}D.push(this.jsx_parseElementAt(w,g));break;case m.jsxText:D.push(this.parseExprAtom());break;case d.braceL:D.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}s(N.name)!==s(j.name)&&this.raise(N.start,"Expected corresponding JSX closing tag for <"+s(j.name)+">")}let B=j.name?"Element":"Fragment";return E["opening"+B]=j,E["closing"+B]=N,E.children=D,this.type===d.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(E,"JSX"+B)}jsx_parseText(){let w=this.parseLiteral(this.value);return w.type="JSXText",w}jsx_parseElement(){let w=this.start,g=this.startLoc;return this.next(),this.jsx_parseElementAt(w,g)}parseExprAtom(w){return this.type===m.jsxText?this.jsx_parseText():this.type===m.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(w)}readToken(w){let g=this.curContext();if(g===b)return this.jsx_readToken();if(g===x||g===S){if(_(w))return this.jsx_readWord();if(w==62)return++this.pos,this.finishToken(m.jsxTagEnd);if((w===34||w===39)&&g==x)return this.jsx_readString(w)}return w===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(m.jsxTagStart)):super.readToken(w)}updateContext(w){if(this.type==d.braceL){var g=this.curContext();g==x?this.context.push(v.b_expr):g==b?this.context.push(v.b_tmpl):super.updateContext(w),this.exprAllowed=!0}else if(this.type===d.slash&&w===m.jsxTagStart)this.context.length-=2,this.context.push(S),this.exprAllowed=!1;else return super.updateContext(w)}}}})(Mo)),Mo.exports}var Uy=$y();const Hy=Hi(Uy),Ot=ar(/[A-Za-z]/),Jt=ar(/[\dA-Za-z]/),Wy=ar(/[#-'*+\--9=?A-Z^-~]/);function hs(e){return e!==null&&(e<32||e===127)}const $u=ar(/\d/),qy=ar(/[\dA-Fa-f]/),Ky=ar(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function Xe(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const Hs=ar(new RegExp("\\p{P}|\\p{S}","u")),Ft=ar(/\s/);function ar(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ke(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return He(l)?(e.enter(n),u(l)):t(l)}function u(l){return He(l)&&a++<i?(e.consume(l),u):(e.exit(n),t(l))}}const Gy={}.hasOwnProperty,Jy=Symbol("continue"),jo=Symbol("exit"),Yy=Symbol("skip");function Xy(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(a,s,u,l){return Bo(a)&&(c.displayName="node ("+a.type+")"),c;function c(){const h=n?_f(n(a,s,u,l)):[];if(h[0]===jo)return h;if(h[0]!==Yy){let f;for(f in a)if(Gy.call(a,f)&&a[f]&&typeof a[f]=="object"&&f!=="data"&&f!=="position"){const d=l.concat(a),m=a[f];if(Array.isArray(m)){const v=m;let x=0;for(;x>-1&&x<v.length;){const S=v[x];if(Bo(S)){const b=i(S,f,x,d)();if(b[0]===jo)return b;x=typeof b[1]=="number"?b[1]:x+1}else x++}}else if(Bo(m)){const v=i(m,f,void 0,d)();if(v[0]===jo)return v}}}return r?_f(r(a,s,u,l)):h}}}function _f(e){return Array.isArray(e)?e:typeof e=="number"?[Jy,e]:[e]}function Bo(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}function cm(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),a=[],s=[],u=i.onComment,l=i.onToken;let c=!1,h,f;const d=Object.assign({},i,{onComment:a,preserveParens:!0});l&&(d.onToken=s);const m=Qy(e,t.tokenTypes),v=m.value,x=n+v+r,S=t.expression&&If(v);if(S&&!t.allowEmpty)throw new nt("Unexpected empty expression",{place:k(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{h=t.expression&&!S?t.acorn.parseExpressionAt(x,0,d):t.acorn.parse(x,d)}catch(_){const P=_,w=k(P.pos);P.message=String(P.message).replace(/ \(\d+:\d+\)$/,""),P.pos=w.offset,P.loc={line:w.line,column:w.column-1},f=P,c=P.raisedAt>=n.length+v.length||P.message==="Unterminated comment"}if(h&&t.expression&&!S)if(If(x.slice(h.end,x.length-r.length)))h={type:"Program",start:0,end:n.length+v.length,body:[{type:"ExpressionStatement",expression:h,start:0,end:n.length+v.length}],sourceType:"module",comments:[]};else{const _=k(h.end),P=new Error("Unexpected content after expression");P.pos=_.offset,P.loc={line:_.line,column:_.column-1},f=P,h=void 0}if(h){if(h.comments=a,Xy(h,function(_,P,w,g){let E=g[g.length-1],D=P;_.type==="ParenthesizedExpression"&&E&&D&&(typeof w=="number"&&(E=E[D],D=w),E[D]=_.expression),b(_)}),Array.isArray(u))u.push(...a);else if(typeof u=="function")for(const _ of a)u(_.type==="Block",_.value,_.start,_.end,_.loc.start,_.loc.end);for(const _ of s)_.end<=n.length||_.start-n.length>=v.length||(b(_),Array.isArray(l)?l.push(_):l(_))}return{estree:h,error:f,swallow:c};function b(_){const P=k(_.start),w=k(_.end);_.start=P.offset,_.end=w.offset,_.loc={start:{line:P.line,column:P.column-1,offset:P.offset},end:{line:w.line,column:w.column-1,offset:w.offset}},_.range=[_.start,_.end]}function k(_){let P=_-n.length;P<0?P=0:P>v.length&&(P=v.length);let w=Zy(m.stops,P);return w||(w={line:t.start.line,column:t.start.column,offset:t.start.offset}),w}}function If(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function Qy(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const a=i[1].type;if(a==="lineEnding"||t.includes(a)){const s=i[2].sliceStream(i[1]);for(;s.length>0&&s[0]===-1;)s.shift();const u=e1(s);n.stops.push([n.value.length,i[1].start]),n.value+=u,n.stops.push([n.value.length,i[1].end])}}}return n}function Zy(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function e1(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
30
+ `):E=String.fromCharCode(g),this.options.locations&&(++this.curLine,this.lineStart=this.pos),E}jsx_readString(w){let g="",E=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let D=this.input.charCodeAt(this.pos);if(D===w)break;D===38?(g+=this.input.slice(E,this.pos),g+=this.jsx_readEntity(),E=this.pos):k(D)?(g+=this.input.slice(E,this.pos),g+=this.jsx_readNewLine(!1),E=this.pos):++this.pos}return g+=this.input.slice(E,this.pos++),this.finishToken(d.string,g)}jsx_readEntity(){let w="",g=0,E,D=this.input[this.pos];D!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let F=++this.pos;for(;this.pos<this.input.length&&g++<10;){if(D=this.input[this.pos++],D===";"){w[0]==="#"?w[1]==="x"?(w=w.substr(2),n.test(w)&&(E=String.fromCharCode(parseInt(w,16)))):(w=w.substr(1),r.test(w)&&(E=String.fromCharCode(parseInt(w,10)))):E=t[w];break}w+=D}return E||(this.pos=F,"&")}jsx_readWord(){let w,g=this.pos;do w=this.input.charCodeAt(++this.pos);while(P(w)||w===45);return this.finishToken(m.jsxName,this.input.slice(g,this.pos))}jsx_parseIdentifier(){let w=this.startNode();return this.type===m.jsxName?w.name=this.value:this.type.keyword?w.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(w,"JSXIdentifier")}jsx_parseNamespacedName(){let w=this.start,g=this.startLoc,E=this.jsx_parseIdentifier();if(!l.allowNamespaces||!this.eat(d.colon))return E;var D=this.startNodeAt(w,g);return D.namespace=E,D.name=this.jsx_parseIdentifier(),this.finishNode(D,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===m.jsxTagEnd)return"";let w=this.start,g=this.startLoc,E=this.jsx_parseNamespacedName();for(this.type===d.dot&&E.type==="JSXNamespacedName"&&!l.allowNamespacedObjects&&this.unexpected();this.eat(d.dot);){let D=this.startNodeAt(w,g);D.object=E,D.property=this.jsx_parseIdentifier(),E=this.finishNode(D,"JSXMemberExpression")}return E}jsx_parseAttributeValue(){switch(this.type){case d.braceL:let w=this.jsx_parseExpressionContainer();return w.expression.type==="JSXEmptyExpression"&&this.raise(w.start,"JSX attributes must only be assigned a non-empty expression"),w;case m.jsxTagStart:case d.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let w=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(w,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let w=this.startNode();return this.next(),w.expression=this.type===d.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(d.braceR),this.finishNode(w,"JSXExpressionContainer")}jsx_parseAttribute(){let w=this.startNode();return this.eat(d.braceL)?(this.expect(d.ellipsis),w.argument=this.parseMaybeAssign(),this.expect(d.braceR),this.finishNode(w,"JSXSpreadAttribute")):(w.name=this.jsx_parseNamespacedName(),w.value=this.eat(d.eq)?this.jsx_parseAttributeValue():null,this.finishNode(w,"JSXAttribute"))}jsx_parseOpeningElementAt(w,g){let E=this.startNodeAt(w,g);E.attributes=[];let D=this.jsx_parseElementName();for(D&&(E.name=D);this.type!==d.slash&&this.type!==m.jsxTagEnd;)E.attributes.push(this.jsx_parseAttribute());return E.selfClosing=this.eat(d.slash),this.expect(m.jsxTagEnd),this.finishNode(E,D?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(w,g){let E=this.startNodeAt(w,g),D=this.jsx_parseElementName();return D&&(E.name=D),this.expect(m.jsxTagEnd),this.finishNode(E,D?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(w,g){let E=this.startNodeAt(w,g),D=[],F=this.jsx_parseOpeningElementAt(w,g),R=null;if(!F.selfClosing){e:for(;;)switch(this.type){case m.jsxTagStart:if(w=this.start,g=this.startLoc,this.next(),this.eat(d.slash)){R=this.jsx_parseClosingElementAt(w,g);break e}D.push(this.jsx_parseElementAt(w,g));break;case m.jsxText:D.push(this.parseExprAtom());break;case d.braceL:D.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}s(R.name)!==s(F.name)&&this.raise(R.start,"Expected corresponding JSX closing tag for <"+s(F.name)+">")}let B=F.name?"Element":"Fragment";return E["opening"+B]=F,E["closing"+B]=R,E.children=D,this.type===d.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(E,"JSX"+B)}jsx_parseText(){let w=this.parseLiteral(this.value);return w.type="JSXText",w}jsx_parseElement(){let w=this.start,g=this.startLoc;return this.next(),this.jsx_parseElementAt(w,g)}parseExprAtom(w){return this.type===m.jsxText?this.jsx_parseText():this.type===m.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(w)}readToken(w){let g=this.curContext();if(g===y)return this.jsx_readToken();if(g===x||g===S){if(_(w))return this.jsx_readWord();if(w==62)return++this.pos,this.finishToken(m.jsxTagEnd);if((w===34||w===39)&&g==x)return this.jsx_readString(w)}return w===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(m.jsxTagStart)):super.readToken(w)}updateContext(w){if(this.type==d.braceL){var g=this.curContext();g==x?this.context.push(v.b_expr):g==y?this.context.push(v.b_tmpl):super.updateContext(w),this.exprAllowed=!0}else if(this.type===d.slash&&w===m.jsxTagStart)this.context.length-=2,this.context.push(S),this.exprAllowed=!1;else return super.updateContext(w)}}}})(jo)),jo.exports}var Wb=Hb();const qb=Hi(Wb),Ot=sr(/[A-Za-z]/),Jt=sr(/[\dA-Za-z]/),Kb=sr(/[#-'*+\--9=?A-Z^-~]/);function ps(e){return e!==null&&(e<32||e===127)}const Hu=sr(/\d/),Gb=sr(/[\dA-Fa-f]/),Jb=sr(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function Xe(e){return e!==null&&(e<0||e===32)}function He(e){return e===-2||e===-1||e===32}const Ws=sr(new RegExp("\\p{P}|\\p{S}","u")),Ft=sr(/\s/);function sr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ke(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return He(l)?(e.enter(n),u(l)):t(l)}function u(l){return He(l)&&a++<i?(e.consume(l),u):(e.exit(n),t(l))}}const Yb={}.hasOwnProperty,Xb=Symbol("continue"),zo=Symbol("exit"),Qb=Symbol("skip");function Zb(e,t){let n,r;typeof t=="function"?n=t:t&&typeof t=="object"&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(a,s,u,l){return $o(a)&&(c.displayName="node ("+a.type+")"),c;function c(){const h=n?Tf(n(a,s,u,l)):[];if(h[0]===zo)return h;if(h[0]!==Qb){let f;for(f in a)if(Yb.call(a,f)&&a[f]&&typeof a[f]=="object"&&f!=="data"&&f!=="position"){const d=l.concat(a),m=a[f];if(Array.isArray(m)){const v=m;let x=0;for(;x>-1&&x<v.length;){const S=v[x];if($o(S)){const y=i(S,f,x,d)();if(y[0]===zo)return y;x=typeof y[1]=="number"?y[1]:x+1}else x++}}else if($o(m)){const v=i(m,f,void 0,d)();if(v[0]===zo)return v}}}return r?Tf(r(a,s,u,l)):h}}}function Tf(e){return Array.isArray(e)?e:typeof e=="number"?[Xb,e]:[e]}function $o(e){return!!(e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.length>0)}function hm(e,t){const n=t.prefix||"",r=t.suffix||"",i=Object.assign({},t.acornOptions),a=[],s=[],u=i.onComment,l=i.onToken;let c=!1,h,f;const d=Object.assign({},i,{onComment:a,preserveParens:!0});l&&(d.onToken=s);const m=e1(e,t.tokenTypes),v=m.value,x=n+v+r,S=t.expression&&Af(v);if(S&&!t.allowEmpty)throw new nt("Unexpected empty expression",{place:k(0),ruleId:"unexpected-empty-expression",source:"micromark-extension-mdx-expression"});try{h=t.expression&&!S?t.acorn.parseExpressionAt(x,0,d):t.acorn.parse(x,d)}catch(_){const P=_,w=k(P.pos);P.message=String(P.message).replace(/ \(\d+:\d+\)$/,""),P.pos=w.offset,P.loc={line:w.line,column:w.column-1},f=P,c=P.raisedAt>=n.length+v.length||P.message==="Unterminated comment"}if(h&&t.expression&&!S)if(Af(x.slice(h.end,x.length-r.length)))h={type:"Program",start:0,end:n.length+v.length,body:[{type:"ExpressionStatement",expression:h,start:0,end:n.length+v.length}],sourceType:"module",comments:[]};else{const _=k(h.end),P=new Error("Unexpected content after expression");P.pos=_.offset,P.loc={line:_.line,column:_.column-1},f=P,h=void 0}if(h){if(h.comments=a,Zb(h,function(_,P,w,g){let E=g[g.length-1],D=P;_.type==="ParenthesizedExpression"&&E&&D&&(typeof w=="number"&&(E=E[D],D=w),E[D]=_.expression),y(_)}),Array.isArray(u))u.push(...a);else if(typeof u=="function")for(const _ of a)u(_.type==="Block",_.value,_.start,_.end,_.loc.start,_.loc.end);for(const _ of s)_.end<=n.length||_.start-n.length>=v.length||(y(_),Array.isArray(l)?l.push(_):l(_))}return{estree:h,error:f,swallow:c};function y(_){const P=k(_.start),w=k(_.end);_.start=P.offset,_.end=w.offset,_.loc={start:{line:P.line,column:P.column-1,offset:P.offset},end:{line:w.line,column:w.column-1,offset:w.offset}},_.range=[_.start,_.end]}function k(_){let P=_-n.length;P<0?P=0:P>v.length&&(P=v.length);let w=t1(m.stops,P);return w||(w={line:t.start.line,column:t.start.column,offset:t.start.offset}),w}}function Af(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,""))}function e1(e,t){const n={value:"",stops:[]};let r=-1;for(;++r<e.length;){const i=e[r];if(i[0]==="enter"){const a=i[1].type;if(a==="lineEnding"||t.includes(a)){const s=i[2].sliceStream(i[1]);for(;s.length>0&&s[0]===-1;)s.shift();const u=n1(s);n.stops.push([n.value.length,i[1].start]),n.value+=u,n.stops.push([n.value.length,i[1].end])}}}return n}function t1(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;const[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function n1(e){let t=-1;const n=[];let r;for(;++t<e.length;){const i=e[t];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
31
31
  `;break}case-3:{a=`\r
32
- `;break}case-2:{a=" ";break}case-1:{if(r)continue;a=" ";break}default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join("")}function Ja(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=Tf(n.start,r[0]||t.start),a=Tf(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function Tf(e,t){if(e&&typeof e=="object"){const n="line"in e?zo(e.line):void 0,r="column"in e?zo(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:zo(t)}}}function zo(e){return typeof e=="number"&&e>-1?e:void 0}const t1=2,Fr="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",n1="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",r1="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",Af="#unexpected-type-in-code-expected-an-object-spread-spread",i1="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",a1="#could-not-parse-expression-with-acorn";function ps(e,t,n,r,i,a,s,u,l,c,h){const f=this,d=this.events.length+3;let m=0,v,x;return S;function S(P){return e.enter(n),e.enter(r),e.consume(P),e.exit(r),v=f.now(),b}function b(P){if(P===null){if(x)throw x;const w=new nt("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:f.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw w.url=Fr+n1,w}if(De(P))return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),_;if(P===125&&m===0){const w=a?s1.call(f,a,s,i,d,v,c||!1,l||!1):{type:"ok",estree:void 0};if(w.type==="ok"){e.enter(r),e.consume(P),e.exit(r);const g=e.exit(n);return u&&w.estree&&Object.assign(g,{estree:w.estree}),t}return x=w.message,e.enter(i),e.consume(P),k}return e.enter(i),k(P)}function k(P){return P===125&&m===0||P===null||De(P)?(e.exit(i),b(P)):(P===123&&!a?m+=1:P===125&&(m-=1),e.consume(P),k)}function _(P){const w=f.now();if(w.line!==v.line&&!h&&f.parser.lazy[w.line]){const g=new nt("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:f.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw g.url=Fr+r1,g}return He(P)?Ke(e,b,"linePrefix",t1+1)(P):b(P)}}function s1(e,t,n,r,i,a,s){const u=cm(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:s?"({":"",suffix:s?"})":""}),l=u.estree;if(s&&l){const c=l.body[0];if(c.type!=="ExpressionStatement"||c.expression.type!=="ObjectExpression"){const h=Ja(c),f=new nt("Unexpected `"+c.type+"` in code: expected an object spread (`{...spread}`)",{place:h.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=Fr+Af,f}if(c.expression.properties[1]){const h=Ja(c.expression.properties[1]),f=new nt("Unexpected extra content in spread: only a single spread is supported",{place:h.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw f.url=Fr+i1,f}if(c.expression.properties[0]&&c.expression.properties[0].type!=="SpreadElement"){const h=Ja(c.expression.properties[0]),f=new nt("Unexpected `"+c.expression.properties[0].type+"` in code: only spread elements are supported",{place:h.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=Fr+Af,f}}if(u.error){const c=new nt("Could not parse expression with acorn",{cause:u.error,place:{line:u.error.loc.line,column:u.error.loc.column+1,offset:u.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return c.url=Fr+a1,{type:"nok",message:c}}return{type:"ok",estree:l}}function o1(e){const t=e||{},n=t.addResult,r=t.acorn,i=t.spread;let a=t.allowEmpty,s;if(a==null&&(a=!0),r){if(!r.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");s=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions)}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:"mdxFlowExpression",tokenize:u,concrete:!0}},text:{123:{name:"mdxTextExpression",tokenize:l}}};function u(c,h,f){const d=this;return m;function m(b){return v(b)}function v(b){return ps.call(d,c,x,"mdxFlowExpression","mdxFlowExpressionMarker","mdxFlowExpressionChunk",r,s,n,i,a)(b)}function x(b){return He(b)?Ke(c,S,"whitespace")(b):S(b)}function S(b){const k=d.parser.constructs.flow[60],P=(Array.isArray(k)?k:k?[k]:[]).find(function(w){return w.name==="mdxJsxFlowTag"});return b===60&&P?c.attempt(P,S,f)(b):b===null||De(b)?h(b):f(b)}}function l(c,h){const f=this;return d;function d(m){return ps.call(f,c,h,"mdxTextExpression","mdxTextExpressionMarker","mdxTextExpressionChunk",r,s,n,i,a,!0)(m)}}}const u1=/[$_\p{ID_Start}]/u,l1=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,c1=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,f1={};function mn(e){return e?u1.test(String.fromCodePoint(e)):!1}function li(e,t){const r=(t||f1).jsx?c1:l1;return e?r.test(String.fromCodePoint(e)):!1}const Pf="https://github.com/micromark/micromark-extension-mdx-jsx";function fm(e,t,n,r,i,a,s,u,l,c,h,f,d,m,v,x,S,b,k,_,P,w,g,E,D,j,N,B,G,U,re,ee){const se=this;let he,ge;return ye;function ye(R){return e.enter(u),e.enter(l),e.consume(R),e.exit(l),L}function L(R){return Xe(R)?n(R):(he=J,Fe(R))}function J(R){if(R===47)return e.enter(c),e.consume(R),e.exit(c),he=ue,Fe;if(R===62)return Ne(R);if(R!==null&&R>=0&&mn(R))return e.enter(f),e.enter(d),e.consume(R),A;ce(R,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(R===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function ue(R){if(R===62)return Ne(R);if(R!==null&&R>=0&&mn(R))return e.enter(f),e.enter(d),e.consume(R),A;ce(R,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(R===42||R===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function A(R){if(R!==null&&R>=0&&li(R,{jsx:!0}))return e.consume(R),A;if(R===46||R===47||R===58||R===62||R===123||Xe(R)||Ft(R))return e.exit(d),he=xe,Fe(R);ce(R,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(R===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function xe(R){if(R===46)return e.enter(m),e.consume(R),e.exit(m),he=ie,Fe;if(R===58)return e.enter(x),e.consume(R),e.exit(x),he=H,Fe;if(R===47||R===62||R===123||R!==null&&R>=0&&mn(R))return e.exit(f),oe(R);ce(R,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ie(R){if(R!==null&&R>=0&&mn(R))return e.enter(v),e.consume(R),fe;ce(R,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(R){if(R!==null&&R>=0&&li(R,{jsx:!0}))return e.consume(R),fe;if(R===46||R===47||R===62||R===123||Xe(R)||Ft(R))return e.exit(v),he=X,Fe(R);ce(R,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(R===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function X(R){if(R===46)return e.enter(m),e.consume(R),e.exit(m),he=ie,Fe;if(R===47||R===62||R===123||R!==null&&R>=0&&mn(R))return e.exit(f),oe(R);ce(R,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function H(R){if(R!==null&&R>=0&&mn(R))return e.enter(S),e.consume(R),te;ce(R,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(R===43||R!==null&&R>46&&R<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function te(R){if(R!==null&&R>=0&&li(R,{jsx:!0}))return e.consume(R),te;if(R===47||R===62||R===123||Xe(R)||Ft(R))return e.exit(S),he=me,Fe(R);ce(R,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function me(R){if(R===47||R===62||R===123||R!==null&&R>=0&&mn(R))return e.exit(f),oe(R);ce(R,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function oe(R){if(R===47)return e.enter(h),e.consume(R),e.exit(h),he=ke,Fe;if(R===62)return Ne(R);if(R===123)return ps.call(se,e,K,b,k,_,r,i,a,!0,!1,s)(R);if(R!==null&&R>=0&&mn(R))return e.enter(P),e.enter(w),e.enter(g),e.consume(R),Z;ce(R,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function K(R){return he=oe,Fe(R)}function Z(R){if(R!==null&&R>=0&&li(R,{jsx:!0}))return e.consume(R),Z;if(R===47||R===58||R===61||R===62||R===123||Xe(R)||Ft(R))return e.exit(g),he=Q,Fe(R);ce(R,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Q(R){if(R===58)return e.enter(E),e.consume(R),e.exit(E),he=W,Fe;if(R===61)return e.exit(w),e.enter(j),e.consume(R),e.exit(j),he=Ee,Fe;if(R===47||R===62||R===123||Xe(R)||Ft(R)||R!==null&&R>=0&&mn(R))return e.exit(w),e.exit(P),he=oe,Fe(R);ce(R,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function W(R){if(R!==null&&R>=0&&mn(R))return e.enter(D),e.consume(R),ae;ce(R,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ae(R){if(R!==null&&R>=0&&li(R,{jsx:!0}))return e.consume(R),ae;if(R===47||R===61||R===62||R===123||Xe(R)||Ft(R))return e.exit(D),e.exit(w),he=ve,Fe(R);ce(R,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function ve(R){if(R===61)return e.enter(j),e.consume(R),e.exit(j),he=Ee,Fe;if(R===47||R===62||R===123||R!==null&&R>=0&&mn(R))return e.exit(P),oe(R);ce(R,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ee(R){if(R===34||R===39)return e.enter(N),e.enter(B),e.consume(R),e.exit(B),ge=R,Ie;if(R===123)return ps.call(se,e,_e,U,re,ee,r,i,a,!1,!1,s)(R);ce(R,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(R===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function _e(R){return e.exit(P),he=oe,Fe(R)}function Ie(R){return R===null&&ce(R,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(ge)+"`"),R===ge?(e.enter(B),e.consume(R),e.exit(B),e.exit(N),e.exit(P),ge=void 0,he=oe,Fe):De(R)?(he=Ie,Fe(R)):(e.enter(G),Me(R))}function Me(R){return R===null||R===ge||De(R)?(e.exit(G),Ie(R)):(e.consume(R),Me)}function ke(R){if(R===62)return Ne(R);ce(R,"after self-closing slash","`>` to end the tag"+(R===42||R===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function Ne(R){return e.enter(l),e.consume(R),e.exit(l),e.exit(u),t}function Fe(R){return De(R)?(e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),le):He(R)||Ft(R)?(e.enter("esWhitespace"),bt(R)):he(R)}function bt(R){return De(R)?(e.exit("esWhitespace"),Fe(R)):He(R)||Ft(R)?(e.consume(R),bt):(e.exit("esWhitespace"),he(R))}function le(R){if(!s&&se.parser.lazy[se.now().line]){const Ve=new nt("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",se.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw Ve.url=Pf+"#unexpected-lazy-line-in-container-expected-line-to-be",Ve}return Fe(R)}function ce(R,Ve,Ye){const yt=new nt("Unexpected "+(R===null?"end of file":"character `"+(R===96?"` ` `":String.fromCodePoint(R))+"` ("+h1(R)+")")+" "+Ve+", expected "+Ye,se.now(),"micromark-extension-mdx-jsx:unexpected-"+(R===null?"eof":"character"));throw yt.url=Pf+(R===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),yt}}function h1(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function p1(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,a){return fm.call(this,r,i,a,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function d1(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,a){const s=this;return u;function u(f){return l(f)}function l(f){return fm.call(s,r,c,a,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(f)}function c(f){return He(f)?Ke(r,h,"whitespace")(f):h(f)}function h(f){const d=s.parser.constructs.flow[123],m=Array.isArray(d)?d:d?[d]:[];let v;for(const x of m)if(x.name==="mdxFlowExpression"){v=x;break}return f===60?u(f):f===123&&v?r.attempt(v,h,a)(f):f===null||De(f)?i(f):a(f)}}}function m1(e){const t=e||{},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:d1(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:p1(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function g1(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}function nn(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function cn(e,t){return e.length>0?(nn(e,e.length,0,t),e):t}function Gr(e){if(e===null||Xe(e)||Ft(e))return 1;if(Hs(e))return 2}function Ws(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Uu={name:"attention",resolveAll:v1,tokenize:x1};function v1(e,t){let n=-1,r,i,a,s,u,l,c,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[n][1].start};Rf(f,-l),Rf(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},a={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=cn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=cn(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=cn(c,Ws(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=cn(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=cn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,nn(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function x1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Gr(r);let a;return s;function s(l){return a=l,e.enter("attentionSequence"),u(l)}function u(l){if(l===a)return e.consume(l),u;const c=e.exit("attentionSequence"),h=Gr(l),f=!h||h===2&&i||n.includes(l),d=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?f:f&&(i||!d)),c._close=!!(a===42?d:d&&(h||!f)),t(l)}}function Rf(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const b1={name:"autolink",tokenize:y1};function y1(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(m){return Ot(m)?(e.consume(m),s):m===64?n(m):c(m)}function s(m){return m===43||m===45||m===46||Jt(m)?(r=1,u(m)):c(m)}function u(m){return m===58?(e.consume(m),r=0,l):(m===43||m===45||m===46||Jt(m))&&r++<32?(e.consume(m),u):(r=0,c(m))}function l(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||hs(m)?n(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),h):Wy(m)?(e.consume(m),c):n(m)}function h(m){return Jt(m)?f(m):n(m)}function f(m){return m===46?(e.consume(m),r=0,h):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):d(m)}function d(m){if((m===45||Jt(m))&&r++<63){const v=m===45?d:f;return e.consume(m),v}return n(m)}}const ti={partial:!0,tokenize:w1};function w1(e,t,n){return r;function r(a){return He(a)?Ke(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||De(a)?t(a):n(a)}}const hm={continuation:{tokenize:C1},exit:k1,name:"blockQuote",tokenize:S1};function S1(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return He(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function C1(e,t,n){const r=this;return i;function i(s){return He(s)?Ke(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(hm,t,n)(s)}}function k1(e){e.exit("blockQuote")}const pm={name:"characterEscape",tokenize:E1};function E1(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Ky(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const dm={name:"characterReference",tokenize:_1};function _1(e,t,n){const r=this;let i=0,a,s;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=Jt,h(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=qy,h):(e.enter("characterReferenceValue"),a=7,s=$u,h(f))}function h(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return s===Jt&&!_i(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),h):n(f)}}const Nf={partial:!0,tokenize:T1},Of={concrete:!0,name:"codeFenced",tokenize:I1};function I1(e,t,n){const r=this,i={partial:!0,tokenize:w};let a=0,s=0,u;return l;function l(g){return c(g)}function c(g){const E=r.events[r.events.length-1];return a=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,u=g,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(g)}function h(g){return g===u?(s++,e.consume(g),h):s<3?n(g):(e.exit("codeFencedFenceSequence"),He(g)?Ke(e,f,"whitespace")(g):f(g))}function f(g){return g===null||De(g)?(e.exit("codeFencedFence"),r.interrupt?t(g):e.check(Nf,x,P)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||De(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(g)):He(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,m,"whitespace")(g)):g===96&&g===u?n(g):(e.consume(g),d)}function m(g){return g===null||De(g)?f(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(g))}function v(g){return g===null||De(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(g)):g===96&&g===u?n(g):(e.consume(g),v)}function x(g){return e.attempt(i,P,S)(g)}function S(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),b}function b(g){return a>0&&He(g)?Ke(e,k,"linePrefix",a+1)(g):k(g)}function k(g){return g===null||De(g)?e.check(Nf,x,P)(g):(e.enter("codeFlowValue"),_(g))}function _(g){return g===null||De(g)?(e.exit("codeFlowValue"),k(g)):(e.consume(g),_)}function P(g){return e.exit("codeFenced"),t(g)}function w(g,E,D){let j=0;return N;function N(ee){return g.enter("lineEnding"),g.consume(ee),g.exit("lineEnding"),B}function B(ee){return g.enter("codeFencedFence"),He(ee)?Ke(g,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):G(ee)}function G(ee){return ee===u?(g.enter("codeFencedFenceSequence"),U(ee)):D(ee)}function U(ee){return ee===u?(j++,g.consume(ee),U):j>=s?(g.exit("codeFencedFenceSequence"),He(ee)?Ke(g,re,"whitespace")(ee):re(ee)):D(ee)}function re(ee){return ee===null||De(ee)?(g.exit("codeFencedFence"),E(ee)):D(ee)}}}function T1(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const $o={name:"codeIndented",tokenize:P1},A1={partial:!0,tokenize:R1};function P1(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ke(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?l(c):De(c)?e.attempt(A1,s,l)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||De(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function l(c){return e.exit("codeIndented"),t(c)}}function R1(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ke(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):De(s)?i(s):n(s)}}const N1={name:"codeText",previous:L1,resolve:O1,tokenize:D1};function O1(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function L1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function D1(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),r++,u):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(a=e.enter("codeTextSequence"),i=0,h(f)):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||De(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function h(f){return f===96?(e.consume(f),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}class V1{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ci(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ci(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ci(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ci(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ci(this.left,n.reverse())}}}function ci(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function mm(e){const t={};let n=-1,r,i,a,s,u,l,c;const h=new V1(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,M1(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return nn(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function M1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,l=[],c={};let h,f,d=-1,m=n,v=0,x=0;const S=[x];for(;m;){for(;e.get(++i)[1]!==m;);a.push(i),m._tokenizer||(h=r.sliceStream(m),m.next||h.push(null),f&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++d<u.length;)u[d][0]==="exit"&&u[d-1][0]==="enter"&&u[d][1].type===u[d-1][1].type&&u[d][1].start.line!==u[d][1].end.line&&(x=d+1,S.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):S.pop(),d=S.length;d--;){const b=u.slice(S[d],S[d+1]),k=a.pop();l.push([k,k+b.length-1]),e.splice(k,2,b)}for(l.reverse(),d=-1;++d<l.length;)c[v+l[d][0]]=v+l[d][1],v+=l[d][1]-l[d][0]-1;return c}const F1={resolve:B1,tokenize:z1},j1={partial:!0,tokenize:$1};function B1(e){return mm(e),e}function z1(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):De(u)?e.check(j1,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function $1(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ke(e,a,"linePrefix")}function a(s){if(s===null||De(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function gm(e,t,n,r,i,a,s,u,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return f;function f(b){return b===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(b),e.exit(a),d):b===null||b===32||b===41||hs(b)?n(b):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(b))}function d(b){return b===62?(e.enter(a),e.consume(b),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(u),d(b)):b===null||b===60||De(b)?n(b):(e.consume(b),b===92?v:m)}function v(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function x(b){return!h&&(b===null||b===41||Xe(b))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(b)):h<c&&b===40?(e.consume(b),h++,x):b===41?(e.consume(b),h--,x):b===null||b===32||b===40||hs(b)?n(b):(e.consume(b),b===92?S:x)}function S(b){return b===40||b===41||b===92?(e.consume(b),x):x(b)}}function vm(e,t,n,r,i,a){const s=this;let u=0,l;return c;function c(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(a),h}function h(m){return u>999||m===null||m===91||m===93&&!l||m===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(a),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):De(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||De(m)||u++>999?(e.exit("chunkString"),h(m)):(e.consume(m),l||(l=!He(m)),m===92?d:f)}function d(m){return m===91||m===92||m===93?(e.consume(m),u++,f):f(m)}}function xm(e,t,n,r,i,a){let s;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),s=d===40?41:d,l):n(d)}function l(d){return d===s?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(a),c(d))}function c(d){return d===s?(e.exit(a),l(s)):d===null?n(d):De(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ke(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(d))}function h(d){return d===s||d===null||De(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:h)}function f(d){return d===s||d===92?(e.consume(d),h):h(d)}}function gi(e,t){let n;return r;function r(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):He(i)?Ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function bn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const U1={name:"definition",tokenize:W1},H1={partial:!0,tokenize:q1};function W1(e,t,n){const r=this;let i;return a;function a(m){return e.enter("definition"),s(m)}function s(m){return vm.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function u(m){return i=bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):n(m)}function l(m){return Xe(m)?gi(e,c)(m):c(m)}function c(m){return gm(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(H1,f,f)(m)}function f(m){return He(m)?Ke(e,d,"whitespace")(m):d(m)}function d(m){return m===null||De(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function q1(e,t,n){return r;function r(u){return Xe(u)?gi(e,i)(u):n(u)}function i(u){return xm(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return He(u)?Ke(e,s,"whitespace")(u):s(u)}function s(u){return u===null||De(u)?t(u):n(u)}}const K1={name:"hardBreakEscape",tokenize:G1};function G1(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const J1={name:"headingAtx",resolve:Y1,tokenize:X1};function Y1(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},nn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function X1(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||Xe(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||De(h)?(e.exit("atxHeading"),t(h)):He(h)?Ke(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function l(h){return h===35?(e.consume(h),l):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||Xe(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const Q1=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Lf=["pre","script","style","textarea"],Z1={concrete:!0,name:"htmlFlow",resolveTo:nw,tokenize:rw},ew={partial:!0,tokenize:aw},tw={partial:!0,tokenize:iw};function nw(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function rw(e,t,n){const r=this;let i,a,s,u,l;return c;function c(A){return h(A)}function h(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),f}function f(A){return A===33?(e.consume(A),d):A===47?(e.consume(A),a=!0,x):A===63?(e.consume(A),i=3,r.interrupt?t:L):Ot(A)?(e.consume(A),s=String.fromCharCode(A),S):n(A)}function d(A){return A===45?(e.consume(A),i=2,m):A===91?(e.consume(A),i=5,u=0,v):Ot(A)?(e.consume(A),i=4,r.interrupt?t:L):n(A)}function m(A){return A===45?(e.consume(A),r.interrupt?t:L):n(A)}function v(A){const xe="CDATA[";return A===xe.charCodeAt(u++)?(e.consume(A),u===xe.length?r.interrupt?t:G:v):n(A)}function x(A){return Ot(A)?(e.consume(A),s=String.fromCharCode(A),S):n(A)}function S(A){if(A===null||A===47||A===62||Xe(A)){const xe=A===47,ie=s.toLowerCase();return!xe&&!a&&Lf.includes(ie)?(i=1,r.interrupt?t(A):G(A)):Q1.includes(s.toLowerCase())?(i=6,xe?(e.consume(A),b):r.interrupt?t(A):G(A)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):a?k(A):_(A))}return A===45||Jt(A)?(e.consume(A),s+=String.fromCharCode(A),S):n(A)}function b(A){return A===62?(e.consume(A),r.interrupt?t:G):n(A)}function k(A){return He(A)?(e.consume(A),k):N(A)}function _(A){return A===47?(e.consume(A),N):A===58||A===95||Ot(A)?(e.consume(A),P):He(A)?(e.consume(A),_):N(A)}function P(A){return A===45||A===46||A===58||A===95||Jt(A)?(e.consume(A),P):w(A)}function w(A){return A===61?(e.consume(A),g):He(A)?(e.consume(A),w):_(A)}function g(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),l=A,E):He(A)?(e.consume(A),g):D(A)}function E(A){return A===l?(e.consume(A),l=null,j):A===null||De(A)?n(A):(e.consume(A),E)}function D(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Xe(A)?w(A):(e.consume(A),D)}function j(A){return A===47||A===62||He(A)?_(A):n(A)}function N(A){return A===62?(e.consume(A),B):n(A)}function B(A){return A===null||De(A)?G(A):He(A)?(e.consume(A),B):n(A)}function G(A){return A===45&&i===2?(e.consume(A),se):A===60&&i===1?(e.consume(A),he):A===62&&i===4?(e.consume(A),J):A===63&&i===3?(e.consume(A),L):A===93&&i===5?(e.consume(A),ye):De(A)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ew,ue,U)(A)):A===null||De(A)?(e.exit("htmlFlowData"),U(A)):(e.consume(A),G)}function U(A){return e.check(tw,re,ue)(A)}function re(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),ee}function ee(A){return A===null||De(A)?U(A):(e.enter("htmlFlowData"),G(A))}function se(A){return A===45?(e.consume(A),L):G(A)}function he(A){return A===47?(e.consume(A),s="",ge):G(A)}function ge(A){if(A===62){const xe=s.toLowerCase();return Lf.includes(xe)?(e.consume(A),J):G(A)}return Ot(A)&&s.length<8?(e.consume(A),s+=String.fromCharCode(A),ge):G(A)}function ye(A){return A===93?(e.consume(A),L):G(A)}function L(A){return A===62?(e.consume(A),J):A===45&&i===2?(e.consume(A),L):G(A)}function J(A){return A===null||De(A)?(e.exit("htmlFlowData"),ue(A)):(e.consume(A),J)}function ue(A){return e.exit("htmlFlow"),t(A)}}function iw(e,t,n){const r=this;return i;function i(s){return De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function aw(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ti,t,n)}}const sw={name:"htmlText",tokenize:ow};function ow(e,t,n){const r=this;let i,a,s;return u;function u(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),c):L===47?(e.consume(L),w):L===63?(e.consume(L),_):Ot(L)?(e.consume(L),D):n(L)}function c(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),a=0,v):Ot(L)?(e.consume(L),k):n(L)}function h(L){return L===45?(e.consume(L),m):n(L)}function f(L){return L===null?n(L):L===45?(e.consume(L),d):De(L)?(s=f,he(L)):(e.consume(L),f)}function d(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?se(L):L===45?d(L):f(L)}function v(L){const J="CDATA[";return L===J.charCodeAt(a++)?(e.consume(L),a===J.length?x:v):n(L)}function x(L){return L===null?n(L):L===93?(e.consume(L),S):De(L)?(s=x,he(L)):(e.consume(L),x)}function S(L){return L===93?(e.consume(L),b):x(L)}function b(L){return L===62?se(L):L===93?(e.consume(L),b):x(L)}function k(L){return L===null||L===62?se(L):De(L)?(s=k,he(L)):(e.consume(L),k)}function _(L){return L===null?n(L):L===63?(e.consume(L),P):De(L)?(s=_,he(L)):(e.consume(L),_)}function P(L){return L===62?se(L):_(L)}function w(L){return Ot(L)?(e.consume(L),g):n(L)}function g(L){return L===45||Jt(L)?(e.consume(L),g):E(L)}function E(L){return De(L)?(s=E,he(L)):He(L)?(e.consume(L),E):se(L)}function D(L){return L===45||Jt(L)?(e.consume(L),D):L===47||L===62||Xe(L)?j(L):n(L)}function j(L){return L===47?(e.consume(L),se):L===58||L===95||Ot(L)?(e.consume(L),N):De(L)?(s=j,he(L)):He(L)?(e.consume(L),j):se(L)}function N(L){return L===45||L===46||L===58||L===95||Jt(L)?(e.consume(L),N):B(L)}function B(L){return L===61?(e.consume(L),G):De(L)?(s=B,he(L)):He(L)?(e.consume(L),B):j(L)}function G(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,U):De(L)?(s=G,he(L)):He(L)?(e.consume(L),G):(e.consume(L),re)}function U(L){return L===i?(e.consume(L),i=void 0,ee):L===null?n(L):De(L)?(s=U,he(L)):(e.consume(L),U)}function re(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Xe(L)?j(L):(e.consume(L),re)}function ee(L){return L===47||L===62||Xe(L)?j(L):n(L)}function se(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function he(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ge}function ge(L){return He(L)?Ke(e,ye,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):ye(L)}function ye(L){return e.enter("htmlTextData"),s(L)}}const Vl={name:"labelEnd",resolveAll:fw,resolveTo:hw,tokenize:pw},uw={tokenize:dw},lw={tokenize:mw},cw={tokenize:gw};function fw(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&nn(e,0,e.length,n),e}function hw(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",l,t],["enter",c,t]],u=cn(u,e.slice(a+1,a+r+3)),u=cn(u,[["enter",h,t]]),u=cn(u,Ws(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=cn(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=cn(u,e.slice(s+1)),u=cn(u,[["exit",l,t]]),nn(e,a,e.length,u),e}function pw(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(d){return a?a._inactive?f(d):(s=r.parser.defined.includes(bn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):n(d)}function l(d){return d===40?e.attempt(uw,h,s?h:f)(d):d===91?e.attempt(lw,h,s?c:f)(d):s?h(d):f(d)}function c(d){return e.attempt(cw,h,f)(d)}function h(d){return t(d)}function f(d){return a._balanced=!0,n(d)}}function dw(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Xe(f)?gi(e,a)(f):a(f)}function a(f){return f===41?h(f):gm(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Xe(f)?gi(e,l)(f):h(f)}function u(f){return n(f)}function l(f){return f===34||f===39||f===40?xm(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):h(f)}function c(f){return Xe(f)?gi(e,h)(f):h(f)}function h(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function mw(e,t,n){const r=this;return i;function i(u){return vm.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(bn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function gw(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const vw={name:"labelStartImage",resolveAll:Vl.resolveAll,tokenize:xw};function xw(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const bw={name:"labelStartLink",resolveAll:Vl.resolveAll,tokenize:yw};function yw(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Uo={name:"lineEnding",tokenize:ww};function ww(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const Ya={name:"thematicBreak",tokenize:Sw};function Sw(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||De(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),He(c)?Ke(e,u,"whitespace")(c):u(c))}}const Wt={continuation:{tokenize:_w},exit:Tw,name:"list",tokenize:Ew},Cw={partial:!0,tokenize:Aw},kw={partial:!0,tokenize:Iw};function Ew(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(m){const v=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:$u(m)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Ya,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return n(m)}function l(m){return $u(m)&&++s<10?(e.consume(m),l):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(ti,r.interrupt?n:h,e.attempt(Cw,d,f))}function h(m){return r.containerState.initialBlankLine=!0,a++,d(m)}function f(m){return He(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),d):n(m)}function d(m){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function _w(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ti,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!He(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(kw,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(e,e.attempt(Wt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Iw(e,t,n){const r=this;return Ke(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function Tw(e){e.exit(this.containerState.type)}function Aw(e,t,n){const r=this;return Ke(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!He(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Df={name:"setextUnderline",resolveTo:Pw,tokenize:Rw};function Pw(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Rw(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),He(c)?Ke(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||De(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Nw={tokenize:Dw,partial:!0},Vf="https://github.com/micromark/micromark-extension-mdxjs-esm",Ow=new Set(["ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ImportDeclaration"]);function Lw(e){const t={tokenize:i,concrete:!0};if(!e||!e.acorn||!e.acorn.parse)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");const n=e.acorn,r=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions,{locations:!0});return{flow:{101:t,105:t}};function i(a,s,u){const l=this,c=l.parser.definedModuleSpecifiers||(l.parser.definedModuleSpecifiers=[]),h=this.events.length+1;let f="";return l.interrupt?u:d;function d(k){return l.now().column>1?u(k):(a.enter("mdxjsEsm"),a.enter("mdxjsEsmData"),a.consume(k),f+=String.fromCharCode(k),m)}function m(k){return Ot(k)?(a.consume(k),f+=String.fromCharCode(k),m):(f==="import"||f==="export")&&k===32?(a.consume(k),v):u(k)}function v(k){return k===null||De(k)?(a.exit("mdxjsEsmData"),x(k)):(a.consume(k),v)}function x(k){return k===null?b(k):De(k)?a.check(Nw,b,S)(k):(a.enter("mdxjsEsmData"),v(k))}function S(k){return a.enter("lineEnding"),a.consume(k),a.exit("lineEnding"),x}function b(k){const _=cm(l.events.slice(h),{acorn:n,acornOptions:r,tokenTypes:["mdxjsEsmData"],prefix:c.length>0?"var "+c.join(",")+`
33
- `:""});if(_.error){if(k!==null&&_.swallow)return S(k);const w=new nt("Could not parse import/exports with acorn",{cause:_.error,place:{line:_.error.loc.line,column:_.error.loc.column+1,offset:_.error.pos},ruleId:"acorn",source:"micromark-extension-mdxjs-esm"});throw w.url=Vf+"#could-not-parse-importexports-with-acorn",w}c.length>0&&_.estree.body.shift();let P=-1;for(;++P<_.estree.body.length;){const w=_.estree.body[P];if(!Ow.has(w.type)){const g=new nt("Unexpected `"+w.type+"` in code: only import/exports are supported",{place:Ja(w),ruleId:"non-esm",source:"micromark-extension-mdxjs-esm"});throw g.url=Vf+"#unexpected-type-in-code-only-importexports-are-supported",g}if(w.type==="ImportDeclaration"&&!l.interrupt){let g=-1;for(;++g<w.specifiers.length;){const E=w.specifiers[g];c.push(E.local.name)}}}return Object.assign(a.exit("mdxjsEsm"),e.addResult?{estree:_.estree}:void 0),s(k)}}}function Dw(e,t,n){return r;function r(i){return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(ti,t,n)}}const Mf={}.hasOwnProperty;function Ml(e){const t={};let n=-1;for(;++n<e.length;)Vw(t,e[n]);return t}function Vw(e,t){let n;for(n in t){const i=(Mf.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Mf.call(i,s)||(i[s]=[]);const u=a[s];Mw(i[s],Array.isArray(u)?u:u?[u]:[])}}}function Mw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);nn(e,0,0,r)}function Fw(e){const t=Object.assign({acorn:kt.extend(Hy()),acornOptions:{ecmaVersion:2024,sourceType:"module"},addResult:!0},e);return Ml([Lw(t),o1(t),m1(t),g1()])}const jw={};function Bw(e){const t=this,n=e||jw,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Fw(n)),a.push(Qb()),s.push(Zb(n))}const zw={};function $w(e,t){const n=zw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return bm(e,r,i)}function bm(e,t,n){if(Uw(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ff(e.children,t,n)}return Array.isArray(e)?Ff(e,t,n):""}function Ff(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=bm(e[i],t,n);return r.join("")}function Uw(e){return!!(e&&typeof e=="object")}function ym(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Hw={tokenize:Ww};function Ww(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return De(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const qw={tokenize:Kw},jf={tokenize:Gw};function Kw(e){const t=this,n=[];let r=0,i,a,s;return u;function u(_){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,l,c)(_)}return c(_)}function l(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const P=t.events.length;let w=P,g;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){g=t.events[w][1].end;break}b(r);let E=P;for(;E<t.events.length;)t.events[E][1].end={...g},E++;return nn(t.events,w+1,0,t.events.slice(P)),t.events.length=E,c(_)}return u(_)}function c(_){if(r===n.length){if(!i)return d(_);if(i.currentConstruct&&i.currentConstruct.concrete)return v(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(jf,h,f)(_)}function h(_){return i&&k(),b(r),d(_)}function f(_){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,v(_)}function d(_){return t.containerState={},e.attempt(jf,m,v)(_)}function m(_){return r++,n.push([t.currentConstruct,t.containerState]),d(_)}function v(_){if(_===null){i&&k(),b(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),x(_)}function x(_){if(_===null){S(e.exit("chunkFlow"),!0),b(0),e.consume(_);return}return De(_)?(e.consume(_),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(_),x)}function S(_,P){const w=t.sliceStream(_);if(P&&w.push(null),_.previous=a,a&&(a.next=_),a=_,i.defineSkip(_.start),i.write(w),t.parser.lazy[_.start.line]){let g=i.events.length;for(;g--;)if(i.events[g][1].start.offset<s&&(!i.events[g][1].end||i.events[g][1].end.offset>s))return;const E=t.events.length;let D=E,j,N;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(j){N=t.events[D][1].end;break}j=!0}for(b(r),g=E;g<t.events.length;)t.events[g][1].end={...N},g++;nn(t.events,D+1,0,t.events.slice(E)),t.events.length=g}}function b(_){let P=n.length;for(;P-- >_;){const w=n[P];t.containerState=w[1],w[0].exit.call(t,e)}n.length=_}function k(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Gw(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Jw={tokenize:Yw};function Yw(e){const t=this,n=e.attempt(ti,r,e.attempt(this.parser.constructs.flowInitial,i,Ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(F1,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Xw={resolveAll:Sm()},Qw=wm("string"),Zw=wm("text");function wm(e){return{resolveAll:Sm(e==="text"?eS:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),l}function l(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),l)}function c(h){if(h===null)return!0;const f=i[h];let d=-1;if(f)for(;++d<f.length;){const m=f[d];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function Sm(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function eS(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)l=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||l||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const tS={42:Wt,43:Wt,45:Wt,48:Wt,49:Wt,50:Wt,51:Wt,52:Wt,53:Wt,54:Wt,55:Wt,56:Wt,57:Wt,62:hm},nS={91:U1},rS={[-2]:$o,[-1]:$o,32:$o},iS={35:J1,42:Ya,45:[Df,Ya],60:Z1,61:Df,95:Ya,96:Of,126:Of},aS={38:dm,92:pm},sS={[-5]:Uo,[-4]:Uo,[-3]:Uo,33:vw,38:dm,42:Uu,60:[b1,sw],91:bw,92:[K1,pm],93:Vl,95:Uu,96:N1},oS={null:[Uu,Xw]},uS={null:[42,95]},lS={null:[]},cS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:uS,contentInitial:nS,disable:lS,document:tS,flow:iS,flowInitial:rS,insideSpan:oS,string:aS,text:sS},Symbol.toStringTag,{value:"Module"}));function fS(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const l={attempt:E(w),check:E(g),consume:k,enter:_,exit:P,interrupt:E(g,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:v,parser:e,previous:null,sliceSerialize:d,sliceStream:m,write:f};let h=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function f(B){return s=cn(s,B),S(),s[s.length-1]!==null?[]:(D(t,0),c.events=Ws(a,c.events,c),c.events)}function d(B,G){return pS(m(B),G)}function m(B){return hS(s,B)}function v(){const{_bufferIndex:B,_index:G,line:U,column:re,offset:ee}=r;return{_bufferIndex:B,_index:G,line:U,column:re,offset:ee}}function x(B){i[B.line]=B.column,N()}function S(){let B;for(;r._index<s.length;){const G=s[r._index];if(typeof G=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<G.length;)b(G.charCodeAt(r._bufferIndex));else b(G)}}function b(B){h=h(B)}function k(B){De(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,N()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=B}function _(B,G){const U=G||{};return U.type=B,U.start=v(),c.events.push(["enter",U,c]),u.push(U),U}function P(B){const G=u.pop();return G.end=v(),c.events.push(["exit",G,c]),G}function w(B,G){D(B,G.from)}function g(B,G){G.restore()}function E(B,G){return U;function U(re,ee,se){let he,ge,ye,L;return Array.isArray(re)?ue(re):"tokenize"in re?ue([re]):J(re);function J(fe){return X;function X(H){const te=H!==null&&fe[H],me=H!==null&&fe.null,oe=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(me)?me:me?[me]:[]];return ue(oe)(H)}}function ue(fe){return he=fe,ge=0,fe.length===0?se:A(fe[ge])}function A(fe){return X;function X(H){return L=j(),ye=fe,fe.partial||(c.currentConstruct=fe),fe.name&&c.parser.constructs.disable.null.includes(fe.name)?ie():fe.tokenize.call(G?Object.assign(Object.create(c),G):c,l,xe,ie)(H)}}function xe(fe){return B(ye,L),ee}function ie(fe){return L.restore(),++ge<he.length?A(he[ge]):se}}}function D(B,G){B.resolveAll&&!a.includes(B)&&a.push(B),B.resolve&&nn(c.events,G,c.events.length-G,B.resolve(c.events.slice(G),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function j(){const B=v(),G=c.previous,U=c.currentConstruct,re=c.events.length,ee=Array.from(u);return{from:re,restore:se};function se(){r=B,c.previous=G,c.currentConstruct=U,c.events.length=re,u=ee,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function hS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function pS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
32
+ `;break}case-2:{a=" ";break}case-1:{if(r)continue;a=" ";break}default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join("")}function Ya(e){const t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=Pf(n.start,r[0]||t.start),a=Pf(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function Pf(e,t){if(e&&typeof e=="object"){const n="line"in e?Uo(e.line):void 0,r="column"in e?Uo(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:Uo(t)}}}function Uo(e){return typeof e=="number"&&e>-1?e:void 0}const r1=2,Fr="https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression",i1="#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-",a1="#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed",Rf="#unexpected-type-in-code-expected-an-object-spread-spread",s1="#unexpected-extra-content-in-spread-only-a-single-spread-is-supported",o1="#could-not-parse-expression-with-acorn";function ds(e,t,n,r,i,a,s,u,l,c,h){const f=this,d=this.events.length+3;let m=0,v,x;return S;function S(P){return e.enter(n),e.enter(r),e.consume(P),e.exit(r),v=f.now(),y}function y(P){if(P===null){if(x)throw x;const w=new nt("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:f.now(),ruleId:"unexpected-eof",source:"micromark-extension-mdx-expression"});throw w.url=Fr+i1,w}if(De(P))return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),_;if(P===125&&m===0){const w=a?u1.call(f,a,s,i,d,v,c||!1,l||!1):{type:"ok",estree:void 0};if(w.type==="ok"){e.enter(r),e.consume(P),e.exit(r);const g=e.exit(n);return u&&w.estree&&Object.assign(g,{estree:w.estree}),t}return x=w.message,e.enter(i),e.consume(P),k}return e.enter(i),k(P)}function k(P){return P===125&&m===0||P===null||De(P)?(e.exit(i),y(P)):(P===123&&!a?m+=1:P===125&&(m-=1),e.consume(P),k)}function _(P){const w=f.now();if(w.line!==v.line&&!h&&f.parser.lazy[w.line]){const g=new nt("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:f.now(),ruleId:"unexpected-lazy",source:"micromark-extension-mdx-expression"});throw g.url=Fr+a1,g}return He(P)?Ke(e,y,"linePrefix",r1+1)(P):y(P)}}function u1(e,t,n,r,i,a,s){const u=hm(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:s?"({":"",suffix:s?"})":""}),l=u.estree;if(s&&l){const c=l.body[0];if(c.type!=="ExpressionStatement"||c.expression.type!=="ObjectExpression"){const h=Ya(c),f=new nt("Unexpected `"+c.type+"` in code: expected an object spread (`{...spread}`)",{place:h.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=Fr+Rf,f}if(c.expression.properties[1]){const h=Ya(c.expression.properties[1]),f=new nt("Unexpected extra content in spread: only a single spread is supported",{place:h.start,ruleId:"spread-extra",source:"micromark-extension-mdx-expression"});throw f.url=Fr+s1,f}if(c.expression.properties[0]&&c.expression.properties[0].type!=="SpreadElement"){const h=Ya(c.expression.properties[0]),f=new nt("Unexpected `"+c.expression.properties[0].type+"` in code: only spread elements are supported",{place:h.start,ruleId:"non-spread",source:"micromark-extension-mdx-expression"});throw f.url=Fr+Rf,f}}if(u.error){const c=new nt("Could not parse expression with acorn",{cause:u.error,place:{line:u.error.loc.line,column:u.error.loc.column+1,offset:u.error.pos},ruleId:"acorn",source:"micromark-extension-mdx-expression"});return c.url=Fr+o1,{type:"nok",message:c}}return{type:"ok",estree:l}}function l1(e){const t=e||{},n=t.addResult,r=t.acorn,i=t.spread;let a=t.allowEmpty,s;if(a==null&&(a=!0),r){if(!r.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");s=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions)}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:"mdxFlowExpression",tokenize:u,concrete:!0}},text:{123:{name:"mdxTextExpression",tokenize:l}}};function u(c,h,f){const d=this;return m;function m(y){return v(y)}function v(y){return ds.call(d,c,x,"mdxFlowExpression","mdxFlowExpressionMarker","mdxFlowExpressionChunk",r,s,n,i,a)(y)}function x(y){return He(y)?Ke(c,S,"whitespace")(y):S(y)}function S(y){const k=d.parser.constructs.flow[60],P=(Array.isArray(k)?k:k?[k]:[]).find(function(w){return w.name==="mdxJsxFlowTag"});return y===60&&P?c.attempt(P,S,f)(y):y===null||De(y)?h(y):f(y)}}function l(c,h){const f=this;return d;function d(m){return ds.call(f,c,h,"mdxTextExpression","mdxTextExpressionMarker","mdxTextExpressionChunk",r,s,n,i,a,!0)(m)}}}const c1=/[$_\p{ID_Start}]/u,f1=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,h1=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,p1={};function mn(e){return e?c1.test(String.fromCodePoint(e)):!1}function li(e,t){const r=(t||p1).jsx?h1:f1;return e?r.test(String.fromCodePoint(e)):!1}const Nf="https://github.com/micromark/micromark-extension-mdx-jsx";function pm(e,t,n,r,i,a,s,u,l,c,h,f,d,m,v,x,S,y,k,_,P,w,g,E,D,F,R,B,G,U,re,ee){const se=this;let he,ge;return be;function be(N){return e.enter(u),e.enter(l),e.consume(N),e.exit(l),L}function L(N){return Xe(N)?n(N):(he=J,Fe(N))}function J(N){if(N===47)return e.enter(c),e.consume(N),e.exit(c),he=ue,Fe;if(N===62)return Ne(N);if(N!==null&&N>=0&&mn(N))return e.enter(f),e.enter(d),e.consume(N),A;ce(N,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(N===33?" (note: to create a comment in MDX, use `{/* text */}`)":""))}function ue(N){if(N===62)return Ne(N);if(N!==null&&N>=0&&mn(N))return e.enter(f),e.enter(d),e.consume(N),A;ce(N,"before name","a character that can start a name, such as a letter, `$`, or `_`"+(N===42||N===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function A(N){if(N!==null&&N>=0&&li(N,{jsx:!0}))return e.consume(N),A;if(N===46||N===47||N===58||N===62||N===123||Xe(N)||Ft(N))return e.exit(d),he=ye,Fe(N);ce(N,"in name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(N===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function ye(N){if(N===46)return e.enter(m),e.consume(N),e.exit(m),he=ie,Fe;if(N===58)return e.enter(x),e.consume(N),e.exit(x),he=H,Fe;if(N===47||N===62||N===123||N!==null&&N>=0&&mn(N))return e.exit(f),oe(N);ce(N,"after name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ie(N){if(N!==null&&N>=0&&mn(N))return e.enter(v),e.consume(N),fe;ce(N,"before member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function fe(N){if(N!==null&&N>=0&&li(N,{jsx:!0}))return e.consume(N),fe;if(N===46||N===47||N===62||N===123||Xe(N)||Ft(N))return e.exit(v),he=X,Fe(N);ce(N,"in member name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(N===64?" (note: to create a link in MDX, use `[text](url)`)":""))}function X(N){if(N===46)return e.enter(m),e.consume(N),e.exit(m),he=ie,Fe;if(N===47||N===62||N===123||N!==null&&N>=0&&mn(N))return e.exit(f),oe(N);ce(N,"after member name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function H(N){if(N!==null&&N>=0&&mn(N))return e.enter(S),e.consume(N),te;ce(N,"before local name","a character that can start a name, such as a letter, `$`, or `_`"+(N===43||N!==null&&N>46&&N<58?" (note: to create a link in MDX, use `[text](url)`)":""))}function te(N){if(N!==null&&N>=0&&li(N,{jsx:!0}))return e.consume(N),te;if(N===47||N===62||N===123||Xe(N)||Ft(N))return e.exit(S),he=me,Fe(N);ce(N,"in local name","a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function me(N){if(N===47||N===62||N===123||N!==null&&N>=0&&mn(N))return e.exit(f),oe(N);ce(N,"after local name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function oe(N){if(N===47)return e.enter(h),e.consume(N),e.exit(h),he=ke,Fe;if(N===62)return Ne(N);if(N===123)return ds.call(se,e,K,y,k,_,r,i,a,!0,!1,s)(N);if(N!==null&&N>=0&&mn(N))return e.enter(P),e.enter(w),e.enter(g),e.consume(N),Z;ce(N,"before attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function K(N){return he=oe,Fe(N)}function Z(N){if(N!==null&&N>=0&&li(N,{jsx:!0}))return e.consume(N),Z;if(N===47||N===58||N===61||N===62||N===123||Xe(N)||Ft(N))return e.exit(g),he=Q,Fe(N);ce(N,"in attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function Q(N){if(N===58)return e.enter(E),e.consume(N),e.exit(E),he=W,Fe;if(N===61)return e.exit(w),e.enter(F),e.consume(N),e.exit(F),he=Ee,Fe;if(N===47||N===62||N===123||Xe(N)||Ft(N)||N!==null&&N>=0&&mn(N))return e.exit(w),e.exit(P),he=oe,Fe(N);ce(N,"after attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function W(N){if(N!==null&&N>=0&&mn(N))return e.enter(D),e.consume(N),ae;ce(N,"before local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function ae(N){if(N!==null&&N>=0&&li(N,{jsx:!0}))return e.consume(N),ae;if(N===47||N===61||N===62||N===123||Xe(N)||Ft(N))return e.exit(D),e.exit(w),he=ve,Fe(N);ce(N,"in local attribute name","an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function ve(N){if(N===61)return e.enter(F),e.consume(N),e.exit(F),he=Ee,Fe;if(N===47||N===62||N===123||N!==null&&N>=0&&mn(N))return e.exit(P),oe(N);ce(N,"after local attribute name","a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ee(N){if(N===34||N===39)return e.enter(R),e.enter(B),e.consume(N),e.exit(B),ge=N,Ie;if(N===123)return ds.call(se,e,_e,U,re,ee,r,i,a,!1,!1,s)(N);ce(N,"before attribute value","a character that can start an attribute value, such as `\"`, `'`, or `{`"+(N===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":""))}function _e(N){return e.exit(P),he=oe,Fe(N)}function Ie(N){return N===null&&ce(N,"in attribute value","a corresponding closing quote `"+String.fromCodePoint(ge)+"`"),N===ge?(e.enter(B),e.consume(N),e.exit(B),e.exit(R),e.exit(P),ge=void 0,he=oe,Fe):De(N)?(he=Ie,Fe(N)):(e.enter(G),Me(N))}function Me(N){return N===null||N===ge||De(N)?(e.exit(G),Ie(N)):(e.consume(N),Me)}function ke(N){if(N===62)return Ne(N);ce(N,"after self-closing slash","`>` to end the tag"+(N===42||N===47?" (note: JS comments in JSX tags are not supported in MDX)":""))}function Ne(N){return e.enter(l),e.consume(N),e.exit(l),e.exit(u),t}function Fe(N){return De(N)?(e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),le):He(N)||Ft(N)?(e.enter("esWhitespace"),yt(N)):he(N)}function yt(N){return De(N)?(e.exit("esWhitespace"),Fe(N)):He(N)||Ft(N)?(e.consume(N),yt):(e.exit("esWhitespace"),he(N))}function le(N){if(!s&&se.parser.lazy[se.now().line]){const Ve=new nt("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",se.now(),"micromark-extension-mdx-jsx:unexpected-lazy");throw Ve.url=Nf+"#unexpected-lazy-line-in-container-expected-line-to-be",Ve}return Fe(N)}function ce(N,Ve,Ye){const bt=new nt("Unexpected "+(N===null?"end of file":"character `"+(N===96?"` ` `":String.fromCodePoint(N))+"` ("+d1(N)+")")+" "+Ve+", expected "+Ye,se.now(),"micromark-extension-mdx-jsx:unexpected-"+(N===null?"eof":"character"));throw bt.url=Nf+(N===null?"#unexpected-end-of-file-at-expected-expect":"#unexpected-character-at-expected-expect"),bt}}function d1(e){return"U+"+e.toString(16).toUpperCase().padStart(4,"0")}function m1(e,t){return{name:"mdxJsxTextTag",tokenize:n};function n(r,i,a){return pm.call(this,r,i,a,e,t.acornOptions,t.addResult,!0,"mdxJsxTextTag","mdxJsxTextTagMarker","mdxJsxTextTagClosingMarker","mdxJsxTextTagSelfClosingMarker","mdxJsxTextTagName","mdxJsxTextTagNamePrimary","mdxJsxTextTagNameMemberMarker","mdxJsxTextTagNameMember","mdxJsxTextTagNamePrefixMarker","mdxJsxTextTagNameLocal","mdxJsxTextTagExpressionAttribute","mdxJsxTextTagExpressionAttributeMarker","mdxJsxTextTagExpressionAttributeValue","mdxJsxTextTagAttribute","mdxJsxTextTagAttributeName","mdxJsxTextTagAttributeNamePrimary","mdxJsxTextTagAttributeNamePrefixMarker","mdxJsxTextTagAttributeNameLocal","mdxJsxTextTagAttributeInitializerMarker","mdxJsxTextTagAttributeValueLiteral","mdxJsxTextTagAttributeValueLiteralMarker","mdxJsxTextTagAttributeValueLiteralValue","mdxJsxTextTagAttributeValueExpression","mdxJsxTextTagAttributeValueExpressionMarker","mdxJsxTextTagAttributeValueExpressionValue")}}function g1(e,t){return{concrete:!0,name:"mdxJsxFlowTag",tokenize:n};function n(r,i,a){const s=this;return u;function u(f){return l(f)}function l(f){return pm.call(s,r,c,a,e,t.acornOptions,t.addResult,!1,"mdxJsxFlowTag","mdxJsxFlowTagMarker","mdxJsxFlowTagClosingMarker","mdxJsxFlowTagSelfClosingMarker","mdxJsxFlowTagName","mdxJsxFlowTagNamePrimary","mdxJsxFlowTagNameMemberMarker","mdxJsxFlowTagNameMember","mdxJsxFlowTagNamePrefixMarker","mdxJsxFlowTagNameLocal","mdxJsxFlowTagExpressionAttribute","mdxJsxFlowTagExpressionAttributeMarker","mdxJsxFlowTagExpressionAttributeValue","mdxJsxFlowTagAttribute","mdxJsxFlowTagAttributeName","mdxJsxFlowTagAttributeNamePrimary","mdxJsxFlowTagAttributeNamePrefixMarker","mdxJsxFlowTagAttributeNameLocal","mdxJsxFlowTagAttributeInitializerMarker","mdxJsxFlowTagAttributeValueLiteral","mdxJsxFlowTagAttributeValueLiteralMarker","mdxJsxFlowTagAttributeValueLiteralValue","mdxJsxFlowTagAttributeValueExpression","mdxJsxFlowTagAttributeValueExpressionMarker","mdxJsxFlowTagAttributeValueExpressionValue")(f)}function c(f){return He(f)?Ke(r,h,"whitespace")(f):h(f)}function h(f){const d=s.parser.constructs.flow[123],m=Array.isArray(d)?d:d?[d]:[];let v;for(const x of m)if(x.name==="mdxFlowExpression"){v=x;break}return f===60?u(f):f===123&&v?r.attempt(v,h,a)(f):f===null||De(f)?i(f):a(f)}}}function v1(e){const t=e||{},n=t.acorn;let r;if(n){if(!n.parse||!n.parseExpressionAt)throw new Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:"module"},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:g1(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:m1(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function x1(){return{disable:{null:["autolink","codeIndented","htmlFlow","htmlText"]}}}function nn(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function cn(e,t){return e.length>0?(nn(e,e.length,0,t),e):t}function Gr(e){if(e===null||Xe(e)||Ft(e))return 1;if(Ws(e))return 2}function qs(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Wu={name:"attention",resolveAll:y1,tokenize:b1};function y1(e,t){let n=-1,r,i,a,s,u,l,c,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[n][1].start};Of(f,-l),Of(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},a={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=cn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=cn(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=cn(c,qs(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=cn(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=cn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,nn(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function b1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Gr(r);let a;return s;function s(l){return a=l,e.enter("attentionSequence"),u(l)}function u(l){if(l===a)return e.consume(l),u;const c=e.exit("attentionSequence"),h=Gr(l),f=!h||h===2&&i||n.includes(l),d=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?f:f&&(i||!d)),c._close=!!(a===42?d:d&&(h||!f)),t(l)}}function Of(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const w1={name:"autolink",tokenize:S1};function S1(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(m){return Ot(m)?(e.consume(m),s):m===64?n(m):c(m)}function s(m){return m===43||m===45||m===46||Jt(m)?(r=1,u(m)):c(m)}function u(m){return m===58?(e.consume(m),r=0,l):(m===43||m===45||m===46||Jt(m))&&r++<32?(e.consume(m),u):(r=0,c(m))}function l(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||ps(m)?n(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),h):Kb(m)?(e.consume(m),c):n(m)}function h(m){return Jt(m)?f(m):n(m)}function f(m){return m===46?(e.consume(m),r=0,h):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):d(m)}function d(m){if((m===45||Jt(m))&&r++<63){const v=m===45?d:f;return e.consume(m),v}return n(m)}}const ti={partial:!0,tokenize:C1};function C1(e,t,n){return r;function r(a){return He(a)?Ke(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||De(a)?t(a):n(a)}}const dm={continuation:{tokenize:E1},exit:_1,name:"blockQuote",tokenize:k1};function k1(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return He(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function E1(e,t,n){const r=this;return i;function i(s){return He(s)?Ke(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(dm,t,n)(s)}}function _1(e){e.exit("blockQuote")}const mm={name:"characterEscape",tokenize:I1};function I1(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return Jb(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const gm={name:"characterReference",tokenize:T1};function T1(e,t,n){const r=this;let i=0,a,s;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=Jt,h(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=Gb,h):(e.enter("characterReferenceValue"),a=7,s=Hu,h(f))}function h(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return s===Jt&&!_i(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),h):n(f)}}const Lf={partial:!0,tokenize:P1},Df={concrete:!0,name:"codeFenced",tokenize:A1};function A1(e,t,n){const r=this,i={partial:!0,tokenize:w};let a=0,s=0,u;return l;function l(g){return c(g)}function c(g){const E=r.events[r.events.length-1];return a=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,u=g,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(g)}function h(g){return g===u?(s++,e.consume(g),h):s<3?n(g):(e.exit("codeFencedFenceSequence"),He(g)?Ke(e,f,"whitespace")(g):f(g))}function f(g){return g===null||De(g)?(e.exit("codeFencedFence"),r.interrupt?t(g):e.check(Lf,x,P)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||De(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(g)):He(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,m,"whitespace")(g)):g===96&&g===u?n(g):(e.consume(g),d)}function m(g){return g===null||De(g)?f(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(g))}function v(g){return g===null||De(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(g)):g===96&&g===u?n(g):(e.consume(g),v)}function x(g){return e.attempt(i,P,S)(g)}function S(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),y}function y(g){return a>0&&He(g)?Ke(e,k,"linePrefix",a+1)(g):k(g)}function k(g){return g===null||De(g)?e.check(Lf,x,P)(g):(e.enter("codeFlowValue"),_(g))}function _(g){return g===null||De(g)?(e.exit("codeFlowValue"),k(g)):(e.consume(g),_)}function P(g){return e.exit("codeFenced"),t(g)}function w(g,E,D){let F=0;return R;function R(ee){return g.enter("lineEnding"),g.consume(ee),g.exit("lineEnding"),B}function B(ee){return g.enter("codeFencedFence"),He(ee)?Ke(g,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):G(ee)}function G(ee){return ee===u?(g.enter("codeFencedFenceSequence"),U(ee)):D(ee)}function U(ee){return ee===u?(F++,g.consume(ee),U):F>=s?(g.exit("codeFencedFenceSequence"),He(ee)?Ke(g,re,"whitespace")(ee):re(ee)):D(ee)}function re(ee){return ee===null||De(ee)?(g.exit("codeFencedFence"),E(ee)):D(ee)}}}function P1(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ho={name:"codeIndented",tokenize:N1},R1={partial:!0,tokenize:O1};function N1(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ke(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?l(c):De(c)?e.attempt(R1,s,l)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||De(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function l(c){return e.exit("codeIndented"),t(c)}}function O1(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Ke(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):De(s)?i(s):n(s)}}const L1={name:"codeText",previous:V1,resolve:D1,tokenize:M1};function D1(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function V1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function M1(e,t,n){let r=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),r++,u):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(a=e.enter("codeTextSequence"),i=0,h(f)):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||De(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function h(f){return f===96?(e.consume(f),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}class F1{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ci(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ci(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ci(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ci(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ci(this.left,n.reverse())}}}function ci(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function vm(e){const t={};let n=-1,r,i,a,s,u,l,c;const h=new F1(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,j1(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return nn(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function j1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,l=[],c={};let h,f,d=-1,m=n,v=0,x=0;const S=[x];for(;m;){for(;e.get(++i)[1]!==m;);a.push(i),m._tokenizer||(h=r.sliceStream(m),m.next||h.push(null),f&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++d<u.length;)u[d][0]==="exit"&&u[d-1][0]==="enter"&&u[d][1].type===u[d-1][1].type&&u[d][1].start.line!==u[d][1].end.line&&(x=d+1,S.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):S.pop(),d=S.length;d--;){const y=u.slice(S[d],S[d+1]),k=a.pop();l.push([k,k+y.length-1]),e.splice(k,2,y)}for(l.reverse(),d=-1;++d<l.length;)c[v+l[d][0]]=v+l[d][1],v+=l[d][1]-l[d][0]-1;return c}const B1={resolve:$1,tokenize:U1},z1={partial:!0,tokenize:H1};function $1(e){return vm(e),e}function U1(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):De(u)?e.check(z1,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function H1(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ke(e,a,"linePrefix")}function a(s){if(s===null||De(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function xm(e,t,n,r,i,a,s,u,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return f;function f(y){return y===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(y),e.exit(a),d):y===null||y===32||y===41||ps(y)?n(y):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(y))}function d(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===62?(e.exit("chunkString"),e.exit(u),d(y)):y===null||y===60||De(y)?n(y):(e.consume(y),y===92?v:m)}function v(y){return y===60||y===62||y===92?(e.consume(y),m):m(y)}function x(y){return!h&&(y===null||y===41||Xe(y))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(y)):h<c&&y===40?(e.consume(y),h++,x):y===41?(e.consume(y),h--,x):y===null||y===32||y===40||ps(y)?n(y):(e.consume(y),y===92?S:x)}function S(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function ym(e,t,n,r,i,a){const s=this;let u=0,l;return c;function c(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(a),h}function h(m){return u>999||m===null||m===91||m===93&&!l||m===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(a),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):De(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||De(m)||u++>999?(e.exit("chunkString"),h(m)):(e.consume(m),l||(l=!He(m)),m===92?d:f)}function d(m){return m===91||m===92||m===93?(e.consume(m),u++,f):f(m)}}function bm(e,t,n,r,i,a){let s;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),s=d===40?41:d,l):n(d)}function l(d){return d===s?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(a),c(d))}function c(d){return d===s?(e.exit(a),l(s)):d===null?n(d):De(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ke(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(d))}function h(d){return d===s||d===null||De(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:h)}function f(d){return d===s||d===92?(e.consume(d),h):h(d)}}function gi(e,t){let n;return r;function r(i){return De(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):He(i)?Ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const W1={name:"definition",tokenize:K1},q1={partial:!0,tokenize:G1};function K1(e,t,n){const r=this;let i;return a;function a(m){return e.enter("definition"),s(m)}function s(m){return ym.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function u(m){return i=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):n(m)}function l(m){return Xe(m)?gi(e,c)(m):c(m)}function c(m){return xm(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(q1,f,f)(m)}function f(m){return He(m)?Ke(e,d,"whitespace")(m):d(m)}function d(m){return m===null||De(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function G1(e,t,n){return r;function r(u){return Xe(u)?gi(e,i)(u):n(u)}function i(u){return bm(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return He(u)?Ke(e,s,"whitespace")(u):s(u)}function s(u){return u===null||De(u)?t(u):n(u)}}const J1={name:"hardBreakEscape",tokenize:Y1};function Y1(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return De(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const X1={name:"headingAtx",resolve:Q1,tokenize:Z1};function Q1(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},nn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Z1(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||Xe(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||De(h)?(e.exit("atxHeading"),t(h)):He(h)?Ke(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function l(h){return h===35?(e.consume(h),l):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||Xe(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const ew=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Vf=["pre","script","style","textarea"],tw={concrete:!0,name:"htmlFlow",resolveTo:iw,tokenize:aw},nw={partial:!0,tokenize:ow},rw={partial:!0,tokenize:sw};function iw(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function aw(e,t,n){const r=this;let i,a,s,u,l;return c;function c(A){return h(A)}function h(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),f}function f(A){return A===33?(e.consume(A),d):A===47?(e.consume(A),a=!0,x):A===63?(e.consume(A),i=3,r.interrupt?t:L):Ot(A)?(e.consume(A),s=String.fromCharCode(A),S):n(A)}function d(A){return A===45?(e.consume(A),i=2,m):A===91?(e.consume(A),i=5,u=0,v):Ot(A)?(e.consume(A),i=4,r.interrupt?t:L):n(A)}function m(A){return A===45?(e.consume(A),r.interrupt?t:L):n(A)}function v(A){const ye="CDATA[";return A===ye.charCodeAt(u++)?(e.consume(A),u===ye.length?r.interrupt?t:G:v):n(A)}function x(A){return Ot(A)?(e.consume(A),s=String.fromCharCode(A),S):n(A)}function S(A){if(A===null||A===47||A===62||Xe(A)){const ye=A===47,ie=s.toLowerCase();return!ye&&!a&&Vf.includes(ie)?(i=1,r.interrupt?t(A):G(A)):ew.includes(s.toLowerCase())?(i=6,ye?(e.consume(A),y):r.interrupt?t(A):G(A)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):a?k(A):_(A))}return A===45||Jt(A)?(e.consume(A),s+=String.fromCharCode(A),S):n(A)}function y(A){return A===62?(e.consume(A),r.interrupt?t:G):n(A)}function k(A){return He(A)?(e.consume(A),k):R(A)}function _(A){return A===47?(e.consume(A),R):A===58||A===95||Ot(A)?(e.consume(A),P):He(A)?(e.consume(A),_):R(A)}function P(A){return A===45||A===46||A===58||A===95||Jt(A)?(e.consume(A),P):w(A)}function w(A){return A===61?(e.consume(A),g):He(A)?(e.consume(A),w):_(A)}function g(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),l=A,E):He(A)?(e.consume(A),g):D(A)}function E(A){return A===l?(e.consume(A),l=null,F):A===null||De(A)?n(A):(e.consume(A),E)}function D(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Xe(A)?w(A):(e.consume(A),D)}function F(A){return A===47||A===62||He(A)?_(A):n(A)}function R(A){return A===62?(e.consume(A),B):n(A)}function B(A){return A===null||De(A)?G(A):He(A)?(e.consume(A),B):n(A)}function G(A){return A===45&&i===2?(e.consume(A),se):A===60&&i===1?(e.consume(A),he):A===62&&i===4?(e.consume(A),J):A===63&&i===3?(e.consume(A),L):A===93&&i===5?(e.consume(A),be):De(A)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(nw,ue,U)(A)):A===null||De(A)?(e.exit("htmlFlowData"),U(A)):(e.consume(A),G)}function U(A){return e.check(rw,re,ue)(A)}function re(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),ee}function ee(A){return A===null||De(A)?U(A):(e.enter("htmlFlowData"),G(A))}function se(A){return A===45?(e.consume(A),L):G(A)}function he(A){return A===47?(e.consume(A),s="",ge):G(A)}function ge(A){if(A===62){const ye=s.toLowerCase();return Vf.includes(ye)?(e.consume(A),J):G(A)}return Ot(A)&&s.length<8?(e.consume(A),s+=String.fromCharCode(A),ge):G(A)}function be(A){return A===93?(e.consume(A),L):G(A)}function L(A){return A===62?(e.consume(A),J):A===45&&i===2?(e.consume(A),L):G(A)}function J(A){return A===null||De(A)?(e.exit("htmlFlowData"),ue(A)):(e.consume(A),J)}function ue(A){return e.exit("htmlFlow"),t(A)}}function sw(e,t,n){const r=this;return i;function i(s){return De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function ow(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ti,t,n)}}const uw={name:"htmlText",tokenize:lw};function lw(e,t,n){const r=this;let i,a,s;return u;function u(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),c):L===47?(e.consume(L),w):L===63?(e.consume(L),_):Ot(L)?(e.consume(L),D):n(L)}function c(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),a=0,v):Ot(L)?(e.consume(L),k):n(L)}function h(L){return L===45?(e.consume(L),m):n(L)}function f(L){return L===null?n(L):L===45?(e.consume(L),d):De(L)?(s=f,he(L)):(e.consume(L),f)}function d(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?se(L):L===45?d(L):f(L)}function v(L){const J="CDATA[";return L===J.charCodeAt(a++)?(e.consume(L),a===J.length?x:v):n(L)}function x(L){return L===null?n(L):L===93?(e.consume(L),S):De(L)?(s=x,he(L)):(e.consume(L),x)}function S(L){return L===93?(e.consume(L),y):x(L)}function y(L){return L===62?se(L):L===93?(e.consume(L),y):x(L)}function k(L){return L===null||L===62?se(L):De(L)?(s=k,he(L)):(e.consume(L),k)}function _(L){return L===null?n(L):L===63?(e.consume(L),P):De(L)?(s=_,he(L)):(e.consume(L),_)}function P(L){return L===62?se(L):_(L)}function w(L){return Ot(L)?(e.consume(L),g):n(L)}function g(L){return L===45||Jt(L)?(e.consume(L),g):E(L)}function E(L){return De(L)?(s=E,he(L)):He(L)?(e.consume(L),E):se(L)}function D(L){return L===45||Jt(L)?(e.consume(L),D):L===47||L===62||Xe(L)?F(L):n(L)}function F(L){return L===47?(e.consume(L),se):L===58||L===95||Ot(L)?(e.consume(L),R):De(L)?(s=F,he(L)):He(L)?(e.consume(L),F):se(L)}function R(L){return L===45||L===46||L===58||L===95||Jt(L)?(e.consume(L),R):B(L)}function B(L){return L===61?(e.consume(L),G):De(L)?(s=B,he(L)):He(L)?(e.consume(L),B):F(L)}function G(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,U):De(L)?(s=G,he(L)):He(L)?(e.consume(L),G):(e.consume(L),re)}function U(L){return L===i?(e.consume(L),i=void 0,ee):L===null?n(L):De(L)?(s=U,he(L)):(e.consume(L),U)}function re(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Xe(L)?F(L):(e.consume(L),re)}function ee(L){return L===47||L===62||Xe(L)?F(L):n(L)}function se(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function he(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ge}function ge(L){return He(L)?Ke(e,be,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):be(L)}function be(L){return e.enter("htmlTextData"),s(L)}}const Fl={name:"labelEnd",resolveAll:pw,resolveTo:dw,tokenize:mw},cw={tokenize:gw},fw={tokenize:vw},hw={tokenize:xw};function pw(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&nn(e,0,e.length,n),e}function dw(e,t){let n=e.length,r=0,i,a,s,u;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",l,t],["enter",c,t]],u=cn(u,e.slice(a+1,a+r+3)),u=cn(u,[["enter",h,t]]),u=cn(u,qs(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=cn(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=cn(u,e.slice(s+1)),u=cn(u,[["exit",l,t]]),nn(e,a,e.length,u),e}function mw(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return u;function u(d){return a?a._inactive?f(d):(s=r.parser.defined.includes(yn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):n(d)}function l(d){return d===40?e.attempt(cw,h,s?h:f)(d):d===91?e.attempt(fw,h,s?c:f)(d):s?h(d):f(d)}function c(d){return e.attempt(hw,h,f)(d)}function h(d){return t(d)}function f(d){return a._balanced=!0,n(d)}}function gw(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Xe(f)?gi(e,a)(f):a(f)}function a(f){return f===41?h(f):xm(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Xe(f)?gi(e,l)(f):h(f)}function u(f){return n(f)}function l(f){return f===34||f===39||f===40?bm(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):h(f)}function c(f){return Xe(f)?gi(e,h)(f):h(f)}function h(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function vw(e,t,n){const r=this;return i;function i(u){return ym.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function xw(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const yw={name:"labelStartImage",resolveAll:Fl.resolveAll,tokenize:bw};function bw(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const ww={name:"labelStartLink",resolveAll:Fl.resolveAll,tokenize:Sw};function Sw(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Wo={name:"lineEnding",tokenize:Cw};function Cw(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ke(e,t,"linePrefix")}}const Xa={name:"thematicBreak",tokenize:kw};function kw(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||De(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),He(c)?Ke(e,u,"whitespace")(c):u(c))}}const Wt={continuation:{tokenize:Tw},exit:Pw,name:"list",tokenize:Iw},Ew={partial:!0,tokenize:Rw},_w={partial:!0,tokenize:Aw};function Iw(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return u;function u(m){const v=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Hu(m)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Xa,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return n(m)}function l(m){return Hu(m)&&++s<10?(e.consume(m),l):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(ti,r.interrupt?n:h,e.attempt(Ew,d,f))}function h(m){return r.containerState.initialBlankLine=!0,a++,d(m)}function f(m){return He(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),d):n(m)}function d(m){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function Tw(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ti,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!He(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(_w,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(e,e.attempt(Wt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Aw(e,t,n){const r=this;return Ke(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function Pw(e){e.exit(this.containerState.type)}function Rw(e,t,n){const r=this;return Ke(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!He(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Mf={name:"setextUnderline",resolveTo:Nw,tokenize:Ow};function Nw(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Ow(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),He(c)?Ke(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||De(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Lw={tokenize:Mw,partial:!0},Ff="https://github.com/micromark/micromark-extension-mdxjs-esm",Dw=new Set(["ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ImportDeclaration"]);function Vw(e){const t={tokenize:i,concrete:!0};if(!e||!e.acorn||!e.acorn.parse)throw new Error("Expected an `acorn` instance passed in as `options.acorn`");const n=e.acorn,r=Object.assign({ecmaVersion:2024,sourceType:"module"},e.acornOptions,{locations:!0});return{flow:{101:t,105:t}};function i(a,s,u){const l=this,c=l.parser.definedModuleSpecifiers||(l.parser.definedModuleSpecifiers=[]),h=this.events.length+1;let f="";return l.interrupt?u:d;function d(k){return l.now().column>1?u(k):(a.enter("mdxjsEsm"),a.enter("mdxjsEsmData"),a.consume(k),f+=String.fromCharCode(k),m)}function m(k){return Ot(k)?(a.consume(k),f+=String.fromCharCode(k),m):(f==="import"||f==="export")&&k===32?(a.consume(k),v):u(k)}function v(k){return k===null||De(k)?(a.exit("mdxjsEsmData"),x(k)):(a.consume(k),v)}function x(k){return k===null?y(k):De(k)?a.check(Lw,y,S)(k):(a.enter("mdxjsEsmData"),v(k))}function S(k){return a.enter("lineEnding"),a.consume(k),a.exit("lineEnding"),x}function y(k){const _=hm(l.events.slice(h),{acorn:n,acornOptions:r,tokenTypes:["mdxjsEsmData"],prefix:c.length>0?"var "+c.join(",")+`
33
+ `:""});if(_.error){if(k!==null&&_.swallow)return S(k);const w=new nt("Could not parse import/exports with acorn",{cause:_.error,place:{line:_.error.loc.line,column:_.error.loc.column+1,offset:_.error.pos},ruleId:"acorn",source:"micromark-extension-mdxjs-esm"});throw w.url=Ff+"#could-not-parse-importexports-with-acorn",w}c.length>0&&_.estree.body.shift();let P=-1;for(;++P<_.estree.body.length;){const w=_.estree.body[P];if(!Dw.has(w.type)){const g=new nt("Unexpected `"+w.type+"` in code: only import/exports are supported",{place:Ya(w),ruleId:"non-esm",source:"micromark-extension-mdxjs-esm"});throw g.url=Ff+"#unexpected-type-in-code-only-importexports-are-supported",g}if(w.type==="ImportDeclaration"&&!l.interrupt){let g=-1;for(;++g<w.specifiers.length;){const E=w.specifiers[g];c.push(E.local.name)}}}return Object.assign(a.exit("mdxjsEsm"),e.addResult?{estree:_.estree}:void 0),s(k)}}}function Mw(e,t,n){return r;function r(i){return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(ti,t,n)}}const jf={}.hasOwnProperty;function jl(e){const t={};let n=-1;for(;++n<e.length;)Fw(t,e[n]);return t}function Fw(e,t){let n;for(n in t){const i=(jf.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){jf.call(i,s)||(i[s]=[]);const u=a[s];jw(i[s],Array.isArray(u)?u:u?[u]:[])}}}function jw(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);nn(e,0,0,r)}function Bw(e){const t=Object.assign({acorn:kt.extend(qb()),acornOptions:{ecmaVersion:2024,sourceType:"module"},addResult:!0},e);return jl([Vw(t),l1(t),v1(t),x1()])}const zw={};function $w(e){const t=this,n=e||zw,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Bw(n)),a.push(eb()),s.push(tb(n))}const Uw={};function Hw(e,t){const n=Uw,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wm(e,r,i)}function wm(e,t,n){if(Ww(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Bf(e.children,t,n)}return Array.isArray(e)?Bf(e,t,n):""}function Bf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=wm(e[i],t,n);return r.join("")}function Ww(e){return!!(e&&typeof e=="object")}function Sm(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const qw={tokenize:Kw};function Kw(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ke(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return De(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const Gw={tokenize:Jw},zf={tokenize:Yw};function Jw(e){const t=this,n=[];let r=0,i,a,s;return u;function u(_){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,l,c)(_)}return c(_)}function l(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const P=t.events.length;let w=P,g;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){g=t.events[w][1].end;break}y(r);let E=P;for(;E<t.events.length;)t.events[E][1].end={...g},E++;return nn(t.events,w+1,0,t.events.slice(P)),t.events.length=E,c(_)}return u(_)}function c(_){if(r===n.length){if(!i)return d(_);if(i.currentConstruct&&i.currentConstruct.concrete)return v(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zf,h,f)(_)}function h(_){return i&&k(),y(r),d(_)}function f(_){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,v(_)}function d(_){return t.containerState={},e.attempt(zf,m,v)(_)}function m(_){return r++,n.push([t.currentConstruct,t.containerState]),d(_)}function v(_){if(_===null){i&&k(),y(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),x(_)}function x(_){if(_===null){S(e.exit("chunkFlow"),!0),y(0),e.consume(_);return}return De(_)?(e.consume(_),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(_),x)}function S(_,P){const w=t.sliceStream(_);if(P&&w.push(null),_.previous=a,a&&(a.next=_),a=_,i.defineSkip(_.start),i.write(w),t.parser.lazy[_.start.line]){let g=i.events.length;for(;g--;)if(i.events[g][1].start.offset<s&&(!i.events[g][1].end||i.events[g][1].end.offset>s))return;const E=t.events.length;let D=E,F,R;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(F){R=t.events[D][1].end;break}F=!0}for(y(r),g=E;g<t.events.length;)t.events[g][1].end={...R},g++;nn(t.events,D+1,0,t.events.slice(E)),t.events.length=g}}function y(_){let P=n.length;for(;P-- >_;){const w=n[P];t.containerState=w[1],w[0].exit.call(t,e)}n.length=_}function k(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Yw(e,t,n){return Ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const Xw={tokenize:Qw};function Qw(e){const t=this,n=e.attempt(ti,r,e.attempt(this.parser.constructs.flowInitial,i,Ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(B1,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Zw={resolveAll:km()},eS=Cm("string"),tS=Cm("text");function Cm(e){return{resolveAll:km(e==="text"?nS:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),l}function l(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),l)}function c(h){if(h===null)return!0;const f=i[h];let d=-1;if(f)for(;++d<f.length;){const m=f[d];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function km(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function nS(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,u=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)l=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||l||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const rS={42:Wt,43:Wt,45:Wt,48:Wt,49:Wt,50:Wt,51:Wt,52:Wt,53:Wt,54:Wt,55:Wt,56:Wt,57:Wt,62:dm},iS={91:W1},aS={[-2]:Ho,[-1]:Ho,32:Ho},sS={35:X1,42:Xa,45:[Mf,Xa],60:tw,61:Mf,95:Xa,96:Df,126:Df},oS={38:gm,92:mm},uS={[-5]:Wo,[-4]:Wo,[-3]:Wo,33:yw,38:gm,42:Wu,60:[w1,uw],91:ww,92:[J1,mm],93:Fl,95:Wu,96:L1},lS={null:[Wu,Zw]},cS={null:[42,95]},fS={null:[]},hS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:cS,contentInitial:iS,disable:fS,document:rS,flow:sS,flowInitial:aS,insideSpan:lS,string:oS,text:uS},Symbol.toStringTag,{value:"Module"}));function pS(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],u=[];const l={attempt:E(w),check:E(g),consume:k,enter:_,exit:P,interrupt:E(g,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:v,parser:e,previous:null,sliceSerialize:d,sliceStream:m,write:f};let h=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function f(B){return s=cn(s,B),S(),s[s.length-1]!==null?[]:(D(t,0),c.events=qs(a,c.events,c),c.events)}function d(B,G){return mS(m(B),G)}function m(B){return dS(s,B)}function v(){const{_bufferIndex:B,_index:G,line:U,column:re,offset:ee}=r;return{_bufferIndex:B,_index:G,line:U,column:re,offset:ee}}function x(B){i[B.line]=B.column,R()}function S(){let B;for(;r._index<s.length;){const G=s[r._index];if(typeof G=="string")for(B=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===B&&r._bufferIndex<G.length;)y(G.charCodeAt(r._bufferIndex));else y(G)}}function y(B){h=h(B)}function k(B){De(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,R()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=B}function _(B,G){const U=G||{};return U.type=B,U.start=v(),c.events.push(["enter",U,c]),u.push(U),U}function P(B){const G=u.pop();return G.end=v(),c.events.push(["exit",G,c]),G}function w(B,G){D(B,G.from)}function g(B,G){G.restore()}function E(B,G){return U;function U(re,ee,se){let he,ge,be,L;return Array.isArray(re)?ue(re):"tokenize"in re?ue([re]):J(re);function J(fe){return X;function X(H){const te=H!==null&&fe[H],me=H!==null&&fe.null,oe=[...Array.isArray(te)?te:te?[te]:[],...Array.isArray(me)?me:me?[me]:[]];return ue(oe)(H)}}function ue(fe){return he=fe,ge=0,fe.length===0?se:A(fe[ge])}function A(fe){return X;function X(H){return L=F(),be=fe,fe.partial||(c.currentConstruct=fe),fe.name&&c.parser.constructs.disable.null.includes(fe.name)?ie():fe.tokenize.call(G?Object.assign(Object.create(c),G):c,l,ye,ie)(H)}}function ye(fe){return B(be,L),ee}function ie(fe){return L.restore(),++ge<he.length?A(he[ge]):se}}}function D(B,G){B.resolveAll&&!a.includes(B)&&a.push(B),B.resolve&&nn(c.events,G,c.events.length-G,B.resolve(c.events.slice(G),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function F(){const B=v(),G=c.previous,U=c.currentConstruct,re=c.events.length,ee=Array.from(u);return{from:re,restore:se};function se(){r=B,c.previous=G,c.currentConstruct=U,c.events.length=re,u=ee,R()}}function R(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function dS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function mS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
34
34
  `;break}case-3:{s=`\r
35
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function dS(e){const r={constructs:Ml([cS,...(e||{}).extensions||[]]),content:i(Hw),defined:[],document:i(qw),flow:i(Jw),lazy:{},string:i(Qw),text:i(Zw)};return r;function i(a){return s;function s(u){return fS(r,a,u)}}}function mS(e){for(;!mm(e););return e}const Bf=/[\0\t\n\r]/g;function gS(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const l=[];let c,h,f,d,m;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Bf.lastIndex=f,c=Bf.exec(a),d=c&&c.index!==void 0?c.index:a.length,m=a.charCodeAt(d),!c){t=a.slice(f);break}if(m===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(a.slice(f,d)),e+=d-f),m){case 0:{l.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,l.push(-2);e++<h;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return u&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const vS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cm(e){return e.replace(vS,xS)}function xS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return ym(n.slice(a?2:1),a?16:10)}return _i(n)||e}const km={}.hasOwnProperty;function bS(e,t,n){return typeof t!="string"&&(n=t,t=void 0),yS(n)(mS(dS(n).document().write(gS()(e,t,!0))))}function yS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_e),autolinkProtocol:j,autolinkEmail:j,atxHeading:a(W),blockQuote:a(me),characterEscape:j,characterReference:j,codeFenced:a(oe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(oe,s),codeText:a(K,s),codeTextData:j,data:j,codeFlowValue:j,definition:a(Z),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Q),hardBreakEscape:a(ae),hardBreakTrailing:a(ae),htmlFlow:a(ve,s),htmlFlowData:j,htmlText:a(ve,s),htmlTextData:j,image:a(Ee),label:s,link:a(_e),listItem:a(Me),listItemValue:d,listOrdered:a(Ie,f),listUnordered:a(Ie),paragraph:a(ke),reference:A,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(W),strong:a(Ne),thematicBreak:a(bt)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:te,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:fe,characterReference:X,codeFenced:l(S),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:v,codeFlowValue:N,codeIndented:l(b),codeText:l(ee),codeTextData:N,data:N,definition:l(),definitionDestinationString:P,definitionLabelString:k,definitionTitleString:_,emphasis:l(),hardBreakEscape:l(G),hardBreakTrailing:l(G),htmlFlow:l(U),htmlFlowData:N,htmlText:l(re),htmlTextData:N,image:l(he),label:ye,labelText:ge,lineEnding:B,link:l(se),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:xe,resourceDestinationString:L,resourceTitleString:J,resource:ue,setextHeading:l(D),setextHeadingLineSequence:E,setextHeadingText:g,strong:l(),thematicBreak:l()}};Em(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(le){let ce={type:"root",children:[]};const R={stack:[ce],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},Ve=[];let Ye=-1;for(;++Ye<le.length;)if(le[Ye][1].type==="listOrdered"||le[Ye][1].type==="listUnordered")if(le[Ye][0]==="enter")Ve.push(Ye);else{const yt=Ve.pop();Ye=i(le,yt,Ye)}for(Ye=-1;++Ye<le.length;){const yt=t[le[Ye][0]];km.call(yt,le[Ye][1].type)&&yt[le[Ye][1].type].call(Object.assign({sliceSerialize:le[Ye][2].sliceSerialize},R),le[Ye][1])}if(R.tokenStack.length>0){const yt=R.tokenStack[R.tokenStack.length-1];(yt[1]||zf).call(R,void 0,yt[0])}for(ce.position={start:qn(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:qn(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<t.transforms.length;)ce=t.transforms[Ye](ce)||ce;return ce}function i(le,ce,R){let Ve=ce-1,Ye=-1,yt=!1,Te,Lt,Rn,Dt;for(;++Ve<=R;){const mt=le[Ve];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?Ye++:Ye--,Dt=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(Te&&!Dt&&!Ye&&!Rn&&(Rn=Ve),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Ye&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||Ye===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(Te){let an=Ve;for(Lt=void 0;an--;){const Vt=le[an];if(Vt[1].type==="lineEnding"||Vt[1].type==="lineEndingBlank"){if(Vt[0]==="exit")continue;Lt&&(le[Lt][1].type="lineEndingBlank",yt=!0),Vt[1].type="lineEnding",Lt=an}else if(!(Vt[1].type==="linePrefix"||Vt[1].type==="blockQuotePrefix"||Vt[1].type==="blockQuotePrefixWhitespace"||Vt[1].type==="blockQuoteMarker"||Vt[1].type==="listItemIndent"))break}Rn&&(!Lt||Rn<Lt)&&(Te._spread=!0),Te.end=Object.assign({},Lt?le[Lt][1].start:mt[1].end),le.splice(Lt||Ve,0,["exit",Te,mt[2]]),Ve++,R++}if(mt[1].type==="listItemPrefix"){const an={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};Te=an,le.splice(Ve,0,["enter",an,mt[2]]),Ve++,R++,Rn=void 0,Dt=!0}}}return le[ce][1]._spread=yt,R}function a(le,ce){return R;function R(Ve){u.call(this,le(Ve),Ve),ce&&ce.call(this,Ve)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(le,ce,R){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([ce,R||void 0]),le.position={start:qn(ce.start),end:void 0}}function l(le){return ce;function ce(R){le&&le.call(this,R),c.call(this,R)}}function c(le,ce){const R=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==le.type&&(ce?ce.call(this,le,Ve[0]):(Ve[1]||zf).call(this,le,Ve[0]));else throw new Error("Cannot close `"+le.type+"` ("+Ln({start:le.start,end:le.end})+"): it’s not open");R.position.end=qn(le.end)}function h(){return $w(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(le){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function m(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=le}function v(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=le}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le.replace(/(\r?\n|\r)$/g,"")}function k(le){const ce=this.resume(),R=this.stack[this.stack.length-1];R.label=ce,R.identifier=bn(this.sliceSerialize(le)).toLowerCase()}function _(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.title=le}function P(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.url=le}function w(le){const ce=this.stack[this.stack.length-1];if(!ce.depth){const R=this.sliceSerialize(le).length;ce.depth=R}}function g(){this.data.setextHeadingSlurpLineEnding=!0}function E(le){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function j(le){const R=this.stack[this.stack.length-1].children;let Ve=R[R.length-1];(!Ve||Ve.type!=="text")&&(Ve=Fe(),Ve.position={start:qn(le.start),end:void 0},R.push(Ve)),this.stack.push(Ve)}function N(le){const ce=this.stack.pop();ce.value+=this.sliceSerialize(le),ce.position.end=qn(le.end)}function B(le){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const R=ce.children[ce.children.length-1];R.position.end=qn(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(j.call(this,le),N.call(this,le))}function G(){this.data.atHardBreak=!0}function U(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le}function re(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le}function ee(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le}function se(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ce,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function he(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ce,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function ge(le){const ce=this.sliceSerialize(le),R=this.stack[this.stack.length-2];R.label=Cm(ce),R.identifier=bn(ce).toLowerCase()}function ye(){const le=this.stack[this.stack.length-1],ce=this.resume(),R=this.stack[this.stack.length-1];if(this.data.inReference=!0,R.type==="link"){const Ve=le.children;R.children=Ve}else R.alt=ce}function L(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.url=le}function J(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.title=le}function ue(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function xe(le){const ce=this.resume(),R=this.stack[this.stack.length-1];R.label=ce,R.identifier=bn(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function ie(le){this.data.characterReferenceType=le.type}function fe(le){const ce=this.sliceSerialize(le),R=this.data.characterReferenceType;let Ve;R?(Ve=ym(ce,R==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=_i(ce);const Ye=this.stack[this.stack.length-1];Ye.value+=Ve}function X(le){const ce=this.stack.pop();ce.position.end=qn(le.end)}function H(le){N.call(this,le);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(le)}function te(le){N.call(this,le);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(le)}function me(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Q(){return{type:"emphasis",children:[]}}function W(){return{type:"heading",depth:0,children:[]}}function ae(){return{type:"break"}}function ve(){return{type:"html",value:""}}function Ee(){return{type:"image",title:null,url:"",alt:null}}function _e(){return{type:"link",title:null,url:"",children:[]}}function Ie(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function Me(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function ke(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function bt(){return{type:"thematicBreak"}}}function qn(e){return{line:e.line,column:e.column,offset:e.offset}}function Em(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Em(e,r):wS(e,r)}}function wS(e,t){let n;for(n in t)if(km.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function zf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ln({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+") is still open")}function SS(e){const t=this;t.parser=n;function n(r){return bS(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const $f={}.hasOwnProperty;function CS(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&$f.call(i,e)){const l=String(i[e]);s=$f.call(u,l)?u[l]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const kS={}.hasOwnProperty;function _m(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)_m(e,t.extensions[n]);for(r in t)if(kS.call(t,r))switch(r){case"extensions":break;case"unsafe":{Uf(e[r],t[r]);break}case"join":{Uf(e[r],t[r]);break}case"handlers":{ES(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function Uf(e,t){t&&e.push(...t)}function ES(e,t){t&&Object.assign(e,t)}function _S(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),IS);return i(),s}function IS(e,t,n){return">"+(n?"":" ")+e}function Im(e,t){return Hf(e,t.inConstruct,!0)&&!Hf(e,t.notInConstruct,!1)}function Hf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Wf(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
36
- `&&Im(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
37
- `}function TS(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function Hu(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function AS(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function PS(e,t,n,r){const i=AS(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Hu(e,n)){const f=n.enter("codeIndented"),d=n.indentLines(a,RS);return f(),d}const u=n.createTracker(r),l=i.repeat(Math.max(TS(a,i)+1,3)),c=n.enter("codeFenced");let h=u.move(l);if(e.lang){const f=n.enter(`codeFencedLang${s}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
35
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function gS(e){const r={constructs:jl([hS,...(e||{}).extensions||[]]),content:i(qw),defined:[],document:i(Gw),flow:i(Xw),lazy:{},string:i(eS),text:i(tS)};return r;function i(a){return s;function s(u){return pS(r,a,u)}}}function vS(e){for(;!vm(e););return e}const $f=/[\0\t\n\r]/g;function xS(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const l=[];let c,h,f,d,m;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if($f.lastIndex=f,c=$f.exec(a),d=c&&c.index!==void 0?c.index:a.length,m=a.charCodeAt(d),!c){t=a.slice(f);break}if(m===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(a.slice(f,d)),e+=d-f),m){case 0:{l.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,l.push(-2);e++<h;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return u&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const yS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Em(e){return e.replace(yS,bS)}function bS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Sm(n.slice(a?2:1),a?16:10)}return _i(n)||e}const _m={}.hasOwnProperty;function wS(e,t,n){return typeof t!="string"&&(n=t,t=void 0),SS(n)(vS(gS(n).document().write(xS()(e,t,!0))))}function SS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_e),autolinkProtocol:F,autolinkEmail:F,atxHeading:a(W),blockQuote:a(me),characterEscape:F,characterReference:F,codeFenced:a(oe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(oe,s),codeText:a(K,s),codeTextData:F,data:F,codeFlowValue:F,definition:a(Z),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Q),hardBreakEscape:a(ae),hardBreakTrailing:a(ae),htmlFlow:a(ve,s),htmlFlowData:F,htmlText:a(ve,s),htmlTextData:F,image:a(Ee),label:s,link:a(_e),listItem:a(Me),listItemValue:d,listOrdered:a(Ie,f),listUnordered:a(Ie),paragraph:a(ke),reference:A,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(W),strong:a(Ne),thematicBreak:a(yt)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:te,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:fe,characterReference:X,codeFenced:l(S),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:v,codeFlowValue:R,codeIndented:l(y),codeText:l(ee),codeTextData:R,data:R,definition:l(),definitionDestinationString:P,definitionLabelString:k,definitionTitleString:_,emphasis:l(),hardBreakEscape:l(G),hardBreakTrailing:l(G),htmlFlow:l(U),htmlFlowData:R,htmlText:l(re),htmlTextData:R,image:l(he),label:be,labelText:ge,lineEnding:B,link:l(se),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ye,resourceDestinationString:L,resourceTitleString:J,resource:ue,setextHeading:l(D),setextHeadingLineSequence:E,setextHeadingText:g,strong:l(),thematicBreak:l()}};Im(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(le){let ce={type:"root",children:[]};const N={stack:[ce],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},Ve=[];let Ye=-1;for(;++Ye<le.length;)if(le[Ye][1].type==="listOrdered"||le[Ye][1].type==="listUnordered")if(le[Ye][0]==="enter")Ve.push(Ye);else{const bt=Ve.pop();Ye=i(le,bt,Ye)}for(Ye=-1;++Ye<le.length;){const bt=t[le[Ye][0]];_m.call(bt,le[Ye][1].type)&&bt[le[Ye][1].type].call(Object.assign({sliceSerialize:le[Ye][2].sliceSerialize},N),le[Ye][1])}if(N.tokenStack.length>0){const bt=N.tokenStack[N.tokenStack.length-1];(bt[1]||Uf).call(N,void 0,bt[0])}for(ce.position={start:qn(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:qn(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<t.transforms.length;)ce=t.transforms[Ye](ce)||ce;return ce}function i(le,ce,N){let Ve=ce-1,Ye=-1,bt=!1,Te,Lt,Rn,Dt;for(;++Ve<=N;){const mt=le[Ve];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?Ye++:Ye--,Dt=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(Te&&!Dt&&!Ye&&!Rn&&(Rn=Ve),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Ye&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||Ye===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(Te){let an=Ve;for(Lt=void 0;an--;){const Vt=le[an];if(Vt[1].type==="lineEnding"||Vt[1].type==="lineEndingBlank"){if(Vt[0]==="exit")continue;Lt&&(le[Lt][1].type="lineEndingBlank",bt=!0),Vt[1].type="lineEnding",Lt=an}else if(!(Vt[1].type==="linePrefix"||Vt[1].type==="blockQuotePrefix"||Vt[1].type==="blockQuotePrefixWhitespace"||Vt[1].type==="blockQuoteMarker"||Vt[1].type==="listItemIndent"))break}Rn&&(!Lt||Rn<Lt)&&(Te._spread=!0),Te.end=Object.assign({},Lt?le[Lt][1].start:mt[1].end),le.splice(Lt||Ve,0,["exit",Te,mt[2]]),Ve++,N++}if(mt[1].type==="listItemPrefix"){const an={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};Te=an,le.splice(Ve,0,["enter",an,mt[2]]),Ve++,N++,Rn=void 0,Dt=!0}}}return le[ce][1]._spread=bt,N}function a(le,ce){return N;function N(Ve){u.call(this,le(Ve),Ve),ce&&ce.call(this,Ve)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(le,ce,N){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([ce,N||void 0]),le.position={start:qn(ce.start),end:void 0}}function l(le){return ce;function ce(N){le&&le.call(this,N),c.call(this,N)}}function c(le,ce){const N=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==le.type&&(ce?ce.call(this,le,Ve[0]):(Ve[1]||Uf).call(this,le,Ve[0]));else throw new Error("Cannot close `"+le.type+"` ("+Ln({start:le.start,end:le.end})+"): it’s not open");N.position.end=qn(le.end)}function h(){return Hw(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(le){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function m(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=le}function v(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=le}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le.replace(/(\r?\n|\r)$/g,"")}function k(le){const ce=this.resume(),N=this.stack[this.stack.length-1];N.label=ce,N.identifier=yn(this.sliceSerialize(le)).toLowerCase()}function _(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.title=le}function P(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.url=le}function w(le){const ce=this.stack[this.stack.length-1];if(!ce.depth){const N=this.sliceSerialize(le).length;ce.depth=N}}function g(){this.data.setextHeadingSlurpLineEnding=!0}function E(le){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function F(le){const N=this.stack[this.stack.length-1].children;let Ve=N[N.length-1];(!Ve||Ve.type!=="text")&&(Ve=Fe(),Ve.position={start:qn(le.start),end:void 0},N.push(Ve)),this.stack.push(Ve)}function R(le){const ce=this.stack.pop();ce.value+=this.sliceSerialize(le),ce.position.end=qn(le.end)}function B(le){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const N=ce.children[ce.children.length-1];N.position.end=qn(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(F.call(this,le),R.call(this,le))}function G(){this.data.atHardBreak=!0}function U(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le}function re(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le}function ee(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.value=le}function se(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ce,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function he(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ce,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function ge(le){const ce=this.sliceSerialize(le),N=this.stack[this.stack.length-2];N.label=Em(ce),N.identifier=yn(ce).toLowerCase()}function be(){const le=this.stack[this.stack.length-1],ce=this.resume(),N=this.stack[this.stack.length-1];if(this.data.inReference=!0,N.type==="link"){const Ve=le.children;N.children=Ve}else N.alt=ce}function L(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.url=le}function J(){const le=this.resume(),ce=this.stack[this.stack.length-1];ce.title=le}function ue(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ye(le){const ce=this.resume(),N=this.stack[this.stack.length-1];N.label=ce,N.identifier=yn(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function ie(le){this.data.characterReferenceType=le.type}function fe(le){const ce=this.sliceSerialize(le),N=this.data.characterReferenceType;let Ve;N?(Ve=Sm(ce,N==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=_i(ce);const Ye=this.stack[this.stack.length-1];Ye.value+=Ve}function X(le){const ce=this.stack.pop();ce.position.end=qn(le.end)}function H(le){R.call(this,le);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(le)}function te(le){R.call(this,le);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(le)}function me(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Q(){return{type:"emphasis",children:[]}}function W(){return{type:"heading",depth:0,children:[]}}function ae(){return{type:"break"}}function ve(){return{type:"html",value:""}}function Ee(){return{type:"image",title:null,url:"",alt:null}}function _e(){return{type:"link",title:null,url:"",children:[]}}function Ie(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function Me(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function ke(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function yt(){return{type:"thematicBreak"}}}function qn(e){return{line:e.line,column:e.column,offset:e.offset}}function Im(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Im(e,r):CS(e,r)}}function CS(e,t){let n;for(n in t)if(_m.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Uf(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ln({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+") is still open")}function kS(e){const t=this;t.parser=n;function n(r){return wS(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const Hf={}.hasOwnProperty;function ES(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Hf.call(i,e)){const l=String(i[e]);s=Hf.call(u,l)?u[l]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const _S={}.hasOwnProperty;function Tm(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Tm(e,t.extensions[n]);for(r in t)if(_S.call(t,r))switch(r){case"extensions":break;case"unsafe":{Wf(e[r],t[r]);break}case"join":{Wf(e[r],t[r]);break}case"handlers":{IS(e[r],t[r]);break}default:e.options[r]=t[r]}return e}function Wf(e,t){t&&e.push(...t)}function IS(e,t){t&&Object.assign(e,t)}function TS(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),AS);return i(),s}function AS(e,t,n){return">"+(n?"":" ")+e}function Am(e,t){return qf(e,t.inConstruct,!0)&&!qf(e,t.notInConstruct,!1)}function qf(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Kf(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
36
+ `&&Am(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
37
+ `}function PS(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function qu(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function RS(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function NS(e,t,n,r){const i=RS(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(qu(e,n)){const f=n.enter("codeIndented"),d=n.indentLines(a,OS);return f(),d}const u=n.createTracker(r),l=i.repeat(Math.max(PS(a,i)+1,3)),c=n.enter("codeFenced");let h=u.move(l);if(e.lang){const f=n.enter(`codeFencedLang${s}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${s}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
38
38
  `,encode:["`"],...u.current()})),f()}return h+=u.move(`
39
39
  `),a&&(h+=u.move(a+`
40
- `)),h+=u.move(l),c(),h}function RS(e,t,n){return(n?"":" ")+e}function Fl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function NS(e,t,n,r){const i=Fl(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
41
- `,...l.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),s(),c}function OS(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Zn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ds(e,t,n){const r=Gr(e),i=Gr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Tm.peek=LS;function Tm(e,t,n,r){const i=OS(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let l=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=l.charCodeAt(0),h=ds(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(l=Zn(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=ds(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+Zn(f));const m=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:d.outside,before:h.outside},u+l+m}function LS(e,t,n){return n.options.emphasis||"*"}const qs=(function(e){if(e==null)return FS;if(typeof e=="function")return Ks(e);if(typeof e=="object")return Array.isArray(e)?DS(e):VS(e);if(typeof e=="string")return MS(e);throw new Error("Expected function, string, or object as test")});function DS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=qs(e[n]);return Ks(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function VS(e){const t=e;return Ks(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function MS(e){return Ks(t);function t(n){return n&&n.type===e}}function Ks(e){return t;function t(n,r,i){return!!(jS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function FS(){return!0}function jS(e){return e!==null&&typeof e=="object"&&"type"in e}const Am=[],BS=!0,Wu=!1,zS="skip";function Pm(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=qs(i),s=r?-1:1;u(e,void 0,[])();function u(l,c,h){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return d;function d(){let m=Am,v,x,S;if((!t||a(l,c,h[h.length-1]||void 0))&&(m=$S(n(l,h)),m[0]===Wu))return m;if("children"in l&&l.children){const b=l;if(b.children&&m[0]!==zS)for(x=(r?b.children.length:-1)+s,S=h.concat(b);x>-1&&x<b.children.length;){const k=b.children[x];if(v=u(k,x,S)(),v[0]===Wu)return v;x=typeof v[1]=="number"?v[1]:x+s}}return m}}}function $S(e){return Array.isArray(e)?e:typeof e=="number"?[BS,e]:e==null?Am:[e]}function US(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Pm(e,a,u,i);function u(l,c){const h=c[c.length-1],f=h?h.children.indexOf(l):void 0;return s(l,f,h)}}const HS={};function Rm(e,t){const n=HS,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Nm(e,r,i)}function Nm(e,t,n){if(WS(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qf(e.children,t,n)}return Array.isArray(e)?qf(e,t,n):""}function qf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nm(e[i],t,n);return r.join("")}function WS(e){return!!(e&&typeof e=="object")}function Om(e,t){let n=!1;return US(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Wu}),!!((!e.depth||e.depth<3)&&Rm(e)&&(t.options.setext||n))}function qS(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Om(e,n)){const h=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(e,{...a.current(),before:`
40
+ `)),h+=u.move(l),c(),h}function OS(e,t,n){return(n?"":" ")+e}function Bl(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function LS(e,t,n,r){const i=Bl(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
41
+ `,...l.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),s(),c}function DS(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Zn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ms(e,t,n){const r=Gr(e),i=Gr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Pm.peek=VS;function Pm(e,t,n,r){const i=DS(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let l=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=l.charCodeAt(0),h=ms(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(l=Zn(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=ms(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+Zn(f));const m=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:d.outside,before:h.outside},u+l+m}function VS(e,t,n){return n.options.emphasis||"*"}const Ks=(function(e){if(e==null)return BS;if(typeof e=="function")return Gs(e);if(typeof e=="object")return Array.isArray(e)?MS(e):FS(e);if(typeof e=="string")return jS(e);throw new Error("Expected function, string, or object as test")});function MS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ks(e[n]);return Gs(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function FS(e){const t=e;return Gs(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function jS(e){return Gs(t);function t(n){return n&&n.type===e}}function Gs(e){return t;function t(n,r,i){return!!(zS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function BS(){return!0}function zS(e){return e!==null&&typeof e=="object"&&"type"in e}const Rm=[],$S=!0,Ku=!1,US="skip";function Nm(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Ks(i),s=r?-1:1;u(e,void 0,[])();function u(l,c,h){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return d;function d(){let m=Rm,v,x,S;if((!t||a(l,c,h[h.length-1]||void 0))&&(m=HS(n(l,h)),m[0]===Ku))return m;if("children"in l&&l.children){const y=l;if(y.children&&m[0]!==US)for(x=(r?y.children.length:-1)+s,S=h.concat(y);x>-1&&x<y.children.length;){const k=y.children[x];if(v=u(k,x,S)(),v[0]===Ku)return v;x=typeof v[1]=="number"?v[1]:x+s}}return m}}}function HS(e){return Array.isArray(e)?e:typeof e=="number"?[$S,e]:e==null?Rm:[e]}function WS(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Nm(e,a,u,i);function u(l,c){const h=c[c.length-1],f=h?h.children.indexOf(l):void 0;return s(l,f,h)}}const qS={};function Om(e,t){const n=qS,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Lm(e,r,i)}function Lm(e,t,n){if(KS(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Gf(e.children,t,n)}return Array.isArray(e)?Gf(e,t,n):""}function Gf(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Lm(e[i],t,n);return r.join("")}function KS(e){return!!(e&&typeof e=="object")}function Dm(e,t){let n=!1;return WS(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ku}),!!((!e.depth||e.depth<3)&&Om(e)&&(t.options.setext||n))}function GS(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Dm(e,n)){const h=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(e,{...a.current(),before:`
42
42
  `,after:`
43
43
  `});return f(),h(),d+`
44
44
  `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
45
45
  `))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),l=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
46
- `,...a.current()});return/^[\t ]/.test(c)&&(c=Zn(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),u(),c}Lm.peek=KS;function Lm(e){return e.value||""}function KS(){return"<"}Dm.peek=GS;function Dm(e,t,n,r){const i=Fl(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),c+=l.move(")"),s(),c}function GS(){return"!"}Vm.peek=JS;function Vm(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");const c=n.safe(e.alt,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==f?l+=u.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function JS(){return"!"}Mm.peek=YS;function Mm(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let l;if(s.atBreak)for(;l=u.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function YS(){return"`"}function Fm(e,t){const n=Rm(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}jm.peek=XS;function jm(e,t,n,r){const i=Fl(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,l;if(Fm(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),u(),n.stack=h,f}u=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),u(),c}function XS(e,t,n){return Fm(e,n)?"<":"["}Bm.peek=QS;function Bm(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==f?l+=u.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function QS(){return"["}function jl(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ZS(e){const t=jl(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function eC(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function zm(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function tC(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?eC(n):jl(n);const u=e.ordered?s==="."?")":".":ZS(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),zm(n)===s&&h){let f=-1;for(;++f<e.children.length;){const d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function nC(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function rC(e,t,n,r){const i=nC(n);let a=n.bulletCurrent||jl(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return l(),c;function h(f,d,m){return d?(m?"":" ".repeat(s))+f:(m?a:a+" ".repeat(s-a.length))+f}}function iC(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const aC=qs(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function sC(e,t,n,r){return(e.children.some(function(s){return aC(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function oC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$m.peek=uC;function $m(e,t,n,r){const i=oC(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let l=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=l.charCodeAt(0),h=ds(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(l=Zn(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=ds(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+Zn(f));const m=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:d.outside,before:h.outside},u+l+m}function uC(e,t,n){return n.options.strong||"*"}function lC(e,t,n,r){return n.safe(e.value,r)}function cC(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function fC(e,t,n){const r=(zm(n)+(n.options.ruleSpaces?" ":"")).repeat(cC(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Bl={blockquote:_S,break:Wf,code:PS,definition:NS,emphasis:Tm,hardBreak:Wf,heading:qS,html:Lm,image:Dm,imageReference:Vm,inlineCode:Mm,link:jm,linkReference:Bm,list:tC,listItem:rC,paragraph:iC,root:sC,strong:$m,text:lC,thematicBreak:fC},hC=[pC];function pC(e,t,n,r){if(t.type==="code"&&Hu(t,r)&&(e.type==="list"||e.type===t.type&&Hu(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Om(t,r))?void 0:n.spread?1:0}const mr=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],dC=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
47
- `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:mr},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
48
- ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:mr},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
49
- *])`},{character:"*",inConstruct:"phrasing",notInConstruct:mr},{atBreak:!0,character:"+",after:`(?:[ \r
46
+ `,...a.current()});return/^[\t ]/.test(c)&&(c=Zn(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),u(),c}Vm.peek=JS;function Vm(e){return e.value||""}function JS(){return"<"}Mm.peek=YS;function Mm(e,t,n,r){const i=Bl(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(u=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),u()),c+=l.move(")"),s(),c}function YS(){return"!"}Fm.peek=XS;function Fm(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("![");const c=n.safe(e.alt,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==f?l+=u.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function XS(){return"!"}jm.peek=QS;function jm(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],u=n.compilePattern(s);let l;if(s.atBreak)for(;l=u.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function QS(){return"`"}function Bm(e,t){const n=Om(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}zm.peek=ZS;function zm(e,t,n,r){const i=Bl(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,l;if(Bm(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let f=s.move("<");return f+=s.move(n.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),u(),n.stack=h,f}u=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),u(),c}function ZS(e,t,n){return Bm(e,n)?"<":"["}$m.peek=eC;function $m(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let l=u.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...u.current()});l+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==f?l+=u.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function eC(){return"["}function zl(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function tC(e){const t=zl(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function nC(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Um(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function rC(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?nC(n):zl(n);const u=e.ordered?s==="."?")":".":tC(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Um(n)===s&&h){let f=-1;for(;++f<e.children.length;){const d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function iC(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function aC(e,t,n,r){const i=iC(n);let a=n.bulletCurrent||zl(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return l(),c;function h(f,d,m){return d?(m?"":" ".repeat(s))+f:(m?a:a+" ".repeat(s-a.length))+f}}function sC(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const oC=Ks(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uC(e,t,n,r){return(e.children.some(function(s){return oC(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function lC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Hm.peek=cC;function Hm(e,t,n,r){const i=lC(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let l=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=l.charCodeAt(0),h=ms(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(l=Zn(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=ms(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+Zn(f));const m=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:d.outside,before:h.outside},u+l+m}function cC(e,t,n){return n.options.strong||"*"}function fC(e,t,n,r){return n.safe(e.value,r)}function hC(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function pC(e,t,n){const r=(Um(n)+(n.options.ruleSpaces?" ":"")).repeat(hC(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $l={blockquote:TS,break:Kf,code:NS,definition:LS,emphasis:Pm,hardBreak:Kf,heading:GS,html:Vm,image:Mm,imageReference:Fm,inlineCode:jm,link:zm,linkReference:$m,list:rC,listItem:aC,paragraph:sC,root:uC,strong:Hm,text:fC,thematicBreak:pC},dC=[mC];function mC(e,t,n,r){if(t.type==="code"&&qu(t,r)&&(e.type==="list"||e.type===t.type&&qu(e,r)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&Dm(t,r))?void 0:n.spread?1:0}const gr=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],gC=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
47
+ `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:gr},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
48
+ ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:gr},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r
49
+ *])`},{character:"*",inConstruct:"phrasing",notInConstruct:gr},{atBreak:!0,character:"+",after:`(?:[ \r
50
50
  ])`},{atBreak:!0,character:"-",after:`(?:[ \r
51
51
  -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r
52
- ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:mr},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:mr},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:mr},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:mr},{atBreak:!0,character:"~"}];function mC(e){return e.label||!e.identifier?e.label||"":Cm(e.identifier)}function gC(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function vC(e,t,n){const r=t.indexStack,i=e.children||[],a=[];let s=-1,u=n.before,l;r.push(-1);let c=t.createTracker(n);for(;++s<i.length;){const h=i[s];let f;if(r[r.length-1]=s,s+1<i.length){let v=t.handle.handlers[i[s+1].type];v&&v.peek&&(v=v.peek),f=v?v(i[s+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else f=n.after;a.length>0&&(u==="\r"||u===`
53
- `)&&h.type==="html"&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),u=" ",c=t.createTracker(n),c.move(a.join("")));let d=t.handle(h,e,t,{...c.current(),after:f,before:u});l&&l===d.slice(0,1)&&(d=Zn(l.charCodeAt(0))+d.slice(1));const m=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,l=void 0,m&&(a.length>0&&m.before&&u===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+Zn(u.charCodeAt(0))),m.after&&(l=f)),c.move(d),a.push(d),u=d.slice(-1)}return r.pop(),a.join("")}function xC(e,t,n){const r=t.indexStack,i=e.children||[],a=t.createTracker(n),s=[];let u=-1;for(r.push(-1);++u<i.length;){const l=i[u];r[r.length-1]=u,s.push(a.move(t.handle(l,e,t,{before:`
52
+ ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:gr},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:gr},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:gr},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:gr},{atBreak:!0,character:"~"}];function vC(e){return e.label||!e.identifier?e.label||"":Em(e.identifier)}function xC(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function yC(e,t,n){const r=t.indexStack,i=e.children||[],a=[];let s=-1,u=n.before,l;r.push(-1);let c=t.createTracker(n);for(;++s<i.length;){const h=i[s];let f;if(r[r.length-1]=s,s+1<i.length){let v=t.handle.handlers[i[s+1].type];v&&v.peek&&(v=v.peek),f=v?v(i[s+1],e,t,{before:"",after:"",...c.current()}).charAt(0):""}else f=n.after;a.length>0&&(u==="\r"||u===`
53
+ `)&&h.type==="html"&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),u=" ",c=t.createTracker(n),c.move(a.join("")));let d=t.handle(h,e,t,{...c.current(),after:f,before:u});l&&l===d.slice(0,1)&&(d=Zn(l.charCodeAt(0))+d.slice(1));const m=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,l=void 0,m&&(a.length>0&&m.before&&u===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+Zn(u.charCodeAt(0))),m.after&&(l=f)),c.move(d),a.push(d),u=d.slice(-1)}return r.pop(),a.join("")}function bC(e,t,n){const r=t.indexStack,i=e.children||[],a=t.createTracker(n),s=[];let u=-1;for(r.push(-1);++u<i.length;){const l=i[u];r[r.length-1]=u,s.push(a.move(t.handle(l,e,t,{before:`
54
54
  `,after:`
55
- `,...a.current()}))),l.type!=="list"&&(t.bulletLastUsed=void 0),u<i.length-1&&s.push(a.move(bC(l,i[u+1],e,t)))}return r.pop(),s.join("")}function bC(e,t,n,r){let i=r.join.length;for(;i--;){const a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a=="number")return`
55
+ `,...a.current()}))),l.type!=="list"&&(t.bulletLastUsed=void 0),u<i.length-1&&s.push(a.move(wC(l,i[u+1],e,t)))}return r.pop(),s.join("")}function wC(e,t,n,r){let i=r.join.length;for(;i--;){const a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a=="number")return`
56
56
  `.repeat(1+a);if(a===!1)return`
57
57
 
58
58
  <!---->
59
59
 
60
60
  `}return`
61
61
 
62
- `}const yC=/\r?\n|\r/g;function wC(e,t){const n=[];let r=0,i=0,a;for(;a=yC.exec(e);)s(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return s(e.slice(r)),n.join("");function s(u){n.push(t(u,i,!u))}}function SC(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],a=[],s={};let u=-1;for(;++u<e.unsafe.length;){const h=e.unsafe[u];if(!Im(e.stack,h))continue;const f=e.compilePattern(h);let d;for(;d=f.exec(r);){const m="before"in h||!!h.atBreak,v="after"in h,x=d.index+(m?d[1].length:0);i.includes(x)?(s[x].before&&!m&&(s[x].before=!1),s[x].after&&!v&&(s[x].after=!1)):(i.push(x),s[x]={before:m,after:v})}}i.sort(CC);let l=n.before?n.before.length:0;const c=r.length-(n.after?n.after.length:0);for(u=-1;++u<i.length;){const h=i[u];h<l||h>=c||h+1<c&&i[u+1]===h+1&&s[h].after&&!s[h+1].before&&!s[h+1].after||i[u-1]===h-1&&s[h].before&&!s[h-1].before&&!s[h-1].after||(l!==h&&a.push(Kf(r.slice(l,h),"\\")),l=h,/[!-/:-@[-`{-~]/.test(r.charAt(h))&&(!n.encode||!n.encode.includes(r.charAt(h)))?a.push("\\"):(a.push(Zn(r.charCodeAt(h))),l++))}return a.push(Kf(r.slice(l,c),n.after)),a.join("")}function CC(e,t){return e-t}function Kf(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t;let s=-1,u=0,l;for(;l=n.exec(a);)r.push(l.index);for(;++s<r.length;)u!==r[s]&&i.push(e.slice(u,r[s])),i.push("\\"),u=r[s];return i.push(e.slice(u)),i.join("")}function kC(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:l,current:s,shift:u};function s(){return{now:{line:i,column:a},lineShift:r}}function u(c){r+=c}function l(c){const h=c||"",f=h.split(/\r?\n|\r/g),d=f[f.length-1];return i+=f.length-1,a=f.length===1?a+d.length:1+d.length+r,h}}function EC(e,t){const n=t||{},r={associationId:mC,containerPhrasing:AC,containerFlow:PC,createTracker:kC,compilePattern:gC,enter:a,handlers:{...Bl},handle:void 0,indentLines:wC,indexStack:[],join:[...hC],options:{},safe:RC,stack:[],unsafe:[...dC]};_m(r,n),r.options.tightDefinitions&&r.join.push(TC),r.handle=CS("type",{invalid:_C,unknown:IC,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
62
+ `}const SC=/\r?\n|\r/g;function CC(e,t){const n=[];let r=0,i=0,a;for(;a=SC.exec(e);)s(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return s(e.slice(r)),n.join("");function s(u){n.push(t(u,i,!u))}}function kC(e,t,n){const r=(n.before||"")+(t||"")+(n.after||""),i=[],a=[],s={};let u=-1;for(;++u<e.unsafe.length;){const h=e.unsafe[u];if(!Am(e.stack,h))continue;const f=e.compilePattern(h);let d;for(;d=f.exec(r);){const m="before"in h||!!h.atBreak,v="after"in h,x=d.index+(m?d[1].length:0);i.includes(x)?(s[x].before&&!m&&(s[x].before=!1),s[x].after&&!v&&(s[x].after=!1)):(i.push(x),s[x]={before:m,after:v})}}i.sort(EC);let l=n.before?n.before.length:0;const c=r.length-(n.after?n.after.length:0);for(u=-1;++u<i.length;){const h=i[u];h<l||h>=c||h+1<c&&i[u+1]===h+1&&s[h].after&&!s[h+1].before&&!s[h+1].after||i[u-1]===h-1&&s[h].before&&!s[h-1].before&&!s[h-1].after||(l!==h&&a.push(Jf(r.slice(l,h),"\\")),l=h,/[!-/:-@[-`{-~]/.test(r.charAt(h))&&(!n.encode||!n.encode.includes(r.charAt(h)))?a.push("\\"):(a.push(Zn(r.charCodeAt(h))),l++))}return a.push(Jf(r.slice(l,c),n.after)),a.join("")}function EC(e,t){return e-t}function Jf(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t;let s=-1,u=0,l;for(;l=n.exec(a);)r.push(l.index);for(;++s<r.length;)u!==r[s]&&i.push(e.slice(u,r[s])),i.push("\\"),u=r[s];return i.push(e.slice(u)),i.join("")}function _C(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:l,current:s,shift:u};function s(){return{now:{line:i,column:a},lineShift:r}}function u(c){r+=c}function l(c){const h=c||"",f=h.split(/\r?\n|\r/g),d=f[f.length-1];return i+=f.length-1,a=f.length===1?a+d.length:1+d.length+r,h}}function IC(e,t){const n=t||{},r={associationId:vC,containerPhrasing:RC,containerFlow:NC,createTracker:_C,compilePattern:xC,enter:a,handlers:{...$l},handle:void 0,indentLines:CC,indexStack:[],join:[...dC],options:{},safe:OC,stack:[],unsafe:[...gC]};Tm(r,n),r.options.tightDefinitions&&r.join.push(PC),r.handle=ES("type",{invalid:TC,unknown:AC,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
63
63
  `,after:`
64
64
  `,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
65
- `),i;function a(s){return r.stack.push(s),u;function u(){r.stack.pop()}}}function _C(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function IC(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function TC(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function AC(e,t){return vC(e,this,t)}function PC(e,t){return xC(e,this,t)}function RC(e,t){return SC(this,e,t)}function NC(e){const t=this;t.compiler=n;function n(r){return EC(r,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function Gf(e){if(e)throw e}var Ho,Jf;function OC(){if(Jf)return Ho;Jf=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!f)return!1;var d;for(d in c);return typeof d>"u"||e.call(c,d)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return Ho=function l(){var c,h,f,d,m,v,x=arguments[0],S=1,b=arguments.length,k=!1;for(typeof x=="boolean"&&(k=x,x=arguments[1]||{},S=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});S<b;++S)if(c=arguments[S],c!=null)for(h in c)f=u(x,h),d=u(c,h),x!==d&&(k&&d&&(a(d)||(m=i(d)))?(m?(m=!1,v=f&&i(f)?f:[]):v=f&&a(f)?f:{},s(x,{name:h,newValue:l(k,v,d)})):typeof d<"u"&&s(x,{name:h,newValue:d}));return x},Ho}var LC=OC();const Wo=Hi(LC);function qu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function DC(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(l,...c){const h=e[++a];let f=-1;if(l){s(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,h?VC(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function VC(e,t){let n;return r;function r(...s){const u=e.length>s.length;let l;u&&s.push(i);try{l=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const Cn={basename:MC,dirname:FC,extname:jC,join:BC,sep:"/"};function MC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Wi(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function FC(e){if(Wi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function jC(e){Wi(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function BC(...e){let t=-1,n;for(;++t<e.length;)Wi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":zC(n)}function zC(e){Wi(e);const t=e.codePointAt(0)===47;let n=$C(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function $C(e,t){let n="",r=0,i=-1,a=0,s=-1,u,l;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function Wi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const UC={cwd:HC};function HC(){return"/"}function Ku(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function WC(e){if(typeof e=="string")e=new URL(e);else if(!Ku(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return qC(e)}function qC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const qo=["history","path","basename","stem","extname","dirname"];class KC{constructor(t){let n;t?Ku(t)?n={path:t}:typeof t=="string"||GC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":UC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qo.length;){const a=qo[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)qo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Cn.basename(this.path):void 0}set basename(t){Go(t,"basename"),Ko(t,"basename"),this.path=Cn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Cn.dirname(this.path):void 0}set dirname(t){Yf(this.basename,"dirname"),this.path=Cn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Cn.extname(this.path):void 0}set extname(t){if(Ko(t,"extname"),Yf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Cn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ku(t)&&(t=WC(t)),Go(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Cn.basename(this.path,this.extname):void 0}set stem(t){Go(t,"stem"),Ko(t,"stem"),this.path=Cn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new nt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ko(e,t){if(e&&e.includes(Cn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Cn.sep+"`")}function Go(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Yf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const JC=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),YC={}.hasOwnProperty;class zl extends JC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=DC()}copy(){const t=new zl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Wo(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Xo("data",this.frozen),this.namespace[t]=n,this):YC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Xo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ka(t),r=this.parser||this.Parser;return Jo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Jo("process",this.parser||this.Parser),Yo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=ka(t),l=r.parse(u);r.run(l,u,function(h,f,d){if(h||!f||!d)return c(h);const m=f,v=r.stringify(m,d);ZC(v)?d.value=v:d.result=v,c(h,d)});function c(h,f){h||!f?s(h):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Jo("processSync",this.parser||this.Parser),Yo("processSync",this.compiler||this.Compiler),this.process(t,i),Qf("processSync","process",n),r;function i(a,s){n=!0,Gf(a),r=s}}run(t,n,r){Xf(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const l=ka(n);i.run(t,l,c);function c(h,f,d){const m=f||t;h?u(h):s?s(m):r(void 0,m,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Qf("runSync","run",r),i;function a(s,u){Gf(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=ka(n),i=this.compiler||this.Compiler;return Yo("stringify",i),Xf(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Xo("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...f]=c;l(h,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(c.plugins),c.settings&&(i.settings=Wo(!0,i.settings,c.settings))}function u(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const f=c[h];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,h){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===c){d=f;break}if(d===-1)r.push([c,...h]);else if(h.length>0){let[m,...v]=h;const x=r[d][1];qu(x)&&qu(m)&&(m=Wo(!0,x,m)),r[d]=[c,m,...v]}}}}const XC=new zl().freeze();function Jo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Xf(e){if(!qu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Qf(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ka(e){return QC(e)?e:new KC(e)}function QC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZC(e){return typeof e=="string"||ek(e)}function ek(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tk=XC().use(SS).use(NC).freeze();function nk(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function rk(e,t,n){const i=qs((n||{}).ignore||[]),a=ik(t);let s=-1;for(;++s<a.length;)Pm(e,"text",u);function u(c,h){let f=-1,d;for(;++f<h.length;){const m=h[f],v=d?d.children:void 0;if(i(m,v?v.indexOf(m):void 0,d))return;d=m}if(d)return l(c,h)}function l(c,h){const f=h[h.length-1],d=a[s][0],m=a[s][1];let v=0;const S=f.children.indexOf(c);let b=!1,k=[];d.lastIndex=0;let _=d.exec(c.value);for(;_;){const P=_.index,w={index:_.index,input:_.input,stack:[...h,c]};let g=m(..._,w);if(typeof g=="string"&&(g=g.length>0?{type:"text",value:g}:void 0),g===!1?d.lastIndex=P+1:(v!==P&&k.push({type:"text",value:c.value.slice(v,P)}),Array.isArray(g)?k.push(...g):g&&k.push(g),v=P+_[0].length,b=!0),!d.global)break;_=d.exec(c.value)}return b?(v<c.value.length&&k.push({type:"text",value:c.value.slice(v)}),f.children.splice(S,1,...k)):k=[c],S+k.length}}function ik(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([ak(i[0]),sk(i[1])])}return t}function ak(e){return typeof e=="string"?new RegExp(nk(e),"g"):e}function sk(e){return typeof e=="function"?e:function(){return e}}const Qo="phrasing",Zo=["autolink","link","image","label"];function ok(){return{transforms:[dk],enter:{literalAutolink:lk,literalAutolinkEmail:eu,literalAutolinkHttp:eu,literalAutolinkWww:eu},exit:{literalAutolink:pk,literalAutolinkEmail:hk,literalAutolinkHttp:ck,literalAutolinkWww:fk}}}function uk(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Qo,notInConstruct:Zo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Qo,notInConstruct:Zo},{character:":",before:"[ps]",after:"\\/",inConstruct:Qo,notInConstruct:Zo}]}}function lk(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function eu(e){this.config.enter.autolinkProtocol.call(this,e)}function ck(e){this.config.exit.autolinkProtocol.call(this,e)}function fk(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function hk(e){this.config.exit.autolinkEmail.call(this,e)}function pk(e){this.exit(e)}function dk(e){rk(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,mk],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),gk]],{ignore:["link","linkReference"]})}function mk(e,t,n,r,i){let a="";if(!Um(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!vk(n)))return!1;const s=xk(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function gk(e,t,n,r){return!Um(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function vk(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function xk(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=os(e,"(");let a=os(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Um(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ft(n)||Hs(n))&&(!t||n!==47)}Hm.peek=Ik;function bk(){this.buffer()}function yk(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wk(){this.buffer()}function Sk(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ck(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kk(e){this.exit(e)}function Ek(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _k(e){this.exit(e)}function Ik(){return"["}function Hm(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function Tk(){return{enter:{gfmFootnoteCallString:bk,gfmFootnoteCall:yk,gfmFootnoteDefinitionLabelString:wk,gfmFootnoteDefinition:Sk},exit:{gfmFootnoteCallString:Ck,gfmFootnoteCall:kk,gfmFootnoteDefinitionLabelString:Ek,gfmFootnoteDefinition:_k}}}function Ak(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Hm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let l=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(r),{before:l,after:"]"})),h(),l+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),l+=u.move((t?`
66
- `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Wm:Pk))),c(),l}}function Pk(e,t,n){return t===0?e:Wm(e,t,n)}function Wm(e,t,n){return(n?"":" ")+e}const Rk=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qm.peek=Vk;function Nk(){return{canContainEols:["delete"],enter:{strikethrough:Lk},exit:{strikethrough:Dk}}}function Ok(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Rk}],handlers:{delete:qm}}}function Lk(e){this.enter({type:"delete",children:[]},e)}function Dk(e){this.exit(e)}function qm(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Vk(){return"~"}function Mk(e){return e.length}function Fk(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Mk,a=[],s=[],u=[],l=[];let c=0,h=-1;for(;++h<e.length;){const x=[],S=[];let b=-1;for(e[h].length>c&&(c=e[h].length);++b<e[h].length;){const k=jk(e[h][b]);if(n.alignDelimiters!==!1){const _=i(k);S[b]=_,(l[b]===void 0||_>l[b])&&(l[b]=_)}x.push(k)}s[h]=x,u[h]=S}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=Zf(r[f]);else{const x=Zf(r);for(;++f<c;)a[f]=x}f=-1;const d=[],m=[];for(;++f<c;){const x=a[f];let S="",b="";x===99?(S=":",b=":"):x===108?S=":":x===114&&(b=":");let k=n.alignDelimiters===!1?1:Math.max(1,l[f]-S.length-b.length);const _=S+"-".repeat(k)+b;n.alignDelimiters!==!1&&(k=S.length+k+b.length,k>l[f]&&(l[f]=k),m[f]=k),d[f]=_}s.splice(1,0,d),u.splice(1,0,m),h=-1;const v=[];for(;++h<s.length;){const x=s[h],S=u[h];f=-1;const b=[];for(;++f<c;){const k=x[f]||"";let _="",P="";if(n.alignDelimiters!==!1){const w=l[f]-(S[f]||0),g=a[f];g===114?_=" ".repeat(w):g===99?w%2?(_=" ".repeat(w/2+.5),P=" ".repeat(w/2-.5)):(_=" ".repeat(w/2),P=_):P=" ".repeat(w)}n.delimiterStart!==!1&&!f&&b.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||f)&&b.push(" "),n.alignDelimiters!==!1&&b.push(_),b.push(k),n.alignDelimiters!==!1&&b.push(P),n.padding!==!1&&b.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&b.push("|")}v.push(n.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return v.join(`
67
- `)}function jk(e){return e==null?"":String(e)}function Zf(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Bk(){return{enter:{table:zk,tableData:eh,tableHeader:eh,tableRow:Uk},exit:{codeText:Hk,table:$k,tableData:tu,tableHeader:tu,tableRow:tu}}}function zk(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $k(e){this.exit(e),this.data.inTable=void 0}function Uk(e){this.enter({type:"tableRow",children:[]},e)}function tu(e){this.exit(e)}function eh(e){this.enter({type:"tableCell",children:[]},e)}function Hk(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Wk));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Wk(e,t){return t==="|"?t:e}function qk(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
68
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:l,tableRow:u}};function s(m,v,x,S){return c(h(m,x,S),m.align)}function u(m,v,x,S){const b=f(m,x,S),k=c([b]);return k.slice(0,k.indexOf(`
69
- `))}function l(m,v,x,S){const b=x.enter("tableCell"),k=x.enter("phrasing"),_=x.containerPhrasing(m,{...S,before:a,after:a});return k(),b(),_}function c(m,v){return Fk(m,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function h(m,v,x){const S=m.children;let b=-1;const k=[],_=v.enter("table");for(;++b<S.length;)k[b]=f(S[b],v,x);return _(),k}function f(m,v,x){const S=m.children;let b=-1;const k=[],_=v.enter("tableRow");for(;++b<S.length;)k[b]=l(S[b],m,v,x);return _(),k}function d(m,v,x){let S=Bl.inlineCode(m,v,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Kk(){return{exit:{taskListCheckValueChecked:th,taskListCheckValueUnchecked:th,paragraph:Jk}}}function Gk(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Yk}}}function th(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Jk(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Yk(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let l=Bl.listItem(e,t,n,{...r,...u.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(h){return h+s}}function Xk(){return[ok(),Tk(),Nk(),Bk(),Kk()]}function Qk(e){return{extensions:[uk(),Ak(e),Ok(),qk(e),Gk()]}}const Zk={tokenize:aE,partial:!0},Km={tokenize:sE,partial:!0},Gm={tokenize:oE,partial:!0},Jm={tokenize:uE,partial:!0},eE={tokenize:lE,partial:!0},Ym={name:"wwwAutolink",tokenize:rE,previous:Qm},Xm={name:"protocolAutolink",tokenize:iE,previous:Zm},zn={name:"emailAutolink",tokenize:nE,previous:eg},Pn={};function tE(){return{text:Pn}}let gr=48;for(;gr<123;)Pn[gr]=zn,gr++,gr===58?gr=65:gr===91&&(gr=97);Pn[43]=zn;Pn[45]=zn;Pn[46]=zn;Pn[95]=zn;Pn[72]=[zn,Xm];Pn[104]=[zn,Xm];Pn[87]=[zn,Ym];Pn[119]=[zn,Ym];function nE(e,t,n){const r=this;let i,a;return s;function s(f){return!Gu(f)||!eg.call(r,r.previous)||$l(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(f))}function u(f){return Gu(f)?(e.consume(f),u):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(eE,h,c)(f):f===45||f===95||Jt(f)?(a=!0,e.consume(f),l):h(f)}function c(f){return e.consume(f),i=!0,l}function h(f){return a&&i&&Ot(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function rE(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Qm.call(r,r.previous)||$l(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Zk,e.attempt(Km,e.attempt(Gm,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function iE(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&Zm.call(r,r.previous)&&!$l(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),u):n(f)}function u(f){if(Ot(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),u;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),a?c:(a=!0,l)):n(f)}function c(f){return f===null||hs(f)||Xe(f)||Ft(f)||Hs(f)?n(f):e.attempt(Km,e.attempt(Gm,h),n)(f)}function h(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function aE(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function sE(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(Jm,l,u)(c):c===null||Xe(c)||Ft(c)||c!==45&&Hs(c)?l(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function l(c){return i||r||!a?n(c):t(c)}}function oE(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Jm,t,a)(s):s===null||Xe(s)||Ft(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function uE(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||Xe(u)||Ft(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Xe(u)||Ft(u)?t(u):r(u)}function a(u){return Ot(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ot(u)?(e.consume(u),s):n(u)}}function lE(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Jt(a)?n(a):t(a)}}function Qm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Xe(e)}function Zm(e){return!Ot(e)}function eg(e){return!(e===47||Gu(e))}function Gu(e){return e===43||e===45||e===46||e===95||Jt(e)}function $l(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const cE={tokenize:xE,partial:!0};function fE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mE,continuation:{tokenize:gE},exit:vE}},text:{91:{name:"gfmFootnoteCall",tokenize:dE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:hE,resolveTo:pE}}}}function hE(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return u;function u(l){if(!s||!s._balanced)return n(l);const c=bn(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function pE(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function dE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!s||f===null||f===91||Xe(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(bn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Xe(f)||(s=!0),a++,e.consume(f),f===92?h:c}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function mE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return l;function l(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(v)}function h(v){if(s>999||v===93&&!u||v===null||v===91||Xe(v))return n(v);if(v===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=bn(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Xe(v)||(u=!0),s++,e.consume(v),v===92?f:h}function f(v){return v===91||v===92||v===93?(e.consume(v),s++,h):h(v)}function d(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(a)||i.push(a),Ke(e,m,"gfmFootnoteDefinitionWhitespace")):n(v)}function m(v){return t(v)}}function gE(e,t,n){return e.check(ti,t,e.attempt(cE,t,n))}function vE(e){e.exit("gfmFootnoteDefinition")}function xE(e,t,n){const r=this;return Ke(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function bE(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},d=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",f,u]],m=u.parser.constructs.insideSpan.null;m&&nn(d,d.length,0,Ws(m,s.slice(c+1,l),u)),nn(d,d.length,0,[["exit",f,u],["enter",s[l][1],u],["exit",s[l][1],u],["exit",h,u]]),nn(s,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,u,l){const c=this.previous,h=this.events;let f=0;return d;function d(v){return c===126&&h[h.length-1][1].type!=="characterEscape"?l(v):(s.enter("strikethroughSequenceTemporary"),m(v))}function m(v){const x=Gr(c);if(v===126)return f>1?l(v):(s.consume(v),f++,m);if(f<2&&!n)return l(v);const S=s.exit("strikethroughSequenceTemporary"),b=Gr(v);return S._open=!b||b===2&&!!x,S._close=!x||x===2&&!!b,u(v)}}}class yE{constructor(){this.map=[]}add(t,n,r){wE(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function wE(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function SE(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function CE(){return{flow:{null:{name:"table",tokenize:kE,resolveAll:EE}}}}function kE(e,t,n){const r=this;let i=0,a=0,s;return u;function u(N){let B=r.events.length-1;for(;B>-1;){const re=r.events[B][1].type;if(re==="lineEnding"||re==="linePrefix")B--;else break}const G=B>-1?r.events[B][1].type:null,U=G==="tableHead"||G==="tableRow"?g:l;return U===g&&r.parser.lazy[r.now().line]?n(N):U(N)}function l(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(s=!0,a+=1),h(N)}function h(N){return N===null?n(N):De(N)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),m):n(N):He(N)?Ke(e,h,"whitespace")(N):(a+=1,s&&(s=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),f(N)))}function f(N){return N===null||N===124||Xe(N)?(e.exit("data"),h(N)):(e.consume(N),N===92?d:f)}function d(N){return N===92||N===124?(e.consume(N),f):f(N)}function m(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),s=!1,He(N)?Ke(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):v(N))}function v(N){return N===45||N===58?S(N):N===124?(s=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),x):w(N)}function x(N){return He(N)?Ke(e,S,"whitespace")(N):S(N)}function S(N){return N===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),b):N===45?(a+=1,b(N)):N===null||De(N)?P(N):w(N)}function b(N){return N===45?(e.enter("tableDelimiterFiller"),k(N)):w(N)}function k(N){return N===45?(e.consume(N),k):N===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(N))}function _(N){return He(N)?Ke(e,P,"whitespace")(N):P(N)}function P(N){return N===124?v(N):N===null||De(N)?!s||i!==a?w(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):w(N)}function w(N){return n(N)}function g(N){return e.enter("tableRow"),E(N)}function E(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),E):N===null||De(N)?(e.exit("tableRow"),t(N)):He(N)?Ke(e,E,"whitespace")(N):(e.enter("data"),D(N))}function D(N){return N===null||N===124||Xe(N)?(e.exit("data"),E(N)):(e.consume(N),N===92?j:D)}function j(N){return N===92||N===124?(e.consume(N),D):D(N)}}function EE(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,l=0,c,h,f;const d=new yE;for(;++n<e.length;){const m=e[n],v=m[1];m[0]==="enter"?v.type==="tableHead"?(u=!1,l!==0&&(nh(d,t,l,c,h),h=void 0,l=0),c={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},d.add(n,0,[["enter",c,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},d.add(n,0,[["enter",h,t]])),i=v.type==="tableDelimiterRow"?2:h?3:1):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=Ea(d,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=Ea(d,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):v.type==="tableHead"?(u=!0,l=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=n,a[1]!==0?(s[0]=s[1],f=Ea(d,t,a,i,n,f)):s[1]!==0&&(f=Ea(d,t,s,i,n,f)),i=0):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&nh(d,t,l,c,h),d.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=SE(t.events,n))}return e}function Ea(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Vr(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=Vr(t.events,n[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Vr(t.events,n[2]),h=Vr(t.events,n[3]),f={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],m=t.events[n[3]];if(d[1].end=Object.assign({},m[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,x=n[3]-n[2]-1;e.add(v,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},Vr(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function nh(e,t,n,r,i){const a=[],s=Vr(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Vr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const _E={name:"tasklistCheck",tokenize:TE};function IE(){return{text:{91:_E}}}function TE(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return Xe(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(l)}function u(l){return De(l)?t(l):He(l)?e.check({tokenize:AE},t,n)(l):n(l)}}function AE(e,t,n){return Ke(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function PE(e){return Ml([tE(),fE(),bE(e),CE(),IE()])}const RE={};function NE(e){const t=this,n=e||RE,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(PE(n)),a.push(Xk()),s.push(Qk(n))}const tg=async()=>(await Se.getNodeInfo({verb:Se.DesignerRequestVerb.GET_INFO,path:"WebForms"})).filter(t=>t.ext==="WebForm"),Ju=(e,t,n)=>{let r=[];return Array.isArray(e)?e.forEach((i,a)=>{r=r.concat(Ju(i,`${t}.[${a}]`,n))}):be.isObject(e)?be.has(e,n)?r.push(`${t}.${n}`):Object.entries(e).forEach(([a,s])=>{r=r.concat(Ju(s,`${t}.${a}`,n))}):t===n&&r.push(n),r},OE=()=>new Date().toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"}),rh=e=>{const t=/[",\n\r]/.test(e);let n=e.replace(/"/g,'""');return t&&(n=`"${n}"`),n},LE=(e,t,n)=>{let r="";const i=[...t],a=()=>i.map(h=>""),s=(h,f,d)=>{const m=i.findIndex(v=>v===f);m<0?(h.push(d),i.push(f)):h[m]=d},u=h=>h.join(n)+`
70
- `,{webforms:l,i18n:c}=e;return l&&Object.keys(l).forEach(f=>{const d=be.get(l,`${f}`);Object.keys(d).forEach(v=>{const{props:x,resolverName:S}=be.get(d,v);Array.isArray(x)&&x.forEach(({__dataPath:b,__default:k,..._})=>{const P=a();s(P,"keys",`webforms.${f}.${v}.${b}`),s(P,"__t",rh(k)),s(P,"resolverName",S),Object.keys(_).forEach(w=>{let g=w;w.startsWith("states:")&&(g=w.replace("states:",""),g=g.replace("i18n:","")),s(P,g,rh(_[w]))}),r+=u(P)})})}),c&&Object.keys(c).forEach(f=>{const d=be.get(c,f);d&&Object.keys(d).forEach(v=>{const x=be.get(d,v),S=a();s(S,"keys",`i18n.${f}.${v}`),s(S,v==="default"?"i18nkey_default":v,x),r+=u(S)})}),u(i)+r},_a=(e,t)=>{let n=e;return t.bold&&(n=`**${n}**`),t.italic&&(n=`*${n}*`),t.underlined&&(n=`<u>${n}</u>`),t.strikethrough&&(n=`~~${n}~~`),n},Ia={datasource:e=>{const{datasource:t,dsType:n,format:r,children:i}=e;let a,s="";return i&&i[0]&&(a=i[0],s=`<ds datasource='${t}' dsType='${n}' format='${r}'>${_a(a.text,a)}</ds>`),s},link:e=>{const{url:t,target:n,datasource:r,isDatasource:i,children:a}=e;let s="";if(a&&a[0]){const{text:u,...l}=a[0];s=`<link datasource='${r}' isDatasource='${i}' url='${t}' target='${n}'>${_a(u,l)}</link>`}return s},i18n:e=>{const{children:t,__i18n:n}=e;let r="";if(t&&t[0]){const{text:i,...a}=t[0];r=`<i18n __i18n='${n}'>${_a(i,a)}</i18n>`}return r},defaultElement:e=>{const{text:t}=e;return _a(t,e)}},DE=e=>{const{type:t,text:n}=e;if(!t&&!n)return"<e/>";switch(t){case"datasource":return Ia.datasource(e);case"link":return Ia.link(e);case"i18n":return Ia.i18n(e);default:return Ia.defaultElement(e)}},VE=e=>e.map(t=>{const{children:n}=t;return n?n.map(r=>DE(r)).join(""):""}).filter(Boolean).join(`
65
+ `),i;function a(s){return r.stack.push(s),u;function u(){r.stack.pop()}}}function TC(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function AC(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function PC(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function RC(e,t){return yC(e,this,t)}function NC(e,t){return bC(e,this,t)}function OC(e,t){return kC(this,e,t)}function LC(e){const t=this;t.compiler=n;function n(r){return IC(r,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function Yf(e){if(e)throw e}var qo,Xf;function DC(){if(Xf)return qo;Xf=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),f=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!f)return!1;var d;for(d in c);return typeof d>"u"||e.call(c,d)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return qo=function l(){var c,h,f,d,m,v,x=arguments[0],S=1,y=arguments.length,k=!1;for(typeof x=="boolean"&&(k=x,x=arguments[1]||{},S=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});S<y;++S)if(c=arguments[S],c!=null)for(h in c)f=u(x,h),d=u(c,h),x!==d&&(k&&d&&(a(d)||(m=i(d)))?(m?(m=!1,v=f&&i(f)?f:[]):v=f&&a(f)?f:{},s(x,{name:h,newValue:l(k,v,d)})):typeof d<"u"&&s(x,{name:h,newValue:d}));return x},qo}var VC=DC();const Ko=Hi(VC);function Gu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function MC(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...i);function u(l,...c){const h=e[++a];let f=-1;if(l){s(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,h?FC(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function FC(e,t){let n;return r;function r(...s){const u=e.length>s.length;let l;u&&s.push(i);try{l=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const Cn={basename:jC,dirname:BC,extname:zC,join:$C,sep:"/"};function jC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Wi(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function BC(e){if(Wi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function zC(e){Wi(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function $C(...e){let t=-1,n;for(;++t<e.length;)Wi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":UC(n)}function UC(e){Wi(e);const t=e.codePointAt(0)===47;let n=HC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function HC(e,t){let n="",r=0,i=-1,a=0,s=-1,u,l;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else u===46&&a>-1?a++:a=-1}return n}function Wi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WC={cwd:qC};function qC(){return"/"}function Ju(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function KC(e){if(typeof e=="string")e=new URL(e);else if(!Ju(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return GC(e)}function GC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Go=["history","path","basename","stem","extname","dirname"];class JC{constructor(t){let n;t?Ju(t)?n={path:t}:typeof t=="string"||YC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":WC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Go.length;){const a=Go[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Go.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Cn.basename(this.path):void 0}set basename(t){Yo(t,"basename"),Jo(t,"basename"),this.path=Cn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Cn.dirname(this.path):void 0}set dirname(t){Qf(this.basename,"dirname"),this.path=Cn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Cn.extname(this.path):void 0}set extname(t){if(Jo(t,"extname"),Qf(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Cn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ju(t)&&(t=KC(t)),Yo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Cn.basename(this.path,this.extname):void 0}set stem(t){Yo(t,"stem"),Jo(t,"stem"),this.path=Cn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new nt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Jo(e,t){if(e&&e.includes(Cn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Cn.sep+"`")}function Yo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Qf(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XC=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),QC={}.hasOwnProperty;class Ul extends XC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=MC()}copy(){const t=new Ul;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ko(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Zo("data",this.frozen),this.namespace[t]=n,this):QC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Zo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ea(t),r=this.parser||this.Parser;return Xo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Xo("process",this.parser||this.Parser),Qo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=Ea(t),l=r.parse(u);r.run(l,u,function(h,f,d){if(h||!f||!d)return c(h);const m=f,v=r.stringify(m,d);tk(v)?d.value=v:d.result=v,c(h,d)});function c(h,f){h||!f?s(h):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Xo("processSync",this.parser||this.Parser),Qo("processSync",this.compiler||this.Compiler),this.process(t,i),eh("processSync","process",n),r;function i(a,s){n=!0,Yf(a),r=s}}run(t,n,r){Zf(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,u){const l=Ea(n);i.run(t,l,c);function c(h,f,d){const m=f||t;h?u(h):s?s(m):r(void 0,m,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),eh("runSync","run",r),i;function a(s,u){Yf(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=Ea(n),i=this.compiler||this.Compiler;return Qo("stringify",i),Zf(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Zo("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...f]=c;l(h,f)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(c.plugins),c.settings&&(i.settings=Ko(!0,i.settings,c.settings))}function u(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const f=c[h];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,h){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===c){d=f;break}if(d===-1)r.push([c,...h]);else if(h.length>0){let[m,...v]=h;const x=r[d][1];Gu(x)&&Gu(m)&&(m=Ko(!0,x,m)),r[d]=[c,m,...v]}}}}const ZC=new Ul().freeze();function Xo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Qo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zf(e){if(!Gu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function eh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ea(e){return ek(e)?e:new JC(e)}function ek(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tk(e){return typeof e=="string"||nk(e)}function nk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rk=ZC().use(kS).use(LC).freeze();function ik(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ak(e,t,n){const i=Ks((n||{}).ignore||[]),a=sk(t);let s=-1;for(;++s<a.length;)Nm(e,"text",u);function u(c,h){let f=-1,d;for(;++f<h.length;){const m=h[f],v=d?d.children:void 0;if(i(m,v?v.indexOf(m):void 0,d))return;d=m}if(d)return l(c,h)}function l(c,h){const f=h[h.length-1],d=a[s][0],m=a[s][1];let v=0;const S=f.children.indexOf(c);let y=!1,k=[];d.lastIndex=0;let _=d.exec(c.value);for(;_;){const P=_.index,w={index:_.index,input:_.input,stack:[...h,c]};let g=m(..._,w);if(typeof g=="string"&&(g=g.length>0?{type:"text",value:g}:void 0),g===!1?d.lastIndex=P+1:(v!==P&&k.push({type:"text",value:c.value.slice(v,P)}),Array.isArray(g)?k.push(...g):g&&k.push(g),v=P+_[0].length,y=!0),!d.global)break;_=d.exec(c.value)}return y?(v<c.value.length&&k.push({type:"text",value:c.value.slice(v)}),f.children.splice(S,1,...k)):k=[c],S+k.length}}function sk(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([ok(i[0]),uk(i[1])])}return t}function ok(e){return typeof e=="string"?new RegExp(ik(e),"g"):e}function uk(e){return typeof e=="function"?e:function(){return e}}const eu="phrasing",tu=["autolink","link","image","label"];function lk(){return{transforms:[gk],enter:{literalAutolink:fk,literalAutolinkEmail:nu,literalAutolinkHttp:nu,literalAutolinkWww:nu},exit:{literalAutolink:mk,literalAutolinkEmail:dk,literalAutolinkHttp:hk,literalAutolinkWww:pk}}}function ck(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:eu,notInConstruct:tu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:eu,notInConstruct:tu},{character:":",before:"[ps]",after:"\\/",inConstruct:eu,notInConstruct:tu}]}}function fk(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function nu(e){this.config.enter.autolinkProtocol.call(this,e)}function hk(e){this.config.exit.autolinkProtocol.call(this,e)}function pk(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function dk(e){this.config.exit.autolinkEmail.call(this,e)}function mk(e){this.exit(e)}function gk(e){ak(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vk],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),xk]],{ignore:["link","linkReference"]})}function vk(e,t,n,r,i){let a="";if(!Wm(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!yk(n)))return!1;const s=bk(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function xk(e,t,n,r){return!Wm(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function yk(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function bk(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=us(e,"(");let a=us(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Wm(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ft(n)||Ws(n))&&(!t||n!==47)}qm.peek=Ak;function wk(){this.buffer()}function Sk(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Ck(){this.buffer()}function kk(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ek(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _k(e){this.exit(e)}function Ik(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Tk(e){this.exit(e)}function Ak(){return"["}function qm(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function Pk(){return{enter:{gfmFootnoteCallString:wk,gfmFootnoteCall:Sk,gfmFootnoteDefinitionLabelString:Ck,gfmFootnoteDefinition:kk},exit:{gfmFootnoteCallString:Ek,gfmFootnoteCall:_k,gfmFootnoteDefinitionLabelString:Ik,gfmFootnoteDefinition:Tk}}}function Rk(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:qm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let l=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(r),{before:l,after:"]"})),h(),l+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),l+=u.move((t?`
66
+ `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?Km:Nk))),c(),l}}function Nk(e,t,n){return t===0?e:Km(e,t,n)}function Km(e,t,n){return(n?"":" ")+e}const Ok=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Gm.peek=Fk;function Lk(){return{canContainEols:["delete"],enter:{strikethrough:Vk},exit:{strikethrough:Mk}}}function Dk(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ok}],handlers:{delete:Gm}}}function Vk(e){this.enter({type:"delete",children:[]},e)}function Mk(e){this.exit(e)}function Gm(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function Fk(){return"~"}function jk(e){return e.length}function Bk(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||jk,a=[],s=[],u=[],l=[];let c=0,h=-1;for(;++h<e.length;){const x=[],S=[];let y=-1;for(e[h].length>c&&(c=e[h].length);++y<e[h].length;){const k=zk(e[h][y]);if(n.alignDelimiters!==!1){const _=i(k);S[y]=_,(l[y]===void 0||_>l[y])&&(l[y]=_)}x.push(k)}s[h]=x,u[h]=S}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=th(r[f]);else{const x=th(r);for(;++f<c;)a[f]=x}f=-1;const d=[],m=[];for(;++f<c;){const x=a[f];let S="",y="";x===99?(S=":",y=":"):x===108?S=":":x===114&&(y=":");let k=n.alignDelimiters===!1?1:Math.max(1,l[f]-S.length-y.length);const _=S+"-".repeat(k)+y;n.alignDelimiters!==!1&&(k=S.length+k+y.length,k>l[f]&&(l[f]=k),m[f]=k),d[f]=_}s.splice(1,0,d),u.splice(1,0,m),h=-1;const v=[];for(;++h<s.length;){const x=s[h],S=u[h];f=-1;const y=[];for(;++f<c;){const k=x[f]||"";let _="",P="";if(n.alignDelimiters!==!1){const w=l[f]-(S[f]||0),g=a[f];g===114?_=" ".repeat(w):g===99?w%2?(_=" ".repeat(w/2+.5),P=" ".repeat(w/2-.5)):(_=" ".repeat(w/2),P=_):P=" ".repeat(w)}n.delimiterStart!==!1&&!f&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||f)&&y.push(" "),n.alignDelimiters!==!1&&y.push(_),y.push(k),n.alignDelimiters!==!1&&y.push(P),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&y.push("|")}v.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return v.join(`
67
+ `)}function zk(e){return e==null?"":String(e)}function th(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function $k(){return{enter:{table:Uk,tableData:nh,tableHeader:nh,tableRow:Wk},exit:{codeText:qk,table:Hk,tableData:ru,tableHeader:ru,tableRow:ru}}}function Uk(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Hk(e){this.exit(e),this.data.inTable=void 0}function Wk(e){this.enter({type:"tableRow",children:[]},e)}function ru(e){this.exit(e)}function nh(e){this.enter({type:"tableCell",children:[]},e)}function qk(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Kk));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Kk(e,t){return t==="|"?t:e}function Gk(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
68
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:l,tableRow:u}};function s(m,v,x,S){return c(h(m,x,S),m.align)}function u(m,v,x,S){const y=f(m,x,S),k=c([y]);return k.slice(0,k.indexOf(`
69
+ `))}function l(m,v,x,S){const y=x.enter("tableCell"),k=x.enter("phrasing"),_=x.containerPhrasing(m,{...S,before:a,after:a});return k(),y(),_}function c(m,v){return Bk(m,{align:v,alignDelimiters:r,padding:n,stringLength:i})}function h(m,v,x){const S=m.children;let y=-1;const k=[],_=v.enter("table");for(;++y<S.length;)k[y]=f(S[y],v,x);return _(),k}function f(m,v,x){const S=m.children;let y=-1;const k=[],_=v.enter("tableRow");for(;++y<S.length;)k[y]=l(S[y],m,v,x);return _(),k}function d(m,v,x){let S=$l.inlineCode(m,v,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Jk(){return{exit:{taskListCheckValueChecked:rh,taskListCheckValueUnchecked:rh,paragraph:Xk}}}function Yk(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Qk}}}function rh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Xk(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const u=i[a];if(u.type==="paragraph"){s=u;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Qk(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let l=$l.listItem(e,t,n,{...r,...u.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(h){return h+s}}function Zk(){return[lk(),Pk(),Lk(),$k(),Jk()]}function eE(e){return{extensions:[ck(),Rk(e),Dk(),Gk(e),Yk()]}}const tE={tokenize:oE,partial:!0},Jm={tokenize:uE,partial:!0},Ym={tokenize:lE,partial:!0},Xm={tokenize:cE,partial:!0},nE={tokenize:fE,partial:!0},Qm={name:"wwwAutolink",tokenize:aE,previous:eg},Zm={name:"protocolAutolink",tokenize:sE,previous:tg},zn={name:"emailAutolink",tokenize:iE,previous:ng},Pn={};function rE(){return{text:Pn}}let vr=48;for(;vr<123;)Pn[vr]=zn,vr++,vr===58?vr=65:vr===91&&(vr=97);Pn[43]=zn;Pn[45]=zn;Pn[46]=zn;Pn[95]=zn;Pn[72]=[zn,Zm];Pn[104]=[zn,Zm];Pn[87]=[zn,Qm];Pn[119]=[zn,Qm];function iE(e,t,n){const r=this;let i,a;return s;function s(f){return!Yu(f)||!ng.call(r,r.previous)||Hl(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(f))}function u(f){return Yu(f)?(e.consume(f),u):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(nE,h,c)(f):f===45||f===95||Jt(f)?(a=!0,e.consume(f),l):h(f)}function c(f){return e.consume(f),i=!0,l}function h(f){return a&&i&&Ot(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function aE(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!eg.call(r,r.previous)||Hl(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tE,e.attempt(Jm,e.attempt(Ym,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function sE(e,t,n){const r=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&tg.call(r,r.previous)&&!Hl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),u):n(f)}function u(f){if(Ot(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),u;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),a?c:(a=!0,l)):n(f)}function c(f){return f===null||ps(f)||Xe(f)||Ft(f)||Ws(f)?n(f):e.attempt(Jm,e.attempt(Ym,h),n)(f)}function h(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function oE(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function uE(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(Xm,l,u)(c):c===null||Xe(c)||Ft(c)||c!==45&&Ws(c)?l(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function l(c){return i||r||!a?n(c):t(c)}}function lE(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Xm,t,a)(s):s===null||Xe(s)||Ft(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function cE(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||Xe(u)||Ft(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Xe(u)||Ft(u)?t(u):r(u)}function a(u){return Ot(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ot(u)?(e.consume(u),s):n(u)}}function fE(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Jt(a)?n(a):t(a)}}function eg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Xe(e)}function tg(e){return!Ot(e)}function ng(e){return!(e===47||Yu(e))}function Yu(e){return e===43||e===45||e===46||e===95||Jt(e)}function Hl(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const hE={tokenize:bE,partial:!0};function pE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vE,continuation:{tokenize:xE},exit:yE}},text:{91:{name:"gfmFootnoteCall",tokenize:gE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dE,resolveTo:mE}}}}function dE(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return u;function u(l){if(!s||!s._balanced)return n(l);const c=yn(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function mE(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function gE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!s||f===null||f===91||Xe(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(yn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Xe(f)||(s=!0),a++,e.consume(f),f===92?h:c}function h(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function vE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return l;function l(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(v)}function h(v){if(s>999||v===93&&!u||v===null||v===91||Xe(v))return n(v);if(v===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=yn(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Xe(v)||(u=!0),s++,e.consume(v),v===92?f:h}function f(v){return v===91||v===92||v===93?(e.consume(v),s++,h):h(v)}function d(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(a)||i.push(a),Ke(e,m,"gfmFootnoteDefinitionWhitespace")):n(v)}function m(v){return t(v)}}function xE(e,t,n){return e.check(ti,t,e.attempt(hE,t,n))}function yE(e){e.exit("gfmFootnoteDefinition")}function bE(e,t,n){const r=this;return Ke(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function wE(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,u){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},f={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},d=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",f,u]],m=u.parser.constructs.insideSpan.null;m&&nn(d,d.length,0,qs(m,s.slice(c+1,l),u)),nn(d,d.length,0,[["exit",f,u],["enter",s[l][1],u],["exit",s[l][1],u],["exit",h,u]]),nn(s,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,u,l){const c=this.previous,h=this.events;let f=0;return d;function d(v){return c===126&&h[h.length-1][1].type!=="characterEscape"?l(v):(s.enter("strikethroughSequenceTemporary"),m(v))}function m(v){const x=Gr(c);if(v===126)return f>1?l(v):(s.consume(v),f++,m);if(f<2&&!n)return l(v);const S=s.exit("strikethroughSequenceTemporary"),y=Gr(v);return S._open=!y||y===2&&!!x,S._close=!x||x===2&&!!y,u(v)}}}class SE{constructor(){this.map=[]}add(t,n,r){CE(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function CE(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function kE(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function EE(){return{flow:{null:{name:"table",tokenize:_E,resolveAll:IE}}}}function _E(e,t,n){const r=this;let i=0,a=0,s;return u;function u(R){let B=r.events.length-1;for(;B>-1;){const re=r.events[B][1].type;if(re==="lineEnding"||re==="linePrefix")B--;else break}const G=B>-1?r.events[B][1].type:null,U=G==="tableHead"||G==="tableRow"?g:l;return U===g&&r.parser.lazy[r.now().line]?n(R):U(R)}function l(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(s=!0,a+=1),h(R)}function h(R){return R===null?n(R):De(R)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),m):n(R):He(R)?Ke(e,h,"whitespace")(R):(a+=1,s&&(s=!1,i+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),f(R)))}function f(R){return R===null||R===124||Xe(R)?(e.exit("data"),h(R)):(e.consume(R),R===92?d:f)}function d(R){return R===92||R===124?(e.consume(R),f):f(R)}function m(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),s=!1,He(R)?Ke(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):v(R))}function v(R){return R===45||R===58?S(R):R===124?(s=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),x):w(R)}function x(R){return He(R)?Ke(e,S,"whitespace")(R):S(R)}function S(R){return R===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),y):R===45?(a+=1,y(R)):R===null||De(R)?P(R):w(R)}function y(R){return R===45?(e.enter("tableDelimiterFiller"),k(R)):w(R)}function k(R){return R===45?(e.consume(R),k):R===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(R))}function _(R){return He(R)?Ke(e,P,"whitespace")(R):P(R)}function P(R){return R===124?v(R):R===null||De(R)?!s||i!==a?w(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):w(R)}function w(R){return n(R)}function g(R){return e.enter("tableRow"),E(R)}function E(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),E):R===null||De(R)?(e.exit("tableRow"),t(R)):He(R)?Ke(e,E,"whitespace")(R):(e.enter("data"),D(R))}function D(R){return R===null||R===124||Xe(R)?(e.exit("data"),E(R)):(e.consume(R),R===92?F:D)}function F(R){return R===92||R===124?(e.consume(R),D):D(R)}}function IE(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,l=0,c,h,f;const d=new SE;for(;++n<e.length;){const m=e[n],v=m[1];m[0]==="enter"?v.type==="tableHead"?(u=!1,l!==0&&(ih(d,t,l,c,h),h=void 0,l=0),c={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},d.add(n,0,[["enter",c,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},d.add(n,0,[["enter",h,t]])),i=v.type==="tableDelimiterRow"?2:h?3:1):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=_a(d,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],f=_a(d,t,a,i,void 0,f)),a=s,s=[a[1],n,0,0])):v.type==="tableHead"?(u=!0,l=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=n,a[1]!==0?(s[0]=s[1],f=_a(d,t,a,i,n,f)):s[1]!==0&&(f=_a(d,t,s,i,n,f)),i=0):i&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&ih(d,t,l,c,h),d.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=kE(t.events,n))}return e}function _a(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Vr(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=Vr(t.events,n[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Vr(t.events,n[2]),h=Vr(t.events,n[3]),f={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],m=t.events[n[3]];if(d[1].end=Object.assign({},m[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,x=n[3]-n[2]-1;e.add(v,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},Vr(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function ih(e,t,n,r,i){const a=[],s=Vr(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function Vr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const TE={name:"tasklistCheck",tokenize:PE};function AE(){return{text:{91:TE}}}function PE(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return Xe(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(l)}function u(l){return De(l)?t(l):He(l)?e.check({tokenize:RE},t,n)(l):n(l)}}function RE(e,t,n){return Ke(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function NE(e){return jl([rE(),pE(),wE(e),EE(),AE()])}const OE={};function LE(e){const t=this,n=e||OE,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(NE(n)),a.push(Zk()),s.push(eE(n))}const rg=async()=>(await Se.getNodeInfo({verb:Se.DesignerRequestVerb.GET_INFO,path:"WebForms"})).filter(t=>t.ext==="WebForm"),Xu=(e,t,n)=>{let r=[];return Array.isArray(e)?e.forEach((i,a)=>{r=r.concat(Xu(i,`${t}.[${a}]`,n))}):xe.isObject(e)?xe.has(e,n)?r.push(`${t}.${n}`):Object.entries(e).forEach(([a,s])=>{r=r.concat(Xu(s,`${t}.${a}`,n))}):t===n&&r.push(n),r},DE=()=>new Date().toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"}),ah=e=>{const t=/[",\n\r]/.test(e);let n=e.replace(/"/g,'""');return t&&(n=`"${n}"`),n},VE=(e,t,n)=>{let r="";const i=[...t],a=()=>i.map(h=>""),s=(h,f,d)=>{const m=i.findIndex(v=>v===f);m<0?(h.push(d),i.push(f)):h[m]=d},u=h=>h.join(n)+`
70
+ `,{webforms:l,i18n:c}=e;return l&&Object.keys(l).forEach(f=>{const d=xe.get(l,`${f}`);Object.keys(d).forEach(v=>{const{props:x,resolverName:S}=xe.get(d,v);Array.isArray(x)&&x.forEach(({__dataPath:y,__default:k,..._})=>{const P=a();s(P,"keys",`webforms.${f}.${v}.${y}`),s(P,"__t",ah(k)),s(P,"resolverName",S),Object.keys(_).forEach(w=>{let g=w;w.startsWith("states:")&&(g=w.replace("states:",""),g=g.replace("i18n:","")),s(P,g,ah(_[w]))}),r+=u(P)})})}),c&&Object.keys(c).forEach(f=>{const d=xe.get(c,f);d&&Object.keys(d).forEach(v=>{const x=xe.get(d,v),S=a();s(S,"keys",`i18n.${f}.${v}`),s(S,v==="default"?"i18nkey_default":v,x),r+=u(S)})}),u(i)+r},Ia=(e,t)=>{let n=e;return t.bold&&(n=`**${n}**`),t.italic&&(n=`*${n}*`),t.underlined&&(n=`<u>${n}</u>`),t.strikethrough&&(n=`~~${n}~~`),n},Ta={datasource:e=>{const{datasource:t,dsType:n,format:r,children:i}=e;let a,s="";return i&&i[0]&&(a=i[0],s=`<ds datasource='${t}' dsType='${n}' format='${r}'>${Ia(a.text,a)}</ds>`),s},link:e=>{const{url:t,target:n,datasource:r,isDatasource:i,children:a}=e;let s="";if(a&&a[0]){const{text:u,...l}=a[0];s=`<link datasource='${r}' isDatasource='${i}' url='${t}' target='${n}'>${Ia(u,l)}</link>`}return s},i18n:e=>{const{children:t,__i18n:n}=e;let r="";if(t&&t[0]){const{text:i,...a}=t[0];r=`<i18n __i18n='${n}'>${Ia(i,a)}</i18n>`}return r},defaultElement:e=>{const{text:t}=e;return Ia(t,e)}},ME=e=>{const{type:t,text:n}=e;if(!t&&!n)return"<e/>";switch(t){case"datasource":return Ta.datasource(e);case"link":return Ta.link(e);case"i18n":return Ta.i18n(e);default:return Ta.defaultElement(e)}},FE=e=>e.map(t=>{const{children:n}=t;return n?n.map(r=>ME(r)).join(""):""}).filter(Boolean).join(`
71
71
 
72
- `),ME=e=>{const t=/<\/?[a-zA-Z][^>]*>/g;let n="",r=0;for(const a of e.matchAll(t)){const s=a.index,u=s+a[0].length,l=e.slice(r,s).replace(/</g,"&lt;").replace(/>/g,"&gt;");n+=l+a[0],r=u}const i=e.slice(r).replace(/</g,"&lt;").replace(/>/g,"&gt;");return n+=i,n=n.replace(/\[object Object\]/g,""),n},ng=e=>{let t="",n=!1;for(let r=0;r<e.length;r++){const i=e[r];if(i==='"')if(n)if(r+1<e.length&&e[r+1]==='"')t+='""',r++;else{let a=r+1;for(;a<e.length&&(e[a]===" "||e[a]===" ");)a++;a>=e.length||e[a]===","||e[a]===`
73
- `||e[a]==="\r"?(n=!1,t+='"'):t+='""'}else n=!0,t+='"';else t+=i}return t},nu=e=>{const t=ME(e),n=tk().use(NE,{singleTilde:!0}).use(Bw).parse(t),r=(a,s,u)=>{var f;const{type:l,value:c}=a;let h={};if(l==="root"){const{children:d}=a;return d.map(m=>r(m,s)).flat()}if(s){if(l==="list"){const{children:d}=a;return d.map(m=>r(m,h,u)).flat()}else if(l==="listItem"){const{children:d}=a;return d.map(m=>{const v=u!=null&&u.prefix?u.prefix:m.type==="list"?" - ":"* ",x=r(m,h,{prefix:v});return x.type==="paragraph"&&x.children&&(x.children.length>1?x.children=[{text:v},...x.children]:x.children=x.children.map(S=>(S.text&&(S.text=`${v}${S.text}`),S))),x}).flat()}else if(l==="paragraph"){h={type:"paragraph",children:[]};const{children:d}=a,m=d.map(v=>r(v,h));h.children=m}else if(l==="mdxJsxTextElement"){const{name:d}=a;if(d==="ds"){h={type:"datasource",children:[]};const{children:m,attributes:v}=a;if(m){const x=r(m[0],h);h.children=[x]}if(v){const x=v.reduce((S,b)=>({...S,[b.name]:b.value}),{});h={...h,...x}}}else if(d==="i18n"){h={type:"i18n",children:""};const{children:m,attributes:v}=a;if(m){const x=r(m[0],h);h.children=[x]}if(v){const x=v.reduce((S,b)=>({...S,[b.name]:b.value}),{});h={...h,...x}}}else if(d==="u"){h={underlined:!0};const{children:m}=a;if(m){const v=r(m[0],h);h={...h,...v}}}else if(d==="link"){h={type:"link",children:[]};const{children:m,attributes:v}=a;if(m){const x=r(m[0],h);h.children=[x]}if(v){const x=v.reduce((S,b)=>({...S,[b.name]:b.value}),{});h={...h,...x}}}else d==="e"&&(h={text:""})}else if(l==="text")h={text:c};else if(l==="strong"){h={bold:!0};const{children:d}=a;if(d){const m=r(d[0],h);h={...h,...m}}}else if(l==="emphasis"){h={italic:!0};const{children:d}=a;if(d){const m=r(d[0],h);h={...h,...m}}}else if(l==="delete"){h={strikethrough:!0};const{children:d}=a;if(d){const m=r(d[0],h);h={...h,...m}}}else if(l==="link"){const{children:d}=a;h={text:((f=d[0])==null?void 0:f.value)||""}}}else return;return h};return r(n,[])},FE=e=>{const[,t,n,r,...i]=e.split(".");return{webformName:t,componentId:n,propName:r,restOfPropPath:i.join(".")}};function vi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function ih(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rg(...e){return t=>{let n=!1;const r=e.map(i=>{const a=ih(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():ih(e[i],null)}}}}function qi(...e){return F.useCallback(rg(...e),e)}function jE(e,t){const n=F.createContext(t),r=a=>{const{children:s,...u}=a,l=F.useMemo(()=>u,Object.values(u));return T.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function i(a){const s=F.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function BE(e,t=[]){let n=[];function r(a,s){const u=F.createContext(s),l=n.length;n=[...n,s];const c=f=>{var b;const{scope:d,children:m,...v}=f,x=((b=d==null?void 0:d[e])==null?void 0:b[l])||u,S=F.useMemo(()=>v,Object.values(v));return T.jsx(x.Provider,{value:S,children:m})};c.displayName=a+"Provider";function h(f,d){var x;const m=((x=d==null?void 0:d[e])==null?void 0:x[l])||u,v=F.useContext(m);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,h]}const i=()=>{const a=n.map(s=>F.createContext(s));return function(u){const l=(u==null?void 0:u[e])||a;return F.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[r,zE(i,...t)]}function zE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=r.reduce((u,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...u,...f}},{});return F.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Ai=globalThis!=null&&globalThis.document?F.useLayoutEffect:()=>{},$E=F[" useId ".trim().toString()]||(()=>{}),UE=0;function ru(e){const[t,n]=F.useState($E());return Ai(()=>{n(r=>r??String(UE++))},[e]),e||(t?`radix-${t}`:"")}var HE=F[" useInsertionEffect ".trim().toString()]||Ai;function WE({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,s]=qE({defaultProp:t,onChange:n}),u=e!==void 0,l=u?e:i;{const h=F.useRef(e!==void 0);F.useEffect(()=>{const f=h.current;f!==u&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=u},[u,r])}const c=F.useCallback(h=>{var f;if(u){const d=KE(h)?h(e):h;d!==e&&((f=s.current)==null||f.call(s,d))}else a(h)},[u,e,a,s]);return[l,c]}function qE({defaultProp:e,onChange:t}){const[n,r]=F.useState(e),i=F.useRef(n),a=F.useRef(t);return HE(()=>{a.current=t},[t]),F.useEffect(()=>{var s;i.current!==n&&((s=a.current)==null||s.call(a,n),i.current=n)},[n,i]),[n,r,a]}function KE(e){return typeof e=="function"}function iu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function ah(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ig(...e){return t=>{let n=!1;const r=e.map(i=>{const a=ah(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():ah(e[i],null)}}}}function ag(...e){return F.useCallback(ig(...e),e)}function GE(e){const t=JE(e),n=F.forwardRef((r,i)=>{const{children:a,...s}=r,u=F.Children.toArray(a),l=u.find(XE);if(l){const c=l.props.children,h=u.map(f=>f===l?F.Children.count(c)>1?F.Children.only(null):F.isValidElement(c)?c.props.children:null:f);return T.jsx(t,{...s,ref:i,children:F.isValidElement(c)?F.cloneElement(c,void 0,h):null})}return T.jsx(t,{...s,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function JE(e){const t=F.forwardRef((n,r)=>{const{children:i,...a}=n;if(F.isValidElement(i)){const s=ZE(i),u=QE(a,i.props);return i.type!==F.Fragment&&(u.ref=r?ig(r,s):s),F.cloneElement(i,u)}return F.Children.count(i)>1?F.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YE=Symbol("radix.slottable");function XE(e){return F.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YE}function QE(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const l=a(...u);return i(...u),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function ZE(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var e_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sg=e_.reduce((e,t)=>{const n=GE(`Primitive.${t}`),r=F.forwardRef((i,a)=>{const{asChild:s,...u}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(l,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function t_(e,t){e&&W0.flushSync(()=>e.dispatchEvent(t))}function Ul(e){const t=F.useRef(e);return F.useEffect(()=>{t.current=e}),F.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function n_(e,t=globalThis==null?void 0:globalThis.document){const n=Ul(e);F.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var r_="DismissableLayer",Yu="dismissableLayer.update",i_="dismissableLayer.pointerDownOutside",a_="dismissableLayer.focusOutside",sh,og=F.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ug=F.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...l}=e,c=F.useContext(og),[h,f]=F.useState(null),d=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=F.useState({}),v=ag(t,E=>f(E)),x=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=x.indexOf(S),k=h?x.indexOf(h):-1,_=c.layersWithOutsidePointerEventsDisabled.size>0,P=k>=b,w=u_(E=>{const D=E.target,j=[...c.branches].some(N=>N.contains(D));!P||j||(i==null||i(E),s==null||s(E),E.defaultPrevented||u==null||u())},d),g=l_(E=>{const D=E.target;[...c.branches].some(N=>N.contains(D))||(a==null||a(E),s==null||s(E),E.defaultPrevented||u==null||u())},d);return n_(E=>{k===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&u&&(E.preventDefault(),u()))},d),F.useEffect(()=>{if(h)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(sh=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),oh(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=sh)}},[h,d,n,c]),F.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),oh())},[h,c]),F.useEffect(()=>{const E=()=>m({});return document.addEventListener(Yu,E),()=>document.removeEventListener(Yu,E)},[]),T.jsx(sg.div,{...l,ref:v,style:{pointerEvents:_?P?"auto":"none":void 0,...e.style},onFocusCapture:iu(e.onFocusCapture,g.onFocusCapture),onBlurCapture:iu(e.onBlurCapture,g.onBlurCapture),onPointerDownCapture:iu(e.onPointerDownCapture,w.onPointerDownCapture)})});ug.displayName=r_;var s_="DismissableLayerBranch",o_=F.forwardRef((e,t)=>{const n=F.useContext(og),r=F.useRef(null),i=ag(t,r);return F.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),T.jsx(sg.div,{...e,ref:i})});o_.displayName=s_;function u_(e,t=globalThis==null?void 0:globalThis.document){const n=Ul(e),r=F.useRef(!1),i=F.useRef(()=>{});return F.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let l=function(){lg(i_,n,c,{discrete:!0})};const c={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function l_(e,t=globalThis==null?void 0:globalThis.document){const n=Ul(e),r=F.useRef(!1);return F.useEffect(()=>{const i=a=>{a.target&&!r.current&&lg(a_,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function oh(){const e=new CustomEvent(Yu);document.dispatchEvent(e)}function lg(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?t_(i,a):i.dispatchEvent(a)}function cg(e){const t=c_(e),n=F.forwardRef((r,i)=>{const{children:a,...s}=r,u=F.Children.toArray(a),l=u.find(h_);if(l){const c=l.props.children,h=u.map(f=>f===l?F.Children.count(c)>1?F.Children.only(null):F.isValidElement(c)?c.props.children:null:f);return T.jsx(t,{...s,ref:i,children:F.isValidElement(c)?F.cloneElement(c,void 0,h):null})}return T.jsx(t,{...s,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function c_(e){const t=F.forwardRef((n,r)=>{const{children:i,...a}=n;if(F.isValidElement(i)){const s=d_(i),u=p_(a,i.props);return i.type!==F.Fragment&&(u.ref=r?rg(r,s):s),F.cloneElement(i,u)}return F.Children.count(i)>1?F.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var f_=Symbol("radix.slottable");function h_(e){return F.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===f_}function p_(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const l=a(...u);return i(...u),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function d_(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var m_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_r=m_.reduce((e,t)=>{const n=cg(`Primitive.${t}`),r=F.forwardRef((i,a)=>{const{asChild:s,...u}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(l,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function uh(e){const t=F.useRef(e);return F.useEffect(()=>{t.current=e}),F.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var au="focusScope.autoFocusOnMount",su="focusScope.autoFocusOnUnmount",lh={bubbles:!1,cancelable:!0},g_="FocusScope",fg=F.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[u,l]=F.useState(null),c=uh(i),h=uh(a),f=F.useRef(null),d=qi(t,x=>l(x)),m=F.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;F.useEffect(()=>{if(r){let x=function(_){if(m.paused||!u)return;const P=_.target;u.contains(P)?f.current=P:Gn(f.current,{select:!0})},S=function(_){if(m.paused||!u)return;const P=_.relatedTarget;P!==null&&(u.contains(P)||Gn(f.current,{select:!0}))},b=function(_){if(document.activeElement===document.body)for(const w of _)w.removedNodes.length>0&&Gn(u)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const k=new MutationObserver(b);return u&&k.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),k.disconnect()}}},[r,u,m.paused]),F.useEffect(()=>{if(u){fh.add(m);const x=document.activeElement;if(!u.contains(x)){const b=new CustomEvent(au,lh);u.addEventListener(au,c),u.dispatchEvent(b),b.defaultPrevented||(v_(S_(hg(u)),{select:!0}),document.activeElement===x&&Gn(u))}return()=>{u.removeEventListener(au,c),setTimeout(()=>{const b=new CustomEvent(su,lh);u.addEventListener(su,h),u.dispatchEvent(b),b.defaultPrevented||Gn(x??document.body,{select:!0}),u.removeEventListener(su,h),fh.remove(m)},0)}}},[u,c,h,m]);const v=F.useCallback(x=>{if(!n&&!r||m.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,b=document.activeElement;if(S&&b){const k=x.currentTarget,[_,P]=x_(k);_&&P?!x.shiftKey&&b===P?(x.preventDefault(),n&&Gn(_,{select:!0})):x.shiftKey&&b===_&&(x.preventDefault(),n&&Gn(P,{select:!0})):b===k&&x.preventDefault()}},[n,r,m.paused]);return T.jsx(_r.div,{tabIndex:-1,...s,ref:d,onKeyDown:v})});fg.displayName=g_;function v_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gn(r,{select:t}),document.activeElement!==n)return}function x_(e){const t=hg(e),n=ch(t,e),r=ch(t.reverse(),e);return[n,r]}function hg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ch(e,t){for(const n of e)if(!b_(n,{upTo:t}))return n}function b_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function y_(e){return e instanceof HTMLInputElement&&"select"in e}function Gn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&y_(e)&&t&&e.select()}}var fh=w_();function w_(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=hh(e,t),e.unshift(t)},remove(t){var n;e=hh(e,t),(n=e[0])==null||n.resume()}}}function hh(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function S_(e){return e.filter(t=>t.tagName!=="A")}var C_="Portal",pg=F.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,a]=F.useState(!1);Ai(()=>a(!0),[]);const s=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return s?ed.createPortal(T.jsx(_r.div,{...r,ref:t}),s):null});pg.displayName=C_;function k_(e,t){return F.useReducer((n,r)=>t[n][r]??n,e)}var Gs=e=>{const{present:t,children:n}=e,r=E_(t),i=typeof n=="function"?n({present:r.isPresent}):F.Children.only(n),a=qi(r.ref,__(i));return typeof n=="function"||r.isPresent?F.cloneElement(i,{ref:a}):null};Gs.displayName="Presence";function E_(e){const[t,n]=F.useState(),r=F.useRef(null),i=F.useRef(e),a=F.useRef("none"),s=e?"mounted":"unmounted",[u,l]=k_(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return F.useEffect(()=>{const c=Ta(r.current);a.current=u==="mounted"?c:"none"},[u]),Ai(()=>{const c=r.current,h=i.current;if(h!==e){const d=a.current,m=Ta(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(h&&d!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Ai(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,f=m=>{const x=Ta(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&x&&(l("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},d=m=>{m.target===t&&(a.current=Ta(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{h.clearTimeout(c),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:F.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Ta(e){return(e==null?void 0:e.animationName)||"none"}function __(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ou=0;function I_(){F.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ph()),document.body.insertAdjacentElement("beforeend",e[1]??ph()),ou++,()=>{ou===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ou--}},[])}function ph(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Xa="right-scroll-bar-position",Qa="width-before-scroll-bar",T_="with-scroll-bars-hidden",A_="--removed-body-scroll-bar-size";function uu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function P_(e,t){var n=M.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var R_=typeof window<"u"?F.useLayoutEffect:F.useEffect,dh=new WeakMap;function N_(e,t){var n=P_(null,function(r){return e.forEach(function(i){return uu(i,r)})});return R_(function(){var r=dh.get(n);if(r){var i=new Set(r),a=new Set(e),s=n.current;i.forEach(function(u){a.has(u)||uu(u,null)}),a.forEach(function(u){i.has(u)||uu(u,s)})}dh.set(n,e)},[e]),n}function O_(e){return e}function L_(e,t){t===void 0&&(t=O_);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(u){return u!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var u=n;n=[],u.forEach(a),s=n}var l=function(){var h=s;s=[],h.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(h){s.push(h),c()},filter:function(h){return s=s.filter(h),n}}}};return i}function D_(e){e===void 0&&(e={});var t=L_(null);return t.options=de({async:!0,ssr:!1},e),t}var dg=function(e){var t=e.sideCar,n=jt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return F.createElement(r,de({},n))};dg.isSideCarExport=!0;function V_(e,t){return e.useMedium(t),dg}var mg=D_(),lu=function(){},Js=F.forwardRef(function(e,t){var n=F.useRef(null),r=F.useState({onScrollCapture:lu,onWheelCapture:lu,onTouchMoveCapture:lu}),i=r[0],a=r[1],s=e.forwardProps,u=e.children,l=e.className,c=e.removeScrollBar,h=e.enabled,f=e.shards,d=e.sideCar,m=e.noRelative,v=e.noIsolation,x=e.inert,S=e.allowPinchZoom,b=e.as,k=b===void 0?"div":b,_=e.gapMode,P=jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,g=N_([n,t]),E=de(de({},P),i);return F.createElement(F.Fragment,null,h&&F.createElement(w,{sideCar:mg,removeScrollBar:c,shards:f,noRelative:m,noIsolation:v,inert:x,setCallbacks:a,allowPinchZoom:!!S,lockRef:n,gapMode:_}),s?F.cloneElement(F.Children.only(u),de(de({},E),{ref:g})):F.createElement(k,de({},E,{className:l,ref:g}),u))});Js.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Js.classNames={fullWidth:Qa,zeroRight:Xa};var M_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function F_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=M_();return t&&e.setAttribute("nonce",t),e}function j_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function B_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var z_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=F_())&&(j_(t,n),B_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$_=function(){var e=z_();return function(t,n){F.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gg=function(){var e=$_(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},U_={left:0,top:0,right:0,gap:0},cu=function(e){return parseInt(e||"",10)||0},H_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[cu(n),cu(r),cu(i)]},W_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return U_;var t=H_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},q_=gg(),Ur="data-scroll-locked",K_=function(e,t,n,r){var i=e.left,a=e.top,s=e.right,u=e.gap;return n===void 0&&(n="margin"),`
74
- .`.concat(T_,` {
72
+ `),jE=e=>{const t=/<\/?[a-zA-Z][^>]*>/g;let n="",r=0;for(const a of e.matchAll(t)){const s=a.index,u=s+a[0].length,l=e.slice(r,s).replace(/</g,"&lt;").replace(/>/g,"&gt;");n+=l+a[0],r=u}const i=e.slice(r).replace(/</g,"&lt;").replace(/>/g,"&gt;");return n+=i,n=n.replace(/\[object Object\]/g,""),n},ig=e=>{let t="",n=!1;for(let r=0;r<e.length;r++){const i=e[r];if(i==='"')if(n)if(r+1<e.length&&e[r+1]==='"')t+='""',r++;else{let a=r+1;for(;a<e.length&&(e[a]===" "||e[a]===" ");)a++;a>=e.length||e[a]===","||e[a]===`
73
+ `||e[a]==="\r"?(n=!1,t+='"'):t+='""'}else n=!0,t+='"';else t+=i}return t},iu=e=>{const t=jE(e),n=rk().use(LE,{singleTilde:!0}).use($w).parse(t),r=(a,s,u)=>{var f;const{type:l,value:c}=a;let h={};if(l==="root"){const{children:d}=a;return d.map(m=>r(m,s)).flat()}if(s){if(l==="list"){const{children:d}=a;return d.map(m=>r(m,h,u)).flat()}else if(l==="listItem"){const{children:d}=a;return d.map(m=>{const v=u!=null&&u.prefix?u.prefix:m.type==="list"?" - ":"* ",x=r(m,h,{prefix:v});return x.type==="paragraph"&&x.children&&(x.children.length>1?x.children=[{text:v},...x.children]:x.children=x.children.map(S=>(S.text&&(S.text=`${v}${S.text}`),S))),x}).flat()}else if(l==="paragraph"){h={type:"paragraph",children:[]};const{children:d}=a,m=d.map(v=>r(v,h));h.children=m}else if(l==="mdxJsxTextElement"){const{name:d}=a;if(d==="ds"){h={type:"datasource",children:[]};const{children:m,attributes:v}=a;if(m){const x=r(m[0],h);h.children=[x]}if(v){const x=v.reduce((S,y)=>({...S,[y.name]:y.value}),{});h={...h,...x}}}else if(d==="i18n"){h={type:"i18n",children:""};const{children:m,attributes:v}=a;if(m){const x=r(m[0],h);h.children=[x]}if(v){const x=v.reduce((S,y)=>({...S,[y.name]:y.value}),{});h={...h,...x}}}else if(d==="u"){h={underlined:!0};const{children:m}=a;if(m){const v=r(m[0],h);h={...h,...v}}}else if(d==="link"){h={type:"link",children:[]};const{children:m,attributes:v}=a;if(m){const x=r(m[0],h);h.children=[x]}if(v){const x=v.reduce((S,y)=>({...S,[y.name]:y.value}),{});h={...h,...x}}}else d==="e"&&(h={text:""})}else if(l==="text")h={text:c};else if(l==="strong"){h={bold:!0};const{children:d}=a;if(d){const m=r(d[0],h);h={...h,...m}}}else if(l==="emphasis"){h={italic:!0};const{children:d}=a;if(d){const m=r(d[0],h);h={...h,...m}}}else if(l==="delete"){h={strikethrough:!0};const{children:d}=a;if(d){const m=r(d[0],h);h={...h,...m}}}else if(l==="link"){const{children:d}=a;h={text:((f=d[0])==null?void 0:f.value)||""}}}else return;return h};return r(n,[])},BE=e=>{const[,t,n,r,...i]=e.split(".");return{webformName:t,componentId:n,propName:r,restOfPropPath:i.join(".")}};function vi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function sh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ag(...e){return t=>{let n=!1;const r=e.map(i=>{const a=sh(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():sh(e[i],null)}}}}function qi(...e){return j.useCallback(ag(...e),e)}function zE(e,t){const n=j.createContext(t),r=a=>{const{children:s,...u}=a,l=j.useMemo(()=>u,Object.values(u));return T.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function i(a){const s=j.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function $E(e,t=[]){let n=[];function r(a,s){const u=j.createContext(s),l=n.length;n=[...n,s];const c=f=>{var y;const{scope:d,children:m,...v}=f,x=((y=d==null?void 0:d[e])==null?void 0:y[l])||u,S=j.useMemo(()=>v,Object.values(v));return T.jsx(x.Provider,{value:S,children:m})};c.displayName=a+"Provider";function h(f,d){var x;const m=((x=d==null?void 0:d[e])==null?void 0:x[l])||u,v=j.useContext(m);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,h]}const i=()=>{const a=n.map(s=>j.createContext(s));return function(u){const l=(u==null?void 0:u[e])||a;return j.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[r,UE(i,...t)]}function UE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=r.reduce((u,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...u,...f}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Ai=globalThis!=null&&globalThis.document?j.useLayoutEffect:()=>{},HE=j[" useId ".trim().toString()]||(()=>{}),WE=0;function au(e){const[t,n]=j.useState(HE());return Ai(()=>{n(r=>r??String(WE++))},[e]),e||(t?`radix-${t}`:"")}var qE=j[" useInsertionEffect ".trim().toString()]||Ai;function KE({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,s]=GE({defaultProp:t,onChange:n}),u=e!==void 0,l=u?e:i;{const h=j.useRef(e!==void 0);j.useEffect(()=>{const f=h.current;f!==u&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=u},[u,r])}const c=j.useCallback(h=>{var f;if(u){const d=JE(h)?h(e):h;d!==e&&((f=s.current)==null||f.call(s,d))}else a(h)},[u,e,a,s]);return[l,c]}function GE({defaultProp:e,onChange:t}){const[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return qE(()=>{a.current=t},[t]),j.useEffect(()=>{var s;i.current!==n&&((s=a.current)==null||s.call(a,n),i.current=n)},[n,i]),[n,r,a]}function JE(e){return typeof e=="function"}function su(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function oh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sg(...e){return t=>{let n=!1;const r=e.map(i=>{const a=oh(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():oh(e[i],null)}}}}function og(...e){return j.useCallback(sg(...e),e)}function YE(e){const t=XE(e),n=j.forwardRef((r,i)=>{const{children:a,...s}=r,u=j.Children.toArray(a),l=u.find(ZE);if(l){const c=l.props.children,h=u.map(f=>f===l?j.Children.count(c)>1?j.Children.only(null):j.isValidElement(c)?c.props.children:null:f);return T.jsx(t,{...s,ref:i,children:j.isValidElement(c)?j.cloneElement(c,void 0,h):null})}return T.jsx(t,{...s,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function XE(e){const t=j.forwardRef((n,r)=>{const{children:i,...a}=n;if(j.isValidElement(i)){const s=t_(i),u=e_(a,i.props);return i.type!==j.Fragment&&(u.ref=r?sg(r,s):s),j.cloneElement(i,u)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var QE=Symbol("radix.slottable");function ZE(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===QE}function e_(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const l=a(...u);return i(...u),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function t_(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var n_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ug=n_.reduce((e,t)=>{const n=YE(`Primitive.${t}`),r=j.forwardRef((i,a)=>{const{asChild:s,...u}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(l,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function r_(e,t){e&&K0.flushSync(()=>e.dispatchEvent(t))}function Wl(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function i_(e,t=globalThis==null?void 0:globalThis.document){const n=Wl(e);j.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var a_="DismissableLayer",Qu="dismissableLayer.update",s_="dismissableLayer.pointerDownOutside",o_="dismissableLayer.focusOutside",uh,lg=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cg=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...l}=e,c=j.useContext(lg),[h,f]=j.useState(null),d=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=j.useState({}),v=og(t,E=>f(E)),x=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=x.indexOf(S),k=h?x.indexOf(h):-1,_=c.layersWithOutsidePointerEventsDisabled.size>0,P=k>=y,w=c_(E=>{const D=E.target,F=[...c.branches].some(R=>R.contains(D));!P||F||(i==null||i(E),s==null||s(E),E.defaultPrevented||u==null||u())},d),g=f_(E=>{const D=E.target;[...c.branches].some(R=>R.contains(D))||(a==null||a(E),s==null||s(E),E.defaultPrevented||u==null||u())},d);return i_(E=>{k===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&u&&(E.preventDefault(),u()))},d),j.useEffect(()=>{if(h)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(uh=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),lh(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=uh)}},[h,d,n,c]),j.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),lh())},[h,c]),j.useEffect(()=>{const E=()=>m({});return document.addEventListener(Qu,E),()=>document.removeEventListener(Qu,E)},[]),T.jsx(ug.div,{...l,ref:v,style:{pointerEvents:_?P?"auto":"none":void 0,...e.style},onFocusCapture:su(e.onFocusCapture,g.onFocusCapture),onBlurCapture:su(e.onBlurCapture,g.onBlurCapture),onPointerDownCapture:su(e.onPointerDownCapture,w.onPointerDownCapture)})});cg.displayName=a_;var u_="DismissableLayerBranch",l_=j.forwardRef((e,t)=>{const n=j.useContext(lg),r=j.useRef(null),i=og(t,r);return j.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),T.jsx(ug.div,{...e,ref:i})});l_.displayName=u_;function c_(e,t=globalThis==null?void 0:globalThis.document){const n=Wl(e),r=j.useRef(!1),i=j.useRef(()=>{});return j.useEffect(()=>{const a=u=>{if(u.target&&!r.current){let l=function(){fg(s_,n,c,{discrete:!0})};const c={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function f_(e,t=globalThis==null?void 0:globalThis.document){const n=Wl(e),r=j.useRef(!1);return j.useEffect(()=>{const i=a=>{a.target&&!r.current&&fg(o_,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lh(){const e=new CustomEvent(Qu);document.dispatchEvent(e)}function fg(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?r_(i,a):i.dispatchEvent(a)}function hg(e){const t=h_(e),n=j.forwardRef((r,i)=>{const{children:a,...s}=r,u=j.Children.toArray(a),l=u.find(d_);if(l){const c=l.props.children,h=u.map(f=>f===l?j.Children.count(c)>1?j.Children.only(null):j.isValidElement(c)?c.props.children:null:f);return T.jsx(t,{...s,ref:i,children:j.isValidElement(c)?j.cloneElement(c,void 0,h):null})}return T.jsx(t,{...s,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function h_(e){const t=j.forwardRef((n,r)=>{const{children:i,...a}=n;if(j.isValidElement(i)){const s=g_(i),u=m_(a,i.props);return i.type!==j.Fragment&&(u.ref=r?ag(r,s):s),j.cloneElement(i,u)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var p_=Symbol("radix.slottable");function d_(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===p_}function m_(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...u)=>{const l=a(...u);return i(...u),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function g_(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var v_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_r=v_.reduce((e,t)=>{const n=hg(`Primitive.${t}`),r=j.forwardRef((i,a)=>{const{asChild:s,...u}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(l,{...u,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ch(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ou="focusScope.autoFocusOnMount",uu="focusScope.autoFocusOnUnmount",fh={bubbles:!1,cancelable:!0},x_="FocusScope",pg=j.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[u,l]=j.useState(null),c=ch(i),h=ch(a),f=j.useRef(null),d=qi(t,x=>l(x)),m=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let x=function(_){if(m.paused||!u)return;const P=_.target;u.contains(P)?f.current=P:Gn(f.current,{select:!0})},S=function(_){if(m.paused||!u)return;const P=_.relatedTarget;P!==null&&(u.contains(P)||Gn(f.current,{select:!0}))},y=function(_){if(document.activeElement===document.body)for(const w of _)w.removedNodes.length>0&&Gn(u)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const k=new MutationObserver(y);return u&&k.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),k.disconnect()}}},[r,u,m.paused]),j.useEffect(()=>{if(u){ph.add(m);const x=document.activeElement;if(!u.contains(x)){const y=new CustomEvent(ou,fh);u.addEventListener(ou,c),u.dispatchEvent(y),y.defaultPrevented||(y_(k_(dg(u)),{select:!0}),document.activeElement===x&&Gn(u))}return()=>{u.removeEventListener(ou,c),setTimeout(()=>{const y=new CustomEvent(uu,fh);u.addEventListener(uu,h),u.dispatchEvent(y),y.defaultPrevented||Gn(x??document.body,{select:!0}),u.removeEventListener(uu,h),ph.remove(m)},0)}}},[u,c,h,m]);const v=j.useCallback(x=>{if(!n&&!r||m.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,y=document.activeElement;if(S&&y){const k=x.currentTarget,[_,P]=b_(k);_&&P?!x.shiftKey&&y===P?(x.preventDefault(),n&&Gn(_,{select:!0})):x.shiftKey&&y===_&&(x.preventDefault(),n&&Gn(P,{select:!0})):y===k&&x.preventDefault()}},[n,r,m.paused]);return T.jsx(_r.div,{tabIndex:-1,...s,ref:d,onKeyDown:v})});pg.displayName=x_;function y_(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gn(r,{select:t}),document.activeElement!==n)return}function b_(e){const t=dg(e),n=hh(t,e),r=hh(t.reverse(),e);return[n,r]}function dg(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hh(e,t){for(const n of e)if(!w_(n,{upTo:t}))return n}function w_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function S_(e){return e instanceof HTMLInputElement&&"select"in e}function Gn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&S_(e)&&t&&e.select()}}var ph=C_();function C_(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=dh(e,t),e.unshift(t)},remove(t){var n;e=dh(e,t),(n=e[0])==null||n.resume()}}}function dh(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function k_(e){return e.filter(t=>t.tagName!=="A")}var E_="Portal",mg=j.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[i,a]=j.useState(!1);Ai(()=>a(!0),[]);const s=n||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return s?nd.createPortal(T.jsx(_r.div,{...r,ref:t}),s):null});mg.displayName=E_;function __(e,t){return j.useReducer((n,r)=>t[n][r]??n,e)}var Js=e=>{const{present:t,children:n}=e,r=I_(t),i=typeof n=="function"?n({present:r.isPresent}):j.Children.only(n),a=qi(r.ref,T_(i));return typeof n=="function"||r.isPresent?j.cloneElement(i,{ref:a}):null};Js.displayName="Presence";function I_(e){const[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef("none"),s=e?"mounted":"unmounted",[u,l]=__(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const c=Aa(r.current);a.current=u==="mounted"?c:"none"},[u]),Ai(()=>{const c=r.current,h=i.current;if(h!==e){const d=a.current,m=Aa(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(h&&d!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Ai(()=>{if(t){let c;const h=t.ownerDocument.defaultView??window,f=m=>{const x=Aa(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&x&&(l("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},d=m=>{m.target===t&&(a.current=Aa(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{h.clearTimeout(c),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:j.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Aa(e){return(e==null?void 0:e.animationName)||"none"}function T_(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lu=0;function A_(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??mh()),document.body.insertAdjacentElement("beforeend",e[1]??mh()),lu++,()=>{lu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),lu--}},[])}function mh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Qa="right-scroll-bar-position",Za="width-before-scroll-bar",P_="with-scroll-bars-hidden",R_="--removed-body-scroll-bar-size";function cu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function N_(e,t){var n=M.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var O_=typeof window<"u"?j.useLayoutEffect:j.useEffect,gh=new WeakMap;function L_(e,t){var n=N_(null,function(r){return e.forEach(function(i){return cu(i,r)})});return O_(function(){var r=gh.get(n);if(r){var i=new Set(r),a=new Set(e),s=n.current;i.forEach(function(u){a.has(u)||cu(u,null)}),a.forEach(function(u){i.has(u)||cu(u,s)})}gh.set(n,e)},[e]),n}function D_(e){return e}function V_(e,t){t===void 0&&(t=D_);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(u){return u!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(u){return a(u)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var u=n;n=[],u.forEach(a),s=n}var l=function(){var h=s;s=[],h.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(h){s.push(h),c()},filter:function(h){return s=s.filter(h),n}}}};return i}function M_(e){e===void 0&&(e={});var t=V_(null);return t.options=de({async:!0,ssr:!1},e),t}var gg=function(e){var t=e.sideCar,n=jt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return j.createElement(r,de({},n))};gg.isSideCarExport=!0;function F_(e,t){return e.useMedium(t),gg}var vg=M_(),fu=function(){},Ys=j.forwardRef(function(e,t){var n=j.useRef(null),r=j.useState({onScrollCapture:fu,onWheelCapture:fu,onTouchMoveCapture:fu}),i=r[0],a=r[1],s=e.forwardProps,u=e.children,l=e.className,c=e.removeScrollBar,h=e.enabled,f=e.shards,d=e.sideCar,m=e.noRelative,v=e.noIsolation,x=e.inert,S=e.allowPinchZoom,y=e.as,k=y===void 0?"div":y,_=e.gapMode,P=jt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,g=L_([n,t]),E=de(de({},P),i);return j.createElement(j.Fragment,null,h&&j.createElement(w,{sideCar:vg,removeScrollBar:c,shards:f,noRelative:m,noIsolation:v,inert:x,setCallbacks:a,allowPinchZoom:!!S,lockRef:n,gapMode:_}),s?j.cloneElement(j.Children.only(u),de(de({},E),{ref:g})):j.createElement(k,de({},E,{className:l,ref:g}),u))});Ys.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ys.classNames={fullWidth:Za,zeroRight:Qa};var j_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function B_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=j_();return t&&e.setAttribute("nonce",t),e}function z_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var U_=function(){var e=0,t=null;return{add:function(n){e==0&&(t=B_())&&(z_(t,n),$_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},H_=function(){var e=U_();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xg=function(){var e=H_(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},W_={left:0,top:0,right:0,gap:0},hu=function(e){return parseInt(e||"",10)||0},q_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[hu(n),hu(r),hu(i)]},K_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return W_;var t=q_(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},G_=xg(),Ur="data-scroll-locked",J_=function(e,t,n,r){var i=e.left,a=e.top,s=e.right,u=e.gap;return n===void 0&&(n="margin"),`
74
+ .`.concat(P_,` {
75
75
  overflow: hidden `).concat(r,`;
76
76
  padding-right: `).concat(u,"px ").concat(r,`;
77
77
  }
@@ -88,70 +88,70 @@ Defaulting to 2020, but this will stop working in the future.`)),p.ecmaVersion=1
88
88
  `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
89
89
  }
90
90
 
91
- .`).concat(Xa,` {
91
+ .`).concat(Qa,` {
92
92
  right: `).concat(u,"px ").concat(r,`;
93
93
  }
94
94
 
95
- .`).concat(Qa,` {
95
+ .`).concat(Za,` {
96
96
  margin-right: `).concat(u,"px ").concat(r,`;
97
97
  }
98
98
 
99
- .`).concat(Xa," .").concat(Xa,` {
99
+ .`).concat(Qa," .").concat(Qa,` {
100
100
  right: 0 `).concat(r,`;
101
101
  }
102
102
 
103
- .`).concat(Qa," .").concat(Qa,` {
103
+ .`).concat(Za," .").concat(Za,` {
104
104
  margin-right: 0 `).concat(r,`;
105
105
  }
106
106
 
107
107
  body[`).concat(Ur,`] {
108
- `).concat(A_,": ").concat(u,`px;
108
+ `).concat(R_,": ").concat(u,`px;
109
109
  }
110
- `)},mh=function(){var e=parseInt(document.body.getAttribute(Ur)||"0",10);return isFinite(e)?e:0},G_=function(){F.useEffect(function(){return document.body.setAttribute(Ur,(mh()+1).toString()),function(){var e=mh()-1;e<=0?document.body.removeAttribute(Ur):document.body.setAttribute(Ur,e.toString())}},[])},J_=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;G_();var a=F.useMemo(function(){return W_(i)},[i]);return F.createElement(q_,{styles:K_(a,!t,i,n?"":"!important")})},Xu=!1;if(typeof window<"u")try{var Aa=Object.defineProperty({},"passive",{get:function(){return Xu=!0,!0}});window.addEventListener("test",Aa,Aa),window.removeEventListener("test",Aa,Aa)}catch{Xu=!1}var Rr=Xu?{passive:!1}:!1,Y_=function(e){return e.tagName==="TEXTAREA"},vg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Y_(e)&&n[t]==="visible")},X_=function(e){return vg(e,"overflowY")},Q_=function(e){return vg(e,"overflowX")},gh=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=xg(e,r);if(i){var a=bg(e,r),s=a[1],u=a[2];if(s>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Z_=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},eI=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},xg=function(e,t){return e==="v"?X_(t):Q_(t)},bg=function(e,t){return e==="v"?Z_(t):eI(t)},tI=function(e,t){return e==="h"&&t==="rtl"?-1:1},nI=function(e,t,n,r,i){var a=tI(e,window.getComputedStyle(t).direction),s=a*r,u=n.target,l=t.contains(u),c=!1,h=s>0,f=0,d=0;do{if(!u)break;var m=bg(e,u),v=m[0],x=m[1],S=m[2],b=x-S-a*v;(v||b)&&xg(e,u)&&(f+=b,d+=v);var k=u.parentNode;u=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!l&&u!==document.body||l&&(t.contains(u)||t===u));return(h&&Math.abs(f)<1||!h&&Math.abs(d)<1)&&(c=!0),c},Pa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vh=function(e){return[e.deltaX,e.deltaY]},xh=function(e){return e&&"current"in e?e.current:e},rI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},iI=function(e){return`
110
+ `)},vh=function(){var e=parseInt(document.body.getAttribute(Ur)||"0",10);return isFinite(e)?e:0},Y_=function(){j.useEffect(function(){return document.body.setAttribute(Ur,(vh()+1).toString()),function(){var e=vh()-1;e<=0?document.body.removeAttribute(Ur):document.body.setAttribute(Ur,e.toString())}},[])},X_=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Y_();var a=j.useMemo(function(){return K_(i)},[i]);return j.createElement(G_,{styles:J_(a,!t,i,n?"":"!important")})},Zu=!1;if(typeof window<"u")try{var Pa=Object.defineProperty({},"passive",{get:function(){return Zu=!0,!0}});window.addEventListener("test",Pa,Pa),window.removeEventListener("test",Pa,Pa)}catch{Zu=!1}var Rr=Zu?{passive:!1}:!1,Q_=function(e){return e.tagName==="TEXTAREA"},yg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Q_(e)&&n[t]==="visible")},Z_=function(e){return yg(e,"overflowY")},eI=function(e){return yg(e,"overflowX")},xh=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=bg(e,r);if(i){var a=wg(e,r),s=a[1],u=a[2];if(s>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tI=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},nI=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},bg=function(e,t){return e==="v"?Z_(t):eI(t)},wg=function(e,t){return e==="v"?tI(t):nI(t)},rI=function(e,t){return e==="h"&&t==="rtl"?-1:1},iI=function(e,t,n,r,i){var a=rI(e,window.getComputedStyle(t).direction),s=a*r,u=n.target,l=t.contains(u),c=!1,h=s>0,f=0,d=0;do{if(!u)break;var m=wg(e,u),v=m[0],x=m[1],S=m[2],y=x-S-a*v;(v||y)&&bg(e,u)&&(f+=y,d+=v);var k=u.parentNode;u=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!l&&u!==document.body||l&&(t.contains(u)||t===u));return(h&&Math.abs(f)<1||!h&&Math.abs(d)<1)&&(c=!0),c},Ra=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yh=function(e){return[e.deltaX,e.deltaY]},bh=function(e){return e&&"current"in e?e.current:e},aI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sI=function(e){return`
111
111
  .block-interactivity-`.concat(e,` {pointer-events: none;}
112
112
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
113
- `)},aI=0,Nr=[];function sI(e){var t=F.useRef([]),n=F.useRef([0,0]),r=F.useRef(),i=F.useState(aI++)[0],a=F.useState(gg)[0],s=F.useRef(e);F.useEffect(function(){s.current=e},[e]),F.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=Ct([e.lockRef.current],(e.shards||[]).map(xh),!0).filter(Boolean);return x.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=F.useCallback(function(x,S){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var b=Pa(x),k=n.current,_="deltaX"in x?x.deltaX:k[0]-b[0],P="deltaY"in x?x.deltaY:k[1]-b[1],w,g=x.target,E=Math.abs(_)>Math.abs(P)?"h":"v";if("touches"in x&&E==="h"&&g.type==="range")return!1;var D=window.getSelection(),j=D&&D.anchorNode,N=j?j===g||j.contains(g):!1;if(N)return!1;var B=gh(E,g);if(!B)return!0;if(B?w=E:(w=E==="v"?"h":"v",B=gh(E,g)),!B)return!1;if(!r.current&&"changedTouches"in x&&(_||P)&&(r.current=w),!w)return!0;var G=r.current||w;return nI(G,S,x,G==="h"?_:P)},[]),l=F.useCallback(function(x){var S=x;if(!(!Nr.length||Nr[Nr.length-1]!==a)){var b="deltaY"in S?vh(S):Pa(S),k=t.current.filter(function(w){return w.name===S.type&&(w.target===S.target||S.target===w.shadowParent)&&rI(w.delta,b)})[0];if(k&&k.should){S.cancelable&&S.preventDefault();return}if(!k){var _=(s.current.shards||[]).map(xh).filter(Boolean).filter(function(w){return w.contains(S.target)}),P=_.length>0?u(S,_[0]):!s.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),c=F.useCallback(function(x,S,b,k){var _={name:x,delta:S,target:b,should:k,shadowParent:oI(b)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(P){return P!==_})},1)},[]),h=F.useCallback(function(x){n.current=Pa(x),r.current=void 0},[]),f=F.useCallback(function(x){c(x.type,vh(x),x.target,u(x,e.lockRef.current))},[]),d=F.useCallback(function(x){c(x.type,Pa(x),x.target,u(x,e.lockRef.current))},[]);F.useEffect(function(){return Nr.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Rr),document.addEventListener("touchmove",l,Rr),document.addEventListener("touchstart",h,Rr),function(){Nr=Nr.filter(function(x){return x!==a}),document.removeEventListener("wheel",l,Rr),document.removeEventListener("touchmove",l,Rr),document.removeEventListener("touchstart",h,Rr)}},[]);var m=e.removeScrollBar,v=e.inert;return F.createElement(F.Fragment,null,v?F.createElement(a,{styles:iI(i)}):null,m?F.createElement(J_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function oI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const uI=V_(mg,sI);var yg=F.forwardRef(function(e,t){return F.createElement(Js,de({},e,{ref:t,sideCar:uI}))});yg.classNames=Js.classNames;var lI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Or=new WeakMap,Ra=new WeakMap,Na={},fu=0,wg=function(e){return e&&(e.host||wg(e.parentNode))},cI=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wg(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},fI=function(e,t,n,r){var i=cI(t,Array.isArray(e)?e:[e]);Na[n]||(Na[n]=new WeakMap);var a=Na[n],s=[],u=new Set,l=new Set(i),c=function(f){!f||u.has(f)||(u.add(f),c(f.parentNode))};i.forEach(c);var h=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(u.has(d))h(d);else try{var m=d.getAttribute(r),v=m!==null&&m!=="false",x=(Or.get(d)||0)+1,S=(a.get(d)||0)+1;Or.set(d,x),a.set(d,S),s.push(d),x===1&&v&&Ra.set(d,!0),S===1&&d.setAttribute(n,"true"),v||d.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",d,b)}})};return h(t),u.clear(),fu++,function(){s.forEach(function(f){var d=Or.get(f)-1,m=a.get(f)-1;Or.set(f,d),a.set(f,m),d||(Ra.has(f)||f.removeAttribute(r),Ra.delete(f)),m||f.removeAttribute(n)}),fu--,fu||(Or=new WeakMap,Or=new WeakMap,Ra=new WeakMap,Na={})}},hI=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=lI(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),fI(r,i,n,"aria-hidden")):function(){return null}},Ys="Dialog",[Sg]=BE(Ys),[pI,yn]=Sg(Ys),Cg=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,u=F.useRef(null),l=F.useRef(null),[c,h]=WE({prop:r,defaultProp:i??!1,onChange:a,caller:Ys});return T.jsx(pI,{scope:t,triggerRef:u,contentRef:l,contentId:ru(),titleId:ru(),descriptionId:ru(),open:c,onOpenChange:h,onOpenToggle:F.useCallback(()=>h(f=>!f),[h]),modal:s,children:n})};Cg.displayName=Ys;var kg="DialogTrigger",dI=F.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yn(kg,n),a=qi(t,i.triggerRef);return T.jsx(_r.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ql(i.open),...r,ref:a,onClick:vi(e.onClick,i.onOpenToggle)})});dI.displayName=kg;var Hl="DialogPortal",[mI,Eg]=Sg(Hl,{forceMount:void 0}),_g=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=yn(Hl,t);return T.jsx(mI,{scope:t,forceMount:n,children:F.Children.map(r,s=>T.jsx(Gs,{present:n||a.open,children:T.jsx(pg,{asChild:!0,container:i,children:s})}))})};_g.displayName=Hl;var ms="DialogOverlay",Ig=F.forwardRef((e,t)=>{const n=Eg(ms,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=yn(ms,e.__scopeDialog);return a.modal?T.jsx(Gs,{present:r||a.open,children:T.jsx(vI,{...i,ref:t})}):null});Ig.displayName=ms;var gI=cg("DialogOverlay.RemoveScroll"),vI=F.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yn(ms,n);return T.jsx(yg,{as:gI,allowPinchZoom:!0,shards:[i.contentRef],children:T.jsx(_r.div,{"data-state":ql(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Sr="DialogContent",Tg=F.forwardRef((e,t)=>{const n=Eg(Sr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=yn(Sr,e.__scopeDialog);return T.jsx(Gs,{present:r||a.open,children:a.modal?T.jsx(xI,{...i,ref:t}):T.jsx(bI,{...i,ref:t})})});Tg.displayName=Sr;var xI=F.forwardRef((e,t)=>{const n=yn(Sr,e.__scopeDialog),r=F.useRef(null),i=qi(t,n.contentRef,r);return F.useEffect(()=>{const a=r.current;if(a)return hI(a)},[]),T.jsx(Ag,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vi(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:vi(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&a.preventDefault()}),onFocusOutside:vi(e.onFocusOutside,a=>a.preventDefault())})}),bI=F.forwardRef((e,t)=>{const n=yn(Sr,e.__scopeDialog),r=F.useRef(!1),i=F.useRef(!1);return T.jsx(Ag,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,u;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),Ag=F.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,u=yn(Sr,n),l=F.useRef(null),c=qi(t,l);return I_(),T.jsxs(T.Fragment,{children:[T.jsx(fg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:T.jsx(ug,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":ql(u.open),...s,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(SI,{titleId:u.titleId}),T.jsx(kI,{contentRef:l,descriptionId:u.descriptionId})]})]})}),Wl="DialogTitle",Pg=F.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yn(Wl,n);return T.jsx(_r.h2,{id:i.titleId,...r,ref:t})});Pg.displayName=Wl;var Rg="DialogDescription",yI=F.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yn(Rg,n);return T.jsx(_r.p,{id:i.descriptionId,...r,ref:t})});yI.displayName=Rg;var Ng="DialogClose",wI=F.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=yn(Ng,n);return T.jsx(_r.button,{type:"button",...r,ref:t,onClick:vi(e.onClick,()=>i.onOpenChange(!1))})});wI.displayName=Ng;function ql(e){return e?"open":"closed"}var Og="DialogTitleWarning",[PL,Lg]=jE(Og,{contentName:Sr,titleName:Wl,docsSlug:"dialog"}),SI=({titleId:e})=>{const t=Lg(Og),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
113
+ `)},oI=0,Nr=[];function uI(e){var t=j.useRef([]),n=j.useRef([0,0]),r=j.useRef(),i=j.useState(oI++)[0],a=j.useState(xg)[0],s=j.useRef(e);j.useEffect(function(){s.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=Ct([e.lockRef.current],(e.shards||[]).map(bh),!0).filter(Boolean);return x.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=j.useCallback(function(x,S){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var y=Ra(x),k=n.current,_="deltaX"in x?x.deltaX:k[0]-y[0],P="deltaY"in x?x.deltaY:k[1]-y[1],w,g=x.target,E=Math.abs(_)>Math.abs(P)?"h":"v";if("touches"in x&&E==="h"&&g.type==="range")return!1;var D=window.getSelection(),F=D&&D.anchorNode,R=F?F===g||F.contains(g):!1;if(R)return!1;var B=xh(E,g);if(!B)return!0;if(B?w=E:(w=E==="v"?"h":"v",B=xh(E,g)),!B)return!1;if(!r.current&&"changedTouches"in x&&(_||P)&&(r.current=w),!w)return!0;var G=r.current||w;return iI(G,S,x,G==="h"?_:P)},[]),l=j.useCallback(function(x){var S=x;if(!(!Nr.length||Nr[Nr.length-1]!==a)){var y="deltaY"in S?yh(S):Ra(S),k=t.current.filter(function(w){return w.name===S.type&&(w.target===S.target||S.target===w.shadowParent)&&aI(w.delta,y)})[0];if(k&&k.should){S.cancelable&&S.preventDefault();return}if(!k){var _=(s.current.shards||[]).map(bh).filter(Boolean).filter(function(w){return w.contains(S.target)}),P=_.length>0?u(S,_[0]):!s.current.noIsolation;P&&S.cancelable&&S.preventDefault()}}},[]),c=j.useCallback(function(x,S,y,k){var _={name:x,delta:S,target:y,should:k,shadowParent:lI(y)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(P){return P!==_})},1)},[]),h=j.useCallback(function(x){n.current=Ra(x),r.current=void 0},[]),f=j.useCallback(function(x){c(x.type,yh(x),x.target,u(x,e.lockRef.current))},[]),d=j.useCallback(function(x){c(x.type,Ra(x),x.target,u(x,e.lockRef.current))},[]);j.useEffect(function(){return Nr.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Rr),document.addEventListener("touchmove",l,Rr),document.addEventListener("touchstart",h,Rr),function(){Nr=Nr.filter(function(x){return x!==a}),document.removeEventListener("wheel",l,Rr),document.removeEventListener("touchmove",l,Rr),document.removeEventListener("touchstart",h,Rr)}},[]);var m=e.removeScrollBar,v=e.inert;return j.createElement(j.Fragment,null,v?j.createElement(a,{styles:sI(i)}):null,m?j.createElement(X_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function lI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cI=F_(vg,uI);var Sg=j.forwardRef(function(e,t){return j.createElement(Ys,de({},e,{ref:t,sideCar:cI}))});Sg.classNames=Ys.classNames;var fI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Or=new WeakMap,Na=new WeakMap,Oa={},pu=0,Cg=function(e){return e&&(e.host||Cg(e.parentNode))},hI=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Cg(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},pI=function(e,t,n,r){var i=hI(t,Array.isArray(e)?e:[e]);Oa[n]||(Oa[n]=new WeakMap);var a=Oa[n],s=[],u=new Set,l=new Set(i),c=function(f){!f||u.has(f)||(u.add(f),c(f.parentNode))};i.forEach(c);var h=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(u.has(d))h(d);else try{var m=d.getAttribute(r),v=m!==null&&m!=="false",x=(Or.get(d)||0)+1,S=(a.get(d)||0)+1;Or.set(d,x),a.set(d,S),s.push(d),x===1&&v&&Na.set(d,!0),S===1&&d.setAttribute(n,"true"),v||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return h(t),u.clear(),pu++,function(){s.forEach(function(f){var d=Or.get(f)-1,m=a.get(f)-1;Or.set(f,d),a.set(f,m),d||(Na.has(f)||f.removeAttribute(r),Na.delete(f)),m||f.removeAttribute(n)}),pu--,pu||(Or=new WeakMap,Or=new WeakMap,Na=new WeakMap,Oa={})}},dI=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=fI(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),pI(r,i,n,"aria-hidden")):function(){return null}},Xs="Dialog",[kg]=$E(Xs),[mI,bn]=kg(Xs),Eg=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,u=j.useRef(null),l=j.useRef(null),[c,h]=KE({prop:r,defaultProp:i??!1,onChange:a,caller:Xs});return T.jsx(mI,{scope:t,triggerRef:u,contentRef:l,contentId:au(),titleId:au(),descriptionId:au(),open:c,onOpenChange:h,onOpenToggle:j.useCallback(()=>h(f=>!f),[h]),modal:s,children:n})};Eg.displayName=Xs;var _g="DialogTrigger",gI=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bn(_g,n),a=qi(t,i.triggerRef);return T.jsx(_r.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Gl(i.open),...r,ref:a,onClick:vi(e.onClick,i.onOpenToggle)})});gI.displayName=_g;var ql="DialogPortal",[vI,Ig]=kg(ql,{forceMount:void 0}),Tg=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=bn(ql,t);return T.jsx(vI,{scope:t,forceMount:n,children:j.Children.map(r,s=>T.jsx(Js,{present:n||a.open,children:T.jsx(mg,{asChild:!0,container:i,children:s})}))})};Tg.displayName=ql;var gs="DialogOverlay",Ag=j.forwardRef((e,t)=>{const n=Ig(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bn(gs,e.__scopeDialog);return a.modal?T.jsx(Js,{present:r||a.open,children:T.jsx(yI,{...i,ref:t})}):null});Ag.displayName=gs;var xI=hg("DialogOverlay.RemoveScroll"),yI=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bn(gs,n);return T.jsx(Sg,{as:xI,allowPinchZoom:!0,shards:[i.contentRef],children:T.jsx(_r.div,{"data-state":Gl(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Cr="DialogContent",Pg=j.forwardRef((e,t)=>{const n=Ig(Cr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=bn(Cr,e.__scopeDialog);return T.jsx(Js,{present:r||a.open,children:a.modal?T.jsx(bI,{...i,ref:t}):T.jsx(wI,{...i,ref:t})})});Pg.displayName=Cr;var bI=j.forwardRef((e,t)=>{const n=bn(Cr,e.__scopeDialog),r=j.useRef(null),i=qi(t,n.contentRef,r);return j.useEffect(()=>{const a=r.current;if(a)return dI(a)},[]),T.jsx(Rg,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vi(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:vi(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&a.preventDefault()}),onFocusOutside:vi(e.onFocusOutside,a=>a.preventDefault())})}),wI=j.forwardRef((e,t)=>{const n=bn(Cr,e.__scopeDialog),r=j.useRef(!1),i=j.useRef(!1);return T.jsx(Rg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,u;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),Rg=j.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,u=bn(Cr,n),l=j.useRef(null),c=qi(t,l);return A_(),T.jsxs(T.Fragment,{children:[T.jsx(pg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:T.jsx(cg,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Gl(u.open),...s,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(kI,{titleId:u.titleId}),T.jsx(_I,{contentRef:l,descriptionId:u.descriptionId})]})]})}),Kl="DialogTitle",Ng=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bn(Kl,n);return T.jsx(_r.h2,{id:i.titleId,...r,ref:t})});Ng.displayName=Kl;var Og="DialogDescription",SI=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bn(Og,n);return T.jsx(_r.p,{id:i.descriptionId,...r,ref:t})});SI.displayName=Og;var Lg="DialogClose",CI=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bn(Lg,n);return T.jsx(_r.button,{type:"button",...r,ref:t,onClick:vi(e.onClick,()=>i.onOpenChange(!1))})});CI.displayName=Lg;function Gl(e){return e?"open":"closed"}var Dg="DialogTitleWarning",[NL,Vg]=zE(Dg,{contentName:Cr,titleName:Kl,docsSlug:"dialog"}),kI=({titleId:e})=>{const t=Vg(Dg),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
114
114
 
115
115
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
116
116
 
117
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return F.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},CI="DialogDescriptionWarning",kI=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lg(CI).contentName}}.`;return F.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},EI=Cg,_I=_g,II=Ig,TI=Tg,AI=Pg;const Dg=({children:e,isOpen:t,onClose:n,title:r})=>T.jsx(EI,{open:t,onOpenChange:i=>!i&&n(),children:T.jsxs(_I,{container:St(),children:[T.jsx(II,{className:`fixed inset-0 z-[1000] bg-black bg-opacity-75 \r
118
- data-[state=open]:animate-in data-[state=open]:fade-in-0 \r
119
- data-[state=closed]:animate-out data-[state=closed]:fade-out-0`}),T.jsx("div",{className:"fixed inset-0 z-[1001] overflow-y-auto",children:T.jsx("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:T.jsxs(TI,{onPointerDownOutside:i=>i.preventDefault(),"aria-describedby":void 0,className:`w-full space-y-2 max-w-md transform overflow-hidden rounded border border-grey-50 bg-grey-900 px-5 py-4 text-left align-middle text-white shadow-xl\r
120
- data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:scale-95 data-[state=open]:duration-300\r
121
- data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:scale-95 data-[state=closed]:duration-200`,children:[T.jsxs("div",{className:"flex flex-col items-center justify-center space-y-2",children:[T.jsx(st.FdDownload,{className:"h-6 w-6"}),T.jsx(AI,{className:"mt-4 text-sm font-bold",children:r})]}),T.jsx("div",{className:"space-y-2",children:e})]})})})]})});var Oa={exports:{}},La={exports:{}},rt={};/** @license React v16.13.1
117
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},EI="DialogDescriptionWarning",_I=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vg(EI).contentName}}.`;return j.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},II=Eg,TI=Tg,AI=Ag,PI=Pg,RI=Ng;const Mg=({children:e,isOpen:t,onClose:n,title:r})=>T.jsx(II,{open:t,onOpenChange:i=>!i&&n(),children:T.jsxs(TI,{container:St(),children:[T.jsx(AI,{className:`fixed inset-0 z-[1000] bg-black bg-opacity-75
118
+ data-[state=open]:animate-in data-[state=open]:fade-in-0
119
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0`}),T.jsx("div",{className:"fixed inset-0 z-[1001] overflow-y-auto",children:T.jsx("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:T.jsxs(PI,{onPointerDownOutside:i=>i.preventDefault(),"aria-describedby":void 0,className:`w-full space-y-2 max-w-md transform overflow-hidden rounded border border-grey-50 bg-grey-900 px-5 py-4 text-left align-middle text-white shadow-xl
120
+ data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:scale-95 data-[state=open]:duration-300
121
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:scale-95 data-[state=closed]:duration-200`,children:[T.jsxs("div",{className:"flex flex-col items-center justify-center space-y-2",children:[T.jsx(st.FdDownload,{className:"h-6 w-6"}),T.jsx(RI,{className:"mt-4 text-sm font-bold",children:r})]}),T.jsx("div",{className:"space-y-2",children:e})]})})})]})});var La={exports:{}},Da={exports:{}},rt={};/** @license React v16.13.1
122
122
  * react-is.production.min.js
123
123
  *
124
124
  * Copyright (c) Facebook, Inc. and its affiliates.
125
125
  *
126
126
  * This source code is licensed under the MIT license found in the
127
127
  * LICENSE file in the root directory of this source tree.
128
- */var bh;function PI(){if(bh)return rt;bh=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function _(w){if(typeof w=="object"&&w!==null){var g=w.$$typeof;switch(g){case t:switch(w=w.type,w){case l:case c:case r:case a:case i:case f:return w;default:switch(w=w&&w.$$typeof,w){case u:case h:case v:case m:case s:return w;default:return g}}case n:return g}}}function P(w){return _(w)===c}return rt.AsyncMode=l,rt.ConcurrentMode=c,rt.ContextConsumer=u,rt.ContextProvider=s,rt.Element=t,rt.ForwardRef=h,rt.Fragment=r,rt.Lazy=v,rt.Memo=m,rt.Portal=n,rt.Profiler=a,rt.StrictMode=i,rt.Suspense=f,rt.isAsyncMode=function(w){return P(w)||_(w)===l},rt.isConcurrentMode=P,rt.isContextConsumer=function(w){return _(w)===u},rt.isContextProvider=function(w){return _(w)===s},rt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},rt.isForwardRef=function(w){return _(w)===h},rt.isFragment=function(w){return _(w)===r},rt.isLazy=function(w){return _(w)===v},rt.isMemo=function(w){return _(w)===m},rt.isPortal=function(w){return _(w)===n},rt.isProfiler=function(w){return _(w)===a},rt.isStrictMode=function(w){return _(w)===i},rt.isSuspense=function(w){return _(w)===f},rt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===a||w===i||w===f||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===v||w.$$typeof===m||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===S||w.$$typeof===b||w.$$typeof===k||w.$$typeof===x)},rt.typeOf=_,rt}var it={},yh;function RI(){if(yh)return it;yh=1;var e={};/** @license React v16.13.1
128
+ */var wh;function NI(){if(wh)return rt;wh=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function _(w){if(typeof w=="object"&&w!==null){var g=w.$$typeof;switch(g){case t:switch(w=w.type,w){case l:case c:case r:case a:case i:case f:return w;default:switch(w=w&&w.$$typeof,w){case u:case h:case v:case m:case s:return w;default:return g}}case n:return g}}}function P(w){return _(w)===c}return rt.AsyncMode=l,rt.ConcurrentMode=c,rt.ContextConsumer=u,rt.ContextProvider=s,rt.Element=t,rt.ForwardRef=h,rt.Fragment=r,rt.Lazy=v,rt.Memo=m,rt.Portal=n,rt.Profiler=a,rt.StrictMode=i,rt.Suspense=f,rt.isAsyncMode=function(w){return P(w)||_(w)===l},rt.isConcurrentMode=P,rt.isContextConsumer=function(w){return _(w)===u},rt.isContextProvider=function(w){return _(w)===s},rt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},rt.isForwardRef=function(w){return _(w)===h},rt.isFragment=function(w){return _(w)===r},rt.isLazy=function(w){return _(w)===v},rt.isMemo=function(w){return _(w)===m},rt.isPortal=function(w){return _(w)===n},rt.isProfiler=function(w){return _(w)===a},rt.isStrictMode=function(w){return _(w)===i},rt.isSuspense=function(w){return _(w)===f},rt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===c||w===a||w===i||w===f||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===v||w.$$typeof===m||w.$$typeof===s||w.$$typeof===u||w.$$typeof===h||w.$$typeof===S||w.$$typeof===y||w.$$typeof===k||w.$$typeof===x)},rt.typeOf=_,rt}var it={},Sh;function OI(){if(Sh)return it;Sh=1;var e={};/** @license React v16.13.1
129
129
  * react-is.development.js
130
130
  *
131
131
  * Copyright (c) Facebook, Inc. and its affiliates.
132
132
  *
133
133
  * This source code is licensed under the MIT license found in the
134
134
  * LICENSE file in the root directory of this source tree.
135
- */return e.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,u=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,h=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,x=t?Symbol.for("react.lazy"):60116,S=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,k=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function P(Z){return typeof Z=="string"||typeof Z=="function"||Z===i||Z===h||Z===s||Z===a||Z===d||Z===m||typeof Z=="object"&&Z!==null&&(Z.$$typeof===x||Z.$$typeof===v||Z.$$typeof===u||Z.$$typeof===l||Z.$$typeof===f||Z.$$typeof===b||Z.$$typeof===k||Z.$$typeof===_||Z.$$typeof===S)}function w(Z){if(typeof Z=="object"&&Z!==null){var Q=Z.$$typeof;switch(Q){case n:var W=Z.type;switch(W){case c:case h:case i:case s:case a:case d:return W;default:var ae=W&&W.$$typeof;switch(ae){case l:case f:case x:case v:case u:return ae;default:return Q}}case r:return Q}}}var g=c,E=h,D=l,j=u,N=n,B=f,G=i,U=x,re=v,ee=r,se=s,he=a,ge=d,ye=!1;function L(Z){return ye||(ye=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),J(Z)||w(Z)===c}function J(Z){return w(Z)===h}function ue(Z){return w(Z)===l}function A(Z){return w(Z)===u}function xe(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===n}function ie(Z){return w(Z)===f}function fe(Z){return w(Z)===i}function X(Z){return w(Z)===x}function H(Z){return w(Z)===v}function te(Z){return w(Z)===r}function me(Z){return w(Z)===s}function oe(Z){return w(Z)===a}function K(Z){return w(Z)===d}it.AsyncMode=g,it.ConcurrentMode=E,it.ContextConsumer=D,it.ContextProvider=j,it.Element=N,it.ForwardRef=B,it.Fragment=G,it.Lazy=U,it.Memo=re,it.Portal=ee,it.Profiler=se,it.StrictMode=he,it.Suspense=ge,it.isAsyncMode=L,it.isConcurrentMode=J,it.isContextConsumer=ue,it.isContextProvider=A,it.isElement=xe,it.isForwardRef=ie,it.isFragment=fe,it.isLazy=X,it.isMemo=H,it.isPortal=te,it.isProfiler=me,it.isStrictMode=oe,it.isSuspense=K,it.isValidElementType=P,it.typeOf=w})(),it}var wh;function Vg(){if(wh)return La.exports;wh=1;var e={};return e.NODE_ENV==="production"?La.exports=PI():La.exports=RI(),La.exports}/*
135
+ */return e.NODE_ENV!=="production"&&(function(){var t=typeof Symbol=="function"&&Symbol.for,n=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,a=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,u=t?Symbol.for("react.provider"):60109,l=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,h=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,v=t?Symbol.for("react.memo"):60115,x=t?Symbol.for("react.lazy"):60116,S=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,k=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function P(Z){return typeof Z=="string"||typeof Z=="function"||Z===i||Z===h||Z===s||Z===a||Z===d||Z===m||typeof Z=="object"&&Z!==null&&(Z.$$typeof===x||Z.$$typeof===v||Z.$$typeof===u||Z.$$typeof===l||Z.$$typeof===f||Z.$$typeof===y||Z.$$typeof===k||Z.$$typeof===_||Z.$$typeof===S)}function w(Z){if(typeof Z=="object"&&Z!==null){var Q=Z.$$typeof;switch(Q){case n:var W=Z.type;switch(W){case c:case h:case i:case s:case a:case d:return W;default:var ae=W&&W.$$typeof;switch(ae){case l:case f:case x:case v:case u:return ae;default:return Q}}case r:return Q}}}var g=c,E=h,D=l,F=u,R=n,B=f,G=i,U=x,re=v,ee=r,se=s,he=a,ge=d,be=!1;function L(Z){return be||(be=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),J(Z)||w(Z)===c}function J(Z){return w(Z)===h}function ue(Z){return w(Z)===l}function A(Z){return w(Z)===u}function ye(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===n}function ie(Z){return w(Z)===f}function fe(Z){return w(Z)===i}function X(Z){return w(Z)===x}function H(Z){return w(Z)===v}function te(Z){return w(Z)===r}function me(Z){return w(Z)===s}function oe(Z){return w(Z)===a}function K(Z){return w(Z)===d}it.AsyncMode=g,it.ConcurrentMode=E,it.ContextConsumer=D,it.ContextProvider=F,it.Element=R,it.ForwardRef=B,it.Fragment=G,it.Lazy=U,it.Memo=re,it.Portal=ee,it.Profiler=se,it.StrictMode=he,it.Suspense=ge,it.isAsyncMode=L,it.isConcurrentMode=J,it.isContextConsumer=ue,it.isContextProvider=A,it.isElement=ye,it.isForwardRef=ie,it.isFragment=fe,it.isLazy=X,it.isMemo=H,it.isPortal=te,it.isProfiler=me,it.isStrictMode=oe,it.isSuspense=K,it.isValidElementType=P,it.typeOf=w})(),it}var Ch;function Fg(){if(Ch)return Da.exports;Ch=1;var e={};return e.NODE_ENV==="production"?Da.exports=NI():Da.exports=OI(),Da.exports}/*
136
136
  object-assign
137
137
  (c) Sindre Sorhus
138
138
  @license MIT
139
- */var hu,Sh;function NI(){if(Sh)return hu;Sh=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var l=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return hu=i()?Object.assign:function(a,s){for(var u,l=r(a),c,h=1;h<arguments.length;h++){u=Object(arguments[h]);for(var f in u)t.call(u,f)&&(l[f]=u[f]);if(e){c=e(u);for(var d=0;d<c.length;d++)n.call(u,c[d])&&(l[c[d]]=u[c[d]])}}return l},hu}var pu,Ch;function Kl(){if(Ch)return pu;Ch=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return pu=e,pu}var du,kh;function Mg(){return kh||(kh=1,du=Function.call.bind(Object.prototype.hasOwnProperty)),du}var mu,Eh;function OI(){if(Eh)return mu;Eh=1;var e={},t=function(){};if(e.NODE_ENV!=="production"){var n=Kl(),r={},i=Mg();t=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function a(s,u,l,c,h){if(e.NODE_ENV!=="production"){for(var f in s)if(i(s,f)){var d;try{if(typeof s[f]!="function"){var m=Error((c||"React class")+": "+l+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}d=s[f](u,f,c,l,null,n)}catch(x){d=x}if(d&&!(d instanceof Error)&&t((c||"React class")+": type specification of "+l+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var v=h?h():"";t("Failed "+l+" type: "+d.message+(v??""))}}}}return a.resetWarningCache=function(){e.NODE_ENV!=="production"&&(r={})},mu=a,mu}var gu,_h;function LI(){if(_h)return gu;_h=1;var e={},t=Vg(),n=NI(),r=Kl(),i=Mg(),a=OI(),s=function(){};e.NODE_ENV!=="production"&&(s=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function u(){return null}return gu=function(l,c){var h=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(J){var ue=J&&(h&&J[h]||J[f]);if(typeof ue=="function")return ue}var m="<<anonymous>>",v={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:_(),arrayOf:P,element:w(),elementType:g(),instanceOf:E,node:B(),objectOf:j,oneOf:D,oneOfType:N,shape:U,exact:re};function x(J,ue){return J===ue?J!==0||1/J===1/ue:J!==J&&ue!==ue}function S(J,ue){this.message=J,this.data=ue&&typeof ue=="object"?ue:{},this.stack=""}S.prototype=Error.prototype;function b(J){if(e.NODE_ENV!=="production")var ue={},A=0;function xe(fe,X,H,te,me,oe,K){if(te=te||m,oe=oe||H,K!==r){if(c){var Z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Z.name="Invariant Violation",Z}else if(e.NODE_ENV!=="production"&&typeof console<"u"){var Q=te+":"+H;!ue[Q]&&A<3&&(s("You are manually calling a React.PropTypes validation function for the `"+oe+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),ue[Q]=!0,A++)}}return X[H]==null?fe?X[H]===null?new S("The "+me+" `"+oe+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new S("The "+me+" `"+oe+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:J(X,H,te,me,oe)}var ie=xe.bind(null,!1);return ie.isRequired=xe.bind(null,!0),ie}function k(J){function ue(A,xe,ie,fe,X,H){var te=A[xe],me=he(te);if(me!==J){var oe=ge(te);return new S("Invalid "+fe+" `"+X+"` of type "+("`"+oe+"` supplied to `"+ie+"`, expected ")+("`"+J+"`."),{expectedType:J})}return null}return b(ue)}function _(){return b(u)}function P(J){function ue(A,xe,ie,fe,X){if(typeof J!="function")return new S("Property `"+X+"` of component `"+ie+"` has invalid PropType notation inside arrayOf.");var H=A[xe];if(!Array.isArray(H)){var te=he(H);return new S("Invalid "+fe+" `"+X+"` of type "+("`"+te+"` supplied to `"+ie+"`, expected an array."))}for(var me=0;me<H.length;me++){var oe=J(H,me,ie,fe,X+"["+me+"]",r);if(oe instanceof Error)return oe}return null}return b(ue)}function w(){function J(ue,A,xe,ie,fe){var X=ue[A];if(!l(X)){var H=he(X);return new S("Invalid "+ie+" `"+fe+"` of type "+("`"+H+"` supplied to `"+xe+"`, expected a single ReactElement."))}return null}return b(J)}function g(){function J(ue,A,xe,ie,fe){var X=ue[A];if(!t.isValidElementType(X)){var H=he(X);return new S("Invalid "+ie+" `"+fe+"` of type "+("`"+H+"` supplied to `"+xe+"`, expected a single ReactElement type."))}return null}return b(J)}function E(J){function ue(A,xe,ie,fe,X){if(!(A[xe]instanceof J)){var H=J.name||m,te=L(A[xe]);return new S("Invalid "+fe+" `"+X+"` of type "+("`"+te+"` supplied to `"+ie+"`, expected ")+("instance of `"+H+"`."))}return null}return b(ue)}function D(J){if(!Array.isArray(J))return e.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),u;function ue(A,xe,ie,fe,X){for(var H=A[xe],te=0;te<J.length;te++)if(x(H,J[te]))return null;var me=JSON.stringify(J,function(K,Z){var Q=ge(Z);return Q==="symbol"?String(Z):Z});return new S("Invalid "+fe+" `"+X+"` of value `"+String(H)+"` "+("supplied to `"+ie+"`, expected one of "+me+"."))}return b(ue)}function j(J){function ue(A,xe,ie,fe,X){if(typeof J!="function")return new S("Property `"+X+"` of component `"+ie+"` has invalid PropType notation inside objectOf.");var H=A[xe],te=he(H);if(te!=="object")return new S("Invalid "+fe+" `"+X+"` of type "+("`"+te+"` supplied to `"+ie+"`, expected an object."));for(var me in H)if(i(H,me)){var oe=J(H,me,ie,fe,X+"."+me,r);if(oe instanceof Error)return oe}return null}return b(ue)}function N(J){if(!Array.isArray(J))return e.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var ue=0;ue<J.length;ue++){var A=J[ue];if(typeof A!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ye(A)+" at index "+ue+"."),u}function xe(ie,fe,X,H,te){for(var me=[],oe=0;oe<J.length;oe++){var K=J[oe],Z=K(ie,fe,X,H,te,r);if(Z==null)return null;Z.data&&i(Z.data,"expectedType")&&me.push(Z.data.expectedType)}var Q=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new S("Invalid "+H+" `"+te+"` supplied to "+("`"+X+"`"+Q+"."))}return b(xe)}function B(){function J(ue,A,xe,ie,fe){return ee(ue[A])?null:new S("Invalid "+ie+" `"+fe+"` supplied to "+("`"+xe+"`, expected a ReactNode."))}return b(J)}function G(J,ue,A,xe,ie){return new S((J||"React class")+": "+ue+" type `"+A+"."+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ie+"`.")}function U(J){function ue(A,xe,ie,fe,X){var H=A[xe],te=he(H);if(te!=="object")return new S("Invalid "+fe+" `"+X+"` of type `"+te+"` "+("supplied to `"+ie+"`, expected `object`."));for(var me in J){var oe=J[me];if(typeof oe!="function")return G(ie,fe,X,me,ge(oe));var K=oe(H,me,ie,fe,X+"."+me,r);if(K)return K}return null}return b(ue)}function re(J){function ue(A,xe,ie,fe,X){var H=A[xe],te=he(H);if(te!=="object")return new S("Invalid "+fe+" `"+X+"` of type `"+te+"` "+("supplied to `"+ie+"`, expected `object`."));var me=n({},A[xe],J);for(var oe in me){var K=J[oe];if(i(J,oe)&&typeof K!="function")return G(ie,fe,X,oe,ge(K));if(!K)return new S("Invalid "+fe+" `"+X+"` key `"+oe+"` supplied to `"+ie+"`.\nBad object: "+JSON.stringify(A[xe],null," ")+`
140
- Valid keys: `+JSON.stringify(Object.keys(J),null," "));var Z=K(H,oe,ie,fe,X+"."+oe,r);if(Z)return Z}return null}return b(ue)}function ee(J){switch(typeof J){case"number":case"string":case"undefined":return!0;case"boolean":return!J;case"object":if(Array.isArray(J))return J.every(ee);if(J===null||l(J))return!0;var ue=d(J);if(ue){var A=ue.call(J),xe;if(ue!==J.entries){for(;!(xe=A.next()).done;)if(!ee(xe.value))return!1}else for(;!(xe=A.next()).done;){var ie=xe.value;if(ie&&!ee(ie[1]))return!1}}else return!1;return!0;default:return!1}}function se(J,ue){return J==="symbol"?!0:ue?ue["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ue instanceof Symbol:!1}function he(J){var ue=typeof J;return Array.isArray(J)?"array":J instanceof RegExp?"object":se(ue,J)?"symbol":ue}function ge(J){if(typeof J>"u"||J===null)return""+J;var ue=he(J);if(ue==="object"){if(J instanceof Date)return"date";if(J instanceof RegExp)return"regexp"}return ue}function ye(J){var ue=ge(J);switch(ue){case"array":case"object":return"an "+ue;case"boolean":case"date":case"regexp":return"a "+ue;default:return ue}}function L(J){return!J.constructor||!J.constructor.name?m:J.constructor.name}return v.checkPropTypes=a,v.resetWarningCache=a.resetWarningCache,v.PropTypes=v,v},gu}var vu,Ih;function DI(){if(Ih)return vu;Ih=1;var e=Kl();function t(){}function n(){}return n.resetWarningCache=t,vu=function(){function r(s,u,l,c,h,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},vu}var Th;function VI(){if(Th)return Oa.exports;Th=1;var e={};if(e.NODE_ENV!=="production"){var t=Vg(),n=!0;Oa.exports=LI()(t.isElement,n)}else Oa.exports=DI()();return Oa.exports}var MI=VI();const pe=Hi(MI);var Da={exports:{}},ut={};/** @license React v17.0.2
139
+ */var du,kh;function LI(){if(kh)return du;kh=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var l=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return du=i()?Object.assign:function(a,s){for(var u,l=r(a),c,h=1;h<arguments.length;h++){u=Object(arguments[h]);for(var f in u)t.call(u,f)&&(l[f]=u[f]);if(e){c=e(u);for(var d=0;d<c.length;d++)n.call(u,c[d])&&(l[c[d]]=u[c[d]])}}return l},du}var mu,Eh;function Jl(){if(Eh)return mu;Eh=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mu=e,mu}var gu,_h;function jg(){return _h||(_h=1,gu=Function.call.bind(Object.prototype.hasOwnProperty)),gu}var vu,Ih;function DI(){if(Ih)return vu;Ih=1;var e={},t=function(){};if(e.NODE_ENV!=="production"){var n=Jl(),r={},i=jg();t=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function a(s,u,l,c,h){if(e.NODE_ENV!=="production"){for(var f in s)if(i(s,f)){var d;try{if(typeof s[f]!="function"){var m=Error((c||"React class")+": "+l+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}d=s[f](u,f,c,l,null,n)}catch(x){d=x}if(d&&!(d instanceof Error)&&t((c||"React class")+": type specification of "+l+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var v=h?h():"";t("Failed "+l+" type: "+d.message+(v??""))}}}}return a.resetWarningCache=function(){e.NODE_ENV!=="production"&&(r={})},vu=a,vu}var xu,Th;function VI(){if(Th)return xu;Th=1;var e={},t=Fg(),n=LI(),r=Jl(),i=jg(),a=DI(),s=function(){};e.NODE_ENV!=="production"&&(s=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function u(){return null}return xu=function(l,c){var h=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(J){var ue=J&&(h&&J[h]||J[f]);if(typeof ue=="function")return ue}var m="<<anonymous>>",v={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:_(),arrayOf:P,element:w(),elementType:g(),instanceOf:E,node:B(),objectOf:F,oneOf:D,oneOfType:R,shape:U,exact:re};function x(J,ue){return J===ue?J!==0||1/J===1/ue:J!==J&&ue!==ue}function S(J,ue){this.message=J,this.data=ue&&typeof ue=="object"?ue:{},this.stack=""}S.prototype=Error.prototype;function y(J){if(e.NODE_ENV!=="production")var ue={},A=0;function ye(fe,X,H,te,me,oe,K){if(te=te||m,oe=oe||H,K!==r){if(c){var Z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Z.name="Invariant Violation",Z}else if(e.NODE_ENV!=="production"&&typeof console<"u"){var Q=te+":"+H;!ue[Q]&&A<3&&(s("You are manually calling a React.PropTypes validation function for the `"+oe+"` prop on `"+te+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),ue[Q]=!0,A++)}}return X[H]==null?fe?X[H]===null?new S("The "+me+" `"+oe+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new S("The "+me+" `"+oe+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:J(X,H,te,me,oe)}var ie=ye.bind(null,!1);return ie.isRequired=ye.bind(null,!0),ie}function k(J){function ue(A,ye,ie,fe,X,H){var te=A[ye],me=he(te);if(me!==J){var oe=ge(te);return new S("Invalid "+fe+" `"+X+"` of type "+("`"+oe+"` supplied to `"+ie+"`, expected ")+("`"+J+"`."),{expectedType:J})}return null}return y(ue)}function _(){return y(u)}function P(J){function ue(A,ye,ie,fe,X){if(typeof J!="function")return new S("Property `"+X+"` of component `"+ie+"` has invalid PropType notation inside arrayOf.");var H=A[ye];if(!Array.isArray(H)){var te=he(H);return new S("Invalid "+fe+" `"+X+"` of type "+("`"+te+"` supplied to `"+ie+"`, expected an array."))}for(var me=0;me<H.length;me++){var oe=J(H,me,ie,fe,X+"["+me+"]",r);if(oe instanceof Error)return oe}return null}return y(ue)}function w(){function J(ue,A,ye,ie,fe){var X=ue[A];if(!l(X)){var H=he(X);return new S("Invalid "+ie+" `"+fe+"` of type "+("`"+H+"` supplied to `"+ye+"`, expected a single ReactElement."))}return null}return y(J)}function g(){function J(ue,A,ye,ie,fe){var X=ue[A];if(!t.isValidElementType(X)){var H=he(X);return new S("Invalid "+ie+" `"+fe+"` of type "+("`"+H+"` supplied to `"+ye+"`, expected a single ReactElement type."))}return null}return y(J)}function E(J){function ue(A,ye,ie,fe,X){if(!(A[ye]instanceof J)){var H=J.name||m,te=L(A[ye]);return new S("Invalid "+fe+" `"+X+"` of type "+("`"+te+"` supplied to `"+ie+"`, expected ")+("instance of `"+H+"`."))}return null}return y(ue)}function D(J){if(!Array.isArray(J))return e.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),u;function ue(A,ye,ie,fe,X){for(var H=A[ye],te=0;te<J.length;te++)if(x(H,J[te]))return null;var me=JSON.stringify(J,function(K,Z){var Q=ge(Z);return Q==="symbol"?String(Z):Z});return new S("Invalid "+fe+" `"+X+"` of value `"+String(H)+"` "+("supplied to `"+ie+"`, expected one of "+me+"."))}return y(ue)}function F(J){function ue(A,ye,ie,fe,X){if(typeof J!="function")return new S("Property `"+X+"` of component `"+ie+"` has invalid PropType notation inside objectOf.");var H=A[ye],te=he(H);if(te!=="object")return new S("Invalid "+fe+" `"+X+"` of type "+("`"+te+"` supplied to `"+ie+"`, expected an object."));for(var me in H)if(i(H,me)){var oe=J(H,me,ie,fe,X+"."+me,r);if(oe instanceof Error)return oe}return null}return y(ue)}function R(J){if(!Array.isArray(J))return e.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var ue=0;ue<J.length;ue++){var A=J[ue];if(typeof A!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+be(A)+" at index "+ue+"."),u}function ye(ie,fe,X,H,te){for(var me=[],oe=0;oe<J.length;oe++){var K=J[oe],Z=K(ie,fe,X,H,te,r);if(Z==null)return null;Z.data&&i(Z.data,"expectedType")&&me.push(Z.data.expectedType)}var Q=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new S("Invalid "+H+" `"+te+"` supplied to "+("`"+X+"`"+Q+"."))}return y(ye)}function B(){function J(ue,A,ye,ie,fe){return ee(ue[A])?null:new S("Invalid "+ie+" `"+fe+"` supplied to "+("`"+ye+"`, expected a ReactNode."))}return y(J)}function G(J,ue,A,ye,ie){return new S((J||"React class")+": "+ue+" type `"+A+"."+ye+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ie+"`.")}function U(J){function ue(A,ye,ie,fe,X){var H=A[ye],te=he(H);if(te!=="object")return new S("Invalid "+fe+" `"+X+"` of type `"+te+"` "+("supplied to `"+ie+"`, expected `object`."));for(var me in J){var oe=J[me];if(typeof oe!="function")return G(ie,fe,X,me,ge(oe));var K=oe(H,me,ie,fe,X+"."+me,r);if(K)return K}return null}return y(ue)}function re(J){function ue(A,ye,ie,fe,X){var H=A[ye],te=he(H);if(te!=="object")return new S("Invalid "+fe+" `"+X+"` of type `"+te+"` "+("supplied to `"+ie+"`, expected `object`."));var me=n({},A[ye],J);for(var oe in me){var K=J[oe];if(i(J,oe)&&typeof K!="function")return G(ie,fe,X,oe,ge(K));if(!K)return new S("Invalid "+fe+" `"+X+"` key `"+oe+"` supplied to `"+ie+"`.\nBad object: "+JSON.stringify(A[ye],null," ")+`
140
+ Valid keys: `+JSON.stringify(Object.keys(J),null," "));var Z=K(H,oe,ie,fe,X+"."+oe,r);if(Z)return Z}return null}return y(ue)}function ee(J){switch(typeof J){case"number":case"string":case"undefined":return!0;case"boolean":return!J;case"object":if(Array.isArray(J))return J.every(ee);if(J===null||l(J))return!0;var ue=d(J);if(ue){var A=ue.call(J),ye;if(ue!==J.entries){for(;!(ye=A.next()).done;)if(!ee(ye.value))return!1}else for(;!(ye=A.next()).done;){var ie=ye.value;if(ie&&!ee(ie[1]))return!1}}else return!1;return!0;default:return!1}}function se(J,ue){return J==="symbol"?!0:ue?ue["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ue instanceof Symbol:!1}function he(J){var ue=typeof J;return Array.isArray(J)?"array":J instanceof RegExp?"object":se(ue,J)?"symbol":ue}function ge(J){if(typeof J>"u"||J===null)return""+J;var ue=he(J);if(ue==="object"){if(J instanceof Date)return"date";if(J instanceof RegExp)return"regexp"}return ue}function be(J){var ue=ge(J);switch(ue){case"array":case"object":return"an "+ue;case"boolean":case"date":case"regexp":return"a "+ue;default:return ue}}function L(J){return!J.constructor||!J.constructor.name?m:J.constructor.name}return v.checkPropTypes=a,v.resetWarningCache=a.resetWarningCache,v.PropTypes=v,v},xu}var yu,Ah;function MI(){if(Ah)return yu;Ah=1;var e=Jl();function t(){}function n(){}return n.resetWarningCache=t,yu=function(){function r(s,u,l,c,h,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},yu}var Ph;function FI(){if(Ph)return La.exports;Ph=1;var e={};if(e.NODE_ENV!=="production"){var t=Fg(),n=!0;La.exports=VI()(t.isElement,n)}else La.exports=MI()();return La.exports}var jI=FI();const pe=Hi(jI);var Va={exports:{}},ut={};/** @license React v17.0.2
141
141
  * react-is.production.min.js
142
142
  *
143
143
  * Copyright (c) Facebook, Inc. and its affiliates.
144
144
  *
145
145
  * This source code is licensed under the MIT license found in the
146
146
  * LICENSE file in the root directory of this source tree.
147
- */var Ah;function FI(){if(Ah)return ut;Ah=1;var e=60103,t=60106,n=60107,r=60108,i=60114,a=60109,s=60110,u=60112,l=60113,c=60120,h=60115,f=60116,d=60121,m=60122,v=60117,x=60129,S=60131;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;e=b("react.element"),t=b("react.portal"),n=b("react.fragment"),r=b("react.strict_mode"),i=b("react.profiler"),a=b("react.provider"),s=b("react.context"),u=b("react.forward_ref"),l=b("react.suspense"),c=b("react.suspense_list"),h=b("react.memo"),f=b("react.lazy"),d=b("react.block"),m=b("react.server.block"),v=b("react.fundamental"),x=b("react.debug_trace_mode"),S=b("react.legacy_hidden")}function k(U){if(typeof U=="object"&&U!==null){var re=U.$$typeof;switch(re){case e:switch(U=U.type,U){case n:case i:case r:case l:case c:return U;default:switch(U=U&&U.$$typeof,U){case s:case u:case f:case h:case a:return U;default:return re}}case t:return re}}}var _=a,P=e,w=u,g=n,E=f,D=h,j=t,N=i,B=r,G=l;return ut.ContextConsumer=s,ut.ContextProvider=_,ut.Element=P,ut.ForwardRef=w,ut.Fragment=g,ut.Lazy=E,ut.Memo=D,ut.Portal=j,ut.Profiler=N,ut.StrictMode=B,ut.Suspense=G,ut.isAsyncMode=function(){return!1},ut.isConcurrentMode=function(){return!1},ut.isContextConsumer=function(U){return k(U)===s},ut.isContextProvider=function(U){return k(U)===a},ut.isElement=function(U){return typeof U=="object"&&U!==null&&U.$$typeof===e},ut.isForwardRef=function(U){return k(U)===u},ut.isFragment=function(U){return k(U)===n},ut.isLazy=function(U){return k(U)===f},ut.isMemo=function(U){return k(U)===h},ut.isPortal=function(U){return k(U)===t},ut.isProfiler=function(U){return k(U)===i},ut.isStrictMode=function(U){return k(U)===r},ut.isSuspense=function(U){return k(U)===l},ut.isValidElementType=function(U){return typeof U=="string"||typeof U=="function"||U===n||U===i||U===x||U===r||U===l||U===c||U===S||typeof U=="object"&&U!==null&&(U.$$typeof===f||U.$$typeof===h||U.$$typeof===a||U.$$typeof===s||U.$$typeof===u||U.$$typeof===v||U.$$typeof===d||U[0]===m)},ut.typeOf=k,ut}var lt={},Ph;function jI(){if(Ph)return lt;Ph=1;var e={};/** @license React v17.0.2
147
+ */var Rh;function BI(){if(Rh)return ut;Rh=1;var e=60103,t=60106,n=60107,r=60108,i=60114,a=60109,s=60110,u=60112,l=60113,c=60120,h=60115,f=60116,d=60121,m=60122,v=60117,x=60129,S=60131;if(typeof Symbol=="function"&&Symbol.for){var y=Symbol.for;e=y("react.element"),t=y("react.portal"),n=y("react.fragment"),r=y("react.strict_mode"),i=y("react.profiler"),a=y("react.provider"),s=y("react.context"),u=y("react.forward_ref"),l=y("react.suspense"),c=y("react.suspense_list"),h=y("react.memo"),f=y("react.lazy"),d=y("react.block"),m=y("react.server.block"),v=y("react.fundamental"),x=y("react.debug_trace_mode"),S=y("react.legacy_hidden")}function k(U){if(typeof U=="object"&&U!==null){var re=U.$$typeof;switch(re){case e:switch(U=U.type,U){case n:case i:case r:case l:case c:return U;default:switch(U=U&&U.$$typeof,U){case s:case u:case f:case h:case a:return U;default:return re}}case t:return re}}}var _=a,P=e,w=u,g=n,E=f,D=h,F=t,R=i,B=r,G=l;return ut.ContextConsumer=s,ut.ContextProvider=_,ut.Element=P,ut.ForwardRef=w,ut.Fragment=g,ut.Lazy=E,ut.Memo=D,ut.Portal=F,ut.Profiler=R,ut.StrictMode=B,ut.Suspense=G,ut.isAsyncMode=function(){return!1},ut.isConcurrentMode=function(){return!1},ut.isContextConsumer=function(U){return k(U)===s},ut.isContextProvider=function(U){return k(U)===a},ut.isElement=function(U){return typeof U=="object"&&U!==null&&U.$$typeof===e},ut.isForwardRef=function(U){return k(U)===u},ut.isFragment=function(U){return k(U)===n},ut.isLazy=function(U){return k(U)===f},ut.isMemo=function(U){return k(U)===h},ut.isPortal=function(U){return k(U)===t},ut.isProfiler=function(U){return k(U)===i},ut.isStrictMode=function(U){return k(U)===r},ut.isSuspense=function(U){return k(U)===l},ut.isValidElementType=function(U){return typeof U=="string"||typeof U=="function"||U===n||U===i||U===x||U===r||U===l||U===c||U===S||typeof U=="object"&&U!==null&&(U.$$typeof===f||U.$$typeof===h||U.$$typeof===a||U.$$typeof===s||U.$$typeof===u||U.$$typeof===v||U.$$typeof===d||U[0]===m)},ut.typeOf=k,ut}var lt={},Nh;function zI(){if(Nh)return lt;Nh=1;var e={};/** @license React v17.0.2
148
148
  * react-is.development.js
149
149
  *
150
150
  * Copyright (c) Facebook, Inc. and its affiliates.
151
151
  *
152
152
  * This source code is licensed under the MIT license found in the
153
153
  * LICENSE file in the root directory of this source tree.
154
- */return e.NODE_ENV!=="production"&&(function(){var t=60103,n=60106,r=60107,i=60108,a=60114,s=60109,u=60110,l=60112,c=60113,h=60120,f=60115,d=60116,m=60121,v=60122,x=60117,S=60129,b=60131;if(typeof Symbol=="function"&&Symbol.for){var k=Symbol.for;t=k("react.element"),n=k("react.portal"),r=k("react.fragment"),i=k("react.strict_mode"),a=k("react.profiler"),s=k("react.provider"),u=k("react.context"),l=k("react.forward_ref"),c=k("react.suspense"),h=k("react.suspense_list"),f=k("react.memo"),d=k("react.lazy"),m=k("react.block"),v=k("react.server.block"),x=k("react.fundamental"),k("react.scope"),k("react.opaque.id"),S=k("react.debug_trace_mode"),k("react.offscreen"),b=k("react.legacy_hidden")}var _=!1;function P(K){return!!(typeof K=="string"||typeof K=="function"||K===r||K===a||K===S||K===i||K===c||K===h||K===b||_||typeof K=="object"&&K!==null&&(K.$$typeof===d||K.$$typeof===f||K.$$typeof===s||K.$$typeof===u||K.$$typeof===l||K.$$typeof===x||K.$$typeof===m||K[0]===v))}function w(K){if(typeof K=="object"&&K!==null){var Z=K.$$typeof;switch(Z){case t:var Q=K.type;switch(Q){case r:case a:case i:case c:case h:return Q;default:var W=Q&&Q.$$typeof;switch(W){case u:case l:case d:case f:case s:return W;default:return Z}}case n:return Z}}}var g=u,E=s,D=t,j=l,N=r,B=d,G=f,U=n,re=a,ee=i,se=c,he=!1,ge=!1;function ye(K){return he||(he=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(K){return ge||(ge=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function J(K){return w(K)===u}function ue(K){return w(K)===s}function A(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function xe(K){return w(K)===l}function ie(K){return w(K)===r}function fe(K){return w(K)===d}function X(K){return w(K)===f}function H(K){return w(K)===n}function te(K){return w(K)===a}function me(K){return w(K)===i}function oe(K){return w(K)===c}lt.ContextConsumer=g,lt.ContextProvider=E,lt.Element=D,lt.ForwardRef=j,lt.Fragment=N,lt.Lazy=B,lt.Memo=G,lt.Portal=U,lt.Profiler=re,lt.StrictMode=ee,lt.Suspense=se,lt.isAsyncMode=ye,lt.isConcurrentMode=L,lt.isContextConsumer=J,lt.isContextProvider=ue,lt.isElement=A,lt.isForwardRef=xe,lt.isFragment=ie,lt.isLazy=fe,lt.isMemo=X,lt.isPortal=H,lt.isProfiler=te,lt.isStrictMode=me,lt.isSuspense=oe,lt.isValidElementType=P,lt.typeOf=w})(),lt}var Rh;function BI(){if(Rh)return Da.exports;Rh=1;var e={};return e.NODE_ENV==="production"?Da.exports=FI():Da.exports=jI(),Da.exports}var Nh=BI();function Oh(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function Lh(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function xu(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return Lh(n.overflowY,t)||Lh(n.overflowX,t)||(function(r){var i=(function(a){if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1}function Va(e,t,n,r,i,a,s,u){return a<e&&s>t||a>e&&s<t?0:a<=e&&u<=n||s>=t&&u>=n?a-e-r:s>t&&u<n||a<e&&u>n?s-t+i:0}var zI=function(e,t){var n=window,r=t.inline,i=t.boundary,a=t.skipOverflowHiddenElements,s=typeof i=="function"?i:function(K){return K!==i};if(!Oh(e))throw new TypeError("Invalid target");for(var u,l,c=document.scrollingElement||document.documentElement,h=[],f=e;Oh(f)&&s(f);){if((f=(l=(u=f).parentElement)==null?u.getRootNode().host||null:l)===c){h.push(f);break}f!=null&&f===document.body&&xu(f)&&!xu(document.documentElement)||f!=null&&xu(f,a)&&h.push(f)}for(var d=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,S=e.getBoundingClientRect(),b=S.height,k=S.width,_=S.top,P=S.right,w=S.bottom,g=S.left,E=_,D=r==="center"?g+k/2:r==="end"?P:g,j=[],N=0;N<h.length;N++){var B=h[N],G=B.getBoundingClientRect(),U=G.height,re=G.width,ee=G.top,se=G.right,he=G.bottom,ge=G.left;if(_>=0&&g>=0&&w<=m&&P<=d&&_>=ee&&w<=he&&g>=ge&&P<=se)return j;var ye=getComputedStyle(B),L=parseInt(ye.borderLeftWidth,10),J=parseInt(ye.borderTopWidth,10),ue=parseInt(ye.borderRightWidth,10),A=parseInt(ye.borderBottomWidth,10),xe=0,ie=0,fe="offsetWidth"in B?B.offsetWidth-B.clientWidth-L-ue:0,X="offsetHeight"in B?B.offsetHeight-B.clientHeight-J-A:0,H="offsetWidth"in B?B.offsetWidth===0?0:re/B.offsetWidth:0,te="offsetHeight"in B?B.offsetHeight===0?0:U/B.offsetHeight:0;if(c===B)xe=Va(x,x+m,m,J,A,x+E,x+E+b,b),ie=r==="start"?D:r==="center"?D-d/2:r==="end"?D-d:Va(v,v+d,d,L,ue,v+D,v+D+k,k),xe=Math.max(0,xe+x),ie=Math.max(0,ie+v);else{xe=Va(ee,he,U,J,A+X,E,E+b,b),ie=r==="start"?D-ge-L:r==="center"?D-(ge+re/2)+fe/2:r==="end"?D-se+ue+fe:Va(ge,se,re,L,ue+fe,D,D+k,k);var me=B.scrollLeft,oe=B.scrollTop;E+=oe-(xe=Math.max(0,Math.min(oe+xe/te,B.scrollHeight-U/te+X))),D+=me-(ie=Math.max(0,Math.min(me+ie/H,B.scrollWidth-re/H+fe)))}j.push({el:B,top:xe,left:ie})}return j},Ae={};let $I=0;function Dh(e){return typeof e=="function"?e:tn}function tn(){}function Fg(e,t){if(!e)return;zI(e,{boundary:t}).forEach(r=>{let{el:i,top:a,left:s}=r;i.scrollTop=a,i.scrollLeft=s})}function Vh(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function Xs(e,t){let n;function r(){n&&clearTimeout(n)}function i(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];r(),n=setTimeout(()=>{n=null,e(...s)},t)}return i.cancel=r,i}function dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return t.some(u=>(u&&u(r,...a),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault))}}function kn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r=>{t.forEach(i=>{typeof i=="function"?i(r):i&&(i.current=r)})}}function jg(){return String($I++)}function Bg(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${n===1?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function Mh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function zg(e){return typeof e.type=="string"}function $g(e){return e.props}function UI(e,t){console.error(`The property "${t}" is required in "${e}"`)}const HI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Ma(e){e===void 0&&(e={});const t={};return HI.forEach(n=>{e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function Pi(e,t){return Object.keys(e).reduce((n,r)=>(n[r]=gs(t,r)?t[r]:e[r],n),{})}function gs(e,t){return e[t]!==void 0}function Ri(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function WI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xn(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;const a=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:a+1);let s=t+e;s<0?s=i?a:0:s>a&&(s=i?0:a);const u=Fn(e,s,n,r,i);return u===-1?t>=n?-1:t:u}function Fn(e,t,n,r,i){const a=r(t);if(!a||!a.hasAttribute("disabled"))return t;if(e>0){for(let s=t+1;s<n;s++)if(!r(s).hasAttribute("disabled"))return s}else for(let s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return i?e>0?Fn(1,0,n,r,!1):Fn(-1,n-1,n,r,!1):-1}function vs(e,t,n,r){return r===void 0&&(r=!0),t.some(i=>i&&(Vh(i,e,n)||r&&Vh(i,n.document.activeElement,n)))}let Gl=tn;Ae.NODE_ENV!=="production"&&(Gl=(e,t,n)=>{const r="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(i=>{t[i]!==void 0&&n[i]===void 0?console.error(`downshift: A component has changed the controlled prop "${i}" to be uncontrolled. ${r}`):t[i]===void 0&&n[i]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "${i}" to be controlled. ${r}`)})});const qI=Xs(e=>{Hg(e).textContent=""},500);function Ug(e,t){const n=Hg(t);e&&(n.textContent=e,qI(t))}function Hg(e){e===void 0&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const Wg=Ae.NODE_ENV!=="production"?"__autocomplete_unknown__":0,qg=Ae.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Kg=Ae.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Za=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,es=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Gg=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Jg=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Yg=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Xg=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Qg=Ae.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Zg=Ae.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,ev=Ae.NODE_ENV!=="production"?"__autocomplete_change_input__":11,tv=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Qu=Ae.NODE_ENV!=="production"?"__autocomplete_click_button__":13,nv=Ae.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,rv=Ae.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,iv=Ae.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var KI=Object.freeze({__proto__:null,unknown:Wg,mouseUp:qg,itemMouseEnter:Kg,keyDownArrowUp:Za,keyDownArrowDown:es,keyDownEscape:Gg,keyDownEnter:Jg,keyDownHome:Yg,keyDownEnd:Xg,clickItem:Qg,blurInput:Zg,changeInput:ev,keyDownSpaceButton:tv,clickButton:Qu,blurButton:nv,controlledPropUpdatedSelectedItem:rv,touchEnd:iv});const GI=(()=>{class e extends M.Component{constructor(n){var r;super(n),r=this,this.id=this.props.id||`downshift-${jg()}`,this.menuId=this.props.menuId||`${this.id}-menu`,this.labelId=this.props.labelId||`${this.id}-label`,this.inputId=this.props.inputId||`${this.id}-input`,this.getItemId=this.props.getItemId||(f=>`${this.id}-item-${f}`),this.input=null,this.items=[],this.itemCount=null,this.previousResultCount=0,this.timeoutIds=[],this.internalSetTimeout=(f,d)=>{const m=setTimeout(()=>{this.timeoutIds=this.timeoutIds.filter(v=>v!==m),f()},d);this.timeoutIds.push(m)},this.setItemCount=f=>{this.itemCount=f},this.unsetItemCount=()=>{this.itemCount=null},this.setHighlightedIndex=function(f,d){f===void 0&&(f=r.props.defaultHighlightedIndex),d===void 0&&(d={}),d=Ma(d),r.internalSetState({highlightedIndex:f,...d})},this.clearSelection=f=>{this.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:this.props.defaultHighlightedIndex,isOpen:this.props.defaultIsOpen},f)},this.selectItem=(f,d,m)=>{d=Ma(d),this.internalSetState({isOpen:this.props.defaultIsOpen,highlightedIndex:this.props.defaultHighlightedIndex,selectedItem:f,inputValue:this.props.itemToString(f),...d},m)},this.selectItemAtIndex=(f,d,m)=>{const v=this.items[f];v!=null&&this.selectItem(v,d,m)},this.selectHighlightedItem=(f,d)=>this.selectItemAtIndex(this.getState().highlightedIndex,f,d),this.internalSetState=(f,d)=>{let m,v;const x={},S=typeof f=="function";return!S&&f.hasOwnProperty("inputValue")&&this.props.onInputValueChange(f.inputValue,{...this.getStateAndHelpers(),...f}),this.setState(b=>{b=this.getState(b);let k=S?f(b):f;k=this.props.stateReducer(b,k),m=k.hasOwnProperty("selectedItem");const _={};return m&&k.selectedItem!==b.selectedItem&&(v=k.selectedItem),k.type=k.type||Wg,Object.keys(k).forEach(P=>{b[P]!==k[P]&&(x[P]=k[P]),P!=="type"&&(k[P],gs(this.props,P)||(_[P]=k[P]))}),S&&k.hasOwnProperty("inputValue")&&this.props.onInputValueChange(k.inputValue,{...this.getStateAndHelpers(),...k}),_},()=>{Dh(d)(),Object.keys(x).length>1&&this.props.onStateChange(x,this.getStateAndHelpers()),m&&this.props.onSelect(f.selectedItem,this.getStateAndHelpers()),v!==void 0&&this.props.onChange(v,this.getStateAndHelpers()),this.props.onUserAction(x,this.getStateAndHelpers())})},this.rootRef=f=>this._rootNode=f,this.getRootProps=function(f,d){let{refKey:m="ref",ref:v,...x}=f===void 0?{}:f,{suppressRefError:S=!1}=d===void 0?{}:d;r.getRootProps.called=!0,r.getRootProps.refKey=m,r.getRootProps.suppressRefError=S;const{isOpen:b}=r.getState();return{[m]:kn(v,r.rootRef),role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-owns":b?r.menuId:null,"aria-labelledby":r.labelId,...x}},this.keyDownHandlers={ArrowDown(f){if(f.preventDefault(),this.getState().isOpen){const d=f.shiftKey?5:1;this.moveHighlightedIndex(d,{type:es})}else this.internalSetState({isOpen:!0,type:es},()=>{const d=this.getItemCount();if(d>0){const{highlightedIndex:m}=this.getState(),v=Xn(1,m,d,x=>this.getItemNodeFromIndex(x));this.setHighlightedIndex(v,{type:es})}})},ArrowUp(f){if(f.preventDefault(),this.getState().isOpen){const d=f.shiftKey?-5:-1;this.moveHighlightedIndex(d,{type:Za})}else this.internalSetState({isOpen:!0,type:Za},()=>{const d=this.getItemCount();if(d>0){const{highlightedIndex:m}=this.getState(),v=Xn(-1,m,d,x=>this.getItemNodeFromIndex(x));this.setHighlightedIndex(v,{type:Za})}})},Enter(f){if(f.which===229)return;const{isOpen:d,highlightedIndex:m}=this.getState();if(d&&m!=null){f.preventDefault();const v=this.items[m],x=this.getItemNodeFromIndex(m);if(v==null||x&&x.hasAttribute("disabled"))return;this.selectHighlightedItem({type:Jg})}},Escape(f){f.preventDefault(),this.reset({type:Gg,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(f){f.preventDefault(),this.toggleMenu({type:tv})}},this.inputKeyDownHandlers={...this.keyDownHandlers,Home(f){const{isOpen:d}=this.getState();if(!d)return;f.preventDefault();const m=this.getItemCount();if(m<=0||!d)return;const v=Fn(1,0,m,x=>this.getItemNodeFromIndex(x),!1);this.setHighlightedIndex(v,{type:Yg})},End(f){const{isOpen:d}=this.getState();if(!d)return;f.preventDefault();const m=this.getItemCount();if(m<=0||!d)return;const v=Fn(-1,m-1,m,x=>this.getItemNodeFromIndex(x),!1);this.setHighlightedIndex(v,{type:Xg})}},this.getToggleButtonProps=function(f){let{onClick:d,onPress:m,onKeyDown:v,onKeyUp:x,onBlur:S,...b}=f===void 0?{}:f;const{isOpen:k}=r.getState(),_={onClick:dt(d,r.buttonHandleClick),onKeyDown:dt(v,r.buttonHandleKeyDown),onKeyUp:dt(x,r.buttonHandleKeyUp),onBlur:dt(S,r.buttonHandleBlur)},P=b.disabled?{}:_;return{type:"button",role:"button","aria-label":k?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,...P,...b}},this.buttonHandleKeyUp=f=>{f.preventDefault()},this.buttonHandleKeyDown=f=>{const d=Ri(f);this.buttonKeyDownHandlers[d]&&this.buttonKeyDownHandlers[d].call(this,f)},this.buttonHandleClick=f=>{f.preventDefault(),this.props.environment.document.activeElement===this.props.environment.document.body&&f.target.focus(),Ae.NODE_ENV==="test"?this.toggleMenu({type:Qu}):this.internalSetTimeout(()=>this.toggleMenu({type:Qu}))},this.buttonHandleBlur=f=>{const d=f.target;this.internalSetTimeout(()=>{!this.isMouseDown&&(this.props.environment.document.activeElement==null||this.props.environment.document.activeElement.id!==this.inputId)&&this.props.environment.document.activeElement!==d&&this.reset({type:nv})})},this.getLabelProps=f=>({htmlFor:this.inputId,id:this.labelId,...f}),this.getInputProps=function(f){let{onKeyDown:d,onBlur:m,onChange:v,onInput:x,onChangeText:S,...b}=f===void 0?{}:f,k,_={};k="onChange";const{inputValue:P,isOpen:w,highlightedIndex:g}=r.getState();return b.disabled||(_={[k]:dt(v,x,r.inputHandleChange),onKeyDown:dt(d,r.inputHandleKeyDown),onBlur:dt(m,r.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":w&&typeof g=="number"&&g>=0?r.getItemId(g):null,"aria-controls":w?r.menuId:null,"aria-labelledby":r.labelId,autoComplete:"off",value:P,id:r.inputId,..._,...b}},this.inputHandleKeyDown=f=>{const d=Ri(f);d&&this.inputKeyDownHandlers[d]&&this.inputKeyDownHandlers[d].call(this,f)},this.inputHandleChange=f=>{this.internalSetState({type:ev,isOpen:!0,inputValue:f.target.value,highlightedIndex:this.props.defaultHighlightedIndex})},this.inputHandleBlur=()=>{this.internalSetTimeout(()=>{const f=this.props.environment.document&&!!this.props.environment.document.activeElement&&!!this.props.environment.document.activeElement.dataset&&this.props.environment.document.activeElement.dataset.toggle&&this._rootNode&&this._rootNode.contains(this.props.environment.document.activeElement);!this.isMouseDown&&!f&&this.reset({type:Zg})})},this.menuRef=f=>{this._menuNode=f},this.getMenuProps=function(f,d){let{refKey:m="ref",ref:v,...x}=f===void 0?{}:f,{suppressRefError:S=!1}=d===void 0?{}:d;return r.getMenuProps.called=!0,r.getMenuProps.refKey=m,r.getMenuProps.suppressRefError=S,{[m]:kn(v,r.menuRef),role:"listbox","aria-labelledby":x&&x["aria-label"]?null:r.labelId,id:r.menuId,...x}},this.getItemProps=function(f){let{onMouseMove:d,onMouseDown:m,onClick:v,onPress:x,index:S,item:b=Ae.NODE_ENV==="production"?void 0:UI("getItemProps","item"),...k}=f===void 0?{}:f;S===void 0?(r.items.push(b),S=r.items.indexOf(b)):r.items[S]=b;const _="onClick",P=v,w={onMouseMove:dt(d,()=>{S!==r.getState().highlightedIndex&&(r.setHighlightedIndex(S,{type:Kg}),r.avoidScrolling=!0,r.internalSetTimeout(()=>r.avoidScrolling=!1,250))}),onMouseDown:dt(m,E=>{E.preventDefault()}),[_]:dt(P,()=>{r.selectItemAtIndex(S,{type:Qg})})},g=k.disabled?{onMouseDown:w.onMouseDown}:w;return{id:r.getItemId(S),role:"option","aria-selected":r.getState().highlightedIndex===S,...g,...k}},this.clearItems=()=>{this.items=[]},this.reset=function(f,d){f===void 0&&(f={}),f=Ma(f),r.internalSetState(m=>{let{selectedItem:v}=m;return{isOpen:r.props.defaultIsOpen,highlightedIndex:r.props.defaultHighlightedIndex,inputValue:r.props.itemToString(v),...f}},d)},this.toggleMenu=function(f,d){f===void 0&&(f={}),f=Ma(f),r.internalSetState(m=>{let{isOpen:v}=m;return{isOpen:!v,...v&&{highlightedIndex:r.props.defaultHighlightedIndex},...f}},()=>{const{isOpen:m,highlightedIndex:v}=r.getState();m&&r.getItemCount()>0&&typeof v=="number"&&r.setHighlightedIndex(v,f),Dh(d)()})},this.openMenu=f=>{this.internalSetState({isOpen:!0},f)},this.closeMenu=f=>{this.internalSetState({isOpen:!1},f)},this.updateStatus=Xs(()=>{const f=this.getState(),d=this.items[f.highlightedIndex],m=this.getItemCount(),v=this.props.getA11yStatusMessage({itemToString:this.props.itemToString,previousResultCount:this.previousResultCount,resultCount:m,highlightedItem:d,...f});this.previousResultCount=m,Ug(v,this.props.environment.document)},200);const{defaultHighlightedIndex:i,initialHighlightedIndex:a=i,defaultIsOpen:s,initialIsOpen:u=s,initialInputValue:l="",initialSelectedItem:c=null}=this.props,h=this.getState({highlightedIndex:a,isOpen:u,inputValue:l,selectedItem:c});h.selectedItem!=null&&this.props.initialInputValue===void 0&&(h.inputValue=this.props.itemToString(h.selectedItem)),this.state=h}internalClearTimeouts(){this.timeoutIds.forEach(n=>{clearTimeout(n)}),this.timeoutIds=[]}getState(n){return n===void 0&&(n=this.state),Pi(n,this.props)}getItemCount(){let n=this.items.length;return this.itemCount!=null?n=this.itemCount:this.props.itemCount!==void 0&&(n=this.props.itemCount),n}getItemNodeFromIndex(n){return this.props.environment.document.getElementById(this.getItemId(n))}scrollHighlightedItemIntoView(){{const n=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(n,this._menuNode)}}moveHighlightedIndex(n,r){const i=this.getItemCount(),{highlightedIndex:a}=this.getState();if(i>0){const s=Xn(n,a,i,u=>this.getItemNodeFromIndex(u));this.setHighlightedIndex(s,r)}}getStateAndHelpers(){const{highlightedIndex:n,inputValue:r,selectedItem:i,isOpen:a}=this.getState(),{itemToString:s}=this.props,{id:u}=this,{getRootProps:l,getToggleButtonProps:c,getLabelProps:h,getMenuProps:f,getInputProps:d,getItemProps:m,openMenu:v,closeMenu:x,toggleMenu:S,selectItem:b,selectItemAtIndex:k,selectHighlightedItem:_,setHighlightedIndex:P,clearSelection:w,clearItems:g,reset:E,setItemCount:D,unsetItemCount:j,internalSetState:N}=this;return{getRootProps:l,getToggleButtonProps:c,getLabelProps:h,getMenuProps:f,getInputProps:d,getItemProps:m,reset:E,openMenu:v,closeMenu:x,toggleMenu:S,selectItem:b,selectItemAtIndex:k,selectHighlightedItem:_,setHighlightedIndex:P,clearSelection:w,clearItems:g,setItemCount:D,unsetItemCount:j,setState:N,itemToString:s,id:u,highlightedIndex:n,inputValue:r,isOpen:a,selectedItem:i}}componentDidMount(){Ae.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Fh(this._menuNode,this.getMenuProps);{const n=()=>{this.isMouseDown=!0},r=l=>{this.isMouseDown=!1,!vs(l.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:qg},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},a=()=>{this.isTouchMove=!0},s=l=>{const c=vs(l.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!c&&this.getState().isOpen&&this.reset({type:iv},()=>this.props.onOuterClick(this.getStateAndHelpers()))},{environment:u}=this.props;u.addEventListener("mousedown",n),u.addEventListener("mouseup",r),u.addEventListener("touchstart",i),u.addEventListener("touchmove",a),u.addEventListener("touchend",s),this.cleanup=()=>{this.internalClearTimeouts(),this.updateStatus.cancel(),u.removeEventListener("mousedown",n),u.removeEventListener("mouseup",r),u.removeEventListener("touchstart",i),u.removeEventListener("touchmove",a),u.removeEventListener("touchend",s)}}}shouldScroll(n,r){const{highlightedIndex:i}=this.props.highlightedIndex===void 0?this.getState():this.props,{highlightedIndex:a}=r.highlightedIndex===void 0?n:r;return i&&this.getState().isOpen&&!n.isOpen||i!==a}componentDidUpdate(n,r){Ae.NODE_ENV!=="production"&&(Gl(this.state,n,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Fh(this._menuNode,this.getMenuProps)),gs(this.props,"selectedItem")&&this.props.selectedItemChanged(n.selectedItem,this.props.selectedItem)&&this.internalSetState({type:rv,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(r,n)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const n=Mh(this.props.children,tn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;const r=Mh(n(this.getStateAndHelpers()));if(!r)return null;if(this.getRootProps.called||this.props.suppressRefError)return Ae.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&JI(r,this.getRootProps),r;if(zg(r))return M.cloneElement(r,this.getRootProps($g(r)));if(Ae.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")}}return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:Bg,itemToString:t=>t==null?"":(Ae.NODE_ENV!=="production"&&WI(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t)),onStateChange:tn,onInputValueChange:tn,onUserAction:tn,onChange:tn,onSelect:tn,onOuterClick:tn,selectedItemChanged:(t,n)=>t!==n,environment:typeof window>"u"?{}:window,stateReducer:(t,n)=>n,suppressRefError:!1,scrollIntoView:Fg},e.stateChangeTypes=KI,e})();Ae.NODE_ENV!=="production"&&(GI.propTypes={children:pe.func,defaultHighlightedIndex:pe.number,defaultIsOpen:pe.bool,initialHighlightedIndex:pe.number,initialSelectedItem:pe.any,initialInputValue:pe.string,initialIsOpen:pe.bool,getA11yStatusMessage:pe.func,itemToString:pe.func,onChange:pe.func,onSelect:pe.func,onStateChange:pe.func,onInputValueChange:pe.func,onUserAction:pe.func,onOuterClick:pe.func,selectedItemChanged:pe.func,stateReducer:pe.func,itemCount:pe.number,id:pe.string,environment:pe.shape({addEventListener:pe.func,removeEventListener:pe.func,document:pe.shape({getElementById:pe.func,activeElement:pe.any,body:pe.any})}),suppressRefError:pe.bool,scrollIntoView:pe.func,selectedItem:pe.any,isOpen:pe.bool,inputValue:pe.string,highlightedIndex:pe.number,labelId:pe.string,inputId:pe.string,menuId:pe.string,getItemId:pe.func});function Fh(e,t){let{refKey:n}=t;e||console.error(`downshift: The ref prop "${n}" from getMenuProps was not applied correctly on your menu element.`)}function JI(e,t){let{refKey:n}=t;const r=n!=="ref",i=!zg(e);i&&!r&&!Nh.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&r&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${n}"`),!Nh.isForwardRef(e)&&!$g(e)[n]&&console.error(`downshift: You must apply the ref prop "${n}" from getRootProps onto your root element.`)}const av={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function YI(e,t,n){const{props:r,type:i}=e,a={};Object.keys(t).forEach(s=>{XI(s,e,t,n),n[s]!==t[s]&&(a[s]=n[s])}),r.onStateChange&&Object.keys(a).length&&r.onStateChange({type:i,...a})}function XI(e,t,n,r){const{props:i,type:a}=t,s=`on${Jl(e)}Change`;i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s]({type:a,...r})}function QI(e,t){return t.changes}function ZI(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""}const eT=Xs((e,t)=>{Ug(e(),t)},200),tT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?M.useLayoutEffect:M.useEffect;function sv(e){let{id:t=`downshift-${jg()}`,labelId:n,menuId:r,getItemId:i,toggleButtonId:a,inputId:s}=e;return M.useRef({labelId:n||`${t}-label`,menuId:r||`${t}-menu`,getItemId:i||(l=>`${t}-item-${l}`),toggleButtonId:a||`${t}-toggle-button`,inputId:s||`${t}-input`}).current}function ov(e,t,n){return e!==void 0?e:n.length===0?-1:n.indexOf(t)}function nT(e){return e?String(e):""}function jh(e){return/^\S{1}$/.test(e)}function Jl(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function Yl(e){const t=M.useRef(e);return t.current=e,t}function uv(e,t,n){const r=M.useRef(),i=M.useRef(),a=M.useCallback((f,d)=>{i.current=d,f=Pi(f,d.props);const m=e(f,d);return d.props.stateReducer(f,{...d,changes:m})},[e]),[s,u]=M.useReducer(a,t),l=Yl(n),c=M.useCallback(f=>u({props:l.current,...f}),[l]),h=i.current;return M.useEffect(()=>{h&&r.current&&r.current!==s&&YI(h,Pi(r.current,h.props),s),r.current=s},[s,n,h]),[s,c]}function rT(e,t,n){const[r,i]=uv(e,t,n);return[Pi(r,n),i]}const xi={itemToString:nT,stateReducer:QI,getA11ySelectionMessage:ZI,scrollIntoView:Fg,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Gt(e,t,n){n===void 0&&(n=av);const r=e[`default${Jl(t)}`];return r!==void 0?r:n[t]}function Fa(e,t,n){n===void 0&&(n=av);const r=e[t];if(r!==void 0)return r;const i=e[`initial${Jl(t)}`];return i!==void 0?i:Gt(e,t,n)}function lv(e){const t=Fa(e,"selectedItem"),n=Fa(e,"isOpen"),r=Fa(e,"highlightedIndex"),i=Fa(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function Jr(e,t,n,r){const{items:i,initialHighlightedIndex:a,defaultHighlightedIndex:s}=e,{selectedItem:u,highlightedIndex:l}=t;return i.length===0?-1:a!==void 0&&l===a?a:s!==void 0?s:u?n===0?i.indexOf(u):Xn(n,i.indexOf(u),i.length,r,!1):n===0?-1:n<0?i.length-1:0}function cv(e,t,n,r){const i=M.useRef({isMouseDown:!1,isTouchMove:!1});return M.useEffect(()=>{const a=()=>{i.current.isMouseDown=!0},s=h=>{i.current.isMouseDown=!1,e&&!vs(h.target,t.map(f=>f.current),n)&&r()},u=()=>{i.current.isTouchMove=!1},l=()=>{i.current.isTouchMove=!0},c=h=>{e&&!i.current.isTouchMove&&!vs(h.target,t.map(f=>f.current),n,!1)&&r()};return n.addEventListener("mousedown",a),n.addEventListener("mouseup",s),n.addEventListener("touchstart",u),n.addEventListener("touchmove",l),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",a),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",u),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",c)}},[e,n]),i}let Xl=()=>tn;Ae.NODE_ENV!=="production"&&(Xl=function(){const e=M.useRef(!0);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=M.useRef(n.reduce((s,u)=>(s[u]={},s),{}));return M.useEffect(()=>{Object.keys(i.current).forEach(s=>{const u=i.current[s];if(e.current&&!Object.keys(u).length){console.error(`downshift: You forgot to call the ${s} getter function on your component / element.`);return}const{suppressRefError:l,refKey:c,elementRef:h}=u;(!h||!h.current)&&!l&&console.error(`downshift: The ref prop "${c}" from ${s} was not applied correctly on your element.`)}),e.current=!1}),M.useCallback((s,u,l,c)=>{i.current[s]={suppressRefError:u,refKey:l,elementRef:c}},[])});function xs(e,t,n){let{isInitialMount:r,highlightedIndex:i,items:a,environment:s,...u}=n;M.useEffect(()=>{r||eT(()=>e({highlightedIndex:i,highlightedItem:a[i],resultCount:a.length,...u}),s.document)},t)}function fv(e){let{highlightedIndex:t,isOpen:n,itemRefs:r,getItemNodeFromIndex:i,menuElement:a,scrollIntoView:s}=e;const u=M.useRef(!0);return tT(()=>{t<0||!n||!Object.keys(r.current).length||(u.current===!1?u.current=!0:s(i(t),a))},[t]),u}let Ql=tn;Ae.NODE_ENV!=="production"&&(Ql=e=>{let{isInitialMount:t,props:n,state:r}=e;const i=M.useRef(n);M.useEffect(()=>{t||(Gl(r,i.current,n),i.current=n)},[r,n,t])});function hv(e,t,n){const{type:r,props:i}=t;let a;switch(r){case n.ItemMouseMove:a={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:a={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Jr(i,e,0)};break;case n.FunctionOpenMenu:a={isOpen:!0,highlightedIndex:Jr(i,e,0)};break;case n.FunctionCloseMenu:a={isOpen:!1};break;case n.FunctionSetHighlightedIndex:a={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:a={inputValue:t.inputValue};break;case n.FunctionReset:a={highlightedIndex:Gt(i,"highlightedIndex"),isOpen:Gt(i,"isOpen"),selectedItem:Gt(i,"selectedItem"),inputValue:Gt(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...a}}function Bh(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,i=e.itemToString,a=e.getItemNodeFromIndex,s=t.toLowerCase(),u=0;u<r.length;u++){var l=(u+n+1)%r.length,c=r[l];if(c!==void 0&&i(c).toLowerCase().startsWith(s)){var h=a(l);if(!(h!=null&&h.hasAttribute("disabled")))return l}}return n}var iT={items:pe.array.isRequired,itemToString:pe.func,getA11yStatusMessage:pe.func,getA11ySelectionMessage:pe.func,circularNavigation:pe.bool,highlightedIndex:pe.number,defaultHighlightedIndex:pe.number,initialHighlightedIndex:pe.number,isOpen:pe.bool,defaultIsOpen:pe.bool,initialIsOpen:pe.bool,selectedItem:pe.any,initialSelectedItem:pe.any,defaultSelectedItem:pe.any,id:pe.string,labelId:pe.string,menuId:pe.string,getItemId:pe.func,toggleButtonId:pe.string,stateReducer:pe.func,onSelectedItemChange:pe.func,onHighlightedIndexChange:pe.func,onStateChange:pe.func,onIsOpenChange:pe.func,environment:pe.shape({addEventListener:pe.func,removeEventListener:pe.func,document:pe.shape({getElementById:pe.func,activeElement:pe.any,body:pe.any})})};function aT(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}var sT=de(de({},xi),{getA11yStatusMessage:aT}),pv=tn;Ae.NODE_ENV!=="production"&&(pv=function(e,t){pe.checkPropTypes(iT,e,"prop",t.name)});const Zl=Ae.NODE_ENV!=="production"?"__menu_keydown_arrow_down__":0,ec=Ae.NODE_ENV!=="production"?"__menu_keydown_arrow_up__":1,tc=Ae.NODE_ENV!=="production"?"__menu_keydown_escape__":2,nc=Ae.NODE_ENV!=="production"?"__menu_keydown_home__":3,rc=Ae.NODE_ENV!=="production"?"__menu_keydown_end__":4,ic=Ae.NODE_ENV!=="production"?"__menu_keydown_enter__":5,ac=Ae.NODE_ENV!=="production"?"__menu_keydown_space_button__":6,sc=Ae.NODE_ENV!=="production"?"__menu_keydown_character__":7,bs=Ae.NODE_ENV!=="production"?"__menu_blur__":8,dv=Ae.NODE_ENV!=="production"?"__menu_mouse_leave__":9,mv=Ae.NODE_ENV!=="production"?"__item_mouse_move__":10,oc=Ae.NODE_ENV!=="production"?"__item_click__":11,gv=Ae.NODE_ENV!=="production"?"__togglebutton_click__":12,uc=Ae.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":13,lc=Ae.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":14,cc=Ae.NODE_ENV!=="production"?"__togglebutton_keydown_character__":15,vv=Ae.NODE_ENV!=="production"?"__function_toggle_menu__":16,xv=Ae.NODE_ENV!=="production"?"__function_open_menu__":17,bv=Ae.NODE_ENV!=="production"?"__function_close_menu__":18,yv=Ae.NODE_ENV!=="production"?"__function_set_highlighted_index__":19,fc=Ae.NODE_ENV!=="production"?"__function_select_item__":20,Zu=Ae.NODE_ENV!=="production"?"__function_set_input_value__":21,wv=Ae.NODE_ENV!=="production"?"__function_reset__":22;var Sv=Object.freeze({__proto__:null,MenuKeyDownArrowDown:Zl,MenuKeyDownArrowUp:ec,MenuKeyDownEscape:tc,MenuKeyDownHome:nc,MenuKeyDownEnd:rc,MenuKeyDownEnter:ic,MenuKeyDownSpaceButton:ac,MenuKeyDownCharacter:sc,MenuBlur:bs,MenuMouseLeave:dv,ItemMouseMove:mv,ItemClick:oc,ToggleButtonClick:gv,ToggleButtonKeyDownArrowDown:uc,ToggleButtonKeyDownArrowUp:lc,ToggleButtonKeyDownCharacter:cc,FunctionToggleMenu:vv,FunctionOpenMenu:xv,FunctionCloseMenu:bv,FunctionSetHighlightedIndex:yv,FunctionSelectItem:fc,FunctionSetInputValue:Zu,FunctionReset:wv});function oT(e,t){const{type:n,props:r,shiftKey:i}=t;let a;switch(n){case oc:a={isOpen:Gt(r,"isOpen"),highlightedIndex:Gt(r,"highlightedIndex"),selectedItem:r.items[t.index]};break;case cc:{const s=t.key,u=`${e.inputValue}${s}`,l=Bh({keysSoFar:u,highlightedIndex:e.selectedItem?r.items.indexOf(e.selectedItem):-1,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});a={inputValue:u,...l>=0&&{selectedItem:r.items[l]}}}break;case uc:a={highlightedIndex:Jr(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case lc:a={highlightedIndex:Jr(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case ic:case ac:a={isOpen:Gt(r,"isOpen"),highlightedIndex:Gt(r,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]}};break;case nc:a={highlightedIndex:Fn(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case rc:a={highlightedIndex:Fn(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case tc:a={isOpen:!1,highlightedIndex:-1};break;case bs:a={isOpen:!1,highlightedIndex:-1};break;case sc:{const s=t.key,u=`${e.inputValue}${s}`,l=Bh({keysSoFar:u,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});a={inputValue:u,...l>=0&&{highlightedIndex:l}}}break;case Zl:a={highlightedIndex:Xn(i?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case ec:a={highlightedIndex:Xn(i?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case fc:a={selectedItem:t.selectedItem};break;default:return hv(e,t,Sv)}return{...e,...a}}hc.stateChangeTypes=Sv;function hc(e){e===void 0&&(e={}),pv(e,hc);const t={...sT,...e},{items:n,scrollIntoView:r,environment:i,initialIsOpen:a,defaultIsOpen:s,itemToString:u,getA11ySelectionMessage:l,getA11yStatusMessage:c}=t,h=lv(t),[f,d]=rT(oT,h,t),{isOpen:m,highlightedIndex:v,selectedItem:x,inputValue:S}=f,b=M.useRef(null),k=M.useRef(null),_=M.useRef({}),P=M.useRef(!0),w=M.useRef(null),g=sv(t),E=M.useRef(),D=M.useRef(!0),j=Yl({state:f,props:t}),N=M.useCallback(X=>_.current[g.getItemId(X)],[g]);xs(c,[m,v,S,n],{isInitialMount:D.current,previousResultCount:E.current,items:n,environment:i,itemToString:u,...f}),xs(l,[x],{isInitialMount:D.current,previousResultCount:E.current,items:n,environment:i,itemToString:u,...f});const B=fv({menuElement:k.current,highlightedIndex:v,isOpen:m,itemRefs:_,scrollIntoView:r,getItemNodeFromIndex:N});M.useEffect(()=>(w.current=Xs(X=>{X({type:Zu,inputValue:""})},500),()=>{w.current.cancel()}),[]),M.useEffect(()=>{S&&w.current(d)},[d,S]),Ql({isInitialMount:D.current,props:t,state:f}),M.useEffect(()=>{if(D.current){(a||s||m)&&k.current&&k.current.focus();return}if(m){k.current&&k.current.focus();return}i.document.activeElement===k.current&&b.current&&(P.current=!1,b.current.focus())},[m]),M.useEffect(()=>{D.current||(E.current=n.length)});const G=cv(m,[k,b],i,()=>{d({type:bs})}),U=Xl("getMenuProps","getToggleButtonProps");M.useEffect(()=>{D.current=!1},[]),M.useEffect(()=>{m||(_.current={})},[m]);const re=M.useMemo(()=>({ArrowDown(X){X.preventDefault(),d({type:uc,getItemNodeFromIndex:N,shiftKey:X.shiftKey})},ArrowUp(X){X.preventDefault(),d({type:lc,getItemNodeFromIndex:N,shiftKey:X.shiftKey})}}),[d,N]),ee=M.useMemo(()=>({ArrowDown(X){X.preventDefault(),d({type:Zl,getItemNodeFromIndex:N,shiftKey:X.shiftKey})},ArrowUp(X){X.preventDefault(),d({type:ec,getItemNodeFromIndex:N,shiftKey:X.shiftKey})},Home(X){X.preventDefault(),d({type:nc,getItemNodeFromIndex:N})},End(X){X.preventDefault(),d({type:rc,getItemNodeFromIndex:N})},Escape(){d({type:tc})},Enter(X){X.preventDefault(),d({type:ic})}," "(X){X.preventDefault(),d({type:ac})}}),[d,N]),se=M.useCallback(()=>{d({type:vv})},[d]),he=M.useCallback(()=>{d({type:bv})},[d]),ge=M.useCallback(()=>{d({type:xv})},[d]),ye=M.useCallback(X=>{d({type:yv,highlightedIndex:X})},[d]),L=M.useCallback(X=>{d({type:fc,selectedItem:X})},[d]),J=M.useCallback(()=>{d({type:wv})},[d]),ue=M.useCallback(X=>{d({type:Zu,inputValue:X})},[d]),A=M.useCallback(X=>({id:g.labelId,htmlFor:g.toggleButtonId,...X}),[g]),xe=M.useCallback(function(X,H){let{onMouseLeave:te,refKey:me="ref",onKeyDown:oe,onBlur:K,ref:Z,...Q}=X===void 0?{}:X,{suppressRefError:W=!1}=H===void 0?{}:H;const ae=j.current.state,ve=Ie=>{const Me=Ri(Ie);Me&&ee[Me]?ee[Me](Ie):jh(Me)&&d({type:sc,key:Me,getItemNodeFromIndex:N})},Ee=()=>{if(P.current===!1){P.current=!0;return}!G.current.isMouseDown&&d({type:bs})},_e=()=>{d({type:dv})};return U("getMenuProps",W,me,k),{[me]:kn(Z,Ie=>{k.current=Ie}),id:g.menuId,role:"listbox","aria-labelledby":g.labelId,tabIndex:-1,...ae.isOpen&&ae.highlightedIndex>-1&&{"aria-activedescendant":g.getItemId(ae.highlightedIndex)},onMouseLeave:dt(te,_e),onKeyDown:dt(oe,ve),onBlur:dt(K,Ee),...Q}},[d,j,ee,G,U,g,N]),ie=M.useCallback(function(X,H){let{onClick:te,onKeyDown:me,refKey:oe="ref",ref:K,...Z}=X===void 0?{}:X,{suppressRefError:Q=!1}=H===void 0?{}:H;const W=()=>{d({type:gv})},ae=Ee=>{const _e=Ri(Ee);_e&&re[_e]?re[_e](Ee):jh(_e)&&d({type:cc,key:_e,getItemNodeFromIndex:N})},ve={[oe]:kn(K,Ee=>{b.current=Ee}),id:g.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":j.current.state.isOpen,"aria-labelledby":`${g.labelId} ${g.toggleButtonId}`,...Z};return Z.disabled||(ve.onClick=dt(te,W),ve.onKeyDown=dt(me,ae)),U("getToggleButtonProps",Q,oe,b),ve},[d,j,re,U,g,N]),fe=M.useCallback(function(X){let{item:H,index:te,onMouseMove:me,onClick:oe,refKey:K="ref",ref:Z,disabled:Q,...W}=X===void 0?{}:X;const{state:ae,props:ve}=j.current,Ee=()=>{te!==ae.highlightedIndex&&(B.current=!1,d({type:mv,index:te,disabled:Q}))},_e=()=>{d({type:oc,index:te})},Ie=ov(te,H,ve.items);if(Ie<0)throw new Error("Pass either item or item index in getItemProps!");const Me={disabled:Q,role:"option","aria-selected":`${Ie===ae.highlightedIndex}`,id:g.getItemId(Ie),[K]:kn(Z,ke=>{ke&&(_.current[g.getItemId(Ie)]=ke)}),...W};return Q||(Me.onClick=dt(oe,_e)),Me.onMouseMove=dt(me,Ee),Me},[d,j,B,g]);return{getToggleButtonProps:ie,getLabelProps:A,getMenuProps:xe,getItemProps:fe,toggleMenu:se,openMenu:ge,closeMenu:he,setHighlightedIndex:ye,selectItem:L,reset:J,setInputValue:ue,highlightedIndex:v,isOpen:m,selectedItem:x,inputValue:S}}const pc=Ae.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,dc=Ae.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,mc=Ae.NODE_ENV!=="production"?"__input_keydown_escape__":2,gc=Ae.NODE_ENV!=="production"?"__input_keydown_home__":3,vc=Ae.NODE_ENV!=="production"?"__input_keydown_end__":4,xc=Ae.NODE_ENV!=="production"?"__input_keydown_enter__":5,bc=Ae.NODE_ENV!=="production"?"__input_change__":6,ys=Ae.NODE_ENV!=="production"?"__input_blur__":7,Cv=Ae.NODE_ENV!=="production"?"__menu_mouse_leave__":8,kv=Ae.NODE_ENV!=="production"?"__item_mouse_move__":9,yc=Ae.NODE_ENV!=="production"?"__item_click__":10,Ev=Ae.NODE_ENV!=="production"?"__togglebutton_click__":11,_v=Ae.NODE_ENV!=="production"?"__function_toggle_menu__":12,Iv=Ae.NODE_ENV!=="production"?"__function_open_menu__":13,Tv=Ae.NODE_ENV!=="production"?"__function_close_menu__":14,Av=Ae.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,wc=Ae.NODE_ENV!=="production"?"__function_select_item__":16,Pv=Ae.NODE_ENV!=="production"?"__function_set_input_value__":17,Rv=Ae.NODE_ENV!=="production"?"__function_reset__":18,Sc=Ae.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var Nv=Object.freeze({__proto__:null,InputKeyDownArrowDown:pc,InputKeyDownArrowUp:dc,InputKeyDownEscape:mc,InputKeyDownHome:gc,InputKeyDownEnd:vc,InputKeyDownEnter:xc,InputChange:bc,InputBlur:ys,MenuMouseLeave:Cv,ItemMouseMove:kv,ItemClick:yc,ToggleButtonClick:Ev,FunctionToggleMenu:_v,FunctionOpenMenu:Iv,FunctionCloseMenu:Tv,FunctionSetHighlightedIndex:Av,FunctionSelectItem:wc,FunctionSetInputValue:Pv,FunctionReset:Rv,ControlledPropUpdatedSelectedItem:Sc});function uT(e){const t=lv(e),{selectedItem:n}=t;let{inputValue:r}=t;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),{...t,inputValue:r}}const lT={items:pe.array.isRequired,itemToString:pe.func,getA11yStatusMessage:pe.func,getA11ySelectionMessage:pe.func,circularNavigation:pe.bool,highlightedIndex:pe.number,defaultHighlightedIndex:pe.number,initialHighlightedIndex:pe.number,isOpen:pe.bool,defaultIsOpen:pe.bool,initialIsOpen:pe.bool,selectedItem:pe.any,initialSelectedItem:pe.any,defaultSelectedItem:pe.any,inputValue:pe.string,defaultInputValue:pe.string,initialInputValue:pe.string,id:pe.string,labelId:pe.string,menuId:pe.string,getItemId:pe.func,inputId:pe.string,toggleButtonId:pe.string,stateReducer:pe.func,onSelectedItemChange:pe.func,onHighlightedIndexChange:pe.func,onStateChange:pe.func,onIsOpenChange:pe.func,onInputValueChange:pe.func,environment:pe.shape({addEventListener:pe.func,removeEventListener:pe.func,document:pe.shape({getElementById:pe.func,activeElement:pe.any,body:pe.any})})};function cT(e,t,n){const r=M.useRef(),[i,a]=uv(e,t,n);return M.useEffect(()=>{gs(n,"selectedItem")&&(r.current!==n.selectedItem&&a({type:Sc,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)}),[Pi(i,n),a]}let Ov=tn;Ae.NODE_ENV!=="production"&&(Ov=(e,t)=>{pe.checkPropTypes(lT,e,"prop",t.name)});const fT={...xi,getA11yStatusMessage:Bg,circularNavigation:!0};function hT(e,t){const{type:n,props:r,shiftKey:i}=t;let a;switch(n){case yc:a={isOpen:Gt(r,"isOpen"),highlightedIndex:Gt(r,"highlightedIndex"),selectedItem:r.items[t.index],inputValue:r.itemToString(r.items[t.index])};break;case pc:e.isOpen?a={highlightedIndex:Xn(i?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)}:a={highlightedIndex:Jr(r,e,1,t.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case dc:e.isOpen?a={highlightedIndex:Xn(i?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)}:a={highlightedIndex:Jr(r,e,-1,t.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case xc:a={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex],isOpen:Gt(r,"isOpen"),highlightedIndex:Gt(r,"highlightedIndex"),inputValue:r.itemToString(r.items[e.highlightedIndex])}};break;case mc:a={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case gc:a={highlightedIndex:Fn(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case vc:a={highlightedIndex:Fn(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case ys:a={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:r.items[e.highlightedIndex],inputValue:r.itemToString(r.items[e.highlightedIndex])}};break;case bc:a={isOpen:!0,highlightedIndex:Gt(r,"highlightedIndex"),inputValue:t.inputValue};break;case wc:a={selectedItem:t.selectedItem,inputValue:r.itemToString(t.selectedItem)};break;case Sc:a={inputValue:t.inputValue};break;default:return hv(e,t,Nv)}return{...e,...a}}Cc.stateChangeTypes=Nv;function Cc(e){e===void 0&&(e={}),Ov(e,Cc);const t={...fT,...e},{initialIsOpen:n,defaultIsOpen:r,items:i,scrollIntoView:a,environment:s,getA11yStatusMessage:u,getA11ySelectionMessage:l,itemToString:c}=t,h=uT(t),[f,d]=cT(hT,h,t),{isOpen:m,highlightedIndex:v,selectedItem:x,inputValue:S}=f,b=M.useRef(null),k=M.useRef({}),_=M.useRef(null),P=M.useRef(null),w=M.useRef(null),g=M.useRef(!0),E=sv(t),D=M.useRef(),j=Yl({state:f,props:t}),N=M.useCallback(H=>k.current[E.getItemId(H)],[E]);xs(u,[m,v,S,i],{isInitialMount:g.current,previousResultCount:D.current,items:i,environment:s,itemToString:c,...f}),xs(l,[x],{isInitialMount:g.current,previousResultCount:D.current,items:i,environment:s,itemToString:c,...f});const B=fv({menuElement:b.current,highlightedIndex:v,isOpen:m,itemRefs:k,scrollIntoView:a,getItemNodeFromIndex:N});Ql({isInitialMount:g.current,props:t,state:f}),M.useEffect(()=>{(n||r||m)&&_.current&&_.current.focus()},[]),M.useEffect(()=>{g.current||(D.current=i.length)});const G=cv(m,[w,b,P],s,()=>{d({type:ys,selectItem:!1})}),U=Xl("getInputProps","getComboboxProps","getMenuProps");M.useEffect(()=>{g.current=!1},[]),M.useEffect(()=>{m||(k.current={})},[m]);const re=M.useMemo(()=>({ArrowDown(H){H.preventDefault(),d({type:pc,shiftKey:H.shiftKey,getItemNodeFromIndex:N})},ArrowUp(H){H.preventDefault(),d({type:dc,shiftKey:H.shiftKey,getItemNodeFromIndex:N})},Home(H){j.current.state.isOpen&&(H.preventDefault(),d({type:gc,getItemNodeFromIndex:N}))},End(H){j.current.state.isOpen&&(H.preventDefault(),d({type:vc,getItemNodeFromIndex:N}))},Escape(H){const te=j.current.state;(te.isOpen||te.inputValue||te.selectedItem||te.highlightedIndex>-1)&&(H.preventDefault(),d({type:mc}))},Enter(H){const te=j.current.state;!te.isOpen||te.highlightedIndex<0||H.which===229||(H.preventDefault(),d({type:xc,getItemNodeFromIndex:N}))}}),[d,j,N]),ee=M.useCallback(H=>({id:E.labelId,htmlFor:E.inputId,...H}),[E]),se=M.useCallback(function(H,te){let{onMouseLeave:me,refKey:oe="ref",ref:K,...Z}=H===void 0?{}:H,{suppressRefError:Q=!1}=te===void 0?{}:te;return U("getMenuProps",Q,oe,b),{[oe]:kn(K,W=>{b.current=W}),id:E.menuId,role:"listbox","aria-labelledby":E.labelId,onMouseLeave:dt(me,()=>{d({type:Cv})}),...Z}},[d,U,E]),he=M.useCallback(function(H){let{item:te,index:me,refKey:oe="ref",ref:K,onMouseMove:Z,onMouseDown:Q,onClick:W,onPress:ae,disabled:ve,...Ee}=H===void 0?{}:H;const{props:_e,state:Ie}=j.current,Me=ov(me,te,_e.items);if(Me<0)throw new Error("Pass either item or item index in getItemProps!");const ke="onClick",Ne=W,Fe=()=>{me!==Ie.highlightedIndex&&(B.current=!1,d({type:kv,index:me,disabled:ve}))},bt=()=>{d({type:yc,index:me})},le=ce=>ce.preventDefault();return{[oe]:kn(K,ce=>{ce&&(k.current[E.getItemId(Me)]=ce)}),disabled:ve,role:"option","aria-selected":`${Me===Ie.highlightedIndex}`,id:E.getItemId(Me),...!ve&&{[ke]:dt(Ne,bt)},onMouseMove:dt(Z,Fe),onMouseDown:dt(Q,le),...Ee}},[d,j,B,E]),ge=M.useCallback(function(H){let{onClick:te,onPress:me,refKey:oe="ref",ref:K,...Z}=H===void 0?{}:H;const Q=()=>{d({type:Ev}),!j.current.state.isOpen&&_.current&&_.current.focus()};return{[oe]:kn(K,W=>{P.current=W}),id:E.toggleButtonId,tabIndex:-1,...!Z.disabled&&{onClick:dt(te,Q)},...Z}},[d,j,E]),ye=M.useCallback(function(H,te){let{onKeyDown:me,onChange:oe,onInput:K,onBlur:Z,onChangeText:Q,refKey:W="ref",ref:ae,...ve}=H===void 0?{}:H,{suppressRefError:Ee=!1}=te===void 0?{}:te;U("getInputProps",Ee,W,_);const _e=j.current.state,Ie=bt=>{const le=Ri(bt);le&&re[le]&&re[le](bt)},Me=bt=>{d({type:bc,inputValue:bt.target.value})},ke=()=>{_e.isOpen&&!G.current.isMouseDown&&d({type:ys,selectItem:!0})},Ne="onChange";let Fe={};return ve.disabled||(Fe={[Ne]:dt(oe,K,Me),onKeyDown:dt(me,Ie),onBlur:dt(Z,ke)}),{[W]:kn(ae,bt=>{_.current=bt}),id:E.inputId,"aria-autocomplete":"list","aria-controls":E.menuId,..._e.isOpen&&_e.highlightedIndex>-1&&{"aria-activedescendant":E.getItemId(_e.highlightedIndex)},"aria-labelledby":E.labelId,autoComplete:"off",value:_e.inputValue,...Fe,...ve}},[d,re,j,G,U,E]),L=M.useCallback(function(H,te){let{refKey:me="ref",ref:oe,...K}=H===void 0?{}:H,{suppressRefError:Z=!1}=te===void 0?{}:te;return U("getComboboxProps",Z,me,w),{[me]:kn(oe,Q=>{w.current=Q}),role:"combobox","aria-haspopup":"listbox","aria-owns":E.menuId,"aria-expanded":j.current.state.isOpen,...K}},[j,U,E]),J=M.useCallback(()=>{d({type:_v})},[d]),ue=M.useCallback(()=>{d({type:Tv})},[d]),A=M.useCallback(()=>{d({type:Iv})},[d]),xe=M.useCallback(H=>{d({type:Av,highlightedIndex:H})},[d]),ie=M.useCallback(H=>{d({type:wc,selectedItem:H})},[d]),fe=M.useCallback(H=>{d({type:Pv,inputValue:H})},[d]),X=M.useCallback(()=>{d({type:Rv})},[d]);return{getItemProps:he,getLabelProps:ee,getMenuProps:se,getInputProps:ye,getComboboxProps:L,getToggleButtonProps:ge,toggleMenu:J,openMenu:A,closeMenu:ue,setHighlightedIndex:xe,setInputValue:fe,selectItem:ie,reset:X,highlightedIndex:v,isOpen:m,selectedItem:x,inputValue:S}}pe.array,pe.array,pe.array,pe.func,pe.func,pe.func,pe.number,pe.number,pe.number,pe.func,pe.func,pe.string,pe.string,pe.shape({addEventListener:pe.func,removeEventListener:pe.func,document:pe.shape({getElementById:pe.func,activeElement:pe.any,body:pe.any})});xi.itemToString,xi.stateReducer,xi.environment;const zh=[{label:"json",value:"json"},{label:"csv",value:"csv"}],pT=({onSelect:e})=>{const{isOpen:t,selectedItem:n,getToggleButtonProps:r,getMenuProps:i,getItemProps:a}=hc({items:zh,onSelectedItemChange:({selectedItem:s})=>{e(s==null?void 0:s.value)},itemToString:s=>s?s.value:""});return T.jsxs("div",{className:"w-full",children:[T.jsxs("div",{"data-cy":"localization-export-file-type-select",className:ft("w-full p-2 flex items-center justify-between cursor-pointer space-x-1 bg-grey-300 text-grey-50 h-6",{"border-l border-r border-t border-primary-dark rounded-t":t,rounded:!t}),...r(),children:[T.jsx("span",{className:"text-grey-50 text-xs",children:n?n.label:"Select a file format"}),T.jsx(st.FdDown,{className:"w-4 h-4"})]}),T.jsx("ul",{className:ft("h-full rounded-b py-[6px]",{hidden:!t,"border-[1px] border-primary-dark":t}),...i(),children:t&&zh.map((s,u)=>T.jsx("li",{className:ft("h-5 p-1 bg-grey-900 text-xs hover:bg-primary-hover cursor-pointer"),...a({item:s,index:u}),children:s.label},u))})]})},dT=({selected:e,delimiter:t,onSelect:n,label:r})=>T.jsxs("div",{className:"flex flex-row items-center justify-between space-x-2",children:[T.jsx("div",{className:"flex h-[16px] w-[16px] items-center justify-center rounded-full border",onClick:()=>n(t),children:e===t&&T.jsx("div",{className:"h-2 w-2 rounded-full bg-primary-dark"})}),T.jsxs("div",{className:"text-sm text-grey-50",children:[r,` (${t})`]})]}),mT=({enable:e,onSelect:t})=>{const{state:n,actions:r}=Se.useStateObject({delimiters:[{label:"Comma",value:","},{label:"Semicolon",value:";"}],selected:","});return M.useEffect(()=>{t(n.selected)},[n.selected]),e?T.jsxs("div",{className:"flex flex-row items-center justify-between",children:[T.jsx("span",{className:"text-sm text-grey-50",children:" Select a Delimiter "}),T.jsx("div",{className:"flex flex-row space-x-2",children:n.delimiters.map(({label:i,value:a},s)=>T.jsx(dT,{onSelect:u=>r.setSelected(u),selected:n.selected,delimiter:a,label:i},s))})]}):T.jsx(T.Fragment,{})},gT={SELECT_FILE_TYPE:"Please Select a File Format !"},vT=({toExport:e})=>{var re;const[t,n]=M.useState(),r=kr(),i=r.getWebformTabs(),a=M.useRef(null),s=M.useRef([]),u=M.useRef([]),{i18n:l}=nr(),c=((re=r.getUserComponents)==null?void 0:re.call(r))??{},h=r.buildResolver??{},[f]=M.useState(!0),{state:{isOpen:d,fileType:m,error:v,csvDelimier:x},actions:S}=Se.useStateObject({error:"",isOpen:!1,fileType:"",supprtedExtension:[".json",".csv"],csvDelimier:","}),b=e.length===0;M.useEffect(()=>{Se.tasksManagerSubject.subscribe({next:ee=>{if(ee.type==="i18n"&&ee.action==="cancel"){const{id:se}=ee;u.current.push(se)}}}),n({...h,...c})},[]);const k=()=>{S.setFileType(""),S.setError(""),S.setIsOpen(!1)},_=()=>{k()},P=()=>_(),w=()=>{const ee={};t&&(Object.entries(t).forEach(([se,he])=>{const{info:{settings:ge}}=he;if(ge)if(se==="Text")ee.Text=[{keyPropName:"doc",keyDefaultName:"text"}];else{const ye=g(ge,"");ee[se]=ye}}),a.current=ee)},g=(ee,se)=>{let he=[];if(Array.isArray(ee))ee.forEach(ge=>he=he.concat(g(ge,se)));else if(be.isObject(ee)){const{key:ge,type:ye}=ee;if(ye===Se.ESetting.GROUP){const{components:L}=ee;L==null||L.forEach(J=>he=he.concat(g(J,se)))}else ye===Se.ESetting.I18NFIELD?he.push({keyPropName:se||ge,keyDefaultName:ge}):Object.entries(ee).forEach(([,L])=>{be.isObject(L)&&(he=he.concat(g(L,se||ge)))})}return he},E=(ee,se)=>{const{content:he}=ee,{components:ge}=he,ye={};if(!ge)return ee;const L=(ue,A,xe,ie)=>{const fe=[];if(be.has(ue,xe)){const te=be.get(ue,xe);fe.push(...Ju(te,xe,ie))}const H=[];return fe.forEach(te=>{const me=be.get(ue,te),oe={__dataPath:te,__default:me};e.forEach(K=>{const Z=`i18n:${K}`,Q=Object.keys(A),W=Q.find(ve=>ve.startsWith(Z)),ae=Q.reduce((ve,Ee)=>(Ee!==Z&&Ee.endsWith(Z)&&ve.push(Ee),ve),[]);if(W){const ve=be.get(A,`${W}.${te}`);be.set(oe,K,ve)}if(ae.length&&ae.forEach(ve=>{const Ee=be.get(A,`${ve}.${te}`);let _e=ve;_e=ve.replace("states:",""),_e=_e.replace("i18n:",""),Ee&&be.set(oe,_e,Ee)}),!W){const ve=be.get(ue,`${te}`);be.set(oe,K,ve)}}),H.push(oe)}),H},J=(ue,A,xe)=>{const ie=[],fe=be.get(ue,xe);return fe?(ie.push({key:"__default",props:fe}),e.forEach(H=>{const te=`i18n:${H}`,me=Object.keys(A),oe=me.find(Z=>Z.startsWith(te)),K=me.reduce((Z,Q)=>(Q!==te&&Q.endsWith(te)&&Z.push(Q),Z),[]);if(oe){const Z=be.get(A,`${oe}.${xe}`);Z&&ie.push({key:H,props:Z})}K.length&&K.forEach(Z=>{const Q=be.get(A,`${Z}.${xe}`);ie.push({key:Z,props:Q||""})}),!oe&&!K.length&&ie.push({key:H,props:fe})}),ie.reduce((H,te)=>{const{key:me,props:oe}=te,K=VE(oe);return{...H,[me]:K}},{__dataPath:xe})):ue};return Object.entries(ge).forEach(([ue,A])=>{const{props:xe,custom:ie={},type:fe}=A,X=fe.resolvedName,H=se[X];if(!H||H.length===0)return;const te=H.map(({keyPropName:me,keyDefaultName:oe})=>X==="Text"?J(xe,ie,me):L(xe,ie,me,oe));be.set(ye,ue,{resolverName:X,props:[...te.flat()]})}),ye},D=async(ee,se)=>{const he={},ge=ye=>{const L=ye+1===ee.length?ee.length:ye,J=Math.ceil(L/ee.length*100);Se.tasksManagerSubject.next({id:se,action:"update",type:"i18n",payload:{progress:J,status:J>=100?"finished":"ongoing"}})};for(let ye=0;ye<ee.length;ye++){const L=ee[ye],J=i.find(xe=>xe.name===L.name&&xe.type==="webform");if(!a.current){ge(ye);continue}const ue=J||await Se.getNodeInfo({verb:Se.DesignerRequestVerb.GET_INFO,content:!0,path:`WebForms/${L.name}.${L.ext}`,as:"json"}),A=E(ue,a.current);if(be.isEmpty(A)||be.set(he,L.name,A),u.current.find(xe=>xe===se))return{};ge(ye)}return he},j=(ee,se,he)=>{const ge="data:text/json;charset=utf-8,"+encodeURIComponent(ee),ye=document.createElement("a");ye.setAttribute("href",ge),ye.setAttribute("download",se+`.${he}`),document.body.appendChild(ye),ye.click(),ye.remove()},N=ee=>{switch(m){case"csv":{const se=["keys","resolverName","__t"].concat(e.concat(["i18nkey_default"]));return LE(ee,se,x)}case"json":return JSON.stringify(ee,null," ");default:return JSON.stringify(ee,null," ")}},B=(ee,se)=>{Object.entries(se.keys).forEach(([ge,ye])=>{Object.keys(ye).forEach(L=>{s.current.push(`i18n.${ge}.${L}`)})});const he={};return Object.entries(se.keys).forEach(([ge,ye])=>{he[ge]={default:ye.default},e.forEach(L=>{he[ge][L]=Object.hasOwn(ye,L)?ye[L]:f?ye.default:void 0})}),{webforms:{...ee},i18n:he}},G=ee=>S.setCsvDelimier(ee),U=async()=>{const ee=El.generate().toString();try{Se.tasksManagerSubject.next({id:ee,action:"add",type:"i18n",payload:{progress:0,name:"Export i18n",status:"ongoing",date:new Date().toISOString(),time:OE()}}),w();const se=await tg(),he=await D(se,ee),ge=B(he,l),ye=N(ge);be.isEmpty(ye)||j(ye,"export-i18n",m),k()}catch(se){Se.tasksManagerSubject.next({id:ee,type:"i18n",action:"update",payload:{status:"canceled"}}),Se.tasksManagerSubject.next({id:ee,type:"i18n",action:"error",payload:{errorMessage:se.message||"Export file error"}})}k()};return T.jsxs(T.Fragment,{children:[T.jsx(Se.Tooltip,{label:"Export",container:St(),children:T.jsx("button",{disabled:b,className:ft("flex h-full flex-row items-center p-1 rounded disabled:opacity-50",{"cursor-not-allowed":b},{"hover:bg-primary-hover":!b}),onClick:()=>{S.setIsOpen(!0)},children:T.jsx(st.FdUpload,{className:"h-4 w-4"})})}),T.jsxs(Dg,{isOpen:d,onClose:_,title:"Export","data-cy":"localization-export-dialog",children:[T.jsx("div",{className:"mt-4",children:T.jsx(pT,{onSelect:ee=>S.setFileType(ee)})}),T.jsx(mT,{enable:m==="csv",onSelect:G}),T.jsxs("div",{className:"mt-3 flex items-center justify-between gap-4",children:[T.jsxs("div",{className:"flex flex-row space-x-1 justify-center items-center text-purple-600 hover:underline cursor-pointer",onClick:()=>{window.open("https://developer.4d.com/qodly/4DQodlyPro/localization#exporting-and-importing-translations","_blank")},children:[T.jsx("p",{className:"text-xs",children:"How to Export an i18n File"}),T.jsx(st.FdOutload,{className:"ml-1 h-4 w-4 text-grey-50"})]}),T.jsxs("div",{className:"flex items-center space-x-2",children:[T.jsx("button",{onClick:P,className:"rounded border w-16 border-white px-2 py-1 text-xs font-medium text-grey-50 hover:bg-white hover:border-white hover:font-bold hover:text-primary-dark",children:"Cancel"}),T.jsx("button",{onClick:()=>{m?(S.setIsOpen(!1),U()):S.setError(gT.SELECT_FILE_TYPE)},className:"rounded w-16 px-2 py-1 text-xs font-medium text-grey-50 bg-primary-dark hover:border-white hover:border hover:bg-primary-hover hover:text-white hover:font-bold",children:"Export"})]})]}),v&&T.jsx("div",{className:"flex items-center justify-center p-2",children:T.jsx("span",{className:"text-sm text-red-500",children:v})})]})]})},xT={DROP_EVENT_ERROR:"Not Suported File type! Only .json and .csv are Supported."},bT=["default"],yT={MISSING_WEBFORMS_OR_I18N:"The file must contain 'webforms' or 'i18n' (or both). The file is empty or missing these keys."},Lv=["__dataPath","__default","default","__t","i18nkey_default"],wT=["i18n:","state:"],ws=e=>Lv.includes(e)||wT.some(t=>e.startsWith(t)),ST=e=>{const t=new Set;return e.webforms&&Object.values(e.webforms).forEach(n=>{Object.values(n).forEach(r=>{(r.props||[]).forEach(i=>{Object.keys(i).forEach(a=>{ws(a)||t.add(a)})})})}),e.i18n&&Object.values(e.i18n).forEach(n=>{Object.keys(n||{}).forEach(r=>{ws(r)||t.add(r)})}),Array.from(t).sort()},$h=e=>{if(Lv.includes(e))return null;if(e.startsWith("state:")){const t=e.lastIndexOf("i18n:");return t!==-1&&e.slice(t+5)||null}return e},CT=(e,t)=>{const n=new Set(t),r={};return e.webforms&&(r.webforms={},Object.entries(e.webforms).forEach(([i,a])=>{if(!a||typeof a!="object")return;const s={};Object.entries(a).forEach(([u,l])=>{if(!l||typeof l!="object")return;const c={resolverName:l.resolverName};l.resolverName==="Text"?(l.props&&(c.props=l.props),l.custom&&(c.custom={},Object.entries(l.custom).forEach(([f,d])=>{const m=f.startsWith("state:")||f.startsWith("states:")?$h(f):f.startsWith("i18n:")?f.slice(5):f;m&&n.has(m)&&(c.custom[f]=d)}))):Object.entries(l).forEach(([f,d])=>{if(f!=="resolverName")if(d&&be.isObject(d)&&!Array.isArray(d)){const m={};Object.entries(d).forEach(([v,x])=>{const S=$h(v);(S===null||n.has(S))&&(m[v]=x)}),Object.keys(m).length>0&&(c[f]=m)}else c[f]=d}),s[u]=c}),r.webforms[i]=s})),e.i18n&&(r.i18n={},Object.entries(e.i18n).forEach(([i,a])=>{if(!a||typeof a!="object")return;const s={};Object.entries(a).forEach(([u,l])=>{(u==="default"||!ws(u)&&n.has(u))&&(s[u]=l)}),Object.keys(s).length>0&&(r.i18n[i]=s)})),r},kT=e=>{const{data:t}=Il.parse(e),n=t[0];if(!n||!Array.isArray(n))return[];const r=n.slice(2).filter(i=>i&&!ws(i.trim()));return[...new Set(r)].sort()},Lr={EMPTY_OR_INVALID:"The CSV file is empty or could not be parsed.",HEADER_REQUIRED:"The first row must be a header with at least columns: 'keys', 'resolverName', and one locale (e.g. __t, fr, en).",KEY_FORMAT:"Each data row's first column (keys) must be non-empty and start with 'webforms.' or 'i18n.'.",ROW_COLUMNS:"Every row must have the same number of columns as the header."},ET=e=>{const t=ng(e),{data:n}=Il.parse(t),r=n;if(!(r!=null&&r.length))return{valid:!1,message:Lr.EMPTY_OR_INVALID};const i=r[0];if(!i||i.length<3)return{valid:!1,message:Lr.HEADER_REQUIRED};const a=(i[0]??"").trim().toLowerCase(),s=(i[1]??"").trim().toLowerCase();if(a!=="keys"||s!=="resolvername")return{valid:!1,message:Lr.HEADER_REQUIRED};const u=i.length;for(let l=1;l<r.length;l++){if(r[l].length<=1)continue;const c=r[l];if(!c||c.length!==u)return{valid:!1,message:Lr.ROW_COLUMNS};const h=(c[0]??"").trim();if(!h)return{valid:!1,message:Lr.KEY_FORMAT};if(!h.startsWith("webforms.")&&!h.startsWith("i18n."))return{valid:!1,message:Lr.KEY_FORMAT}}return{valid:!0}},_T=(e,t)=>{const r=new $0.Validator().validate(e,t);if(r.valid)return{valid:!0};const i=r.errors[0],a=i?`${i.property||"root"} ${i.message}`.trim():"Invalid file format";return{valid:!1,message:be.isObject(e)&&!be.has(e,"webforms")&&!be.has(e,"i18n")&&(a.includes("subschema")||a.includes("any of"))?yT.MISSING_WEBFORMS_OR_I18N:a}},IT="Export i18n",TT="Schema for i18n export format. Must have webforms, i18n, or both.",AT="object",PT=!1,RT={webforms:{type:"object",description:"Webform names to their component localizations",additionalProperties:{$ref:"#/definitions/webformComponents"}},i18n:{type:"object",description:"Shared i18n keys and their localized values",additionalProperties:{$ref:"#/definitions/i18nKeys"}}},NT=[{required:["webforms"]},{required:["i18n"]}],OT={webformComponents:{type:"object",description:"Component ID to component localization entry",additionalProperties:{$ref:"#/definitions/componentEntry"}},componentEntry:{type:"object",required:["resolverName","props"],additionalProperties:!1,properties:{resolverName:{type:"string",description:"Name of the component resolver (e.g. Button)"},props:{type:"array",description:"Localized prop entries",items:{$ref:"#/definitions/propLocalization"}}}},propLocalization:{type:"object",required:["__dataPath","__default"],properties:{__dataPath:{type:"string",description:"Path to the prop (e.g. text)"},__default:{type:"string",description:"Default value for the prop"}},additionalProperties:{type:"string",description:"Locale code to localized string (e.g. fr, en)"}},i18nKeys:{type:"object",required:["default"],properties:{default:{type:"string",description:"Default value"}},additionalProperties:{type:"string",description:"Locale code to localized string (e.g. fr, en)"}}},LT={title:IT,description:TT,type:AT,additionalProperties:PT,properties:RT,anyOf:NT,definitions:OT};var di={exports:{}};di.exports;var Uh;function DT(){return Uh||(Uh=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,a=16,s=9007199254740991,u="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",f="[object Date]",d="[object Error]",m="[object Function]",v="[object GeneratorFunction]",x="[object Map]",S="[object Number]",b="[object Null]",k="[object Object]",_="[object Proxy]",P="[object RegExp]",w="[object Set]",g="[object String]",E="[object Undefined]",D="[object WeakMap]",j="[object ArrayBuffer]",N="[object DataView]",B="[object Float32Array]",G="[object Float64Array]",U="[object Int8Array]",re="[object Int16Array]",ee="[object Int32Array]",se="[object Uint8Array]",he="[object Uint8ClampedArray]",ge="[object Uint16Array]",ye="[object Uint32Array]",L=/[\\^$.*+?()[\]{}|]/g,J=/^\[object .+?Constructor\]$/,ue=/^(?:0|[1-9]\d*)$/,A={};A[B]=A[G]=A[U]=A[re]=A[ee]=A[se]=A[he]=A[ge]=A[ye]=!0,A[u]=A[l]=A[j]=A[h]=A[N]=A[f]=A[d]=A[m]=A[x]=A[S]=A[k]=A[P]=A[w]=A[g]=A[D]=!1;var xe=typeof Ca=="object"&&Ca&&Ca.Object===Object&&Ca,ie=typeof self=="object"&&self&&self.Object===Object&&self,fe=xe||ie||Function("return this")(),X=t&&!t.nodeType&&t,H=X&&!0&&e&&!e.nodeType&&e,te=H&&H.exports===X,me=te&&xe.process,oe=(function(){try{var V=H&&H.require&&H.require("util").types;return V||me&&me.binding&&me.binding("util")}catch{}})(),K=oe&&oe.isTypedArray;function Z(V,z,ne){switch(ne.length){case 0:return V.call(z);case 1:return V.call(z,ne[0]);case 2:return V.call(z,ne[0],ne[1]);case 3:return V.call(z,ne[0],ne[1],ne[2])}return V.apply(z,ne)}function Q(V,z){for(var ne=-1,Pe=Array(V);++ne<V;)Pe[ne]=z(ne);return Pe}function W(V){return function(z){return V(z)}}function ae(V,z){return V==null?void 0:V[z]}function ve(V,z){return function(ne){return V(z(ne))}}var Ee=Array.prototype,_e=Function.prototype,Ie=Object.prototype,Me=fe["__core-js_shared__"],ke=_e.toString,Ne=Ie.hasOwnProperty,Fe=(function(){var V=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return V?"Symbol(src)_1."+V:""})(),bt=Ie.toString,le=ke.call(Object),ce=RegExp("^"+ke.call(Ne).replace(L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=te?fe.Buffer:void 0,Ve=fe.Symbol,Ye=fe.Uint8Array;R&&R.allocUnsafe;var yt=ve(Object.getPrototypeOf,Object),Te=Object.create,Lt=Ie.propertyIsEnumerable,Rn=Ee.splice,Dt=Ve?Ve.toStringTag:void 0,mt=(function(){try{var V=Pt(Object,"defineProperty");return V({},"",{}),V}catch{}})(),an=R?R.isBuffer:void 0,Vt=Math.max,co=Date.now,ur=Pt(fe,"Map"),Et=Pt(Object,"create"),zt=(function(){function V(){}return function(z){if(!C(z))return{};if(Te)return Te(z);V.prototype=z;var ne=new V;return V.prototype=void 0,ne}})();function Qe(V){var z=-1,ne=V==null?0:V.length;for(this.clear();++z<ne;){var Pe=V[z];this.set(Pe[0],Pe[1])}}function $n(){this.__data__=Et?Et(null):{},this.size=0}function Be(V){var z=this.has(V)&&delete this.__data__[V];return this.size-=z?1:0,z}function Zi(V){var z=this.__data__;if(Et){var ne=z[V];return ne===r?void 0:ne}return Ne.call(z,V)?z[V]:void 0}function ri(V){var z=this.__data__;return Et?z[V]!==void 0:Ne.call(z,V)}function fo(V,z){var ne=this.__data__;return this.size+=this.has(V)?0:1,ne[V]=Et&&z===void 0?r:z,this}Qe.prototype.clear=$n,Qe.prototype.delete=Be,Qe.prototype.get=Zi,Qe.prototype.has=ri,Qe.prototype.set=fo;function $t(V){var z=-1,ne=V==null?0:V.length;for(this.clear();++z<ne;){var Pe=V[z];this.set(Pe[0],Pe[1])}}function wn(){this.__data__=[],this.size=0}function ho(V){var z=this.__data__,ne=fr(z,V);if(ne<0)return!1;var Pe=z.length-1;return ne==Pe?z.pop():Rn.call(z,ne,1),--this.size,!0}function lr(V){var z=this.__data__,ne=fr(z,V);return ne<0?void 0:z[ne][1]}function cr(V){return fr(this.__data__,V)>-1}function ea(V,z){var ne=this.__data__,Pe=fr(ne,V);return Pe<0?(++this.size,ne.push([V,z])):ne[Pe][1]=z,this}$t.prototype.clear=wn,$t.prototype.delete=ho,$t.prototype.get=lr,$t.prototype.has=cr,$t.prototype.set=ea;function Un(V){var z=-1,ne=V==null?0:V.length;for(this.clear();++z<ne;){var Pe=V[z];this.set(Pe[0],Pe[1])}}function ta(){this.size=0,this.__data__={hash:new Qe,map:new(ur||$t),string:new Qe}}function na(V){var z=Ut(this,V).delete(V);return this.size-=z?1:0,z}function ra(V){return Ut(this,V).get(V)}function ia(V){return Ut(this,V).has(V)}function aa(V,z){var ne=Ut(this,V),Pe=ne.size;return ne.set(V,z),this.size+=ne.size==Pe?0:1,this}Un.prototype.clear=ta,Un.prototype.delete=na,Un.prototype.get=ra,Un.prototype.has=ia,Un.prototype.set=aa;function Hn(V){var z=this.__data__=new $t(V);this.size=z.size}function po(){this.__data__=new $t,this.size=0}function mo(V){var z=this.__data__,ne=z.delete(V);return this.size=z.size,ne}function go(V){return this.__data__.get(V)}function sa(V){return this.__data__.has(V)}function oa(V,z){var ne=this.__data__;if(ne instanceof $t){var Pe=ne.__data__;if(!ur||Pe.length<n-1)return Pe.push([V,z]),this.size=++ne.size,this;ne=this.__data__=new Un(Pe)}return ne.set(V,z),this.size=ne.size,this}Hn.prototype.clear=po,Hn.prototype.delete=mo,Hn.prototype.get=go,Hn.prototype.has=sa,Hn.prototype.set=oa;function ua(V,z){var ne=si(V),Pe=!ne&&Pr(V),We=!ne&&!Pe&&o(V),ct=!ne&&!Pe&&!We&&Y(V),gt=ne||Pe||We||ct,et=gt?Q(V.length,String):[],vt=et.length;for(var dn in V)gt&&(dn=="length"||We&&(dn=="offset"||dn=="parent")||ct&&(dn=="buffer"||dn=="byteLength"||dn=="byteOffset")||ga(dn,vt))||et.push(dn);return et}function Tr(V,z,ne){(ne!==void 0&&!dr(V[z],ne)||ne===void 0&&!(z in V))&&ii(V,z,ne)}function la(V,z,ne){var Pe=V[z];(!(Ne.call(V,z)&&dr(Pe,ne))||ne===void 0&&!(z in V))&&ii(V,z,ne)}function fr(V,z){for(var ne=V.length;ne--;)if(dr(V[ne][0],z))return ne;return-1}function ii(V,z,ne){z=="__proto__"&&mt?mt(V,z,{configurable:!0,enumerable:!0,value:ne,writable:!0}):V[z]=ne}var vo=da();function hr(V){return V==null?V===void 0?E:b:Dt&&Dt in Object(V)?ko(V):xa(V)}function ca(V){return O(V)&&hr(V)==u}function ai(V){if(!C(V)||Io(V))return!1;var z=p(V)?ce:J;return z.test(ya(V))}function fa(V){return O(V)&&y(V.length)&&!!A[hr(V)]}function xo(V){if(!C(V))return va(V);var z=pr(V),ne=[];for(var Pe in V)Pe=="constructor"&&(z||!Ne.call(V,Pe))||ne.push(Pe);return ne}function Re(V,z,ne,Pe,We){V!==z&&vo(z,function(ct,gt){if(We||(We=new Hn),C(ct))Ar(V,z,gt,ne,Re,Pe,We);else{var et=Pe?Pe(Wn(V,gt),ct,gt+"",V,z,We):void 0;et===void 0&&(et=ct),Tr(V,gt,et)}},Ce)}function Ar(V,z,ne,Pe,We,ct,gt){var et=Wn(V,ne),vt=Wn(z,ne),dn=gt.get(vt);if(dn){Tr(V,ne,dn);return}var Zt=ct?ct(et,vt,ne+"",V,z,gt):void 0,ui=Zt===void 0;if(ui){var Po=si(vt),Ro=!Po&&o(vt),tf=!Po&&!Ro&&Y(vt);Zt=vt,Po||Ro||tf?si(et)?Zt=et:Ao(et)?Zt=So(et):Ro?(ui=!1,Zt=yo(vt)):tf?(ui=!1,Zt=wo(vt)):Zt=[]:q(vt)||Pr(vt)?(Zt=et,Pr(et)?Zt=we(et):(!C(et)||p(et))&&(Zt=ma(vt))):ui=!1}ui&&(gt.set(vt,Zt),We(Zt,vt,Pe,ct,gt),gt.delete(vt)),Tr(V,ne,Zt)}function sn(V,z){return qe(ba(V,z,ot),V+"")}var bo=mt?function(V,z){return mt(V,"toString",{configurable:!0,enumerable:!1,value:Ue(z),writable:!0})}:ot;function yo(V,z){return V.slice()}function ha(V){var z=new V.constructor(V.byteLength);return new Ye(z).set(new Ye(V)),z}function wo(V,z){var ne=ha(V.buffer);return new V.constructor(ne,V.byteOffset,V.length)}function So(V,z){var ne=-1,Pe=V.length;for(z||(z=Array(Pe));++ne<Pe;)z[ne]=V[ne];return z}function pa(V,z,ne,Pe){var We=!ne;ne||(ne={});for(var ct=-1,gt=z.length;++ct<gt;){var et=z[ct],vt=void 0;vt===void 0&&(vt=V[et]),We?ii(ne,et,vt):la(ne,et,vt)}return ne}function Co(V){return sn(function(z,ne){var Pe=-1,We=ne.length,ct=We>1?ne[We-1]:void 0,gt=We>2?ne[2]:void 0;for(ct=V.length>3&&typeof ct=="function"?(We--,ct):void 0,gt&&Eo(ne[0],ne[1],gt)&&(ct=We<3?void 0:ct,We=1),z=Object(z);++Pe<We;){var et=ne[Pe];et&&V(z,et,Pe,ct)}return z})}function da(V){return function(z,ne,Pe){for(var We=-1,ct=Object(z),gt=Pe(z),et=gt.length;et--;){var vt=gt[++We];if(ne(ct[vt],vt,ct)===!1)break}return z}}function Ut(V,z){var ne=V.__data__;return _o(z)?ne[typeof z=="string"?"string":"hash"]:ne.map}function Pt(V,z){var ne=ae(V,z);return ai(ne)?ne:void 0}function ko(V){var z=Ne.call(V,Dt),ne=V[Dt];try{V[Dt]=void 0;var Pe=!0}catch{}var We=bt.call(V);return Pe&&(z?V[Dt]=ne:delete V[Dt]),We}function ma(V){return typeof V.constructor=="function"&&!pr(V)?zt(yt(V)):{}}function ga(V,z){var ne=typeof V;return z=z??s,!!z&&(ne=="number"||ne!="symbol"&&ue.test(V))&&V>-1&&V%1==0&&V<z}function Eo(V,z,ne){if(!C(ne))return!1;var Pe=typeof z;return(Pe=="number"?oi(ne)&&ga(z,ne.length):Pe=="string"&&z in ne)?dr(ne[z],V):!1}function _o(V){var z=typeof V;return z=="string"||z=="number"||z=="symbol"||z=="boolean"?V!=="__proto__":V===null}function Io(V){return!!Fe&&Fe in V}function pr(V){var z=V&&V.constructor,ne=typeof z=="function"&&z.prototype||Ie;return V===ne}function va(V){var z=[];if(V!=null)for(var ne in Object(V))z.push(ne);return z}function xa(V){return bt.call(V)}function ba(V,z,ne){return z=Vt(z===void 0?V.length-1:z,0),function(){for(var Pe=arguments,We=-1,ct=Vt(Pe.length-z,0),gt=Array(ct);++We<ct;)gt[We]=Pe[z+We];We=-1;for(var et=Array(z+1);++We<z;)et[We]=Pe[We];return et[z]=ne(gt),Z(V,this,et)}}function Wn(V,z){if(!(z==="constructor"&&typeof V[z]=="function")&&z!="__proto__")return V[z]}var qe=To(bo);function To(V){var z=0,ne=0;return function(){var Pe=co(),We=a-(Pe-ne);if(ne=Pe,We>0){if(++z>=i)return arguments[0]}else z=0;return V.apply(void 0,arguments)}}function ya(V){if(V!=null){try{return ke.call(V)}catch{}try{return V+""}catch{}}return""}function dr(V,z){return V===z||V!==V&&z!==z}var Pr=ca((function(){return arguments})())?ca:function(V){return O(V)&&Ne.call(V,"callee")&&!Lt.call(V,"callee")},si=Array.isArray;function oi(V){return V!=null&&y(V.length)&&!p(V)}function Ao(V){return O(V)&&oi(V)}var o=an||_t;function p(V){if(!C(V))return!1;var z=hr(V);return z==m||z==v||z==c||z==_}function y(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=s}function C(V){var z=typeof V;return V!=null&&(z=="object"||z=="function")}function O(V){return V!=null&&typeof V=="object"}function q(V){if(!O(V)||hr(V)!=k)return!1;var z=yt(V);if(z===null)return!0;var ne=Ne.call(z,"constructor")&&z.constructor;return typeof ne=="function"&&ne instanceof ne&&ke.call(ne)==le}var Y=K?W(K):fa;function we(V){return pa(V,Ce(V))}function Ce(V){return oi(V)?ua(V):xo(V)}var je=Co(function(V,z,ne,Pe){Re(V,z,ne,Pe)});function Ue(V){return function(){return V}}function ot(V){return V}function _t(){return!1}e.exports=je})(di,di.exports)),di.exports}var VT=DT();const br=Hi(VT);var Dv=1/60*1e3,MT=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},Vv=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(MT())},Dv)};function FT(e){var t=[],n=[],r=0,i=!1,a=new WeakSet,s={schedule:function(u,l,c){l===void 0&&(l=!1),c===void 0&&(c=!1);var h=c&&i,f=h?t:n;return l&&a.add(u),f.indexOf(u)===-1&&(f.push(u),h&&i&&(r=t.length)),u},cancel:function(u){var l=n.indexOf(u);l!==-1&&n.splice(l,1),a.delete(u)},process:function(u){var l;if(i=!0,l=[n,t],t=l[0],n=l[1],n.length=0,r=t.length,r)for(var c=0;c<r;c++){var h=t[c];h(u),a.has(h)&&(s.schedule(h),e())}i=!1}};return s}var jT=40,el=!0,Ni=!1,tl=!1,Hr={delta:0,timestamp:0},Ki=["read","update","preRender","render","postRender"],Qs=Ki.reduce(function(e,t){return e[t]=FT(function(){return Ni=!0}),e},{}),En=Ki.reduce(function(e,t){var n=Qs[t];return e[t]=function(r,i,a){return i===void 0&&(i=!1),a===void 0&&(a=!1),Ni||zT(),n.schedule(r,i,a)},e},{}),bi=Ki.reduce(function(e,t){return e[t]=Qs[t].cancel,e},{}),jr=Ki.reduce(function(e,t){return e[t]=function(){return Qs[t].process(Hr)},e},{}),BT=function(e){return Qs[e].process(Hr)},Mv=function(e){Ni=!1,Hr.delta=el?Dv:Math.max(Math.min(e-Hr.timestamp,jT),1),Hr.timestamp=e,tl=!0,Ki.forEach(BT),tl=!1,Ni&&(el=!1,Vv(Mv))},zT=function(){Ni=!0,el=!0,tl||Vv(Mv)},Ss=function(){return Hr},$T={};function bu(e){return typeof e=="number"}function UT(e){return Array.isArray(e)}function Fv(e){return typeof e=="function"}function Wr(e){var t=typeof e;return e!=null&&(t==="object"||t==="function")&&!UT(e)}function kc(e){return Object.prototype.toString.call(e)==="[object String]"}function jv(e){return/^var\(--.+\)$/.test(e)}var pn=$T.NODE_ENV!=="production";function Ec(e,t){var n={};return Object.keys(e).forEach(function(r){t.includes(r)||(n[r]=e[r])}),n}function HT(e,t,n,r){var i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var WT=function(t){var n=new WeakMap,r=function(a,s,u,l){if(typeof a>"u")return t(a,s,u);n.has(a)||n.set(a,new Map);var c=n.get(a);if(c.has(s))return c.get(s);var h=t(a,s,u,l);return c.set(s,h),h};return r},Bv=WT(HT);function zv(e,t){var n={};return Object.keys(e).forEach(function(r){var i=e[r],a=t(i,r,e);a&&(n[r]=i)}),n}var $v=function(t){return zv(t,function(n){return n!=null})},Uv=function(t){return Object.keys(t)};function Hv(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Wv(e){var t;if(!Hv(e))return!1;var n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function qv(e){var t;return Hv(e)&&(t=e.ownerDocument)!=null?t:document}function qT(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var KT=qT(),It=function(t){return t?"":void 0},sr=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.filter(Boolean).join(" ")};function GT(e){return Wv(e)&&e.tagName.toLowerCase()==="input"&&"select"in e}function JT(e){var t=Wv(e)?qv(e):document;return t.activeElement===e}function Hh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YT(e,t){if(e){if(typeof e=="string")return Hh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hh(e,t)}}function XT(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=YT(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
155
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Fv(e)?e.apply(void 0,n):e}function qt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){t.some(function(a){return a==null||a(i),i==null?void 0:i.defaultPrevented})}}function QT(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){t.forEach(function(a){a==null||a(i)})}}function ZT(e){var t;return function(){if(e){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t=e.apply(this,i),e=null}return t}}var Kv=ZT(function(e){return function(){var t=e.condition,n=e.message;t&&pn&&console.warn(n)}});function eA(e,t){t===void 0&&(t={});var n=t,r=n.isActive,i=r===void 0?JT:r,a=n.nextTick,s=n.preventScroll,u=s===void 0?!0:s,l=n.selectTextIfInput,c=l===void 0?!0:l;if(!e||i(e))return-1;function h(){if(!e){Kv({condition:!0,message:"[chakra-ui]: can't call focus() on `null` or `undefined` element"});return}if(tA())e.focus({preventScroll:u});else if(e.focus(),u){var f=nA(e);rA(f)}GT(e)&&c&&e.select()}return a?requestAnimationFrame(h):(h(),-1)}var ja=null;function tA(){if(ja==null){ja=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return ja=!0,!0}})}catch{}}return ja}function nA(e){for(var t,n=qv(e),r=(t=n.defaultView)!=null?t:window,i=e.parentNode,a=[],s=n.scrollingElement||n.documentElement;i instanceof r.HTMLElement&&i!==s;)(i.offsetHeight<i.scrollHeight||i.offsetWidth<i.scrollWidth)&&a.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),i=i.parentNode;return s instanceof r.HTMLElement&&a.push({element:s,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft}),a}function rA(e){for(var t=XT(e),n;!(n=t()).done;){var r=n.value,i=r.element,a=r.scrollTop,s=r.scrollLeft;i.scrollTop=a,i.scrollLeft=s}}function iA(e,t){if(e!=null){if(Fv(e)){e(t);return}try{e.current=t}catch{throw new Error("Cannot assign value '"+t+"' to ref '"+e+"'")}}}function Cs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){return iA(i,r)})}}function _c(e){e===void 0&&(e={});var t=e,n=t.strict,r=n===void 0?!0:n,i=t.errorMessage,a=i===void 0?"useContext: `context` is undefined. Seems you forgot to wrap component within the Provider":i,s=t.name,u=F.createContext(void 0);u.displayName=s;function l(){var c=F.useContext(u);if(!c&&r){var h=new Error(a);throw h.name="ContextError",Error.captureStackTrace==null||Error.captureStackTrace(h,l),h}return c}return[u.Provider,l,u]}var nl=KT?F.useLayoutEffect:F.useEffect;function yu(e,t){t===void 0&&(t=[]);var n=F.useRef(e);return nl(function(){n.current=e}),F.useCallback(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n.current==null?void 0:n.current.apply(n,i)},t)}function ts(e){e===void 0&&(e=!1);var t=M.useState(e),n=t[0],r=t[1],i=M.useMemo(function(){return{on:function(){return r(!0)},off:function(){return r(!1)},toggle:function(){return r(function(s){return!s})}}},[]);return[n,i]}function aA(e,t){var n=e!==void 0,r=n&&typeof e<"u"?e:t;return[n,r]}var sA={current:1},oA=F.createContext(sA),uA=function(t){return t.current++};function lA(e,t){var n=F.useContext(oA),r=F.useState(n.current),i=r[0],a=r[1];return F.useEffect(function(){a(uA(n))},[n]),F.useMemo(function(){return[t,i].filter(Boolean).join("-")},[e,t,i])}var cA=function(t,n){var r=F.useRef(!1);return F.useEffect(function(){if(r.current)return t();r.current=!0},n),r.current},Gv=F.createContext({});pn&&(Gv.displayName="ColorModeContext");var fA=function(){var t=F.useContext(Gv);if(t===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return t};function ks(){return ks=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ks.apply(this,arguments)}var hA=function(t,n){return function(r){var i=String(n),a=t?t+"."+i:i;return Wr(r.__cssMap)&&a in r.__cssMap?r.__cssMap[a].varRef:n}};function Oi(e){var t=e.scale,n=e.transform,r=e.compose,i=function(s,u){var l,c=hA(t,s)(u),h=(l=n==null?void 0:n(c,u))!=null?l:c;return r&&(h=r(h,u)),h};return i}function gn(e,t){return function(n){var r={property:n,scale:e};return r.transform=Oi({scale:e,transform:t}),r}}var pA=function(t){var n=t.rtl,r=t.ltr;return function(i){return i.direction==="rtl"?n:r}};function dA(e){var t=e.property,n=e.scale,r=e.transform;return{scale:n,property:pA(t),transform:n?Oi({scale:n,compose:r}):r}}var wu,Su,Jv=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function mA(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))"].concat(Jv).join(" ")}function gA(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)"].concat(Jv).join(" ")}var vA={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},xA={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function bA(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var yA={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Yv="& > :not(style) ~ :not(style)",wA=(wu={},wu[Yv]={marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"},wu),SA=(Su={},Su[Yv]={marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"},Su);function Es(e,t){return Es=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Es(e,t)}function CA(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Es(e,t)}function rl(){rl=function(i,a){return new n(i,void 0,a)};var e=RegExp.prototype,t=new WeakMap;function n(i,a,s){var u=new RegExp(i,a);return t.set(u,s||t.get(i)),Es(u,n.prototype)}CA(n,RegExp),n.prototype.exec=function(i){var a=e.exec.call(this,i);return a&&(a.groups=r(a,this)),a},n.prototype[Symbol.replace]=function(i,a){if(typeof a=="string"){var s=t.get(this);return e[Symbol.replace].call(this,i,a.replace(/\$<([^>]+)>/g,function(l,c){return"$"+s[c]}))}else if(typeof a=="function"){var u=this;return e[Symbol.replace].call(this,i,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l),l.push(r(l,u))),a.apply(this,l)})}else return e[Symbol.replace].call(this,i,a)};function r(i,a){var s=t.get(a);return Object.keys(s).reduce(function(u,l){return u[l]=i[s[l]],u},Object.create(null))}return rl.apply(this,arguments)}var il={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},kA=new Set(Object.values(il)),Xv=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),EA=function(t){return t.trim()};function _A(e,t){var n,r;if(e==null||Xv.has(e))return e;var i=rl(/(^[\x2DA-Za-z]+)\(((.*))\)/g,{type:1,values:2}),a=(n=(r=i.exec(e))==null?void 0:r.groups)!=null?n:{},s=a.type,u=a.values;if(!s||!u)return e;var l=s.includes("-gradient")?s:s+"-gradient",c=u.split(",").map(EA).filter(Boolean),h=c[0],f=c.slice(1);if((f==null?void 0:f.length)===0)return e;var d=h in il?il[h]:h;f.unshift(d);var m=f.map(function(v){if(kA.has(v))return v;var x=v.indexOf(" "),S=x!==-1?[v.substr(0,x),v.substr(x+1)]:[v],b=S[0],k=S[1],_=Qv(k)?k:k&&k.split(" "),P="colors."+b,w=P in t.__cssMap?t.__cssMap[P].varRef:b;return _?[w].concat(Array.isArray(_)?_:[_]).join(" "):w});return l+"("+m.join(", ")+")"}var Qv=function(t){return kc(t)&&t.includes("(")&&t.includes(")")},IA=function(t,n){return _A(t,n??{})},TA=function(t){var n=parseFloat(t.toString()),r=t.toString().replace(String(n),"");return{unitless:!r,value:n,unit:r}},Sn=function(t){return function(n){return t+"("+n+")"}},at={filter:function(t){return t!=="auto"?t:vA},backdropFilter:function(t){return t!=="auto"?t:xA},ring:function(t){return bA(at.px(t))},bgClip:function(t){return t==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:t}},transform:function(t){return t==="auto"?mA():t==="auto-gpu"?gA():t},px:function(t){if(t==null)return t;var n=TA(t),r=n.unitless;return r||bu(t)?t+"px":t},fraction:function(t){return!bu(t)||t>1?t:t*100+"%"},float:function(t,n){var r={left:"right",right:"left"};return n.direction==="rtl"?r[t]:t},degree:function(t){if(jv(t)||t==null)return t;var n=kc(t)&&!t.endsWith("deg");return bu(t)||n?t+"deg":t},gradient:IA,blur:Sn("blur"),opacity:Sn("opacity"),brightness:Sn("brightness"),contrast:Sn("contrast"),dropShadow:Sn("drop-shadow"),grayscale:Sn("grayscale"),hueRotate:Sn("hue-rotate"),invert:Sn("invert"),saturate:Sn("saturate"),sepia:Sn("sepia"),bgImage:function(t){if(t==null)return t;var n=Qv(t)||Xv.has(t);return n?t:"url("+t+")"},outline:function(t){var n=String(t)==="0"||String(t)==="none";return t!==null&&n?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:t}},flexDirection:function(t){var n,r=(n=yA[t])!=null?n:{},i=r.space,a=r.divide,s={flexDirection:t};return i&&(s[i]=1),a&&(s[a]=1),s}},$={borderWidths:gn("borderWidths"),borderStyles:gn("borderStyles"),colors:gn("colors"),borders:gn("borders"),radii:gn("radii",at.px),space:gn("space",at.px),spaceT:gn("space",at.px),degreeT:function(t){return{property:t,transform:at.degree}},prop:function(t,n,r){return ks({property:t,scale:n},n&&{transform:Oi({scale:n,transform:r})})},propT:function(t,n){return{property:t,transform:n}},sizes:gn("sizes",at.px),sizesT:gn("sizes",at.fraction),shadows:gn("shadows"),logical:dA,blur:gn("blur",at.blur)},ns={background:$.colors("background"),backgroundColor:$.colors("backgroundColor"),backgroundImage:$.propT("backgroundImage",at.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:at.bgClip},bgSize:$.prop("backgroundSize"),bgPosition:$.prop("backgroundPosition"),bg:$.colors("background"),bgColor:$.colors("backgroundColor"),bgPos:$.prop("backgroundPosition"),bgRepeat:$.prop("backgroundRepeat"),bgAttachment:$.prop("backgroundAttachment"),bgGradient:$.propT("backgroundImage",at.gradient),bgClip:{transform:at.bgClip}};Object.assign(ns,{bgImage:ns.backgroundImage,bgImg:ns.backgroundImage});var tt={border:$.borders("border"),borderWidth:$.borderWidths("borderWidth"),borderStyle:$.borderStyles("borderStyle"),borderColor:$.colors("borderColor"),borderRadius:$.radii("borderRadius"),borderTop:$.borders("borderTop"),borderBlockStart:$.borders("borderBlockStart"),borderTopLeftRadius:$.radii("borderTopLeftRadius"),borderStartStartRadius:$.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:$.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:$.radii("borderTopRightRadius"),borderStartEndRadius:$.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:$.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:$.borders("borderRight"),borderInlineEnd:$.borders("borderInlineEnd"),borderBottom:$.borders("borderBottom"),borderBlockEnd:$.borders("borderBlockEnd"),borderBottomLeftRadius:$.radii("borderBottomLeftRadius"),borderBottomRightRadius:$.radii("borderBottomRightRadius"),borderLeft:$.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:$.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:$.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:$.borders(["borderLeft","borderRight"]),borderInline:$.borders("borderInline"),borderY:$.borders(["borderTop","borderBottom"]),borderBlock:$.borders("borderBlock"),borderTopWidth:$.borderWidths("borderTopWidth"),borderBlockStartWidth:$.borderWidths("borderBlockStartWidth"),borderTopColor:$.colors("borderTopColor"),borderBlockStartColor:$.colors("borderBlockStartColor"),borderTopStyle:$.borderStyles("borderTopStyle"),borderBlockStartStyle:$.borderStyles("borderBlockStartStyle"),borderBottomWidth:$.borderWidths("borderBottomWidth"),borderBlockEndWidth:$.borderWidths("borderBlockEndWidth"),borderBottomColor:$.colors("borderBottomColor"),borderBlockEndColor:$.colors("borderBlockEndColor"),borderBottomStyle:$.borderStyles("borderBottomStyle"),borderBlockEndStyle:$.borderStyles("borderBlockEndStyle"),borderLeftWidth:$.borderWidths("borderLeftWidth"),borderInlineStartWidth:$.borderWidths("borderInlineStartWidth"),borderLeftColor:$.colors("borderLeftColor"),borderInlineStartColor:$.colors("borderInlineStartColor"),borderLeftStyle:$.borderStyles("borderLeftStyle"),borderInlineStartStyle:$.borderStyles("borderInlineStartStyle"),borderRightWidth:$.borderWidths("borderRightWidth"),borderInlineEndWidth:$.borderWidths("borderInlineEndWidth"),borderRightColor:$.colors("borderRightColor"),borderInlineEndColor:$.colors("borderInlineEndColor"),borderRightStyle:$.borderStyles("borderRightStyle"),borderInlineEndStyle:$.borderStyles("borderInlineEndStyle"),borderTopRadius:$.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:$.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:$.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:$.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(tt,{rounded:tt.borderRadius,roundedTop:tt.borderTopRadius,roundedTopLeft:tt.borderTopLeftRadius,roundedTopRight:tt.borderTopRightRadius,roundedTopStart:tt.borderStartStartRadius,roundedTopEnd:tt.borderStartEndRadius,roundedBottom:tt.borderBottomRadius,roundedBottomLeft:tt.borderBottomLeftRadius,roundedBottomRight:tt.borderBottomRightRadius,roundedBottomStart:tt.borderEndStartRadius,roundedBottomEnd:tt.borderEndEndRadius,roundedLeft:tt.borderLeftRadius,roundedRight:tt.borderRightRadius,roundedStart:tt.borderInlineStartRadius,roundedEnd:tt.borderInlineEndRadius,borderStart:tt.borderInlineStart,borderEnd:tt.borderInlineEnd,borderTopStartRadius:tt.borderStartStartRadius,borderTopEndRadius:tt.borderStartEndRadius,borderBottomStartRadius:tt.borderEndStartRadius,borderBottomEndRadius:tt.borderEndEndRadius,borderStartRadius:tt.borderInlineStartRadius,borderEndRadius:tt.borderInlineEndRadius,borderStartWidth:tt.borderInlineStartWidth,borderEndWidth:tt.borderInlineEndWidth,borderStartColor:tt.borderInlineStartColor,borderEndColor:tt.borderInlineEndColor,borderStartStyle:tt.borderInlineStartStyle,borderEndStyle:tt.borderInlineEndStyle});var AA={color:$.colors("color"),textColor:$.colors("color"),fill:$.colors("fill"),stroke:$.colors("stroke")},al={boxShadow:$.shadows("boxShadow"),mixBlendMode:!0,blendMode:$.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:$.prop("backgroundBlendMode"),opacity:!0};Object.assign(al,{shadow:al.boxShadow});var PA={filter:{transform:at.filter},blur:$.blur("--chakra-blur"),brightness:$.propT("--chakra-brightness",at.brightness),contrast:$.propT("--chakra-contrast",at.contrast),hueRotate:$.degreeT("--chakra-hue-rotate"),invert:$.propT("--chakra-invert",at.invert),saturate:$.propT("--chakra-saturate",at.saturate),dropShadow:$.propT("--chakra-drop-shadow",at.dropShadow),backdropFilter:{transform:at.backdropFilter},backdropBlur:$.blur("--chakra-backdrop-blur"),backdropBrightness:$.propT("--chakra-backdrop-brightness",at.brightness),backdropContrast:$.propT("--chakra-backdrop-contrast",at.contrast),backdropHueRotate:$.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:$.propT("--chakra-backdrop-invert",at.invert),backdropSaturate:$.propT("--chakra-backdrop-saturate",at.saturate)},_s={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:at.flexDirection},experimental_spaceX:{static:wA,transform:Oi({scale:"space",transform:function(t){return t!==null?{"--chakra-space-x":t}:null}})},experimental_spaceY:{static:SA,transform:Oi({scale:"space",transform:function(t){return t!=null?{"--chakra-space-y":t}:null}})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:$.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:$.space("gap"),rowGap:$.space("rowGap"),columnGap:$.space("columnGap")};Object.assign(_s,{flexDir:_s.flexDirection});var Zv={gridGap:$.space("gridGap"),gridColumnGap:$.space("gridColumnGap"),gridRowGap:$.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},RA={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:at.outline},outlineOffset:!0,outlineColor:$.colors("outlineColor")},ln={width:$.sizesT("width"),inlineSize:$.sizesT("inlineSize"),height:$.sizes("height"),blockSize:$.sizes("blockSize"),boxSize:$.sizes(["width","height"]),minWidth:$.sizes("minWidth"),minInlineSize:$.sizes("minInlineSize"),minHeight:$.sizes("minHeight"),minBlockSize:$.sizes("minBlockSize"),maxWidth:$.sizes("maxWidth"),maxInlineSize:$.sizes("maxInlineSize"),maxHeight:$.sizes("maxHeight"),maxBlockSize:$.sizes("maxBlockSize"),d:$.prop("display"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:$.propT("float",at.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(ln,{w:ln.width,h:ln.height,minW:ln.minWidth,maxW:ln.maxWidth,minH:ln.minHeight,maxH:ln.maxHeight,overscroll:ln.overscrollBehavior,overscrollX:ln.overscrollBehaviorX,overscrollY:ln.overscrollBehaviorY});var NA={listStyleType:!0,listStylePosition:!0,listStylePos:$.prop("listStylePosition"),listStyleImage:!0,listStyleImg:$.prop("listStyleImage")},OA={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},LA={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Cu=function(t,n,r){var i={},a=Bv(t,n,{});for(var s in a){var u=s in r&&r[s]!=null;u||(i[s]=a[s])}return i},DA={srOnly:{transform:function(t){return t===!0?OA:t==="focusable"?LA:{}}},layerStyle:{processResult:!0,transform:function(t,n,r){return Cu(n,"layerStyles."+t,r)}},textStyle:{processResult:!0,transform:function(t,n,r){return Cu(n,"textStyles."+t,r)}},apply:{processResult:!0,transform:function(t,n,r){return Cu(n,t,r)}}},yi={position:!0,pos:$.prop("position"),zIndex:$.prop("zIndex","zIndices"),inset:$.spaceT("inset"),insetX:$.spaceT(["left","right"]),insetInline:$.spaceT("insetInline"),insetY:$.spaceT(["top","bottom"]),insetBlock:$.spaceT("insetBlock"),top:$.spaceT("top"),insetBlockStart:$.spaceT("insetBlockStart"),bottom:$.spaceT("bottom"),insetBlockEnd:$.spaceT("insetBlockEnd"),left:$.spaceT("left"),insetInlineStart:$.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:$.spaceT("right"),insetInlineEnd:$.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(yi,{insetStart:yi.insetInlineStart,insetEnd:yi.insetInlineEnd});var VA={ring:{transform:at.ring},ringColor:$.colors("--chakra-ring-color"),ringOffset:$.prop("--chakra-ring-offset-width"),ringOffsetColor:$.colors("--chakra-ring-offset-color"),ringInset:$.prop("--chakra-ring-inset")},pt={margin:$.spaceT("margin"),marginTop:$.spaceT("marginTop"),marginBlockStart:$.spaceT("marginBlockStart"),marginRight:$.spaceT("marginRight"),marginInlineEnd:$.spaceT("marginInlineEnd"),marginBottom:$.spaceT("marginBottom"),marginBlockEnd:$.spaceT("marginBlockEnd"),marginLeft:$.spaceT("marginLeft"),marginInlineStart:$.spaceT("marginInlineStart"),marginX:$.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:$.spaceT("marginInline"),marginY:$.spaceT(["marginTop","marginBottom"]),marginBlock:$.spaceT("marginBlock"),padding:$.space("padding"),paddingTop:$.space("paddingTop"),paddingBlockStart:$.space("paddingBlockStart"),paddingRight:$.space("paddingRight"),paddingBottom:$.space("paddingBottom"),paddingBlockEnd:$.space("paddingBlockEnd"),paddingLeft:$.space("paddingLeft"),paddingInlineStart:$.space("paddingInlineStart"),paddingInlineEnd:$.space("paddingInlineEnd"),paddingX:$.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:$.space("paddingInline"),paddingY:$.space(["paddingTop","paddingBottom"]),paddingBlock:$.space("paddingBlock")};Object.assign(pt,{m:pt.margin,mt:pt.marginTop,mr:pt.marginRight,me:pt.marginInlineEnd,marginEnd:pt.marginInlineEnd,mb:pt.marginBottom,ml:pt.marginLeft,ms:pt.marginInlineStart,marginStart:pt.marginInlineStart,mx:pt.marginX,my:pt.marginY,p:pt.padding,pt:pt.paddingTop,py:pt.paddingY,px:pt.paddingX,pb:pt.paddingBottom,pl:pt.paddingLeft,ps:pt.paddingInlineStart,paddingStart:pt.paddingInlineStart,pr:pt.paddingRight,pe:pt.paddingInlineEnd,paddingEnd:pt.paddingInlineEnd});var MA={textDecorationColor:$.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:$.shadows("textShadow")},FA={clipPath:!0,transform:$.propT("transform",at.transform),transformOrigin:!0,translateX:$.spaceT("--chakra-translate-x"),translateY:$.spaceT("--chakra-translate-y"),skewX:$.degreeT("--chakra-skew-x"),skewY:$.degreeT("--chakra-skew-y"),scaleX:$.prop("--chakra-scale-x"),scaleY:$.prop("--chakra-scale-y"),scale:$.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:$.degreeT("--chakra-rotate")},jA={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:$.prop("transitionDuration","transition.duration"),transitionProperty:$.prop("transitionProperty","transition.property"),transitionTimingFunction:$.prop("transitionTimingFunction","transition.easing")},BA={fontFamily:$.prop("fontFamily","fonts"),fontSize:$.prop("fontSize","fontSizes",at.px),fontWeight:$.prop("fontWeight","fontWeights"),lineHeight:$.prop("lineHeight","lineHeights"),letterSpacing:$.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"},isTruncated:{transform:function(t){if(t===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}},zA={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:$.spaceT("scrollMargin"),scrollMarginTop:$.spaceT("scrollMarginTop"),scrollMarginBottom:$.spaceT("scrollMarginBottom"),scrollMarginLeft:$.spaceT("scrollMarginLeft"),scrollMarginRight:$.spaceT("scrollMarginRight"),scrollMarginX:$.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:$.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:$.spaceT("scrollPadding"),scrollPaddingTop:$.spaceT("scrollPaddingTop"),scrollPaddingBottom:$.spaceT("scrollPaddingBottom"),scrollPaddingLeft:$.spaceT("scrollPaddingLeft"),scrollPaddingRight:$.spaceT("scrollPaddingRight"),scrollPaddingX:$.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:$.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Wh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $A(e,t){if(e){if(typeof e=="string")return Wh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wh(e,t)}}function UA(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=$A(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
156
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Tt={hover:function(t,n){return t+":hover "+n+", "+t+"[data-hover] "+n},focus:function(t,n){return t+":focus "+n+", "+t+"[data-focus] "+n},focusVisible:function(t,n){return t+":focus-visible "+n},focusWithin:function(t,n){return t+":focus-within "+n},active:function(t,n){return t+":active "+n+", "+t+"[data-active] "+n},disabled:function(t,n){return t+":disabled "+n+", "+t+"[data-disabled] "+n},invalid:function(t,n){return t+":invalid "+n+", "+t+"[data-invalid] "+n},checked:function(t,n){return t+":checked "+n+", "+t+"[data-checked] "+n},placeholderShown:function(t,n){return t+":placeholder-shown "+n}},Kn=function(t){return ex(function(n){return t(n,"&")},"[role=group]","[data-group]",".group")},Nn=function(t){return ex(function(n){return t(n,"~ &")},"[data-peer]",".peer")},ex=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.map(t).join(", ")},Ic={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_disabled:"&[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Kn(Tt.hover),_peerHover:Nn(Tt.hover),_groupFocus:Kn(Tt.focus),_peerFocus:Nn(Tt.focus),_groupFocusVisible:Kn(Tt.focusVisible),_peerFocusVisible:Nn(Tt.focusVisible),_groupActive:Kn(Tt.active),_peerActive:Nn(Tt.active),_groupDisabled:Kn(Tt.disabled),_peerDisabled:Nn(Tt.disabled),_groupInvalid:Kn(Tt.invalid),_peerInvalid:Nn(Tt.invalid),_groupChecked:Kn(Tt.checked),_peerChecked:Nn(Tt.checked),_groupFocusWithin:Kn(Tt.focusWithin),_peerFocusWithin:Nn(Tt.focusWithin),_peerPlaceholderShown:Nn(Tt.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},HA=Uv(Ic),Tc=br({},ns,tt,AA,_s,ln,PA,VA,RA,Zv,DA,yi,al,pt,zA,BA,MA,FA,NA,jA);Object.assign({},pt,ln,_s,Zv,yi);var WA=[].concat(Uv(Tc),HA),qA=ks({},Tc,Ic),KA=function(t){return t in qA},GA=function(t){return function(n){if(!n.__breakpoints)return t;var r=n.__breakpoints,i=r.isResponsive,a=r.toArrayValue,s=r.media,u={};for(var l in t){var c=Dn(t[l],n);if(c!=null){if(c=Wr(c)&&i(c)?a(c):c,!Array.isArray(c)){u[l]=c;continue}for(var h=c.slice(0,s.length).length,f=0;f<h;f+=1){var d=s==null?void 0:s[f];if(!d){u[l]=c[f];continue}u[d]=u[d]||{},c[f]!=null&&(u[d][l]=c[f])}}}return u}},JA=function(t,n){return t.startsWith("--")&&kc(n)&&!jv(n)},YA=function(t,n){var r,i;if(n==null)return n;var a=function(f){var d,m;return(d=t.__cssMap)==null||(m=d[f])==null?void 0:m.varRef},s=function(f){var d;return(d=a(f))!=null?d:f},u=n.split(",").map(function(h){return h.trim()}),l=u[0],c=u[1];return n=(r=(i=a(l))!=null?i:s(c))!=null?r:s(n),n};function XA(e){var t=e.configs,n=t===void 0?{}:t,r=e.pseudos,i=r===void 0?{}:r,a=e.theme,s=function u(l,c){c===void 0&&(c=!1);var h=Dn(l,a),f=GA(h)(a),d={};for(var m in f){var v,x,S,b,k,_=f[m],P=Dn(_,a);m in i&&(m=i[m]),JA(m,P)&&(P=YA(a,P));var w=n[m];if(w===!0&&(w={property:m}),Wr(P)){var g;d[m]=(g=d[m])!=null?g:{},d[m]=br({},d[m],u(P,!0));continue}var E=(v=(x=w)==null||x.transform==null?void 0:x.transform(P,a,h))!=null?v:P;E=(S=w)!=null&&S.processResult?u(E,!0):E;var D=Dn((b=w)==null?void 0:b.property,a);if(!c&&(k=w)!=null&&k.static){var j=Dn(w.static,a);d=br({},d,j)}if(D&&Array.isArray(D)){for(var N=UA(D),B;!(B=N()).done;){var G=B.value;d[G]=E}continue}if(D){D==="&"&&Wr(E)?d=br({},d,E):d[D]=E;continue}if(Wr(E)){d=br({},d,E);continue}d[m]=E}return d};return s}var QA=function(t){return function(n){var r=XA({theme:n,pseudos:Ic,configs:Tc});return r(t)}};function tx(e){return Wr(e)&&e.reference?e.reference:String(e)}var Zs=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.map(tx).join(" "+t+" ").replace(/calc/g,"")},qh=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"calc("+Zs.apply(void 0,["+"].concat(n))+")"},Kh=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"calc("+Zs.apply(void 0,["-"].concat(n))+")"},sl=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"calc("+Zs.apply(void 0,["*"].concat(n))+")"},Gh=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"calc("+Zs.apply(void 0,["/"].concat(n))+")"},Jh=function(t){var n=tx(t);return n!=null&&!Number.isNaN(parseFloat(n))?String(n).startsWith("-")?String(n).slice(1):"-"+n:sl(n,-1)},fi=Object.assign(function(e){return{add:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(qh.apply(void 0,[e].concat(r)))},subtract:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(Kh.apply(void 0,[e].concat(r)))},multiply:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(sl.apply(void 0,[e].concat(r)))},divide:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(Gh.apply(void 0,[e].concat(r)))},negate:function(){return fi(Jh(e))},toString:function(){return e.toString()}}},{add:qh,subtract:Kh,multiply:sl,divide:Gh,negate:Jh}),ku,Yh;function ZA(){if(Yh)return ku;Yh=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(a,s){if(a===s)return!0;if(a&&s&&typeof a=="object"&&typeof s=="object"){if(a.constructor!==s.constructor)return!1;var u,l,c;if(Array.isArray(a)){if(u=a.length,u!=s.length)return!1;for(l=u;l--!==0;)if(!i(a[l],s[l]))return!1;return!0}var h;if(t&&a instanceof Map&&s instanceof Map){if(a.size!==s.size)return!1;for(h=a.entries();!(l=h.next()).done;)if(!s.has(l.value[0]))return!1;for(h=a.entries();!(l=h.next()).done;)if(!i(l.value[1],s.get(l.value[0])))return!1;return!0}if(n&&a instanceof Set&&s instanceof Set){if(a.size!==s.size)return!1;for(h=a.entries();!(l=h.next()).done;)if(!s.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(s)){if(u=a.length,u!=s.length)return!1;for(l=u;l--!==0;)if(a[l]!==s[l])return!1;return!0}if(a.constructor===RegExp)return a.source===s.source&&a.flags===s.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===s.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===s.toString();if(c=Object.keys(a),u=c.length,u!==Object.keys(s).length)return!1;for(l=u;l--!==0;)if(!Object.prototype.hasOwnProperty.call(s,c[l]))return!1;if(e&&a instanceof Element)return!1;for(l=u;l--!==0;)if(!((c[l]==="_owner"||c[l]==="__v"||c[l]==="__o")&&a.$$typeof)&&!i(a[c[l]],s[c[l]]))return!1;return!0}return a!==a&&s!==s}return ku=function(s,u){try{return i(s,u)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},ku}var e2=ZA();const t2=Hi(e2);function ol(){return ol=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ol.apply(this,arguments)}function n2(){var e=F.useContext(U0.ThemeContext);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var nx=_c({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "}),rx=nx[0],Ac=nx[1];function eo(e){return Ec(e,["styleConfig","size","variant","colorScheme"])}function r2(){var e=fA(),t=n2();return ol({},e,{theme:t})}function Pc(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var i2=new Set([].concat(WA,["textStyle","layerStyle","apply","isTruncated","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"])),a2=new Set(["htmlWidth","htmlHeight","htmlSize"]),s2=function(t){return a2.has(t)||!i2.has(t)},o2=["theme","css","__css","sx"],u2=["baseStyle"],l2=function(t){var n=t.baseStyle;return function(r){r.theme;var i=r.css,a=r.__css,s=r.sx,u=Pc(r,o2),l=zv(u,function(d,m){return KA(m)}),c=Dn(n,r),h=Object.assign({},a,c,$v(l),s),f=QA(h)(r.theme);return i?[f,i]:f}};function Eu(e,t){var n=t??{},r=n.baseStyle,i=Pc(n,u2);i.shouldForwardProp||(i.shouldForwardProp=s2);var a=l2({baseStyle:r});return H0(e,i)(a)}function or(e){return F.forwardRef(e)}var c2=["styleConfig"];function ix(e,t,n){var r;t===void 0&&(t={}),n===void 0&&(n={});var i=t,a=i.styleConfig,s=Pc(i,c2),u=r2(),l=u.theme,c=u.colorMode,h=Bv(l,"components."+e),f=a||h,d=br({theme:l,colorMode:c},(r=f==null?void 0:f.defaultProps)!=null?r:{},$v(Ec(s,["children"]))),m=M.useRef({});if(f){var v,x,S,b,k,_,P=Dn((v=f.baseStyle)!=null?v:{},d),w=Dn((x=(S=f.variants)==null?void 0:S[d.variant])!=null?x:{},d),g=Dn((b=(k=f.sizes)==null?void 0:k[d.size])!=null?b:{},d),E=br({},P,g,w);(_=n)!=null&&_.isMultiPart&&f.parts&&f.parts.forEach(function(j){var N;E[j]=(N=E[j])!=null?N:{}});var D=t2(m.current,E);D||(m.current=E)}return m.current}function Rc(e,t){return ix(e,t,{isMultiPart:!0})}function f2(){var e=new Map;return new Proxy(Eu,{apply:function(n,r,i){return Eu.apply(void 0,i)},get:function(n,r){return e.has(r)||e.set(r,Eu(r)),e.get(r)}})}var rn=f2();function wi(){return wi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wi.apply(this,arguments)}function h2(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var p2=["as","viewBox","color","focusable","children","className","__css"],Xh={path:F.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},F.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),F.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),F.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},ax=or(function(e,t){var n=e.as,r=e.viewBox,i=e.color,a=i===void 0?"currentColor":i,s=e.focusable,u=s===void 0?!1:s,l=e.children,c=e.className,h=e.__css,f=h2(e,p2),d=sr("chakra-icon",c),m=wi({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:a},h),v={ref:t,focusable:u,className:d,__css:m},x=r??Xh.viewBox;if(n&&typeof n!="string")return F.createElement(rn.svg,wi({as:n},v,f));var S=l??Xh.path;return F.createElement(rn.svg,wi({verticalAlign:"middle",viewBox:x},v,f),S)});pn&&(ax.displayName="Icon");var d2=ax,On=function(e){return{isEnabled:function(t){return e.some(function(n){return!!t[n]})}}},Nc={measureLayout:On(["layout","layoutId","drag","_layoutResetTransform"]),animation:On(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:On(["exit"]),drag:On(["drag","dragControls"]),focus:On(["whileFocus"]),hover:On(["whileHover","onHoverStart","onHoverEnd"]),tap:On(["whileTap","onTap","onTapStart","onTapCancel"]),pan:On(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:On(["layout","layoutId"])};function m2(e){for(var t in e){var n=e[t];n!==null&&(Nc[t].Component=n)}}var g2={},to=function(){},Yt=function(){};g2.NODE_ENV!=="production"&&(to=function(e,t){!e&&typeof console<"u"&&console.warn(t)},Yt=function(e,t){if(!e)throw new Error(t)});var sx=M.createContext({strict:!1}),v2={},ox=Object.keys(Nc),x2=ox.length;function b2(e,t,n){var r=[],i=M.useContext(sx);if(!t)return null;v2.NODE_ENV!=="production"&&n&&i.strict&&Yt(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var a=0;a<x2;a++){var s=ox[a],u=Nc[s],l=u.isEnabled,c=u.Component;l(e)&&c&&r.push(F.createElement(c,de({key:s},e,{visualElement:t})))}return r}var no=M.createContext({transformPagePoint:function(e){return e},isStatic:!1}),ro=M.createContext({});function y2(){return M.useContext(ro).visualElement}var Gi=M.createContext(null);function Li(e){var t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}function ux(){var e=M.useContext(Gi);if(e===null)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=k2();M.useEffect(function(){return r(i)},[]);var a=function(){return n==null?void 0:n(i)};return!t&&n?[!1,a]:[!0]}function w2(e){return e===null?!0:e.isPresent}var S2=0,C2=function(){return S2++},k2=function(){return Li(C2)},E2=M.createContext(null),Ji=typeof window<"u",Qh=Ji?M.useLayoutEffect:M.useEffect;function _2(e){var t=e.layoutId,n=M.useContext(E2);return n&&t!==void 0?n+"-"+t:t}function I2(e,t,n,r){var i=M.useContext(no),a=M.useContext(sx),s=y2(),u=M.useContext(Gi),l=_2(n),c=M.useRef(void 0);r||(r=a.renderer),!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:de(de({},n),{layoutId:l}),presenceId:u==null?void 0:u.id,blockInitialAnimation:(u==null?void 0:u.initial)===!1}));var h=c.current;return Qh(function(){h&&(h.setProps(de(de(de({},i),n),{layoutId:l})),h.isPresent=w2(u),h.isPresenceRoot=!s||s.presenceId!==(u==null?void 0:u.id),h.syncRender())}),M.useEffect(function(){var f;h&&((f=h.animationState)===null||f===void 0||f.animateChanges())}),Qh(function(){return function(){return h==null?void 0:h.notifyUnmount()}},[]),h}function ul(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function T2(e,t,n){return M.useCallback(function(r){var i;r&&((i=e.mount)===null||i===void 0||i.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ul(n)&&(n.current=r))},[t])}function lx(e){return Array.isArray(e)}function xn(e){return typeof e=="string"||lx(e)}function A2(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.get()}),t}function P2(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.getVelocity()}),t}function cx(e,t,n,r,i){var a;return r===void 0&&(r={}),i===void 0&&(i={}),typeof t=="string"&&(t=(a=e.variants)===null||a===void 0?void 0:a[t]),typeof t=="function"?t(n??e.custom,r,i):t}function io(e,t,n){var r=e.getProps();return cx(r,t,n??r.custom,A2(e),P2(e))}function ao(e){var t;return typeof((t=e.animate)===null||t===void 0?void 0:t.start)=="function"||xn(e.initial)||xn(e.animate)||xn(e.whileHover)||xn(e.whileDrag)||xn(e.whileTap)||xn(e.whileFocus)||xn(e.exit)}function fx(e){return!!(ao(e)||e.variants)}function R2(e,t){if(ao(e)){var n=e.initial,r=e.animate;return{initial:n===!1||xn(n)?n:void 0,animate:xn(r)?r:void 0}}return e.inherit!==!1?t:{}}function N2(e,t){var n=R2(e,M.useContext(ro)),r=n.initial,i=n.animate;return M.useMemo(function(){return{initial:r,animate:i}},t?[Zh(r),Zh(i)]:[])}function Zh(e){return Array.isArray(e)?e.join(" "):e}function O2(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.useRender,i=e.useVisualState,a=e.Component;t&&m2(t);function s(u,l){var c=M.useContext(no).isStatic,h=null,f=N2(u,c),d=i(u,c);return!c&&Ji&&(f.visualElement=I2(a,d,u,n),h=b2(u,f.visualElement,t)),F.createElement(F.Fragment,null,F.createElement(ro.Provider,{value:f},r(a,u,T2(d,f.visualElement,l),d,c)),h)}return M.forwardRef(s)}function L2(e){function t(r,i){return i===void 0&&(i={}),O2(e(r,i))}var n=new Map;return new Proxy(t,{get:function(r,i){return n.has(i)||n.set(i,t(i)),n.get(i)}})}var D2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Oc(e){return typeof e!="string"||e.includes("-")?!1:!!(D2.indexOf(e)>-1||/[A-Z]/.test(e))}var Si={};function V2(e){for(var t in e)Si[t]=e[t]}var M2=["","X","Y","Z"],F2=["translate","scale","rotate","skew"],Di=["transformPerspective","x","y","z"];F2.forEach(function(e){return M2.forEach(function(t){return Di.push(e+t)})});function j2(e,t){return Di.indexOf(e)-Di.indexOf(t)}var B2=new Set(Di);function so(e){return B2.has(e)}var z2=new Set(["originX","originY","originZ"]);function hx(e){return z2.has(e)}function px(e,t){var n=t.layout,r=t.layoutId;return so(e)||hx(e)||(n||r!==void 0)&&(!!Si[e]||e==="opacity")}var er=function(e){return e!==null&&typeof e=="object"&&e.getVelocity},$2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function U2(e,t,n,r){var i=e.transform,a=e.transformKeys,s=t.enableHardwareAcceleration,u=s===void 0?!0:s,l=t.allowTransformNone,c=l===void 0?!0:l,h="";a.sort(j2);for(var f=!1,d=a.length,m=0;m<d;m++){var v=a[m];h+=($2[v]||v)+"("+i[v]+") ",v==="z"&&(f=!0)}return!f&&u?h+="translateZ(0)":h=h.trim(),r?h=r(i,n?"":h):c&&n&&(h="none"),h}function H2(e){var t=e.originX,n=t===void 0?"50%":t,r=e.originY,i=r===void 0?"50%":r,a=e.originZ,s=a===void 0?0:a;return n+" "+i+" "+s}function dx(e){return e.startsWith("--")}var W2=function(e,t){return t&&typeof e=="number"?t.transform(e):e},mx=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},Ci=function(e){return e%1?Number(e.toFixed(5)):e},Vi=/(-)?([\d]*\.?[\d])+/g,ll=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,q2=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Yi(e){return typeof e=="string"}var Ir={test:function(e){return typeof e=="number"},parse:parseFloat,transform:function(e){return e}},ki=de(de({},Ir),{transform:mx(0,1)}),Ba=de(de({},Ir),{default:1}),Xi=function(e){return{test:function(t){return Yi(t)&&t.endsWith(e)&&t.split(" ").length===1},parse:parseFloat,transform:function(t){return""+t+e}}},Jn=Xi("deg"),qr=Xi("%"),ze=Xi("px"),K2=Xi("vh"),G2=Xi("vw"),ep=de(de({},qr),{parse:function(e){return qr.parse(e)/100},transform:function(e){return qr.transform(e*100)}}),Lc=function(e,t){return function(n){return!!(Yi(n)&&q2.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},gx=function(e,t,n){return function(r){var i;if(!Yi(r))return r;var a=r.match(Vi),s=a[0],u=a[1],l=a[2],c=a[3];return i={},i[e]=parseFloat(s),i[t]=parseFloat(u),i[n]=parseFloat(l),i.alpha=c!==void 0?parseFloat(c):1,i}},Br={test:Lc("hsl","hue"),parse:gx("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,i=e.alpha,a=i===void 0?1:i;return"hsla("+Math.round(t)+", "+qr.transform(Ci(n))+", "+qr.transform(Ci(r))+", "+Ci(ki.transform(a))+")"}},J2=mx(0,255),_u=de(de({},Ir),{transform:function(e){return Math.round(J2(e))}}),zr={test:Lc("rgb","red"),parse:gx("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,i=e.alpha,a=i===void 0?1:i;return"rgba("+_u.transform(t)+", "+_u.transform(n)+", "+_u.transform(r)+", "+Ci(ki.transform(a))+")"}};function Y2(e){var t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var cl={test:Lc("#"),parse:Y2,transform:zr.transform},Mt={test:function(e){return zr.test(e)||cl.test(e)||Br.test(e)},parse:function(e){return zr.test(e)?zr.parse(e):Br.test(e)?Br.parse(e):cl.parse(e)},transform:function(e){return Yi(e)?e:e.hasOwnProperty("red")?zr.transform(e):Br.transform(e)}},vx="${c}",xx="${n}";function X2(e){var t,n,r,i;return isNaN(e)&&Yi(e)&&((n=(t=e.match(Vi))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(ll))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function bx(e){var t=[],n=0,r=e.match(ll);r&&(n=r.length,e=e.replace(ll,vx),t.push.apply(t,r.map(Mt.parse)));var i=e.match(Vi);return i&&(e=e.replace(Vi,xx),t.push.apply(t,i.map(Ir.parse))),{values:t,numColors:n,tokenised:e}}function yx(e){return bx(e).values}function wx(e){var t=bx(e),n=t.values,r=t.numColors,i=t.tokenised,a=n.length;return function(s){for(var u=i,l=0;l<a;l++)u=u.replace(l<r?vx:xx,l<r?Mt.transform(s[l]):Ci(s[l]));return u}}var Q2=function(e){return typeof e=="number"?0:e};function Z2(e){var t=yx(e),n=wx(e);return n(t.map(Q2))}var jn={test:X2,parse:yx,createTransformer:wx,getAnimatableNone:Z2},eP=new Set(["brightness","contrast","saturate","opacity"]);function tP(e){var t=e.slice(0,-1).split("("),n=t[0],r=t[1];if(n==="drop-shadow")return e;var i=(r.match(Vi)||[])[0];if(!i)return e;var a=r.replace(i,""),s=eP.has(n)?1:0;return i!==r&&(s*=100),n+"("+s+a+")"}var nP=/([a-z-]*)\(.*?\)/g,fl=de(de({},jn),{getAnimatableNone:function(e){var t=e.match(nP);return t?t.map(tP).join(" "):e}}),tp=de(de({},Ir),{transform:Math.round}),Sx={borderWidth:ze,borderTopWidth:ze,borderRightWidth:ze,borderBottomWidth:ze,borderLeftWidth:ze,borderRadius:ze,radius:ze,borderTopLeftRadius:ze,borderTopRightRadius:ze,borderBottomRightRadius:ze,borderBottomLeftRadius:ze,width:ze,maxWidth:ze,height:ze,maxHeight:ze,size:ze,top:ze,right:ze,bottom:ze,left:ze,padding:ze,paddingTop:ze,paddingRight:ze,paddingBottom:ze,paddingLeft:ze,margin:ze,marginTop:ze,marginRight:ze,marginBottom:ze,marginLeft:ze,rotate:Jn,rotateX:Jn,rotateY:Jn,rotateZ:Jn,scale:Ba,scaleX:Ba,scaleY:Ba,scaleZ:Ba,skew:Jn,skewX:Jn,skewY:Jn,distance:ze,translateX:ze,translateY:ze,translateZ:ze,x:ze,y:ze,z:ze,perspective:ze,transformPerspective:ze,opacity:ki,originX:ep,originY:ep,originZ:ze,zIndex:tp,fillOpacity:ki,strokeOpacity:ki,numOctaves:tp};function Dc(e,t,n,r,i,a,s,u){var l,c=e.style,h=e.vars,f=e.transform,d=e.transformKeys,m=e.transformOrigin;d.length=0;var v=!1,x=!1,S=!0;for(var b in t){var k=t[b];if(dx(b)){h[b]=k;continue}var _=Sx[b],P=W2(k,_);if(so(b)){if(v=!0,f[b]=P,d.push(b),!S)continue;k!==((l=_.default)!==null&&l!==void 0?l:0)&&(S=!1)}else if(hx(b))m[b]=P,x=!0;else if(n!=null&&n.isHydrated&&(r!=null&&r.isHydrated)&&Si[b]){var w=Si[b].process(k,r,n),g=Si[b].applyTo;if(g)for(var E=g.length,D=0;D<E;D++)c[g[D]]=w;else c[b]=w}else c[b]=P}r&&n&&s&&u?(c.transform=s(r.deltaFinal,r.treeScale,v?f:void 0),a&&(c.transform=a(f,c.transform)),c.transformOrigin=u(r)):(v&&(c.transform=U2(e,i,S,a)),x&&(c.transformOrigin=H2(m)))}var Vc=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Cx(e,t,n){for(var r in t)!er(t[r])&&!px(r,n)&&(e[r]=t[r])}function rP(e,t,n){var r=e.transformTemplate;return M.useMemo(function(){var i=Vc();Dc(i,t,void 0,void 0,{enableHardwareAcceleration:!n},r);var a=i.vars,s=i.style;return de(de({},a),s)},[t])}function iP(e,t,n){var r=e.style||{},i={};return Cx(i,r,e),Object.assign(i,rP(e,t,n)),e.transformValues&&(i=e.transformValues(i)),i}function aP(e,t,n){var r={},i=iP(e,t,n);return e.drag&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":"pan-"+(e.drag==="x"?"y":"x")),r.style=i,r}function sP(e){var t={};return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var oP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,uP=sP(function(e){return oP.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const lP=Object.freeze(Object.defineProperty({__proto__:null,default:uP},Symbol.toStringTag,{value:"Module"})),cP=jy(lP);var fP=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function Is(e){return fP.has(e)}var kx=function(e){return!Is(e)};try{var hP=cP.default;kx=function(e){return e.startsWith("on")?!Is(e):hP(e)}}catch{}function pP(e,t,n){var r={};for(var i in e)(kx(i)||n===!0&&Is(i)||!t&&!Is(i))&&(r[i]=e[i]);return r}function np(e,t,n){return typeof e=="string"?e:ze.transform(t+n*e)}function dP(e,t,n){var r=np(t,e.x,e.width),i=np(n,e.y,e.height);return r+" "+i}var Iu=function(e,t){return ze.transform(e*t)},mP={offset:"strokeDashoffset",array:"strokeDasharray"};function gP(e,t,n,r,i,a){r===void 0&&(r=1),i===void 0&&(i=0);var s=mP;e[s.offset]=Iu(-i,t);var u=Iu(n,t),l=Iu(r,t);e[s.array]=u+" "+l}function Mc(e,t,n,r,i,a,s,u){var l=t.attrX,c=t.attrY,h=t.originX,f=t.originY,d=t.pathLength,m=t.pathSpacing,v=m===void 0?1:m,x=t.pathOffset,S=x===void 0?0:x,b=jt(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);Dc(e,b,n,r,i,a,s,u),e.attrs=e.style,e.style={};var k=e.attrs,_=e.style,P=e.dimensions,w=e.totalPathLength;k.transform&&(P&&(_.transform=k.transform),delete k.transform),P&&(h!==void 0||f!==void 0||_.transform)&&(_.transformOrigin=dP(P,h!==void 0?h:.5,f!==void 0?f:.5)),l!==void 0&&(k.x=l),c!==void 0&&(k.y=c),w!==void 0&&d!==void 0&&gP(k,w,d,v,S)}var Ex=function(){return de(de({},Vc()),{attrs:{}})};function vP(e,t){var n=M.useMemo(function(){var i=Ex();return Mc(i,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),de(de({},i.attrs),{style:de({},i.style)})},[t]);if(e.style){var r={};Cx(r,e.style,e),n.style=de(de({},r),n.style)}return n}function xP(e){e===void 0&&(e=!1);var t=function(n,r,i,a,s){var u=a.latestValues,l=Oc(n)?vP:aP,c=l(r,u,s),h=pP(r,typeof n=="string",e),f=de(de(de({},h),c),{ref:i});return M.createElement(n,f)};return t}var bP=/([a-z])([A-Z])/g,yP="$1-$2",_x=function(e){return e.replace(bP,yP).toLowerCase()};function Ix(e,t){var n=t.style,r=t.vars;Object.assign(e.style,n);for(var i in r)e.style.setProperty(i,r[i])}var Tx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function Ax(e,t){Ix(e,t);for(var n in t.attrs)e.setAttribute(Tx.has(n)?n:_x(n),t.attrs[n])}function Fc(e){var t=e.style,n={};for(var r in t)(er(t[r])||px(r,e))&&(n[r]=t[r]);return n}function Px(e){var t=Fc(e);for(var n in e)if(er(e[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function jc(e){return typeof e=="object"&&typeof e.start=="function"}var Mi=function(e){return Array.isArray(e)},wP=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},SP=function(e){return Mi(e)?e[e.length-1]||0:e};function CP(e){var t=er(e)?e.get():e;return wP(t)?t.toValue():t}function rp(e,t,n,r){var i=e.scrapeMotionValuesFromProps,a=e.createRenderState,s=e.onMount,u={latestValues:kP(t,n,r,i),renderState:a()};return s&&(u.mount=function(l){return s(t,l,u)}),u}var Rx=function(e){return function(t,n){var r=M.useContext(ro),i=M.useContext(Gi);return n?rp(e,t,r,i):Li(function(){return rp(e,t,r,i)})}};function kP(e,t,n,r){var i={},a=(n==null?void 0:n.initial)===!1,s=r(e);for(var u in s)i[u]=CP(s[u]);var l=e.initial,c=e.animate,h=ao(e),f=fx(e);t&&f&&!h&&e.inherit!==!1&&(l??(l=t.initial),c??(c=t.animate));var d=a||l===!1?c:l;if(d&&typeof d!="boolean"&&!jc(d)){var m=Array.isArray(d)?d:[d];m.forEach(function(v){var x=cx(e,v);if(x){var S=x.transitionEnd;x.transition;var b=jt(x,["transitionEnd","transition"]);for(var k in b)i[k]=b[k];for(var k in S)i[k]=S[k]}})}return i}var EP={useVisualState:Rx({scrapeMotionValuesFromProps:Px,createRenderState:Ex,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}_P(t)&&(r.totalPathLength=t.getTotalLength()),Mc(r,i,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Ax(t,r)}})};function _P(e){return e.tagName==="path"}var IP={useVisualState:Rx({scrapeMotionValuesFromProps:Fc,createRenderState:Vc})};function TP(e,t,n,r){var i=t.forwardMotionProps,a=i===void 0?!1:i,s=Oc(e)?EP:IP;return de(de({},s),{preloadedFeatures:n,useRender:xP(a),createVisualElement:r,Component:e})}var wt;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"})(wt||(wt={}));function Bc(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function hl(e,t,n,r){M.useEffect(function(){var i=e.current;if(n&&i)return Bc(i,t,n,r)},[e,t,n,r])}function AP(e){var t=e.whileFocus,n=e.visualElement,r=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(wt.Focus,!0)},i=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(wt.Focus,!1)};hl(n,"focus",t?r:void 0),hl(n,"blur",t?i:void 0)}function Nx(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Ox(e){var t=!!e.touches;return t}function PP(e){return function(t){var n=t instanceof MouseEvent,r=!n||n&&t.button===0;r&&e(t)}}var RP={pageX:0,pageY:0};function NP(e,t){t===void 0&&(t="page");var n=e.touches[0]||e.changedTouches[0],r=n||RP;return{x:r[t+"X"],y:r[t+"Y"]}}function OP(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function zc(e,t){return t===void 0&&(t="page"),{point:Ox(e)?NP(e,t):OP(e,t)}}function LP(e){return zc(e,"client")}var Lx=function(e,t){t===void 0&&(t=!1);var n=function(r){return e(r,zc(r))};return t?PP(n):n},DP=function(){return Ji&&window.onpointerdown===null},VP=function(){return Ji&&window.ontouchstart===null},MP=function(){return Ji&&window.onmousedown===null},FP={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},jP={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Dx(e){return DP()?e:VP()?jP[e]:MP()?FP[e]:e}function Kr(e,t,n,r){return Bc(e,Dx(t),Lx(n,t==="pointerdown"),r)}function Ts(e,t,n,r){return hl(e,Dx(t),n&&Lx(n,t==="pointerdown"),r)}function Vx(e){var t=null;return function(){var n=function(){t=null};return t===null?(t=e,n):!1}}var ip=Vx("dragHorizontal"),ap=Vx("dragVertical");function Mx(e){var t=!1;if(e==="y")t=ap();else if(e==="x")t=ip();else{var n=ip(),r=ap();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function Fx(){var e=Mx(!0);return e?(e(),!1):!0}function sp(e,t,n){return function(r,i){var a;!Nx(r)||Fx()||(n==null||n(r,i),(a=e.animationState)===null||a===void 0||a.setActive(wt.Hover,t))}}function BP(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;Ts(i,"pointerenter",t||r?sp(i,!0,t):void 0),Ts(i,"pointerleave",n||r?sp(i,!1,n):void 0)}var jx=function(e,t){return t?e===t?!0:jx(e,t.parentElement):!1};function $c(e){return M.useEffect(function(){return function(){return e()}},[])}var As=function(e,t,n){return Math.min(Math.max(n,e),t)},Tu=.001,zP=.01,op=10,$P=.05,UP=1;function HP(e){var t=e.duration,n=t===void 0?800:t,r=e.bounce,i=r===void 0?.25:r,a=e.velocity,s=a===void 0?0:a,u=e.mass,l=u===void 0?1:u,c,h;to(n<=op*1e3,"Spring duration must be 10 seconds or less");var f=1-i;f=As($P,UP,f),n=As(zP,op,n/1e3),f<1?(c=function(x){var S=x*f,b=S*n,k=S-s,_=pl(x,f),P=Math.exp(-b);return Tu-k/_*P},h=function(x){var S=x*f,b=S*n,k=b*s+s,_=Math.pow(f,2)*Math.pow(x,2)*n,P=Math.exp(-b),w=pl(Math.pow(x,2),f),g=-c(x)+Tu>0?-1:1;return g*((k-_)*P)/w}):(c=function(x){var S=Math.exp(-x*n),b=(x-s)*n+1;return-Tu+S*b},h=function(x){var S=Math.exp(-x*n),b=(s-x)*(n*n);return S*b});var d=5/n,m=qP(c,h,d);if(n=n*1e3,isNaN(m))return{stiffness:100,damping:10,duration:n};var v=Math.pow(m,2)*l;return{stiffness:v,damping:f*2*Math.sqrt(l*v),duration:n}}var WP=12;function qP(e,t,n){for(var r=n,i=1;i<WP;i++)r=r-e(r)/t(r);return r}function pl(e,t){return e*Math.sqrt(1-t*t)}var KP=["duration","bounce"],GP=["stiffness","damping","mass"];function up(e,t){return t.some(function(n){return e[n]!==void 0})}function JP(e){var t=de({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!up(e,GP)&&up(e,KP)){var n=HP(e);t=de(de(de({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Uc(e){var t=e.from,n=t===void 0?0:t,r=e.to,i=r===void 0?1:r,a=e.restSpeed,s=a===void 0?2:a,u=e.restDelta,l=jt(e,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},h=JP(l),f=h.stiffness,d=h.damping,m=h.mass,v=h.velocity,x=h.duration,S=h.isResolvedFromDuration,b=lp,k=lp;function _(){var P=v?-(v/1e3):0,w=i-n,g=d/(2*Math.sqrt(f*m)),E=Math.sqrt(f/m)/1e3;if(u??(u=Math.abs(i-n)<=1?.01:.4),g<1){var D=pl(E,g);b=function(N){var B=Math.exp(-g*E*N);return i-B*((P+g*E*w)/D*Math.sin(D*N)+w*Math.cos(D*N))},k=function(N){var B=Math.exp(-g*E*N);return g*E*B*(Math.sin(D*N)*(P+g*E*w)/D+w*Math.cos(D*N))-B*(Math.cos(D*N)*(P+g*E*w)-D*w*Math.sin(D*N))}}else if(g===1)b=function(N){return i-Math.exp(-E*N)*(w+(P+E*w)*N)};else{var j=E*Math.sqrt(g*g-1);b=function(N){var B=Math.exp(-g*E*N),G=Math.min(j*N,300);return i-B*((P+g*E*w)*Math.sinh(G)+j*w*Math.cosh(G))/j}}}return _(),{next:function(P){var w=b(P);if(S)c.done=P>=x;else{var g=k(P)*1e3,E=Math.abs(g)<=s,D=Math.abs(i-w)<=u;c.done=E&&D}return c.value=c.done?i:w,c},flipTarget:function(){var P;v=-v,P=[i,n],n=P[0],i=P[1],_()}}}Uc.needsInterpolation=function(e,t){return typeof e=="string"||typeof t=="string"};var lp=function(e){return 0},Fi=function(e,t,n){var r=t-e;return r===0?1:(n-e)/r},Qt=function(e,t,n){return-n*e+n*t+e},YP=function(e,t,n){var r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},XP=[cl,zr,Br],cp=function(e){return XP.find(function(t){return t.test(e)})},fp=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},Bx=function(e,t){var n=cp(e),r=cp(t);Yt(!!n,fp(e)),Yt(!!r,fp(t)),Yt(n.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var i=n.parse(e),a=r.parse(t),s=de({},i),u=n===Br?Qt:YP;return function(l){for(var c in s)c!=="alpha"&&(s[c]=u(i[c],a[c],l));return s.alpha=Qt(i.alpha,a.alpha,l),n.transform(s)}},dl=function(e){return typeof e=="number"},QP=function(e,t){return function(n){return t(e(n))}},Qi=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(QP)};function zx(e,t){return dl(e)?function(n){return Qt(e,t,n)}:Mt.test(e)?Bx(e,t):Ux(e,t)}var $x=function(e,t){var n=Ct([],e),r=n.length,i=e.map(function(a,s){return zx(a,t[s])});return function(a){for(var s=0;s<r;s++)n[s]=i[s](a);return n}},ZP=function(e,t){var n=de(de({},e),t),r={};for(var i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=zx(e[i],t[i]));return function(a){for(var s in r)n[s]=r[s](a);return n}};function hp(e){for(var t=jn.parse(e),n=t.length,r=0,i=0,a=0,s=0;s<n;s++)r||typeof t[s]=="number"?r++:t[s].hue!==void 0?a++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:a}}var Ux=function(e,t){var n=jn.createTransformer(t),r=hp(e),i=hp(t);return Yt(r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),Qi($x(r.parsed,i.parsed),n)},eR=function(e,t){return function(n){return Qt(e,t,n)}};function tR(e){if(typeof e=="number")return eR;if(typeof e=="string")return Mt.test(e)?Bx:Ux;if(Array.isArray(e))return $x;if(typeof e=="object")return ZP}function nR(e,t,n){for(var r=[],i=n||tR(e[0]),a=e.length-1,s=0;s<a;s++){var u=i(e[s],e[s+1]);if(t){var l=Array.isArray(t)?t[s]:t;u=Qi(l,u)}r.push(u)}return r}function rR(e,t){var n=e[0],r=e[1],i=t[0];return function(a){return i(Fi(n,r,a))}}function iR(e,t){var n=e.length,r=n-1;return function(i){var a=0,s=!1;if(i<=e[0]?s=!0:i>=e[r]&&(a=r-1,s=!0),!s){for(var u=1;u<n&&!(e[u]>i||u===r);u++);a=u-1}var l=Fi(e[a],e[a+1],i);return t[a](l)}}function Hx(e,t,n){var r=n===void 0?{}:n,i=r.clamp,a=i===void 0?!0:i,s=r.ease,u=r.mixer,l=e.length;Yt(l===t.length,"Both input and output ranges must be the same length"),Yt(!s||!Array.isArray(s)||s.length===l-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var c=nR(t,s,u),h=l===2?rR(e,c):iR(e,c);return a?function(f){return h(As(e[0],e[l-1],f))}:h}var oo=function(e){return function(t){return 1-e(1-t)}},Hc=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},aR=function(e){return function(t){return Math.pow(t,e)}},Wx=function(e){return function(t){return t*t*((e+1)*t-e)}},sR=function(e){var t=Wx(e);return function(n){return(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))}},qx=1.525,oR=4/11,uR=8/11,lR=9/10,Kx=function(e){return e},Wc=aR(2),cR=oo(Wc),Gx=Hc(Wc),Jx=function(e){return 1-Math.sin(Math.acos(e))},Yx=oo(Jx),fR=Hc(Yx),qc=Wx(qx),hR=oo(qc),pR=Hc(qc),dR=sR(qx),mR=4356/361,gR=35442/1805,vR=16061/1805,Ps=function(e){if(e===1||e===0)return e;var t=e*e;return e<oR?7.5625*t:e<uR?9.075*t-9.9*e+3.4:e<lR?mR*t-gR*e+vR:10.8*e*e-20.52*e+10.72},xR=oo(Ps),bR=function(e){return e<.5?.5*(1-Ps(1-e*2)):.5*Ps(e*2-1)+.5};function yR(e,t){return e.map(function(){return t||Gx}).splice(0,e.length-1)}function wR(e){var t=e.length;return e.map(function(n,r){return r!==0?r/(t-1):0})}function SR(e,t){return e.map(function(n){return n*t})}function rs(e){var t=e.from,n=t===void 0?0:t,r=e.to,i=r===void 0?1:r,a=e.ease,s=e.offset,u=e.duration,l=u===void 0?300:u,c={done:!1,value:n},h=Array.isArray(i)?i:[n,i],f=SR(s&&s.length===h.length?s:wR(h),l);function d(){return Hx(f,h,{ease:Array.isArray(a)?a:yR(h,a)})}var m=d();return{next:function(v){return c.value=m(v),c.done=v>=l,c},flipTarget:function(){h.reverse(),m=d()}}}function CR(e){var t=e.velocity,n=t===void 0?0:t,r=e.from,i=r===void 0?0:r,a=e.power,s=a===void 0?.8:a,u=e.timeConstant,l=u===void 0?350:u,c=e.restDelta,h=c===void 0?.5:c,f=e.modifyTarget,d={done:!1,value:i},m=s*n,v=i+m,x=f===void 0?v:f(v);return x!==v&&(m=x-i),{next:function(S){var b=-m*Math.exp(-S/l);return d.done=!(b>h||b<-h),d.value=d.done?x:x+b,d},flipTarget:function(){}}}var pp={keyframes:rs,spring:Uc,decay:CR};function kR(e){if(Array.isArray(e.to))return rs;if(pp[e.type])return pp[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?rs:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Uc:rs}function Xx(e,t,n){return n===void 0&&(n=0),e-t-n}function ER(e,t,n,r){return n===void 0&&(n=0),r===void 0&&(r=!0),r?Xx(t+-e,t,n):t-(e-t)+n}function _R(e,t,n,r){return r?e>=t+n:e<=-n}var IR=function(e){var t=function(n){var r=n.delta;return e(r)};return{start:function(){return En.update(t,!0)},stop:function(){return bi.update(t)}}};function Qx(e){var t,n,r=e.from,i=e.autoplay,a=i===void 0?!0:i,s=e.driver,u=s===void 0?IR:s,l=e.elapsed,c=l===void 0?0:l,h=e.repeat,f=h===void 0?0:h,d=e.repeatType,m=d===void 0?"loop":d,v=e.repeatDelay,x=v===void 0?0:v,S=e.onPlay,b=e.onStop,k=e.onComplete,_=e.onRepeat,P=e.onUpdate,w=jt(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),g=w.to,E,D=0,j=w.duration,N,B=!1,G=!0,U,re=kR(w);!((n=(t=re).needsInterpolation)===null||n===void 0)&&n.call(t,r,g)&&(U=Hx([0,100],[r,g],{clamp:!1}),r=0,g=100);var ee=re(de(de({},w),{from:r,to:g}));function se(){D++,m==="reverse"?(G=D%2===0,c=ER(c,j,x,G)):(c=Xx(c,j,x),m==="mirror"&&ee.flipTarget()),B=!1,_&&_()}function he(){E.stop(),k&&k()}function ge(L){if(G||(L=-L),c+=L,!B){var J=ee.next(Math.max(0,c));N=J.value,U&&(N=U(N)),B=G?J.done:c<=0}P==null||P(N),B&&(D===0&&(j??(j=c)),D<f?_R(c,j,x,G)&&se():he())}function ye(){S==null||S(),E=u(ge),E.start()}return a&&ye(),{stop:function(){b==null||b(),E.stop()}}}function Zx(e,t){return t?e*(1e3/t):0}function TR(e){var t=e.from,n=t===void 0?0:t,r=e.velocity,i=r===void 0?0:r,a=e.min,s=e.max,u=e.power,l=u===void 0?.8:u,c=e.timeConstant,h=c===void 0?750:c,f=e.bounceStiffness,d=f===void 0?500:f,m=e.bounceDamping,v=m===void 0?10:m,x=e.restDelta,S=x===void 0?1:x,b=e.modifyTarget,k=e.driver,_=e.onUpdate,P=e.onComplete,w;function g(se){return a!==void 0&&se<a||s!==void 0&&se>s}function E(se){return a===void 0?s:s===void 0||Math.abs(a-se)<Math.abs(s-se)?a:s}function D(se){w==null||w.stop(),w=Qx(de(de({},se),{driver:k,onUpdate:function(he){var ge;_==null||_(he),(ge=se.onUpdate)===null||ge===void 0||ge.call(se,he)},onComplete:P}))}function j(se){D(de({type:"spring",stiffness:d,damping:v,restDelta:S},se))}if(g(n))j({from:n,velocity:i,to:E(n)});else{var N=l*i+n;typeof b<"u"&&(N=b(N));var B=E(N),G=B===a?-1:1,U,re,ee=function(se){U=re,re=se,i=Zx(se-U,Ss().delta),(G===1&&se>B||G===-1&&se<B)&&j({from:se,to:B,velocity:i})};D({type:"decay",from:n,velocity:i,timeConstant:h,power:l,restDelta:S,modifyTarget:b,onUpdate:g(N)?ee:void 0})}return{stop:function(){return w==null?void 0:w.stop()}}}var ml=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},dp=function(e){return ml(e)&&e.hasOwnProperty("z")},za=function(e,t){return Math.abs(e-t)};function e0(e,t){if(dl(e)&&dl(t))return za(e,t);if(ml(e)&&ml(t)){var n=za(e.x,t.x),r=za(e.y,t.y),i=dp(e)&&dp(t)?za(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}var t0=function(e,t){return 1-3*t+3*e},n0=function(e,t){return 3*t-6*e},r0=function(e){return 3*e},Rs=function(e,t,n){return((t0(t,n)*e+n0(t,n))*e+r0(t))*e},i0=function(e,t,n){return 3*t0(t,n)*e*e+2*n0(t,n)*e+r0(t)},AR=1e-7,PR=10;function RR(e,t,n,r,i){var a,s,u=0;do s=t+(n-t)/2,a=Rs(s,r,i)-e,a>0?n=s:t=s;while(Math.abs(a)>AR&&++u<PR);return s}var NR=8,OR=.001;function LR(e,t,n,r){for(var i=0;i<NR;++i){var a=i0(t,n,r);if(a===0)return t;var s=Rs(t,n,r)-e;t-=s/a}return t}var is=11,$a=1/(is-1);function DR(e,t,n,r){if(e===t&&n===r)return Kx;for(var i=new Float32Array(is),a=0;a<is;++a)i[a]=Rs(a*$a,e,n);function s(u){for(var l=0,c=1,h=is-1;c!==h&&i[c]<=u;++c)l+=$a;--c;var f=(u-i[c])/(i[c+1]-i[c]),d=l+f*$a,m=i0(d,e,n);return m>=OR?LR(u,d,e,n):m===0?d:RR(u,l,l+$a,e,n)}return function(u){return u===0||u===1?u:Rs(s(u),t,r)}}function VR(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,i=e.whileTap,a=e.visualElement,s=t||n||r||i,u=M.useRef(!1),l=M.useRef(null);function c(){var v;(v=l.current)===null||v===void 0||v.call(l),l.current=null}function h(){var v;return c(),u.current=!1,(v=a.animationState)===null||v===void 0||v.setActive(wt.Tap,!1),!Fx()}function f(v,x){h()&&(jx(a.getInstance(),v.target)?t==null||t(v,x):r==null||r(v,x))}function d(v,x){h()&&(r==null||r(v,x))}function m(v,x){var S;c(),!u.current&&(u.current=!0,l.current=Qi(Kr(window,"pointerup",f),Kr(window,"pointercancel",d)),n==null||n(v,x),(S=a.animationState)===null||S===void 0||S.setActive(wt.Tap,!0))}Ts(a,"pointerdown",s?m:void 0),$c(c)}var yr=function(e){return function(t){return e(t),null}},MR={tap:yr(VR),focus:yr(AP),hover:yr(BP)};function a0(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Ns=function(e){return e*1e3},mp={linear:Kx,easeIn:Wc,easeInOut:Gx,easeOut:cR,circIn:Jx,circInOut:fR,circOut:Yx,backIn:qc,backInOut:pR,backOut:hR,anticipate:dR,bounceIn:xR,bounceInOut:bR,bounceOut:Ps},gp=function(e){if(Array.isArray(e)){Yt(e.length===4,"Cubic bezier arrays must contain four numerical values.");var t=ht(e,4),n=t[0],r=t[1],i=t[2],a=t[3];return DR(n,r,i,a)}else if(typeof e=="string")return Yt(mp[e]!==void 0,"Invalid easing type '"+e+"'"),mp[e];return e},FR=function(e){return Array.isArray(e)&&typeof e[0]!="number"},vp=function(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&jn.test(t)&&!t.startsWith("url("))},vr=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Ua=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Au=function(){return{type:"keyframes",ease:"linear",duration:.3}},jR=function(e){return{type:"keyframes",duration:.8,values:e}},xp={x:vr,y:vr,z:vr,rotate:vr,rotateX:vr,rotateY:vr,rotateZ:vr,scaleX:Ua,scaleY:Ua,scale:Ua,opacity:Au,backgroundColor:Au,color:Au,default:Ua},BR=function(e,t){var n;return Mi(t)?n=jR:n=xp[e]||xp.default,de({to:t},n(t))},zR=de(de({},Sx),{color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:fl,WebkitFilter:fl}),Kc=function(e){return zR[e]};function Gc(e,t){var n,r=Kc(e);return r!==fl&&(r=jn),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}function $R(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=jt(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}var bp=!1;function UR(e){var t=e.ease,n=e.times,r=e.yoyo,i=e.flip,a=e.loop,s=jt(e,["ease","times","yoyo","flip","loop"]),u=de({},s);return n&&(u.offset=n),s.duration&&(u.duration=Ns(s.duration)),s.repeatDelay&&(u.repeatDelay=Ns(s.repeatDelay)),t&&(u.ease=FR(t)?t.map(gp):gp(t)),s.type==="tween"&&(u.type="keyframes"),(r||a||i)&&(to(!bp,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),bp=!0,r?u.repeatType="reverse":a?u.repeatType="loop":i&&(u.repeatType="mirror"),u.repeat=a||r||i||s.repeat),s.type!=="spring"&&(u.type="keyframes"),u}function HR(e,t){var n,r=Jc(e,t)||{};return(n=r.delay)!==null&&n!==void 0?n:0}function WR(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=Ct([],ht(e.to)),e.to[0]=e.from),e}function qR(e,t,n){var r;return Array.isArray(t.to)&&((r=e.duration)!==null&&r!==void 0||(e.duration=.8)),WR(t),$R(e)||(e=de(de({},e),BR(n,t.to))),de(de({},t),UR(e))}function KR(e,t,n,r,i){var a,s=Jc(r,e),u=(a=s.from)!==null&&a!==void 0?a:t.get(),l=vp(e,n);u==="none"&&l&&typeof n=="string"?u=Gc(e,n):yp(u)&&typeof n=="string"?u=wp(n):!Array.isArray(n)&&yp(n)&&typeof u=="string"&&(n=wp(u));var c=vp(e,u);to(c===l,"You are trying to animate "+e+' from "'+u+'" to "'+n+'". '+u+" is not an animatable value - to enable this animation set "+u+" to a value animatable to "+n+" via the `style` property.");function h(){var d={from:u,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:function(m){return t.set(m)}};return s.type==="inertia"||s.type==="decay"?TR(de(de({},d),s)):Qx(de(de({},qR(s,d,e)),{onUpdate:function(m){var v;d.onUpdate(m),(v=s.onUpdate)===null||v===void 0||v.call(s,m)},onComplete:function(){var m;d.onComplete(),(m=s.onComplete)===null||m===void 0||m.call(s)}}))}function f(){var d;return t.set(n),i(),(d=s==null?void 0:s.onComplete)===null||d===void 0||d.call(s),{stop:function(){}}}return!c||!l||s.type===!1?f:h}function yp(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function wp(e){return typeof e=="number"?0:Gc("",e)}function Jc(e,t){return e[t]||e.default||e}function Os(e,t,n,r){return r===void 0&&(r={}),t.start(function(i){var a,s,u=KR(e,t,n,r,i),l=HR(r,e),c=function(){return s=u()};return l?a=setTimeout(c,Ns(l)):c(),function(){clearTimeout(a),s==null||s.stop()}})}var GR=function(e){return/^\-?\d*\.?\d+$/.test(e)};function s0(e,t){e.indexOf(t)===-1&&e.push(t)}function o0(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var as=(function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var n=this;return s0(this.subscriptions,t),function(){return o0(n.subscriptions,t)}},e.prototype.notify=function(t,n,r){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(var a=0;a<i;a++){var s=this.subscriptions[a];s&&s(t,n,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e})(),JR=function(e){return!isNaN(parseFloat(e))},YR=(function(){function e(t){var n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new as,this.velocityUpdateSubscribers=new as,this.renderSubscribers=new as,this.canTrackVelocity=!1,this.updateAndNotify=function(r,i){i===void 0&&(i=!0),n.prev=n.current,n.current=r;var a=Ss(),s=a.delta,u=a.timestamp;n.lastUpdated!==u&&(n.timeDelta=s,n.lastUpdated=u,En.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),i&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return En.postRender(n.velocityCheck)},this.velocityCheck=function(r){var i=r.timestamp;i!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=JR(this.current)}return e.prototype.onChange=function(t){return this.updateSubscribers.add(t)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?Zx(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(t){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=t(r)}).then(function(){return n.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e})();function wr(e){return new YR(e)}var u0=function(e){return function(t){return t.test(e)}},XR={test:function(e){return e==="auto"},parse:function(e){return e}},l0=[Ir,ze,qr,Jn,G2,K2,XR],Ha=function(e){return l0.find(u0(e))},QR=Ct(Ct([],ht(l0)),[Mt,jn]),ZR=function(e){return QR.find(u0(e))};function eN(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wr(n))}function tN(e,t){var n=io(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,a=i===void 0?{}:i;r.transition;var s=jt(r,["transitionEnd","transition"]);s=de(de({},s),a);for(var u in s){var l=SP(s[u]);eN(e,u,l)}}function nN(e,t,n){var r,i,a,s,u=Object.keys(t).filter(function(m){return!e.hasValue(m)}),l=u.length;if(l)for(var c=0;c<l;c++){var h=u[c],f=t[h],d=null;Array.isArray(f)&&(d=f[0]),d===null&&(d=(i=(r=n[h])!==null&&r!==void 0?r:e.readValue(h))!==null&&i!==void 0?i:t[h]),d!=null&&(typeof d=="string"&&GR(d)?d=parseFloat(d):!ZR(d)&&jn.test(f)&&(d=Gc(h,f)),e.addValue(h,wr(d)),(a=(s=n)[h])!==null&&a!==void 0||(s[h]=d),e.setBaseTarget(h,d))}}function rN(e,t){if(t){var n=t[e]||t.default||t;return n.from}}function iN(e,t,n){var r,i,a={};for(var s in e)a[s]=(r=rN(s,t))!==null&&r!==void 0?r:(i=n.getValue(s))===null||i===void 0?void 0:i.get();return a}function aN(e,t,n){n===void 0&&(n={}),e.notifyAnimationStart();var r;if(Array.isArray(t)){var i=t.map(function(s){return gl(e,s,n)});r=Promise.all(i)}else if(typeof t=="string")r=gl(e,t,n);else{var a=typeof t=="function"?io(e,t,n.custom):t;r=c0(e,a,n)}return r.then(function(){return e.notifyAnimationComplete(t)})}function gl(e,t,n){var r;n===void 0&&(n={});var i=io(e,t,n.custom),a=(i||{}).transition,s=a===void 0?e.getDefaultTransition()||{}:a;n.transitionOverride&&(s=n.transitionOverride);var u=i?function(){return c0(e,i,n)}:function(){return Promise.resolve()},l=!((r=e.variantChildren)===null||r===void 0)&&r.size?function(m){m===void 0&&(m=0);var v=s.delayChildren,x=v===void 0?0:v,S=s.staggerChildren,b=s.staggerDirection;return sN(e,t,x+m,S,b,n)}:function(){return Promise.resolve()},c=s.when;if(c){var h=ht(c==="beforeChildren"?[u,l]:[l,u],2),f=h[0],d=h[1];return f().then(d)}else return Promise.all([u(),l(n.delay)])}function c0(e,t,n){var r,i=n===void 0?{}:n,a=i.delay,s=a===void 0?0:a,u=i.transitionOverride,l=i.type,c=e.makeTargetAnimatable(t),h=c.transition,f=h===void 0?e.getDefaultTransition():h,d=c.transitionEnd,m=jt(c,["transition","transitionEnd"]);u&&(f=u);var v=[],x=l&&((r=e.animationState)===null||r===void 0?void 0:r.getState()[l]);for(var S in m){var b=e.getValue(S),k=m[S];if(!(!b||k===void 0||x&&uN(x,S))){var _=Os(S,b,k,de({delay:s},f));v.push(_)}}return Promise.all(v).then(function(){d&&tN(e,d)})}function sN(e,t,n,r,i,a){n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1);var s=[],u=(e.variantChildren.size-1)*r,l=i===1?function(c){return c===void 0&&(c=0),c*r}:function(c){return c===void 0&&(c=0),u-c*r};return Array.from(e.variantChildren).sort(oN).forEach(function(c,h){s.push(gl(c,t,de(de({},a),{delay:n+l(h)})).then(function(){return c.notifyAnimationComplete(t)}))}),Promise.all(s)}function oN(e,t){return e.sortNodePosition(t)}function uN(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&r[t]!==!0;return r[t]=!1,i}var Yc=[wt.Animate,wt.Hover,wt.Tap,wt.Drag,wt.Focus,wt.Exit],lN=Ct([],ht(Yc)).reverse(),cN=Yc.length;function fN(e){return function(t){return Promise.all(t.map(function(n){var r=n.animation,i=n.options;return aN(e,r,i)}))}}function hN(e){var t=fN(e),n=dN(),r={},i=!0,a=function(h,f){var d=io(e,f);if(d){d.transition;var m=d.transitionEnd,v=jt(d,["transition","transitionEnd"]);h=de(de(de({},h),v),m)}return h};function s(h){return r[h]!==void 0}function u(h){t=h(e)}function l(h,f){for(var d,m=e.getProps(),v=e.getVariantContext(!0)||{},x=[],S=new Set,b={},k=1/0,_=function(E){var D=lN[E],j=n[D],N=(d=m[D])!==null&&d!==void 0?d:v[D],B=xn(N),G=D===f?j.isActive:null;G===!1&&(k=E);var U=N===v[D]&&N!==m[D]&&B;if(U&&i&&e.manuallyAnimateOnMount&&(U=!1),j.protectedKeys=de({},b),!j.isActive&&G===null||!N&&!j.prevProp||jc(N)||typeof N=="boolean")return"continue";var re=pN(j.prevProp,N)||D===f&&j.isActive&&!U&&B||E>k&&B,ee=Array.isArray(N)?N:[N],se=ee.reduce(a,{});G===!1&&(se={});var he=j.prevResolvedValues,ge=he===void 0?{}:he,ye=de(de({},ge),se),L=function(xe){re=!0,S.delete(xe),j.needsAnimating[xe]=!0};for(var J in ye){var ue=se[J],A=ge[J];b.hasOwnProperty(J)||(ue!==A?Mi(ue)&&Mi(A)?a0(ue,A)?j.protectedKeys[J]=!0:L(J):ue!==void 0?L(J):S.add(J):ue!==void 0&&S.has(J)?L(J):j.protectedKeys[J]=!0)}j.prevProp=N,j.prevResolvedValues=se,j.isActive&&(b=de(de({},b),se)),i&&e.blockInitialAnimation&&(re=!1),re&&!U&&x.push.apply(x,Ct([],ht(ee.map(function(xe){return{animation:xe,options:de({type:D},h)}}))))},P=0;P<cN;P++)_(P);if(r=de({},b),S.size){var w={};S.forEach(function(E){var D=e.getBaseTarget(E);D!==void 0&&(w[E]=D)}),x.push({animation:w})}var g=!!x.length;return i&&m.initial===!1&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(x):Promise.resolve()}function c(h,f,d){var m;return n[h].isActive===f?Promise.resolve():((m=e.variantChildren)===null||m===void 0||m.forEach(function(v){var x;return(x=v.animationState)===null||x===void 0?void 0:x.setActive(h,f)}),n[h].isActive=f,l(d,h))}return{isAnimated:s,animateChanges:l,setActive:c,setAnimateFunction:u,getState:function(){return n}}}function pN(e,t){return typeof t=="string"?t!==e:lx(t)?!a0(t,e):!1}function Dr(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dN(){var e;return e={},e[wt.Animate]=Dr(!0),e[wt.Hover]=Dr(),e[wt.Tap]=Dr(),e[wt.Drag]=Dr(),e[wt.Focus]=Dr(),e[wt.Exit]=Dr(),e}var mN={animation:yr(function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=hN(t)),jc(n)&&M.useEffect(function(){return n.subscribe(t)},[n])}),exit:yr(function(e){var t=e.custom,n=e.visualElement,r=ht(ux(),2),i=r[0],a=r[1],s=M.useContext(Gi);M.useEffect(function(){var u,l,c=(u=n.animationState)===null||u===void 0?void 0:u.setActive(wt.Exit,!i,{custom:(l=s==null?void 0:s.custom)!==null&&l!==void 0?l:t});!i&&(c==null||c.then(a))},[i])})},f0=(function(){function e(t,n,r){var i=this,a=r===void 0?{}:r,s=a.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var d=Ru(i.lastMoveEventInfo,i.history),m=i.startEvent!==null,v=e0(d.offset,{x:0,y:0})>=3;if(!(!m&&!v)){var x=d.point,S=Ss().timestamp;i.history.push(de(de({},x),{timestamp:S}));var b=i.handlers,k=b.onStart,_=b.onMove;m||(k&&k(i.lastMoveEvent,d),i.startEvent=i.lastMoveEvent),_&&_(i.lastMoveEvent,d)}}},this.handlePointerMove=function(d,m){if(i.lastMoveEvent=d,i.lastMoveEventInfo=Pu(m,i.transformPagePoint),Nx(d)&&d.buttons===0){i.handlePointerUp(d,m);return}En.update(i.updatePoint,!0)},this.handlePointerUp=function(d,m){i.end();var v=i.handlers,x=v.onEnd,S=v.onSessionEnd,b=Ru(Pu(m,i.transformPagePoint),i.history);i.startEvent&&x&&x(d,b),S&&S(d,b)},!(Ox(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=s;var u=zc(t),l=Pu(u,this.transformPagePoint),c=l.point,h=Ss().timestamp;this.history=[de(de({},c),{timestamp:h})];var f=n.onSessionStart;f&&f(t,Ru(l,this.history)),this.removeListeners=Qi(Kr(window,"pointermove",this.handlePointerMove),Kr(window,"pointerup",this.handlePointerUp),Kr(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),bi.update(this.updatePoint)},e})();function Pu(e,t){return t?{point:t(e.point)}:e}function Sp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ru(e,t){var n=e.point;return{point:n,delta:Sp(n,h0(t)),offset:Sp(n,gN(t)),velocity:vN(t,.1)}}function gN(e){return e[0]}function h0(e){return e[e.length-1]}function vN(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=h0(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ns(t)));)n--;if(!r)return{x:0,y:0};var a=(i.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};var s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function xN(e){return e}function p0(e){var t=e.top,n=e.left,r=e.right,i=e.bottom;return{x:{min:n,max:r},y:{min:t,max:i}}}function bN(e){var t=e.x,n=e.y;return{top:n.min,bottom:n.max,left:t.min,right:t.max}}function yN(e,t){var n=e.top,r=e.left,i=e.bottom,a=e.right;t===void 0&&(t=xN);var s=t({x:r,y:n}),u=t({x:a,y:i});return{top:s.y,left:s.x,bottom:u.y,right:u.x}}function tr(){return{x:{min:0,max:1},y:{min:0,max:1}}}function wN(e){return{x:de({},e.x),y:de({},e.y)}}var Cp={translate:0,scale:1,origin:0,originPoint:0};function kp(){return{x:de({},Cp),y:de({},Cp)}}function Kt(e){return[e("x"),e("y")]}function d0(e,t,n){var r=t.min,i=t.max;return r!==void 0&&e<r?e=n?Qt(r,e,n.min):Math.max(e,r):i!==void 0&&e>i&&(e=n?Qt(i,e,n.max):Math.min(e,i)),e}function SN(e,t,n,r,i){var a=e-t*n;return r?d0(a,r,i):a}function Ep(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function CN(e,t){var n=t.top,r=t.left,i=t.bottom,a=t.right;return{x:Ep(e.x,r,a),y:Ep(e.y,n,i)}}function _p(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=ht([i,r],2),r=n[0],i=n[1]),{min:e.min+r,max:e.min+i}}function kN(e,t){return{x:_p(e.x,t.x),y:_p(e.y,t.y)}}function EN(e,t,n){var r=e.max-e.min,i=Qt(t.min,t.max-r,n);return{min:i,max:i+r}}function _N(e,t){var n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var m0=.35;function IN(e){return e===!1?e=0:e===!0&&(e=m0),{x:Ip(e,"left","right"),y:Ip(e,"top","bottom")}}function Ip(e,t,n){return{min:Tp(e,t),max:Tp(e,n)}}function Tp(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}function g0(e,t){var n=e.getBoundingClientRect();return p0(yN(n,t))}var TN=function(e){return As(0,1,e)};function Ap(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=.01),e0(e,t)<n}function ji(e){return e.max-e.min}function AN(e,t){var n=.5,r=ji(e),i=ji(t);return i>r?n=Fi(t.min,t.max-r,e.min):r>i&&(n=Fi(e.min,e.max-i,t.min)),TN(n)}function Pp(e,t,n,r){r===void 0&&(r=.5),e.origin=r,e.originPoint=Qt(t.min,t.max,e.origin),e.scale=ji(n)/ji(t),Ap(e.scale,1,1e-4)&&(e.scale=1),e.translate=Qt(n.min,n.max,e.origin)-e.originPoint,Ap(e.translate)&&(e.translate=0)}function v0(e,t,n,r){Pp(e.x,t.x,n.x,Rp(r.originX)),Pp(e.y,t.y,n.y,Rp(r.originY))}function Rp(e){return typeof e=="number"?e:.5}function Np(e,t,n){e.min=n.min+t.min,e.max=e.min+ji(t)}function PN(e,t){Np(e.target.x,e.relativeTarget.x,t.target.x),Np(e.target.y,e.relativeTarget.y,t.target.y)}var Xc=function(e,t){return e.depth-t.depth};function x0(e){var t=e.projection.isEnabled;return t||e.shouldResetTransform()}function Ls(e,t){t===void 0&&(t=[]);var n=e.parent;return n&&Ls(n,t),x0(e)&&t.push(e),t}function RN(e){var t=[],n=function(r){x0(r)&&t.push(r),r.children.forEach(n)};return e.children.forEach(n),t.sort(Xc)}function ss(e){if(!e.shouldResetTransform()){var t=e.getLayoutState();e.notifyBeforeLayoutMeasure(t.layout),t.isHydrated=!0,t.layout=e.measureViewportBox(),t.layoutCorrected=wN(t.layout),e.notifyLayoutMeasure(t.layout,e.prevViewportBox||t.layout),En.update(function(){return e.rebaseProjectionTarget()})}}function NN(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}function ON(e,t,n,r){e.min=Qt(t.min,n.min,r),e.max=Qt(t.max,n.max,r)}function Op(e,t){return{min:t.min-e.min,max:t.max-e.min}}function Yr(e,t){return{x:Op(e.x,t.x),y:Op(e.y,t.y)}}function LN(e,t){var n=e.getLayoutId(),r=t.getLayoutId();return n!==r||r===void 0&&e!==t}function b0(e){var t=e.getProps(),n=t.drag,r=t._dragX;return n&&!r}function Lp(e,t){e.min=t.min,e.max=t.max}function DN(e,t){Lp(e.x,t.x),Lp(e.y,t.y)}function Ds(e,t,n){var r=e-n,i=t*r;return n+i}function Dp(e,t,n,r,i){return i!==void 0&&(e=Ds(e,i,r)),Ds(e,n,r)+t}function vl(e,t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=1),e.min=Dp(e.min,t,n,r,i),e.max=Dp(e.max,t,n,r,i)}function VN(e,t){var n=t.x,r=t.y;vl(e.x,n.translate,n.scale,n.originPoint),vl(e.y,r.translate,r.scale,r.originPoint)}function Vp(e,t,n,r){var i=ht(r,3),a=i[0],s=i[1],u=i[2];e.min=t.min,e.max=t.max;var l=n[u]!==void 0?n[u]:.5,c=Qt(t.min,t.max,l);vl(e,n[a],n[s],c,n.scale)}var y0=["x","scaleX","originX"],w0=["y","scaleY","originY"];function xl(e,t,n){Vp(e.x,t.x,n,y0),Vp(e.y,t.y,n,w0)}function Mp(e,t,n,r,i){return e-=t,e=Ds(e,1/n,r),i!==void 0&&(e=Ds(e,1/i,r)),e}function MN(e,t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=1),r===void 0&&(r=.5);var a=Qt(e.min,e.max,r)-t;e.min=Mp(e.min,t,n,a,i),e.max=Mp(e.max,t,n,a,i)}function Fp(e,t,n){var r=ht(n,3),i=r[0],a=r[1],s=r[2];MN(e,t[i],t[a],t[s],t.scale)}function S0(e,t){Fp(e.x,t,y0),Fp(e.y,t,w0)}function FN(e,t,n){var r=n.length;if(r){t.x=t.y=1;for(var i,a,s=0;s<r;s++)i=n[s],a=i.getLayoutState().delta,t.x*=a.x.scale,t.y*=a.y.scale,VN(e,a),b0(i)&&xl(e,e,i.getLatestValues())}}function jN(e,t){t===void 0&&(t=!0);var n=e.getProjectionParent();if(!n)return!1;var r;return t?(r=Yr(n.projection.target,e.projection.target),S0(r,n.getLatestValues())):r=Yr(n.getLayoutState().layout,e.getLayoutState().layout),Kt(function(i){return e.setProjectionTargetAxis(i,r[i].min,r[i].max,!0)}),!0}var Ei=new Set;function jp(e,t,n){e[n]||(e[n]=[]),e[n].push(t)}function bl(e){return Ei.add(e),function(){return Ei.delete(e)}}function yl(){if(Ei.size){var e=0,t=[[]],n=[],r=function(u){return jp(t,u,e)},i=function(u){jp(n,u,e),e++};Ei.forEach(function(u){u(r,i),e=0}),Ei.clear();for(var a=n.length,s=0;s<=a;s++)t[s]&&t[s].forEach(Bp),n[s]&&n[s].forEach(Bp)}}var Bp=function(e){return e()},BN=new WeakMap,zp,zN=(function(){function e(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic=tr(),this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=n,this.visualElement.enableLayoutProjection(),BN.set(n,this)}return e.prototype.start=function(t,n){var r=this,i=n===void 0?{}:n,a=i.snapToCursor,s=a===void 0?!1:a,u=i.cursorProgress,l=function(m){var v;r.stopMotion();var x=LP(m).point;(v=r.cancelLayout)===null||v===void 0||v.call(r),r.cancelLayout=bl(function(S,b){var k=Ls(r.visualElement),_=RN(r.visualElement),P=Ct(Ct([],ht(k)),ht(_)),w=!1;r.isLayoutDrag()&&r.visualElement.lockProjectionTarget(),b(function(){P.forEach(function(g){return g.resetTransform()})}),S(function(){ss(r.visualElement),_.forEach(ss)}),b(function(){P.forEach(function(g){return g.restoreTransform()}),s&&(w=r.snapToCursor(x))}),S(function(){var g=!!(r.getAxisMotionValue("x")&&!r.isExternalDrag());g||r.visualElement.rebaseProjectionTarget(!0,r.visualElement.measureViewportBox(!1)),r.visualElement.scheduleUpdateLayoutProjection();var E=r.visualElement.projection;Kt(function(D){if(!w){var j=E.target[D],N=j.min,B=j.max;r.cursorProgress[D]=u?u[D]:Fi(N,B,x[D])}var G=r.getAxisMotionValue(D);G&&(r.originPoint[D]=G.get())})}),b(function(){jr.update(),jr.preRender(),jr.render(),jr.postRender()}),S(function(){return r.resolveDragConstraints()})})},c=function(m,v){var x,S,b,k=r.props,_=k.drag,P=k.dragPropagation;_&&!P&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=Mx(_),!r.openGlobalLock)||(yl(),r.isDragging=!0,r.currentDirection=null,(S=(x=r.props).onDragStart)===null||S===void 0||S.call(x,m,v),(b=r.visualElement.animationState)===null||b===void 0||b.setActive(wt.Drag,!0))},h=function(m,v){var x,S,b,k,_=r.props,P=_.dragPropagation,w=_.dragDirectionLock;if(!(!P&&!r.openGlobalLock)){var g=v.offset;if(w&&r.currentDirection===null){r.currentDirection=$N(g),r.currentDirection!==null&&((S=(x=r.props).onDirectionLock)===null||S===void 0||S.call(x,r.currentDirection));return}r.updateAxis("x",v.point,g),r.updateAxis("y",v.point,g),(k=(b=r.props).onDrag)===null||k===void 0||k.call(b,m,v),zp=m}},f=function(m,v){return r.stop(m,v)},d=this.props.transformPagePoint;this.panSession=new f0(t,{onSessionStart:l,onStart:c,onMove:h,onSessionEnd:f},{transformPagePoint:d})},e.prototype.resolveDragConstraints=function(){var t=this,n=this.props,r=n.dragConstraints,i=n.dragElastic,a=this.visualElement.getLayoutState().layoutCorrected;r?this.constraints=ul(r)?this.resolveRefConstraints(a,r):CN(a,r):this.constraints=!1,this.elastic=IN(i),this.constraints&&!this.hasMutatedConstraints&&Kt(function(s){t.getAxisMotionValue(s)&&(t.constraints[s]=_N(a[s],t.constraints[s]))})},e.prototype.resolveRefConstraints=function(t,n){var r=this.props,i=r.onMeasureDragConstraints,a=r.transformPagePoint,s=n.current;Yt(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."),this.constraintsBox=g0(s,a);var u=kN(t,this.constraintsBox);if(i){var l=i(bN(u));this.hasMutatedConstraints=!!l,l&&(u=p0(l))}return u},e.prototype.cancelDrag=function(){var t,n;this.visualElement.unlockProjectionTarget(),(t=this.cancelLayout)===null||t===void 0||t.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(wt.Drag,!1)},e.prototype.stop=function(t,n){var r,i,a;(r=this.panSession)===null||r===void 0||r.end(),this.panSession=null;var s=this.isDragging;if(this.cancelDrag(),!!s){var u=n.velocity;this.animateDragEnd(u),(a=(i=this.props).onDragEnd)===null||a===void 0||a.call(i,t,n)}},e.prototype.snapToCursor=function(t){var n=this;return Kt(function(r){var i=n.props.drag;if(Wa(r,i,n.currentDirection)){var a=n.getAxisMotionValue(r);if(a){var s=n.visualElement.getLayoutState().layout,u=s[r].max-s[r].min,l=s[r].min+u/2,c=t[r]-l;n.originPoint[r]=t[r],a.set(c)}else return n.cursorProgress[r]=.5,!0}}).includes(!0)},e.prototype.updateAxis=function(t,n,r){var i=this.props.drag;if(Wa(t,i,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,r):this.updateVisualElementAxis(t,n)},e.prototype.updateAxisMotionValue=function(t,n){var r=this.getAxisMotionValue(t);if(!(!n||!r)){var i=this.originPoint[t]+n[t],a=this.constraints?d0(i,this.constraints[t],this.elastic[t]):i;r.set(a)}},e.prototype.updateVisualElementAxis=function(t,n){var r,i=this.visualElement.getLayoutState().layout[t],a=i.max-i.min,s=this.cursorProgress[t],u=SN(n[t],a,s,(r=this.constraints)===null||r===void 0?void 0:r[t],this.elastic[t]);this.visualElement.setProjectionTargetAxis(t,u,u+a)},e.prototype.setProps=function(t){var n=t.drag,r=n===void 0?!1:n,i=t.dragDirectionLock,a=i===void 0?!1:i,s=t.dragPropagation,u=s===void 0?!1:s,l=t.dragConstraints,c=l===void 0?!1:l,h=t.dragElastic,f=h===void 0?m0:h,d=t.dragMomentum,m=d===void 0?!0:d,v=jt(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=de({drag:r,dragDirectionLock:a,dragPropagation:u,dragConstraints:c,dragElastic:f,dragMomentum:m},v)},e.prototype.getAxisMotionValue=function(t){var n=this.props,r=n.layout,i=n.layoutId,a="_drag"+t.toUpperCase();if(this.props[a])return this.props[a];if(!r&&i===void 0)return this.visualElement.getValue(t,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var t=this.props,n=t._dragX,r=t._dragY;return n||r},e.prototype.animateDragEnd=function(t){var n=this,r=this.props,i=r.drag,a=r.dragMomentum,s=r.dragElastic,u=r.dragTransition,l=jN(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),c=this.constraints||{};if(l&&Object.keys(c).length&&this.isLayoutDrag()){var h=this.visualElement.getProjectionParent();if(h){var f=Yr(h.projection.targetFinal,c);Kt(function(m){var v=f[m],x=v.min,S=v.max;c[m]={min:isNaN(x)?void 0:x,max:isNaN(S)?void 0:S}})}}var d=Kt(function(m){var v;if(Wa(m,i,n.currentDirection)){var x=(v=c==null?void 0:c[m])!==null&&v!==void 0?v:{},S=s?200:1e6,b=s?40:1e7,k=de(de({type:"inertia",velocity:a?t[m]:0,bounceStiffness:S,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10},u),x);return n.getAxisMotionValue(m)?n.startAxisValueAnimation(m,k):n.visualElement.startLayoutAnimation(m,k,l)}});return Promise.all(d).then(function(){var m,v;(v=(m=n.props).onDragTransitionEnd)===null||v===void 0||v.call(m)})},e.prototype.stopMotion=function(){var t=this;Kt(function(n){var r=t.getAxisMotionValue(n);r?r.stop():t.visualElement.stopLayoutAnimation()})},e.prototype.startAxisValueAnimation=function(t,n){var r=this.getAxisMotionValue(t);if(r){var i=r.get();return r.set(i),r.set(i),Os(t,r,0,n)}},e.prototype.scalePoint=function(){var t=this,n=this.props,r=n.drag,i=n.dragConstraints;if(!(!ul(i)||!this.constraintsBox)){this.stopMotion();var a={x:0,y:0};Kt(function(s){a[s]=AN(t.visualElement.projection.target[s],t.constraintsBox[s])}),this.updateConstraints(function(){Kt(function(s){if(Wa(s,r,null)){var u=EN(t.visualElement.projection.target[s],t.constraintsBox[s],a[s]),l=u.min,c=u.max;t.visualElement.setProjectionTargetAxis(s,l,c)}})}),setTimeout(yl,1)}},e.prototype.updateConstraints=function(t){var n=this;this.cancelLayout=bl(function(r,i){var a=Ls(n.visualElement);i(function(){return a.forEach(function(s){return s.resetTransform()})}),r(function(){return ss(n.visualElement)}),i(function(){return a.forEach(function(s){return s.restoreTransform()})}),r(function(){n.resolveDragConstraints()}),t&&i(t)})},e.prototype.mount=function(t){var n=this,r=t.getInstance(),i=Kr(r,"pointerdown",function(l){var c=n.props,h=c.drag,f=c.dragListener,d=f===void 0?!0:f;h&&d&&n.start(l)}),a=Bc(window,"resize",function(){n.scalePoint()}),s=t.onLayoutUpdate(function(){n.isDragging&&n.resolveDragConstraints()}),u=t.prevDragCursor;return u&&this.start(zp,{cursorProgress:u}),function(){i==null||i(),a==null||a(),s==null||s(),n.cancelDrag()}},e})();function Wa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $N(e,t){t===void 0&&(t=10);var n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function UN(e){var t=e.dragControls,n=e.visualElement,r=M.useContext(no).transformPagePoint,i=Li(function(){return new zN({visualElement:n})});i.setProps(de(de({},e),{transformPagePoint:r})),M.useEffect(function(){return t&&t.subscribe(i)},[i]),M.useEffect(function(){return i.mount(n)},[])}function HN(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,a=e.visualElement,s=t||n||r||i,u=M.useRef(null),l=M.useContext(no).transformPagePoint,c={onSessionStart:i,onStart:n,onMove:t,onEnd:function(f,d){u.current=null,r&&r(f,d)}};M.useEffect(function(){u.current!==null&&u.current.updateHandlers(c)});function h(f){u.current=new f0(f,c,{transformPagePoint:l})}Ts(a,"pointerdown",s&&h),$c(function(){return u.current&&u.current.end()})}var WN={pan:yr(HN),drag:yr(UN)},Bi;(function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"})(Bi||(Bi={}));var wl;(function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"})(wl||(wl={}));function Sl(e){return typeof e=="string"&&e.startsWith("var(--")}var C0=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function qN(e){var t=C0.exec(e);if(!t)return[,];var n=ht(t,3),r=n[1],i=n[2];return[r,i]}var KN=4;function Cl(e,t,n){n===void 0&&(n=1),Yt(n<=KN,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var r=ht(qN(e),2),i=r[0],a=r[1];if(i){var s=window.getComputedStyle(t).getPropertyValue(i);return s?s.trim():Sl(a)?Cl(a,t,n+1):a}}function GN(e,t,n){var r,i=jt(t,[]),a=e.getInstance();if(!(a instanceof HTMLElement))return{target:i,transitionEnd:n};n&&(n=de({},n)),e.forEachValue(function(c){var h=c.get();if(Sl(h)){var f=Cl(h,a);f&&c.set(f)}});for(var s in i){var u=i[s];if(Sl(u)){var l=Cl(u,a);l&&(i[s]=l,n&&((r=n[s])!==null&&r!==void 0||(n[s]=u)))}}return{target:i,transitionEnd:n}}function $p(e,t){return e/(t.max-t.min)*100}function JN(e,t,n){var r=n.target;if(typeof e=="string")if(ze.test(e))e=parseFloat(e);else return e;var i=$p(e,r.x),a=$p(e,r.y);return i+"% "+a+"%"}var Up="_$css";function YN(e,t){var n=t.delta,r=t.treeScale,i=e,a=e.includes("var("),s=[];a&&(e=e.replace(C0,function(x){return s.push(x),Up}));var u=jn.parse(e);if(u.length>5)return i;var l=jn.createTransformer(e),c=typeof u[0]!="number"?1:0,h=n.x.scale*r.x,f=n.y.scale*r.y;u[0+c]/=h,u[1+c]/=f;var d=Qt(h,f,.5);typeof u[2+c]=="number"&&(u[2+c]/=d),typeof u[3+c]=="number"&&(u[3+c]/=d);var m=l(u);if(a){var v=0;m=m.replace(Up,function(){var x=s[v];return v++,x})}return m}var hi={process:JN},XN={borderRadius:de(de({},hi),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:hi,borderTopRightRadius:hi,borderBottomLeftRadius:hi,borderBottomRightRadius:hi,boxShadow:{process:YN}},Hp=1e3,QN=(function(e){Cr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.frameTarget=tr(),n.currentAnimationTarget=tr(),n.isAnimating={x:!1,y:!1},n.stopAxisAnimation={x:void 0,y:void 0},n.isAnimatingTree=!1,n.animate=function(r,i,a){a===void 0&&(a={});var s=a.originBox,u=a.targetBox,l=a.visibilityAction,c=a.shouldStackAnimate,h=a.onComplete,f=a.prevParent,d=jt(a,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),m=n.props,v=m.visualElement,x=m.layout;if(c===!1)return n.isAnimatingTree=!1,n.safeToRemove();if(!(n.isAnimatingTree&&c!==!0)){c&&(n.isAnimatingTree=!0),i=s||i,r=u||r;var S=!1,b=v.getProjectionParent();if(b){var k=b.prevViewportBox,_=b.getLayoutState().layout;f&&(u&&(_=f.getLayoutState().layout),s&&!LN(f,b)&&f.prevViewportBox&&(k=f.prevViewportBox)),k&&nO(f,s,u)&&(S=!0,i=Yr(k,i),r=Yr(_,r))}var P=eO(i,r),w=Kt(function(g){var E,D;if(x==="position"){var j=r[g].max-r[g].min;i[g].max=i[g].min+j}if(!v.projection.isTargetLocked)if(l!==void 0)v.setVisibility(l===wl.Show);else return P?n.animateAxis(g,r[g],i[g],de(de({},d),{isRelative:S})):((D=(E=n.stopAxisAnimation)[g])===null||D===void 0||D.call(E),v.setProjectionTargetAxis(g,r[g].min,r[g].max,S))});return v.syncRender(),Promise.all(w).then(function(){n.isAnimatingTree=!1,h&&h(),v.notifyLayoutAnimationComplete()})}},n}return t.prototype.componentDidMount=function(){var n=this,r=this.props.visualElement;r.animateMotionValue=Os,r.enableLayoutProjection(),this.unsubLayoutReady=r.onLayoutUpdate(this.animate),r.layoutSafeToRemove=function(){return n.safeToRemove()},V2(XN)},t.prototype.componentWillUnmount=function(){var n=this;this.unsubLayoutReady(),Kt(function(r){var i,a;return(a=(i=n.stopAxisAnimation)[r])===null||a===void 0?void 0:a.call(i)})},t.prototype.animateAxis=function(n,r,i,a){var s=this,u,l,c=a===void 0?{}:a,h=c.transition,f=c.isRelative;if(!(this.isAnimating[n]&&zi(r,this.currentAnimationTarget[n]))){(l=(u=this.stopAxisAnimation)[n])===null||l===void 0||l.call(u),this.isAnimating[n]=!0;var d=this.props.visualElement,m=this.frameTarget[n],v=d.getProjectionAnimationProgress()[n];v.clearListeners(),v.set(0),v.set(0);var x=function(){var _=v.get()/Hp;ON(m,i,r,_),d.setProjectionTargetAxis(n,m.min,m.max,f)};x();var S=v.onChange(x);this.stopAxisAnimation[n]=function(){s.isAnimating[n]=!1,v.stop(),S()},this.currentAnimationTarget[n]=r;var b=h||d.getDefaultTransition()||tO,k=Os(n==="x"?"layoutX":"layoutY",v,Hp,b&&Jc(b,"layout")).then(this.stopAxisAnimation[n]);return k}},t.prototype.safeToRemove=function(){var n,r;(r=(n=this.props).safeToRemove)===null||r===void 0||r.call(n)},t.prototype.render=function(){return null},t})(F.Component);function ZN(e){var t=ht(ux(),2),n=t[1];return F.createElement(QN,de({},e,{safeToRemove:n}))}function eO(e,t){return!qp(e)&&!qp(t)&&(!zi(e.x,t.x)||!zi(e.y,t.y))}var Wp={min:0,max:0};function qp(e){return zi(e.x,Wp)&&zi(e.y,Wp)}function zi(e,t){return e.min===t.min&&e.max===t.max}var tO={duration:.45,ease:[.4,0,.1,1]};function nO(e,t,n){return e||!e&&!(t||n)}var rO={layoutReady:function(e){return e.notifyLayoutReady()}};function k0(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var n=t===void 0?rO:t,r=n.layoutReady,i=n.parent;bl(function(a,s){var u=Array.from(e).sort(Xc),l=i?Ls(i):[];s(function(){var c=Ct(Ct([],ht(l)),ht(u));c.forEach(function(h){return h.resetTransform()})}),a(function(){u.forEach(ss)}),s(function(){l.forEach(function(c){return c.restoreTransform()}),u.forEach(r)}),a(function(){u.forEach(function(c){c.isPresent&&(c.presence=Bi.Present)})}),s(function(){jr.preRender(),jr.render()}),a(function(){En.postRender(function(){return u.forEach(iO)}),e.clear()})}),yl()}}}function iO(e){e.prevViewportBox=e.projection.target}var E0=M.createContext(k0()),aO=M.createContext(k0());function xr(e){return!!e.forceUpdate}var sO=(function(e){Cr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var n=this.props,r=n.syncLayout,i=n.framerSyncLayout,a=n.visualElement;xr(r)&&r.register(a),xr(i)&&i.register(a),a.onUnmount(function(){xr(r)&&r.remove(a),xr(i)&&i.remove(a)})},t.prototype.getSnapshotBeforeUpdate=function(){var n=this.props,r=n.syncLayout,i=n.visualElement;return xr(r)?r.syncUpdate():(NN(i),r.add(i)),null},t.prototype.componentDidUpdate=function(){var n=this.props.syncLayout;xr(n)||n.flush()},t.prototype.render=function(){return null},t})(M.Component);function oO(e){var t=M.useContext(E0),n=M.useContext(aO);return M.createElement(sO,de({},e,{syncLayout:t,framerSyncLayout:n}))}var uO={measureLayout:oO,layoutAnimation:ZN},lO=function(){return{isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:tr(),targetFinal:tr()}};function _0(){return{isHydrated:!1,layout:tr(),layoutCorrected:tr(),treeScale:{x:1,y:1},delta:kp(),deltaFinal:kp(),deltaTransform:""}}var Kp=_0();function uo(e,t,n){var r=e.x,i=e.y,a=r.translate/t.x,s=i.translate/t.y,u="translate3d("+a+"px, "+s+"px, 0) ";if(n){var l=n.rotate,c=n.rotateX,h=n.rotateY;l&&(u+="rotate("+l+") "),c&&(u+="rotateX("+c+") "),h&&(u+="rotateY("+h+") ")}return u+="scale("+r.scale+", "+i.scale+")",!n&&u===cO?"":u}function I0(e){var t=e.deltaFinal;return t.x.origin*100+"% "+t.y.origin*100+"% 0"}var cO=uo(Kp.delta,Kp.treeScale,{}),qa=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function fO(){var e=qa.map(function(){return new as}),t={},n={clearAllListeners:function(){return e.forEach(function(r){return r.clear()})},updatePropListeners:function(r){return qa.forEach(function(i){var a;(a=t[i])===null||a===void 0||a.call(t);var s="on"+i,u=r[s];u&&(t[i]=n[s](u))})}};return e.forEach(function(r,i){n["on"+qa[i]]=function(a){return r.add(a)},n["notify"+qa[i]]=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.notify.apply(r,Ct([],ht(a)))}}),n}function hO(e,t,n){var r;for(var i in t){var a=t[i],s=n[i];if(er(a))e.addValue(i,a);else if(er(s))e.addValue(i,wr(a));else if(s!==a)if(e.hasValue(i)){var u=e.getValue(i);!u.hasAnimated&&u.set(a)}else e.addValue(i,wr((r=e.getStaticValue(i))!==null&&r!==void 0?r:a))}for(var i in n)t[i]===void 0&&e.removeValue(i);return t}function pO(e,t,n,r){var i=e.delta,a=e.layout,s=e.layoutCorrected,u=e.treeScale,l=t.target;DN(s,a),FN(s,u,n),v0(i,s,l,r)}var dO=(function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){s0(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){o0(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(Xc),this.isDirty=!1,this.children.forEach(t)},e})();function mO(e){var t=e.getProjectionParent();if(!t){e.rebaseProjectionTarget();return}var n=Yr(t.getLayoutState().layout,e.getLayoutState().layout);Kt(function(r){e.setProjectionTargetAxis(r,n[r].min,n[r].max,!0)})}var T0=function(e){var t=e.treeType,n=t===void 0?"":t,r=e.build,i=e.getBaseTarget,a=e.makeTargetAnimatable,s=e.measureViewportBox,u=e.render,l=e.readValueFromInstance,c=e.resetTransform,h=e.restoreTransform,f=e.removeValueFromRenderState,d=e.sortNodePosition,m=e.scrapeMotionValuesFromProps;return function(v,x){var S=v.parent,b=v.props,k=v.presenceId,_=v.blockInitialAnimation,P=v.visualState;x===void 0&&(x={});var w=P.latestValues,g=P.renderState,E,D=fO(),j=lO(),N,B=j,G=w,U,re=_0(),ee,se=!1,he=new Map,ge=new Map,ye={},L,J=de({},w),ue;function A(){E&&(Q.isProjectionReady()&&(xl(B.targetFinal,B.target,G),v0(re.deltaFinal,re.layoutCorrected,B.targetFinal,w)),xe(),u(E,g))}function xe(){var W=w;if(ee&&ee.isActive()){var ae=ee.getCrossfadeState(Q);ae&&(W=ae)}r(Q,g,W,B,re,x,b)}function ie(){D.notifyUpdate(w)}function fe(){if(Q.isProjectionReady()){var W=re.delta,ae=re.treeScale,ve=ae.x,Ee=ae.y,_e=re.deltaTransform;pO(re,B,Q.path,w),se&&Q.notifyViewportBoxUpdate(B.target,W),se=!1;var Ie=uo(W,ae);(Ie!==_e||ve!==ae.x||Ee!==ae.y)&&Q.scheduleRender(),re.deltaTransform=Ie}}function X(){Q.layoutTree.forEach(vO)}function H(W,ae){var ve=ae.onChange(function(_e){w[W]=_e,b.onUpdate&&En.update(ie,!1,!0)}),Ee=ae.onRenderRequest(Q.scheduleRender);ge.set(W,function(){ve(),Ee()})}var te=m(b);for(var me in te){var oe=te[me];w[me]!==void 0&&er(oe)&&oe.set(w[me],!1)}var K=ao(b),Z=fx(b),Q=de(de({treeType:n,current:null,depth:S?S.depth+1:0,parent:S,children:new Set,path:S?Ct(Ct([],ht(S.path)),[S]):[],layoutTree:S?S.layoutTree:new dO,presenceId:k,projection:j,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(S!=null&&S.isMounted()),blockInitialAnimation:_,isMounted:function(){return!!E},mount:function(W){E=Q.current=W,Q.pointTo(Q),Z&&S&&!K&&(ue=S==null?void 0:S.addVariantChild(Q)),S==null||S.children.add(Q)},unmount:function(){bi.update(ie),bi.render(A),bi.preRender(Q.updateLayoutProjection),ge.forEach(function(W){return W()}),Q.stopLayoutAnimation(),Q.layoutTree.remove(Q),ue==null||ue(),S==null||S.children.delete(Q),U==null||U(),D.clearAllListeners()},addVariantChild:function(W){var ae,ve=Q.getClosestVariantNode();if(ve)return(ae=ve.variantChildren)===null||ae===void 0||ae.add(W),function(){return ve.variantChildren.delete(W)}},sortNodePosition:function(W){return!d||n!==W.treeType?0:d(Q.getInstance(),W.getInstance())},getClosestVariantNode:function(){return Z?Q:S==null?void 0:S.getClosestVariantNode()},scheduleUpdateLayoutProjection:S?S.scheduleUpdateLayoutProjection:function(){return En.preRender(Q.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return b.layoutId},getInstance:function(){return E},getStaticValue:function(W){return w[W]},setStaticValue:function(W,ae){return w[W]=ae},getLatestValues:function(){return w},setVisibility:function(W){Q.isVisible!==W&&(Q.isVisible=W,Q.scheduleRender())},makeTargetAnimatable:function(W,ae){return ae===void 0&&(ae=!0),a(Q,W,b,ae)},addValue:function(W,ae){Q.hasValue(W)&&Q.removeValue(W),he.set(W,ae),w[W]=ae.get(),H(W,ae)},removeValue:function(W){var ae;he.delete(W),(ae=ge.get(W))===null||ae===void 0||ae(),ge.delete(W),delete w[W],f(W,g)},hasValue:function(W){return he.has(W)},getValue:function(W,ae){var ve=he.get(W);return ve===void 0&&ae!==void 0&&(ve=wr(ae),Q.addValue(W,ve)),ve},forEachValue:function(W){return he.forEach(W)},readValue:function(W){var ae;return(ae=w[W])!==null&&ae!==void 0?ae:l(E,W,x)},setBaseTarget:function(W,ae){J[W]=ae},getBaseTarget:function(W){if(i){var ae=i(b,W);if(ae!==void 0&&!er(ae))return ae}return J[W]}},D),{build:function(){return xe(),g},scheduleRender:function(){En.render(A,!1,!0)},syncRender:A,setProps:function(W){b=W,D.updatePropListeners(W),ye=hO(Q,m(b),ye)},getProps:function(){return b},getVariant:function(W){var ae;return(ae=b.variants)===null||ae===void 0?void 0:ae[W]},getDefaultTransition:function(){return b.transition},getVariantContext:function(W){if(W===void 0&&(W=!1),W)return S==null?void 0:S.getVariantContext();if(!K){var ae=(S==null?void 0:S.getVariantContext())||{};return b.initial!==void 0&&(ae.initial=b.initial),ae}for(var ve={},Ee=0;Ee<xO;Ee++){var _e=A0[Ee],Ie=b[_e];(xn(Ie)||Ie===!1)&&(ve[_e]=Ie)}return ve},enableLayoutProjection:function(){j.isEnabled=!0,Q.layoutTree.add(Q)},lockProjectionTarget:function(){j.isTargetLocked=!0},unlockProjectionTarget:function(){Q.stopLayoutAnimation(),j.isTargetLocked=!1},getLayoutState:function(){return re},setCrossfader:function(W){ee=W},isProjectionReady:function(){return j.isEnabled&&j.isHydrated&&re.isHydrated},startLayoutAnimation:function(W,ae,ve){ve===void 0&&(ve=!1);var Ee=Q.getProjectionAnimationProgress()[W],_e=ve?j.relativeTarget[W]:j.target[W],Ie=_e.min,Me=_e.max,ke=Me-Ie;return Ee.clearListeners(),Ee.set(Ie),Ee.set(Ie),Ee.onChange(function(Ne){Q.setProjectionTargetAxis(W,Ne,Ne+ke,ve)}),Q.animateMotionValue(W,Ee,0,ae)},stopLayoutAnimation:function(){Kt(function(W){return Q.getProjectionAnimationProgress()[W].stop()})},measureViewportBox:function(W){W===void 0&&(W=!0);var ae=s(E,x);return W||S0(ae,w),ae},getProjectionAnimationProgress:function(){return L||(L={x:wr(0),y:wr(0)}),L},setProjectionTargetAxis:function(W,ae,ve,Ee){Ee===void 0&&(Ee=!1);var _e;Ee?(j.relativeTarget||(j.relativeTarget=tr()),_e=j.relativeTarget[W]):(j.relativeTarget=void 0,_e=j.target[W]),j.isHydrated=!0,_e.min=ae,_e.max=ve,se=!0,D.notifySetAxisTarget()},rebaseProjectionTarget:function(W,ae){ae===void 0&&(ae=re.layout);var ve=Q.getProjectionAnimationProgress(),Ee=ve.x,_e=ve.y,Ie=!j.relativeTarget&&!j.isTargetLocked&&!Ee.isAnimating()&&!_e.isAnimating();(W||Ie)&&Kt(function(Me){var ke=ae[Me],Ne=ke.min,Fe=ke.max;Q.setProjectionTargetAxis(Me,Ne,Fe)})},notifyLayoutReady:function(W){mO(Q),Q.notifyLayoutUpdate(re.layout,Q.prevViewportBox||re.layout,W)},resetTransform:function(){return c(Q,E,b)},restoreTransform:function(){return h(E,g)},updateLayoutProjection:fe,updateTreeLayoutProjection:function(){Q.layoutTree.forEach(gO),En.preRender(X,!1,!0)},getProjectionParent:function(){if(N===void 0){for(var W=!1,ae=Q.path.length-1;ae>=0;ae--){var ve=Q.path[ae];if(ve.projection.isEnabled){W=ve;break}}N=W}return N},resolveRelativeTargetBox:function(){var W=Q.getProjectionParent();if(!(!j.relativeTarget||!W)&&(PN(j,W.projection),b0(W))){var ae=j.target;xl(ae,ae,W.getLatestValues())}},shouldResetTransform:function(){return!!b._layoutResetTransform},pointTo:function(W){B=W.projection,G=W.getLatestValues(),U==null||U(),U=Qi(W.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),W.onLayoutAnimationComplete(function(){var ae;Q.isPresent?Q.presence=Bi.Present:(ae=Q.layoutSafeToRemove)===null||ae===void 0||ae.call(Q)}))},isPresent:!0,presence:Bi.Entering});return Q}};function gO(e){e.resolveRelativeTargetBox()}function vO(e){e.updateLayoutProjection()}var A0=Ct(["initial"],ht(Yc)),xO=A0.length,bO=new Set(["width","height","top","left","right","bottom","x","y"]),P0=function(e){return bO.has(e)},yO=function(e){return Object.keys(e).some(P0)},R0=function(e,t){e.set(t,!1),e.set(t)},Ka=function(e){return e===Ir||e===ze},Gp;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(Gp||(Gp={}));var Jp=function(e,t){return parseFloat(e.split(", ")[t])},Yp=function(e,t){return function(n,r){var i=r.transform;if(i==="none"||!i)return 0;var a=i.match(/^matrix3d\((.+)\)$/);if(a)return Jp(a[1],t);var s=i.match(/^matrix\((.+)\)$/);return s?Jp(s[1],e):0}},wO=new Set(["x","y","z"]),SO=Di.filter(function(e){return!wO.has(e)});function CO(e){var t=[];return SO.forEach(function(n){var r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}var Xp={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Yp(4,13),y:Yp(5,14)},kO=function(e,t,n){var r=t.measureViewportBox(),i=t.getInstance(),a=getComputedStyle(i),s=a.display,u=a.top,l=a.left,c=a.bottom,h=a.right,f=a.transform,d={top:u,left:l,bottom:c,right:h,transform:f};s==="none"&&t.setStaticValue("display",e.display||"block"),t.syncRender();var m=t.measureViewportBox();return n.forEach(function(v){var x=t.getValue(v);R0(x,Xp[v](r,d)),e[v]=Xp[v](m,a)}),e},EO=function(e,t,n,r){n===void 0&&(n={}),r===void 0&&(r={}),t=de({},t),r=de({},r);var i=Object.keys(t).filter(P0),a=[],s=!1,u=[];if(i.forEach(function(c){var h=e.getValue(c);if(e.hasValue(c)){var f=n[c],d=t[c],m=Ha(f),v;if(Mi(d))for(var x=d.length,S=d[0]===null?1:0;S<x;S++)v?Yt(Ha(d[S])===v,"All keyframes must be of the same type"):(v=Ha(d[S]),Yt(v===m||Ka(m)&&Ka(v),"Keyframes must be of the same dimension as the current value"));else v=Ha(d);if(m!==v)if(Ka(m)&&Ka(v)){var b=h.get();typeof b=="string"&&h.set(parseFloat(b)),typeof d=="string"?t[c]=parseFloat(d):Array.isArray(d)&&v===ze&&(t[c]=d.map(parseFloat))}else m!=null&&m.transform&&(v!=null&&v.transform)&&(f===0||d===0)?f===0?h.set(v.transform(f)):t[c]=m.transform(d):(s||(a=CO(e),s=!0),u.push(c),r[c]=r[c]!==void 0?r[c]:t[c],R0(h,d))}}),u.length){var l=kO(t,e,u);return a.length&&a.forEach(function(c){var h=ht(c,2),f=h[0],d=h[1];e.getValue(f).set(d)}),e.syncRender(),{target:l,transitionEnd:r}}else return{target:t,transitionEnd:r}};function _O(e,t,n,r){return yO(t)?EO(e,t,n,r):{target:t,transitionEnd:r}}var IO=function(e,t,n,r){var i=GN(e,t,r);return t=i.target,r=i.transitionEnd,_O(e,t,n,r)};function TO(e){return window.getComputedStyle(e)}var N0={treeType:"dom",readValueFromInstance:function(e,t){if(so(t)){var n=Kc(t);return n&&n.default||0}else{var r=TO(e);return(dx(t)?r.getPropertyValue(t):r[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox:function(e,t){var n=t.transformPagePoint;return g0(e,n)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;r===void 0&&(r=!0);var a=t.transition,s=t.transitionEnd,u=jt(t,["transition","transitionEnd"]),l=iN(u,a||{},e);if(i&&(s&&(s=i(s)),u&&(u=i(u)),l&&(l=i(l))),r){nN(e,u,l);var c=IO(e,u,l,s);s=c.transitionEnd,u=c.target}return de({transition:a,transitionEnd:s},u)},scrapeMotionValuesFromProps:Fc,build:function(e,t,n,r,i,a,s){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden");var u=r.isEnabled&&i.isHydrated;Dc(t,n,r,i,a,s.transformTemplate,u?uo:void 0,u?I0:void 0)},render:Ix},AO=T0(N0),PO=T0(de(de({},N0),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return so(t)?((n=Kc(t))===null||n===void 0?void 0:n.default)||0:(t=Tx.has(t)?t:_x(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Px,build:function(e,t,n,r,i,a,s){var u=r.isEnabled&&i.isHydrated;Mc(t,n,r,i,a,s.transformTemplate,u?uo:void 0,u?I0:void 0)},render:Ax})),RO=function(e,t){return Oc(e)?PO(t,{enableHardwareAcceleration:!1}):AO(t,{enableHardwareAcceleration:!0})},NO=de(de(de(de({},mN),MR),WN),uO),O0=L2(function(e,t){return TP(e,t,NO,RO)});function OO(){var e=M.useRef(!1),t=ht(M.useState(0),2),n=t[0],r=t[1];return $c(function(){return e.current=!0}),M.useCallback(function(){!e.current&&r(n+1)},[n])}var Qp=0;function LO(){var e=Qp;return Qp++,e}var Nu=function(e){var t=e.children,n=e.initial,r=e.isPresent,i=e.onExitComplete,a=e.custom,s=e.presenceAffectsLayout,u=Li(DO),l=Li(LO),c=M.useMemo(function(){return{id:l,initial:n,isPresent:r,custom:a,onExitComplete:function(h){u.set(h,!0);var f=!0;u.forEach(function(d){d||(f=!1)}),f&&(i==null||i())},register:function(h){return u.set(h,!1),function(){return u.delete(h)}}}},s?void 0:[r]);return M.useMemo(function(){u.forEach(function(h,f){return u.set(f,!1)})},[r]),F.useEffect(function(){!r&&!u.size&&(i==null||i())},[r]),F.createElement(Gi.Provider,{value:c},t)};function DO(){return new Map}var kl={};function Mr(e){return e.key||""}function VO(e,t){var n=kl.NODE_ENV!=="production"?new Set:null;e.forEach(function(r){var i=Mr(r);kl.NODE_ENV!=="production"&&n&&(n.has(i)&&console.warn('Children of AnimatePresence require unique keys. "'+i+'" is a duplicate.'),n.add(i)),t.set(i,r)})}function MO(e){var t=[];return M.Children.forEach(e,function(n){M.isValidElement(n)&&t.push(n)}),t}var FO=function(e){var t=e.children,n=e.custom,r=e.initial,i=r===void 0?!0:r,a=e.onExitComplete,s=e.exitBeforeEnter,u=e.presenceAffectsLayout,l=u===void 0?!0:u,c=OO(),h=M.useContext(E0);xr(h)&&(c=h.forceUpdate);var f=M.useRef(!0),d=MO(t),m=M.useRef(d),v=M.useRef(new Map).current,x=M.useRef(new Set).current;if(VO(d,v),f.current)return f.current=!1,F.createElement(F.Fragment,null,d.map(function(g){return F.createElement(Nu,{key:Mr(g),isPresent:!0,initial:i?void 0:!1,presenceAffectsLayout:l},g)}));for(var S=Ct([],ht(d)),b=m.current.map(Mr),k=d.map(Mr),_=b.length,P=0;P<_;P++){var w=b[P];k.indexOf(w)===-1?x.add(w):x.delete(w)}return s&&x.size&&(S=[]),x.forEach(function(g){if(k.indexOf(g)===-1){var E=v.get(g);if(E){var D=b.indexOf(g),j=function(){v.delete(g),x.delete(g);var N=m.current.findIndex(function(B){return B.key===g});m.current.splice(N,1),x.size||(m.current=d,c(),a&&a())};S.splice(D,0,F.createElement(Nu,{key:Mr(E),isPresent:!1,onExitComplete:j,custom:n,presenceAffectsLayout:l},E))}}}),S=S.map(function(g){var E=g.key;return x.has(E)?g:F.createElement(Nu,{key:Mr(g),isPresent:!0,presenceAffectsLayout:l},g)}),m.current=S,kl.NODE_ENV!=="production"&&s&&S.length>1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),F.createElement(F.Fragment,null,x.size?S:S.map(function(g){return M.cloneElement(g)}))},Qc={border:"0px",clip:"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},jO=rn("span",{baseStyle:Qc});pn&&(jO.displayName="VisuallyHidden");var BO=rn("input",{baseStyle:Qc});pn&&(BO.displayName="VisuallyHiddenInput");function At(){return At=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}function lo(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var zO=["id","isRequired","isInvalid","isDisabled","isReadOnly"],$O=["getRootProps","htmlProps"],L0=_c({strict:!1,name:"FormControlContext"}),UO=L0[0],ni=L0[1];function HO(e){var t=e.id,n=e.isRequired,r=e.isInvalid,i=e.isDisabled,a=e.isReadOnly,s=lo(e,zO),u=lA(),l=t||"field-"+u,c=l+"-label",h=l+"-feedback",f=l+"-helptext",d=F.useState(!1),m=d[0],v=d[1],x=F.useState(!1),S=x[0],b=x[1],k=ts(),_=k[0],P=k[1],w=F.useCallback(function(N,B){return N===void 0&&(N={}),B===void 0&&(B=null),At({id:f},N,{ref:Cs(B,function(G){G&&b(!0)})})},[f]),g=F.useCallback(function(N,B){var G,U;return N===void 0&&(N={}),B===void 0&&(B=null),At({},N,{ref:B,"data-focus":It(_),"data-disabled":It(i),"data-invalid":It(r),"data-readonly":It(a),id:(G=N.id)!=null?G:c,htmlFor:(U=N.htmlFor)!=null?U:l})},[l,i,_,r,a,c]),E=F.useCallback(function(N,B){return N===void 0&&(N={}),B===void 0&&(B=null),At({id:h},N,{ref:Cs(B,function(G){G&&v(!0)}),"aria-live":"polite"})},[h]),D=F.useCallback(function(N,B){return N===void 0&&(N={}),B===void 0&&(B=null),At({},N,s,{ref:B,role:"group"})},[s]),j=F.useCallback(function(N,B){return N===void 0&&(N={}),B===void 0&&(B=null),At({},N,{ref:B,role:"presentation","aria-hidden":!0,children:N.children||"*"})},[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!a,isDisabled:!!i,isFocused:!!_,onFocus:P.on,onBlur:P.off,hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:b,id:l,labelId:c,feedbackId:h,helpTextId:f,htmlProps:s,getHelpTextProps:w,getErrorMessageProps:E,getRootProps:D,getLabelProps:g,getRequiredIndicatorProps:j}}var WO=or(function(e,t){var n=Rc("Form",e),r=eo(e),i=HO(r),a=i.getRootProps;i.htmlProps;var s=lo(i,$O),u=sr("chakra-form-control",e.className);return F.createElement(UO,{value:s},F.createElement(rx,{value:n},F.createElement(rn.div,At({},a({},t),{className:u,__css:n.container}))))});pn&&(WO.displayName="FormControl");var qO=or(function(e,t){var n=ni(),r=Ac(),i=sr("chakra-form__helper-text",e.className);return F.createElement(rn.div,At({},n==null?void 0:n.getHelpTextProps(e,t),{__css:r.helperText,className:i}))});pn&&(qO.displayName="FormHelperText");var KO=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"];function GO(e){var t,n,r,i=ni(),a=e.id,s=e.disabled,u=e.readOnly,l=e.required,c=e.isRequired,h=e.isInvalid,f=e.isReadOnly,d=e.isDisabled,m=e.onFocus,v=e.onBlur,x=lo(e,KO),S=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&i!=null&&i.isInvalid&&S.push(i.feedbackId),i!=null&&i.hasHelpText&&S.push(i.helpTextId),At({},x,{"aria-describedby":S.join(" ")||void 0,id:a??(i==null?void 0:i.id),isDisabled:(t=s??d)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=u??f)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=l??c)!=null?r:i==null?void 0:i.isRequired,isInvalid:h??(i==null?void 0:i.isInvalid),onFocus:qt(i==null?void 0:i.onFocus,m),onBlur:qt(i==null?void 0:i.onBlur,v)})}var JO=or(function(e,t){var n=Rc("FormError",e),r=eo(e),i=ni();return i!=null&&i.isInvalid?F.createElement(rx,{value:n},F.createElement(rn.div,At({},i==null?void 0:i.getErrorMessageProps(r,t),{className:sr("chakra-form__error-message",e.className),__css:At({display:"flex",alignItems:"center"},n.text)}))):null});pn&&(JO.displayName="FormErrorMessage");var YO=or(function(e,t){var n=Ac(),r=ni();if(!(r!=null&&r.isInvalid))return null;var i=sr("chakra-form__error-icon",e.className);return F.createElement(d2,At({ref:t,"aria-hidden":!0},e,{__css:n.icon,className:i}),F.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))});pn&&(YO.displayName="FormErrorIcon");var XO=["className","children","requiredIndicator","optionalIndicator"],QO=or(function(e,t){var n,r=ix("FormLabel",e),i=eo(e);i.className;var a=i.children,s=i.requiredIndicator,u=s===void 0?F.createElement(D0,null):s,l=i.optionalIndicator,c=l===void 0?null:l,h=lo(i,XO),f=ni(),d=(n=f==null?void 0:f.getLabelProps(h,t))!=null?n:At({ref:t},h);return F.createElement(rn.label,At({},d,{className:sr("chakra-form__label",i.className),__css:At({display:"block",textAlign:"start"},r)}),a,f!=null&&f.isRequired?u:c)});pn&&(QO.displayName="FormLabel");var D0=or(function(e,t){var n=ni(),r=Ac();if(!(n!=null&&n.isRequired))return null;var i=sr("chakra-form__required-indicator",e.className);return F.createElement(rn.span,At({},n==null?void 0:n.getRequiredIndicatorProps(e,t),{__css:r.requiredIndicator,className:i}))});pn&&(D0.displayName="RequiredIndicator");function Rt(){return Rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rt.apply(this,arguments)}var ZO=_c({name:"CheckboxGroupContext",strict:!1}),eL=ZO[1];function Zc(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var tL=["isIndeterminate","isChecked"];function nL(e){var t=O0;return"custom"in t&&typeof t.custom=="function"?t.custom(e):t(e)}var V0=nL(rn.svg),rL=function(t){return F.createElement(V0,Rt({width:"1.2em",viewBox:"0 0 12 10",variants:{unchecked:{opacity:0,strokeDashoffset:16},checked:{opacity:1,strokeDashoffset:0,transition:{duration:.2}}},style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16}},t),F.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1"}))},iL=function(t){return F.createElement(V0,Rt({width:"1.2em",viewBox:"0 0 24 24",variants:{unchecked:{scaleX:.65,opacity:0},checked:{scaleX:1,opacity:1,transition:{scaleX:{duration:0},opacity:{duration:.02}}}},style:{stroke:"currentColor",strokeWidth:4}},t),F.createElement("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))},aL=function(t){var n=t.open,r=t.children;return F.createElement(FO,{initial:!1},n&&F.createElement(O0.div,{variants:{unchecked:{scale:.5},checked:{scale:1}},initial:"unchecked",animate:"checked",exit:"unchecked",style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},r))},sL=function(t){var n=t.isIndeterminate,r=t.isChecked,i=Zc(t,tL),a=n?iL:rL;return F.createElement(aL,{open:r||n},F.createElement(a,i))},oL=["defaultIsChecked","defaultChecked","isChecked","isFocusable","onChange","isIndeterminate","name","value","tabIndex","aria-label","aria-labelledby","aria-invalid"];function uL(e){e===void 0&&(e={});var t=GO(e),n=t.isDisabled,r=t.isReadOnly,i=t.isRequired,a=t.isInvalid,s=t.id,u=t.onBlur,l=t.onFocus,c=t["aria-describedby"],h=e,f=h.defaultIsChecked,d=h.defaultChecked,m=d===void 0?f:d,v=h.isChecked,x=h.isFocusable,S=h.onChange,b=h.isIndeterminate,k=h.name,_=h.value,P=h.tabIndex,w=P===void 0?void 0:P,g=h["aria-label"],E=h["aria-labelledby"],D=h["aria-invalid"],j=Zc(h,oL),N=Ec(j,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),B=yu(S),G=yu(u),U=yu(l),re=ts(),ee=re[0],se=re[1],he=ts(),ge=he[0],ye=he[1],L=ts(),J=L[0],ue=L[1],A=M.useRef(null),xe=M.useState(!0),ie=xe[0],fe=xe[1],X=M.useState(!!m),H=X[0],te=X[1],me=aA(v,H),oe=me[0],K=me[1];Kv({condition:!!f,message:'The "defaultIsChecked" prop has been deprecated and will be removed in a future version. Please use the "defaultChecked" prop instead, which mirrors default React checkbox behavior.'});var Z=M.useCallback(function(ke){if(r||n){ke.preventDefault();return}oe||te(K?ke.target.checked:b?!0:ke.target.checked),B==null||B(ke)},[r,n,K,oe,b,B]);nl(function(){A.current&&(A.current.indeterminate=!!b)},[b]),cA(function(){n&&se.off()},[n,se]);var Q=n&&!x,W=M.useCallback(function(ke){ke.key===" "&&ue.on()},[ue]),ae=M.useCallback(function(ke){ke.key===" "&&ue.off()},[ue]);nl(function(){if(A.current){var ke=A.current.checked!==K;ke&&te(A.current.checked)}},[A.current]);var ve=M.useCallback(function(ke,Ne){ke===void 0&&(ke={}),Ne===void 0&&(Ne=null);var Fe=function(le){le.preventDefault(),ue.on()};return Rt({},ke,{ref:Ne,"data-active":It(J),"data-hover":It(ge),"data-checked":It(K),"data-focus":It(ee),"data-indeterminate":It(b),"data-disabled":It(n),"data-invalid":It(a),"data-readonly":It(r),"aria-hidden":!0,onMouseDown:qt(ke.onMouseDown,Fe),onMouseUp:qt(ke.onMouseUp,ue.off),onMouseEnter:qt(ke.onMouseEnter,ye.on),onMouseLeave:qt(ke.onMouseLeave,ye.off)})},[J,K,n,ee,ge,b,a,r,ue,ye.off,ye.on]),Ee=M.useCallback(function(ke,Ne){return ke===void 0&&(ke={}),Ne===void 0&&(Ne=null),Rt({},N,ke,{ref:Cs(Ne,function(Fe){Fe&&fe(Fe.tagName==="LABEL")}),onClick:qt(ke.onClick,function(){if(!ie){var Fe;(Fe=A.current)==null||Fe.click(),eA(A.current,{nextTick:!0})}}),"data-disabled":It(n),"data-checked":It(K),"data-invalid":It(a)})},[N,n,K,a,ie]),_e=M.useCallback(function(ke,Ne){return ke===void 0&&(ke={}),Ne===void 0&&(Ne=null),Rt({},ke,{ref:Cs(A,Ne),type:"checkbox",name:k,value:_,id:s,tabIndex:w,onChange:qt(ke.onChange,Z),onBlur:qt(ke.onBlur,G,se.off),onFocus:qt(ke.onFocus,U,se.on),onKeyDown:qt(ke.onKeyDown,W),onKeyUp:qt(ke.onKeyUp,ae),required:i,checked:K,disabled:Q,readOnly:r,"aria-label":g,"aria-labelledby":E,"aria-invalid":D?!!D:a,"aria-describedby":c,"aria-disabled":n,style:Qc})},[k,_,s,Z,se.off,se.on,G,U,W,ae,i,K,Q,r,g,E,D,a,c,n,w]),Ie=M.useCallback(function(ke,Ne){return ke===void 0&&(ke={}),Ne===void 0&&(Ne=null),Rt({},ke,{ref:Ne,onMouseDown:qt(ke.onMouseDown,Zp),onTouchStart:qt(ke.onTouchStart,Zp),"data-disabled":It(n),"data-checked":It(K),"data-invalid":It(a)})},[K,n,a]),Me={isInvalid:a,isFocused:ee,isChecked:K,isActive:J,isHovered:ge,isIndeterminate:b,isDisabled:n,isReadOnly:r,isRequired:i};return{state:Me,getRootProps:Ee,getCheckboxProps:ve,getInputProps:_e,getLabelProps:Ie,htmlProps:N}}function Zp(e){e.preventDefault(),e.stopPropagation()}var lL=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],cL=rn("span",{baseStyle:{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0}}),fL=rn("label",{baseStyle:{cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"}}),M0=or(function(e,t){var n=eL(),r=Rt({},n,e),i=Rc("Checkbox",r),a=eo(e),s=a.spacing,u=s===void 0?"0.5rem":s,l=a.className,c=a.children,h=a.iconColor,f=a.iconSize,d=a.icon,m=d===void 0?F.createElement(sL,null):d,v=a.isChecked,x=a.isDisabled,S=x===void 0?n==null?void 0:n.isDisabled:x,b=a.onChange,k=a.inputProps,_=Zc(a,lL),P=v;n!=null&&n.value&&a.value&&(P=n.value.includes(a.value));var w=b;n!=null&&n.onChange&&a.value&&(w=QT(n.onChange,b));var g=uL(Rt({},_,{isDisabled:S,isChecked:P,onChange:w})),E=g.state,D=g.getInputProps,j=g.getCheckboxProps,N=g.getLabelProps,B=g.getRootProps,G=F.useMemo(function(){return Rt({opacity:E.isChecked||E.isIndeterminate?1:0,transform:E.isChecked||E.isIndeterminate?"scale(1)":"scale(0.95)",fontSize:f,color:h},i.icon)},[h,f,E.isChecked,E.isIndeterminate,i.icon]),U=F.cloneElement(m,{__css:G,isIndeterminate:E.isIndeterminate,isChecked:E.isChecked});return F.createElement(fL,Rt({__css:i.container,className:sr("chakra-checkbox",l)},B()),F.createElement("input",Rt({className:"chakra-checkbox__input"},D(k,t))),F.createElement(cL,Rt({__css:i.control,className:"chakra-checkbox__control"},j()),U),c&&F.createElement(rn.span,Rt({className:"chakra-checkbox__label"},N(),{__css:Rt({marginStart:u},i.label)}),c))});pn&&(M0.displayName="Checkbox");const hL=({label:e,isocode:t,isChecked:n,onToggle:r})=>T.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded py-0.5 text-xs text-grey-50 hover:bg-grey-700 hover:text-white",children:[T.jsx(M0,{className:"h-4",colorScheme:"primary",isChecked:n,onChange:r}),T.jsx("span",{className:"truncate",title:t,children:e})]}),pL=({detectedLanguageDetails:e,selectedIsocodes:t,onToggleIsocode:n})=>T.jsxs("div",{className:"mt-2 w-full rounded border border-grey-50 bg-grey-800 px-2 py-1.5",children:[T.jsx("p",{className:"mb-1.5 text-xs font-medium text-grey-100",children:"Detected locales"}),T.jsx("div",{className:"flex flex-col gap-1 overflow-y-auto",style:{maxHeight:"5rem"},children:e.map(r=>T.jsx(hL,{label:`${r.native} - ${r.isocode??""}`,isocode:r.isocode,isChecked:t.includes(r.isocode),onToggle:()=>n(r.isocode)},r.isocode))})]}),dL="Drop or Add a File !",mL=({getRootProps:e,getInputProps:t,isDragActive:n,file:r,error:i,onResetFile:a,detectedLanguageDetails:s,selectedIsocodes:u,onToggleIsocode:l,onClose:c,onImport:h,setError:f,hasNoSelection:d})=>T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"mt-4 space-y-2",children:[T.jsxs("div",{...e(),children:[T.jsx("input",{...t()}),T.jsx("div",{className:ft("min-h-[100px] rounded border border-dashed text-center text-sm",{"border-purple-500":n,"flex items-center justify-center":r}),children:r?T.jsxs("div",{className:"flex items-center justify-center gap-1 px-2",children:[T.jsx("p",{className:"min-w-0 flex-1 truncate",children:r.name}),T.jsx(Se.Tooltip,{label:"Remove file",container:St(),children:T.jsx("button",{type:"button",onClick:m=>{m.stopPropagation(),a()},className:"flex shrink-0 rounded p-1 text-grey-100 hover:bg-grey-700 hover:text-white","aria-label":"Remove file",children:T.jsx(st.FdClose,{className:"h-4 w-4"})})})]}):T.jsxs("div",{className:"flex min-h-[100px] w-full flex-col items-center justify-center text-grey-100",children:[T.jsx("p",{className:"max-w-md px-2 text-center text-xs ",children:'Drag and drop the file with ".json" or ".csv" extension here or click to select it from your computer.'}),T.jsx(st.FdDownload,{className:"mt-2 h-6 w-6 text-grey-200"})]})}),i&&T.jsx("div",{className:"flex items-center justify-center p-2",children:T.jsx("p",{className:"text-xs text-red-400",children:i})})]}),r&&s.length>0&&T.jsx(pL,{detectedLanguageDetails:s,selectedIsocodes:u,onToggleIsocode:l})]}),T.jsxs("div",{className:"mt-4 flex items-center justify-between gap-4",children:[T.jsxs("div",{className:"flex flex-row space-x-1 justify-center items-center text-purple-600 hover:underline cursor-pointer",onClick:()=>{window.open("https://developer.4d.com/qodly/4DQodlyPro/localization#exporting-and-importing-translations","_blank")},children:[T.jsx("p",{className:"text-xs",children:"How to Import an i18n File"}),T.jsx(st.FdOutload,{className:"ml-1 h-4 w-4 text-grey-50"})]}),T.jsxs("div",{className:"flex items-center space-x-2",children:[T.jsx("button",{onClick:c,className:"rounded border w-16 border-white px-2 py-1 text-xs font-medium text-grey-50 hover:bg-white hover:border-white hover:font-bold hover:text-primary-dark",children:"Cancel"}),T.jsx("button",{disabled:d,onClick:()=>{!i&&r?h():r||f(dL)},className:ft("rounded w-16 px-2 py-1 text-xs font-medium text-grey-50 bg-primary-dark",d&&"cursor-not-allowed opacity-50",!d&&"hover:border-white hover:border hover:bg-primary-hover hover:text-white hover:font-bold"),children:"Import"})]})]})]}),gL=({summary:e,onClose:t})=>T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"mt-4 space-y-4",children:[T.jsx("p",{className:"text-sm text-grey-100",children:"Summary"}),T.jsxs("div",{className:"rounded border border-grey-50 bg-grey-800 px-3 py-3 space-y-2",children:[T.jsxs("div",{className:"flex items-center justify-between text-xs",children:[T.jsx("span",{className:"text-grey-200",children:"Keys Imported"}),T.jsx("span",{className:"font-medium text-white",children:e.importedKeys})]}),T.jsxs("div",{className:"flex items-center justify-between text-xs",children:[T.jsx("span",{className:"text-grey-200",children:"Keys Merged"}),T.jsx("span",{className:"font-medium text-white",children:e.mergedKeys})]}),T.jsxs("div",{className:"flex items-center justify-between text-xs",children:[T.jsx("span",{className:"text-grey-200",children:"Keys Unchanged"}),T.jsx("span",{className:"font-medium text-white",children:e.unchangedKeys})]})]})]}),T.jsx("div",{className:"mt-4 flex justify-end",children:T.jsx("button",{onClick:t,className:"rounded border border-white px-4 py-1.5 text-xs font-medium text-grey-50 hover:bg-white hover:border-white hover:font-bold hover:text-primary-dark",children:"Close"})})]}),F0=({disable:e,enable:t,RenderTrigger:n})=>{const r=kr(),{state:{file:i,isOpen:a,supprtedExtension:s,error:u,content:l,detectedLanguages:c,selectedIsocodes:h,showSummaryView:f,summary:d},actions:m}=Se.useStateObject({file:null,error:"",isOpen:!1,fileType:"",supprtedExtension:[".json",".csv"],content:{},detectedLanguages:[],selectedIsocodes:[],showSummaryView:!1,summary:{importedKeys:0,mergedKeys:0,unchangedKeys:0}}),v=r.getWebformTabs(),{i18n:{keys:x}}=nr(),{allSupportedLanguages:S,userLanguages:{supported:b,primary:k},setUserLangSettings:_}=rr(),P=M.useMemo(()=>S.filter(ie=>c.includes(ie.isocode)),[S,c]),w=ie=>{const fe=new Set(b.map(te=>te.isocode)),X=ie.filter(te=>!fe.has(te));if(X.length===0)return;const H=X.map(te=>$r(te,S)).filter(te=>te!=null).map(te=>({isocode:te.isocode}));H.length!==0&&_({primary:b.length===0?H[0].isocode:k,supported:b.concat(H)})},{getRootProps:g,getInputProps:E,isDragActive:D}=z0.useDropzone({async onDropAccepted([ie]){if(s.find(fe=>ie.name.endsWith(fe))){m.setError(""),m.setFile(ie);const fe=await B(ie),X=ie.name.split(".").pop()||"";try{if(X==="csv"){const H=ET(fe);if(!H.valid){m.setError(H.message);return}const te=L(fe,X);m.setContent(te||{});const me=kT(fe);m.setDetectedLanguages(me),m.setSelectedIsocodes(me)}else{const H=JSON.parse(fe),te=_T(H,LT);if(!te.valid){m.setError(te.message);return}const me=L(fe,X);m.setContent(me||{});const oe=ST(H);m.setDetectedLanguages(oe),m.setSelectedIsocodes(oe)}}catch(H){m.setError(H.message||"Invalid file");return}}else m.setError(xT.DROP_EVENT_ERROR)},accept:{"application/*":s},multiple:!1}),j=()=>{m.setFileType(""),m.setError(""),m.setFile(null),m.setContent({}),m.setDetectedLanguages([]),m.setSelectedIsocodes([])},N=()=>{m.setIsOpen(!1),m.setShowSummaryView(!1),m.setSummary({importedKeys:0,mergedKeys:0,unchangedKeys:0}),j()},B=ie=>new Promise(fe=>{const X=new FileReader;X.onload=()=>fe(X.result),X.readAsText(ie)}),G=async(ie,fe,X)=>{if(X){const H=`WebForms/${fe}.WebForm`;await r.actions.setTabContent({path:H,content:ie.content}),Se.webformSubject.next({path:H,action:Se.WebformActions.RECOMPUTE,payload:ie.content.components})}else{const H={...ie};await Se.saveContent({verb:Se.DesignerRequestVerb.SAVE_CONTENT,content:H.content,path:`WebForms/${fe}.WebForm`})}},U=(ie,fe)=>{const{content:{components:X}}=be.cloneDeep(ie);if(!X)return ie;const H=(oe,K,Z,Q)=>{if(Array.isArray(oe))oe.forEach((W,ae)=>{let ve="";Z==="Text"?ve=Array.isArray(W)?`${K}.[${ae}].children`:`${K}.[${ae}]`:ve=`${K}.[${ae}]`,H(W,ve,Z,Q)});else if(be.isObject(oe))if(Object.keys(oe).length>1){const ae=Object.keys(oe),ve={};ae.forEach(_e=>{const Ie=be.get(oe,_e);if(_e==="__t")be.set(Q,`props.${K}`,Ie);else if(Ie&&_e.startsWith("states:")){const Me=_e.split(":"),ke=Me.map((Ne,Fe)=>Fe+1===Me.length?`i18n:${Ne}`:Ne).join(":");if(!Q.custom)return;be.set(ve,`${ke}.${K}`,Ie)}else if(Ie){const Me=`i18n:${_e}`;if(!Q.custom)return;be.set(ve,`${Me}.${K}`,Ie)}});const[Ee]=K.split(".");Object.entries(ve).forEach(([_e,Ie])=>{const Me=be.get(Q,`props.${Ee}`,{}),ke=be.get(Q,`custom.${_e}.${Ee}`);let Ne="";typeof ke=="string"||typeof Me=="string"?Ne=be.get(Ie,Ee):Ne=be.merge(ke||be.cloneDeep(Me),be.get(Ie,Ee)),be.set(Q,`custom.${_e}.${Ee}`,Ne)})}else{const ae=Object.entries(oe)[0],ve=ae[0],Ee=ae[1];K=`${K}.${ve}`,H(Ee,K,Z,Q)}},te=Object.entries(fe);for(let oe=0;oe<te.length;oe++){const[K,Z]=te[oe],{resolverName:Q,...W}=Z,ae=be.get(X,K);if(ae)if(Q==="Text"){const{custom:ve,props:Ee}=W;be.set(X,K,{...ae,props:{...ae.props,...Ee},custom:{...ae.custom,...ve}})}else Object.entries(W).forEach(([ve,Ee])=>{const _e=be.get(X,K);if(!_e)return;const Ie=be.cloneDeep(_e);H(Ee,ve,Q,Ie),be.set(X,K,Ie)})}const me=be.cloneDeep(ie);return be.set(me,"content.components",X),me},re=ie=>ie==null||typeof ie=="string"&&ie.trim()==="",ee=(ie,fe)=>{const X=ie&&be.isObject(ie)?ie:{},H=fe&&be.isObject(fe)?fe:{};if(re(H))return be.cloneDeep(X);const te=be.cloneDeep(X);for(const me of Object.keys(H)){const oe=H[me];if(!oe||!be.isObject(oe))continue;const K=te[me],Z=new Set([...Object.keys(oe),...K&&be.isObject(K)?Object.keys(K):[]]),Q={};for(const W of Z){const ae=be.get(oe,W),ve=K&&be.isObject(K)?be.get(K,W):void 0;re(ae)?re(ve)||(Q[W]=ve):Q[W]=ae}for(const W of bT){const ae=be.get(Q,W),ve=K&&be.isObject(K)?be.get(K,W):void 0;!re(ve)&&re(ae)&&be.set(Q,W,ve)}te[me]=Q}return te},se=(ie,fe)=>{const X={importedKeys:0,mergedKeys:0,unchangedKeys:0},H=new Set(Object.keys(fe||{}));for(const te of H){const me=fe[te],oe=ie[te];if(!oe||!be.isObject(oe)){X.importedKeys+=1;continue}const K=Object.keys(me);let Z=!1;for(const Q of K){const W=me[Q],ae=be.get(oe,Q),ve=re(W)&&!re(ae),Ee=String(W??"")===String(ae??"");if(!ve&&!Ee){Z=!0;break}}K.length>0&&!Z?X.unchangedKeys+=1:Z&&(X.mergedKeys+=1)}for(const te of Object.keys(ie))H.has(te)||(X.unchangedKeys+=1);return X},he=async(ie,fe,X)=>{const{webforms:H,i18n:te}=ie,me=ee(x,te),oe=se(x,te);Se.i18nSubject.next({action:"set_content",payload:me});const K=Z=>{const Q=Z+1===fe.length?fe.length:Z,W=Math.ceil(Q/fe.length*100);Se.tasksManagerSubject.next({id:X,action:"update",type:"i18n",payload:{progress:W,status:W>=100?"finished":"ongoing"}})};if(re(H))return oe;for(let Z=0;Z<fe.length;Z++){const Q=fe[Z],W=v.find(Ie=>Ie.name===Q.name&&Ie.type==="webform"),ae=!!W,ve=ae?W:await Se.getNodeInfo({verb:Se.DesignerRequestVerb.GET_INFO,content:!0,path:`WebForms/${Q.name}.${Q.ext}`,as:"json"}),{name:Ee}=ve;if(!H[Ee]){K(Z);continue}const _e=U(ve,H[Ee]);await G(_e,Ee,ae),K(Z)}return oe},ge=ie=>{const fe=ng(ie),{data:X}=Il.parse(fe),H={};let te=[];return X.forEach((me,oe)=>{if(oe===0){te=me;return}let K="",Z="";me.forEach((Q,W)=>{if(W===0)K=Q;else if(W===1)Z=Q;else if(K.startsWith("i18n")){if(be.has(H,K)&&be.get(H,K))return;be.set(H,K,Q)}else if(Q){const{webformName:ae,componentId:ve,propName:Ee}=FE(K);if(be.set(H,`webforms.${ae}.${ve}.resolverName`,Z),Z==="Text"){const _e=nu(Q),Ie=te[W];Ie==="__t"?be.set(H,`webforms.${ae}.${ve}.props.${Ee}`,_e):be.set(H,`webforms.${ae}.${ve}.custom.i18n:${Ie}.${Ee}`,_e)}else{const _e=te[W];let Ie=_e==="i18nkey_default"?"default":_e;if(Ie.includes(":")){const Me=Ie.split(":");Ie=Me.map((ke,Ne)=>Ne===0?`states:${ke}`:Ne===Me.length-1?`i18n:${ke}`:ke).join(":")}be.set(H,`${K}.${Ie}`,Q)}}})}),H},ye=ie=>{const fe=JSON.parse(ie),X={},{webforms:H,i18n:te}=fe;return H&&Object.keys(H).forEach(oe=>{const K=be.get(H,oe);Object.keys(K).forEach(Q=>{const W=be.get(K,Q),{props:ae,resolverName:ve}=W;be.set(X,`webforms.${oe}.${Q}.resolverName`,ve),Array.isArray(ae)&&ae.forEach(({__dataPath:Ee,__default:_e,...Ie})=>{if(ve==="Text"){const Me=nu(_e);be.set(X,`webforms.${oe}.${Q}.props.doc`,Me),Object.keys(Ie).forEach(ke=>{const Ne=nu(Ie[ke]);be.set(X,`webforms.${oe}.${Q}.custom.i18n:${ke}.doc`,Ne)})}else be.set(X,`webforms.${oe}.${Q}.${Ee}.__t`,_e),Object.keys(Ie).forEach(Me=>{let ke=Me;if(ke.includes(":")){const Ne=ke.split(":");ke=Ne.map((Fe,bt)=>bt===0?`states:${Fe}`:bt===Ne.length-1?`i18n:${Fe}`:Fe).join(":")}be.set(X,`webforms.${oe}.${Q}.${Ee}.${ke}`,Ie[Me])})})})}),te&&Object.keys(te).forEach(oe=>{const K=be.get(te,oe);K&&Object.keys(K).forEach(Q=>{const W=be.get(K,Q);be.set(X,`i18n.${oe}.${Q}`,W)})}),X},L=(ie,fe)=>{switch(fe){case"csv":return ge(ie);case"json":return ye(ie)}},J=async()=>{if(i){const ie=El.generate().toString();try{Se.tasksManagerSubject.next({id:ie,action:"add",type:"i18n",payload:{date:new Date().toISOString(),progress:0,name:"Import i18n",status:"ongoing"}});const fe=await tg(),X=CT(l,h),H=await he(X,fe,ie);m.setSummary(H),m.setShowSummaryView(!0),w(h)}catch(fe){Se.tasksManagerSubject.next({id:ie,type:"i18n",action:"update",payload:{status:"canceled"}}),Se.tasksManagerSubject.next({id:ie,type:"i18n",action:"error",payload:{errorMessage:fe.message||"Import file error"}})}}};if(!t)return T.jsx(T.Fragment,{});const ue=()=>{m.setIsOpen(!0),j()},A=ie=>{m.setSelectedIsocodes(h.includes(ie)?h.filter(fe=>fe!==ie):[...h,ie])},xe=n?T.jsx(n,{onClick:ue,disabled:!!e}):T.jsx(Se.Tooltip,{label:"Import",container:St(),children:T.jsx("button",{disabled:e,className:ft("flex h-full flex-row items-center rounded p-1 disabled:opacity-50",{"cursor-not-allowed":e},{"hover:bg-primary-hover":!e}),onClick:ue,children:T.jsx(st.FdDownload,{className:"h-4 w-4"})})});return T.jsxs(T.Fragment,{children:[xe,T.jsx(Dg,{isOpen:a,onClose:N,title:f?"Import summary":"Import",children:f?T.jsx(gL,{summary:d,onClose:N}):T.jsx(mL,{getRootProps:g,getInputProps:E,isDragActive:D,file:i,error:u,onResetFile:j,detectedLanguages:c,detectedLanguageDetails:P,selectedIsocodes:h,onToggleIsocode:A,onClose:N,onImport:J,setError:m.setError,hasNoSelection:h.length===0})})]})},vL=({onClick:e})=>T.jsx(Se.Tooltip,{label:"Edit",container:St(),children:T.jsx("button",{"data-cy":"locales-list-item-edit-button",onClick:t=>{t.stopPropagation(),e()},className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",children:T.jsx(st.FdPen,{className:"h-4 w-4"})})}),xL=({onClick:e,disable:t})=>t?T.jsx(T.Fragment,{}):T.jsx(Se.Tooltip,{label:"Remove",container:St(),children:T.jsx("button",{"data-cy":"locales-list-item-remove-button",disabled:t,onClick:n=>{n.stopPropagation(),e()},className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",children:T.jsx(st.FdTrash,{className:"h-4 w-4"})})}),bL=({collapse:e,onClick:t})=>T.jsx(Se.Tooltip,{label:"Collapse",container:St(),children:T.jsx("button",{onClick:n=>{n.stopPropagation(),t()},className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",children:T.jsx(st.FdDown,{className:ft("h-4 w-4 ",{"-rotate-90":e})})})}),yL=({lang:e,onCancel:t,onConfirm:n})=>{var k,_,P;const{allSupportedLanguages:r}=rr(),{i18n:i}=nr(),a=M.useMemo(()=>{var g,E;const w=new Set;return(g=i==null?void 0:i.userLang)!=null&&g.primary&&w.add(i.userLang.primary),(E=i==null?void 0:i.userLang)!=null&&E.supported&&i.userLang.supported.forEach(D=>{w.add(D.isocode)}),r.filter(D=>!w.has(D.isocode))},[r,(k=i==null?void 0:i.userLang)==null?void 0:k.primary,(_=i==null?void 0:i.userLang)==null?void 0:_.supported]),{state:{supported:s,selectedLanguage:u,highlightedLanguageIndex:l},actions:c}=Se.useStateObject({supported:a,editing:!1,selectedLanguage:null,highlightedLanguageIndex:-1}),{isOpen:h,getToggleButtonProps:f,getMenuProps:d,getItemProps:m,getInputProps:v}=Cc({onSelectedItemChange:({selectedItem:w})=>{w&&(c.setSelectedLanguage({isocode:w.isocode}),c.setSupported(a))},onInputValueChange:({inputValue:w})=>{if(!w){c.setSupported(a);return}const g=new RegExp(be.escapeRegExp(w),"gi"),E=a.filter(D=>!w||D.native.match(g)||D.isocode.match(g)||D.locale.match(g));c.setSupported(E)},items:s,itemToString:w=>{if(!w)return"";const g=$r(w.isocode,r);return g?`${g.locale} - ${g.native}`:w.isocode},onHighlightedIndexChange:({highlightedIndex:w})=>{c.setHighlightedLanguageIndex(w)}}),x=Se.useOutsideClick(()=>{u&&n(u)}),S=()=>{t()},b=()=>{u?n(u):t()};return T.jsxs("div",{className:"flex flex-row justify-between items-center border-1 mb-2 bg-grey-300 rounded border px-2 py-2 hover:cursor-pointer",ref:x,children:[T.jsxs("div",{children:[T.jsx("div",{className:ft("flex flex-col gap-1 border w-48",{"border-primary-dark rounded-t":h||u,rounded:!h}),children:T.jsxs("div",{className:"flex h-7 rounded bg-grey-300 w-full",children:[T.jsx("input",{"data-cy":"locales-new-language-input",placeholder:((P=$r(e==null?void 0:e.isocode,r))==null?void 0:P.locale)||"Select a language",className:"w-full cursor-pointer placeholder:text-grey-50 text-xs rounded text-grey-50 caret-grey-50 bg-grey-300 p-1.5 placeholder:text-xs focus:outline-none",...v({onKeyUp:w=>{w.key==="Enter"&&b()}}),autoFocus:!0}),T.jsx("button",{"aria-label":"toggle menu",className:"cursor-pointer rounded px-2",type:"button",...f({onClick:()=>{c.setSupported(a)}}),children:T.jsx(st.FdDown,{className:"w-4 h-4 text-green-50"})})]})}),T.jsx("ul",{className:`absolute z-10 w-48 max-h-80 overflow-scroll bg-grey-900 py-1 space-y-1 border-b border-x border-1 rounded-b border-primary-dark ${!(h&&s.length)&&"hidden"}`,...d(),children:h&&s.map((w,g)=>{const E=$r(w.isocode,r);return T.jsx("li",{className:ft("cursor-pointer text-grey-50 h-5 p-1","flex flex-col justify-center items-start",{"bg-primary-hover":g===l}),...m({item:w,index:g}),children:T.jsx("span",{className:"truncate text-xs text-justify flex justify-center items-center",children:`${E==null?void 0:E.native} - ${E==null?void 0:E.isocode}`})},w.isocode)})})]}),T.jsxs("div",{className:"flex space-x-1",children:[T.jsx(Se.Tooltip,{label:"Cancel",container:St(),children:T.jsx("button",{"data-cy":"locales-new-language-cancel-button",className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:S,children:T.jsx(st.FdClose,{className:"h-4 w-4 text-gray-50"})})}),T.jsx(Se.Tooltip,{label:"Confirm",container:St(),children:T.jsx("button",{"data-cy":"locales-new-language-confirm-button",className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:b,children:T.jsx(st.FdCheckCircle,{className:"h-4 w-4 text-gray-50"})})})]})]})},j0=({activate:e,...t})=>e?T.jsx(yL,{...t}):T.jsx(T.Fragment,{}),wL=({primary:e,selected:t,selectMode:n,lang:r,onSelect:i,onRemove:a,onEdit:s,"data-cy":u})=>{const{state:{hover:l,selected:c,collapse:h,editing:f},actions:{setHover:d,setSelected:m,setCollapse:v,setEditing:x}}=Se.useStateObject({hover:!1,selected:!1,collapse:!0,editing:!1}),{selectedLanguage:S,setSelectedLanguage:b}=rr(),{isocode:k,locale:_,native:P}=r||{isocode:"",locale:"",native:""},w=e===k,g=()=>{d(!0)},E=()=>{d(!1)},D=()=>{m(!c),i(k,!c)},j=()=>{x(!0)},N=()=>{a(k)},B=()=>{b(r)},G=re=>{x(!1),s(r,re)},U=()=>{x(!1)};return M.useEffect(()=>{m(t)},[t]),M.useEffect(()=>{w&&b(r)},[]),f?T.jsx(j0,{lang:r,activate:f,onCancel:U,onConfirm:G}):T.jsxs("div",{"data-cy":u,className:ft("border-[1px] mb-2 bg-grey-300 flex flex-col space-y-2 rounded px-2 py-2 hover:cursor-pointer",{"border-primary-dark":(S==null?void 0:S.isocode)===(r==null?void 0:r.isocode)}),onMouseEnter:g,onMouseLeave:E,onClick:B,children:[T.jsxs("div",{className:"flex flex-row justify-between items-center",children:[T.jsxs("div",{className:"flex flex-row space-x-1 text-gray-50",children:[l||n?T.jsx(Se.Checkbox,{className:ft("h-4 w-4 rounded"),isChecked:c,onChange:D}):T.jsx(T.Fragment,{}),T.jsx(st.FdLocalization,{className:ft("w-4 h-4",{hidden:n||l})}),T.jsx("span",{className:ft("text-xs",{"italic font-bold":w}),children:P})]}),T.jsxs("div",{className:"text-grey-50 flex flex-row items-center space-x-1",children:[w&&T.jsx("div",{className:"bg-primary-dark rounded p-0.5 text-xs text-center shrink-0 h-5 w-12",children:"Primary"}),T.jsx(vL,{onClick:j}),T.jsx(xL,{disable:w,onClick:N}),T.jsx(bL,{collapse:h,onClick:()=>v(!h)})]})]}),T.jsxs("div",{className:ft("ml-6 flex justify-between p-1 text-xs",{hidden:h}),children:[T.jsx("span",{className:"text-grey-50",children:"English name"}),T.jsx("span",{className:"text-grey-100",children:_})]}),T.jsxs("div",{className:ft("text-grey-50 ml-6 flex justify-between p-1 text-xs",{hidden:h}),children:[T.jsx("span",{className:"text-grey-50",children:"Iso Code"}),T.jsx("span",{className:"text-grey-100",children:k})]})]})},SL=()=>{const{state:{selectedLanguages:e,shouldAddNewLocal:t,selectAll:n},actions:r}=Se.useStateObject({selectAll:!1,selectedLanguages:[],shouldAddNewLocal:!1,allSupportedLanguages:[]}),{userLanguages:{supported:i=[],primary:a},addFirstLanguage:s,setAddFirstLanguage:u,setUserLangSettings:l,setSelectedLanguage:c,allSupportedLanguages:h}=rr(),{editLanguageKeys:f,deleteLanguageKeys:d}=nr(),m=K0(e),v=G0(e),x=kr(),S=x.getI18nCurrent(),b=x.getTabs(),k=(re,ee)=>{const se=ee?e.concat(re):e.filter(he=>he!==re);r.setSelectedLanguages(se),n&&r.setSelectAll(!1)},_=re=>{r.setShouldAddNewLocal(re)},P=()=>{r.setSelectAll(!n),n?r.setSelectedLanguages([]):r.setSelectedLanguages(i.map(re=>re.isocode))},w=re=>{const ee={primary:i.length===0?re.isocode:a,supported:i.concat(re)};l(ee),r.setShouldAddNewLocal(!1)};M.useEffect(()=>{s&&r.setShouldAddNewLocal(!0)},[s]);const g=(re,ee)=>{const se=`i18n:${ee}`,he=`:i18n:${ee}`,ge=ye=>{ye.custom&&Object.keys(ye.custom).forEach(L=>{(L.includes(se)||L.endsWith(he))&&delete ye.custom[L]})};return Object.values(re).forEach(ye=>ge(ye)),re},E=(re,ee)=>re.map(se=>{var ge;const he=be.cloneDeep(se);return(ge=he.content)!=null&&ge.components&&(he.content={...he.content,components:g({...he.content.components},ee)}),he}),D=(re,ee,se)=>{const he=`i18n:${ee}`,ge=`:i18n:${ee}`,ye=L=>{L.custom&&Object.keys(L.custom).forEach(J=>{if(J===he){const ue=L.custom[J];delete L.custom[J],L.custom[`i18n:${se}`]=ue}else if(J.endsWith(ge)){const ue=L.custom[J];delete L.custom[J];const A=J.replace(`:i18n:${ee}`,`:i18n:${se}`);L.custom[A]=ue}})};return Object.values(re).forEach(L=>ye(L)),re},j=(re,ee,se)=>re.map(he=>{var ye;const ge=be.cloneDeep(he);return(ye=ge.content)!=null&&ye.components&&(ge.content={...ge.content,components:D({...ge.content.components},ee,se)}),ge}),N=async re=>{const{confirmed:ee}=await x.actions.openModal({title:"Delete Language",message:"Your translations will be lost , want to proceed ?",type:Se.ModalType.CONFIRM,color:Se.ModalColor.WARNING,icon:"FdWarningDanger"});if(!ee)return;d({isocode:re});const se=E(b,re);x.actions.setTabs(se);const he={primary:a,supported:i.filter(ge=>ge.isocode!==re)};l(he),e.includes(re)&&r.setSelectedLanguages(e.filter(ge=>ge!==re)),he.supported.length===0&&u(!1),re===S&&x.actions.setI18nCurrent("")},B=(re,ee)=>{const se={primary:a===re.isocode?ee.isocode:a,supported:i.map(ge=>ge.isocode===re.isocode?ee:ge)},he=j(b,re.isocode,ee.isocode);x.actions.setTabs(he),S===re.isocode&&x.actions.setI18nCurrent(ee.isocode),f(re,ee),l(se),c(ee)},G=()=>{_(!1),i.length===0&&u(!1)},U=()=>{t?Se.toastSubject.next({kind:"warning",message:"To add a new locale, please confirm your selection by clicking 'Confirm'"}):_(!0)};return T.jsxs("div",{className:"flex w-72 flex-col space-y-2 px-2 py-3 shrink-0",children:[T.jsxs("div",{className:"text-grey-50 flex flex-row justify-between",children:[T.jsxs("div",{className:"flex flex-row items-center justify-center space-x-2 text-sm",children:[T.jsx(st.FdLocalization,{className:"h-4 w-4"}),T.jsx("span",{className:"text-sm text-gray-50",children:"Locales "})]}),T.jsxs("div",{className:"space-x-2",children:[T.jsx(Se.Tip,{tipKey:"editors:i18n:locals",alwaysOn:!0}),T.jsx(Se.Tooltip,{label:"Add new language",container:St(),children:T.jsx("button",{"data-cy":"locales-header-add-button",onClick:U,className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",children:T.jsx(st.FdPlus,{className:"h-4 w-4 text-gray-50"})})})]})]}),T.jsxs("div",{className:"flex px-[5px] justify-between text-gray-50",children:[T.jsxs("div",{"data-cy":"locales-select-all-checkbox",className:ft("text-grey-50 flex items-center justify-center space-x-1",{visible:m,invisible:!m}),children:[T.jsx(Se.Checkbox,{isChecked:n,onChange:P}),T.jsx("span",{className:"text-xs",children:"Select all"})]}),T.jsxs("div",{className:"flex flex-row items-center justify-center space-x-1",children:[T.jsx(vT,{"data-cy":"localization-export-button",enable:!0,disable:!1,toExport:e}),T.jsx(F0,{"data-cy":"localization-import-button",enable:!0,disable:!1})]})]}),T.jsx(j0,{activate:t,onConfirm:w,onCancel:G}),T.jsx("div",{style:{height:t?"calc(100vh - 14.75rem)":"calc(100vh - 11.75rem)"},children:T.jsx(B0,{"data-cy":"locales-list",style:{height:"100%",width:"100%"},children:[...i].sort(re=>re.isocode===a?-1:1).map((re,ee)=>{const se=$r(re.isocode,h);return T.jsx(wL,{"data-cy":`locales-list-item-${se==null?void 0:se.isocode}`,primary:a,selected:n||e.includes(se==null?void 0:se.isocode),lang:se,onSelect:k,selectMode:v,onRemove:N,onEdit:B},ee)})})})]})},CL=({onAddLocal:e})=>T.jsxs("div",{"data-cy":"localization-empty-view",className:"flex flex-col justify-center items-center space-y-3 pb-[30%] w-full h-full bg-grey-800",children:[T.jsx(st.FdInfoBold,{className:"h-8 w-8 text-grey-200"}),T.jsx("span",{className:"text-grey-200 text-sm text-center",children:"No locale is available yet. Add a new one or import a locale."}),T.jsxs("div",{className:"flex flex-row items-center justify-center space-x-2",children:[T.jsxs("div",{"data-cy":"localization-empty-add-button",className:"flex flex-row items-center justify-center px-2 py-1 space-x-1 bg-primary-dark rounded cursor-pointer",onClick:e,children:[T.jsx(st.FdPlus,{className:"h-4 w-4 text-grey-50"}),T.jsx("span",{className:"text-grey-50 text-sm",children:"Add new Locale"})]}),T.jsx(F0,{enable:!0,RenderTrigger:({onClick:t})=>T.jsxs("div",{className:"flex flex-row items-center justify-center px-2 py-1 space-x-1 bg-primary-dark rounded text-grey-50 text-sm disabled:opacity-50 cursor-pointer",onClick:t,children:[T.jsx(st.FdDownload,{className:"h-4 w-4 text-grey-50"}),T.jsx("span",{className:"text-grey-50 text-sm",children:"Import Locale"})]})})]})]}),kL=()=>{var s;const{userLanguages:e,addFirstLanguage:t,setAddFirstLanguage:n}=rr(),i=(((s=e.supported)==null?void 0:s.length)??0)===0&&!t,a=()=>{n(!0)};return i?T.jsx(CL,{onAddLocal:a}):T.jsxs("div",{className:ft("flex flex-row w-full h-full bg-grey-800",{"justify-center items-center":i}),children:[T.jsx(SL,{}),T.jsx(wb,{})]})},ef=()=>T.jsx(gd,{children:T.jsx(kL,{})}),EL=()=>{const{modals:e,closeModal:t,editModal:n}=kd();return T.jsx(T.Fragment,{children:e.map((r,i)=>T.jsx(Se.Modal,{hasOverlay:i===0,...r,onClose:t,onEdit:n,container:St()},r.id))})},_L=({onTabsChange:e,onI18nCurrentChange:t})=>{const n=kr(),r=n.getTabs(),i=n.getI18nCurrent();return Se.useDidMountEffect(()=>{e&&e(r)},[e,r]),Se.useDidMountEffect(()=>{t&&t(i)},[t,i]),T.jsxs(T.Fragment,{children:[T.jsx("div",{className:`relative h-screen z-10 overflow-hidden ${_l.LOCALIZATION_EDITOR_SCOPE_CLASS}`,children:T.jsx(ef,{})}),T.jsx(EL,{})]})},IL=({children:e})=>{const t=kr();return T.jsx(pd,{getSupportedLanguages:n=>t.getSupportedLanguages(n),i18nCurrent:t.getI18nCurrent(),activeTabPath:t.getActiveTabPath(),flagsForActiveTab:t.getFlagsByPath(t.getActiveTabPath()),children:e})},TL=({userComponents:e,buildResolver:t,supportedLanguages:n,...r})=>{const i=Cd(e,t,n);return T.jsx(xd,{adapter:i,children:T.jsx(cd,{isI18nEnabled:!0,onI18nChange:()=>{},children:T.jsx(IL,{children:T.jsx(Se.TipsProvider,{children:T.jsx(_L,{...r})})})})})},AL=({tabs:e=[],i18nCurrent:t="",...n})=>T.jsx(Sd,{tabs:e,i18nCurrent:t,children:T.jsx(TL,{...n})});exports.LOCALIZATION_EDITOR_SCOPE_CLASS=_l.LOCALIZATION_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=xd;exports.EditorStateContext=Ms;exports.I18N_ACTIONS=hb;exports.I18N_CONSTANT=ld;exports.I18nProvider=cd;exports.LocalizationEditor=ef;exports.LocalizationEditorProvider=gd;exports.LocalizationProvider=pd;exports.Portal=xb;exports.ReducerAdapterProvider=Sd;exports.Standalone=AL;exports.default=ef;exports.getDefaultContainer=St;exports.getDefaultInitialState=wd;exports.getLanguageDetails=$r;exports.localizationReducer=yd;exports.useEditorStateAdapter=kr;exports.useI18n=nr;exports.useLocalization=dd;exports.useLocalizationEditor=rr;exports.useModals=kd;exports.useReducerAdapter=Cd;exports.useReduxAdapter=gb;
154
+ */return e.NODE_ENV!=="production"&&(function(){var t=60103,n=60106,r=60107,i=60108,a=60114,s=60109,u=60110,l=60112,c=60113,h=60120,f=60115,d=60116,m=60121,v=60122,x=60117,S=60129,y=60131;if(typeof Symbol=="function"&&Symbol.for){var k=Symbol.for;t=k("react.element"),n=k("react.portal"),r=k("react.fragment"),i=k("react.strict_mode"),a=k("react.profiler"),s=k("react.provider"),u=k("react.context"),l=k("react.forward_ref"),c=k("react.suspense"),h=k("react.suspense_list"),f=k("react.memo"),d=k("react.lazy"),m=k("react.block"),v=k("react.server.block"),x=k("react.fundamental"),k("react.scope"),k("react.opaque.id"),S=k("react.debug_trace_mode"),k("react.offscreen"),y=k("react.legacy_hidden")}var _=!1;function P(K){return!!(typeof K=="string"||typeof K=="function"||K===r||K===a||K===S||K===i||K===c||K===h||K===y||_||typeof K=="object"&&K!==null&&(K.$$typeof===d||K.$$typeof===f||K.$$typeof===s||K.$$typeof===u||K.$$typeof===l||K.$$typeof===x||K.$$typeof===m||K[0]===v))}function w(K){if(typeof K=="object"&&K!==null){var Z=K.$$typeof;switch(Z){case t:var Q=K.type;switch(Q){case r:case a:case i:case c:case h:return Q;default:var W=Q&&Q.$$typeof;switch(W){case u:case l:case d:case f:case s:return W;default:return Z}}case n:return Z}}}var g=u,E=s,D=t,F=l,R=r,B=d,G=f,U=n,re=a,ee=i,se=c,he=!1,ge=!1;function be(K){return he||(he=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(K){return ge||(ge=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function J(K){return w(K)===u}function ue(K){return w(K)===s}function A(K){return typeof K=="object"&&K!==null&&K.$$typeof===t}function ye(K){return w(K)===l}function ie(K){return w(K)===r}function fe(K){return w(K)===d}function X(K){return w(K)===f}function H(K){return w(K)===n}function te(K){return w(K)===a}function me(K){return w(K)===i}function oe(K){return w(K)===c}lt.ContextConsumer=g,lt.ContextProvider=E,lt.Element=D,lt.ForwardRef=F,lt.Fragment=R,lt.Lazy=B,lt.Memo=G,lt.Portal=U,lt.Profiler=re,lt.StrictMode=ee,lt.Suspense=se,lt.isAsyncMode=be,lt.isConcurrentMode=L,lt.isContextConsumer=J,lt.isContextProvider=ue,lt.isElement=A,lt.isForwardRef=ye,lt.isFragment=ie,lt.isLazy=fe,lt.isMemo=X,lt.isPortal=H,lt.isProfiler=te,lt.isStrictMode=me,lt.isSuspense=oe,lt.isValidElementType=P,lt.typeOf=w})(),lt}var Oh;function $I(){if(Oh)return Va.exports;Oh=1;var e={};return e.NODE_ENV==="production"?Va.exports=BI():Va.exports=zI(),Va.exports}var Lh=$I();function Dh(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function Vh(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function bu(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return Vh(n.overflowY,t)||Vh(n.overflowX,t)||(function(r){var i=(function(a){if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1}function Ma(e,t,n,r,i,a,s,u){return a<e&&s>t||a>e&&s<t?0:a<=e&&u<=n||s>=t&&u>=n?a-e-r:s>t&&u<n||a<e&&u>n?s-t+i:0}var UI=function(e,t){var n=window,r=t.inline,i=t.boundary,a=t.skipOverflowHiddenElements,s=typeof i=="function"?i:function(K){return K!==i};if(!Dh(e))throw new TypeError("Invalid target");for(var u,l,c=document.scrollingElement||document.documentElement,h=[],f=e;Dh(f)&&s(f);){if((f=(l=(u=f).parentElement)==null?u.getRootNode().host||null:l)===c){h.push(f);break}f!=null&&f===document.body&&bu(f)&&!bu(document.documentElement)||f!=null&&bu(f,a)&&h.push(f)}for(var d=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,S=e.getBoundingClientRect(),y=S.height,k=S.width,_=S.top,P=S.right,w=S.bottom,g=S.left,E=_,D=r==="center"?g+k/2:r==="end"?P:g,F=[],R=0;R<h.length;R++){var B=h[R],G=B.getBoundingClientRect(),U=G.height,re=G.width,ee=G.top,se=G.right,he=G.bottom,ge=G.left;if(_>=0&&g>=0&&w<=m&&P<=d&&_>=ee&&w<=he&&g>=ge&&P<=se)return F;var be=getComputedStyle(B),L=parseInt(be.borderLeftWidth,10),J=parseInt(be.borderTopWidth,10),ue=parseInt(be.borderRightWidth,10),A=parseInt(be.borderBottomWidth,10),ye=0,ie=0,fe="offsetWidth"in B?B.offsetWidth-B.clientWidth-L-ue:0,X="offsetHeight"in B?B.offsetHeight-B.clientHeight-J-A:0,H="offsetWidth"in B?B.offsetWidth===0?0:re/B.offsetWidth:0,te="offsetHeight"in B?B.offsetHeight===0?0:U/B.offsetHeight:0;if(c===B)ye=Ma(x,x+m,m,J,A,x+E,x+E+y,y),ie=r==="start"?D:r==="center"?D-d/2:r==="end"?D-d:Ma(v,v+d,d,L,ue,v+D,v+D+k,k),ye=Math.max(0,ye+x),ie=Math.max(0,ie+v);else{ye=Ma(ee,he,U,J,A+X,E,E+y,y),ie=r==="start"?D-ge-L:r==="center"?D-(ge+re/2)+fe/2:r==="end"?D-se+ue+fe:Ma(ge,se,re,L,ue+fe,D,D+k,k);var me=B.scrollLeft,oe=B.scrollTop;E+=oe-(ye=Math.max(0,Math.min(oe+ye/te,B.scrollHeight-U/te+X))),D+=me-(ie=Math.max(0,Math.min(me+ie/H,B.scrollWidth-re/H+fe)))}F.push({el:B,top:ye,left:ie})}return F},Ae={};let HI=0;function Mh(e){return typeof e=="function"?e:tn}function tn(){}function Bg(e,t){if(!e)return;UI(e,{boundary:t}).forEach(r=>{let{el:i,top:a,left:s}=r;i.scrollTop=a,i.scrollLeft=s})}function Fh(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function Qs(e,t){let n;function r(){n&&clearTimeout(n)}function i(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];r(),n=setTimeout(()=>{n=null,e(...s)},t)}return i.cancel=r,i}function dt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return t.some(u=>(u&&u(r,...a),r.preventDownshiftDefault||r.hasOwnProperty("nativeEvent")&&r.nativeEvent.preventDownshiftDefault))}}function kn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r=>{t.forEach(i=>{typeof i=="function"?i(r):i&&(i.current=r)})}}function zg(){return String(HI++)}function $g(e){let{isOpen:t,resultCount:n,previousResultCount:r}=e;return t?n?n!==r?`${n} result${n===1?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function jh(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Ug(e){return typeof e.type=="string"}function Hg(e){return e.props}function WI(e,t){console.error(`The property "${t}" is required in "${e}"`)}const qI=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Fa(e){e===void 0&&(e={});const t={};return qI.forEach(n=>{e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function Pi(e,t){return Object.keys(e).reduce((n,r)=>(n[r]=vs(t,r)?t[r]:e[r],n),{})}function vs(e,t){return e[t]!==void 0}function Ri(e){const{key:t,keyCode:n}=e;return n>=37&&n<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function KI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xn(e,t,n,r,i){if(i===void 0&&(i=!0),n===0)return-1;const a=n-1;(typeof t!="number"||t<0||t>=n)&&(t=e>0?-1:a+1);let s=t+e;s<0?s=i?a:0:s>a&&(s=i?0:a);const u=Fn(e,s,n,r,i);return u===-1?t>=n?-1:t:u}function Fn(e,t,n,r,i){const a=r(t);if(!a||!a.hasAttribute("disabled"))return t;if(e>0){for(let s=t+1;s<n;s++)if(!r(s).hasAttribute("disabled"))return s}else for(let s=t-1;s>=0;s--)if(!r(s).hasAttribute("disabled"))return s;return i?e>0?Fn(1,0,n,r,!1):Fn(-1,n-1,n,r,!1):-1}function xs(e,t,n,r){return r===void 0&&(r=!0),t.some(i=>i&&(Fh(i,e,n)||r&&Fh(i,n.document.activeElement,n)))}let Yl=tn;Ae.NODE_ENV!=="production"&&(Yl=(e,t,n)=>{const r="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(i=>{t[i]!==void 0&&n[i]===void 0?console.error(`downshift: A component has changed the controlled prop "${i}" to be uncontrolled. ${r}`):t[i]===void 0&&n[i]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "${i}" to be controlled. ${r}`)})});const GI=Qs(e=>{qg(e).textContent=""},500);function Wg(e,t){const n=qg(t);e&&(n.textContent=e,GI(t))}function qg(e){e===void 0&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const Kg=Ae.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Gg=Ae.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Jg=Ae.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,es=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,ts=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Yg=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Xg=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Qg=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Zg=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,ev=Ae.NODE_ENV!=="production"?"__autocomplete_click_item__":9,tv=Ae.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,nv=Ae.NODE_ENV!=="production"?"__autocomplete_change_input__":11,rv=Ae.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,el=Ae.NODE_ENV!=="production"?"__autocomplete_click_button__":13,iv=Ae.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,av=Ae.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,sv=Ae.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var JI=Object.freeze({__proto__:null,unknown:Kg,mouseUp:Gg,itemMouseEnter:Jg,keyDownArrowUp:es,keyDownArrowDown:ts,keyDownEscape:Yg,keyDownEnter:Xg,keyDownHome:Qg,keyDownEnd:Zg,clickItem:ev,blurInput:tv,changeInput:nv,keyDownSpaceButton:rv,clickButton:el,blurButton:iv,controlledPropUpdatedSelectedItem:av,touchEnd:sv});const YI=(()=>{class e extends M.Component{constructor(n){var r;super(n),r=this,this.id=this.props.id||`downshift-${zg()}`,this.menuId=this.props.menuId||`${this.id}-menu`,this.labelId=this.props.labelId||`${this.id}-label`,this.inputId=this.props.inputId||`${this.id}-input`,this.getItemId=this.props.getItemId||(f=>`${this.id}-item-${f}`),this.input=null,this.items=[],this.itemCount=null,this.previousResultCount=0,this.timeoutIds=[],this.internalSetTimeout=(f,d)=>{const m=setTimeout(()=>{this.timeoutIds=this.timeoutIds.filter(v=>v!==m),f()},d);this.timeoutIds.push(m)},this.setItemCount=f=>{this.itemCount=f},this.unsetItemCount=()=>{this.itemCount=null},this.setHighlightedIndex=function(f,d){f===void 0&&(f=r.props.defaultHighlightedIndex),d===void 0&&(d={}),d=Fa(d),r.internalSetState({highlightedIndex:f,...d})},this.clearSelection=f=>{this.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:this.props.defaultHighlightedIndex,isOpen:this.props.defaultIsOpen},f)},this.selectItem=(f,d,m)=>{d=Fa(d),this.internalSetState({isOpen:this.props.defaultIsOpen,highlightedIndex:this.props.defaultHighlightedIndex,selectedItem:f,inputValue:this.props.itemToString(f),...d},m)},this.selectItemAtIndex=(f,d,m)=>{const v=this.items[f];v!=null&&this.selectItem(v,d,m)},this.selectHighlightedItem=(f,d)=>this.selectItemAtIndex(this.getState().highlightedIndex,f,d),this.internalSetState=(f,d)=>{let m,v;const x={},S=typeof f=="function";return!S&&f.hasOwnProperty("inputValue")&&this.props.onInputValueChange(f.inputValue,{...this.getStateAndHelpers(),...f}),this.setState(y=>{y=this.getState(y);let k=S?f(y):f;k=this.props.stateReducer(y,k),m=k.hasOwnProperty("selectedItem");const _={};return m&&k.selectedItem!==y.selectedItem&&(v=k.selectedItem),k.type=k.type||Kg,Object.keys(k).forEach(P=>{y[P]!==k[P]&&(x[P]=k[P]),P!=="type"&&(k[P],vs(this.props,P)||(_[P]=k[P]))}),S&&k.hasOwnProperty("inputValue")&&this.props.onInputValueChange(k.inputValue,{...this.getStateAndHelpers(),...k}),_},()=>{Mh(d)(),Object.keys(x).length>1&&this.props.onStateChange(x,this.getStateAndHelpers()),m&&this.props.onSelect(f.selectedItem,this.getStateAndHelpers()),v!==void 0&&this.props.onChange(v,this.getStateAndHelpers()),this.props.onUserAction(x,this.getStateAndHelpers())})},this.rootRef=f=>this._rootNode=f,this.getRootProps=function(f,d){let{refKey:m="ref",ref:v,...x}=f===void 0?{}:f,{suppressRefError:S=!1}=d===void 0?{}:d;r.getRootProps.called=!0,r.getRootProps.refKey=m,r.getRootProps.suppressRefError=S;const{isOpen:y}=r.getState();return{[m]:kn(v,r.rootRef),role:"combobox","aria-expanded":y,"aria-haspopup":"listbox","aria-owns":y?r.menuId:null,"aria-labelledby":r.labelId,...x}},this.keyDownHandlers={ArrowDown(f){if(f.preventDefault(),this.getState().isOpen){const d=f.shiftKey?5:1;this.moveHighlightedIndex(d,{type:ts})}else this.internalSetState({isOpen:!0,type:ts},()=>{const d=this.getItemCount();if(d>0){const{highlightedIndex:m}=this.getState(),v=Xn(1,m,d,x=>this.getItemNodeFromIndex(x));this.setHighlightedIndex(v,{type:ts})}})},ArrowUp(f){if(f.preventDefault(),this.getState().isOpen){const d=f.shiftKey?-5:-1;this.moveHighlightedIndex(d,{type:es})}else this.internalSetState({isOpen:!0,type:es},()=>{const d=this.getItemCount();if(d>0){const{highlightedIndex:m}=this.getState(),v=Xn(-1,m,d,x=>this.getItemNodeFromIndex(x));this.setHighlightedIndex(v,{type:es})}})},Enter(f){if(f.which===229)return;const{isOpen:d,highlightedIndex:m}=this.getState();if(d&&m!=null){f.preventDefault();const v=this.items[m],x=this.getItemNodeFromIndex(m);if(v==null||x&&x.hasAttribute("disabled"))return;this.selectHighlightedItem({type:Xg})}},Escape(f){f.preventDefault(),this.reset({type:Yg,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(f){f.preventDefault(),this.toggleMenu({type:rv})}},this.inputKeyDownHandlers={...this.keyDownHandlers,Home(f){const{isOpen:d}=this.getState();if(!d)return;f.preventDefault();const m=this.getItemCount();if(m<=0||!d)return;const v=Fn(1,0,m,x=>this.getItemNodeFromIndex(x),!1);this.setHighlightedIndex(v,{type:Qg})},End(f){const{isOpen:d}=this.getState();if(!d)return;f.preventDefault();const m=this.getItemCount();if(m<=0||!d)return;const v=Fn(-1,m-1,m,x=>this.getItemNodeFromIndex(x),!1);this.setHighlightedIndex(v,{type:Zg})}},this.getToggleButtonProps=function(f){let{onClick:d,onPress:m,onKeyDown:v,onKeyUp:x,onBlur:S,...y}=f===void 0?{}:f;const{isOpen:k}=r.getState(),_={onClick:dt(d,r.buttonHandleClick),onKeyDown:dt(v,r.buttonHandleKeyDown),onKeyUp:dt(x,r.buttonHandleKeyUp),onBlur:dt(S,r.buttonHandleBlur)},P=y.disabled?{}:_;return{type:"button",role:"button","aria-label":k?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,...P,...y}},this.buttonHandleKeyUp=f=>{f.preventDefault()},this.buttonHandleKeyDown=f=>{const d=Ri(f);this.buttonKeyDownHandlers[d]&&this.buttonKeyDownHandlers[d].call(this,f)},this.buttonHandleClick=f=>{f.preventDefault(),this.props.environment.document.activeElement===this.props.environment.document.body&&f.target.focus(),Ae.NODE_ENV==="test"?this.toggleMenu({type:el}):this.internalSetTimeout(()=>this.toggleMenu({type:el}))},this.buttonHandleBlur=f=>{const d=f.target;this.internalSetTimeout(()=>{!this.isMouseDown&&(this.props.environment.document.activeElement==null||this.props.environment.document.activeElement.id!==this.inputId)&&this.props.environment.document.activeElement!==d&&this.reset({type:iv})})},this.getLabelProps=f=>({htmlFor:this.inputId,id:this.labelId,...f}),this.getInputProps=function(f){let{onKeyDown:d,onBlur:m,onChange:v,onInput:x,onChangeText:S,...y}=f===void 0?{}:f,k,_={};k="onChange";const{inputValue:P,isOpen:w,highlightedIndex:g}=r.getState();return y.disabled||(_={[k]:dt(v,x,r.inputHandleChange),onKeyDown:dt(d,r.inputHandleKeyDown),onBlur:dt(m,r.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":w&&typeof g=="number"&&g>=0?r.getItemId(g):null,"aria-controls":w?r.menuId:null,"aria-labelledby":r.labelId,autoComplete:"off",value:P,id:r.inputId,..._,...y}},this.inputHandleKeyDown=f=>{const d=Ri(f);d&&this.inputKeyDownHandlers[d]&&this.inputKeyDownHandlers[d].call(this,f)},this.inputHandleChange=f=>{this.internalSetState({type:nv,isOpen:!0,inputValue:f.target.value,highlightedIndex:this.props.defaultHighlightedIndex})},this.inputHandleBlur=()=>{this.internalSetTimeout(()=>{const f=this.props.environment.document&&!!this.props.environment.document.activeElement&&!!this.props.environment.document.activeElement.dataset&&this.props.environment.document.activeElement.dataset.toggle&&this._rootNode&&this._rootNode.contains(this.props.environment.document.activeElement);!this.isMouseDown&&!f&&this.reset({type:tv})})},this.menuRef=f=>{this._menuNode=f},this.getMenuProps=function(f,d){let{refKey:m="ref",ref:v,...x}=f===void 0?{}:f,{suppressRefError:S=!1}=d===void 0?{}:d;return r.getMenuProps.called=!0,r.getMenuProps.refKey=m,r.getMenuProps.suppressRefError=S,{[m]:kn(v,r.menuRef),role:"listbox","aria-labelledby":x&&x["aria-label"]?null:r.labelId,id:r.menuId,...x}},this.getItemProps=function(f){let{onMouseMove:d,onMouseDown:m,onClick:v,onPress:x,index:S,item:y=Ae.NODE_ENV==="production"?void 0:WI("getItemProps","item"),...k}=f===void 0?{}:f;S===void 0?(r.items.push(y),S=r.items.indexOf(y)):r.items[S]=y;const _="onClick",P=v,w={onMouseMove:dt(d,()=>{S!==r.getState().highlightedIndex&&(r.setHighlightedIndex(S,{type:Jg}),r.avoidScrolling=!0,r.internalSetTimeout(()=>r.avoidScrolling=!1,250))}),onMouseDown:dt(m,E=>{E.preventDefault()}),[_]:dt(P,()=>{r.selectItemAtIndex(S,{type:ev})})},g=k.disabled?{onMouseDown:w.onMouseDown}:w;return{id:r.getItemId(S),role:"option","aria-selected":r.getState().highlightedIndex===S,...g,...k}},this.clearItems=()=>{this.items=[]},this.reset=function(f,d){f===void 0&&(f={}),f=Fa(f),r.internalSetState(m=>{let{selectedItem:v}=m;return{isOpen:r.props.defaultIsOpen,highlightedIndex:r.props.defaultHighlightedIndex,inputValue:r.props.itemToString(v),...f}},d)},this.toggleMenu=function(f,d){f===void 0&&(f={}),f=Fa(f),r.internalSetState(m=>{let{isOpen:v}=m;return{isOpen:!v,...v&&{highlightedIndex:r.props.defaultHighlightedIndex},...f}},()=>{const{isOpen:m,highlightedIndex:v}=r.getState();m&&r.getItemCount()>0&&typeof v=="number"&&r.setHighlightedIndex(v,f),Mh(d)()})},this.openMenu=f=>{this.internalSetState({isOpen:!0},f)},this.closeMenu=f=>{this.internalSetState({isOpen:!1},f)},this.updateStatus=Qs(()=>{const f=this.getState(),d=this.items[f.highlightedIndex],m=this.getItemCount(),v=this.props.getA11yStatusMessage({itemToString:this.props.itemToString,previousResultCount:this.previousResultCount,resultCount:m,highlightedItem:d,...f});this.previousResultCount=m,Wg(v,this.props.environment.document)},200);const{defaultHighlightedIndex:i,initialHighlightedIndex:a=i,defaultIsOpen:s,initialIsOpen:u=s,initialInputValue:l="",initialSelectedItem:c=null}=this.props,h=this.getState({highlightedIndex:a,isOpen:u,inputValue:l,selectedItem:c});h.selectedItem!=null&&this.props.initialInputValue===void 0&&(h.inputValue=this.props.itemToString(h.selectedItem)),this.state=h}internalClearTimeouts(){this.timeoutIds.forEach(n=>{clearTimeout(n)}),this.timeoutIds=[]}getState(n){return n===void 0&&(n=this.state),Pi(n,this.props)}getItemCount(){let n=this.items.length;return this.itemCount!=null?n=this.itemCount:this.props.itemCount!==void 0&&(n=this.props.itemCount),n}getItemNodeFromIndex(n){return this.props.environment.document.getElementById(this.getItemId(n))}scrollHighlightedItemIntoView(){{const n=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(n,this._menuNode)}}moveHighlightedIndex(n,r){const i=this.getItemCount(),{highlightedIndex:a}=this.getState();if(i>0){const s=Xn(n,a,i,u=>this.getItemNodeFromIndex(u));this.setHighlightedIndex(s,r)}}getStateAndHelpers(){const{highlightedIndex:n,inputValue:r,selectedItem:i,isOpen:a}=this.getState(),{itemToString:s}=this.props,{id:u}=this,{getRootProps:l,getToggleButtonProps:c,getLabelProps:h,getMenuProps:f,getInputProps:d,getItemProps:m,openMenu:v,closeMenu:x,toggleMenu:S,selectItem:y,selectItemAtIndex:k,selectHighlightedItem:_,setHighlightedIndex:P,clearSelection:w,clearItems:g,reset:E,setItemCount:D,unsetItemCount:F,internalSetState:R}=this;return{getRootProps:l,getToggleButtonProps:c,getLabelProps:h,getMenuProps:f,getInputProps:d,getItemProps:m,reset:E,openMenu:v,closeMenu:x,toggleMenu:S,selectItem:y,selectItemAtIndex:k,selectHighlightedItem:_,setHighlightedIndex:P,clearSelection:w,clearItems:g,setItemCount:D,unsetItemCount:F,setState:R,itemToString:s,id:u,highlightedIndex:n,inputValue:r,isOpen:a,selectedItem:i}}componentDidMount(){Ae.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Bh(this._menuNode,this.getMenuProps);{const n=()=>{this.isMouseDown=!0},r=l=>{this.isMouseDown=!1,!xs(l.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:Gg},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},a=()=>{this.isTouchMove=!0},s=l=>{const c=xs(l.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!c&&this.getState().isOpen&&this.reset({type:sv},()=>this.props.onOuterClick(this.getStateAndHelpers()))},{environment:u}=this.props;u.addEventListener("mousedown",n),u.addEventListener("mouseup",r),u.addEventListener("touchstart",i),u.addEventListener("touchmove",a),u.addEventListener("touchend",s),this.cleanup=()=>{this.internalClearTimeouts(),this.updateStatus.cancel(),u.removeEventListener("mousedown",n),u.removeEventListener("mouseup",r),u.removeEventListener("touchstart",i),u.removeEventListener("touchmove",a),u.removeEventListener("touchend",s)}}}shouldScroll(n,r){const{highlightedIndex:i}=this.props.highlightedIndex===void 0?this.getState():this.props,{highlightedIndex:a}=r.highlightedIndex===void 0?n:r;return i&&this.getState().isOpen&&!n.isOpen||i!==a}componentDidUpdate(n,r){Ae.NODE_ENV!=="production"&&(Yl(this.state,n,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&Bh(this._menuNode,this.getMenuProps)),vs(this.props,"selectedItem")&&this.props.selectedItemChanged(n.selectedItem,this.props.selectedItem)&&this.internalSetState({type:av,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(r,n)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const n=jh(this.props.children,tn);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;const r=jh(n(this.getStateAndHelpers()));if(!r)return null;if(this.getRootProps.called||this.props.suppressRefError)return Ae.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&XI(r,this.getRootProps),r;if(Ug(r))return M.cloneElement(r,this.getRootProps(Hg(r)));if(Ae.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")}}return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:$g,itemToString:t=>t==null?"":(Ae.NODE_ENV!=="production"&&KI(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t)),onStateChange:tn,onInputValueChange:tn,onUserAction:tn,onChange:tn,onSelect:tn,onOuterClick:tn,selectedItemChanged:(t,n)=>t!==n,environment:typeof window>"u"?{}:window,stateReducer:(t,n)=>n,suppressRefError:!1,scrollIntoView:Bg},e.stateChangeTypes=JI,e})();Ae.NODE_ENV!=="production"&&(YI.propTypes={children:pe.func,defaultHighlightedIndex:pe.number,defaultIsOpen:pe.bool,initialHighlightedIndex:pe.number,initialSelectedItem:pe.any,initialInputValue:pe.string,initialIsOpen:pe.bool,getA11yStatusMessage:pe.func,itemToString:pe.func,onChange:pe.func,onSelect:pe.func,onStateChange:pe.func,onInputValueChange:pe.func,onUserAction:pe.func,onOuterClick:pe.func,selectedItemChanged:pe.func,stateReducer:pe.func,itemCount:pe.number,id:pe.string,environment:pe.shape({addEventListener:pe.func,removeEventListener:pe.func,document:pe.shape({getElementById:pe.func,activeElement:pe.any,body:pe.any})}),suppressRefError:pe.bool,scrollIntoView:pe.func,selectedItem:pe.any,isOpen:pe.bool,inputValue:pe.string,highlightedIndex:pe.number,labelId:pe.string,inputId:pe.string,menuId:pe.string,getItemId:pe.func});function Bh(e,t){let{refKey:n}=t;e||console.error(`downshift: The ref prop "${n}" from getMenuProps was not applied correctly on your menu element.`)}function XI(e,t){let{refKey:n}=t;const r=n!=="ref",i=!Ug(e);i&&!r&&!Lh.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&r&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${n}"`),!Lh.isForwardRef(e)&&!Hg(e)[n]&&console.error(`downshift: You must apply the ref prop "${n}" from getRootProps onto your root element.`)}const ov={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function QI(e,t,n){const{props:r,type:i}=e,a={};Object.keys(t).forEach(s=>{ZI(s,e,t,n),n[s]!==t[s]&&(a[s]=n[s])}),r.onStateChange&&Object.keys(a).length&&r.onStateChange({type:i,...a})}function ZI(e,t,n,r){const{props:i,type:a}=t,s=`on${Xl(e)}Change`;i[s]&&r[e]!==void 0&&r[e]!==n[e]&&i[s]({type:a,...r})}function eT(e,t){return t.changes}function tT(e){const{selectedItem:t,itemToString:n}=e;return t?`${n(t)} has been selected.`:""}const nT=Qs((e,t)=>{Wg(e(),t)},200),rT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?M.useLayoutEffect:M.useEffect;function uv(e){let{id:t=`downshift-${zg()}`,labelId:n,menuId:r,getItemId:i,toggleButtonId:a,inputId:s}=e;return M.useRef({labelId:n||`${t}-label`,menuId:r||`${t}-menu`,getItemId:i||(l=>`${t}-item-${l}`),toggleButtonId:a||`${t}-toggle-button`,inputId:s||`${t}-input`}).current}function lv(e,t,n){return e!==void 0?e:n.length===0?-1:n.indexOf(t)}function iT(e){return e?String(e):""}function zh(e){return/^\S{1}$/.test(e)}function Xl(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function Ql(e){const t=M.useRef(e);return t.current=e,t}function cv(e,t,n){const r=M.useRef(),i=M.useRef(),a=M.useCallback((f,d)=>{i.current=d,f=Pi(f,d.props);const m=e(f,d);return d.props.stateReducer(f,{...d,changes:m})},[e]),[s,u]=M.useReducer(a,t),l=Ql(n),c=M.useCallback(f=>u({props:l.current,...f}),[l]),h=i.current;return M.useEffect(()=>{h&&r.current&&r.current!==s&&QI(h,Pi(r.current,h.props),s),r.current=s},[s,n,h]),[s,c]}function aT(e,t,n){const[r,i]=cv(e,t,n);return[Pi(r,n),i]}const xi={itemToString:iT,stateReducer:eT,getA11ySelectionMessage:tT,scrollIntoView:Bg,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Gt(e,t,n){n===void 0&&(n=ov);const r=e[`default${Xl(t)}`];return r!==void 0?r:n[t]}function ja(e,t,n){n===void 0&&(n=ov);const r=e[t];if(r!==void 0)return r;const i=e[`initial${Xl(t)}`];return i!==void 0?i:Gt(e,t,n)}function fv(e){const t=ja(e,"selectedItem"),n=ja(e,"isOpen"),r=ja(e,"highlightedIndex"),i=ja(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:i}}function Jr(e,t,n,r){const{items:i,initialHighlightedIndex:a,defaultHighlightedIndex:s}=e,{selectedItem:u,highlightedIndex:l}=t;return i.length===0?-1:a!==void 0&&l===a?a:s!==void 0?s:u?n===0?i.indexOf(u):Xn(n,i.indexOf(u),i.length,r,!1):n===0?-1:n<0?i.length-1:0}function hv(e,t,n,r){const i=M.useRef({isMouseDown:!1,isTouchMove:!1});return M.useEffect(()=>{const a=()=>{i.current.isMouseDown=!0},s=h=>{i.current.isMouseDown=!1,e&&!xs(h.target,t.map(f=>f.current),n)&&r()},u=()=>{i.current.isTouchMove=!1},l=()=>{i.current.isTouchMove=!0},c=h=>{e&&!i.current.isTouchMove&&!xs(h.target,t.map(f=>f.current),n,!1)&&r()};return n.addEventListener("mousedown",a),n.addEventListener("mouseup",s),n.addEventListener("touchstart",u),n.addEventListener("touchmove",l),n.addEventListener("touchend",c),function(){n.removeEventListener("mousedown",a),n.removeEventListener("mouseup",s),n.removeEventListener("touchstart",u),n.removeEventListener("touchmove",l),n.removeEventListener("touchend",c)}},[e,n]),i}let Zl=()=>tn;Ae.NODE_ENV!=="production"&&(Zl=function(){const e=M.useRef(!0);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=M.useRef(n.reduce((s,u)=>(s[u]={},s),{}));return M.useEffect(()=>{Object.keys(i.current).forEach(s=>{const u=i.current[s];if(e.current&&!Object.keys(u).length){console.error(`downshift: You forgot to call the ${s} getter function on your component / element.`);return}const{suppressRefError:l,refKey:c,elementRef:h}=u;(!h||!h.current)&&!l&&console.error(`downshift: The ref prop "${c}" from ${s} was not applied correctly on your element.`)}),e.current=!1}),M.useCallback((s,u,l,c)=>{i.current[s]={suppressRefError:u,refKey:l,elementRef:c}},[])});function ys(e,t,n){let{isInitialMount:r,highlightedIndex:i,items:a,environment:s,...u}=n;M.useEffect(()=>{r||nT(()=>e({highlightedIndex:i,highlightedItem:a[i],resultCount:a.length,...u}),s.document)},t)}function pv(e){let{highlightedIndex:t,isOpen:n,itemRefs:r,getItemNodeFromIndex:i,menuElement:a,scrollIntoView:s}=e;const u=M.useRef(!0);return rT(()=>{t<0||!n||!Object.keys(r.current).length||(u.current===!1?u.current=!0:s(i(t),a))},[t]),u}let ec=tn;Ae.NODE_ENV!=="production"&&(ec=e=>{let{isInitialMount:t,props:n,state:r}=e;const i=M.useRef(n);M.useEffect(()=>{t||(Yl(r,i.current,n),i.current=n)},[r,n,t])});function dv(e,t,n){const{type:r,props:i}=t;let a;switch(r){case n.ItemMouseMove:a={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:a={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Jr(i,e,0)};break;case n.FunctionOpenMenu:a={isOpen:!0,highlightedIndex:Jr(i,e,0)};break;case n.FunctionCloseMenu:a={isOpen:!1};break;case n.FunctionSetHighlightedIndex:a={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:a={inputValue:t.inputValue};break;case n.FunctionReset:a={highlightedIndex:Gt(i,"highlightedIndex"),isOpen:Gt(i,"isOpen"),selectedItem:Gt(i,"selectedItem"),inputValue:Gt(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...a}}function $h(e){for(var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,i=e.itemToString,a=e.getItemNodeFromIndex,s=t.toLowerCase(),u=0;u<r.length;u++){var l=(u+n+1)%r.length,c=r[l];if(c!==void 0&&i(c).toLowerCase().startsWith(s)){var h=a(l);if(!(h!=null&&h.hasAttribute("disabled")))return l}}return n}var sT={items:pe.array.isRequired,itemToString:pe.func,getA11yStatusMessage:pe.func,getA11ySelectionMessage:pe.func,circularNavigation:pe.bool,highlightedIndex:pe.number,defaultHighlightedIndex:pe.number,initialHighlightedIndex:pe.number,isOpen:pe.bool,defaultIsOpen:pe.bool,initialIsOpen:pe.bool,selectedItem:pe.any,initialSelectedItem:pe.any,defaultSelectedItem:pe.any,id:pe.string,labelId:pe.string,menuId:pe.string,getItemId:pe.func,toggleButtonId:pe.string,stateReducer:pe.func,onSelectedItemChange:pe.func,onHighlightedIndexChange:pe.func,onStateChange:pe.func,onIsOpenChange:pe.func,environment:pe.shape({addEventListener:pe.func,removeEventListener:pe.func,document:pe.shape({getElementById:pe.func,activeElement:pe.any,body:pe.any})})};function oT(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}var uT=de(de({},xi),{getA11yStatusMessage:oT}),mv=tn;Ae.NODE_ENV!=="production"&&(mv=function(e,t){pe.checkPropTypes(sT,e,"prop",t.name)});const tc=Ae.NODE_ENV!=="production"?"__menu_keydown_arrow_down__":0,nc=Ae.NODE_ENV!=="production"?"__menu_keydown_arrow_up__":1,rc=Ae.NODE_ENV!=="production"?"__menu_keydown_escape__":2,ic=Ae.NODE_ENV!=="production"?"__menu_keydown_home__":3,ac=Ae.NODE_ENV!=="production"?"__menu_keydown_end__":4,sc=Ae.NODE_ENV!=="production"?"__menu_keydown_enter__":5,oc=Ae.NODE_ENV!=="production"?"__menu_keydown_space_button__":6,uc=Ae.NODE_ENV!=="production"?"__menu_keydown_character__":7,bs=Ae.NODE_ENV!=="production"?"__menu_blur__":8,gv=Ae.NODE_ENV!=="production"?"__menu_mouse_leave__":9,vv=Ae.NODE_ENV!=="production"?"__item_mouse_move__":10,lc=Ae.NODE_ENV!=="production"?"__item_click__":11,xv=Ae.NODE_ENV!=="production"?"__togglebutton_click__":12,cc=Ae.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":13,fc=Ae.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":14,hc=Ae.NODE_ENV!=="production"?"__togglebutton_keydown_character__":15,yv=Ae.NODE_ENV!=="production"?"__function_toggle_menu__":16,bv=Ae.NODE_ENV!=="production"?"__function_open_menu__":17,wv=Ae.NODE_ENV!=="production"?"__function_close_menu__":18,Sv=Ae.NODE_ENV!=="production"?"__function_set_highlighted_index__":19,pc=Ae.NODE_ENV!=="production"?"__function_select_item__":20,tl=Ae.NODE_ENV!=="production"?"__function_set_input_value__":21,Cv=Ae.NODE_ENV!=="production"?"__function_reset__":22;var kv=Object.freeze({__proto__:null,MenuKeyDownArrowDown:tc,MenuKeyDownArrowUp:nc,MenuKeyDownEscape:rc,MenuKeyDownHome:ic,MenuKeyDownEnd:ac,MenuKeyDownEnter:sc,MenuKeyDownSpaceButton:oc,MenuKeyDownCharacter:uc,MenuBlur:bs,MenuMouseLeave:gv,ItemMouseMove:vv,ItemClick:lc,ToggleButtonClick:xv,ToggleButtonKeyDownArrowDown:cc,ToggleButtonKeyDownArrowUp:fc,ToggleButtonKeyDownCharacter:hc,FunctionToggleMenu:yv,FunctionOpenMenu:bv,FunctionCloseMenu:wv,FunctionSetHighlightedIndex:Sv,FunctionSelectItem:pc,FunctionSetInputValue:tl,FunctionReset:Cv});function lT(e,t){const{type:n,props:r,shiftKey:i}=t;let a;switch(n){case lc:a={isOpen:Gt(r,"isOpen"),highlightedIndex:Gt(r,"highlightedIndex"),selectedItem:r.items[t.index]};break;case hc:{const s=t.key,u=`${e.inputValue}${s}`,l=$h({keysSoFar:u,highlightedIndex:e.selectedItem?r.items.indexOf(e.selectedItem):-1,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});a={inputValue:u,...l>=0&&{selectedItem:r.items[l]}}}break;case cc:a={highlightedIndex:Jr(r,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case fc:a={highlightedIndex:Jr(r,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case sc:case oc:a={isOpen:Gt(r,"isOpen"),highlightedIndex:Gt(r,"highlightedIndex"),...e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex]}};break;case ic:a={highlightedIndex:Fn(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case ac:a={highlightedIndex:Fn(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case rc:a={isOpen:!1,highlightedIndex:-1};break;case bs:a={isOpen:!1,highlightedIndex:-1};break;case uc:{const s=t.key,u=`${e.inputValue}${s}`,l=$h({keysSoFar:u,highlightedIndex:e.highlightedIndex,items:r.items,itemToString:r.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});a={inputValue:u,...l>=0&&{highlightedIndex:l}}}break;case tc:a={highlightedIndex:Xn(i?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case nc:a={highlightedIndex:Xn(i?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)};break;case pc:a={selectedItem:t.selectedItem};break;default:return dv(e,t,kv)}return{...e,...a}}dc.stateChangeTypes=kv;function dc(e){e===void 0&&(e={}),mv(e,dc);const t={...uT,...e},{items:n,scrollIntoView:r,environment:i,initialIsOpen:a,defaultIsOpen:s,itemToString:u,getA11ySelectionMessage:l,getA11yStatusMessage:c}=t,h=fv(t),[f,d]=aT(lT,h,t),{isOpen:m,highlightedIndex:v,selectedItem:x,inputValue:S}=f,y=M.useRef(null),k=M.useRef(null),_=M.useRef({}),P=M.useRef(!0),w=M.useRef(null),g=uv(t),E=M.useRef(),D=M.useRef(!0),F=Ql({state:f,props:t}),R=M.useCallback(X=>_.current[g.getItemId(X)],[g]);ys(c,[m,v,S,n],{isInitialMount:D.current,previousResultCount:E.current,items:n,environment:i,itemToString:u,...f}),ys(l,[x],{isInitialMount:D.current,previousResultCount:E.current,items:n,environment:i,itemToString:u,...f});const B=pv({menuElement:k.current,highlightedIndex:v,isOpen:m,itemRefs:_,scrollIntoView:r,getItemNodeFromIndex:R});M.useEffect(()=>(w.current=Qs(X=>{X({type:tl,inputValue:""})},500),()=>{w.current.cancel()}),[]),M.useEffect(()=>{S&&w.current(d)},[d,S]),ec({isInitialMount:D.current,props:t,state:f}),M.useEffect(()=>{if(D.current){(a||s||m)&&k.current&&k.current.focus();return}if(m){k.current&&k.current.focus();return}i.document.activeElement===k.current&&y.current&&(P.current=!1,y.current.focus())},[m]),M.useEffect(()=>{D.current||(E.current=n.length)});const G=hv(m,[k,y],i,()=>{d({type:bs})}),U=Zl("getMenuProps","getToggleButtonProps");M.useEffect(()=>{D.current=!1},[]),M.useEffect(()=>{m||(_.current={})},[m]);const re=M.useMemo(()=>({ArrowDown(X){X.preventDefault(),d({type:cc,getItemNodeFromIndex:R,shiftKey:X.shiftKey})},ArrowUp(X){X.preventDefault(),d({type:fc,getItemNodeFromIndex:R,shiftKey:X.shiftKey})}}),[d,R]),ee=M.useMemo(()=>({ArrowDown(X){X.preventDefault(),d({type:tc,getItemNodeFromIndex:R,shiftKey:X.shiftKey})},ArrowUp(X){X.preventDefault(),d({type:nc,getItemNodeFromIndex:R,shiftKey:X.shiftKey})},Home(X){X.preventDefault(),d({type:ic,getItemNodeFromIndex:R})},End(X){X.preventDefault(),d({type:ac,getItemNodeFromIndex:R})},Escape(){d({type:rc})},Enter(X){X.preventDefault(),d({type:sc})}," "(X){X.preventDefault(),d({type:oc})}}),[d,R]),se=M.useCallback(()=>{d({type:yv})},[d]),he=M.useCallback(()=>{d({type:wv})},[d]),ge=M.useCallback(()=>{d({type:bv})},[d]),be=M.useCallback(X=>{d({type:Sv,highlightedIndex:X})},[d]),L=M.useCallback(X=>{d({type:pc,selectedItem:X})},[d]),J=M.useCallback(()=>{d({type:Cv})},[d]),ue=M.useCallback(X=>{d({type:tl,inputValue:X})},[d]),A=M.useCallback(X=>({id:g.labelId,htmlFor:g.toggleButtonId,...X}),[g]),ye=M.useCallback(function(X,H){let{onMouseLeave:te,refKey:me="ref",onKeyDown:oe,onBlur:K,ref:Z,...Q}=X===void 0?{}:X,{suppressRefError:W=!1}=H===void 0?{}:H;const ae=F.current.state,ve=Ie=>{const Me=Ri(Ie);Me&&ee[Me]?ee[Me](Ie):zh(Me)&&d({type:uc,key:Me,getItemNodeFromIndex:R})},Ee=()=>{if(P.current===!1){P.current=!0;return}!G.current.isMouseDown&&d({type:bs})},_e=()=>{d({type:gv})};return U("getMenuProps",W,me,k),{[me]:kn(Z,Ie=>{k.current=Ie}),id:g.menuId,role:"listbox","aria-labelledby":g.labelId,tabIndex:-1,...ae.isOpen&&ae.highlightedIndex>-1&&{"aria-activedescendant":g.getItemId(ae.highlightedIndex)},onMouseLeave:dt(te,_e),onKeyDown:dt(oe,ve),onBlur:dt(K,Ee),...Q}},[d,F,ee,G,U,g,R]),ie=M.useCallback(function(X,H){let{onClick:te,onKeyDown:me,refKey:oe="ref",ref:K,...Z}=X===void 0?{}:X,{suppressRefError:Q=!1}=H===void 0?{}:H;const W=()=>{d({type:xv})},ae=Ee=>{const _e=Ri(Ee);_e&&re[_e]?re[_e](Ee):zh(_e)&&d({type:hc,key:_e,getItemNodeFromIndex:R})},ve={[oe]:kn(K,Ee=>{y.current=Ee}),id:g.toggleButtonId,"aria-haspopup":"listbox","aria-expanded":F.current.state.isOpen,"aria-labelledby":`${g.labelId} ${g.toggleButtonId}`,...Z};return Z.disabled||(ve.onClick=dt(te,W),ve.onKeyDown=dt(me,ae)),U("getToggleButtonProps",Q,oe,y),ve},[d,F,re,U,g,R]),fe=M.useCallback(function(X){let{item:H,index:te,onMouseMove:me,onClick:oe,refKey:K="ref",ref:Z,disabled:Q,...W}=X===void 0?{}:X;const{state:ae,props:ve}=F.current,Ee=()=>{te!==ae.highlightedIndex&&(B.current=!1,d({type:vv,index:te,disabled:Q}))},_e=()=>{d({type:lc,index:te})},Ie=lv(te,H,ve.items);if(Ie<0)throw new Error("Pass either item or item index in getItemProps!");const Me={disabled:Q,role:"option","aria-selected":`${Ie===ae.highlightedIndex}`,id:g.getItemId(Ie),[K]:kn(Z,ke=>{ke&&(_.current[g.getItemId(Ie)]=ke)}),...W};return Q||(Me.onClick=dt(oe,_e)),Me.onMouseMove=dt(me,Ee),Me},[d,F,B,g]);return{getToggleButtonProps:ie,getLabelProps:A,getMenuProps:ye,getItemProps:fe,toggleMenu:se,openMenu:ge,closeMenu:he,setHighlightedIndex:be,selectItem:L,reset:J,setInputValue:ue,highlightedIndex:v,isOpen:m,selectedItem:x,inputValue:S}}const mc=Ae.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,gc=Ae.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,vc=Ae.NODE_ENV!=="production"?"__input_keydown_escape__":2,xc=Ae.NODE_ENV!=="production"?"__input_keydown_home__":3,yc=Ae.NODE_ENV!=="production"?"__input_keydown_end__":4,bc=Ae.NODE_ENV!=="production"?"__input_keydown_enter__":5,wc=Ae.NODE_ENV!=="production"?"__input_change__":6,ws=Ae.NODE_ENV!=="production"?"__input_blur__":7,Ev=Ae.NODE_ENV!=="production"?"__menu_mouse_leave__":8,_v=Ae.NODE_ENV!=="production"?"__item_mouse_move__":9,Sc=Ae.NODE_ENV!=="production"?"__item_click__":10,Iv=Ae.NODE_ENV!=="production"?"__togglebutton_click__":11,Tv=Ae.NODE_ENV!=="production"?"__function_toggle_menu__":12,Av=Ae.NODE_ENV!=="production"?"__function_open_menu__":13,Pv=Ae.NODE_ENV!=="production"?"__function_close_menu__":14,Rv=Ae.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,Cc=Ae.NODE_ENV!=="production"?"__function_select_item__":16,Nv=Ae.NODE_ENV!=="production"?"__function_set_input_value__":17,Ov=Ae.NODE_ENV!=="production"?"__function_reset__":18,kc=Ae.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var Lv=Object.freeze({__proto__:null,InputKeyDownArrowDown:mc,InputKeyDownArrowUp:gc,InputKeyDownEscape:vc,InputKeyDownHome:xc,InputKeyDownEnd:yc,InputKeyDownEnter:bc,InputChange:wc,InputBlur:ws,MenuMouseLeave:Ev,ItemMouseMove:_v,ItemClick:Sc,ToggleButtonClick:Iv,FunctionToggleMenu:Tv,FunctionOpenMenu:Av,FunctionCloseMenu:Pv,FunctionSetHighlightedIndex:Rv,FunctionSelectItem:Cc,FunctionSetInputValue:Nv,FunctionReset:Ov,ControlledPropUpdatedSelectedItem:kc});function cT(e){const t=fv(e),{selectedItem:n}=t;let{inputValue:r}=t;return r===""&&n&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(r=e.itemToString(n)),{...t,inputValue:r}}const fT={items:pe.array.isRequired,itemToString:pe.func,getA11yStatusMessage:pe.func,getA11ySelectionMessage:pe.func,circularNavigation:pe.bool,highlightedIndex:pe.number,defaultHighlightedIndex:pe.number,initialHighlightedIndex:pe.number,isOpen:pe.bool,defaultIsOpen:pe.bool,initialIsOpen:pe.bool,selectedItem:pe.any,initialSelectedItem:pe.any,defaultSelectedItem:pe.any,inputValue:pe.string,defaultInputValue:pe.string,initialInputValue:pe.string,id:pe.string,labelId:pe.string,menuId:pe.string,getItemId:pe.func,inputId:pe.string,toggleButtonId:pe.string,stateReducer:pe.func,onSelectedItemChange:pe.func,onHighlightedIndexChange:pe.func,onStateChange:pe.func,onIsOpenChange:pe.func,onInputValueChange:pe.func,environment:pe.shape({addEventListener:pe.func,removeEventListener:pe.func,document:pe.shape({getElementById:pe.func,activeElement:pe.any,body:pe.any})})};function hT(e,t,n){const r=M.useRef(),[i,a]=cv(e,t,n);return M.useEffect(()=>{vs(n,"selectedItem")&&(r.current!==n.selectedItem&&a({type:kc,inputValue:n.itemToString(n.selectedItem)}),r.current=i.selectedItem===r.current?n.selectedItem:i.selectedItem)}),[Pi(i,n),a]}let Dv=tn;Ae.NODE_ENV!=="production"&&(Dv=(e,t)=>{pe.checkPropTypes(fT,e,"prop",t.name)});const pT={...xi,getA11yStatusMessage:$g,circularNavigation:!0};function dT(e,t){const{type:n,props:r,shiftKey:i}=t;let a;switch(n){case Sc:a={isOpen:Gt(r,"isOpen"),highlightedIndex:Gt(r,"highlightedIndex"),selectedItem:r.items[t.index],inputValue:r.itemToString(r.items[t.index])};break;case mc:e.isOpen?a={highlightedIndex:Xn(i?5:1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)}:a={highlightedIndex:Jr(r,e,1,t.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case gc:e.isOpen?a={highlightedIndex:Xn(i?-5:-1,e.highlightedIndex,r.items.length,t.getItemNodeFromIndex,r.circularNavigation)}:a={highlightedIndex:Jr(r,e,-1,t.getItemNodeFromIndex),isOpen:r.items.length>=0};break;case bc:a={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:r.items[e.highlightedIndex],isOpen:Gt(r,"isOpen"),highlightedIndex:Gt(r,"highlightedIndex"),inputValue:r.itemToString(r.items[e.highlightedIndex])}};break;case vc:a={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case xc:a={highlightedIndex:Fn(1,0,r.items.length,t.getItemNodeFromIndex,!1)};break;case yc:a={highlightedIndex:Fn(-1,r.items.length-1,r.items.length,t.getItemNodeFromIndex,!1)};break;case ws:a={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:r.items[e.highlightedIndex],inputValue:r.itemToString(r.items[e.highlightedIndex])}};break;case wc:a={isOpen:!0,highlightedIndex:Gt(r,"highlightedIndex"),inputValue:t.inputValue};break;case Cc:a={selectedItem:t.selectedItem,inputValue:r.itemToString(t.selectedItem)};break;case kc:a={inputValue:t.inputValue};break;default:return dv(e,t,Lv)}return{...e,...a}}Ec.stateChangeTypes=Lv;function Ec(e){e===void 0&&(e={}),Dv(e,Ec);const t={...pT,...e},{initialIsOpen:n,defaultIsOpen:r,items:i,scrollIntoView:a,environment:s,getA11yStatusMessage:u,getA11ySelectionMessage:l,itemToString:c}=t,h=cT(t),[f,d]=hT(dT,h,t),{isOpen:m,highlightedIndex:v,selectedItem:x,inputValue:S}=f,y=M.useRef(null),k=M.useRef({}),_=M.useRef(null),P=M.useRef(null),w=M.useRef(null),g=M.useRef(!0),E=uv(t),D=M.useRef(),F=Ql({state:f,props:t}),R=M.useCallback(H=>k.current[E.getItemId(H)],[E]);ys(u,[m,v,S,i],{isInitialMount:g.current,previousResultCount:D.current,items:i,environment:s,itemToString:c,...f}),ys(l,[x],{isInitialMount:g.current,previousResultCount:D.current,items:i,environment:s,itemToString:c,...f});const B=pv({menuElement:y.current,highlightedIndex:v,isOpen:m,itemRefs:k,scrollIntoView:a,getItemNodeFromIndex:R});ec({isInitialMount:g.current,props:t,state:f}),M.useEffect(()=>{(n||r||m)&&_.current&&_.current.focus()},[]),M.useEffect(()=>{g.current||(D.current=i.length)});const G=hv(m,[w,y,P],s,()=>{d({type:ws,selectItem:!1})}),U=Zl("getInputProps","getComboboxProps","getMenuProps");M.useEffect(()=>{g.current=!1},[]),M.useEffect(()=>{m||(k.current={})},[m]);const re=M.useMemo(()=>({ArrowDown(H){H.preventDefault(),d({type:mc,shiftKey:H.shiftKey,getItemNodeFromIndex:R})},ArrowUp(H){H.preventDefault(),d({type:gc,shiftKey:H.shiftKey,getItemNodeFromIndex:R})},Home(H){F.current.state.isOpen&&(H.preventDefault(),d({type:xc,getItemNodeFromIndex:R}))},End(H){F.current.state.isOpen&&(H.preventDefault(),d({type:yc,getItemNodeFromIndex:R}))},Escape(H){const te=F.current.state;(te.isOpen||te.inputValue||te.selectedItem||te.highlightedIndex>-1)&&(H.preventDefault(),d({type:vc}))},Enter(H){const te=F.current.state;!te.isOpen||te.highlightedIndex<0||H.which===229||(H.preventDefault(),d({type:bc,getItemNodeFromIndex:R}))}}),[d,F,R]),ee=M.useCallback(H=>({id:E.labelId,htmlFor:E.inputId,...H}),[E]),se=M.useCallback(function(H,te){let{onMouseLeave:me,refKey:oe="ref",ref:K,...Z}=H===void 0?{}:H,{suppressRefError:Q=!1}=te===void 0?{}:te;return U("getMenuProps",Q,oe,y),{[oe]:kn(K,W=>{y.current=W}),id:E.menuId,role:"listbox","aria-labelledby":E.labelId,onMouseLeave:dt(me,()=>{d({type:Ev})}),...Z}},[d,U,E]),he=M.useCallback(function(H){let{item:te,index:me,refKey:oe="ref",ref:K,onMouseMove:Z,onMouseDown:Q,onClick:W,onPress:ae,disabled:ve,...Ee}=H===void 0?{}:H;const{props:_e,state:Ie}=F.current,Me=lv(me,te,_e.items);if(Me<0)throw new Error("Pass either item or item index in getItemProps!");const ke="onClick",Ne=W,Fe=()=>{me!==Ie.highlightedIndex&&(B.current=!1,d({type:_v,index:me,disabled:ve}))},yt=()=>{d({type:Sc,index:me})},le=ce=>ce.preventDefault();return{[oe]:kn(K,ce=>{ce&&(k.current[E.getItemId(Me)]=ce)}),disabled:ve,role:"option","aria-selected":`${Me===Ie.highlightedIndex}`,id:E.getItemId(Me),...!ve&&{[ke]:dt(Ne,yt)},onMouseMove:dt(Z,Fe),onMouseDown:dt(Q,le),...Ee}},[d,F,B,E]),ge=M.useCallback(function(H){let{onClick:te,onPress:me,refKey:oe="ref",ref:K,...Z}=H===void 0?{}:H;const Q=()=>{d({type:Iv}),!F.current.state.isOpen&&_.current&&_.current.focus()};return{[oe]:kn(K,W=>{P.current=W}),id:E.toggleButtonId,tabIndex:-1,...!Z.disabled&&{onClick:dt(te,Q)},...Z}},[d,F,E]),be=M.useCallback(function(H,te){let{onKeyDown:me,onChange:oe,onInput:K,onBlur:Z,onChangeText:Q,refKey:W="ref",ref:ae,...ve}=H===void 0?{}:H,{suppressRefError:Ee=!1}=te===void 0?{}:te;U("getInputProps",Ee,W,_);const _e=F.current.state,Ie=yt=>{const le=Ri(yt);le&&re[le]&&re[le](yt)},Me=yt=>{d({type:wc,inputValue:yt.target.value})},ke=()=>{_e.isOpen&&!G.current.isMouseDown&&d({type:ws,selectItem:!0})},Ne="onChange";let Fe={};return ve.disabled||(Fe={[Ne]:dt(oe,K,Me),onKeyDown:dt(me,Ie),onBlur:dt(Z,ke)}),{[W]:kn(ae,yt=>{_.current=yt}),id:E.inputId,"aria-autocomplete":"list","aria-controls":E.menuId,..._e.isOpen&&_e.highlightedIndex>-1&&{"aria-activedescendant":E.getItemId(_e.highlightedIndex)},"aria-labelledby":E.labelId,autoComplete:"off",value:_e.inputValue,...Fe,...ve}},[d,re,F,G,U,E]),L=M.useCallback(function(H,te){let{refKey:me="ref",ref:oe,...K}=H===void 0?{}:H,{suppressRefError:Z=!1}=te===void 0?{}:te;return U("getComboboxProps",Z,me,w),{[me]:kn(oe,Q=>{w.current=Q}),role:"combobox","aria-haspopup":"listbox","aria-owns":E.menuId,"aria-expanded":F.current.state.isOpen,...K}},[F,U,E]),J=M.useCallback(()=>{d({type:Tv})},[d]),ue=M.useCallback(()=>{d({type:Pv})},[d]),A=M.useCallback(()=>{d({type:Av})},[d]),ye=M.useCallback(H=>{d({type:Rv,highlightedIndex:H})},[d]),ie=M.useCallback(H=>{d({type:Cc,selectedItem:H})},[d]),fe=M.useCallback(H=>{d({type:Nv,inputValue:H})},[d]),X=M.useCallback(()=>{d({type:Ov})},[d]);return{getItemProps:he,getLabelProps:ee,getMenuProps:se,getInputProps:be,getComboboxProps:L,getToggleButtonProps:ge,toggleMenu:J,openMenu:A,closeMenu:ue,setHighlightedIndex:ye,setInputValue:fe,selectItem:ie,reset:X,highlightedIndex:v,isOpen:m,selectedItem:x,inputValue:S}}pe.array,pe.array,pe.array,pe.func,pe.func,pe.func,pe.number,pe.number,pe.number,pe.func,pe.func,pe.string,pe.string,pe.shape({addEventListener:pe.func,removeEventListener:pe.func,document:pe.shape({getElementById:pe.func,activeElement:pe.any,body:pe.any})});xi.itemToString,xi.stateReducer,xi.environment;const Uh=[{label:"json",value:"json"},{label:"csv",value:"csv"}],mT=({onSelect:e})=>{const{isOpen:t,selectedItem:n,getToggleButtonProps:r,getMenuProps:i,getItemProps:a}=dc({items:Uh,onSelectedItemChange:({selectedItem:s})=>{e(s==null?void 0:s.value)},itemToString:s=>s?s.value:""});return T.jsxs("div",{className:"w-full",children:[T.jsxs("div",{"data-cy":"localization-export-file-type-select",className:ft("w-full p-2 flex items-center justify-between cursor-pointer space-x-1 bg-grey-300 text-grey-50 h-6",{"border-l border-r border-t border-primary-dark rounded-t":t,rounded:!t}),...r(),children:[T.jsx("span",{className:"text-grey-50 text-xs",children:n?n.label:"Select a file format"}),T.jsx(st.FdDown,{className:"w-4 h-4"})]}),T.jsx("ul",{className:ft("h-full rounded-b py-[6px]",{hidden:!t,"border-[1px] border-primary-dark":t}),...i(),children:t&&Uh.map((s,u)=>T.jsx("li",{className:ft("h-5 p-1 bg-grey-900 text-xs hover:bg-primary-hover cursor-pointer"),...a({item:s,index:u}),children:s.label},u))})]})},gT=({selected:e,delimiter:t,onSelect:n,label:r})=>T.jsxs("div",{className:"flex flex-row items-center justify-between space-x-2",children:[T.jsx("div",{className:"flex h-[16px] w-[16px] items-center justify-center rounded-full border",onClick:()=>n(t),children:e===t&&T.jsx("div",{className:"h-2 w-2 rounded-full bg-primary-dark"})}),T.jsxs("div",{className:"text-sm text-grey-50",children:[r,` (${t})`]})]}),vT=({enable:e,onSelect:t})=>{const{state:n,actions:r}=Se.useStateObject({delimiters:[{label:"Comma",value:","},{label:"Semicolon",value:";"}],selected:","});return M.useEffect(()=>{t(n.selected)},[n.selected]),e?T.jsxs("div",{className:"flex flex-row items-center justify-between",children:[T.jsx("span",{className:"text-sm text-grey-50",children:" Select a Delimiter "}),T.jsx("div",{className:"flex flex-row space-x-2",children:n.delimiters.map(({label:i,value:a},s)=>T.jsx(gT,{onSelect:u=>r.setSelected(u),selected:n.selected,delimiter:a,label:i},s))})]}):T.jsx(T.Fragment,{})},xT={SELECT_FILE_TYPE:"Please Select a File Format !"},yT=({toExport:e})=>{var re;const[t,n]=M.useState(),r=nr(),i=r.getWebformTabs(),a=M.useRef(null),s=M.useRef([]),u=M.useRef([]),{i18n:l}=rr(),c=((re=r.getUserComponents)==null?void 0:re.call(r))??{},h=r.buildResolver??{},[f]=M.useState(!0),{state:{isOpen:d,fileType:m,error:v,csvDelimier:x},actions:S}=Se.useStateObject({error:"",isOpen:!1,fileType:"",supprtedExtension:[".json",".csv"],csvDelimier:","}),y=e.length===0;M.useEffect(()=>{Se.tasksManagerSubject.subscribe({next:ee=>{if(ee.type==="i18n"&&ee.action==="cancel"){const{id:se}=ee;u.current.push(se)}}}),n({...h,...c})},[]);const k=()=>{S.setFileType(""),S.setError(""),S.setIsOpen(!1)},_=()=>{k()},P=()=>_(),w=()=>{const ee={};t&&(Object.entries(t).forEach(([se,he])=>{const{info:{settings:ge}}=he;if(ge)if(se==="Text")ee.Text=[{keyPropName:"doc",keyDefaultName:"text"}];else{const be=g(ge,"");ee[se]=be}}),a.current=ee)},g=(ee,se)=>{let he=[];if(Array.isArray(ee))ee.forEach(ge=>he=he.concat(g(ge,se)));else if(xe.isObject(ee)){const{key:ge,type:be}=ee;if(be===Se.ESetting.GROUP){const{components:L}=ee;L==null||L.forEach(J=>he=he.concat(g(J,se)))}else be===Se.ESetting.I18NFIELD?he.push({keyPropName:se||ge,keyDefaultName:ge}):Object.entries(ee).forEach(([,L])=>{xe.isObject(L)&&(he=he.concat(g(L,se||ge)))})}return he},E=(ee,se)=>{const{content:he}=ee,{components:ge}=he,be={};if(!ge)return ee;const L=(ue,A,ye,ie)=>{const fe=[];if(xe.has(ue,ye)){const te=xe.get(ue,ye);fe.push(...Xu(te,ye,ie))}const H=[];return fe.forEach(te=>{const me=xe.get(ue,te),oe={__dataPath:te,__default:me};e.forEach(K=>{const Z=`i18n:${K}`,Q=Object.keys(A),W=Q.find(ve=>ve.startsWith(Z)),ae=Q.reduce((ve,Ee)=>(Ee!==Z&&Ee.endsWith(Z)&&ve.push(Ee),ve),[]);if(W){const ve=xe.get(A,`${W}.${te}`);xe.set(oe,K,ve)}if(ae.length&&ae.forEach(ve=>{const Ee=xe.get(A,`${ve}.${te}`);let _e=ve;_e=ve.replace("states:",""),_e=_e.replace("i18n:",""),Ee&&xe.set(oe,_e,Ee)}),!W){const ve=xe.get(ue,`${te}`);xe.set(oe,K,ve)}}),H.push(oe)}),H},J=(ue,A,ye)=>{const ie=[],fe=xe.get(ue,ye);return fe?(ie.push({key:"__default",props:fe}),e.forEach(H=>{const te=`i18n:${H}`,me=Object.keys(A),oe=me.find(Z=>Z.startsWith(te)),K=me.reduce((Z,Q)=>(Q!==te&&Q.endsWith(te)&&Z.push(Q),Z),[]);if(oe){const Z=xe.get(A,`${oe}.${ye}`);Z&&ie.push({key:H,props:Z})}K.length&&K.forEach(Z=>{const Q=xe.get(A,`${Z}.${ye}`);ie.push({key:Z,props:Q||""})}),!oe&&!K.length&&ie.push({key:H,props:fe})}),ie.reduce((H,te)=>{const{key:me,props:oe}=te,K=FE(oe);return{...H,[me]:K}},{__dataPath:ye})):ue};return Object.entries(ge).forEach(([ue,A])=>{const{props:ye,custom:ie={},type:fe}=A,X=fe.resolvedName,H=se[X];if(!H||H.length===0)return;const te=H.map(({keyPropName:me,keyDefaultName:oe})=>X==="Text"?J(ye,ie,me):L(ye,ie,me,oe));xe.set(be,ue,{resolverName:X,props:[...te.flat()]})}),be},D=async(ee,se)=>{const he={},ge=be=>{const L=be+1===ee.length?ee.length:be,J=Math.ceil(L/ee.length*100);Se.tasksManagerSubject.next({id:se,action:"update",type:"i18n",payload:{progress:J,status:J>=100?"finished":"ongoing"}})};for(let be=0;be<ee.length;be++){const L=ee[be],J=i.find(ye=>ye.name===L.name&&ye.type==="webform");if(!a.current){ge(be);continue}const ue=J||await Se.getNodeInfo({verb:Se.DesignerRequestVerb.GET_INFO,content:!0,path:`WebForms/${L.name}.${L.ext}`,as:"json"}),A=E(ue,a.current);if(xe.isEmpty(A)||xe.set(he,L.name,A),u.current.find(ye=>ye===se))return{};ge(be)}return he},F=(ee,se,he)=>{const ge="data:text/json;charset=utf-8,"+encodeURIComponent(ee),be=document.createElement("a");be.setAttribute("href",ge),be.setAttribute("download",se+`.${he}`),document.body.appendChild(be),be.click(),be.remove()},R=ee=>{switch(m){case"csv":{const se=["keys","resolverName","__t"].concat(e.concat(["i18nkey_default"]));return VE(ee,se,x)}case"json":return JSON.stringify(ee,null," ");default:return JSON.stringify(ee,null," ")}},B=(ee,se)=>{Object.entries(se.keys).forEach(([ge,be])=>{Object.keys(be).forEach(L=>{s.current.push(`i18n.${ge}.${L}`)})});const he={};return Object.entries(se.keys).forEach(([ge,be])=>{he[ge]={default:be.default},e.forEach(L=>{he[ge][L]=Object.hasOwn(be,L)?be[L]:f?be.default:void 0})}),{webforms:{...ee},i18n:he}},G=ee=>S.setCsvDelimier(ee),U=async()=>{const ee=Il.generate().toString();try{Se.tasksManagerSubject.next({id:ee,action:"add",type:"i18n",payload:{progress:0,name:"Export i18n",status:"ongoing",date:new Date().toISOString(),time:DE()}}),w();const se=await rg(),he=await D(se,ee),ge=B(he,l),be=R(ge);xe.isEmpty(be)||F(be,"export-i18n",m),k()}catch(se){Se.tasksManagerSubject.next({id:ee,type:"i18n",action:"update",payload:{status:"canceled"}}),Se.tasksManagerSubject.next({id:ee,type:"i18n",action:"error",payload:{errorMessage:se.message||"Export file error"}})}k()};return T.jsxs(T.Fragment,{children:[T.jsx(Se.Tooltip,{label:"Export",container:St(),children:T.jsx("button",{disabled:y,className:ft("flex h-full flex-row items-center p-1 rounded disabled:opacity-50",{"cursor-not-allowed":y},{"hover:bg-primary-hover":!y}),onClick:()=>{S.setIsOpen(!0)},children:T.jsx(st.FdUpload,{className:"h-4 w-4"})})}),T.jsxs(Mg,{isOpen:d,onClose:_,title:"Export","data-cy":"localization-export-dialog",children:[T.jsx("div",{className:"mt-4",children:T.jsx(mT,{onSelect:ee=>S.setFileType(ee)})}),T.jsx(vT,{enable:m==="csv",onSelect:G}),T.jsxs("div",{className:"mt-3 flex items-center justify-between gap-4",children:[T.jsxs("div",{className:"flex flex-row space-x-1 justify-center items-center text-purple-600 hover:underline cursor-pointer",onClick:()=>{window.open("https://developer.4d.com/qodly/4DQodlyPro/localization#exporting-and-importing-translations","_blank")},children:[T.jsx("p",{className:"text-xs",children:"How to Export an i18n File"}),T.jsx(st.FdOutload,{className:"ml-1 h-4 w-4 text-grey-50"})]}),T.jsxs("div",{className:"flex items-center space-x-2",children:[T.jsx("button",{onClick:P,className:"rounded border w-16 border-white px-2 py-1 text-xs font-medium text-grey-50 hover:bg-white hover:border-white hover:font-bold hover:text-primary-dark",children:"Cancel"}),T.jsx("button",{onClick:()=>{m?(S.setIsOpen(!1),U()):S.setError(xT.SELECT_FILE_TYPE)},className:"rounded w-16 px-2 py-1 text-xs font-medium text-grey-50 bg-primary-dark hover:border-white hover:border hover:bg-primary-hover hover:text-white hover:font-bold",children:"Export"})]})]}),v&&T.jsx("div",{className:"flex items-center justify-center p-2",children:T.jsx("span",{className:"text-sm text-red-500",children:v})})]})]})},bT={DROP_EVENT_ERROR:"Not Suported File type! Only .json and .csv are Supported."},wT=["default"],ST={MISSING_WEBFORMS_OR_I18N:"The file must contain 'webforms' or 'i18n' (or both). The file is empty or missing these keys."},Vv=["__dataPath","__default","default","__t","i18nkey_default"],CT=["i18n:","state:"],Ss=e=>Vv.includes(e)||CT.some(t=>e.startsWith(t)),kT=e=>{const t=new Set;return e.webforms&&Object.values(e.webforms).forEach(n=>{Object.values(n).forEach(r=>{(r.props||[]).forEach(i=>{Object.keys(i).forEach(a=>{Ss(a)||t.add(a)})})})}),e.i18n&&Object.values(e.i18n).forEach(n=>{Object.keys(n||{}).forEach(r=>{Ss(r)||t.add(r)})}),Array.from(t).sort()},Hh=e=>{if(Vv.includes(e))return null;if(e.startsWith("state:")){const t=e.lastIndexOf("i18n:");return t!==-1&&e.slice(t+5)||null}return e},ET=(e,t)=>{const n=new Set(t),r={};return e.webforms&&(r.webforms={},Object.entries(e.webforms).forEach(([i,a])=>{if(!a||typeof a!="object")return;const s={};Object.entries(a).forEach(([u,l])=>{if(!l||typeof l!="object")return;const c={resolverName:l.resolverName};l.resolverName==="Text"?(l.props&&(c.props=l.props),l.custom&&(c.custom={},Object.entries(l.custom).forEach(([f,d])=>{const m=f.startsWith("state:")||f.startsWith("states:")?Hh(f):f.startsWith("i18n:")?f.slice(5):f;m&&n.has(m)&&(c.custom[f]=d)}))):Object.entries(l).forEach(([f,d])=>{if(f!=="resolverName")if(d&&xe.isObject(d)&&!Array.isArray(d)){const m={};Object.entries(d).forEach(([v,x])=>{const S=Hh(v);(S===null||n.has(S))&&(m[v]=x)}),Object.keys(m).length>0&&(c[f]=m)}else c[f]=d}),s[u]=c}),r.webforms[i]=s})),e.i18n&&(r.i18n={},Object.entries(e.i18n).forEach(([i,a])=>{if(!a||typeof a!="object")return;const s={};Object.entries(a).forEach(([u,l])=>{(u==="default"||!Ss(u)&&n.has(u))&&(s[u]=l)}),Object.keys(s).length>0&&(r.i18n[i]=s)})),r},_T=e=>{const{data:t}=Al.parse(e),n=t[0];if(!n||!Array.isArray(n))return[];const r=n.slice(2).filter(i=>i&&!Ss(i.trim()));return[...new Set(r)].sort()},Lr={EMPTY_OR_INVALID:"The CSV file is empty or could not be parsed.",HEADER_REQUIRED:"The first row must be a header with at least columns: 'keys', 'resolverName', and one locale (e.g. __t, fr, en).",KEY_FORMAT:"Each data row's first column (keys) must be non-empty and start with 'webforms.' or 'i18n.'.",ROW_COLUMNS:"Every row must have the same number of columns as the header."},IT=e=>{const t=ig(e),{data:n}=Al.parse(t),r=n;if(!(r!=null&&r.length))return{valid:!1,message:Lr.EMPTY_OR_INVALID};const i=r[0];if(!i||i.length<3)return{valid:!1,message:Lr.HEADER_REQUIRED};const a=(i[0]??"").trim().toLowerCase(),s=(i[1]??"").trim().toLowerCase();if(a!=="keys"||s!=="resolvername")return{valid:!1,message:Lr.HEADER_REQUIRED};const u=i.length;for(let l=1;l<r.length;l++){if(r[l].length<=1)continue;const c=r[l];if(!c||c.length!==u)return{valid:!1,message:Lr.ROW_COLUMNS};const h=(c[0]??"").trim();if(!h)return{valid:!1,message:Lr.KEY_FORMAT};if(!h.startsWith("webforms.")&&!h.startsWith("i18n."))return{valid:!1,message:Lr.KEY_FORMAT}}return{valid:!0}},TT=(e,t)=>{const r=new H0.Validator().validate(e,t);if(r.valid)return{valid:!0};const i=r.errors[0],a=i?`${i.property||"root"} ${i.message}`.trim():"Invalid file format";return{valid:!1,message:xe.isObject(e)&&!xe.has(e,"webforms")&&!xe.has(e,"i18n")&&(a.includes("subschema")||a.includes("any of"))?ST.MISSING_WEBFORMS_OR_I18N:a}},AT="Export i18n",PT="Schema for i18n export format. Must have webforms, i18n, or both.",RT="object",NT=!1,OT={webforms:{type:"object",description:"Webform names to their component localizations",additionalProperties:{$ref:"#/definitions/webformComponents"}},i18n:{type:"object",description:"Shared i18n keys and their localized values",additionalProperties:{$ref:"#/definitions/i18nKeys"}}},LT=[{required:["webforms"]},{required:["i18n"]}],DT={webformComponents:{type:"object",description:"Component ID to component localization entry",additionalProperties:{$ref:"#/definitions/componentEntry"}},componentEntry:{type:"object",required:["resolverName","props"],additionalProperties:!1,properties:{resolverName:{type:"string",description:"Name of the component resolver (e.g. Button)"},props:{type:"array",description:"Localized prop entries",items:{$ref:"#/definitions/propLocalization"}}}},propLocalization:{type:"object",required:["__dataPath","__default"],properties:{__dataPath:{type:"string",description:"Path to the prop (e.g. text)"},__default:{type:"string",description:"Default value for the prop"}},additionalProperties:{type:"string",description:"Locale code to localized string (e.g. fr, en)"}},i18nKeys:{type:"object",required:["default"],properties:{default:{type:"string",description:"Default value"}},additionalProperties:{type:"string",description:"Locale code to localized string (e.g. fr, en)"}}},VT={title:AT,description:PT,type:RT,additionalProperties:NT,properties:OT,anyOf:LT,definitions:DT};var di={exports:{}};di.exports;var Wh;function MT(){return Wh||(Wh=1,(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,a=16,s=9007199254740991,u="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",f="[object Date]",d="[object Error]",m="[object Function]",v="[object GeneratorFunction]",x="[object Map]",S="[object Number]",y="[object Null]",k="[object Object]",_="[object Proxy]",P="[object RegExp]",w="[object Set]",g="[object String]",E="[object Undefined]",D="[object WeakMap]",F="[object ArrayBuffer]",R="[object DataView]",B="[object Float32Array]",G="[object Float64Array]",U="[object Int8Array]",re="[object Int16Array]",ee="[object Int32Array]",se="[object Uint8Array]",he="[object Uint8ClampedArray]",ge="[object Uint16Array]",be="[object Uint32Array]",L=/[\\^$.*+?()[\]{}|]/g,J=/^\[object .+?Constructor\]$/,ue=/^(?:0|[1-9]\d*)$/,A={};A[B]=A[G]=A[U]=A[re]=A[ee]=A[se]=A[he]=A[ge]=A[be]=!0,A[u]=A[l]=A[F]=A[h]=A[R]=A[f]=A[d]=A[m]=A[x]=A[S]=A[k]=A[P]=A[w]=A[g]=A[D]=!1;var ye=typeof ka=="object"&&ka&&ka.Object===Object&&ka,ie=typeof self=="object"&&self&&self.Object===Object&&self,fe=ye||ie||Function("return this")(),X=t&&!t.nodeType&&t,H=X&&!0&&e&&!e.nodeType&&e,te=H&&H.exports===X,me=te&&ye.process,oe=(function(){try{var V=H&&H.require&&H.require("util").types;return V||me&&me.binding&&me.binding("util")}catch{}})(),K=oe&&oe.isTypedArray;function Z(V,z,ne){switch(ne.length){case 0:return V.call(z);case 1:return V.call(z,ne[0]);case 2:return V.call(z,ne[0],ne[1]);case 3:return V.call(z,ne[0],ne[1],ne[2])}return V.apply(z,ne)}function Q(V,z){for(var ne=-1,Pe=Array(V);++ne<V;)Pe[ne]=z(ne);return Pe}function W(V){return function(z){return V(z)}}function ae(V,z){return V==null?void 0:V[z]}function ve(V,z){return function(ne){return V(z(ne))}}var Ee=Array.prototype,_e=Function.prototype,Ie=Object.prototype,Me=fe["__core-js_shared__"],ke=_e.toString,Ne=Ie.hasOwnProperty,Fe=(function(){var V=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return V?"Symbol(src)_1."+V:""})(),yt=Ie.toString,le=ke.call(Object),ce=RegExp("^"+ke.call(Ne).replace(L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=te?fe.Buffer:void 0,Ve=fe.Symbol,Ye=fe.Uint8Array;N&&N.allocUnsafe;var bt=ve(Object.getPrototypeOf,Object),Te=Object.create,Lt=Ie.propertyIsEnumerable,Rn=Ee.splice,Dt=Ve?Ve.toStringTag:void 0,mt=(function(){try{var V=Pt(Object,"defineProperty");return V({},"",{}),V}catch{}})(),an=N?N.isBuffer:void 0,Vt=Math.max,fo=Date.now,lr=Pt(fe,"Map"),Et=Pt(Object,"create"),zt=(function(){function V(){}return function(z){if(!C(z))return{};if(Te)return Te(z);V.prototype=z;var ne=new V;return V.prototype=void 0,ne}})();function Qe(V){var z=-1,ne=V==null?0:V.length;for(this.clear();++z<ne;){var Pe=V[z];this.set(Pe[0],Pe[1])}}function $n(){this.__data__=Et?Et(null):{},this.size=0}function Be(V){var z=this.has(V)&&delete this.__data__[V];return this.size-=z?1:0,z}function Zi(V){var z=this.__data__;if(Et){var ne=z[V];return ne===r?void 0:ne}return Ne.call(z,V)?z[V]:void 0}function ri(V){var z=this.__data__;return Et?z[V]!==void 0:Ne.call(z,V)}function ho(V,z){var ne=this.__data__;return this.size+=this.has(V)?0:1,ne[V]=Et&&z===void 0?r:z,this}Qe.prototype.clear=$n,Qe.prototype.delete=Be,Qe.prototype.get=Zi,Qe.prototype.has=ri,Qe.prototype.set=ho;function $t(V){var z=-1,ne=V==null?0:V.length;for(this.clear();++z<ne;){var Pe=V[z];this.set(Pe[0],Pe[1])}}function wn(){this.__data__=[],this.size=0}function po(V){var z=this.__data__,ne=hr(z,V);if(ne<0)return!1;var Pe=z.length-1;return ne==Pe?z.pop():Rn.call(z,ne,1),--this.size,!0}function cr(V){var z=this.__data__,ne=hr(z,V);return ne<0?void 0:z[ne][1]}function fr(V){return hr(this.__data__,V)>-1}function ea(V,z){var ne=this.__data__,Pe=hr(ne,V);return Pe<0?(++this.size,ne.push([V,z])):ne[Pe][1]=z,this}$t.prototype.clear=wn,$t.prototype.delete=po,$t.prototype.get=cr,$t.prototype.has=fr,$t.prototype.set=ea;function Un(V){var z=-1,ne=V==null?0:V.length;for(this.clear();++z<ne;){var Pe=V[z];this.set(Pe[0],Pe[1])}}function ta(){this.size=0,this.__data__={hash:new Qe,map:new(lr||$t),string:new Qe}}function na(V){var z=Ut(this,V).delete(V);return this.size-=z?1:0,z}function ra(V){return Ut(this,V).get(V)}function ia(V){return Ut(this,V).has(V)}function aa(V,z){var ne=Ut(this,V),Pe=ne.size;return ne.set(V,z),this.size+=ne.size==Pe?0:1,this}Un.prototype.clear=ta,Un.prototype.delete=na,Un.prototype.get=ra,Un.prototype.has=ia,Un.prototype.set=aa;function Hn(V){var z=this.__data__=new $t(V);this.size=z.size}function mo(){this.__data__=new $t,this.size=0}function go(V){var z=this.__data__,ne=z.delete(V);return this.size=z.size,ne}function vo(V){return this.__data__.get(V)}function sa(V){return this.__data__.has(V)}function oa(V,z){var ne=this.__data__;if(ne instanceof $t){var Pe=ne.__data__;if(!lr||Pe.length<n-1)return Pe.push([V,z]),this.size=++ne.size,this;ne=this.__data__=new Un(Pe)}return ne.set(V,z),this.size=ne.size,this}Hn.prototype.clear=mo,Hn.prototype.delete=go,Hn.prototype.get=vo,Hn.prototype.has=sa,Hn.prototype.set=oa;function ua(V,z){var ne=si(V),Pe=!ne&&Pr(V),We=!ne&&!Pe&&o(V),ct=!ne&&!Pe&&!We&&Y(V),gt=ne||Pe||We||ct,et=gt?Q(V.length,String):[],vt=et.length;for(var dn in V)gt&&(dn=="length"||We&&(dn=="offset"||dn=="parent")||ct&&(dn=="buffer"||dn=="byteLength"||dn=="byteOffset")||ga(dn,vt))||et.push(dn);return et}function Tr(V,z,ne){(ne!==void 0&&!mr(V[z],ne)||ne===void 0&&!(z in V))&&ii(V,z,ne)}function la(V,z,ne){var Pe=V[z];(!(Ne.call(V,z)&&mr(Pe,ne))||ne===void 0&&!(z in V))&&ii(V,z,ne)}function hr(V,z){for(var ne=V.length;ne--;)if(mr(V[ne][0],z))return ne;return-1}function ii(V,z,ne){z=="__proto__"&&mt?mt(V,z,{configurable:!0,enumerable:!0,value:ne,writable:!0}):V[z]=ne}var xo=da();function pr(V){return V==null?V===void 0?E:y:Dt&&Dt in Object(V)?Eo(V):xa(V)}function ca(V){return O(V)&&pr(V)==u}function ai(V){if(!C(V)||To(V))return!1;var z=p(V)?ce:J;return z.test(ba(V))}function fa(V){return O(V)&&b(V.length)&&!!A[pr(V)]}function yo(V){if(!C(V))return va(V);var z=dr(V),ne=[];for(var Pe in V)Pe=="constructor"&&(z||!Ne.call(V,Pe))||ne.push(Pe);return ne}function Re(V,z,ne,Pe,We){V!==z&&xo(z,function(ct,gt){if(We||(We=new Hn),C(ct))Ar(V,z,gt,ne,Re,Pe,We);else{var et=Pe?Pe(Wn(V,gt),ct,gt+"",V,z,We):void 0;et===void 0&&(et=ct),Tr(V,gt,et)}},Ce)}function Ar(V,z,ne,Pe,We,ct,gt){var et=Wn(V,ne),vt=Wn(z,ne),dn=gt.get(vt);if(dn){Tr(V,ne,dn);return}var Zt=ct?ct(et,vt,ne+"",V,z,gt):void 0,ui=Zt===void 0;if(ui){var Ro=si(vt),No=!Ro&&o(vt),rf=!Ro&&!No&&Y(vt);Zt=vt,Ro||No||rf?si(et)?Zt=et:Po(et)?Zt=Co(et):No?(ui=!1,Zt=wo(vt)):rf?(ui=!1,Zt=So(vt)):Zt=[]:q(vt)||Pr(vt)?(Zt=et,Pr(et)?Zt=we(et):(!C(et)||p(et))&&(Zt=ma(vt))):ui=!1}ui&&(gt.set(vt,Zt),We(Zt,vt,Pe,ct,gt),gt.delete(vt)),Tr(V,ne,Zt)}function sn(V,z){return qe(ya(V,z,ot),V+"")}var bo=mt?function(V,z){return mt(V,"toString",{configurable:!0,enumerable:!1,value:Ue(z),writable:!0})}:ot;function wo(V,z){return V.slice()}function ha(V){var z=new V.constructor(V.byteLength);return new Ye(z).set(new Ye(V)),z}function So(V,z){var ne=ha(V.buffer);return new V.constructor(ne,V.byteOffset,V.length)}function Co(V,z){var ne=-1,Pe=V.length;for(z||(z=Array(Pe));++ne<Pe;)z[ne]=V[ne];return z}function pa(V,z,ne,Pe){var We=!ne;ne||(ne={});for(var ct=-1,gt=z.length;++ct<gt;){var et=z[ct],vt=void 0;vt===void 0&&(vt=V[et]),We?ii(ne,et,vt):la(ne,et,vt)}return ne}function ko(V){return sn(function(z,ne){var Pe=-1,We=ne.length,ct=We>1?ne[We-1]:void 0,gt=We>2?ne[2]:void 0;for(ct=V.length>3&&typeof ct=="function"?(We--,ct):void 0,gt&&_o(ne[0],ne[1],gt)&&(ct=We<3?void 0:ct,We=1),z=Object(z);++Pe<We;){var et=ne[Pe];et&&V(z,et,Pe,ct)}return z})}function da(V){return function(z,ne,Pe){for(var We=-1,ct=Object(z),gt=Pe(z),et=gt.length;et--;){var vt=gt[++We];if(ne(ct[vt],vt,ct)===!1)break}return z}}function Ut(V,z){var ne=V.__data__;return Io(z)?ne[typeof z=="string"?"string":"hash"]:ne.map}function Pt(V,z){var ne=ae(V,z);return ai(ne)?ne:void 0}function Eo(V){var z=Ne.call(V,Dt),ne=V[Dt];try{V[Dt]=void 0;var Pe=!0}catch{}var We=yt.call(V);return Pe&&(z?V[Dt]=ne:delete V[Dt]),We}function ma(V){return typeof V.constructor=="function"&&!dr(V)?zt(bt(V)):{}}function ga(V,z){var ne=typeof V;return z=z??s,!!z&&(ne=="number"||ne!="symbol"&&ue.test(V))&&V>-1&&V%1==0&&V<z}function _o(V,z,ne){if(!C(ne))return!1;var Pe=typeof z;return(Pe=="number"?oi(ne)&&ga(z,ne.length):Pe=="string"&&z in ne)?mr(ne[z],V):!1}function Io(V){var z=typeof V;return z=="string"||z=="number"||z=="symbol"||z=="boolean"?V!=="__proto__":V===null}function To(V){return!!Fe&&Fe in V}function dr(V){var z=V&&V.constructor,ne=typeof z=="function"&&z.prototype||Ie;return V===ne}function va(V){var z=[];if(V!=null)for(var ne in Object(V))z.push(ne);return z}function xa(V){return yt.call(V)}function ya(V,z,ne){return z=Vt(z===void 0?V.length-1:z,0),function(){for(var Pe=arguments,We=-1,ct=Vt(Pe.length-z,0),gt=Array(ct);++We<ct;)gt[We]=Pe[z+We];We=-1;for(var et=Array(z+1);++We<z;)et[We]=Pe[We];return et[z]=ne(gt),Z(V,this,et)}}function Wn(V,z){if(!(z==="constructor"&&typeof V[z]=="function")&&z!="__proto__")return V[z]}var qe=Ao(bo);function Ao(V){var z=0,ne=0;return function(){var Pe=fo(),We=a-(Pe-ne);if(ne=Pe,We>0){if(++z>=i)return arguments[0]}else z=0;return V.apply(void 0,arguments)}}function ba(V){if(V!=null){try{return ke.call(V)}catch{}try{return V+""}catch{}}return""}function mr(V,z){return V===z||V!==V&&z!==z}var Pr=ca((function(){return arguments})())?ca:function(V){return O(V)&&Ne.call(V,"callee")&&!Lt.call(V,"callee")},si=Array.isArray;function oi(V){return V!=null&&b(V.length)&&!p(V)}function Po(V){return O(V)&&oi(V)}var o=an||_t;function p(V){if(!C(V))return!1;var z=pr(V);return z==m||z==v||z==c||z==_}function b(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=s}function C(V){var z=typeof V;return V!=null&&(z=="object"||z=="function")}function O(V){return V!=null&&typeof V=="object"}function q(V){if(!O(V)||pr(V)!=k)return!1;var z=bt(V);if(z===null)return!0;var ne=Ne.call(z,"constructor")&&z.constructor;return typeof ne=="function"&&ne instanceof ne&&ke.call(ne)==le}var Y=K?W(K):fa;function we(V){return pa(V,Ce(V))}function Ce(V){return oi(V)?ua(V):yo(V)}var je=ko(function(V,z,ne,Pe){Re(V,z,ne,Pe)});function Ue(V){return function(){return V}}function ot(V){return V}function _t(){return!1}e.exports=je})(di,di.exports)),di.exports}var FT=MT();const br=Hi(FT);var Mv=1/60*1e3,jT=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},Fv=typeof window<"u"?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(function(){return e(jT())},Mv)};function BT(e){var t=[],n=[],r=0,i=!1,a=new WeakSet,s={schedule:function(u,l,c){l===void 0&&(l=!1),c===void 0&&(c=!1);var h=c&&i,f=h?t:n;return l&&a.add(u),f.indexOf(u)===-1&&(f.push(u),h&&i&&(r=t.length)),u},cancel:function(u){var l=n.indexOf(u);l!==-1&&n.splice(l,1),a.delete(u)},process:function(u){var l;if(i=!0,l=[n,t],t=l[0],n=l[1],n.length=0,r=t.length,r)for(var c=0;c<r;c++){var h=t[c];h(u),a.has(h)&&(s.schedule(h),e())}i=!1}};return s}var zT=40,nl=!0,Ni=!1,rl=!1,Hr={delta:0,timestamp:0},Ki=["read","update","preRender","render","postRender"],Zs=Ki.reduce(function(e,t){return e[t]=BT(function(){return Ni=!0}),e},{}),En=Ki.reduce(function(e,t){var n=Zs[t];return e[t]=function(r,i,a){return i===void 0&&(i=!1),a===void 0&&(a=!1),Ni||UT(),n.schedule(r,i,a)},e},{}),yi=Ki.reduce(function(e,t){return e[t]=Zs[t].cancel,e},{}),jr=Ki.reduce(function(e,t){return e[t]=function(){return Zs[t].process(Hr)},e},{}),$T=function(e){return Zs[e].process(Hr)},jv=function(e){Ni=!1,Hr.delta=nl?Mv:Math.max(Math.min(e-Hr.timestamp,zT),1),Hr.timestamp=e,rl=!0,Ki.forEach($T),rl=!1,Ni&&(nl=!1,Fv(jv))},UT=function(){Ni=!0,nl=!0,rl||Fv(jv)},Cs=function(){return Hr},HT={};function wu(e){return typeof e=="number"}function WT(e){return Array.isArray(e)}function Bv(e){return typeof e=="function"}function Wr(e){var t=typeof e;return e!=null&&(t==="object"||t==="function")&&!WT(e)}function _c(e){return Object.prototype.toString.call(e)==="[object String]"}function zv(e){return/^var\(--.+\)$/.test(e)}var pn=HT.NODE_ENV!=="production";function Ic(e,t){var n={};return Object.keys(e).forEach(function(r){t.includes(r)||(n[r]=e[r])}),n}function qT(e,t,n,r){var i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var KT=function(t){var n=new WeakMap,r=function(a,s,u,l){if(typeof a>"u")return t(a,s,u);n.has(a)||n.set(a,new Map);var c=n.get(a);if(c.has(s))return c.get(s);var h=t(a,s,u,l);return c.set(s,h),h};return r},$v=KT(qT);function Uv(e,t){var n={};return Object.keys(e).forEach(function(r){var i=e[r],a=t(i,r,e);a&&(n[r]=i)}),n}var Hv=function(t){return Uv(t,function(n){return n!=null})},Wv=function(t){return Object.keys(t)};function qv(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Kv(e){var t;if(!qv(e))return!1;var n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}function Gv(e){var t;return qv(e)&&(t=e.ownerDocument)!=null?t:document}function GT(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var JT=GT(),It=function(t){return t?"":void 0},or=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.filter(Boolean).join(" ")};function YT(e){return Kv(e)&&e.tagName.toLowerCase()==="input"&&"select"in e}function XT(e){var t=Kv(e)?Gv(e):document;return t.activeElement===e}function qh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function QT(e,t){if(e){if(typeof e=="string")return qh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qh(e,t)}}function ZT(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=QT(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
155
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Bv(e)?e.apply(void 0,n):e}function qt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){t.some(function(a){return a==null||a(i),i==null?void 0:i.defaultPrevented})}}function eA(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){t.forEach(function(a){a==null||a(i)})}}function tA(e){var t;return function(){if(e){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];t=e.apply(this,i),e=null}return t}}var Jv=tA(function(e){return function(){var t=e.condition,n=e.message;t&&pn&&console.warn(n)}});function nA(e,t){t===void 0&&(t={});var n=t,r=n.isActive,i=r===void 0?XT:r,a=n.nextTick,s=n.preventScroll,u=s===void 0?!0:s,l=n.selectTextIfInput,c=l===void 0?!0:l;if(!e||i(e))return-1;function h(){if(!e){Jv({condition:!0,message:"[chakra-ui]: can't call focus() on `null` or `undefined` element"});return}if(rA())e.focus({preventScroll:u});else if(e.focus(),u){var f=iA(e);aA(f)}YT(e)&&c&&e.select()}return a?requestAnimationFrame(h):(h(),-1)}var Ba=null;function rA(){if(Ba==null){Ba=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return Ba=!0,!0}})}catch{}}return Ba}function iA(e){for(var t,n=Gv(e),r=(t=n.defaultView)!=null?t:window,i=e.parentNode,a=[],s=n.scrollingElement||n.documentElement;i instanceof r.HTMLElement&&i!==s;)(i.offsetHeight<i.scrollHeight||i.offsetWidth<i.scrollWidth)&&a.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),i=i.parentNode;return s instanceof r.HTMLElement&&a.push({element:s,scrollTop:s.scrollTop,scrollLeft:s.scrollLeft}),a}function aA(e){for(var t=ZT(e),n;!(n=t()).done;){var r=n.value,i=r.element,a=r.scrollTop,s=r.scrollLeft;i.scrollTop=a,i.scrollLeft=s}}function sA(e,t){if(e!=null){if(Bv(e)){e(t);return}try{e.current=t}catch{throw new Error("Cannot assign value '"+t+"' to ref '"+e+"'")}}}function ks(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){t.forEach(function(i){return sA(i,r)})}}function Tc(e){e===void 0&&(e={});var t=e,n=t.strict,r=n===void 0?!0:n,i=t.errorMessage,a=i===void 0?"useContext: `context` is undefined. Seems you forgot to wrap component within the Provider":i,s=t.name,u=j.createContext(void 0);u.displayName=s;function l(){var c=j.useContext(u);if(!c&&r){var h=new Error(a);throw h.name="ContextError",Error.captureStackTrace==null||Error.captureStackTrace(h,l),h}return c}return[u.Provider,l,u]}var il=JT?j.useLayoutEffect:j.useEffect;function Su(e,t){t===void 0&&(t=[]);var n=j.useRef(e);return il(function(){n.current=e}),j.useCallback(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n.current==null?void 0:n.current.apply(n,i)},t)}function ns(e){e===void 0&&(e=!1);var t=M.useState(e),n=t[0],r=t[1],i=M.useMemo(function(){return{on:function(){return r(!0)},off:function(){return r(!1)},toggle:function(){return r(function(s){return!s})}}},[]);return[n,i]}function oA(e,t){var n=e!==void 0,r=n&&typeof e<"u"?e:t;return[n,r]}var uA={current:1},lA=j.createContext(uA),cA=function(t){return t.current++};function fA(e,t){var n=j.useContext(lA),r=j.useState(n.current),i=r[0],a=r[1];return j.useEffect(function(){a(cA(n))},[n]),j.useMemo(function(){return[t,i].filter(Boolean).join("-")},[e,t,i])}var hA=function(t,n){var r=j.useRef(!1);return j.useEffect(function(){if(r.current)return t();r.current=!0},n),r.current},Yv=j.createContext({});pn&&(Yv.displayName="ColorModeContext");var pA=function(){var t=j.useContext(Yv);if(t===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return t};function Es(){return Es=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Es.apply(this,arguments)}var dA=function(t,n){return function(r){var i=String(n),a=t?t+"."+i:i;return Wr(r.__cssMap)&&a in r.__cssMap?r.__cssMap[a].varRef:n}};function Oi(e){var t=e.scale,n=e.transform,r=e.compose,i=function(s,u){var l,c=dA(t,s)(u),h=(l=n==null?void 0:n(c,u))!=null?l:c;return r&&(h=r(h,u)),h};return i}function gn(e,t){return function(n){var r={property:n,scale:e};return r.transform=Oi({scale:e,transform:t}),r}}var mA=function(t){var n=t.rtl,r=t.ltr;return function(i){return i.direction==="rtl"?n:r}};function gA(e){var t=e.property,n=e.scale,r=e.transform;return{scale:n,property:mA(t),transform:n?Oi({scale:n,compose:r}):r}}var Cu,ku,Xv=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function vA(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))"].concat(Xv).join(" ")}function xA(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)"].concat(Xv).join(" ")}var yA={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},bA={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function wA(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var SA={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},Qv="& > :not(style) ~ :not(style)",CA=(Cu={},Cu[Qv]={marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"},Cu),kA=(ku={},ku[Qv]={marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"},ku);function _s(e,t){return _s=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},_s(e,t)}function EA(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_s(e,t)}function al(){al=function(i,a){return new n(i,void 0,a)};var e=RegExp.prototype,t=new WeakMap;function n(i,a,s){var u=new RegExp(i,a);return t.set(u,s||t.get(i)),_s(u,n.prototype)}EA(n,RegExp),n.prototype.exec=function(i){var a=e.exec.call(this,i);return a&&(a.groups=r(a,this)),a},n.prototype[Symbol.replace]=function(i,a){if(typeof a=="string"){var s=t.get(this);return e[Symbol.replace].call(this,i,a.replace(/\$<([^>]+)>/g,function(l,c){return"$"+s[c]}))}else if(typeof a=="function"){var u=this;return e[Symbol.replace].call(this,i,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l),l.push(r(l,u))),a.apply(this,l)})}else return e[Symbol.replace].call(this,i,a)};function r(i,a){var s=t.get(a);return Object.keys(s).reduce(function(u,l){return u[l]=i[s[l]],u},Object.create(null))}return al.apply(this,arguments)}var sl={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},_A=new Set(Object.values(sl)),Zv=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),IA=function(t){return t.trim()};function TA(e,t){var n,r;if(e==null||Zv.has(e))return e;var i=al(/(^[\x2DA-Za-z]+)\(((.*))\)/g,{type:1,values:2}),a=(n=(r=i.exec(e))==null?void 0:r.groups)!=null?n:{},s=a.type,u=a.values;if(!s||!u)return e;var l=s.includes("-gradient")?s:s+"-gradient",c=u.split(",").map(IA).filter(Boolean),h=c[0],f=c.slice(1);if((f==null?void 0:f.length)===0)return e;var d=h in sl?sl[h]:h;f.unshift(d);var m=f.map(function(v){if(_A.has(v))return v;var x=v.indexOf(" "),S=x!==-1?[v.substr(0,x),v.substr(x+1)]:[v],y=S[0],k=S[1],_=ex(k)?k:k&&k.split(" "),P="colors."+y,w=P in t.__cssMap?t.__cssMap[P].varRef:y;return _?[w].concat(Array.isArray(_)?_:[_]).join(" "):w});return l+"("+m.join(", ")+")"}var ex=function(t){return _c(t)&&t.includes("(")&&t.includes(")")},AA=function(t,n){return TA(t,n??{})},PA=function(t){var n=parseFloat(t.toString()),r=t.toString().replace(String(n),"");return{unitless:!r,value:n,unit:r}},Sn=function(t){return function(n){return t+"("+n+")"}},at={filter:function(t){return t!=="auto"?t:yA},backdropFilter:function(t){return t!=="auto"?t:bA},ring:function(t){return wA(at.px(t))},bgClip:function(t){return t==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:t}},transform:function(t){return t==="auto"?vA():t==="auto-gpu"?xA():t},px:function(t){if(t==null)return t;var n=PA(t),r=n.unitless;return r||wu(t)?t+"px":t},fraction:function(t){return!wu(t)||t>1?t:t*100+"%"},float:function(t,n){var r={left:"right",right:"left"};return n.direction==="rtl"?r[t]:t},degree:function(t){if(zv(t)||t==null)return t;var n=_c(t)&&!t.endsWith("deg");return wu(t)||n?t+"deg":t},gradient:AA,blur:Sn("blur"),opacity:Sn("opacity"),brightness:Sn("brightness"),contrast:Sn("contrast"),dropShadow:Sn("drop-shadow"),grayscale:Sn("grayscale"),hueRotate:Sn("hue-rotate"),invert:Sn("invert"),saturate:Sn("saturate"),sepia:Sn("sepia"),bgImage:function(t){if(t==null)return t;var n=ex(t)||Zv.has(t);return n?t:"url("+t+")"},outline:function(t){var n=String(t)==="0"||String(t)==="none";return t!==null&&n?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:t}},flexDirection:function(t){var n,r=(n=SA[t])!=null?n:{},i=r.space,a=r.divide,s={flexDirection:t};return i&&(s[i]=1),a&&(s[a]=1),s}},$={borderWidths:gn("borderWidths"),borderStyles:gn("borderStyles"),colors:gn("colors"),borders:gn("borders"),radii:gn("radii",at.px),space:gn("space",at.px),spaceT:gn("space",at.px),degreeT:function(t){return{property:t,transform:at.degree}},prop:function(t,n,r){return Es({property:t,scale:n},n&&{transform:Oi({scale:n,transform:r})})},propT:function(t,n){return{property:t,transform:n}},sizes:gn("sizes",at.px),sizesT:gn("sizes",at.fraction),shadows:gn("shadows"),logical:gA,blur:gn("blur",at.blur)},rs={background:$.colors("background"),backgroundColor:$.colors("backgroundColor"),backgroundImage:$.propT("backgroundImage",at.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:at.bgClip},bgSize:$.prop("backgroundSize"),bgPosition:$.prop("backgroundPosition"),bg:$.colors("background"),bgColor:$.colors("backgroundColor"),bgPos:$.prop("backgroundPosition"),bgRepeat:$.prop("backgroundRepeat"),bgAttachment:$.prop("backgroundAttachment"),bgGradient:$.propT("backgroundImage",at.gradient),bgClip:{transform:at.bgClip}};Object.assign(rs,{bgImage:rs.backgroundImage,bgImg:rs.backgroundImage});var tt={border:$.borders("border"),borderWidth:$.borderWidths("borderWidth"),borderStyle:$.borderStyles("borderStyle"),borderColor:$.colors("borderColor"),borderRadius:$.radii("borderRadius"),borderTop:$.borders("borderTop"),borderBlockStart:$.borders("borderBlockStart"),borderTopLeftRadius:$.radii("borderTopLeftRadius"),borderStartStartRadius:$.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:$.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:$.radii("borderTopRightRadius"),borderStartEndRadius:$.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:$.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:$.borders("borderRight"),borderInlineEnd:$.borders("borderInlineEnd"),borderBottom:$.borders("borderBottom"),borderBlockEnd:$.borders("borderBlockEnd"),borderBottomLeftRadius:$.radii("borderBottomLeftRadius"),borderBottomRightRadius:$.radii("borderBottomRightRadius"),borderLeft:$.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:$.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:$.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:$.borders(["borderLeft","borderRight"]),borderInline:$.borders("borderInline"),borderY:$.borders(["borderTop","borderBottom"]),borderBlock:$.borders("borderBlock"),borderTopWidth:$.borderWidths("borderTopWidth"),borderBlockStartWidth:$.borderWidths("borderBlockStartWidth"),borderTopColor:$.colors("borderTopColor"),borderBlockStartColor:$.colors("borderBlockStartColor"),borderTopStyle:$.borderStyles("borderTopStyle"),borderBlockStartStyle:$.borderStyles("borderBlockStartStyle"),borderBottomWidth:$.borderWidths("borderBottomWidth"),borderBlockEndWidth:$.borderWidths("borderBlockEndWidth"),borderBottomColor:$.colors("borderBottomColor"),borderBlockEndColor:$.colors("borderBlockEndColor"),borderBottomStyle:$.borderStyles("borderBottomStyle"),borderBlockEndStyle:$.borderStyles("borderBlockEndStyle"),borderLeftWidth:$.borderWidths("borderLeftWidth"),borderInlineStartWidth:$.borderWidths("borderInlineStartWidth"),borderLeftColor:$.colors("borderLeftColor"),borderInlineStartColor:$.colors("borderInlineStartColor"),borderLeftStyle:$.borderStyles("borderLeftStyle"),borderInlineStartStyle:$.borderStyles("borderInlineStartStyle"),borderRightWidth:$.borderWidths("borderRightWidth"),borderInlineEndWidth:$.borderWidths("borderInlineEndWidth"),borderRightColor:$.colors("borderRightColor"),borderInlineEndColor:$.colors("borderInlineEndColor"),borderRightStyle:$.borderStyles("borderRightStyle"),borderInlineEndStyle:$.borderStyles("borderInlineEndStyle"),borderTopRadius:$.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:$.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:$.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:$.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(tt,{rounded:tt.borderRadius,roundedTop:tt.borderTopRadius,roundedTopLeft:tt.borderTopLeftRadius,roundedTopRight:tt.borderTopRightRadius,roundedTopStart:tt.borderStartStartRadius,roundedTopEnd:tt.borderStartEndRadius,roundedBottom:tt.borderBottomRadius,roundedBottomLeft:tt.borderBottomLeftRadius,roundedBottomRight:tt.borderBottomRightRadius,roundedBottomStart:tt.borderEndStartRadius,roundedBottomEnd:tt.borderEndEndRadius,roundedLeft:tt.borderLeftRadius,roundedRight:tt.borderRightRadius,roundedStart:tt.borderInlineStartRadius,roundedEnd:tt.borderInlineEndRadius,borderStart:tt.borderInlineStart,borderEnd:tt.borderInlineEnd,borderTopStartRadius:tt.borderStartStartRadius,borderTopEndRadius:tt.borderStartEndRadius,borderBottomStartRadius:tt.borderEndStartRadius,borderBottomEndRadius:tt.borderEndEndRadius,borderStartRadius:tt.borderInlineStartRadius,borderEndRadius:tt.borderInlineEndRadius,borderStartWidth:tt.borderInlineStartWidth,borderEndWidth:tt.borderInlineEndWidth,borderStartColor:tt.borderInlineStartColor,borderEndColor:tt.borderInlineEndColor,borderStartStyle:tt.borderInlineStartStyle,borderEndStyle:tt.borderInlineEndStyle});var RA={color:$.colors("color"),textColor:$.colors("color"),fill:$.colors("fill"),stroke:$.colors("stroke")},ol={boxShadow:$.shadows("boxShadow"),mixBlendMode:!0,blendMode:$.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:$.prop("backgroundBlendMode"),opacity:!0};Object.assign(ol,{shadow:ol.boxShadow});var NA={filter:{transform:at.filter},blur:$.blur("--chakra-blur"),brightness:$.propT("--chakra-brightness",at.brightness),contrast:$.propT("--chakra-contrast",at.contrast),hueRotate:$.degreeT("--chakra-hue-rotate"),invert:$.propT("--chakra-invert",at.invert),saturate:$.propT("--chakra-saturate",at.saturate),dropShadow:$.propT("--chakra-drop-shadow",at.dropShadow),backdropFilter:{transform:at.backdropFilter},backdropBlur:$.blur("--chakra-backdrop-blur"),backdropBrightness:$.propT("--chakra-backdrop-brightness",at.brightness),backdropContrast:$.propT("--chakra-backdrop-contrast",at.contrast),backdropHueRotate:$.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:$.propT("--chakra-backdrop-invert",at.invert),backdropSaturate:$.propT("--chakra-backdrop-saturate",at.saturate)},Is={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:at.flexDirection},experimental_spaceX:{static:CA,transform:Oi({scale:"space",transform:function(t){return t!==null?{"--chakra-space-x":t}:null}})},experimental_spaceY:{static:kA,transform:Oi({scale:"space",transform:function(t){return t!=null?{"--chakra-space-y":t}:null}})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:$.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:$.space("gap"),rowGap:$.space("rowGap"),columnGap:$.space("columnGap")};Object.assign(Is,{flexDir:Is.flexDirection});var tx={gridGap:$.space("gridGap"),gridColumnGap:$.space("gridColumnGap"),gridRowGap:$.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},OA={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:at.outline},outlineOffset:!0,outlineColor:$.colors("outlineColor")},ln={width:$.sizesT("width"),inlineSize:$.sizesT("inlineSize"),height:$.sizes("height"),blockSize:$.sizes("blockSize"),boxSize:$.sizes(["width","height"]),minWidth:$.sizes("minWidth"),minInlineSize:$.sizes("minInlineSize"),minHeight:$.sizes("minHeight"),minBlockSize:$.sizes("minBlockSize"),maxWidth:$.sizes("maxWidth"),maxInlineSize:$.sizes("maxInlineSize"),maxHeight:$.sizes("maxHeight"),maxBlockSize:$.sizes("maxBlockSize"),d:$.prop("display"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:$.propT("float",at.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(ln,{w:ln.width,h:ln.height,minW:ln.minWidth,maxW:ln.maxWidth,minH:ln.minHeight,maxH:ln.maxHeight,overscroll:ln.overscrollBehavior,overscrollX:ln.overscrollBehaviorX,overscrollY:ln.overscrollBehaviorY});var LA={listStyleType:!0,listStylePosition:!0,listStylePos:$.prop("listStylePosition"),listStyleImage:!0,listStyleImg:$.prop("listStyleImage")},DA={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},VA={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},Eu=function(t,n,r){var i={},a=$v(t,n,{});for(var s in a){var u=s in r&&r[s]!=null;u||(i[s]=a[s])}return i},MA={srOnly:{transform:function(t){return t===!0?DA:t==="focusable"?VA:{}}},layerStyle:{processResult:!0,transform:function(t,n,r){return Eu(n,"layerStyles."+t,r)}},textStyle:{processResult:!0,transform:function(t,n,r){return Eu(n,"textStyles."+t,r)}},apply:{processResult:!0,transform:function(t,n,r){return Eu(n,t,r)}}},bi={position:!0,pos:$.prop("position"),zIndex:$.prop("zIndex","zIndices"),inset:$.spaceT("inset"),insetX:$.spaceT(["left","right"]),insetInline:$.spaceT("insetInline"),insetY:$.spaceT(["top","bottom"]),insetBlock:$.spaceT("insetBlock"),top:$.spaceT("top"),insetBlockStart:$.spaceT("insetBlockStart"),bottom:$.spaceT("bottom"),insetBlockEnd:$.spaceT("insetBlockEnd"),left:$.spaceT("left"),insetInlineStart:$.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:$.spaceT("right"),insetInlineEnd:$.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(bi,{insetStart:bi.insetInlineStart,insetEnd:bi.insetInlineEnd});var FA={ring:{transform:at.ring},ringColor:$.colors("--chakra-ring-color"),ringOffset:$.prop("--chakra-ring-offset-width"),ringOffsetColor:$.colors("--chakra-ring-offset-color"),ringInset:$.prop("--chakra-ring-inset")},pt={margin:$.spaceT("margin"),marginTop:$.spaceT("marginTop"),marginBlockStart:$.spaceT("marginBlockStart"),marginRight:$.spaceT("marginRight"),marginInlineEnd:$.spaceT("marginInlineEnd"),marginBottom:$.spaceT("marginBottom"),marginBlockEnd:$.spaceT("marginBlockEnd"),marginLeft:$.spaceT("marginLeft"),marginInlineStart:$.spaceT("marginInlineStart"),marginX:$.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:$.spaceT("marginInline"),marginY:$.spaceT(["marginTop","marginBottom"]),marginBlock:$.spaceT("marginBlock"),padding:$.space("padding"),paddingTop:$.space("paddingTop"),paddingBlockStart:$.space("paddingBlockStart"),paddingRight:$.space("paddingRight"),paddingBottom:$.space("paddingBottom"),paddingBlockEnd:$.space("paddingBlockEnd"),paddingLeft:$.space("paddingLeft"),paddingInlineStart:$.space("paddingInlineStart"),paddingInlineEnd:$.space("paddingInlineEnd"),paddingX:$.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:$.space("paddingInline"),paddingY:$.space(["paddingTop","paddingBottom"]),paddingBlock:$.space("paddingBlock")};Object.assign(pt,{m:pt.margin,mt:pt.marginTop,mr:pt.marginRight,me:pt.marginInlineEnd,marginEnd:pt.marginInlineEnd,mb:pt.marginBottom,ml:pt.marginLeft,ms:pt.marginInlineStart,marginStart:pt.marginInlineStart,mx:pt.marginX,my:pt.marginY,p:pt.padding,pt:pt.paddingTop,py:pt.paddingY,px:pt.paddingX,pb:pt.paddingBottom,pl:pt.paddingLeft,ps:pt.paddingInlineStart,paddingStart:pt.paddingInlineStart,pr:pt.paddingRight,pe:pt.paddingInlineEnd,paddingEnd:pt.paddingInlineEnd});var jA={textDecorationColor:$.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:$.shadows("textShadow")},BA={clipPath:!0,transform:$.propT("transform",at.transform),transformOrigin:!0,translateX:$.spaceT("--chakra-translate-x"),translateY:$.spaceT("--chakra-translate-y"),skewX:$.degreeT("--chakra-skew-x"),skewY:$.degreeT("--chakra-skew-y"),scaleX:$.prop("--chakra-scale-x"),scaleY:$.prop("--chakra-scale-y"),scale:$.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:$.degreeT("--chakra-rotate")},zA={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:$.prop("transitionDuration","transition.duration"),transitionProperty:$.prop("transitionProperty","transition.property"),transitionTimingFunction:$.prop("transitionTimingFunction","transition.easing")},$A={fontFamily:$.prop("fontFamily","fonts"),fontSize:$.prop("fontSize","fontSizes",at.px),fontWeight:$.prop("fontWeight","fontWeights"),lineHeight:$.prop("lineHeight","lineHeights"),letterSpacing:$.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"},isTruncated:{transform:function(t){if(t===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}},UA={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:$.spaceT("scrollMargin"),scrollMarginTop:$.spaceT("scrollMarginTop"),scrollMarginBottom:$.spaceT("scrollMarginBottom"),scrollMarginLeft:$.spaceT("scrollMarginLeft"),scrollMarginRight:$.spaceT("scrollMarginRight"),scrollMarginX:$.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:$.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:$.spaceT("scrollPadding"),scrollPaddingTop:$.spaceT("scrollPaddingTop"),scrollPaddingBottom:$.spaceT("scrollPaddingBottom"),scrollPaddingLeft:$.spaceT("scrollPaddingLeft"),scrollPaddingRight:$.spaceT("scrollPaddingRight"),scrollPaddingX:$.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:$.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function Kh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HA(e,t){if(e){if(typeof e=="string")return Kh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kh(e,t)}}function WA(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=HA(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
156
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Tt={hover:function(t,n){return t+":hover "+n+", "+t+"[data-hover] "+n},focus:function(t,n){return t+":focus "+n+", "+t+"[data-focus] "+n},focusVisible:function(t,n){return t+":focus-visible "+n},focusWithin:function(t,n){return t+":focus-within "+n},active:function(t,n){return t+":active "+n+", "+t+"[data-active] "+n},disabled:function(t,n){return t+":disabled "+n+", "+t+"[data-disabled] "+n},invalid:function(t,n){return t+":invalid "+n+", "+t+"[data-invalid] "+n},checked:function(t,n){return t+":checked "+n+", "+t+"[data-checked] "+n},placeholderShown:function(t,n){return t+":placeholder-shown "+n}},Kn=function(t){return nx(function(n){return t(n,"&")},"[role=group]","[data-group]",".group")},Nn=function(t){return nx(function(n){return t(n,"~ &")},"[data-peer]",".peer")},nx=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.map(t).join(", ")},Ac={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_disabled:"&[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Kn(Tt.hover),_peerHover:Nn(Tt.hover),_groupFocus:Kn(Tt.focus),_peerFocus:Nn(Tt.focus),_groupFocusVisible:Kn(Tt.focusVisible),_peerFocusVisible:Nn(Tt.focusVisible),_groupActive:Kn(Tt.active),_peerActive:Nn(Tt.active),_groupDisabled:Kn(Tt.disabled),_peerDisabled:Nn(Tt.disabled),_groupInvalid:Kn(Tt.invalid),_peerInvalid:Nn(Tt.invalid),_groupChecked:Kn(Tt.checked),_peerChecked:Nn(Tt.checked),_groupFocusWithin:Kn(Tt.focusWithin),_peerFocusWithin:Nn(Tt.focusWithin),_peerPlaceholderShown:Nn(Tt.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},qA=Wv(Ac),Pc=br({},rs,tt,RA,Is,ln,NA,FA,OA,tx,MA,bi,ol,pt,UA,$A,jA,BA,LA,zA);Object.assign({},pt,ln,Is,tx,bi);var KA=[].concat(Wv(Pc),qA),GA=Es({},Pc,Ac),JA=function(t){return t in GA},YA=function(t){return function(n){if(!n.__breakpoints)return t;var r=n.__breakpoints,i=r.isResponsive,a=r.toArrayValue,s=r.media,u={};for(var l in t){var c=Dn(t[l],n);if(c!=null){if(c=Wr(c)&&i(c)?a(c):c,!Array.isArray(c)){u[l]=c;continue}for(var h=c.slice(0,s.length).length,f=0;f<h;f+=1){var d=s==null?void 0:s[f];if(!d){u[l]=c[f];continue}u[d]=u[d]||{},c[f]!=null&&(u[d][l]=c[f])}}}return u}},XA=function(t,n){return t.startsWith("--")&&_c(n)&&!zv(n)},QA=function(t,n){var r,i;if(n==null)return n;var a=function(f){var d,m;return(d=t.__cssMap)==null||(m=d[f])==null?void 0:m.varRef},s=function(f){var d;return(d=a(f))!=null?d:f},u=n.split(",").map(function(h){return h.trim()}),l=u[0],c=u[1];return n=(r=(i=a(l))!=null?i:s(c))!=null?r:s(n),n};function ZA(e){var t=e.configs,n=t===void 0?{}:t,r=e.pseudos,i=r===void 0?{}:r,a=e.theme,s=function u(l,c){c===void 0&&(c=!1);var h=Dn(l,a),f=YA(h)(a),d={};for(var m in f){var v,x,S,y,k,_=f[m],P=Dn(_,a);m in i&&(m=i[m]),XA(m,P)&&(P=QA(a,P));var w=n[m];if(w===!0&&(w={property:m}),Wr(P)){var g;d[m]=(g=d[m])!=null?g:{},d[m]=br({},d[m],u(P,!0));continue}var E=(v=(x=w)==null||x.transform==null?void 0:x.transform(P,a,h))!=null?v:P;E=(S=w)!=null&&S.processResult?u(E,!0):E;var D=Dn((y=w)==null?void 0:y.property,a);if(!c&&(k=w)!=null&&k.static){var F=Dn(w.static,a);d=br({},d,F)}if(D&&Array.isArray(D)){for(var R=WA(D),B;!(B=R()).done;){var G=B.value;d[G]=E}continue}if(D){D==="&"&&Wr(E)?d=br({},d,E):d[D]=E;continue}if(Wr(E)){d=br({},d,E);continue}d[m]=E}return d};return s}var e2=function(t){return function(n){var r=ZA({theme:n,pseudos:Ac,configs:Pc});return r(t)}};function rx(e){return Wr(e)&&e.reference?e.reference:String(e)}var eo=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.map(rx).join(" "+t+" ").replace(/calc/g,"")},Gh=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"calc("+eo.apply(void 0,["+"].concat(n))+")"},Jh=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"calc("+eo.apply(void 0,["-"].concat(n))+")"},ul=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"calc("+eo.apply(void 0,["*"].concat(n))+")"},Yh=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"calc("+eo.apply(void 0,["/"].concat(n))+")"},Xh=function(t){var n=rx(t);return n!=null&&!Number.isNaN(parseFloat(n))?String(n).startsWith("-")?String(n).slice(1):"-"+n:ul(n,-1)},fi=Object.assign(function(e){return{add:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(Gh.apply(void 0,[e].concat(r)))},subtract:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(Jh.apply(void 0,[e].concat(r)))},multiply:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(ul.apply(void 0,[e].concat(r)))},divide:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fi(Yh.apply(void 0,[e].concat(r)))},negate:function(){return fi(Xh(e))},toString:function(){return e.toString()}}},{add:Gh,subtract:Jh,multiply:ul,divide:Yh,negate:Xh}),_u,Qh;function t2(){if(Qh)return _u;Qh=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(a,s){if(a===s)return!0;if(a&&s&&typeof a=="object"&&typeof s=="object"){if(a.constructor!==s.constructor)return!1;var u,l,c;if(Array.isArray(a)){if(u=a.length,u!=s.length)return!1;for(l=u;l--!==0;)if(!i(a[l],s[l]))return!1;return!0}var h;if(t&&a instanceof Map&&s instanceof Map){if(a.size!==s.size)return!1;for(h=a.entries();!(l=h.next()).done;)if(!s.has(l.value[0]))return!1;for(h=a.entries();!(l=h.next()).done;)if(!i(l.value[1],s.get(l.value[0])))return!1;return!0}if(n&&a instanceof Set&&s instanceof Set){if(a.size!==s.size)return!1;for(h=a.entries();!(l=h.next()).done;)if(!s.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(s)){if(u=a.length,u!=s.length)return!1;for(l=u;l--!==0;)if(a[l]!==s[l])return!1;return!0}if(a.constructor===RegExp)return a.source===s.source&&a.flags===s.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===s.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===s.toString();if(c=Object.keys(a),u=c.length,u!==Object.keys(s).length)return!1;for(l=u;l--!==0;)if(!Object.prototype.hasOwnProperty.call(s,c[l]))return!1;if(e&&a instanceof Element)return!1;for(l=u;l--!==0;)if(!((c[l]==="_owner"||c[l]==="__v"||c[l]==="__o")&&a.$$typeof)&&!i(a[c[l]],s[c[l]]))return!1;return!0}return a!==a&&s!==s}return _u=function(s,u){try{return i(s,u)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},_u}var n2=t2();const r2=Hi(n2);function ll(){return ll=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ll.apply(this,arguments)}function i2(){var e=j.useContext(W0.ThemeContext);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var ix=Tc({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "}),ax=ix[0],Rc=ix[1];function to(e){return Ic(e,["styleConfig","size","variant","colorScheme"])}function a2(){var e=pA(),t=i2();return ll({},e,{theme:t})}function Nc(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var s2=new Set([].concat(KA,["textStyle","layerStyle","apply","isTruncated","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"])),o2=new Set(["htmlWidth","htmlHeight","htmlSize"]),u2=function(t){return o2.has(t)||!s2.has(t)},l2=["theme","css","__css","sx"],c2=["baseStyle"],f2=function(t){var n=t.baseStyle;return function(r){r.theme;var i=r.css,a=r.__css,s=r.sx,u=Nc(r,l2),l=Uv(u,function(d,m){return JA(m)}),c=Dn(n,r),h=Object.assign({},a,c,Hv(l),s),f=e2(h)(r.theme);return i?[f,i]:f}};function Iu(e,t){var n=t??{},r=n.baseStyle,i=Nc(n,c2);i.shouldForwardProp||(i.shouldForwardProp=u2);var a=f2({baseStyle:r});return q0(e,i)(a)}function ur(e){return j.forwardRef(e)}var h2=["styleConfig"];function sx(e,t,n){var r;t===void 0&&(t={}),n===void 0&&(n={});var i=t,a=i.styleConfig,s=Nc(i,h2),u=a2(),l=u.theme,c=u.colorMode,h=$v(l,"components."+e),f=a||h,d=br({theme:l,colorMode:c},(r=f==null?void 0:f.defaultProps)!=null?r:{},Hv(Ic(s,["children"]))),m=M.useRef({});if(f){var v,x,S,y,k,_,P=Dn((v=f.baseStyle)!=null?v:{},d),w=Dn((x=(S=f.variants)==null?void 0:S[d.variant])!=null?x:{},d),g=Dn((y=(k=f.sizes)==null?void 0:k[d.size])!=null?y:{},d),E=br({},P,g,w);(_=n)!=null&&_.isMultiPart&&f.parts&&f.parts.forEach(function(F){var R;E[F]=(R=E[F])!=null?R:{}});var D=r2(m.current,E);D||(m.current=E)}return m.current}function Oc(e,t){return sx(e,t,{isMultiPart:!0})}function p2(){var e=new Map;return new Proxy(Iu,{apply:function(n,r,i){return Iu.apply(void 0,i)},get:function(n,r){return e.has(r)||e.set(r,Iu(r)),e.get(r)}})}var rn=p2();function wi(){return wi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wi.apply(this,arguments)}function d2(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var m2=["as","viewBox","color","focusable","children","className","__css"],Zh={path:j.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},j.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),j.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),j.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},ox=ur(function(e,t){var n=e.as,r=e.viewBox,i=e.color,a=i===void 0?"currentColor":i,s=e.focusable,u=s===void 0?!1:s,l=e.children,c=e.className,h=e.__css,f=d2(e,m2),d=or("chakra-icon",c),m=wi({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:a},h),v={ref:t,focusable:u,className:d,__css:m},x=r??Zh.viewBox;if(n&&typeof n!="string")return j.createElement(rn.svg,wi({as:n},v,f));var S=l??Zh.path;return j.createElement(rn.svg,wi({verticalAlign:"middle",viewBox:x},v,f),S)});pn&&(ox.displayName="Icon");var g2=ox,On=function(e){return{isEnabled:function(t){return e.some(function(n){return!!t[n]})}}},Lc={measureLayout:On(["layout","layoutId","drag","_layoutResetTransform"]),animation:On(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:On(["exit"]),drag:On(["drag","dragControls"]),focus:On(["whileFocus"]),hover:On(["whileHover","onHoverStart","onHoverEnd"]),tap:On(["whileTap","onTap","onTapStart","onTapCancel"]),pan:On(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:On(["layout","layoutId"])};function v2(e){for(var t in e){var n=e[t];n!==null&&(Lc[t].Component=n)}}var x2={},no=function(){},Yt=function(){};x2.NODE_ENV!=="production"&&(no=function(e,t){!e&&typeof console<"u"&&console.warn(t)},Yt=function(e,t){if(!e)throw new Error(t)});var ux=M.createContext({strict:!1}),y2={},lx=Object.keys(Lc),b2=lx.length;function w2(e,t,n){var r=[],i=M.useContext(ux);if(!t)return null;y2.NODE_ENV!=="production"&&n&&i.strict&&Yt(!1,"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");for(var a=0;a<b2;a++){var s=lx[a],u=Lc[s],l=u.isEnabled,c=u.Component;l(e)&&c&&r.push(j.createElement(c,de({key:s},e,{visualElement:t})))}return r}var ro=M.createContext({transformPagePoint:function(e){return e},isStatic:!1}),io=M.createContext({});function S2(){return M.useContext(io).visualElement}var Gi=M.createContext(null);function Li(e){var t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}function cx(){var e=M.useContext(Gi);if(e===null)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=_2();M.useEffect(function(){return r(i)},[]);var a=function(){return n==null?void 0:n(i)};return!t&&n?[!1,a]:[!0]}function C2(e){return e===null?!0:e.isPresent}var k2=0,E2=function(){return k2++},_2=function(){return Li(E2)},I2=M.createContext(null),Ji=typeof window<"u",ep=Ji?M.useLayoutEffect:M.useEffect;function T2(e){var t=e.layoutId,n=M.useContext(I2);return n&&t!==void 0?n+"-"+t:t}function A2(e,t,n,r){var i=M.useContext(ro),a=M.useContext(ux),s=S2(),u=M.useContext(Gi),l=T2(n),c=M.useRef(void 0);r||(r=a.renderer),!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:de(de({},n),{layoutId:l}),presenceId:u==null?void 0:u.id,blockInitialAnimation:(u==null?void 0:u.initial)===!1}));var h=c.current;return ep(function(){h&&(h.setProps(de(de(de({},i),n),{layoutId:l})),h.isPresent=C2(u),h.isPresenceRoot=!s||s.presenceId!==(u==null?void 0:u.id),h.syncRender())}),M.useEffect(function(){var f;h&&((f=h.animationState)===null||f===void 0||f.animateChanges())}),ep(function(){return function(){return h==null?void 0:h.notifyUnmount()}},[]),h}function cl(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function P2(e,t,n){return M.useCallback(function(r){var i;r&&((i=e.mount)===null||i===void 0||i.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):cl(n)&&(n.current=r))},[t])}function fx(e){return Array.isArray(e)}function xn(e){return typeof e=="string"||fx(e)}function R2(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.get()}),t}function N2(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.getVelocity()}),t}function hx(e,t,n,r,i){var a;return r===void 0&&(r={}),i===void 0&&(i={}),typeof t=="string"&&(t=(a=e.variants)===null||a===void 0?void 0:a[t]),typeof t=="function"?t(n??e.custom,r,i):t}function ao(e,t,n){var r=e.getProps();return hx(r,t,n??r.custom,R2(e),N2(e))}function so(e){var t;return typeof((t=e.animate)===null||t===void 0?void 0:t.start)=="function"||xn(e.initial)||xn(e.animate)||xn(e.whileHover)||xn(e.whileDrag)||xn(e.whileTap)||xn(e.whileFocus)||xn(e.exit)}function px(e){return!!(so(e)||e.variants)}function O2(e,t){if(so(e)){var n=e.initial,r=e.animate;return{initial:n===!1||xn(n)?n:void 0,animate:xn(r)?r:void 0}}return e.inherit!==!1?t:{}}function L2(e,t){var n=O2(e,M.useContext(io)),r=n.initial,i=n.animate;return M.useMemo(function(){return{initial:r,animate:i}},t?[tp(r),tp(i)]:[])}function tp(e){return Array.isArray(e)?e.join(" "):e}function D2(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.useRender,i=e.useVisualState,a=e.Component;t&&v2(t);function s(u,l){var c=M.useContext(ro).isStatic,h=null,f=L2(u,c),d=i(u,c);return!c&&Ji&&(f.visualElement=A2(a,d,u,n),h=w2(u,f.visualElement,t)),j.createElement(j.Fragment,null,j.createElement(io.Provider,{value:f},r(a,u,P2(d,f.visualElement,l),d,c)),h)}return M.forwardRef(s)}function V2(e){function t(r,i){return i===void 0&&(i={}),D2(e(r,i))}var n=new Map;return new Proxy(t,{get:function(r,i){return n.has(i)||n.set(i,t(i)),n.get(i)}})}var M2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function Dc(e){return typeof e!="string"||e.includes("-")?!1:!!(M2.indexOf(e)>-1||/[A-Z]/.test(e))}var Si={};function F2(e){for(var t in e)Si[t]=e[t]}var j2=["","X","Y","Z"],B2=["translate","scale","rotate","skew"],Di=["transformPerspective","x","y","z"];B2.forEach(function(e){return j2.forEach(function(t){return Di.push(e+t)})});function z2(e,t){return Di.indexOf(e)-Di.indexOf(t)}var $2=new Set(Di);function oo(e){return $2.has(e)}var U2=new Set(["originX","originY","originZ"]);function dx(e){return U2.has(e)}function mx(e,t){var n=t.layout,r=t.layoutId;return oo(e)||dx(e)||(n||r!==void 0)&&(!!Si[e]||e==="opacity")}var er=function(e){return e!==null&&typeof e=="object"&&e.getVelocity},H2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function W2(e,t,n,r){var i=e.transform,a=e.transformKeys,s=t.enableHardwareAcceleration,u=s===void 0?!0:s,l=t.allowTransformNone,c=l===void 0?!0:l,h="";a.sort(z2);for(var f=!1,d=a.length,m=0;m<d;m++){var v=a[m];h+=(H2[v]||v)+"("+i[v]+") ",v==="z"&&(f=!0)}return!f&&u?h+="translateZ(0)":h=h.trim(),r?h=r(i,n?"":h):c&&n&&(h="none"),h}function q2(e){var t=e.originX,n=t===void 0?"50%":t,r=e.originY,i=r===void 0?"50%":r,a=e.originZ,s=a===void 0?0:a;return n+" "+i+" "+s}function gx(e){return e.startsWith("--")}var K2=function(e,t){return t&&typeof e=="number"?t.transform(e):e},vx=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},Ci=function(e){return e%1?Number(e.toFixed(5)):e},Vi=/(-)?([\d]*\.?[\d])+/g,fl=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,G2=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Yi(e){return typeof e=="string"}var Ir={test:function(e){return typeof e=="number"},parse:parseFloat,transform:function(e){return e}},ki=de(de({},Ir),{transform:vx(0,1)}),za=de(de({},Ir),{default:1}),Xi=function(e){return{test:function(t){return Yi(t)&&t.endsWith(e)&&t.split(" ").length===1},parse:parseFloat,transform:function(t){return""+t+e}}},Jn=Xi("deg"),qr=Xi("%"),ze=Xi("px"),J2=Xi("vh"),Y2=Xi("vw"),np=de(de({},qr),{parse:function(e){return qr.parse(e)/100},transform:function(e){return qr.transform(e*100)}}),Vc=function(e,t){return function(n){return!!(Yi(n)&&G2.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},xx=function(e,t,n){return function(r){var i;if(!Yi(r))return r;var a=r.match(Vi),s=a[0],u=a[1],l=a[2],c=a[3];return i={},i[e]=parseFloat(s),i[t]=parseFloat(u),i[n]=parseFloat(l),i.alpha=c!==void 0?parseFloat(c):1,i}},Br={test:Vc("hsl","hue"),parse:xx("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,i=e.alpha,a=i===void 0?1:i;return"hsla("+Math.round(t)+", "+qr.transform(Ci(n))+", "+qr.transform(Ci(r))+", "+Ci(ki.transform(a))+")"}},X2=vx(0,255),Tu=de(de({},Ir),{transform:function(e){return Math.round(X2(e))}}),zr={test:Vc("rgb","red"),parse:xx("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,i=e.alpha,a=i===void 0?1:i;return"rgba("+Tu.transform(t)+", "+Tu.transform(n)+", "+Tu.transform(r)+", "+Ci(ki.transform(a))+")"}};function Q2(e){var t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var hl={test:Vc("#"),parse:Q2,transform:zr.transform},Mt={test:function(e){return zr.test(e)||hl.test(e)||Br.test(e)},parse:function(e){return zr.test(e)?zr.parse(e):Br.test(e)?Br.parse(e):hl.parse(e)},transform:function(e){return Yi(e)?e:e.hasOwnProperty("red")?zr.transform(e):Br.transform(e)}},yx="${c}",bx="${n}";function Z2(e){var t,n,r,i;return isNaN(e)&&Yi(e)&&((n=(t=e.match(Vi))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(fl))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function wx(e){var t=[],n=0,r=e.match(fl);r&&(n=r.length,e=e.replace(fl,yx),t.push.apply(t,r.map(Mt.parse)));var i=e.match(Vi);return i&&(e=e.replace(Vi,bx),t.push.apply(t,i.map(Ir.parse))),{values:t,numColors:n,tokenised:e}}function Sx(e){return wx(e).values}function Cx(e){var t=wx(e),n=t.values,r=t.numColors,i=t.tokenised,a=n.length;return function(s){for(var u=i,l=0;l<a;l++)u=u.replace(l<r?yx:bx,l<r?Mt.transform(s[l]):Ci(s[l]));return u}}var eP=function(e){return typeof e=="number"?0:e};function tP(e){var t=Sx(e),n=Cx(e);return n(t.map(eP))}var jn={test:Z2,parse:Sx,createTransformer:Cx,getAnimatableNone:tP},nP=new Set(["brightness","contrast","saturate","opacity"]);function rP(e){var t=e.slice(0,-1).split("("),n=t[0],r=t[1];if(n==="drop-shadow")return e;var i=(r.match(Vi)||[])[0];if(!i)return e;var a=r.replace(i,""),s=nP.has(n)?1:0;return i!==r&&(s*=100),n+"("+s+a+")"}var iP=/([a-z-]*)\(.*?\)/g,pl=de(de({},jn),{getAnimatableNone:function(e){var t=e.match(iP);return t?t.map(rP).join(" "):e}}),rp=de(de({},Ir),{transform:Math.round}),kx={borderWidth:ze,borderTopWidth:ze,borderRightWidth:ze,borderBottomWidth:ze,borderLeftWidth:ze,borderRadius:ze,radius:ze,borderTopLeftRadius:ze,borderTopRightRadius:ze,borderBottomRightRadius:ze,borderBottomLeftRadius:ze,width:ze,maxWidth:ze,height:ze,maxHeight:ze,size:ze,top:ze,right:ze,bottom:ze,left:ze,padding:ze,paddingTop:ze,paddingRight:ze,paddingBottom:ze,paddingLeft:ze,margin:ze,marginTop:ze,marginRight:ze,marginBottom:ze,marginLeft:ze,rotate:Jn,rotateX:Jn,rotateY:Jn,rotateZ:Jn,scale:za,scaleX:za,scaleY:za,scaleZ:za,skew:Jn,skewX:Jn,skewY:Jn,distance:ze,translateX:ze,translateY:ze,translateZ:ze,x:ze,y:ze,z:ze,perspective:ze,transformPerspective:ze,opacity:ki,originX:np,originY:np,originZ:ze,zIndex:rp,fillOpacity:ki,strokeOpacity:ki,numOctaves:rp};function Mc(e,t,n,r,i,a,s,u){var l,c=e.style,h=e.vars,f=e.transform,d=e.transformKeys,m=e.transformOrigin;d.length=0;var v=!1,x=!1,S=!0;for(var y in t){var k=t[y];if(gx(y)){h[y]=k;continue}var _=kx[y],P=K2(k,_);if(oo(y)){if(v=!0,f[y]=P,d.push(y),!S)continue;k!==((l=_.default)!==null&&l!==void 0?l:0)&&(S=!1)}else if(dx(y))m[y]=P,x=!0;else if(n!=null&&n.isHydrated&&(r!=null&&r.isHydrated)&&Si[y]){var w=Si[y].process(k,r,n),g=Si[y].applyTo;if(g)for(var E=g.length,D=0;D<E;D++)c[g[D]]=w;else c[y]=w}else c[y]=P}r&&n&&s&&u?(c.transform=s(r.deltaFinal,r.treeScale,v?f:void 0),a&&(c.transform=a(f,c.transform)),c.transformOrigin=u(r)):(v&&(c.transform=W2(e,i,S,a)),x&&(c.transformOrigin=q2(m)))}var Fc=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Ex(e,t,n){for(var r in t)!er(t[r])&&!mx(r,n)&&(e[r]=t[r])}function aP(e,t,n){var r=e.transformTemplate;return M.useMemo(function(){var i=Fc();Mc(i,t,void 0,void 0,{enableHardwareAcceleration:!n},r);var a=i.vars,s=i.style;return de(de({},a),s)},[t])}function sP(e,t,n){var r=e.style||{},i={};return Ex(i,r,e),Object.assign(i,aP(e,t,n)),e.transformValues&&(i=e.transformValues(i)),i}function oP(e,t,n){var r={},i=sP(e,t,n);return e.drag&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":"pan-"+(e.drag==="x"?"y":"x")),r.style=i,r}function uP(e){var t={};return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var lP=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,cP=uP(function(e){return lP.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});const fP=Object.freeze(Object.defineProperty({__proto__:null,default:cP},Symbol.toStringTag,{value:"Module"})),hP=zb(fP);var pP=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function Ts(e){return pP.has(e)}var _x=function(e){return!Ts(e)};try{var dP=hP.default;_x=function(e){return e.startsWith("on")?!Ts(e):dP(e)}}catch{}function mP(e,t,n){var r={};for(var i in e)(_x(i)||n===!0&&Ts(i)||!t&&!Ts(i))&&(r[i]=e[i]);return r}function ip(e,t,n){return typeof e=="string"?e:ze.transform(t+n*e)}function gP(e,t,n){var r=ip(t,e.x,e.width),i=ip(n,e.y,e.height);return r+" "+i}var Au=function(e,t){return ze.transform(e*t)},vP={offset:"strokeDashoffset",array:"strokeDasharray"};function xP(e,t,n,r,i,a){r===void 0&&(r=1),i===void 0&&(i=0);var s=vP;e[s.offset]=Au(-i,t);var u=Au(n,t),l=Au(r,t);e[s.array]=u+" "+l}function jc(e,t,n,r,i,a,s,u){var l=t.attrX,c=t.attrY,h=t.originX,f=t.originY,d=t.pathLength,m=t.pathSpacing,v=m===void 0?1:m,x=t.pathOffset,S=x===void 0?0:x,y=jt(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);Mc(e,y,n,r,i,a,s,u),e.attrs=e.style,e.style={};var k=e.attrs,_=e.style,P=e.dimensions,w=e.totalPathLength;k.transform&&(P&&(_.transform=k.transform),delete k.transform),P&&(h!==void 0||f!==void 0||_.transform)&&(_.transformOrigin=gP(P,h!==void 0?h:.5,f!==void 0?f:.5)),l!==void 0&&(k.x=l),c!==void 0&&(k.y=c),w!==void 0&&d!==void 0&&xP(k,w,d,v,S)}var Ix=function(){return de(de({},Fc()),{attrs:{}})};function yP(e,t){var n=M.useMemo(function(){var i=Ix();return jc(i,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),de(de({},i.attrs),{style:de({},i.style)})},[t]);if(e.style){var r={};Ex(r,e.style,e),n.style=de(de({},r),n.style)}return n}function bP(e){e===void 0&&(e=!1);var t=function(n,r,i,a,s){var u=a.latestValues,l=Dc(n)?yP:oP,c=l(r,u,s),h=mP(r,typeof n=="string",e),f=de(de(de({},h),c),{ref:i});return M.createElement(n,f)};return t}var wP=/([a-z])([A-Z])/g,SP="$1-$2",Tx=function(e){return e.replace(wP,SP).toLowerCase()};function Ax(e,t){var n=t.style,r=t.vars;Object.assign(e.style,n);for(var i in r)e.style.setProperty(i,r[i])}var Px=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function Rx(e,t){Ax(e,t);for(var n in t.attrs)e.setAttribute(Px.has(n)?n:Tx(n),t.attrs[n])}function Bc(e){var t=e.style,n={};for(var r in t)(er(t[r])||mx(r,e))&&(n[r]=t[r]);return n}function Nx(e){var t=Bc(e);for(var n in e)if(er(e[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function zc(e){return typeof e=="object"&&typeof e.start=="function"}var Mi=function(e){return Array.isArray(e)},CP=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},kP=function(e){return Mi(e)?e[e.length-1]||0:e};function EP(e){var t=er(e)?e.get():e;return CP(t)?t.toValue():t}function ap(e,t,n,r){var i=e.scrapeMotionValuesFromProps,a=e.createRenderState,s=e.onMount,u={latestValues:_P(t,n,r,i),renderState:a()};return s&&(u.mount=function(l){return s(t,l,u)}),u}var Ox=function(e){return function(t,n){var r=M.useContext(io),i=M.useContext(Gi);return n?ap(e,t,r,i):Li(function(){return ap(e,t,r,i)})}};function _P(e,t,n,r){var i={},a=(n==null?void 0:n.initial)===!1,s=r(e);for(var u in s)i[u]=EP(s[u]);var l=e.initial,c=e.animate,h=so(e),f=px(e);t&&f&&!h&&e.inherit!==!1&&(l??(l=t.initial),c??(c=t.animate));var d=a||l===!1?c:l;if(d&&typeof d!="boolean"&&!zc(d)){var m=Array.isArray(d)?d:[d];m.forEach(function(v){var x=hx(e,v);if(x){var S=x.transitionEnd;x.transition;var y=jt(x,["transitionEnd","transition"]);for(var k in y)i[k]=y[k];for(var k in S)i[k]=S[k]}})}return i}var IP={useVisualState:Ox({scrapeMotionValuesFromProps:Nx,createRenderState:Ix,onMount:function(e,t,n){var r=n.renderState,i=n.latestValues;try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}TP(t)&&(r.totalPathLength=t.getTotalLength()),jc(r,i,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Rx(t,r)}})};function TP(e){return e.tagName==="path"}var AP={useVisualState:Ox({scrapeMotionValuesFromProps:Bc,createRenderState:Fc})};function PP(e,t,n,r){var i=t.forwardMotionProps,a=i===void 0?!1:i,s=Dc(e)?IP:AP;return de(de({},s),{preloadedFeatures:n,useRender:bP(a),createVisualElement:r,Component:e})}var wt;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"})(wt||(wt={}));function $c(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function dl(e,t,n,r){M.useEffect(function(){var i=e.current;if(n&&i)return $c(i,t,n,r)},[e,t,n,r])}function RP(e){var t=e.whileFocus,n=e.visualElement,r=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(wt.Focus,!0)},i=function(){var a;(a=n.animationState)===null||a===void 0||a.setActive(wt.Focus,!1)};dl(n,"focus",t?r:void 0),dl(n,"blur",t?i:void 0)}function Lx(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Dx(e){var t=!!e.touches;return t}function NP(e){return function(t){var n=t instanceof MouseEvent,r=!n||n&&t.button===0;r&&e(t)}}var OP={pageX:0,pageY:0};function LP(e,t){t===void 0&&(t="page");var n=e.touches[0]||e.changedTouches[0],r=n||OP;return{x:r[t+"X"],y:r[t+"Y"]}}function DP(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Uc(e,t){return t===void 0&&(t="page"),{point:Dx(e)?LP(e,t):DP(e,t)}}function VP(e){return Uc(e,"client")}var Vx=function(e,t){t===void 0&&(t=!1);var n=function(r){return e(r,Uc(r))};return t?NP(n):n},MP=function(){return Ji&&window.onpointerdown===null},FP=function(){return Ji&&window.ontouchstart===null},jP=function(){return Ji&&window.onmousedown===null},BP={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},zP={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Mx(e){return MP()?e:FP()?zP[e]:jP()?BP[e]:e}function Kr(e,t,n,r){return $c(e,Mx(t),Vx(n,t==="pointerdown"),r)}function As(e,t,n,r){return dl(e,Mx(t),n&&Vx(n,t==="pointerdown"),r)}function Fx(e){var t=null;return function(){var n=function(){t=null};return t===null?(t=e,n):!1}}var sp=Fx("dragHorizontal"),op=Fx("dragVertical");function jx(e){var t=!1;if(e==="y")t=op();else if(e==="x")t=sp();else{var n=sp(),r=op();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function Bx(){var e=jx(!0);return e?(e(),!1):!0}function up(e,t,n){return function(r,i){var a;!Lx(r)||Bx()||(n==null||n(r,i),(a=e.animationState)===null||a===void 0||a.setActive(wt.Hover,t))}}function $P(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,i=e.visualElement;As(i,"pointerenter",t||r?up(i,!0,t):void 0),As(i,"pointerleave",n||r?up(i,!1,n):void 0)}var zx=function(e,t){return t?e===t?!0:zx(e,t.parentElement):!1};function Hc(e){return M.useEffect(function(){return function(){return e()}},[])}var Ps=function(e,t,n){return Math.min(Math.max(n,e),t)},Pu=.001,UP=.01,lp=10,HP=.05,WP=1;function qP(e){var t=e.duration,n=t===void 0?800:t,r=e.bounce,i=r===void 0?.25:r,a=e.velocity,s=a===void 0?0:a,u=e.mass,l=u===void 0?1:u,c,h;no(n<=lp*1e3,"Spring duration must be 10 seconds or less");var f=1-i;f=Ps(HP,WP,f),n=Ps(UP,lp,n/1e3),f<1?(c=function(x){var S=x*f,y=S*n,k=S-s,_=ml(x,f),P=Math.exp(-y);return Pu-k/_*P},h=function(x){var S=x*f,y=S*n,k=y*s+s,_=Math.pow(f,2)*Math.pow(x,2)*n,P=Math.exp(-y),w=ml(Math.pow(x,2),f),g=-c(x)+Pu>0?-1:1;return g*((k-_)*P)/w}):(c=function(x){var S=Math.exp(-x*n),y=(x-s)*n+1;return-Pu+S*y},h=function(x){var S=Math.exp(-x*n),y=(s-x)*(n*n);return S*y});var d=5/n,m=GP(c,h,d);if(n=n*1e3,isNaN(m))return{stiffness:100,damping:10,duration:n};var v=Math.pow(m,2)*l;return{stiffness:v,damping:f*2*Math.sqrt(l*v),duration:n}}var KP=12;function GP(e,t,n){for(var r=n,i=1;i<KP;i++)r=r-e(r)/t(r);return r}function ml(e,t){return e*Math.sqrt(1-t*t)}var JP=["duration","bounce"],YP=["stiffness","damping","mass"];function cp(e,t){return t.some(function(n){return e[n]!==void 0})}function XP(e){var t=de({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!cp(e,YP)&&cp(e,JP)){var n=qP(e);t=de(de(de({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Wc(e){var t=e.from,n=t===void 0?0:t,r=e.to,i=r===void 0?1:r,a=e.restSpeed,s=a===void 0?2:a,u=e.restDelta,l=jt(e,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},h=XP(l),f=h.stiffness,d=h.damping,m=h.mass,v=h.velocity,x=h.duration,S=h.isResolvedFromDuration,y=fp,k=fp;function _(){var P=v?-(v/1e3):0,w=i-n,g=d/(2*Math.sqrt(f*m)),E=Math.sqrt(f/m)/1e3;if(u??(u=Math.abs(i-n)<=1?.01:.4),g<1){var D=ml(E,g);y=function(R){var B=Math.exp(-g*E*R);return i-B*((P+g*E*w)/D*Math.sin(D*R)+w*Math.cos(D*R))},k=function(R){var B=Math.exp(-g*E*R);return g*E*B*(Math.sin(D*R)*(P+g*E*w)/D+w*Math.cos(D*R))-B*(Math.cos(D*R)*(P+g*E*w)-D*w*Math.sin(D*R))}}else if(g===1)y=function(R){return i-Math.exp(-E*R)*(w+(P+E*w)*R)};else{var F=E*Math.sqrt(g*g-1);y=function(R){var B=Math.exp(-g*E*R),G=Math.min(F*R,300);return i-B*((P+g*E*w)*Math.sinh(G)+F*w*Math.cosh(G))/F}}}return _(),{next:function(P){var w=y(P);if(S)c.done=P>=x;else{var g=k(P)*1e3,E=Math.abs(g)<=s,D=Math.abs(i-w)<=u;c.done=E&&D}return c.value=c.done?i:w,c},flipTarget:function(){var P;v=-v,P=[i,n],n=P[0],i=P[1],_()}}}Wc.needsInterpolation=function(e,t){return typeof e=="string"||typeof t=="string"};var fp=function(e){return 0},Fi=function(e,t,n){var r=t-e;return r===0?1:(n-e)/r},Qt=function(e,t,n){return-n*e+n*t+e},QP=function(e,t,n){var r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},ZP=[hl,zr,Br],hp=function(e){return ZP.find(function(t){return t.test(e)})},pp=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},$x=function(e,t){var n=hp(e),r=hp(t);Yt(!!n,pp(e)),Yt(!!r,pp(t)),Yt(n.transform===r.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var i=n.parse(e),a=r.parse(t),s=de({},i),u=n===Br?Qt:QP;return function(l){for(var c in s)c!=="alpha"&&(s[c]=u(i[c],a[c],l));return s.alpha=Qt(i.alpha,a.alpha,l),n.transform(s)}},gl=function(e){return typeof e=="number"},eR=function(e,t){return function(n){return t(e(n))}},Qi=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(eR)};function Ux(e,t){return gl(e)?function(n){return Qt(e,t,n)}:Mt.test(e)?$x(e,t):Wx(e,t)}var Hx=function(e,t){var n=Ct([],e),r=n.length,i=e.map(function(a,s){return Ux(a,t[s])});return function(a){for(var s=0;s<r;s++)n[s]=i[s](a);return n}},tR=function(e,t){var n=de(de({},e),t),r={};for(var i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ux(e[i],t[i]));return function(a){for(var s in r)n[s]=r[s](a);return n}};function dp(e){for(var t=jn.parse(e),n=t.length,r=0,i=0,a=0,s=0;s<n;s++)r||typeof t[s]=="number"?r++:t[s].hue!==void 0?a++:i++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:a}}var Wx=function(e,t){var n=jn.createTransformer(t),r=dp(e),i=dp(t);return Yt(r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers,"Complex values '"+e+"' and '"+t+"' too different to mix. Ensure all colors are of the same type."),Qi(Hx(r.parsed,i.parsed),n)},nR=function(e,t){return function(n){return Qt(e,t,n)}};function rR(e){if(typeof e=="number")return nR;if(typeof e=="string")return Mt.test(e)?$x:Wx;if(Array.isArray(e))return Hx;if(typeof e=="object")return tR}function iR(e,t,n){for(var r=[],i=n||rR(e[0]),a=e.length-1,s=0;s<a;s++){var u=i(e[s],e[s+1]);if(t){var l=Array.isArray(t)?t[s]:t;u=Qi(l,u)}r.push(u)}return r}function aR(e,t){var n=e[0],r=e[1],i=t[0];return function(a){return i(Fi(n,r,a))}}function sR(e,t){var n=e.length,r=n-1;return function(i){var a=0,s=!1;if(i<=e[0]?s=!0:i>=e[r]&&(a=r-1,s=!0),!s){for(var u=1;u<n&&!(e[u]>i||u===r);u++);a=u-1}var l=Fi(e[a],e[a+1],i);return t[a](l)}}function qx(e,t,n){var r=n===void 0?{}:n,i=r.clamp,a=i===void 0?!0:i,s=r.ease,u=r.mixer,l=e.length;Yt(l===t.length,"Both input and output ranges must be the same length"),Yt(!s||!Array.isArray(s)||s.length===l-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var c=iR(t,s,u),h=l===2?aR(e,c):sR(e,c);return a?function(f){return h(Ps(e[0],e[l-1],f))}:h}var uo=function(e){return function(t){return 1-e(1-t)}},qc=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},oR=function(e){return function(t){return Math.pow(t,e)}},Kx=function(e){return function(t){return t*t*((e+1)*t-e)}},uR=function(e){var t=Kx(e);return function(n){return(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))}},Gx=1.525,lR=4/11,cR=8/11,fR=9/10,Jx=function(e){return e},Kc=oR(2),hR=uo(Kc),Yx=qc(Kc),Xx=function(e){return 1-Math.sin(Math.acos(e))},Qx=uo(Xx),pR=qc(Qx),Gc=Kx(Gx),dR=uo(Gc),mR=qc(Gc),gR=uR(Gx),vR=4356/361,xR=35442/1805,yR=16061/1805,Rs=function(e){if(e===1||e===0)return e;var t=e*e;return e<lR?7.5625*t:e<cR?9.075*t-9.9*e+3.4:e<fR?vR*t-xR*e+yR:10.8*e*e-20.52*e+10.72},bR=uo(Rs),wR=function(e){return e<.5?.5*(1-Rs(1-e*2)):.5*Rs(e*2-1)+.5};function SR(e,t){return e.map(function(){return t||Yx}).splice(0,e.length-1)}function CR(e){var t=e.length;return e.map(function(n,r){return r!==0?r/(t-1):0})}function kR(e,t){return e.map(function(n){return n*t})}function is(e){var t=e.from,n=t===void 0?0:t,r=e.to,i=r===void 0?1:r,a=e.ease,s=e.offset,u=e.duration,l=u===void 0?300:u,c={done:!1,value:n},h=Array.isArray(i)?i:[n,i],f=kR(s&&s.length===h.length?s:CR(h),l);function d(){return qx(f,h,{ease:Array.isArray(a)?a:SR(h,a)})}var m=d();return{next:function(v){return c.value=m(v),c.done=v>=l,c},flipTarget:function(){h.reverse(),m=d()}}}function ER(e){var t=e.velocity,n=t===void 0?0:t,r=e.from,i=r===void 0?0:r,a=e.power,s=a===void 0?.8:a,u=e.timeConstant,l=u===void 0?350:u,c=e.restDelta,h=c===void 0?.5:c,f=e.modifyTarget,d={done:!1,value:i},m=s*n,v=i+m,x=f===void 0?v:f(v);return x!==v&&(m=x-i),{next:function(S){var y=-m*Math.exp(-S/l);return d.done=!(y>h||y<-h),d.value=d.done?x:x+y,d},flipTarget:function(){}}}var mp={keyframes:is,spring:Wc,decay:ER};function _R(e){if(Array.isArray(e.to))return is;if(mp[e.type])return mp[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?is:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Wc:is}function Zx(e,t,n){return n===void 0&&(n=0),e-t-n}function IR(e,t,n,r){return n===void 0&&(n=0),r===void 0&&(r=!0),r?Zx(t+-e,t,n):t-(e-t)+n}function TR(e,t,n,r){return r?e>=t+n:e<=-n}var AR=function(e){var t=function(n){var r=n.delta;return e(r)};return{start:function(){return En.update(t,!0)},stop:function(){return yi.update(t)}}};function e0(e){var t,n,r=e.from,i=e.autoplay,a=i===void 0?!0:i,s=e.driver,u=s===void 0?AR:s,l=e.elapsed,c=l===void 0?0:l,h=e.repeat,f=h===void 0?0:h,d=e.repeatType,m=d===void 0?"loop":d,v=e.repeatDelay,x=v===void 0?0:v,S=e.onPlay,y=e.onStop,k=e.onComplete,_=e.onRepeat,P=e.onUpdate,w=jt(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),g=w.to,E,D=0,F=w.duration,R,B=!1,G=!0,U,re=_R(w);!((n=(t=re).needsInterpolation)===null||n===void 0)&&n.call(t,r,g)&&(U=qx([0,100],[r,g],{clamp:!1}),r=0,g=100);var ee=re(de(de({},w),{from:r,to:g}));function se(){D++,m==="reverse"?(G=D%2===0,c=IR(c,F,x,G)):(c=Zx(c,F,x),m==="mirror"&&ee.flipTarget()),B=!1,_&&_()}function he(){E.stop(),k&&k()}function ge(L){if(G||(L=-L),c+=L,!B){var J=ee.next(Math.max(0,c));R=J.value,U&&(R=U(R)),B=G?J.done:c<=0}P==null||P(R),B&&(D===0&&(F??(F=c)),D<f?TR(c,F,x,G)&&se():he())}function be(){S==null||S(),E=u(ge),E.start()}return a&&be(),{stop:function(){y==null||y(),E.stop()}}}function t0(e,t){return t?e*(1e3/t):0}function PR(e){var t=e.from,n=t===void 0?0:t,r=e.velocity,i=r===void 0?0:r,a=e.min,s=e.max,u=e.power,l=u===void 0?.8:u,c=e.timeConstant,h=c===void 0?750:c,f=e.bounceStiffness,d=f===void 0?500:f,m=e.bounceDamping,v=m===void 0?10:m,x=e.restDelta,S=x===void 0?1:x,y=e.modifyTarget,k=e.driver,_=e.onUpdate,P=e.onComplete,w;function g(se){return a!==void 0&&se<a||s!==void 0&&se>s}function E(se){return a===void 0?s:s===void 0||Math.abs(a-se)<Math.abs(s-se)?a:s}function D(se){w==null||w.stop(),w=e0(de(de({},se),{driver:k,onUpdate:function(he){var ge;_==null||_(he),(ge=se.onUpdate)===null||ge===void 0||ge.call(se,he)},onComplete:P}))}function F(se){D(de({type:"spring",stiffness:d,damping:v,restDelta:S},se))}if(g(n))F({from:n,velocity:i,to:E(n)});else{var R=l*i+n;typeof y<"u"&&(R=y(R));var B=E(R),G=B===a?-1:1,U,re,ee=function(se){U=re,re=se,i=t0(se-U,Cs().delta),(G===1&&se>B||G===-1&&se<B)&&F({from:se,to:B,velocity:i})};D({type:"decay",from:n,velocity:i,timeConstant:h,power:l,restDelta:S,modifyTarget:y,onUpdate:g(R)?ee:void 0})}return{stop:function(){return w==null?void 0:w.stop()}}}var vl=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},gp=function(e){return vl(e)&&e.hasOwnProperty("z")},$a=function(e,t){return Math.abs(e-t)};function n0(e,t){if(gl(e)&&gl(t))return $a(e,t);if(vl(e)&&vl(t)){var n=$a(e.x,t.x),r=$a(e.y,t.y),i=gp(e)&&gp(t)?$a(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}var r0=function(e,t){return 1-3*t+3*e},i0=function(e,t){return 3*t-6*e},a0=function(e){return 3*e},Ns=function(e,t,n){return((r0(t,n)*e+i0(t,n))*e+a0(t))*e},s0=function(e,t,n){return 3*r0(t,n)*e*e+2*i0(t,n)*e+a0(t)},RR=1e-7,NR=10;function OR(e,t,n,r,i){var a,s,u=0;do s=t+(n-t)/2,a=Ns(s,r,i)-e,a>0?n=s:t=s;while(Math.abs(a)>RR&&++u<NR);return s}var LR=8,DR=.001;function VR(e,t,n,r){for(var i=0;i<LR;++i){var a=s0(t,n,r);if(a===0)return t;var s=Ns(t,n,r)-e;t-=s/a}return t}var as=11,Ua=1/(as-1);function MR(e,t,n,r){if(e===t&&n===r)return Jx;for(var i=new Float32Array(as),a=0;a<as;++a)i[a]=Ns(a*Ua,e,n);function s(u){for(var l=0,c=1,h=as-1;c!==h&&i[c]<=u;++c)l+=Ua;--c;var f=(u-i[c])/(i[c+1]-i[c]),d=l+f*Ua,m=s0(d,e,n);return m>=DR?VR(u,d,e,n):m===0?d:OR(u,l,l+Ua,e,n)}return function(u){return u===0||u===1?u:Ns(s(u),t,r)}}function FR(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,i=e.whileTap,a=e.visualElement,s=t||n||r||i,u=M.useRef(!1),l=M.useRef(null);function c(){var v;(v=l.current)===null||v===void 0||v.call(l),l.current=null}function h(){var v;return c(),u.current=!1,(v=a.animationState)===null||v===void 0||v.setActive(wt.Tap,!1),!Bx()}function f(v,x){h()&&(zx(a.getInstance(),v.target)?t==null||t(v,x):r==null||r(v,x))}function d(v,x){h()&&(r==null||r(v,x))}function m(v,x){var S;c(),!u.current&&(u.current=!0,l.current=Qi(Kr(window,"pointerup",f),Kr(window,"pointercancel",d)),n==null||n(v,x),(S=a.animationState)===null||S===void 0||S.setActive(wt.Tap,!0))}As(a,"pointerdown",s?m:void 0),Hc(c)}var wr=function(e){return function(t){return e(t),null}},jR={tap:wr(FR),focus:wr(RP),hover:wr($P)};function o0(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Os=function(e){return e*1e3},vp={linear:Jx,easeIn:Kc,easeInOut:Yx,easeOut:hR,circIn:Xx,circInOut:pR,circOut:Qx,backIn:Gc,backInOut:mR,backOut:dR,anticipate:gR,bounceIn:bR,bounceInOut:wR,bounceOut:Rs},xp=function(e){if(Array.isArray(e)){Yt(e.length===4,"Cubic bezier arrays must contain four numerical values.");var t=ht(e,4),n=t[0],r=t[1],i=t[2],a=t[3];return MR(n,r,i,a)}else if(typeof e=="string")return Yt(vp[e]!==void 0,"Invalid easing type '"+e+"'"),vp[e];return e},BR=function(e){return Array.isArray(e)&&typeof e[0]!="number"},yp=function(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&jn.test(t)&&!t.startsWith("url("))},xr=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Ha=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Ru=function(){return{type:"keyframes",ease:"linear",duration:.3}},zR=function(e){return{type:"keyframes",duration:.8,values:e}},bp={x:xr,y:xr,z:xr,rotate:xr,rotateX:xr,rotateY:xr,rotateZ:xr,scaleX:Ha,scaleY:Ha,scale:Ha,opacity:Ru,backgroundColor:Ru,color:Ru,default:Ha},$R=function(e,t){var n;return Mi(t)?n=zR:n=bp[e]||bp.default,de({to:t},n(t))},UR=de(de({},kx),{color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:pl,WebkitFilter:pl}),Jc=function(e){return UR[e]};function Yc(e,t){var n,r=Jc(e);return r!==pl&&(r=jn),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}function HR(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=jt(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}var wp=!1;function WR(e){var t=e.ease,n=e.times,r=e.yoyo,i=e.flip,a=e.loop,s=jt(e,["ease","times","yoyo","flip","loop"]),u=de({},s);return n&&(u.offset=n),s.duration&&(u.duration=Os(s.duration)),s.repeatDelay&&(u.repeatDelay=Os(s.repeatDelay)),t&&(u.ease=BR(t)?t.map(xp):xp(t)),s.type==="tween"&&(u.type="keyframes"),(r||a||i)&&(no(!wp,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),wp=!0,r?u.repeatType="reverse":a?u.repeatType="loop":i&&(u.repeatType="mirror"),u.repeat=a||r||i||s.repeat),s.type!=="spring"&&(u.type="keyframes"),u}function qR(e,t){var n,r=Xc(e,t)||{};return(n=r.delay)!==null&&n!==void 0?n:0}function KR(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=Ct([],ht(e.to)),e.to[0]=e.from),e}function GR(e,t,n){var r;return Array.isArray(t.to)&&((r=e.duration)!==null&&r!==void 0||(e.duration=.8)),KR(t),HR(e)||(e=de(de({},e),$R(n,t.to))),de(de({},t),WR(e))}function JR(e,t,n,r,i){var a,s=Xc(r,e),u=(a=s.from)!==null&&a!==void 0?a:t.get(),l=yp(e,n);u==="none"&&l&&typeof n=="string"?u=Yc(e,n):Sp(u)&&typeof n=="string"?u=Cp(n):!Array.isArray(n)&&Sp(n)&&typeof u=="string"&&(n=Cp(u));var c=yp(e,u);no(c===l,"You are trying to animate "+e+' from "'+u+'" to "'+n+'". '+u+" is not an animatable value - to enable this animation set "+u+" to a value animatable to "+n+" via the `style` property.");function h(){var d={from:u,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:function(m){return t.set(m)}};return s.type==="inertia"||s.type==="decay"?PR(de(de({},d),s)):e0(de(de({},GR(s,d,e)),{onUpdate:function(m){var v;d.onUpdate(m),(v=s.onUpdate)===null||v===void 0||v.call(s,m)},onComplete:function(){var m;d.onComplete(),(m=s.onComplete)===null||m===void 0||m.call(s)}}))}function f(){var d;return t.set(n),i(),(d=s==null?void 0:s.onComplete)===null||d===void 0||d.call(s),{stop:function(){}}}return!c||!l||s.type===!1?f:h}function Sp(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function Cp(e){return typeof e=="number"?0:Yc("",e)}function Xc(e,t){return e[t]||e.default||e}function Ls(e,t,n,r){return r===void 0&&(r={}),t.start(function(i){var a,s,u=JR(e,t,n,r,i),l=qR(r,e),c=function(){return s=u()};return l?a=setTimeout(c,Os(l)):c(),function(){clearTimeout(a),s==null||s.stop()}})}var YR=function(e){return/^\-?\d*\.?\d+$/.test(e)};function u0(e,t){e.indexOf(t)===-1&&e.push(t)}function l0(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var ss=(function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var n=this;return u0(this.subscriptions,t),function(){return l0(n.subscriptions,t)}},e.prototype.notify=function(t,n,r){var i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(var a=0;a<i;a++){var s=this.subscriptions[a];s&&s(t,n,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e})(),XR=function(e){return!isNaN(parseFloat(e))},QR=(function(){function e(t){var n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ss,this.velocityUpdateSubscribers=new ss,this.renderSubscribers=new ss,this.canTrackVelocity=!1,this.updateAndNotify=function(r,i){i===void 0&&(i=!0),n.prev=n.current,n.current=r;var a=Cs(),s=a.delta,u=a.timestamp;n.lastUpdated!==u&&(n.timeDelta=s,n.lastUpdated=u,En.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),i&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return En.postRender(n.velocityCheck)},this.velocityCheck=function(r){var i=r.timestamp;i!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=XR(this.current)}return e.prototype.onChange=function(t){return this.updateSubscribers.add(t)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?t0(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(t){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=t(r)}).then(function(){return n.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e})();function Sr(e){return new QR(e)}var c0=function(e){return function(t){return t.test(e)}},ZR={test:function(e){return e==="auto"},parse:function(e){return e}},f0=[Ir,ze,qr,Jn,Y2,J2,ZR],Wa=function(e){return f0.find(c0(e))},eN=Ct(Ct([],ht(f0)),[Mt,jn]),tN=function(e){return eN.find(c0(e))};function nN(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Sr(n))}function rN(e,t){var n=ao(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,a=i===void 0?{}:i;r.transition;var s=jt(r,["transitionEnd","transition"]);s=de(de({},s),a);for(var u in s){var l=kP(s[u]);nN(e,u,l)}}function iN(e,t,n){var r,i,a,s,u=Object.keys(t).filter(function(m){return!e.hasValue(m)}),l=u.length;if(l)for(var c=0;c<l;c++){var h=u[c],f=t[h],d=null;Array.isArray(f)&&(d=f[0]),d===null&&(d=(i=(r=n[h])!==null&&r!==void 0?r:e.readValue(h))!==null&&i!==void 0?i:t[h]),d!=null&&(typeof d=="string"&&YR(d)?d=parseFloat(d):!tN(d)&&jn.test(f)&&(d=Yc(h,f)),e.addValue(h,Sr(d)),(a=(s=n)[h])!==null&&a!==void 0||(s[h]=d),e.setBaseTarget(h,d))}}function aN(e,t){if(t){var n=t[e]||t.default||t;return n.from}}function sN(e,t,n){var r,i,a={};for(var s in e)a[s]=(r=aN(s,t))!==null&&r!==void 0?r:(i=n.getValue(s))===null||i===void 0?void 0:i.get();return a}function oN(e,t,n){n===void 0&&(n={}),e.notifyAnimationStart();var r;if(Array.isArray(t)){var i=t.map(function(s){return xl(e,s,n)});r=Promise.all(i)}else if(typeof t=="string")r=xl(e,t,n);else{var a=typeof t=="function"?ao(e,t,n.custom):t;r=h0(e,a,n)}return r.then(function(){return e.notifyAnimationComplete(t)})}function xl(e,t,n){var r;n===void 0&&(n={});var i=ao(e,t,n.custom),a=(i||{}).transition,s=a===void 0?e.getDefaultTransition()||{}:a;n.transitionOverride&&(s=n.transitionOverride);var u=i?function(){return h0(e,i,n)}:function(){return Promise.resolve()},l=!((r=e.variantChildren)===null||r===void 0)&&r.size?function(m){m===void 0&&(m=0);var v=s.delayChildren,x=v===void 0?0:v,S=s.staggerChildren,y=s.staggerDirection;return uN(e,t,x+m,S,y,n)}:function(){return Promise.resolve()},c=s.when;if(c){var h=ht(c==="beforeChildren"?[u,l]:[l,u],2),f=h[0],d=h[1];return f().then(d)}else return Promise.all([u(),l(n.delay)])}function h0(e,t,n){var r,i=n===void 0?{}:n,a=i.delay,s=a===void 0?0:a,u=i.transitionOverride,l=i.type,c=e.makeTargetAnimatable(t),h=c.transition,f=h===void 0?e.getDefaultTransition():h,d=c.transitionEnd,m=jt(c,["transition","transitionEnd"]);u&&(f=u);var v=[],x=l&&((r=e.animationState)===null||r===void 0?void 0:r.getState()[l]);for(var S in m){var y=e.getValue(S),k=m[S];if(!(!y||k===void 0||x&&cN(x,S))){var _=Ls(S,y,k,de({delay:s},f));v.push(_)}}return Promise.all(v).then(function(){d&&rN(e,d)})}function uN(e,t,n,r,i,a){n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1);var s=[],u=(e.variantChildren.size-1)*r,l=i===1?function(c){return c===void 0&&(c=0),c*r}:function(c){return c===void 0&&(c=0),u-c*r};return Array.from(e.variantChildren).sort(lN).forEach(function(c,h){s.push(xl(c,t,de(de({},a),{delay:n+l(h)})).then(function(){return c.notifyAnimationComplete(t)}))}),Promise.all(s)}function lN(e,t){return e.sortNodePosition(t)}function cN(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&r[t]!==!0;return r[t]=!1,i}var Qc=[wt.Animate,wt.Hover,wt.Tap,wt.Drag,wt.Focus,wt.Exit],fN=Ct([],ht(Qc)).reverse(),hN=Qc.length;function pN(e){return function(t){return Promise.all(t.map(function(n){var r=n.animation,i=n.options;return oN(e,r,i)}))}}function dN(e){var t=pN(e),n=gN(),r={},i=!0,a=function(h,f){var d=ao(e,f);if(d){d.transition;var m=d.transitionEnd,v=jt(d,["transition","transitionEnd"]);h=de(de(de({},h),v),m)}return h};function s(h){return r[h]!==void 0}function u(h){t=h(e)}function l(h,f){for(var d,m=e.getProps(),v=e.getVariantContext(!0)||{},x=[],S=new Set,y={},k=1/0,_=function(E){var D=fN[E],F=n[D],R=(d=m[D])!==null&&d!==void 0?d:v[D],B=xn(R),G=D===f?F.isActive:null;G===!1&&(k=E);var U=R===v[D]&&R!==m[D]&&B;if(U&&i&&e.manuallyAnimateOnMount&&(U=!1),F.protectedKeys=de({},y),!F.isActive&&G===null||!R&&!F.prevProp||zc(R)||typeof R=="boolean")return"continue";var re=mN(F.prevProp,R)||D===f&&F.isActive&&!U&&B||E>k&&B,ee=Array.isArray(R)?R:[R],se=ee.reduce(a,{});G===!1&&(se={});var he=F.prevResolvedValues,ge=he===void 0?{}:he,be=de(de({},ge),se),L=function(ye){re=!0,S.delete(ye),F.needsAnimating[ye]=!0};for(var J in be){var ue=se[J],A=ge[J];y.hasOwnProperty(J)||(ue!==A?Mi(ue)&&Mi(A)?o0(ue,A)?F.protectedKeys[J]=!0:L(J):ue!==void 0?L(J):S.add(J):ue!==void 0&&S.has(J)?L(J):F.protectedKeys[J]=!0)}F.prevProp=R,F.prevResolvedValues=se,F.isActive&&(y=de(de({},y),se)),i&&e.blockInitialAnimation&&(re=!1),re&&!U&&x.push.apply(x,Ct([],ht(ee.map(function(ye){return{animation:ye,options:de({type:D},h)}}))))},P=0;P<hN;P++)_(P);if(r=de({},y),S.size){var w={};S.forEach(function(E){var D=e.getBaseTarget(E);D!==void 0&&(w[E]=D)}),x.push({animation:w})}var g=!!x.length;return i&&m.initial===!1&&!e.manuallyAnimateOnMount&&(g=!1),i=!1,g?t(x):Promise.resolve()}function c(h,f,d){var m;return n[h].isActive===f?Promise.resolve():((m=e.variantChildren)===null||m===void 0||m.forEach(function(v){var x;return(x=v.animationState)===null||x===void 0?void 0:x.setActive(h,f)}),n[h].isActive=f,l(d,h))}return{isAnimated:s,animateChanges:l,setActive:c,setAnimateFunction:u,getState:function(){return n}}}function mN(e,t){return typeof t=="string"?t!==e:fx(t)?!o0(t,e):!1}function Dr(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gN(){var e;return e={},e[wt.Animate]=Dr(!0),e[wt.Hover]=Dr(),e[wt.Tap]=Dr(),e[wt.Drag]=Dr(),e[wt.Focus]=Dr(),e[wt.Exit]=Dr(),e}var vN={animation:wr(function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=dN(t)),zc(n)&&M.useEffect(function(){return n.subscribe(t)},[n])}),exit:wr(function(e){var t=e.custom,n=e.visualElement,r=ht(cx(),2),i=r[0],a=r[1],s=M.useContext(Gi);M.useEffect(function(){var u,l,c=(u=n.animationState)===null||u===void 0?void 0:u.setActive(wt.Exit,!i,{custom:(l=s==null?void 0:s.custom)!==null&&l!==void 0?l:t});!i&&(c==null||c.then(a))},[i])})},p0=(function(){function e(t,n,r){var i=this,a=r===void 0?{}:r,s=a.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(i.lastMoveEvent&&i.lastMoveEventInfo){var d=Ou(i.lastMoveEventInfo,i.history),m=i.startEvent!==null,v=n0(d.offset,{x:0,y:0})>=3;if(!(!m&&!v)){var x=d.point,S=Cs().timestamp;i.history.push(de(de({},x),{timestamp:S}));var y=i.handlers,k=y.onStart,_=y.onMove;m||(k&&k(i.lastMoveEvent,d),i.startEvent=i.lastMoveEvent),_&&_(i.lastMoveEvent,d)}}},this.handlePointerMove=function(d,m){if(i.lastMoveEvent=d,i.lastMoveEventInfo=Nu(m,i.transformPagePoint),Lx(d)&&d.buttons===0){i.handlePointerUp(d,m);return}En.update(i.updatePoint,!0)},this.handlePointerUp=function(d,m){i.end();var v=i.handlers,x=v.onEnd,S=v.onSessionEnd,y=Ou(Nu(m,i.transformPagePoint),i.history);i.startEvent&&x&&x(d,y),S&&S(d,y)},!(Dx(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=s;var u=Uc(t),l=Nu(u,this.transformPagePoint),c=l.point,h=Cs().timestamp;this.history=[de(de({},c),{timestamp:h})];var f=n.onSessionStart;f&&f(t,Ou(l,this.history)),this.removeListeners=Qi(Kr(window,"pointermove",this.handlePointerMove),Kr(window,"pointerup",this.handlePointerUp),Kr(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),yi.update(this.updatePoint)},e})();function Nu(e,t){return t?{point:t(e.point)}:e}function kp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ou(e,t){var n=e.point;return{point:n,delta:kp(n,d0(t)),offset:kp(n,xN(t)),velocity:yN(t,.1)}}function xN(e){return e[0]}function d0(e){return e[e.length-1]}function yN(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=d0(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Os(t)));)n--;if(!r)return{x:0,y:0};var a=(i.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};var s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function bN(e){return e}function m0(e){var t=e.top,n=e.left,r=e.right,i=e.bottom;return{x:{min:n,max:r},y:{min:t,max:i}}}function wN(e){var t=e.x,n=e.y;return{top:n.min,bottom:n.max,left:t.min,right:t.max}}function SN(e,t){var n=e.top,r=e.left,i=e.bottom,a=e.right;t===void 0&&(t=bN);var s=t({x:r,y:n}),u=t({x:a,y:i});return{top:s.y,left:s.x,bottom:u.y,right:u.x}}function tr(){return{x:{min:0,max:1},y:{min:0,max:1}}}function CN(e){return{x:de({},e.x),y:de({},e.y)}}var Ep={translate:0,scale:1,origin:0,originPoint:0};function _p(){return{x:de({},Ep),y:de({},Ep)}}function Kt(e){return[e("x"),e("y")]}function g0(e,t,n){var r=t.min,i=t.max;return r!==void 0&&e<r?e=n?Qt(r,e,n.min):Math.max(e,r):i!==void 0&&e>i&&(e=n?Qt(i,e,n.max):Math.min(e,i)),e}function kN(e,t,n,r,i){var a=e-t*n;return r?g0(a,r,i):a}function Ip(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function EN(e,t){var n=t.top,r=t.left,i=t.bottom,a=t.right;return{x:Ip(e.x,r,a),y:Ip(e.y,n,i)}}function Tp(e,t){var n,r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=ht([i,r],2),r=n[0],i=n[1]),{min:e.min+r,max:e.min+i}}function _N(e,t){return{x:Tp(e.x,t.x),y:Tp(e.y,t.y)}}function IN(e,t,n){var r=e.max-e.min,i=Qt(t.min,t.max-r,n);return{min:i,max:i+r}}function TN(e,t){var n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var v0=.35;function AN(e){return e===!1?e=0:e===!0&&(e=v0),{x:Ap(e,"left","right"),y:Ap(e,"top","bottom")}}function Ap(e,t,n){return{min:Pp(e,t),max:Pp(e,n)}}function Pp(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}function x0(e,t){var n=e.getBoundingClientRect();return m0(SN(n,t))}var PN=function(e){return Ps(0,1,e)};function Rp(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=.01),n0(e,t)<n}function ji(e){return e.max-e.min}function RN(e,t){var n=.5,r=ji(e),i=ji(t);return i>r?n=Fi(t.min,t.max-r,e.min):r>i&&(n=Fi(e.min,e.max-i,t.min)),PN(n)}function Np(e,t,n,r){r===void 0&&(r=.5),e.origin=r,e.originPoint=Qt(t.min,t.max,e.origin),e.scale=ji(n)/ji(t),Rp(e.scale,1,1e-4)&&(e.scale=1),e.translate=Qt(n.min,n.max,e.origin)-e.originPoint,Rp(e.translate)&&(e.translate=0)}function y0(e,t,n,r){Np(e.x,t.x,n.x,Op(r.originX)),Np(e.y,t.y,n.y,Op(r.originY))}function Op(e){return typeof e=="number"?e:.5}function Lp(e,t,n){e.min=n.min+t.min,e.max=e.min+ji(t)}function NN(e,t){Lp(e.target.x,e.relativeTarget.x,t.target.x),Lp(e.target.y,e.relativeTarget.y,t.target.y)}var Zc=function(e,t){return e.depth-t.depth};function b0(e){var t=e.projection.isEnabled;return t||e.shouldResetTransform()}function Ds(e,t){t===void 0&&(t=[]);var n=e.parent;return n&&Ds(n,t),b0(e)&&t.push(e),t}function ON(e){var t=[],n=function(r){b0(r)&&t.push(r),r.children.forEach(n)};return e.children.forEach(n),t.sort(Zc)}function os(e){if(!e.shouldResetTransform()){var t=e.getLayoutState();e.notifyBeforeLayoutMeasure(t.layout),t.isHydrated=!0,t.layout=e.measureViewportBox(),t.layoutCorrected=CN(t.layout),e.notifyLayoutMeasure(t.layout,e.prevViewportBox||t.layout),En.update(function(){return e.rebaseProjectionTarget()})}}function LN(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}function DN(e,t,n,r){e.min=Qt(t.min,n.min,r),e.max=Qt(t.max,n.max,r)}function Dp(e,t){return{min:t.min-e.min,max:t.max-e.min}}function Yr(e,t){return{x:Dp(e.x,t.x),y:Dp(e.y,t.y)}}function VN(e,t){var n=e.getLayoutId(),r=t.getLayoutId();return n!==r||r===void 0&&e!==t}function w0(e){var t=e.getProps(),n=t.drag,r=t._dragX;return n&&!r}function Vp(e,t){e.min=t.min,e.max=t.max}function MN(e,t){Vp(e.x,t.x),Vp(e.y,t.y)}function Vs(e,t,n){var r=e-n,i=t*r;return n+i}function Mp(e,t,n,r,i){return i!==void 0&&(e=Vs(e,i,r)),Vs(e,n,r)+t}function yl(e,t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=1),e.min=Mp(e.min,t,n,r,i),e.max=Mp(e.max,t,n,r,i)}function FN(e,t){var n=t.x,r=t.y;yl(e.x,n.translate,n.scale,n.originPoint),yl(e.y,r.translate,r.scale,r.originPoint)}function Fp(e,t,n,r){var i=ht(r,3),a=i[0],s=i[1],u=i[2];e.min=t.min,e.max=t.max;var l=n[u]!==void 0?n[u]:.5,c=Qt(t.min,t.max,l);yl(e,n[a],n[s],c,n.scale)}var S0=["x","scaleX","originX"],C0=["y","scaleY","originY"];function bl(e,t,n){Fp(e.x,t.x,n,S0),Fp(e.y,t.y,n,C0)}function jp(e,t,n,r,i){return e-=t,e=Vs(e,1/n,r),i!==void 0&&(e=Vs(e,1/i,r)),e}function jN(e,t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=1),r===void 0&&(r=.5);var a=Qt(e.min,e.max,r)-t;e.min=jp(e.min,t,n,a,i),e.max=jp(e.max,t,n,a,i)}function Bp(e,t,n){var r=ht(n,3),i=r[0],a=r[1],s=r[2];jN(e,t[i],t[a],t[s],t.scale)}function k0(e,t){Bp(e.x,t,S0),Bp(e.y,t,C0)}function BN(e,t,n){var r=n.length;if(r){t.x=t.y=1;for(var i,a,s=0;s<r;s++)i=n[s],a=i.getLayoutState().delta,t.x*=a.x.scale,t.y*=a.y.scale,FN(e,a),w0(i)&&bl(e,e,i.getLatestValues())}}function zN(e,t){t===void 0&&(t=!0);var n=e.getProjectionParent();if(!n)return!1;var r;return t?(r=Yr(n.projection.target,e.projection.target),k0(r,n.getLatestValues())):r=Yr(n.getLayoutState().layout,e.getLayoutState().layout),Kt(function(i){return e.setProjectionTargetAxis(i,r[i].min,r[i].max,!0)}),!0}var Ei=new Set;function zp(e,t,n){e[n]||(e[n]=[]),e[n].push(t)}function wl(e){return Ei.add(e),function(){return Ei.delete(e)}}function Sl(){if(Ei.size){var e=0,t=[[]],n=[],r=function(u){return zp(t,u,e)},i=function(u){zp(n,u,e),e++};Ei.forEach(function(u){u(r,i),e=0}),Ei.clear();for(var a=n.length,s=0;s<=a;s++)t[s]&&t[s].forEach($p),n[s]&&n[s].forEach($p)}}var $p=function(e){return e()},$N=new WeakMap,Up,UN=(function(){function e(t){var n=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic=tr(),this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=n,this.visualElement.enableLayoutProjection(),$N.set(n,this)}return e.prototype.start=function(t,n){var r=this,i=n===void 0?{}:n,a=i.snapToCursor,s=a===void 0?!1:a,u=i.cursorProgress,l=function(m){var v;r.stopMotion();var x=VP(m).point;(v=r.cancelLayout)===null||v===void 0||v.call(r),r.cancelLayout=wl(function(S,y){var k=Ds(r.visualElement),_=ON(r.visualElement),P=Ct(Ct([],ht(k)),ht(_)),w=!1;r.isLayoutDrag()&&r.visualElement.lockProjectionTarget(),y(function(){P.forEach(function(g){return g.resetTransform()})}),S(function(){os(r.visualElement),_.forEach(os)}),y(function(){P.forEach(function(g){return g.restoreTransform()}),s&&(w=r.snapToCursor(x))}),S(function(){var g=!!(r.getAxisMotionValue("x")&&!r.isExternalDrag());g||r.visualElement.rebaseProjectionTarget(!0,r.visualElement.measureViewportBox(!1)),r.visualElement.scheduleUpdateLayoutProjection();var E=r.visualElement.projection;Kt(function(D){if(!w){var F=E.target[D],R=F.min,B=F.max;r.cursorProgress[D]=u?u[D]:Fi(R,B,x[D])}var G=r.getAxisMotionValue(D);G&&(r.originPoint[D]=G.get())})}),y(function(){jr.update(),jr.preRender(),jr.render(),jr.postRender()}),S(function(){return r.resolveDragConstraints()})})},c=function(m,v){var x,S,y,k=r.props,_=k.drag,P=k.dragPropagation;_&&!P&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=jx(_),!r.openGlobalLock)||(Sl(),r.isDragging=!0,r.currentDirection=null,(S=(x=r.props).onDragStart)===null||S===void 0||S.call(x,m,v),(y=r.visualElement.animationState)===null||y===void 0||y.setActive(wt.Drag,!0))},h=function(m,v){var x,S,y,k,_=r.props,P=_.dragPropagation,w=_.dragDirectionLock;if(!(!P&&!r.openGlobalLock)){var g=v.offset;if(w&&r.currentDirection===null){r.currentDirection=HN(g),r.currentDirection!==null&&((S=(x=r.props).onDirectionLock)===null||S===void 0||S.call(x,r.currentDirection));return}r.updateAxis("x",v.point,g),r.updateAxis("y",v.point,g),(k=(y=r.props).onDrag)===null||k===void 0||k.call(y,m,v),Up=m}},f=function(m,v){return r.stop(m,v)},d=this.props.transformPagePoint;this.panSession=new p0(t,{onSessionStart:l,onStart:c,onMove:h,onSessionEnd:f},{transformPagePoint:d})},e.prototype.resolveDragConstraints=function(){var t=this,n=this.props,r=n.dragConstraints,i=n.dragElastic,a=this.visualElement.getLayoutState().layoutCorrected;r?this.constraints=cl(r)?this.resolveRefConstraints(a,r):EN(a,r):this.constraints=!1,this.elastic=AN(i),this.constraints&&!this.hasMutatedConstraints&&Kt(function(s){t.getAxisMotionValue(s)&&(t.constraints[s]=TN(a[s],t.constraints[s]))})},e.prototype.resolveRefConstraints=function(t,n){var r=this.props,i=r.onMeasureDragConstraints,a=r.transformPagePoint,s=n.current;Yt(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."),this.constraintsBox=x0(s,a);var u=_N(t,this.constraintsBox);if(i){var l=i(wN(u));this.hasMutatedConstraints=!!l,l&&(u=m0(l))}return u},e.prototype.cancelDrag=function(){var t,n;this.visualElement.unlockProjectionTarget(),(t=this.cancelLayout)===null||t===void 0||t.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(wt.Drag,!1)},e.prototype.stop=function(t,n){var r,i,a;(r=this.panSession)===null||r===void 0||r.end(),this.panSession=null;var s=this.isDragging;if(this.cancelDrag(),!!s){var u=n.velocity;this.animateDragEnd(u),(a=(i=this.props).onDragEnd)===null||a===void 0||a.call(i,t,n)}},e.prototype.snapToCursor=function(t){var n=this;return Kt(function(r){var i=n.props.drag;if(qa(r,i,n.currentDirection)){var a=n.getAxisMotionValue(r);if(a){var s=n.visualElement.getLayoutState().layout,u=s[r].max-s[r].min,l=s[r].min+u/2,c=t[r]-l;n.originPoint[r]=t[r],a.set(c)}else return n.cursorProgress[r]=.5,!0}}).includes(!0)},e.prototype.updateAxis=function(t,n,r){var i=this.props.drag;if(qa(t,i,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,r):this.updateVisualElementAxis(t,n)},e.prototype.updateAxisMotionValue=function(t,n){var r=this.getAxisMotionValue(t);if(!(!n||!r)){var i=this.originPoint[t]+n[t],a=this.constraints?g0(i,this.constraints[t],this.elastic[t]):i;r.set(a)}},e.prototype.updateVisualElementAxis=function(t,n){var r,i=this.visualElement.getLayoutState().layout[t],a=i.max-i.min,s=this.cursorProgress[t],u=kN(n[t],a,s,(r=this.constraints)===null||r===void 0?void 0:r[t],this.elastic[t]);this.visualElement.setProjectionTargetAxis(t,u,u+a)},e.prototype.setProps=function(t){var n=t.drag,r=n===void 0?!1:n,i=t.dragDirectionLock,a=i===void 0?!1:i,s=t.dragPropagation,u=s===void 0?!1:s,l=t.dragConstraints,c=l===void 0?!1:l,h=t.dragElastic,f=h===void 0?v0:h,d=t.dragMomentum,m=d===void 0?!0:d,v=jt(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=de({drag:r,dragDirectionLock:a,dragPropagation:u,dragConstraints:c,dragElastic:f,dragMomentum:m},v)},e.prototype.getAxisMotionValue=function(t){var n=this.props,r=n.layout,i=n.layoutId,a="_drag"+t.toUpperCase();if(this.props[a])return this.props[a];if(!r&&i===void 0)return this.visualElement.getValue(t,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var t=this.props,n=t._dragX,r=t._dragY;return n||r},e.prototype.animateDragEnd=function(t){var n=this,r=this.props,i=r.drag,a=r.dragMomentum,s=r.dragElastic,u=r.dragTransition,l=zN(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),c=this.constraints||{};if(l&&Object.keys(c).length&&this.isLayoutDrag()){var h=this.visualElement.getProjectionParent();if(h){var f=Yr(h.projection.targetFinal,c);Kt(function(m){var v=f[m],x=v.min,S=v.max;c[m]={min:isNaN(x)?void 0:x,max:isNaN(S)?void 0:S}})}}var d=Kt(function(m){var v;if(qa(m,i,n.currentDirection)){var x=(v=c==null?void 0:c[m])!==null&&v!==void 0?v:{},S=s?200:1e6,y=s?40:1e7,k=de(de({type:"inertia",velocity:a?t[m]:0,bounceStiffness:S,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10},u),x);return n.getAxisMotionValue(m)?n.startAxisValueAnimation(m,k):n.visualElement.startLayoutAnimation(m,k,l)}});return Promise.all(d).then(function(){var m,v;(v=(m=n.props).onDragTransitionEnd)===null||v===void 0||v.call(m)})},e.prototype.stopMotion=function(){var t=this;Kt(function(n){var r=t.getAxisMotionValue(n);r?r.stop():t.visualElement.stopLayoutAnimation()})},e.prototype.startAxisValueAnimation=function(t,n){var r=this.getAxisMotionValue(t);if(r){var i=r.get();return r.set(i),r.set(i),Ls(t,r,0,n)}},e.prototype.scalePoint=function(){var t=this,n=this.props,r=n.drag,i=n.dragConstraints;if(!(!cl(i)||!this.constraintsBox)){this.stopMotion();var a={x:0,y:0};Kt(function(s){a[s]=RN(t.visualElement.projection.target[s],t.constraintsBox[s])}),this.updateConstraints(function(){Kt(function(s){if(qa(s,r,null)){var u=IN(t.visualElement.projection.target[s],t.constraintsBox[s],a[s]),l=u.min,c=u.max;t.visualElement.setProjectionTargetAxis(s,l,c)}})}),setTimeout(Sl,1)}},e.prototype.updateConstraints=function(t){var n=this;this.cancelLayout=wl(function(r,i){var a=Ds(n.visualElement);i(function(){return a.forEach(function(s){return s.resetTransform()})}),r(function(){return os(n.visualElement)}),i(function(){return a.forEach(function(s){return s.restoreTransform()})}),r(function(){n.resolveDragConstraints()}),t&&i(t)})},e.prototype.mount=function(t){var n=this,r=t.getInstance(),i=Kr(r,"pointerdown",function(l){var c=n.props,h=c.drag,f=c.dragListener,d=f===void 0?!0:f;h&&d&&n.start(l)}),a=$c(window,"resize",function(){n.scalePoint()}),s=t.onLayoutUpdate(function(){n.isDragging&&n.resolveDragConstraints()}),u=t.prevDragCursor;return u&&this.start(Up,{cursorProgress:u}),function(){i==null||i(),a==null||a(),s==null||s(),n.cancelDrag()}},e})();function qa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function HN(e,t){t===void 0&&(t=10);var n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function WN(e){var t=e.dragControls,n=e.visualElement,r=M.useContext(ro).transformPagePoint,i=Li(function(){return new UN({visualElement:n})});i.setProps(de(de({},e),{transformPagePoint:r})),M.useEffect(function(){return t&&t.subscribe(i)},[i]),M.useEffect(function(){return i.mount(n)},[])}function qN(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,a=e.visualElement,s=t||n||r||i,u=M.useRef(null),l=M.useContext(ro).transformPagePoint,c={onSessionStart:i,onStart:n,onMove:t,onEnd:function(f,d){u.current=null,r&&r(f,d)}};M.useEffect(function(){u.current!==null&&u.current.updateHandlers(c)});function h(f){u.current=new p0(f,c,{transformPagePoint:l})}As(a,"pointerdown",s&&h),Hc(function(){return u.current&&u.current.end()})}var KN={pan:wr(qN),drag:wr(WN)},Bi;(function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"})(Bi||(Bi={}));var Cl;(function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"})(Cl||(Cl={}));function kl(e){return typeof e=="string"&&e.startsWith("var(--")}var E0=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function GN(e){var t=E0.exec(e);if(!t)return[,];var n=ht(t,3),r=n[1],i=n[2];return[r,i]}var JN=4;function El(e,t,n){n===void 0&&(n=1),Yt(n<=JN,'Max CSS variable fallback depth detected in property "'+e+'". This may indicate a circular fallback dependency.');var r=ht(GN(e),2),i=r[0],a=r[1];if(i){var s=window.getComputedStyle(t).getPropertyValue(i);return s?s.trim():kl(a)?El(a,t,n+1):a}}function YN(e,t,n){var r,i=jt(t,[]),a=e.getInstance();if(!(a instanceof HTMLElement))return{target:i,transitionEnd:n};n&&(n=de({},n)),e.forEachValue(function(c){var h=c.get();if(kl(h)){var f=El(h,a);f&&c.set(f)}});for(var s in i){var u=i[s];if(kl(u)){var l=El(u,a);l&&(i[s]=l,n&&((r=n[s])!==null&&r!==void 0||(n[s]=u)))}}return{target:i,transitionEnd:n}}function Hp(e,t){return e/(t.max-t.min)*100}function XN(e,t,n){var r=n.target;if(typeof e=="string")if(ze.test(e))e=parseFloat(e);else return e;var i=Hp(e,r.x),a=Hp(e,r.y);return i+"% "+a+"%"}var Wp="_$css";function QN(e,t){var n=t.delta,r=t.treeScale,i=e,a=e.includes("var("),s=[];a&&(e=e.replace(E0,function(x){return s.push(x),Wp}));var u=jn.parse(e);if(u.length>5)return i;var l=jn.createTransformer(e),c=typeof u[0]!="number"?1:0,h=n.x.scale*r.x,f=n.y.scale*r.y;u[0+c]/=h,u[1+c]/=f;var d=Qt(h,f,.5);typeof u[2+c]=="number"&&(u[2+c]/=d),typeof u[3+c]=="number"&&(u[3+c]/=d);var m=l(u);if(a){var v=0;m=m.replace(Wp,function(){var x=s[v];return v++,x})}return m}var hi={process:XN},ZN={borderRadius:de(de({},hi),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:hi,borderTopRightRadius:hi,borderBottomLeftRadius:hi,borderBottomRightRadius:hi,boxShadow:{process:QN}},qp=1e3,eO=(function(e){kr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.frameTarget=tr(),n.currentAnimationTarget=tr(),n.isAnimating={x:!1,y:!1},n.stopAxisAnimation={x:void 0,y:void 0},n.isAnimatingTree=!1,n.animate=function(r,i,a){a===void 0&&(a={});var s=a.originBox,u=a.targetBox,l=a.visibilityAction,c=a.shouldStackAnimate,h=a.onComplete,f=a.prevParent,d=jt(a,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),m=n.props,v=m.visualElement,x=m.layout;if(c===!1)return n.isAnimatingTree=!1,n.safeToRemove();if(!(n.isAnimatingTree&&c!==!0)){c&&(n.isAnimatingTree=!0),i=s||i,r=u||r;var S=!1,y=v.getProjectionParent();if(y){var k=y.prevViewportBox,_=y.getLayoutState().layout;f&&(u&&(_=f.getLayoutState().layout),s&&!VN(f,y)&&f.prevViewportBox&&(k=f.prevViewportBox)),k&&iO(f,s,u)&&(S=!0,i=Yr(k,i),r=Yr(_,r))}var P=nO(i,r),w=Kt(function(g){var E,D;if(x==="position"){var F=r[g].max-r[g].min;i[g].max=i[g].min+F}if(!v.projection.isTargetLocked)if(l!==void 0)v.setVisibility(l===Cl.Show);else return P?n.animateAxis(g,r[g],i[g],de(de({},d),{isRelative:S})):((D=(E=n.stopAxisAnimation)[g])===null||D===void 0||D.call(E),v.setProjectionTargetAxis(g,r[g].min,r[g].max,S))});return v.syncRender(),Promise.all(w).then(function(){n.isAnimatingTree=!1,h&&h(),v.notifyLayoutAnimationComplete()})}},n}return t.prototype.componentDidMount=function(){var n=this,r=this.props.visualElement;r.animateMotionValue=Ls,r.enableLayoutProjection(),this.unsubLayoutReady=r.onLayoutUpdate(this.animate),r.layoutSafeToRemove=function(){return n.safeToRemove()},F2(ZN)},t.prototype.componentWillUnmount=function(){var n=this;this.unsubLayoutReady(),Kt(function(r){var i,a;return(a=(i=n.stopAxisAnimation)[r])===null||a===void 0?void 0:a.call(i)})},t.prototype.animateAxis=function(n,r,i,a){var s=this,u,l,c=a===void 0?{}:a,h=c.transition,f=c.isRelative;if(!(this.isAnimating[n]&&zi(r,this.currentAnimationTarget[n]))){(l=(u=this.stopAxisAnimation)[n])===null||l===void 0||l.call(u),this.isAnimating[n]=!0;var d=this.props.visualElement,m=this.frameTarget[n],v=d.getProjectionAnimationProgress()[n];v.clearListeners(),v.set(0),v.set(0);var x=function(){var _=v.get()/qp;DN(m,i,r,_),d.setProjectionTargetAxis(n,m.min,m.max,f)};x();var S=v.onChange(x);this.stopAxisAnimation[n]=function(){s.isAnimating[n]=!1,v.stop(),S()},this.currentAnimationTarget[n]=r;var y=h||d.getDefaultTransition()||rO,k=Ls(n==="x"?"layoutX":"layoutY",v,qp,y&&Xc(y,"layout")).then(this.stopAxisAnimation[n]);return k}},t.prototype.safeToRemove=function(){var n,r;(r=(n=this.props).safeToRemove)===null||r===void 0||r.call(n)},t.prototype.render=function(){return null},t})(j.Component);function tO(e){var t=ht(cx(),2),n=t[1];return j.createElement(eO,de({},e,{safeToRemove:n}))}function nO(e,t){return!Gp(e)&&!Gp(t)&&(!zi(e.x,t.x)||!zi(e.y,t.y))}var Kp={min:0,max:0};function Gp(e){return zi(e.x,Kp)&&zi(e.y,Kp)}function zi(e,t){return e.min===t.min&&e.max===t.max}var rO={duration:.45,ease:[.4,0,.1,1]};function iO(e,t,n){return e||!e&&!(t||n)}var aO={layoutReady:function(e){return e.notifyLayoutReady()}};function _0(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var n=t===void 0?aO:t,r=n.layoutReady,i=n.parent;wl(function(a,s){var u=Array.from(e).sort(Zc),l=i?Ds(i):[];s(function(){var c=Ct(Ct([],ht(l)),ht(u));c.forEach(function(h){return h.resetTransform()})}),a(function(){u.forEach(os)}),s(function(){l.forEach(function(c){return c.restoreTransform()}),u.forEach(r)}),a(function(){u.forEach(function(c){c.isPresent&&(c.presence=Bi.Present)})}),s(function(){jr.preRender(),jr.render()}),a(function(){En.postRender(function(){return u.forEach(sO)}),e.clear()})}),Sl()}}}function sO(e){e.prevViewportBox=e.projection.target}var I0=M.createContext(_0()),oO=M.createContext(_0());function yr(e){return!!e.forceUpdate}var uO=(function(e){kr(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var n=this.props,r=n.syncLayout,i=n.framerSyncLayout,a=n.visualElement;yr(r)&&r.register(a),yr(i)&&i.register(a),a.onUnmount(function(){yr(r)&&r.remove(a),yr(i)&&i.remove(a)})},t.prototype.getSnapshotBeforeUpdate=function(){var n=this.props,r=n.syncLayout,i=n.visualElement;return yr(r)?r.syncUpdate():(LN(i),r.add(i)),null},t.prototype.componentDidUpdate=function(){var n=this.props.syncLayout;yr(n)||n.flush()},t.prototype.render=function(){return null},t})(M.Component);function lO(e){var t=M.useContext(I0),n=M.useContext(oO);return M.createElement(uO,de({},e,{syncLayout:t,framerSyncLayout:n}))}var cO={measureLayout:lO,layoutAnimation:tO},fO=function(){return{isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:tr(),targetFinal:tr()}};function T0(){return{isHydrated:!1,layout:tr(),layoutCorrected:tr(),treeScale:{x:1,y:1},delta:_p(),deltaFinal:_p(),deltaTransform:""}}var Jp=T0();function lo(e,t,n){var r=e.x,i=e.y,a=r.translate/t.x,s=i.translate/t.y,u="translate3d("+a+"px, "+s+"px, 0) ";if(n){var l=n.rotate,c=n.rotateX,h=n.rotateY;l&&(u+="rotate("+l+") "),c&&(u+="rotateX("+c+") "),h&&(u+="rotateY("+h+") ")}return u+="scale("+r.scale+", "+i.scale+")",!n&&u===hO?"":u}function A0(e){var t=e.deltaFinal;return t.x.origin*100+"% "+t.y.origin*100+"% 0"}var hO=lo(Jp.delta,Jp.treeScale,{}),Ka=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function pO(){var e=Ka.map(function(){return new ss}),t={},n={clearAllListeners:function(){return e.forEach(function(r){return r.clear()})},updatePropListeners:function(r){return Ka.forEach(function(i){var a;(a=t[i])===null||a===void 0||a.call(t);var s="on"+i,u=r[s];u&&(t[i]=n[s](u))})}};return e.forEach(function(r,i){n["on"+Ka[i]]=function(a){return r.add(a)},n["notify"+Ka[i]]=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r.notify.apply(r,Ct([],ht(a)))}}),n}function dO(e,t,n){var r;for(var i in t){var a=t[i],s=n[i];if(er(a))e.addValue(i,a);else if(er(s))e.addValue(i,Sr(a));else if(s!==a)if(e.hasValue(i)){var u=e.getValue(i);!u.hasAnimated&&u.set(a)}else e.addValue(i,Sr((r=e.getStaticValue(i))!==null&&r!==void 0?r:a))}for(var i in n)t[i]===void 0&&e.removeValue(i);return t}function mO(e,t,n,r){var i=e.delta,a=e.layout,s=e.layoutCorrected,u=e.treeScale,l=t.target;MN(s,a),BN(s,u,n),y0(i,s,l,r)}var gO=(function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){u0(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){l0(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(Zc),this.isDirty=!1,this.children.forEach(t)},e})();function vO(e){var t=e.getProjectionParent();if(!t){e.rebaseProjectionTarget();return}var n=Yr(t.getLayoutState().layout,e.getLayoutState().layout);Kt(function(r){e.setProjectionTargetAxis(r,n[r].min,n[r].max,!0)})}var P0=function(e){var t=e.treeType,n=t===void 0?"":t,r=e.build,i=e.getBaseTarget,a=e.makeTargetAnimatable,s=e.measureViewportBox,u=e.render,l=e.readValueFromInstance,c=e.resetTransform,h=e.restoreTransform,f=e.removeValueFromRenderState,d=e.sortNodePosition,m=e.scrapeMotionValuesFromProps;return function(v,x){var S=v.parent,y=v.props,k=v.presenceId,_=v.blockInitialAnimation,P=v.visualState;x===void 0&&(x={});var w=P.latestValues,g=P.renderState,E,D=pO(),F=fO(),R,B=F,G=w,U,re=T0(),ee,se=!1,he=new Map,ge=new Map,be={},L,J=de({},w),ue;function A(){E&&(Q.isProjectionReady()&&(bl(B.targetFinal,B.target,G),y0(re.deltaFinal,re.layoutCorrected,B.targetFinal,w)),ye(),u(E,g))}function ye(){var W=w;if(ee&&ee.isActive()){var ae=ee.getCrossfadeState(Q);ae&&(W=ae)}r(Q,g,W,B,re,x,y)}function ie(){D.notifyUpdate(w)}function fe(){if(Q.isProjectionReady()){var W=re.delta,ae=re.treeScale,ve=ae.x,Ee=ae.y,_e=re.deltaTransform;mO(re,B,Q.path,w),se&&Q.notifyViewportBoxUpdate(B.target,W),se=!1;var Ie=lo(W,ae);(Ie!==_e||ve!==ae.x||Ee!==ae.y)&&Q.scheduleRender(),re.deltaTransform=Ie}}function X(){Q.layoutTree.forEach(yO)}function H(W,ae){var ve=ae.onChange(function(_e){w[W]=_e,y.onUpdate&&En.update(ie,!1,!0)}),Ee=ae.onRenderRequest(Q.scheduleRender);ge.set(W,function(){ve(),Ee()})}var te=m(y);for(var me in te){var oe=te[me];w[me]!==void 0&&er(oe)&&oe.set(w[me],!1)}var K=so(y),Z=px(y),Q=de(de({treeType:n,current:null,depth:S?S.depth+1:0,parent:S,children:new Set,path:S?Ct(Ct([],ht(S.path)),[S]):[],layoutTree:S?S.layoutTree:new gO,presenceId:k,projection:F,variantChildren:Z?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(S!=null&&S.isMounted()),blockInitialAnimation:_,isMounted:function(){return!!E},mount:function(W){E=Q.current=W,Q.pointTo(Q),Z&&S&&!K&&(ue=S==null?void 0:S.addVariantChild(Q)),S==null||S.children.add(Q)},unmount:function(){yi.update(ie),yi.render(A),yi.preRender(Q.updateLayoutProjection),ge.forEach(function(W){return W()}),Q.stopLayoutAnimation(),Q.layoutTree.remove(Q),ue==null||ue(),S==null||S.children.delete(Q),U==null||U(),D.clearAllListeners()},addVariantChild:function(W){var ae,ve=Q.getClosestVariantNode();if(ve)return(ae=ve.variantChildren)===null||ae===void 0||ae.add(W),function(){return ve.variantChildren.delete(W)}},sortNodePosition:function(W){return!d||n!==W.treeType?0:d(Q.getInstance(),W.getInstance())},getClosestVariantNode:function(){return Z?Q:S==null?void 0:S.getClosestVariantNode()},scheduleUpdateLayoutProjection:S?S.scheduleUpdateLayoutProjection:function(){return En.preRender(Q.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return y.layoutId},getInstance:function(){return E},getStaticValue:function(W){return w[W]},setStaticValue:function(W,ae){return w[W]=ae},getLatestValues:function(){return w},setVisibility:function(W){Q.isVisible!==W&&(Q.isVisible=W,Q.scheduleRender())},makeTargetAnimatable:function(W,ae){return ae===void 0&&(ae=!0),a(Q,W,y,ae)},addValue:function(W,ae){Q.hasValue(W)&&Q.removeValue(W),he.set(W,ae),w[W]=ae.get(),H(W,ae)},removeValue:function(W){var ae;he.delete(W),(ae=ge.get(W))===null||ae===void 0||ae(),ge.delete(W),delete w[W],f(W,g)},hasValue:function(W){return he.has(W)},getValue:function(W,ae){var ve=he.get(W);return ve===void 0&&ae!==void 0&&(ve=Sr(ae),Q.addValue(W,ve)),ve},forEachValue:function(W){return he.forEach(W)},readValue:function(W){var ae;return(ae=w[W])!==null&&ae!==void 0?ae:l(E,W,x)},setBaseTarget:function(W,ae){J[W]=ae},getBaseTarget:function(W){if(i){var ae=i(y,W);if(ae!==void 0&&!er(ae))return ae}return J[W]}},D),{build:function(){return ye(),g},scheduleRender:function(){En.render(A,!1,!0)},syncRender:A,setProps:function(W){y=W,D.updatePropListeners(W),be=dO(Q,m(y),be)},getProps:function(){return y},getVariant:function(W){var ae;return(ae=y.variants)===null||ae===void 0?void 0:ae[W]},getDefaultTransition:function(){return y.transition},getVariantContext:function(W){if(W===void 0&&(W=!1),W)return S==null?void 0:S.getVariantContext();if(!K){var ae=(S==null?void 0:S.getVariantContext())||{};return y.initial!==void 0&&(ae.initial=y.initial),ae}for(var ve={},Ee=0;Ee<bO;Ee++){var _e=R0[Ee],Ie=y[_e];(xn(Ie)||Ie===!1)&&(ve[_e]=Ie)}return ve},enableLayoutProjection:function(){F.isEnabled=!0,Q.layoutTree.add(Q)},lockProjectionTarget:function(){F.isTargetLocked=!0},unlockProjectionTarget:function(){Q.stopLayoutAnimation(),F.isTargetLocked=!1},getLayoutState:function(){return re},setCrossfader:function(W){ee=W},isProjectionReady:function(){return F.isEnabled&&F.isHydrated&&re.isHydrated},startLayoutAnimation:function(W,ae,ve){ve===void 0&&(ve=!1);var Ee=Q.getProjectionAnimationProgress()[W],_e=ve?F.relativeTarget[W]:F.target[W],Ie=_e.min,Me=_e.max,ke=Me-Ie;return Ee.clearListeners(),Ee.set(Ie),Ee.set(Ie),Ee.onChange(function(Ne){Q.setProjectionTargetAxis(W,Ne,Ne+ke,ve)}),Q.animateMotionValue(W,Ee,0,ae)},stopLayoutAnimation:function(){Kt(function(W){return Q.getProjectionAnimationProgress()[W].stop()})},measureViewportBox:function(W){W===void 0&&(W=!0);var ae=s(E,x);return W||k0(ae,w),ae},getProjectionAnimationProgress:function(){return L||(L={x:Sr(0),y:Sr(0)}),L},setProjectionTargetAxis:function(W,ae,ve,Ee){Ee===void 0&&(Ee=!1);var _e;Ee?(F.relativeTarget||(F.relativeTarget=tr()),_e=F.relativeTarget[W]):(F.relativeTarget=void 0,_e=F.target[W]),F.isHydrated=!0,_e.min=ae,_e.max=ve,se=!0,D.notifySetAxisTarget()},rebaseProjectionTarget:function(W,ae){ae===void 0&&(ae=re.layout);var ve=Q.getProjectionAnimationProgress(),Ee=ve.x,_e=ve.y,Ie=!F.relativeTarget&&!F.isTargetLocked&&!Ee.isAnimating()&&!_e.isAnimating();(W||Ie)&&Kt(function(Me){var ke=ae[Me],Ne=ke.min,Fe=ke.max;Q.setProjectionTargetAxis(Me,Ne,Fe)})},notifyLayoutReady:function(W){vO(Q),Q.notifyLayoutUpdate(re.layout,Q.prevViewportBox||re.layout,W)},resetTransform:function(){return c(Q,E,y)},restoreTransform:function(){return h(E,g)},updateLayoutProjection:fe,updateTreeLayoutProjection:function(){Q.layoutTree.forEach(xO),En.preRender(X,!1,!0)},getProjectionParent:function(){if(R===void 0){for(var W=!1,ae=Q.path.length-1;ae>=0;ae--){var ve=Q.path[ae];if(ve.projection.isEnabled){W=ve;break}}R=W}return R},resolveRelativeTargetBox:function(){var W=Q.getProjectionParent();if(!(!F.relativeTarget||!W)&&(NN(F,W.projection),w0(W))){var ae=F.target;bl(ae,ae,W.getLatestValues())}},shouldResetTransform:function(){return!!y._layoutResetTransform},pointTo:function(W){B=W.projection,G=W.getLatestValues(),U==null||U(),U=Qi(W.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),W.onLayoutAnimationComplete(function(){var ae;Q.isPresent?Q.presence=Bi.Present:(ae=Q.layoutSafeToRemove)===null||ae===void 0||ae.call(Q)}))},isPresent:!0,presence:Bi.Entering});return Q}};function xO(e){e.resolveRelativeTargetBox()}function yO(e){e.updateLayoutProjection()}var R0=Ct(["initial"],ht(Qc)),bO=R0.length,wO=new Set(["width","height","top","left","right","bottom","x","y"]),N0=function(e){return wO.has(e)},SO=function(e){return Object.keys(e).some(N0)},O0=function(e,t){e.set(t,!1),e.set(t)},Ga=function(e){return e===Ir||e===ze},Yp;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(Yp||(Yp={}));var Xp=function(e,t){return parseFloat(e.split(", ")[t])},Qp=function(e,t){return function(n,r){var i=r.transform;if(i==="none"||!i)return 0;var a=i.match(/^matrix3d\((.+)\)$/);if(a)return Xp(a[1],t);var s=i.match(/^matrix\((.+)\)$/);return s?Xp(s[1],e):0}},CO=new Set(["x","y","z"]),kO=Di.filter(function(e){return!CO.has(e)});function EO(e){var t=[];return kO.forEach(function(n){var r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}var Zp={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Qp(4,13),y:Qp(5,14)},_O=function(e,t,n){var r=t.measureViewportBox(),i=t.getInstance(),a=getComputedStyle(i),s=a.display,u=a.top,l=a.left,c=a.bottom,h=a.right,f=a.transform,d={top:u,left:l,bottom:c,right:h,transform:f};s==="none"&&t.setStaticValue("display",e.display||"block"),t.syncRender();var m=t.measureViewportBox();return n.forEach(function(v){var x=t.getValue(v);O0(x,Zp[v](r,d)),e[v]=Zp[v](m,a)}),e},IO=function(e,t,n,r){n===void 0&&(n={}),r===void 0&&(r={}),t=de({},t),r=de({},r);var i=Object.keys(t).filter(N0),a=[],s=!1,u=[];if(i.forEach(function(c){var h=e.getValue(c);if(e.hasValue(c)){var f=n[c],d=t[c],m=Wa(f),v;if(Mi(d))for(var x=d.length,S=d[0]===null?1:0;S<x;S++)v?Yt(Wa(d[S])===v,"All keyframes must be of the same type"):(v=Wa(d[S]),Yt(v===m||Ga(m)&&Ga(v),"Keyframes must be of the same dimension as the current value"));else v=Wa(d);if(m!==v)if(Ga(m)&&Ga(v)){var y=h.get();typeof y=="string"&&h.set(parseFloat(y)),typeof d=="string"?t[c]=parseFloat(d):Array.isArray(d)&&v===ze&&(t[c]=d.map(parseFloat))}else m!=null&&m.transform&&(v!=null&&v.transform)&&(f===0||d===0)?f===0?h.set(v.transform(f)):t[c]=m.transform(d):(s||(a=EO(e),s=!0),u.push(c),r[c]=r[c]!==void 0?r[c]:t[c],O0(h,d))}}),u.length){var l=_O(t,e,u);return a.length&&a.forEach(function(c){var h=ht(c,2),f=h[0],d=h[1];e.getValue(f).set(d)}),e.syncRender(),{target:l,transitionEnd:r}}else return{target:t,transitionEnd:r}};function TO(e,t,n,r){return SO(t)?IO(e,t,n,r):{target:t,transitionEnd:r}}var AO=function(e,t,n,r){var i=YN(e,t,r);return t=i.target,r=i.transitionEnd,TO(e,t,n,r)};function PO(e){return window.getComputedStyle(e)}var L0={treeType:"dom",readValueFromInstance:function(e,t){if(oo(t)){var n=Jc(t);return n&&n.default||0}else{var r=PO(e);return(gx(t)?r.getPropertyValue(t):r[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox:function(e,t){var n=t.transformPagePoint;return x0(e,n)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var i=n.transformValues;r===void 0&&(r=!0);var a=t.transition,s=t.transitionEnd,u=jt(t,["transition","transitionEnd"]),l=sN(u,a||{},e);if(i&&(s&&(s=i(s)),u&&(u=i(u)),l&&(l=i(l))),r){iN(e,u,l);var c=AO(e,u,l,s);s=c.transitionEnd,u=c.target}return de({transition:a,transitionEnd:s},u)},scrapeMotionValuesFromProps:Bc,build:function(e,t,n,r,i,a,s){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden");var u=r.isEnabled&&i.isHydrated;Mc(t,n,r,i,a,s.transformTemplate,u?lo:void 0,u?A0:void 0)},render:Ax},RO=P0(L0),NO=P0(de(de({},L0),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return oo(t)?((n=Jc(t))===null||n===void 0?void 0:n.default)||0:(t=Px.has(t)?t:Tx(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Nx,build:function(e,t,n,r,i,a,s){var u=r.isEnabled&&i.isHydrated;jc(t,n,r,i,a,s.transformTemplate,u?lo:void 0,u?A0:void 0)},render:Rx})),OO=function(e,t){return Dc(e)?NO(t,{enableHardwareAcceleration:!1}):RO(t,{enableHardwareAcceleration:!0})},LO=de(de(de(de({},vN),jR),KN),cO),D0=V2(function(e,t){return PP(e,t,LO,OO)});function DO(){var e=M.useRef(!1),t=ht(M.useState(0),2),n=t[0],r=t[1];return Hc(function(){return e.current=!0}),M.useCallback(function(){!e.current&&r(n+1)},[n])}var ed=0;function VO(){var e=ed;return ed++,e}var Lu=function(e){var t=e.children,n=e.initial,r=e.isPresent,i=e.onExitComplete,a=e.custom,s=e.presenceAffectsLayout,u=Li(MO),l=Li(VO),c=M.useMemo(function(){return{id:l,initial:n,isPresent:r,custom:a,onExitComplete:function(h){u.set(h,!0);var f=!0;u.forEach(function(d){d||(f=!1)}),f&&(i==null||i())},register:function(h){return u.set(h,!1),function(){return u.delete(h)}}}},s?void 0:[r]);return M.useMemo(function(){u.forEach(function(h,f){return u.set(f,!1)})},[r]),j.useEffect(function(){!r&&!u.size&&(i==null||i())},[r]),j.createElement(Gi.Provider,{value:c},t)};function MO(){return new Map}var _l={};function Mr(e){return e.key||""}function FO(e,t){var n=_l.NODE_ENV!=="production"?new Set:null;e.forEach(function(r){var i=Mr(r);_l.NODE_ENV!=="production"&&n&&(n.has(i)&&console.warn('Children of AnimatePresence require unique keys. "'+i+'" is a duplicate.'),n.add(i)),t.set(i,r)})}function jO(e){var t=[];return M.Children.forEach(e,function(n){M.isValidElement(n)&&t.push(n)}),t}var BO=function(e){var t=e.children,n=e.custom,r=e.initial,i=r===void 0?!0:r,a=e.onExitComplete,s=e.exitBeforeEnter,u=e.presenceAffectsLayout,l=u===void 0?!0:u,c=DO(),h=M.useContext(I0);yr(h)&&(c=h.forceUpdate);var f=M.useRef(!0),d=jO(t),m=M.useRef(d),v=M.useRef(new Map).current,x=M.useRef(new Set).current;if(FO(d,v),f.current)return f.current=!1,j.createElement(j.Fragment,null,d.map(function(g){return j.createElement(Lu,{key:Mr(g),isPresent:!0,initial:i?void 0:!1,presenceAffectsLayout:l},g)}));for(var S=Ct([],ht(d)),y=m.current.map(Mr),k=d.map(Mr),_=y.length,P=0;P<_;P++){var w=y[P];k.indexOf(w)===-1?x.add(w):x.delete(w)}return s&&x.size&&(S=[]),x.forEach(function(g){if(k.indexOf(g)===-1){var E=v.get(g);if(E){var D=y.indexOf(g),F=function(){v.delete(g),x.delete(g);var R=m.current.findIndex(function(B){return B.key===g});m.current.splice(R,1),x.size||(m.current=d,c(),a&&a())};S.splice(D,0,j.createElement(Lu,{key:Mr(E),isPresent:!1,onExitComplete:F,custom:n,presenceAffectsLayout:l},E))}}}),S=S.map(function(g){var E=g.key;return x.has(E)?g:j.createElement(Lu,{key:Mr(g),isPresent:!0,presenceAffectsLayout:l},g)}),m.current=S,_l.NODE_ENV!=="production"&&s&&S.length>1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),j.createElement(j.Fragment,null,x.size?S:S.map(function(g){return M.cloneElement(g)}))},ef={border:"0px",clip:"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},zO=rn("span",{baseStyle:ef});pn&&(zO.displayName="VisuallyHidden");var $O=rn("input",{baseStyle:ef});pn&&($O.displayName="VisuallyHiddenInput");function At(){return At=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}function co(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var UO=["id","isRequired","isInvalid","isDisabled","isReadOnly"],HO=["getRootProps","htmlProps"],V0=Tc({strict:!1,name:"FormControlContext"}),WO=V0[0],ni=V0[1];function qO(e){var t=e.id,n=e.isRequired,r=e.isInvalid,i=e.isDisabled,a=e.isReadOnly,s=co(e,UO),u=fA(),l=t||"field-"+u,c=l+"-label",h=l+"-feedback",f=l+"-helptext",d=j.useState(!1),m=d[0],v=d[1],x=j.useState(!1),S=x[0],y=x[1],k=ns(),_=k[0],P=k[1],w=j.useCallback(function(R,B){return R===void 0&&(R={}),B===void 0&&(B=null),At({id:f},R,{ref:ks(B,function(G){G&&y(!0)})})},[f]),g=j.useCallback(function(R,B){var G,U;return R===void 0&&(R={}),B===void 0&&(B=null),At({},R,{ref:B,"data-focus":It(_),"data-disabled":It(i),"data-invalid":It(r),"data-readonly":It(a),id:(G=R.id)!=null?G:c,htmlFor:(U=R.htmlFor)!=null?U:l})},[l,i,_,r,a,c]),E=j.useCallback(function(R,B){return R===void 0&&(R={}),B===void 0&&(B=null),At({id:h},R,{ref:ks(B,function(G){G&&v(!0)}),"aria-live":"polite"})},[h]),D=j.useCallback(function(R,B){return R===void 0&&(R={}),B===void 0&&(B=null),At({},R,s,{ref:B,role:"group"})},[s]),F=j.useCallback(function(R,B){return R===void 0&&(R={}),B===void 0&&(B=null),At({},R,{ref:B,role:"presentation","aria-hidden":!0,children:R.children||"*"})},[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!a,isDisabled:!!i,isFocused:!!_,onFocus:P.on,onBlur:P.off,hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:y,id:l,labelId:c,feedbackId:h,helpTextId:f,htmlProps:s,getHelpTextProps:w,getErrorMessageProps:E,getRootProps:D,getLabelProps:g,getRequiredIndicatorProps:F}}var KO=ur(function(e,t){var n=Oc("Form",e),r=to(e),i=qO(r),a=i.getRootProps;i.htmlProps;var s=co(i,HO),u=or("chakra-form-control",e.className);return j.createElement(WO,{value:s},j.createElement(ax,{value:n},j.createElement(rn.div,At({},a({},t),{className:u,__css:n.container}))))});pn&&(KO.displayName="FormControl");var GO=ur(function(e,t){var n=ni(),r=Rc(),i=or("chakra-form__helper-text",e.className);return j.createElement(rn.div,At({},n==null?void 0:n.getHelpTextProps(e,t),{__css:r.helperText,className:i}))});pn&&(GO.displayName="FormHelperText");var JO=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"];function YO(e){var t,n,r,i=ni(),a=e.id,s=e.disabled,u=e.readOnly,l=e.required,c=e.isRequired,h=e.isInvalid,f=e.isReadOnly,d=e.isDisabled,m=e.onFocus,v=e.onBlur,x=co(e,JO),S=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&i!=null&&i.isInvalid&&S.push(i.feedbackId),i!=null&&i.hasHelpText&&S.push(i.helpTextId),At({},x,{"aria-describedby":S.join(" ")||void 0,id:a??(i==null?void 0:i.id),isDisabled:(t=s??d)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=u??f)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=l??c)!=null?r:i==null?void 0:i.isRequired,isInvalid:h??(i==null?void 0:i.isInvalid),onFocus:qt(i==null?void 0:i.onFocus,m),onBlur:qt(i==null?void 0:i.onBlur,v)})}var XO=ur(function(e,t){var n=Oc("FormError",e),r=to(e),i=ni();return i!=null&&i.isInvalid?j.createElement(ax,{value:n},j.createElement(rn.div,At({},i==null?void 0:i.getErrorMessageProps(r,t),{className:or("chakra-form__error-message",e.className),__css:At({display:"flex",alignItems:"center"},n.text)}))):null});pn&&(XO.displayName="FormErrorMessage");var QO=ur(function(e,t){var n=Rc(),r=ni();if(!(r!=null&&r.isInvalid))return null;var i=or("chakra-form__error-icon",e.className);return j.createElement(g2,At({ref:t,"aria-hidden":!0},e,{__css:n.icon,className:i}),j.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))});pn&&(QO.displayName="FormErrorIcon");var ZO=["className","children","requiredIndicator","optionalIndicator"],eL=ur(function(e,t){var n,r=sx("FormLabel",e),i=to(e);i.className;var a=i.children,s=i.requiredIndicator,u=s===void 0?j.createElement(M0,null):s,l=i.optionalIndicator,c=l===void 0?null:l,h=co(i,ZO),f=ni(),d=(n=f==null?void 0:f.getLabelProps(h,t))!=null?n:At({ref:t},h);return j.createElement(rn.label,At({},d,{className:or("chakra-form__label",i.className),__css:At({display:"block",textAlign:"start"},r)}),a,f!=null&&f.isRequired?u:c)});pn&&(eL.displayName="FormLabel");var M0=ur(function(e,t){var n=ni(),r=Rc();if(!(n!=null&&n.isRequired))return null;var i=or("chakra-form__required-indicator",e.className);return j.createElement(rn.span,At({},n==null?void 0:n.getRequiredIndicatorProps(e,t),{__css:r.requiredIndicator,className:i}))});pn&&(M0.displayName="RequiredIndicator");function Rt(){return Rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rt.apply(this,arguments)}var tL=Tc({name:"CheckboxGroupContext",strict:!1}),nL=tL[1];function tf(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var rL=["isIndeterminate","isChecked"];function iL(e){var t=D0;return"custom"in t&&typeof t.custom=="function"?t.custom(e):t(e)}var F0=iL(rn.svg),aL=function(t){return j.createElement(F0,Rt({width:"1.2em",viewBox:"0 0 12 10",variants:{unchecked:{opacity:0,strokeDashoffset:16},checked:{opacity:1,strokeDashoffset:0,transition:{duration:.2}}},style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16}},t),j.createElement("polyline",{points:"1.5 6 4.5 9 10.5 1"}))},sL=function(t){return j.createElement(F0,Rt({width:"1.2em",viewBox:"0 0 24 24",variants:{unchecked:{scaleX:.65,opacity:0},checked:{scaleX:1,opacity:1,transition:{scaleX:{duration:0},opacity:{duration:.02}}}},style:{stroke:"currentColor",strokeWidth:4}},t),j.createElement("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))},oL=function(t){var n=t.open,r=t.children;return j.createElement(BO,{initial:!1},n&&j.createElement(D0.div,{variants:{unchecked:{scale:.5},checked:{scale:1}},initial:"unchecked",animate:"checked",exit:"unchecked",style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},r))},uL=function(t){var n=t.isIndeterminate,r=t.isChecked,i=tf(t,rL),a=n?sL:aL;return j.createElement(oL,{open:r||n},j.createElement(a,i))},lL=["defaultIsChecked","defaultChecked","isChecked","isFocusable","onChange","isIndeterminate","name","value","tabIndex","aria-label","aria-labelledby","aria-invalid"];function cL(e){e===void 0&&(e={});var t=YO(e),n=t.isDisabled,r=t.isReadOnly,i=t.isRequired,a=t.isInvalid,s=t.id,u=t.onBlur,l=t.onFocus,c=t["aria-describedby"],h=e,f=h.defaultIsChecked,d=h.defaultChecked,m=d===void 0?f:d,v=h.isChecked,x=h.isFocusable,S=h.onChange,y=h.isIndeterminate,k=h.name,_=h.value,P=h.tabIndex,w=P===void 0?void 0:P,g=h["aria-label"],E=h["aria-labelledby"],D=h["aria-invalid"],F=tf(h,lL),R=Ic(F,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),B=Su(S),G=Su(u),U=Su(l),re=ns(),ee=re[0],se=re[1],he=ns(),ge=he[0],be=he[1],L=ns(),J=L[0],ue=L[1],A=M.useRef(null),ye=M.useState(!0),ie=ye[0],fe=ye[1],X=M.useState(!!m),H=X[0],te=X[1],me=oA(v,H),oe=me[0],K=me[1];Jv({condition:!!f,message:'The "defaultIsChecked" prop has been deprecated and will be removed in a future version. Please use the "defaultChecked" prop instead, which mirrors default React checkbox behavior.'});var Z=M.useCallback(function(ke){if(r||n){ke.preventDefault();return}oe||te(K?ke.target.checked:y?!0:ke.target.checked),B==null||B(ke)},[r,n,K,oe,y,B]);il(function(){A.current&&(A.current.indeterminate=!!y)},[y]),hA(function(){n&&se.off()},[n,se]);var Q=n&&!x,W=M.useCallback(function(ke){ke.key===" "&&ue.on()},[ue]),ae=M.useCallback(function(ke){ke.key===" "&&ue.off()},[ue]);il(function(){if(A.current){var ke=A.current.checked!==K;ke&&te(A.current.checked)}},[A.current]);var ve=M.useCallback(function(ke,Ne){ke===void 0&&(ke={}),Ne===void 0&&(Ne=null);var Fe=function(le){le.preventDefault(),ue.on()};return Rt({},ke,{ref:Ne,"data-active":It(J),"data-hover":It(ge),"data-checked":It(K),"data-focus":It(ee),"data-indeterminate":It(y),"data-disabled":It(n),"data-invalid":It(a),"data-readonly":It(r),"aria-hidden":!0,onMouseDown:qt(ke.onMouseDown,Fe),onMouseUp:qt(ke.onMouseUp,ue.off),onMouseEnter:qt(ke.onMouseEnter,be.on),onMouseLeave:qt(ke.onMouseLeave,be.off)})},[J,K,n,ee,ge,y,a,r,ue,be.off,be.on]),Ee=M.useCallback(function(ke,Ne){return ke===void 0&&(ke={}),Ne===void 0&&(Ne=null),Rt({},R,ke,{ref:ks(Ne,function(Fe){Fe&&fe(Fe.tagName==="LABEL")}),onClick:qt(ke.onClick,function(){if(!ie){var Fe;(Fe=A.current)==null||Fe.click(),nA(A.current,{nextTick:!0})}}),"data-disabled":It(n),"data-checked":It(K),"data-invalid":It(a)})},[R,n,K,a,ie]),_e=M.useCallback(function(ke,Ne){return ke===void 0&&(ke={}),Ne===void 0&&(Ne=null),Rt({},ke,{ref:ks(A,Ne),type:"checkbox",name:k,value:_,id:s,tabIndex:w,onChange:qt(ke.onChange,Z),onBlur:qt(ke.onBlur,G,se.off),onFocus:qt(ke.onFocus,U,se.on),onKeyDown:qt(ke.onKeyDown,W),onKeyUp:qt(ke.onKeyUp,ae),required:i,checked:K,disabled:Q,readOnly:r,"aria-label":g,"aria-labelledby":E,"aria-invalid":D?!!D:a,"aria-describedby":c,"aria-disabled":n,style:ef})},[k,_,s,Z,se.off,se.on,G,U,W,ae,i,K,Q,r,g,E,D,a,c,n,w]),Ie=M.useCallback(function(ke,Ne){return ke===void 0&&(ke={}),Ne===void 0&&(Ne=null),Rt({},ke,{ref:Ne,onMouseDown:qt(ke.onMouseDown,td),onTouchStart:qt(ke.onTouchStart,td),"data-disabled":It(n),"data-checked":It(K),"data-invalid":It(a)})},[K,n,a]),Me={isInvalid:a,isFocused:ee,isChecked:K,isActive:J,isHovered:ge,isIndeterminate:y,isDisabled:n,isReadOnly:r,isRequired:i};return{state:Me,getRootProps:Ee,getCheckboxProps:ve,getInputProps:_e,getLabelProps:Ie,htmlProps:R}}function td(e){e.preventDefault(),e.stopPropagation()}var fL=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],hL=rn("span",{baseStyle:{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0}}),pL=rn("label",{baseStyle:{cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"}}),j0=ur(function(e,t){var n=nL(),r=Rt({},n,e),i=Oc("Checkbox",r),a=to(e),s=a.spacing,u=s===void 0?"0.5rem":s,l=a.className,c=a.children,h=a.iconColor,f=a.iconSize,d=a.icon,m=d===void 0?j.createElement(uL,null):d,v=a.isChecked,x=a.isDisabled,S=x===void 0?n==null?void 0:n.isDisabled:x,y=a.onChange,k=a.inputProps,_=tf(a,fL),P=v;n!=null&&n.value&&a.value&&(P=n.value.includes(a.value));var w=y;n!=null&&n.onChange&&a.value&&(w=eA(n.onChange,y));var g=cL(Rt({},_,{isDisabled:S,isChecked:P,onChange:w})),E=g.state,D=g.getInputProps,F=g.getCheckboxProps,R=g.getLabelProps,B=g.getRootProps,G=j.useMemo(function(){return Rt({opacity:E.isChecked||E.isIndeterminate?1:0,transform:E.isChecked||E.isIndeterminate?"scale(1)":"scale(0.95)",fontSize:f,color:h},i.icon)},[h,f,E.isChecked,E.isIndeterminate,i.icon]),U=j.cloneElement(m,{__css:G,isIndeterminate:E.isIndeterminate,isChecked:E.isChecked});return j.createElement(pL,Rt({__css:i.container,className:or("chakra-checkbox",l)},B()),j.createElement("input",Rt({className:"chakra-checkbox__input"},D(k,t))),j.createElement(hL,Rt({__css:i.control,className:"chakra-checkbox__control"},F()),U),c&&j.createElement(rn.span,Rt({className:"chakra-checkbox__label"},R(),{__css:Rt({marginStart:u},i.label)}),c))});pn&&(j0.displayName="Checkbox");const dL=({label:e,isocode:t,isChecked:n,onToggle:r})=>T.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded py-0.5 text-xs text-grey-50 hover:bg-grey-700 hover:text-white",children:[T.jsx(j0,{className:"h-4",colorScheme:"primary",isChecked:n,onChange:r}),T.jsx("span",{className:"truncate",title:t,children:e})]}),mL=({detectedLanguageDetails:e,selectedIsocodes:t,onToggleIsocode:n})=>T.jsxs("div",{className:"mt-2 w-full rounded border border-grey-50 bg-grey-800 px-2 py-1.5",children:[T.jsx("p",{className:"mb-1.5 text-xs font-medium text-grey-100",children:"Detected locales"}),T.jsx("div",{className:"flex flex-col gap-1 overflow-y-auto",style:{maxHeight:"5rem"},children:e.map(r=>T.jsx(dL,{label:`${r.native} - ${r.isocode??""}`,isocode:r.isocode,isChecked:t.includes(r.isocode),onToggle:()=>n(r.isocode)},r.isocode))})]}),gL="Drop or Add a File !",vL=({getRootProps:e,getInputProps:t,isDragActive:n,file:r,error:i,onResetFile:a,detectedLanguageDetails:s,selectedIsocodes:u,onToggleIsocode:l,onClose:c,onImport:h,setError:f,hasNoSelection:d})=>T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"mt-4 space-y-2",children:[T.jsxs("div",{...e(),children:[T.jsx("input",{...t()}),T.jsx("div",{className:ft("min-h-[100px] rounded border border-dashed text-center text-sm",{"border-purple-500":n,"flex items-center justify-center":r}),children:r?T.jsxs("div",{className:"flex items-center justify-center gap-1 px-2",children:[T.jsx("p",{className:"min-w-0 flex-1 truncate",children:r.name}),T.jsx(Se.Tooltip,{label:"Remove file",container:St(),children:T.jsx("button",{type:"button",onClick:m=>{m.stopPropagation(),a()},className:"flex shrink-0 rounded p-1 text-grey-100 hover:bg-grey-700 hover:text-white","aria-label":"Remove file",children:T.jsx(st.FdClose,{className:"h-4 w-4"})})})]}):T.jsxs("div",{className:"flex min-h-[100px] w-full flex-col items-center justify-center text-grey-100",children:[T.jsx("p",{className:"max-w-md px-2 text-center text-xs ",children:'Drag and drop the file with ".json" or ".csv" extension here or click to select it from your computer.'}),T.jsx(st.FdDownload,{className:"mt-2 h-6 w-6 text-grey-200"})]})}),i&&T.jsx("div",{className:"flex items-center justify-center p-2",children:T.jsx("p",{className:"text-xs text-red-400",children:i})})]}),r&&s.length>0&&T.jsx(mL,{detectedLanguageDetails:s,selectedIsocodes:u,onToggleIsocode:l})]}),T.jsxs("div",{className:"mt-4 flex items-center justify-between gap-4",children:[T.jsxs("div",{className:"flex flex-row space-x-1 justify-center items-center text-purple-600 hover:underline cursor-pointer",onClick:()=>{window.open("https://developer.4d.com/qodly/4DQodlyPro/localization#exporting-and-importing-translations","_blank")},children:[T.jsx("p",{className:"text-xs",children:"How to Import an i18n File"}),T.jsx(st.FdOutload,{className:"ml-1 h-4 w-4 text-grey-50"})]}),T.jsxs("div",{className:"flex items-center space-x-2",children:[T.jsx("button",{onClick:c,className:"rounded border w-16 border-white px-2 py-1 text-xs font-medium text-grey-50 hover:bg-white hover:border-white hover:font-bold hover:text-primary-dark",children:"Cancel"}),T.jsx("button",{disabled:d,onClick:()=>{!i&&r?h():r||f(gL)},className:ft("rounded w-16 px-2 py-1 text-xs font-medium text-grey-50 bg-primary-dark",d&&"cursor-not-allowed opacity-50",!d&&"hover:border-white hover:border hover:bg-primary-hover hover:text-white hover:font-bold"),children:"Import"})]})]})]}),xL=({summary:e,onClose:t})=>T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"mt-4 space-y-4",children:[T.jsx("p",{className:"text-sm text-grey-100",children:"Summary"}),T.jsxs("div",{className:"rounded border border-grey-50 bg-grey-800 px-3 py-3 space-y-2",children:[T.jsxs("div",{className:"flex items-center justify-between text-xs",children:[T.jsx("span",{className:"text-grey-200",children:"Keys Imported"}),T.jsx("span",{className:"font-medium text-white",children:e.importedKeys})]}),T.jsxs("div",{className:"flex items-center justify-between text-xs",children:[T.jsx("span",{className:"text-grey-200",children:"Keys Merged"}),T.jsx("span",{className:"font-medium text-white",children:e.mergedKeys})]}),T.jsxs("div",{className:"flex items-center justify-between text-xs",children:[T.jsx("span",{className:"text-grey-200",children:"Keys Unchanged"}),T.jsx("span",{className:"font-medium text-white",children:e.unchangedKeys})]})]})]}),T.jsx("div",{className:"mt-4 flex justify-end",children:T.jsx("button",{onClick:t,className:"rounded border border-white px-4 py-1.5 text-xs font-medium text-grey-50 hover:bg-white hover:border-white hover:font-bold hover:text-primary-dark",children:"Close"})})]}),B0=({disable:e,enable:t,RenderTrigger:n})=>{const r=nr(),{state:{file:i,isOpen:a,supprtedExtension:s,error:u,content:l,detectedLanguages:c,selectedIsocodes:h,showSummaryView:f,summary:d},actions:m}=Se.useStateObject({file:null,error:"",isOpen:!1,fileType:"",supprtedExtension:[".json",".csv"],content:{},detectedLanguages:[],selectedIsocodes:[],showSummaryView:!1,summary:{importedKeys:0,mergedKeys:0,unchangedKeys:0}}),v=r.getWebformTabs(),{i18n:{keys:x}}=rr(),{allSupportedLanguages:S,userLanguages:{supported:y,primary:k},setUserLangSettings:_}=ir(),P=M.useMemo(()=>S.filter(ie=>c.includes(ie.isocode)),[S,c]),w=ie=>{const fe=new Set(y.map(te=>te.isocode)),X=ie.filter(te=>!fe.has(te));if(X.length===0)return;const H=X.map(te=>$r(te,S)).filter(te=>te!=null).map(te=>({isocode:te.isocode}));H.length!==0&&_({primary:y.length===0?H[0].isocode:k,supported:y.concat(H)})},{getRootProps:g,getInputProps:E,isDragActive:D}=U0.useDropzone({async onDropAccepted([ie]){if(s.find(fe=>ie.name.endsWith(fe))){m.setError(""),m.setFile(ie);const fe=await B(ie),X=ie.name.split(".").pop()||"";try{if(X==="csv"){const H=IT(fe);if(!H.valid){m.setError(H.message);return}const te=L(fe,X);m.setContent(te||{});const me=_T(fe);m.setDetectedLanguages(me),m.setSelectedIsocodes(me)}else{const H=JSON.parse(fe),te=TT(H,VT);if(!te.valid){m.setError(te.message);return}const me=L(fe,X);m.setContent(me||{});const oe=kT(H);m.setDetectedLanguages(oe),m.setSelectedIsocodes(oe)}}catch(H){m.setError(H.message||"Invalid file");return}}else m.setError(bT.DROP_EVENT_ERROR)},accept:{"application/*":s},multiple:!1}),F=()=>{m.setFileType(""),m.setError(""),m.setFile(null),m.setContent({}),m.setDetectedLanguages([]),m.setSelectedIsocodes([])},R=()=>{m.setIsOpen(!1),m.setShowSummaryView(!1),m.setSummary({importedKeys:0,mergedKeys:0,unchangedKeys:0}),F()},B=ie=>new Promise(fe=>{const X=new FileReader;X.onload=()=>fe(X.result),X.readAsText(ie)}),G=async(ie,fe,X)=>{if(X){const H=`WebForms/${fe}.WebForm`;await r.actions.setTabContent({path:H,content:ie.content}),Se.webformSubject.next({path:H,action:Se.WebformActions.RECOMPUTE,payload:ie.content.components})}else{const H={...ie};await Se.saveContent({verb:Se.DesignerRequestVerb.SAVE_CONTENT,content:H.content,path:`WebForms/${fe}.WebForm`})}},U=(ie,fe)=>{const{content:{components:X}}=xe.cloneDeep(ie);if(!X)return ie;const H=(oe,K,Z,Q)=>{if(Array.isArray(oe))oe.forEach((W,ae)=>{let ve="";Z==="Text"?ve=Array.isArray(W)?`${K}.[${ae}].children`:`${K}.[${ae}]`:ve=`${K}.[${ae}]`,H(W,ve,Z,Q)});else if(xe.isObject(oe))if(Object.keys(oe).length>1){const ae=Object.keys(oe),ve={};ae.forEach(_e=>{const Ie=xe.get(oe,_e);if(_e==="__t")xe.set(Q,`props.${K}`,Ie);else if(Ie&&_e.startsWith("states:")){const Me=_e.split(":"),ke=Me.map((Ne,Fe)=>Fe+1===Me.length?`i18n:${Ne}`:Ne).join(":");if(!Q.custom)return;xe.set(ve,`${ke}.${K}`,Ie)}else if(Ie){const Me=`i18n:${_e}`;if(!Q.custom)return;xe.set(ve,`${Me}.${K}`,Ie)}});const[Ee]=K.split(".");Object.entries(ve).forEach(([_e,Ie])=>{const Me=xe.get(Q,`props.${Ee}`,{}),ke=xe.get(Q,`custom.${_e}.${Ee}`);let Ne="";typeof ke=="string"||typeof Me=="string"?Ne=xe.get(Ie,Ee):Ne=xe.merge(ke||xe.cloneDeep(Me),xe.get(Ie,Ee)),xe.set(Q,`custom.${_e}.${Ee}`,Ne)})}else{const ae=Object.entries(oe)[0],ve=ae[0],Ee=ae[1];K=`${K}.${ve}`,H(Ee,K,Z,Q)}},te=Object.entries(fe);for(let oe=0;oe<te.length;oe++){const[K,Z]=te[oe],{resolverName:Q,...W}=Z,ae=xe.get(X,K);if(ae)if(Q==="Text"){const{custom:ve,props:Ee}=W;xe.set(X,K,{...ae,props:{...ae.props,...Ee},custom:{...ae.custom,...ve}})}else Object.entries(W).forEach(([ve,Ee])=>{const _e=xe.get(X,K);if(!_e)return;const Ie=xe.cloneDeep(_e);H(Ee,ve,Q,Ie),xe.set(X,K,Ie)})}const me=xe.cloneDeep(ie);return xe.set(me,"content.components",X),me},re=ie=>ie==null||typeof ie=="string"&&ie.trim()==="",ee=(ie,fe)=>{const X=ie&&xe.isObject(ie)?ie:{},H=fe&&xe.isObject(fe)?fe:{};if(re(H))return xe.cloneDeep(X);const te=xe.cloneDeep(X);for(const me of Object.keys(H)){const oe=H[me];if(!oe||!xe.isObject(oe))continue;const K=te[me],Z=new Set([...Object.keys(oe),...K&&xe.isObject(K)?Object.keys(K):[]]),Q={};for(const W of Z){const ae=xe.get(oe,W),ve=K&&xe.isObject(K)?xe.get(K,W):void 0;re(ae)?re(ve)||(Q[W]=ve):Q[W]=ae}for(const W of wT){const ae=xe.get(Q,W),ve=K&&xe.isObject(K)?xe.get(K,W):void 0;!re(ve)&&re(ae)&&xe.set(Q,W,ve)}te[me]=Q}return te},se=(ie,fe)=>{const X={importedKeys:0,mergedKeys:0,unchangedKeys:0},H=new Set(Object.keys(fe||{}));for(const te of H){const me=fe[te],oe=ie[te];if(!oe||!xe.isObject(oe)){X.importedKeys+=1;continue}const K=Object.keys(me);let Z=!1;for(const Q of K){const W=me[Q],ae=xe.get(oe,Q),ve=re(W)&&!re(ae),Ee=String(W??"")===String(ae??"");if(!ve&&!Ee){Z=!0;break}}K.length>0&&!Z?X.unchangedKeys+=1:Z&&(X.mergedKeys+=1)}for(const te of Object.keys(ie))H.has(te)||(X.unchangedKeys+=1);return X},he=async(ie,fe,X)=>{const{webforms:H,i18n:te}=ie,me=ee(x,te),oe=se(x,te);Se.i18nSubject.next({action:"set_content",payload:me});const K=Z=>{const Q=Z+1===fe.length?fe.length:Z,W=Math.ceil(Q/fe.length*100);Se.tasksManagerSubject.next({id:X,action:"update",type:"i18n",payload:{progress:W,status:W>=100?"finished":"ongoing"}})};if(re(H))return oe;for(let Z=0;Z<fe.length;Z++){const Q=fe[Z],W=v.find(Ie=>Ie.name===Q.name&&Ie.type==="webform"),ae=!!W,ve=ae?W:await Se.getNodeInfo({verb:Se.DesignerRequestVerb.GET_INFO,content:!0,path:`WebForms/${Q.name}.${Q.ext}`,as:"json"}),{name:Ee}=ve;if(!H[Ee]){K(Z);continue}const _e=U(ve,H[Ee]);await G(_e,Ee,ae),K(Z)}return oe},ge=ie=>{const fe=ig(ie),{data:X}=Al.parse(fe),H={};let te=[];return X.forEach((me,oe)=>{if(oe===0){te=me;return}let K="",Z="";me.forEach((Q,W)=>{if(W===0)K=Q;else if(W===1)Z=Q;else if(K.startsWith("i18n")){if(xe.has(H,K)&&xe.get(H,K))return;xe.set(H,K,Q)}else if(Q){const{webformName:ae,componentId:ve,propName:Ee}=BE(K);if(xe.set(H,`webforms.${ae}.${ve}.resolverName`,Z),Z==="Text"){const _e=iu(Q),Ie=te[W];Ie==="__t"?xe.set(H,`webforms.${ae}.${ve}.props.${Ee}`,_e):xe.set(H,`webforms.${ae}.${ve}.custom.i18n:${Ie}.${Ee}`,_e)}else{const _e=te[W];let Ie=_e==="i18nkey_default"?"default":_e;if(Ie.includes(":")){const Me=Ie.split(":");Ie=Me.map((ke,Ne)=>Ne===0?`states:${ke}`:Ne===Me.length-1?`i18n:${ke}`:ke).join(":")}xe.set(H,`${K}.${Ie}`,Q)}}})}),H},be=ie=>{const fe=JSON.parse(ie),X={},{webforms:H,i18n:te}=fe;return H&&Object.keys(H).forEach(oe=>{const K=xe.get(H,oe);Object.keys(K).forEach(Q=>{const W=xe.get(K,Q),{props:ae,resolverName:ve}=W;xe.set(X,`webforms.${oe}.${Q}.resolverName`,ve),Array.isArray(ae)&&ae.forEach(({__dataPath:Ee,__default:_e,...Ie})=>{if(ve==="Text"){const Me=iu(_e);xe.set(X,`webforms.${oe}.${Q}.props.doc`,Me),Object.keys(Ie).forEach(ke=>{const Ne=iu(Ie[ke]);xe.set(X,`webforms.${oe}.${Q}.custom.i18n:${ke}.doc`,Ne)})}else xe.set(X,`webforms.${oe}.${Q}.${Ee}.__t`,_e),Object.keys(Ie).forEach(Me=>{let ke=Me;if(ke.includes(":")){const Ne=ke.split(":");ke=Ne.map((Fe,yt)=>yt===0?`states:${Fe}`:yt===Ne.length-1?`i18n:${Fe}`:Fe).join(":")}xe.set(X,`webforms.${oe}.${Q}.${Ee}.${ke}`,Ie[Me])})})})}),te&&Object.keys(te).forEach(oe=>{const K=xe.get(te,oe);K&&Object.keys(K).forEach(Q=>{const W=xe.get(K,Q);xe.set(X,`i18n.${oe}.${Q}`,W)})}),X},L=(ie,fe)=>{switch(fe){case"csv":return ge(ie);case"json":return be(ie)}},J=async()=>{if(i){const ie=Il.generate().toString();try{Se.tasksManagerSubject.next({id:ie,action:"add",type:"i18n",payload:{date:new Date().toISOString(),progress:0,name:"Import i18n",status:"ongoing"}});const fe=await rg(),X=ET(l,h),H=await he(X,fe,ie);m.setSummary(H),m.setShowSummaryView(!0),w(h)}catch(fe){Se.tasksManagerSubject.next({id:ie,type:"i18n",action:"update",payload:{status:"canceled"}}),Se.tasksManagerSubject.next({id:ie,type:"i18n",action:"error",payload:{errorMessage:fe.message||"Import file error"}})}}};if(!t)return T.jsx(T.Fragment,{});const ue=()=>{m.setIsOpen(!0),F()},A=ie=>{m.setSelectedIsocodes(h.includes(ie)?h.filter(fe=>fe!==ie):[...h,ie])},ye=n?T.jsx(n,{onClick:ue,disabled:!!e}):T.jsx(Se.Tooltip,{label:"Import",container:St(),children:T.jsx("button",{disabled:e,className:ft("flex h-full flex-row items-center rounded p-1 disabled:opacity-50",{"cursor-not-allowed":e},{"hover:bg-primary-hover":!e}),onClick:ue,children:T.jsx(st.FdDownload,{className:"h-4 w-4"})})});return T.jsxs(T.Fragment,{children:[ye,T.jsx(Mg,{isOpen:a,onClose:R,title:f?"Import summary":"Import",children:f?T.jsx(xL,{summary:d,onClose:R}):T.jsx(vL,{getRootProps:g,getInputProps:E,isDragActive:D,file:i,error:u,onResetFile:F,detectedLanguages:c,detectedLanguageDetails:P,selectedIsocodes:h,onToggleIsocode:A,onClose:R,onImport:J,setError:m.setError,hasNoSelection:h.length===0})})]})},yL=({onClick:e})=>T.jsx(Se.Tooltip,{label:"Edit",container:St(),children:T.jsx("button",{"data-cy":"locales-list-item-edit-button",onClick:t=>{t.stopPropagation(),e()},className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",children:T.jsx(st.FdPen,{className:"h-4 w-4"})})}),bL=({onClick:e,disable:t})=>t?T.jsx(T.Fragment,{}):T.jsx(Se.Tooltip,{label:"Remove",container:St(),children:T.jsx("button",{"data-cy":"locales-list-item-remove-button",disabled:t,onClick:n=>{n.stopPropagation(),e()},className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",children:T.jsx(st.FdTrash,{className:"h-4 w-4"})})}),wL=({collapse:e,onClick:t})=>T.jsx(Se.Tooltip,{label:"Collapse",container:St(),children:T.jsx("button",{onClick:n=>{n.stopPropagation(),t()},className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",children:T.jsx(st.FdDown,{className:ft("h-4 w-4 ",{"-rotate-90":e})})})}),SL=({lang:e,onCancel:t,onConfirm:n})=>{var k,_,P;const{allSupportedLanguages:r}=ir(),{i18n:i}=rr(),a=M.useMemo(()=>{var g,E;const w=new Set;return(g=i==null?void 0:i.userLang)!=null&&g.primary&&w.add(i.userLang.primary),(E=i==null?void 0:i.userLang)!=null&&E.supported&&i.userLang.supported.forEach(D=>{w.add(D.isocode)}),r.filter(D=>!w.has(D.isocode))},[r,(k=i==null?void 0:i.userLang)==null?void 0:k.primary,(_=i==null?void 0:i.userLang)==null?void 0:_.supported]),{state:{supported:s,selectedLanguage:u,highlightedLanguageIndex:l},actions:c}=Se.useStateObject({supported:a,editing:!1,selectedLanguage:null,highlightedLanguageIndex:-1}),{isOpen:h,getToggleButtonProps:f,getMenuProps:d,getItemProps:m,getInputProps:v}=Ec({onSelectedItemChange:({selectedItem:w})=>{w&&(c.setSelectedLanguage({isocode:w.isocode}),c.setSupported(a))},onInputValueChange:({inputValue:w})=>{if(!w){c.setSupported(a);return}const g=new RegExp(xe.escapeRegExp(w),"gi"),E=a.filter(D=>!w||D.native.match(g)||D.isocode.match(g)||D.locale.match(g));c.setSupported(E)},items:s,itemToString:w=>{if(!w)return"";const g=$r(w.isocode,r);return g?`${g.locale} - ${g.native}`:w.isocode},onHighlightedIndexChange:({highlightedIndex:w})=>{c.setHighlightedLanguageIndex(w)}}),x=Se.useOutsideClick(()=>{u&&n(u)}),S=()=>{t()},y=()=>{u?n(u):t()};return T.jsxs("div",{className:"flex flex-row justify-between items-center border-1 mb-2 bg-grey-300 rounded border px-2 py-2 hover:cursor-pointer",ref:x,children:[T.jsxs("div",{children:[T.jsx("div",{className:ft("flex flex-col gap-1 border w-48",{"border-primary-dark rounded-t":h||u,rounded:!h}),children:T.jsxs("div",{className:"flex h-7 rounded bg-grey-300 w-full",children:[T.jsx("input",{"data-cy":"locales-new-language-input",placeholder:((P=$r(e==null?void 0:e.isocode,r))==null?void 0:P.locale)||"Select a language",className:"w-full cursor-pointer placeholder:text-grey-50 text-xs rounded text-grey-50 caret-grey-50 bg-grey-300 p-1.5 placeholder:text-xs focus:outline-none",...v({onKeyUp:w=>{w.key==="Enter"&&y()}}),autoFocus:!0}),T.jsx("button",{"aria-label":"toggle menu",className:"cursor-pointer rounded px-2",type:"button",...f({onClick:()=>{c.setSupported(a)}}),children:T.jsx(st.FdDown,{className:"w-4 h-4 text-green-50"})})]})}),T.jsx("ul",{className:`absolute z-10 w-48 max-h-80 overflow-scroll bg-grey-900 py-1 space-y-1 border-b border-x border-1 rounded-b border-primary-dark ${!(h&&s.length)&&"hidden"}`,...d(),children:h&&s.map((w,g)=>{const E=$r(w.isocode,r);return T.jsx("li",{className:ft("cursor-pointer text-grey-50 h-5 p-1","flex flex-col justify-center items-start",{"bg-primary-hover":g===l}),...m({item:w,index:g}),children:T.jsx("span",{className:"truncate text-xs text-justify flex justify-center items-center",children:`${E==null?void 0:E.native} - ${E==null?void 0:E.isocode}`})},w.isocode)})})]}),T.jsxs("div",{className:"flex space-x-1",children:[T.jsx(Se.Tooltip,{label:"Cancel",container:St(),children:T.jsx("button",{"data-cy":"locales-new-language-cancel-button",className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:S,children:T.jsx(st.FdClose,{className:"h-4 w-4 text-gray-50"})})}),T.jsx(Se.Tooltip,{label:"Confirm",container:St(),children:T.jsx("button",{"data-cy":"locales-new-language-confirm-button",className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",onClick:y,children:T.jsx(st.FdCheckCircle,{className:"h-4 w-4 text-gray-50"})})})]})]})},z0=({activate:e,...t})=>e?T.jsx(SL,{...t}):T.jsx(T.Fragment,{}),CL=({primary:e,selected:t,selectMode:n,lang:r,onSelect:i,onRemove:a,onEdit:s,"data-cy":u})=>{const{state:{hover:l,selected:c,collapse:h,editing:f},actions:{setHover:d,setSelected:m,setCollapse:v,setEditing:x}}=Se.useStateObject({hover:!1,selected:!1,collapse:!0,editing:!1}),{selectedLanguage:S,setSelectedLanguage:y}=ir(),{isocode:k,locale:_,native:P}=r||{isocode:"",locale:"",native:""},w=e===k,g=()=>{d(!0)},E=()=>{d(!1)},D=()=>{m(!c),i(k,!c)},F=()=>{x(!0)},R=()=>{a(k)},B=()=>{y(r)},G=re=>{x(!1),s(r,re)},U=()=>{x(!1)};return M.useEffect(()=>{m(t)},[t]),M.useEffect(()=>{w&&y(r)},[]),f?T.jsx(z0,{lang:r,activate:f,onCancel:U,onConfirm:G}):T.jsxs("div",{"data-cy":u,className:ft("border-[1px] mb-2 bg-grey-300 flex flex-col space-y-2 rounded px-2 py-2 hover:cursor-pointer",{"border-primary-dark":(S==null?void 0:S.isocode)===(r==null?void 0:r.isocode)}),onMouseEnter:g,onMouseLeave:E,onClick:B,children:[T.jsxs("div",{className:"flex flex-row justify-between items-center",children:[T.jsxs("div",{className:"flex flex-row space-x-1 text-gray-50",children:[l||n?T.jsx(Se.Checkbox,{className:ft("h-4 w-4 rounded"),isChecked:c,onChange:D}):T.jsx(T.Fragment,{}),T.jsx(st.FdLocalization,{className:ft("w-4 h-4",{hidden:n||l})}),T.jsx("span",{className:ft("text-xs",{"italic font-bold":w}),children:P})]}),T.jsxs("div",{className:"text-grey-50 flex flex-row items-center space-x-1",children:[w&&T.jsx("div",{className:"bg-primary-dark rounded p-0.5 text-xs text-center shrink-0 h-5 w-12",children:"Primary"}),T.jsx(yL,{onClick:F}),T.jsx(bL,{disable:w,onClick:R}),T.jsx(wL,{collapse:h,onClick:()=>v(!h)})]})]}),T.jsxs("div",{className:ft("ml-6 flex justify-between p-1 text-xs",{hidden:h}),children:[T.jsx("span",{className:"text-grey-50",children:"English name"}),T.jsx("span",{className:"text-grey-100",children:_})]}),T.jsxs("div",{className:ft("text-grey-50 ml-6 flex justify-between p-1 text-xs",{hidden:h}),children:[T.jsx("span",{className:"text-grey-50",children:"Iso Code"}),T.jsx("span",{className:"text-grey-100",children:k})]})]})},kL=()=>{const{state:{selectedLanguages:e,shouldAddNewLocal:t,selectAll:n},actions:r}=Se.useStateObject({selectAll:!1,selectedLanguages:[],shouldAddNewLocal:!1,allSupportedLanguages:[]}),{userLanguages:{supported:i=[],primary:a},addFirstLanguage:s,setAddFirstLanguage:u,setUserLangSettings:l,setSelectedLanguage:c,allSupportedLanguages:h}=ir(),{editLanguageKeys:f,deleteLanguageKeys:d}=rr(),m=J0(e),v=Y0(e),x=nr(),S=x.getI18nCurrent(),y=x.getTabs(),k=(re,ee)=>{const se=ee?e.concat(re):e.filter(he=>he!==re);r.setSelectedLanguages(se),n&&r.setSelectAll(!1)},_=re=>{r.setShouldAddNewLocal(re)},P=()=>{r.setSelectAll(!n),n?r.setSelectedLanguages([]):r.setSelectedLanguages(i.map(re=>re.isocode))},w=re=>{const ee={primary:i.length===0?re.isocode:a,supported:i.concat(re)};l(ee),r.setShouldAddNewLocal(!1)};M.useEffect(()=>{s&&r.setShouldAddNewLocal(!0)},[s]);const g=(re,ee)=>{const se=`i18n:${ee}`,he=`:i18n:${ee}`,ge=be=>{be.custom&&Object.keys(be.custom).forEach(L=>{(L.includes(se)||L.endsWith(he))&&delete be.custom[L]})};return Object.values(re).forEach(be=>ge(be)),re},E=(re,ee)=>re.map(se=>{var ge;const he=xe.cloneDeep(se);return(ge=he.content)!=null&&ge.components&&(he.content={...he.content,components:g({...he.content.components},ee)}),he}),D=(re,ee,se)=>{const he=`i18n:${ee}`,ge=`:i18n:${ee}`,be=L=>{L.custom&&Object.keys(L.custom).forEach(J=>{if(J===he){const ue=L.custom[J];delete L.custom[J],L.custom[`i18n:${se}`]=ue}else if(J.endsWith(ge)){const ue=L.custom[J];delete L.custom[J];const A=J.replace(`:i18n:${ee}`,`:i18n:${se}`);L.custom[A]=ue}})};return Object.values(re).forEach(L=>be(L)),re},F=(re,ee,se)=>re.map(he=>{var be;const ge=xe.cloneDeep(he);return(be=ge.content)!=null&&be.components&&(ge.content={...ge.content,components:D({...ge.content.components},ee,se)}),ge}),R=async re=>{const{confirmed:ee}=await x.actions.openModal({title:"Delete Language",message:"Your translations will be lost , want to proceed ?",type:Se.ModalType.CONFIRM,color:Se.ModalColor.WARNING,icon:"FdWarningDanger"});if(!ee)return;d({isocode:re});const se=E(y,re);x.actions.setTabs(se);const he={primary:a,supported:i.filter(ge=>ge.isocode!==re)};l(he),e.includes(re)&&r.setSelectedLanguages(e.filter(ge=>ge!==re)),he.supported.length===0&&u(!1),re===S&&x.actions.setI18nCurrent("")},B=(re,ee)=>{const se={primary:a===re.isocode?ee.isocode:a,supported:i.map(ge=>ge.isocode===re.isocode?ee:ge)},he=F(y,re.isocode,ee.isocode);x.actions.setTabs(he),S===re.isocode&&x.actions.setI18nCurrent(ee.isocode),f(re,ee),l(se),c(ee)},G=()=>{_(!1),i.length===0&&u(!1)},U=()=>{t?Se.toastSubject.next({kind:"warning",message:"To add a new locale, please confirm your selection by clicking 'Confirm'"}):_(!0)};return T.jsxs("div",{className:"flex w-72 flex-col space-y-2 px-2 py-3 shrink-0",children:[T.jsxs("div",{className:"text-grey-50 flex flex-row justify-between",children:[T.jsxs("div",{className:"flex flex-row items-center justify-center space-x-2 text-sm",children:[T.jsx(st.FdLocalization,{className:"h-4 w-4"}),T.jsx("span",{className:"text-sm text-gray-50",children:"Locales "})]}),T.jsxs("div",{className:"space-x-2",children:[T.jsx(Se.Tip,{tipKey:"editors:i18n:locals",alwaysOn:!0}),T.jsx(Se.Tooltip,{label:"Add new language",container:St(),children:T.jsx("button",{"data-cy":"locales-header-add-button",onClick:U,className:"cursor-pointer rounded p-1 hover:bg-primary-hover focus:outline-none",children:T.jsx(st.FdPlus,{className:"h-4 w-4 text-gray-50"})})})]})]}),T.jsxs("div",{className:"flex px-[5px] justify-between text-gray-50",children:[T.jsxs("div",{"data-cy":"locales-select-all-checkbox",className:ft("text-grey-50 flex items-center justify-center space-x-1",{visible:m,invisible:!m}),children:[T.jsx(Se.Checkbox,{isChecked:n,onChange:P}),T.jsx("span",{className:"text-xs",children:"Select all"})]}),T.jsxs("div",{className:"flex flex-row items-center justify-center space-x-1",children:[T.jsx(yT,{"data-cy":"localization-export-button",enable:!0,disable:!1,toExport:e}),T.jsx(B0,{"data-cy":"localization-import-button",enable:!0,disable:!1})]})]}),T.jsx(z0,{activate:t,onConfirm:w,onCancel:G}),T.jsx("div",{style:{height:t?"calc(100vh - 14.75rem)":"calc(100vh - 11.75rem)"},children:T.jsx($0,{"data-cy":"locales-list",style:{height:"100%",width:"100%"},children:[...i].sort(re=>re.isocode===a?-1:1).map((re,ee)=>{const se=$r(re.isocode,h);return T.jsx(CL,{"data-cy":`locales-list-item-${se==null?void 0:se.isocode}`,primary:a,selected:n||e.includes(se==null?void 0:se.isocode),lang:se,onSelect:k,selectMode:v,onRemove:R,onEdit:B},ee)})})})]})},EL=({onAddLocal:e})=>T.jsxs("div",{"data-cy":"localization-empty-view",className:"flex flex-col justify-center items-center space-y-3 pb-[30%] w-full h-full bg-grey-800",children:[T.jsx(st.FdInfoBold,{className:"h-8 w-8 text-grey-200"}),T.jsx("span",{className:"text-grey-200 text-sm text-center",children:"No locale is available yet. Add a new one or import a locale."}),T.jsxs("div",{className:"flex flex-row items-center justify-center space-x-2",children:[T.jsxs("div",{"data-cy":"localization-empty-add-button",className:"flex flex-row items-center justify-center px-2 py-1 space-x-1 bg-primary-dark rounded cursor-pointer",onClick:e,children:[T.jsx(st.FdPlus,{className:"h-4 w-4 text-grey-50"}),T.jsx("span",{className:"text-grey-50 text-sm",children:"Add new Locale"})]}),T.jsx(B0,{enable:!0,RenderTrigger:({onClick:t})=>T.jsxs("div",{className:"flex flex-row items-center justify-center px-2 py-1 space-x-1 bg-primary-dark rounded text-grey-50 text-sm disabled:opacity-50 cursor-pointer",onClick:t,children:[T.jsx(st.FdDownload,{className:"h-4 w-4 text-grey-50"}),T.jsx("span",{className:"text-grey-50 text-sm",children:"Import Locale"})]})})]})]}),_L=()=>{var s;const{userLanguages:e,addFirstLanguage:t,setAddFirstLanguage:n}=ir(),i=(((s=e.supported)==null?void 0:s.length)??0)===0&&!t,a=()=>{n(!0)};return i?T.jsx(EL,{onAddLocal:a}):T.jsxs("div",{className:ft("flex flex-row w-full h-full bg-grey-800",{"justify-center items-center":i}),children:[T.jsx(kL,{}),T.jsx(Cy,{})]})},nf=()=>T.jsx(_d,{children:T.jsx(_L,{})}),IL=()=>{const{modals:e,closeModal:t,editModal:n}=vd();return T.jsx(T.Fragment,{children:e.map((r,i)=>T.jsx(Se.Modal,{hasOverlay:i===0,...r,onClose:t,onEdit:n,container:St()},r.id))})},TL=({onTabsChange:e,onI18nCurrentChange:t})=>{const n=nr(),r=n.getTabs(),i=n.getI18nCurrent();return Se.useDidMountEffect(()=>{e&&e(r)},[e,r]),Se.useDidMountEffect(()=>{t&&t(i)},[t,i]),T.jsxs(T.Fragment,{children:[T.jsx("div",{className:`relative h-screen z-10 overflow-hidden ${Tl.LOCALIZATION_EDITOR_SCOPE_CLASS}`,children:T.jsx(nf,{})}),T.jsx(IL,{})]})},AL=({children:e})=>{const t=nr();return T.jsx(Cd,{getSupportedLanguages:n=>t.getSupportedLanguages(n),i18nCurrent:t.getI18nCurrent(),activeTabPath:t.getActiveTabPath(),flagsForActiveTab:t.getFlagsByPath(t.getActiveTabPath()),children:e})},PL=({userComponents:e,buildResolver:t,supportedLanguages:n,onChange:r,...i})=>{const a=gd(e,t,n),s=u=>{try{r==null||r(JSON.stringify(u))}catch{}};return T.jsx(ad,{adapter:a,children:T.jsx(bd,{isI18nEnabled:!0,onI18nChange:s,children:T.jsx(AL,{children:T.jsx(Se.TipsProvider,{children:T.jsx(TL,{...i})})})})})},RL=({tabs:e=[],i18nCurrent:t="",initialValue:n,...r})=>T.jsx(md,{tabs:e,i18nCurrent:t,initialI18nFile:n,children:T.jsx(PL,{...r})});exports.LOCALIZATION_EDITOR_SCOPE_CLASS=Tl.LOCALIZATION_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=ad;exports.EditorStateContext=Fs;exports.I18N_ACTIONS=gy;exports.I18N_CONSTANT=yd;exports.I18nProvider=bd;exports.LocalizationEditor=nf;exports.LocalizationEditorProvider=_d;exports.LocalizationProvider=Cd;exports.Portal=by;exports.ReducerAdapterProvider=md;exports.Standalone=RL;exports.default=nf;exports.getDefaultContainer=St;exports.getDefaultInitialState=dd;exports.getLanguageDetails=$r;exports.localizationReducer=pd;exports.useEditorStateAdapter=nr;exports.useI18n=rr;exports.useLocalization=kd;exports.useLocalizationEditor=ir;exports.useModals=vd;exports.useReducerAdapter=gd;exports.useReduxAdapter=Q0;
157
157
  //# sourceMappingURL=index.cjs.js.map