@next-core/brick-container 3.21.11 → 3.21.13
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/all.19b4304b.js +3 -0
- package/dist/all.19b4304b.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/{main.12c60185.js → main.8e8a7807.js} +2 -2
- package/dist/{main.12c60185.js.map → main.8e8a7807.js.map} +1 -1
- package/dist/{polyfill.d6fcbdf8.js → polyfill.1633374c.js} +1 -1
- package/dist/preview/core.c4a7b154.js +1 -0
- package/dist/preview/core.c4a7b154.js.map +1 -0
- package/dist/preview/index.html +1 -1
- package/dist/preview/{main.d7c23245.js → main.ba7c9901.js} +1 -1
- package/dist/preview/{main.d7c23245.js.map → main.ba7c9901.js.map} +1 -1
- package/package.json +7 -7
- package/dist/all.e2a4151b.js +0 -3
- package/dist/all.e2a4151b.js.map +0 -1
- package/dist/preview/core.785de147.js +0 -1
- package/dist/preview/core.785de147.js.map +0 -1
- /package/dist/{all.e2a4151b.js.LICENSE.txt → all.19b4304b.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see all.19b4304b.js.LICENSE.txt */
|
|
2
|
+
(globalThis.webpackChunk_next_core_brick_container=globalThis.webpackChunk_next_core_brick_container||[]).push([[668],{52:(e,t,r)=>{"use strict";r.d(t,{P:()=>u,r:()=>l});var n=r(2171),s=r(311),i="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?s.i:n.O,a=new Set,o=!1;function c(){var e=[];return a.forEach((function(t){e.push(t()),a.delete(t)})),Promise.all(e)}function l(e,t){var r={context:"leader",action:t,token:e.token};return e.broadcastChannel.postInternal(r)}function u(e){e.isLeader=!0,e._hasLeader=!0;var t=function(e){if(o||(o=!0,i(c)),"function"!=typeof e)throw new Error("Listener is no function");return a.add(e),{remove:function(){return a.delete(e)},run:function(){return a.delete(e),e()}}}((function(){return e.die()}));e._unl.push(t);var r=function(t){"leader"===t.context&&"apply"===t.action&&l(e,"tell"),"leader"!==t.context||"tell"!==t.action||e._dpLC||(e._dpLC=!0,e._dpL(),l(e,"tell"))};return e.broadcastChannel.addEventListener("internal",r),e._lstns.push(r),l(e,"tell")}},90:(e,t,r)=>{"use strict";r.r(t)},273:(e,t,r)=>{"use strict";var n;try{n=Object(function(){var e=new Error("Cannot find module 'buffer'");throw e.code="MODULE_NOT_FOUND",e}())}catch(e){}var s=r(5417),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new s("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,s=e.length,a=i;for(r=0;r<s;r++)if(!((t=a.indexOf(e.charAt(r)))>64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,s=e.replace(/[\r\n=]/g,""),a=s.length,o=i,c=0,l=[];for(t=0;t<a;t++)t%4==0&&t&&(l.push(c>>16&255),l.push(c>>8&255),l.push(255&c)),c=c<<6|o.indexOf(s.charAt(t));return 0==(r=a%4*6)?(l.push(c>>16&255),l.push(c>>8&255),l.push(255&c)):18===r?(l.push(c>>10&255),l.push(c>>2&255)):12===r&&l.push(c>>4&255),n?n.from?n.from(l):new n(l):l},predicate:function(e){return n&&n.isBuffer(e)},represent:function(e){var t,r,n="",s=0,a=e.length,o=i;for(t=0;t<a;t++)t%3==0&&t&&(n+=o[s>>18&63],n+=o[s>>12&63],n+=o[s>>6&63],n+=o[63&s]),s=(s<<8)+e[t];return 0==(r=a%3)?(n+=o[s>>18&63],n+=o[s>>12&63],n+=o[s>>6&63],n+=o[63&s]):2===r?(n+=o[s>>10&63],n+=o[s>>4&63],n+=o[s<<2&63],n+=o[64]):1===r&&(n+=o[s>>2&63],n+=o[s<<4&63],n+=o[64],n+=o[64]),n}})},311:(e,t,r)=>{"use strict";function n(e){process.on("exit",(function(){return e()})),process.on("beforeExit",(function(){return e().then((function(){return process.exit()}))})),process.on("SIGINT",(function(){return e().then((function(){return process.exit()}))})),process.on("uncaughtException",(function(t){return e().then((function(){console.trace(t),process.exit(101)}))}))}r.d(t,{i:()=>n})},343:(e,t,r)=>{"use strict";var n=r(5417),s=Object.prototype.toString;e.exports=new n("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,i,a,o=e;for(a=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(n=o[t],"[object Object]"!==s.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;a[t]=[i[0],n[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,n,s,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1)n=a[t],s=Object.keys(n),i[t]=[s[0],n[s[0]]];return i}})},414:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(1369);function s(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,(0,n.A)(s.key),s)}}function i(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}},627:function(e,t,r){!function(e){"use strict";e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(r(9420))},706:(e,t,r)=>{"use strict";if(r.r(t),r.d(t,{BroadcastChannel:()=>n.X2,OPEN_BROADCAST_CHANNELS:()=>n.Ot,beLeader:()=>i.P,clearNodeFolder:()=>n.ki,createLeaderElection:()=>s.X,enforceOptions:()=>n.lO}),792==r.j)var n=r(7542);if(792==r.j)var s=r(5840);if(792==r.j)var i=r(52)},726:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(5152),s=r(414),i=[],a=i.forEach,o=i.slice,c=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,l={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&"undefined"!=typeof document){var r=function(e){for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n<r.length;n++){for(var s=r[n];" "===s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return null}(e.lookupCookie);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&"undefined"!=typeof document&&function(e,t,r,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};r&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+60*r*1e3)),n&&(s.domain=n),document.cookie=function(e,t,r){var n=r||{};n.path=n.path||"/";var s=encodeURIComponent(t),i="".concat(e,"=").concat(s);if(n.maxAge>0){var a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+="; Max-Age=".concat(Math.floor(a))}if(n.domain){if(!c.test(n.domain))throw new TypeError("option domain is invalid");i+="; Domain=".concat(n.domain)}if(n.path){if(!c.test(n.path))throw new TypeError("option path is invalid");i+="; Path=".concat(n.path)}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");i+="; Expires=".concat(n.expires.toUTCString())}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i}(e,encodeURIComponent(t),s)}(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},u={name:"querystring",lookup:function(e){var t;if("undefined"!=typeof window){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var n=r.substring(1).split("&"),s=0;s<n.length;s++){var i=n[s].indexOf("=");i>0&&n[s].substring(0,i)===e.lookupQuerystring&&(t=n[s].substring(i+1))}}return t}},h=null,p=function(){if(null!==h)return h;try{h="undefined"!==window&&null!==window.localStorage;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){h=!1}return h},d={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&p()){var r=window.localStorage.getItem(e.lookupLocalStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&p()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},f=null,m=function(){if(null!==f)return f;try{f="undefined"!==window&&null!==window.sessionStorage;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){f=!1}return f},y={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&m()){var r=window.sessionStorage.getItem(e.lookupSessionStorage);r&&(t=r)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&m()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},g={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)t.push(navigator.languages[r]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},v={name:"htmlTag",lookup:function(e){var t,r=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},b={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof r[e.lookupFromPathIndex])return;t=r[e.lookupFromPathIndex].replace("/","")}else t=r[0].replace("/","")}return t}},w={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,r="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[t]}},x=!1;try{document.cookie,x=!0}catch(e){}var S=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];x||S.splice(1,1);var P=function(){return(0,s.A)((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.A)(this,e),this.type="languageDetector",this.detectors={},this.init(t,r)}),[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=function(e){return a.call(o.call(arguments,1),(function(t){if(t)for(var r in t)void 0===e[r]&&(e[r]=t[r])})),e}(t,this.options||{},{order:S,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(e){return e.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(l),this.addDetector(u),this.addDetector(d),this.addDetector(y),this.addDetector(g),this.addDetector(v),this.addDetector(b),this.addDetector(w)}},{key:"addDetector",value:function(e){return this.detectors[e.name]=e,this}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var r=[];return e.forEach((function(e){if(t.detectors[e]){var n=t.detectors[e].lookup(t.options);n&&"string"==typeof n&&(n=[n]),n&&(r=r.concat(n))}})),r=r.map((function(e){return t.options.convertDetectedLanguage(e)})),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var r=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){r.detectors[t]&&r.detectors[t].cacheUserLanguage(e,r.options)})))}}])}();P.type="languageDetector"},829:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(2559);function s(e,t){return e.get((0,n.A)(e,t))}},843:(e,t,r)=>{"use strict";r.r(t),r.d(t,{changeLanguage:()=>me,createInstance:()=>le,default:()=>ce,dir:()=>ue,exists:()=>ve,getFixedT:()=>ye,hasLoadedNamespace:()=>we,init:()=>he,loadLanguages:()=>Se,loadNamespaces:()=>xe,loadResources:()=>pe,reloadResources:()=>de,setDefaultNamespace:()=>be,t:()=>ge,use:()=>fe});var n=r(7545),s=r(5152),i=r(414);function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}function l(e,t){if(t&&("object"==(0,n.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var h=r(4586);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){(0,h.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var m={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},y=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.A)(this,e),this.init(t,r)}return(0,i.A)(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||m,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,f(f({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),g=function(){function e(){(0,s.A)(this,e),this.observers={}}return(0,i.A)(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,r)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(r))}))}}]),e}();function v(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function w(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function s(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(s())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return s()?{}:{obj:e,k:n(i.shift())}}function x(e,t,r){var n=w(e,t,Object);n.obj[n.k]=r}function S(e,t){var r=w(e,t),n=r.obj,s=r.k;if(n)return n[s]}function P(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):P(e[n],t[n],r):e[n]=t[n]);return e}function A(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function T(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return E[e]})):e}var k="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,_=[" ",",","?","!",";"];function C(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),s=e,i=0;i<n.length;++i){if(!s)return;if("string"==typeof s[n[i]]&&i+1<n.length)return;if(void 0===s[n[i]]){for(var a=2,o=n.slice(i,i+a).join(r),c=s[o];void 0===c&&n.length>i+a;)a++,c=s[o=n.slice(i,i+a).join(r)];if(void 0===c)return;if(null===c)return null;if(t.endsWith(o)){if("string"==typeof c)return c;if(o&&"string"==typeof c[o])return c[o]}var l=n.slice(i+a).join(r);return l?C(c,l,r):void 0}s=s[n[i]]}return s}}function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){(0,h.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var L=function(e){c(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=u(t);if(r){var s=u(this).constructor;e=Reflect.construct(n,arguments,s)}else e=n.apply(this,arguments);return l(this,e)});function o(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return(0,s.A)(this,o),t=n.call(this),k&&g.call(a(t)),t.data=e||{},t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),void 0===t.options.ignoreJSONStructure&&(t.options.ignoreJSONStructure=!0),t}return(0,i.A)(o,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];r&&"string"!=typeof r&&(a=a.concat(r)),r&&"string"==typeof r&&(a=a.concat(s?r.split(s):r)),e.indexOf(".")>-1&&(a=e.split("."));var o=S(this.data,a);return o||!i||"string"!=typeof r?o:C(this.data&&this.data[e]&&this.data[e][t],r,s)}},{key:"addResource",value:function(e,t,r,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),x(this.data,a,n),s.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var s in r)"string"!=typeof r[s]&&"[object Array]"!==Object.prototype.toString.apply(r[s])||this.addResource(e,t,s,r[s],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,s){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var o=S(this.data,a)||{};n?P(o,r,s):o=O(O({},o),r),x(this.data,a,o),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?O(O({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),o}(g),N={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,s){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,s))})),t}};function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){(0,h.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R={},B=function(e){c(h,e);var t,r,o=(t=h,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=u(t);if(r){var s=u(this).constructor;e=Reflect.construct(n,arguments,s)}else e=n.apply(this,arguments);return l(this,e)});function h(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.A)(this,h),t=o.call(this),k&&g.call(a(t)),function(e,t,r){["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){t[e]&&(r[e]=t[e])}))}(0,e,a(t)),t.options=r,void 0===t.options.keySeparator&&(t.options.keySeparator="."),t.logger=y.create("translator"),t}return(0,i.A)(h,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=t.ns||this.options.defaultNS||[],i=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,r){t=t||"",r=r||"";var n=_.filter((function(e){return t.indexOf(e)<0&&r.indexOf(e)<0}));if(0===n.length)return!0;var s=new RegExp("(".concat(n.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!s.test(e);if(!i){var a=e.indexOf(r);a>0&&!s.test(e.substring(0,a))&&(i=!0)}return i}(e,r,n));if(i&&!a){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:s};var c=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),e=c.join(n)}return"string"==typeof s&&(s=[s]),{key:e,namespaces:s}}},{key:"translate",value:function(e,t,r){var s=this;if("object"!==(0,n.A)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"===(0,n.A)(t)&&(t=D({},t)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),c=o.key,l=o.namespaces,u=l[l.length-1],p=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(d){var f=t.nsSeparator||this.options.nsSeparator;return i?{res:"".concat(u).concat(f).concat(c),usedKey:c,exactUsedKey:c,usedLng:p,usedNS:u}:"".concat(u).concat(f).concat(c)}return i?{res:c,usedKey:c,exactUsedKey:c,usedLng:p,usedNS:u}:c}var m=this.resolve(e,t),y=m&&m.res,g=m&&m.usedKey||c,v=m&&m.exactUsedKey||c,b=Object.prototype.toString.apply(y),w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&y&&"string"!=typeof y&&"boolean"!=typeof y&&"number"!=typeof y&&["[object Number]","[object Function]","[object RegExp]"].indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,y,D(D({},t),{},{ns:l})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return i?(m.res=S,m):S}if(a){var P="[object Array]"===b,A=P?[]:{},E=P?v:g;for(var T in y)if(Object.prototype.hasOwnProperty.call(y,T)){var k="".concat(E).concat(a).concat(T);A[T]=this.translate(k,D(D({},t),{joinArrays:!1,ns:l})),A[T]===k&&(A[T]=y[T])}y=A}}else if(x&&"string"==typeof w&&"[object Array]"===b)(y=y.join(w))&&(y=this.extendTranslation(y,e,t,r));else{var _=!1,C=!1,I=void 0!==t.count&&"string"!=typeof t.count,O=h.hasDefaultValue(t),L=I?this.pluralResolver.getSuffix(p,t.count,t):"",N=t["defaultValue".concat(L)]||t.defaultValue;!this.isValidLookup(y)&&O&&(_=!0,y=N),this.isValidLookup(y)||(C=!0,y=c);var M=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:y,R=O&&N!==y&&this.options.updateMissing;if(C||_||R){if(this.logger.log(R?"updateKey":"missingKey",p,u,c,R?N:y),a){var B=this.resolve(c,D(D({},t),{},{keySeparator:!1}));B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&j&&j[0])for(var U=0;U<j.length;U++)F.push(j[U]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var Y=function(e,r,n){var i=O&&n!==y?n:M;s.options.missingKeyHandler?s.options.missingKeyHandler(e,u,r,i,R,t):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(e,u,r,i,R,t),s.emit("missingKey",e,u,r,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?F.forEach((function(e){s.pluralResolver.getSuffixes(e,t).forEach((function(r){Y([e],c+r,t["defaultValue".concat(r)]||N)}))})):Y(F,c,N))}y=this.extendTranslation(y,e,t,m,r),C&&y===c&&this.options.appendNamespaceToMissingKey&&(y="".concat(u,":").concat(c)),(C||_)&&this.options.parseMissingKeyHandler&&(y="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(c):c,_?y:void 0):this.options.parseMissingKeyHandler(y))}return i?(m.res=y,m):y}},{key:"extendTranslation",value:function(e,t,r,n,s){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,D(D({},this.options.interpolation.defaultVariables),r),n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(D(D({},r),{interpolation:D(D({},this.options.interpolation),r.interpolation)}));var a,o="string"==typeof e&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(o){var c=e.match(this.interpolator.nestingRegexp);a=c&&c.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=D(D({},this.options.interpolation.defaultVariables),l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),o){var u=e.match(this.interpolator.nestingRegexp);a<(u&&u.length)&&(r.nest=!1)}!r.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(r.lng=n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return s&&s[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))}),r)),r.interpolation&&this.interpolator.reset()}var h=r.postProcess||this.options.postProcess,p="string"==typeof h?[h]:h;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=N.handle(p,e,t,this.options&&this.options.postProcessPassResolved?D({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,s,i,a=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,o),l=c.key;r=l;var u=c.namespaces;a.options.fallbackNS&&(u=u.concat(a.options.fallbackNS));var h=void 0!==o.count&&"string"!=typeof o.count,p=h&&!o.ordinal&&0===o.count&&a.pluralResolver.shouldUseIntlApi(),d=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,f=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);u.forEach((function(e){a.isValidLookup(t)||(i=e,!R["".concat(f[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(R["".concat(f[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(r){if(!a.isValidLookup(t)){s=r;var i,c=[l];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(c,l,r,e,o);else{var u;h&&(u=a.pluralResolver.getSuffix(r,o.count,o));var f="".concat(a.options.pluralSeparator,"zero");if(h&&(c.push(l+u),p&&c.push(l+f)),d){var m="".concat(l).concat(a.options.contextSeparator).concat(o.context);c.push(m),h&&(c.push(m+u),p&&c.push(m+f))}}for(;i=c.pop();)a.isValidLookup(t)||(n=i,t=a.getResource(r,e,i,o))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:s,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),h}(g);function F(e){return e.charAt(0).toUpperCase()+e.slice(1)}var j=function(){function e(t){(0,s.A)(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=y.create("languageUtils")}return(0,i.A)(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=F(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=F(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=F(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){return e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:0===e.indexOf(n)?e:void 0}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],i=function(e){e&&(r.isSupportedCode(e)?s.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((function(e){s.indexOf(e)<0&&i(r.formatLanguageCode(e))})),s}}]),e}(),U=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Y={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},$=["v1","v2","v3"],H={zero:0,one:1,two:2,few:3,many:4,other:5},W=function(){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.A)(this,e),this.languageUtils=t,this.options=n,this.logger=y.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(r={},U.forEach((function(e){e.lngs.forEach((function(t){r[t]={numbers:e.nr,plurals:Y[e.fc]}}))})),r)}return(0,i.A)(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((function(e,t){return H[e]-H[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):n.numbers.map((function(n){return t.getSuffix(e,n,r)})):[]}},{key:"getSuffix",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.getRule(e,r);return n?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(n.select(t)):this.getSuffixRetroCompatible(n,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var r=this,n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),s=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var i=function(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}},{key:"shouldUseIntlApi",value:function(){return!$.includes(this.options.compatibilityJSON)}}]),e}();function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){(0,h.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=function(e,t,r){var n=S(e,r);return void 0!==n?n:S(t,r)}(e,t,r);return!i&&s&&"string"==typeof r&&void 0===(i=C(e,r,n))&&(i=C(t,r,n)),i}var K=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.A)(this,e),this.logger=y.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return(0,i.A)(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:T,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?A(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?A(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?A(t.nestingPrefix):t.nestingPrefixEscaped||A("$t("),this.nestingSuffix=t.nestingSuffix?A(t.nestingSuffix):t.nestingSuffixEscaped||A(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var s,i,a,o=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(o.formatSeparator)<0){var s=q(t,c,e,o.options.keySeparator,o.options.ignoreJSONStructure);return o.alwaysFormat?o.format(s,void 0,r,z(z(z({},n),t),{},{interpolationkey:e})):s}var i=e.split(o.formatSeparator),a=i.shift().trim(),l=i.join(o.formatSeparator).trim();return o.format(q(t,c,a,o.options.keySeparator,o.options.ignoreJSONStructure),l,r,z(z(z({},n),t),{},{interpolationkey:a}))};this.resetRegExp();var h=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return o.escapeValue?l(o.escape(e)):l(e)}}].forEach((function(t){for(a=0;s=t.regex.exec(e);){var r=s[1].trim();if(void 0===(i=u(r)))if("function"==typeof h){var c=h(e,s,n);i="string"==typeof c?c:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else{if(p){i=s[0];continue}o.logger.warn("missed to pass in variable ".concat(r," for interpolating ").concat(e)),i=""}else"string"==typeof i||o.useRawValueToEscape||(i=b(i));var l=t.safeValue(i);if(e=e.replace(s[0],l),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,++a>=o.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,s,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function o(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),i="{".concat(n[1]);e=n[0];var a=(i=this.interpolate(i,s)).match(/'/g),o=i.match(/"/g);(a&&a.length%2==0&&!o||o.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s=z(z({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(i)}return delete s.defaultValue,e}for(;r=this.nestingRegexp.exec(e);){var c=[];(s=(s=z({},a)).replace&&"string"!=typeof s.replace?s.replace:s).applyPostProcessor=!1,delete s.defaultValue;var l=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){var u=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=u.shift(),c=u,l=!0}if((n=t(o.call(this,r[1].trim(),s),s))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=c.reduce((function(e,t){return i.format(e,t,a.lng,z(z({},a),{},{interpolationkey:r[1].trim()}))}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}();function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach((function(t){(0,h.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function X(e){var t={};return function(r,n,s){var i=n+JSON.stringify(s),a=t[i];return a||(a=e(n,s),t[i]=a),a(r)}}var Z=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.A)(this,e),this.logger=y.create("formatter"),this.options=t,this.formats={number:X((function(e,t){var r=new Intl.NumberFormat(e,J({},t));return function(e){return r.format(e)}})),currency:X((function(e,t){var r=new Intl.NumberFormat(e,J(J({},t),{},{style:"currency"}));return function(e){return r.format(e)}})),datetime:X((function(e,t){var r=new Intl.DateTimeFormat(e,J({},t));return function(e){return r.format(e)}})),relativetime:X((function(e,t){var r=new Intl.RelativeTimeFormat(e,J({},t));return function(e){return r.format(e,t.range||"day")}})),list:X((function(e,t){var r=new Intl.ListFormat(e,J({},t));return function(e){return r.format(e)}}))},this.init(t)}return(0,i.A)(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=X(t)}},{key:"format",value:function(e,t,r){var n=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var s=n[1].substring(0,n[1].length-1);"currency"===t&&s.indexOf(":")<0?r.currency||(r.currency=s.trim()):"relativetime"===t&&s.indexOf(":")<0?r.range||(r.range=s.trim()):s.split(";").forEach((function(e){if(e){var t=function(e){if(Array.isArray(e))return e}(i=e.split(":"))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],s=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");r[n.trim()]||(r[n.trim()]=s),"false"===s&&(r[n.trim()]=!1),"true"===s&&(r[n.trim()]=!0),isNaN(s)||(r[n.trim()]=parseInt(s,10))}var i}))}return{formatName:t,formatOptions:r}}(t),a=i.formatName,o=i.formatOptions;if(n.formats[a]){var c=e;try{var l=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},u=l.locale||l.lng||s.locale||s.lng||r;c=n.formats[a](e,u,J(J(J({},o),s),l))}catch(e){n.logger.warn(e)}return c}return n.logger.warn("there was no format function for ".concat(a)),e}),e)}}]),e}();function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){(0,h.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var te=function(e){c(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=u(t);if(r){var s=u(this).constructor;e=Reflect.construct(n,arguments,s)}else e=n.apply(this,arguments);return l(this,e)});function o(e,t,r){var i,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,s.A)(this,o),i=n.call(this),k&&g.call(a(i)),i.backend=e,i.store=t,i.services=r,i.languageUtils=r.languageUtils,i.options=c,i.logger=y.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=c.maxParallelReads||10,i.readingCalls=0,i.maxRetries=c.maxRetries>=0?c.maxRetries:5,i.retryTimeout=c.retryTimeout>=1?c.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,c.backend,c),i}return(0,i.A)(o,[{key:"queueLoad",value:function(e,t,r,n){var s=this,i={},a={},o={},c={};return e.forEach((function(e){var n=!0;t.forEach((function(t){var o="".concat(e,"|").concat(t);!r.reload&&s.store.hasResourceBundle(e,t)?s.state[o]=2:s.state[o]<0||(1===s.state[o]?void 0===a[o]&&(a[o]=!0):(s.state[o]=1,n=!1,void 0===a[o]&&(a[o]=!0),void 0===i[o]&&(i[o]=!0),void 0===c[t]&&(c[t]=!0)))})),n||(o[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(c)}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),s=n[0],i=n[1];t&&this.emit("failedLoading",s,i,t),r&&this.store.addResourceBundle(s,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,o,c,l,u;n=r.loaded,o=i,(l=(c=w(n,[s],Object)).obj)[u=c.k]=l[u]||[],l[u].push(o),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]={});var t=r.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:i,callback:a});else{this.readingCalls++;var o=function(o,c){if(n.readingCalls--,n.waitingReads.length>0){var l=n.waitingReads.shift();n.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}o&&c&&s<n.maxRetries?setTimeout((function(){n.read.call(n,e,t,r,s+1,2*i,a)}),i):a(o,c)},c=this.backend[r].bind(this.backend);if(2!==c.length)return c(e,t,o);try{var l=c(e,t);l&&"function"==typeof l.then?l.then((function(e){return o(null,e)})).catch(o):o(null,l)}catch(e){o(e)}}}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),s=n[0],i=n[1];this.read(s,i,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(s," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(s),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,s){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=r&&""!==r){if(this.backend&&this.backend.create){var o=ee(ee({},i),{},{isUpdate:s}),c=this.backend.create.bind(this.backend);if(c.length<6)try{var l;(l=5===c.length?c(e,t,r,n,o):c(e,t,r,n))&&"function"==typeof l.then?l.then((function(e){return a(null,e)})).catch(a):a(null,l)}catch(e){a(e)}else c(e,t,r,n,a,o)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}]),o}(g);function re(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===(0,n.A)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===(0,n.A)(e[2])||"object"===(0,n.A)(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ne(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?se(Object(r),!0).forEach((function(t){(0,h.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ae(){}var oe=function(e){c(h,e);var t,r,o=(t=h,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=u(t);if(r){var s=u(this).constructor;e=Reflect.construct(n,arguments,s)}else e=n.apply(this,arguments);return l(this,e)});function h(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if((0,s.A)(this,h),e=o.call(this),k&&g.call(a(e)),e.options=ne(r),e.services={},e.logger=y,e.modules={external:[]},t=a(e),Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))})),n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),l(e,a(e));setTimeout((function(){e.init(r,n)}),0)}return e}return(0,i.A)(h,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var n=re();function s(e){return e?"function"==typeof e?new e:e:null}if(this.options=ie(ie(ie({},n),this.options),ne(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ie(ie({},n.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?y.init(s(this.modules.logger),this.options):y.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=Z);var a=new j(this.options);this.store=new L(this.options.resources,this.options);var o=this.services;o.logger=y,o.resourceStore=this.store,o.languageUtils=a,o.pluralResolver=new W(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(o.formatter=s(i),o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new K(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new te(s(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=s(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=s(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new B(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,r||(r=ae),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&"dev"!==c[0]&&(this.options.lng=c[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var l=v(),u=function(){var t=function(t,n){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),l.resolve(n),r(t,n)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae,n="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase())return r();var s=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};n?i(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(s,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,r){var n=v();return e||(e=this.languages),t||(t=this.options.ns),r||(r=ae),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&N.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=v();this.emit("languageChanging",e);var s=function(e){r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.resolvedLanguage=void 0,r.setResolvedLanguage(e)},i=function(i){e||i||!r.services.languageDetector||(i=[]);var a="string"==typeof i?i:r.services.languageUtils.getBestMatchFromCodes(i);a&&(r.language||s(a),r.translator.language||r.translator.changeLanguage(a),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage&&r.services.languageDetector.cacheUserLanguage(a)),r.loadResources(a,(function(e){!function(e,i){i?(s(i),r.translator.changeLanguage(i),r.isLanguageChangingTo=void 0,r.emit("languageChanged",i),r.logger.log("languageChanged",i)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t,r){var s=this,i=function e(t,i){var a;if("object"!==(0,n.A)(i)){for(var o=arguments.length,c=new Array(o>2?o-2:0),l=2;l<o;l++)c[l-2]=arguments[l];a=s.options.overloadTranslationOptionHandler([t,i].concat(c))}else a=ie({},i);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||r||e.keyPrefix;var u,h=s.options.keySeparator||".";return u=a.keyPrefix&&Array.isArray(t)?t.map((function(e){return"".concat(a.keyPrefix).concat(h).concat(e)})):a.keyPrefix?"".concat(a.keyPrefix).concat(h).concat(t):t,s.t(u,a)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=r.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var o=r.precheck(this,a);if(void 0!==o)return o}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!a(n,e)||s&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=v();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=v();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],s=e.filter((function(e){return n.indexOf(e)<0}));return s.length?(this.options.preload=n.concat(s),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new j(re());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae,n=ie(ie(ie({},this.options),t),{isClone:!0}),s=new h(n);return void 0===t.debug&&void 0===t.prefix||(s.logger=s.logger.clone(t)),["store","services","language"].forEach((function(t){s[t]=e[t]})),s.services=ie({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s.translator=new B(s.services,s.options),s.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];s.emit.apply(s,[e].concat(r))})),s.init(n,r),s.translator.options=s.options,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),h}(g);(0,h.A)(oe,"createInstance",(function(){return new oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var ce=oe.createInstance();ce.createInstance=oe.createInstance;var le=ce.createInstance,ue=ce.dir,he=ce.init,pe=ce.loadResources,de=ce.reloadResources,fe=ce.use,me=ce.changeLanguage,ye=ce.getFixedT,ge=ce.t,ve=ce.exists,be=ce.setDefaultNamespace,we=ce.hasLoadedNamespace,xe=ce.loadNamespaces,Se=ce.loadLanguages},918:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(2016);function s(e,t,r){(0,n.A)(e,t),t.set(e,r)}},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,s,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var o=0;o<this.length;o++){var c=this[o][0];null!=c&&(a[c]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);n&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),s&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=s):u[4]="".concat(s)),t.push(u))}},t}},1256:(e,t,r)=>{"use strict";var n=r(5417);e.exports=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},1329:function(e,t,r){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(r(9420))},1369:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(7545);function s(e){var t=function(e){if("object"!=(0,n.A)(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=(0,n.A)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==(0,n.A)(t)?t:t+""}},1386:function(e,t,r){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(9420))},1387:function(e,t,r){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(r(9420))},1548:(e,t,r)=>{"use strict";var n=r(5417);e.exports=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},1796:e=>{"use strict";function t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=t},2016:(e,t,r)=>{"use strict";function n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(t,{A:()=>n})},2171:(e,t,r)=>{"use strict";function n(e){if("function"==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var t=self.close.bind(self);self.close=function(){return e(),t()}}else{if("function"!=typeof window.addEventListener)return;window.addEventListener("beforeunload",(function(){e()}),!0),window.addEventListener("unload",(function(){e()}),!0)}}r.d(t,{O:()=>n})},2193:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});var n=r(7551);const s=async e=>(await n.http.get("api/auth/login",e)).data},2290:(e,t,r)=>{"use strict";var n=r(3780),s=r(1796),i=r(5417);function a(e,t,r){var n=[];return e.include.forEach((function(e){r=a(e,t,r)})),e[t].forEach((function(e){r.forEach((function(t,r){t.tag===e.tag&&t.kind===e.kind&&n.push(r)})),r.push(e)})),r.filter((function(e,t){return-1===n.indexOf(t)}))}function o(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{}};function n(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(n);return r}(this.compiledImplicit,this.compiledExplicit)}o.DEFAULT=null,o.create=function(){var e,t;switch(arguments.length){case 1:e=o.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=n.toArray(e),t=n.toArray(t),!e.every((function(e){return e instanceof o})))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every((function(e){return e instanceof i})))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:e,explicit:t})},e.exports=o},2308:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HttpAbortError:()=>F,HttpFetchError:()=>D,HttpParseError:()=>B,HttpResponseError:()=>R,createHttpInstance:()=>Y,defaultAdapter:()=>$,fetch:()=>M,http:()=>j,isHttpAbortError:()=>U});var n={};r.r(n),r.d(n,{HttpAbortError:()=>f,HttpFetchError:()=>h,HttpParseError:()=>d,HttpResponseError:()=>p,createHttpInstance:()=>C,defaultAdapter:()=>P,fetch:()=>s,getUrlWithParams:()=>x,http:()=>_,isHttpAbortError:()=>b});const s=(e,t)=>{const r=new Request(e,Object.assign({credentials:"same-origin"},t));return self.fetch(r)};var i=r(4635),a=r(918),o=r(4586),c=r(829),l=r(2559),u=r(6121);class h extends Error{constructor(e){super(e),this.name="HttpFetchError",Error.captureStackTrace&&Error.captureStackTrace(this,h)}}class p extends Error{constructor(e,t){super(e.statusText),(0,o.A)(this,"response",void 0),(0,o.A)(this,"responseJson",void 0),this.name="HttpResponseError",Error.captureStackTrace&&Error.captureStackTrace(this,p),this.response=e,this.responseJson=t}}class d extends Error{constructor(e){super(e.statusText),(0,o.A)(this,"response",void 0),this.name="HttpParseError",Error.captureStackTrace&&Error.captureStackTrace(this,d),this.response=e}}class f extends Error{constructor(e){super(e),this.name="HttpAbortError"}}class m{constructor(){(0,o.A)(this,"handlers",[])}use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}forEach(e){this.handlers.forEach((t=>{null!==t&&e(t)}))}}function y(e){return null==e}const g=document.querySelector("base"),v=g?g.href:location.origin+"/",b=e=>e instanceof DOMException&&20===e.code,w=async(e,t,r)=>new Promise((async(n,i)=>{let a;r.url=e;let o,{responseType:c}=r.options||{};c||(c="json");try{a=await s(e,t)}catch(e){return void i(b(e)?new f(e.toString()):new h(e.toString()))}if(a.ok){try{o=await a[c]()}catch(e){return void i(b(e)?new f(e.toString()):new d(a))}n({status:a.status,statusText:a.statusText,headers:a.headers,data:o})}else{let e;try{e=await a.json()}catch{}i(new p(a,e))}})),x=(e,t)=>{if(t){const r=new URL(e,v);t instanceof URLSearchParams?t.forEach((function(e,t){r.searchParams.append(t,e)})):Object.entries(t).forEach((e=>{let[t,n]=e;Array.isArray(n)?n.forEach((e=>{r.searchParams.append(t,y(e)?"":e)})):r.searchParams.append(t,y(n)?"":n)}));const{href:n}=r;return n.startsWith(v)?n.substr(v.length):n}return e},S=(e,t)=>{if(void 0!==e){const r=new Headers(t||{}),n="Content-Type";let s=e;return r.has(n)||("string"==typeof e?r.set(n,"application/x-www-form-urlencoded"):e instanceof FormData||(r.set(n,"application/json"),s=JSON.stringify(e))),{body:s,headers:r}}return{headers:t}},P=e=>{const{url:t,method:r,data:n}=e;return["DELETE","GET","HEAD"].includes(e.method)?((e,t,r)=>{const{params:n,responseType:s,interceptorParams:i,observe:a,noAbortOnRouteChange:o,useCache:c,...l}=r.options||{};return w(x(t,n),{...l,method:e},r)})(r,t,e):((e,t,r,n)=>{const{params:s,headers:i,responseType:a,interceptorParams:o,observe:c,noAbortOnRouteChange:l,useCache:u,...h}=n.options||{};return w(x(t,s),{...h,method:e,...S(r,i)},n)})(r,t,n,e)};var A=new WeakMap,E=new WeakSet;class T{constructor(e){var t=this;(0,i.A)(this,E),(0,o.A)(this,"interceptors",void 0),(0,a.A)(this,A,P),(0,o.A)(this,"request",(async(e,t,r)=>{const{body:n,method:s,...i}=t||{};return(0,l.A)(E,this,k).call(this,{url:e,data:n,method:s||"GET",options:{...r||{},...i}})})),(0,o.A)(this,"simpleRequest",(function(e,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.A)(E,t,k).call(t,{url:r,method:e,options:n})})),(0,o.A)(this,"requestWithBody",(function(e,r,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,l.A)(E,t,k).call(t,{url:r,method:e,data:n,options:s})})),this.interceptors={request:new m,response:new m},null!=e&&e.adapter&&(0,u.A)(A,this,e.adapter)}getUrlWithParams(e,t){return x(e,t)}getBodyAndHeaders(e,t){return S(e,t)}get(e,t){return(0,l.A)(E,this,k).call(this,{url:e,method:"GET",options:t})}delete(e,t){return(0,l.A)(E,this,k).call(this,{url:e,method:"DELETE",options:t})}head(e,t){return(0,l.A)(E,this,k).call(this,{url:e,method:"HEAD",options:t})}post(e,t,r){return(0,l.A)(E,this,k).call(this,{url:e,method:"POST",data:t,options:r})}put(e,t,r){return(0,l.A)(E,this,k).call(this,{url:e,method:"PUT",data:t,options:r})}patch(e,t,r){return(0,l.A)(E,this,k).call(this,{url:e,method:"PATCH",data:t,options:r})}}function k(e){const t=[];let r=Promise.resolve(e);for(this.interceptors.request.forEach((e=>{t.push(e.fulfilled,e.rejected)})),t.push((e=>(0,c.A)(A,this).call(this,e)),void 0),this.interceptors.response.forEach((r=>{t.push((t=>{var n;return null===(n=r.fulfilled)||void 0===n?void 0:n.call(r,t,e)}),(t=>{var n;return null===(n=r.rejected)||void 0===n?void 0:n.call(r,t,e)}))})),t.push((t=>{var r;return"response"===(null===(r=e.options)||void 0===r?void 0:r.observe)?t:t.data}),void 0);t.length;)r=r.then(t.shift(),t.shift());return r}let _=new T;function C(e){_=new T(e)}var I;let O,L;const{dll:N}=window;O=N&&null!==(I=window.BRICK_NEXT_VERSIONS)&&void 0!==I&&null!==(I=I["brick-container"])&&void 0!==I&&I.startsWith("2.")&&(L=N("JxWY"))?L:n;const{fetch:M,HttpFetchError:D,HttpResponseError:R,HttpParseError:B,HttpAbortError:F,http:j,isHttpAbortError:U,createHttpInstance:Y,defaultAdapter:$}=O},2559:(e,t,r)=>{"use strict";function n(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}r.d(t,{A:()=>n})},2561:(e,t,r)=>{"use strict";r.r(t),r.d(t,{supply:()=>a});var n=r(1030),s=r(1916),i=r(5285);function a(e,t,r){const n={};for(const s of e)if(!Object.prototype.hasOwnProperty.call(n,s))if("undefined"===s)n[s]=void 0;else if(t&&Object.prototype.hasOwnProperty.call(t,s))n[s]=t[s];else{const e=u(s,r);void 0!==e&&(n[s]=e)}return n}const o=new Set(["fill","pull","pullAll","pullAllBy","pullAllWith","pullAt","remove","reverse","assign","assignIn","assignInWith","assignWith","defaults","defaultsDeep","merge","mergeWith","set","setWith","unset","update","updateWith","after","ary","before","bind","bindKey","curry","curryRight","debounce","defer","delay","flip","memoize","negate","once","overArgs","partial","partialRight","rearg","rest","spread","throttle","unary","wrap"]),c=new Set(["lang","langData","locale","localeData","defineLocale","updateLocale","updateOffset"]),l=new Set(["Array","Boolean","Date","Infinity","JSON","Math","NaN","Number","String","RegExp","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","isFinite","isNaN","parseFloat","parseInt","Map","Set","URL","URLSearchParams","WeakMap","WeakSet","atob","btoa"]);function u(e,t){switch(e){case"Object":return r=Object,a=["entries","fromEntries","keys","values"],Object.fromEntries(a.map((e=>[e,function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return r[e].apply(r,n)}])));case"_":return Object.fromEntries(Object.entries(n).filter((e=>!o.has(e[0]))).concat(t?[["uniqueId",e=>`${null!=e?e:""}42`]]:[]));case"moment":return Object.assign((function(){return s(...arguments)}),Object.fromEntries(Object.entries(s).filter((e=>!c.has(e[0])))));case"PIPES":return i.pipes;case"TAG_URL":return h(!0);case"SAFE_TAG_URL":return h();default:if(l.has(e))return window[e]}var r,a}function h(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];const i=[];return t.forEach(((t,r)=>{i.push(t),r<n.length&&i.push(e?String(n[r]).replace(/[^/]+/g,(e=>encodeURIComponent(e))):encodeURIComponent(String(n[r])))})),i.join("")}}},2621:(e,t,r)=>{"use strict";var n=r(5417);e.exports=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},2846:(e,t,r)=>{"use strict";var n=r(2290);e.exports=n.DEFAULT=new n({include:[r(9590)],explicit:[r(9280),r(6751),r(5986)]})},3005:function(e,t,r){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1200?"上午":1200===n?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(9420))},3443:(e,t,r)=>{"use strict";r.d(t,{e:()=>s});var n=r(7551);const s=async e=>(await n.http.get("api/v1/runtime_standalone",e)).data},3459:(e,t,r)=>{"use strict";r.d(t,{MQ:()=>i});var n=r(4396).mU,s=new Set,i={create:function(e){var t={time:n(),name:e,messagesCallback:null};return s.add(t),t},close:function(e){s.delete(e)},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){return new Promise((function(r){return setTimeout((function(){Array.from(s).forEach((function(r){r.name===e.name&&r!==e&&r.messagesCallback&&r.time<t.time&&r.messagesCallback(t)})),r()}),5)}))},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:n}},3537:function(e,t,r){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(9420))},3780:e=>{"use strict";function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var r,n="";for(r=0;r<t;r+=1)n+=e;return n},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var r,n,s,i;if(t)for(r=0,n=(i=Object.keys(t)).length;r<n;r+=1)e[s=i[r]]=t[s];return e}},3901:(e,t,r)=>{"use strict";var n=r(5417),s=Object.prototype.hasOwnProperty,i=Object.prototype.toString;e.exports=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,a,o,c=[],l=e;for(t=0,r=l.length;t<r;t+=1){if(n=l[t],o=!1,"[object Object]"!==i.call(n))return!1;for(a in n)if(s.call(n,a)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(a))return!1;c.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},4073:function(e,t,r){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(r(9420))},4306:(e,t,r)=>{"use strict";r.r(t),r.d(t,{pipes:()=>s,utils:()=>n});var n={};r.r(n),r.d(n,{convertUnitValueByPrecision:()=>_e,formatUnitValue:()=>Ce});var s={};function i(e,t){return e+t}function a(e){return"0"!==e&&Boolean(e)}r.r(s),r.d(s,{add:()=>i,atobUnicode:()=>De,bool:()=>o,boolean:()=>a,btoaUnicode:()=>Re,cmdbInstanceShowName:()=>c,countBy:()=>u,datetime:()=>d,deltaTime:()=>y,divide:()=>g,equal:()=>v,find:()=>b,findIndex:()=>w,findLast:()=>x,findLastIndex:()=>S,get:()=>P,graphTree:()=>A,groupBy:()=>E,groupByToIndex:()=>I,includes:()=>O,join:()=>L,json:()=>N,jsonStringify:()=>M,keyBy:()=>D,map:()=>R,mapToArray:()=>B,mergeArrayByKey:()=>F,multiply:()=>U,not:()=>Y,nullish:()=>$,number:()=>H,parseTimeRange:()=>W,randomString:()=>V,reverse:()=>z,round:()=>Me,slice:()=>q,sort:()=>K,split:()=>G,string:()=>J,substr:()=>X,substring:()=>Z,subtract:()=>Q,ternary:()=>ee,uniq:()=>te,unitFormat:()=>Ie,yaml:()=>Le,yamlStringify:()=>Ne});var o=a;function c(e){if(Array.isArray(e)){var t=e[0]||"",r=e.slice(1,e.length).join(",");return r?t+(t?"("+r+")":""+r):t||"-"}return e}var l=r(1030);function u(e,t){return(0,l.countBy)(e,t)}var h=r(1916),p=r.n(h);function d(e,t){return p()(e).format(t)}function f(e){return"object"==typeof e&&null!==e}function m(e,t){return"number"==typeof e?p()(e):p()(e,t)}function y(e,t,r){if(void 0===t&&(t=!0),void 0===r&&(r="YYYY-MM-DD HH:mm:ss"),!e)return"";if(f(e)&&e.startTime&&e.endTime){var n=m(e.startTime,r),s=m(e.endTime,r);return p().duration(s.diff(n)).humanize(t)}var i=m(f(e)?e.startTime||e.endTime:e,r);return p().duration(i.diff(p()())).humanize(t)}function g(e,t){return e/t}function v(e,t){return(0,l.isEqual)(e,t)}function b(e,t,r){return(0,l.find)(e,t,r)}function w(e,t,r){return(0,l.findIndex)(e,t,r)}function x(e,t,r){return(0,l.findLast)(e,t,r)}function S(e,t,r){return(0,l.findLastIndex)(e,t,r)}function P(e,t,r){return(0,l.get)(e,t,r)}function A(e,t){var r,n;if(!e)return[];var s=null==t?void 0:t.sort,i=(0,l.groupBy)(e.edges,"out"),a=function(t){var r=i[t.instanceId];if((0,l.forEach)(r,(function(r){var n=r.out_name,s=(0,l.find)(e.vertices,["instanceId",r.in]);if(s){var i=a(s);t[n]?t[n].push(i):t[n]=[i]}})),s){var n=(0,l.uniq)((0,l.map)(r,"out_name"));(0,l.forEach)(n,(function(e){(0,l.isEmpty)(t[e])||(t[e]=(0,l.orderBy)(t[e],(function(e){var t;return null!==(t=(0,l.get)(e,s.key))&&void 0!==t?t:-1/0}),-1===s.order?"desc":"asc"))}))}return t};return null!==(n=null===(r=e.topic_vertices)||void 0===r?void 0:r.map((function(e){return a(e)})))&&void 0!==n?n:[]}function E(e,t){return(0,l.groupBy)(e,t)}var T,k,_=function(){return _=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},_.apply(this,arguments)};function C(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),s=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,o=i.length;a<o;a++,s++)n[s]=i[a];return n}function I(e,t,r){var n=e;if(!(0,l.isNil)(t)&&!(0,l.isNil)(r)){var s=(0,l.groupBy)(e,t),i=(0,l.keys)(s).sort();n=n.map((function(e){var n=_({},e);return(0,l.set)(n,r,(0,l.indexOf)(i,(0,l.get)(e,t))),n}))}return n}function O(e,t){return e.includes(t)}function L(e,t){return void 0===t&&(t=","),Array.isArray(e)?e.join(t):""}function N(e){if((0,l.isNil)(e))return e;try{return JSON.parse(e)}catch(e){return void console.error(e)}}function M(e,t){void 0===t&&(t=2);try{return JSON.stringify(e,null,t)}catch(e){return void console.error(e)}}function D(e,t){return(0,l.keyBy)(e,t)}function R(e,t){return Array.isArray(e)?e.map((function(e){return(0,l.get)(e,t)})):[]}function B(e,t,r){return"object"==typeof e&&e?Object.entries(e).map((function(e){var n,s=e[0],i=e[1];return(n={})[t]=s,n[r]=i,n})):[]}function F(e,t){return e.reduce((function(e,r){return Object.values((0,l.mergeWith)((0,l.keyBy)(e,t),(0,l.keyBy)(r,t),j))}),[])}function j(e,t){if((0,l.isArray)(e))return e.concat(t)}function U(e,t){return e*t}function Y(e){return!e}function $(e,t){return null!=e?e:t}function H(e){return Number(e)}function W(e){if("now/d"===e)return+p()().startOf("day");if("now/y"===e)return+p()().startOf("year");var t=/^now-(\d+)(\w+)/.exec(e);if(null!==t){var r=t[1],n=t[2];return+p()().subtract(r,n)}return e?+e:+p()()}function V(e,t){e=e>0?e:8,t="string"==typeof t?t:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var r="",n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*t.length));return r}function z(e){return Array.isArray(e)?e.slice().reverse():[]}function q(e,t,r){return e.slice(t,r)}function K(e,t){return Array.isArray(e)?(0,l.sortBy)(e,t):[]}function G(e,t){return"string"==typeof e?e.split(t):[]}function J(e){return null==e?"":String(e)}function X(e,t,r){return"string"==typeof e?e.substr(t,r):""}function Z(e,t,r){return"string"==typeof e?e.substring(t,r):""}function Q(e,t){return e-t}function ee(e,t,r){return e?t:r}function te(e){return(0,l.uniq)(e)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,function(e){e.Time="time",e.Byte="byte",e.Bibyte="bibyte",e.BitRate="bitRate",e.ByteRate="byteRate"}(T||(T={})),function(e){e.Percent1="percent(1)",e.Percent100="percent(100)"}(k||(k={}));var re,ne=[k.Percent1,k.Percent100];!function(e){e.Bytes="bytes",e.Kilobytes="kilobytes",e.Megabytes="megabytes",e.Gigabytes="gigabytes",e.Terabytes="terabytes",e.Petabytes="petabytes",e.Bibytes="bibytes",e.Kibibytes="kibibytes",e.Mebibytes="mebibytes",e.Gibibytes="gibibytes",e.Tebibytes="tebibytes",e.Pebibytes="pebibytes",e.b="b",e.B="B",e.KB="KB",e.MB="MB",e.GB="GB"}(re||(re={}));var se,ie=[{id:re.Bytes,alias:["B","bytes(B)"],divisor:1,display:"B"},{id:re.Kilobytes,alias:["KB","kilobytes(KB)"],divisor:1e3,display:"KB"},{id:re.Megabytes,alias:["MB","megabytes(MB)"],divisor:Math.pow(1e3,2),display:"MB"},{id:re.Gigabytes,alias:["GB","gigabytes(GB)"],divisor:Math.pow(1e3,3),display:"GB"},{id:re.Terabytes,alias:["TB","terabytes(TB)"],divisor:Math.pow(1e3,4),display:"TB"},{id:re.Petabytes,alias:["PB","petabytes(PB)"],divisor:Math.pow(1e3,5),display:"PB"}],ae=[{id:re.Bibytes,alias:["B","bibytes(B)"],divisor:1,display:"B"},{id:re.Kibibytes,alias:["KiB","kibibytes(KiB)"],divisor:1024,display:"KiB"},{id:re.Mebibytes,alias:["MiB","mebibytes(MiB)"],divisor:Math.pow(1024,2),display:"MiB"},{id:re.Gibibytes,alias:["GiB","gibibytes(GiB)"],divisor:Math.pow(1024,3),display:"GiB"},{id:re.Tebibytes,alias:["TiB","tebibytes(TiB)"],divisor:Math.pow(1024,4),display:"TiB"},{id:re.Pebibytes,alias:["PiB","pebibytes(PiB)"],divisor:Math.pow(1024,5),display:"PiB"}],oe=[{id:re.b,divisor:1,display:"b"},{id:re.B,divisor:8,display:"B"},{id:re.KB,divisor:8192,display:"KB"},{id:re.MB,divisor:8388608,display:"MB"},{id:re.GB,divisor:8589934592,display:"GB"}];!function(e){e.BitsPerSecond="bits/sec",e.KilobitsPerSecond="kilobits/sec",e.MegabitsPerSecond="megabits/sec",e.GigabitsPerSecond="gigabits/sec",e.BytesPerSecond="bytes/sec",e.KilobytesPerSecond="kilobytes/sec",e.MegabytesPerSecond="megabytes/sec",e.GigabytesPerSecond="gigabytes/sec",e.bps="bps",e.Bps="Bps",e.KBps="KBps",e.MBps="MBps",e.GBps="GBps"}(se||(se={}));var ce,le=[{id:se.BitsPerSecond,alias:["bps","bits/sec(bps)"],divisor:1,display:"bps"},{id:se.KilobitsPerSecond,alias:["Kbps","kilobits/sec(Kbps)"],divisor:1024,display:"Kbps"},{id:se.MegabitsPerSecond,alias:["Mbps","megabits/sec(Mbps)"],divisor:1048576,display:"Mbps"},{id:se.GigabitsPerSecond,alias:["Gbps","gigabits/sec(Gbps)"],divisor:1073741824,display:"Gbps"}],ue=[{id:se.BytesPerSecond,alias:["Bps","bytes/sec(Bps)"],divisor:8,display:"Bps"},{id:se.KilobytesPerSecond,alias:["KBps","kilobytes/sec(KBps)"],divisor:8192,display:"KBps"},{id:se.MegabytesPerSecond,alias:["MBps","megabytes/sec(MBps)"],divisor:8388608,display:"MBps"},{id:se.GigabytesPerSecond,alias:["GBps","gigabytes/sec(GBps)"],divisor:8589934592,display:"GBps"}],he=[{id:se.bps,divisor:1,display:"bps"},{id:se.Bps,divisor:8,display:"Bps"},{id:se.KBps,divisor:8192,display:"KBps"},{id:se.MBps,divisor:8388608,display:"MBps"},{id:se.GBps,divisor:8589934592,display:"GBps"}];!function(e){e.Nanosecond="nanoseconds",e.Microsecond="microseconds",e.Milliseconds="milliseconds",e.Seconds="seconds",e.Minutes="minutes",e.Hours="hours",e.Days="days",e.Weeks="weeks",e.Months="months",e.Years="years",e.ms="ms",e.s="s",e.min="min",e.hour="hour",e.day="day",e.week="week"}(ce||(ce={}));var pe,de,fe=[{id:ce.Nanosecond,alias:["ns","nanoseconds(ns)"],divisor:1,display:"ns"},{id:ce.Microsecond,alias:["μs","microseconds(μs)"],divisor:1e3,display:"μs"},{id:ce.Milliseconds,alias:["ms","milliseconds(ms)"],divisor:1e6,display:"ms"},{id:ce.Seconds,alias:["s","seconds(s)"],divisor:1e9,display:"s"},{id:ce.Minutes,alias:["min","minutes(min)"],divisor:6e10,display:"min"},{id:ce.Hours,alias:["hour","hours(hour)"],divisor:36e11,display:"hour"},{id:ce.Days,alias:["day","days(day)"],divisor:864e11,display:"day"},{id:ce.Weeks,alias:["week","weeks(week)"],divisor:6048e11,display:"week"},{id:ce.Months,alias:["month","months(month)"],divisor:2592e12,display:"month"},{id:ce.Years,alias:["year","years(year)"],divisor:31536e12,display:"year"}];ce.ms,ce.s,ce.min,ce.hour,ce.day,ce.week,(pe={})[T.Time]=fe,pe[T.Byte]=ie,pe[T.Bibyte]=ae,pe[T.BitRate]=le,pe[T.ByteRate]=ue,function(e){e.None="none",e.K="K",e.M="M",e.B="B",e.T="T"}(de||(de={}));var me,ye,ge=[{id:de.None,divisor:1,display:""},{id:de.K,divisor:1e3,display:"K"},{id:de.M,divisor:1e6,display:"M"},{id:de.B,divisor:1e9,display:"B"},{id:de.T,divisor:1e12,display:"T"}],ve=function(e,t){return e.id.toLocaleLowerCase()===(null==t?void 0:t.toLocaleLowerCase())||e.alias&&e.alias.map((function(e){return e.toLocaleLowerCase()})).includes(t)},be=function(e,t){return e.id.toLocaleLowerCase()===(null==t?void 0:t.toLocaleLowerCase())||e.alias&&e.alias.includes(t)},we=[fe],xe=[].concat.apply([],we.map((function(e){return C(e.map((function(e){return e.id})),[].concat.apply([],e.map((function(e){return e.alias?e.alias:[]}))))}))),Se=[ie,ae,oe],Pe=[].concat.apply([],Se.map((function(e){return C(e.map((function(e){return e.id})),[].concat.apply([],e.map((function(e){return e.alias?e.alias:[]}))))}))),Ae=[le,ue,he],Ee=[].concat.apply([],Ae.map((function(e){return C(e.map((function(e){return e.id})),[].concat.apply([],e.map((function(e){return e.alias?e.alias:[]}))))}))),Te=function(e,t,r){var n=0,s=Math.sign(e),i=Math.abs(e);if(t){var a=ge.findIndex((function(e){return e.id.toLocaleLowerCase()===t.toLocaleLowerCase()}));-1!==a&&(n=a)}for(var o=ge[n],c=n+1;c<ge.length&&i/(ge[c].divisor/ge[n].divisor)>=1;++c)o=ge[c];return o.id===de.None?(s*i).toFixed(null!=r?r:2):(i/(o.divisor/ge[n].divisor)*s).toFixed(null!=r?r:2)+o.display};!function(e){e.None="none",e.Short="short",e.Percent="percent",e.Time="time",e.Data="data",e.DataRate="data_rate"}(ye||(ye={}));var ke=((me={})[ye.None]=[],me[ye.Short]=[],me[ye.Percent]=ne,me[ye.Time]=xe,me[ye.Data]=Pe,me[ye.DataRate]=Ee,me),_e=function(e,t){return void 0===t?e.toString():e.toFixed(t)},Ce=function(e,t){if(!t)return[Te(e),null];var r=t.type;r||(t.unit?(r=ye.Short,Object.entries(ke).map((function(e){var n=e[0];e[1].map((function(e){return e.toLocaleLowerCase()})).includes(t.unit.toLocaleLowerCase())&&(r=n)}))):r=ye.None);var n=void 0===(null==t?void 0:t.precision)?2:t.precision;switch(r){case ye.Percent:var s=function(e,t){return t&&t.toLocaleLowerCase()===k.Percent100.toLocaleLowerCase()?e:100*e}(e,t.unit);return[_e(s,n)+"%",null];case ye.Time:var i=function(e,t,r){var n=0,s=2,i=-1;if(t)for(var a=function(e){var a=-1,o=-1;if(we[e].forEach((function(e,n){ve(e,t)&&(a=n),ve(e,r)&&(o=n)})),-1!==a)return n=e,s=a,i=o,"break"},o=0;o<we.length&&"break"!==a(o);++o);else r&&(i=we[n].findIndex((function(e){return ve(e,r)})));var c=we[n],l=c[s],u=l;if(-1===i)for(o=s+1;o<c.length&&e/(c[o].divisor/l.divisor)>=1;++o)u=c[o];else u=c[i];return r&&-1===i&&console.warn('Cannot convert unit "'+(t||l.display)+'" to "'+r+'"'),[e/(u.divisor/l.divisor),u.display]}(e,t.unit,t.targetUnit),a=i[0],o=i[1];return[""+_e(a,void 0===(null==t?void 0:t.precision)?1:t.precision),o];case ye.Data:var c=function(e,t,r){var n=Se.length-1,s=0,i=-1,a=Math.sign(e),o=Math.abs(e);if(t)for(var c=function(e){var a=-1,o=-1;if(Se[e].forEach((function(e,n){be(e,t)&&(a=n),be(e,r)&&(o=n)})),-1!==a)return n=e,s=a,i=o,"break"},l=0;l<Se.length&&"break"!==c(l);++l);else r&&(i=Se[n].findIndex((function(e){return be(e,r)})));var u=Se[n],h=u[s],p=h;if(-1===i)for(l=s+1;l<u.length&&o/(u[l].divisor/h.divisor)>=1;++l)p=u[l];else p=u[i];return r&&-1===i&&console.warn('Cannot convert unit "'+(t||h.display)+'" to "'+r+'"'),[o/(p.divisor/h.divisor)*a,p.display]}(e,t.unit,t.targetUnit),l=c[0],u=c[1];return[""+_e(l,n),u];case ye.DataRate:var h=function(e,t,r){var n=Ae.length-1,s=0,i=-1,a=Math.sign(e),o=Math.abs(e);if(t)for(var c=function(e){var a=-1,o=-1;if(Ae[e].forEach((function(e,n){ve(e,t)&&(a=n),ve(e,r)&&(o=n)})),-1!==a)return n=e,s=a,i=o,"break"},l=0;l<Ae.length&&"break"!==c(l);++l);else r&&(i=Ae[n].findIndex((function(e){return ve(e,r)})));var u=Ae[n],h=u[s],p=h;if(-1===i)for(l=s+1;l<u.length&&o/(u[l].divisor/h.divisor)>=1;++l)p=u[l];else p=u[i];return r&&-1===i&&console.warn('Cannot convert unit "'+(t||h.display)+'" to "'+r+'"'),[o/(p.divisor/h.divisor)*a,p.display]}(e,t.unit,t.targetUnit),p=h[0],d=h[1];return[""+_e(p,n),d];case ye.None:return[_e(e,n),""];default:return[Te(e,t.unit,n),t.unit]}};function Ie(e,t,r,n){return void 0===r&&(r=2),Ce(e,{unit:t,precision:r,targetUnit:n})}var Oe=r(1060);function Le(e){var t;try{t=(0,Oe.safeLoad)(e,{schema:Oe.JSON_SCHEMA,json:!0})}catch(e){console.error(e)}return t}function Ne(e,t,r){var n;void 0===t&&(t=2);try{n=(0,Oe.safeDump)(e,_({indent:t,schema:Oe.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0},r))}catch(e){console.error(e)}return n}function Me(e,t){return(0,l.round)(e,t)}function De(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function Re(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(Number("0x"+t))})))}},4310:(e,t,r)=>{"use strict";var n=r(3647),s=r(7551),i=r(7631),a=r(6255);r(5842),XMLHttpRequest.prototype.origOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.origOpen.apply(this,t);const n=a.auth.getAuth().csrfToken;n&&this.setRequestHeader("X-CSRF-Token",n)};var o=r(2193);let c=function(e){return e.LOGIN_CHANGED="LOGIN_CHANGED",e.LOGOUT_APPLIED="LOGOUT_APPLIED",e.BOOTSTRAP_ERROR="BOOTSTRAP_ERROR",e.NETWORK_ERROR="NETWORK_ERROR",e.RELOAD="RELOAD",e}({});const l={[c.LOGIN_CHANGED]:"You have logged in as another account, click OK to refresh the page.",[c.LOGOUT_APPLIED]:"Your account has been logged out, click OK to refresh the page.",[c.BOOTSTRAP_ERROR]:"Bootstrap Error",[c.NETWORK_ERROR]:"Network Error",[c.RELOAD]:"Reload"},u={[c.LOGIN_CHANGED]:"您已经登录另一个账号,点击确定刷新页面。",[c.LOGOUT_APPLIED]:"您的账号已经登出,点击确定刷新页面。",[c.BOOTSTRAP_ERROR]:"启动错误",[c.NETWORK_ERROR]:"网络错误",[c.RELOAD]:"刷新"},h="-/container",p={en:l,zh:u},d="brick-next:authentication-change";let f=!1;async function m(e,t){f||"logout"!==e.type&&("check-login"!==e.type||e.org===t.org&&e.username===t.username)||!(0,n.getRuntime)().getFeatureFlags()["refresh-page-if-authentication-changed"]||(f=!0,await n.Dialog.show({type:"warn",content:i.i18n.t(`${h}:${"logout"===e.type?c.LOGOUT_APPLIED:c.LOGIN_CHANGED}`)}),window.location.reload())}async function y(){if(!window.NO_AUTH_GUARD){const e=await(0,o.n)();e.loggedIn&&(a.auth.authenticate(e),async function(e){if(window.BroadcastChannel){const t=new BroadcastChannel(d);t.postMessage({type:"check-login",org:e.org,username:e.username}),t.addEventListener("message",(t=>{m(t.data,e)}))}else{const t=new(0,(await r.e(668).then(r.bind(r,706))).BroadcastChannel)(d);t.postMessage({type:"check-login",org:e.org,username:e.username}),t.addEventListener("message",(t=>{m(t,e)}))}}(e))}}var g=r(7773),v=r(3443),b=r(9663),w=r(4113),x=r(1030),S=r(1060),P=r(4408);function A(e,t,r){return{get(s){if(t)return`${(0,n.getBasePath)()}api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/${s}`;let i=window.APP_ROOT?`${window.APP_ROOT}${window.BOOTSTRAP_UNION_FILE&&window.PUBLIC_DEPS?"":"-/"}`:"";return window.APP_ID&&window.APP_ID!==e&&(i=i.replace(new RegExp(`(^|/)${(0,x.escapeRegExp)(window.APP_ID)}/`),`$1${e}/`).replace(/\/\d+\.\d+\.\d+\//,`/${r}/`)),i.startsWith("/")||(i=(0,n.getBasePath)()+i),window.BOOTSTRAP_UNION_FILE&&window.PUBLIC_DEPS?`${i}images/${s}`:`${i}micro-apps/${e}/images/${s}`}}}let E=null,T=[];const k=new Map;async function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0.0.0";if(k.has(e))return k.get(e);const r=(0,P.a)(e,{version:t}).catch((e=>{console.warn("request standalone runtime api from micro-app-standalone failed: ",e,", something might went wrong running standalone micro app")}));return k.set(e,r),r}function C(e){var t,r,n;const s="override"===(null!==(t=null===(r=e.userConfig)||void 0===r?void 0:r.__merge_method)&&void 0!==t?t:null===(n=e.defaultConfig)||void 0===n?void 0:n.__merge_method)?{...e.defaultConfig,...e.userConfig}:(0,x.merge)({},e.defaultConfig,e.userConfig);e.config=(0,w.deepFreeze)(s)}function I(e){var t,r;const n=null!==(t=null===(r=e.config)||void 0===r||null===(r=r.settings)||void 0===r?void 0:r.locales)&&void 0!==t?t:e.locales;if(n){const t=`tmp/${e.id}`;Object.entries(n).forEach((e=>{let[r,n]=e;i.i18n.addResourceBundle(r,t,n)})),e.localeName=i.i18n.getFixedT(null,t)("name",e.name),e.localeTitle=i.i18n.getFixedT(null,t)("title",""),Object.keys(n).forEach((e=>{i.i18n.removeResourceBundle(e,t)}))}else e.localeName=e.name,e.localeTitle=""}var O=r(4231);let L=!1;const N=/^https?:\/\/localhost(?:$|:)/;var M=r(4586),D=r(5580);class R extends HTMLElement{constructor(){super(...arguments),(0,M.A)(this,"errorTitle",void 0)}connectedCallback(){this.shadowRoot||(this.attachShadow({mode:"open"}).innerHTML=[`<style>${D.A}</style>`,'<div class="icon"><svg viewBox="64 64 896 896" focusable="false" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></div>',`<div class="title">${(0,x.escape)(this.errorTitle)}</div>`,'<div class="description"><slot></slot></div>','<div class="actions"><slot name="link"></slot></div>'].join(""))}}function B(e,t){var r;null!==(r=t.options)&&void 0!==r&&null!==(r=r.interceptorParams)&&void 0!==r&&r.ignoreLoadingBar||window.dispatchEvent(new Event(e))}customElements.define("easyops-default-error",R),a.analytics.initialize(`${(0,n.getBasePath)()}api/gateway/data_exchange.store.ClickHouseInsertData/api/v1/data_exchange/frontend_stat`),s.http.interceptors.request.use(a.analytics.http.onRequest),s.http.interceptors.request.use((e=>{var t,r;B("request.start",e);const n=new Headers((null===(t=e.options)||void 0===t?void 0:t.headers)||{});n.set("lang",null!==(r=i.i18n.resolvedLanguage)&&void 0!==r?r:i.i18n.language);const{csrfToken:s}=a.auth.getAuth();s&&n.set("X-CSRF-Token",s);const o=function(e,t){if(null!==E&&T.some((r=>new RegExp(r.uri).test(e)&&function(e){const t=null==e?void 0:e.toUpperCase();return"LIST"===t?"GET":t}(r.method)===(null==t?void 0:t.toUpperCase()))))return{mockId:E,url:e.replace(/(^|\/)(api\/gateway\/.+?)(?:@\d+\.\d+\.\d+)?\/(.+)/,((e,t,r,n)=>`${t}${r}/${n}`)).replace(/(^|\/)api\/gateway\//,`$1api/gateway/mock_server.proxy.${E}/`)}}(e.url,e.method);o&&(e.url=o.url,n.set("easyops-mock-id",o.mockId));const c=(()=>{let e="";for(let t=0;t<16;t+=1)e+="0123456789abcdef"[Math.floor(16*Math.random())];return e})();return n.set("X-B3-Traceid",`ffffffffffffffff${c}`),n.set("X-B3-Spanid",c),n.set("X-B3-Sampled","1"),{...e,options:{...e.options,headers:n}}})),s.http.interceptors.response.use((function(e,t){return B("request.end",t),e}),(function(e,t){return B("request.end",t),Promise.reject(e)})),s.http.interceptors.response.use(a.analytics.http.onResponse,a.analytics.http.onResponseError);const F=document.querySelector("#global-loading-bar");F.classList.add("rendered");let j=!1,U=0;function Y(){const e=U>0;e!==j&&(j=e,F.classList[e?"add":"remove"]("loading"))}window.addEventListener("request.start",(()=>{U++,Y()})),window.addEventListener("request.end",(()=>{U>0&&(U--,Y())}));const $=(0,n.createRuntime)({hooks:{auth:a.auth,fulfilStoryboard:async function(e){var t;if(window.STANDALONE_MICRO_APPS){if(window.BOOTSTRAP_UNION_FILE&&!e.$$fullMerged){const t=`${window.APP_ROOT}${window.PUBLIC_DEPS?"":"-/"}${e.bootstrapFile}`,{storyboards:r}=await s.http.get(t),{routes:n,meta:i,app:a}=r[0];Object.assign(e,{routes:n,meta:i,app:{...e.app,...a},$$fullMerged:!0})}if(!window.NO_AUTH_GUARD){const t=await _(e.app.id,e.app.currentVersion);if(t){const{userConfig:r,injectMenus:n,blackList:s}=t;e.app.userConfig={...e.app.userConfig,...r},function(e){if(Array.isArray(e))for(const t of e)t.overrideApp&&(C(t.overrideApp),I(t.overrideApp))}(n),e.meta={...e.meta,injectMenus:n,blackList:s}}}}else{const{routes:t,meta:r,app:n}=await(0,b.m)(e.app.id,{});Object.assign(e,{routes:t,meta:r,app:{...e.app,...n}})}!function(e){var t;if(e.app.menuIcon&&"imgSrc"in e.app.menuIcon&&null!==(t=e.app.menuIcon.imgSrc)&&void 0!==t&&t.startsWith("api/")){const t=e.app.menuIcon.imgSrc.split("/"),r=t[t.length-1],n=A(e.app.id,e.app.isBuildPush,e.app.currentVersion).get(r);e.app.menuIcon.imgSrc=n}}(e),C(e.app),I(e.app),function(e){if(!e)return E=null,void(T=[]);E=e.mockId,T=e.mockList.map((e=>({...e,uri:`${a.flowApi.isFlowApiProvider(e.provider)?e.uri.replace(/(.+?)\/(.+)/,((e,t,r)=>`/${t}(@\\d+\\.\\d+\\.\\d+)?/${r}$`)):`/${e.uri.split(".").slice(2).join(".")}$`}`.replace(/:\w+/g,"([^/]+)")})))}(null===(t=e.meta)||void 0===t?void 0:t.mocks)},checkPermissions:a.checkPermissions,flowApi:a.flowApi,checkInstalledApps:a.checkInstalledApps,menu:a.menu,images:{imagesFactory:A,widgetImagesFactory:function(e,t){return{get(r){var n;return`${null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:""}bricks/${e}/${window.PUBLIC_ROOT_WITH_VERSION&&t?`${t}/`:""}dist/assets/${r}`}}}},messageDispatcher:a.messageDispatcher,pageView:a.analytics.pageView}});(0,i.initializeI18n)(h,p);const H=async function(){try{const[,e]=await Promise.all([y(),window.STANDALONE_MICRO_APPS?async function(){const e=[window.BOOTSTRAP_UNION_FILE?s.http.get(window.BOOTSTRAP_UNION_FILE):s.http.get(window.BOOTSTRAP_FILE),window.BOOTSTRAP_UNION_FILE?Promise.resolve(""):s.http.get(`${window.APP_ROOT}conf.yaml`,{responseType:"text"}),(0,v.e)().catch((e=>{console.warn("request runtime api from api-gateway failed: ",e,", something might went wrong running standalone micro app")})),window.BOOTSTRAP_UNION_FILE?s.http.get(window.BOOTSTRAP_FILE):Promise.resolve(void 0)];if(!window.NO_AUTH_GUARD){const e=window.APP_ROOT?window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/([^/]+)\/versions\/([^/]+)\//)||window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/micro-apps\/(?:v2|v3)\/([^/]+)\/([^/]+)\//):null;e&&_(e[1],e[2])}const[t,r,n,i]=await Promise.all(e);return function(e,t){let r;try{r=t?(0,S.safeLoad)(t,{schema:S.JSON_SCHEMA,json:!0}):void 0}catch(e){throw console.error("Parse conf.yaml failed",e),new Error("Invalid conf.yaml")}if(r){const{sys_settings:t,user_config:n,user_config_by_apps:s}=r;if(t){const{feature_flags:r,...n}=t;e.settings={featureFlags:r,...n}}if(n&&1===e.storyboards.length)e.storyboards[0].app.userConfig=n;else if(s)for(const{app:t}of e.storyboards)(0,w.hasOwnProperty)(s,t.id)&&(t.userConfig=s[t.id])}}(t,r),function(e,t){var r;if(!t)return;const{featureFlags:n,misc:s,...i}=t,a=null!==(r=e.settings)&&void 0!==r?r:e.settings={};a.featureFlags={...a.featureFlags,...n},a.misc={...a.misc,...s},Object.assign(a,i)}(t,null==n?void 0:n.settings),function(e,t){if(t){const{storyboards:r}=t,{routes:n,meta:s,app:i}=r[0],a=e.storyboards.find((e=>e.app.id===i.id));a&&Object.assign(a,{routes:n,meta:s,app:{...a.app,...i},$$fullMerged:!0})}}(t,i),t}():(0,g.K)({appFields:"defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status,icons,standaloneMode",ignoreTemplateFields:"templates",ignoreBrickFields:"bricks,processors,providers,editors"})]);return await $.bootstrap(e),(0,n.resetReloadForError)(),"ok"}catch(e){if(console.error("bootstrap failed:",e),(0,n.shouldReloadForError)(e))return location.reload(),"failed";document.body.classList.add("bootstrap-error");const t=document.createElement("easyops-default-error");t.errorTitle=(0,n.isNetworkError)(e)?i.i18n.t(`${h}:${c.NETWORK_ERROR}`):i.i18n.t(`${h}:${c.BOOTSTRAP_ERROR}`),t.textContent=(0,n.httpErrorToString)(e);const r=document.createElement("a");return r.slot="link",r.href=location.href,r.textContent=i.i18n.t(`${h}:${c.RELOAD}`),t.appendChild(r),document.querySelector("#main-mount-point").replaceChildren(t),"failed"}}();window.parent!==window&&function(e){const t=async r=>{let{data:s,origin:i}=r;const a=function(e){return"preview-container"===(null==e?void 0:e.sender)&&"start-preview"===e.type}(s),o=function(e){return"ui-test-preview"===(null==e?void 0:e.channel)&&"initialize"===e.type}(s);if(a||o){window.removeEventListener("message",t);const r=await async function(e,t){if(L||!t)return!1;if("failed"===await e)return!1;L=!0;let r=t===location.origin||N.test(t)||N.test(location.origin);if(!r){const{allowedPreviewFromOrigins:e}=(0,n.getRuntime)().getMiscSettings();Array.isArray(e)&&(r=e.some((e=>e===t))),r||console.error(`Preview is disallowed, from origin: ${t}, while allowing: ${JSON.stringify(e)}`)}return r}(e,i);if(r){let e,t;a?({agent:e,...t}=s.options):({agent:e,options:t}=s.payload),await(0,O.loadBricksImperatively)([e.brick],[e.pkg]);const r=document.createElement(e.brick);await r.resolve(i,t)}}};window.addEventListener("message",t)}(H),window.__dev_only_getAllContextValues=n.__secret_internals.getAllContextValues},4396:(e,t,r)=>{"use strict";function n(e){return e&&"function"==typeof e.then}r.d(t,{HO:()=>c,UU:()=>p,aS:()=>i,fg:()=>s,mU:()=>h,o:()=>a,yL:()=>n,yy:()=>o,zs:()=>l});var s=Promise.resolve(!1),i=Promise.resolve(!0),a=Promise.resolve();function o(e,t){return e||(e=0),new Promise((function(r){return setTimeout((function(){return r(t)}),e)}))}function c(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function l(){return Math.random().toString(36).substring(2)}var u=0;function h(){var e=1e3*Date.now();return e<=u&&(e=u+1),u=e,e}function p(){return"undefined"!=typeof navigator&&void 0!==navigator.locks&&"function"==typeof navigator.locks.request}},4408:(e,t,r)=>{"use strict";r.d(t,{a:()=>s});var n=r(7551);const s=async(e,t,r)=>(await n.http.get(`api/gateway/logic.micro_app_standalone_service/api/v1/micro_app_standalone/runtime/${e}`,{...r,params:t})).data},4586:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(1369);function s(e,t,r){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},4635:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(2016);function s(e,t){(0,n.A)(e,t),t.add(e)}},4712:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__dev_only_clearGlobalExecutionContextStack:()=>W,__dev_only_getGlobalExecutionContextStack:()=>V,clearExpressionASTCache:()=>ae,clearFunctionASTCache:()=>ee,cook:()=>z,isEvaluable:()=>ne,isTrackAll:()=>ie,precook:()=>J,precookFunction:()=>Q,preevaluate:()=>re,shouldAllowRecursiveEvaluations:()=>se});var n=r(4586);let s=function(e){return e[e.LEXICAL=0]="LEXICAL",e[e.STRICT=1]="STRICT",e}({});const i=Symbol.for("SourceNode"),a=Symbol.for("FormalParameters"),o=Symbol.for("ECMAScriptCode"),c=Symbol.for("Environment"),l=Symbol.for("IsConstructor"),u=Symbol.for("ThisMode"),h=Symbol.for("$DebuggerCall$"),p=Symbol.for("$DebuggerScope$"),d=Symbol.for("$DebuggerNode$"),f=Symbol.for("$DebuggerReturn$");class m{constructor(){(0,n.A)(this,"VariableEnvironment",void 0),(0,n.A)(this,"LexicalEnvironment",void 0),(0,n.A)(this,"Function",void 0)}}let y=function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LEXICAL=1]="LEXICAL",e[e.INITIALIZED=2]="INITIALIZED",e}({});class g{constructor(e){(0,n.A)(this,"OuterEnv",void 0),(0,n.A)(this,"bindingMap",new Map),(0,n.A)(this,"ThisValue",void 0),(0,n.A)(this,"ThisBindingStatus",void 0),this.OuterEnv=e}HasBinding(e){return this.bindingMap.has(e)}CreateMutableBinding(e,t){return this.bindingMap.set(e,{mutable:!0,deletable:t}),S(void 0)}CreateImmutableBinding(e,t){return this.bindingMap.set(e,{strict:t}),S(void 0)}InitializeBinding(e,t){const r=this.bindingMap.get(e);return Object.assign(r,{initialized:!0,value:t}),S(void 0)}SetMutableBinding(e,t,r){const n=this.bindingMap.get(e);if(!n.initialized)throw new ReferenceError(`${e} is not initialized`);if(!n.mutable)throw new TypeError("Assignment to constant variable");return n.value=t,S(void 0)}GetBindingValue(e,t){const r=this.bindingMap.get(e);if(!r.initialized)throw new ReferenceError(`${e} is not initialized`);return r.value}HasThisBinding(){return!1}}class v extends g{}class b extends g{constructor(e){super(e[c]),e[u]===s.LEXICAL?this.ThisBindingStatus=y.LEXICAL:this.ThisBindingStatus=y.UNINITIALIZED}HasThisBinding(){return this.ThisBindingStatus!==y.LEXICAL}BindThisValue(e){if(this.ThisBindingStatus===y.INITIALIZED)throw new Error("This binding has been initialized");this.ThisValue=e,this.ThisBindingStatus=y.INITIALIZED}GetThisBinding(){if(this.ThisBindingStatus===y.UNINITIALIZED)throw new Error("This binding is not initialized");return this.ThisValue}}class w{constructor(e,t,r){(0,n.A)(this,"Base",void 0),(0,n.A)(this,"ReferenceName",void 0),(0,n.A)(this,"Strict",void 0),this.Base=e,this.ReferenceName=t,this.Strict=r}}class x{constructor(e,t){(0,n.A)(this,"Type",void 0),(0,n.A)(this,"Value",void 0),this.Type=e,this.Value=t}}function S(e){return new x("normal",e)}const P=Symbol("empty completion");function A(e){const t=new Set,r=e=>{if(Array.isArray(e))for(const t of e)r(t);else if(e)switch(e.type){case"Identifier":return void t.add(e.name);case"VariableDeclaration":return r(e.declarations);case"VariableDeclarator":case"FunctionDeclaration":return r(e.id);case"ArrayPattern":return r(e.elements);case"AssignmentPattern":return r(e.left);case"ObjectPattern":return r(e.properties);case"Property":return r(e.value);case"RestElement":return r(e.argument)}};return r(e),Array.from(t)}function E(e){const t=e=>{if(Array.isArray(e))return e.some(t);if(e)switch(e.type){case"ArrayPattern":return t(e.elements);case"AssignmentPattern":return!0;case"ObjectPattern":return t(e.properties);case"Property":return e.computed||t(e.value);case"RestElement":return t(e.argument)}};return t(e)}function T(e,t){const r=[],n={var:t.var},s=(e,t)=>{if(Array.isArray(e))for(const r of e)s(r,t);else if(e){switch(e.type){case"FunctionDeclaration":return void(Number(!t.var)^Number(t.topLevel)&&r.push(e));case"VariableDeclaration":return void(Number(!t.var)^Number("var"===e.kind)&&r.push(e));case"SwitchCase":return void s(e.consequent,n);case"CatchClause":return void s(e.body,n)}if(t.var)switch(e.type){case"BlockStatement":case"DoWhileStatement":case"WhileStatement":return void s(e.body,n);case"IfStatement":return s(e.consequent,n),void s(e.alternate,n);case"ForStatement":return s(e.init,n),void s(e.body,n);case"ForInStatement":case"ForOfStatement":return s(e.left,n),void s(e.body,n);case"SwitchStatement":return void s(e.cases,n);case"TryStatement":return s(e.block,n),s(e.handler,n),void s(e.finalizer,n)}}};return s(e,t),r}function k(e){return"unresolvable"!==e.Base&&!(e.Base instanceof g)}function _(e,t){return e.Base.InitializeBinding(e.ReferenceName,t)}function C(e,t,r){if(null==t)return e;const n=Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));for(const s of n)if(!r.has(s)){const r=Object.getOwnPropertyDescriptor(t,s);null!=r&&r.enumerable&&(e[s]=t[s])}return e}function I(e,t){const r="const"===e.kind;for(const n of A(e))r?t.CreateImmutableBinding(n,!0):t.CreateMutableBinding(n,!1)}function O(e){return"normal"===e.Type||"continue"==e.Type}function L(e,t){return e.Value!==P?e:new x(e.Type,t)}function N(e){if(e instanceof x&&(e=e.Value),!(e instanceof w))return e;if("unresolvable"===e.Base)throw new ReferenceError(`${e.ReferenceName} is not defined`);return e.Base instanceof g?e.Base.GetBindingValue(e.ReferenceName,e.Strict):e.Base[e.ReferenceName]}function M(e){return"symbol"==typeof e?e:String(e)}function D(e,t){return e[t]}function R(e,t){if("unresolvable"===e.Base)throw new ReferenceError(`${e.ReferenceName} is not defined`);return e.Base instanceof g?e.Base.SetMutableBinding(e.ReferenceName,t,e.Strict):(e.Base[e.ReferenceName]=t,S(void 0))}function B(e){if(t=e,!(Array.isArray(t)||null!=t&&"function"==typeof t[Symbol.iterator]))throw new TypeError(typeof e+" is not iterable");var t;return e[Symbol.iterator]()}function F(e){if(null==e)throw new TypeError("Cannot destructure properties of undefined or null")}function j(e,t,r){return e?e.HasBinding(t)?new w(e,t,r):j(e.OuterEnv,t,r):new w("unresolvable",t,r)}function U(e,t,r){switch(t){case"+":return e+r;case"-":return e-r;case"/":return e/r;case"%":return e%r;case"*":return e*r;case"**":return e**r;case"==":return e==r;case"===":return e===r;case"!=":return e!=r;case"!==":return e!==r;case">":return e>r;case"<":return e<r;case">=":return e>=r;case"<=":return e<=r;case"in":return e in r}throw new SyntaxError(`Unsupported binary operator \`${t}\``)}const Y=new WeakSet([Function,Object,Function.prototype,Object.prototype,function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}()]),$=new WeakSet([Array,Map,Set,URL,URLSearchParams,WeakMap,WeakSet,RegExp]),H=[];function W(){H.length=0}function V(){return H}function z(e,t){var r;let{rules:n,debug:y,externalSourceForDebug:g,globalVariables:W={},ArrayConstructor:V=Array,hooks:z={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const K="FunctionDeclaration"!==e.type;function G(e){g||function(e){if(Y.has(e))throw new TypeError("Cannot access reserved objects such as `Function`.")}(e)}const J=new v(null),X=new m;X.VariableEnvironment=J,X.LexicalEnvironment=J;const Z=[X];for(const[e,t]of Object.entries(W))J.CreateImmutableBinding(e,!0),J.InitializeBinding(e,t);const Q=new WeakMap;let ee;function*te(e,r,n){var s,i;switch(null===(s=z.beforeEvaluate)||void 0===s||s.call(z,e),ee=e,y&&(n||e.type.endsWith("Statement")&&("ExpressionStatement"!==e.type||"CallExpression"!==e.expression.type&&"TaggedTemplateExpression"!==e.expression.type)&&"TryStatement"!==e.type&&"BlockStatement"!==e.type&&"DoWhileStatement"!==e.type&&"WhileStatement"!==e.type&&"ForStatement"!==e.type&&"ForInStatement"!==e.type&&"ForOfStatement"!==e.type)&&(yield),e.type){case"ArrayExpression":{const t=new V;for(const r of e.elements)if(r)if("SpreadElement"===r.type){const e=N(yield*te(r.argument));t.push(...e)}else t.push(N(yield*te(r)));else t.length+=1;return S(t)}case"ArrowFunctionExpression":return _e(e),S(we(e));case"BinaryExpression":{const r=N(yield*te(e.left)),n=yield*te(e.right),s=N(n);if(K&&"|>"===e.operator){if("function"!=typeof s){const r=t.substring(e.right.start,e.right.end);throw new TypeError(`${r} is not a function`)}let i;return n instanceof w&&k(n)&&(i=n.Base),S(s.call(i,r))}return S(U(r,e.operator,s))}case"CallExpression":{const t=(yield*te(e.callee,r)).Value,n=N(t);return null==n&&(e.optional||null!=r&&r.skipped)?(r.skipped=!0,S(void 0)):(G(n),y&&(yield),yield*pe(n,t,e.arguments,e.callee))}case"ChainExpression":return yield*te(e.expression,{});case"ConditionalExpression":return S(N(yield*te(N(yield*te(e.test))?e.consequent:e.alternate)));case"Identifier":return S(ne(e.name));case"Literal":if(e.regex){if(null===e.value)throw new SyntaxError(`Invalid regular expression: ${e.raw}`);if(e.regex.flags.includes("u"))throw new SyntaxError(`Unsupported unicode flag in regular expression: ${e.raw}`);return S(new RegExp(e.regex.pattern,e.regex.flags))}return S(e.value);case"LogicalExpression":{const t=N(yield*te(e.left));switch(e.operator){case"&&":return S(t&&N(yield*te(e.right)));case"||":return S(t||N(yield*te(e.right)));case"??":return S(null!=t?t:N(yield*te(e.right)));default:throw new SyntaxError(`Unsupported logical operator '${e.operator}'`)}}case"MemberExpression":{const t=N((yield*te(e.object,r)).Value);if(null==t&&(e.optional||null!=r&&r.skipped))return r.skipped=!0,S(void 0);G(t);const n=e.computed?yield*function*(e,t){const r=M(N(yield*te(t)));return new w(e,r,!0)}(t,e.property):function(e,t){ee=t;const r=t.name;return new w(e,r,!0)}(t,e.property);return G(n),S(n)}case"NewExpression":return yield*function*(e,r){const n=N(yield*te(e)),s=yield*de(r);if("function"!=typeof n||!1===n[l]){const r=t.substring(e.start,e.end);throw new TypeError(`${r} is not a constructor`)}if(!g&&!function(e){return $.has(e)||e===Date}(n)&&n!==V){const r=t.substring(e.start,e.end);throw new TypeError(`${r} is not an allowed constructor`)}return S(new n(...s))}(e.callee,e.arguments);case"ObjectExpression":{const t={};for(const r of e.properties)if("SpreadElement"===r.type)C(t,N(yield*te(r.argument)),new Set);else{if("init"!==r.kind)throw new SyntaxError("Unsupported object getter/setter");const e=r.computed||"Identifier"!==r.key.type?yield*Ae(r.key):r.key.name;if("__proto__"===e)throw new TypeError("Setting '__proto__' property is not allowed");const n=N(yield*te(r.value));r.method&&"function"==typeof n&&xe(n,e),t[e]=n}return S(t)}case"SequenceExpression":{let t;for(const r of e.expressions)t=S(N(yield*te(r)));return t}case"TemplateLiteral":{const t=[e.quasis[0].value.cooked];let r=0;for(const n of e.expressions){const s=N(yield*te(n));t.push(String(s)),t.push(e.quasis[r+=1].value.cooked)}return S(t.join(""))}case"TaggedTemplateExpression":{const t=(yield*te(e.tag)).Value,r=N(t);return G(r),y&&(yield),yield*pe(r,t,e.quasi,e.tag)}case"UnaryExpression":{const t=(yield*te(e.argument)).Value;if(!K&&"delete"===e.operator){if(!(t instanceof w))return S(!0);if(k(t))return S(delete t.Base[t.ReferenceName])}return"typeof"===e.operator?t instanceof w&&"unresolvable"===t.Base?S("undefined"):S(typeof N(t)):S(function(e,t){switch(t){case"!":return!e;case"+":return+e;case"-":return-e;case"void":return}throw new SyntaxError(`Unsupported unary operator \`${t}\``)}(N(t),e.operator))}}if(!K)switch(e.type){case"AssignmentExpression":{if("="===e.operator){if("ArrayPattern"!==e.left.type&&"ObjectPattern"!==e.left.type){const t=(yield*te(e.left)).Value;let r;return r=ye(e.right)&&"Identifier"===e.left.type?ge(e.right,e.left.name):N(yield*te(e.right)),R(t,r),S(r)}const t=N(yield*te(e.right));return yield*ce(e.left,t),S(t)}const t=(yield*te(e.left)).Value,r=N(t),n=N(yield*te(e.right)),s=function(e,t,r){switch(t){case"+=":case"-=":case"*=":case"/=":case"%=":case"**=":return U(e,t.substr(0,t.length-1),r)}throw new SyntaxError(`Unsupported assignment operator \`${t}\``)}(r,e.operator,n);return R(t,s),S(s)}case"BlockStatement":{if(!e.body.length)return S(P);const t=re().LexicalEnvironment,r=new v(t);he(e.body,r),re().LexicalEnvironment=r;const n=yield*me(e.body);return re().LexicalEnvironment=t,n}case"BreakStatement":return new x("break",P);case"ContinueStatement":return new x("continue",P);case"EmptyStatement":case"FunctionDeclaration":return S(P);case"DoWhileStatement":return se(yield*function*(e){let t;for(;;){const r=yield*te(e.body);if(!O(r))return L(r,t);if(r.Value!==P&&(t=r.Value),!N(yield*te(e.test,void 0,!0)))return S(t)}}(e));case"ExpressionStatement":case"TSAsExpression":return yield*te(e.expression);case"ForInStatement":case"ForOfStatement":return se(yield*function*(e){const t=e.left,r="VariableDeclaration"===t.type?"var"===t.kind?"varBinding":"lexicalBinding":"assignment",n="lexicalBinding"===r?A(t):[],s="ForInStatement"===e.type?"enumerate":"iterate",i=yield*function*(e,t,r){const n=re(),s=n.LexicalEnvironment;if(e.length>0){const t=new v(s);for(const r of e)t.CreateMutableBinding(r,!1);n.LexicalEnvironment=t}const i=yield*te(t,void 0,!0);n.LexicalEnvironment=s;const a=N(i);return"enumerate"===r?null==a?new x("break",P):S(function*(e){for(const t in e)yield t}(a)):S(B(a))}(n,e.right,s);return"normal"!==i.Type?i:yield*function*(e,t,r,n,s){const i="assignment"===s?e:e.declarations[0].id,a=re().LexicalEnvironment;let o;const c="ObjectPattern"===i.type||"ArrayPattern"===i.type;for(;;){ee=i;const{done:l,value:u}=r.next();if(l)return y&&(yield),S(o);let h,p;if("lexicalBinding"===s){if(p=new v(a),I(e,p),re().LexicalEnvironment=p,y&&(yield),!c){const[e]=A(i);h=ne(e)}}else y&&(yield),c||(h=(yield*te(i)).Value);c?"assignment"===s?yield*ce(i,u):"varBinding"===s?yield*Pe(i,u,void 0):yield*Pe(i,u,p):"lexicalBinding"===s?_(h,u):R(h,u);const d=yield*te(t);if(re().LexicalEnvironment=a,!O(d)){const e=L(d,o);if("enumerate"!==n&&void 0!==r.return){const e=r.return();if(!e||!["object","function"].includes(typeof e))throw new TypeError("Iterator result is not an object")}return e}d.Value!==P&&(o=d.Value)}}(t,e.body,i.Value,s,r)}(e));case"ForStatement":return se(yield*function*(e){var t;if("VariableDeclaration"===(null===(t=e.init)||void 0===t?void 0:t.type)){if("var"===e.init.kind)return yield*te(e.init),yield*ae(e.test,e.update,e.body,[]);const t=re().LexicalEnvironment,r=new v(t),n="const"===e.init.kind,s=A(e.init);for(const e of s)n?r.CreateImmutableBinding(e,!0):r.CreateMutableBinding(e,!1);re().LexicalEnvironment=r,yield*te(e.init);const i=n?[]:Array.from(s),a=yield*ae(e.test,e.update,e.body,i);return re().LexicalEnvironment=t,a}return e.init&&N(yield*te(e.init)),yield*ae(e.test,e.update,e.body,[])}(e));case"FunctionExpression":return _e(e),S(be(e));case"IfStatement":var a;return N(yield*te(e.test))?(null===(a=z.beforeBranch)||void 0===a||a.call(z,e,"if"),L(yield*te(e.consequent),void 0)):(null===(i=z.beforeBranch)||void 0===i||i.call(z,e,"else"),e.alternate?L(yield*te(e.alternate),void 0):S(void 0));case"ReturnStatement":{let t;return e.argument&&(t=N(yield*te(e.argument))),new x("return",t)}case"ThisExpression":if(!g)break;return S(function(){let e=re().LexicalEnvironment;for(;e;){if(e.HasThisBinding())return e;e=e.OuterEnv}throw new Error("Accessing global this is forbidden")}().GetThisBinding());case"ThrowStatement":throw N(yield*te(e.argument));case"UpdateExpression":{const t=(yield*te(e.argument)).Value,r=Number(N(t)),n="++"===e.operator?r+1:r-1;return R(t,n),S(e.prefix?n:r)}case"SwitchCase":return yield*me(e.consequent);case"SwitchStatement":{const t=N(yield*te(e.discriminant)),r=re().LexicalEnvironment,n=new v(r);he(e.cases,n),re().LexicalEnvironment=n;const s=yield*function*(e,t){let r;const n=e.findIndex((e=>!e.test)),s=n>=0,i=s?e.slice(0,n):e;let a=!1;for(const e of i)if(a||(a=yield*ie(e,t)),a){const t=yield*te(e);if(t.Value!==P&&(r=t.Value),"normal"!==t.Type)return L(t,r)}if(!s)return S(r);let o=!1;const c=e.slice(n+1);if(!a)for(const e of c)if(o||(o=yield*ie(e,t)),o){const t=yield*te(e);if(t.Value!==P&&(r=t.Value),"normal"!==t.Type)return L(t,r)}if(o)return S(r);const l=yield*te(e[n]);if(l.Value!==P&&(r=l.Value),"normal"!==l.Type)return L(l,r);for(const e of c){const t=yield*te(e);if(t.Value!==P&&(r=t.Value),"normal"!==t.Type)return L(t,r)}return S(r)}(e.cases,t);return re().LexicalEnvironment=r,se(s)}case"TryStatement":{let t;try{t=yield*te(e.block)}catch(r){if(!e.handler)throw r;var o;ee=e.handler,null===(o=z.beforeEvaluate)||void 0===o||o.call(z,e.handler),t=yield*function*(e,t){if(!e.param)return yield*te(e.body);const r=re().LexicalEnvironment,n=new v(r);for(const t of A(e.param))n.CreateMutableBinding(t,!1);re().LexicalEnvironment=n,yield*Pe(e.param,t,n);const s=yield*te(e.body);return re().LexicalEnvironment=r,s}(e.handler,r)}finally{if(e.finalizer){const r=yield*te(e.finalizer);"normal"!==r.Type&&(t=r)}}return t}case"VariableDeclaration":{let t;for(const r of e.declarations)if(ee=r,r.init)if("Identifier"===r.id.type){ee=r.init,y&&"CallExpression"!==ee.type&&"TaggedTemplateExpression"!==ee.type&&(yield);const n=r.id.name,s=ne(n);let i;i=ye(r.init)?ge(r.init,n):N(yield*te(r.init)),t="var"===e.kind?R(s,i):_(s,i)}else{ee=r.init,y&&"CallExpression"!==ee.type&&"TaggedTemplateExpression"!==ee.type&&(yield);const n=N(yield*te(r.init));t=yield*Pe(r.id,n,"var"===e.kind?void 0:re().LexicalEnvironment)}else t="var"===e.kind?S(P):_(ne(r.id.name),void 0);return t}case"WhileStatement":return se(yield*function*(e){let t;for(;;){if(!N(yield*te(e.test,void 0,!0)))return S(t);const r=yield*te(e.body);if(!O(r))return L(r,t);r.Value!==P&&(t=r.Value)}}(e))}throw new SyntaxError(`Unsupported node type \`${e.type}\``)}function re(){return Z[Z.length-1]}function ne(e,t){return t||(t=re().LexicalEnvironment),j(t,e,!0)}function se(e){return"break"===e.Type?e.Value===P?S(void 0):S(e.Value):e}function*ie(e,t){return t===N(yield*te(e.test))}function*ae(e,t,r,n){let s;for(oe(n);;){if(e&&!N(yield*te(e,void 0,!0)))return S(s);const i=yield*te(r);if(!O(i))return L(i,s);i.Value&&(s=i.Value),oe(n),t&&N(yield*te(t,void 0,!0))}}function oe(e){if(0===e.length)return;const t=re().LexicalEnvironment,r=t.OuterEnv,n=new v(r);for(const r of e){n.CreateMutableBinding(r,!1);const e=t.GetBindingValue(r,!1);n.InitializeBinding(r,e)}re().LexicalEnvironment=n}function*ce(e,t){if("ObjectPattern"===e.type)return F(t),e.properties.length>0&&(yield*function*(e,t){const r=new Set;for(const n of e)if("Property"===n.type){const e=n.computed||"Identifier"!==n.key.type?yield*Ae(n.key):n.key.name,s="AssignmentPattern"===n.value.type?n.value.left:n.value;if("Identifier"===s.type){const i=ne(s.name);let a=D(t,e);"AssignmentPattern"===n.value.type&&void 0===a&&(a=ye(n.value.right)?ge(n.value.right,s.name):N(yield*te(n.value.right))),R(i,a),r.add(e)}else yield*le(n.value,t,e),r.add(e)}else yield*ue(n,t,r)}(e.properties,t)),S(P);const r=B(t);return yield*function*(e,t){let r=S(P);for(const n of e){if(!n){t.next(),r=S(P);continue}const e="RestElement"===n.type?n.argument:"AssignmentPattern"===n.type?n.left:n,s="ArrayPattern"===e.type||"ObjectPattern"===e.type;let i,a;if(s||(i=(yield*te(e)).Value),"RestElement"!==n.type){const{done:r,value:s}=t.next(),i=r?void 0:s;a="AssignmentPattern"===n.type&&void 0===i?ye(n.right)&&"Identifier"===e.type?ge(n.right,e.name):N(yield*te(n.right)):i}else{a=new V;let e=0;for(;;){const{done:r,value:n}=t.next();if(r)break;a[e]=n,e++}}r=s?yield*ce(e,a):R(i,a)}return r}(e.elements,r)}function*le(e,t,r){const n="AssignmentPattern"===e.type?e.left:e,s="ArrayPattern"===n.type||"ObjectPattern"===n.type;let i;s||(i=(yield*te(n)).Value);const a=D(t,r);let o;return o="AssignmentPattern"===e.type&&void 0===a?N(yield*te(e.right)):a,s?yield*ce(n,o):R(i,o)}function*ue(e,t,r){return R((yield*te(e.argument)).Value,C({},t,r))}function he(e,t){const r=T(e,{var:!1,topLevel:!1});for(const e of r){const r="VariableDeclaration"===e.type&&"const"===e.kind;for(const n of A(e))r?t.CreateImmutableBinding(n,!0):t.CreateMutableBinding(n,!1);if("FunctionDeclaration"===e.type){const[r]=A(e),n=ve(e,t);t.InitializeBinding(r,n)}}}function*pe(e,r,n,s){let i;r instanceof w&&k(r)&&(i=r.Base);const a=yield*de(n);if("function"!=typeof e){const e=t.substring(s.start,s.end);throw new TypeError(`${e} is not a function`)}if(y||g){const t=e[h];if(t){const e=yield*t.apply(i,a);return G(e),S(e)}}const o=e.apply(i,a);return G(o),S(o)}function*de(e){const t=[];if(Array.isArray(e))for(const r of e)if("SpreadElement"===r.type){const e=N(yield*te(r.argument));t.push(...e)}else t.push(N(yield*te(r)));else{t.push(function(e){const t=Q.get(e);if(t)return t;const r=e.quasis.map((e=>e.value.raw)),n=e.quasis.map((e=>e.value.cooked));return Object.freeze(r),Object.defineProperty(n,"raw",{value:r,writable:!1,enumerable:!1,configurable:!1}),Object.freeze(n),Q.set(e,n),n}(e));for(const r of e.expressions)t.push(N(yield*te(r)))}return t}function*fe(e,t,r){var c;null===(c=z.beforeCall)||void 0===c||c.call(z,e[i]),function(e,t,r){if(e[u]===s.LEXICAL)return;const n=t.LexicalEnvironment;null==n||n.BindThisValue(r)}(e,function(e){const t=new m;t.Function=e;const r=new b(e);return t.VariableEnvironment=r,t.LexicalEnvironment=r,Z.push(t),H.push(t),t}(e),t);const l=yield*function*(e,t){return yield*function*(e,t,r){return yield*function*(e,t){const r=re(),i=e[o],c=e[a],l=A(c),h=E(c),p=T(i,{var:!0,topLevel:!0}),d=A(p),f=[],m=[];for(let e=p.length-1;e>=0;e--){const t=p[e];if("FunctionDeclaration"===t.type){_e(t);const[e]=A(t);f.includes(e)||(f.unshift(e),m.unshift(t))}else if(null!=n&&n.noVar)throw new SyntaxError("Var declaration is not recommended, use `let` or `const` instead")}const y=!!g&&e[u]!==s.LEXICAL,b=r.LexicalEnvironment;for(const e of l)b.CreateMutableBinding(e,!1);let w=l;if(y){const e=function(e){const t=[...e],r={};Object.defineProperty(r,"length",{value:t.length,writable:!0,configurable:!0});for(let e=0;e<t.length;e++)r[String(e)]=t[e];Object.defineProperty(r,Symbol.iterator,{value:Array.prototype.values,writable:!0,configurable:!0});const n=()=>{throw new TypeError("'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them")};return Object.defineProperty(r,"callee",{get:n,set:n}),r}(t);b.CreateImmutableBinding("arguments",!1),b.InitializeBinding("arguments",e),w=l.concat("arguments")}const x=B(t);let S;if(yield*Te(c,x,b),h){S=new v(b),r.VariableEnvironment=S;const e=[];for(const t of d)if(!e.includes(t)){let r;e.push(t),S.CreateMutableBinding(t,!1),w.includes(t)&&!f.includes(t)&&(r=b.GetBindingValue(t,!1)),S.InitializeBinding(t,r)}}else{const e=[...w];for(const t of d)e.includes(t)||(e.push(t),b.CreateMutableBinding(t,!1),b.InitializeBinding(t,void 0));S=b}const P=S;r.LexicalEnvironment=P;const k=T(i,{var:!1,topLevel:!0});for(const e of k)for(const t of A(e))"const"===e.kind?P.CreateImmutableBinding(t,!0):P.CreateMutableBinding(t,!1);for(const e of m){const[t]=A(e),r=ve(e,P);S.SetMutableBinding(t,r,!1)}}(t,r),Array.isArray(e)?yield*me(e):new x("return",N(yield*te(e)))}(e[o],e,t)}(e,r);if(y&&(ee={...e[i],[f]:!0},yield{type:"return",value:"return"===l.Type?l.Value:void 0}),Z.pop(),H.pop(),"return"===l.Type)return l.Value}function*me(e){let t=S(P);for(const r of e){const e=yield*te(r);if("normal"!==e.Type)return e;t=L(t,e.Value)}return t}function ye(e){return"FunctionExpression"===e.type&&!e.id||"ArrowFunctionExpression"===e.type}function ge(e,t){var r;switch(null===(r=z.beforeEvaluate)||void 0===r||r.call(z,e),e.type){case"FunctionExpression":return be(e,t);case"ArrowFunctionExpression":return we(e,t);default:throw new Error(`Unexpected node type for NamedEvaluation: ${e.type}`)}}function ve(e,t){const r=Se(e,t,!0,!1);return e.id&&xe(r,e.id.name),r}function be(e,t){const r=re().LexicalEnvironment;if(e.id){const t=e.id.name,n=new v(r);n.CreateImmutableBinding(t,!1);const s=Se(e,n,!0,!1);return xe(s,t),n.InitializeBinding(t,s),s}{const n=Se(e,r,!0,!1);return xe(n,null!=t?t:""),n}}function we(e,t){const r=Se(e,re().LexicalEnvironment,!1,!0);return xe(r,null!=t?t:""),r}function xe(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}function Se(e,t,r,n){const p=function(){return q(fe(p,this,arguments))};Object.defineProperties(p,{[i]:{value:e},[a]:{value:e.params},[o]:{value:"BlockStatement"===e.body.type?e.body.body:e.body},[c]:{value:t},[l]:{value:r},[u]:{value:n?s.LEXICAL:s.STRICT}});const d=function(e){let t=0;for(const r of e)switch(r.type){case"AssignmentPattern":case"RestElement":return t;default:t++}return t}(e.params);return Object.defineProperty(p,"length",{configurable:!0,value:d}),(y||g)&&Object.defineProperty(p,h,{value:function(){return fe(p,this,arguments)}}),p}function*Pe(e,t,r){switch(e.type){case"Identifier":return function(e,t,r){return r.InitializeBinding(e,t),S(P)}(e.name,t,r);case"ObjectPattern":return F(t),yield*function*(e,t,r){const n=new Set;for(const s of e){if("RestElement"===s.type)return Ee(s,t,r,n);if(s.computed||"Identifier"!==s.key.type){const e=yield*Ae(s.key);yield*ke(s.value,t,r,e),n.add(e)}else yield*ke(s.value,t,r,s.key.name),n.add(s.key.name)}return S(P)}(e.properties,t,r);case"ArrayPattern":{const n=B(t);return yield*Te(e.elements,n,r)}}}function*Ae(e){return M(N(yield*te(e)))}function Ee(e,t,r,n){const s=ne(e.argument.name,r),i=C({},t,n);return r?_(s,i):R(s,i)}function*Te(e,t,r){if(0===e.length)return S(P);let n;for(const s of e)if(s)if("RestElement"===s.type)if("Identifier"===s.argument.type){const e=ne(s.argument.name,r),i=new V;let a=0;for(;;){const{done:s,value:o}=t.next();if(s){n=r?_(e,i):R(e,i);break}i[a]=o,a++}}else{const e=new V;let i=0;for(;;){const{done:a,value:o}=t.next();if(a){n=yield*Pe(s.argument,e,r);break}e[i]=o,i++}}else{const e="AssignmentPattern"===s.type?s.left:s;switch(e.type){case"ObjectPattern":case"ArrayPattern":{let i;const{done:a,value:o}=t.next();a||(i=o),"AssignmentPattern"===s.type&&void 0===i&&(i=N(yield*te(s.right))),n=yield*Pe(e,i,r);break}case"Identifier":{const i=e.name,a=ne(i,r);let o;const{done:c,value:l}=t.next();c||(o=l),"AssignmentPattern"===s.type&&void 0===o&&(o=ye(s.right)?ge(s.right,i):N(yield*te(s.right))),n=r?_(a,o):R(a,o);break}}}else t.next(),n=S(P);return n}function*ke(e,t,r,n){if("Identifier"===e.type||"AssignmentPattern"===e.type&&"Identifier"===e.left.type){const s="Identifier"===e.type?e.name:e.left.name,i=ne(s,r);let a=D(t,n);return"AssignmentPattern"===e.type&&void 0===a&&(a=ye(e.right)?ge(e.right,s):N(yield*te(e.right))),r?_(i,a):R(i,a)}let s=D(t,n);return"AssignmentPattern"===e.type&&void 0===s&&(s=N(yield*te(e.right))),yield*Pe("AssignmentPattern"===e.type?e.left:e,s,r)}function _e(e){if(e.async||e.generator)throw new SyntaxError((e.async?"Async":"Generator")+" function is not allowed");if(K&&!e.expression)throw new SyntaxError("Only an `Expression` is allowed in `ArrowFunctionExpression`'s body")}if(K)return N(q(te(e)));null===(r=z.beforeEvaluate)||void 0===r||r.call(z,e),_e(e);const[Ce]=A(e);J.CreateImmutableBinding(Ce,!0);const Ie=ve(e,J);return J.InitializeBinding(Ce,Ie),y&&Object.defineProperties(Ie,{[p]:{value:function(){return re().LexicalEnvironment}},[d]:{value:function(){return ee}}}),Ie}function q(e){for(;;){const{done:t,value:r}=e.next();if(t)return r}}class K{constructor(){(0,n.A)(this,"VariableEnvironment",void 0),(0,n.A)(this,"LexicalEnvironment",void 0)}}class G{constructor(e){(0,n.A)(this,"OuterEnv",void 0),(0,n.A)(this,"bindingSet",new Set),this.OuterEnv=e}HasBinding(e){return this.bindingSet.has(e)}CreateBinding(e){this.bindingSet.add(e)}}function J(e){let{expressionOnly:t,visitors:r,withParent:n,externalSourceForDebug:s,hooks:i={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=new Set,o=[],c=new G(null),l=new K;function u(){return o[o.length-1]}function h(e,t,r){for(const n of t)p(e[n],null==r?void 0:r.concat({node:e,key:n}))}function p(e,n){if(Array.isArray(e))e.forEach(((e,t)=>{p(e,n?n.slice(0,-1).concat({...n[n.length-1],index:t}):n)}));else if(e){var o,c;switch(null===(o=i.beforeVisit)||void 0===o||o.call(i,e,n),function(e){var t,n;r&&(t=r,n=e.type,Object.prototype.hasOwnProperty.call(t,n))&&r[e.type](e)}(e),e.type){case"Identifier":var l;return b=e.name,void(f(u().LexicalEnvironment,b)||(null===(l=i.beforeVisitGlobal)||void 0===l||l.call(i,e,n),a.add(e.name)));case"ArrayExpression":case"ArrayPattern":return void h(e,["elements"],n);case"ArrowFunctionExpression":return void y(g(e,u().LexicalEnvironment,!0),n);case"AssignmentPattern":case"BinaryExpression":case"LogicalExpression":return void h(e,["left","right"],n);case"CallExpression":case"NewExpression":return void h(e,["callee","arguments"],n);case"ChainExpression":return void h(e,["expression"],n);case"ConditionalExpression":return void h(e,["test","consequent","alternate"],n);case"MemberExpression":return h(e,["object"],n),void(e.computed&&h(e,["property"],n));case"ObjectExpression":case"ObjectPattern":return void h(e,["properties"],n);case"Property":return e.computed&&h(e,["key"],n),void h(e,["value"],n);case"RestElement":case"SpreadElement":case"UnaryExpression":return void h(e,["argument"],n);case"SequenceExpression":case"TemplateLiteral":return void h(e,["expressions"],n);case"TaggedTemplateExpression":return void h(e,["tag","quasi"],n);case"Literal":return}if(!t)switch(e.type){case"AssignmentExpression":return void h(e,["right","left"],n);case"BlockStatement":{if(!e.body.length)return;const t=u(),r=t.LexicalEnvironment,s=new G(r);return m(e.body,s),t.LexicalEnvironment=s,h(e,["body"],n),void(t.LexicalEnvironment=r)}case"BreakStatement":case"ContinueStatement":case"EmptyStatement":return;case"CatchClause":{const t=u(),r=t.LexicalEnvironment,s=new G(r);return d(e.param,s),t.LexicalEnvironment=s,h(e,["param","body"],n),void(t.LexicalEnvironment=r)}case"DoWhileStatement":return void h(e,["body","test"],n);case"ExpressionStatement":case"TSAsExpression":return void h(e,["expression"],n);case"ForInStatement":case"ForOfStatement":{const t="VariableDeclaration"===e.left.type&&"var"!==e.left.kind,r=u(),s=r.LexicalEnvironment;if(t){const t=new G(s);d(e.left,t),r.LexicalEnvironment=t}if(h(e,["right"],n),r.LexicalEnvironment=s,t){const t=new G(s);d(e.left,t),r.LexicalEnvironment=t}return h(e,["left","body"],n),void(r.LexicalEnvironment=s)}case"ForStatement":{var v;const t="VariableDeclaration"===(null===(v=e.init)||void 0===v?void 0:v.type)&&"var"!==e.init.kind,r=u(),s=r.LexicalEnvironment;if(t){const t=new G(s);d(e.init,t),r.LexicalEnvironment=t}return h(e,["init","test","body","update"],n),void(r.LexicalEnvironment=s)}case"FunctionDeclaration":{const[t]=A(e),r=u().LexicalEnvironment,s=g(e,r);return r.CreateBinding(t),void y(s,n)}case"FunctionExpression":{const t=function(e){const t=u().LexicalEnvironment;if(!e.id)return g(e,t);const r=e.id.name,n=new G(t);return n.CreateBinding(r),g(e,n)}(e);return void y(t,n)}case"IfStatement":return void h(e,["test","consequent","alternate"],n);case"ReturnStatement":case"ThrowStatement":case"UpdateExpression":return void h(e,["argument"],n);case"SwitchCase":return void h(e,["test","consequent"],n);case"SwitchStatement":{h(e,["discriminant"],n);const t=u(),r=t.LexicalEnvironment,s=new G(r);return m(e.cases,s),t.LexicalEnvironment=s,h(e,["cases"],n),void(t.LexicalEnvironment=r)}case"ThisExpression":if(!s)break;return;case"TryStatement":return void h(e,["block","handler","finalizer"],n);case"VariableDeclaration":return void h(e,["declarations"],n);case"VariableDeclarator":return void h(e,["id","init"],n);case"WhileStatement":return void h(e,["test","body"],n)}(null===(c=i.beforeVisitUnknown)||void 0===c?void 0:c.call(i,e,n))||console.warn(`Unsupported node type \`${e.type}\``)}var b}function d(e,t){for(const r of A(e))t.CreateBinding(r)}function f(e,t){return!!e&&(e.HasBinding(t)||f(e.OuterEnv,t))}function m(e,t){d(T(e,{var:!1,topLevel:!1}),t)}function y(e,t){!function(e){const t=new K,r=new G(e.Environment);t.VariableEnvironment=r,t.LexicalEnvironment=r,o.push(t)}(e),function(e,t){const r=u(),n=e.ECMAScriptCode,i=e.FormalParameters,a=E(i),o=A(T(n,{var:!0,topLevel:!0})),c=!!s&&"LEXICAL"!==e.ThisMode,l=r.LexicalEnvironment;let h;if(d(i,l),c&&l.CreateBinding("arguments"),p(i,null==t?void 0:t.concat({node:e.Function,key:"params"})),a){h=new G(l),r.VariableEnvironment=h;for(const e of o)h.CreateBinding(e)}else{for(const e of o)l.CreateBinding(e);h=l}const f=h;r.LexicalEnvironment=f,d(T(n,{var:!1,topLevel:!0}),f)}(e,t),p(e.ECMAScriptCode,null==t?void 0:t.concat({node:e.Function,key:"body"}).concat("BlockStatement"===e.Function.body.type?{node:e.Function.body,key:"body"}:[])),o.pop()}function g(e,t,r){return{Function:e,FormalParameters:e.params,ECMAScriptCode:"BlockStatement"===e.body.type?e.body.body:e.body,Environment:t,ThisMode:r?"LEXICAL":"STRICT"}}return l.VariableEnvironment=c,l.LexicalEnvironment=c,o.push(l),p(e,n?[]:void 0),a}var X=r(580);let Z=new WeakMap;function Q(e){let{typescript:t,cacheKey:r,...n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=r?Z.get(r):void 0;return s||(s=function(e){let{typescript:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(0,X.parse)(e,{plugins:["estree",t&&"typescript"].filter(Boolean),strictMode:!0,attachComment:!1}).program.body,n=t?[]:r;if(t)for(const e of r)if(e.type.startsWith("TS")){if(/Enum|Import|Export/.test(e.type))throw new SyntaxError(`Unsupported TypeScript syntax: ${e.type}`)}else n.push(e);if(0===n.length)throw new SyntaxError("Function declaration not found");if(n.length>1||"FunctionDeclaration"!==n[0].type)throw new SyntaxError(`Expect a single function declaration at top level, but received: ${n.map((e=>`"${e.type}"`)).join(", ")}`);return n[0]}(e,{typescript:t}),r&&Z.set(r,s)),{function:s,attemptToVisitGlobals:J(s,n)}}function ee(){Z=new WeakMap}const te=new Map;function re(e){let{cache:t,...r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=[],s=e.replace(/^\s*<%[~=]?\s|\s%>\s*$/g,(e=>(n.push(e),"")));let i=t?te.get(s):void 0;return i||(i=function(e){return(0,X.parseExpression)(e,{plugins:["estree",["pipelineOperator",{proposal:"minimal"}]],attachComment:!1})}(s),t&&te.set(s,i)),{expression:i,attemptToVisitGlobals:J(i,{...r,expressionOnly:!0}),source:s,prefix:n[0],suffix:n[1]}}function ne(e){return/^\s*<%[~=]?\s/.test(e)&&/\s%>\s*$/.test(e)}function se(e){return/^\s*<%~\s/.test(e)}function ie(e){return/^\s*<%=\s/.test(e)&&/\s%>\s*$/.test(e)}function ae(){te.clear()}},4865:function(e,t,r){!function(e){"use strict";e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(9420))},4938:(e,t,r)=>{"use strict";var n=r(5417),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==s.exec(e)||null!==i.exec(e))},construct:function(e){var t,r,n,a,o,c,l,u,h=0,p=null;if(null===(t=s.exec(e))&&(t=i.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,n,a));if(o=+t[4],c=+t[5],l=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),u=new Date(Date.UTC(r,n,a,o,c,l,h)),p&&u.setTime(u.getTime()-p),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},5060:function(e,t,r){var n,s;void 0===(s="function"==typeof(n=function(){"use strict";function t(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){o(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function s(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r.g&&r.g.global===r.g?r.g:void 0,a=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,r,a){var o=i.URL||i.webkitURL,c=document.createElement("a");r=r||e.name||"download",c.download=r,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?s(c):n(c.href)?t(e,r,a):s(c,c.target="_blank")):(c.href=o.createObjectURL(e),setTimeout((function(){o.revokeObjectURL(c.href)}),4e4),setTimeout((function(){s(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,i){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,i),r);else if(n(e))t(e,r,i);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){s(a)}))}}:function(e,r,n,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return t(e,r,n);var o="application/octet-stream"===e.type,c=/constructor/i.test(i.HTMLElement)||i.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||o&&c||a)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},u.readAsDataURL(e)}else{var h=i.URL||i.webkitURL,p=h.createObjectURL(e);s?s.location=p:location.href=p,s=null,setTimeout((function(){h.revokeObjectURL(p)}),4e4)}});i.saveAs=o.saveAs=o,e.exports=o})?n.apply(t,[]):n)||(e.exports=s)},5137:(e,t,r)=>{"use strict";var n=r(5417);e.exports=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},5152:(e,t,r)=>{"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,{A:()=>n})},5250:function(e,t,r){var n;e=r.nmd(e),function(){var s,i="Expected a function",a="__lodash_hash_undefined__",o="__lodash_placeholder__",c=32,l=128,u=1/0,h=9007199254740991,p=NaN,d=4294967295,f=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],m="[object Arguments]",y="[object Array]",g="[object Boolean]",v="[object Date]",b="[object Error]",w="[object Function]",x="[object GeneratorFunction]",S="[object Map]",P="[object Number]",A="[object Object]",E="[object Promise]",T="[object RegExp]",k="[object Set]",_="[object String]",C="[object Symbol]",I="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",N="[object Float32Array]",M="[object Float64Array]",D="[object Int8Array]",R="[object Int16Array]",B="[object Int32Array]",F="[object Uint8Array]",j="[object Uint8ClampedArray]",U="[object Uint16Array]",Y="[object Uint32Array]",$=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,z=/[&<>"']/g,q=RegExp(V.source),K=RegExp(z.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,se=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,fe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pe="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Ee="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ke="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_e="["+xe+"]",Ce="["+ke+"]",Ie="["+Se+"]",Oe="\\d+",Le="["+Pe+"]",Ne="["+Ae+"]",Me="[^"+xe+ke+Oe+Pe+Ae+Ee+"]",De="\\ud83c[\\udffb-\\udfff]",Re="[^"+xe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Ee+"]",Ue="\\u200d",Ye="(?:"+Ne+"|"+Me+")",$e="(?:"+je+"|"+Me+")",He="(?:['’](?:d|ll|m|re|s|t|ve))?",We="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Ie+"|"+De+")?",ze="["+Te+"]?",qe=ze+Ve+"(?:"+Ue+"(?:"+[Re,Be,Fe].join("|")+")"+ze+Ve+")*",Ke="(?:"+[Le,Be,Fe].join("|")+")"+qe,Ge="(?:"+[Re+Ie+"?",Ie,Be,Fe,_e].join("|")+")",Je=RegExp("['’]","g"),Xe=RegExp(Ie,"g"),Ze=RegExp(De+"(?="+De+")|"+Ge+qe,"g"),Qe=RegExp([je+"?"+Ne+"+"+He+"(?="+[Ce,je,"$"].join("|")+")",$e+"+"+We+"(?="+[Ce,je+Ye,"$"].join("|")+")",je+"?"+Ye+"+"+He,je+"+"+We,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Oe,Ke].join("|"),"g"),et=RegExp("["+Ue+xe+Se+Te+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,st={};st[N]=st[M]=st[D]=st[R]=st[B]=st[F]=st[j]=st[U]=st[Y]=!0,st[m]=st[y]=st[O]=st[g]=st[L]=st[v]=st[b]=st[w]=st[S]=st[P]=st[A]=st[T]=st[k]=st[_]=st[I]=!1;var it={};it[m]=it[y]=it[O]=it[L]=it[g]=it[v]=it[N]=it[M]=it[D]=it[R]=it[B]=it[S]=it[P]=it[A]=it[T]=it[k]=it[_]=it[C]=it[F]=it[j]=it[U]=it[Y]=!0,it[b]=it[w]=it[I]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ot=parseFloat,ct=parseInt,lt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ut="object"==typeof self&&self&&self.Object===Object&&self,ht=lt||ut||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ft=dt&&dt.exports===pt,mt=ft&<.process,yt=function(){try{return dt&&dt.require&&dt.require("util").types||mt&&mt.binding&&mt.binding("util")}catch(e){}}(),gt=yt&&yt.isArrayBuffer,vt=yt&&yt.isDate,bt=yt&&yt.isMap,wt=yt&&yt.isRegExp,xt=yt&&yt.isSet,St=yt&&yt.isTypedArray;function Pt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function At(e,t,r,n){for(var s=-1,i=null==e?0:e.length;++s<i;){var a=e[s];t(n,a,r(a),e)}return n}function Et(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function kt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function _t(e,t){for(var r=-1,n=null==e?0:e.length,s=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[s++]=a)}return i}function Ct(e,t){return!(null==e||!e.length)&&jt(e,t,0)>-1}function It(e,t,r){for(var n=-1,s=null==e?0:e.length;++n<s;)if(r(t,e[n]))return!0;return!1}function Ot(e,t){for(var r=-1,n=null==e?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}function Lt(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}function Nt(e,t,r,n){var s=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++s]);++s<i;)r=t(r,e[s],s,e);return r}function Mt(e,t,r,n){var s=null==e?0:e.length;for(n&&s&&(r=e[--s]);s--;)r=t(r,e[s],s,e);return r}function Dt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Rt=Ht("length");function Bt(e,t,r){var n;return r(e,(function(e,r,s){if(t(e,r,s))return n=r,!1})),n}function Ft(e,t,r,n){for(var s=e.length,i=r+(n?1:-1);n?i--:++i<s;)if(t(e[i],i,e))return i;return-1}function jt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,s=e.length;++n<s;)if(e[n]===t)return n;return-1}(e,t,r):Ft(e,Yt,r)}function Ut(e,t,r,n){for(var s=r-1,i=e.length;++s<i;)if(n(e[s],t))return s;return-1}function Yt(e){return e!=e}function $t(e,t){var r=null==e?0:e.length;return r?zt(e,t)/r:p}function Ht(e){return function(t){return null==t?s:t[e]}}function Wt(e){return function(t){return null==e?s:e[t]}}function Vt(e,t,r,n,s){return s(e,(function(e,s,i){r=n?(n=!1,e):t(r,e,s,i)})),r}function zt(e,t){for(var r,n=-1,i=e.length;++n<i;){var a=t(e[n]);a!==s&&(r=r===s?a:r+a)}return r}function qt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Kt(e){return e?e.slice(0,hr(e)+1).replace(ne,""):e}function Gt(e){return function(t){return e(t)}}function Jt(e,t){return Ot(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Zt(e,t){for(var r=-1,n=e.length;++r<n&&jt(t,e[r],0)>-1;);return r}function Qt(e,t){for(var r=e.length;r--&&jt(t,e[r],0)>-1;);return r}var er=Wt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=Wt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rr(e){return"\\"+at[e]}function nr(e){return et.test(e)}function sr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ir(e,t){return function(r){return e(t(r))}}function ar(e,t){for(var r=-1,n=e.length,s=0,i=[];++r<n;){var a=e[r];a!==t&&a!==o||(e[r]=o,i[s++]=r)}return i}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function lr(e){return nr(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Rt(e)}function ur(e){return nr(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function hr(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var pr=Wt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),dr=function e(t){var r,n=(t=null==t?ht:dr.defaults(ht.Object(),t,dr.pick(ht,rt))).Array,se=t.Date,xe=t.Error,Se=t.Function,Pe=t.Math,Ae=t.Object,Ee=t.RegExp,Te=t.String,ke=t.TypeError,_e=n.prototype,Ce=Se.prototype,Ie=Ae.prototype,Oe=t["__core-js_shared__"],Le=Ce.toString,Ne=Ie.hasOwnProperty,Me=0,De=(r=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Re=Ie.toString,Be=Le.call(Ae),Fe=ht._,je=Ee("^"+Le.call(Ne).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=ft?t.Buffer:s,Ye=t.Symbol,$e=t.Uint8Array,He=Ue?Ue.allocUnsafe:s,We=ir(Ae.getPrototypeOf,Ae),Ve=Ae.create,ze=Ie.propertyIsEnumerable,qe=_e.splice,Ke=Ye?Ye.isConcatSpreadable:s,Ge=Ye?Ye.iterator:s,Ze=Ye?Ye.toStringTag:s,et=function(){try{var e=ci(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,lt=se&&se.now!==ht.Date.now&&se.now,ut=t.setTimeout!==ht.setTimeout&&t.setTimeout,pt=Pe.ceil,dt=Pe.floor,mt=Ae.getOwnPropertySymbols,yt=Ue?Ue.isBuffer:s,Rt=t.isFinite,Wt=_e.join,fr=ir(Ae.keys,Ae),mr=Pe.max,yr=Pe.min,gr=se.now,vr=t.parseInt,br=Pe.random,wr=_e.reverse,xr=ci(t,"DataView"),Sr=ci(t,"Map"),Pr=ci(t,"Promise"),Ar=ci(t,"Set"),Er=ci(t,"WeakMap"),Tr=ci(Ae,"create"),kr=Er&&new Er,_r={},Cr=Ri(xr),Ir=Ri(Sr),Or=Ri(Pr),Lr=Ri(Ar),Nr=Ri(Er),Mr=Ye?Ye.prototype:s,Dr=Mr?Mr.valueOf:s,Rr=Mr?Mr.toString:s;function Br(e){if(Qa(e)&&!$a(e)&&!(e instanceof Yr)){if(e instanceof Ur)return e;if(Ne.call(e,"__wrapped__"))return Bi(e)}return new Ur(e)}var Fr=function(){function e(){}return function(t){if(!Za(t))return{};if(Ve)return Ve(t);e.prototype=t;var r=new e;return e.prototype=s,r}}();function jr(){}function Ur(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=s}function Yr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function $r(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Wr;++t<r;)this.add(e[t])}function zr(e){var t=this.__data__=new Hr(e);this.size=t.size}function qr(e,t){var r=$a(e),n=!r&&Ya(e),s=!r&&!n&&za(e),i=!r&&!n&&!s&&oo(e),a=r||n||s||i,o=a?qt(e.length,Te):[],c=o.length;for(var l in e)!t&&!Ne.call(e,l)||a&&("length"==l||s&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||mi(l,c))||o.push(l);return o}function Kr(e){var t=e.length;return t?e[Vn(0,t-1)]:s}function Gr(e,t){return Oi(Ts(e),sn(t,0,e.length))}function Jr(e){return Oi(Ts(e))}function Xr(e,t,r){(r!==s&&!Fa(e[t],r)||r===s&&!(t in e))&&rn(e,t,r)}function Zr(e,t,r){var n=e[t];Ne.call(e,t)&&Fa(n,r)&&(r!==s||t in e)||rn(e,t,r)}function Qr(e,t){for(var r=e.length;r--;)if(Fa(e[r][0],t))return r;return-1}function en(e,t,r,n){return un(e,(function(e,s,i){t(n,e,r(e),i)})),n}function tn(e,t){return e&&ks(t,Io(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,i=t.length,a=n(i),o=null==e;++r<i;)a[r]=o?s:Eo(e,t[r]);return a}function sn(e,t,r){return e==e&&(r!==s&&(e=e<=r?e:r),t!==s&&(e=e>=t?e:t)),e}function an(e,t,r,n,i,a){var o,c=1&t,l=2&t,u=4&t;if(r&&(o=i?r(e,n,i,a):r(e)),o!==s)return o;if(!Za(e))return e;var h=$a(e);if(h){if(o=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return Ts(e,o)}else{var p=hi(e),d=p==w||p==x;if(za(e))return ws(e,c);if(p==A||p==m||d&&!i){if(o=l||d?{}:di(e),!c)return l?function(e,t){return ks(e,ui(e),t)}(e,function(e,t){return e&&ks(t,Oo(t),e)}(o,e)):function(e,t){return ks(e,li(e),t)}(e,tn(o,e))}else{if(!it[p])return i?e:{};o=function(e,t,r){var n,s=e.constructor;switch(t){case O:return xs(e);case g:case v:return new s(+e);case L:return function(e,t){var r=t?xs(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case N:case M:case D:case R:case B:case F:case j:case U:case Y:return Ss(e,r);case S:return new s;case P:case _:return new s(e);case T:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case k:return new s;case C:return n=e,Dr?Ae(Dr.call(n)):{}}}(e,p,c)}}a||(a=new zr);var f=a.get(e);if(f)return f;a.set(e,o),so(e)?e.forEach((function(n){o.add(an(n,t,r,n,e,a))})):eo(e)&&e.forEach((function(n,s){o.set(s,an(n,t,r,s,e,a))}));var y=h?s:(u?l?ti:ei:l?Oo:Io)(e);return Et(y||e,(function(n,s){y&&(n=e[s=n]),Zr(o,s,an(n,t,r,s,e,a))})),o}function on(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ae(e);n--;){var i=r[n],a=t[i],o=e[i];if(o===s&&!(i in e)||!a(o))return!1}return!0}function cn(e,t,r){if("function"!=typeof e)throw new ke(i);return ki((function(){e.apply(s,r)}),t)}function ln(e,t,r,n){var s=-1,i=Ct,a=!0,o=e.length,c=[],l=t.length;if(!o)return c;r&&(t=Ot(t,Gt(r))),n?(i=It,a=!1):t.length>=200&&(i=Xt,a=!1,t=new Vr(t));e:for(;++s<o;){var u=e[s],h=null==r?u:r(u);if(u=n||0!==u?u:0,a&&h==h){for(var p=l;p--;)if(t[p]===h)continue e;c.push(u)}else i(t,h,n)||c.push(u)}return c}Br.templateSettings={escape:G,evaluate:J,interpolate:X,variable:"",imports:{_:Br}},Br.prototype=jr.prototype,Br.prototype.constructor=Br,Ur.prototype=Fr(jr.prototype),Ur.prototype.constructor=Ur,Yr.prototype=Fr(jr.prototype),Yr.prototype.constructor=Yr,$r.prototype.clear=function(){this.__data__=Tr?Tr(null):{},this.size=0},$r.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$r.prototype.get=function(e){var t=this.__data__;if(Tr){var r=t[e];return r===a?s:r}return Ne.call(t,e)?t[e]:s},$r.prototype.has=function(e){var t=this.__data__;return Tr?t[e]!==s:Ne.call(t,e)},$r.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Tr&&t===s?a:t,this},Hr.prototype.clear=function(){this.__data__=[],this.size=0},Hr.prototype.delete=function(e){var t=this.__data__,r=Qr(t,e);return!(r<0||(r==t.length-1?t.pop():qe.call(t,r,1),--this.size,0))},Hr.prototype.get=function(e){var t=this.__data__,r=Qr(t,e);return r<0?s:t[r][1]},Hr.prototype.has=function(e){return Qr(this.__data__,e)>-1},Hr.prototype.set=function(e,t){var r=this.__data__,n=Qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Wr.prototype.clear=function(){this.size=0,this.__data__={hash:new $r,map:new(Sr||Hr),string:new $r}},Wr.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},Wr.prototype.get=function(e){return ai(this,e).get(e)},Wr.prototype.has=function(e){return ai(this,e).has(e)},Wr.prototype.set=function(e,t){var r=ai(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Vr.prototype.add=Vr.prototype.push=function(e){return this.__data__.set(e,a),this},Vr.prototype.has=function(e){return this.__data__.has(e)},zr.prototype.clear=function(){this.__data__=new Hr,this.size=0},zr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},zr.prototype.get=function(e){return this.__data__.get(e)},zr.prototype.has=function(e){return this.__data__.has(e)},zr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Hr){var n=r.__data__;if(!Sr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Wr(n)}return r.set(e,t),this.size=r.size,this};var un=Is(vn),hn=Is(bn,!0);function pn(e,t){var r=!0;return un(e,(function(e,n,s){return r=!!t(e,n,s)})),r}function dn(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],o=t(a);if(null!=o&&(c===s?o==o&&!ao(o):r(o,c)))var c=o,l=a}return l}function fn(e,t){var r=[];return un(e,(function(e,n,s){t(e,n,s)&&r.push(e)})),r}function mn(e,t,r,n,s){var i=-1,a=e.length;for(r||(r=fi),s||(s=[]);++i<a;){var o=e[i];t>0&&r(o)?t>1?mn(o,t-1,r,n,s):Lt(s,o):n||(s[s.length]=o)}return s}var yn=Os(),gn=Os(!0);function vn(e,t){return e&&yn(e,t,Io)}function bn(e,t){return e&&gn(e,t,Io)}function wn(e,t){return _t(t,(function(t){return Ga(e[t])}))}function xn(e,t){for(var r=0,n=(t=ys(t,e)).length;null!=e&&r<n;)e=e[Di(t[r++])];return r&&r==n?e:s}function Sn(e,t,r){var n=t(e);return $a(e)?n:Lt(n,r(e))}function Pn(e){return null==e?e===s?"[object Undefined]":"[object Null]":Ze&&Ze in Ae(e)?function(e){var t=Ne.call(e,Ze),r=e[Ze];try{e[Ze]=s;var n=!0}catch(e){}var i=Re.call(e);return n&&(t?e[Ze]=r:delete e[Ze]),i}(e):function(e){return Re.call(e)}(e)}function An(e,t){return e>t}function En(e,t){return null!=e&&Ne.call(e,t)}function Tn(e,t){return null!=e&&t in Ae(e)}function kn(e,t,r){for(var i=r?It:Ct,a=e[0].length,o=e.length,c=o,l=n(o),u=1/0,h=[];c--;){var p=e[c];c&&t&&(p=Ot(p,Gt(t))),u=yr(p.length,u),l[c]=!r&&(t||a>=120&&p.length>=120)?new Vr(c&&p):s}p=e[0];var d=-1,f=l[0];e:for(;++d<a&&h.length<u;){var m=p[d],y=t?t(m):m;if(m=r||0!==m?m:0,!(f?Xt(f,y):i(h,y,r))){for(c=o;--c;){var g=l[c];if(!(g?Xt(g,y):i(e[c],y,r)))continue e}f&&f.push(y),h.push(m)}}return h}function _n(e,t,r){var n=null==(e=Ai(e,t=ys(t,e)))?e:e[Di(Ki(t))];return null==n?s:Pt(n,e,r)}function Cn(e){return Qa(e)&&Pn(e)==m}function In(e,t,r,n,i){return e===t||(null==e||null==t||!Qa(e)&&!Qa(t)?e!=e&&t!=t:function(e,t,r,n,i,a){var o=$a(e),c=$a(t),l=o?y:hi(e),u=c?y:hi(t),h=(l=l==m?A:l)==A,p=(u=u==m?A:u)==A,d=l==u;if(d&&za(e)){if(!za(t))return!1;o=!0,h=!1}if(d&&!h)return a||(a=new zr),o||oo(e)?Zs(e,t,r,n,i,a):function(e,t,r,n,s,i,a){switch(r){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!i(new $e(e),new $e(t)));case g:case v:case P:return Fa(+e,+t);case b:return e.name==t.name&&e.message==t.message;case T:case _:return e==t+"";case S:var o=sr;case k:var c=1&n;if(o||(o=or),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;n|=2,a.set(e,t);var u=Zs(o(e),o(t),n,s,i,a);return a.delete(e),u;case C:if(Dr)return Dr.call(e)==Dr.call(t)}return!1}(e,t,l,r,n,i,a);if(!(1&r)){var f=h&&Ne.call(e,"__wrapped__"),w=p&&Ne.call(t,"__wrapped__");if(f||w){var x=f?e.value():e,E=w?t.value():t;return a||(a=new zr),i(x,E,r,n,a)}}return!!d&&(a||(a=new zr),function(e,t,r,n,i,a){var o=1&r,c=ei(e),l=c.length;if(l!=ei(t).length&&!o)return!1;for(var u=l;u--;){var h=c[u];if(!(o?h in t:Ne.call(t,h)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var f=!0;a.set(e,t),a.set(t,e);for(var m=o;++u<l;){var y=e[h=c[u]],g=t[h];if(n)var v=o?n(g,y,h,t,e,a):n(y,g,h,e,t,a);if(!(v===s?y===g||i(y,g,r,n,a):v)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,r,n,i,a))}(e,t,r,n,In,i))}function On(e,t,r,n){var i=r.length,a=i,o=!n;if(null==e)return!a;for(e=Ae(e);i--;){var c=r[i];if(o&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var l=(c=r[i])[0],u=e[l],h=c[1];if(o&&c[2]){if(u===s&&!(l in e))return!1}else{var p=new zr;if(n)var d=n(u,h,l,e,t,p);if(!(d===s?In(h,u,3,n,p):d))return!1}}return!0}function Ln(e){return!(!Za(e)||(t=e,De&&De in t))&&(Ga(e)?je:me).test(Ri(e));var t}function Nn(e){return"function"==typeof e?e:null==e?rc:"object"==typeof e?$a(e)?Fn(e[0],e[1]):Bn(e):hc(e)}function Mn(e){if(!wi(e))return fr(e);var t=[];for(var r in Ae(e))Ne.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Dn(e,t){return e<t}function Rn(e,t){var r=-1,s=Wa(e)?n(e.length):[];return un(e,(function(e,n,i){s[++r]=t(e,n,i)})),s}function Bn(e){var t=oi(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(r){return r===e||On(r,e,t)}}function Fn(e,t){return gi(e)&&xi(t)?Si(Di(e),t):function(r){var n=Eo(r,e);return n===s&&n===t?To(r,e):In(t,n,3)}}function jn(e,t,r,n,i){e!==t&&yn(t,(function(a,o){if(i||(i=new zr),Za(a))!function(e,t,r,n,i,a,o){var c=Ei(e,r),l=Ei(t,r),u=o.get(l);if(u)Xr(e,r,u);else{var h=a?a(c,l,r+"",e,t,o):s,p=h===s;if(p){var d=$a(l),f=!d&&za(l),m=!d&&!f&&oo(l);h=l,d||f||m?$a(c)?h=c:Va(c)?h=Ts(c):f?(p=!1,h=ws(l,!0)):m?(p=!1,h=Ss(l,!0)):h=[]:ro(l)||Ya(l)?(h=c,Ya(c)?h=yo(c):Za(c)&&!Ga(c)||(h=di(l))):p=!1}p&&(o.set(l,h),i(h,l,n,a,o),o.delete(l)),Xr(e,r,h)}}(e,t,o,r,jn,n,i);else{var c=n?n(Ei(e,o),a,o+"",e,t,i):s;c===s&&(c=a),Xr(e,o,c)}}),Oo)}function Un(e,t){var r=e.length;if(r)return mi(t+=t<0?r:0,r)?e[t]:s}function Yn(e,t,r){t=t.length?Ot(t,(function(e){return $a(e)?function(t){return xn(t,1===e.length?e[0]:e)}:e})):[rc];var n=-1;t=Ot(t,Gt(ii()));var s=Rn(e,(function(e,r,s){var i=Ot(t,(function(t){return t(e)}));return{criteria:i,index:++n,value:e}}));return function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,s=e.criteria,i=t.criteria,a=s.length,o=r.length;++n<a;){var c=Ps(s[n],i[n]);if(c)return n>=o?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));t--;)e[t]=e[t].value;return e}(s)}function $n(e,t,r){for(var n=-1,s=t.length,i={};++n<s;){var a=t[n],o=xn(e,a);r(o,a)&&Jn(i,ys(a,e),o)}return i}function Hn(e,t,r,n){var s=n?Ut:jt,i=-1,a=t.length,o=e;for(e===t&&(t=Ts(t)),r&&(o=Ot(e,Gt(r)));++i<a;)for(var c=0,l=t[i],u=r?r(l):l;(c=s(o,u,c,n))>-1;)o!==e&&qe.call(o,c,1),qe.call(e,c,1);return e}function Wn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var s=t[r];if(r==n||s!==i){var i=s;mi(s)?qe.call(e,s,1):cs(e,s)}}return e}function Vn(e,t){return e+dt(br()*(t-e+1))}function zn(e,t){var r="";if(!e||t<1||t>h)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function qn(e,t){return _i(Pi(e,t,rc),e+"")}function Kn(e){return Kr(jo(e))}function Gn(e,t){var r=jo(e);return Oi(r,sn(t,0,r.length))}function Jn(e,t,r,n){if(!Za(e))return e;for(var i=-1,a=(t=ys(t,e)).length,o=a-1,c=e;null!=c&&++i<a;){var l=Di(t[i]),u=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=o){var h=c[l];(u=n?n(h,l,c):s)===s&&(u=Za(h)?h:mi(t[i+1])?[]:{})}Zr(c,l,u),c=c[l]}return e}var Xn=kr?function(e,t){return kr.set(e,t),e}:rc,Zn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Qo(t),writable:!0})}:rc;function Qn(e){return Oi(jo(e))}function es(e,t,r){var s=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=n(i);++s<i;)a[s]=e[s+t];return a}function ts(e,t){var r;return un(e,(function(e,n,s){return!(r=t(e,n,s))})),!!r}function rs(e,t,r){var n=0,s=null==e?n:e.length;if("number"==typeof t&&t==t&&s<=2147483647){for(;n<s;){var i=n+s>>>1,a=e[i];null!==a&&!ao(a)&&(r?a<=t:a<t)?n=i+1:s=i}return s}return ns(e,t,rc,r)}function ns(e,t,r,n){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=r(t))!=t,c=null===t,l=ao(t),u=t===s;i<a;){var h=dt((i+a)/2),p=r(e[h]),d=p!==s,f=null===p,m=p==p,y=ao(p);if(o)var g=n||m;else g=u?m&&(n||d):c?m&&d&&(n||!f):l?m&&d&&!f&&(n||!y):!f&&!y&&(n?p<=t:p<t);g?i=h+1:a=h}return yr(a,4294967294)}function ss(e,t){for(var r=-1,n=e.length,s=0,i=[];++r<n;){var a=e[r],o=t?t(a):a;if(!r||!Fa(o,c)){var c=o;i[s++]=0===a?0:a}}return i}function is(e){return"number"==typeof e?e:ao(e)?p:+e}function as(e){if("string"==typeof e)return e;if($a(e))return Ot(e,as)+"";if(ao(e))return Rr?Rr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function os(e,t,r){var n=-1,s=Ct,i=e.length,a=!0,o=[],c=o;if(r)a=!1,s=It;else if(i>=200){var l=t?null:zs(e);if(l)return or(l);a=!1,s=Xt,c=new Vr}else c=t?[]:o;e:for(;++n<i;){var u=e[n],h=t?t(u):u;if(u=r||0!==u?u:0,a&&h==h){for(var p=c.length;p--;)if(c[p]===h)continue e;t&&c.push(h),o.push(u)}else s(c,h,r)||(c!==o&&c.push(h),o.push(u))}return o}function cs(e,t){return null==(e=Ai(e,t=ys(t,e)))||delete e[Di(Ki(t))]}function ls(e,t,r,n){return Jn(e,t,r(xn(e,t)),n)}function us(e,t,r,n){for(var s=e.length,i=n?s:-1;(n?i--:++i<s)&&t(e[i],i,e););return r?es(e,n?0:i,n?i+1:s):es(e,n?i+1:0,n?s:i)}function hs(e,t){var r=e;return r instanceof Yr&&(r=r.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),r)}function ps(e,t,r){var s=e.length;if(s<2)return s?os(e[0]):[];for(var i=-1,a=n(s);++i<s;)for(var o=e[i],c=-1;++c<s;)c!=i&&(a[i]=ln(a[i]||o,e[c],t,r));return os(mn(a,1),t,r)}function ds(e,t,r){for(var n=-1,i=e.length,a=t.length,o={};++n<i;){var c=n<a?t[n]:s;r(o,e[n],c)}return o}function fs(e){return Va(e)?e:[]}function ms(e){return"function"==typeof e?e:rc}function ys(e,t){return $a(e)?e:gi(e,t)?[e]:Mi(go(e))}var gs=qn;function vs(e,t,r){var n=e.length;return r=r===s?n:r,!t&&r>=n?e:es(e,t,r)}var bs=at||function(e){return ht.clearTimeout(e)};function ws(e,t){if(t)return e.slice();var r=e.length,n=He?He(r):new e.constructor(r);return e.copy(n),n}function xs(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ss(e,t){var r=t?xs(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ps(e,t){if(e!==t){var r=e!==s,n=null===e,i=e==e,a=ao(e),o=t!==s,c=null===t,l=t==t,u=ao(t);if(!c&&!u&&!a&&e>t||a&&o&&l&&!c&&!u||n&&o&&l||!r&&l||!i)return 1;if(!n&&!a&&!u&&e<t||u&&r&&i&&!n&&!a||c&&r&&i||!o&&i||!l)return-1}return 0}function As(e,t,r,s){for(var i=-1,a=e.length,o=r.length,c=-1,l=t.length,u=mr(a-o,0),h=n(l+u),p=!s;++c<l;)h[c]=t[c];for(;++i<o;)(p||i<a)&&(h[r[i]]=e[i]);for(;u--;)h[c++]=e[i++];return h}function Es(e,t,r,s){for(var i=-1,a=e.length,o=-1,c=r.length,l=-1,u=t.length,h=mr(a-c,0),p=n(h+u),d=!s;++i<h;)p[i]=e[i];for(var f=i;++l<u;)p[f+l]=t[l];for(;++o<c;)(d||i<a)&&(p[f+r[o]]=e[i++]);return p}function Ts(e,t){var r=-1,s=e.length;for(t||(t=n(s));++r<s;)t[r]=e[r];return t}function ks(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var c=t[a],l=n?n(r[c],e[c],c,r,e):s;l===s&&(l=e[c]),i?rn(r,c,l):Zr(r,c,l)}return r}function _s(e,t){return function(r,n){var s=$a(r)?At:en,i=t?t():{};return s(r,e,ii(n,2),i)}}function Cs(e){return qn((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:s,o=i>2?r[2]:s;for(a=e.length>3&&"function"==typeof a?(i--,a):s,o&&yi(r[0],r[1],o)&&(a=i<3?s:a,i=1),t=Ae(t);++n<i;){var c=r[n];c&&e(t,c,n,a)}return t}))}function Is(e,t){return function(r,n){if(null==r)return r;if(!Wa(r))return e(r,n);for(var s=r.length,i=t?s:-1,a=Ae(r);(t?i--:++i<s)&&!1!==n(a[i],i,a););return r}}function Os(e){return function(t,r,n){for(var s=-1,i=Ae(t),a=n(t),o=a.length;o--;){var c=a[e?o:++s];if(!1===r(i[c],c,i))break}return t}}function Ls(e){return function(t){var r=nr(t=go(t))?ur(t):s,n=r?r[0]:t.charAt(0),i=r?vs(r,1).join(""):t.slice(1);return n[e]()+i}}function Ns(e){return function(t){return Nt(Jo($o(t).replace(Je,"")),e,"")}}function Ms(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Fr(e.prototype),n=e.apply(r,t);return Za(n)?n:r}}function Ds(e){return function(t,r,n){var i=Ae(t);if(!Wa(t)){var a=ii(r,3);t=Io(t),r=function(e){return a(i[e],e,i)}}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:s}}function Rs(e){return Qs((function(t){var r=t.length,n=r,a=Ur.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new ke(i);if(a&&!c&&"wrapper"==ni(o))var c=new Ur([],!0)}for(n=c?n:r;++n<r;){var l=ni(o=t[n]),u="wrapper"==l?ri(o):s;c=u&&vi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[ni(u[0])].apply(c,u[3]):1==o.length&&vi(o)?c[l]():c.thru(o)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&$a(n))return c.plant(n).value();for(var s=0,i=r?t[s].apply(this,e):n;++s<r;)i=t[s].call(this,i);return i}}))}function Bs(e,t,r,i,a,o,c,u,h,p){var d=t&l,f=1&t,m=2&t,y=24&t,g=512&t,v=m?s:Ms(e);return function l(){for(var b=arguments.length,w=n(b),x=b;x--;)w[x]=arguments[x];if(y)var S=si(l),P=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(w,S);if(i&&(w=As(w,i,a,y)),o&&(w=Es(w,o,c,y)),b-=P,y&&b<p){var A=ar(w,S);return Ws(e,t,Bs,l.placeholder,r,w,A,u,h,p-b)}var E=f?r:this,T=m?E[e]:e;return b=w.length,u?w=function(e,t){for(var r=e.length,n=yr(t.length,r),i=Ts(e);n--;){var a=t[n];e[n]=mi(a,r)?i[a]:s}return e}(w,u):g&&b>1&&w.reverse(),d&&h<b&&(w.length=h),this&&this!==ht&&this instanceof l&&(T=v||Ms(T)),T.apply(E,w)}}function Fs(e,t){return function(r,n){return function(e,t,r,n){return vn(e,(function(e,s,i){t(n,r(e),s,i)})),n}(r,e,t(n),{})}}function js(e,t){return function(r,n){var i;if(r===s&&n===s)return t;if(r!==s&&(i=r),n!==s){if(i===s)return n;"string"==typeof r||"string"==typeof n?(r=as(r),n=as(n)):(r=is(r),n=is(n)),i=e(r,n)}return i}}function Us(e){return Qs((function(t){return t=Ot(t,Gt(ii())),qn((function(r){var n=this;return e(t,(function(e){return Pt(e,n,r)}))}))}))}function Ys(e,t){var r=(t=t===s?" ":as(t)).length;if(r<2)return r?zn(t,e):t;var n=zn(t,pt(e/lr(t)));return nr(t)?vs(ur(n),0,e).join(""):n.slice(0,e)}function $s(e){return function(t,r,i){return i&&"number"!=typeof i&&yi(t,r,i)&&(r=i=s),t=ho(t),r===s?(r=t,t=0):r=ho(r),function(e,t,r,s){for(var i=-1,a=mr(pt((t-e)/(r||1)),0),o=n(a);a--;)o[s?a:++i]=e,e+=r;return o}(t,r,i=i===s?t<r?1:-1:ho(i),e)}}function Hs(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=mo(t),r=mo(r)),e(t,r)}}function Ws(e,t,r,n,i,a,o,l,u,h){var p=8&t;t|=p?c:64,4&(t&=~(p?64:c))||(t&=-4);var d=[e,t,i,p?a:s,p?o:s,p?s:a,p?s:o,l,u,h],f=r.apply(s,d);return vi(e)&&Ti(f,d),f.placeholder=n,Ci(f,e,t)}function Vs(e){var t=Pe[e];return function(e,r){if(e=mo(e),(r=null==r?0:yr(po(r),292))&&Rt(e)){var n=(go(e)+"e").split("e");return+((n=(go(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var zs=Ar&&1/or(new Ar([,-0]))[1]==u?function(e){return new Ar(e)}:oc;function qs(e){return function(t){var r=hi(t);return r==S?sr(t):r==k?cr(t):function(e,t){return Ot(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ks(e,t,r,a,u,h,p,d){var f=2&t;if(!f&&"function"!=typeof e)throw new ke(i);var m=a?a.length:0;if(m||(t&=-97,a=u=s),p=p===s?p:mr(po(p),0),d=d===s?d:po(d),m-=u?u.length:0,64&t){var y=a,g=u;a=u=s}var v=f?s:ri(e),b=[e,t,r,a,u,y,g,h,p,d];if(v&&function(e,t){var r=e[1],n=t[1],s=r|n,i=s<131,a=n==l&&8==r||n==l&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!i&&!a)return e;1&n&&(e[2]=t[2],s|=1&r?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?As(u,c,t[4]):c,e[4]=u?ar(e[3],o):t[4]}(c=t[5])&&(u=e[5],e[5]=u?Es(u,c,t[6]):c,e[6]=u?ar(e[5],o):t[6]),(c=t[7])&&(e[7]=c),n&l&&(e[8]=null==e[8]?t[8]:yr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=s}(b,v),e=b[0],t=b[1],r=b[2],a=b[3],u=b[4],!(d=b[9]=b[9]===s?f?0:e.length:mr(b[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var i=Ms(e);return function a(){for(var o=arguments.length,c=n(o),l=o,u=si(a);l--;)c[l]=arguments[l];var h=o<3&&c[0]!==u&&c[o-1]!==u?[]:ar(c,u);return(o-=h.length)<r?Ws(e,t,Bs,a.placeholder,s,c,h,s,s,r-o):Pt(this&&this!==ht&&this instanceof a?i:e,this,c)}}(e,t,d):t!=c&&33!=t||u.length?Bs.apply(s,b):function(e,t,r,s){var i=1&t,a=Ms(e);return function t(){for(var o=-1,c=arguments.length,l=-1,u=s.length,h=n(u+c),p=this&&this!==ht&&this instanceof t?a:e;++l<u;)h[l]=s[l];for(;c--;)h[l++]=arguments[++o];return Pt(p,i?r:this,h)}}(e,t,r,a);else var w=function(e,t,r){var n=1&t,s=Ms(e);return function t(){return(this&&this!==ht&&this instanceof t?s:e).apply(n?r:this,arguments)}}(e,t,r);return Ci((v?Xn:Ti)(w,b),e,t)}function Gs(e,t,r,n){return e===s||Fa(e,Ie[r])&&!Ne.call(n,r)?t:e}function Js(e,t,r,n,i,a){return Za(e)&&Za(t)&&(a.set(t,e),jn(e,t,s,Js,a),a.delete(t)),e}function Xs(e){return ro(e)?s:e}function Zs(e,t,r,n,i,a){var o=1&r,c=e.length,l=t.length;if(c!=l&&!(o&&l>c))return!1;var u=a.get(e),h=a.get(t);if(u&&h)return u==t&&h==e;var p=-1,d=!0,f=2&r?new Vr:s;for(a.set(e,t),a.set(t,e);++p<c;){var m=e[p],y=t[p];if(n)var g=o?n(y,m,p,t,e,a):n(m,y,p,e,t,a);if(g!==s){if(g)continue;d=!1;break}if(f){if(!Dt(t,(function(e,t){if(!Xt(f,t)&&(m===e||i(m,e,r,n,a)))return f.push(t)}))){d=!1;break}}else if(m!==y&&!i(m,y,r,n,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Qs(e){return _i(Pi(e,s,Hi),e+"")}function ei(e){return Sn(e,Io,li)}function ti(e){return Sn(e,Oo,ui)}var ri=kr?function(e){return kr.get(e)}:oc;function ni(e){for(var t=e.name+"",r=_r[t],n=Ne.call(_r,t)?r.length:0;n--;){var s=r[n],i=s.func;if(null==i||i==e)return s.name}return t}function si(e){return(Ne.call(Br,"placeholder")?Br:e).placeholder}function ii(){var e=Br.iteratee||nc;return e=e===nc?Nn:e,arguments.length?e(arguments[0],arguments[1]):e}function ai(e,t){var r,n,s=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?s["string"==typeof t?"string":"hash"]:s.map}function oi(e){for(var t=Io(e),r=t.length;r--;){var n=t[r],s=e[n];t[r]=[n,s,xi(s)]}return t}function ci(e,t){var r=function(e,t){return null==e?s:e[t]}(e,t);return Ln(r)?r:s}var li=mt?function(e){return null==e?[]:(e=Ae(e),_t(mt(e),(function(t){return ze.call(e,t)})))}:fc,ui=mt?function(e){for(var t=[];e;)Lt(t,li(e)),e=We(e);return t}:fc,hi=Pn;function pi(e,t,r){for(var n=-1,s=(t=ys(t,e)).length,i=!1;++n<s;){var a=Di(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=s?i:!!(s=null==e?0:e.length)&&Xa(s)&&mi(a,s)&&($a(e)||Ya(e))}function di(e){return"function"!=typeof e.constructor||wi(e)?{}:Fr(We(e))}function fi(e){return $a(e)||Ya(e)||!!(Ke&&e&&e[Ke])}function mi(e,t){var r=typeof e;return!!(t=null==t?h:t)&&("number"==r||"symbol"!=r&&ge.test(e))&&e>-1&&e%1==0&&e<t}function yi(e,t,r){if(!Za(r))return!1;var n=typeof t;return!!("number"==n?Wa(r)&&mi(t,r.length):"string"==n&&t in r)&&Fa(r[t],e)}function gi(e,t){if($a(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ao(e))||Q.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function vi(e){var t=ni(e),r=Br[t];if("function"!=typeof r||!(t in Yr.prototype))return!1;if(e===r)return!0;var n=ri(r);return!!n&&e===n[0]}(xr&&hi(new xr(new ArrayBuffer(1)))!=L||Sr&&hi(new Sr)!=S||Pr&&hi(Pr.resolve())!=E||Ar&&hi(new Ar)!=k||Er&&hi(new Er)!=I)&&(hi=function(e){var t=Pn(e),r=t==A?e.constructor:s,n=r?Ri(r):"";if(n)switch(n){case Cr:return L;case Ir:return S;case Or:return E;case Lr:return k;case Nr:return I}return t});var bi=Oe?Ga:mc;function wi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ie)}function xi(e){return e==e&&!Za(e)}function Si(e,t){return function(r){return null!=r&&r[e]===t&&(t!==s||e in Ae(r))}}function Pi(e,t,r){return t=mr(t===s?e.length-1:t,0),function(){for(var s=arguments,i=-1,a=mr(s.length-t,0),o=n(a);++i<a;)o[i]=s[t+i];i=-1;for(var c=n(t+1);++i<t;)c[i]=s[i];return c[t]=r(o),Pt(e,this,c)}}function Ai(e,t){return t.length<2?e:xn(e,es(t,0,-1))}function Ei(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ti=Ii(Xn),ki=ut||function(e,t){return ht.setTimeout(e,t)},_i=Ii(Zn);function Ci(e,t,r){var n=t+"";return _i(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Et(f,(function(r){var n="_."+r[0];t&r[1]&&!Ct(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(oe):[]}(n),r)))}function Ii(e){var t=0,r=0;return function(){var n=gr(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(s,arguments)}}function Oi(e,t){var r=-1,n=e.length,i=n-1;for(t=t===s?n:t;++r<t;){var a=Vn(r,i),o=e[a];e[a]=e[r],e[r]=o}return e.length=t,e}var Li,Ni,Mi=(Li=La((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,s){t.push(n?s.replace(ue,"$1"):r||e)})),t}),(function(e){return 500===Ni.size&&Ni.clear(),e})),Ni=Li.cache,Li);function Di(e){if("string"==typeof e||ao(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ri(e){if(null!=e){try{return Le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bi(e){if(e instanceof Yr)return e.clone();var t=new Ur(e.__wrapped__,e.__chain__);return t.__actions__=Ts(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=qn((function(e,t){return Va(e)?ln(e,mn(t,1,Va,!0)):[]})),ji=qn((function(e,t){var r=Ki(t);return Va(r)&&(r=s),Va(e)?ln(e,mn(t,1,Va,!0),ii(r,2)):[]})),Ui=qn((function(e,t){var r=Ki(t);return Va(r)&&(r=s),Va(e)?ln(e,mn(t,1,Va,!0),s,r):[]}));function Yi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=null==r?0:po(r);return s<0&&(s=mr(n+s,0)),Ft(e,ii(t,3),s)}function $i(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==s&&(i=po(r),i=r<0?mr(n+i,0):yr(i,n-1)),Ft(e,ii(t,3),i,!0)}function Hi(e){return null!=e&&e.length?mn(e,1):[]}function Wi(e){return e&&e.length?e[0]:s}var Vi=qn((function(e){var t=Ot(e,fs);return t.length&&t[0]===e[0]?kn(t):[]})),zi=qn((function(e){var t=Ki(e),r=Ot(e,fs);return t===Ki(r)?t=s:r.pop(),r.length&&r[0]===e[0]?kn(r,ii(t,2)):[]})),qi=qn((function(e){var t=Ki(e),r=Ot(e,fs);return(t="function"==typeof t?t:s)&&r.pop(),r.length&&r[0]===e[0]?kn(r,s,t):[]}));function Ki(e){var t=null==e?0:e.length;return t?e[t-1]:s}var Gi=qn(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Hn(e,t):e}var Xi=Qs((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return Wn(e,Ot(t,(function(e){return mi(e,r)?+e:e})).sort(Ps)),n}));function Zi(e){return null==e?e:wr.call(e)}var Qi=qn((function(e){return os(mn(e,1,Va,!0))})),ea=qn((function(e){var t=Ki(e);return Va(t)&&(t=s),os(mn(e,1,Va,!0),ii(t,2))})),ta=qn((function(e){var t=Ki(e);return t="function"==typeof t?t:s,os(mn(e,1,Va,!0),s,t)}));function ra(e){if(!e||!e.length)return[];var t=0;return e=_t(e,(function(e){if(Va(e))return t=mr(e.length,t),!0})),qt(t,(function(t){return Ot(e,Ht(t))}))}function na(e,t){if(!e||!e.length)return[];var r=ra(e);return null==t?r:Ot(r,(function(e){return Pt(t,s,e)}))}var sa=qn((function(e,t){return Va(e)?ln(e,t):[]})),ia=qn((function(e){return ps(_t(e,Va))})),aa=qn((function(e){var t=Ki(e);return Va(t)&&(t=s),ps(_t(e,Va),ii(t,2))})),oa=qn((function(e){var t=Ki(e);return t="function"==typeof t?t:s,ps(_t(e,Va),s,t)})),ca=qn(ra),la=qn((function(e){var t=e.length,r=t>1?e[t-1]:s;return r="function"==typeof r?(e.pop(),r):s,na(e,r)}));function ua(e){var t=Br(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=Qs((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Yr&&mi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:s}),new Ur(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(s),e}))):this.thru(i)})),da=_s((function(e,t,r){Ne.call(e,r)?++e[r]:rn(e,r,1)})),fa=Ds(Yi),ma=Ds($i);function ya(e,t){return($a(e)?Et:un)(e,ii(t,3))}function ga(e,t){return($a(e)?Tt:hn)(e,ii(t,3))}var va=_s((function(e,t,r){Ne.call(e,r)?e[r].push(t):rn(e,r,[t])})),ba=qn((function(e,t,r){var s=-1,i="function"==typeof t,a=Wa(e)?n(e.length):[];return un(e,(function(e){a[++s]=i?Pt(t,e,r):_n(e,t,r)})),a})),wa=_s((function(e,t,r){rn(e,r,t)}));function xa(e,t){return($a(e)?Ot:Rn)(e,ii(t,3))}var Sa=_s((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Pa=qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&yi(e,t[0],t[1])?t=[]:r>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Yn(e,mn(t,1),[])})),Aa=lt||function(){return ht.Date.now()};function Ea(e,t,r){return t=r?s:t,t=e&&null==t?e.length:t,Ks(e,l,s,s,s,s,t)}function Ta(e,t){var r;if("function"!=typeof t)throw new ke(i);return e=po(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=s),r}}var ka=qn((function(e,t,r){var n=1;if(r.length){var s=ar(r,si(ka));n|=c}return Ks(e,n,t,r,s)})),_a=qn((function(e,t,r){var n=3;if(r.length){var s=ar(r,si(_a));n|=c}return Ks(t,n,e,r,s)}));function Ca(e,t,r){var n,a,o,c,l,u,h=0,p=!1,d=!1,f=!0;if("function"!=typeof e)throw new ke(i);function m(t){var r=n,i=a;return n=a=s,h=t,c=e.apply(i,r)}function y(e){var r=e-u;return u===s||r>=t||r<0||d&&e-h>=o}function g(){var e=Aa();if(y(e))return v(e);l=ki(g,function(e){var r=t-(e-u);return d?yr(r,o-(e-h)):r}(e))}function v(e){return l=s,f&&n?m(e):(n=a=s,c)}function b(){var e=Aa(),r=y(e);if(n=arguments,a=this,u=e,r){if(l===s)return function(e){return h=e,l=ki(g,t),p?m(e):c}(u);if(d)return bs(l),l=ki(g,t),m(u)}return l===s&&(l=ki(g,t)),c}return t=mo(t)||0,Za(r)&&(p=!!r.leading,o=(d="maxWait"in r)?mr(mo(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),b.cancel=function(){l!==s&&bs(l),h=0,n=u=a=l=s},b.flush=function(){return l===s?c:v(Aa())},b}var Ia=qn((function(e,t){return cn(e,1,t)})),Oa=qn((function(e,t,r){return cn(e,mo(t)||0,r)}));function La(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ke(i);var r=function(){var n=arguments,s=t?t.apply(this,n):n[0],i=r.cache;if(i.has(s))return i.get(s);var a=e.apply(this,n);return r.cache=i.set(s,a)||i,a};return r.cache=new(La.Cache||Wr),r}function Na(e){if("function"!=typeof e)throw new ke(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=Wr;var Ma=gs((function(e,t){var r=(t=1==t.length&&$a(t[0])?Ot(t[0],Gt(ii())):Ot(mn(t,1),Gt(ii()))).length;return qn((function(n){for(var s=-1,i=yr(n.length,r);++s<i;)n[s]=t[s].call(this,n[s]);return Pt(e,this,n)}))})),Da=qn((function(e,t){var r=ar(t,si(Da));return Ks(e,c,s,t,r)})),Ra=qn((function(e,t){var r=ar(t,si(Ra));return Ks(e,64,s,t,r)})),Ba=Qs((function(e,t){return Ks(e,256,s,s,s,t)}));function Fa(e,t){return e===t||e!=e&&t!=t}var ja=Hs(An),Ua=Hs((function(e,t){return e>=t})),Ya=Cn(function(){return arguments}())?Cn:function(e){return Qa(e)&&Ne.call(e,"callee")&&!ze.call(e,"callee")},$a=n.isArray,Ha=gt?Gt(gt):function(e){return Qa(e)&&Pn(e)==O};function Wa(e){return null!=e&&Xa(e.length)&&!Ga(e)}function Va(e){return Qa(e)&&Wa(e)}var za=yt||mc,qa=vt?Gt(vt):function(e){return Qa(e)&&Pn(e)==v};function Ka(e){if(!Qa(e))return!1;var t=Pn(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ro(e)}function Ga(e){if(!Za(e))return!1;var t=Pn(e);return t==w||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==po(e)}function Xa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Qa(e){return null!=e&&"object"==typeof e}var eo=bt?Gt(bt):function(e){return Qa(e)&&hi(e)==S};function to(e){return"number"==typeof e||Qa(e)&&Pn(e)==P}function ro(e){if(!Qa(e)||Pn(e)!=A)return!1;var t=We(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Le.call(r)==Be}var no=wt?Gt(wt):function(e){return Qa(e)&&Pn(e)==T},so=xt?Gt(xt):function(e){return Qa(e)&&hi(e)==k};function io(e){return"string"==typeof e||!$a(e)&&Qa(e)&&Pn(e)==_}function ao(e){return"symbol"==typeof e||Qa(e)&&Pn(e)==C}var oo=St?Gt(St):function(e){return Qa(e)&&Xa(e.length)&&!!st[Pn(e)]},co=Hs(Dn),lo=Hs((function(e,t){return e<=t}));function uo(e){if(!e)return[];if(Wa(e))return io(e)?ur(e):Ts(e);if(Ge&&e[Ge])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ge]());var t=hi(e);return(t==S?sr:t==k?or:jo)(e)}function ho(e){return e?(e=mo(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function po(e){var t=ho(e),r=t%1;return t==t?r?t-r:t:0}function fo(e){return e?sn(po(e),0,d):0}function mo(e){if("number"==typeof e)return e;if(ao(e))return p;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var r=fe.test(e);return r||ye.test(e)?ct(e.slice(2),r?2:8):de.test(e)?p:+e}function yo(e){return ks(e,Oo(e))}function go(e){return null==e?"":as(e)}var vo=Cs((function(e,t){if(wi(t)||Wa(t))ks(t,Io(t),e);else for(var r in t)Ne.call(t,r)&&Zr(e,r,t[r])})),bo=Cs((function(e,t){ks(t,Oo(t),e)})),wo=Cs((function(e,t,r,n){ks(t,Oo(t),e,n)})),xo=Cs((function(e,t,r,n){ks(t,Io(t),e,n)})),So=Qs(nn),Po=qn((function(e,t){e=Ae(e);var r=-1,n=t.length,i=n>2?t[2]:s;for(i&&yi(t[0],t[1],i)&&(n=1);++r<n;)for(var a=t[r],o=Oo(a),c=-1,l=o.length;++c<l;){var u=o[c],h=e[u];(h===s||Fa(h,Ie[u])&&!Ne.call(e,u))&&(e[u]=a[u])}return e})),Ao=qn((function(e){return e.push(s,Js),Pt(No,s,e)}));function Eo(e,t,r){var n=null==e?s:xn(e,t);return n===s?r:n}function To(e,t){return null!=e&&pi(e,t,Tn)}var ko=Fs((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),e[t]=r}),Qo(rc)),_o=Fs((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Re.call(t)),Ne.call(e,t)?e[t].push(r):e[t]=[r]}),ii),Co=qn(_n);function Io(e){return Wa(e)?qr(e):Mn(e)}function Oo(e){return Wa(e)?qr(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var r in Ae(e))t.push(r);return t}(e);var t=wi(e),r=[];for(var n in e)("constructor"!=n||!t&&Ne.call(e,n))&&r.push(n);return r}(e)}var Lo=Cs((function(e,t,r){jn(e,t,r)})),No=Cs((function(e,t,r,n){jn(e,t,r,n)})),Mo=Qs((function(e,t){var r={};if(null==e)return r;var n=!1;t=Ot(t,(function(t){return t=ys(t,e),n||(n=t.length>1),t})),ks(e,ti(e),r),n&&(r=an(r,7,Xs));for(var s=t.length;s--;)cs(r,t[s]);return r})),Do=Qs((function(e,t){return null==e?{}:function(e,t){return $n(e,t,(function(t,r){return To(e,r)}))}(e,t)}));function Ro(e,t){if(null==e)return{};var r=Ot(ti(e),(function(e){return[e]}));return t=ii(t),$n(e,r,(function(e,r){return t(e,r[0])}))}var Bo=qs(Io),Fo=qs(Oo);function jo(e){return null==e?[]:Jt(e,Io(e))}var Uo=Ns((function(e,t,r){return t=t.toLowerCase(),e+(r?Yo(t):t)}));function Yo(e){return Go(go(e).toLowerCase())}function $o(e){return(e=go(e))&&e.replace(ve,er).replace(Xe,"")}var Ho=Ns((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Wo=Ns((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Vo=Ls("toLowerCase"),zo=Ns((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),qo=Ns((function(e,t,r){return e+(r?" ":"")+Go(t)})),Ko=Ns((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Go=Ls("toUpperCase");function Jo(e,t,r){return e=go(e),(t=r?s:t)===s?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Xo=qn((function(e,t){try{return Pt(e,s,t)}catch(e){return Ka(e)?e:new xe(e)}})),Zo=Qs((function(e,t){return Et(t,(function(t){t=Di(t),rn(e,t,ka(e[t],e))})),e}));function Qo(e){return function(){return e}}var ec=Rs(),tc=Rs(!0);function rc(e){return e}function nc(e){return Nn("function"==typeof e?e:an(e,1))}var sc=qn((function(e,t){return function(r){return _n(r,e,t)}})),ic=qn((function(e,t){return function(r){return _n(e,r,t)}}));function ac(e,t,r){var n=Io(t),s=wn(t,n);null!=r||Za(t)&&(s.length||!n.length)||(r=t,t=e,e=this,s=wn(t,Io(t)));var i=!(Za(r)&&"chain"in r&&!r.chain),a=Ga(e);return Et(s,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=Ts(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Lt([this.value()],arguments))})})),e}function oc(){}var cc=Us(Ot),lc=Us(kt),uc=Us(Dt);function hc(e){return gi(e)?Ht(Di(e)):function(e){return function(t){return xn(t,e)}}(e)}var pc=$s(),dc=$s(!0);function fc(){return[]}function mc(){return!1}var yc,gc=js((function(e,t){return e+t}),0),vc=Vs("ceil"),bc=js((function(e,t){return e/t}),1),wc=Vs("floor"),xc=js((function(e,t){return e*t}),1),Sc=Vs("round"),Pc=js((function(e,t){return e-t}),0);return Br.after=function(e,t){if("function"!=typeof t)throw new ke(i);return e=po(e),function(){if(--e<1)return t.apply(this,arguments)}},Br.ary=Ea,Br.assign=vo,Br.assignIn=bo,Br.assignInWith=wo,Br.assignWith=xo,Br.at=So,Br.before=Ta,Br.bind=ka,Br.bindAll=Zo,Br.bindKey=_a,Br.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return $a(e)?e:[e]},Br.chain=ua,Br.chunk=function(e,t,r){t=(r?yi(e,t,r):t===s)?1:mr(po(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,c=n(pt(i/t));a<i;)c[o++]=es(e,a,a+=t);return c},Br.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,s=[];++t<r;){var i=e[t];i&&(s[n++]=i)}return s},Br.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],s=e;s--;)t[s-1]=arguments[s];return Lt($a(r)?Ts(r):[r],mn(t,1))},Br.cond=function(e){var t=null==e?0:e.length,r=ii();return e=t?Ot(e,(function(e){if("function"!=typeof e[1])throw new ke(i);return[r(e[0]),e[1]]})):[],qn((function(r){for(var n=-1;++n<t;){var s=e[n];if(Pt(s[0],this,r))return Pt(s[1],this,r)}}))},Br.conforms=function(e){return function(e){var t=Io(e);return function(r){return on(r,e,t)}}(an(e,1))},Br.constant=Qo,Br.countBy=da,Br.create=function(e,t){var r=Fr(e);return null==t?r:tn(r,t)},Br.curry=function e(t,r,n){var i=Ks(t,8,s,s,s,s,s,r=n?s:r);return i.placeholder=e.placeholder,i},Br.curryRight=function e(t,r,n){var i=Ks(t,16,s,s,s,s,s,r=n?s:r);return i.placeholder=e.placeholder,i},Br.debounce=Ca,Br.defaults=Po,Br.defaultsDeep=Ao,Br.defer=Ia,Br.delay=Oa,Br.difference=Fi,Br.differenceBy=ji,Br.differenceWith=Ui,Br.drop=function(e,t,r){var n=null==e?0:e.length;return n?es(e,(t=r||t===s?1:po(t))<0?0:t,n):[]},Br.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?es(e,0,(t=n-(t=r||t===s?1:po(t)))<0?0:t):[]},Br.dropRightWhile=function(e,t){return e&&e.length?us(e,ii(t,3),!0,!0):[]},Br.dropWhile=function(e,t){return e&&e.length?us(e,ii(t,3),!0):[]},Br.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&yi(e,t,r)&&(r=0,n=i),function(e,t,r,n){var i=e.length;for((r=po(r))<0&&(r=-r>i?0:i+r),(n=n===s||n>i?i:po(n))<0&&(n+=i),n=r>n?0:fo(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Br.filter=function(e,t){return($a(e)?_t:fn)(e,ii(t,3))},Br.flatMap=function(e,t){return mn(xa(e,t),1)},Br.flatMapDeep=function(e,t){return mn(xa(e,t),u)},Br.flatMapDepth=function(e,t,r){return r=r===s?1:po(r),mn(xa(e,t),r)},Br.flatten=Hi,Br.flattenDeep=function(e){return null!=e&&e.length?mn(e,u):[]},Br.flattenDepth=function(e,t){return null!=e&&e.length?mn(e,t=t===s?1:po(t)):[]},Br.flip=function(e){return Ks(e,512)},Br.flow=ec,Br.flowRight=tc,Br.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var s=e[t];n[s[0]]=s[1]}return n},Br.functions=function(e){return null==e?[]:wn(e,Io(e))},Br.functionsIn=function(e){return null==e?[]:wn(e,Oo(e))},Br.groupBy=va,Br.initial=function(e){return null!=e&&e.length?es(e,0,-1):[]},Br.intersection=Vi,Br.intersectionBy=zi,Br.intersectionWith=qi,Br.invert=ko,Br.invertBy=_o,Br.invokeMap=ba,Br.iteratee=nc,Br.keyBy=wa,Br.keys=Io,Br.keysIn=Oo,Br.map=xa,Br.mapKeys=function(e,t){var r={};return t=ii(t,3),vn(e,(function(e,n,s){rn(r,t(e,n,s),e)})),r},Br.mapValues=function(e,t){var r={};return t=ii(t,3),vn(e,(function(e,n,s){rn(r,n,t(e,n,s))})),r},Br.matches=function(e){return Bn(an(e,1))},Br.matchesProperty=function(e,t){return Fn(e,an(t,1))},Br.memoize=La,Br.merge=Lo,Br.mergeWith=No,Br.method=sc,Br.methodOf=ic,Br.mixin=ac,Br.negate=Na,Br.nthArg=function(e){return e=po(e),qn((function(t){return Un(t,e)}))},Br.omit=Mo,Br.omitBy=function(e,t){return Ro(e,Na(ii(t)))},Br.once=function(e){return Ta(2,e)},Br.orderBy=function(e,t,r,n){return null==e?[]:($a(t)||(t=null==t?[]:[t]),$a(r=n?s:r)||(r=null==r?[]:[r]),Yn(e,t,r))},Br.over=cc,Br.overArgs=Ma,Br.overEvery=lc,Br.overSome=uc,Br.partial=Da,Br.partialRight=Ra,Br.partition=Sa,Br.pick=Do,Br.pickBy=Ro,Br.property=hc,Br.propertyOf=function(e){return function(t){return null==e?s:xn(e,t)}},Br.pull=Gi,Br.pullAll=Ji,Br.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Hn(e,t,ii(r,2)):e},Br.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Hn(e,t,s,r):e},Br.pullAt=Xi,Br.range=pc,Br.rangeRight=dc,Br.rearg=Ba,Br.reject=function(e,t){return($a(e)?_t:fn)(e,Na(ii(t,3)))},Br.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,s=[],i=e.length;for(t=ii(t,3);++n<i;){var a=e[n];t(a,n,e)&&(r.push(a),s.push(n))}return Wn(e,s),r},Br.rest=function(e,t){if("function"!=typeof e)throw new ke(i);return qn(e,t=t===s?t:po(t))},Br.reverse=Zi,Br.sampleSize=function(e,t,r){return t=(r?yi(e,t,r):t===s)?1:po(t),($a(e)?Gr:Gn)(e,t)},Br.set=function(e,t,r){return null==e?e:Jn(e,t,r)},Br.setWith=function(e,t,r,n){return n="function"==typeof n?n:s,null==e?e:Jn(e,t,r,n)},Br.shuffle=function(e){return($a(e)?Jr:Qn)(e)},Br.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&yi(e,t,r)?(t=0,r=n):(t=null==t?0:po(t),r=r===s?n:po(r)),es(e,t,r)):[]},Br.sortBy=Pa,Br.sortedUniq=function(e){return e&&e.length?ss(e):[]},Br.sortedUniqBy=function(e,t){return e&&e.length?ss(e,ii(t,2)):[]},Br.split=function(e,t,r){return r&&"number"!=typeof r&&yi(e,t,r)&&(t=r=s),(r=r===s?d:r>>>0)?(e=go(e))&&("string"==typeof t||null!=t&&!no(t))&&!(t=as(t))&&nr(e)?vs(ur(e),0,r):e.split(t,r):[]},Br.spread=function(e,t){if("function"!=typeof e)throw new ke(i);return t=null==t?0:mr(po(t),0),qn((function(r){var n=r[t],s=vs(r,0,t);return n&&Lt(s,n),Pt(e,this,s)}))},Br.tail=function(e){var t=null==e?0:e.length;return t?es(e,1,t):[]},Br.take=function(e,t,r){return e&&e.length?es(e,0,(t=r||t===s?1:po(t))<0?0:t):[]},Br.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?es(e,(t=n-(t=r||t===s?1:po(t)))<0?0:t,n):[]},Br.takeRightWhile=function(e,t){return e&&e.length?us(e,ii(t,3),!1,!0):[]},Br.takeWhile=function(e,t){return e&&e.length?us(e,ii(t,3)):[]},Br.tap=function(e,t){return t(e),e},Br.throttle=function(e,t,r){var n=!0,s=!0;if("function"!=typeof e)throw new ke(i);return Za(r)&&(n="leading"in r?!!r.leading:n,s="trailing"in r?!!r.trailing:s),Ca(e,t,{leading:n,maxWait:t,trailing:s})},Br.thru=ha,Br.toArray=uo,Br.toPairs=Bo,Br.toPairsIn=Fo,Br.toPath=function(e){return $a(e)?Ot(e,Di):ao(e)?[e]:Ts(Mi(go(e)))},Br.toPlainObject=yo,Br.transform=function(e,t,r){var n=$a(e),s=n||za(e)||oo(e);if(t=ii(t,4),null==r){var i=e&&e.constructor;r=s?n?new i:[]:Za(e)&&Ga(i)?Fr(We(e)):{}}return(s?Et:vn)(e,(function(e,n,s){return t(r,e,n,s)})),r},Br.unary=function(e){return Ea(e,1)},Br.union=Qi,Br.unionBy=ea,Br.unionWith=ta,Br.uniq=function(e){return e&&e.length?os(e):[]},Br.uniqBy=function(e,t){return e&&e.length?os(e,ii(t,2)):[]},Br.uniqWith=function(e,t){return t="function"==typeof t?t:s,e&&e.length?os(e,s,t):[]},Br.unset=function(e,t){return null==e||cs(e,t)},Br.unzip=ra,Br.unzipWith=na,Br.update=function(e,t,r){return null==e?e:ls(e,t,ms(r))},Br.updateWith=function(e,t,r,n){return n="function"==typeof n?n:s,null==e?e:ls(e,t,ms(r),n)},Br.values=jo,Br.valuesIn=function(e){return null==e?[]:Jt(e,Oo(e))},Br.without=sa,Br.words=Jo,Br.wrap=function(e,t){return Da(ms(t),e)},Br.xor=ia,Br.xorBy=aa,Br.xorWith=oa,Br.zip=ca,Br.zipObject=function(e,t){return ds(e||[],t||[],Zr)},Br.zipObjectDeep=function(e,t){return ds(e||[],t||[],Jn)},Br.zipWith=la,Br.entries=Bo,Br.entriesIn=Fo,Br.extend=bo,Br.extendWith=wo,ac(Br,Br),Br.add=gc,Br.attempt=Xo,Br.camelCase=Uo,Br.capitalize=Yo,Br.ceil=vc,Br.clamp=function(e,t,r){return r===s&&(r=t,t=s),r!==s&&(r=(r=mo(r))==r?r:0),t!==s&&(t=(t=mo(t))==t?t:0),sn(mo(e),t,r)},Br.clone=function(e){return an(e,4)},Br.cloneDeep=function(e){return an(e,5)},Br.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:s)},Br.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:s)},Br.conformsTo=function(e,t){return null==t||on(e,t,Io(t))},Br.deburr=$o,Br.defaultTo=function(e,t){return null==e||e!=e?t:e},Br.divide=bc,Br.endsWith=function(e,t,r){e=go(e),t=as(t);var n=e.length,i=r=r===s?n:sn(po(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Br.eq=Fa,Br.escape=function(e){return(e=go(e))&&K.test(e)?e.replace(z,tr):e},Br.escapeRegExp=function(e){return(e=go(e))&&re.test(e)?e.replace(te,"\\$&"):e},Br.every=function(e,t,r){var n=$a(e)?kt:pn;return r&&yi(e,t,r)&&(t=s),n(e,ii(t,3))},Br.find=fa,Br.findIndex=Yi,Br.findKey=function(e,t){return Bt(e,ii(t,3),vn)},Br.findLast=ma,Br.findLastIndex=$i,Br.findLastKey=function(e,t){return Bt(e,ii(t,3),bn)},Br.floor=wc,Br.forEach=ya,Br.forEachRight=ga,Br.forIn=function(e,t){return null==e?e:yn(e,ii(t,3),Oo)},Br.forInRight=function(e,t){return null==e?e:gn(e,ii(t,3),Oo)},Br.forOwn=function(e,t){return e&&vn(e,ii(t,3))},Br.forOwnRight=function(e,t){return e&&bn(e,ii(t,3))},Br.get=Eo,Br.gt=ja,Br.gte=Ua,Br.has=function(e,t){return null!=e&&pi(e,t,En)},Br.hasIn=To,Br.head=Wi,Br.identity=rc,Br.includes=function(e,t,r,n){e=Wa(e)?e:jo(e),r=r&&!n?po(r):0;var s=e.length;return r<0&&(r=mr(s+r,0)),io(e)?r<=s&&e.indexOf(t,r)>-1:!!s&&jt(e,t,r)>-1},Br.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=null==r?0:po(r);return s<0&&(s=mr(n+s,0)),jt(e,t,s)},Br.inRange=function(e,t,r){return t=ho(t),r===s?(r=t,t=0):r=ho(r),function(e,t,r){return e>=yr(t,r)&&e<mr(t,r)}(e=mo(e),t,r)},Br.invoke=Co,Br.isArguments=Ya,Br.isArray=$a,Br.isArrayBuffer=Ha,Br.isArrayLike=Wa,Br.isArrayLikeObject=Va,Br.isBoolean=function(e){return!0===e||!1===e||Qa(e)&&Pn(e)==g},Br.isBuffer=za,Br.isDate=qa,Br.isElement=function(e){return Qa(e)&&1===e.nodeType&&!ro(e)},Br.isEmpty=function(e){if(null==e)return!0;if(Wa(e)&&($a(e)||"string"==typeof e||"function"==typeof e.splice||za(e)||oo(e)||Ya(e)))return!e.length;var t=hi(e);if(t==S||t==k)return!e.size;if(wi(e))return!Mn(e).length;for(var r in e)if(Ne.call(e,r))return!1;return!0},Br.isEqual=function(e,t){return In(e,t)},Br.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:s)?r(e,t):s;return n===s?In(e,t,s,r):!!n},Br.isError=Ka,Br.isFinite=function(e){return"number"==typeof e&&Rt(e)},Br.isFunction=Ga,Br.isInteger=Ja,Br.isLength=Xa,Br.isMap=eo,Br.isMatch=function(e,t){return e===t||On(e,t,oi(t))},Br.isMatchWith=function(e,t,r){return r="function"==typeof r?r:s,On(e,t,oi(t),r)},Br.isNaN=function(e){return to(e)&&e!=+e},Br.isNative=function(e){if(bi(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ln(e)},Br.isNil=function(e){return null==e},Br.isNull=function(e){return null===e},Br.isNumber=to,Br.isObject=Za,Br.isObjectLike=Qa,Br.isPlainObject=ro,Br.isRegExp=no,Br.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=h},Br.isSet=so,Br.isString=io,Br.isSymbol=ao,Br.isTypedArray=oo,Br.isUndefined=function(e){return e===s},Br.isWeakMap=function(e){return Qa(e)&&hi(e)==I},Br.isWeakSet=function(e){return Qa(e)&&"[object WeakSet]"==Pn(e)},Br.join=function(e,t){return null==e?"":Wt.call(e,t)},Br.kebabCase=Ho,Br.last=Ki,Br.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==s&&(i=(i=po(r))<0?mr(n+i,0):yr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Ft(e,Yt,i,!0)},Br.lowerCase=Wo,Br.lowerFirst=Vo,Br.lt=co,Br.lte=lo,Br.max=function(e){return e&&e.length?dn(e,rc,An):s},Br.maxBy=function(e,t){return e&&e.length?dn(e,ii(t,2),An):s},Br.mean=function(e){return $t(e,rc)},Br.meanBy=function(e,t){return $t(e,ii(t,2))},Br.min=function(e){return e&&e.length?dn(e,rc,Dn):s},Br.minBy=function(e,t){return e&&e.length?dn(e,ii(t,2),Dn):s},Br.stubArray=fc,Br.stubFalse=mc,Br.stubObject=function(){return{}},Br.stubString=function(){return""},Br.stubTrue=function(){return!0},Br.multiply=xc,Br.nth=function(e,t){return e&&e.length?Un(e,po(t)):s},Br.noConflict=function(){return ht._===this&&(ht._=Fe),this},Br.noop=oc,Br.now=Aa,Br.pad=function(e,t,r){e=go(e);var n=(t=po(t))?lr(e):0;if(!t||n>=t)return e;var s=(t-n)/2;return Ys(dt(s),r)+e+Ys(pt(s),r)},Br.padEnd=function(e,t,r){e=go(e);var n=(t=po(t))?lr(e):0;return t&&n<t?e+Ys(t-n,r):e},Br.padStart=function(e,t,r){e=go(e);var n=(t=po(t))?lr(e):0;return t&&n<t?Ys(t-n,r)+e:e},Br.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),vr(go(e).replace(ne,""),t||0)},Br.random=function(e,t,r){if(r&&"boolean"!=typeof r&&yi(e,t,r)&&(t=r=s),r===s&&("boolean"==typeof t?(r=t,t=s):"boolean"==typeof e&&(r=e,e=s)),e===s&&t===s?(e=0,t=1):(e=ho(e),t===s?(t=e,e=0):t=ho(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=br();return yr(e+i*(t-e+ot("1e-"+((i+"").length-1))),t)}return Vn(e,t)},Br.reduce=function(e,t,r){var n=$a(e)?Nt:Vt,s=arguments.length<3;return n(e,ii(t,4),r,s,un)},Br.reduceRight=function(e,t,r){var n=$a(e)?Mt:Vt,s=arguments.length<3;return n(e,ii(t,4),r,s,hn)},Br.repeat=function(e,t,r){return t=(r?yi(e,t,r):t===s)?1:po(t),zn(go(e),t)},Br.replace=function(){var e=arguments,t=go(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Br.result=function(e,t,r){var n=-1,i=(t=ys(t,e)).length;for(i||(i=1,e=s);++n<i;){var a=null==e?s:e[Di(t[n])];a===s&&(n=i,a=r),e=Ga(a)?a.call(e):a}return e},Br.round=Sc,Br.runInContext=e,Br.sample=function(e){return($a(e)?Kr:Kn)(e)},Br.size=function(e){if(null==e)return 0;if(Wa(e))return io(e)?lr(e):e.length;var t=hi(e);return t==S||t==k?e.size:Mn(e).length},Br.snakeCase=zo,Br.some=function(e,t,r){var n=$a(e)?Dt:ts;return r&&yi(e,t,r)&&(t=s),n(e,ii(t,3))},Br.sortedIndex=function(e,t){return rs(e,t)},Br.sortedIndexBy=function(e,t,r){return ns(e,t,ii(r,2))},Br.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=rs(e,t);if(n<r&&Fa(e[n],t))return n}return-1},Br.sortedLastIndex=function(e,t){return rs(e,t,!0)},Br.sortedLastIndexBy=function(e,t,r){return ns(e,t,ii(r,2),!0)},Br.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=rs(e,t,!0)-1;if(Fa(e[r],t))return r}return-1},Br.startCase=qo,Br.startsWith=function(e,t,r){return e=go(e),r=null==r?0:sn(po(r),0,e.length),t=as(t),e.slice(r,r+t.length)==t},Br.subtract=Pc,Br.sum=function(e){return e&&e.length?zt(e,rc):0},Br.sumBy=function(e,t){return e&&e.length?zt(e,ii(t,2)):0},Br.template=function(e,t,r){var n=Br.templateSettings;r&&yi(e,t,r)&&(t=s),e=go(e),t=wo({},t,n,Gs);var i,a,o=wo({},t.imports,n.imports,Gs),c=Io(o),l=Jt(o,c),u=0,h=t.interpolate||be,p="__p += '",d=Ee((t.escape||be).source+"|"+h.source+"|"+(h===X?he:be).source+"|"+(t.evaluate||be).source+"|$","g"),f="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,s,o,c){return n||(n=s),p+=e.slice(u,c).replace(we,rr),r&&(i=!0,p+="' +\n__e("+r+") +\n'"),o&&(a=!0,p+="';\n"+o+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),p+="';\n";var m=Ne.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new xe("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace($,""):p).replace(H,"$1").replace(W,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var y=Xo((function(){return Se(c,f+"return "+p).apply(s,l)}));if(y.source=p,Ka(y))throw y;return y},Br.times=function(e,t){if((e=po(e))<1||e>h)return[];var r=d,n=yr(e,d);t=ii(t),e-=d;for(var s=qt(n,t);++r<e;)t(r);return s},Br.toFinite=ho,Br.toInteger=po,Br.toLength=fo,Br.toLower=function(e){return go(e).toLowerCase()},Br.toNumber=mo,Br.toSafeInteger=function(e){return e?sn(po(e),-9007199254740991,h):0===e?e:0},Br.toString=go,Br.toUpper=function(e){return go(e).toUpperCase()},Br.trim=function(e,t,r){if((e=go(e))&&(r||t===s))return Kt(e);if(!e||!(t=as(t)))return e;var n=ur(e),i=ur(t);return vs(n,Zt(n,i),Qt(n,i)+1).join("")},Br.trimEnd=function(e,t,r){if((e=go(e))&&(r||t===s))return e.slice(0,hr(e)+1);if(!e||!(t=as(t)))return e;var n=ur(e);return vs(n,0,Qt(n,ur(t))+1).join("")},Br.trimStart=function(e,t,r){if((e=go(e))&&(r||t===s))return e.replace(ne,"");if(!e||!(t=as(t)))return e;var n=ur(e);return vs(n,Zt(n,ur(t))).join("")},Br.truncate=function(e,t){var r=30,n="...";if(Za(t)){var i="separator"in t?t.separator:i;r="length"in t?po(t.length):r,n="omission"in t?as(t.omission):n}var a=(e=go(e)).length;if(nr(e)){var o=ur(e);a=o.length}if(r>=a)return e;var c=r-lr(n);if(c<1)return n;var l=o?vs(o,0,c).join(""):e.slice(0,c);if(i===s)return l+n;if(o&&(c+=l.length-c),no(i)){if(e.slice(c).search(i)){var u,h=l;for(i.global||(i=Ee(i.source,go(pe.exec(i))+"g")),i.lastIndex=0;u=i.exec(h);)var p=u.index;l=l.slice(0,p===s?c:p)}}else if(e.indexOf(as(i),c)!=c){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+n},Br.unescape=function(e){return(e=go(e))&&q.test(e)?e.replace(V,pr):e},Br.uniqueId=function(e){var t=++Me;return go(e)+t},Br.upperCase=Ko,Br.upperFirst=Go,Br.each=ya,Br.eachRight=ga,Br.first=Wi,ac(Br,(yc={},vn(Br,(function(e,t){Ne.call(Br.prototype,t)||(yc[t]=e)})),yc),{chain:!1}),Br.VERSION="4.17.21",Et(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Br[e].placeholder=Br})),Et(["drop","take"],(function(e,t){Yr.prototype[e]=function(r){r=r===s?1:mr(po(r),0);var n=this.__filtered__&&!t?new Yr(this):this.clone();return n.__filtered__?n.__takeCount__=yr(r,n.__takeCount__):n.__views__.push({size:yr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Yr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Et(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Yr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ii(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Et(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Yr.prototype[e]=function(){return this[r](1).value()[0]}})),Et(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Yr.prototype[e]=function(){return this.__filtered__?new Yr(this):this[r](1)}})),Yr.prototype.compact=function(){return this.filter(rc)},Yr.prototype.find=function(e){return this.filter(e).head()},Yr.prototype.findLast=function(e){return this.reverse().find(e)},Yr.prototype.invokeMap=qn((function(e,t){return"function"==typeof e?new Yr(this):this.map((function(r){return _n(r,e,t)}))})),Yr.prototype.reject=function(e){return this.filter(Na(ii(e)))},Yr.prototype.slice=function(e,t){e=po(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Yr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(r=(t=po(t))<0?r.dropRight(-t):r.take(t-e)),r)},Yr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yr.prototype.toArray=function(){return this.take(d)},vn(Yr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Br[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);i&&(Br.prototype[t]=function(){var t=this.__wrapped__,o=n?[1]:arguments,c=t instanceof Yr,l=o[0],u=c||$a(t),h=function(e){var t=i.apply(Br,Lt([e],o));return n&&p?t[0]:t};u&&r&&"function"==typeof l&&1!=l.length&&(c=u=!1);var p=this.__chain__,d=!!this.__actions__.length,f=a&&!p,m=c&&!d;if(!a&&u){t=m?t:new Yr(this);var y=e.apply(t,o);return y.__actions__.push({func:ha,args:[h],thisArg:s}),new Ur(y,p)}return f&&m?e.apply(this,o):(y=this.thru(h),f?n?y.value()[0]:y.value():y)})})),Et(["pop","push","shift","sort","splice","unshift"],(function(e){var t=_e[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Br.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var s=this.value();return t.apply($a(s)?s:[],e)}return this[r]((function(r){return t.apply($a(r)?r:[],e)}))}})),vn(Yr.prototype,(function(e,t){var r=Br[t];if(r){var n=r.name+"";Ne.call(_r,n)||(_r[n]=[]),_r[n].push({name:t,func:r})}})),_r[Bs(s,2).name]=[{name:"wrapper",func:s}],Yr.prototype.clone=function(){var e=new Yr(this.__wrapped__);return e.__actions__=Ts(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ts(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ts(this.__views__),e},Yr.prototype.reverse=function(){if(this.__filtered__){var e=new Yr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=$a(e),n=t<0,s=r?e.length:0,i=function(e,t,r){for(var n=-1,s=r.length;++n<s;){var i=r[n],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yr(t,e+a);break;case"takeRight":e=mr(e,t-a)}}return{start:e,end:t}}(0,s,this.__views__),a=i.start,o=i.end,c=o-a,l=n?o:a-1,u=this.__iteratees__,h=u.length,p=0,d=yr(c,this.__takeCount__);if(!r||!n&&s==c&&d==c)return hs(e,this.__actions__);var f=[];e:for(;c--&&p<d;){for(var m=-1,y=e[l+=t];++m<h;){var g=u[m],v=g.iteratee,b=g.type,w=v(y);if(2==b)y=w;else if(!w){if(1==b)continue e;break e}}f[p++]=y}return f},Br.prototype.at=pa,Br.prototype.chain=function(){return ua(this)},Br.prototype.commit=function(){return new Ur(this.value(),this.__chain__)},Br.prototype.next=function(){this.__values__===s&&(this.__values__=uo(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?s:this.__values__[this.__index__++]}},Br.prototype.plant=function(e){for(var t,r=this;r instanceof jr;){var n=Bi(r);n.__index__=0,n.__values__=s,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Br.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yr){var t=e;return this.__actions__.length&&(t=new Yr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Zi],thisArg:s}),new Ur(t,this.__chain__)}return this.thru(Zi)},Br.prototype.toJSON=Br.prototype.valueOf=Br.prototype.value=function(){return hs(this.__wrapped__,this.__actions__)},Br.prototype.first=Br.prototype.head,Ge&&(Br.prototype[Ge]=function(){return this}),Br}();ht._=dr,(n=function(){return dr}.call(t,r,t,e))===s||(e.exports=n)}.call(this)},5417:(e,t,r)=>{"use strict";var n=r(1796),s=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var r,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===s.indexOf(t))throw new n('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(r=t.styleAliases||null,a={},null!==r&&Object.keys(r).forEach((function(e){r[e].forEach((function(t){a[String(t)]=e}))})),a),-1===i.indexOf(this.kind))throw new n('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},5506:(e,t,r)=>{"use strict";var n=r(3780),s=r(1796),i=r(9348),a=r(9590),o=r(2846),c=Object.prototype.hasOwnProperty,l=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u=/[\x85\u2028\u2029]/,h=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function f(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function y(e){return 9===e||32===e}function g(e){return 9===e||32===e||10===e||13===e}function v(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function w(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function x(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var S=new Array(256),P=new Array(256),A=0;A<256;A++)S[A]=w(A)?1:0,P[A]=w(A);function E(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||o,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function T(e,t){return new s(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function k(e,t){throw T(e,t)}function _(e,t){e.onWarning&&e.onWarning.call(null,T(e,t))}var C={YAML:function(e,t,r){var n,s,i;null!==e.version&&k(e,"duplication of %YAML directive"),1!==r.length&&k(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&k(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),i=parseInt(n[2],10),1!==s&&k(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&_(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,s;2!==r.length&&k(e,"TAG directive accepts exactly two arguments"),n=r[0],s=r[1],p.test(n)||k(e,"ill-formed tag handle (first argument) of the TAG directive"),c.call(e.tagMap,n)&&k(e,'there is a previously declared suffix for "'+n+'" tag handle'),d.test(s)||k(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function I(e,t,r,n){var s,i,a,o;if(t<r){if(o=e.input.slice(t,r),n)for(s=0,i=o.length;s<i;s+=1)9===(a=o.charCodeAt(s))||32<=a&&a<=1114111||k(e,"expected valid JSON character");else l.test(o)&&k(e,"the stream contains non-printable characters");e.result+=o}}function O(e,t,r,s){var i,a,o,l;for(n.isObject(r)||k(e,"cannot merge mappings; the provided source object is unacceptable"),o=0,l=(i=Object.keys(r)).length;o<l;o+=1)a=i[o],c.call(t,a)||(t[a]=r[a],s[a]=!0)}function L(e,t,r,n,s,i,a,o){var l,u;if(Array.isArray(s))for(l=0,u=(s=Array.prototype.slice.call(s)).length;l<u;l+=1)Array.isArray(s[l])&&k(e,"nested arrays are not supported inside keys"),"object"==typeof s&&"[object Object]"===f(s[l])&&(s[l]="[object Object]");if("object"==typeof s&&"[object Object]"===f(s)&&(s="[object Object]"),s=String(s),null===t&&(t={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(i))for(l=0,u=i.length;l<u;l+=1)O(e,t,i[l],r);else O(e,t,i,r);else e.json||c.call(r,s)||!c.call(t,s)||(e.line=a||e.line,e.position=o||e.position,k(e,"duplicated mapping key")),t[s]=i,delete r[s];return t}function N(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):k(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function M(e,t,r){for(var n=0,s=e.input.charCodeAt(e.position);0!==s;){for(;y(s);)s=e.input.charCodeAt(++e.position);if(t&&35===s)do{s=e.input.charCodeAt(++e.position)}while(10!==s&&13!==s&&0!==s);if(!m(s))break;for(N(e),s=e.input.charCodeAt(e.position),n++,e.lineIndent=0;32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position)}return-1!==r&&0!==n&&e.lineIndent<r&&_(e,"deficient indentation"),n}function D(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!g(t)))}function R(e,t){1===t?e.result+=" ":t>1&&(e.result+=n.repeat("\n",t-1))}function B(e,t){var r,n,s=e.tag,i=e.anchor,a=[],o=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),n=e.input.charCodeAt(e.position);0!==n&&45===n&&g(e.input.charCodeAt(e.position+1));)if(o=!0,e.position++,M(e,!0,-1)&&e.lineIndent<=t)a.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,U(e,t,3,!1,!0),a.push(e.result),M(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)k(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!o&&(e.tag=s,e.anchor=i,e.kind="sequence",e.result=a,!0)}function F(e){var t,r,n,s,i=!1,a=!1;if(33!==(s=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&k(e,"duplication of a tag property"),60===(s=e.input.charCodeAt(++e.position))?(i=!0,s=e.input.charCodeAt(++e.position)):33===s?(a=!0,r="!!",s=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&62!==s);e.position<e.length?(n=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):k(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!g(s);)33===s&&(a?k(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),p.test(r)||k(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);n=e.input.slice(t,e.position),h.test(n)&&k(e,"tag suffix cannot contain flow indicator characters")}return n&&!d.test(n)&&k(e,"tag name cannot contain such characters: "+n),i?e.tag=n:c.call(e.tagMap,r)?e.tag=e.tagMap[r]+n:"!"===r?e.tag="!"+n:"!!"===r?e.tag="tag:yaml.org,2002:"+n:k(e,'undeclared tag handle "'+r+'"'),!0}function j(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&k(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!g(r)&&!v(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&k(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function U(e,t,r,s,i){var a,o,l,u,h,p,d,f,w=1,A=!1,E=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=l=4===r||3===r,s&&M(e,!0,-1)&&(A=!0,e.lineIndent>t?w=1:e.lineIndent===t?w=0:e.lineIndent<t&&(w=-1)),1===w)for(;F(e)||j(e);)M(e,!0,-1)?(A=!0,l=a,e.lineIndent>t?w=1:e.lineIndent===t?w=0:e.lineIndent<t&&(w=-1)):l=!1;if(l&&(l=A||i),1!==w&&4!==r||(d=1===r||2===r?t:t+1,f=e.position-e.lineStart,1===w?l&&(B(e,f)||function(e,t,r){var n,s,i,a,o,c=e.tag,l=e.anchor,u={},h={},p=null,d=null,f=null,m=!1,v=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=u),o=e.input.charCodeAt(e.position);0!==o;){if(n=e.input.charCodeAt(e.position+1),i=e.line,a=e.position,63!==o&&58!==o||!g(n)){if(!U(e,r,2,!1,!0))break;if(e.line===i){for(o=e.input.charCodeAt(e.position);y(o);)o=e.input.charCodeAt(++e.position);if(58===o)g(o=e.input.charCodeAt(++e.position))||k(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(L(e,u,h,p,d,null),p=d=f=null),v=!0,m=!1,s=!1,p=e.tag,d=e.result;else{if(!v)return e.tag=c,e.anchor=l,!0;k(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=c,e.anchor=l,!0;k(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===o?(m&&(L(e,u,h,p,d,null),p=d=f=null),v=!0,m=!0,s=!0):m?(m=!1,s=!0):k(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,o=n;if((e.line===i||e.lineIndent>t)&&(U(e,t,4,!0,s)&&(m?d=e.result:f=e.result),m||(L(e,u,h,p,d,f,i,a),p=d=f=null),M(e,!0,-1),o=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==o)k(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&L(e,u,h,p,d,null),v&&(e.tag=c,e.anchor=l,e.kind="mapping",e.result=u),v}(e,f,d))||function(e,t){var r,n,s,i,a,o,c,l,u,h,p=!0,d=e.tag,f=e.anchor,m={};if(91===(h=e.input.charCodeAt(e.position)))s=93,o=!1,n=[];else{if(123!==h)return!1;s=125,o=!0,n={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=n),h=e.input.charCodeAt(++e.position);0!==h;){if(M(e,!0,t),(h=e.input.charCodeAt(e.position))===s)return e.position++,e.tag=d,e.anchor=f,e.kind=o?"mapping":"sequence",e.result=n,!0;p||k(e,"missed comma between flow collection entries"),u=null,i=a=!1,63===h&&g(e.input.charCodeAt(e.position+1))&&(i=a=!0,e.position++,M(e,!0,t)),r=e.line,U(e,t,1,!1,!0),l=e.tag,c=e.result,M(e,!0,t),h=e.input.charCodeAt(e.position),!a&&e.line!==r||58!==h||(i=!0,h=e.input.charCodeAt(++e.position),M(e,!0,t),U(e,t,1,!1,!0),u=e.result),o?L(e,n,m,l,c,u):i?n.push(L(e,null,m,l,c,u)):n.push(c),M(e,!0,t),44===(h=e.input.charCodeAt(e.position))?(p=!0,h=e.input.charCodeAt(++e.position)):p=!1}k(e,"unexpected end of the stream within a flow collection")}(e,d)?E=!0:(o&&function(e,t){var r,s,i,a,o,c=1,l=!1,u=!1,h=t,p=0,d=!1;if(124===(a=e.input.charCodeAt(e.position)))s=!1;else{if(62!==a)return!1;s=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===c?c=43===a?3:2:k(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(o=a)&&o<=57?o-48:-1)>=0))break;0===i?k(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?k(e,"repeat of an indentation width identifier"):(h=t+i-1,u=!0)}if(y(a)){do{a=e.input.charCodeAt(++e.position)}while(y(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(N(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndent<h)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>h&&(h=e.lineIndent),m(a))p++;else{if(e.lineIndent<h){3===c?e.result+=n.repeat("\n",l?1+p:p):1===c&&l&&(e.result+="\n");break}for(s?y(a)?(d=!0,e.result+=n.repeat("\n",l?1+p:p)):d?(d=!1,e.result+=n.repeat("\n",p+1)):0===p?l&&(e.result+=" "):e.result+=n.repeat("\n",p):e.result+=n.repeat("\n",l?1+p:p),l=!0,u=!0,p=0,r=e.position;!m(a)&&0!==a;)a=e.input.charCodeAt(++e.position);I(e,r,e.position,!1)}}return!0}(e,d)||function(e,t){var r,n,s;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=s=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(I(e,n,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;n=e.position,e.position++,s=e.position}else m(r)?(I(e,n,s,!0),R(e,M(e,!1,t)),n=s=e.position):e.position===e.lineStart&&D(e)?k(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);k(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var r,n,s,i,a,o,c;if(34!==(o=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(o=e.input.charCodeAt(e.position));){if(34===o)return I(e,r,e.position,!0),e.position++,!0;if(92===o){if(I(e,r,e.position,!0),m(o=e.input.charCodeAt(++e.position)))M(e,!1,t);else if(o<256&&S[o])e.result+=P[o],e.position++;else if((a=120===(c=o)?2:117===c?4:85===c?8:0)>0){for(s=a,i=0;s>0;s--)(a=b(o=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:k(e,"expected hexadecimal character");e.result+=x(i),e.position++}else k(e,"unknown escape sequence");r=n=e.position}else m(o)?(I(e,r,n,!0),R(e,M(e,!1,t)),r=n=e.position):e.position===e.lineStart&&D(e)?k(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}k(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?E=!0:function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!g(n)&&!v(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&k(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),c.call(e.anchorMap,r)||k(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],M(e,!0,-1),!0}(e)?(E=!0,null===e.tag&&null===e.anchor||k(e,"alias node should not have any properties")):function(e,t,r){var n,s,i,a,o,c,l,u,h=e.kind,p=e.result;if(g(u=e.input.charCodeAt(e.position))||v(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(g(n=e.input.charCodeAt(e.position+1))||r&&v(n)))return!1;for(e.kind="scalar",e.result="",s=i=e.position,a=!1;0!==u;){if(58===u){if(g(n=e.input.charCodeAt(e.position+1))||r&&v(n))break}else if(35===u){if(g(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&D(e)||r&&v(u))break;if(m(u)){if(o=e.line,c=e.lineStart,l=e.lineIndent,M(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=i,e.line=o,e.lineStart=c,e.lineIndent=l;break}}a&&(I(e,s,i,!1),R(e,e.line-o),s=i=e.position,a=!1),y(u)||(i=e.position+1),u=e.input.charCodeAt(++e.position)}return I(e,s,i,!1),!!e.result||(e.kind=h,e.result=p,!1)}(e,d,1===r)&&(E=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===w&&(E=l&&B(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&k(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,h=e.implicitTypes.length;u<h;u+=1)if((p=e.implicitTypes[u]).resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else c.call(e.typeMap[e.kind||"fallback"],e.tag)?(p=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&p.kind!==e.kind&&k(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):k(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):k(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||E}function Y(e){var t,r,n,s,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(M(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(a=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!g(s);)s=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&k(e,"directive name must not be less than one character in length");0!==s;){for(;y(s);)s=e.input.charCodeAt(++e.position);if(35===s){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&!m(s));break}if(m(s))break;for(t=e.position;0!==s&&!g(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==s&&N(e),c.call(C,r)?C[r](e,r,n):_(e,'unknown document directive "'+r+'"')}M(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,M(e,!0,-1)):a&&k(e,"directives end mark is expected"),U(e,e.lineIndent-1,4,!1,!0),M(e,!0,-1),e.checkLineBreaks&&u.test(e.input.slice(i,e.position))&&_(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&D(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,M(e,!0,-1)):e.position<e.length-1&&k(e,"end of the stream or a document separator is expected")}function $(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new E(e,t),n=e.indexOf("\0");for(-1!==n&&(r.position=n,k(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Y(r);return r.documents}function H(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var n=$(e,r);if("function"!=typeof t)return n;for(var s=0,i=n.length;s<i;s+=1)t(n[s])}function W(e,t){var r=$(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new s("expected a single document in the stream, but found more")}}e.exports.loadAll=H,e.exports.load=W,e.exports.safeLoadAll=function(e,t,r){return"object"==typeof t&&null!==t&&void 0===r&&(r=t,t=null),H(e,t,n.extend({schema:a},r))},e.exports.safeLoad=function(e,t){return W(e,n.extend({schema:a},t))}},5580:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(6758),s=r.n(n),i=r(935),a=r.n(i)()(s());a.push([e.id,":host{display:flex;flex-direction:column;align-items:center;padding:48px 32px}:host([hidden]){display:none}.icon{color:var(--color-error);font-size:72px;margin-bottom:24px}.icon svg{display:block}.title{color:var(--antd-heading-color);font-size:24px;line-height:1.8}.description{color:var(--antd-text-color-secondary);font-size:14px;line-height:1.6;text-align:center}.actions{margin-top:1em}",""]);const o=a.toString()},5774:(e,t,r)=>{"use strict";r.r(t),r.d(t,{inject:()=>P,transform:()=>S,transformAndInject:()=>A});var n=r(1030),s=r(5285);let i=function(e){return e[e.Initial=0]="Initial",e[e.ExpectField=1]="ExpectField",e[e.ExpectOptionalBeginDefault=2]="ExpectOptionalBeginDefault",e[e.ExpectDefaultValue=3]="ExpectDefaultValue",e[e.ExpectOptionalBeginPipe=4]="ExpectOptionalBeginPipe",e[e.ExpectPipeIdentifier=5]="ExpectPipeIdentifier",e[e.ExpectOptionalBeginPipeParameter=6]="ExpectOptionalBeginPipeParameter",e[e.ExpectPipeParameter=7]="ExpectPipeParameter",e[e.ExpectPlaceholderEnd=8]="ExpectPlaceholderEnd",e}({}),a=function(e){return e.Raw="Raw",e.BeginPlaceHolder="BeginPlaceHolder",e.Field="Field",e.BeginDefault="BeginDefault",e.LiteralString="LiteralString",e.BeginPipe="BeginPipe",e.PipeIdentifier="PipeIdentifier",e.BeginPipeParameter="BeginPipeParameter",e.EndPlaceHolder="EndPlaceHolder",e.JsonValue="JsonValue",e}({}),o=function(e){return e[e.Array=0]="Array",e[e.Object=1]="Object",e[e.String=2]="String",e[e.Others=3]="Others",e}({});function c(e){return new RegExp(`(${[].concat(e).map((e=>(0,n.escapeRegExp)(e))).join("|")})\\{`)}function l(e){var t;const r=x(e),n=null===(t=r.match(e.beginPlaceholder))||void 0===t?void 0:t[0],s=n?r.indexOf(n):-1;if(s>=0&&n&&"{"!==r.charAt(s+n.length)){const t=e.cursor+s;s>0&&e.tokens.push({type:a.Raw,value:r.substring(0,s)}),e.tokens.push({type:a.BeginPlaceHolder,loc:{start:t,end:t+n.length},value:n.substring(0,n.length-1)}),e.cursor+=s+n.length,e.status=i.ExpectField}else e.tokens.push({type:a.Raw,value:r}),e.cursor=e.raw.length}function u(e){e.cursor+=x(e).match(/^[ \r\n\t]*/)[0].length}function h(e){const[t]=x(e).match(/^[\w.*[\]\-\u{80}-\u{10FFFF}]*/u);e.tokens.push({type:a.Field,value:t}),e.cursor+=t.length,e.status=i.ExpectOptionalBeginDefault}function p(e){"="===x(e).charAt(0)?(e.tokens.push({type:a.BeginDefault}),e.cursor+=1,e.status=i.ExpectDefaultValue):e.status=i.ExpectOptionalBeginPipe}function d(e){w(e,i.ExpectOptionalBeginPipe)}function f(e){"|"===x(e).charAt(0)?(e.tokens.push({type:a.BeginPipe}),e.cursor+=1,e.status=i.ExpectPipeIdentifier):e.status=i.ExpectPlaceholderEnd}function m(e){const t=x(e).match(/^[a-zA-Z]\w*/);if(!t)throw new Error(`Expected a pipe identifier at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);const r=t[0];e.tokens.push({type:a.PipeIdentifier,value:r}),e.cursor+=r.length,e.status=i.ExpectOptionalBeginPipeParameter}function y(e){":"===x(e).charAt(0)?(e.tokens.push({type:a.BeginPipeParameter}),e.cursor+=1,e.status=i.ExpectPipeParameter):e.status=i.ExpectOptionalBeginPipe}function g(e){w(e,i.ExpectOptionalBeginPipeParameter)}function v(e){if("}"!==x(e).charAt(0))throw new Error(`Expected a placeholder end '}' at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);e.tokens.push({type:a.EndPlaceHolder,loc:{start:e.cursor,end:e.cursor+1}}),e.cursor+=1,e.status=i.Initial}const b=new Map([["false",!1],["null",null],["true",!0]]);function w(e,t){const r=x(e);if(/[0-9[{"]/.test(r.charAt(0))||/-[0-9]/.test(r.substring(0,2)))!function(e,t){const r=x(e),n=r.charAt(0),s="["===n?o.Array:"{"===n?o.Object:'"'===n?o.String:o.Others;let i=0,c=0,l=0,u=!1,h=!1,p=!1;for(;i<r.length;){const e=r.charAt(i);if(h)h=!1;else if(u)'"'===e?u=!1:"\\"===e&&(h=!0);else switch(e){case"[":l+=1;break;case"{":c+=1;break;case"]":l-=1;break;case"}":c-=1;break;case'"':u=!0}switch(i+=1,s){case o.Array:p=!l;break;case o.Object:p=!c;break;case o.String:p=!u;break;default:p=i<r.length&&/[^a-z0-9E.+-]/.test(r.charAt(i))}if(p)break}if(!p)throw new Error(`Failed to match a JSON value at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);e.tokens.push({type:a.JsonValue,value:JSON.parse(r.substring(0,i))}),e.cursor+=i,e.status=t}(e,t);else{const[r]=x(e).match(/^[\w\-\u{80}-\u{10FFFF}]*/u);b.has(r)?e.tokens.push({type:a.JsonValue,value:b.get(r)}):e.tokens.push({type:a.LiteralString,value:r}),e.cursor+=r.length,e.status=t}}function x(e){return e.raw.substring(e.cursor)}function S(e,t){return E(e,"@",t)}function P(e,t){return E(e,"$",t)}function A(e,t){return E(e,["@","$"],t)}function E(e,t,r){if(!function(e,t){return c(t).test(e)}(e,t))return e;const o=(b=r.data,function(e){let t=e.field?(0,n.get)(b,e.field):b;return void 0===t&&(t=e.defaultValue),(0,s.processPipes)(t,e.pipes)});var b;const w=function(e,t){return function(r){var i,a;const o=r.field.match(/^(?:(QUERY(?:_ARRAY)?|EVENT|query|event|APP|HASH|ANCHOR|SYS|FLAGS|CTX)\.)?(.+)$/);if(!o)return t.substring(r.loc.start,r.loc.end);let c,[,l,u]=o;!l&&/^[A-Z_]+$/.test(u)&&(l=u,u="*");const h={SYS:"sys",FLAGS:"flags"};switch(l){case"QUERY":case"query":c="*"===u?e.query:e.query.has(u)?e.query.get(u):void 0;break;case"QUERY_ARRAY":c=e.query.has(u)?e.query.getAll(u):void 0;break;case"EVENT":case"event":if(void 0===e.event)return t.substring(r.loc.start,r.loc.end);c="*"===u?e.event:(0,n.get)(e.event,u);break;case"APP":c="*"===u?null!==(i=e.overrideApp)&&void 0!==i?i:e.app:(0,n.get)(null!==(a=e.overrideApp)&&void 0!==a?a:e.app,u);break;case"HASH":c=e.location.hash;break;case"SYS":case"FLAGS":c="*"===u?e[h[l]]:(0,n.get)(e[h[l]],u);break;case"ANCHOR":{const t=e.location.hash?e.location.hash.substr(1):null;c="*"===u?t:(0,n.get)(t,u);break}case"CTX":{const e=t.substring(r.loc.start,r.loc.end);return console.error(`CTX is not supported in placeholder any more: "${e}"`),e}default:if(!e.match)return t.substring(r.loc.start,r.loc.end);c=e.match.params[u]}return void 0===c&&(c=r.defaultValue),(0,s.processPipes)(c,r.pipes)}}(r,e);return x=function(e,t){return function(e){const t={type:"InjectableString",elements:[]};let r;function n(t){return t===e[0].type&&(r=e.shift(),!0)}function s(t){if(r=e.shift(),Array.isArray(t)?!t.includes(r.type):t!==r.type)throw new Error(`Expected token: ${t}, received token: ${r.type}`)}for(;e.length>0;)if(n(a.Raw))t.elements.push({type:"RawString",value:r.value});else{s(a.BeginPlaceHolder);const e=r.loc.start,i=r.value;s(a.Field);const o={type:"Placeholder",symbol:i,field:r.value,defaultValue:void 0,pipes:[],loc:{start:e,end:e}};for(t.elements.push(o),n(a.BeginDefault)&&(s([a.JsonValue,a.LiteralString]),o.defaultValue=r.value);n(a.BeginPipe);){s(a.PipeIdentifier);const e={type:"PipeCall",identifier:r.value,parameters:[]};for(o.pipes.push(e);n(a.BeginPipeParameter);)s([a.JsonValue,a.LiteralString]),e.parameters.push(r.value)}s(a.EndPlaceHolder),o.loc.end=r.loc.end}return t}(function(e,t){const r={beginPlaceholder:c(t),raw:e,cursor:0,status:i.Initial,tokens:[]};for(;r.cursor<e.length;)switch(r.status){case i.Initial:l(r);break;case i.ExpectField:u(r),h(r);break;case i.ExpectOptionalBeginDefault:u(r),p(r);break;case i.ExpectDefaultValue:u(r),d(r);break;case i.ExpectOptionalBeginPipe:u(r),f(r);break;case i.ExpectPipeIdentifier:u(r),m(r);break;case i.ExpectOptionalBeginPipeParameter:u(r),y(r);break;case i.ExpectPipeParameter:u(r),g(r);break;case i.ExpectPlaceholderEnd:u(r),v(r)}if(r.status!==i.Initial)throw new Error("Expected a placeholder end '}' at the end");return r.tokens}(e,t))}(e,t).elements.map((e=>"RawString"===e.type?e.value:"$"===e.symbol?w(e):o(e))),1===x.length?x[0]:x.join("");var x}},5840:(e,t,r)=>{"use strict";r.d(t,{X:()=>o});var n=r(4396),s=r(52);if(792==r.j)var i=r(6268);var a=function(e,t){var r=this;this.broadcastChannel=e,this._options=t,this.isLeader=!1,this._hasLeader=!1,this.isDead=!1,this.token=(0,n.zs)(),this._aplQ=n.o,this._aplQC=0,this._unl=[],this._lstns=[],this._dpL=function(){},this._dpLC=!1;var s=function(e){"leader"===e.context&&("death"===e.action&&(r._hasLeader=!1),"tell"===e.action&&(r._hasLeader=!0))};this.broadcastChannel.addEventListener("internal",s),this._lstns.push(s)};function o(e,t){if(e._leaderElector)throw new Error("BroadcastChannel already has a leader-elector");t=function(e,t){return e||(e={}),(e=JSON.parse(JSON.stringify(e))).fallbackInterval||(e.fallbackInterval=3e3),e.responseTime||(e.responseTime=t.method.averageResponseTime(t.options)),e}(t,e);var r=(0,n.UU)()?new i._(e,t):new a(e,t);return e._befC.push((function(){return r.die()})),e._leaderElector=r,r}a.prototype={hasLeader:function(){return Promise.resolve(this._hasLeader)},applyOnce:function(e){var t=this;return this.isLeader?(0,n.yy)(0,!0):this.isDead?(0,n.yy)(0,!1):this._aplQC>1?this._aplQ:(this._aplQC=this._aplQC+1,this._aplQ=this._aplQ.then((function(){return function(){if(t.isLeader)return n.aS;var r,i=!1,a=new Promise((function(e){r=function(){i=!0,e()}})),o=function(e){"leader"===e.context&&e.token!=t.token&&("apply"===e.action&&e.token>t.token&&r(),"tell"===e.action&&(r(),t._hasLeader=!0))};t.broadcastChannel.addEventListener("internal",o);var c=e?4*t._options.responseTime:t._options.responseTime;return(0,s.r)(t,"apply").then((function(){return Promise.race([(0,n.yy)(c),a.then((function(){return Promise.reject(new Error)}))])})).then((function(){return(0,s.r)(t,"apply")})).then((function(){return Promise.race([(0,n.yy)(c),a.then((function(){return Promise.reject(new Error)}))])})).catch((function(){})).then((function(){return t.broadcastChannel.removeEventListener("internal",o),!i&&(0,s.P)(t).then((function(){return!0}))}))}()})).then((function(){t._aplQC=t._aplQC-1})),this._aplQ.then((function(){return t.isLeader})))},awaitLeadership:function(){return this._aLP||(this._aLP=(e=this).isLeader?n.o:new Promise((function(t){var r=!1;function s(){r||(r=!0,e.broadcastChannel.removeEventListener("internal",i),t(!0))}e.applyOnce().then((function(){e.isLeader&&s()})),function t(){return(0,n.yy)(e._options.fallbackInterval).then((function(){if(!e.isDead&&!r)return e.isLeader?void s():e.applyOnce(!0).then((function(){e.isLeader?s():t()}))}))}();var i=function(t){"leader"===t.context&&"death"===t.action&&(e._hasLeader=!1,e.applyOnce().then((function(){e.isLeader&&s()})))};e.broadcastChannel.addEventListener("internal",i),e._lstns.push(i)}))),this._aLP;var e},set onduplicate(e){this._dpL=e},die:function(){var e=this;return this._lstns.forEach((function(t){return e.broadcastChannel.removeEventListener("internal",t)})),this._lstns=[],this._unl.forEach((function(e){return e.remove()})),this._unl=[],this.isLeader&&(this._hasLeader=!1,this.isLeader=!1),this.isDead=!0,(0,s.r)(this,"death")}}},5853:(e,t,r)=>{"use strict";var n=r(5417);e.exports=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},5861:function(e,t,r){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(9420))},5986:(e,t,r)=>{"use strict";var n;try{n=r(Object(function(){var e=new Error("Cannot find module 'esprima'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){"undefined"!=typeof window&&(n=window.esprima)}var s=r(5417);e.exports=new s("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",r=n.parse(t,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&("ArrowFunctionExpression"===r.body[0].expression.type||"FunctionExpression"===r.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,r="("+e+")",s=n.parse(r,{range:!0}),i=[];if("Program"!==s.type||1!==s.body.length||"ExpressionStatement"!==s.body[0].type||"ArrowFunctionExpression"!==s.body[0].expression.type&&"FunctionExpression"!==s.body[0].expression.type)throw new Error("Failed to resolve function");return s.body[0].expression.params.forEach((function(e){i.push(e.name)})),t=s.body[0].expression.body.range,"BlockStatement"===s.body[0].expression.body.type?new Function(i,r.slice(t[0]+1,t[1]-1)):new Function(i,"return "+r.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},6076:(e,t,r)=>{"use strict";var n=r(3780),s=r(5417),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new s("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r,n,s;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,s=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){s.unshift(parseFloat(e,10))})),t=0,n=1,s.forEach((function(e){t+=e*n,n*=60})),r*t):r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return r=e.toString(10),a.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"})},6121:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(2559);function s(e,t,r){return e.set((0,n.A)(e,t),r),r}},6124:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Dialog:()=>er,Notification:()=>cr,StoryboardFunctionRegistryFactory:()=>ye,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>Mi,batchSetAppsLocalTheme:()=>re,checkIfByTransform:()=>Tt,checkIfOfComputed:()=>Et,createHistory:()=>P,createRuntime:()=>Pi,customEditors:()=>ji,customProcessors:()=>N,customTemplates:()=>Me,fetchByProvider:()=>Ui,getAuth:()=>Di,getBasePath:()=>d,getCssPropertyValue:()=>ce,getCurrentMode:()=>ae,getCurrentTheme:()=>ee,getHistory:()=>A,getPageInfo:()=>ms,getRealValue:()=>$i,getRuntime:()=>Ai,getThemeVariant:()=>he,getV2RuntimeFromDll:()=>S,handleHttpError:()=>or,httpErrorToString:()=>rr,instantiateModalStack:()=>Wi,isLoggedIn:()=>Bi,isNetworkError:()=>bs,isUnauthenticatedError:()=>nr,logout:()=>Ri,matchPath:()=>Ut,registerWidgetFunctions:()=>je,registerWidgetI18n:()=>B,resetReloadForError:()=>Ps,setUIVersion:()=>gs,shouldReloadForError:()=>Ss,unstable_createRoot:()=>Yi});var n={};r.r(n),r.d(n,{addRealTimeDataInspectHook:()=>Dn,debugDataValue:()=>In,getAddedContracts:()=>Cn,getAllContextValues:()=>An,getBrickPackagesById:()=>En,getContextValue:()=>Pn,getLegalRuntimeValue:()=>On,getRenderId:()=>_n,legacyDoTransform:()=>on,legacyTransformIntermediateData:()=>ln,legacyTransformProperties:()=>cn,loadBricks:()=>Tn,loadEditors:()=>kn,mountUseBrick:()=>dn,renderUseBrick:()=>pn,setRealTimeDataInspectRoot:()=>Mn,symbolForRootRuntimeContext:()=>hn,unmountUseBrick:()=>fn,updateSnippetPreviewSettings:()=>xn,updateStoryboard:()=>mn,updateStoryboardByRoute:()=>yn,updateStoryboardBySnippet:()=>wn,updateStoryboardByTemplate:()=>gn,updateTemplatePreviewSettings:()=>vn});var s=r(4586),i=r(918),a=r(6121),o=r(829),c=r(7631),l=r(4231),u=r(4113),h=r(1916),p=(r(1858),r(1732));function d(){const e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var f=r(1030);function m(e,t){const r=(0,f.orderBy)(e,(e=>{var t,r;return null!==(t=null===(r=e.app.homepage)||void 0===r?void 0:r.length)&&void 0!==t?t:0}),"desc");for(const e of r){const r=e.app.homepage;if("string"==typeof r&&"/"===r[0]&&y(r,t))return e}}function y(e,t){return"/"===e?t===e:`${t.replace(/\/+$/,"")}/`.startsWith(`${e.replace(/\/+$/,"")}/`)}function g(e){var t;return!e||(null===(t=Ai().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}let v,b=!1;function w(e,t){b=!confirm(e),t(!b)}function x(e){const{push:t,replace:r}=e;function n(n){return function(s,i,a){let o;const c="string"==typeof s;return o=c?(0,p.parsePath)(s).pathname:s.pathname,"string"==typeof o&&o.startsWith("/")&&g(function(e){var t,r;return m(null!==(t=null===(r=bi)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(o))?location["push"===n?"assign":"replace"](c?d()+s.substring(1):e.createHref(s)):("push"===n?t:r)(s,i,a)}}return{push:n("push"),replace:n("replace")}}function S(){var e;const{dll:t}=window;if(t&&null!==(e=window.BRICK_NEXT_VERSIONS)&&void 0!==e&&null!==(e=e["brick-container"])&&void 0!==e&&e.startsWith("2."))return t("tYg3")}function P(){if(!v){const e=(0,p.createBrowserHistory)({basename:d().replace(/\/$/,""),getUserConfirmation:w});Object.assign(e,function(e){const{push:t,replace:r}=e;function n(e,r,n){b=!1,t(e,r),null==n||n(b)}function s(e,t,n){b=!1,r(e,t),null==n||n(b)}function i(t){return function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;const{extraQuery:o,clear:c,keepHash:l,...u}=i,h=new URLSearchParams(c?"":e.location.search),p={};Object.assign(p,r,o);for(const[e,t]of Object.entries(p))if(Array.isArray(t)){h.delete(e);for(const r of t)h.append(e,r)}else null==t||""===t?h.delete(e):h.set(e,t);("push"===t?n:s)(`?${h.toString()}${l?e.location.hash:""}`,u,a)}}let a;return{pushQuery:i("push"),replaceQuery:i("replace"),pushAnchor:function(t,r,s){n({...e.location,key:void 0,hash:t,state:{notify:!1,...r}},void 0,s)},reload:function(t){s({...e.location,state:{...e.location.state,notify:!0,noIncremental:!0}},void 0,t)},setBlockMessage:function(e){a=e},getBlockMessage:function(){return a},unblock:function(){a=void 0},...x({...e,push:n,replace:s})}}(e)),v=e}return v}const A=function(){const e=S();if(e)return e.getHistory}()||function(){return v};var E=r(4635),T=r(2559),k=r(7551),_=r(8303),C=r(5069),I=r(3575),O=r(8319),L=new WeakMap;const N=function(){const e=S();if(e)return Object.freeze({define:(t,r)=>e.getRuntime().registerCustomProcessor(t,r)})}()||new class{constructor(){(0,i.A)(this,L,new Map)}define(e,t){const[r,n]=e.split(".");let s=(0,o.A)(L,this).get(r);if(s||(s=new Map,(0,o.A)(L,this).set(r,s)),s.has(n))throw new Error(`Custom processor of "${e}" already registered`);s.set(n,t)}get(e){return(0,o.A)(L,this).get(e)}};function M(e){let{app:t,meta:r}=e;if(null!=r&&r.i18n){const e=D("app",t.id),n=[];return Object.entries(r.i18n).forEach((t=>{let[r,s]=t;c.i18n.addResourceBundle(r,e,s),n.push(r)})),()=>{for(const t of n)c.i18n.removeResourceBundle(t,e)}}}function D(e,t){return`${e}/${t}`}function R(e){return c.i18n.getFixedT(null,D("widget",e))}const B=function(){const e=S();if(e)return function(t,r){return e.getRuntime().registerWidgetI18n(t,r)}}()||function(e,t){const r=D("widget",e);Object.entries(t).forEach((e=>{let[t,n]=e;c.i18n.addResourceBundle(t,r,n)}))},F="brick-next-devtools-panel",j="devtools-frame-active-change",U="devtools-panel-change";let Y,$=!0;function H(e,t){const r=W();if(!r||"evaluation"===e&&(!$||Y&&"Evaluations"!==Y))return;const n=()=>{var n;null===(n=r.emit)||void 0===n||n.call(r,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(n):setTimeout(n,0)}function W(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}const V=()=>{throw new Error("Can't modify read-only proxy object")},z={set:V,defineProperty:V,deleteProperty:V,setPrototypeOf:V};function q(e){return new Proxy(e,z)}function K(e){let{get:t,ownKeys:r}=e;return W()?q(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}let G="light";const J=new u.JsonStorage(localStorage),X="apps-theme";function Z(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error(`Unsupported theme: ${e}`);G=e}function Q(){return G}function ee(){return document.documentElement.dataset.theme}function te(e){e?Z(e):e=Q(),e!==ee()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function re(e){J.setItem(X,{...ne(),...e})}function ne(){let e;try{e=J.getItem(X)}catch{console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!=e?e:{}}let se="default";function ie(e){if("dashboard"!==e&&"default"!==e)throw new Error(`Unsupported mode: ${e}`);se=e}function ae(){return document.documentElement.dataset.mode}function oe(e){e?ie(e):e=se,e!==ae()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function ce(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}let le="default";function ue(e){if("default"!==e&&"elevo"!==e)return ue("default");le!==e&&(document.documentElement.dataset.variant=le=e,window.dispatchEvent(new CustomEvent("variant.change",{detail:e})))}function he(){return le}function pe(e,t){const r={};for(const n of e){const e=de(n,t);void 0!==e&&(r[n]=e)}return r}function de(e,t){var r,n,s;let{collectCoverage:i,widgetId:a,widgetVersion:o,app:l,appendI18nNamespace:u,storyboardFunctions:h,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return i?"/next":d().replace(/\/$/,"");case"FN":return h;case"IMG":return i?{get:e=>`mock/images/${e}`}:a?null==Si||null===(r=Si.images)||void 0===r?void 0:r.widgetImagesFactory(a,o):null==Si||null===(n=Si.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return i?f.identity:a?R(a):c.i18n.getFixedT(null,[u,D("app",l.id)].filter(Boolean));case"I18N_TEXT":return i?fe:c.i18nText;case"PERMISSIONS":return q({check:i?me:null==Si||null===(s=Si.checkPermissions)||void 0===s?void 0:s.checkPermissions});case"THEME":return q({getTheme:i?()=>"light":Q,getCssPropertyValue:i?()=>"":ce});case"console":return p?q(console):void 0;case"location":return i?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function fe(e){return null==e?void 0:e.en}function me(){return!0}function ye(){let{widgetId:e,widgetVersion:t,collectCoverage:r,debuggerOverrides:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=new Map,i=null==n?void 0:n({precookFunction:_.precookFunction,cook:_.cook,supply:O.supply}),a=new Proxy(Object.freeze({}),{get:(e,t)=>function(e){const t=s.get(e);if(!t)return;if(t.processed)return t.cooked;let a;r&&(a=r.createCollector(e));const o=!i&&!a&&t.transformed;if(o){const e=c(o.globals);t.cooked=new Function(...o.globals,`"use strict";return (${o.source})`)(...o.globals.map((t=>(0,u.hasOwnProperty)(e,t)?e[t]:void 0)))}else{const e=(0,_.precookFunction)(t.source,{typescript:t.typescript,hooks:a&&{beforeVisit:a.beforeVisit},cacheKey:t}),r=c(e.attemptToVisitGlobals);t.cooked=(0,_.cook)(e.function,t.source,{rules:{noVar:!0},globalVariables:i?{...r,...null!=i&&i.LodashWithStaticFields&&e.attemptToVisitGlobals.has("_")?{_:{...r._,...i.LodashWithStaticFields}}:null,...null!=i&&i.ArrayConstructor&&e.attemptToVisitGlobals.has("Array")?{Array:i.ArrayConstructor}:null,...null!=i&&i.ObjectWithStaticFields&&e.attemptToVisitGlobals.has("Object")?{Object:{...r.Object,...i.ObjectWithStaticFields}}:null}:r,ArrayConstructor:null==i?void 0:i.ArrayConstructor,hooks:a&&{beforeEvaluate:a.beforeEvaluate,beforeCall:a.beforeCall,beforeBranch:a.beforeBranch},debug:!!n})}return t.processed=!0,t.cooked}(t)});let o;function c(n){return(0,O.supply)(n,pe(n,{collectCoverage:r,widgetId:e,widgetVersion:t,app:o,storyboardFunctions:a,isStoryboardFunction:!0}),!!r)}return{storyboardFunctions:a,registerStoryboardFunctions:function(e,t){if(t&&(o=t),s.clear(),Array.isArray(e))for(const t of e){var n;let e=t.deps;null==e&&(e=(0,C.collectMemberUsageInFunction)(t,"FN",!!r),e.delete(t.name));const i=null!==(n=t.perm)&&void 0!==n?n:(0,C.collectMemberUsageInFunction)(t,"PERMISSIONS",!!r).has("check");s.set(t.name,{source:t.source,typescript:t.typescript,transformed:t.transformed,deps:e,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){const r={...t,name:e},n=(0,C.collectMemberUsageInFunction)(r,"FN",!0),i=(0,C.collectMemberUsageInFunction)(r,"PERMISSIONS",!0).has("check");s.set(e,{source:t.source,typescript:t.typescript,transformed:t.transformed,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){const t=new Set,r=e=>{if(!t.has(e)){t.add(e);const n=s.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)},clearGlobalExecutionContextStack(){(0,_.__dev_only_clearGlobalExecutionContextStack)()},getGlobalExecutionContextStack:()=>(0,_.__dev_only_getGlobalExecutionContextStack)()}}const{storyboardFunctions:ge,registerStoryboardFunctions:ve,checkPermissionsUsage:be}=ye();var we={};try{we.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var r=e.create,n=e.defineProperty,s=i.prototype;function i(){t.set(this,r(null))}function a(e,t,r){n(e,t,{configurable:!0,writable:!0,value:r})}function o(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}a(s,"addEventListener",(function(e,r,n){for(var s=t.get(this),i=s[e]||(s[e]=[]),a=0,o=i.length;a<o;a++)if(i[a].listener===r)return;i.push({target:this,listener:r,options:n})})),a(s,"dispatchEvent",(function(e){var r=t.get(this)[e.type];return r&&(a(e,"target",this),a(e,"currentTarget",this),r.slice(0).some(o,e),delete e.currentTarget,delete e.target),!0})),a(s,"removeEventListener",(function(e,r){for(var n=t.get(this),s=n[e]||(n[e]=[]),i=0,a=s.length;i<a;i++)if(s[i].listener===r)return void s.splice(i,1)})),we.EventTarget=i}(Object,new WeakMap)}const xe=we.EventTarget;let Se=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({});const Pe=new Map([[Se.xLarge,"1920px"],[Se.large,"1600px"],[Se.medium,"1280px"],[Se.small,"1024px"],[Se.xSmall,0]]),Ae=new xe,Ee={},Te={};function ke(e,t){let r=!1;Ee[t]=e.matches;for(const[e]of Pe)if(Ee[e]&&Te.breakpoint!==e){Te.breakpoint=e,r=!0;break}r&&Ae.dispatchEvent(new CustomEvent("change",{detail:Te}))}Pe.forEach(((e,t)=>{const r=window.matchMedia(`(min-width: ${e})`);ke(r,t),r.addEventListener?r.addEventListener("change",(e=>{ke(e,t)})):r.addListener((e=>{ke(e,t)}))}));const _e=()=>Te;function Ce(e){return function(t){var r;const n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Ie(e){var t,r;return!(null===(t=e?e.flags:null===(r=Ai())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Oe(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];const i=0===n.length?"":",";e?console.error(`${t} is dropped in v3 strict mode${i}`,...n):console.warn(`${t} is deprecated in v3 and will be dropped in strict mode${i}`,...n)}const Le=new Set(["prefix"]);var Ne=new WeakMap;const Me=function(){const e=S();if(e)return Object.freeze({define:(t,r)=>e.getRuntime().registerCustomTemplate(t,r)})}()||new class{constructor(){(0,i.A)(this,Ne,new Map)}define(e,t){var r,n,s,i;let a=(0,o.A)(Ne,this).has(e);a?console.warn(`Custom template of "${e}" already registered.`):(a=!!customElements.get(e),a&&console.warn(`Custom template of "${e}" already defined by customElements.`));const c=Ie(),l=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},u=[],h=[];for(const[t,r]of Object.entries(l))r.asVariable?(Oe(c,"Template `asVariable`",e,t),c||h.push(t)):r.mergeProperty||r.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,t):r.ref&&u.push([t,r]);const p={...t,proxy:{...t.proxy,properties:Object.fromEntries(u)},state:(t.state?c?t.state:t.state.map((e=>({expose:!0,...e}))):[]).concat(h.map((e=>({name:e,expose:!0}))))};(0,o.A)(Ne,this).set(e,{...p,name:e});const d=(m=p.state,(0,f.uniq)(null!==(y=null==m?void 0:m.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[]));var m,y;const g=Object.entries(null!==(s=null===(i=p.proxy)||void 0===i?void 0:i.methods)&&void 0!==s?s:{}),v=d.concat(u.map((e=>e[0]))),b=g.map((e=>e[0])),w=v.concat(b).filter((e=>e in HTMLElement.prototype&&!Le.has(e)));if(w.length>0&&(Oe(c,"Using native HTMLElement properties as template properties or methods",e,...w),c))throw new Error(`In custom template "${e}", ${w.map((e=>`"${e}"`)).join(", ")} are native HTMLElement properties, and should be avoid to be used as brick properties or methods.`);if(!a){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return v}static get _dev_only_definedMethods(){return b}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){let e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));const t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";const n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}for(const r of d)u.some((e=>e[0]===r))?console.error(`Cannot define an exposed state that is also a proxy property: "${r}" in ${e}`):Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0});for(const[e,r]of u)Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n;const s=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);var i;s&&(s[null!==(i=r.refProperty)&&void 0!==i?i:e]=t)},enumerable:!0});for(const[e,r]of g)Object.defineProperty(t.prototype,e,{value(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0});customElements.define(e,t)}}get(e){return(0,o.A)(Ne,this).get(e)}};function De(e,t,r){let{tplStateStoreId:n,tplStateStoreMap:s}=e;if(!n)throw new Error(`Using "${t}" outside of a custom template${null!=r?r:""}`);const i=s.get(n);if(!i)throw new Error(`Template state store is not found when using "${t}"${null!=r?r:""}.\nThis is a bug of Brick Next, please report it.`);return i}function Re(e,t,r){const n=De(e,t,r).hostBrick.element;if(!n)throw new Error(`Template host element is gone when using "${t}"${null!=r?r:""}.\nThis is a bug of Brick Next, please report it.`);return n}const Be=new Map,Fe=new Proxy(Object.freeze({}),{get:(e,t)=>Be.get(t)}),je=function(){const e=S();if(e)return function(t,r,n){return e.getRuntime().registerWidgetFunctions(t,r,n)}}()||function(e,t,r){if(Be.has(e))throw new Error(`Widget functions of "${e}" already registered`);const{storyboardFunctions:n,registerStoryboardFunctions:s}=ye({widgetId:e,widgetVersion:r});Be.set(e,n),s(t)},Ue=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ye=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Ue);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},$e=e=>"*"===e||"x"===e||"X"===e,He=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},We=(e,t)=>{if($e(e)||$e(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(He(e),He(t));return r>n?1:r<n?-1:0},Ve=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=We(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},ze=(e,t,r)=>{Ge(r);const n=((e,t)=>{const r=Ye(e),n=Ye(t),s=r.pop(),i=n.pop(),a=Ve(r,n);return 0!==a?a:s&&i?Ve(s.split("."),i.split(".")):s||i?s?-1:1:0})(e,t);return qe[r].includes(n)},qe={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ke=Object.keys(qe),Ge=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===Ke.indexOf(e))throw new Error(`Invalid operator, expected one of ${Ke.join("|")}`)};function Je(e,t){let r=Ni(e);if(!r&&null!=Si&&Si.checkInstalledApps&&(r=Si.checkInstalledApps.getCheckedApp(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;const n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError(`Invalid match version: ${t}`);return ze(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function Xe(e,t,r){let{formStateStoreId:n,formStateStoreMap:s}=e;if(!n)throw new Error(`Using "${t}" outside of form renderer${null!=r?r:""}`);const i=s.get(n);if(!i)throw new Error(`Form state store is not found when using "${t}"${null!=r?r:""}.\nThis is a bug of Brick Next, please report it.`);return i}const Ze=new Map;async function Qe(e){var t;const r=null==Si||null===(t=Si.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=Si.flowApi.FLOW_API_PROVIDER);let n=Ze.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)Si.flowApi.registerFlowApiProvider();else if(await(0,l.loadBricksImperatively)([e],_i()),!customElements.get(e))throw new Error(`Provider not defined: "${e}".`);return n=document.createElement(e),Ze.set(e,n),n}let et=new WeakSet;function tt(e){if((0,u.isObject)(e)&&!rt(e))if(et.add(e),Array.isArray(e))e.forEach(tt);else{const t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(tt)}}function rt(e){return et.has(e)}const nt=new Map;async function st(e,t,r){var n;const{useProvider:s,method:i="resolve",args:a,params:o,options:c,filename:l,onReject:u}=e,{provider:h,field:p}=e;if(h&&!s)throw new Error(`You're using "provider: ${h}" which is dropped in v3, please use "useProvider" instead`);const d=null!=p;if(d){const e=Ie();if(Oe(e,"`resolve.field`"),e)throw new Error("Using deprecated `resolve.field`")}const m=!Array.isArray(a)&&o&&null!=Si&&null!==(n=Si.flowApi)&&void 0!==n&&n.isFlowApiProvider(s)?{params:o,options:c,filename:l}:null,[y,g,v]=await Promise.all([Qe(s),bt(a,t),bt(m,t)]),b=null==r?void 0:r.renderId,w=!!b&&b!==Ii(),x=it(y,s,i,null!=v&&v.params?v:null!=g?g:[],r,a,w);let S,{transform:P}=e;try{const e=await x;S=d?(0,f.get)(e,p):e,tt(S)}catch(e){if(!function(e){return!(null==e||!e.transform)}(u))throw e;P=u.transform,S=e}return P?"string"==typeof P?{[P]:S}:bt(P,{...t,data:S}):S}async function it(e,t,r,n,s,i,a){let o,c;try{o=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;o=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==s?void 0:s.cache)&&(c=nt.get(o)),c||(c=(async s=>{const i=null!=Si&&null!==(s=Si.flowApi)&&void 0!==s&&s.isFlowApiProvider(t)?await Si.flowApi.getArgsOfFlowApi(t,n,r):n;return e[r](...i)})(),a||nt.set(o,c)),c}const at=Symbol.for("pre.evaluated.raw"),ot=Symbol.for("pre.evaluated.context");function ct(e){return!(null==e||!e[at])}function lt(e){return e[at]}function ut(e){return"string"==typeof e?(0,_.shouldAllowRecursiveEvaluations)(e):(0,_.shouldAllowRecursiveEvaluations)(e[at])}const ht=new WeakSet([SyntaxError,TypeError,ReferenceError]);function pt(e){return ht.has(e.constructor)?e.constructor:TypeError}function dt(e,t,r){const{run:n}=ft(e,t,r,!1);return n()}function ft(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;const s=[];if("string"!=typeof e){const r=(0,f.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t={...e[ot],...r},e=e[at]}const i={usedArgs:new Set},a={usedArgs:new Set};let o;try{o=(0,_.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,C.collectAppGetMenuUsage)(i,e,t),(0,C.collectInstalledAppsHasUsage)(a,e,t)}}})}catch(t){const r=`${t.message}, in "${e}"`;throw new(pt(t))(r)}if(i.hasNonStaticUsage)throw new Error(`Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "${e}"`);if(a.hasNonStaticUsage)throw new Error(`Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "${e}"`);const c={},{attemptToVisitGlobals:h}=o;if(r.lazy||h.has("EVENT")&&!(0,u.hasOwnProperty)(t,"event")||h.has("DATA")&&!(0,u.hasOwnProperty)(t,"data"))return{blockingList:s,run:()=>Object.keys(t).length>0?{[at]:e,[ot]:t}:e};let p,d,m,y;const g=Ie(t);let v,b;(h.has("STATE")||!g&&h.has("TPL"))&&(y=De(t,"STATE",`: "${e}"`)),h.has("FORM_STATE")&&(b=Xe(t,"FORM_STATE",`: "${e}"`));const w=W();if(n||w){if(h.has("CTX")&&(p=(0,C.strictCollectMemberUsage)(e,"CTX"),n&&s.push(t.ctxStore.waitFor(p))),y){if(m=(0,C.strictCollectMemberUsage)(e,"STATE"),!g){const t=(0,C.strictCollectMemberUsage)(e,"TPL");for(const e of t)m.add(e)}n&&s.push(y.waitFor(m))}b&&(v=(0,C.strictCollectMemberUsage)(e,"FORM_STATE"),n&&s.push(b.waitFor(v))),h.has("PROCESSORS")&&(d=(0,C.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&s.push((0,l.loadProcessorsImperatively)(d,_i())))}if(n){let r=h.has("PERMISSIONS");if(!r&&h.has("FN")){const t=[...(0,C.strictCollectMemberUsage)(e,"FN")];r=be(t)}if(r&&s.push(...t.pendingPermissionsPreCheck),i.usedArgs.size>0&&null!=Si&&Si.menu){const e=[...i.usedArgs];s.push(Promise.all(e.map((e=>Si.menu.fetchMenuById(e,t,{getStoryboardByAppId:Li,resolveData:st,asyncComputeRealValue:bt})))))}var x;a.usedArgs.size>0&&s.push(null==Si||null===(x=Si.checkInstalledApps)||void 0===x?void 0:x.waitForCheckingApps([...a.usedArgs]))}return{blockingList:s,run(){var r,n,s,i;const{ctxStore:a,data:l,event:w,unsafe_penetrate:x}=t,S=x?Oi():t,{app:P,location:A,query:E,match:T,flags:k,sys:C}=S,I=null!==(r=S.overrideApp)&&void 0!==r?r:P;for(const r of h)switch(r){case"ANCHOR":c[r]=A.hash?A.hash.substring(1):null;break;case"APP":if(null==I)throw new ReferenceError(`APP is not defined, in "${e}"`);c[r]={...(0,f.cloneDeep)(I),getMenu:null==Si||null===(n=Si.menu)||void 0===n?void 0:n.getMenuById};break;case"CTX":c[r]=K({get(e,t){if("DS"===t&&!a.has(t)){var r;const e=null===(r=Oi())||void 0===r?void 0:r.ctxStore;if(null!=e&&e.has(t))return e.getValue(t)}return a.getValue(t)},ownKeys:()=>p?Array.from(p):[]});break;case"DATA":c[r]=l;break;case"EVENT":c[r]=w;break;case"FLAGS":c[r]=q(k);break;case"FORM_STATE":c[r]=K({get:(e,t)=>b.getValue(t),ownKeys:()=>Array.from(v)});break;case"HASH":c[r]=A.hash;break;case"INSTALLED_APPS":c[r]=q({has:Je});break;case"ITEM":case"INDEX":case"SIZE":{const n="ITEM"===r?"forEachItem":"INDEX"===r?"forEachIndex":"forEachSize";(0,u.hasOwnProperty)(t,n)?c[r]=t[n]:console.error(`Using \`${r}\` but no \`:forEach\` is found, check your expression: "${e}"`);break}case"LOCAL_STORAGE":c[r]=q({getItem:Ce("local")});break;case"MEDIA":c[r]=q(_e());break;case"MISC":c[r]=Ai().getMiscSettings();break;case"PARAMS":if(null==E)throw new ReferenceError(`PARAMS is not defined, in "${e}"`);c[r]=new URLSearchParams(E);break;case"PATH":c[r]=q(null!==(s=null==T?void 0:T.params)&&void 0!==s?s:{});break;case"PATH_NAME":c[r]=A.pathname;break;case"PROCESSORS":c[r]=K({get(e,t){const r=N.get(t);if(!r)throw new Error(`'PROCESSORS.${t}' is not registered! Have you installed the relevant brick package?`);return K({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys(){const e=new Set;for(const t of d){const r=t.split(".")[0];e.add(r)}return Array.from(e)}});break;case"QUERY":if(null==E)throw new ReferenceError(`QUERY is not defined, in "${e}"`);c[r]=Object.fromEntries(Array.from(E.keys()).map((e=>[e,E.get(e)])));break;case"QUERY_ARRAY":if(null==E)throw new ReferenceError(`QUERY_ARRAY is not defined, in "${e}"`);c[r]=Object.fromEntries(Array.from(E.keys()).map((e=>[e,E.getAll(e)])));break;case"SESSION_STORAGE":c[r]=q({getItem:Ce("session")});break;case"TPL":if(Oe(g,'Using "TPL" in expression',`check your expression: "${e}"`),g)break;case"STATE":c[r]=K({get:(e,t)=>y.getValue(t),ownKeys:()=>Array.from(m)});break;case"SYS":c[r]=q(null!=C?C:{});break;case"__WIDGET_FN__":c[r]=Fe;break;case"__WIDGET_IMG__":c[r]=null==Si||null===(i=Si.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":c[r]=R}Object.assign(c,pe(o.attemptToVisitGlobals,{storyboardFunctions:ge,app:I,appendI18nNamespace:t.appendI18nNamespace}));try{const t=(0,_.cook)(o.expression,o.source,{globalVariables:(0,O.supply)(o.attemptToVisitGlobals,c)});return H("evaluation",{raw:e,context:c,result:t}),t}catch(t){const r=`${t.message}, in "${e}"`;throw new(pt(t))(r)}}}}let mt=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function yt(e){switch(e){case mt.USE_BRICK_PROPERTIES:case mt.USE_BRICK_TRANSFORM:case mt.USE_BRICK_EVENTS:case mt.USE_BRICK_IF:case mt.USE_BRICK_LIFECYCLE:case mt.USE_BRICK_DATA_SOURCE:return!0}return!1}function gt(e,t,r){if(yt(e))return e;if(t)switch(e){case mt.USE_BRICK:return mt.USE_BRICK_ITEM;case mt.USE_BRICK_SLOTS_ITEM_BRICKS:return mt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case mt.INITIAL:if("useBrick"===r)return mt.USE_BRICK;break;case mt.USE_BRICK:case mt.USE_BRICK_ITEM:case mt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return mt.USE_BRICK_PROPERTIES;case"transform":return mt.USE_BRICK_TRANSFORM;case"dataSource":return mt.USE_BRICK_DATA_SOURCE;case"events":return mt.USE_BRICK_EVENTS;case"slots":return mt.USE_BRICK_SLOTS;case"children":return mt.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return mt.USE_BRICK_IF;case"lifeCycle":return mt.USE_BRICK_LIFECYCLE}break;case mt.USE_BRICK_SLOTS:return mt.USE_BRICK_SLOTS_ITEM;case mt.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return mt.USE_BRICK_SLOTS_ITEM_BRICKS}return mt.INITIAL}const vt=["app","location","query","match","flags","sys"];async function bt(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=ct(e);if(n||"string"==typeof e){const s=r.$$lazyForUseBrick&&yt(r.$$stateOfUseBrick);let i,a=s;if(n||(0,_.isEvaluable)(e))i=await async function(e,t,r){const{blockingList:n,run:s}=ft(e,t,r,!0);return await Promise.all(n),s()}(e,t,{lazy:s}),a=ut(e);else if(s)i=e;else{const n=t.unsafe_penetrate?{...(0,f.pick)(Oi(),vt),...(0,f.omit)(t,vt)}:t;i=((0,u.hasOwnProperty)(n,"data")?r.noInject?I.transform:I.transformAndInject:r.noInject?St:I.inject)(e,n)}return a||tt(i),i}if(!(0,u.isObject)(e)||rt(e)||"function"==typeof e)return e;if(Array.isArray(e)){const n=xt(r,!0);return Promise.all(e.map((e=>bt(e,t,n))))}return Object.fromEntries((await Promise.all(Object.entries(e).map((e=>{let[n,s]=e;return Promise.all([bt(n,t),bt(s,t,xt(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function wt(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=ct(e);if(n||"string"==typeof e){const s=r.$$lazyForUseBrick&&yt(r.$$stateOfUseBrick);let i,a=s;if(n||(0,_.isEvaluable)(e))i=dt(e,t),a=ut(e);else if(s)i=e;else{const n=t.unsafe_penetrate?{...(0,f.pick)(Oi(),vt),...(0,f.omit)(t,vt)}:t;i=((0,u.hasOwnProperty)(n,"data")?r.noInject?I.transform:I.transformAndInject:r.noInject?St:I.inject)(e,n)}return a||tt(i),i}if(!(0,u.isObject)(e)||rt(e)||"function"==typeof e)return e;if(Array.isArray(e)){const n=xt(r,!0);return e.map((e=>wt(e,t,n)))}return Object.fromEntries(Object.entries(e).map((e=>{let[n,s]=e;return[wt(n,t),wt(s,t,xt(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function xt(e,t,r){return e.$$lazyForUseBrick?{...e,$$stateOfUseBrick:gt(e.$$stateOfUseBrick,t,r)}:e}function St(e){return e}async function Pt(e,t){return!(0,u.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||ct(e.if)?await bt(e.if,t):e.if)}function At(e,t){return!(0,u.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||ct(e.if)?wt(e.if,t):e.if)}function Et(e){return!(0,u.hasOwnProperty)(e,"if")||!!e.if}const Tt=function(){const e=S();if(e)return e.looseCheckIfByTransform}()||function(e,t){return At(e,{data:t})};function kt(e){let t=!1,r=!1,n=!1;if("string"==typeof e?(0,_.isEvaluable)(e):ct(e)){const s="string"==typeof e?e:lt(e);if((0,_.isTrackAll)(s)){const e=(0,C.trackAll)(s);e&&(t=e.context,r=e.state,n=e.formState)}else t=(0,C.track)(s,"track context","CTX"),r=(0,C.track)(s,"track state","STATE"),n=(0,C.track)(s,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}async function _t(e,t){for(const[r,n,s]of e)if(r===t){const e=await n;if(void 0!==e||!s)return e}}async function Ct(e){const t={};for(const[r,n,s]of e){const e=await n;void 0===e&&s||!("style"!==r&&"dataset"!==r||(0,u.isObject)(e))||(t[r]=e)}return t}function It(e,t){if(t)for(const[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(const[t,s]of Object.entries(n))e[r][t]=s;break;case"constructor":case"__proto__":case"innerHTML":throw new Error(`set \`${r}\` is prohibited`);default:e[r]=n}}function Ot(e,t,r){const n=function(e,t){return(0,u.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{let[r,n]=e;const s=wt(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?mt.USE_BRICK:mt.INITIAL});if("style"!==r&&"dataset"!==r||(0,u.isObject)(s))return[r,s]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{It(e,n)}))}function Lt(e,t,r){if(r)for(const{contextNames:n,stateNames:s,propValue:i}of t){if(n)for(const t of n)r.disposes.push(e.ctxStore.onChange(t,r.listener));if(s)for(const t of s){const n=De(e,"STATE",`: "${i}"`);r.disposes.push(n.onChange(t,r.listener))}}}function Nt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Mt(e){return e&&e.sensitive?"":"i"}function Dt(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,s=void 0!==n&&n,i=r.start,a=void 0===i||i,o=r.end,c=void 0===o||o,l=r.encode,u=void 0===l?function(e){return e}:l,h=r.delimiter,p=void 0===h?"/#?":h,d=r.endsWith,f="[".concat(Nt(void 0===d?"":d),"]|$"),m="[".concat(Nt(p),"]"),y=a?"^":"",g=0,v=e;g<v.length;g++){var b=v[g];if("string"==typeof b)y+=Nt(u(b));else{var w=Nt(u(b.prefix)),x=Nt(u(b.suffix));if(b.pattern)if(t&&t.push(b),w||x)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";y+="(?:".concat(w,"((?:").concat(b.pattern,")(?:").concat(x).concat(w,"(?:").concat(b.pattern,"))*)").concat(x,")").concat(S)}else y+="(?:".concat(w,"(").concat(b.pattern,")").concat(x,")").concat(b.modifier);else{if("+"===b.modifier||"*"===b.modifier)throw new TypeError('Can not repeat "'.concat(b.name,'" without a prefix and suffix'));y+="(".concat(b.pattern,")").concat(b.modifier)}else y+="(?:".concat(w).concat(x,")").concat(b.modifier)}}if(c)s||(y+="".concat(m,"?")),y+=r.endsWith?"(?=".concat(f,")"):"$";else{var P=e[e.length-1],A="string"==typeof P?m.indexOf(P[P.length-1])>-1:void 0===P;s||(y+="(?:".concat(m,"(?=").concat(f,"))?")),A||(y+="(?=".concat(m,"|").concat(f,")"))}return new RegExp(y,Mt(r))}(function(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var s=1,i="";if("?"===e[o=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<e.length;)if("\\"!==e[o]){if(")"===e[o]){if(0==--s){o++;break}}else if("("===e[o]&&(s++,"?"!==e[o+1]))throw new TypeError("Capturing groups are not allowed at ".concat(o));i+=e[o++]}else i+=e[o++]+e[o++];if(s)throw new TypeError("Unbalanced pattern at ".concat(r));if(!i)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:i}),r=o}else{for(var a="",o=r+1;o<e.length;){var c=e.charCodeAt(o);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=e[o++]}if(!a)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:a}),r=o}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,s=void 0===n?"./":n,i=t.delimiter,a=void 0===i?"/#?":i,o=[],c=0,l=0,u="",h=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},p=function(e){var t=h(e);if(void 0!==t)return t;var n=r[l],s=n.type,i=n.index;throw new TypeError("Unexpected ".concat(s," at ").concat(i,", expected ").concat(e))},d=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t},f=function(e){var t=o[o.length-1],r=e||(t&&"string"==typeof t?t:"");if(t&&!r)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!r||function(e){for(var t=0,r=a;t<r.length;t++){var n=r[t];if(e.indexOf(n)>-1)return!0}return!1}(r)?"[^".concat(Nt(a),"]+?"):"(?:(?!".concat(Nt(r),")[^").concat(Nt(a),"])+?")};l<r.length;){var m=h("CHAR"),y=h("NAME"),g=h("PATTERN");if(y||g){var v=m||"";-1===s.indexOf(v)&&(u+=v,v=""),u&&(o.push(u),u=""),o.push({name:y||c++,prefix:v,suffix:"",pattern:g||f(v),modifier:h("MODIFIER")||""})}else{var b=m||h("ESCAPED_CHAR");if(b)u+=b;else if(u&&(o.push(u),u=""),h("OPEN")){v=d();var w=h("NAME")||"",x=h("PATTERN")||"",S=d();p("CLOSE"),o.push({name:w||(x?c++:""),pattern:w&&!x?f(v):x,prefix:v,suffix:S,modifier:h("MODIFIER")||""})}else p("END")}}return o}(e,r),t,r)}function Rt(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,s=r.exec(e.source);s;)t.push({name:s[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),s=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return Rt(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),Mt(r))}(e,t,r):Dt(e,t,r)}const Bt=new Map,Ft=1e4;let jt=0;function Ut(e,t){const{path:r,exact:n=!1,strict:s=!1,sensitive:i=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;const{regexp:a,keys:o}=function(e,t){const r=`${t.end}${t.strict}${t.sensitive}`;let n=Bt.get(r);n||Bt.set(r,n=new Map);const s=n.get(e);if(s)return s;const i=[],a={regexp:Rt(e,i,t),keys:i};return jt<Ft&&(n.set(e,a),jt++),a}(r,{end:n,strict:s,sensitive:i}),c=a.exec(e);if(!c)return null;const[l,...u]=c,h=e===l;return n&&!h?null:{path:r,url:"/"===r&&""===l?"/":l,isExact:h,params:o.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function Yt(e,t,r){return Ut(r,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}const $t=Symbol.for("tpl.asyncComputedPropsFromHost"),Ht=Symbol.for("tpl.stateStoreId"),Wt=Symbol.for("tpl.externalForEachItem"),Vt=Symbol.for("tpl.externalForEachIndex"),zt=Symbol.for("tpl.externalForEachSize"),qt=new Set;let Kt=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e.LICENSE_EXPIRED="LICENSE_EXPIRED",e.LICENSE_BLOCKED="LICENSE_BLOCKED",e.NO_PERMISSION="NO_PERMISSION",e.PAGE_NOT_FOUND="PAGE_NOT_FOUND",e.APP_NOT_FOUND="APP_NOT_FOUND",e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.GO_BACK_TO_PREVIOUS_PAGE="GO_BACK_TO_PREVIOUS_PAGE",e.GO_BACK_HOME="GO_BACK_HOME",e.RELOAD="RELOAD",e}({});const Gt={[Kt.REQUEST_FAILED]:"Request Failed",[Kt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Kt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Kt.NETWORK_ERROR]:"Network error, please check your network.",[Kt.LICENSE_EXPIRED]:"The license authorization has expired, please contact the platform administrator",[Kt.LICENSE_BLOCKED]:"The page is not authorized, please contact the platform administrator",[Kt.NO_PERMISSION]:"Unauthorized access, unable to retrieve the required resources for this page",[Kt.PAGE_NOT_FOUND]:"Page not found, please check the URL",[Kt.APP_NOT_FOUND]:"App not found, maybe the URL is wrong or you don't have permission to access",[Kt.UNKNOWN_ERROR]:"Oops! Something went wrong",[Kt.GO_BACK_TO_PREVIOUS_PAGE]:"Go back to previous page",[Kt.GO_BACK_HOME]:"Go back to home page",[Kt.RELOAD]:"Reload"},Jt={[Kt.REQUEST_FAILED]:"请求失败",[Kt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Kt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Kt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。",[Kt.LICENSE_EXPIRED]:"License 授权失效,请联系平台管理员",[Kt.LICENSE_BLOCKED]:"该页面未授权,请联系平台管理员",[Kt.NO_PERMISSION]:"没有权限,无法获取页面所需要的资源",[Kt.PAGE_NOT_FOUND]:"请求的页面未找到,请确认 URL 是否正确",[Kt.APP_NOT_FOUND]:"请求的微应用无法找到, 可能是 URL 错误或者无权限访问",[Kt.UNKNOWN_ERROR]:"糟糕!页面出现了一些问题",[Kt.GO_BACK_TO_PREVIOUS_PAGE]:"回到上一页",[Kt.GO_BACK_HOME]:"回到首页",[Kt.RELOAD]:"刷新"},Xt="core/runtime",Zt={en:Gt,zh:Jt};let Qt;const er=Object.freeze({show:function(e){if(Qt)return Qt.resolve(e);if("confirm"===e.type){const t=confirm(e.content);return new Promise(((e,r)=>setTimeout((()=>{(t?e:r)()}),1)))}return alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1)))}});function tr(e){const{search:t,pathname:r}=e,n=r?window.btoa(encodeURIComponent(r)):"",s=t?window.btoa(encodeURIComponent(t)):"";document.cookie=`SALOGINPATH=${n}; path=/`,document.cookie=`SALOGINQUERY=${s}; path=/`}function rr(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof k.HttpFetchError)return c.i18n.t(`${Xt}:${Kt.NETWORK_ERROR}`);if(e instanceof k.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function nr(e){return e instanceof k.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}let sr,ir,ar=!1;function or(e){if(e instanceof k.HttpAbortError)return;if(nr(e)&&!window.NO_AUTH_GUARD){if(ar)return;return ar=!0,void er.show({type:"confirm",content:c.i18n.t(`${Xt}:${Kt.LOGIN_TIMEOUT_MESSAGE}`)}).then((()=>{!function(){const e=Ai().getFeatureFlags()["sso-enabled"],t=A();tr(t.location),t.push(e?"/sso-auth/login":"/auth/login",{from:{...t.location,state:void 0}})}(),ar=!1}),(()=>{ar=!1}))}console.error(e);const t=rr(e);t!==sr&&(sr=t,er.show({type:"error",title:c.i18n.t(`${Xt}:${Kt.REQUEST_FAILED}`),content:t,contentStyle:{whiteSpace:"pre-wrap",wordBreak:"break-word"}}).then((()=>{sr=void 0})))}const cr=Object.freeze({show:function(e){ir?ir.resolve(e):alert(e.message)}});function lr(e,t,r){t&&Object.entries(t).forEach((t=>{let[n,s]=t;const i=fr(s,r,{element:e});e.addEventListener(n,i),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,i]),e.$$eventListeners||(e.$$eventListeners=[]);for(const t of[].concat(s))e.$$eventListeners.push([n,null,t])}))}function ur(e){return"string"==typeof e.action}function hr(e){return"string"==typeof e.useProvider}function pr(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function dr(e){return!!e.then}function fr(e,t,r){return function(n){var s,i;for(const a of[].concat(e))if(At(a,{...t,event:n}))if(dr(a))fr(a.then,t,r)(n);else if(ur(a)){const[e,o]=a.action.split(".");switch(a.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":vr(n,o,a.args,a.callback,t);break;case"window.open":br(n,a.args,t);break;case"window.postMessage":wr(n,a.args,t);break;case"parent.postMessage":xr(n,a.args,t);break;case"location.reload":case"location.assign":Tr(n,o,a.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":kr(n,e,o,a.args,t);break;case"event.preventDefault":n.preventDefault();break;case"event.stopPropagation":n.stopPropagation();break;case"console.log":case"console.error":case"console.warn":case"console.info":_r(n,o,a.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Cr(n,o,a.args,t);break;case"handleHttpError":or(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":Pr(n,o,a.args,null===(s=a.batch)||void 0===s||s,a.callback,t);break;case"state.update":case"state.refresh":case"state.load":Ar(n,o,a.args,null===(i=a.batch)||void 0===i||i,a.callback,t);break;case"tpl.dispatchEvent":{const[e,r]=Lr(a.args,t,n);Re(t,a.action,`: ${e}`).dispatchEvent(new CustomEvent(e,r));break}case"formstate.update":Er(n,a.args,a.callback,t);break;case"message.subscribe":case"message.unsubscribe":Ir(n,o,a.args,t,r,a.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":te("theme.setDarkTheme"===a.action?"dark":"light");break;case"theme.setTheme":{const[e]=Lr(a.args,t,n);te(e);break}case"mode.setDashboardMode":case"mode.setDefaultMode":oe("mode.setDashboardMode"===a.action?"dashboard":"default");break;default:console.error("unknown event listener action:",a.action)}}else hr(a)?mr(n,a,t,r):pr(a)?yr(n,a,t,r):console.error("unknown event handler:",a);else a.else&&fr(a.else,t,r)(n)}}function mr(e,t,r,n){const s="saveAs"!==t.method?"resolve":"saveAs";gr(e,t.useProvider,t,s,r,n)}function yr(e,t,r,n){let s=[];const i=t.target,a=t.targetRef;let o=i;if(("string"==typeof i?(0,_.isEvaluable)(i):ct(i))&&(o=wt(i,{...r,event:e})),"string"==typeof o)if("_self"===o)s.push(n.element);else if(t.multiple)s=Array.from(document.querySelectorAll(o));else{const e=document.querySelector(o);null!==e&&s.push(e)}else if(o)o instanceof HTMLElement?s.push(o):console.error("unexpected target:",o);else if(a){let t=a;("string"==typeof a?(0,_.isEvaluable)(a):ct(a))&&(t=wt(a,{...r,event:e}));const n=[].concat(t),i=Re(r,"targetRef",`: ${n.join(", ")}`);s.push(...n.map((e=>{var t;return null===(t=i.$$getElementByRef)||void 0===t?void 0:t.call(i,e)})).filter(Boolean))}0!==s.length?function(e){return!!e.method}(t)?s.forEach((s=>{gr(e,s,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Ot(s,t.properties,{...r,event:e}):console.error("target not found:",i||a)}async function gr(e,t,r,n,s,i,a){const o=hr(r),c=async()=>{var i;const c=o?await Qe(t):t;if("function"!=typeof c[n])throw new Error(`target <${c.tagName.toLowerCase()}> has no method: ${n}`);const l=hr(r);let u,h=l?function(e,t,r){return Array.isArray(e)?wt(e,{...t,event:r}):e}(r.args,s,e):Lr(r.args,s,e,a);var p;return l&&null!=Si&&null!==(i=Si.flowApi)&&void 0!==i&&i.isFlowApiProvider(r.useProvider)?(!Array.isArray(r.args)&&r.params&&(h=wt((0,f.pick)(r,"params","options","filename"),{...s,event:e})),u=await Si.flowApi.getArgsOfFlowApi(r.useProvider,null!=h?h:[],n,null===(p=r.sse)||void 0===p?void 0:p.stream)):u=h,c[n](...u)};if(!r.callback)return void c();const l=Or(r.callback,s,i),u={progress:l("progress"),success:l("success"),error:l("error"),finally:l("finally")};if(o){var h,p;const t={...s,event:e};if(wt(null===(h=r.sse)||void 0===h?void 0:h.stream,t))return void async function(e,t){let{progress:r,success:n,error:s,finally:i}=t;const a=Ii();try{const t=await e();for await(const e of t){if(a!==Ii())return;null==r||r(e)}if(a!==Ii())return;null==n||n()}catch(e){if(a!==Ii())return;null==s||s(e)}finally{null==i||i()}}(c,u);if(wt(null===(p=r.poll)||void 0===p?void 0:p.enabled,t))return void function(e,t,r,n){let{progress:s,success:i,error:a,finally:o}=t;const{expectPollStopImmediately:c,expectPollEnd:l}=r,{interval:u,leadingRequestDelay:h,continueOnError:p,delegateLoadingBar:d}=wt((0,f.pick)(r,["interval","leadingRequestDelay","continueOnError","delegateLoadingBar"]),n),m=Ii();let y;async function g(){let t;qt.delete(y);try{var r;if(t=null===(r=wt(c,n))||void 0===r?void 0:r(),t)null==o||o();else{var h;const r=await e(),a=null===(h=wt(c,n))||void 0===h?void 0:h();var f;t=a||m!==Ii(),t?a&&(null==o||o()):(null==s||s(r),null!==(f=wt(l,n))&&void 0!==f&&f(r)?(d&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==o||o()):v(null!=u?u:3e3))}}catch(e){var g;const r=null===(g=wt(c,n))||void 0===g?void 0:g();t=r||m!==Ii(),t?r&&(null==o||o()):(null==a||a(e),p?v(null!=u?u:3e3):null==o||o())}finally{d&&t&&window.dispatchEvent(new Event("request.end"))}}function v(e){y=setTimeout(g,e),qt.add(y)}v(null!=h?h:0),d&&window.dispatchEvent(new Event("request.start"))}(c,u,r.poll,t)}try{const e=await c();u.success(e)}catch(e){u.error(e)}finally{u.finally()}}function vr(e,t,r,n,s){let i=0,a=!1,o=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":i=2,a=!0;break;case"reload":a=!0;break;case"block":i=1,o="setBlockMessage"}let c=[];if(i>0&&(c=Lr(r,s,e,{useEventDetailAsDefault:!0}),c.length=i),a&&n){const e=Or(n,s,void 0);c.push((t=>{e(t?"error":"success")({blocked:t}),e("finally")({blocked:t})}))}A()[o](...c)}function br(e,t,r){const[n,s,i]=Lr(t,r,e);window.open(n,s||"_self",i)}function wr(e,t,r){const n=Lr(t,r,e);1===n.length&&n.push(location.origin),window.postMessage(...n)}function xr(e,t,r){if(parent===window)throw new Error("parent is the window itself");const n=Lr(t,r,e);parent.postMessage(...n)}function Sr(e,t,r,n,s,i){t?n.updateValues(e,r,(e=>Lr(e,s,i)[0])):e.forEach((e=>{const{name:t,value:a}=Lr([e],s,i)[0];n.updateValue(t,a,r)}))}function Pr(e,t,r,n,s,i){if(!Array.isArray(r)||!r.every(u.isObject)||"assign"!==t&&"replace"!==t){const[n,a]=Lr(r,i,e);i.ctxStore.updateValue(n,a,t,s,i)}else Sr(r,n,t,i.ctxStore,i,e)}function Ar(e,t,r,n,s,i){if(Array.isArray(r)&&r.every(u.isObject)&&"update"===t)Sr(r,n,"replace",De(i,`state.${t}`,`: ${JSON.stringify(r)}`),i,e);else{const[n,a]=Lr(r,i,e);De(i,`state.${t}`,`: ${n}`).updateValue(n,a,"update"===t?"replace":t,s,i)}}function Er(e,t,r,n){const[s,i]=Lr(t,n,e);Xe(n,"formstate.update",`: ${s}`).updateValue(s,i,"replace",r,n)}function Tr(e,t,r,n){if("assign"===t){const[t]=Lr(r,n,e);location.assign(t)}else location[t]()}function kr(e,t,r,n,s){const i="localStorage"===t?localStorage:sessionStorage,[a,o]=Lr(n,s,e);"setItem"===r?void 0!==o&&i.setItem(a,JSON.stringify(o)):i.removeItem(a)}function _r(e,t,r,n){console[t](...Lr(r,n,e,{useEventAsDefault:!0}))}function Cr(e,t,r,n){const s=Lr(r,n,e,{useEventAsDefault:!0});cr.show({type:t,message:s[0]})}async function Ir(e,t,r,n,s,i){const a=()=>{var s;const i=Lr(r,n,e);return null==Si||null===(s=Si.messageDispatcher)||void 0===s?void 0:s[t](...i)};if(!i)return void a();const o=Or(i,n,s);try{const e=await a();o("success")(e)}catch(e){o("error")(e)}finally{o("finally")()}}function Or(e,t,r){return function(n){return function(s){const i=null==e?void 0:e[n];if(i)try{const e=new CustomEvent(`callback.${n}`,{detail:s});fr(i,t,r)(e)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",s)}}}function Lr(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?wt(e,{...t,event:r}):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}function Nr(e){var t;const{ref:r,runtimeContext:n,element:s}=e;if(!r||!n.tplStateStoreId)return;const{hostBrick:i}=De(n,"bindTemplateProxy"),a=i.tplHostMetadata;a.internalBricksByRef.set(r,e);const o=null===(t=a.proxy)||void 0===t?void 0:t.events;if(o)for(const[e,t]of Object.entries(o))if(t.ref===r){var c,l,u;const r=t=>{t.bubbles&&t.stopPropagation(),i.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},n=null!==(c=t.refEvent)&&void 0!==c?c:e;s.addEventListener(n,r),null!==(u=(l=s).$$proxyListeners)&&void 0!==u||(l.$$proxyListeners=[]),s.$$proxyListeners.push([n,r])}}function Mr(e){const{ref:t,runtimeContext:r,element:n}=e;if(null==r||!r.tplStateStoreId||!t)return;const{hostBrick:s}=De(r,"unbindTemplateProxy");s.tplHostMetadata.internalBricksByRef.delete(t);for(const[e,t]of null!==(i=n.$$proxyListeners)&&void 0!==i?i:[]){var i;n.removeEventListener(e,t)}delete n.$$proxyListeners}let Dr=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e[e.ABSTRACT=3]="ABSTRACT",e}({});function Rr(e){e.replaceChildren()}function Br(e,t){e.mounted=!0,window.DISABLE_REACT_FLUSH_SYNC=!1;let r=e.child;const n=[];for(;r;){if(r.mounted=!0,r.tag===Dr.BRICK){var s;const i=r.type;i.includes("-")&&!customElements.get(i)&&console.error(`Undefined custom element: ${i}`),"basic-bricks.script-brick"===i&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");const a=t&&r===e.child?t:document.createElement(i);if(r.element=a,r.slotId&&a.setAttribute("slot",r.slotId),r.iid&&(a.dataset.iid=r.iid),null!==(s=r.tplHostMetadata)&&void 0!==s&&s.tplStateStoreId&&(a.dataset.tplStateStoreId=r.tplHostMetadata.tplStateStoreId),It(a,r.properties),lr(a,r.events,r.runtimeContext),r.tplHostMetadata&&(a.$$tplStateStore=De({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),Nr(r),r.portal)n.push(a);else if(r.return){let e=r.return;for(;e;){if(e.tag!==Dr.ABSTRACT){e.childElements||(e.childElements=[]),e.childElements.push(a);break}e=e.return}}}if(r.child)r=r.child;else if(r.sibling)r=r.sibling;else{var i;let e=r.return;for(;e;){var a;if(e.tag!==Dr.ABSTRACT&&e.childElements)e.tag===Dr.ROOT?null===(a=e.container)||void 0===a||a.append(...e.childElements):e.element.append(...e.childElements),e.childElements=void 0;if(e.tag===Dr.ROOT&&n.length>0&&("function"==typeof e.createPortal?e.createPortal():e.createPortal).append(...n),e.sibling)break;e=e.return}r=null===(i=e)||void 0===i?void 0:i.sibling}}setTimeout((()=>{window.DISABLE_REACT_FLUSH_SYNC=!0}))}const Fr=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],jr=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"];var Ur=new WeakMap,Yr=new WeakMap,$r=new WeakMap,Hr=new WeakMap,Wr=new WeakMap,Vr=new WeakMap,zr=new WeakMap,qr=new WeakMap,Kr=new WeakSet;class Gr{constructor(e,t){var r;(0,E.A)(this,Kr),(0,s.A)(this,"scope",void 0),(0,s.A)(this,"unknownBricks",void 0),(0,s.A)(this,"renderId",void 0),(0,i.A)(this,Ur,void 0),(0,i.A)(this,Yr,{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}),(0,i.A)(this,$r,new Map),(0,i.A)(this,Hr,void 0),(0,i.A)(this,Wr,new Map),(0,i.A)(this,Vr,void 0),(0,i.A)(this,zr,new WeakMap),(0,i.A)(this,qr,new Map),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw",(0,a.A)(Ur,this,null==t?void 0:t.routeHelper),this.renderId=null==t?void 0:t.renderId}setInitialMenuRequestNode(e){(0,a.A)(Vr,this,e)}memoizeMenuRequestNode(e,t){(0,o.A)(zr,this).set(e,t)}getMenuRequests(){const e=[];let t=(0,o.A)(Vr,this);for(;t;)if(t.request&&e.push(t.request),t.child)t=t.child;else{for(var r;t&&!t.sibling;)t=t.return;t=null===(r=t)||void 0===r?void 0:r.sibling}return e}async reMergeMenuRequestNodes(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=(0,o.A)(zr,this).get(t);(0,o.A)(zr,this).set(t,r);let s,i=e.child;for(;i&&i!==n;)s=i,i=i.sibling;s?(s.sibling=r,r.sibling=null==n?void 0:n.sibling):e.child=r,await(0,o.A)(Ur,this).mergeMenus(this.getMenuRequests())}reBailout(e){return(0,o.A)(Ur,this).bailout(e)}reCatch(e,t){return(0,o.A)(Ur,this).catch(e,t,!1,!0)}async didPerformIncrementalRender(e,t){let r=!1;const n=[];for(const{parentRoutes:s,callback:i}of[...(0,o.A)(qr,this).values()].reverse()){const a=s[s.length-1];if(n.includes(a))continue;const o=await i(e,t);o&&n.push(...s.slice(0,-1)),!1!==o&&(r=!0)}return r}performIncrementalRender(e,t,r){(0,o.A)(qr,this).set(e,{parentRoutes:t,callback:r})}registerBrickLifeCycle(e,t){if(!t)return;const r=[...Fr,..."page"===this.scope?jr:[]];for(const n of r){const r=t[n];r&&(0,o.A)(Yr,this)[n].push({brick:e,handlers:r})}(0,f.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}registerArbitraryLifeCycle(e,t){const r=(0,o.A)(Wr,this).get(e);r?r.add(t):(0,o.A)(Wr,this).set(e,new Set([t]))}reRender(e,t,r){var n,s,i,a,o;if(e.tag!==Dr.ROOT&&e.disposed)return;const[c,l]=function(e){let t,r,n=e,s=0;for(;n;){if(n.tag===Dr.BRICK)n.portal?r=n:t=n;else if(n.child&&n.tag===Dr.ABSTRACT){n=n.child,s++;continue}if(s<=0)break;if(n.sibling)n=n.sibling;else{var i;let e=n.return;for(s--;e&&!e.sibling;)e=e.return,s--;if(s<=0)break;n=null===(i=e)||void 0===i?void 0:i.sibling}}return[t,r]}(r),u=null!==(n=c?null===(s=c.element)||void 0===s?void 0:s.nextSibling:null===(i=rn(r,!1))||void 0===i?void 0:i.element)&&void 0!==n?n:null,h=[];let p,d=l?null==l||null===(a=l.element)||void 0===a?void 0:a.nextSibling:null===(o=rn(r,!0))||void 0===o?void 0:o.element;for(;d&&(h.push(d),d instanceof HTMLElement&&"DIV"===d.tagName);)d=d.nextSibling;let f=e.child;for(;f&&f!==r;){if(f.sibling===r){p=f;break}f=f.sibling}const m=document.createDocumentFragment(),y=document.createDocumentFragment(),g={tag:Dr.ROOT,container:m,createPortal:y,child:t};for(f=t;f;)f.return=g,f=f.sibling;const[v,b]=nn(r);for((0,T.A)(Kr,this,Jr).call(this,v),(0,T.A)(Kr,this,Xr).call(this,b),Br(g),p?p.sibling=t:e.child=t,t.sibling=r.sibling,(0,T.A)(Kr,this,Zr).call(this,b),(0,T.A)(Kr,this,Zr).call(this,v),f=t;f;)f.return=e,f=f.sibling;if(m.hasChildNodes()){const t=function(e){let t=e;for(;t.tag===Dr.ABSTRACT;)if(t=t.return,!t)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");return t}(e);var w,x;t.tag===Dr.ROOT?null===(w=t.container)||void 0===w||w.insertBefore(m,u):null===(x=t.element)||void 0===x||x.insertBefore(m,u)}if(y.hasChildNodes()){var S;let e=t;for(;e&&e.return;)e=e.return;if((null===(S=e)||void 0===S?void 0:S.tag)!==Dr.ROOT)throw new Error("Cannot find render root node. This is a bug of Brick Next, please report it.");const r="function"==typeof e.createPortal?e.createPortal():e.createPortal;let n=null;for(const e of h)if(r.contains(e)){n=e;break}r.insertBefore(y,n)}const[P]=nn(t);(0,T.A)(Kr,this,Qr).call(this,P)}dispose(){for(const e of Object.values((0,o.A)(Yr,this)))e.length=0;for(const e of(0,o.A)($r,this).values()){for(const t of e)t.disconnect();e.length=0}(0,o.A)($r,this).clear(),(0,o.A)(Hr,this)&&(Ae.removeEventListener("change",(0,o.A)(Hr,this)),(0,a.A)(Hr,this,void 0)),(0,o.A)(Wr,this).clear(),(0,o.A)(qr,this).clear(),(0,a.A)(zr,this,void 0)}dispatchBeforePageLoad(){(0,T.A)(Kr,this,en).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){const e=new CustomEvent("page.load");(0,T.A)(Kr,this,en).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,T.A)(Kr,this,en).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,T.A)(Kr,this,en).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){const{hash:e}=A().location;e&&"#"!==e?(0,T.A)(Kr,this,en).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,T.A)(Kr,this,en).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(const{brick:e,handlers:t}of(0,o.A)(Yr,this).onScrollIntoView)(0,T.A)(Kr,this,tn).call(this,e,t)}initializeMediaChange(){(0,a.A)(Hr,this,(e=>{(0,T.A)(Kr,this,en).call(this,"onMediaChange",new CustomEvent("media.change",{detail:q(e.detail)}))})),Ae.addEventListener("change",(0,o.A)(Hr,this))}initializeMessageDispatcher(){var e;for(const{brick:e,handlers:r}of(0,o.A)(Yr,this).onMessage)for(const n of[].concat(r)){var t;null==Si||null===(t=Si.messageDispatcher)||void 0===t||t.onMessage(n.channel,(t=>{fr(n.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:t}))}))}null==Si||null===(e=Si.messageDispatcher)||void 0===e||e.onClose((()=>{(0,T.A)(Kr,this,en).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,T.A)(Kr,this,en).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,T.A)(Kr,this,en).call(this,"onUnmount",new CustomEvent("unmount"))}}function Jr(e){const t=[...Fr,..."page"===this.scope?jr:[]],r=[];for(const n of t){const t=(0,f.remove)((0,o.A)(Yr,this)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...t)}for(const t of e){var n,s,i;const e=(0,o.A)($r,this).get(t);if(null!=e&&e.length){for(const t of e)t.disconnect();e.length=0,(0,o.A)($r,this).delete(t)}Mr(t),null===(n=t.element)||void 0===n||delete n.$$tplStateStore,null===(s=t.element)||void 0===s||s.remove(),null===(i=t.disposes)||void 0===i||i.forEach((e=>e())),delete t.disposes}const a=new CustomEvent("unmount");for(const{brick:e,handlers:t}of r)fr(t,e.runtimeContext,e)(a)}function Xr(e){for(const r of e){var t;null===(t=r.disposes)||void 0===t||t.forEach((e=>e())),delete r.disposes}}function Zr(e){for(const t of e)delete t.child,delete t.sibling,delete t.return,t.disposed=!0,t.tag===Dr.BRICK&&(delete t.element,delete t.runtimeContext),Object.freeze(t)}function Qr(e){const t=new CustomEvent("mount");for(const{brick:r,handlers:n}of(0,o.A)(Yr,this).onMount)e.has(r)&&fr(n,r.runtimeContext,r)(t);for(const{brick:t,handlers:r}of(0,o.A)(Yr,this).onScrollIntoView)e.has(t)&&(0,T.A)(Kr,this,tn).call(this,t,r)}function en(e,t){for(const{brick:r,handlers:n}of(0,o.A)(Yr,this)[e])fr(n,r.runtimeContext,r)(t);const r=(0,o.A)(Wr,this).get(e);if(r)for(const e of r)e()}function tn(e,t){var r;const n=null!==(r=t.threshold)&&void 0!==r?r:.1,s=new IntersectionObserver(((r,s)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(fr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),s.disconnect())}))}),{threshold:n});s.observe(e.element);let i=(0,o.A)($r,this).get(e);i||(i=[],(0,o.A)($r,this).set(e,i)),i.push(s)}function rn(e,t){let r=e;for(;r;){if(r!==e&&r.tag===Dr.BRICK&&(t?r.portal:!r.portal))return r;if(r!==e&&r.child&&r.tag===Dr.ABSTRACT)r=r.child;else if(r.sibling)r=r.sibling;else{var n;let e=r.return;for(;e;){if(e.tag!==Dr.ABSTRACT)return;if(e.sibling)break;e=e.return}r=null===(n=e)||void 0===n?void 0:n.sibling}}}function nn(e){const t=new Set,r=new Set;let n=e;for(;n;)if(n.tag===Dr.BRICK?t.add(n):n.tag===Dr.ABSTRACT&&r.add(n),n.child)n=n.child;else{if(n===e)break;if(n.sibling)n=n.sibling;else{var s;let i=n.return;for(;i;){if(i===e)return[t,r];if(i.sibling)break;i=i.return}n=null===(s=i)||void 0===s?void 0:s.sibling}}return[t,r]}const sn=new Map;function an(e){return sn.get(e)}function on(e,t,r){const n=S();if(n)return n.doTransform(e,t,r);if(r)throw new Error("Legacy doTransform does not support options in v3");return wt(t,{...Oi(),data:e},{noInject:!0})}function cn(e,t,r,n,s,i){const a=S();if(a)return a.transformProperties(e,t,r,n,s,i);if(i)throw new Error("Legacy transformProperties does not support options in v3");const o=function(e,t,r,n){const s={},i=r?(0,f.get)(e,r):e;if(Array.isArray(t))for(const e of t)un(s,i,e.to,e.from,e.mapArray);else un(s,i,t,void 0,n);return s}(t,r,n,s);for(const[t,r]of Object.entries(o))(0,f.set)(e,t,r);return e}function ln(e,t,r,n){const s=r?(0,f.get)(e,r):e;return t?cn({},s,t,void 0,n):s}function un(e,t,r,n,s){if(!r)return;let i=n?(0,f.get)(t,n):t,a=Array.isArray(i);if(a||!0!==s?a&&!1===s&&(a=!1):(a=!0,i=[i]),"string"!=typeof r)for(const[t,n]of Object.entries(r))e[t]=a?i.map((e=>on(e,n))):on(i,n);else e[r]=i}const hn=Symbol.for("root.runtimeContext");async function pn(e,t,r){var n,s,i,a;const[o,c,l]=os({...null!==(n=e[hn])&&void 0!==n?n:Oi(),data:t,pendingPermissionsPreCheck:[]});o.inUseBrick=!0,null!==(s=o.tplStateStoreMap)&&void 0!==s||(o.tplStateStoreMap=new Map),null!==(i=o.formStateStoreMap)&&void 0!==i||(o.formStateStoreMap=new Map);const u=new Gr("fragment"),h={tag:Dr.ROOT,createPortal:null},p=Ie(),d=await ss(h,p&&!r?e:{errorBoundary:r,...e},o,u,[],{}),f=[...c,...l];let m;await as(d,o,f);let y=d.node;for(;y;){if(y.tag===Dr.BRICK){m=y;break}y=y.child}if(null!==(a=m)&&void 0!==a&&a.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return h.child=d.node,{tagName:m?m.type:null,renderRoot:h,rendererContext:u,scopedStores:f}}function dn(e,t){let r,{renderRoot:n,rendererContext:s,scopedStores:i}=e;n.createPortal=()=>{const e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},Br(n,t),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher();for(const e of i)e.mountAsyncData();return{portal:r}}function fn(e,t){let{rendererContext:r}=e;t.portal&&(Rr(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function mn(e,t){const r=Li(e);Object.assign(r,{...t,meta:{...r.meta,...t.meta},$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1}),M(r)}function yn(e,t){const r=Li(e);let n=!1;function s(e){e.forEach(((r,a)=>{"routes"===r.type?s(r.routes):function(e){return e.path===t.path&&!e.exact==!t.exact}(r)?(n=!0,e[a]=t):Array.isArray(r.bricks)&&i(r.bricks)}))}function i(e){e.forEach((e=>{if(e.slots)for(const t of Object.values(e.slots))"routes"===t.type?s(t.routes):i(t.bricks)}))}s(r.routes),n||r.routes.unshift(t)}function gn(e,t,r){const n=`${e}.${t.name}`;Me.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),vn(e,t.name,r)}function vn(e,t,r){Sn(e,`\${APP.homepage}/_dev_only_/template-preview/${t}`,[{brick:t,...(0,f.pick)(r,"properties","events","lifeCycle","context","slots","children")}])}function bn(e){return`\${APP.homepage}/_dev_only_/snippet-preview/${e}`}function wn(e,t){var r;Sn(e,bn(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}],t.context)}const xn=wn;function Sn(e,t,r,n){const{routes:s}=Li(e),i=s.findIndex((e=>e.path===t)),a={path:t,bricks:r,context:n,menu:!1,exact:!0};-1===i?s.unshift(a):s.splice(i,1,a)}function Pn(e,t){let{tplStateStoreId:r}=t;const n=Oi();return r?De({...n,tplStateStoreId:r},"STATE").getValue(e):n.ctxStore.getValue(e)}function An(e){let{tplStateStoreId:t}=e;const r=Oi();return t?De({...r,tplStateStoreId:t},"STATE").getAllValues():r.ctxStore.getAllValues()}function En(e){return _i().find((t=>t.id?t.id===e:t.filePath.startsWith(`${e}/`)))}function Tn(e){return(0,l.loadBricksImperatively)(e,_i())}function kn(e,t){return(0,l.loadEditorsImperatively)(e,null!=t?t:_i())}function _n(){return Ii()}async function Cn(e,t){let{appId:r,updateStoryboardType:n,collectUsedContracts:s}=t;const i=Li(r);let a;if("route"===n)a={routes:[e]};else if("template"===n)a={meta:{customTemplates:[e]}};else if("snippet"===n){var o;const t=bn(e.snippetId);a={routes:[null==i||null===(o=i.routes)||void 0===o?void 0:o.find((e=>e.path===t))]}}const c=[];return a&&s&&(await s(a)).forEach((e=>{var t;const[r,n,s]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=i&&null!==(t=i.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===n&&e.name===s))||c.push(e)})),c}async function In(e,t){let{tplStateStoreId:r,routeId:n}=t;const s={...Oi(),tplStateStoreId:r,match:an(n)};return e.resolve?st(e.resolve,s,{cache:"reload"}):bt(e.value,s)}function On(e){var t;const r=Oi();return{app:null!==(t=null==r?void 0:r.overrideApp)&&void 0!==t?t:null==r?void 0:r.app,location:(0,f.pick)(location,["href","origin","hostname","host"]),...(0,f.pick)(r,["query","sys"]),match:an(null==e?void 0:e.routeId)}}let Ln;const Nn=[];function Mn(e){Ln=e;const t=An({tplStateStoreId:e.tplStateStoreId});Rn({changeType:"initialize",tplStateStoreId:e.tplStateStoreId,detail:{data:t}})}function Dn(e){Nn.push(e)}function Rn(e){setTimeout((()=>{for(const t of Nn)try{t(e)}catch(t){console.error(`RealTimeDataInspectHook failed (${e.changeType}):`,t)}}))}const Bn=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Fn{constructor(e,t,r,n){(0,s.A)(this,"type",void 0),(0,s.A)(this,"data",new Map),(0,s.A)(this,"changeEventType",void 0),(0,s.A)(this,"pendingStack",[]),(0,s.A)(this,"hostBrick",void 0),(0,s.A)(this,"stateStoreId",void 0),(0,s.A)(this,"batchUpdate",!1),(0,s.A)(this,"batchUpdateContextsNames",[]),(0,s.A)(this,"rendererContext",void 0),(0,s.A)(this,"routeMap",new WeakMap),(0,s.A)(this,"routeStackMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=r,this.stateStoreId=n}has(e){return this.data.has(e)}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{let[t,{value:r}]=e;return[t,r]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}notifyRealTimeDataChange(e,t){if(Ln){const{tplStateStoreId:r}=Ln;(r?"STATE"===this.type&&this.stateStoreId===r:"CTX"===this.type)&&Rn({changeType:"update",tplStateStoreId:r,detail:{name:e,value:t}})}}getAffectListByContext(e){const t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");const n={},s={},i=[];e.forEach((e=>{const{name:s,value:a}=r([e]),o=this.data.get(s);i.push(...this.getAffectListByContext(s)),o&&(n[s]=o),this.updateValue(s,a,t)})),i.filter((e=>!n[e])).forEach((e=>{const t=this.data.get(e);t&&(s[e]=t)}));const a=e=>{for(const r in e){var t;const n=e[r];null===(t=n.eventTarget)||void 0===t||t.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};a(n),a(s),this.batchUpdate=!1}updateValue(e,t,r,n,s){const i=this.data.get(e);if(!i)throw new Error(`${this.type} '${e}' is not defined`);if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,u.isObject)(i.value)?Object.assign(i.value,t):(console.warn(`Non-object current value of "${this.type}.${e}" for "context.assign", try "context.replace" instead.`),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.useResolve)throw new Error(`You can not ${r} "${this.type}.${e}" which is not using resolve`);let a;"load"===r&&(i.loaded?a=Promise.resolve(i.value):i.loading&&(a=i.loading));const o=e=>{var t;let r;return"FlowApiNotFoundError"===(null==e?void 0:e.name)&&!!(r=null===(t=this.rendererContext)||void 0===t?void 0:t.renderId)&&r!==Ii()};if(a||(a=i.loading=i.load({cache:"load"===r?"default":"reload",...t}),a.then((e=>{this.finishLoad(i,e)}),(e=>{!i.useResolve||o(e)||null!=n&&n.error||or(e)}))),n){const e=Or(n,s);a.then((t=>{e("success")({value:t}),e("finally")()}),(t=>{!o(t)&&n.error&&e("error")(t),e("finally")()}))}}}finishLoad(e,t){e.useResolve&&(e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t})))}define(e,t,r,n){if(Array.isArray(e)&&e.length>0){const s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX";const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=arguments.length>2?arguments[2]:void 0;const n=new Map;for(const s of e){const e=[s.if,s.value,s.resolve],i=(0,C.collectMemberUsage)(e,t);if(!r&&"STATE"===t){const t=(0,C.collectMemberUsage)(e,"TPL");for(const e of t.usedProperties)i.usedProperties.add(e);t.hasNonStaticUsage&&(i.hasNonStaticUsage=!0)}n.set(s,i)}return n}(e,r,arguments.length>3?arguments[3]:void 0),s=new Map;for(const e of Array.from(n.keys()).map((e=>e.name))){var i;s.set(e,(null!==(i=s.get(e))&&void 0!==i?i:0)+1)}const a=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),o=new WeakSet,c=new Map,l=new Map([...new Set(e.map((e=>e.name)))].map((e=>{const t=new Promise(((t,r)=>{c.set(e,{resolve:t,reject:r})}));return t.catch((()=>{})),[e,t]}))),u=async e=>{var r;o.add(e);const i=await t(e);n.delete(e);const a=null!==(r=s.get(e.name))&&void 0!==r?r:0;if(i){if(c.get(e.name).resolve(),s.delete(e.name),0===a)throw new Error(`Duplicated context defined: ${e.name}`)}else 1===a?(c.get(e.name).resolve(),s.delete(e.name)):s.set(e.name,a-1);await p()};let h=a;async function p(){const e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(s,h)).map((e=>e[0])).filter((e=>!o.has(e)));await Promise.all(e.map(u))}const d=p().then((async()=>{n.size>0&&(function(e,t){const r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),s=()=>{let e=!1;for(const[t,s]of r.entries())[...s.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&s()};if(s(),r.size>0)throw new ReferenceError(`Circular ${t} detected: ${Array.from(r.keys()).map((e=>e.name)).join(", ")}`)}(n,r),h=!0,await p());for(const e of c.values())e.resolve()})).catch((e=>{for(const t of c.values())t.reject(e);throw e}));return d.catch((()=>{})),{pendingResult:d,pendingContexts:l}}(e,(e=>this.resolve(e,t,r,n)),this.type,Ie(t));if(Array.isArray(n))for(const e of n){const t=this.routeStackMap.get(e);t?t.add(s):this.routeStackMap.set(e,new Set([s]))}this.pendingStack.push(s)}}onChange(e,t){var r;const n=null===(r=this.data.get(e))||void 0===r?void 0:r.eventTarget;return null==n||n.addEventListener(this.changeEventType,t),()=>{null==n||n.removeEventListener(this.changeEventType,t)}}async waitFor(e){for(const{pendingContexts:t}of this.pendingStack)await Promise.all([...e].map((e=>t.get(e))))}async waitForAll(){for(const{pendingResult:e}of this.pendingStack)await e}mountAsyncData(e){this.data.forEach((t=>{var r;if(t.async&&(!e||null!==(r=this.routeMap.get(e))&&void 0!==r&&r.has(t.name))){if(t.asyncMounted)return void console.error(`Async data "${t.name}" already mounted. This is a bug of Brick Next, please report it.`);t.asyncMounted=!0,t.loading.then((e=>{this.finishLoad(t,e)}))}}))}async resolve(e,t,r,n){if(!await Pt(e,t))return!1;let s,i,a,o,c,l;if(r&&("STATE"===this.type?e.expose:"FORM_STATE"===this.type)&&(s=await _t(r,e.name)),void 0===s){if(e.resolve){const r=(0,u.hasOwnProperty)(e,"value");c=e.track&&r&&(0,u.hasOwnProperty)(e.resolve,"if")&&(0,C.strictCollectMemberUsage)(e.resolve.if,this.type).size>0;const n={transform:"value",...e.resolve};if(o=await Pt(e.resolve,t),(o||c)&&(i=async e=>{var r;return(await st(n,t,{...e,renderId:null===(r=this.rendererContext)||void 0===r?void 0:r.renderId})).value}),o)l=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager","eager"===l?s=await i():"async"===l&&(a=i());else if(!r)return!1}o&&"eager"===l||void 0===e.value||(s=await bt(e.value,t))}if(this.data.has(e.name))throw new Error(`${this.type} '${e.name}' has already been declared`);const h={name:e.name,value:s,eventTarget:new xe,useResolve:o,load:i,loaded:"eager"===l,loading:a,async:"async"===l,deps:[]};if("lazy"===l){const{trigger:t}=e.resolve;var p;t&&Bn.includes(t)&&(null===(p=this.rendererContext)||void 0===p||p.registerArbitraryLifeCycle(t,(()=>{this.updateValue(e.name,void 0,"load")})))}if(e.onChange&&h.eventTarget.addEventListener(this.changeEventType,fr(e.onChange,t)),e.track){const r=(0,C.strictCollectMemberUsage)(c?[e.resolve,e.value]:i?e.resolve:e.value,this.type);!i&&(h.deps=[...r]);for(const n of r)this.onChange(n,this.batchAddListener((()=>{h.useResolve=c?At(e.resolve,t):!!i,h.useResolve?this.updateValue(e.name,{cache:"default"},"refresh"):this.updateValue(e.name,wt(e.value,t),"replace")}),e))}if(h.eventTarget.addEventListener(this.changeEventType,(t=>{this.notifyRealTimeDataChange(e.name,t.detail)})),this.data.set(e.name,h),Array.isArray(n))for(const t of n){const r=this.routeMap.get(t);r?r.add(e.name):this.routeMap.set(t,new Set([e.name]))}return!0}disposeDataInRoutes(e){for(const t of e){const e=this.routeMap.get(t);if(void 0!==e){for(const t of e)this.data.delete(t);this.routeMap.delete(t)}const r=this.routeStackMap.get(t);void 0!==r&&((0,f.pull)(this.pendingStack,...r),this.routeStackMap.delete(t))}}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}function jn(e,t,r,n){const{reversedProxies:s,asyncHostPropertyEntries:i,externalSlots:a,tplStateStoreId:o,hostBrick:c}=e;let l;if(t&&s){const e=s.properties.get(t);e&&(y=i,l=e.map((e=>{let{from:t,to:r}=e;const n=y.filter((e=>e[0]===t));if(n.length>0&&r.refProperty)return[r.refProperty,_t(n,t),!0]})).filter(Boolean));const o=s.slots.get(t);if(o&&n)throw new Error(`Can not have proxied slot ref when the ref target has a slot element child, check your template "${c.type}" and ref "${t}"`);if(o&&a){const e=new Map;for(const{from:t,to:n}of o){var h,p,d,m;const s=null!==(h=null===(p=a[t])||void 0===p?void 0:p.bricks)&&void 0!==h?h:[];if(!s.length)continue;const i=null!==(d=n.refSlot)&&void 0!==d?d:t;let o=e.get(i);if(!o){o=[];const t=(0,u.hasOwnProperty)(r,i)?r[i].bricks.length+1:1;for(let e=0;e<t;e+=1)o.push([]);e.set(i,o)}const l=null!==(m=n.refPosition)&&void 0!==m?m:-1,y=(0,u.hasOwnProperty)(c.runtimeContext,"forEachItem");o[(0,f.clamp)(l<0?o.length+l:l,0,o.length-1)].push(...y?Un(s,c.runtimeContext.forEachItem,c.runtimeContext.forEachIndex,c.runtimeContext.forEachSize):s)}for(const[t,n]of e.entries()){(0,u.hasOwnProperty)(r,t)||(r[t]={type:"bricks",bricks:[]});const e=r[t];e.bricks=n.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[t]}}}var y;return{[$t]:l,[Ht]:o}}function Un(e,t,r,n){return e.map((e=>{var s;let{children:i,slots:a,...o}=e;return{...o,[Wt]:t,[Vt]:r,[zt]:n,slots:":forEach"===o.brick?us(i,a):Object.fromEntries(Object.entries(null!==(s=us(i,a))&&void 0!==s?s:{}).map((e=>{let[s,i]=e;return[s,"routes"===i.type?{type:"routes",routes:Yn(i.routes,t,r,n)}:{type:"bricks",bricks:Un(i.bricks,t,r,n)}]})))}}))}function Yn(e,t,r,n){return e.map((e=>"routes"===e.type?{...e,routes:Yn(e.routes,t,r,n)}:"redirect"===e.type?e:{...e,bricks:Un(e.bricks,t,r,n)}))}function $n(e,t,r){var n,s,i,a;if(null!=e.if&&!e.if||"string"==typeof e.if)throw new Error(`Can not use "if" in a slot currently, check your template "${t.hostBrick.type}"`);const o=String(null!==(n=null===(s=e.properties)||void 0===s?void 0:s.name)&&void 0!==n?n:"");if((0,_.isEvaluable)(o))throw new Error(`Can not use an expression as slot name "${o}" currently, check your template "${t.hostBrick.type}"`);if(t.usedSlots.has(o))throw new Error(`Can not have multiple slots with the same name "${o}", check your template "${t.hostBrick.type}"`);if(t.usedSlots.add(o),t.externalSlots&&(0,u.hasOwnProperty)(t.externalSlots,o)){var c;const e=null!==(c=t.externalSlots[o].bricks)&&void 0!==c?c:[];if(e.length>0){const r=t.hostBrick.runtimeContext;return(0,u.hasOwnProperty)(r,"forEachItem")?Un(e,r.forEachItem,r.forEachIndex,r.forEachSize):e}}const l=us(e.children,e.slots);return(null!==(i=null==l||null===(a=l[""])||void 0===a?void 0:a.bricks)&&void 0!==i?i:[]).flatMap((e=>r(e,t)))}function Hn(e,t){function r(e){return(0,u.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{let[t,s]=e;return(0,u.isObject)(s)&&"useBrick"===t?Array.isArray(s)?[t,s.flatMap((e=>n(e)))]:[t,n(s)]:[t,r(s)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e,s){if("slot"===e.brick)return null==s||s(),$n(e,t,(e=>n(e)));const{properties:i,slots:a,children:o,...c}=e,l=us(o,a);let u=!1;const h=()=>{u=!0},p=Object.fromEntries(Object.entries(null!=l?l:{}).map((e=>{var t;let[r,s]=e;return[r,{type:"bricks",bricks:(null!==(t=s.bricks)&&void 0!==t?t:[]).flatMap((e=>n(e,h)))}]})));return{...c,properties:r(i),slots:p,...jn(t,c.ref,p,u)}}return r(e)}function Wn(e,t,r){if(null===e.if&&delete e.if,"slot"===e.brick)return null==r||r(),$n(e,t,Wn);const{properties:n,slots:s,children:i,...a}=e,o=us(i,s);let c=!1;const l=()=>{c=!0},u=Object.fromEntries(Object.entries(null!=o?o:{}).map((e=>{var r;let[n,s]=e;return[n,{type:"bricks",bricks:(null!==(r=s.bricks)&&void 0!==r?r:[]).flatMap((e=>Wn(e,t,l)))}]})));return{...a,properties:Hn(n,t),slots:u,...jn(t,a.ref,u,c)}}const Vn="form-renderer.form-renderer",zn=Symbol.for("form.stateStoreId"),qn=["forms.general-form","form.general-form","eo-form"];function Kn(e,t,r){const{id:n,bricks:s,events:i,context:a,mountPoint:o,instanceId:c}=e;let{brick:l,properties:h}=e;const p=t.find((e=>e.fieldId===n));if(p){const e=function(e){let t;const r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:{...r,...n(),placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}}};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:{...r,...n()}};break;case"FLOAT":t={brick:"forms.general-input-number",properties:{...r,...n(),placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUM":t={brick:"forms.general-select",properties:{...r,...n(),options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"ENUMS":t={brick:"forms.general-select",properties:{...r,...n(),mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}}};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:{...r,...n(),placeholder:e.description}};break;case"IP":t={brick:"forms.general-input",properties:{...r,...n(),placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}}};break;case"JSON":t={brick:"forms.general-textarea",properties:{...r}};break;case"ARRAY":t={brick:"forms.general-select",properties:{...r}};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:{...r,...n()}};break;default:t={brick:"forms.general-input",properties:{...r,...n(),placeholder:e.description}}}return t}(p);l||(l=e.brick),h={...e.properties,...h}}const d={brick:l,properties:h,iid:c,slot:o,events:i,context:a,children:Gn(s,t,r),[zn]:r};return(0,u.hasOwnProperty)(e,"if")&&(d.if=e.if),d}function Gn(e,t,r){if(Array.isArray(e))return e.map((e=>Kn(e,t,r)))}var Jn=new WeakSet;class Xn extends HTMLElement{constructor(){super(...arguments),(0,E.A)(this,Jn),(0,s.A)(this,"renderRoot",void 0)}get $$typeof(){return"formRenderer"}validate(){(0,T.A)(Jn,this,Zn).call(this,"validate")}setInitValue(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];(0,T.A)(Jn,this,Zn).call(this,"setInitValue",t)}resetFields(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];(0,T.A)(Jn,this,Zn).call(this,"resetFields",t)}getFieldsValue(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,T.A)(Jn,this,Zn).call(this,"getFieldsValue",t)}}function Zn(e){var t,r;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const s=!1!==this.renderRoot?null===(t=this.firstElementChild)||void 0===t?void 0:t.firstElementChild:this.firstElementChild,i=null==s||null===(r=s.tagName)||void 0===r?void 0:r.toLowerCase();if(qn.includes(i))return s[e](...n);console.error(`no ${e} method in the container element`,{container:i})}class Qn extends Error{constructor(e){super(e),this.name="PageError",Error.captureStackTrace&&Error.captureStackTrace(this,l.BrickLoadError)}}async function es(e,t,r){const{title:n,variant:s,showLink:i,showDescription:a}=function(e){var t,r;return e instanceof Qn?"page blocked"===e.message?{showLink:"home",title:c.i18n.t(`${Xt}:${Kt.LICENSE_BLOCKED}`),variant:"no-permission"}:"app not found"===e.message?{showLink:"home",title:c.i18n.t(`${Xt}:${Kt.APP_NOT_FOUND}`),variant:"no-permission"}:{showLink:"home",variant:"not-found",title:c.i18n.t(`${Xt}:${Kt.PAGE_NOT_FOUND}`)}:e instanceof l.BrickLoadError||e instanceof Error&&"ChunkLoadError"===e.name||e instanceof Event&&"error"===e.type&&e.target instanceof HTMLScriptElement?{showDescription:!0,title:c.i18n.t(`${Xt}:${Kt.NETWORK_ERROR}`),variant:"internet-disconnected",showLink:"reload"}:e instanceof k.HttpResponseError&&403===(null===(t=e.response)||void 0===t?void 0:t.status)?{showLink:"previous",showDescription:!0,title:c.i18n.t(`${Xt}:${Kt.NO_PERMISSION}`),variant:"no-permission"}:e instanceof k.HttpResponseError&&"200000"===(null===(r=e.responseJson)||void 0===r?void 0:r.code)?{showDescription:!0,title:c.i18n.t(`${Xt}:${Kt.LICENSE_EXPIRED}`),variant:"license-expired"}:{showLink:"previous",showDescription:!0,title:c.i18n.t(`${Xt}:${Kt.UNKNOWN_ERROR}`),variant:"unknown-error"}}(e);if(r){var o;const r=null!==(o=Ci().error)&&void 0!==o?o:"illustrations.error-message";if(!1!==r){const o="eo-link",c=(i?[r,o]:[r]).filter((e=>!customElements.get(e)));try{await Promise.race([(0,l.loadBricksImperatively)(c,_i()),new Promise(((e,t)=>setTimeout((()=>{t(new Error("timeout"))}),3e3)))]);const u={tag:Dr.BRICK,type:r,properties:{errorTitle:n,description:a?rr(e):void 0,variant:s,dataset:{errorBoundary:""}},runtimeContext:null,return:t};return i&&(u.child=ts(i,o,u,"")),u}catch(e){console.error("Failed to load brick:",c.join(", "),e)}}}const u=r&&!!customElements.get("easyops-default-error"),h={tag:Dr.BRICK,type:u?"easyops-default-error":"div",properties:{errorTitle:n,dataset:{errorBoundary:""},style:{color:"var(--color-error)"}},runtimeContext:null,return:t},p={tag:Dr.BRICK,type:"div",properties:{textContent:u?a?rr(e):"":a?`${n}: ${rr(e)}`:n},runtimeContext:null,return:h};return h.child=p,r&&i&&(p.sibling=ts(i,"a",h,u?"link":"")),h}function ts(e,t,r,n){return{tag:Dr.BRICK,type:t,slotId:n,properties:{textContent:"home"===e?c.i18n.t(`${Xt}:${Kt.GO_BACK_HOME}`):"reload"===e?c.i18n.t(`${Xt}:${Kt.RELOAD}`):c.i18n.t(`${Xt}:${Kt.GO_BACK_TO_PREVIOUS_PAGE}`),href:"home"===e?d():"reload"===e?location.href:void 0},events:"previous"===e?{click:{action:"history.goBack"}}:void 0,runtimeContext:null,return:r}}async function rs(e,t,r,n,s,i,a,o,c){const u=await async function(e,t){for(const r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: "+typeof r.path);const e=Yt(r,t.app.homepage,t.location.pathname);if(e&&await Pt(r,t))return t.app.noAuthGuard||r.public||null==Si||!Si.auth||Si.auth.isLoggedIn()?{match:e,route:r}:"unauthenticated"}return"missed"}(t,r),h={blockingList:[]},p=h.menuRequestNode={return:i};switch(u){case"missed":break;case"unauthenticated":h.unauthenticated=!0;break;default:{var d;const i=h.route=u.route;h.path=u.match.path;const y={...r,match:u.match};i.iid&&(f=i.iid,m=u.match,sn.set(f,m)),o&&y.ctxStore.disposeDataInRoutes(t);const g=s.concat(i);y.ctxStore.define(i.context,y,void 0,g),y.pendingPermissionsPreCheck.push(null==Si||null===(d=Si.checkPermissions)||void 0===d?void 0:d.preCheckPermissionsForBrickOrRoute(i,(e=>bt(e,y))));const{preLoadBricks:v}=i;if(Array.isArray(v)&&h.blockingList.push((0,l.loadBricksImperatively)(v,_i())),"redirect"===i.type){let e;if(e="string"==typeof i.redirect?await bt(i.redirect,y):(await st({transform:"redirect",...i.redirect},y)).redirect,"string"!=typeof e)throw console.error("Unexpected redirect result:",e),new Error("Unexpected type of redirect result: "+typeof e);h.redirect={path:e}}else{const r=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return bt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(i.menu,y);r&&(p.request=r),o||n.memoizeMenuRequestNode(t,p);const s=(0,C.strictCollectMemberUsage)(i.context,"PROCESSORS",2);let u;s.size>0&&h.blockingList.push(hs((0,l.loadProcessorsImperatively)(s,_i()),"processors",[...s].join(", "),n.unknownBricks)),u="routes"===i.type?await rs(e,i.routes,y,n,g,p,a,void 0,c):await ns(e,i.bricks,y,n,g,p,a,void 0,c),cs(h,u),ls(p,u.menuRequestNode)}}}var f,m;return h}async function ns(e,t,r,n,s,i,a,o,c){!function(e,t){function r(e){if((0,u.isObject)(e)&&"function"!=typeof e)if(Array.isArray(e))e.map(r);else for(const[t,s]of Object.entries(e))(0,u.isObject)(s)&&"useBrick"===t?Array.isArray(s)?s.forEach((e=>n(e,!0))):n(s,!0,!0):r(s)}function n(e,s,i){if(s&&(e[hn]=t),r(e.properties),!i)return;const a=us(e.children,e.slots);for(const e of Object.values(null!=a?a:{}))for(const t of null!==(o=e.bricks)&&void 0!==o?o:[]){var o;n(t,s)}}for(const t of e)n(t)}(t,r);const l={blockingList:[]};return(await Promise.all(t.map((t=>ss(e,t,r,n,s,i,a,o&&new Map(o),c))))).forEach((e=>{cs(l,e)})),l}async function ss(e,t,r,n,s,i,a){let o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:new Map,c=arguments.length>8?arguments[8]:void 0;try{return await async function(e,t,r,n,s,i,a,o,c){var h,p;const d={blockingList:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),d;const{if:m,permissionsPreCheck:g,...v}=t;if(function(e){return"string"==typeof e?(0,_.isTrackAll)(e):ct(e)&&(0,_.isTrackAll)(lt(e))}(m))return ss(e,{brick:":if",iid:t.iid,dataSource:m,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[v]}},...Object.getOwnPropertySymbols(t).reduce(((e,r)=>({...e,[r]:t[r]})),{})},r,n,s,i,a,o,c);const b=t[Ht],w=t[zn],x={...r,tplStateStoreId:b,formStateStoreId:w};(0,u.hasOwnProperty)(t,Wt)&&(x.forEachItem=t[Wt],x.forEachIndex=t[Vt],x.forEachSize=t[zt]);const S=Ie(x),{context:P}=t;if(Array.isArray(P)&&P.length>0&&(Oe(S,"Defining context on bricks","check your brick:",t),S||x.ctxStore.define(P,x)),x.pendingPermissionsPreCheck.push(null==Si||null===(h=Si.checkPermissions)||void 0===h?void 0:h.preCheckPermissionsForBrickOrRoute(t,(e=>bt(e,x)))),!await async function(e,t){return(0,u.isObject)(e.if)&&!ct(e.if)?Et(await st(e.if,t)):Pt(e,t)}(t,x))return d;const A=t.brick;if(A.startsWith(":")){var E;!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error(`Unknown storyboard control node: "${e}"`)}(A);const{dataSource:r}=t,{contextNames:c,stateNames:l}=kt(r),h=!(!c&&!l),p=async(h,p,d)=>{var f;const m=await bt(r,h);d&&Lt(h,[{contextNames:c,stateNames:l,propValue:r}],p);const y=":forEach"===A?"":":switch"===A?String(m):m?"":"else",g=us(t.children,t.slots),v=g&&(0,u.hasOwnProperty)(g,y)&&(null===(f=g[y])||void 0===f?void 0:f.bricks),b={blockingList:[]},w={tag:Dr.ABSTRACT,return:e,iid:t.iid};if(b.node=w,!Array.isArray(v))return b;let x;switch(A){case":forEach":if(!Array.isArray(m))break;x=await async function(e,t,r,n,s,i,a,o,c,l){const u={blockingList:[]},h=t.length,p=await Promise.all(t.map(((t,u)=>Promise.all(r.map((r=>ss(e,r,{...n,forEachItem:t,forEachIndex:u,forEachSize:h},s,i,a,o,c&&new Map(c),l)))))));return p.flat().forEach((e=>{cs(u,e)})),u}(w,m,v,h,n,s,i,a,o,p);break;case":if":case":switch":x=await ns(w,v,h,n,s,i,a,o,p)}return x&&(w.child=x.node,cs(b,{...x,node:void 0})),b},d=async e=>{let{type:r,runtimeContext:n,tplStateStoreScope:s,formStateStoreScope:i}=e,a=!1;const o={disposes:[],listener:()=>{a=!0}};let c,l=0,u=!0;for(;u||a;){if(a=!1,c=await p(n,o,u&&"initial"===r),!a&&"rerender"===r){const e=[...s,...i];await as(c,n,[n.ctxStore,...e])}if(o.disposes.forEach((e=>e())),o.disposes.length=0,u=!1,++l>10)throw new Error(`Maximum rerender stack overflowed (iid: ${t.iid})`)}return c};let m=await d({type:"initial",runtimeContext:x});const{onMount:y,onUnmount:g}=null!==(E=t.lifeCycle)&&void 0!==E?E:{};if(h){var T;let t=0;const s=async()=>{if(!e.mounted||e.disposed)return;const r=++t,[s,i,a]=os(x),o=await d({type:"rerender",runtimeContext:s,tplStateStoreScope:i,formStateStoreScope:a});if(t===r&&e.mounted&&!e.disposed){g&&fr(g,x)(new CustomEvent("unmount",{detail:{rerender:!0}})),n.reRender(e,o.node,m.node),m=o,y&&fr(y,s)(new CustomEvent("mount",{detail:{rerender:!0}}));for(const e of[...i,...a])e.mountAsyncData()}},i=(0,f.debounce)(s,0,{leading:!0,trailing:!0}),a=e.tag===Dr.ROOT?null:e,o=a?null!==(T=a.disposes)&&void 0!==T?T:a.disposes=[]:[];if(c)for(const e of c)o.push(x.ctxStore.onChange(e,i));if(l)for(const e of l){const t=De(x,"STATE",`: "${r}"`);o.push(t.onChange(e,i))}}return y&&n.registerArbitraryLifeCycle("onMount",(()=>{fr(y,x)(new CustomEvent("mount",{detail:{rerender:!1}}))})),g&&n.registerArbitraryLifeCycle("onUnmount",(()=>{fr(g,x)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),m}/\.tpl-/.test(A)&&!Me.get(A)&&await hs((0,l.loadBricksImperatively)([A],_i()),"brick",A,n.unknownBricks);const k=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){const r=`${t}.${e}`;if(Me.get(r))return r}return!!Me.get(e)&&e}(A,null===(p=x.app)||void 0===p?void 0:p.id);if(k){var I;const e=null!==(I=o.get(k))&&void 0!==I?I:0;if(e>=10)throw new Error(`Maximum custom template stack overflowed: "${k}"`);o.set(k,e+1)}else A.includes("-")&&!customElements.get(A)&&(A===Vn?customElements.get(Vn)||customElements.define(Vn,Xn):d.blockingList.push(hs((0,l.enqueueStableLoadBricks)([A],_i()),"brick",A,n.unknownBricks)));let O,L;if(A===Vn){var N,M;({formData:O,...L}=null!==(N=t.properties)&&void 0!==N?N:{}),null!==(M=t.properties)&&void 0!==M&&M.compute&&(O=await bt(O,x))}else{if(x.inUseBrick){const e=t.transform;e&&(Oe(S,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',t),S||(L={...t.properties,...e}))}null!=L||(L=t.properties)}const D=[],R=function(e,t,r){return(0,u.isObject)(e)?Object.entries(e).map((e=>{let[n,s]=e;const{contextNames:i,stateNames:a,formStateNames:o}=kt(s);return(i||a||o)&&r.push({contextNames:i,stateNames:a,formStateNames:o,propName:n,propValue:s}),[n,bt(s,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?mt.USE_BRICK:mt.INITIAL})]})):[]}(L,x,D),B=t[$t];B&&R.push(...B);const F="script"===A;if(F||"link"===A){const e=await Ct(R);if(F?e.src:"stylesheet"===e.rel&&e.href){var j;const t=null!==(j=window.PUBLIC_ROOT)&&void 0!==j?j:"";if(F){const{src:r,...n}=e;await hs((0,l.loadScript)(r,t,n),"script",r,"silent")}else{const{href:r,...n}=e;await hs((0,l.loadStyle)(r,t,n),"stylesheet",r,"silent")}return d}}const U={tag:Dr.BRICK,type:k||A,return:e,slotId:a,events:t.events,runtimeContext:x,portal:t.portal,iid:t.iid,ref:t.ref};d.node=U;const Y=(0,C.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);Y.size>0&&d.blockingList.push(hs((0,l.loadProcessorsImperatively)(Y,_i()),"processors",[...Y].join(", "),n.unknownBricks));const $=[];Lt(x,D,c);$.push((async()=>{U.properties=await Ct(R),function(e,t){for(const n of t){var r;const t=()=>{e.element&&Ot(e.element,{[n.propName]:n.propValue},e.runtimeContext)};if(null!==(r=e.disposes)&&void 0!==r||(e.disposes=[]),n.contextNames)for(const r of n.contextNames)e.disposes.push(e.runtimeContext.ctxStore.onChange(r,t));if(n.stateNames){const r=De(e.runtimeContext,"STATE",`: "${n.propValue}"`);for(const s of n.stateNames)e.disposes.push(r.onChange(s,t))}if(n.formStateNames){const r=Xe(e.runtimeContext,"FORM_STATE",`: "${n.propValue}"`);for(const s of n.formStateNames)e.disposes.push(r.onChange(s,t))}}}(U,D)})()),n.registerBrickLifeCycle(U,t.lifeCycle);let H,W=t;k?W=function(e,t,r,n,s){var i;const a=(0,f.uniqueId)("tpl-state-"),o={...r.runtimeContext,tplStateStoreId:a};delete o.forEachItem,delete o.forEachIndex,delete o.forEachSize,delete o.formStateStoreId;const c=new Fn("STATE",r,s,a);o.tplStateStoreMap.set(a,c),o.tplStateStoreScope&&o.tplStateStoreScope.push(c);const{bricks:l,proxy:u,state:h,contracts:p}=Me.get(e);null==Si||null===(i=Si.flowApi)||void 0===i||i.collectWidgetContract(p),c.define(h,o,n);const{slots:d,children:m,...y}=t,g={...y,brick:e};r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:a,proxy:u};const v={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(const[e,t]of Object.entries(u.properties)){let r=v.properties.get(t.ref);r||(r=[],v.properties.set(t.ref,r)),r.push({from:e,to:t})}if(null!=u&&u.slots)for(const[e,t]of Object.entries(u.slots)){let r=v.slots.get(t.ref);r||(r=[],v.slots.set(t.ref,r)),r.push({from:e,to:t})}const b={reversedProxies:v,asyncHostPropertyEntries:n,externalSlots:us(m,d),tplStateStoreId:a,hostBrick:r,usedSlots:new Set};return g.slots={"":{type:"bricks",bricks:l.flatMap((e=>Wn(e,b)))}},g}(k,t,U,R,n):A===Vn&&(W=function(e,t,r,n,s){var i,a;const o="string"==typeof e?JSON.parse(e):e,c=(0,f.uniqueId)("form-state-"),l={...r.runtimeContext,formStateStoreId:c};delete l.forEachItem,delete l.forEachIndex,delete l.forEachSize,delete l.tplStateStoreId;const h=new Fn("FORM_STATE",void 0,s,c);l.formStateStoreMap.set(c,h),l.formStateStoreScope&&l.formStateStoreScope.push(h);const p=null!==(i=o.context)&&void 0!==i?i:[];p.some((e=>"params"===e.name))||p.push({name:"params"}),h.define(p,l,n);const d=Kn(o.formSchema,o.fields,c);return qn.includes(d.brick)&&t.events&&(d.events=function(e,t){const r=null!=e?e:{};for(const[e,n]of Object.entries(t))r[e]=(0,u.hasOwnProperty)(r,e)?[r[e],n].flat():n;return r}(d.events,t.events)),"boolean"!=typeof(null===(a=t.properties)||void 0===a?void 0:a.renderRoot)||t.properties.renderRoot?{...t,slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[d]}]}:{...t,slots:void 0,children:[d]}}(O,t,U,R,n)),W.portal&&(U.slotId=void 0),k?(H={...x},delete H.forEachItem,delete H.forEachIndex,delete H.forEachSize):H=x;return $.push((async()=>{const e=us(W.children,W.slots);if(!e)return;const t=new Map,r=await Promise.all(Object.entries(e).map((async(e,r)=>{let[a,l]=e;if("routes"!==l.type)return ns(U,l.bricks,H,n,s,i,a,o,c);let u={blockingList:[]};const h={tag:Dr.ABSTRACT,return:U};u.node=h;const p=s[s.length-1];null!=p&&p.incrementalSubRoutes&&(t.set(r,a),n.performIncrementalRender(l,s,(async(e,t)=>{const{homepage:r}=H.app,{pathname:o}=e;if(!y(r,o)||!s.every((e=>{let n,s;return(n=Yt(e,r,t.pathname))&&(s=Yt(e,r,o))&&(e!==p||function(e,t){if((0,f.isEqual)(e,t))return!0;const r=(e,t)=>String(Number(t))===t,n=(0,f.omitBy)(e,r),s=(0,f.omitBy)(t,r);return(0,f.isEqual)(n,s)}(n.params,s.params))})))return!1;const[c,h,d]=os({...H,location:e,query:new URLSearchParams(e.search)});let m,g=!1,v=[];const b={blockingList:[]},w={tag:Dr.ABSTRACT,return:U};b.node=w;try{if(m=await rs(w,l.routes,c,n,s,i,a,!0),m.route){if(n.reBailout(m))return!0;v=[...h,...d],await as(m,c,[c.ctxStore,...v])}}catch(e){console.error("Incremental sub-router failed:",e);const t=await n.reCatch(e,w);if(!t)return!0;({failed:g,output:m}=t)}if(U.disposed)return!0;if(w.child=m.node,cs(b,{...m,node:void 0}),await n.reMergeMenuRequestNodes(i,l.routes,m.menuRequestNode),n.reRender(U,w,u.node),u=b,!g){c.ctxStore.mountAsyncData(m.route);for(const e of v)e.mountAsyncData()}return!0})));const m=await rs(h,l.routes,H,n,s,i,a,void 0,c);return h.child=m.node,cs(d,{...m,node:void 0}),ls(i,d.menuRequestNode=m.menuRequestNode),u}))),a={...d,node:void 0,blockingList:[],menuRequestNode:void 0};r.forEach((e=>{cs(a,e),function(e,t){const r=t.menuRequestNode;if(r)if(e.menuRequestNode){let t=e.menuRequestNode;for(;t.sibling;)t=t.sibling;t.sibling=r}else e.menuRequestNode=r}(a,e)})),a.node&&(U.child=a.node),cs(d,{...a,node:void 0}),ls(i,d.menuRequestNode=a.menuRequestNode)})()),await Promise.all($),d}(e,t,r,n,s,i,a,o,c)}catch(r){if(t.errorBoundary)return console.error("Error caught by error boundary:",r),{node:await es(r,e),blockingList:[]};throw r}}function is(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function as(e,t,r){return(0,l.flushStableLoadBricks)(),Promise.all([...e.blockingList,...r.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function os(e){const t=[],r=[];return[{...e,tplStateStoreScope:t,formStateStoreScope:r},t,r]}function cs(e,t){const{blockingList:r,node:n,menuRequestNode:s,...i}=t;if(e.blockingList.push(...r),n)if(e.node){let t=e.node;for(;t.sibling;)t=t.sibling;t.sibling=n}else e.node=n;Object.assign(e,i)}function ls(e,t){if(t)if(e.child){let r=e.child;for(;r.sibling;)r=r.sibling;r.sibling=t}else e.child=t}function us(e,t){let r=t;if(Array.isArray(e)&&!r){r={};for(const{slot:t,...n}of e){const e=null!=t?t:"";(0,u.hasOwnProperty)(r,e)||(r[e]={type:"bricks",bricks:[]}),r[e].bricks.push(n)}}return r}function hs(e,t,r,n){return"silent"===n?e.catch((e=>{console.error('Load %s "%s" failed:',t,r,e)})):e}let ps,ds,fs;function ms(){if(!ps){if(ps={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){ps.isInIframe=!0;try{if(window.origin===window.parent.origin){ps.isInIframeOfSameSite=!0;const e="/next/"===d(),t=window.parent.location.pathname,r=t.startsWith("/next/");ps.isInIframeOfNext=!(Number(e)^Number(r));const n=r?"/next":"";ps.isInIframeOfVisualBuilder=t.startsWith(`${n}/visual-builder/`)||t.startsWith(`${n}/visual-builder-`),ps.isInIframeOfLegacyConsole=e&&!r}}catch{}}Object.freeze(ps)}return ps}function ys(e){var t;if(e.$$registerCustomTemplateProcessed)return;e.$$registerCustomTemplateProcessed=!0;const r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(const t of r){const r=t.name.includes(".")?t.name:`${e.app.id}.${t.name}`;Me.define(r,t)}}function gs(e){let t;t="8.2"===e?"v8-2":"v8",document.documentElement.dataset.ui=t}const vs="basic.show-watermark";function bs(e){return!!e&&(e instanceof l.BrickLoadError||e instanceof k.HttpFetchError||e instanceof Error&&"ChunkLoadError"===e.name||e instanceof Event&&"error"===e.type&&e.target instanceof HTMLScriptElement)}const ws="reload-for-error-count",xs=2;function Ss(e){if(/upchat/i.test(navigator.userAgent)&&bs(e)){var t;const e=+(null!==(t=sessionStorage.getItem(ws))&&void 0!==t?t:0);if(e<xs)return sessionStorage.setItem(ws,String(e+1)),!0;Ps()}return!1}function Ps(){sessionStorage.removeItem(ws)}var As=new WeakMap,Es=new WeakMap,Ts=new WeakMap,ks=new WeakMap,_s=new WeakMap,Cs=new WeakMap,Is=new WeakMap,Os=new WeakMap,Ls=new WeakMap,Ns=new WeakMap,Ms=new WeakMap,Ds=new WeakMap,Rs=new WeakSet;class Bs{constructor(e){(0,E.A)(this,Rs),(0,i.A)(this,As,void 0),(0,i.A)(this,Es,!1),(0,i.A)(this,Ts,void 0),(0,i.A)(this,ks,void 0),(0,i.A)(this,_s,void 0),(0,i.A)(this,Cs,new Set),(0,i.A)(this,Is,0),(0,i.A)(this,Os,void 0),(0,i.A)(this,Ls,void 0),(0,i.A)(this,Ns,void 0),(0,i.A)(this,Ms,void 0),(0,i.A)(this,Ds,!1),(0,a.A)(As,this,e);const t=A();window.addEventListener("beforeunload",(e=>{(0,T.A)(Rs,this,Fs).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,T.A)(Rs,this,Fs).call(this,{location:e,action:t})))}getRenderId(){return(0,o.A)(Os,this)}getRuntimeContext(){return(0,o.A)(ks,this)}getRecentApps(){return{currentApp:(0,o.A)(Ls,this),previousApp:(0,o.A)(Ns,this)}}getNavConfig(){return(0,o.A)(Ms,this)}bootstrap(){window.AbortController&&(ds=new AbortController,k.http.interceptors.request.use((e=>{var t;return{...e,options:{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:ds.signal,...e.options}}})));const e=A();let t=e.location;return e.listen(((e,r)=>{const n=t;t=e,(0,o.A)(Es,this)?(0,a.A)(Ts,this,{location:e,prevLocation:n,action:r}):(0,T.A)(Rs,this,Us).call(this,{location:e,prevLocation:n,action:r}).catch(or)})),(0,T.A)(Rs,this,Us).call(this,{location:e.location})}}function Fs(e){var t;const r=A(),n=r.getBlockMessage();null===(t=(0,o.A)(_s,this))||void 0===t||t.dispatchBeforePageLeave(e);const s=r.getBlockMessage();return!n&&s&&r.unblock(),s}function js(e,t,r){var n,s;if((0,a.A)(Is,this,(n=(0,o.A)(Is,this),s=n++,n)),s>10){const t=`Infinite redirect detected: from "${r.pathname}${r.search}${r.hash}" to "${e}"`;throw new Error(t)}A().replace(e,t)}async function Us(e){(0,a.A)(Es,this,!0);try{await(0,T.A)(Rs,this,Ys).call(this,e)}finally{if((0,a.A)(Es,this,!1),(0,o.A)(Ts,this)){const e=(0,o.A)(Ts,this);(0,a.A)(Ts,this,void 0),await(0,T.A)(Rs,this,Us).call(this,e)}}}async function Ys(e){let{location:t,prevLocation:r,action:n}=e;if(r){var s,i,a,c;let e;const u={hash:void 0,state:void 0};var l;if(void 0!==t.key&&("POP"!==n||void 0!==r.key&&!1!==(null===(s=r.state)||void 0===s?void 0:s.notify))||(u.key=void 0),((0,p.locationsAreEqual)({...r,...u},{...t,...u})||"POP"!==n&&!1===(null===(i=t.state)||void 0===i?void 0:i.notify))&&(e=!0),e||null!==(a=t.state)&&void 0!==a&&a.noIncremental||(0,o.A)(Ds,this)||(e=await(null===(l=(0,o.A)(_s,this))||void 0===l?void 0:l.didPerformIncrementalRender(t,r))),e)return;if(ds&&(ds.abort(),ds=new AbortController),null===(c=(0,o.A)(_s,this))||void 0===c||c.dispatchPageLeave(),"POP"===n&&g(m((0,o.A)(As,this),t.pathname)))return void window.location.reload();H("locationChange")}return(0,T.A)(Rs,this,$s).call(this,t,!r)}async function $s(e,t){var r,n,s,i,c,u;const h=(0,a.A)(Os,this,(0,f.uniqueId)("render-id-"));let p=null==Si||null===(r=Si.auth)||void 0===r||null===(n=r.isBlockedPath)||void 0===n?void 0:n.call(r,e.pathname);et=new WeakSet,nt.clear(),null==Si||null===(s=Si.flowApi)||void 0===s||s.clearCollectWidgetContract(),A().unblock();const d=null==Si||null===(i=Si.pageView)||void 0===i?void 0:i.create(),y=p?void 0:m((0,o.A)(As,this),e.pathname),g=null===(c=(0,o.A)(ks,this))||void 0===c?void 0:c.app,v=null==y||null===(u=y.app)||void 0===u?void 0:u.id;window.BOOTSTRAP_UNION_FILE&&v&&v!==(null==g?void 0:g.id)&&function(e){const{appId:t,version:r}=e;window.APP_ROOT_TPL&&(window.APP_ID=t,window.APP_ROOT=window.APP_ROOT_TPL.replace("{id}",t).replace("{version}",r))}({appId:v,version:y.app.currentVersion}),null!=y&&y.app&&await async function(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=async function(e){var t;await(null==Si||null===(t=Si.fulfilStoryboard)||void 0===t?void 0:t.call(Si,e)),M(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}(e)),e.$$fulfilling}(y);const b=(0,a.A)(Ls,this,null==y?void 0:y.app);var w,x,S,P;b&&(null==y||null===(w=y.meta)||void 0===w||null===(w=w.blackList)||void 0===w||null===(x=w.forEach)||void 0===x||x.call(w,(e=>{var t,r;let n=e&&(e.to||e.url);if(n&&"string"==typeof n){if(n=n.split("?")[0].replace(/\${\s*(?:(?:PATH|CTX)\.)?(\w+)\s*}/g,":$1"),e.to)try{n=wt(n,{app:b})}catch(e){console.error(e)}else n=n.replace(/^\/next\//,"/");n&&(null==Si||null===(t=Si.auth)||void 0===t||null===(r=t.addPathToBlackList)||void 0===r||r.call(t,n))}})),p=null==Si||null===(S=Si.auth)||void 0===S||null===(P=S.isBlockedPath)||void 0===P?void 0:P.call(S,e.pathname)),function(){var e,t,r,n,s,i,a,o;const c=Ai().getFeatureFlags(),u=Ai().getMiscSettings();if(!c["show-watermark"])return;const h="0.0.0"===(null===(e=window.APP_ROOT)||void 0===e||null===(e=e.match(/versions\/([^/]+)\//))||void 0===e?void 0:e[1])||"0.0.0"===(null===(t=window.APP_ROOT)||void 0===t||null===(t=t.match(/micro-apps\/(?:v2|v3)\/[^/]+\/([^/]+)/))||void 0===t?void 0:t[1]),p=null!==(r=null==Si||null===(n=Si.auth)||void 0===n||null===(n=n.getAuth())||void 0===n?void 0:n.username)&&void 0!==r?r:"",d=null!==(s=u.watermarkConfig)&&void 0!==s?s:{flags:{}},m=[..."string"==typeof d.content?[d.content]:null!==(i=d.content)&&void 0!==i?i:[],null!==(a=d.flags)&&void 0!==a&&a["show-development"]&&h?"Development":"",null!==(o=d.flags)&&void 0!==o&&o["show-user"]?p:""].filter(Boolean);if(0===m.length)return;const y={content:m,zIndex:1001,width:200,font:{fontSize:28},gap:[190,190],...(0,f.omit)(d,["content","flags"])};fs?fs.resolve(y):(0,l.loadBricksImperatively)([vs],_i()).then((()=>{fs=document.createElement(vs),fs.resolve(y)}),(e=>{console.error("Load watermark service failed:",e)}))}();const E=g&&b?g.id!==b.id:g!==b;(0,_.clearExpressionASTCache)(),E&&(0,_.clearFunctionASTCache)();const C=Ai().getFeatureFlags(),I=(0,o.A)(_s,this),O=(t,r)=>{null==d||d({status:"redirected"}),(0,o.A)(Cs,this).add(I),(0,T.A)(Rs,this,js).call(this,t,r,e)},L=()=>{const t=C["sso-enabled"]?"/sso-auth/login":"/auth/login";tr(e),O(t,{from:e})},N=document.querySelector("#main-mount-point"),D=document.querySelector("#portal-mount-point"),R={tag:Dr.ROOT,container:N,createPortal:D},B=()=>{var e;Rr(N),Rr(D),(0,o.A)(Cs,this).add(I);for(const e of(0,o.A)(Cs,this))e&&(e.dispatchOnUnmount(),e.dispose());(0,o.A)(Cs,this).clear(),null==Si||null===(e=Si.messageDispatcher)||void 0===e||e.reset(),E&&((0,a.A)(Ns,this,g),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:g,currentApp:b}})))};if(Z(b&&(ne()[b.id]||b.theme)||"light"),ie("default"),ue(Ai().getMiscSettings().globalThemeVariant),b&&!p){var F,j,U,Y,$,W;null==Si||null===(F=Si.checkInstalledApps)||void 0===F||F.preCheckInstalledApps(y,(e=>!!Ni(e)));const r={bailout:e=>e.unauthenticated?(L(),!0):e.redirect?(O(e.redirect.path,e.redirect.state),!0):void(0,a.A)(Is,this,0),mergeMenus:async e=>{const t=await Promise.all(e);(0,a.A)(Ms,this,function(e){const t={breadcrumb:[]};for(const r of e){const{breadcrumb:e}=r;e&&(e.overwrite?t.breadcrumb=e.items:t.breadcrumb.push(...e.items))}return t}(t)),window.dispatchEvent(new CustomEvent("navConfig.change",{detail:(0,o.A)(Ms,this)}))},catch:async(t,r,n,s)=>{if(!nr(t)||window.NO_AUTH_GUARD){if(!(t instanceof k.HttpAbortError)){const i=Ai().getMiscSettings().noAuthGuardLoginPath;if(nr(t)&&i)return void O(i,{from:e});if(n)throw t;return!s&&Ss(t)?void window.location.reload():{failed:!0,output:{node:await es(t,r,!s),blockingList:[]}}}(0,o.A)(Cs,this).add(I)}else L()}},n=(0,a.A)(_s,this,new Gr("page",{routeHelper:r,renderId:h})),s=(0,a.A)(ks,this,{app:b,location:e,query:new URLSearchParams(e.search),flags:C,sys:{...null==Si||null===(j=Si.auth)||void 0===j?void 0:j.getAuth(),...ms(),settings:{brand:Ai().getBrandSettings()}},ctxStore:new Fn("CTX",void 0,n),pendingPermissionsPreCheck:[null==Si||null===(U=Si.checkPermissions)||void 0===U?void 0:U.preCheckPermissions(y)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,a.A)(Ms,this,void 0),ys(y),ve(null===(Y=y.meta)||void 0===Y?void 0:Y.functions,b),null==Si||null===($=Si.flowApi)||void 0===$||$.collectContract(null===(W=y.meta)||void 0===W?void 0:W.contracts);let i,c=!1,l=[];try{sn.clear();const e={};if(i=await rs(R,function(e){if(window.parent===window)return e;let t=e;const r=(0,f.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];const n=(0,f.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return t=[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)],t}(y.routes),s,n,[],e),r.bailout(i))return;l=is(s),await as(i,s,l),e.child=i.menuRequestNode,n.setInitialMenuRequestNode(e),await r.mergeMenus(n.getMenuRequests())}catch(e){console.error("Router failed:",e),t&&(0,a.A)(Ds,this,!0);const n=await r.catch(e,R,t);if(!n)return;({failed:c,output:i}=n)}if(Ps(),R.child=i.node,(0,a.A)(Ds,this,!1),B(),i.route&&"routes"!==i.route.type||c){if(c||n.dispatchBeforePageLoad(),te(),oe(),gs(null==b?void 0:b.uiVersion),Br(R),window.scrollTo(0,0),c)null==d||d({status:"failed"});else{n.dispatchPageLoad(),n.dispatchAnchorLoad(),n.dispatchOnMount(),n.initializeScrollIntoView(),n.initializeMediaChange(),n.initializeMessageDispatcher();for(const e of l)e.mountAsyncData();null==d||d({status:"ok",path:i.path,pageTitle:document.title})}return void H("rendered")}}else{if(!window.NO_AUTH_GUARD&&null!=Si&&Si.auth&&!Si.auth.isLoggedIn())return void L();B()}te(),oe();const V=await es(new Qn(p?"page blocked":b?"page not found":"app not found"),R,!0);R.child=V,Br(R),window.scrollTo(0,0),null==d||d({status:p?"blocked":"not-found"}),H("rendered")}const Hs="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;function Ws(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function Vs(e){return e<=1?"".concat(100*Number(e),"%"):e}function zs(e){return 1===e.length?"0"+e:String(e)}function qs(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*r*(t-e):r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Ks(e){return Gs(e)/255}function Gs(e){return parseInt(e,16)}var Js={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Xs(e){var t,r,n,s={r:0,g:0,b:0},i=1,a=null,o=null,c=null,l=!1,u=!1;return"string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(Js[e])e=Js[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var r=ti.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=ti.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ti.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=ti.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ti.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=ti.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ti.hex8.exec(e))?{r:Gs(r[1]),g:Gs(r[2]),b:Gs(r[3]),a:Ks(r[4]),format:t?"name":"hex8"}:(r=ti.hex6.exec(e))?{r:Gs(r[1]),g:Gs(r[2]),b:Gs(r[3]),format:t?"name":"hex"}:(r=ti.hex4.exec(e))?{r:Gs(r[1]+r[1]),g:Gs(r[2]+r[2]),b:Gs(r[3]+r[3]),a:Ks(r[4]+r[4]),format:t?"name":"hex8"}:!!(r=ti.hex3.exec(e))&&{r:Gs(r[1]+r[1]),g:Gs(r[2]+r[2]),b:Gs(r[3]+r[3]),format:t?"name":"hex"}}(e)),"object"==typeof e&&(ri(e.r)&&ri(e.g)&&ri(e.b)?(t=e.r,r=e.g,n=e.b,s={r:255*Ws(t,255),g:255*Ws(r,255),b:255*Ws(n,255)},l=!0,u="%"===String(e.r).substr(-1)?"prgb":"rgb"):ri(e.h)&&ri(e.s)&&ri(e.v)?(a=Vs(e.s),o=Vs(e.v),s=function(e,t,r){e=6*Ws(e,360),t=Ws(t,100),r=Ws(r,100);var n=Math.floor(e),s=e-n,i=r*(1-t),a=r*(1-s*t),o=r*(1-(1-s)*t),c=n%6;return{r:255*[r,a,i,i,o,r][c],g:255*[o,r,r,a,i,i][c],b:255*[i,i,o,r,r,a][c]}}(e.h,a,o),l=!0,u="hsv"):ri(e.h)&&ri(e.s)&&ri(e.l)&&(a=Vs(e.s),c=Vs(e.l),s=function(e,t,r){var n,s,i;if(e=Ws(e,360),t=Ws(t,100),r=Ws(r,100),0===t)s=r,i=r,n=r;else{var a=r<.5?r*(1+t):r+t-r*t,o=2*r-a;n=qs(o,a,e+1/3),s=qs(o,a,e),i=qs(o,a,e-1/3)}return{r:255*n,g:255*s,b:255*i}}(e.h,a,c),l=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(i=e.a)),i=function(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}(i),{ok:l,format:e.format||u,r:Math.min(255,Math.max(s.r,0)),g:Math.min(255,Math.max(s.g,0)),b:Math.min(255,Math.max(s.b,0)),a:i}}var Zs="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),Qs="[\\s|\\(]+(".concat(Zs,")[,|\\s]+(").concat(Zs,")[,|\\s]+(").concat(Zs,")\\s*\\)?"),ei="[\\s|\\(]+(".concat(Zs,")[,|\\s]+(").concat(Zs,")[,|\\s]+(").concat(Zs,")[,|\\s]+(").concat(Zs,")\\s*\\)?"),ti={CSS_UNIT:new RegExp(Zs),rgb:new RegExp("rgb"+Qs),rgba:new RegExp("rgba"+ei),hsl:new RegExp("hsl"+Qs),hsla:new RegExp("hsla"+ei),hsv:new RegExp("hsv"+Qs),hsva:new RegExp("hsva"+ei),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ri(e){return Boolean(ti.CSS_UNIT.exec(String(e)))}var ni=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function si(e){var t=function(e,t,r){e=Ws(e,255),t=Ws(t,255),r=Ws(r,255);var n=Math.max(e,t,r),s=Math.min(e,t,r),i=0,a=n,o=n-s,c=0===n?0:o/n;if(n===s)i=0;else{switch(n){case e:i=(t-r)/o+(t<r?6:0);break;case t:i=(r-e)/o+2;break;case r:i=(e-t)/o+4}i/=6}return{h:i,s:c,v:a}}(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function ii(e){var t=e.r,r=e.g,n=e.b;return"#".concat(function(e,t,r){var n=[zs(Math.round(e).toString(16)),zs(Math.round(t).toString(16)),zs(Math.round(r).toString(16))];return n.join("")}(t,r,n))}function ai(e,t,r){var n;return(n=Math.round(e.h)>=60&&Math.round(e.h)<=240?r?Math.round(e.h)-2*t:Math.round(e.h)+2*t:r?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?n+=360:n>=360&&(n-=360),n}function oi(e,t,r){return 0===e.h&&0===e.s?e.s:((n=r?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(n=1),r&&5===t&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2)));var n}function ci(e,t,r){var n;return(n=r?e.v+.05*t:e.v-.15*t)>1&&(n=1),Number(n.toFixed(2))}function li(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],n=Xs(e),s=5;s>0;s-=1){var i=si(n),a=ii(Xs({h:ai(i,s,!0),s:oi(i,s,!0),v:ci(i,s,!0)}));r.push(a)}r.push(ii(n));for(var o=1;o<=4;o+=1){var c=si(n),l=ii(Xs({h:ai(c,o),s:oi(c,o),v:ci(c,o)}));r.push(l)}return"dark"===t.theme?ni.map((function(e){var n,s,i,a=e.index,o=e.opacity;return ii((n=Xs(t.backgroundColor||"#141414"),i=100*o/100,{r:((s=Xs(r[a])).r-n.r)*i+n.r,g:(s.g-n.g)*i+n.g,b:(s.b-n.b)*i+n.b}))})):r}var ui={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},hi={},pi={};function di(e){return':root,\n[data-override-theme="light"] {\n'.concat(e,"}")}function fi(e){return'html[data-theme="dark-v2"],\n[data-override-theme="dark-v2"] {\n'.concat(e,"}")}function mi(e){return e.match(/[0-9a-fA-F]{2}/g).map((e=>parseInt(e,16))).join(", ")}function yi(e,t,r){return"dark"===t?li(e,{theme:t,backgroundColor:r})[5]:e}function gi(e){const t=[];if(["light","dark"].forEach((r=>{if(e[r])switch(e.type){case"brandColor":t.push(function(e,t){return("dark"===e?fi:di)("string"==typeof(r=t)?" --color-brand: ".concat(r,";\n"):[" --color-brand: ".concat(r.default,";")," --color-brand-hover: ".concat(r.hover,";")," --color-brand-active: ".concat(r.active,";"),""].join("\n"));var r}(r,e[r]));break;case"baseColors":t.push(function(e,t,r){return("dark"===e?fi:di)("".concat(function(e,t){return Object.entries(e).flatMap((e=>{var[r,n]=e;return function(e){if(!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid base color name: ".concat(JSON.stringify(e)))}(r),n.map(((e,n)=>[" --palette-".concat(r,"-").concat(n+1,"-channel: ").concat(mi(e),";")].concat("dark"===t?[]:" --palette-".concat(r,"-").concat(n+1,": rgb(var(--palette-").concat(r,"-").concat(n+1,"-channel));")).join("\n"))).concat("")})).join("\n")}(function(e,t,r){return Object.fromEntries(Object.entries(e).map((e=>{var[n,s]=e;return[n,li(s,"dark"===t?{theme:t,backgroundColor:r}:void 0)]})))}(t,e,r),e),"\n").concat(function(e,t,r){return Object.entries({green:"green",red:"red",blue:"blue",orange:"orange",cyan:"cyan",purple:"purple",geekblue:"indigo"}).flatMap((n=>{var[s,i]=n;return[" --theme-".concat(s,"-color-rgb-channel: ").concat(mi(yi(t[i],e,r)),";"),..."dark"===e?[]:[" --theme-".concat(s,"-color: var(--palette-").concat(i,"-6);")," --theme-".concat(s,"-border-color: var(--palette-").concat(i,"-3);")]," --theme-".concat(s,"-background: var(--palette-").concat(i,"-").concat("dark"===e?2:1,");"),""]})).join("\n")}(e,t,r)))}(r,e[r],e.backgroundColor));break;case"variables":t.push(function(e,t){return("dark"===e?fi:di)(function(e){return Object.entries(e).map((e=>{var[t,r]=e;return function(e){if(!/^--[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))throw new Error("Invalid css variable name: ".concat(JSON.stringify(e)))}(t)," ".concat(t,": ").concat(r,";")})).concat("").join("\n")}(t))}(r,e[r]))}})),t.length>0){const e=document.createElement("style");return e.textContent=t.join("\n\n"),document.head.appendChild(e),()=>{e.remove()}}}let vi,bi,wi,xi,Si;function Pi(e){if(vi)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{let{data:t}=e;if((null==t?void 0:t.source)!==F)return;const r=t.payload;switch(null==r?void 0:r.type){case j:$=r.active;break;case U:Y=r.panel}})),Si=null==e?void 0:e.hooks,(0,c.initializeI18n)(Xt,Zt),h.locale(c.i18n.language),c.i18n.on("languageChanged",(()=>{h.locale(c.i18n.language)})),P(),vi=new ki,vi}Object.keys(ui).forEach((function(e){hi[e]=li(ui[e]),hi[e].primary=hi[e][5],pi[e]=li(ui[e],{theme:"dark",backgroundColor:"#141414"}),pi[e].primary=pi[e][5]})),hi.red,hi.volcano,hi.gold,hi.orange,hi.yellow,hi.lime,hi.green,hi.cyan,hi.blue,hi.geekblue,hi.purple,hi.magenta,hi.grey;const Ai=function(){const e=S();if(e)return function(){return new Proxy(e.getRuntime(),{get(){switch(arguments.length<=1?void 0:arguments[1]){case"getCurrentApp":case"getRecentApps":case"hasInstalledApp":case"getDesktops":case"getLaunchpadSettings":case"getLaunchpadSiteMap":case"toggleLaunchpadEffect":case"applyPageTitle":case"getNavConfig":case"getFeatureFlags":case"getMiscSettings":case"getBrandSettings":return Reflect.get(...arguments)}}})}}()||function(){return vi};var Ei=new WeakMap,Ti=new WeakMap;class ki{constructor(){(0,i.A)(this,Ei,!1),(0,i.A)(this,Ti,!1),(0,s.A)(this,"version",3)}initialize(e){var t;if((0,o.A)(Ei,this))throw new Error("The runtime cannot be initialized more than once");(0,a.A)(Ei,this,!0),function(e){(0,u.isObject)(e.settings)&&(0,u.deepFreeze)(e.settings),e.brickPackages&&(0,u.deepFreeze)(e.brickPackages)}(e),bi=e;const{notification:r,dialog:n}=Ci();var s;!1!==r&&(s=null!=r?r:"basic.show-notification",(0,this.loadBricks)([s]).then((()=>{ir=document.createElement(s)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==n&&function(e,t){t([e]).then((()=>{Qt=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=n?n:"basic.show-dialog",this.loadBricks),function(e){e&&(e.brandColor?gi({type:"brandColor",...e.brandColor}):e.baseColors?gi({type:"baseColors",...e.baseColors}):e.variables&&gi({type:"variables",...e.variables}))}(null===(t=e.settings)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.theme)}async bootstrap(e){if(e&&this.initialize(e),(0,o.A)(Ti,this))throw new Error("The runtime cannot be bootstrapped more than once");(0,a.A)(Ti,this,!0),wi=new Bs(bi.storyboards),await wi.bootstrap()}getRecentApps(){var e,t;return null!==(e=null===(t=wi)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=wi)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return Je(e,t)}getFeatureFlags(){var e,t;return{...null===(e=bi)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags,...null===(t=wi)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags,"migrate-to-brick-next-v3":!0}}getMiscSettings(){var e,t;return{...null===(e=bi)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc,...null===(t=wi)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc}}getBrandSettings(){var e;return{base_title:"DevOps 管理专家",...null===(e=bi)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand}}getLaunchpadSettings(){var e;return{columns:7,rows:4,...null===(e=bi)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad}}getDesktops(){var e,t;return null!==(e=null===(t=bi)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=bi)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t;const r=this.getBrandSettings().base_title;document.title=(null===(t=wi)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t?void 0:t.localeTitle)||(e?`${e} - ${r}`:r)}getNavConfig(){var e;return null===(e=wi)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,l.loadBricksImperatively)(e,_i())}}function _i(){var e,t,r,n;return null!=xi?xi:xi=function(e,t){if(null==t||!t.length)return e;const r=new Map;return[...t,...e].forEach((e=>{const t=e.filePath.split("/")[1];r.has(t)||r.set(t,e)})),Array.from(r.values())}(null!==(e=null!==(t=null!==(r=null===(n=bi)||void 0===n?void 0:n.brickPackages)&&void 0!==r?r:Hs)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[],window.PUBLIC_DEPS)}function Ci(){var e,t;return null!==(e=null===(t=bi)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.presetBricks)&&void 0!==e?e:{}}function Ii(){var e;return null===(e=wi)||void 0===e?void 0:e.getRenderId()}function Oi(){var e;return null===(e=wi)||void 0===e?void 0:e.getRuntimeContext()}function Li(e){var t;return null===(t=bi)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function Ni(e){var t;return null===(t=Li(e))||void 0===t?void 0:t.app}function Mi(){for(var e,t,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];null==Si||null===(e=Si.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function Di(){var e;return null==Si||null===(e=Si.auth)||void 0===e?void 0:e.getAuth()}function Ri(){var e,t;return null==Si||null===(e=Si.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function Bi(){var e;return null==Si||null===(e=Si.auth)||void 0===e?void 0:e.isLoggedIn()}var Fi=new WeakMap;const ji=new class{constructor(){(0,i.A)(this,Fi,new Map)}define(e,t){(0,o.A)(Fi,this).has(e)?console.error(`Custom editor of "${e}" already registered`):(0,o.A)(Fi,this).set(e,t)}get(e){return(0,o.A)(Fi,this).get(e)}};async function Ui(e,t,r){return it(await Qe(e),e,"resolve",t,r)}function Yi(e){let t,{portal:r,scope:n="fragment",unknownBricks:s,supportsUseChildren:i,unsafe_penetrate:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r;t=r||(()=>(o=document.createElement("div"),o.style.position="absolute",o.style.width=o.style.height="0",document.body.append(o),o));let l,u,h=!1;return{async render(r){let{theme:p,uiVersion:d,language:m,context:y,functions:g,templates:v,i18n:b,url:w,app:x}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(h)throw new Error("The root is unmounted and cannot be rendered any more");const S=[].concat(r);if(i){(0,C.replaceUseChildren)(S);for(const e of null!=v?v:[])Array.isArray(e.bricks)&&(0,C.replaceUseChildren)(e.bricks)}const P=l,A=(0,f.uniqueId)("render-id-");l=new Gr(n,{unknownBricks:s,renderId:A});const E={ctxStore:new Fn("CTX",void 0,l),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map,unsafe_penetrate:a};if(w){const e=new URL(w);E.query=e.searchParams,E.location={pathname:e.pathname,search:e.search,hash:e.hash,state:void 0}}const T={tag:Dr.ROOT,container:e,createPortal:t};if("page"===n){var k;Z(null!=p?p:"light"),ie("default"),gs(d),m&&await c.i18n.changeLanguage(m),null!=x||(x={id:"demo",homepage:"/demo"}),E.app=x;const e={app:x,meta:{i18n:b,customTemplates:v}};null===(k=u)||void 0===k||k(),u=M(e),ys(e),ve(g,x)}E.ctxStore.define(y,E);let _,I=!1,O=[];try{_=await ns(T,S,E,l,[],{}),O=is(E),await as(_,E,O)}catch(e){I=!0,_={node:await es(e,T,"page"===n),blockingList:[]}}if(T.child=_.node,null==P||P.dispatchOnUnmount(),null==P||P.dispose(),Rr(e),o&&Rr(o),"page"===n&&(I||l.dispatchBeforePageLoad(),te(),oe()),Br(T),"page"===n&&window.scrollTo(0,0),!I){for(const e of O)e.mountAsyncData();"page"===n&&l.dispatchPageLoad(),l.dispatchOnMount(),l.initializeScrollIntoView(),l.initializeMediaChange(),l.initializeMessageDispatcher()}},unmount(){h||(h=!0,Rr(e),o&&(Rr(o),r||o.remove()))}}}function $i(e){let{useRealTimeQuery:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={...Oi()};t&&(r.query=new URLSearchParams(A().location.search));const n=t=>{if("string"==typeof t){if((0,_.isEvaluable)(t)){const e=dt(t,r);return tt(e),e}return(0,I.inject)(t,r)}return!(0,u.isObject)(t)||rt(e)?t:Array.isArray(t)?t.map((e=>n(e))):Object.fromEntries(Object.entries(t).map((e=>{let[t,r]=e;return[n(t),n(r)]})))};return n(e)}const Hi=[];function Wi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3,t=-1;const r=()=>{if(t>-1){const e=Hi.indexOf(t);e>-1&&Hi.splice(e,1)}};return{push:()=>{var n;return r(),t=(null!==(n=Hi[Hi.length-1])&&void 0!==n?n:-1)+1,Hi.push(t),t+e},pull:r}}},6268:(e,t,r)=>{"use strict";r.d(t,{_:()=>i});var n=r(4396),s=r(52),i=function(e,t){var r=this;this.broadcastChannel=e,e._befC.push((function(){return r.die()})),this._options=t,this.isLeader=!1,this.isDead=!1,this.token=(0,n.zs)(),this._lstns=[],this._unl=[],this._dpL=function(){},this._dpLC=!1,this._wKMC={},this.lN="pubkey-bc||"+e.method.type+"||"+e.name};i.prototype={hasLeader:function(){var e=this;return navigator.locks.query().then((function(t){var r=t.held?t.held.filter((function(t){return t.name===e.lN})):[];return!!(r&&r.length>0)}))},awaitLeadership:function(){var e=this;if(!this._wLMP){this._wKMC.c=new AbortController;var t=new Promise((function(t,r){e._wKMC.res=t,e._wKMC.rej=r}));this._wLMP=new Promise((function(r){navigator.locks.request(e.lN,{signal:e._wKMC.c.signal},(function(){return e._wKMC.c=void 0,(0,s.P)(e),r(),t})).catch((function(){}))}))}return this._wLMP},set onduplicate(e){},die:function(){var e=this;return this._lstns.forEach((function(t){return e.broadcastChannel.removeEventListener("internal",t)})),this._lstns=[],this._unl.forEach((function(e){return e.remove()})),this._unl=[],this.isLeader&&(this.isLeader=!1),this.isDead=!0,this._wKMC.res&&this._wKMC.res(),this._wKMC.c&&this._wKMC.c.abort("LeaderElectionWebLock.die() called"),(0,s.r)(this,"death")}}},6384:(e,t,r)=>{"use strict";var n=r(3780),s=r(1796),i=r(2846),a=r(9590),o=Object.prototype.toString,c=Object.prototype.hasOwnProperty,l={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function h(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else{if(!(e<=4294967295))throw new s("code point within a string may not be greater than 0xFFFFFFFF");r="U",i=8}return"\\"+r+n.repeat("0",i-t.length)+t}function p(e){this.schema=e.schema||i,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,n,s,i,a,o,l;if(null===t)return{};for(r={},s=0,i=(n=Object.keys(t)).length;s<i;s+=1)a=n[s],o=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(l=e.compiledTypeMap.fallback[a])&&c.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[a]=o;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function d(e,t){for(var r,s=n.repeat(" ",t),i=0,a=-1,o="",c=e.length;i<c;)-1===(a=e.indexOf("\n",i))?(r=e.slice(i),i=c):(r=e.slice(i,a+1),i=a+1),r.length&&"\n"!==r&&(o+=s),o+=r;return o}function f(e,t){return"\n"+n.repeat(" ",e.indent*t)}function m(e){return 32===e||9===e}function y(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function g(e,t){return y(e)&&65279!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&58!==e&&(35!==e||t&&function(e){return y(e)&&!m(e)&&65279!==e&&13!==e&&10!==e}(t))}function v(e){return/^\n* /.test(e)}function b(e,t,r,n){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==u.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,r),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),o=n||e.flowLevel>-1&&r>=e.flowLevel;switch(function(e,t,r,n,s){var i,a,o,c,l=!1,u=!1,h=-1!==n,p=-1,d=y(c=e.charCodeAt(0))&&65279!==c&&!m(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&!m(e.charCodeAt(e.length-1));if(t)for(i=0;i<e.length;i++){if(!y(a=e.charCodeAt(i)))return 5;o=i>0?e.charCodeAt(i-1):null,d=d&&g(a,o)}else{for(i=0;i<e.length;i++){if(10===(a=e.charCodeAt(i)))l=!0,h&&(u=u||i-p-1>n&&" "!==e[p+1],p=i);else if(!y(a))return 5;o=i>0?e.charCodeAt(i-1):null,d=d&&g(a,o)}u=u||h&&i-p-1>n&&" "!==e[p+1]}return l||u?r>9&&v(e)?5:u?4:3:d&&!s(e)?1:2}(t,o,e.indent,a,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)}))){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+w(t,e.indent)+x(d(t,i));case 4:return">"+w(t,e.indent)+x(d(function(e,t){for(var r,n,s,i=/(\n+)([^\n]*)/g,a=(s=-1!==(s=e.indexOf("\n"))?s:e.length,i.lastIndex=s,S(e.slice(0,s),t)),o="\n"===e[0]||" "===e[0];n=i.exec(e);){var c=n[1],l=n[2];r=" "===l[0],a+=c+(o||r||""===l?"":"\n")+S(l,t),o=r}return a}(t,a),i));case 5:return'"'+function(e){for(var t,r,n,s="",i=0;i<e.length;i++)(t=e.charCodeAt(i))>=55296&&t<=56319&&(r=e.charCodeAt(i+1))>=56320&&r<=57343?(s+=h(1024*(t-55296)+r-56320+65536),i++):s+=!(n=l[t])&&y(t)?e[i]:n||h(t);return s}(t)+'"';default:throw new s("impossible error: invalid scalar style")}}()}function w(e,t){var r=v(e)?String(t):"",n="\n"===e[e.length-1];return r+(!n||"\n"!==e[e.length-2]&&"\n"!==e?n?"":"-":"+")+"\n"}function x(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function S(e,t){if(""===e||" "===e[0])return e;for(var r,n,s=/ [^ ]/g,i=0,a=0,o=0,c="";r=s.exec(e);)(o=r.index)-i>t&&(n=a>i?a:o,c+="\n"+e.slice(i,n),i=n+1),a=o;return c+="\n",e.length-i>t&&a>i?c+=e.slice(i,a)+"\n"+e.slice(a+1):c+=e.slice(i),c.slice(1)}function P(e,t,r){var n,i,a,l,u,h;for(a=0,l=(i=r?e.explicitTypes:e.implicitTypes).length;a<l;a+=1)if(((u=i[a]).instanceOf||u.predicate)&&(!u.instanceOf||"object"==typeof t&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=r?u.tag:"?",u.represent){if(h=e.styleMap[u.tag]||u.defaultStyle,"[object Function]"===o.call(u.represent))n=u.represent(t,h);else{if(!c.call(u.represent,h))throw new s("!<"+u.tag+'> tag resolver accepts not "'+h+'" style');n=u.represent[h](t,h)}e.dump=n}return!0}return!1}function A(e,t,r,n,i,a){e.tag=null,e.dump=r,P(e,r,!1)||P(e,r,!0);var c=o.call(e.dump);n&&(n=e.flowLevel<0||e.flowLevel>t);var l,u,h="[object Object]"===c||"[object Array]"===c;if(h&&(u=-1!==(l=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(h&&u&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),"[object Object]"===c)n&&0!==Object.keys(e.dump).length?(function(e,t,r,n){var i,a,o,c,l,u,h="",p=e.tag,d=Object.keys(r);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new s("sortKeys must be a boolean or a function");for(i=0,a=d.length;i<a;i+=1)u="",n&&0===i||(u+=f(e,t)),c=r[o=d[i]],A(e,t+1,o,!0,!0,!0)&&((l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,l&&(u+=f(e,t)),A(e,t+1,c,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",h+=u+=e.dump));e.tag=p,e.dump=h||"{}"}(e,t,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(function(e,t,r){var n,s,i,a,o,c="",l=e.tag,u=Object.keys(r);for(n=0,s=u.length;n<s;n+=1)o="",0!==n&&(o+=", "),e.condenseFlow&&(o+='"'),a=r[i=u[n]],A(e,t,i,!1,!1)&&(e.dump.length>1024&&(o+="? "),o+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),A(e,t,a,!1,!1)&&(c+=o+=e.dump));e.tag=l,e.dump="{"+c+"}"}(e,t,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump));else if("[object Array]"===c){var p=e.noArrayIndent&&t>0?t-1:t;n&&0!==e.dump.length?(function(e,t,r,n){var s,i,a="",o=e.tag;for(s=0,i=r.length;s<i;s+=1)A(e,t+1,r[s],!0,!0)&&(n&&0===s||(a+=f(e,t)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=o,e.dump=a||"[]"}(e,p,e.dump,i),u&&(e.dump="&ref_"+l+e.dump)):(function(e,t,r){var n,s,i="",a=e.tag;for(n=0,s=r.length;n<s;n+=1)A(e,t,r[n],!1,!1)&&(0!==n&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}(e,p,e.dump),u&&(e.dump="&ref_"+l+" "+e.dump))}else{if("[object String]"!==c){if(e.skipInvalid)return!1;throw new s("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&b(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function E(e,t){var r,n,s=[],i=[];for(T(e,s,i),r=0,n=i.length;r<n;r+=1)t.duplicates.push(s[i[r]]);t.usedDuplicates=new Array(n)}function T(e,t,r){var n,s,i;if(null!==e&&"object"==typeof e)if(-1!==(s=t.indexOf(e)))-1===r.indexOf(s)&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,i=e.length;s<i;s+=1)T(e[s],t,r);else for(s=0,i=(n=Object.keys(e)).length;s<i;s+=1)T(e[n[s]],t,r)}function k(e,t){var r=new p(t=t||{});return r.noRefs||E(e,r),A(r,0,e,!0,!0)?r.dump+"\n":""}e.exports.dump=k,e.exports.safeDump=function(e,t){return k(e,n.extend({schema:a},t))}},6562:(e,t,r)=>{"use strict";var n=r(5417),s=Object.prototype.hasOwnProperty;e.exports=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,r=e;for(t in r)if(s.call(r,t)&&null!==r[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},6605:(e,t,r)=>{"use strict";r.r(t),r.d(t,{pipes:()=>n.pipes,processPipes:()=>i,utils:()=>n.utils});var n=r(8377);const s=new Map(Array.from(Object.entries(n.pipes)));function i(e,t){if(0===t.length)return e;let r=e;for(const e of t){const t=s.get(e.identifier);if(!t)return void console.warn(`Unknown pipe: ${e.identifier}`);r=t(r,...e.parameters)}return r}},6751:(e,t,r)=>{"use strict";var n=r(5417);e.exports=new n("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";if("/"===t[0]){if(r&&(n=r[1]),n.length>3)return!1;if("/"!==t[t.length-n.length-1])return!1}return!0},construct:function(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return"/"===t[0]&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},6758:e=>{"use strict";e.exports=function(e){return e[1]}},6773:(e,t)=>{"use strict";function r(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e,t,r){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=r}}class s{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}}function i(e,t){const{line:r,column:s,index:i}=e;return new n(r,s+t,i+t)}const a="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var o={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:a},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:a}};const c={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},l=e=>"UpdateExpression"===e.type?c.UpdateExpression[`${e.prefix}`]:c[e.type];var u={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${"ForInStatement"===e?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${l(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${l(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${l(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},h={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:e})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(e)}\`.`};const p=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var d=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${l({type:e})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'});const f=["message"];function m(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:r})}function y({toMessage:e,code:t,reasonCode:r,syntaxPlugin:s}){const i="MissingPlugin"===r||"MissingOneOfPlugins"===r;{const e={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};e[r]&&(r=e[r])}return function a(o,c){const l=new SyntaxError;return l.code=t,l.reasonCode=r,l.loc=o,l.pos=o.index,l.syntaxPlugin=s,i&&(l.missingPlugin=c.missingPlugin),m(l,"clone",(function(e={}){var t;const{line:r,column:s,index:i}=null!=(t=e.loc)?t:o;return a(new n(r,s,i),Object.assign({},c,e.details))})),m(l,"details",c),Object.defineProperty(l,"message",{configurable:!0,get(){const t=`${e(c)} (${o.line}:${o.column})`;return this.message=t,t},set(e){Object.defineProperty(this,"message",{value:e,writable:!0})}}),l}}function g(e,t){if(Array.isArray(e))return t=>g(t,e[0]);const n={};for(const s of Object.keys(e)){const i=e[s],a="string"==typeof i?{message:()=>i}:"function"==typeof i?{message:i}:i,{message:o}=a,c=r(a,f),l="string"==typeof o?()=>o:o;n[s]=y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:l},t?{syntaxPlugin:t}:{},c))}return n}const v=Object.assign({},g(o),g(u),g({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."}),g(h),g`pipelineOperator`(d)),{defineProperty:b}=Object,w=(e,t)=>{e&&b(e,t,{enumerable:!1,value:e[t]})};function x(e){return w(e.loc.start,"index"),w(e.loc.end,"index"),e}class S{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}}const P={brace:new S("{"),j_oTag:new S("<tag"),j_cTag:new S("</tag"),j_expr:new S("<tag>...</tag>",!0)};P.template=new S("`",!0);const A=!0,E=!0,T=!0,k=!0,_=!0;class C{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}}const I=new Map;function O(e,t={}){t.keyword=e;const r=U(e,t);return I.set(e,r),r}function L(e,t){return U(e,{beforeExpr:A,binop:t})}let N=-1;const M=[],D=[],R=[],B=[],F=[],j=[];function U(e,t={}){var r,n,s,i;return++N,D.push(e),R.push(null!=(r=t.binop)?r:-1),B.push(null!=(n=t.beforeExpr)&&n),F.push(null!=(s=t.startsExpr)&&s),j.push(null!=(i=t.prefix)&&i),M.push(new C(e,t)),N}function Y(e,t={}){var r,n,s,i;return++N,I.set(e,N),D.push(e),R.push(null!=(r=t.binop)?r:-1),B.push(null!=(n=t.beforeExpr)&&n),F.push(null!=(s=t.startsExpr)&&s),j.push(null!=(i=t.prefix)&&i),M.push(new C("name",t)),N}const $={bracketL:U("[",{beforeExpr:A,startsExpr:E}),bracketHashL:U("#[",{beforeExpr:A,startsExpr:E}),bracketBarL:U("[|",{beforeExpr:A,startsExpr:E}),bracketR:U("]"),bracketBarR:U("|]"),braceL:U("{",{beforeExpr:A,startsExpr:E}),braceBarL:U("{|",{beforeExpr:A,startsExpr:E}),braceHashL:U("#{",{beforeExpr:A,startsExpr:E}),braceR:U("}"),braceBarR:U("|}"),parenL:U("(",{beforeExpr:A,startsExpr:E}),parenR:U(")"),comma:U(",",{beforeExpr:A}),semi:U(";",{beforeExpr:A}),colon:U(":",{beforeExpr:A}),doubleColon:U("::",{beforeExpr:A}),dot:U("."),question:U("?",{beforeExpr:A}),questionDot:U("?."),arrow:U("=>",{beforeExpr:A}),template:U("template"),ellipsis:U("...",{beforeExpr:A}),backQuote:U("`",{startsExpr:E}),dollarBraceL:U("${",{beforeExpr:A,startsExpr:E}),templateTail:U("...`",{startsExpr:E}),templateNonTail:U("...${",{beforeExpr:A,startsExpr:E}),at:U("@"),hash:U("#",{startsExpr:E}),interpreterDirective:U("#!..."),eq:U("=",{beforeExpr:A,isAssign:k}),assign:U("_=",{beforeExpr:A,isAssign:k}),slashAssign:U("_=",{beforeExpr:A,isAssign:k}),xorAssign:U("_=",{beforeExpr:A,isAssign:k}),moduloAssign:U("_=",{beforeExpr:A,isAssign:k}),incDec:U("++/--",{prefix:_,postfix:!0,startsExpr:E}),bang:U("!",{beforeExpr:A,prefix:_,startsExpr:E}),tilde:U("~",{beforeExpr:A,prefix:_,startsExpr:E}),doubleCaret:U("^^",{startsExpr:E}),doubleAt:U("@@",{startsExpr:E}),pipeline:L("|>",0),nullishCoalescing:L("??",1),logicalOR:L("||",1),logicalAND:L("&&",2),bitwiseOR:L("|",3),bitwiseXOR:L("^",4),bitwiseAND:L("&",5),equality:L("==/!=/===/!==",6),lt:L("</>/<=/>=",7),gt:L("</>/<=/>=",7),relational:L("</>/<=/>=",7),bitShift:L("<</>>/>>>",8),bitShiftL:L("<</>>/>>>",8),bitShiftR:L("<</>>/>>>",8),plusMin:U("+/-",{beforeExpr:A,binop:9,prefix:_,startsExpr:E}),modulo:U("%",{binop:10,startsExpr:E}),star:U("*",{binop:10}),slash:L("/",10),exponent:U("**",{beforeExpr:A,binop:11,rightAssociative:!0}),_in:O("in",{beforeExpr:A,binop:7}),_instanceof:O("instanceof",{beforeExpr:A,binop:7}),_break:O("break"),_case:O("case",{beforeExpr:A}),_catch:O("catch"),_continue:O("continue"),_debugger:O("debugger"),_default:O("default",{beforeExpr:A}),_else:O("else",{beforeExpr:A}),_finally:O("finally"),_function:O("function",{startsExpr:E}),_if:O("if"),_return:O("return",{beforeExpr:A}),_switch:O("switch"),_throw:O("throw",{beforeExpr:A,prefix:_,startsExpr:E}),_try:O("try"),_var:O("var"),_const:O("const"),_with:O("with"),_new:O("new",{beforeExpr:A,startsExpr:E}),_this:O("this",{startsExpr:E}),_super:O("super",{startsExpr:E}),_class:O("class",{startsExpr:E}),_extends:O("extends",{beforeExpr:A}),_export:O("export"),_import:O("import",{startsExpr:E}),_null:O("null",{startsExpr:E}),_true:O("true",{startsExpr:E}),_false:O("false",{startsExpr:E}),_typeof:O("typeof",{beforeExpr:A,prefix:_,startsExpr:E}),_void:O("void",{beforeExpr:A,prefix:_,startsExpr:E}),_delete:O("delete",{beforeExpr:A,prefix:_,startsExpr:E}),_do:O("do",{isLoop:T,beforeExpr:A}),_for:O("for",{isLoop:T}),_while:O("while",{isLoop:T}),_as:Y("as",{startsExpr:E}),_assert:Y("assert",{startsExpr:E}),_async:Y("async",{startsExpr:E}),_await:Y("await",{startsExpr:E}),_defer:Y("defer",{startsExpr:E}),_from:Y("from",{startsExpr:E}),_get:Y("get",{startsExpr:E}),_let:Y("let",{startsExpr:E}),_meta:Y("meta",{startsExpr:E}),_of:Y("of",{startsExpr:E}),_sent:Y("sent",{startsExpr:E}),_set:Y("set",{startsExpr:E}),_source:Y("source",{startsExpr:E}),_static:Y("static",{startsExpr:E}),_using:Y("using",{startsExpr:E}),_yield:Y("yield",{startsExpr:E}),_asserts:Y("asserts",{startsExpr:E}),_checks:Y("checks",{startsExpr:E}),_exports:Y("exports",{startsExpr:E}),_global:Y("global",{startsExpr:E}),_implements:Y("implements",{startsExpr:E}),_intrinsic:Y("intrinsic",{startsExpr:E}),_infer:Y("infer",{startsExpr:E}),_is:Y("is",{startsExpr:E}),_mixins:Y("mixins",{startsExpr:E}),_proto:Y("proto",{startsExpr:E}),_require:Y("require",{startsExpr:E}),_satisfies:Y("satisfies",{startsExpr:E}),_keyof:Y("keyof",{startsExpr:E}),_readonly:Y("readonly",{startsExpr:E}),_unique:Y("unique",{startsExpr:E}),_abstract:Y("abstract",{startsExpr:E}),_declare:Y("declare",{startsExpr:E}),_enum:Y("enum",{startsExpr:E}),_module:Y("module",{startsExpr:E}),_namespace:Y("namespace",{startsExpr:E}),_interface:Y("interface",{startsExpr:E}),_type:Y("type",{startsExpr:E}),_opaque:Y("opaque",{startsExpr:E}),name:U("name",{startsExpr:E}),placeholder:U("%%",{startsExpr:!0}),string:U("string",{startsExpr:E}),num:U("num",{startsExpr:E}),bigint:U("bigint",{startsExpr:E}),decimal:U("decimal",{startsExpr:E}),regexp:U("regexp",{startsExpr:E}),privateName:U("#name",{startsExpr:E}),eof:U("eof"),jsxName:U("jsxName"),jsxText:U("jsxText",{beforeExpr:!0}),jsxTagStart:U("jsxTagStart",{startsExpr:!0}),jsxTagEnd:U("jsxTagEnd")};function H(e){return e>=93&&e<=133}function W(e){return e>=58&&e<=133}function V(e){return e>=58&&e<=137}function z(e){return F[e]}function q(e){return e>=129&&e<=131}function K(e){return e>=58&&e<=92}function G(e){return D[e]}function J(e){return R[e]}function X(e){return e>=24&&e<=25}function Z(e){return M[e]}M[8].updateContext=e=>{e.pop()},M[5].updateContext=M[7].updateContext=M[23].updateContext=e=>{e.push(P.brace)},M[22].updateContext=e=>{e[e.length-1]===P.template?e.pop():e.push(P.template)},M[143].updateContext=e=>{e.push(P.j_expr,P.j_oTag)};let Q="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",ee="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const te=new RegExp("["+Q+"]"),re=new RegExp("["+Q+ee+"]");Q=ee=null;const ne=[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],se=[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];function ie(e,t){let r=65536;for(let n=0,s=t.length;n<s;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function ae(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&te.test(String.fromCharCode(e)):ie(e,ne)))}function oe(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&re.test(String.fromCharCode(e)):ie(e,ne)||ie(e,se))))}const ce=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),le=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),ue=new Set(["eval","arguments"]);function he(e,t){return t&&"await"===e||"enum"===e}function pe(e,t){return he(e,t)||le.has(e)}function de(e){return ue.has(e)}function fe(e,t){return pe(e,t)||de(e)}const me=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);class ye{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}}class ge{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(64&e)>0&&!(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(128&t)return!0;if(707&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get inBareCaseStatement(){return(256&this.currentScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new ye(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,r){let n=this.currentScope();if(8&t||16&t){this.checkRedeclarationInScope(n,e,t,r);let s=n.names.get(e)||0;16&t?s|=4:(n.firstLexicalName||(n.firstLexicalName=e),s|=2),n.names.set(e,s),8&t&&this.maybeExportDefined(n,e)}else if(4&t)for(let s=this.scopeStack.length-1;s>=0&&(n=this.scopeStack[s],this.checkRedeclarationInScope(n,e,t,r),n.names.set(e,1|(n.names.get(e)||0)),this.maybeExportDefined(n,e),!(643&n.flags));--s);this.parser.inModule&&1&n.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,n){this.isRedeclaredInScope(e,t,r)&&this.parser.raise(v.VarRedeclaration,n,{identifierName:t})}isRedeclaredInScope(e,t,r){if(!(1&r))return!1;if(8&r)return e.names.has(t);const n=e.names.get(t);return 16&r?(2&n)>0||!this.treatFunctionsAsVarInScope(e)&&(1&n)>0:(2&n)>0&&!(8&e.flags&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(4&n)>0}checkLocalExport(e){const{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(643&t)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(707&t&&!(4&t))return t}}}class ve extends ye{constructor(...e){super(...e),this.declareFunctions=new Set}}class be extends ge{createScope(e){return new ve(e)}declareName(e,t,r){const n=this.currentScope();if(2048&t)return this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e),void n.declareFunctions.add(e);super.declareName(e,t,r)}isRedeclaredInScope(e,t,r){if(super.isRedeclaredInScope(e,t,r))return!0;if(2048&r&&!e.declareFunctions.has(t)){const r=e.names.get(t);return(4&r)>0||(2&r)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}const we=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),xe=g`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Se(e){return"type"===e.importKind||"typeof"===e.importKind}const Pe={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},Ae=/\*?\s*@((?:no)?flow)\b/,Ee={__proto__:null,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:"♦"},Te=new RegExp(/\r\n|[\r\n\u2028\u2029]/.source,"g");function ke(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function _e(e,t,r){for(let n=t;n<r;n++)if(ke(e.charCodeAt(n)))return!0;return!1}const Ce=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ie=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Oe(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}const Le=g`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Ne(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function Me(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return Me(e.object)+"."+Me(e.property);throw new Error("Node had unexpected type: "+e.type)}class De extends ye{constructor(...e){super(...e),this.tsNames=new Map}}class Re extends ge{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new De(e)}enter(e){512===e&&this.importsStack.push(new Set),super.enter(e)}exit(){const e=super.exit();return 512===e&&this.importsStack.pop(),e}hasImport(e,t){const r=this.importsStack.length;if(this.importsStack[r-1].has(e))return!0;if(!t&&r>1)for(let t=0;t<r-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,r){if(4096&t)return this.hasImport(e,!0)&&this.parser.raise(v.VarRedeclaration,r,{identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);const n=this.currentScope();let s=n.tsNames.get(e)||0;if(1024&t)return this.maybeExportDefined(n,e),void n.tsNames.set(e,16|s);super.declareName(e,t,r),2&t&&(1&t||(this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e)),s|=1),256&t&&(s|=2),512&t&&(s|=4),128&t&&(s|=8),s&&n.tsNames.set(e,s)}isRedeclaredInScope(e,t,r){const n=e.tsNames.get(t);return(2&n)>0?!(256&r)||!!(512&r)!=(4&n)>0:128&r&&(8&n)>0?!!(2&e.names.get(t))&&!!(1&r):!!(2&r&&(1&n)>0)||super.isRedeclaredInScope(e,t,r)}checkLocalExport(e){const{name:t}=e;if(!this.hasImport(t)){for(let e=this.scopeStack.length-1;e>=0;e--){const r=this.scopeStack[e].tsNames.get(t);if((1&r)>0||(16&r)>0)return}super.checkLocalExport(e)}}}class Be{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function Fe(e,t){return(e?2:0)|(t?1:0)}class je{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{const[t,r]=e;if(!this.hasPlugin(t))return!1;const n=this.plugins.get(t);for(const e of Object.keys(r))if((null==n?void 0:n[e])!==r[e])return!1;return!0}}getPluginOption(e,t){var r;return null==(r=this.plugins.get(e))?void 0:r[t]}}function Ue(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Ye(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function $e(e,t,r){let n=null,s=t.length;for(;null===n&&s>0;)n=t[--s];null===n||n.start>r.start?Ye(e,r.comments):Ue(n,r.comments)}class He extends je{addComment(e){this.filename&&(e.loc.filename=this.filename);const{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){const{commentStack:t}=this.state,r=t.length;if(0===r)return;let n=r-1;const s=t[n];s.start===e.end&&(s.leadingNode=e,n--);const{start:i}=e;for(;n>=0;n--){const r=t[n],s=r.end;if(!(s>i)){s===i&&(r.trailingNode=e);break}r.containingNode=e,this.finalizeComment(r),t.splice(n,1)}}finalizeComment(e){var t;const{comments:r}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Ue(e.leadingNode,r),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,r);else{const{containingNode:n,start:s}=e;if(44===this.input.charCodeAt(this.offsetToSourcePos(s)-1))switch(n.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":$e(n,n.properties,e);break;case"CallExpression":case"OptionalCallExpression":$e(n,n.arguments,e);break;case"ImportExpression":$e(n,[n.source,null!=(t=n.options)?t:null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":$e(n,n.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":$e(n,n.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":$e(n,n.specifiers,e);break;case"TSEnumDeclaration":case"TSEnumBody":$e(n,n.members,e);break;default:Ye(n,r)}else Ye(n,r)}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:t}=this.state,{length:r}=t;if(0===r)return;const n=t[r-1];n.leadingNode===e&&(n.leadingNode=null)}takeSurroundingComments(e,t,r){const{commentStack:n}=this.state,s=n.length;if(0===s)return;let i=s-1;for(;i>=0;i--){const s=n[i],a=s.end;if(s.start===r)s.leadingNode=e;else if(a===t)s.trailingNode=e;else if(a<t)break}}}class We{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[P.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(1&this.flags)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:t,startIndex:r,startLine:s,startColumn:i}){this.strict=!1!==e&&(!0===e||"module"===t),this.startIndex=r,this.curLine=s,this.lineStart=-i,this.startLoc=this.endLoc=new n(s,i,r)}get maybeInArrowParameters(){return(2&this.flags)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(4&this.flags)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(8&this.flags)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(16&this.flags)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(32&this.flags)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(64&this.flags)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(128&this.flags)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(256&this.flags)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(512&this.flags)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(1024&this.flags)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(2048&this.flags)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(4096&this.flags)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new n(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const e=new We;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}}var Ve=function(e){return e>=48&&e<=57};const ze={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},qe={bin:e=>48===e||49===e,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function Ke(e,t,r,n,s,i){const a=r,o=n,c=s;let l="",u=null,h=r;const{length:p}=t;for(;;){if(r>=p){i.unterminated(a,o,c),l+=t.slice(h,r);break}const d=t.charCodeAt(r);if(Ge(e,d,t,r)){l+=t.slice(h,r);break}if(92===d){l+=t.slice(h,r);const a=Je(t,r,n,s,"template"===e,i);null!==a.ch||u?l+=a.ch:u={pos:r,lineStart:n,curLine:s},({pos:r,lineStart:n,curLine:s}=a),h=r}else 8232===d||8233===d?(++s,n=++r):10===d||13===d?"template"===e?(l+=t.slice(h,r)+"\n",++r,13===d&&10===t.charCodeAt(r)&&++r,++s,h=n=r):i.unterminated(a,o,c):++r}return{pos:r,str:l,firstInvalidLoc:u,lineStart:n,curLine:s,containsInvalid:!!u}}function Ge(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function Je(e,t,r,n,s,i){const a=!s;t++;const o=e=>({pos:t,ch:e,lineStart:r,curLine:n}),c=e.charCodeAt(t++);switch(c){case 110:return o("\n");case 114:return o("\r");case 120:{let s;return({code:s,pos:t}=Xe(e,t,r,n,2,!1,a,i)),o(null===s?null:String.fromCharCode(s))}case 117:{let s;return({code:s,pos:t}=Qe(e,t,r,n,a,i)),o(null===s?null:String.fromCodePoint(s))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(s)return o(null);i.strictNumericEscape(t-1,r,n);default:if(c>=48&&c<=55){const a=t-1;let c=/^[0-7]+/.exec(e.slice(a,t+2))[0],l=parseInt(c,8);l>255&&(c=c.slice(0,-1),l=parseInt(c,8)),t+=c.length-1;const u=e.charCodeAt(t);if("0"!==c||56===u||57===u){if(s)return o(null);i.strictNumericEscape(a,r,n)}return o(String.fromCharCode(l))}return o(String.fromCharCode(c))}}function Xe(e,t,r,n,s,i,a,o){const c=t;let l;return({n:l,pos:t}=Ze(e,t,r,n,16,s,i,!1,o,!a)),null===l&&(a?o.invalidEscapeSequence(c,r,n):t=c-1),{code:l,pos:t}}function Ze(e,t,r,n,s,i,a,o,c,l){const u=t,h=16===s?ze.hex:ze.decBinOct,p=16===s?qe.hex:10===s?qe.dec:8===s?qe.oct:qe.bin;let d=!1,f=0;for(let u=0,m=null==i?1/0:i;u<m;++u){const i=e.charCodeAt(t);let u;if(95!==i||"bail"===o){if(u=i>=97?i-97+10:i>=65?i-65+10:Ve(i)?i-48:1/0,u>=s){if(u<=9&&l)return{n:null,pos:t};if(u<=9&&c.invalidDigit(t,r,n,s))u=0;else{if(!a)break;u=0,d=!0}}++t,f=f*s+u}else{const s=e.charCodeAt(t-1),i=e.charCodeAt(t+1);if(o){if(Number.isNaN(i)||!p(i)||h.has(s)||h.has(i)){if(l)return{n:null,pos:t};c.unexpectedNumericSeparator(t,r,n)}}else{if(l)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===u||null!=i&&t-u!==i||d?{n:null,pos:t}:{n:f,pos:t}}function Qe(e,t,r,n,s,i){let a;if(123===e.charCodeAt(t)){if(++t,({code:a,pos:t}=Xe(e,t,r,n,e.indexOf("}",t)-t,!0,s,i)),++t,null!==a&&a>1114111){if(!s)return{code:null,pos:t};i.invalidCodePoint(t,r,n)}}else({code:a,pos:t}=Xe(e,t,r,n,4,!1,s,i));return{code:a,pos:t}}function et(e,t,r){return new n(r,e-t,e)}const tt=new Set([103,109,115,105,121,117,100,118]);class rt{constructor(e){const t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new s(e.startLoc,e.endLoc)}}class nt extends He{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,r,n)=>!!(2048&this.optionFlags)&&(this.raise(v.InvalidDigit,et(e,t,r),{radix:n}),!0),numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,r)=>{this.recordStrictModeErrors(v.StrictNumericEscape,et(e,t,r))},unterminated:(e,t,r)=>{throw this.raise(v.UnterminatedString,et(e-1,t,r))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(e,t,r)=>{throw this.raise(v.UnterminatedTemplate,et(e,t,r))}}),this.state=new We,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),256&this.optionFlags&&this.pushToken(new rt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ce.lastIndex=e,Ce.test(this.input)?Ce.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Ie.lastIndex=e,Ie.test(this.input)?Ie.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){const r=this.input.charCodeAt(e);56320==(64512&r)&&(t=65536+((1023&t)<<10)+(1023&r))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach((([e,t])=>this.raise(e,t))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(140):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());const r=this.state.pos,n=this.input.indexOf(e,r+2);if(-1===n)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=n+e.length,Te.lastIndex=r+2;Te.test(this.input)&&Te.lastIndex<=n;)++this.state.curLine,this.state.lineStart=Te.lastIndex;if(this.isLookahead)return;const i={type:"CommentBlock",value:this.input.slice(r+2,n),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(n+e.length),loc:new s(t,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(i),i}skipLineComment(e){const t=this.state.pos;let r;this.isLookahead||(r=this.state.curPosition());let n=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!ke(n)&&++this.state.pos<this.length;)n=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const i=this.state.pos,a={type:"CommentLine",value:this.input.slice(t+e,i),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(i),loc:new s(r,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(a),a}skipSpace(){const e=this.state.pos,t=4096&this.optionFlags?[]:null;e:for(;this.state.pos<this.length;){const r=this.input.charCodeAt(this.state.pos);switch(r){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{const e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),null==t||t.push(e));break}case 47:{const e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),null==t||t.push(e));break}default:break e}break;default:if(Oe(r))++this.state.pos;else if(45===r&&!this.inModule&&8192&this.optionFlags){const r=this.state.pos;if(45!==this.input.charCodeAt(r+1)||62!==this.input.charCodeAt(r+2)||!(0===e||this.state.lineStart>e))break e;{const e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),null==t||t.push(e))}}else{if(60!==r||this.inModule||!(8192&this.optionFlags))break e;{const e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{const e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),null==t||t.push(e))}}}}}if((null==t?void 0:t.length)>0){const r=this.state.pos,n={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(r),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(n)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const r=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(r)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else ae(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;const t=this.state.pos;for(this.state.pos+=1;!ke(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const r=this.input.slice(t+2,this.state.pos);return this.finishToken(28,r),!0}readToken_mult_modulo(e){let t=42===e?55:54,r=1,n=this.input.charCodeAt(this.state.pos+1);42===e&&42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=57),61!==n||this.state.inType||(r++,t=37===e?33:30),this.finishOp(t,r)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());return this.state.pos+=2,void this.finishToken(4)}}61!==t?this.finishOp(124===e?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===e?41:42,2)}readToken_caret(){const e=this.input.charCodeAt(this.state.pos+1);61!==e||this.state.inType?94===e&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),94===this.input.codePointAt(this.state.pos)&&this.unexpected()):this.finishOp(44,1):this.finishOp(32,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){const t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==t?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){const t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(30,t+1):void this.finishOp(52,t)}61!==t?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(e){const t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===e?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(30,3):this.finishOp(40,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(ae(e))return void this.readWord(e)}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){const r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)}readRegexp(){const e=this.state.startLoc,t=this.state.start+1;let r,n,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(v.UnterminatedRegExp,i(e,1));const t=this.input.charCodeAt(s);if(ke(t))throw this.raise(v.UnterminatedRegExp,i(e,1));if(r)r=!1;else{if(91===t)n=!0;else if(93===t&&n)n=!1;else if(47===t&&!n)break;r=92===t}}const a=this.input.slice(t,s);++s;let o="";const c=()=>i(e,s+2-t);for(;s<this.length;){const e=this.codePointAtPos(s),t=String.fromCharCode(e);if(tt.has(e))118===e?o.includes("u")&&this.raise(v.IncompatibleRegExpUVFlags,c()):117===e&&o.includes("v")&&this.raise(v.IncompatibleRegExpUVFlags,c()),o.includes(t)&&this.raise(v.DuplicateRegExpFlags,c());else{if(!oe(e)&&92!==e)break;this.raise(v.MalformedRegExpFlags,c())}++s,o+=t}this.state.pos=s,this.finishToken(138,{pattern:a,flags:o})}readInt(e,t,r=!1,n=!0){const{n:s,pos:i}=Ze(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,r,n,this.errorHandlers_readInt,!1);return this.state.pos=i,s}readRadixNumber(e){const t=this.state.pos,r=this.state.curPosition();let n=!1;this.state.pos+=2;const s=this.readInt(e);null==s&&this.raise(v.InvalidDigit,i(r,2),{radix:e});const a=this.input.charCodeAt(this.state.pos);if(110===a)++this.state.pos,n=!0;else if(109===a)throw this.raise(v.InvalidDecimal,r);if(ae(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());if(n){const e=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,e)}else this.finishToken(135,s)}readNumber(e){const t=this.state.pos,r=this.state.curPosition();let n=!1,s=!1,a=!1,o=!1;e||null!==this.readInt(10)||this.raise(v.InvalidNumber,this.state.curPosition());const c=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(c){const e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,r),!this.state.strict){const t=e.indexOf("_");t>0&&this.raise(v.ZeroDigitNumericSeparator,i(r,t))}o=c&&!/[89]/.test(e)}let l=this.input.charCodeAt(this.state.pos);if(46!==l||o||(++this.state.pos,this.readInt(10),n=!0,l=this.input.charCodeAt(this.state.pos)),69!==l&&101!==l||o||(l=this.input.charCodeAt(++this.state.pos),43!==l&&45!==l||++this.state.pos,null===this.readInt(10)&&this.raise(v.InvalidOrMissingExponent,r),n=!0,a=!0,l=this.input.charCodeAt(this.state.pos)),110===l&&((n||c)&&this.raise(v.InvalidBigIntLiteral,r),++this.state.pos,s=!0),109===l){this.expectPlugin("decimal",this.state.curPosition()),(a||c)&&this.raise(v.InvalidDecimal,r),++this.state.pos;var u=!0}if(ae(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());const h=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(s)return void this.finishToken(136,h);if(u)return void this.finishToken(137,h);const p=o?parseInt(h,8):parseFloat(h);this.finishToken(135,p)}readCodePoint(e){const{code:t,pos:r}=Qe(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=r,t}readString(e){const{str:t,pos:r,curLine:n,lineStart:s}=Ke(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=r+1,this.state.lineStart=s,this.state.curLine=n,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const e=this.input[this.state.pos],{str:t,firstInvalidLoc:r,pos:s,curLine:i,lineStart:a}=Ke("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=s+1,this.state.lineStart=a,this.state.curLine=i,r&&(this.state.firstInvalidTemplateEscapePos=new n(r.curLine,r.pos-r.lineStart,this.sourceToOffsetPos(r.pos))),96===this.input.codePointAt(s)?this.finishToken(24,r?null:e+t+"`"):(this.state.pos++,this.finishToken(25,r?null:e+t+"${"))}recordStrictModeErrors(e,t){const r=t.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(e,t):this.state.strictErrors.set(r,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="";const r=this.state.pos;let n=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const e=this.codePointAtPos(this.state.pos);if(oe(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(n,this.state.pos);const e=this.state.curPosition(),s=this.state.pos===r?ae:oe;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(v.MissingUnicodeEscape,this.state.curPosition()),n=this.state.pos-1;continue}++this.state.pos;const i=this.readCodePoint(!0);null!==i&&(s(i)||this.raise(v.EscapedCharNotAnIdentifier,e),t+=String.fromCodePoint(i)),n=this.state.pos}}}return t+this.input.slice(n,this.state.pos)}readWord(e){const t=this.readWord1(e),r=I.get(t);void 0!==r?this.finishToken(r,G(r)):this.finishToken(132,t)}checkKeywordEscapes(){const{type:e}=this.state;K(e)&&this.state.containsEsc&&this.raise(v.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:G(e)})}raise(e,t,r={}){const s=e(t instanceof n?t:t.loc.start,r);if(!(2048&this.optionFlags))throw s;return this.isLookahead||this.state.errors.push(s),s}raiseOverwrite(e,t,r={}){const s=t instanceof n?t:t.loc.start,i=s.index,a=this.state.errors;for(let t=a.length-1;t>=0;t--){const n=a[t];if(n.loc.index===i)return a[t]=e(s,r);if(n.loc.index<i)break}return this.raise(e,t,r)}updateContext(e){}unexpected(e,t){throw this.raise(v.UnexpectedToken,null!=e?e:this.state.startLoc,{expected:t?G(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(v.MissingPlugin,null!=t?t:this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some((e=>this.hasPlugin(e))))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,r,n)=>{this.raise(e,et(t,r,n))}}}class st{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class it{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new st)}exit(){const e=this.stack.pop(),t=this.current();for(const[r,n]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,n):this.parser.raise(v.InvalidPrivateFieldResolution,n,{identifierName:r})}declarePrivateName(e,t,r){const{privateNames:n,loneAccessors:s,undefinedPrivateNames:i}=this.current();let a=n.has(e);if(3&t){const r=a&&s.get(e);r?(a=(3&r)==(3&t)||(4&r)!=(4&t),a||s.delete(e)):a||s.set(e,t)}a&&this.parser.raise(v.PrivateNameRedeclaration,r,{identifierName:e}),n.add(e),i.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.parser.raise(v.InvalidPrivateFieldResolution,t,{identifierName:e})}}class at{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class ot extends at{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,t){const r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class ct{constructor(e){this.parser=void 0,this.stack=[new at],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){const r=t.loc.start,{stack:n}=this;let s=n.length-1,i=n[s];for(;!i.isCertainlyParameterDeclaration();){if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(e,r),i=n[--s]}this.parser.raise(e,r)}recordArrowParameterBindingError(e,t){const{stack:r}=this,n=r[r.length-1],s=t.loc.start;if(n.isCertainlyParameterDeclaration())this.parser.raise(e,s);else{if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,s)}}recordAsyncArrowParametersError(e){const{stack:t}=this;let r=t.length-1,n=t[r];for(;n.canBeArrowParameterDeclaration();)2===n.type&&n.recordDeclarationError(v.AwaitBindingIdentifier,e),n=t[--r]}validateAsPattern(){const{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((([t,r])=>{this.parser.raise(t,r);let n=e.length-2,s=e[n];for(;s.canBeArrowParameterDeclaration();)s.clearDeclarationError(r.index),s=e[--n]}))}}function lt(){return new at}class ut extends nt{addExtra(e,t,r,n=!0){if(!e)return;let{extra:s}=e;null==s&&(s={},e.extra=s),n?s[t]=r:Object.defineProperty(s,t,{enumerable:n,value:r})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){const r=e+t.length;if(this.input.slice(e,r)===t){const e=this.input.charCodeAt(r);return!(oe(e)||55296==(64512&e))}return!1}isLookaheadContextual(e){const t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return _e(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return _e(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){const r={node:null};try{const n=e(((e=null)=>{throw r.node=e,r}));if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:n,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const n=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:n};if(e===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:n};throw e}}checkExpressionErrors(e,t){if(!e)return!1;const{shorthandAssignLoc:r,doubleProtoLoc:n,privateKeyLoc:s,optionalParametersLoc:i}=e;if(!t)return!!(r||n||i||s);null!=r&&this.raise(v.InvalidCoverInitializedName,r),null!=n&&this.raise(v.DuplicateProto,n),null!=s&&this.raise(v.UnexpectedPrivateField,s),null!=i&&this.unexpected(i)}isLiteralPropertyName(){return V(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){const t=this.state.labels;this.state.labels=[];const r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const n=this.inModule;this.inModule=e;const s=this.scope,i=this.getScopeHandler();this.scope=new i(this,e);const a=this.prodParam;this.prodParam=new Be;const o=this.classScope;this.classScope=new it(this);const c=this.expressionScope;return this.expressionScope=new ct(this),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=n,this.scope=s,this.prodParam=a,this.classScope=o,this.expressionScope=c}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),32&this.optionFlags&&(e|=1),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){const{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}}class ht{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class pt{constructor(e,t,r){this.type="",this.start=t,this.end=0,this.loc=new s(r),128&(null==e?void 0:e.optionFlags)&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}}const dt=pt.prototype;dt.__clone=function(){const e=new pt(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){const n=t[r];"leadingComments"!==n&&"trailingComments"!==n&&"innerComments"!==n&&(e[n]=this[n])}return e};class ft extends ut{startNode(){const e=this.state.startLoc;return new pt(this,e.index,e)}startNodeAt(e){return new pt(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,r){return e.type=t,e.end=r.index,e.loc.end=r,128&this.optionFlags&&(e.range[1]=r.index),4096&this.optionFlags&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,128&this.optionFlags&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,128&this.optionFlags&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){const{type:t,start:r,end:n,loc:s,range:i,name:a}=e,o=Object.create(dt);return o.type=t,o.start=r,o.end=n,o.loc=s,o.range=i,o.name=a,e.extra&&(o.extra=e.extra),o}cloneStringLiteral(e){const{type:t,start:r,end:n,loc:s,range:i,extra:a}=e,o=Object.create(dt);return o.type=t,o.start=r,o.end=n,o.loc=s,o.range=i,o.extra=a,o.value=e.value,o}}const mt=e=>"ParenthesizedExpression"===e.type?mt(e.expression):e;class yt extends ft{toAssignable(e,t=!1){var r,n;let s;switch(("ParenthesizedExpression"===e.type||null!=(r=e.extra)&&r.parenthesized)&&(s=mt(e),t?"Identifier"===s.type?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,e):"MemberExpression"===s.type||this.isOptionalMemberExpression(s)||this.raise(v.InvalidParenthesizedAssignment,e):this.raise(v.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let r=0,n=e.properties.length,s=n-1;r<n;r++){var i;const n=e.properties[r],a=r===s;this.toAssignableObjectExpressionProp(n,a,t),a&&"RestElement"===n.type&&null!=(i=e.extra)&&i.trailingCommaLoc&&this.raise(v.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,null==(n=e.extra)?void 0:n.trailingCommaLoc,t);break;case"AssignmentExpression":"="!==e.operator&&this.raise(v.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(s,t)}}toAssignableObjectExpressionProp(e,t,r){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?v.PatternHasAccessor:v.PatternHasMethod,e.key);else if("SpreadElement"===e.type){this.castNodeTo(e,"RestElement");const n=e.argument;this.checkToRestConversion(n,!1),this.toAssignable(n,r),t||this.raise(v.RestTrailingComma,e)}else this.toAssignable(e,r)}toAssignableList(e,t,r){const n=e.length-1;for(let s=0;s<=n;s++){const i=e[s];i&&(this.toAssignableListItem(e,s,r),"RestElement"===i.type&&(s<n?this.raise(v.RestTrailingComma,i):t&&this.raise(v.RestTrailingComma,t)))}}toAssignableListItem(e,t,r){const n=e[t];if("SpreadElement"===n.type){this.castNodeTo(n,"RestElement");const e=n.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,r)}else this.toAssignable(n,r)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every(((e,r)=>"ObjectMethod"!==e.type&&(r===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(const t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e){const t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){const e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,t,r){const n=1&r,s=[];let i=!0;for(;!this.eat(e);)if(i?i=!1:this.expect(12),n&&this.match(12))s.push(null);else{if(this.eat(e))break;if(this.match(21)){let n=this.parseRestBinding();if((this.hasPlugin("flow")||2&r)&&(n=this.parseFunctionParamType(n)),s.push(n),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{const e=[];if(2&r)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());s.push(this.parseBindingElement(r,e))}}return s}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){const{type:e,startLoc:t}=this.state;if(21===e)return this.parseBindingRestProperty(this.startNode());const r=this.startNode();return 139===e?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),r.key=this.parsePrivateName()):this.parsePropertyName(r),r.method=!1,this.parseObjPropValue(r,t,!1,!1,!0,!1)}parseBindingElement(e,t){const r=this.parseMaybeDefault();return(this.hasPlugin("flow")||2&e)&&this.parseFunctionParamType(r),t.length&&(r.decorators=t,this.resetStartLocationFromNode(r,t[0])),this.parseMaybeDefault(r.loc.start,r)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(null!=e||(e=this.state.startLoc),t=null!=t?t:this.parseBindingAtom(),!this.eat(29))return t;const r=this.startNodeAt(e);return r.left=t,r.right=this.parseMaybeAssignAllowIn(),this.finishNode(r,"AssignmentPattern")}isValidLVal(e,t,r){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(e){return"OptionalMemberExpression"===e.type}checkLVal(e,t,r=64,n=!1,s=!1,i=!1){var a;const o=e.type;if(this.isObjectMethod(e))return;const c=this.isOptionalMemberExpression(e);if(c||"MemberExpression"===o)return c&&(this.expectPlugin("optionalChainingAssign",e.loc.start),"AssignmentExpression"!==t.type&&this.raise(v.InvalidLhsOptionalChaining,e,{ancestor:t})),void(64!==r&&this.raise(v.InvalidPropertyBindingPattern,e));if("Identifier"===o){this.checkIdentifier(e,r,s);const{name:t}=e;return void(n&&(n.has(t)?this.raise(v.ParamDupe,e):n.add(t)))}const l=this.isValidLVal(o,!(i||null!=(a=e.extra)&&a.parenthesized)&&"AssignmentExpression"===t.type,r);if(!0===l)return;if(!1===l){const n=64===r?v.InvalidLhs:v.InvalidLhsBinding;return void this.raise(n,e,{ancestor:t})}let u,h;"string"==typeof l?(u=l,h="ParenthesizedExpression"===o):[u,h]=l;const p="ArrayPattern"===o||"ObjectPattern"===o?{type:o}:t,d=e[u];if(Array.isArray(d))for(const e of d)e&&this.checkLVal(e,p,r,n,s,h);else d&&this.checkLVal(d,p,r,n,s,h)}checkIdentifier(e,t,r=!1){this.state.strict&&(r?fe(e.name,this.inModule):de(e.name))&&(64===t?this.raise(v.StrictEvalArguments,e,{referenceName:e.name}):this.raise(v.StrictEvalArgumentsBinding,e,{bindingName:e.name})),8192&t&&"let"===e.name&&this.raise(v.LetInLexicalBinding,e),64&t||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(v.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0)}}function gt(e){if(!e)throw new Error("Assert fail")}const vt=g`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function bt(e){return"private"===e||"public"===e||"protected"===e}function wt(e){return"in"===e||"out"===e}function xt(e){if("MemberExpression"!==e.type)return!1;const{computed:t,property:r}=e;return(!t||"StringLiteral"===r.type||!("TemplateLiteral"!==r.type||r.expressions.length>0))&&At(e.object)}function St(e,t){var r;const{type:n}=e;if(null!=(r=e.extra)&&r.parenthesized)return!1;if(t){if("Literal"===n){const{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===n||"BooleanLiteral"===n)return!0;return!(!Pt(e,t)&&!function(e,t){if("UnaryExpression"===e.type){const{operator:r,argument:n}=e;if("-"===r&&Pt(n,t))return!0}return!1}(e,t))||"TemplateLiteral"===n&&0===e.expressions.length||!!xt(e)}function Pt(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function At(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&At(e.object)}const Et=g`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Tt=["minimal","fsharp","hack","smart"],kt=["^^","@@","^","%","#"],_t={estree:e=>class extends e{parse(){const e=x(super.parse());return 256&this.optionFlags&&(e.tokens=e.tokens.map(x)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch(e){}const n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch(e){t=null}const r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){const t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}estreeParseChainExpression(e,t){const r=this.startNodeAtNode(e);return r.expression=e,this.finishNodeAt(r,"ChainExpression",t)}directiveToStmt(e){const t=e.value;delete e.value,this.castNodeTo(t,"Literal"),t.raw=t.extra.raw,t.value=t.extra.expressionValue;const r=this.castNodeTo(e,"ExpressionStatement");return r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){const{start:t,end:r,loc:n,range:s,raw:i,value:a}=e,o=Object.create(e.constructor.prototype);return o.type="Literal",o.start=t,o.end=r,o.loc=n,o.range=s,o.raw=i,o.value=a,o}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}parseBlockBody(e,t,r,n,s){super.parseBlockBody(e,t,r,n,s);const i=e.directives.map((e=>this.directiveToStmt(e)));e.body=i.concat(e.body),delete e.directives}parsePrivateName(){const e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);return delete e.id,e.name=t,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){const r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,r,n,s,i,a=!1){let o=this.startNode();o.kind=e.kind,o=super.parseMethod(o,t,r,n,s,i,a),delete o.kind;const{typeParameters:c}=e;c&&(delete e.typeParameters,o.typeParameters=c,this.resetStartLocationFromNode(o,c));const l=this.castNodeTo(o,"FunctionExpression");return e.value=l,"ClassPrivateMethod"===i&&(e.computed=!1),"ObjectMethod"===i?("method"===e.kind&&(e.kind="init"),e.shorthand=!1,this.finishNode(e,"Property")):this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return"Literal"===e.type?"constructor"===e.value:super.nameIsConstructor(e)}parseClassProperty(...e){const t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(t,"PropertyDefinition"),t):t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(t,"PropertyDefinition"),t.computed=!1,t):t}parseClassAccessorProperty(e){const t=super.parseClassAccessorProperty(e);return this.getPluginOption("estree","classFeatures")?(t.abstract&&this.hasPlugin("typescript")?(delete t.abstract,this.castNodeTo(t,"TSAbstractAccessorProperty")):this.castNodeTo(t,"AccessorProperty"),t):t}parseObjectProperty(e,t,r,n){const s=super.parseObjectProperty(e,t,r,n);return s&&(s.kind="init",this.castNodeTo(s,"Property")),s}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,t,r){return"Property"===e?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){const{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){"Property"!==e.type||"get"!==e.kind&&"set"!==e.kind?"Property"===e.type&&e.method?this.raise(v.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,t,r):this.raise(v.PatternHasAccessor,e.key)}finishCallExpression(e,t){const r=super.finishCallExpression(e,t);var n,s;return"Import"===r.callee.type?(this.castNodeTo(r,"ImportExpression"),r.source=r.arguments[0],r.options=null!=(n=r.arguments[1])?n:null,r.attributes=null!=(s=r.arguments[1])?s:null,delete r.arguments,delete r.callee):"OptionalCallExpression"===r.type?this.castNodeTo(r,"CallExpression"):r.optional=!1,r}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e,t){const r=this.state.lastTokStartLoc,n=super.parseExport(e,t);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":1===n.specifiers.length&&"ExportNamespaceSpecifier"===n.specifiers[0].type&&(this.castNodeTo(n,"ExportAllDeclaration"),n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var s;const{declaration:e}=n;"ClassDeclaration"===(null==e?void 0:e.type)&&(null==(s=e.decorators)?void 0:s.length)>0&&e.start===n.start&&this.resetStartLocation(n,r)}}return n}stopParseSubscript(e,t){const r=super.stopParseSubscript(e,t);return t.optionalChainMember?this.estreeParseChainExpression(r,e.loc.end):r}parseMember(e,t,r,n,s){const i=super.parseMember(e,t,r,n,s);return"OptionalMemberExpression"===i.type?this.castNodeTo(i,"MemberExpression"):i.optional=!1,i}isOptionalMemberExpression(e){return"ChainExpression"===e.type?"MemberExpression"===e.expression.type:super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return"Property"===e.type&&(e.method||"get"===e.kind||"set"===e.kind)}castNodeTo(e,t){const r=super.castNodeTo(e,t);return this.fillOptionalPropertiesForTSESLint(r),r}cloneIdentifier(e){const t=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(t),t}cloneStringLiteral(e){return"Literal"===e.type?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,t,r){return x(super.finishNodeAt(e,t,r))}finishNode(e,t){const r=super.finishNode(e,t);return this.fillOptionalPropertiesForTSESLint(r),r}resetStartLocation(e,t){super.resetStartLocation(e,t),x(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),x(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Le.UnterminatedJsxContent,this.state.startLoc);const r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?void(60===r&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(r)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(142,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:ke(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let r;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);const n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):ke(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,this.state.pos++),this.finishToken(134,t)}jsxReadEntity(){const e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);const t=this.readInt(e,void 0,!1,"bail");if(null!==t&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=59===this.codePointAtPos(this.state.pos));)++this.state.pos;if(r){const t=this.input.slice(e,this.state.pos),r=Ee[t];if(++this.state.pos,r)return r}}return this.state.pos=e,"&"}jsxReadWord(){let e;const t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(oe(e)||45===e);this.finishToken(141,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){const e=this.startNode();return this.match(141)?e.name=this.state.value:K(this.state.type)?e.name=G(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){const e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;const r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){const e=this.state.startLoc;let t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(16);){const r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(P.brace),this.next(),e=this.jsxParseExpressionContainer(e,P.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(Le.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Le.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(P.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{const t=this.parseExpression();e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){const e=this.startNode();return this.match(5)?(this.setContext(P.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(P.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){const t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){const t=[];for(;!this.match(56)&&!this.match(144);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){const t=this.startNodeAt(e);return this.eat(144)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(144),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){const t=this.startNodeAt(e),r=[],n=this.jsxParseOpeningElementAt(e);let s=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){s=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 142:r.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const e=this.startNode();this.setContext(P.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(e)):r.push(this.jsxParseExpressionContainer(e,P.j_expr));break}default:this.unexpected()}Ne(n)&&!Ne(s)&&null!==s?this.raise(Le.MissingClosingTagFragment,s):!Ne(n)&&Ne(s)?this.raise(Le.MissingClosingTagElement,s,{openingTagName:Me(n.name)}):Ne(n)||Ne(s)||Me(s.name)!==Me(n.name)&&this.raise(Le.MissingClosingTagElement,s,{openingTagName:Me(n.name)})}if(Ne(n)?(t.openingFragment=n,t.closingFragment=s):(t.openingElement=n,t.closingElement=s),t.children=r,this.match(47))throw this.raise(Le.UnwrappedAdjacentJSXElements,this.state.startLoc);return Ne(n)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){const e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){const{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){const t=this.curContext();if(t!==P.j_expr){if(t===P.j_oTag||t===P.j_cTag){if(ae(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(144);if((34===e||39===e)&&t===P.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(143);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){const{context:t,type:r}=this.state;if(56===r&&143===e)t.splice(-2,2,P.j_cTag),this.state.canStartJSXElement=!1;else if(143===r)t.push(P.j_oTag);else if(144===r){const r=t[t.length-1];r===P.j_oTag&&56===e||r===P.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===P.j_expr):(this.setContext(P.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=B[r]}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return be}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}finishToken(e,t){134!==e&&13!==e&&28!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=Ae.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||14);const r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){const e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(xe.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);const s=this.flowParseFunctionTypeParams();return r.params=s.params,r.rest=s.rest,r.this=s._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){return this.match(80)?this.flowParseDeclareClass(e):this.match(68)?this.flowParseDeclareFunction(e):this.match(74)?this.flowParseDeclareVariable(e):this.eatContextual(127)?this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(xe.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e)):this.isContextual(130)?this.flowParseDeclareTypeAlias(e):this.isContextual(131)?this.flowParseDeclareOpaqueType(e):this.isContextual(129)?this.flowParseDeclareInterface(e):this.match(82)?this.flowParseDeclareExportDeclaration(e,t):void this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const t=e.body=this.startNode(),r=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),this.isContextual(130)||this.match(87)||this.raise(xe.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(e)):(this.expectContextual(125,xe.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),r.push(e)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let n=null,s=!1;return r.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(s&&this.raise(xe.DuplicateDeclareModuleExports,e),"ES"===n&&this.raise(xe.AmbiguousDeclareModuleKind,e),n="CommonJS",s=!0):("CommonJS"===n&&this.raise(xe.AmbiguousDeclareModuleKind,e),n="ES")})),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){const e=this.state.value;throw this.raise(xe.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:e,suggestion:Pe[e]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(131)?(e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131)?"ExportNamedDeclaration"===(e=this.parseExport(e,null)).type?(e.default=!1,delete e.exportKind,this.castNodeTo(e,"DeclareExportDeclaration")):this.castNodeTo(e,"DeclareExportAllDeclaration"):void this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const t=this.flowParseTypeAlias(e);return this.castNodeTo(t,"DeclareTypeAlias"),t}flowParseDeclareOpaqueType(e){this.next();const t=this.flowParseOpaqueType(e,!0);return this.castNodeTo(t,"DeclareOpaqueType"),t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(113))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(xe.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,r){we.has(e)&&this.raise(r?xe.AssignReservedType:xe.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const t=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),s=this.flowParseTypeAnnotatableIdentifier();return r.name=s.name,r.variance=n,r.bound=s.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(xe.MissingTypeParamDefault,t),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let r=!1;do{const e=this.flowParseTypeParameter(r);t.params.push(e),e.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowInTopLevelContext(e){if(this.curContext()===P.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}flowParseTypeParameterInstantiationInExpression(){if(47===this.reScan_lt())return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext((()=>{this.expect(47);const t=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=t})),this.state.inType=t,this.state.inType||this.curContext()!==P.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(47!==this.reScan_lt())return;const e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,r){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){const r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:s}){const i=this.state.inType;this.state.inType=!0;const a=this.startNode();let o,c;a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let l=!1;for(t&&this.match(6)?(this.expect(6),o=9,c=!0):(this.expect(5),o=8,c=!1),a.exact=c;!this.match(o);){let t=!1,i=null,o=null;const u=this.startNode();if(n&&this.isContextual(118)){const t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),i=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){const e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),t=!0)}const h=this.flowParseVariance();if(this.eat(0))null!=i&&this.unexpected(i),this.eat(0)?(h&&this.unexpected(h.loc.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,t))):a.indexers.push(this.flowParseObjectTypeIndexer(u,t,h));else if(this.match(10)||this.match(47))null!=i&&this.unexpected(i),h&&this.unexpected(h.loc.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(u,t));else{let e="init";(this.isContextual(99)||this.isContextual(104))&&V(this.lookahead().type)&&(e=this.state.value,this.next());const n=this.flowParseObjectTypeProperty(u,t,i,h,e,r,null!=s?s:!c);null===n?(l=!0,o=this.state.lastTokStartLoc):a.properties.push(n)}this.flowObjectTypeSemicolon(),!o||this.match(8)||this.match(9)||this.raise(xe.UnexpectedExplicitInexactInObject,o)}this.expect(o),r&&(a.inexact=l);const u=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=i,u}flowParseObjectTypeProperty(e,t,r,n,s,i,a){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(i?a||this.raise(xe.InexactInsideExact,this.state.lastTokStartLoc):this.raise(xe.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(xe.InexactVariance,n),null):(i||this.raise(xe.UnexpectedSpreadType,this.state.lastTokStartLoc),null!=r&&this.unexpected(r),n&&this.raise(xe.SpreadVariance,n),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=r,e.kind=s;let a=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=r&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),"get"!==s&&"set"!==s||this.flowCheckGetterSetterParams(e),!i&&"constructor"===e.key.name&&e.value.this&&this.raise(xe.ThisParamBannedInConstructor,e.value.this)):("init"!==s&&this.unexpected(),e.method=!1,this.eat(17)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?xe.GetterMayNotHaveThisParam:xe.SetterMayNotHaveThisParam,e.value.this),r!==t&&this.raise("get"===e.kind?v.BadGetterArity:v.BadSetterArity,e),"set"===e.kind&&e.value.rest&&this.raise(v.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){null!=e||(e=this.state.startLoc);let r=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const t=this.startNodeAt(e);t.qualification=r,t.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(t,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t){const r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,r=!1,n=null;const s=this.startNode(),i=this.lookahead(),a=78===this.state.type;return 14===i.type||17===i.type?(a&&!e&&this.raise(xe.ThisParamMustBeFirst,s),t=this.parseIdentifier(a),this.eat(17)&&(r=!0,a&&this.raise(xe.ThisParamMayNotBeOptional,s)),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),s.name=t,s.optional=r,s.typeAnnotation=n,this.finishNode(s,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){const t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){const e=this.state.startLoc,t=this.startNode();let r,n,s=!1;const i=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,n=this.flowParseTupleType(),this.state.noAnonFunctionType=i,n;case 47:{const e=this.startNode();return e.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),r=this.flowParseFunctionTypeParams(),e.params=r.params,e.rest=r.rest,e.this=r._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),this.finishNode(e,"FunctionTypeAnnotation")}case 10:{const e=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(H(this.state.type)||this.match(78)){const e=this.lookahead().type;s=17!==e&&14!==e}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,n=this.flowParseType(),this.state.noAnonFunctionType=i,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),n;this.eat(12)}return r=n?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(n)]):this.flowParseFunctionTypeParams(),e.params=r.params,e.rest=r.rest,e.this=r._this,this.expect(11),this.expect(19),e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",t);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",t);throw this.raise(xe.UnexpectedSubtractionOperand,this.state.startLoc)}return void this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(t,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(t,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(t,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(t,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(K(this.state.type)){const e=G(this.state.type);return this.next(),super.createIdentifier(t,e)}if(H(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){const e=this.state.startLoc;let t=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const n=this.startNodeAt(e),s=this.eat(18);r=r||s,this.expect(0),!s&&this.match(3)?(n.elementType=t,this.next(),t=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=t,n.indexType=this.flowParseType(),this.expect(3),r?(n.optional=s,t=this.finishNode(n,"OptionalIndexedAccessType")):t=this.finishNode(n,"IndexedAccessType"))}return t}flowParsePrefixType(){const e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){const e=this.startNode();this.eat(45);const t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){const e=this.startNode();this.eat(43);const t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){const e=this.state.inType;this.state.inType=!0;const t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(132===this.state.type&&"_"===this.state.value){const e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){const e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){const t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,r=!1){t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,r))):super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!1){if(this.match(14)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){if(W(this.lookahead().type)){const e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}const t=super.parseStatementLike(e);return void 0!==this.flowPragma||this.isValidDirective(t)||(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||H(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(H(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){const{type:e}=this.state;return 126===e||q(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return 126===e||q(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}this.expect(17);const n=this.state.clone(),s=this.state.noArrowAt,i=this.startNodeAt(t);let{consequent:a,failed:o}=this.tryParseConditionalConsequent(),[c,l]=this.getArrowLikeExpressions(a);if(o||l.length>0){const e=[...s];if(l.length>0){this.state=n,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:a,failed:o}=this.tryParseConditionalConsequent()),[c,l]=this.getArrowLikeExpressions(a)}o&&c.length>1&&this.raise(xe.AmbiguousConditionalArrow,n.startLoc),o&&1===c.length&&(this.state=n,e.push(c[0].start),this.state.noArrowAt=e,({consequent:a,failed:o}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=s,this.expect(14),i.test=e,i.consequent=a,i.alternate=this.forwardNoArrowParamsConversionAt(i,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(i,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const r=[e],n=[];for(;0!==r.length;){const e=r.pop();"ArrowFunctionExpression"===e.type&&"BlockStatement"!==e.body.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):n.push(e),r.push(e.body)):"ConditionalExpression"===e.type&&(r.push(e.consequent),r.push(e.alternate))}return t?(n.forEach((e=>this.finishArrowValidation(e))),[n,[]]):function(e,t){const r=[],n=[];for(let s=0;s<e.length;s++)(t(e[s])?r:n).push(e[s]);return[r,n]}(n,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t){const r=super.parseParenItem(e,t);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){const e=this.startNodeAt(t);return e.expression=r,e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,"TypeCastExpression")}return r}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";const t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(131)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(129)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.isContextual(126)){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(130)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const{startLoc:t}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&"type"===e.exportKind&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){const{startLoc:n}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(xe.DeclareClassElement,n):t.value&&this.raise(xe.DeclareClassFieldInitializer,t.value))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){const e=super.readWord1(),t="@@"+e;this.isIterator(e)&&this.state.inType||this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):function(e,t,r){return 64===e&&64===t&&ae(r)}(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(62===e?48:47,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){t||"AssignmentExpression"!==e.type||"TypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){const r=e[t];"TypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let n=0;n<e.length;n++){var r;const s=e[n];!s||"TypeCastExpression"!==s.type||null!=(r=s.extra)&&r.parenthesized||!(e.length>1)&&t||this.raise(xe.TypeCastInPattern,s.typeAnnotation)}return e}parseArrayLike(e,t,r,n){const s=super.parseArrayLike(e,t,r,n);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(s.elements),s}isValidLVal(e,t,r){return"TypeCastExpression"===e||super.isValidLVal(e,t,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,n,s,i){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,n,s,i),t.params&&s){const e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(xe.ThisParamBannedInConstructor,t)}else if("MethodDefinition"===t.type&&s&&t.value.params){const e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(xe.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,r,n){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const t=this.getObjectOrClassMethodParams(e);if(t.length>0){const r=t[0];this.isThisParam(r)&&"get"===e.kind?this.raise(xe.GetterMayNotHaveThisParam,r):this.isThisParam(r)&&this.raise(xe.SetterMayNotHaveThisParam,r)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,n,s,i,a){let o;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!i&&(o=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const c=super.parseObjPropValue(e,t,r,n,s,i,a);return o&&((c.value||c).typeParameters=o),c}parseFunctionParamType(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(xe.PatternIsOptional,e),this.isThisParam(e)&&this.raise(xe.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(xe.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(xe.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){const r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(xe.TypeBeforeInitializer,r.typeAnnotation),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(xe.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,r){t.local=Se(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;const t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){if(super.applyImportPhase(e,t,r,n),t){if(!r&&this.match(65))return;e.exportKind="type"===r?r:"value"}else"type"===r&&this.match(55)&&this.unexpected(),e.importKind="type"===r||"typeof"===r?r:"value"}parseImportSpecifier(e,t,r,n,s){const i=e.imported;let a=null;"Identifier"===i.type&&("type"===i.name?a="type":"typeof"===i.name&&(a="typeof"));let o=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===a||W(this.state.type)?(e.imported=i,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=a,e.local=this.cloneIdentifier(t))}else{if(null!==a&&W(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=a;else{if(t)throw this.raise(v.ImportBindingIsString,e,{importName:i.value});e.imported=i,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(o=!0,e.local=this.cloneIdentifier(e.imported))}const c=Se(e);return r&&c&&this.raise(xe.ImportTypeShorthandOnlyInPureImport,e),(r||c)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),!o||r||c||this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){const r=e.kind;"get"!==r&&"set"!==r&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let n,s=null;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(s=this.state.clone(),n=this.tryParse((()=>super.parseMaybeAssign(e,t)),s),!n.error)return n.node;const{context:r}=this.state,i=r[r.length-1];i!==P.j_oTag&&i!==P.j_expr||r.pop()}if(null!=(r=n)&&r.error||this.match(47)){var i,a;let r;s=s||this.state.clone();const o=this.tryParse((n=>{var s;r=this.flowParseTypeParameterDeclaration();const i=this.forwardNoArrowParamsConversionAt(r,(()=>{const n=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(n,r),n}));null!=(s=i.extra)&&s.parenthesized&&n();const a=this.maybeUnwrapTypeCastExpression(i);return"ArrowFunctionExpression"!==a.type&&n(),a.typeParameters=r,this.resetStartLocationFromNode(a,r),i}),s);let c=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(xe.UnexpectedTypeParameterBeforeAsyncArrowFunction,r),o.node;c=o.node}if(null!=(i=n)&&i.node)return this.state=n.failState,n.node;if(c)return this.state=o.failState,c;if(null!=(a=n)&&a.thrown)throw n.error;if(o.thrown)throw o.error;throw this.raise(xe.UnexpectedTokenAfterTypeParameter,r)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,r,n=!0){if(!r||!this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(xe.ThisParamMustBeFirst,e.params[t]);super.checkParams(e,t,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,t,r){if("Identifier"===e.type&&"async"===e.name&&this.state.noArrowAt.includes(t.index)){this.next();const r=this.startNodeAt(t);r.callee=e,r.arguments=super.parseCallExpressionArguments(11),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){const n=this.state.clone(),s=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t)||e()),n);if(!s.error&&!s.aborted)return s.node;const i=this.tryParse((()=>super.parseSubscripts(e,t,r)),n);if(i.node&&!i.error)return i.node;if(s.node)return this.state=s.failState,s.node;if(i.node)return this.state=i.failState,i.node;throw s.error||i.error}return super.parseSubscripts(e,t,r)}parseSubscript(e,t,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();const s=this.startNodeAt(t);return s.callee=e,s.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),s.arguments=this.parseCallExpressionArguments(11),s.optional=!0,this.finishCallExpression(s,!0)}if(!r&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const r=this.startNodeAt(t);r.callee=e;const s=this.tryParse((()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),r.arguments=super.parseCallExpressionArguments(11),n.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,n.optionalChainMember))));if(s.node)return s.error&&(this.state=s.failState),s.node}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){const t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(9,2)}parseTopLevel(e,t){const r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(xe.UnterminatedFlowComment,this.state.curPosition()),r}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(xe.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const r=this.input.charCodeAt(t+e),n=this.input.charCodeAt(t+e+1);return 58===r&&58===n?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===r&&58!==n&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(xe.EnumBooleanMemberNotInitialized,e,{memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?xe.EnumInvalidMemberInitializerSymbolType:xe.EnumInvalidMemberInitializerPrimaryType:xe.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(xe.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(xe.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){const e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 134:{const r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{const r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,r){const{explicitType:n}=t;null!==n&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let s=!1;for(;!this.match(8);){if(this.eat(21)){s=!0;break}const i=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),c=a.name;if(""===c)continue;/^[a-z]/.test(c)&&this.raise(xe.EnumInvalidMemberName,a,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),r.has(c)&&this.raise(xe.EnumDuplicateMemberName,a,{memberName:c,enumName:e}),r.add(c);const l={enumName:e,explicitType:t,memberName:c};switch(i.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"boolean"),i.init=o.value,n.booleanMembers.push(this.finishNode(i,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"number"),i.init=o.value,n.numberMembers.push(this.finishNode(i,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"string"),i.init=o.value,n.stringMembers.push(this.finishNode(i,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,l);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,l);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,l);break;default:n.defaultedMembers.push(this.finishNode(i,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:s}}flowEnumStringMembers(e,t,{enumName:r}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(t,{enumName:r});return t}for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:r});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!H(this.state.type))throw this.raise(xe.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});const{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(xe.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){const r=t.name,n=t.loc.start,s=this.flowEnumParseExplicitType({enumName:r});this.expect(5);const{members:i,hasUnknownMembers:a}=this.flowEnumMembers({enumName:r,explicitType:s});switch(e.hasUnknownMembers=a,s){case"boolean":return e.explicitType=!0,e.members=i.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=i.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=i.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{const t=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const s=i.booleanMembers.length,a=i.numberMembers.length,o=i.stringMembers.length,c=i.defaultedMembers.length;if(s||a||o||c){if(s||a){if(!a&&!o&&s>=c){for(const e of i.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=i.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!s&&!o&&a>=c){for(const e of i.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=i.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(xe.EnumInconsistentMemberValues,n,{enumName:r}),t()}return e.members=this.flowEnumStringMembers(i.stringMembers,i.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody")}return t()}}}flowParseEnumDeclaration(e){const t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){const e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){const t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}reScan_lt_gt(){const{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:vt.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:vt.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:vt.InvalidModifierOnTypeParameter})}getScopeHandler(){return Re}tsIsIdentifier(){return H(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),!this.hasPrecedingLineBreak()&&this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,t,r){if(!H(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;const n=this.state.value;if(e.includes(n)){if(r&&this.match(106))return;if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return n}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:n=vt.InvalidModifierOnTypeMember},s){const i=(e,t,r,n)=>{t===r&&s[n]&&this.raise(vt.InvalidModifiersOrder,e,{orderedModifiers:[r,n]})},a=(e,t,r,n)=>{(s[r]&&t===n||s[n]&&t===r)&&this.raise(vt.IncompatibleModifiers,e,{modifiers:[r,n]})};for(;;){const{startLoc:o}=this.state,c=this.tsParseModifier(e.concat(null!=t?t:[]),r,s.static);if(!c)break;bt(c)?s.accessibility?this.raise(vt.DuplicateAccessibilityModifier,o,{modifier:c}):(i(o,c,c,"override"),i(o,c,c,"static"),i(o,c,c,"readonly"),s.accessibility=c):wt(c)?(s[c]&&this.raise(vt.DuplicateModifier,o,{modifier:c}),s[c]=!0,i(o,c,"in","out")):(hasOwnProperty.call(s,c)?this.raise(vt.DuplicateModifier,o,{modifier:c}):(i(o,c,"static","readonly"),i(o,c,"static","override"),i(o,c,"override","readonly"),i(o,c,"abstract","override"),a(o,c,"declare","override"),a(o,c,"static","abstract")),s[c]=!0),null!=t&&t.includes(c)&&this.raise(n,o,{modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){const r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,n){const s=[];let i=-1;for(;!this.tsIsListTerminator(e);){i=-1;const n=t();if(null==n)return;if(s.push(n),!this.eat(12)){if(this.tsIsListTerminator(e))break;return void(r&&this.expect(12))}i=this.state.lastTokStartLoc.index}return n&&(n.value=i),s}tsParseBracketedList(e,t,r,n,s){n||(r?this.expect(0):this.expect(47));const i=this.tsParseDelimitedList(e,t,s);return r?this.expect(3):this.expect(48),i}tsParseImportType(){const e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(vt.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom()),this.eat(12)?e.options=this.tsParseImportTypeOptions():e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName(3)),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseImportTypeOptions(){const e=this.startNode();this.expect(5);const t=this.startNode();return this.isContextual(76)?(t.method=!1,t.key=this.parseIdentifier(!0),t.computed=!1,t.shorthand=!1):this.unexpected(null,76),this.expect(14),t.value=this.tsParseImportTypeWithPropertyValue(),e.properties=[this.finishObjectProperty(t)],this.expect(8),this.finishNode(e,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){const e=this.startNode(),t=[];for(this.expect(5);!this.match(8);){const e=this.state.type;H(e)||134===e?t.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return e.properties=t,this.next(),this.finishNode(e,"ObjectExpression")}tsParseEntityName(e){let t;if(1&e&&this.match(78))if(2&e)t=this.parseIdentifier(!0);else{const e=this.startNode();this.next(),t=this.finishNode(e,"ThisExpression")}else t=this.parseIdentifier(!!(1&e));for(;this.eat(16);){const r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(!!(1&e)),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){const t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){const t=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),0===t.params.length&&this.raise(vt.EmptyTypeParameters,t),-1!==r.value&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){const r=19===e;t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(r||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(11,41,2);for(const t of e){const{type:e}=t;"AssignmentPattern"!==e&&"TSParameterProperty"!==e||this.raise(vt.UnsupportedSignatureParameterKind,t,{type:e})}return e}tsParseTypeMemberSemicolon(){this.eat(12)||this.isLineTerminator()||this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!H(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];const r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){if(this.eat(17)&&(e.optional=!0),this.match(10)||this.match(47)){t&&this.raise(vt.ReadonlyForMethodSignature,e);const r=e;r.kind&&this.match(47)&&this.raise(vt.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon();const n="parameters",s="typeAnnotation";if("get"===r.kind)r[n].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(r[n][0])&&this.raise(vt.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if("set"===r.kind){if(1!==r[n].length)this.raise(v.BadSetterArity,this.state.curPosition());else{const e=r[n][0];this.isThisParam(e)&&this.raise(vt.AccessorCannotDeclareThisParameter,this.state.curPosition()),"Identifier"===e.type&&e.optional&&this.raise(vt.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),"RestElement"===e.type&&this.raise(vt.SetAccessorCannotHaveRestParameter,this.state.curPosition())}r[s]&&this.raise(vt.SetAccessorCannotHaveReturnType,r[s])}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}{const r=e;t&&(r.readonly=!0);const n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){const t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);return this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!this.tsTokenCanFollowModifier()||(e.kind=e.key.name,super.parsePropertyName(e),this.match(10)||this.match(47)||this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!!this.match(0)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(58))))}tsParseMappedType(){const e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);{const t=this.startNode();t.name=this.tsParseTypeParameterName(),t.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(t,"TSTypeParameter")}return e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach((e=>{const{type:r}=e;!t||"TSRestType"===r||"TSOptionalType"===r||"TSNamedTupleMember"===r&&e.optional||this.raise(vt.OptionalTypeBeforeRequired,e),t||(t="TSNamedTupleMember"===r&&e.optional||"TSOptionalType"===r)})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const e=this.state.startLoc,t=this.eat(21),{startLoc:r}=this.state;let n,s,i,a;const o=W(this.state.type)?this.lookaheadCharCode():null;if(58===o)n=!0,i=!1,s=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(63===o){i=!0;const e=this.state.value,t=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(n=!0,s=this.createIdentifier(this.startNodeAt(r),e),this.expect(17),this.expect(14),a=this.tsParseType()):(n=!1,a=t,this.expect(17))}else a=this.tsParseType(),i=this.eat(17),n=this.eat(14);if(n){let e;s?(e=this.startNodeAt(r),e.optional=i,e.label=s,e.elementType=a,this.eat(17)&&(e.optional=!0,this.raise(vt.TupleOptionalAfterType,this.state.lastTokStartLoc))):(e=this.startNodeAt(r),e.optional=i,this.raise(vt.InvalidTupleMemberLabel,a),e.label=a,e.elementType=this.tsParseType()),a=this.finishNode(e,"TSNamedTupleMember")}else if(i){const e=this.startNodeAt(r);e.typeAnnotation=a,a=this.finishNode(e,"TSOptionalType")}if(t){const t=this.startNodeAt(e);t.typeAnnotation=a,a=this.finishNode(t,"TSRestType")}return a}tsParseParenthesizedType(){const e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){const r=this.startNode();return"TSConstructorType"===e&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,r))),this.finishNode(r,e)}tsParseLiteralTypeNode(){const e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){{const e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){const e=this.startNode(),t=this.lookahead();return 135!==t.type&&136!==t.type&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:e}=this.state;if(H(e)||88===e||84===e){const t=88===e?"TSVoidKeyword":84===e?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:e}=this.state;let t=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const r=this.startNodeAt(e);r.elementType=t,this.expect(3),t=this.finishNode(r,"TSArrayType")}else{const r=this.startNodeAt(e);r.objectType=t,r.indexType=this.tsParseType(),this.expect(3),t=this.finishNode(r,"TSIndexedAccessType")}return t}tsParseTypeOperator(){const e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(vt.UnexpectedReadonly,e)}}tsParseInferType(){const e=this.startNode();this.expectContextual(115);const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){var e;return(e=this.state.type)>=121&&e<=123&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,r){const n=this.startNode(),s=this.eat(r),i=[];do{i.push(t())}while(this.eat(r));return 1!==i.length||s?(n.types=i,this.finishNode(n,e)):i[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return!!this.match(47)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(H(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch(e){return!1}}if(this.match(0)){this.next();const{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch(e){return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)&&(this.next(),this.match(19)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{const t=this.startNode();this.expect(e);const r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(r.parameterName=e,r.asserts=!0,r.typeAnnotation=null,e=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(e,r),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const i=this.tsParseTypeAnnotation(!1);return r.parameterName=s,r.typeAnnotation=i,r.asserts=n,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(109!==this.state.type)return!1;const e=this.state.containsEsc;return this.next(),!(!H(this.state.type)&&!this.match(78)||(e&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),0))}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){gt(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;const t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&77===this.lookahead().type}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(vt.ReservedTypeAssertion,this.state.startLoc);const e=this.startNode();return e.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()))),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){const t=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",(()=>{{const e=this.startNode();return e.expression=this.tsParseEntityName(3),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}}));return r.length||this.raise(vt.EmptyHeritageClauseType,t,{token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),H(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(vt.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));const r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType((()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&16!==this.lookahead().type){const e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInTopLevelContext(e){if(this.curContext()===P.brace)return e();{const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType((()=>(this.expect(e),this.tsParseType())))}tsNextThenParseType(){return this.tsInType((()=>(this.next(),this.tsParseType())))}tsParseEnumMember(){const e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseEnumBody(){const e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumBody")}tsParseModuleBlock(){const e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(512),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind="global",e.global=!0,e.id=this.parseIdentifier()):this.match(134)?(e.kind="module",e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(512),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,r){e.isExport=r||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);const n=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==n.type&&this.raise(vt.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){const t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),r=e();if(void 0!==r&&!1!==r)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;const t=this.state.type;return this.tsInAmbientContext((()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 100:if(this.state.containsEsc)return;case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,this.state.value,!0));case 107:if(this.hasPlugin("explicitResourceManagement")&&this.isUsing())return this.raise(vt.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.parseVarStatement(e,"using",!0);break;case 96:if(this.hasPlugin("explicitResourceManagement")&&this.isAwaitUsing())return this.raise(vt.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.next(),this.parseVarStatement(e,"await using",!0);break;case 129:{const t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(H(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,r){switch(t.name){case"declare":{const t=this.tsTryParseDeclare(e);return t&&(t.declare=!0),t}case"global":if(this.match(5)){this.scope.enter(512),this.prodParam.enter(0);const r=e;return r.kind="global",e.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,r)}}tsParseDeclaration(e,t,r,n){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||H(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(H(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&H(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&H(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;const t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const r=this.tsTryParseAndCatch((()=>{const t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t}));return this.state.maybeInArrowParameters=t,r?super.parseArrowExpression(r,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType((()=>this.tsInTopLevelContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length?this.raise(vt.EmptyTypeArguments,e):this.state.inType||this.curContext()!==P.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(e=this.state.type)>=124&&e<=130;var e}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseBindingElement(e,t){const r=t.length?t[0].loc.start:this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);const s=n.accessibility,i=n.override,a=n.readonly;4&e||!(s||a||i)||this.raise(vt.UnexpectedParameterModifier,r);const o=this.parseMaybeDefault();2&e&&this.parseFunctionParamType(o);const c=this.parseMaybeDefault(o.loc.start,o);if(s||a||i){const e=this.startNodeAt(r);return t.length&&(e.decorators=t),s&&(e.accessibility=s),a&&(e.readonly=a),i&&(e.override=i),"Identifier"!==c.type&&"AssignmentPattern"!==c.type&&this.raise(vt.UnsupportedParameterPropertyKind,e),e.parameter=c,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),c}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(vt.PatternIsOptional,t)}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const n="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):"TSDeclareFunction"===n&&this.state.isAmbientContext&&(this.raise(vt.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(vt.UnexpectedTypeAnnotation,e.typeAnnotation)}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r,n){const s=super.parseArrayLike(e,t,r,n);return"ArrayExpression"===s.type&&this.tsCheckForInvalidTypeCasts(s.elements),s}parseSubscript(e,t,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const r=this.startNodeAt(t);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}let s=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(r)return n.stop=!0,e;n.optionalChainMember=s=!0,this.next()}if(this.match(47)||this.match(51)){let i;const a=this.tsTryParseAndCatch((()=>{if(!r&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return e}const a=this.tsParseTypeArgumentsInExpression();if(!a)return;if(s&&!this.match(10))return void(i=this.state.curPosition());if(X(this.state.type)){const r=super.parseTaggedTemplateExpression(e,t,n);return r.typeParameters=a,r}if(!r&&this.eat(10)){const r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(r.arguments),r.typeParameters=a,n.optionalChainMember&&(r.optional=s),this.finishCallExpression(r,n.optionalChainMember)}const o=this.state.type;if(48===o||52===o||10!==o&&z(o)&&!this.hasPrecedingLineBreak())return;const c=this.startNodeAt(t);return c.expression=e,c.typeParameters=a,this.finishNode(c,"TSInstantiationExpression")}));if(i&&this.unexpected(i,10),a)return"TSInstantiationExpression"===a.type&&((this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(vt.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),this.match(16)||this.match(18)||(a.expression=super.stopParseSubscript(e,n))),a}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){var t;super.parseNewCallee(e);const{callee:r}=e;"TSInstantiationExpression"!==r.type||null!=(t=r.extra)&&t.parenthesized||(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let n;if(J(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(120)))){const s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(n&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(s,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(s,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,n){this.state.isAmbientContext||super.checkReservedWord(e,t,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(vt.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){const t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){super.applyImportPhase(e,t,r,n),t?e.exportKind="type"===r?"type":"value":e.importKind="type"===r||"typeof"===r?r:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let t;if(H(this.state.type)&&61===this.lookaheadCharCode())return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){const r=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(vt.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){const t=e;this.next();let r=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?r=this.parseMaybeImportPhase(t,!1):t.importKind="value",this.tsParseImportEqualsDeclaration(t,r,!0)}if(this.eat(29)){const t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(93)){const t=e;return this.expectContextual(128),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&80===this.lookahead().type}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,r=!1){const{isAmbientContext:n}=this.state,s=super.parseVarStatement(e,t,r||n);if(!n)return s;for(const{id:e,init:r}of s.declarations)r&&("var"===t||"let"===t||e.typeAnnotation?this.raise(vt.InitializerNotAllowedInAmbientContext,r):St(r,this.hasPlugin("estree"))||this.raise(vt.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,r));return s}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){const e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>bt(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&123===this.lookaheadCharCode()}parseClassMember(e,t,r){const n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:vt.InvalidModifierOnTypeParameterPositions},t);const s=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,n)&&this.raise(vt.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(s):s()}parseClassMemberWithIsStatic(e,t,r,n){const s=this.tsTryParseIndexSignature(t);if(s)return e.body.push(s),t.abstract&&this.raise(vt.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(vt.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(vt.IndexSignatureHasDeclare,t),void(t.override&&this.raise(vt.IndexSignatureHasOverride,t));!this.state.inAbstractClass&&t.abstract&&this.raise(vt.NonAbstractClassHasAbstractMethod,t),t.override&&(r.hadSuperClass||this.raise(vt.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(vt.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(vt.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,r){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t,r):void 0)||super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}return super.parseConditional(e,t,r)}parseParenItem(e,t){const r=super.parseParenItem(e,t);if(this.eat(17)&&(r.optional=!0,this.resetEndLocation(e)),this.match(14)){const r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));const t=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(vt.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const n=H(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?(("TSInterfaceDeclaration"===n.type||"TSTypeAliasDeclaration"===n.type||r)&&(e.exportKind="type"),r&&"TSImportEqualsDeclaration"!==n.type&&(this.resetStartLocation(n,t),n.declare=!0),n):null}parseClassId(e,t,r,n){if((!t||r)&&this.isContextual(113))return;super.parseClassId(e,t,r,e.declare?1024:8331);const s=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);s&&(e.typeParameters=s)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&(!e.readonly||e.typeAnnotation)&&this.match(29)&&this.raise(vt.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){const{key:t}=e;this.raise(vt.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(vt.PrivateElementHasAbstract,e),e.accessibility&&this.raise(vt.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(vt.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,n,s,i){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&s&&this.raise(vt.ConstructorHasTypeParameters,a);const{declare:o=!1,kind:c}=t;!o||"get"!==c&&"set"!==c||this.raise(vt.DeclareAccessor,t,{kind:c}),a&&(t.typeParameters=a),super.pushClassMethod(e,t,r,n,s,i)}pushClassPrivateMethod(e,t,r,n){const s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(t.typeParameters=s),super.pushClassPrivateMethod(e,t,r,n)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&null==e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,r,n,s,i,a){const o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,r,n,s,i,a)}parseFunctionParams(e,t){const r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);const r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,n,s,i,a;let o,c,l,u;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(o=this.state.clone(),c=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!c.error)return c.node;const{context:r}=this.state,n=r[r.length-1];n!==P.j_oTag&&n!==P.j_expr||r.pop()}if(!(null!=(r=c)&&r.error||this.match(47)))return super.parseMaybeAssign(e,t);o&&o!==this.state||(o=this.state.clone());const h=this.tryParse((r=>{var n,s;u=this.tsParseTypeParameters(this.tsParseConstModifier);const i=super.parseMaybeAssign(e,t);return("ArrowFunctionExpression"!==i.type||null!=(n=i.extra)&&n.parenthesized)&&r(),0!==(null==(s=u)?void 0:s.params.length)&&this.resetStartLocationFromNode(i,u),i.typeParameters=u,i}),o);if(!h.error&&!h.aborted)return u&&this.reportReservedArrowTypeParam(u),h.node;if(!c&&(gt(!this.hasPlugin("jsx")),l=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!l.error))return l.node;if(null!=(n=c)&&n.node)return this.state=c.failState,c.node;if(h.node)return this.state=h.failState,u&&this.reportReservedArrowTypeParam(u),h.node;if(null!=(s=l)&&s.node)return this.state=l.failState,l.node;throw(null==(i=c)?void 0:i.error)||h.error||(null==(a=l)?void 0:a.error)}reportReservedArrowTypeParam(e){var t;1!==e.params.length||e.params[0].constraint||null!=(t=e.extra)&&t.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(vt.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(14);return!this.canInsertSemicolon()&&this.match(19)||e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);const t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(vt.UnexpectedTypeCastInParameter,e):this.raise(vt.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":t||"TSTypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,r){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(64!==r||!t)&&["expression",!0];default:return super.isValidLVal(e,t,r)}}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,t){if(this.match(47)||this.match(51)){const r=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const n=super.parseMaybeDecoratorArguments(e,t);return n.typeParameters=r,n}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,t)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){const r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(vt.TypeAnnotationAfterAssign,r.typeAnnotation),r}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(48,1);if(60===e)return void this.finishOp(47,1)}super.getTokenFromCode(e)}reScan_lt_gt(){const{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableListItem(e,t,r){const n=e[t];"TSTypeCastExpression"===n.type&&(e[t]=this.typeCastToParameter(n)),super.toAssignableListItem(e,t,r)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every((e=>this.isAssignable(e,!0))):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){const t=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){const{isAmbientContext:t,strict:r}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=t,this.state.strict=r}}parseClass(e,t,r){const n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(vt.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,r,n,s,i,a){const o=super.parseMethod(e,t,r,n,s,i,a);if((o.abstract||"TSAbstractMethodDefinition"===o.type)&&(this.hasPlugin("estree")?o.value:o).body){const{key:e}=o;this.raise(vt.AbstractMethodHasImplementation,o,{methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(this.offsetToSourcePos(e.start),this.offsetToSourcePos(e.end))}]`:e.name})}return o}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,r,n){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,n))}parseImportSpecifier(e,t,r,n,s){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,n,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,r){const n=t?"imported":"local",s=t?"local":"exported";let i,a=e[n],o=!1,c=!0;const l=a.loc.start;if(this.isContextual(93)){const e=this.parseIdentifier();if(this.isContextual(93)){const r=this.parseIdentifier();W(this.state.type)?(o=!0,a=e,i=t?this.parseIdentifier():this.parseModuleExportName(),c=!1):(i=r,c=!1)}else W(this.state.type)?(c=!1,i=t?this.parseIdentifier():this.parseModuleExportName()):(o=!0,a=e)}else W(this.state.type)&&(o=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());o&&r&&this.raise(t?vt.TypeModifierIsUsedInTypeImports:vt.TypeModifierIsUsedInTypeExports,l),e[n]=a,e[s]=i,e[t?"importKind":"exportKind"]=o?"type":"value",c&&this.eatContextual(93)&&(e[s]=t?this.parseIdentifier():this.parseModuleExportName()),e[s]||(e[s]=this.cloneIdentifier(e[n])),t&&this.checkIdentifier(e[s],o?4098:4096)}fillOptionalPropertiesForTSESLint(e){switch(e.type){case"ExpressionStatement":return void(null!=e.directive||(e.directive=void 0));case"RestElement":e.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":return null!=e.decorators||(e.decorators=[]),null!=e.optional||(e.optional=!1),void(null!=e.typeAnnotation||(e.typeAnnotation=void 0));case"TSParameterProperty":return null!=e.accessibility||(e.accessibility=void 0),null!=e.decorators||(e.decorators=[]),null!=e.override||(e.override=!1),null!=e.readonly||(e.readonly=!1),void(null!=e.static||(e.static=!1));case"TSEmptyBodyFunctionExpression":e.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":return null!=e.declare||(e.declare=!1),null!=e.returnType||(e.returnType=void 0),void(null!=e.typeParameters||(e.typeParameters=void 0));case"Property":return void(null!=e.optional||(e.optional=!1));case"TSMethodSignature":case"TSPropertySignature":null!=e.optional||(e.optional=!1);case"TSIndexSignature":return null!=e.accessibility||(e.accessibility=void 0),null!=e.readonly||(e.readonly=!1),void(null!=e.static||(e.static=!1));case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":null!=e.declare||(e.declare=!1),null!=e.definite||(e.definite=!1),null!=e.readonly||(e.readonly=!1),null!=e.typeAnnotation||(e.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":return null!=e.accessibility||(e.accessibility=void 0),null!=e.decorators||(e.decorators=[]),null!=e.override||(e.override=!1),void(null!=e.optional||(e.optional=!1));case"ClassExpression":null!=e.id||(e.id=null);case"ClassDeclaration":return null!=e.abstract||(e.abstract=!1),null!=e.declare||(e.declare=!1),null!=e.decorators||(e.decorators=[]),null!=e.implements||(e.implements=[]),null!=e.superTypeArguments||(e.superTypeArguments=void 0),void(null!=e.typeParameters||(e.typeParameters=void 0));case"TSTypeAliasDeclaration":case"VariableDeclaration":return void(null!=e.declare||(e.declare=!1));case"VariableDeclarator":return void(null!=e.definite||(e.definite=!1));case"TSEnumDeclaration":return null!=e.const||(e.const=!1),void(null!=e.declare||(e.declare=!1));case"TSEnumMember":return void(null!=e.computed||(e.computed=!1));case"TSImportType":return null!=e.qualifier||(e.qualifier=null),void(null!=e.options||(e.options=null));case"TSInterfaceDeclaration":return null!=e.declare||(e.declare=!1),void(null!=e.extends||(e.extends=[]));case"TSModuleDeclaration":return null!=e.declare||(e.declare=!1),void(null!=e.global||(e.global="global"===e.kind));case"TSTypeParameter":return null!=e.const||(e.const=!1),null!=e.in||(e.in=!1),void(null!=e.out||(e.out=!1))}}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc,t=this.startNode();if(this.next(),H(this.state.type)){const e=this.parseIdentifierName(),r=this.createIdentifier(t,e);if(this.castNodeTo(r,"V8IntrinsicIdentifier"),this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(133)){const t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let r=e;return r.expectedNode&&r.type||(r=this.finishNode(r,"Placeholder")),r.expectedNode=t,r}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,r,n){void 0!==e&&super.checkReservedWord(e,t,r,n)}cloneIdentifier(e){const t=super.cloneIdentifier(e);return"Placeholder"===t.type&&(t.expectedNode=e.expectedNode),t}cloneStringLiteral(e){return"Placeholder"===e.type?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r){return"Placeholder"===e||super.isValidLVal(e,t,r)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!!super.chStartsBindingIdentifier(e,t)||133===this.lookahead().type}verifyBreakContinue(e,t){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var r;if("Placeholder"!==t.type||null!=(r=t.extra)&&r.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){const r=e;return r.label=this.finishPlaceholder(t,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}this.semicolon();const n=e;return n.name=t.name,this.finishPlaceholder(n,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){const n=t?"ClassDeclaration":"ClassExpression";this.next();const s=this.state.strict,i=this.parsePlaceholder("Identifier");if(i){if(!(this.match(81)||this.match(133)||this.match(5))){if(r||!t)return e.id=null,e.body=this.finishPlaceholder(i,"ClassBody"),this.finishNode(e,n);throw this.raise(Et.ClassNameIsRequired,this.state.startLoc)}e.id=i}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,s),this.finishNode(e,n)}parseExport(e,t){const r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,t);const n=e;if(!this.isContextual(98)&&!this.match(12))return n.specifiers=[],n.source=null,n.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(n,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const s=this.startNode();return s.exported=r,n.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(n,t)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(G(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return!(null==(r=e.specifiers)||!r.length)||super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){const{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Et.UnexpectedSpace,this.state.lastTokEndLoc)}}},Ct=Object.keys(_t);class It extends yt{checkProto(e,t,r,n){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return r;const s=e.key;return"__proto__"===("Identifier"===s.type?s.name:s.value)?t?(this.raise(v.RecordNoProto,s),!0):(r&&(n?null===n.doubleProtoLoc&&(n.doubleProtoLoc=s.loc.start):this.raise(v.DuplicateProto,s)),!0):r}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(v.ParseExpressionEmptyInput,this.state.startLoc);const e=this.parseExpression();if(!this.match(140))throw this.raise(v.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,256&this.optionFlags&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(12)){const n=this.startNodeAt(t);for(n.expressions=[r];this.eat(12);)n.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){const r=this.state.startLoc,n=this.isContextual(108);if(n&&this.prodParam.hasYield){this.next();let e=this.parseYield(r);return t&&(e=t.call(this,e,r)),e}let s;e?s=!1:(e=new ht,s=!0);const{type:i}=this.state;(10===i||H(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(e);if(t&&(a=t.call(this,a,r)),(o=this.state.type)>=29&&o<=33){const t=this.startNodeAt(r),n=this.state.value;if(t.operator=n,this.match(29)){this.toAssignable(a,!0),t.left=a;const n=r.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=n&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=n&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=n&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else t.left=a;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(t,"AssignmentExpression")),t}var o;if(s&&this.checkExpressionErrors(e,!0),n){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?z(e):z(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.YieldNotInGeneratorFunction,r),this.parseYield(r)}return a}parseMaybeConditional(e){const t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(e);return this.shouldExitDescending(n,r)?n:this.parseConditional(n,t,e)}parseConditional(e,t,r){if(this.eat(17)){const r=this.startNodeAt(t);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(n,r)?n:this.parseExprOp(n,t,-1)}parseExprOp(e,t,r){if(this.isPrivateName(e)){const t=this.getPrivateNameSV(e);(r>=J(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,e,{identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}const n=this.state.type;if((s=n)>=39&&s<=59&&(this.prodParam.hasIn||!this.match(58))){let s=J(n);if(s>r){if(39===n){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}const i=this.startNodeAt(t);i.left=e,i.operator=this.state.value;const a=41===n||42===n,o=40===n;if(o&&(s=J(42)),this.next(),39===n&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);i.right=this.parseExprOpRightExpr(n,s);const c=this.finishNode(i,a||o?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(o&&(41===l||42===l)||a&&40===l)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,t,r)}}var s;return e}parseExprOpRightExpr(e,t){const r=this.state.startLoc;if(39===e){switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}if("smart"===this.getPluginOption("pipelineOperator","proposal"))return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),r)}))}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){const r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,57===e?t-1:t)}parseHackPipeBody(){var e;const{startLoc:t}=this.state,r=this.parseMaybeAssign();return!p.has(r.type)||null!=(e=r.extra)&&e.parenthesized||this.raise(v.PipeUnparenthesizedBody,t,{type:r.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,t),r}checkExponentialAfterUnary(e){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){const r=this.state.startLoc,n=this.isContextual(96);if(n&&this.recordAwaitIfAllowed()){this.next();const e=this.parseAwait(r);return t||this.checkExponentialAfterUnary(e),e}const s=this.match(34),i=this.startNode();if(a=this.state.type,j[a]){i.operator=this.state.value,i.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const r=this.match(89);if(this.next(),i.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&r){const e=i.argument;"Identifier"===e.type?this.raise(v.StrictDelete,i):this.hasPropertyAsPrivateName(e)&&this.raise(v.DeletePrivateField,i)}if(!s)return t||this.checkExponentialAfterUnary(i),this.finishNode(i,"UnaryExpression")}var a;const o=this.parseUpdate(i,s,e);if(n){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?z(e):z(e)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.AwaitNotInAsyncContext,r),this.parseAwait(r)}return o}parseUpdate(e,t,r){if(t){const t=e;return this.checkLVal(t.argument,this.finishNode(t,"UpdateExpression")),e}const n=this.state.startLoc;let s=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return s;for(;34===this.state.type&&!this.canInsertSemicolon();){const e=this.startNodeAt(n);e.operator=this.state.value,e.prefix=!1,e.argument=s,this.next(),this.checkLVal(s,s=this.finishNode(e,"UpdateExpression"))}return s}parseExprSubscripts(e){const t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprAtom(e);return this.shouldExitDescending(n,r)?n:this.parseSubscripts(n,t)}parseSubscripts(e,t,r){const n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,r,n),n.maybeAsyncArrow=!1}while(!n.stop);return e}parseSubscript(e,t,r,n){const{type:s}=this.state;if(!r&&15===s)return this.parseBind(e,t,r,n);if(X(s))return this.parseTaggedTemplateExpression(e,t,n);let i=!1;if(18===s){if(r&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),40===this.lookaheadCharCode()))return this.stopParseSubscript(e,n);n.optionalChainMember=i=!0,this.next()}if(!r&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,n,i);{const r=this.eat(0);return r||i||this.eat(16)?this.parseMember(e,t,n,r,i):this.stopParseSubscript(e,n)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,r,n,s){const i=this.startNodeAt(t);return i.object=e,i.computed=n,n?(i.property=this.parseExpression(),this.expect(3)):this.match(139)?("Super"===e.type&&this.raise(v.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),r.optionalChainMember?(i.optional=s,this.finishNode(i,"OptionalMemberExpression")):this.finishNode(i,"MemberExpression")}parseBind(e,t,r,n){const s=this.startNodeAt(t);return s.object=e,this.next(),s.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),t,r)}parseCoverCallAndAsyncArrowHead(e,t,r,n){const s=this.state.maybeInArrowParameters;let i=null;this.state.maybeInArrowParameters=!0,this.next();const a=this.startNodeAt(t);a.callee=e;const{maybeAsyncArrow:o,optionalChainMember:c}=r;o&&(this.expressionScope.enter(new ot(2)),i=new ht),c&&(a.optional=n),a.arguments=n?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Super"!==e.type,a,i);let l=this.finishCallExpression(a,c);return o&&this.shouldParseAsyncArrow()&&!n?(r.stop=!0,this.checkDestructuringPrivate(i),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(i,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=s,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r){const n=this.startNodeAt(t);return n.tag=e,n.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,t),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if("Import"===e.callee.type)if(0===e.arguments.length||e.arguments.length>2)this.raise(v.ImportCallArity,e);else for(const t of e.arguments)"SpreadElement"===t.type&&this.raise(v.ImportCallSpreadArgument,t);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r,n){const s=[];let i=!0;const a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(i)i=!1;else if(this.expect(12),this.match(e)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}s.push(this.parseExprListItem(!1,n,t))}return this.state.inFSharpPipelineDirectBody=a,s}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(r=t.extra)?void 0:r.trailingCommaLoc),t.innerComments&&Ye(e,t.innerComments),t.callee.trailingComments&&Ye(e,t.callee.trailingComments),e}parseNoCallExpr(){const e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,r=null;const{type:n}=this.state;switch(n){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?512&this.optionFlags?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 0:return this.parseArrayLike(3,!0,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:r=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(r,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;const e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(v.UnsupportedBind,e)}case 139:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{const e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);this.unexpected();break}case 47:{const e=this.input.codePointAt(this.nextTokenStart());ae(e)||62===e?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(137===n)return this.parseDecimalLiteral(this.state.value);if(2===n||1===n)return this.parseArrayLike(2===this.state.type?4:3,!1,!0);if(6===n||7===n)return this.parseObjectLike(6===this.state.type?9:8,!1,!0);if(H(n)){if(this.isContextual(127)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();const e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&!this.canInsertSemicolon()){const{type:e}=this.state;if(68===e)return this.resetPreviousNodeTrailingComments(r),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(r));if(H(e))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(r)):r;if(90===e)return this.resetPreviousNodeTrailingComments(r),this.parseDo(this.startNodeAtNode(r),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(r),[r],!1)):r}this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){const r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(r);this.unexpected()}parseTopicReference(e){const t=this.startNode(),r=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(t,r,e,n)}finishTopicReference(e,t,r,n){if(this.testTopicReferenceConfiguration(r,t,n))return"hack"===r?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference"));throw this.raise(v.PipeTopicUnconfiguredToken,t,{token:G(n)})}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:G(r)}]);case"smart":return 27===r;default:throw this.raise(v.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Fe(!0,this.prodParam.hasYield));const t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();const r=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=r,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||16&this.optionFlags?this.scope.allowSuper||16&this.optionFlags||this.raise(v.UnexpectedSuper,e):this.raise(v.SuperNotAllowed,e),this.match(10)||this.match(0)||this.match(16)||this.raise(v.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode(),t=this.startNodeAt(i(this.state.startLoc,1)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;const n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(v.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:r}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){const t=this.isContextual(105);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}{const t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(v.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,r){return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.value=e,this.next(),this.finishNode(r,t)}parseLiteral(e,t){const r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){const t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){const t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.startLoc;let r;this.next(),this.expressionScope.enter(new ot(1));const n=this.state.maybeInArrowParameters,s=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const i=this.state.startLoc,a=[],o=new ht;let c,l,u=!0;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,null===o.optionalParametersLoc?null:o.optionalParametersLoc),this.match(11)){l=this.state.startLoc;break}if(this.match(21)){const e=this.state.startLoc;if(c=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowIn(o,this.parseParenItem))}const h=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=s;let p=this.startNodeAt(t);return e&&this.shouldParseArrow(a)&&(p=this.parseArrow(p))?(this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(p,a,!1),p):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),l&&this.unexpected(l),c&&this.unexpected(c),this.checkExpressionErrors(o,!0),this.toReferencedListDeep(a,!0),a.length>1?(r=this.startNodeAt(i),r.expressions=a,this.finishNode(r,"SequenceExpression"),this.resetEndLocation(r,h)):r=a[0],this.wrapParenthesis(t,r))}wrapParenthesis(e,t){if(!(1024&this.optionFlags))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;const r=this.startNodeAt(e);return r.expression=t,this.finishNode(r,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const r=this.parseMetaProperty(e,t,"target");return this.scope.inNonArrowFunction||this.scope.inClass||4&this.optionFlags||this.raise(v.UnexpectedNewTarget,r),r}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){const t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){const t=this.match(83),r=this.parseNoCallExpr();e.callee=r,!t||"Import"!==r.type&&"ImportExpression"!==r.type||this.raise(v.ImportCallNotNewExpression,r)}parseTemplateElement(e){const{start:t,startLoc:r,end:n,value:s}=this.state,a=t+1,o=this.startNodeAt(i(r,1));null===s&&(e||this.raise(v.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));const c=this.match(24),l=c?-1:-2,u=n+l;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,"\n"),cooked:null===s?null:s.slice(1,l)},o.tail=c,this.next();const h=this.finishNode(o,"TemplateElement");return this.resetEndLocation(h,i(this.state.lastTokEndLoc,l)),h}parseTemplate(e){const t=this.startNode();let r=this.parseTemplateElement(e);const n=[r],s=[];for(;!r.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),n.push(r=this.parseTemplateElement(e));return t.expressions=s,t.quasis=n,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=!1,a=!0;const o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(o);break}let s;t?s=this.parseBindingProperty():(s=this.parsePropertyDefinition(n),i=this.checkProto(s,r,i,n)),r&&!this.isObjectProperty(s)&&"SpreadElement"!==s.type&&this.raise(v.InvalidRecordProperty,s),s.shorthand&&this.addExtra(s,"shorthand",!0),o.properties.push(s)}this.next(),this.state.inFSharpPipelineDirectBody=s;let c="ObjectExpression";return t?c="ObjectPattern":r&&(c="RecordExpression"),this.finishNode(o,c)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());const r=this.startNode();let n,s=!1,i=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(r.decorators=t,t=[]),r.method=!1,e&&(n=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(r);const o=this.state.containsEsc;if(this.parsePropertyName(r,e),!a&&!o&&this.maybeAsyncOrAccessorProp(r)){const{key:e}=r,t=e.name;"async"!==t||this.hasPrecedingLineBreak()||(s=!0,this.resetPreviousNodeTrailingComments(e),a=this.eat(55),this.parsePropertyName(r)),"get"!==t&&"set"!==t||(i=!0,this.resetPreviousNodeTrailingComments(e),r.kind=t,this.match(55)&&(a=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:t}),this.next()),this.parsePropertyName(r))}return this.parseObjPropValue(r,n,a,s,!1,i,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;const r=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e);n.length!==r&&this.raise("get"===e.kind?v.BadGetterArity:v.BadSetterArity,e),"set"===e.kind&&"RestElement"===(null==(t=n[n.length-1])?void 0:t.type)&&this.raise(v.BadSetterRestParameter,e)}parseObjectMethod(e,t,r,n,s){if(s){const r=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(r),r}if(r||t||this.match(10))return n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,r,n){if(e.shorthand=!1,this.eat(14))return e.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(n),this.finishObjectProperty(e);if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),r)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){const r=this.state.startLoc;null!=n?null===n.shorthandAssignLoc&&(n.shorthandAssignLoc=r):this.raise(v.InvalidCoverInitializedName,r),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,r,n,s,i,a){const o=this.parseObjectMethod(e,r,n,s,i)||this.parseObjectProperty(e,t,s,a);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:r,value:n}=this.state;let s;if(W(r))s=this.parseIdentifier(!0);else switch(r){case 135:s=this.parseNumericLiteral(n);break;case 134:s=this.parseStringLiteral(n);break;case 136:s=this.parseBigIntLiteral(n);break;case 139:{const e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(v.UnexpectedPrivateField,e),s=this.parsePrivateName();break}default:if(137===r){s=this.parseDecimalLiteral(n);break}this.unexpected()}e.key=s,139!==r&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,r,n,s,i,a=!1){this.initFunction(e,r),e.generator=t,this.scope.enter(18|(a?64:0)|(s?32:0)),this.prodParam.enter(Fe(r,e.generator)),this.parseFunctionParams(e,n);const o=this.parseFunctionBodyAndFinish(e,i,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!r,n,i),this.state.inFSharpPipelineDirectBody=s,this.finishNode(i,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,n){this.scope.enter(6);let s=Fe(r,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(e,r);const i=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=i,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,!1),e.params=t}parseFunctionBodyAndFinish(e,t,r=!1){return this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){const n=t&&!this.match(5);if(this.expressionScope.enter(lt()),n)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{const n=this.state.strict,s=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(s=>{const i=!this.isSimpleParamList(e.params);s&&i&&this.raise(v.IllegalLanguageModeDirective,"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end);const a=!n&&this.state.strict;this.checkParams(e,!(this.state.strict||t||r||i),t,a),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,a)})),this.prodParam.exit(),this.state.labels=s}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,r=e.length;t<r;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,r,n=!0){const s=!t&&new Set,i={type:"FormalParameters"};for(const t of e.params)this.checkLVal(t,i,5,s,n)}parseExprList(e,t,r,n){const s=[];let i=!0;for(;!this.eat(e);){if(i)i=!1;else if(this.expect(12),this.match(e)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}s.push(this.parseExprListItem(t,r))}return s}parseExprListItem(e,t,r){let n;if(this.match(12))e||this.raise(v.UnexpectedToken,this.state.curPosition(),{unexpected:","}),n=null;else if(this.match(21)){const e=this.state.startLoc;n=this.parseParenItem(this.parseSpread(t),e)}else if(this.match(17)){this.expectPlugin("partialApplication"),r||this.raise(v.UnexpectedArgumentPlaceholder,this.state.startLoc);const e=this.startNode();this.next(),n=this.finishNode(e,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return n}parseIdentifier(e){const t=this.startNode(),r=this.parseIdentifierName(e);return this.createIdentifier(t,r)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}createIdentifierAt(e,t,r){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,"Identifier",r)}parseIdentifierName(e){let t;const{startLoc:r,type:n}=this.state;W(n)?t=this.state.value:this.unexpected();const s=n<=92;return e?s&&this.replaceToken(132):this.checkReservedWord(t,r,s,!1),this.next(),t}checkReservedWord(e,t,r,n){if(!(e.length>10)&&function(e){return me.has(e)}(e))if(r&&function(e){return ce.has(e)}(e))this.raise(v.UnexpectedKeyword,t,{keyword:e});else if((this.state.strict?n?fe:pe:he)(e,this.inModule))this.raise(v.UnexpectedReservedWord,t,{reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(v.YieldBindingIdentifier,t)}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(v.AwaitBindingIdentifier,t);if(this.scope.inStaticBlock)return void this.raise(v.AwaitBindingIdentifierInStaticBlock,t);this.expressionScope.recordAsyncArrowParametersError(t)}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(v.ArgumentsInClass,t)}recordAwaitIfAllowed(){const e=this.prodParam.hasAwait||1&this.optionFlags&&!this.scope.inFunction;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){const t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,t),this.scope.inFunction||1&this.optionFlags||(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type:e}=this.state;return 53===e||10===e||0===e||X(e)||102===e&&!this.state.containsEsc||138===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}parseYield(e){const t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(v.YieldInParameter,t);let r=!1,n=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:n=this.parseMaybeAssign()}return t.delegate=r,t.argument=n,this.finishNode(t,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12))if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do{this.parseMaybeAssignAllowIn()}while(this.eat(12)&&!this.match(11));this.raise(v.ImportCallArity,e)}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(v.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){const r=this.startNodeAt(t);return r.callee=e,this.finishNode(r,"PipelineBareFunction")}{const r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,e)}withTopicBindingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return e();{const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){const t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){const t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=r,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const t=this.startNodeAt(this.state.endLoc);this.next();const r=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}}const Ot={kind:1},Lt={kind:2},Nt=/[\uD800-\uDFFF]/u,Mt=/in(?:stanceof)?/y;class Dt extends It{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.comments,256&this.optionFlags&&(e.tokens=function(e,t,r){for(let n=0;n<e.length;n++){const s=e[n],{type:a}=s;if("number"==typeof a){if(139===a){const{loc:t,start:r,value:a,end:o}=s,c=r+1,l=i(t.start,1);e.splice(n,1,new rt({type:Z(27),value:"#",start:r,end:c,startLoc:t.start,endLoc:l}),new rt({type:Z(132),value:a,start:c,end:o,startLoc:l,endLoc:t.end})),n++;continue}if(X(a)){const{loc:o,start:c,value:l,end:u}=s,h=c+1,p=i(o.start,1);let d,f,m,y,g;d=96===t.charCodeAt(c-r)?new rt({type:Z(22),value:"`",start:c,end:h,startLoc:o.start,endLoc:p}):new rt({type:Z(8),value:"}",start:c,end:h,startLoc:o.start,endLoc:p}),24===a?(m=u-1,y=i(o.end,-1),f=null===l?null:l.slice(1,-1),g=new rt({type:Z(22),value:"`",start:m,end:u,startLoc:y,endLoc:o.end})):(m=u-2,y=i(o.end,-2),f=null===l?null:l.slice(1,-2),g=new rt({type:Z(23),value:"${",start:m,end:u,startLoc:y,endLoc:o.end})),e.splice(n,1,d,new rt({type:Z(20),value:f,start:h,end:m,startLoc:p,endLoc:y}),g),n+=2;continue}s.type=Z(a)}}return e}(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,t=140,r=this.options.sourceType){if(e.sourceType=r,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(64&this.optionFlags)&&this.scope.undefinedExports.size>0)for(const[e,t]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,t,{localName:e});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let n;return n=140===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",i(this.state.startLoc,-1)),n}stmtToDirective(e){const t=this.castNodeTo(e,"Directive"),r=this.castNodeTo(e.expression,"DirectiveLiteral"),n=r.value,s=this.input.slice(this.offsetToSourcePos(r.start),this.offsetToSourcePos(r.end)),i=r.value=s.slice(1,-1);return this.addExtra(r,"raw",s),this.addExtra(r,"rawValue",i),this.addExtra(r,"expressionValue",n),t.value=r,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(100)&&this.hasFollowingBindingAtom()}isUsing(){if(!this.isContextual(107))return!1;const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);const t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return this.expectPlugin("explicitResourceManagement"),!0}return!1}chStartsBindingIdentifier(e,t){if(ae(e)){if(Mt.lastIndex=t,Mt.test(this.input)){const e=this.codePointAtPos(Mt.lastIndex);if(!oe(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){const e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return 123===t||this.chStartsBindingIdentifier(t,e)}allowsForUsing(){const{type:e,containsEsc:t,end:r}=this.lookahead();if(102===e&&!t){const e=this.lookaheadCharCodeSince(r);if(61!==e&&58!==e&&59!==e)return!1}return!(!H(e)||this.hasFollowingLineBreak()||(this.expectPlugin("explicitResourceManagement"),0))}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){const r=this.state.type,n=this.startNode(),s=!!(2&e),i=!!(4&e),a=1&e;switch(r){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(46===this.lookaheadCharCode())break;return i||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(n,!1,!s&&i);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,n),!0);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 96:if(this.isAwaitUsing())return this.allowsUsing()?s?this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,n):this.raise(v.UnexpectedLexicalDeclaration,n):this.raise(v.UnexpectedUsingDeclaration,n),this.next(),this.parseVarStatement(n,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),this.allowsUsing()?s||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(n,"using");case 100:{if(this.state.containsEsc)break;const e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t){if(!s&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(t,e)&&123!==t)break}}case 75:s||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const e=this.state.value;return this.parseVarStatement(n,e)}case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{const e=this.lookaheadCharCode();if(40===e||46===e)break}case 82:{let e;return 8&this.optionFlags||a||this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next(),e=83===r?this.parseImport(n):this.parseExport(n,t),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return s||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(n,!0,!s&&i)}const o=this.state.value,c=this.parseExpression();return H(r)&&"Identifier"===c.type&&this.eat(14)?this.parseLabeledStatement(n,o,c,e):this.parseExpressionStatement(n,c,t)}assertModuleNodeAllowed(e){8&this.optionFlags||this.inModule||this.raise(v.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(e,t,r){var n;return e&&(null!=(n=t.decorators)&&n.length?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),r&&this.resetStartLocationFromNode(r,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){const t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){const t=this.state.startLoc;let r;if(this.match(10)){const t=this.state.startLoc;this.next(),r=this.parseExpression(),this.expect(11),r=this.wrapParenthesis(t,r);const n=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(r,t),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==r&&this.raise(v.DecoratorArgumentsOutsideParentheses,n)}else{for(r=this.parseIdentifier(!1);this.eat(16);){const e=this.startNodeAt(t);e.object=r,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,r=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(r,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){const r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(11),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;r<this.state.labels.length;++r){const n=this.state.labels[r];if(null==e.label||n.name===e.label.name){if(null!=n.kind&&(t||1===n.kind))break;if(e.label&&t)break}}if(r===this.state.labels.length){const r=t?"BreakStatement":"ContinueStatement";this.raise(v.IllegalBreakContinue,e,{type:r})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(Ot),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Ot);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return null!==t&&this.unexpected(t),this.parseFor(e,null);const r=this.isContextual(100);{const n=this.isAwaitUsing(),s=n||this.isContextual(107)&&this.allowsForUsing(),i=r&&this.hasFollowingBindingAtom()||s;if(this.match(74)||this.match(75)||i){const r=this.startNode();let i;n?(i="await using",this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):i=this.state.value,this.next(),this.parseVar(r,!0,i);const a=this.finishNode(r,"VariableDeclaration"),o=this.match(58);return o&&s&&this.raise(v.ForInUsing,a),(o||this.isContextual(102))&&1===a.declarations.length?this.parseForIn(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}}const n=this.isContextual(95),s=new ht,i=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(r&&this.raise(v.ForOfLet,i),null===t&&n&&"Identifier"===i.type&&this.raise(v.ForOfAsync,i)),a||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(i,!0);const r=a?"ForOfStatement":"ForInStatement";return this.checkLVal(i,{type:r}),this.parseForIn(e,i,t)}return this.checkExpressionErrors(s,!0),null!==t&&this.unexpected(t),this.parseFor(e,i)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||2&this.optionFlags||this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const t=e.cases=[];let r;this.expect(5),this.state.labels.push(Lt),this.scope.enter(256);for(let e;!this.match(8);)if(this.match(61)||this.match(65)){const n=this.match(61);r&&this.finishNode(r,"SwitchCase"),t.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(e&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),e=!0,r.test=null),this.expect(14)}else r?r.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){const t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,e.handler||e.finalizer||this.raise(v.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=!1){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Ot),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,n){for(const e of this.state.labels)e.name===t&&this.raise(v.LabelRedeclaration,r,{labelName:t});const s=(i=this.state.type)>=90&&i<=92?1:this.match(71)?2:null;var i;for(let t=this.state.labels.length-1;t>=0;t--){const r=this.state.labels[t];if(r.statementStart!==e.start)break;r.statementStart=this.sourceToOffsetPos(this.state.start),r.kind=s}return this.state.labels.push({name:t,kind:s,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=8&n?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,r){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,r){const n=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,8,r),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,s){const i=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(i,t?a:void 0,r,n,s)}parseBlockOrModuleBlockBody(e,t,r,n,s){const i=this.state.strict;let a=!1,o=!1;for(;!this.match(n);){const n=r?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(n)){const e=this.stmtToDirective(n);t.push(e),a||"use strict"!==e.value.value||(a=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(n)}null==s||s.call(this,a),i||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,r){const n=this.match(58);return this.next(),n?null!==r&&this.unexpected(r):e.await=null!==r,"VariableDeclaration"!==t.type||null==t.declarations[0].init||n&&this.options.annexB&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type||this.raise(v.ForInOfLoopInitializer,t,{type:n?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(v.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,n=!1){const s=e.declarations=[];for(e.kind=r;;){const e=this.startNode();if(this.parseVarId(e,r),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==e.init||n||("Identifier"===e.id.type||t&&(this.match(58)||this.isContextual(102))?"const"!==r&&"using"!==r&&"await using"!==r||this.match(58)||this.isContextual(102)||this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:r}):this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"})),s.push(this.finishNode(e,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){const r=this.parseBindingAtom();"using"!==t&&"await using"!==t||"ArrayPattern"!==r.type&&"ObjectPattern"!==r.type||this.raise(v.UsingDeclarationHasBindingPattern,r.loc.start),this.checkLVal(r,{type:"VariableDeclarator"},"var"===t?5:8201),e.id=r}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){const r=2&t,n=!!(1&t),s=n&&!(4&t),i=!!(8&t);this.initFunction(e,i),this.match(55)&&(r&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),n&&(e.id=this.parseFunctionId(s));const a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Fe(i,e.generator)),n||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,n?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),n&&!r&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||H(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(new at(3)),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,r){this.next();const n=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,n),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return"Identifier"===e.type&&"constructor"===e.name||"StringLiteral"===e.type&&"constructor"===e.value}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();const r={hadConstructor:!1,hadSuperClass:e};let n=[];const s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){n.push(this.parseDecorator());continue}const e=this.startNode();n.length&&(e.decorators=n,this.resetStartLocationFromNode(e,n[0]),n=[]),this.parseClassMember(s,e,r),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(v.DecoratorConstructor,e)}})),this.state.strict=t,this.next(),n.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(e,t){const r=this.parseIdentifier(!0);if(this.isClassMethod()){const n=t;return n.kind="method",n.computed=!1,n.key=r,n.static=!1,this.pushClassMethod(e,n,!1,!1,!1,!1),!0}if(this.isClassProperty()){const n=t;return n.computed=!1,n.key=r,n.static=!1,e.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(e,t,r){const n=this.isContextual(106);if(n){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){const s=t,i=t,a=t,o=t,c=t,l=s,u=s;if(t.static=n,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind="method";const t=this.match(139);return this.parseClassElementName(l),this.parsePostMemberNameModifiers(l),t?void this.pushClassPrivateMethod(e,i,!0,!1):(this.isNonstaticConstructor(s)&&this.raise(v.ConstructorIsGenerator,s.key),void this.pushClassMethod(e,s,!0,!1,!1,!1))}const h=!this.state.containsEsc&&H(this.state.type),p=this.parseClassElementName(t),d=h?p.name:null,f=this.isPrivateName(p),m=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(l.kind="method",f)return void this.pushClassPrivateMethod(e,i,!1,!1);const n=this.isNonstaticConstructor(s);let a=!1;n&&(s.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,p),n&&this.hasPlugin("typescript")&&t.override&&this.raise(v.OverrideOnConstructor,p),r.hadConstructor=!0,a=r.hadSuperClass),this.pushClassMethod(e,s,!1,!1,n,a)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a);else if("async"!==d||this.isLineTerminator())if("get"!==d&&"set"!==d||this.match(55)&&this.isLineTerminator())if("accessor"!==d||this.isLineTerminator())this.isLineTerminator()?f?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a):this.unexpected();else{this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(p);const t=this.match(139);this.parseClassElementName(a),this.pushClassAccessorProperty(e,c,t)}else{this.resetPreviousNodeTrailingComments(p),l.kind=d;const t=this.match(139);this.parseClassElementName(s),t?this.pushClassPrivateMethod(e,i,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(v.ConstructorIsAccessor,s.key),this.pushClassMethod(e,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else{this.resetPreviousNodeTrailingComments(p);const t=this.eat(55);u.optional&&this.unexpected(m),l.kind="method";const r=this.match(139);this.parseClassElementName(l),this.parsePostMemberNameModifiers(u),r?this.pushClassPrivateMethod(e,i,t,!0):(this.isNonstaticConstructor(s)&&this.raise(v.ConstructorIsAsync,s.key),this.pushClassMethod(e,s,t,!0,!1,!1))}}parseClassElementName(e){const{type:t,value:r}=this.state;if(132!==t&&134!==t||!e.static||"prototype"!==r||this.raise(v.StaticPrototype,this.state.startLoc),139===t){"constructor"===r&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);const t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){var r;this.scope.enter(208);const n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const s=t.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,e.body.push(this.finishNode(t,"StaticBlock")),null!=(r=t.decorators)&&r.length&&this.raise(v.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise(v.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){const r=this.parseClassPrivateProperty(t);e.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassAccessorProperty(e,t,r){r||t.computed||!this.nameIsConstructor(t.key)||this.raise(v.ConstructorClassField,t.key);const n=this.parseClassAccessorProperty(t);e.body.push(n),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(e,t,r,n,s,i){e.body.push(this.parseMethod(t,r,n,s,i,"ClassMethod",!0))}pushClassPrivateMethod(e,t,r,n){const s=this.parseMethod(t,r,n,!1,!1,"ClassPrivateMethod",!0);e.body.push(s);const i="get"===s.kind?s.static?6:2:"set"===s.kind?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,i)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(lt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,n=8331){if(H(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,n);else{if(!r&&t)throw this.raise(v.MissingClassName,this.state.startLoc);e.id=null}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){const r=this.parseMaybeImportPhase(e,!0),n=this.maybeParseExportDefaultSpecifier(e,r),s=!n||this.eat(12),i=s&&this.eatExportStar(e),a=i&&this.maybeParseExportNamespaceSpecifier(e),o=s&&(!a||this.eat(12)),c=n||i;if(i&&!a){if(n&&this.unexpected(),t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}const l=this.maybeParseExportNamedSpecifiers(e);let u;if(n&&s&&!i&&!l&&this.unexpected(null,5),a&&o&&this.unexpected(null,98),c||l){if(u=!1,t)throw this.raise(v.UnsupportedDecoratorExport,e);this.parseExportFrom(e,c)}else u=this.maybeParseExportDeclaration(e);if(c||l||u){var h;const r=e;if(this.checkExport(r,!0,!1,!!r.source),"ClassDeclaration"===(null==(h=r.declaration)?void 0:h.type))this.maybeTakeDecorators(t,r.declaration,r);else if(t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(r,"ExportNamedDeclaration")}if(this.eat(65)){const r=e,n=this.parseExportDefaultExpression();if(r.declaration=n,"ClassDeclaration"===n.type)this.maybeTakeDecorators(t,n,r);else if(t)throw this.raise(v.UnsupportedDecoratorExport,e);return this.checkExport(r,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(r,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==t?void 0:t.loc.start);const r=t||this.parseIdentifier(!0),n=this.startNodeAtNode(r);return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var t;null!=(t=e).specifiers||(t.specifiers=[]);const r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){const t=e;t.specifiers||(t.specifiers=[]);const r="type"===t.exportKind;return t.specifiers.push(...this.parseExportSpecifiers(r)),t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")?e.assertions=[]:e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;const e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.hasPlugin("explicitResourceManagement")&&(this.isUsing()||this.isAwaitUsing()))throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:e}=this.state;if(H(e)){if(95===e&&!this.state.containsEsc||100===e)return!1;if((130===e||129===e)&&!this.state.containsEsc){const{type:e}=this.lookahead();if(H(e)&&98!==e||5===e)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||H(this.state.type)&&r)return!0;if(this.match(65)&&r){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;if(26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators")))return!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0;if(this.hasPlugin("explicitResourceManagement")){if(this.isUsing())return this.raise(v.UsingDeclarationExport,this.state.startLoc),!0;if(this.isAwaitUsing())return this.raise(v.UsingDeclarationExport,this.state.startLoc),!0}return 74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){var s;if(t)if(r){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var i;const t=e.declaration;"Identifier"!==t.type||"from"!==t.name||t.end-t.start!=4||null!=(i=t.extra)&&i.parenthesized||this.raise(v.ExportDefaultFromAsIdentifier,t)}}else if(null!=(s=e.specifiers)&&s.length)for(const t of e.specifiers){const{exported:e}=t,r="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,r),!n&&t.local){const{local:e}=t;"Identifier"!==e.type?this.raise(v.ExportBindingIsString,t,{localName:e.value,exportName:r}):(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration){const t=e.declaration;if("FunctionDeclaration"===t.type||"ClassDeclaration"===t.type){const{id:r}=t;if(!r)throw new Error("Assertion failure");this.checkDuplicateExports(e,r.name)}else if("VariableDeclaration"===t.type)for(const e of t.declarations)this.checkDeclaration(e.id)}}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(const t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(const t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(v.DuplicateDefaultExport,e):this.raise(v.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){const t=[];let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;const n=this.isContextual(130),s=this.match(134),i=this.startNode();i.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(i,s,e,n))}return t}parseExportSpecifier(e,t,r,n){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const e=this.parseStringLiteral(this.state.value),t=Nt.exec(e.value);return t&&this.raise(v.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return null!=e.assertions&&e.assertions.some((({key:e,value:t})=>"json"===t.value&&("Identifier"===e.type?"type"===e.name:"type"===e.value)))}checkImportReflection(e){const{specifiers:t}=e,r=1===t.length?t[0].type:null;if("source"===e.phase)"ImportDefaultSpecifier"!==r&&this.raise(v.SourcePhaseImportRequiresDefault,t[0].loc.start);else if("defer"===e.phase)"ImportNamespaceSpecifier"!==r&&this.raise(v.DeferImportRequiresNamespace,t[0].loc.start);else if(e.module){var n;"ImportDefaultSpecifier"!==r&&this.raise(v.ImportReflectionNotBinding,t[0].loc.start),(null==(n=e.assertions)?void 0:n.length)>0&&this.raise(v.ImportReflectionHasAssertion,t[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){const{specifiers:t}=e;if(null!=t){const e=t.find((e=>{let t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==e&&this.raise(v.ImportJSONBindingNotDefault,e.loc.start)}}}isPotentialImportPhase(e){return!e&&(this.isContextual(105)||this.isContextual(97)||this.isContextual(127))}applyImportPhase(e,t,r,n){t||("module"===r?(this.expectPlugin("importReflection",n),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),"source"===r?(this.expectPlugin("sourcePhaseImports",n),e.phase="source"):"defer"===r?(this.expectPlugin("deferredImportEvaluation",n),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;const r=this.startNode(),n=this.parseIdentifierName(!0),{type:s}=this.state;return(W(s)?98!==s||102===this.lookaheadCharCode():12!==s)?(this.applyImportPhase(e,t,n,r.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(r,n))}isPrecedingIdImportPhase(e){const{type:t}=this.state;return H(t)?98!==t||102===this.lookaheadCharCode():12!==t}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];const r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return null!=e.specifiers||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t,r=8201){return this.checkLVal(e.local,{type:t},r),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);const e=[],t=new Set;do{if(this.match(8))break;const r=this.startNode(),n=this.state.value;if(t.has(n)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:n}),t.add(n),this.match(134)?r.key=this.parseStringLiteral(n):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){const e=[],t=new Set;do{const r=this.startNode();if(r.key=this.parseIdentifier(!0),"type"!==r.key.name&&this.raise(v.ModuleAttributeDifferentFromType,r.key),t.has(r.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,r.key,{key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;var r=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?(t=this.parseModuleAttributes(),this.addExtra(e,"deprecatedWithLegacySyntax",!0)):t=this.parseImportAttributes(),r=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(this.hasPlugin("deprecatedImportAssert")||this.hasPlugin("importAssertions")||this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];!r&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){const r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishImportSpecifier(r,"ImportDefaultSpecifier")),!0}return!!W(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(55)){const t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const r=this.startNode(),n=this.match(134),s=this.isContextual(130);r.imported=this.parseModuleExportName();const i=this.parseImportSpecifier(r,n,"type"===e.importKind||"typeof"===e.importKind,s,void 0);e.specifiers.push(i)}}parseImportSpecifier(e,t,r,n,s){if(this.eatContextual(93))e.local=this.parseIdentifier();else{const{imported:r}=e;if(t)throw this.raise(v.ImportBindingIsString,e,{importName:r.value});this.checkReservedWord(r.name,e.loc.start,!0,!0),e.local||(e.local=this.cloneIdentifier(r))}return this.finishImportSpecifier(e,"ImportSpecifier",s)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}}class Rt extends Dt{constructor(e,t,r){super(e=function(e){const t={sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};if(null==e)return t;if(null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");for(const r of Object.keys(t))null!=e[r]&&(t[r]=e[r]);if(1===t.startLine)null==e.startIndex&&t.startColumn>0?t.startIndex=t.startColumn:null==e.startColumn&&t.startIndex>0&&(t.startColumn=t.startIndex);else if((null==e.startColumn||null==e.startIndex)&&null!=e.startIndex)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return t}(e),t),this.options=e,this.initializeScopes(),this.plugins=r,this.filename=e.sourceFilename,this.startIndex=e.startIndex;let n=0;e.allowAwaitOutsideFunction&&(n|=1),e.allowReturnOutsideFunction&&(n|=2),e.allowImportExportEverywhere&&(n|=8),e.allowSuperOutsideMethod&&(n|=16),e.allowUndeclaredExports&&(n|=64),e.allowNewTargetOutsideFunction&&(n|=4),e.allowYieldOutsideFunction&&(n|=32),e.ranges&&(n|=128),e.tokens&&(n|=256),e.createImportExpressions&&(n|=512),e.createParenthesizedExpressions&&(n|=1024),e.errorRecovery&&(n|=2048),e.attachComment&&(n|=4096),e.annexB&&(n|=8192),this.optionFlags=n}getScopeHandler(){return ge}parse(){this.enterInitialScopes();const e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e.comments.length=this.state.commentsLen,e}}const Bt=function(e){const t={};for(const r of Object.keys(e))t[r]=Z(e[r]);return t}($);function Ft(e,t){let r=Rt;const n=new Map;if(null!=e&&e.plugins){for(const t of e.plugins){let e,r;"string"==typeof t?e=t:[e,r]=t,n.has(e)||n.set(e,r||{})}!function(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const t=e.get("decorators").decoratorsBeforeExport;if(null!=t&&"boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const r=e.get("decorators").allowCallParenthesized;if(null!=r&&"boolean"!=typeof r)throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){var t;const n=e.get("pipelineOperator").proposal;if(!Tt.includes(n)){const e=Tt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}if("hack"===n){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const t=e.get("pipelineOperator").topicToken;if(!kt.includes(t)){const e=kt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}var r;if("#"===t&&"hash"===(null==(r=e.get("recordAndTuple"))?void 0:r.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}else if("smart"===n&&"hash"===(null==(t=e.get("recordAndTuple"))?void 0:t.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}if(e.has("moduleAttributes")){if(e.has("deprecatedImportAssert")||e.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if("may-2020"!==e.get("moduleAttributes").version)throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(e.has("importAssertions")&&e.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!e.has("deprecatedImportAssert")&&e.has("importAttributes")&&e.get("importAttributes").deprecatedAssertSyntax&&e.set("deprecatedImportAssert",{}),e.has("recordAndTuple")){const t=e.get("recordAndTuple").syntaxType;if(null!=t){const e=["hash","bar"];if(!e.includes(t))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+e.map((e=>`'${e}'`)).join(", "))}}if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(e.has("optionalChainingAssign")&&"2023-07"!==e.get("optionalChainingAssign").version)throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}(n),r=function(e){const t=[];for(const r of Ct)e.has(r)&&t.push(r);const r=t.join("|");let n=jt.get(r);if(!n){n=Rt;for(const e of t)n=_t[e](n);jt.set(r,n)}return n}(n)}return new r(e,t,n)}const jt=new Map;t.parse=function(e,t){var r;if("unambiguous"!==(null==(r=t)?void 0:r.sourceType))return Ft(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";const r=Ft(t,e),n=r.parse();if(r.sawUnambiguousESM)return n;if(r.ambiguousScriptDifferentAst)try{return t.sourceType="script",Ft(t,e).parse()}catch(e){}else n.program.sourceType="script";return n}catch(r){try{return t.sourceType="script",Ft(t,e).parse()}catch(e){}throw r}},t.parseExpression=function(e,t){const r=Ft(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()},t.tokTypes=Bt},6963:function(e,t,r){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(r(9420))},6971:(e,t,r)=>{"use strict";function n(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(s,i){if("string"==typeof t?s.name===t:t.includes(s.name)){const t=[];for(let a=1;a<=r;a++){const r=i[i.length-a];if("MemberExpression"===(null==r?void 0:r.node.type)&&"object"===r.key){const i=r.node;i.computed||"Identifier"!==i.property.type?i.computed&&"Literal"===i.property.type&&"string"==typeof i.property.value?t.push(n?`${s.name}.${i.property.value}`:i.property.value):e.hasNonStaticUsage=!0:t.push(n?`${s.name}.${i.property.name}`:i.property.name)}else e.hasNonStaticUsage=!0}t.length===r&&e.usedProperties.add(t.join("."))}}}function s(e,t){return function(r,n,s){if(n.name===e){const e=s[s.length-1],n=s[s.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?r.usedArgs.add(t.value):r.hasNonStaticUsage=!0}}}}}r.r(t),r.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>i,collectInstalledAppsHasUsage:()=>a,collectMemberUsage:()=>h,collectMemberUsageInFunction:()=>g,createProviderClass:()=>c.createProviderClass,replaceUseChildren:()=>T,scanPermissionActionsInAny:()=>x,scanPermissionActionsInStoryboard:()=>w,strictCollectMemberUsage:()=>u,track:()=>d,trackAll:()=>f,traverseStoryboardExpressions:()=>l,traverseStoryboardFunction:()=>y,traverseStoryboardFunctions:()=>m,unwrapProvider:()=>c.unwrapProvider});const i=s("APP","getMenu"),a=s("INSTALLED_APPS","has");var o=r(8303),c=r(4113);function l(e,t,r){const n=new WeakSet,{matchExpressionString:s,visitNotMatchedExpressionString:i,visitNonExpressionString:a,visitObject:l}="string"==typeof r?{matchExpressionString:e=>e.includes(r)}:r;!function e(r){if("string"==typeof r)if((0,o.isEvaluable)(r))if(s(r))try{(0,o.preevaluate)(r,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,r)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==i||i(r);else null==a||a(r);else if((0,c.isObject)(r)){if(n.has(r))return;n.add(r),null==l||l(r);for(const t of Array.isArray(r)?r:Object.values(r))e(t)}}(e)}function u(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:s,usedProperties:i}=h(e,t,r);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${s}"`);return i}function h(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1},i=n(s,t,r);return l(e,((e,t,r)=>{i(e,t),s.hasNonStaticUsage&&(s.nonStaticUsage=r)}),t),s}const p=["CTX","STATE","FORM_STATE"];function d(e,t,r){if(e.includes(t)){const s={usedProperties:new Set,hasNonStaticUsage:!1},{expression:i}=(0,o.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(s,r)}});let a;if("SequenceExpression"===i.type&&(a=i.expressions[0])&&"Literal"===a.type&&a.value===t){if(s.usedProperties.size>0)return s.usedProperties;console.warn(`You are using "${t}" but no \`${r}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function f(e){if(p.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,o.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,p,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],r={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,s]=e.split(".");r[n[t]]||(r[n[t]]=[]),r[n[t]].push(s)})),r}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function m(e,t,r){if(Array.isArray(e))for(const n of e)null!=r&&r.matchSource&&!r.matchSource(n.source)||y(n,t)}function y(e,t,r){try{(0,o.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){r||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function g(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&y(e,n(i,t,s),r),i.hasNonStaticUsage&&!r)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return i.usedProperties.delete(e.name),i.usedProperties}const v="PERMISSIONS",b="check";function w(e){var t;const r=new Set,n=S(r),{customTemplates:s,functions:i}=null!==(t=e.meta)&&void 0!==t?t:{};return l([e.routes,s],n,v),m(i,n,{matchSource:e=>e.includes(v)}),Array.from(r)}function x(e){const t=new Set;return l(e,S(t),v),Array.from(t)}function S(e){return function(t,r){if(t.name===v){const t=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}var P=r(1030);const{pull:A}=P,E=/^\[\w+\]$/;function T(e){if(Array.isArray(e))for(const t of e)k(t);else k(e)}function k(e){let t=e.slots;const r=new Map;if(Array.isArray(e.children)&&!t){const t=[];for(const s of e.children){var n;const e=null!==(n=s.slot)&&void 0!==n?n:"";if(E.test(e)){delete s.slot;const n=r.get(e);n?n.push(s):r.set(e,[s]),t.push(s)}k(s)}A(e.children,...t)}else{null!=t||(t={});for(const[e,n]of Object.entries(t)){if(E.test(e)){const{bricks:s}=n;Array.isArray(s)&&s.length>0&&(r.set(e,s),T(s)),delete t[e]}Array.isArray(n.bricks)&&T(n.bricks)}}r.size>0&&_(e.properties,r)}function _(e,t){if(Array.isArray(e))for(const r of e)_(r,t);else if((0,c.isObject)(e))for(const[r,n]of Object.entries(e))if("useChildren"===r){const s=t.get(n);s&&(delete e[r],e.useBrick=1===s.length?s[0]:s)}else _(n,t)}},6990:(e,t,r)=>{"use strict";r.r(t),r.d(t,{analytics:()=>l,auth:()=>wt,checkInstalledApps:()=>s,checkPermissions:()=>vt,flowApi:()=>i,menu:()=>a,messageDispatcher:()=>bt});var n={};r.r(n),r.d(n,{addPathToBlackList:()=>P,authenticate:()=>b,getAuth:()=>w,isBlockedHref:()=>T,isBlockedPath:()=>A,isBlockedUrl:()=>E,isLoggedIn:()=>S,logout:()=>x});var s={};r.r(s),r.d(s,{getCheckedApp:()=>ce,preCheckInstalledApps:()=>ae,waitForCheckingApps:()=>oe});var i={};r.r(i),r.d(i,{FLOW_API_PROVIDER:()=>ue,clearCollectWidgetContract:()=>Se,clearDebugContract:()=>Ae,collectContract:()=>we,collectDebugContract:()=>Pe,collectWidgetContract:()=>xe,getArgsOfFlowApi:()=>ke,isFlowApiProvider:()=>Te,registerFlowApiProvider:()=>de});var a={};r.r(a),r.d(a,{fetchMenuById:()=>Qe,getMenuById:()=>Ze});var o={};r.r(o),r.d(o,{onRequest:()=>dt,onResponse:()=>ft,onResponseError:()=>mt});var c={};r.r(c),r.d(c,{create:()=>gt});var l={};r.r(l),r.d(l,{http:()=>o,initialize:()=>ht,pageView:()=>c});var u=r(5069);function h(e,t,r,n,s,i,a){try{var o=e[i](a),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(n,s)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var i=e.apply(t,r);function a(e){h(i,n,s,a,o,"next",e)}function o(e){h(i,n,s,a,o,"throw",e)}a(void 0)}))}}var d=r(7551),f=function(){var e=p((function*(e,t){return(yield d.http.post("api/gateway/micro_app.permission.ValidatePermissions/api/micro_app/v1/permission/validate",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}(),m=r(3647),y=r(1732);const g={};let v=new Set;function b(e){var t;Object.assign(g,{org:e.org,username:e.username,userInstanceId:e.userInstanceId,loginFrom:e.loginFrom,accessRule:e.accessRule,isAdmin:e.isAdmin,csrfToken:e.csrfToken,license:e.license,accessToken:e.accessToken,userShowValue:e.userShowValue}),v=new Set(null===(t=e.license)||void 0===t?void 0:t.blackList)}function w(){return{...g}}function x(){for(const e of Object.keys(g))g[e]=void 0;k.clear(),_.length=0,C.clear()}function S(){return void 0!==g.username}function P(e){v.add(e)}function A(e){return[...v].some((t=>(0,m.matchPath)(e,{path:t})))}function E(e){const t=("string"==typeof e?(0,y.createLocation)(e):e).pathname;return"string"==typeof t&&A(t)}function T(e){const t=(0,m.getBasePath)(),r=new URL(e,`${location.origin}${t}`);return!(r.origin!==location.origin||!r.pathname.startsWith(t))&&A(r.pathname.substring(t.length-1))}const k=new Map,_=[],C=new Map;function I(e){if(S()&&!w().isAdmin)return O((0,u.scanPermissionActionsInAny)(e))}async function O(e){const t=e.filter((e=>!_.includes(e)));if(0===t.length)return;const r=[],n=[];for(const e of t){const t=k.get(e);t?r.push(t):n.push(e)}if(n.length>0){const e=(async()=>{try{const e=await f({actions:n},{noAbortOnRouteChange:!0});for(const t of e.actions)C.set(t.action,t.authorizationStatus),"undefined"===t.authorizationStatus&&console.error(`Undefined permission action: "${t.action}"`)}catch(e){console.error("Pre-check permissions failed",e)}finally{_.push(...n)}})();for(const t of n)k.set(t,e);r.push(e)}await Promise.all(r)}var L=r(4635),N=r(918),M=r(2559);function D(e,t,r){return r((0,M.A)(e,t))}var R=r(6121),B=r(829),F=r(1030),j=new WeakMap,U=new WeakMap,Y=new WeakMap,$=new WeakMap,H=new WeakMap,W=new WeakMap,V=new WeakMap,z=new WeakSet;class q{constructor(e){(0,L.A)(this,z),(0,N.A)(this,j,void 0),(0,N.A)(this,U,void 0),(0,N.A)(this,Y,[]),(0,N.A)(this,$,new Set),(0,N.A)(this,H,new Set),(0,N.A)(this,W,0),(0,N.A)(this,V,!1),(0,R.A)(j,this,e)}send(e){(0,B.A)(U,this)||(0,R.A)(U,this,(0,M.A)(z,this,K).call(this));const t=JSON.stringify(e);(0,B.A)(U,this).readyState===WebSocket.OPEN?(0,B.A)(U,this).send(t):(0,B.A)(Y,this).push(t)}onMessage(e){return(0,B.A)($,this).add(e),()=>{(0,B.A)($,this).delete(e)}}onClose(e){return(0,B.A)(H,this).add(e),()=>{(0,B.A)(H,this).delete(e)}}reset(){(0,B.A)(Y,this).length=0,(0,B.A)($,this).clear(),(0,B.A)(H,this).clear()}close(){var e;(0,R.A)(V,this,!0),(null===(e=(0,B.A)(U,this))||void 0===e?void 0:e.readyState)===WebSocket.OPEN&&(0,B.A)(U,this).close()}}function K(){console.log("WebSocket connecting ...");const e=new WebSocket((0,B.A)(j,this));let t;return e.addEventListener("open",(r=>{console.log("WebSocket open:",r),t=setTimeout((()=>{t=void 0,(0,R.A)(W,this,0)}),1e3);for(const t of(0,B.A)(Y,this))e.send(t);(0,B.A)(Y,this).length=0})),e.addEventListener("close",(e=>{(0,B.A)(V,this)||(void 0!==t&&clearTimeout(t),console.log("WebSocket close:",e),1e3!==e.code&&(0,M.A)(z,this,G).call(this))})),e.addEventListener("error",(e=>{console.error("WebSocket error:",e)})),e.addEventListener("message",(e=>{const t=JSON.parse(e.data);for(const e of(0,B.A)($,this))e(t)})),e}function G(){if((0,B.A)(W,this)>=5){console.error("WebSocket connect retry limit exceeded");for(const e of(0,B.A)(H,this))e();return}const e=1e3*Math.pow(2,(0,B.A)(W,this));console.log("WebSocket will reconnect after %d seconds",e/1e3),setTimeout((()=>{var e;(0,R.A)(W,this,(e=(0,B.A)(W,this),++e)),(0,R.A)(U,this,(0,M.A)(z,this,K).call(this))}),e)}var J=new WeakMap,X=new WeakMap,Z=new WeakMap,Q=new WeakSet;function ee(e){if(!(0,B.A)(J,e)){const t=`${"https:"===location.protocol?"wss:":"ws:"}//${window.location.host}${(0,m.getBasePath)()}api/websocket_service/v1/ws`;(0,R.A)(J,e,new q(t))}return(0,B.A)(J,e)}function te(e,t,r,n){const s=(0,B.A)(X,this)[e].get(n);if(s)return s;const i={event:"sub"===e?"TOPIC.SUB":"TOPIC.UNSUB",payload:r},a=new Promise(((t,n)=>{const s=re(r),a=D(Q,this,ee).onMessage((r=>{const i=r.event===("sub"===e?"TOPIC.SUB_SUCCESS":"TOPIC.UNSUB_SUCCESS"),c=r.event===("sub"===e?"TOPIC.SUB_FAILED":"TOPIC.UNSUB_FAILED");(i||c)&&s===re(r.payload)&&((i?t:n)(r),a(),o())})),o=D(Q,this,ee).onClose((()=>{n({retryCount:5}),a(),o()}));D(Q,this,ee).send(i)}));return"sub"===e&&(0,B.A)(Z,this).set(t,n),(0,B.A)(X,this)[e].set(n,a),a}function re(e){const{system:t,topic:r}=e;return JSON.stringify({system:t,topic:r})}const ne=async(e,t)=>(await d.http.post("api/gateway/logic.micro_app_standalone_service/api/v1/micro_app_standalone/search",e,t)).data,se=new Map,ie=new Map;function ae(e,t){if(window.STANDALONE_MICRO_APPS&&!window.NO_AUTH_GUARD){const r=function(e){var t;const r={usedArgs:new Set},{customTemplates:n,menus:s}=null!==(t=e.meta)&&void 0!==t?t:{};return(0,u.traverseStoryboardExpressions)([e.routes,n,s],((e,t)=>{(0,u.collectInstalledAppsHasUsage)(r,e,t)}),"INSTALLED_APPS"),[...r.usedArgs]}(e),n=[];for(const e of r)se.has(e)||t(e)||n.push(e);if(0===n.length)return;const s=ne({query:{appId:{$in:n}},fields:["appId","currentVersion","installStatus"]},{noAbortOnRouteChange:!0}).catch((e=>{console.error("Get off site standalone micro-apps failed",e)}));for(const e of n)se.set(e,s.then((t=>{var r;const n=null==t||null===(r=t.list)||void 0===r?void 0:r.find((t=>t.appId===e)),s=n?{...n,id:e}:void 0;return ie.set(e,s),s})))}}async function oe(e){await Promise.all(e.map((e=>se.get(e))))}function ce(e){if(window.STANDALONE_MICRO_APPS)return ie.get(e)}var le=r(4113);const ue="core.provider-flow-api";function he(e,t){return null==e?void 0:e.some((e=>e.source===t))}async function pe(e){let{url:t,originalUri:r,method:n="GET",responseWrapper:s=!0,ext_fields:i,request:a,isFileType:o,stream:c}=e;const l=["get","delete","head"].includes(n.toLowerCase()),u=o?{responseType:"blob"}:{};let h;for(var p=arguments.length,f=new Array(p>1?p-1:0),m=1;m<p;m++)f[m-1]=arguments[m];if(l){var y,g,v,b;let e,s;var w,x;if(r&&"object"===(null==a?void 0:a.type)&&(null!==(y=null===(g=r.match(/:([^/]+)/g))||void 0===g?void 0:g.length)&&void 0!==y?y:0)===(null!==(v=null===(b=a.fields)||void 0===b?void 0:b.length)&&void 0!==v?v:0)?[s]=f:[e,s]=f,c)return await(0,le.createSSEStream)(d.http.getUrlWithParams(t,e),{...u,...s,method:n,headers:Object.fromEntries([...new Headers(null!==(w=null===(x=s)||void 0===x?void 0:x.headers)&&void 0!==w?w:{}).entries()])});h=await d.http.simpleRequest(n,t,{params:e,...u,...s})}else{const e=function(e){if("object"!==(null==e?void 0:e.type))return!1;const t=e=>!(0,F.isEmpty)(e)&&e.some((e=>["file","file[]"].includes(e.type)||t(e.fields)));return t(e.fields)}(a),r=function(e){const t=he(e,"query");for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];if(t){if(he(e,"body")){const[e,t,r]=n;return{data:e,options:{params:t,...r}}}const[t,r]=n;return{data:{},options:{params:t,...r}}}const[i,a]=n;return{data:i,options:a}}(i,...f),s=e?function(e){if(e instanceof FormData)return e;const t=new FormData;for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach((e=>{t.append(r,e)})):!(0,F.isObject)(n)||n instanceof Blob||n instanceof Date?t.append(r,n):Object.entries(n).forEach((e=>{let[n,s]=e;t.append(`${r}[${n}]`,s)}));return t}(r.data):r.data;if(c){var S;const{body:e,headers:i}=d.http.getBodyAndHeaders(s,null===(S=r.options)||void 0===S?void 0:S.headers);return await(0,le.createSSEStream)(t,{...u,...r.options,method:n,headers:Object.fromEntries([...new Headers(null!=i?i:{}).entries()]),body:e})}h=await d.http.requestWithBody(n,t,s,{...u,...r.options})}return!o&&s?h.data:h}function de(){customElements.define(ue,(0,le.createProviderClass)(pe))}var fe=r(1060);const me=async(e,t)=>(await d.http.post("api/gateway/next_builder.contract_center.BatchSearchContract/api/v1/contract/batch_search",e,t)).data,ye=new Map,ge=new Map,ve=new Map,be=(e,t)=>{null==e||e.forEach((e=>{t.set(`${e.namespaceId}.${e.name}`,e)}))};function we(e){be(e,ye)}function xe(e){be(e,ge)}function Se(){ge.clear()}function Pe(e){be(e,ve)}function Ae(){ve.clear()}const Ee=new Map;function Te(e){return e.includes("@")}async function ke(e,t,r,n){if(!e.includes(":"))throw new Error(`You're using legacy Custom API "${e}" which is dropped in v3, please use Flow API instead`);const s=await async function(e){const[t,r]=e.split("@"),[n,s]=r.split(":"),i=function(e){return ye.get(e)||ge.get(e)||ve.get(e)}(`${t}.${n}`);if(i)return{name:i.name,namespace:i.namespaceId,serviceName:i.serviceName,version:i.version,contract:{endpoint:i.endpoint,response:i.response,request:i.request}};let a=Ee.get(e);return a||(a=async function(e,t,r){let n;const s=`${e}@${t}`;let i;try{const{list:e}=await me({contract:[{fullContractName:s,version:r}]});n=e[0]}catch(e){i=e}return n?{name:n.name,namespace:n.namespaceId,serviceName:n.serviceName,version:n.version,contract:{endpoint:n.endpoint,response:n.response,request:n.request}}:(console.error(`Failed to fetch Flow API definition for "${s}:${r}"`,null!=i?i:"Contract not found"),null)}(t,n,s),Ee.set(e,a)),a}(e);if(!s)throw new _e(`Flow API not found: "${e}"`);const i=function(e,t){var r,n;const s="string"==typeof t.contract?fe.safeLoad(t.contract,{schema:fe.JSON_SCHEMA,json:!0}):t.contract,{uri:i,method:a="GET",ext_fields:o}=null!==(r=null==s?void 0:s.endpoint)&&void 0!==r?r:{},c=!(null==s||!s.response)&&!1!==s.response.wrapper;if(!i)throw new Error(`Missing endpoint.uri in contract of provider "${e}"`);return{uri:i,method:"list"===a.toLowerCase()?"get":a,ext_fields:o,name:t.name,namespace:t.namespace,serviceName:t.serviceName,version:t.version,isFileType:"file"===(null==s||null===(n=s.response)||void 0===n?void 0:n.type),responseWrapper:c,request:null==s?void 0:s.request}}(e,s);return function(e,t,r,n){const{uri:s,method:i,ext_fields:a,responseWrapper:o,isFileType:c,request:l}=e,u="saveAs"===r;let h,p=t;u&&(Array.isArray(t)?(p=t.slice(),h=p.shift()):h=t.filename);const{url:d,args:f}=function(e,t){const{uri:r,name:n,namespace:s,serviceName:i,version:a,method:o="GET",request:c,ext_fields:l}=e,u=a?"logic.api.gateway"===i||null!=i&&i.startsWith("logic.api.gateway.")?"":i?`api/gateway/${i}`:`api/gateway/${s}.${n}@${a}`:`api/gateway/api_service.${s}.${n}`;let h,p=[];if(Array.isArray(t))p=t.slice(),h=r.replace(/:([^/]+)/g,(()=>p.shift()));else{const e={...t.params};if(h=r.replace(/:([^/]+)/g,((t,r)=>{if((0,le.hasOwnProperty)(e,r)){const t=e[r];return delete e[r],t}throw new Error(`Missing required param: "${r}"`)})),["get","delete","head"].includes(o.toLowerCase())){var d,f,m,y;"object"===(null==c?void 0:c.type)&&(null!==(d=null===(f=r.match(/:([^/]+)/g))||void 0===f?void 0:f.length)&&void 0!==d?d:0)===(null!==(m=null===(y=c.fields)||void 0===y?void 0:y.length)&&void 0!==m?m:0)||p.push(e)}else{const t=null==l?void 0:l.find((e=>"body"===e.source));if(t){let r;t.name&&(0,le.hasOwnProperty)(e,t.name)&&(r=e[t.name],delete e[t.name]),p.push(r)}const r=null==l?void 0:l.find((e=>"query"===e.source));if(r){let t;r.name&&(0,le.hasOwnProperty)(e,r.name)&&(t=e[r.name],delete e[r.name]),p.push(t)}t||r||p.push(e)}t.options&&p.push(t.options)}return{url:u?u+h:h.replace(/^\//,""),args:p}}(e,p);return[...u?[h]:[],{url:d,originalUri:s,method:i,ext_fields:a,responseWrapper:o,request:l,isFileType:c,stream:n},...f]}(i,t,r,n)}class _e extends Error{constructor(e){super(e),this.name="FlowApiNotFoundError",Error.captureStackTrace&&Error.captureStackTrace(this,_e)}}var Ce=function(){var e=p((function*(e,t,r){return(yield d.http.post("api/gateway/cmdb.instance.PostSearch/object/".concat(e,"/instance/_search"),t,r)).data}));return function(t,r,n){return e.apply(this,arguments)}}(),Ie=r(4586);function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach((function(t){(0,Ie.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne=function(){var e=p((function*(e,t,r){return(yield d.http.get("api/gateway/micro_app.installed_micro_app.GetMenusInfo/api/v1/micro-app/menus/".concat(e),Le(Le({},r),{},{params:t}))).data}));return function(t,r,n){return e.apply(this,arguments)}}(),Me=r(7631);const De=Symbol("appId"),Re=Symbol("menuI18nNamespace"),Be=Symbol("overrideApp");async function Fe(e,t,r){const n=e.find((e=>"inject"!==e.type));if(!n)return;const s=[],i=new Map,a=new WeakMap;for(const t of e)if(t.i18n){const e=`menu/${t.menuId}~${t.app[0].appId}+${t.instanceId}`;Object.entries(t.i18n).forEach((t=>{let[r,n]=t;Me.i18n.addResourceBundle(r,e,n)})),a.set(t,e)}await Promise.all(e.map((e=>async function(e,t,r,n){if(e.dynamicItems&&e.itemsResolve){const i=e.app[0].appId,a={...t,pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,I(e.itemsResolve)]};var s;i!==t.app.id&&(a.overrideApp=window.STANDALONE_MICRO_APPS?e.overrideApp:null===(s=n.getStoryboardByAppId(i))||void 0===s?void 0:s.app,a.appendI18nNamespace=r.get(e));const o=await n.resolveData({transform:"items",...e.itemsResolve},a);e.items=o.items}}(e,t,a,r))));for(const t of e){var o;if(null!==(o=t.items)&&void 0!==o&&o.length)if("inject"===t.type&&t.injectMenuGroupId){let e=i.get(t.injectMenuGroupId);e||(e=[],i.set(t.injectMenuGroupId,e)),e.push(t)}else s.push(t)}return{...n,items:s.flatMap((e=>je(e.items,e,i,a))),[Re]:a.get(n),[Be]:n.overrideApp}}function je(e,t,r,n){return null==e?void 0:e.map((e=>{var s;const i=e.groupId&&r.get(e.groupId);return i&&r.delete(e.groupId),{...e,children:(null!==(s=je(e.children,t,r,n))&&void 0!==s?s:[]).concat(i?i.flatMap((e=>je(e.items,e,r,n))):[]),[De]:t.app[0].appId,[Re]:n.get(t),[Be]:t.overrideApp}}))}function Ue(e){e.items=Ye(e.items)}function Ye(e){return function(e){return(0,F.sortBy)(e,(e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}))}(e).map((e=>({...e,children:Ye(e.children)})))}var $e=r(5285),He=r(8303);function We(e,t,r,n){if("titleDataSource"in e&&(0,le.isObject)(e.titleDataSource)&&Object.entries(e.titleDataSource).every((e=>{let[,t]=e;return null===t||""===t}))&&delete e.titleDataSource,"if"in e&&null===e.if&&delete e.if,"to"in e&&e.to&&!(0,He.isEvaluable)(e.to)){const t=$e.pipes.yaml(e.to);(0,le.isObject)(t)&&["pathname","search","hash"].some((e=>(0,le.hasOwnProperty)(t,e)))&&(e.to=t)}let s=r;if(t!==r.app.id){var i;const a=window.STANDALONE_MICRO_APPS?e[Be]:null===(i=n.getStoryboardByAppId(t))||void 0===i?void 0:i.app;s={...r,overrideApp:a,appendI18nNamespace:e[Re]}}return n.asyncComputeRealValue(e,s,{ignoreSymbols:!0})}function Ve(e,t,r){return Promise.all(e.map((async e=>{let{children:n,...s}=e;const[i,a]=await Promise.all([We(s,s[De],t,r),n&&await Ve(n,t,r)]);return{...i,children:a}})))}var ze=function(){var e=p((function*(e,t,r,n){return(yield d.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(e,"/instance/").concat(t),Le(Le({},n),{},{params:r}))).data}));return function(t,r,n,s){return e.apply(this,arguments)}}();const qe=new Map;async function Ke(e){if(e.title||(0,F.isEmpty)(e.titleDataSource))return e.title;const t=JSON.stringify(e.titleDataSource),r=qe.get(t);if(void 0!==r)return r;const{objectId:n,instanceId:s,attributeId:i}=e.titleDataSource,a=null!=i?i:"name",o=await ze(n,s,{fields:a});let c;if("#showKey"===i&&Array.isArray(o[a])){const[e,...t]=o[a];c=t.length>0?`${e}(${t.join(",")})`:String(e)}else c=String(o[a]);return qe.set(t,c),c}const Ge=new Map,Je=new Map;function Xe(e){return null==e?void 0:e.filter(m.checkIfOfComputed).map((e=>{const t=Xe(e.children);return"group"===e.type?{type:"group",title:e.text,childLayout:e.childLayout,items:t,groupId:e.groupId,groupFrom:e.groupFrom}:null!=t&&t.length?{type:"subMenu",childLayout:e.childLayout,title:e.text,icon:e.icon,items:t,defaultExpanded:e.defaultExpanded}:function(e){return e.href?T(e.href):!!e.to&&E(e.to)}(e)?null:(0,F.omit)(e,["type","items","children"])})).filter(Boolean)}function Ze(e){return Je.get(e)}function Qe(e,t,r){let n=Ge.get(e);return n||(n=async function(e,t,r){const n=window.STANDALONE_MICRO_APPS?function(e,t,r){var n,s,i,a;const o=r.getStoryboardByAppId(t);return(null!==(n=null!==(s=null===(i=o.meta)||void 0===i?void 0:i.injectMenus)&&void 0!==s?s:null===(a=o.meta)||void 0===a?void 0:a.menus)&&void 0!==n?n:[]).filter((t=>t.menuId===e)).map((e=>{var r;return{...e,...null!==(r=e.app)&&void 0!==r&&null!==(r=r[0])&&void 0!==r&&r.appId?{}:{app:[{appId:t}]}}}))}(e,t.app.id,r):t.flags["three-level-menu-layout"]?(await Ne(e,{menuObjectId:"EASYOPS_STORYBOARD_MENU"})).menus:(await Ce("EASYOPS_STORYBOARD_MENU",{page:1,page_size:200,fields:{menuId:!0,title:!0,icon:!0,link:!0,titleDataSource:!0,defaultCollapsed:!0,defaultCollapsedBreakpoint:!0,type:!0,injectMenuGroupId:!0,dynamicItems:!0,itemsResolve:!0,items:!0,i18n:!0,"items.children":!0,"app.appId":!0},query:{menuId:{$eq:e},app:{$size:{$gt:0}}}})).list,s=await Fe(n,t,r);if(!s)throw new Error(`Menu not found: ${e}`);Ue(s);const{items:i,app:a,...o}=s,c={...t,pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,I([i,o])]};delete c.tplStateStoreId,delete c.forEachItem,delete c.forEachIndex,delete c.forEachSize;const l=a[0].appId,[u,h]=await Promise.all([We(o,l,c,r),Ve(i,c,r)]),p={title:await Ke(u),...(0,F.pick)(u,["icon","link","defaultCollapsed","defaultCollapsedBreakpoint"]),menuItems:Xe(h)};Je.set(e,p)}(e,t,r)),n}const et=[];let tt=null;const rt={maxWaitingTime:5e3,maxLoggedEvents:10};function nt(){clearTimeout(tt),et.length>rt.maxLoggedEvents?st():tt=setTimeout(st,rt.maxWaitingTime)}function st(){if(0===et.length)return;const e={model:"easyops.FRONTEND_STAT",columns:["_ver","st","et","lt","size","time","traceId","code","duration","page","uid","username","api","type","msg","status","pageId","route","apiCount","maxApiTimeCost","apiSizeCost","pageTitle"],data:et.splice(0,rt.maxLoggedEvents)};var t;!function(e,t){const r=new Blob([JSON.stringify(t)],{type:"application/json"});window.navigator.sendBeacon(e,r)}(rt.api,e),et.length&&(t=st,(window.requestIdleCallback||window.requestAnimationFrame||(e=>setTimeout(e,17)))(t))}function it(){window.addEventListener("beforeunload",st,!1)}let at,ot=!1,ct=null,lt=!0;const ut=[];function ht(e){ot||(ot=!0,at||(at=function(e,t){return Object.assign(rt,{...t,api:e}),{sendOnExit:it,emit:nt}}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),at.sendOnExit()))}const pt=Symbol("HttpAnalytics");function dt(e){const t=Math.round(performance.now()),r=Date.now();return e[pt]={st:r,time:Math.round(r/1e3),perfStartTime:t},e}function ft(e,t){return yt(!1,e,t)}function mt(e,t){return yt(!0,e,t)}function yt(e,t,r){const n=Math.round(performance.now()),s=Date.now(),{[pt]:i,url:a}=r;if(i&&!(e&&t instanceof d.HttpAbortError)){delete r[pt];const{st:c,time:l,perfStartTime:u}=i,{userInstanceId:h,username:p}=w();let f,m,y,g,v,b,x;if(e){const e=t instanceof d.HttpResponseError;(e||t instanceof d.HttpParseError)&&(({status:v,headers:b}=t.response),e&&(x=t.responseJson))}else({status:v,data:x,headers:b}=t);(0,le.isObject)(x)&&({code:f,message:m}=x),b instanceof Headers&&(y=b.get("x-b3-traceid"),g=b.get("content-length")),o={st:c,_ver:c,uid:h,username:p,time:l,et:s,page:location.href,duration:n-u,api:a,type:"api",code:null!=f?f:-1,msg:null!=m?m:"",status:v,traceId:null!=y?y:"",size:g?Number(g):-1},ct?et.push({...o,type:"apiRequest",...ct}):ut.push(o)}var o;return e?Promise.reject(t):t}function gt(){const e=Math.round(performance.now()),t=Date.now();return ut.length=0,ct=null,function(r){let{status:n,path:s,pageTitle:i}=r;if("ok"!==n)return et.push(...ut),void(ut.length=0);const a=Math.round(performance.now())-e,o=Date.now(),{username:c}=w();(function(e){const t=function(){const e=URL.createObjectURL(new Blob([]));let t=e.substring(e.lastIndexOf("/")+1);return URL.revokeObjectURL(e),lt&&(t="88-"+t,lt=!1),t}(),{lt:r,route:n}=e;ct={lt:r,route:n,pageId:t},et.push({...e,pageId:t,apiCount:ut.length,maxApiTimeCost:Math.max(0,...ut.map((e=>e.duration))),size:ut.map((e=>e.size)).filter((e=>e>0)).reduce(((e,t)=>e+t),0)});for(const e of ut)et.push({...e,...ct});ut.length=0,at.emit()})({type:"page",page:location.href,_ver:t,time:Math.round(t/1e3),st:t,et:o,lt:a,pageTitle:i,username:c,route:s}),window.dispatchEvent(new CustomEvent("route.render",{detail:{renderTime:a}}))}}const vt=Object.freeze({checkPermissions:function(){if(!S())return!1;if(w().isAdmin)return!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(const e of t)switch(C.get(e)){case"unauthorized":case"undefined":return!1;case void 0:return console.error(`Un-checked permission action: "${e}", please make sure the permission to check is defined in permissionsPreCheck.`),!1}return!0},preCheckPermissions:function(e){if(S()&&!w().isAdmin)return O((0,u.scanPermissionActionsInStoryboard)(e))},preCheckPermissionsForBrickOrRoute:async function(e,t){if(S()&&!w().isAdmin&&Array.isArray(e.permissionsPreCheck))return O(await t(e.permissionsPreCheck))}}),bt=new class{constructor(){(0,L.A)(this,Q),(0,N.A)(this,J,void 0),(0,N.A)(this,X,{sub:new Map,unsub:new Map}),(0,N.A)(this,Z,new Map)}subscribe(e,t){const r=JSON.stringify(t);return(0,M.A)(Q,this,te).call(this,"sub",e,t,r)}unsubscribe(e){const t=(0,B.A)(Z,this).get(e);if(!t){const t=`The message channel to unsubscribe "${e}" is not found`;return console.error(t),Promise.reject(new Error(t))}const r=JSON.parse(t),n=(0,M.A)(Q,this,te).call(this,"unsub",e,r,t);return(0,B.A)(X,this).sub.delete(t),n.then((()=>{(0,B.A)(Z,this).delete(e)})),n}onMessage(e,t){let r=(0,B.A)(Z,this).get(e),n=!1;return D(Q,this,ee).onMessage((s=>{r||(r=(0,B.A)(Z,this).get(e)),r?"MESSAGE.PUSH"===s.event&&function(e,t){const r=JSON.parse(e);return r.system===t.system&&(r.topic===t.topic||"string"==typeof r.topic&&r.topic.includes("*")&&new RegExp(`^${r.topic.replace(/([^*]*)\*([^*]*)/g,((e,t,r)=>`${(0,F.escapeRegExp)(t)}[^/]*${(0,F.escapeRegExp)(r)}`))}$`).test(t.topic))}(r,s.payload)&&t(s.payload.message):n||(console.error(`Message channel: "${e}" not found`),n=!0)}))}onClose(e){return D(Q,this,ee).onClose(e)}reset(){var e;(0,B.A)(X,this).sub.clear(),(0,B.A)(X,this).unsub.clear(),(0,B.A)(Z,this).clear(),null===(e=(0,B.A)(J,this))||void 0===e||e.reset()}},wt=function(){const e=(0,m.getV2RuntimeFromDll)();if(e)return Object.freeze((0,F.pick)(e,["authenticate","getAuth","isLoggedIn","logout","addPathToBlackList","isBlockedPath","isBlockedUrl","isBlockedHref"]))}()||n},7042:(e,t,r)=>{"use strict";var n=r(5417);e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},7050:function(e,t,r){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(r(9420))},7457:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BrickLoadError:()=>v,enqueueStableLoadBricks:()=>d,enqueueStableLoadProcessors:()=>f,flushStableLoadBricks:()=>p,loadBricksImperatively:()=>m,loadEditorsImperatively:()=>g,loadProcessorsImperatively:()=>y,loadScript:()=>i,loadSharedModule:()=>o,loadStyle:()=>a});const n=new Map;function s(e,t,r,i){if(Array.isArray(t))return Promise.all(t.map((t=>s(e,t,r))));const a=r&&!/^https?:/.test(t)?`${r}${t}`:t,o=n.get(a);if(o)return o;const c=new Promise(((t,r)=>{const n=()=>{window.dispatchEvent(new Event("request.end"))},s=document.createElement("style"===e?"link":"script");"script"===e?Object.assign(s,{type:"text/javascript",async:!0,...i,src:a}):Object.assign(s,{rel:"stylesheet",...i,href:a}),s.onload=()=>{t(a),n()},s.onerror=e=>{r(e),n()};const o=document.currentScript||document.getElementsByTagName("script")[0];o.parentNode.insertBefore(s,o),window.dispatchEvent(new Event("request.start"))}));return n.set(a,c),c}function i(e,t,r){return s("script",e,t,r)}function a(e,t,r){return s("style",e,t,r)}async function o(e,t){await r.I("default");const n=window[e];return await n.init(r.S.default),(await n.get(t))()}let c,l,u=!1;const h=new Promise(((e,t)=>{c=e,l=t}));function p(){u||c()}function d(e,t){return E(A("bricks",e,t))}function f(e,t){return E(A("processors",e,t))}async function m(e,t){const r=A("bricks",e,t);return p(),E(r)}function y(e,t){const r=A("processors",e,t);return p(),E(r)}function g(e,t){const r=A("editors",e,t);return p(),E(r)}class v extends Error{constructor(e){super(e),this.name="BrickLoadError",Error.captureStackTrace&&Error.captureStackTrace(this,v)}}let b;const w="v2-adapter.load-bricks";function x(e,t,r){const n=new Map,s=new Set,i=t=>{var a;if(s.has(t))return;let o,c,l;if(s.add(t),"editors"===e){l=t;for(const e of r.values()){var u,h;null!==(u=null!==(h=e.propertyEditors)&&void 0!==h?h:e.editors)&&void 0!==u&&u.some((e=>e===l))&&(o=e)}}else if("processors"===e||t.includes(".")){[c,l]=t.split(".");const n=`bricks/${"processors"===e?(f=c,f.replace(/[A-Z]/g,(e=>`-${e[0].toLocaleLowerCase()}`)).replace(/_[0-9]/g,(e=>`-${e[1]}`))):c}`;o=r.get(n)}else{let e;l=t;for(const n of r.values()){var p;if(null!==(p=n.elements)&&void 0!==p&&p.some((e=>e===l))){var d;if(null===(d=n.deprecatedElements)||void 0===d||!d.includes(t)){o=n;break}e=n}}!o&&e&&(o=e)}var f;if(!o)return void console.error(`Package for ${t} not found.`);let m=n.get(o);m||(m=[],n.set(o,m)),m.push({fullName:t,lastName:l});const y=null===(a=o.dependencies)||void 0===a?void 0:a[t];if(y)for(const e of y)i(e)};for(const e of t)i(e);return n}async function S(e,t,r){const n=`${"processors"===e||"editors"===e?`./${e}/`:"./"}${"editors"===e?r.fullName:r.lastName}`,s=performance.now();try{await o(t,n)}catch(t){console.error(t);const n=Math.round(performance.now()-s);throw new v(`Load ${e} of "${r.fullName}" failed (${n>1e3?+(n/1e3).toFixed(2)+"s":`${n}ms`}): ${null==t?void 0:t.message}`)}}function P(e,t,r){return t.map((async t=>{var n;return await i(t.filePath,null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:""),await h,Promise.all(r.get(t).map((r=>S(e,t.id,r))))}))}async function A(e,t,r){const n=new Map;for(const e of r){const t=e.id||T(e.filePath);n.set(t,e)}const s=x(e,t,n);let a;const o=[],h=[];let p;for(const e of s.keys())if(e.id)"bricks/basic"===e.id?a=e:h.push(e);else if(o.push(e),p=n.get("bricks/v2-adapter"),!p)throw new Error("Using v2 bricks, but v2-adapter not found");const d=p;let f;const m=a;if(m){var y;const t=i(m.filePath,null!==(y=window.PUBLIC_ROOT)&&void 0!==y?y:"");u||(u=!0,t.then((()=>Promise.resolve())).then(c,l)),f=t.then((()=>Promise.all(s.get(m).map((t=>S(e,m.id,t))))))}const g=[f].concat(P(e,h,s));if(d&&o.length>0){if(!b){const e=x("bricks",[w],n),t=[...e.keys()];b=(async()=>(await Promise.all(P("bricks",t,e)),document.createElement(w)))()}g.push(b.then((t=>Promise.all(o.map((n=>{var i;const a=T(n.filePath).split("/")[1];return t.resolve(d.filePath,"editors"===e&&null!==(i=n.propertyEditorsJsFilePath)&&void 0!==i?i:n.filePath,"bricks"===e?s.get(n).map((e=>`${a}.${e.lastName}`)):[],n.dll,r)}))))))}await Promise.all(g)}async function E(e){window.dispatchEvent(new Event("request.start"));try{await e}finally{window.dispatchEvent(new Event("request.end"))}}function T(e){return e.split("/").slice(0,2).join("/")}},7472:(e,t,r)=>{"use strict";r.r(t),r.d(t,{i18n:()=>h,i18nText:()=>u,initializeI18n:()=>c});var n=r(5630),s=r(7631),i=r(848);let a=!1;const o=new Set;function c(e,t){if(a||(a=!0,s.i18n.use(i.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&t&&!o.has(e)){o.add(e);for(const[r,n]of Object.entries(t))s.i18n.addResourceBundle(r,e,n)}}var l=r(4113);function u(e){var t;if(!e)return;const r=null!==(t=s.i18n.language)&&void 0!==t?t:"zh-CN";if((0,l.hasOwnProperty)(e,r))return e[r];const n=r.split("-")[0];if(n!==r)return(0,l.hasOwnProperty)(e,n)?e[n]:void 0;const i=`${n}-`;for(const t of Object.keys(e))if(t.startsWith(i))return e[t]}const h=n.default},7542:(e,t,r)=>{"use strict";r.d(t,{X2:()=>T,Ot:()=>A,ki:()=>k,lO:()=>_});var n=r(4396),s={create:function(e){var t={time:(0,n.mU)(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(e){t.messagesCallback&&t.messagesCallback(e.data)},t},close:function(e){e.bc.close(),e.subFns=[]},onMessage:function(e,t){e.messagesCallback=t},postMessage:function(e,t){try{return e.bc.postMessage(t,!1),n.o}catch(e){return Promise.reject(e)}},canBeUsed:function(){if("undefined"!=typeof globalThis&&globalThis.Deno&&globalThis.Deno.args)return!0;if("undefined"==typeof window&&"undefined"==typeof self||"function"!=typeof BroadcastChannel)return!1;if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0},type:"native",averageResponseTime:function(){return 150},microSeconds:n.mU};class i{ttl;map=new Map;_to=!1;constructor(e){this.ttl=e}has(e){return this.map.has(e)}add(e){this.map.set(e,a()),this._to||(this._to=!0,setTimeout((()=>{this._to=!1,function(e){const t=a()-e.ttl,r=e.map[Symbol.iterator]();for(;;){const n=r.next().value;if(!n)return;const s=n[0];if(!(n[1]<t))return;e.map.delete(s)}}(this)}),0))}clear(){this.map.clear()}}function a(){return Date.now()}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return void 0===t.webWorkerSupport&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=45e3),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&"function"==typeof e.idb.onclose&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=6e4),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=12e4),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),void 0===t.node.useFastPath&&(t.node.useFastPath=!0),t}var c=n.mU,l="messages",u={durability:"relaxed"};function h(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function p(e){e.commit&&e.commit()}function d(e){e.closed||f(e).then((function(){return(0,n.yy)(e.options.idb.fallbackInterval)})).then((function(){return d(e)}))}function f(e){return e.closed?n.o:e.messagesCallback?function(e,t){var r=e.transaction(l,"readonly",u),n=r.objectStore(l),s=[],i=IDBKeyRange.bound(t+1,1/0);if(n.getAll){var a=n.getAll(i);return new Promise((function(e,t){a.onerror=function(e){return t(e)},a.onsuccess=function(t){e(t.target.result)}}))}return new Promise((function(e,a){var o=function(){try{return i=IDBKeyRange.bound(t+1,1/0),n.openCursor(i)}catch(e){return n.openCursor()}}();o.onerror=function(e){return a(e)},o.onsuccess=function(n){var i=n.target.result;i?i.value.id<t+1?i.continue(t+1):(s.push(i.value),i.continue()):(p(r),e(s))}}))}(e.db,e.lastCursorId).then((function(t){var r=t.filter((function(e){return!!e})).map((function(t){return t.id>e.lastCursorId&&(e.lastCursorId=t.id),t})).filter((function(t){return function(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}(t,e)})).sort((function(e,t){return e.time-t.time}));return r.forEach((function(t){e.messagesCallback&&(e.eMIs.add(t.id),e.messagesCallback(t.data))})),n.o})):n.o}var m={create:function(e,t){return t=o(t),function(e){var t="pubkey.broadcast-channel-0-"+e,r=h().open(t);return r.onupgradeneeded=function(e){e.target.result.createObjectStore(l,{keyPath:"id",autoIncrement:!0})},new Promise((function(e,t){r.onerror=function(e){return t(e)},r.onsuccess=function(){e(r.result)}}))}(e).then((function(r){var s={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:(0,n.zs)(),eMIs:new i(2*t.idb.ttl),writeBlockPromise:n.o,messagesCallback:null,readQueuePromises:[],db:r};return r.onclose=function(){s.closed=!0,t.idb.onclose&&t.idb.onclose()},d(s),s}))},close:function(e){e.closed=!0,e.db.close()},onMessage:function(e,t,r){e.messagesCallbackTime=r,e.messagesCallback=t,f(e)},postMessage:function(e,t){return e.writeBlockPromise=e.writeBlockPromise.then((function(){return function(e,t,r){var n={uuid:t,time:Date.now(),data:r},s=e.transaction([l],"readwrite",u);return new Promise((function(e,t){s.oncomplete=function(){return e()},s.onerror=function(e){return t(e)},s.objectStore(l).add(n),p(s)}))}(e.db,e.uuid,t)})).then((function(){0===(0,n.HO)(0,10)&&function(e){return(t=e.db,r=e.options.idb.ttl,n=Date.now()-r,s=t.transaction(l,"readonly",u),i=s.objectStore(l),a=[],new Promise((function(e){i.openCursor().onsuccess=function(t){var r=t.target.result;if(r){var i=r.value;i.time<n?(a.push(i),r.continue()):(p(s),e(a))}else e(a)}}))).then((function(t){return function(e,t){if(e.closed)return Promise.resolve([]);var r=e.db.transaction(l,"readwrite",u).objectStore(l);return Promise.all(t.map((function(e){var t=r.delete(e);return new Promise((function(e){t.onsuccess=function(){return e()}}))})))}(e,t.map((function(e){return e.id})))}));var t,r,n,s,i,a}(e)})),e.writeBlockPromise},canBeUsed:function(){return!!h()},type:"idb",averageResponseTime:function(e){return 2*e.idb.fallbackInterval},microSeconds:c};function y(){var e;if("undefined"==typeof window)return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch(e){}return e}function g(e){return"pubkey.broadcastChannel-"+e}function v(){var e=y();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch(e){return!1}return!0}var b={create:function(e,t){if(t=o(t),!v())throw new Error("BroadcastChannel: localstorage cannot be used");var r=(0,n.zs)(),s=new i(t.localstorage.removeTimeout),a={channelName:e,uuid:r,eMIs:s};return a.listener=function(e){var t=g(e),n=function(e){var n;e.key===t&&(n=JSON.parse(e.newValue),a.messagesCallback&&n.uuid!==r&&n.token&&!s.has(n.token)&&(n.data.time&&n.data.time<a.messagesCallbackTime||(s.add(n.token),a.messagesCallback(n.data))))};return window.addEventListener("storage",n),n}(e),a},close:function(e){var t;t=e.listener,window.removeEventListener("storage",t)},onMessage:function(e,t,r){e.messagesCallbackTime=r,e.messagesCallback=t},postMessage:function(e,t){return new Promise((function(r){(0,n.yy)().then((function(){var s=g(e.channelName),i={token:(0,n.zs)(),time:Date.now(),data:t,uuid:e.uuid},a=JSON.stringify(i);y().setItem(s,a);var o=document.createEvent("Event");o.initEvent("storage",!0,!0),o.key=s,o.newValue=a,window.dispatchEvent(o),r()}))}))},canBeUsed:v,type:"localstorage",averageResponseTime:function(){var e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?240:120},microSeconds:n.mU},w=r(3459),x=[s,m,b];function S(e){var t=[].concat(e.methods,x).filter(Boolean);if(e.type){if("simulate"===e.type)return w.MQ;var r=t.find((function(t){return t.type===e.type}));if(r)return r;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter((function(e){return"idb"!==e.type})));var n=t.find((function(e){return e.canBeUsed()}));if(n)return n;throw new Error("No usable method found in "+JSON.stringify(x.map((function(e){return e.type}))))}var P,A=new Set,E=0,T=function(e,t){var r,s;this.id=E++,A.add(this),this.name=e,P&&(t=P),this.options=o(t),this.method=S(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,s=(r=this).method.create(r.name,r.options),(0,n.yL)(s)?(r._prepP=s,s.then((function(e){r._state=e}))):r._state=s};function k(e){var t=S(e=o(e));return"node"===t.type?t.clearNodeFolder().then((function(){return!0})):n.fg}function _(e){P=e}function C(e,t,r){var s={time:e.method.microSeconds(),type:t,data:r};return(e._prepP?e._prepP:n.o).then((function(){var t=e.method.postMessage(e._state,s);return e._uMP.add(t),t.catch().then((function(){return e._uMP.delete(t)})),t}))}function I(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function O(e,t,r){e._addEL[t].push(r),function(e){if(!e._iL&&I(e)){var t=function(t){e._addEL[t.type].forEach((function(e){t.time>=e.time&&e.fn(t.data)}))},r=e.method.microSeconds();e._prepP?e._prepP.then((function(){e._iL=!0,e.method.onMessage(e._state,t,r)})):(e._iL=!0,e.method.onMessage(e._state,t,r))}}(e)}function L(e,t,r){e._addEL[t]=e._addEL[t].filter((function(e){return e!==r})),function(e){if(e._iL&&!I(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}T._pubkey=!0,T.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return C(this,"message",e)},postInternal:function(e){return C(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};L(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,O(this,"message",t)):this._onML=null},addEventListener:function(e,t){O(this,e,{time:this.method.microSeconds(),fn:t})},removeEventListener:function(e,t){L(this,e,this._addEL[e].find((function(e){return e.fn===t})))},close:function(){var e=this;if(!this.closed){A.delete(this),this.closed=!0;var t=this._prepP?this._prepP:n.o;return this._onML=null,this._addEL.message=[],t.then((function(){return Promise.all(Array.from(e._uMP))})).then((function(){return Promise.all(e._befC.map((function(e){return e()})))})).then((function(){return e.method.close(e._state)}))}},get type(){return this.method.type},get isClosed(){return this.closed}}},7545:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r.d(t,{A:()=>n})},7696:function(e,t,r){!function(e){"use strict";e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,r){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(r(9420))},7773:(e,t,r)=>{"use strict";r.d(t,{K:()=>s});var n=r(7551);const s=async(e,t)=>(await n.http.get("api/auth/v2/bootstrap",{...t,params:e})).data},8028:(e,t,r)=>{"use strict";var n=r(2290);e.exports=new n({explicit:[r(2621),r(5853),r(1256)]})},8220:(e,t,r)=>{"use strict";r.r(t),r.d(t,{JsonStorage:()=>y,createProviderClass:()=>s,createSSEStream:()=>h,deepFreeze:()=>d,hasOwnProperty:()=>f,isObject:()=>m,unwrapProvider:()=>v});var n=r(5060);function s(e){return class extends HTMLElement{get $$typeof(){return"provider"}resolve(){return e(...arguments)}async saveAs(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];const a=await e(...s);n.saveAs(a,t)}}}var i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]])}return r};const a="text/event-stream",o=1e3,c="last-event-id";function l(e,t){var{signal:r,headers:n,onopen:s,onmessage:l,onclose:h,onerror:p,openWhenHidden:d,fetch:f}=t,m=i(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,i)=>{const y=Object.assign({},n);let g;function v(){g.abort(),document.hidden||A()}y.accept||(y.accept=a),d||document.addEventListener("visibilitychange",v);let b=o,w=0;function x(){document.removeEventListener("visibilitychange",v),window.clearTimeout(w),g.abort()}null==r||r.addEventListener("abort",(()=>{x(),t()}));const S=null!=f?f:window.fetch,P=null!=s?s:u;async function A(){var r;g=new AbortController;try{const r=await S(e,Object.assign(Object.assign({},m),{headers:y,signal:g.signal}));await P(r),await async function(e,t){const r=e.getReader();let n;for(;!(n=await r.read()).done;)t(n.value)}(r.body,function(e){let t,r,n,s=!1;return function(i){void 0===t?(t=i,r=0,n=-1):t=function(e,t){const r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(t,i);const a=t.length;let o=0;for(;r<a;){s&&(10===t[r]&&(o=++r),s=!1);let i=-1;for(;r<a&&-1===i;++r)switch(t[r]){case 58:-1===n&&(n=r-o);break;case 13:s=!0;case 10:i=r}if(-1===i)break;e(t.subarray(o,i),n),o=r,n=-1}o===a?t=void 0:0!==o&&(t=t.subarray(o),r-=o)}}(function(e,t,r){let n={data:"",event:"",id:"",retry:void 0};const s=new TextDecoder;return function(e,t){if(0===e.length)null==r||r(n),n={data:"",event:"",id:"",retry:void 0};else if(t>0){const r=s.decode(e.subarray(0,t)),a=t+(32===e[t+1]?2:1),o=s.decode(e.subarray(a));switch(r){case"data":n.data=n.data?n.data+"\n"+o:o;break;case"event":n.event=o;break;case"id":(i=n.id=o)?y[c]=i:delete y[c];break;case"retry":const e=parseInt(o,10);isNaN(e)||(e=>{b=e})(n.retry=e)}}var i}}(0,0,l))),null==h||h(),x(),t()}catch(e){if(!g.signal.aborted)try{const t=null!==(r=null==p?void 0:p(e))&&void 0!==r?r:b;window.clearTimeout(w),w=window.setTimeout(A,t)}catch(e){x(),i(e)}}}A()}))}function u(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(a)))throw new Error(`Expected content-type to be ${a}, Actual: ${t}`)}async function h(e,t){const r=[],n=[];let s=!1,i=!1;const{converter:a,...o}=null!=t?t:{};function c(){n.forEach((e=>{let[t]=e;return t({value:void 0,done:!0})}))}function u(){s=!0,n.length=0,r.length=0}return await new Promise(((t,s)=>{l(e,{...o,openWhenHidden:!0,async onopen(e){if(!e.ok){var r;let t,n;console.error("open error",e.statusText);try{t=await e.text()}catch{throw new Error(e.statusText)}try{n=JSON.parse(t)}catch{}if("string"==typeof(null===(r=n)||void 0===r?void 0:r.error))throw new Error(n.error);throw new Error(t)}t(null)},onmessage(e){let t,s,i=!0;try{t=(null!=a?a:p)(e.data,e.event)}catch(e){i=!1,s=e}if(n.length>0){const[e,r]=n.shift();i?e(t):r(s)}else r.push(i?{ok:!0,data:t}:{ok:!1,reason:s})},onclose(){i=!0,c()},onerror(e){throw e}}).catch((e=>{s(e),function(e){n.forEach((t=>{let[r,n]=t;return n(e)})),u()}(e)}))})),{next(){return s?this.return():new Promise(((e,t)=>{if(r.length>0){const n=r.shift();n.ok?e(n.data):t(n.reason)}else i?(u(),e({value:void 0,done:!0})):n.push([e,t])}))},return:()=>(c(),u(),Promise.resolve({value:void 0,done:!0})),throw:e=>(c(),u(),Promise.reject(e)),[Symbol.asyncIterator](){return this}}}function p(e,t){if("error"===t){var r;let t;console.error("Received error event:",e);try{t=JSON.parse(e)}catch{}throw new Error("string"==typeof(null===(r=t)||void 0===r?void 0:r.error)?t.error:e)}if("[DONE]"===e)return{value:void 0,done:!0};if(e.startsWith("[ERROR]"))throw console.error("Received error message:",e),new Error(e);try{return{value:JSON.parse(e),done:!1}}catch(t){throw console.error("Failed to parse message:",e),t}}function d(e){const t=Object.getOwnPropertyNames(e);for(const r of t){const t=e[r];t&&"object"==typeof t&&d(t)}return Object.freeze(e)}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function m(e){const t=typeof e;return null!=e&&("object"==t||"function"==t)}class y{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"brick-next-";this.storage=e,this.prefix=t}setItem(e,t){this.storage.setItem(this.prefix+e,JSON.stringify(t))}getItem(e){var t;return JSON.parse(null!==(t=this.storage.getItem(this.prefix+e))&&void 0!==t?t:"null")}removeItem(e){return this.storage.removeItem(this.prefix+e)}clear(){return this.storage.clear()}}const g=new Map;function v(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const s=function(e){let t=g.get(e);return t||(t=document.createElement(e),g.set(e,t),t)}(e);return s.resolve(...r)}}},8739:(e,t,r)=>{"use strict";var n=r(2290);e.exports=new n({include:[r(8028)],implicit:[r(5137),r(1548),r(8920),r(6076)]})},8774:(e,t,r)=>{"use strict";var n=r(2290);e.exports=new n({include:[r(8739)]})},8920:(e,t,r)=>{"use strict";var n=r(3780),s=r(5417);function i(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new s("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=e.length,s=0,o=!1;if(!n)return!1;if("-"!==(t=e[s])&&"+"!==t||(t=e[++s]),"0"===t){if(s+1===n)return!0;if("b"===(t=e[++s])){for(s++;s<n;s++)if("_"!==(t=e[s])){if("0"!==t&&"1"!==t)return!1;o=!0}return o&&"_"!==t}if("x"===t){for(s++;s<n;s++)if("_"!==(t=e[s])){if(!(48<=(r=e.charCodeAt(s))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;o=!0}return o&&"_"!==t}for(;s<n;s++)if("_"!==(t=e[s])){if(!i(e.charCodeAt(s)))return!1;o=!0}return o&&"_"!==t}if("_"===t)return!1;for(;s<n;s++)if("_"!==(t=e[s])){if(":"===t)break;if(!a(e.charCodeAt(s)))return!1;o=!0}return!(!o||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(s)))},construct:function(e){var t,r,n=e,s=1,i=[];return-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(s=-1),t=(n=n.slice(1))[0]),"0"===n?0:"0"===t?"b"===n[1]?s*parseInt(n.slice(2),2):"x"===n[1]?s*parseInt(n,16):s*parseInt(n,8):-1!==n.indexOf(":")?(n.split(":").forEach((function(e){i.unshift(parseInt(e,10))})),n=0,r=1,i.forEach((function(e){n+=e*r,r*=60})),s*n):s*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!n.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},9142:(e,t,r)=>{"use strict";var n=r(5506),s=r(6384);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=r(5417),e.exports.Schema=r(2290),e.exports.FAILSAFE_SCHEMA=r(8028),e.exports.JSON_SCHEMA=r(8739),e.exports.CORE_SCHEMA=r(8774),e.exports.DEFAULT_SAFE_SCHEMA=r(9590),e.exports.DEFAULT_FULL_SCHEMA=r(2846),e.exports.load=n.load,e.exports.loadAll=n.loadAll,e.exports.safeLoad=n.safeLoad,e.exports.safeLoadAll=n.safeLoadAll,e.exports.dump=s.dump,e.exports.safeDump=s.safeDump,e.exports.YAMLException=r(1796),e.exports.MINIMAL_SCHEMA=r(8028),e.exports.SAFE_SCHEMA=r(9590),e.exports.DEFAULT_SCHEMA=r(2846),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},9280:(e,t,r)=>{"use strict";var n=r(5417);e.exports=new n("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},9348:(e,t,r)=>{"use strict";var n=r(3780);function s(e,t,r,n,s){this.name=e,this.buffer=t,this.position=r,this.line=n,this.column=s}s.prototype.getSnippet=function(e,t){var r,s,i,a,o;if(!this.buffer)return null;for(e=e||4,t=t||75,r="",s=this.position;s>0&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(s-1));)if(s-=1,this.position-s>t/2-1){r=" ... ",s+=5;break}for(i="",a=this.position;a<this.buffer.length&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>t/2-1){i=" ... ",a-=5;break}return o=this.buffer.slice(s,a),n.repeat(" ",e)+r+o+i+"\n"+n.repeat(" ",e+this.position-s+r.length)+"^"},s.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(r+=":\n"+t),r},e.exports=s},9420:function(e,t,r){(e=r.nmd(e)).exports=function(){"use strict";var t,n;function s(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var r,n=[],s=e.length;for(r=0;r<s;++r)n.push(t(e[r],r));return n}function d(e,t){for(var r in t)o(t,r)&&(e[r]=t[r]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,r,n){return Mt(e,t,r,n,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function y(e){var t=null,r=!1,s=e._d&&!isNaN(e._d.getTime());return s&&(t=m(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function g(e){var t=f(NaN);return null!=e?d(m(t),e):m(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var v=s.momentProperties=[],b=!1;function w(e,t){var r,n,s,i=v.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=m(t)),l(t._locale)||(e._locale=t._locale),i>0)for(r=0;r<i;r++)l(s=t[n=v[r]])||(e[n]=s);return e}function x(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,s.updateOffset(this),b=!1)}function S(e){return e instanceof x||null!=e&&null!=e._isAMomentObject}function P(e){!1===s.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function A(e,t){var r=!0;return d((function(){if(null!=s.deprecationHandler&&s.deprecationHandler(null,e),r){var n,i,a,c=[],l=arguments.length;for(i=0;i<l;i++){if(n="","object"==typeof arguments[i]){for(a in n+="\n["+i+"] ",arguments[0])o(arguments[0],a)&&(n+=a+": "+arguments[0][a]+", ");n=n.slice(0,-2)}else n=arguments[i];c.push(n)}P(e+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var E,T={};function k(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),T[e]||(P(t),T[e]=!0)}function _(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function C(e,t){var r,n=d({},e);for(r in t)o(t,r)&&(a(e[r])&&a(t[r])?(n[r]={},d(n[r],e[r]),d(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)o(e,r)&&!o(t,r)&&a(e[r])&&(n[r]=d({},n[r]));return n}function I(e){null!=e&&this.set(e)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)o(e,t)&&r.push(t);return r};function O(e,t,r){var n=""+Math.abs(e),s=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,M={},D={};function R(e,t,r,n){var s=n;"string"==typeof n&&(s=function(){return this[n]()}),e&&(D[e]=s),t&&(D[t[0]]=function(){return O(s.apply(this,arguments),t[1],t[2])}),r&&(D[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function B(e,t){return e.isValid()?(t=F(t,e.localeData()),M[t]=M[t]||function(e){var t,r,n,s=e.match(L);for(t=0,r=s.length;t<r;t++)D[s[t]]?s[t]=D[s[t]]:s[t]=(n=s[t]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(t){var n,i="";for(n=0;n<r;n++)i+=_(s[n])?s[n].call(t,e):s[n];return i}}(t),M[t](e)):e.localeData().invalidDate()}function F(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(N.lastIndex=0;r>=0&&N.test(e);)e=e.replace(N,n),N.lastIndex=0,r-=1;return e}var j={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function U(e){return"string"==typeof e?j[e]||j[e.toLowerCase()]:void 0}function Y(e){var t,r,n={};for(r in e)o(e,r)&&(t=U(r))&&(n[t]=e[r]);return n}var $={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var H,W=/\d/,V=/\d\d/,z=/\d{3}/,q=/\d{4}/,K=/[+-]?\d{6}/,G=/\d\d?/,J=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,Z=/\d{1,3}/,Q=/\d{1,4}/,ee=/[+-]?\d{1,6}/,te=/\d+/,re=/[+-]?\d+/,ne=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,ie=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ae=/^[1-9]\d?/,oe=/^([1-9]\d|\d)/;function ce(e,t,r){H[e]=_(t)?t:function(e,n){return e&&r?r:t}}function le(e,t){return o(H,e)?H[e](t._strict,t._locale):new RegExp(ue(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,s){return t||r||n||s}))))}function ue(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function he(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function pe(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=he(t)),r}H={};var de={};function fe(e,t){var r,n,s=t;for("string"==typeof e&&(e=[e]),u(t)&&(s=function(e,r){r[t]=pe(e)}),n=e.length,r=0;r<n;r++)de[e[r]]=s}function me(e,t){fe(e,(function(e,r,n,s){n._w=n._w||{},t(e,n._w,n,s)}))}function ye(e,t,r){null!=t&&o(de,e)&&de[e](t,r._a,r,e)}function ge(e){return e%4==0&&e%100!=0||e%400==0}var ve=0,be=1,we=2,xe=3,Se=4,Pe=5,Ae=6,Ee=7,Te=8;function ke(e){return ge(e)?366:365}R("Y",0,0,(function(){var e=this.year();return e<=9999?O(e,4):"+"+e})),R(0,["YY",2],0,(function(){return this.year()%100})),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),ce("Y",re),ce("YY",G,V),ce("YYYY",Q,q),ce("YYYYY",ee,K),ce("YYYYYY",ee,K),fe(["YYYYY","YYYYYY"],ve),fe("YYYY",(function(e,t){t[ve]=2===e.length?s.parseTwoDigitYear(e):pe(e)})),fe("YY",(function(e,t){t[ve]=s.parseTwoDigitYear(e)})),fe("Y",(function(e,t){t[ve]=parseInt(e,10)})),s.parseTwoDigitYear=function(e){return pe(e)+(pe(e)>68?1900:2e3)};var _e,Ce=Ie("FullYear",!0);function Ie(e,t){return function(r){return null!=r?(Le(this,e,r),s.updateOffset(this,t),this):Oe(this,e)}}function Oe(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Le(e,t,r){var n,s,i,a,o;if(e.isValid()&&!isNaN(r)){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}i=r,a=e.month(),o=29!==(o=e.date())||1!==a||ge(i)?o:28,s?n.setUTCFullYear(i,a,o):n.setFullYear(i,a,o)}}function Ne(e,t){if(isNaN(e)||isNaN(t))return NaN;var r,n=(t%(r=12)+r)%r;return e+=(t-n)/12,1===n?ge(e)?29:28:31-n%7%2}_e=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},R("M",["MM",2],"Mo",(function(){return this.month()+1})),R("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),R("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ce("M",G,ae),ce("MM",G,V),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),fe(["M","MM"],(function(e,t){t[be]=pe(e)-1})),fe(["MMM","MMMM"],(function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);null!=s?t[be]=s:m(r).invalidMonth=e}));var Me="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),De="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Re=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Be=ie,Fe=ie;function je(e,t,r){var n,s,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(s=_e.call(this._shortMonthsParse,a))?s:null:-1!==(s=_e.call(this._longMonthsParse,a))?s:null:"MMM"===t?-1!==(s=_e.call(this._shortMonthsParse,a))||-1!==(s=_e.call(this._longMonthsParse,a))?s:null:-1!==(s=_e.call(this._longMonthsParse,a))||-1!==(s=_e.call(this._shortMonthsParse,a))?s:null}function Ue(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=pe(t);else if(!u(t=e.localeData().monthsParse(t)))return e;var r=t,n=e.date();return n=n<29?n:Math.min(n,Ne(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Ye(e){return null!=e?(Ue(this,e),s.updateOffset(this,!0),this):Oe(this,"Month")}function $e(){function e(e,t){return t.length-e.length}var t,r,n,s,i=[],a=[],o=[];for(t=0;t<12;t++)r=f([2e3,t]),n=ue(this.monthsShort(r,"")),s=ue(this.months(r,"")),i.push(n),a.push(s),o.push(s),o.push(n);i.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function He(e,t,r,n,s,i,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,r,n,s,i,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,r,n,s,i,a),o}function We(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ve(e,t,r){var n=7+t-r;return-(7+We(e,0,n).getUTCDay()-t)%7+n-1}function ze(e,t,r,n,s){var i,a,o=1+7*(t-1)+(7+r-n)%7+Ve(e,n,s);return o<=0?a=ke(i=e-1)+o:o>ke(e)?(i=e+1,a=o-ke(e)):(i=e,a=o),{year:i,dayOfYear:a}}function qe(e,t,r){var n,s,i=Ve(e.year(),t,r),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?n=a+Ke(s=e.year()-1,t,r):a>Ke(e.year(),t,r)?(n=a-Ke(e.year(),t,r),s=e.year()+1):(s=e.year(),n=a),{week:n,year:s}}function Ke(e,t,r){var n=Ve(e,t,r),s=Ve(e+1,t,r);return(ke(e)-n+s)/7}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),ce("w",G,ae),ce("ww",G,V),ce("W",G,ae),ce("WW",G,V),me(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=pe(e)}));function Ge(e,t){return e.slice(t,7).concat(e.slice(0,t))}R("d",0,"do","day"),R("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),R("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),R("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),ce("d",G),ce("e",G),ce("E",G),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);null!=s?t.d=s:m(r).invalidWeekday=e})),me(["d","e","E"],(function(e,t,r,n){t[n]=pe(e)}));var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qe=ie,et=ie,tt=ie;function rt(e,t,r){var n,s,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(s=_e.call(this._weekdaysParse,a))?s:null:"ddd"===t?-1!==(s=_e.call(this._shortWeekdaysParse,a))?s:null:-1!==(s=_e.call(this._minWeekdaysParse,a))?s:null:"dddd"===t?-1!==(s=_e.call(this._weekdaysParse,a))||-1!==(s=_e.call(this._shortWeekdaysParse,a))||-1!==(s=_e.call(this._minWeekdaysParse,a))?s:null:"ddd"===t?-1!==(s=_e.call(this._shortWeekdaysParse,a))||-1!==(s=_e.call(this._weekdaysParse,a))||-1!==(s=_e.call(this._minWeekdaysParse,a))?s:null:-1!==(s=_e.call(this._minWeekdaysParse,a))||-1!==(s=_e.call(this._weekdaysParse,a))||-1!==(s=_e.call(this._shortWeekdaysParse,a))?s:null}function nt(){function e(e,t){return t.length-e.length}var t,r,n,s,i,a=[],o=[],c=[],l=[];for(t=0;t<7;t++)r=f([2e3,1]).day(t),n=ue(this.weekdaysMin(r,"")),s=ue(this.weekdaysShort(r,"")),i=ue(this.weekdays(r,"")),a.push(n),o.push(s),c.push(i),l.push(n),l.push(s),l.push(i);a.sort(e),o.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function st(){return this.hours()%12||12}function it(e,t){R(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function at(e,t){return t._meridiemParse}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,st),R("k",["kk",2],0,(function(){return this.hours()||24})),R("hmm",0,0,(function(){return""+st.apply(this)+O(this.minutes(),2)})),R("hmmss",0,0,(function(){return""+st.apply(this)+O(this.minutes(),2)+O(this.seconds(),2)})),R("Hmm",0,0,(function(){return""+this.hours()+O(this.minutes(),2)})),R("Hmmss",0,0,(function(){return""+this.hours()+O(this.minutes(),2)+O(this.seconds(),2)})),it("a",!0),it("A",!1),ce("a",at),ce("A",at),ce("H",G,oe),ce("h",G,ae),ce("k",G,ae),ce("HH",G,V),ce("hh",G,V),ce("kk",G,V),ce("hmm",J),ce("hmmss",X),ce("Hmm",J),ce("Hmmss",X),fe(["H","HH"],xe),fe(["k","kk"],(function(e,t,r){var n=pe(e);t[xe]=24===n?0:n})),fe(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),fe(["h","hh"],(function(e,t,r){t[xe]=pe(e),m(r).bigHour=!0})),fe("hmm",(function(e,t,r){var n=e.length-2;t[xe]=pe(e.substr(0,n)),t[Se]=pe(e.substr(n)),m(r).bigHour=!0})),fe("hmmss",(function(e,t,r){var n=e.length-4,s=e.length-2;t[xe]=pe(e.substr(0,n)),t[Se]=pe(e.substr(n,2)),t[Pe]=pe(e.substr(s)),m(r).bigHour=!0})),fe("Hmm",(function(e,t,r){var n=e.length-2;t[xe]=pe(e.substr(0,n)),t[Se]=pe(e.substr(n))})),fe("Hmmss",(function(e,t,r){var n=e.length-4,s=e.length-2;t[xe]=pe(e.substr(0,n)),t[Se]=pe(e.substr(n,2)),t[Pe]=pe(e.substr(s))}));var ot=Ie("Hours",!0);var ct,lt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Me,monthsShort:De,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Ze,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},ut={},ht={};function pt(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function dt(e){return e?e.toLowerCase().replace("_","-"):e}function ft(t){var n=null;if(void 0===ut[t]&&e&&e.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(t))try{n=ct._abbr,r(9844)("./"+t),mt(n)}catch(e){ut[t]=null}return ut[t]}function mt(e,t){var r;return e&&((r=l(t)?gt(e):yt(e,t))?ct=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ct._abbr}function yt(e,t){if(null!==t){var r,n=lt;if(t.abbr=e,null!=ut[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ut[e]._config;else if(null!=t.parentLocale)if(null!=ut[t.parentLocale])n=ut[t.parentLocale]._config;else{if(null==(r=ft(t.parentLocale)))return ht[t.parentLocale]||(ht[t.parentLocale]=[]),ht[t.parentLocale].push({name:e,config:t}),null;n=r._config}return ut[e]=new I(C(n,t)),ht[e]&&ht[e].forEach((function(e){yt(e.name,e.config)})),mt(e),ut[e]}return delete ut[e],null}function gt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ct;if(!i(e)){if(t=ft(e))return t;e=[e]}return function(e){for(var t,r,n,s,i=0;i<e.length;){for(t=(s=dt(e[i]).split("-")).length,r=(r=dt(e[i+1]))?r.split("-"):null;t>0;){if(n=ft(s.slice(0,t).join("-")))return n;if(r&&r.length>=t&&pt(s,r)>=t-1)break;t--}i++}return ct}(e)}function vt(e){var t,r=e._a;return r&&-2===m(e).overflow&&(t=r[be]<0||r[be]>11?be:r[we]<1||r[we]>Ne(r[ve],r[be])?we:r[xe]<0||r[xe]>24||24===r[xe]&&(0!==r[Se]||0!==r[Pe]||0!==r[Ae])?xe:r[Se]<0||r[Se]>59?Se:r[Pe]<0||r[Pe]>59?Pe:r[Ae]<0||r[Ae]>999?Ae:-1,m(e)._overflowDayOfYear&&(t<ve||t>we)&&(t=we),m(e)._overflowWeeks&&-1===t&&(t=Ee),m(e)._overflowWeekday&&-1===t&&(t=Te),m(e).overflow=t),e}var bt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,xt=/Z|[+-]\d\d(?::?\d\d)?/,St=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],At=/^\/?Date\((-?\d+)/i,Et=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Tt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kt(e){var t,r,n,s,i,a,o=e._i,c=bt.exec(o)||wt.exec(o),l=St.length,u=Pt.length;if(c){for(m(e).iso=!0,t=0,r=l;t<r;t++)if(St[t][1].exec(c[1])){s=St[t][0],n=!1!==St[t][2];break}if(null==s)return void(e._isValid=!1);if(c[3]){for(t=0,r=u;t<r;t++)if(Pt[t][1].exec(c[3])){i=(c[2]||" ")+Pt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!n&&null!=i)return void(e._isValid=!1);if(c[4]){if(!xt.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=s+(i||"")+(a||""),Lt(e)}else e._isValid=!1}function _t(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ct(e){var t,r,n,s,i,a,o,c,l=Et.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){if(r=l[4],n=l[3],s=l[2],i=l[5],a=l[6],o=l[7],c=[_t(r),De.indexOf(n),parseInt(s,10),parseInt(i,10),parseInt(a,10)],o&&c.push(parseInt(o,10)),t=c,!function(e,t,r){return!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(r).weekdayMismatch=!0,r._isValid=!1,!1)}(l[1],t,e))return;e._a=t,e._tzm=function(e,t,r){if(e)return Tt[e];if(t)return 0;var n=parseInt(r,10),s=n%100;return(n-s)/100*60+s}(l[8],l[9],l[10]),e._d=We.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function It(e,t,r){return null!=e?e:null!=t?t:r}function Ot(e){var t,r,n,i,a,o=[];if(!e._d){for(n=function(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[we]&&null==e._a[be]&&function(e){var t,r,n,s,i,a,o,c,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,a=4,r=It(t.GG,e._a[ve],qe(Dt(),1,4).year),n=It(t.W,1),((s=It(t.E,1))<1||s>7)&&(c=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,l=qe(Dt(),i,a),r=It(t.gg,e._a[ve],l.year),n=It(t.w,l.week),null!=t.d?((s=t.d)<0||s>6)&&(c=!0):null!=t.e?(s=t.e+i,(t.e<0||t.e>6)&&(c=!0)):s=i),n<1||n>Ke(r,i,a)?m(e)._overflowWeeks=!0:null!=c?m(e)._overflowWeekday=!0:(o=ze(r,n,s,i,a),e._a[ve]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=It(e._a[ve],n[ve]),(e._dayOfYear>ke(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),r=We(a,0,e._dayOfYear),e._a[be]=r.getUTCMonth(),e._a[we]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=n[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[xe]&&0===e._a[Se]&&0===e._a[Pe]&&0===e._a[Ae]&&(e._nextDay=!0,e._a[xe]=0),e._d=(e._useUTC?We:He).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[xe]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(m(e).weekdayMismatch=!0)}}function Lt(e){if(e._f!==s.ISO_8601)if(e._f!==s.RFC_2822){e._a=[],m(e).empty=!0;var t,r,n,i,a,o,c,l=""+e._i,u=l.length,h=0;for(c=(n=F(e._f,e._locale).match(L)||[]).length,t=0;t<c;t++)i=n[t],(r=(l.match(le(i,e))||[])[0])&&((a=l.substr(0,l.indexOf(r))).length>0&&m(e).unusedInput.push(a),l=l.slice(l.indexOf(r)+r.length),h+=r.length),D[i]?(r?m(e).empty=!1:m(e).unusedTokens.push(i),ye(i,r,e)):e._strict&&!r&&m(e).unusedTokens.push(i);m(e).charsLeftOver=u-h,l.length>0&&m(e).unusedInput.push(l),e._a[xe]<=12&&!0===m(e).bigHour&&e._a[xe]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[xe]=function(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[xe],e._meridiem),null!==(o=m(e).era)&&(e._a[ve]=e._locale.erasConvertYear(o,e._a[ve])),Ot(e),vt(e)}else Ct(e);else kt(e)}function Nt(e){var t=e._i,r=e._f;return e._locale=e._locale||gt(e._l),null===t||void 0===r&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new x(vt(t)):(h(t)?e._d=t:i(r)?function(e){var t,r,n,s,i,a,o=!1,c=e._f.length;if(0===c)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(s=0;s<c;s++)i=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[s],Lt(t),y(t)&&(a=!0),i+=m(t).charsLeftOver,i+=10*m(t).unusedTokens.length,m(t).score=i,o?i<n&&(n=i,r=t):(null==n||i<n||a)&&(n=i,r=t,a&&(o=!0));d(e,r||t)}(e):r?Lt(e):function(e){var t=e._i;l(t)?e._d=new Date(s.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=At.exec(e._i);null===t?(kt(e),!1===e._isValid&&(delete e._isValid,Ct(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:s.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=p(t.slice(0),(function(e){return parseInt(e,10)})),Ot(e)):a(t)?function(e){if(!e._d){var t=Y(e._i),r=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Ot(e)}}(e):u(t)?e._d=new Date(t):s.createFromInputFallback(e)}(e),y(e)||(e._d=null),e))}function Mt(e,t,r,n,s){var o,l={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==r&&!1!==r||(n=r,r=void 0),(a(e)&&c(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=s,l._l=r,l._i=e,l._f=t,l._strict=n,(o=new x(vt(Nt(l))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Dt(e,t,r,n){return Mt(e,t,r,n,!1)}s.createFromInputFallback=A("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),s.ISO_8601=function(){},s.RFC_2822=function(){};var Rt=A("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),Bt=A("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}));function Ft(e,t){var r,n;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Dt();for(r=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r}var jt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ut(e){var t=Y(e),r=t.year||0,n=t.quarter||0,s=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,c=t.hour||0,l=t.minute||0,u=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,r,n=!1,s=jt.length;for(t in e)if(o(e,t)&&(-1===_e.call(jt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(r=0;r<s;++r)if(e[jt[r]]){if(n)return!1;parseFloat(e[jt[r]])!==pe(e[jt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+h+1e3*u+6e4*l+1e3*c*60*60,this._days=+a+7*i,this._months=+s+3*n+12*r,this._data={},this._locale=gt(),this._bubble()}function Yt(e){return e instanceof Ut}function $t(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ht(e,t){R(e,0,0,(function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+O(~~(e/60),2)+t+O(~~e%60,2)}))}Ht("Z",":"),Ht("ZZ",""),ce("Z",se),ce("ZZ",se),fe(["Z","ZZ"],(function(e,t,r){r._useUTC=!0,r._tzm=Vt(se,e)}));var Wt=/([\+\-]|\d\d)/gi;function Vt(e,t){var r,n,s=(t||"").match(e);return null===s?null:0===(n=60*(r=((s[s.length-1]||[])+"").match(Wt)||["-",0,0])[1]+pe(r[2]))?0:"+"===r[0]?n:-n}function zt(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(S(e)||h(e)?e.valueOf():Dt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),s.updateOffset(r,!1),r):Dt(e).local()}function qt(e){return-Math.round(e._d.getTimezoneOffset())}function Kt(){return!!this.isValid()&&this._isUTC&&0===this._offset}s.updateOffset=function(){};var Gt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Jt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Xt(e,t){var r,n,s,i,a,c,l=e,h=null;return Yt(e)?l={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(l={},t?l[t]=+e:l.milliseconds=+e):(h=Gt.exec(e))?(r="-"===h[1]?-1:1,l={y:0,d:pe(h[we])*r,h:pe(h[xe])*r,m:pe(h[Se])*r,s:pe(h[Pe])*r,ms:pe($t(1e3*h[Ae]))*r}):(h=Jt.exec(e))?(r="-"===h[1]?-1:1,l={y:Zt(h[2],r),M:Zt(h[3],r),w:Zt(h[4],r),d:Zt(h[5],r),h:Zt(h[6],r),m:Zt(h[7],r),s:Zt(h[8],r)}):null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(i=Dt(l.from),a=Dt(l.to),s=i.isValid()&&a.isValid()?(a=zt(a,i),i.isBefore(a)?c=Qt(i,a):((c=Qt(a,i)).milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0},(l={}).ms=s.milliseconds,l.M=s.months),n=new Ut(l),Yt(e)&&o(e,"_locale")&&(n._locale=e._locale),Yt(e)&&o(e,"_isValid")&&(n._isValid=e._isValid),n}function Zt(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Qt(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function er(e,t){return function(r,n){var s;return null===n||isNaN(+n)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=n,n=s),tr(this,Xt(r,n),e),this}}function tr(e,t,r,n){var i=t._milliseconds,a=$t(t._days),o=$t(t._months);e.isValid()&&(n=null==n||n,o&&Ue(e,Oe(e,"Month")+o*r),a&&Le(e,"Date",Oe(e,"Date")+a*r),i&&e._d.setTime(e._d.valueOf()+i*r),n&&s.updateOffset(e,a||o))}Xt.fn=Ut.prototype,Xt.invalid=function(){return Xt(NaN)};var rr=er(1,"add"),nr=er(-1,"subtract");function sr(e){return"string"==typeof e||e instanceof String}function ir(e){return S(e)||h(e)||sr(e)||u(e)||function(e){var t=i(e),r=!1;return t&&(r=0===e.filter((function(t){return!u(t)&&sr(e)})).length),t&&r}(e)||function(e){var t,r,n=a(e)&&!c(e),s=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=i.length;for(t=0;t<l;t+=1)r=i[t],s=s||o(e,r);return n&&s}(e)||null==e}function ar(e,t){if(e.date()<t.date())return-ar(t,e);var r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return-(r+(t-n<0?(t-n)/(n-e.clone().add(r-1,"months")):(t-n)/(e.clone().add(r+1,"months")-n)))||0}function or(e){var t;return void 0===e?this._locale._abbr:(null!=(t=gt(e))&&(this._locale=t),this)}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var cr=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function lr(){return this._locale}var ur=1e3,hr=6e4,pr=36e5,dr=126227808e5;function fr(e,t){return(e%t+t)%t}function mr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-dr:new Date(e,t,r).valueOf()}function yr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-dr:Date.UTC(e,t,r)}function gr(e,t){return t.erasAbbrRegex(e)}function vr(){var e,t,r,n,s,i=[],a=[],o=[],c=[],l=this.eras();for(e=0,t=l.length;e<t;++e)r=ue(l[e].name),n=ue(l[e].abbr),s=ue(l[e].narrow),a.push(r),i.push(n),o.push(s),c.push(r),c.push(n),c.push(s);this._erasRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function br(e,t){R(0,[e,e.length],0,t)}function wr(e,t,r,n,s){var i;return null==e?qe(this,n,s).year:(t>(i=Ke(e,n,s))&&(t=i),xr.call(this,e,t,r,n,s))}function xr(e,t,r,n,s){var i=ze(e,t,r,n,s),a=We(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),ce("N",gr),ce("NN",gr),ce("NNN",gr),ce("NNNN",(function(e,t){return t.erasNameRegex(e)})),ce("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),fe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?m(r).era=s:m(r).invalidEra=e})),ce("y",te),ce("yy",te),ce("yyy",te),ce("yyyy",te),ce("yo",(function(e,t){return t._eraYearOrdinalRegex||te})),fe(["y","yy","yyy","yyyy"],ve),fe(["yo"],(function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[ve]=r._locale.eraYearOrdinalParse(e,s):t[ve]=parseInt(e,10)})),R(0,["gg",2],0,(function(){return this.weekYear()%100})),R(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),br("gggg","weekYear"),br("ggggg","weekYear"),br("GGGG","isoWeekYear"),br("GGGGG","isoWeekYear"),ce("G",re),ce("g",re),ce("GG",G,V),ce("gg",G,V),ce("GGGG",Q,q),ce("gggg",Q,q),ce("GGGGG",ee,K),ce("ggggg",ee,K),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=pe(e)})),me(["gg","GG"],(function(e,t,r,n){t[n]=s.parseTwoDigitYear(e)})),R("Q",0,"Qo","quarter"),ce("Q",W),fe("Q",(function(e,t){t[be]=3*(pe(e)-1)})),R("D",["DD",2],"Do","date"),ce("D",G,ae),ce("DD",G,V),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),fe(["D","DD"],we),fe("Do",(function(e,t){t[we]=pe(e.match(G)[0])}));var Sr=Ie("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),ce("DDD",Z),ce("DDDD",z),fe(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=pe(e)})),R("m",["mm",2],0,"minute"),ce("m",G,oe),ce("mm",G,V),fe(["m","mm"],Se);var Pr=Ie("Minutes",!1);R("s",["ss",2],0,"second"),ce("s",G,oe),ce("ss",G,V),fe(["s","ss"],Pe);var Ar,Er,Tr=Ie("Seconds",!1);for(R("S",0,0,(function(){return~~(this.millisecond()/100)})),R(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),R(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),R(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),R(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),R(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),R(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ce("S",Z,W),ce("SS",Z,V),ce("SSS",Z,z),Ar="SSSS";Ar.length<=9;Ar+="S")ce(Ar,te);function kr(e,t){t[Ae]=pe(1e3*("0."+e))}for(Ar="S";Ar.length<=9;Ar+="S")fe(Ar,kr);Er=Ie("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var _r=x.prototype;function Cr(e){return e}_r.add=rr,_r.calendar=function(e,t){1===arguments.length&&(arguments[0]?ir(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,r=a(e)&&!c(e),n=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<s.length;t+=1)n=n||o(e,s[t]);return r&&n}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Dt(),n=zt(r,this).startOf("day"),i=s.calendarFormat(this,n)||"sameElse",l=t&&(_(t[i])?t[i].call(this,r):t[i]);return this.format(l||this.localeData().calendar(i,this,Dt(r)))},_r.clone=function(){return new x(this)},_r.diff=function(e,t,r){var n,s,i;if(!this.isValid())return NaN;if(!(n=zt(e,this)).isValid())return NaN;switch(s=6e4*(n.utcOffset()-this.utcOffset()),t=U(t)){case"year":i=ar(this,n)/12;break;case"month":i=ar(this,n);break;case"quarter":i=ar(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-s)/864e5;break;case"week":i=(this-n-s)/6048e5;break;default:i=this-n}return r?i:he(i)},_r.endOf=function(e){var t,r;if(void 0===(e=U(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?yr:mr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=pr-fr(t+(this._isUTC?0:this.utcOffset()*hr),pr)-1;break;case"minute":t=this._d.valueOf(),t+=hr-fr(t,hr)-1;break;case"second":t=this._d.valueOf(),t+=ur-fr(t,ur)-1}return this._d.setTime(t),s.updateOffset(this,!0),this},_r.format=function(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=B(this,e);return this.localeData().postformat(t)},_r.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Dt(e).isValid())?Xt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_r.fromNow=function(e){return this.from(Dt(),e)},_r.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Dt(e).isValid())?Xt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_r.toNow=function(e){return this.to(Dt(),e)},_r.get=function(e){return _(this[e=U(e)])?this[e]():this},_r.invalidAt=function(){return m(this).overflow},_r.isAfter=function(e,t){var r=S(e)?e:Dt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=U(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())},_r.isBefore=function(e,t){var r=S(e)?e:Dt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=U(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())},_r.isBetween=function(e,t,r,n){var s=S(e)?e:Dt(e),i=S(t)?t:Dt(t);return!!(this.isValid()&&s.isValid()&&i.isValid())&&("("===(n=n||"()")[0]?this.isAfter(s,r):!this.isBefore(s,r))&&(")"===n[1]?this.isBefore(i,r):!this.isAfter(i,r))},_r.isSame=function(e,t){var r,n=S(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=U(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))},_r.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},_r.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},_r.isValid=function(){return y(this)},_r.lang=cr,_r.locale=or,_r.localeData=lr,_r.max=Bt,_r.min=Rt,_r.parsingFlags=function(){return d({},m(this))},_r.set=function(e,t){if("object"==typeof e){var r,n=function(e){var t,r=[];for(t in e)o(e,t)&&r.push({unit:t,priority:$[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}(e=Y(e)),s=n.length;for(r=0;r<s;r++)this[n[r].unit](e[n[r].unit])}else if(_(this[e=U(e)]))return this[e](t);return this},_r.startOf=function(e){var t,r;if(void 0===(e=U(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?yr:mr,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fr(t+(this._isUTC?0:this.utcOffset()*hr),pr);break;case"minute":t=this._d.valueOf(),t-=fr(t,hr);break;case"second":t=this._d.valueOf(),t-=fr(t,ur)}return this._d.setTime(t),s.updateOffset(this,!0),this},_r.subtract=nr,_r.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},_r.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},_r.toDate=function(){return new Date(this.valueOf())},_r.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?B(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):_(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(r,"Z")):B(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},_r.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n="moment",s="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=s+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(_r[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),_r.toJSON=function(){return this.isValid()?this.toISOString():null},_r.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},_r.unix=function(){return Math.floor(this.valueOf()/1e3)},_r.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},_r.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},_r.eraName=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].name;if(n[e].until<=r&&r<=n[e].since)return n[e].name}return""},_r.eraNarrow=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].narrow;if(n[e].until<=r&&r<=n[e].since)return n[e].narrow}return""},_r.eraAbbr=function(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].abbr;if(n[e].until<=r&&r<=n[e].since)return n[e].abbr}return""},_r.eraYear=function(){var e,t,r,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(r=i[e].since<=i[e].until?1:-1,n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until||i[e].until<=n&&n<=i[e].since)return(this.year()-s(i[e].since).year())*r+i[e].offset;return this.year()},_r.year=Ce,_r.isLeapYear=function(){return ge(this.year())},_r.weekYear=function(e){return wr.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},_r.isoWeekYear=function(e){return wr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},_r.quarter=_r.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},_r.month=Ye,_r.daysInMonth=function(){return Ne(this.year(),this.month())},_r.week=_r.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},_r.isoWeek=_r.isoWeeks=function(e){var t=qe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},_r.weeksInYear=function(){var e=this.localeData()._week;return Ke(this.year(),e.dow,e.doy)},_r.weeksInWeekYear=function(){var e=this.localeData()._week;return Ke(this.weekYear(),e.dow,e.doy)},_r.isoWeeksInYear=function(){return Ke(this.year(),1,4)},_r.isoWeeksInISOWeekYear=function(){return Ke(this.isoWeekYear(),1,4)},_r.date=Sr,_r.day=_r.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=Oe(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},_r.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},_r.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},_r.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},_r.hour=_r.hours=ot,_r.minute=_r.minutes=Pr,_r.second=_r.seconds=Tr,_r.millisecond=_r.milliseconds=Er,_r.utcOffset=function(e,t,r){var n,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Vt(se,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(n=qt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),i!==e&&(!t||this._changeInProgress?tr(this,Xt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:qt(this)},_r.utc=function(e){return this.utcOffset(0,e)},_r.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qt(this),"m")),this},_r.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Vt(ne,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},_r.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},_r.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},_r.isLocal=function(){return!!this.isValid()&&!this._isUTC},_r.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},_r.isUtc=Kt,_r.isUTC=Kt,_r.zoneAbbr=function(){return this._isUTC?"UTC":""},_r.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_r.dates=A("dates accessor is deprecated. Use date instead.",Sr),_r.months=A("months accessor is deprecated. Use month instead",Ye),_r.years=A("years accessor is deprecated. Use year instead",Ce),_r.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),_r.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Nt(t))._a?(e=t._isUTC?f(t._a):Dt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,r){var n,s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(n=0;n<s;n++)(r&&e[n]!==t[n]||!r&&pe(e[n])!==pe(t[n]))&&a++;return a+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Ir=I.prototype;function Or(e,t,r,n){var s=gt(),i=f().set(n,t);return s[r](i,e)}function Lr(e,t,r){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return Or(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Or(e,n,r,"month");return s}function Nr(e,t,r,n){"boolean"==typeof e?(u(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,u(t)&&(r=t,t=void 0),t=t||"");var s,i=gt(),a=e?i._week.dow:0,o=[];if(null!=r)return Or(t,(r+a)%7,n,"day");for(s=0;s<7;s++)o[s]=Or(t,(s+a)%7,n,"day");return o}Ir.calendar=function(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return _(n)?n.call(t,r):n},Ir.longDateFormat=function(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(L).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Ir.invalidDate=function(){return this._invalidDate},Ir.ordinal=function(e){return this._ordinal.replace("%d",e)},Ir.preparse=Cr,Ir.postformat=Cr,Ir.relativeTime=function(e,t,r,n){var s=this._relativeTime[r];return _(s)?s(e,t,r,n):s.replace(/%d/i,e)},Ir.pastFuture=function(e,t){var r=this._relativeTime[e>0?"future":"past"];return _(r)?r(t):r.replace(/%s/i,t)},Ir.set=function(e){var t,r;for(r in e)o(e,r)&&(_(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Ir.eras=function(e,t){var r,n,i,a=this._eras||gt("en")._eras;for(r=0,n=a.length;r<n;++r)switch("string"==typeof a[r].since&&(i=s(a[r].since).startOf("day"),a[r].since=i.valueOf()),typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":i=s(a[r].until).startOf("day").valueOf(),a[r].until=i.valueOf()}return a},Ir.erasParse=function(e,t,r){var n,s,i,a,o,c=this.eras();for(e=e.toUpperCase(),n=0,s=c.length;n<s;++n)if(i=c[n].name.toUpperCase(),a=c[n].abbr.toUpperCase(),o=c[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return c[n];break;case"NNNN":if(i===e)return c[n];break;case"NNNNN":if(o===e)return c[n]}else if([i,a,o].indexOf(e)>=0)return c[n]},Ir.erasConvertYear=function(e,t){var r=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*r},Ir.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||vr.call(this),e?this._erasAbbrRegex:this._erasRegex},Ir.erasNameRegex=function(e){return o(this,"_erasNameRegex")||vr.call(this),e?this._erasNameRegex:this._erasRegex},Ir.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||vr.call(this),e?this._erasNarrowRegex:this._erasRegex},Ir.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Re).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Ir.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Re.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Ir.monthsParse=function(e,t,r){var n,s,i;if(this._monthsParseExact)return je.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}},Ir.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||$e.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Ir.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||$e.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Be),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Ir.week=function(e){return qe(e,this._week.dow,this._week.doy).week},Ir.firstDayOfYear=function(){return this._week.doy},Ir.firstDayOfWeek=function(){return this._week.dow},Ir.weekdays=function(e,t){var r=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ge(r,this._week.dow):e?r[e.day()]:r},Ir.weekdaysMin=function(e){return!0===e?Ge(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Ir.weekdaysShort=function(e){return!0===e?Ge(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Ir.weekdaysParse=function(e,t,r){var n,s,i;if(this._weekdaysParseExact)return rt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}},Ir.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Qe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Ir.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Ir.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Ir.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Ir.meridiem=function(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"},mt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===pe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),s.lang=A("moment.lang is deprecated. Use moment.locale instead.",mt),s.langData=A("moment.langData is deprecated. Use moment.localeData instead.",gt);var Mr=Math.abs;function Dr(e,t,r,n){var s=Xt(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function Rr(e){return e<0?Math.floor(e):Math.ceil(e)}function Br(e){return 4800*e/146097}function Fr(e){return 146097*e/4800}function jr(e){return function(){return this.as(e)}}var Ur=jr("ms"),Yr=jr("s"),$r=jr("m"),Hr=jr("h"),Wr=jr("d"),Vr=jr("w"),zr=jr("M"),qr=jr("Q"),Kr=jr("y"),Gr=Ur;function Jr(e){return function(){return this.isValid()?this._data[e]:NaN}}var Xr=Jr("milliseconds"),Zr=Jr("seconds"),Qr=Jr("minutes"),en=Jr("hours"),tn=Jr("days"),rn=Jr("months"),nn=Jr("years");var sn=Math.round,an={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function on(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}var cn=Math.abs;function ln(e){return(e>0)-(e<0)||+e}function un(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,s,i,a,o,c=cn(this._milliseconds)/1e3,l=cn(this._days),u=cn(this._months),h=this.asSeconds();return h?(e=he(c/60),t=he(e/60),c%=60,e%=60,r=he(u/12),u%=12,n=c?c.toFixed(3).replace(/\.?0+$/,""):"",s=h<0?"-":"",i=ln(this._months)!==ln(h)?"-":"",a=ln(this._days)!==ln(h)?"-":"",o=ln(this._milliseconds)!==ln(h)?"-":"",s+"P"+(r?i+r+"Y":"")+(u?i+u+"M":"")+(l?a+l+"D":"")+(t||e||c?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(c?o+n+"S":"")):"P0D"}var hn=Ut.prototype;return hn.isValid=function(){return this._isValid},hn.abs=function(){var e=this._data;return this._milliseconds=Mr(this._milliseconds),this._days=Mr(this._days),this._months=Mr(this._months),e.milliseconds=Mr(e.milliseconds),e.seconds=Mr(e.seconds),e.minutes=Mr(e.minutes),e.hours=Mr(e.hours),e.months=Mr(e.months),e.years=Mr(e.years),this},hn.add=function(e,t){return Dr(this,e,t,1)},hn.subtract=function(e,t){return Dr(this,e,t,-1)},hn.as=function(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=U(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Br(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Fr(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},hn.asMilliseconds=Ur,hn.asSeconds=Yr,hn.asMinutes=$r,hn.asHours=Hr,hn.asDays=Wr,hn.asWeeks=Vr,hn.asMonths=zr,hn.asQuarters=qr,hn.asYears=Kr,hn.valueOf=Gr,hn._bubble=function(){var e,t,r,n,s,i=this._milliseconds,a=this._days,o=this._months,c=this._data;return i>=0&&a>=0&&o>=0||i<=0&&a<=0&&o<=0||(i+=864e5*Rr(Fr(o)+a),a=0,o=0),c.milliseconds=i%1e3,e=he(i/1e3),c.seconds=e%60,t=he(e/60),c.minutes=t%60,r=he(t/60),c.hours=r%24,a+=he(r/24),o+=s=he(Br(a)),a-=Rr(Fr(s)),n=he(o/12),o%=12,c.days=a,c.months=o,c.years=n,this},hn.clone=function(){return Xt(this)},hn.get=function(e){return e=U(e),this.isValid()?this[e+"s"]():NaN},hn.milliseconds=Xr,hn.seconds=Zr,hn.minutes=Qr,hn.hours=en,hn.days=tn,hn.weeks=function(){return he(this.days()/7)},hn.months=rn,hn.years=nn,hn.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,s=!1,i=an;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(s=e),"object"==typeof t&&(i=Object.assign({},an,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),n=function(e,t,r,n){var s=Xt(e).abs(),i=sn(s.as("s")),a=sn(s.as("m")),o=sn(s.as("h")),c=sn(s.as("d")),l=sn(s.as("M")),u=sn(s.as("w")),h=sn(s.as("y")),p=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||a<=1&&["m"]||a<r.m&&["mm",a]||o<=1&&["h"]||o<r.h&&["hh",o]||c<=1&&["d"]||c<r.d&&["dd",c];return null!=r.w&&(p=p||u<=1&&["w"]||u<r.w&&["ww",u]),(p=p||l<=1&&["M"]||l<r.M&&["MM",l]||h<=1&&["y"]||["yy",h])[2]=t,p[3]=+e>0,p[4]=n,on.apply(null,p)}(this,!s,i,r=this.localeData()),s&&(n=r.pastFuture(+this,n)),r.postformat(n)},hn.toISOString=un,hn.toString=un,hn.toJSON=un,hn.locale=or,hn.localeData=lr,hn.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",un),hn.lang=cr,R("X",0,0,"unix"),R("x",0,0,"valueOf"),ce("x",re),ce("X",/[+-]?\d+(\.\d{1,3})?/),fe("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),fe("x",(function(e,t,r){r._d=new Date(pe(e))})),s.version="2.30.1",t=Dt,s.fn=_r,s.min=function(){return Ft("isBefore",[].slice.call(arguments,0))},s.max=function(){return Ft("isAfter",[].slice.call(arguments,0))},s.now=function(){return Date.now?Date.now():+new Date},s.utc=f,s.unix=function(e){return Dt(1e3*e)},s.months=function(e,t){return Lr(e,t,"months")},s.isDate=h,s.locale=mt,s.invalid=g,s.duration=Xt,s.isMoment=S,s.weekdays=function(e,t,r){return Nr(e,t,r,"weekdays")},s.parseZone=function(){return Dt.apply(null,arguments).parseZone()},s.localeData=gt,s.isDuration=Yt,s.monthsShort=function(e,t){return Lr(e,t,"monthsShort")},s.weekdaysMin=function(e,t,r){return Nr(e,t,r,"weekdaysMin")},s.defineLocale=yt,s.updateLocale=function(e,t){if(null!=t){var r,n,s=lt;null!=ut[e]&&null!=ut[e].parentLocale?ut[e].set(C(ut[e]._config,t)):(null!=(n=ft(e))&&(s=n._config),t=C(s,t),null==n&&(t.abbr=e),(r=new I(t)).parentLocale=ut[e],ut[e]=r),mt(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?(ut[e]=ut[e].parentLocale,e===mt()&&mt(e)):null!=ut[e]&&delete ut[e]);return ut[e]},s.locales=function(){return E(ut)},s.weekdaysShort=function(e,t,r){return Nr(e,t,r,"weekdaysShort")},s.normalizeUnits=U,s.relativeTimeRounding=function(e){return void 0===e?sn:"function"==typeof e&&(sn=e,!0)},s.relativeTimeThreshold=function(e,t){return void 0!==an[e]&&(void 0===t?an[e]:(an[e]=t,"s"===e&&(an.ss=t-1),!0))},s.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},s.prototype=_r,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s}()},9515:(e,t,r)=>{"use strict";var n=r(9142);e.exports=n},9590:(e,t,r)=>{"use strict";var n=r(2290);e.exports=new n({include:[r(8774)],implicit:[r(4938),r(7042)],explicit:[r(273),r(3901),r(343),r(6562)]})},9663:(e,t,r)=>{"use strict";r.d(t,{m:()=>s});var n=r(7551);const s=async(e,t,r)=>(await n.http.get(`api/auth/v2/bootstrap/${e}`,{...r,params:t})).data},9669:(e,t,r)=>{"use strict";function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(null,arguments)}function s(e){return"/"===e.charAt(0)}function i(e,t){for(var r=t,n=r+1,s=e.length;n<s;r+=1,n+=1)e[r]=e[n];e.pop()}r.r(t),r.d(t,{createBrowserHistory:()=>T,createHashHistory:()=>L,createLocation:()=>v,createMemoryHistory:()=>M,createPath:()=>g,locationsAreEqual:()=>b,parsePath:()=>y});const a=function(e,t){void 0===t&&(t="");var r,n=e&&e.split("/")||[],a=t&&t.split("/")||[],o=e&&s(e),c=t&&s(t),l=o||c;if(e&&s(e)?a=n:n.length&&(a.pop(),a=a.concat(n)),!a.length)return"/";if(a.length){var u=a[a.length-1];r="."===u||".."===u||""===u}else r=!1;for(var h=0,p=a.length;p>=0;p--){var d=a[p];"."===d?i(a,p):".."===d?(i(a,p),h++):h&&(i(a,p),h--)}if(!l)for(;h--;h)a.unshift("..");!l||""===a[0]||a[0]&&s(a[0])||a.unshift("");var f=a.join("/");return r&&"/"!==f.substr(-1)&&(f+="/"),f};function o(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}const c=function e(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if(Array.isArray(t))return Array.isArray(r)&&t.length===r.length&&t.every((function(t,n){return e(t,r[n])}));if("object"==typeof t||"object"==typeof r){var n=o(t),s=o(r);return n!==t||s!==r?e(n,s):Object.keys(Object.assign({},t,r)).every((function(n){return e(t[n],r[n])}))}return!1};var l=!0,u="Invariant failed";function h(e,t){if(!e){if(l)throw new Error(u);var r="function"==typeof t?t():t,n=r?"".concat(u,": ").concat(r):u;throw new Error(n)}}function p(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function m(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function y(e){var t=e||"/",r="",n="",s=t.indexOf("#");-1!==s&&(n=t.substr(s),t=t.substr(0,s));var i=t.indexOf("?");return-1!==i&&(r=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===r?"":r,hash:"#"===n?"":n}}function g(e){var t=e.pathname,r=e.search,n=e.hash,s=t||"/";return r&&"?"!==r&&(s+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(s+="#"===n.charAt(0)?n:"#"+n),s}function v(e,t,r,s){var i;"string"==typeof e?(i=y(e)).state=t:(void 0===(i=n({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return r&&(i.key=r),s?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,s.pathname)):i.pathname=s.pathname:i.pathname||(i.pathname="/"),i}function b(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&c(e.state,t.state)}function w(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,r,n,s){if(null!=e){var i="function"==typeof e?e(t,r):e;"string"==typeof i?"function"==typeof n?n(i,s):s(!0):s(!1!==i)}else s(!0)},appendListener:function(e){var r=!0;function n(){r&&e.apply(void 0,arguments)}return t.push(n),function(){r=!1,t=t.filter((function(e){return e!==n}))}},notifyListeners:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];t.forEach((function(e){return e.apply(void 0,r)}))}}}var x=!("undefined"==typeof window||!window.document||!window.document.createElement);function S(e,t){t(window.confirm(e))}var P="popstate",A="hashchange";function E(){try{return window.history.state||{}}catch(e){return{}}}function T(e){void 0===e&&(e={}),x||h(!1);var t,r=window.history,s=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,o=a.forceRefresh,c=void 0!==o&&o,l=a.getUserConfirmation,u=void 0===l?S:l,d=a.keyLength,y=void 0===d?6:d,b=e.basename?m(p(e.basename)):"";function T(e){var t=e||{},r=t.key,n=t.state,s=window.location,i=s.pathname+s.search+s.hash;return b&&(i=f(i,b)),v(i,n,r)}function k(){return Math.random().toString(36).substr(2,y)}var _=w();function C(e){n(Y,e),Y.length=r.length,_.notifyListeners(Y.location,Y.action)}function I(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||N(T(e.state))}function O(){N(T(E()))}var L=!1;function N(e){L?(L=!1,C()):_.confirmTransitionTo(e,"POP",u,(function(t){t?C({action:"POP",location:e}):function(e){var t=Y.location,r=D.indexOf(t.key);-1===r&&(r=0);var n=D.indexOf(e.key);-1===n&&(n=0);var s=r-n;s&&(L=!0,B(s))}(e)}))}var M=T(E()),D=[M.key];function R(e){return b+g(e)}function B(e){r.go(e)}var F=0;function j(e){1===(F+=e)&&1===e?(window.addEventListener(P,I),i&&window.addEventListener(A,O)):0===F&&(window.removeEventListener(P,I),i&&window.removeEventListener(A,O))}var U=!1,Y={length:r.length,action:"POP",location:M,createHref:R,push:function(e,t){var n="PUSH",i=v(e,t,k(),Y.location);_.confirmTransitionTo(i,n,u,(function(e){if(e){var t=R(i),a=i.key,o=i.state;if(s)if(r.pushState({key:a,state:o},null,t),c)window.location.href=t;else{var l=D.indexOf(Y.location.key),u=D.slice(0,l+1);u.push(i.key),D=u,C({action:n,location:i})}else window.location.href=t}}))},replace:function(e,t){var n="REPLACE",i=v(e,t,k(),Y.location);_.confirmTransitionTo(i,n,u,(function(e){if(e){var t=R(i),a=i.key,o=i.state;if(s)if(r.replaceState({key:a,state:o},null,t),c)window.location.replace(t);else{var l=D.indexOf(Y.location.key);-1!==l&&(D[l]=i.key),C({action:n,location:i})}else window.location.replace(t)}}))},go:B,goBack:function(){B(-1)},goForward:function(){B(1)},block:function(e){void 0===e&&(e=!1);var t=_.setPrompt(e);return U||(j(1),U=!0),function(){return U&&(U=!1,j(-1)),t()}},listen:function(e){var t=_.appendListener(e);return j(1),function(){j(-1),t()}}};return Y}var k="hashchange",_={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+d(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:d,decodePath:p},slash:{encodePath:p,decodePath:p}};function C(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function I(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function O(e){window.location.replace(C(window.location.href)+"#"+e)}function L(e){void 0===e&&(e={}),x||h(!1);var t=window.history,r=(window.navigator.userAgent.indexOf("Firefox"),e),s=r.getUserConfirmation,i=void 0===s?S:s,a=r.hashType,o=void 0===a?"slash":a,c=e.basename?m(p(e.basename)):"",l=_[o],u=l.encodePath,d=l.decodePath;function y(){var e=d(I());return c&&(e=f(e,c)),v(e)}var b=w();function P(e){n(U,e),U.length=t.length,b.notifyListeners(U.location,U.action)}var A=!1,E=null;function T(){var e,t,r=I(),n=u(r);if(r!==n)O(n);else{var s=y(),a=U.location;if(!A&&(t=s,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(E===g(s))return;E=null,function(e){if(A)A=!1,P();else{b.confirmTransitionTo(e,"POP",i,(function(t){t?P({action:"POP",location:e}):function(e){var t=U.location,r=D.lastIndexOf(g(t));-1===r&&(r=0);var n=D.lastIndexOf(g(e));-1===n&&(n=0);var s=r-n;s&&(A=!0,R(s))}(e)}))}}(s)}}var L=I(),N=u(L);L!==N&&O(N);var M=y(),D=[g(M)];function R(e){t.go(e)}var B=0;function F(e){1===(B+=e)&&1===e?window.addEventListener(k,T):0===B&&window.removeEventListener(k,T)}var j=!1,U={length:t.length,action:"POP",location:M,createHref:function(e){var t=document.querySelector("base"),r="";return t&&t.getAttribute("href")&&(r=C(window.location.href)),r+"#"+u(c+g(e))},push:function(e,t){var r="PUSH",n=v(e,void 0,void 0,U.location);b.confirmTransitionTo(n,r,i,(function(e){if(e){var t=g(n),s=u(c+t);if(I()!==s){E=t,function(e){window.location.hash=e}(s);var i=D.lastIndexOf(g(U.location)),a=D.slice(0,i+1);a.push(t),D=a,P({action:r,location:n})}else P()}}))},replace:function(e,t){var r="REPLACE",n=v(e,void 0,void 0,U.location);b.confirmTransitionTo(n,r,i,(function(e){if(e){var t=g(n),s=u(c+t);I()!==s&&(E=t,O(s));var i=D.indexOf(g(U.location));-1!==i&&(D[i]=t),P({action:r,location:n})}}))},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(e){void 0===e&&(e=!1);var t=b.setPrompt(e);return j||(F(1),j=!0),function(){return j&&(j=!1,F(-1)),t()}},listen:function(e){var t=b.appendListener(e);return F(1),function(){F(-1),t()}}};return U}function N(e,t,r){return Math.min(Math.max(e,t),r)}function M(e){void 0===e&&(e={});var t=e,r=t.getUserConfirmation,s=t.initialEntries,i=void 0===s?["/"]:s,a=t.initialIndex,o=void 0===a?0:a,c=t.keyLength,l=void 0===c?6:c,u=w();function h(e){n(b,e),b.length=b.entries.length,u.notifyListeners(b.location,b.action)}function p(){return Math.random().toString(36).substr(2,l)}var d=N(o,0,i.length-1),f=i.map((function(e){return v(e,void 0,"string"==typeof e?p():e.key||p())})),m=g;function y(e){var t=N(b.index+e,0,b.entries.length-1),n=b.entries[t];u.confirmTransitionTo(n,"POP",r,(function(e){e?h({action:"POP",location:n,index:t}):h()}))}var b={length:f.length,action:"POP",location:f[d],index:d,entries:f,createHref:m,push:function(e,t){var n="PUSH",s=v(e,t,p(),b.location);u.confirmTransitionTo(s,n,r,(function(e){if(e){var t=b.index+1,r=b.entries.slice(0);r.length>t?r.splice(t,r.length-t,s):r.push(s),h({action:n,location:s,index:t,entries:r})}}))},replace:function(e,t){var n="REPLACE",s=v(e,t,p(),b.location);u.confirmTransitionTo(s,n,r,(function(e){e&&(b.entries[b.index]=s,h({action:n,location:s}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=b.index+e;return t>=0&&t<b.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return b}},9844:(e,t,r)=>{var n={"./en-au":4073,"./en-au.js":4073,"./en-ca":1387,"./en-ca.js":1387,"./en-gb":1386,"./en-gb.js":1386,"./en-ie":3537,"./en-ie.js":3537,"./en-il":7050,"./en-il.js":7050,"./en-in":627,"./en-in.js":627,"./en-nz":6963,"./en-nz.js":6963,"./en-sg":4865,"./en-sg.js":4865,"./zh-cn":1329,"./zh-cn.js":1329,"./zh-hk":3005,"./zh-hk.js":3005,"./zh-mo":7696,"./zh-mo.js":7696,"./zh-tw":5861,"./zh-tw.js":5861};function s(e){var t=i(e);return r(t)}function i(e){if(!r.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}s.keys=function(){return Object.keys(n)},s.resolve=i,e.exports=s,s.id=9844}}]);
|
|
3
|
+
//# sourceMappingURL=all.19b4304b.js.map
|