From 6e9c4e0cd7e63667ee63b6921be81018d9158897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BA=E5=96=9C?= <86969353+shanhexi@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:54:52 +0800 Subject: [PATCH] fix: electron border --- chat2db-client/src/main/index.js | 2 -- chat2db-client/src/main/main.js | 8 ++++++++ chat2db-client/src/main/main.js.LICENSE.txt | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 chat2db-client/src/main/main.js create mode 100644 chat2db-client/src/main/main.js.LICENSE.txt diff --git a/chat2db-client/src/main/index.js b/chat2db-client/src/main/index.js index d61c85237..a6f3c2099 100644 --- a/chat2db-client/src/main/index.js +++ b/chat2db-client/src/main/index.js @@ -25,8 +25,6 @@ function createWindow() { minWidth: 1080, minHeight: 720, show: false, - frame: false, // 无边框 - titleBarStyle: 'hidden', webPreferences: { webSecurity: false, spellcheck: false, // 禁用拼写检查器 diff --git a/chat2db-client/src/main/main.js b/chat2db-client/src/main/main.js new file mode 100644 index 000000000..fd34fda87 --- /dev/null +++ b/chat2db-client/src/main/main.js @@ -0,0 +1,8 @@ +/*! For license information please see main.js.LICENSE.txt */ +(()=>{var e={6084:(e,t,r)=>{const n=r(2037),{readVersion:s}=r(4288),o=r(7504);e.exports=function(){const e=new o("G-V8M4E5SF61","LShbzC_vRka5Sw5AWco7Tw"),t={platform:"DESKTOP",version:s(),os:n.platform()};e.setParams(t).event("first_enter")}},6381:e=>{e.exports={DEV_WEB_URL:"http://localhost:8000/",JAVA_APP_NAME:"chat2db-server-start.jar",JAVA_PATH:"jre/bin/java"}},7504:(e,t,r)=>{const{net:n}=r(2298),{v4:s}=r(2600),{machineIdSync:o}=r(1572),i=r(7377);e.exports=class{constructor(e,t,r=o(),n=s()){this.trackingID=e,this.secretKey=t,this.clientID=r,this.sessionID=n,this.customParams={},this.userProperties=null,this.baseURL="https://google-analytics.com/mp",this.collectURL="/collect"}set(e,t){return null!==t?this.customParams[e]=t:delete this.customParams[e],this}setParams(e){return"object"==typeof e&&Object.keys(e).length>0?Object.assign(this.customParams,e):this.customParams={},this}setUserProperties(e){return"object"==typeof e&&Object.keys(e).length>0?this.userProperties=e:this.userProperties=null,this}event(e){const t={client_id:this.clientID,events:[{name:e,params:{session_id:this.sessionID,...this.customParams}}]};this.userProperties&&Object.assign(t,{user_properties:this.userProperties});const r=`${this.baseURL}${this.collectURL}?measurement_id=${this.trackingID}&api_secret=${this.secretKey}`,s=n.request({method:"POST",url:r});s.on("response",(e=>{let t="";e.on("data",(e=>{t+=e})),e.on("end",(()=>{e.statusCode>=200&&e.statusCode<300?i.info("success",t):i.error("response error",e.statusCode)}))})),s.on("error",(e=>{i.error("Error posting data:",e)})),s.write(JSON.stringify(t)),s.end()}}},6010:(e,t,r)=>{const{app:n,BrowserWindow:s,shell:o,net:i,ipcMain:a,globalShortcut:c}=r(2298),l=r(1017),u=r(5316),d=r(6084),f=r(4234),{loadMainResource:h,isMac:p}=r(4288);let m=null,y=null;function g(){const{width:e,height:t,x:r,y:n}=f.get("windowBounds",{width:1440,height:800}),i={x:r,y:n,height:t,width:e,minWidth:1080,minHeight:720,show:!1,webPreferences:{webSecurity:!1,spellcheck:!1,nodeIntegration:!0,contextIsolation:!0,preload:l.join(__dirname,"preload.js")}};m=new s(i),m.show(),h(m),m.webContents.setWindowOpenHandler((({url:e})=>(o.openExternal(e),{action:"deny"}))),m.on("resize",(()=>{f.set("windowBounds",m.getBounds())})),m.on("move",(()=>{f.set("windowBounds",m.getBounds())})),c.register("CommandOrControl+Shift+I",(()=>{m.webContents.openDevTools()}))}n.commandLine.appendSwitch("--disable-gpu-sandbox"),n.on("ready",(()=>{g(),u(m),d()})),n.on("activate",(()=>{m?(m.isMinimized()&&m.restore(),m.isVisible()?m.focus():m.show()):g()})),n.on("window-all-closed",(e=>{m=null,p||n.quit()})),n.on("before-quit",(()=>{if(y)try{i.request({headers:{"Content-Type":"application/json"},method:"POST",url:`${y}/api/system/stop?forceQuit=false`}).end()}catch(e){}})),a.handle("get-product-name",(()=>{const e=n.getPath("exe"),{name:t}=l.parse(e);return t})),a.on("quit-app",(()=>{n.relaunch(),n.quit()})),a.on("set-maximize",(()=>{m.isMaximized()?m.unmaximize():m.maximize()})),a.on("register-app-menu",((e,t)=>{u(m,t)})),a.on("set-base-url",((e,t)=>{y=t})),a.on("set-force-quit-code",((e,t)=>{forceQuitCode=t})),a.on("close-window",(()=>{m.close()})),a.on("minimize-window",(()=>{m.minimize()})),a.on("is-maximized",(()=>m.isMaximized()))},5316:(e,t,r)=>{const{shell:n,app:s,dialog:o,BrowserWindow:i,Menu:a}=r(2298),c=r(2037),l=r(1017),{isMac:u}=r(4288);e.exports=(e,t)=>{if(!u)return void a.setApplicationMenu(null);const r=[{label:"Chat2DB",submenu:[{label:"关于Chat2DB",click(){o.showMessageBox({title:"关于Chat2DB",message:`关于Chat2DB v${t?.version||s.getVersion()}`,detail:"一个集成AI能力的智能数据库客户端和智能BI报表工具。",icon:"./logo/icon.png"})}},{type:"separator"},{label:"重新启动",click(){s.relaunch(),s.quit()}},{label:"退出",accelerator:"darwin"===process.platform?"Cmd+Q":"Alt+F4",click(){s.quit()}}]},{label:"编辑",submenu:[{label:"撤销",role:"undo"},{label:"重做",role:"redo"},{type:"separator"},{label:"剪切",role:"cut"},{label:"复制",role:"copy"},{label:"粘贴",role:"paste"},{label:"全选",role:"selectAll"}]},{label:"视图",submenu:[{type:"separator"},{label:"放大",accelerator:"CmdOrCtrl+=",role:"zoomIn"},{label:"缩小",accelerator:"CmdOrCtrl+-",role:"zoomOut"},{label:"重置",accelerator:"CmdOrCtrl+0",role:"resetZoom"},{type:"separator"},{label:"全屏",role:"togglefullscreen"}]},{label:"窗口",role:"window",submenu:[{label:"最小化",role:"minimize",accelerator:"Command+W"},{label:"关闭",role:"close"}]},{label:"帮助",submenu:[{label:"打开日志",accelerator:"darwin"===process.platform?"Cmd+Shift+T":"Ctrl+Shift+T",click(){const e=l.join(c.homedir(),".chat2db/logs/application.log");n.openPath(e).then((e=>console.log("err:",e)))}},{label:"打开控制台",accelerator:"darwin"===process.platform?"Cmd+Shift+I":"Ctrl+Shift+I",click(){const e=i.getFocusedWindow();e&&e.toggleDevTools()}},{label:"访问官网",click(){n.openExternal("https://www.sqlgpt.cn/zh")}},{label:"查看文档",click(){n.openExternal("https://doc.sqlgpt.cn/zh/")}},{label:"查看更新日志",click(){n.openExternal("https://doc.sqlgpt.cn/zh/changelog/")}}]}];a.setApplicationMenu(a.buildFromTemplate(r))}},6540:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP=t.LIMIT_FILES_DESCRIPTORS=t.LIMIT_BASENAME_LENGTH=t.IS_USER_ROOT=t.IS_POSIX=t.DEFAULT_TIMEOUT_SYNC=t.DEFAULT_TIMEOUT_ASYNC=t.DEFAULT_WRITE_OPTIONS=t.DEFAULT_READ_OPTIONS=t.DEFAULT_FOLDER_MODE=t.DEFAULT_FILE_MODE=t.DEFAULT_ENCODING=void 0,t.DEFAULT_ENCODING="utf8",t.DEFAULT_FILE_MODE=438,t.DEFAULT_FOLDER_MODE=511,t.DEFAULT_READ_OPTIONS={},t.DEFAULT_WRITE_OPTIONS={},t.DEFAULT_TIMEOUT_ASYNC=5e3,t.DEFAULT_TIMEOUT_SYNC=100;const r=!!process.getuid;t.IS_POSIX=r;const n=!!process.getuid&&!process.getuid();t.IS_USER_ROOT=n,t.LIMIT_BASENAME_LENGTH=128,t.LIMIT_FILES_DESCRIPTORS=1e4,t.NOOP=()=>{}},2582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.writeFileSync=t.writeFile=t.readFileSync=t.readFile=void 0;const n=r(1017),s=r(6540),o=r(1788),i=r(4033),a=r(1729),c=r(2046);t.readFile=function e(t,r=s.DEFAULT_READ_OPTIONS){var n;if(i.default.isString(r))return e(t,{encoding:r});const a=Date.now()+(null!==(n=r.timeout)&&void 0!==n?n:s.DEFAULT_TIMEOUT_ASYNC);return o.default.readFileRetry(a)(t,r)},t.readFileSync=function e(t,r=s.DEFAULT_READ_OPTIONS){var n;if(i.default.isString(r))return e(t,{encoding:r});const a=Date.now()+(null!==(n=r.timeout)&&void 0!==n?n:s.DEFAULT_TIMEOUT_SYNC);return o.default.readFileSyncRetry(a)(t,r)};const l=(e,t,r,n)=>{if(i.default.isFunction(r))return l(e,t,s.DEFAULT_WRITE_OPTIONS,r);const o=u(e,t,r);return n&&o.then(n,n),o};t.writeFile=l;const u=async(e,t,r=s.DEFAULT_WRITE_OPTIONS)=>{var l;if(i.default.isString(r))return u(e,t,{encoding:r});const d=Date.now()+(null!==(l=r.timeout)&&void 0!==l?l:s.DEFAULT_TIMEOUT_ASYNC);let f=null,h=null,p=null,m=null,y=null;try{r.schedule&&(f=await r.schedule(e)),h=await a.default.schedule(e),e=await o.default.realpathAttempt(e)||e,[m,p]=c.default.get(e,r.tmpCreate||c.default.create,!(!1===r.tmpPurge));const l=s.IS_POSIX&&i.default.isUndefined(r.chown),u=i.default.isUndefined(r.mode);if(l||u){const t=await o.default.statAttempt(e);t&&(r={...r},l&&(r.chown={uid:t.uid,gid:t.gid}),u&&(r.mode=t.mode))}const g=n.dirname(e);await o.default.mkdirAttempt(g,{mode:s.DEFAULT_FOLDER_MODE,recursive:!0}),y=await o.default.openRetry(d)(m,"w",r.mode||s.DEFAULT_FILE_MODE),r.tmpCreated&&r.tmpCreated(m),i.default.isString(t)?await o.default.writeRetry(d)(y,t,0,r.encoding||s.DEFAULT_ENCODING):i.default.isUndefined(t)||await o.default.writeRetry(d)(y,t,0,t.length,0),!1!==r.fsync&&(!1!==r.fsyncWait?await o.default.fsyncRetry(d)(y):o.default.fsyncAttempt(y)),await o.default.closeRetry(d)(y),y=null,r.chown&&await o.default.chownAttempt(m,r.chown.uid,r.chown.gid),r.mode&&await o.default.chmodAttempt(m,r.mode);try{await o.default.renameRetry(d)(m,e)}catch(t){if("ENAMETOOLONG"!==t.code)throw t;await o.default.renameRetry(d)(m,c.default.truncate(e))}p(),m=null}finally{y&&await o.default.closeAttempt(y),m&&c.default.purge(m),f&&f(),h&&h()}},d=(e,t,r=s.DEFAULT_WRITE_OPTIONS)=>{var a;if(i.default.isString(r))return d(e,t,{encoding:r});const l=Date.now()+(null!==(a=r.timeout)&&void 0!==a?a:s.DEFAULT_TIMEOUT_SYNC);let u=null,f=null,h=null;try{e=o.default.realpathSyncAttempt(e)||e,[f,u]=c.default.get(e,r.tmpCreate||c.default.create,!(!1===r.tmpPurge));const a=s.IS_POSIX&&i.default.isUndefined(r.chown),d=i.default.isUndefined(r.mode);if(a||d){const t=o.default.statSyncAttempt(e);t&&(r={...r},a&&(r.chown={uid:t.uid,gid:t.gid}),d&&(r.mode=t.mode))}const p=n.dirname(e);o.default.mkdirSyncAttempt(p,{mode:s.DEFAULT_FOLDER_MODE,recursive:!0}),h=o.default.openSyncRetry(l)(f,"w",r.mode||s.DEFAULT_FILE_MODE),r.tmpCreated&&r.tmpCreated(f),i.default.isString(t)?o.default.writeSyncRetry(l)(h,t,0,r.encoding||s.DEFAULT_ENCODING):i.default.isUndefined(t)||o.default.writeSyncRetry(l)(h,t,0,t.length,0),!1!==r.fsync&&(!1!==r.fsyncWait?o.default.fsyncSyncRetry(l)(h):o.default.fsyncAttempt(h)),o.default.closeSyncRetry(l)(h),h=null,r.chown&&o.default.chownSyncAttempt(f,r.chown.uid,r.chown.gid),r.mode&&o.default.chmodSyncAttempt(f,r.mode);try{o.default.renameSyncRetry(l)(f,e)}catch(t){if("ENAMETOOLONG"!==t.code)throw t;o.default.renameSyncRetry(l)(f,c.default.truncate(e))}u(),f=null}finally{h&&o.default.closeSyncAttempt(h),f&&c.default.purge(f)}};t.writeFileSync=d},7121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attemptifySync=t.attemptifyAsync=void 0;const n=r(6540);t.attemptifyAsync=(e,t=n.NOOP)=>function(){return e.apply(void 0,arguments).catch(t)},t.attemptifySync=(e,t=n.NOOP)=>function(){try{return e.apply(void 0,arguments)}catch(e){return t(e)}}},1788:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7147),s=r(3837),o=r(7121),i=r(1197),a=r(3823),c={chmodAttempt:o.attemptifyAsync(s.promisify(n.chmod),i.default.onChangeError),chownAttempt:o.attemptifyAsync(s.promisify(n.chown),i.default.onChangeError),closeAttempt:o.attemptifyAsync(s.promisify(n.close)),fsyncAttempt:o.attemptifyAsync(s.promisify(n.fsync)),mkdirAttempt:o.attemptifyAsync(s.promisify(n.mkdir)),realpathAttempt:o.attemptifyAsync(s.promisify(n.realpath)),statAttempt:o.attemptifyAsync(s.promisify(n.stat)),unlinkAttempt:o.attemptifyAsync(s.promisify(n.unlink)),closeRetry:a.retryifyAsync(s.promisify(n.close),i.default.isRetriableError),fsyncRetry:a.retryifyAsync(s.promisify(n.fsync),i.default.isRetriableError),openRetry:a.retryifyAsync(s.promisify(n.open),i.default.isRetriableError),readFileRetry:a.retryifyAsync(s.promisify(n.readFile),i.default.isRetriableError),renameRetry:a.retryifyAsync(s.promisify(n.rename),i.default.isRetriableError),statRetry:a.retryifyAsync(s.promisify(n.stat),i.default.isRetriableError),writeRetry:a.retryifyAsync(s.promisify(n.write),i.default.isRetriableError),chmodSyncAttempt:o.attemptifySync(n.chmodSync,i.default.onChangeError),chownSyncAttempt:o.attemptifySync(n.chownSync,i.default.onChangeError),closeSyncAttempt:o.attemptifySync(n.closeSync),mkdirSyncAttempt:o.attemptifySync(n.mkdirSync),realpathSyncAttempt:o.attemptifySync(n.realpathSync),statSyncAttempt:o.attemptifySync(n.statSync),unlinkSyncAttempt:o.attemptifySync(n.unlinkSync),closeSyncRetry:a.retryifySync(n.closeSync,i.default.isRetriableError),fsyncSyncRetry:a.retryifySync(n.fsyncSync,i.default.isRetriableError),openSyncRetry:a.retryifySync(n.openSync,i.default.isRetriableError),readFileSyncRetry:a.retryifySync(n.readFileSync,i.default.isRetriableError),renameSyncRetry:a.retryifySync(n.renameSync,i.default.isRetriableError),statSyncRetry:a.retryifySync(n.statSync,i.default.isRetriableError),writeSyncRetry:a.retryifySync(n.writeSync,i.default.isRetriableError)};t.default=c},1197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6540),s={isChangeErrorOk:e=>{const{code:t}=e;return"ENOSYS"===t||!(n.IS_USER_ROOT||"EINVAL"!==t&&"EPERM"!==t)},isRetriableError:e=>{const{code:t}=e;return"EMFILE"===t||"ENFILE"===t||"EAGAIN"===t||"EBUSY"===t||"EACCESS"===t||"EACCS"===t||"EPERM"===t},onChangeError:e=>{if(!s.isChangeErrorOk(e))throw e}};t.default=s},4033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={isFunction:e=>"function"==typeof e,isString:e=>"string"==typeof e,isUndefined:e=>void 0===e}},3823:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryifySync=t.retryifyAsync=void 0;const n=r(2068);t.retryifyAsync=(e,t)=>function(r){return function s(){return n.default.schedule().then((n=>e.apply(void 0,arguments).then((e=>(n(),e)),(e=>{if(n(),Date.now()>=r)throw e;if(t(e)){const e=Math.round(100+400*Math.random());return new Promise((t=>setTimeout(t,e))).then((()=>s.apply(void 0,arguments)))}throw e}))))}},t.retryifySync=(e,t)=>function(r){return function n(){try{return e.apply(void 0,arguments)}catch(e){if(Date.now()>r)throw e;if(t(e))return n.apply(void 0,arguments);throw e}}}},2068:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={interval:25,intervalId:void 0,limit:r(6540).LIMIT_FILES_DESCRIPTORS,queueActive:new Set,queueWaiting:new Set,init:()=>{n.intervalId||(n.intervalId=setInterval(n.tick,n.interval))},reset:()=>{n.intervalId&&(clearInterval(n.intervalId),delete n.intervalId)},add:e=>{n.queueWaiting.add(e),n.queueActive.size{n.queueWaiting.delete(e),n.queueActive.delete(e)},schedule:()=>new Promise((e=>{const t=()=>n.remove(r),r=()=>e(t);n.add(r)})),tick:()=>{if(!(n.queueActive.size>=n.limit)){if(!n.queueWaiting.size)return n.reset();for(const e of n.queueWaiting){if(n.queueActive.size>=n.limit)break;n.queueWaiting.delete(e),n.queueActive.add(e),e()}}}};t.default=n},1729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={},n={next:e=>{const t=r[e];if(!t)return;t.shift();const s=t[0];s?s((()=>n.next(e))):delete r[e]},schedule:e=>new Promise((t=>{let s=r[e];s||(s=r[e]=[]),s.push(t),s.length>1||t((()=>n.next(e)))}))};t.default=n},2046:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1017),s=r(6540),o=r(1788),i={store:{},create:e=>{const t=`000000${Math.floor(16777215*Math.random()).toString(16)}`.slice(-6);return`${e}.tmp-${Date.now().toString().slice(-10)}${t}`},get:(e,t,r=!0)=>{const n=i.truncate(t(e));return n in i.store?i.get(e,t,r):(i.store[n]=r,[n,()=>delete i.store[n]])},purge:e=>{i.store[e]&&(delete i.store[e],o.default.unlinkAttempt(e))},purgeSync:e=>{i.store[e]&&(delete i.store[e],o.default.unlinkSyncAttempt(e))},purgeSyncAll:()=>{for(const e in i.store)i.purgeSync(e)},truncate:e=>{const t=n.basename(e);if(t.length<=s.LIMIT_BASENAME_LENGTH)return e;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(t);if(!r)return e;const o=t.length-s.LIMIT_BASENAME_LENGTH;return`${e.slice(0,-t.length)}${r[1]}${r[2].slice(0,-o)}${r[3]}`}};process.on("exit",i.purgeSyncAll),t.default=i},9658:function(e,t,r){"use strict";e=r.nmd(e);var n,s,o,i,a,c,l=this&&this.__classPrivateFieldSet||function(e,t,r,n,s){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,r):s?s.value=r:t.set(e,r),r},u=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0});const d=r(3837),f=r(7147),h=r(1017),p=r(6113),m=r(9491),y=r(2361),g=r(3517),v=r(8866),w=r(1766),E=r(2582),$=r(5133),_=r(6838),b=r(7319),S=r(1249),O=r(7678),P="aes-256-cbc",x=()=>Object.create(null);let N="";try{delete r.c[__filename],N=h.dirname(null!==(s=null===(n=e.parent)||void 0===n?void 0:n.filename)&&void 0!==s?s:".")}catch(e){}const I="__internal__",j=`${I}.migrations.version`;class R{constructor(e={}){var t;o.set(this,void 0),i.set(this,void 0),a.set(this,void 0),c.set(this,{}),this._deserialize=e=>JSON.parse(e),this._serialize=e=>JSON.stringify(e,void 0,"\t");const r={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...e},n=O((()=>{const e=v.sync({cwd:N}),t=e&&JSON.parse(f.readFileSync(e,"utf8"));return null!=t?t:{}}));if(!r.cwd){if(r.projectName||(r.projectName=n().name),!r.projectName)throw new Error("Project name could not be inferred. Please specify the `projectName` option.");r.cwd=w(r.projectName,{suffix:r.projectSuffix}).config}if(l(this,a,r,"f"),r.schema){if("object"!=typeof r.schema)throw new TypeError("The `schema` option must be an object.");const e=new $.default({allErrors:!0,useDefaults:!0});(0,_.default)(e);const t={type:"object",properties:r.schema};l(this,o,e.compile(t),"f");for(const[e,t]of Object.entries(r.schema))(null==t?void 0:t.default)&&(u(this,c,"f")[e]=t.default)}r.defaults&&l(this,c,{...u(this,c,"f"),...r.defaults},"f"),r.serialize&&(this._serialize=r.serialize),r.deserialize&&(this._deserialize=r.deserialize),this.events=new y.EventEmitter,l(this,i,r.encryptionKey,"f");const s=r.fileExtension?`.${r.fileExtension}`:"";this.path=h.resolve(r.cwd,`${null!==(t=r.configName)&&void 0!==t?t:"config"}${s}`);const d=this.store,p=Object.assign(x(),r.defaults,d);this._validate(p);try{m.deepEqual(d,p)}catch(e){this.store=p}if(r.watch&&this._watch(),r.migrations){if(r.projectVersion||(r.projectVersion=n().version),!r.projectVersion)throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.");this._migrate(r.migrations,r.projectVersion,r.beforeEachMigration)}}get(e,t){if(u(this,a,"f").accessPropertiesByDotNotation)return this._get(e,t);const{store:r}=this;return e in r?r[e]:t}set(e,t){if("string"!=typeof e&&"object"!=typeof e)throw new TypeError("Expected `key` to be of type `string` or `object`, got "+typeof e);if("object"!=typeof e&&void 0===t)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError(`Please don't use the ${I} key, as it's used to manage this module internal operations.`);const{store:r}=this,n=(e,t)=>{((e,t)=>{const r=typeof t;if(new Set(["undefined","symbol","function"]).has(r))throw new TypeError(`Setting a value of type \`${r}\` for key \`${e}\` is not allowed as it's not supported by JSON`)})(e,t),u(this,a,"f").accessPropertiesByDotNotation?g.set(r,e,t):r[e]=t};if("object"==typeof e){const t=e;for(const[e,r]of Object.entries(t))n(e,r)}else n(e,t);this.store=r}has(e){return u(this,a,"f").accessPropertiesByDotNotation?g.has(this.store,e):e in this.store}reset(...e){for(const t of e)null!=u(this,c,"f")[t]&&this.set(t,u(this,c,"f")[t])}delete(e){const{store:t}=this;u(this,a,"f").accessPropertiesByDotNotation?g.delete(t,e):delete t[e],this.store=t}clear(){this.store=x();for(const e of Object.keys(u(this,c,"f")))this.reset(e)}onDidChange(e,t){if("string"!=typeof e)throw new TypeError("Expected `key` to be of type `string`, got "+typeof e);if("function"!=typeof t)throw new TypeError("Expected `callback` to be of type `function`, got "+typeof t);return this._handleChange((()=>this.get(e)),t)}onDidAnyChange(e){if("function"!=typeof e)throw new TypeError("Expected `callback` to be of type `function`, got "+typeof e);return this._handleChange((()=>this.store),e)}get size(){return Object.keys(this.store).length}get store(){try{const e=f.readFileSync(this.path,u(this,i,"f")?null:"utf8"),t=this._encryptData(e),r=this._deserialize(t);return this._validate(r),Object.assign(x(),r)}catch(e){if("ENOENT"===(null==e?void 0:e.code))return this._ensureDirectory(),x();if(u(this,a,"f").clearInvalidConfig&&"SyntaxError"===e.name)return x();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.emit("change")}*[(o=new WeakMap,i=new WeakMap,a=new WeakMap,c=new WeakMap,Symbol.iterator)](){for(const[e,t]of Object.entries(this.store))yield[e,t]}_encryptData(e){if(!u(this,i,"f"))return e.toString();try{if(u(this,i,"f"))try{if(":"===e.slice(16,17).toString()){const t=e.slice(0,16),r=p.pbkdf2Sync(u(this,i,"f"),t.toString(),1e4,32,"sha512"),n=p.createDecipheriv(P,r,t);e=Buffer.concat([n.update(Buffer.from(e.slice(17))),n.final()]).toString("utf8")}else{const t=p.createDecipher(P,u(this,i,"f"));e=Buffer.concat([t.update(Buffer.from(e)),t.final()]).toString("utf8")}}catch(e){}}catch(e){}return e.toString()}_handleChange(e,t){let r=e();const n=()=>{const n=r,s=e();(0,d.isDeepStrictEqual)(s,n)||(r=s,t.call(this,s,n))};return this.events.on("change",n),()=>this.events.removeListener("change",n)}_validate(e){if(!u(this,o,"f"))return;if(u(this,o,"f").call(this,e)||!u(this,o,"f").errors)return;const t=u(this,o,"f").errors.map((({instancePath:e,message:t=""})=>`\`${e.slice(1)}\` ${t}`));throw new Error("Config schema violation: "+t.join("; "))}_ensureDirectory(){f.mkdirSync(h.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e);if(u(this,i,"f")){const e=p.randomBytes(16),r=p.pbkdf2Sync(u(this,i,"f"),e.toString(),1e4,32,"sha512"),n=p.createCipheriv(P,r,e);t=Buffer.concat([e,Buffer.from(":"),n.update(Buffer.from(t)),n.final()])}if(process.env.SNAP)f.writeFileSync(this.path,t,{mode:u(this,a,"f").configFileMode});else try{E.writeFileSync(this.path,t,{mode:u(this,a,"f").configFileMode})}catch(e){if("EXDEV"===(null==e?void 0:e.code))return void f.writeFileSync(this.path,t,{mode:u(this,a,"f").configFileMode});throw e}}_watch(){this._ensureDirectory(),f.existsSync(this.path)||this._write(x()),"win32"===process.platform?f.watch(this.path,{persistent:!1},b((()=>{this.events.emit("change")}),{wait:100})):f.watchFile(this.path,{persistent:!1},b((()=>{this.events.emit("change")}),{wait:5e3}))}_migrate(e,t,r){let n=this._get(j,"0.0.0");const s=Object.keys(e).filter((e=>this._shouldPerformMigration(e,n,t)));let o={...this.store};for(const i of s)try{r&&r(this,{fromVersion:n,toVersion:i,finalVersion:t,versions:s}),(0,e[i])(this),this._set(j,i),n=i,o={...this.store}}catch(e){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${e}`)}!this._isVersionInRangeFormat(n)&&S.eq(n,t)||this._set(j,t)}_containsReservedKey(e){return"object"==typeof e&&Object.keys(e)[0]===I||"string"==typeof e&&!!u(this,a,"f").accessPropertiesByDotNotation&&!!e.startsWith(`${I}.`)}_isVersionInRangeFormat(e){return null===S.clean(e)}_shouldPerformMigration(e,t,r){return this._isVersionInRangeFormat(e)?("0.0.0"===t||!S.satisfies(t,e))&&S.satisfies(r,e):!S.lte(e,t)&&!S.gt(e,r)}_get(e,t){return g.get(this.store,e,t)}_set(e,t){const{store:r}=this;g.set(r,e,t),this.store=r}}t.default=R,e.exports=R,e.exports.default=R},5583:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(o,i),time:r(c,l),"date-time":r((function(e){const t=e.split(u);return 2===t.length&&o(t[0])&&c(t[1],!0)}),d),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&h.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(v.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return p.lastIndex=0,p.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=y&&e>=m}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:g},double:{type:"number",validate:g},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],o=+t[2],i=+t[3];return o>=1&&o<=12&&i>=1&&i<=(2===o&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:s[o])}function i(e,t){if(e&&t)return e>t?1:e(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5583),s=r(1984),o=r(5899),i=new o.Name("fullFormats"),a=new o.Name("fastFormats"),c=(e,t={keywords:!0})=>{if(Array.isArray(t))return l(e,t,n.fullFormats,i),e;const[r,o]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,i];return l(e,t.formats||n.formatNames,r,o),t.keywords&&s.default(e),e};function l(e,t,r,n){var s,i;null!==(s=(i=e.opts.code).formats)&&void 0!==s||(i.formats=o._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}c.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},1984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(5133),s=r(5899),o=s.operators,i={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>s.str`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>s._`{comparison: ${i[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:o,keyword:a,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;const d=new n.KeywordCxt(c,u.RULES.all.format.definition,"format");function f(e){return s._`${e}.compare(${r}, ${o}) ${i[a].fail} 0`}d.$data?function(){const r=t.scopeValue("formats",{ref:u.formats,code:l.code.formats}),n=t.const("fmt",s._`${r}[${d.schemaCode}]`);e.fail$data(s.or(s._`typeof ${n} != "object"`,s._`${n} instanceof RegExp`,s._`typeof ${n}.compare != "function"`,f(n)))}():function(){const r=d.schema,n=u.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const o=t.scopeValue("formats",{key:r,ref:n,code:l.code.formats?s._`${l.code.formats}${s.getProperty(r)}`:void 0});e.fail$data(f(o))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},5133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(3579),s=r(6568),o=r(8402),i=r(115),a=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),s.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(i,a):i;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var u=r(5032);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=r(5899);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=r(7173);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var h=r(433);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})},6796:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class s extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(6796),s=r(2321);var o=r(6796);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var i=r(2321);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?s.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class l extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=R(this.rhs,e,t),this}get names(){return j(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends l{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class p extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=R(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const s=r[n];s.optimizeNames(e,t)||(A(e,s.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>I(e,t.names)),{})}}class y extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends m{}class v extends y{}v.kind="else";class w extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof w?t:t.nodes:this.nodes.length?this:new w(T(e),t instanceof w?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=R(this.condition,e,t),this}get names(){const e=super.names;return j(e,this.condition),this.else&&I(e,this.else.names),e}}w.kind="if";class E extends y{}E.kind="for";class $ extends E{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=R(this.iteration,e,t),this}get names(){return I(super.names,this.iteration.names)}}class _ extends E{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?s.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=j(super.names,this.from);return j(e,this.to)}}class b extends E{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=R(this.iterable,e,t),this}get names(){return I(super.names,this.iterable.names)}}class S extends y{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}S.kind="func";class O extends m{render(e){return"return "+super.render(e)}}O.kind="return";class P extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&I(e,this.catch.names),this.finally&&I(e,this.finally.names),e}}class x extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}x.kind="catch";class N extends y{render(e){return"finally"+super.render(e)}}function I(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function j(e,t){return t instanceof n._CodeOrName?I(e,t.names):e}function R(e,t,r){return e instanceof n.Name?o(e):(s=e)instanceof n._Code&&s._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var s;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function A(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function T(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${L(e)}`}N.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new s.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const s=this._scope.toName(t);return void 0!==r&&n&&(this._constants[s.str]=r),this._leafNode(new c(e,s,r)),s}const(e,t,r){return this._def(s.varKinds.const,e,t,r)}let(e,t,r){return this._def(s.varKinds.let,e,t,r)}var(e,t,r){return this._def(s.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new p(e)),this}object(...e){const t=["{"];for(const[r,s]of e)t.length>1&&t.push(","),t.push(r),(r!==s||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,s));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new w(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new w(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(w,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new $(e),t)}forRange(e,t,r,n,o=(this.opts.es5?s.varKinds.var:s.varKinds.let)){const i=this._scope.toName(e);return this._for(new _(o,i,t,r),(()=>n(i)))}forOf(e,t,r,o=s.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(i,n._`${e}[${t}]`),r(i)}))}return this._for(new b("of",o,i,t),(()=>r(i)))}forIn(e,t,r,o=(this.opts.es5?s.varKinds.var:s.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const i=this._scope.toName(e);return this._for(new b("in",o,i,t),(()=>r(i)))}endFor(){return this._endBlockNode(E)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new f(e))}return(e){const t=new O;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new P;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new x(e),t(e)}return r&&(this._currNode=n.finally=new N,this.code(r)),this._endBlockNode(x,N)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,s){return this._blockNode(new S(e,t,r)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=T;const C=k(t.operators.AND);t.and=function(...e){return e.reduce(C)};const D=k(t.operators.OR);function k(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${L(t)} ${e} ${L(r)}`}function L(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(D)}},2321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(6796);class s extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class i{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=i;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const c=n._`\n`;t.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:s}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let i=this._values[s];if(i){const e=i.get(o);if(e)return e}else i=this._values[s]=new Map;i.set(o,n);const a=this._scope[s]||(this._scope[s]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:s,itemIndex:c}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,i={},a){let c=n.nil;for(const l in e){const u=e[l];if(!u)continue;const d=i[l]=i[l]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,o.Started);let i=r(e);if(i){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=n._`${c}${r} ${e} = ${i};${this.opts._n}`}else{if(!(i=null==a?void 0:a(e)))throw new s(e);c=n._`${c}${i}${this.opts._n}`}d.set(e,o.Completed)}))}return c}}},4677:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(5899),s=r(320),o=r(6934);function i(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function a(e,t){const{gen:r,validateName:s,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${s}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,s,o){const{it:c}=e,{gen:u,compositeRule:d,allErrors:f}=c,h=l(e,r,s);(null!=o?o:d||f)?i(u,h):a(c,n._`[${h}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:s}=e,{gen:c,compositeRule:u,allErrors:d}=s;i(c,l(e,r,n)),u||d||a(s,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:s,errsCount:i,it:a}){if(void 0===i)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",i,o.default.errors,(i=>{e.const(c,n._`${o.default.vErrors}[${i}]`),e.if(n._`${c}.instancePath === undefined`,(()=>e.assign(n._`${c}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath)))),e.assign(n._`${c}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${c}.schema`,r),e.assign(n._`${c}.data`,s))}))};const c={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function l(e,t,r){const{createErrors:s}=e.it;return!1===s?n._`{}`:function(e,t,r={}){const{gen:s,it:i}=e,a=[u(i,r),d(e,r)];return function(e,{params:t,message:r},s){const{keyword:i,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:f,topSchemaRef:h,schemaPath:p}=u;s.push([c.keyword,i],[c.params,"function"==typeof t?t(e):t||n._`{}`]),d.messages&&s.push([c.message,"function"==typeof r?r(e):r]),d.verbose&&s.push([c.schema,l],[c.parentSchema,n._`${h}${p}`],[o.default.data,a]),f&&s.push([c.propertyName,f])}(e,t,a),s.object(...a)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,s.getErrorPath)(t,s.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let i=o?t:n.str`${t}/${e}`;return r&&(i=n.str`${i}${(0,s.getErrorPath)(r,s.Type.Str)}`),[c.schemaPath,i]}},7760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(5899),s=r(7173),o=r(6934),i=r(6885),a=r(320),c=r(5032);class l{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,i.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=f.call(this,e);if(t)return t;const r=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:l}=this.opts.code,{ownProperties:u}=this.opts,d=new n.CodeGen(this.scope,{es5:a,lines:l,ownProperties:u});let h;e.$async&&(h=d.scopeValue("Error",{ref:s.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const p=d.scopeName("validate");e.validateName=p;const m={gen:d,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:h,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(m),d.optimize(this.opts.code.optimize);const t=d.toString();y=`${d.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,y)(this,this.scope.get());if(this.scope.value(p,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:p,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function d(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function f(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||p.call(this,e,t)}function p(e,t){const r=this.opts.uriResolver.parse(t),n=(0,i._getFullPath)(this.opts.uriResolver,r);let s=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===s)return y.call(this,r,e);const o=(0,i.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){const t=p.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),o===(0,i.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(s=(0,i.resolveUrl)(this.opts.uriResolver,s,n)),new l({schema:t,schemaId:r,root:e,baseId:s})}return y.call(this,r,a)}}t.SchemaEnv=l,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;r=(0,i.resolveUrl)(this.opts.uriResolver,t,r);const s=e.refs[r];if(s)return s;let o=h.call(this,e,r);if(void 0===o){const s=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:i}=this.opts;s&&(o=new l({schema:s,schemaId:i,root:e,baseId:t}))}return void 0!==o?e.refs[r]=d.call(this,o):void 0},t.getCompilingSchema=f,t.resolveSchema=p;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var s;if("/"!==(null===(s=e.fragment)||void 0===s?void 0:s[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const s="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(n)&&s&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,s))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,i.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=p.call(this,n,e)}const{schemaId:c}=this.opts;return o=o||new l({schema:r,schemaId:c,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},6934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=s},433:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6885);class s extends Error{constructor(e,t,r,s){super(s||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=s},6885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(320),s=r(4063),o=r(5528),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&l(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function l(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!i.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=h(t));const n=e.parse(t);return d(e,n)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const f=/#\/?$/;function h(e){return e?e.replace(f,""):""}t.normalizeId=h,t.resolveUrl=function(e,t,r){return r=h(r),e.resolve(t,r)};const p=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,i=h(e[r]||t),a={"":i},c=u(n,i,!1),l={},d=new Set;return o(e,{allKeys:!0},((e,t,n,s)=>{if(void 0===s)return;const o=c+t;let i=a[s];function u(t){const r=this.opts.uriResolver.resolve;if(t=h(i?r(i,t):t),d.has(t))throw m(t);d.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?f(e,n.schema,t):t!==h(o)&&("#"===t[0]?(f(e,l[t],t),l[t]=e):this.refs[t]=o),t}function y(e){if("string"==typeof e){if(!p.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(i=u.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),a[t]=i})),l;function f(e,t,r){if(void 0!==t&&!s(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},6777:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(5899),s=r(6796);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const s=n.RULES.keywords;for(const r in t)s[r]||p(e,`unknown keyword: "${r}"`)}function i(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function l({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:s}){return(o,i,a,c)=>{const l=void 0===a?i:a instanceof n.Name?(i instanceof n.Name?e(o,i,a):t(o,i,a),a):i instanceof n.Name?(t(o,a,i),i):r(i,a);return c!==n.Name||l instanceof n.Name?l:s(o,l)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&d(e,r,t),r}function d(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!i(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=i,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,s,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(s)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:l({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),d(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:l({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=d;const f={};var h;function p(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new s._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const s=t===h.Num;return r?s?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:s?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=p},8149:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const s=t.RULES.types[n];return s&&!0!==s&&r(e,s)},t.shouldUseGroup=r,t.shouldUseRule=n},473:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(4677),s=r(5899),o=r(6934),i={message:"boolean schema is false"};function a(e,t){const{gen:r,data:s}=e,o={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,i,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(s._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},2292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(6777),s=r(8149),o=r(4677),i=r(5899),a=r(320);var c;function l(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=l(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=l,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),l=t.length>0&&!(0===a.length&&1===t.length&&(0,s.schemaHasRulesForType)(e,t[0]));if(l){const s=f(t,n,o.strictNumbers,c.Wrong);r.if(s,(()=>{a.length?function(e,t,r){const{gen:n,data:s,opts:o}=e,a=n.let("dataType",i._`typeof ${s}`),c=n.let("coerced",i._`undefined`);"array"===o.coerceTypes&&n.if(i._`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>n.assign(s,i._`${s}[0]`).assign(a,i._`typeof ${s}`).if(f(t,s,o.strictNumbers),(()=>n.assign(c,s))))),n.if(i._`${c} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===o.coerceTypes)&&l(e);function l(e){switch(e){case"string":return void n.elseIf(i._`${a} == "number" || ${a} == "boolean"`).assign(c,i._`"" + ${s}`).elseIf(i._`${s} === null`).assign(c,i._`""`);case"number":return void n.elseIf(i._`${a} == "boolean" || ${s} === null + || (${a} == "string" && ${s} && ${s} == +${s})`).assign(c,i._`+${s}`);case"integer":return void n.elseIf(i._`${a} === "boolean" || ${s} === null + || (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(c,i._`+${s}`);case"boolean":return void n.elseIf(i._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(c,!1).elseIf(i._`${s} === "true" || ${s} === 1`).assign(c,!0);case"null":return n.elseIf(i._`${s} === "" || ${s} === 0 || ${s} === false`),void n.assign(c,null);case"array":n.elseIf(i._`${a} === "string" || ${a} === "number" + || ${a} === "boolean" || ${s} === null`).assign(c,i._`[${s}]`)}}n.else(),p(e),n.endIf(),n.if(i._`${c} !== undefined`,(()=>{n.assign(s,c),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(i._`${t} !== undefined`,(()=>e.assign(i._`${t}[${r}]`,n)))}(e,c)}))}(e,t,a):p(e)}))}return l};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,n=c.Correct){const s=n===c.Correct?i.operators.EQ:i.operators.NEQ;let o;switch(e){case"null":return i._`${t} ${s} null`;case"array":o=i._`Array.isArray(${t})`;break;case"object":o=i._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(i._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return i._`typeof ${t} ${s} ${e}`}return n===c.Correct?o:(0,i.not)(o);function a(e=i.nil){return(0,i.and)(i._`typeof ${t} == "number"`,e,r?i._`isFinite(${t})`:i.nil)}}function f(e,t,r,n){if(1===e.length)return d(e[0],t,r,n);let s;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=i._`typeof ${t} != "object"`;s=o.null?e:i._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else s=i.nil;o.number&&delete o.integer;for(const e in o)s=(0,i.and)(s,d(e,t,r,n));return s}t.checkDataType=d,t.checkDataTypes=f;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?i._`{type: ${e}}`:i._`{type: ${t}}`};function p(e){const t=function(e){const{gen:t,data:r,schema:n}=e,s=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,h)}t.reportTypeError=p},162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(5899),s=r(320);function o(e,t,r){const{gen:o,compositeRule:i,data:a,opts:c}=e;if(void 0===r)return;const l=n._`${a}${(0,n.getProperty)(t)}`;if(i)return void(0,s.checkStrictMode)(e,`default is ignored for: ${l}`);let u=n._`${l} === undefined`;"empty"===c.useDefaults&&(u=n._`${u} || ${l} === null || ${l} === ""`),o.if(u,n._`${l} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},5032:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(473),s=r(2292),o=r(8149),i=r(2292),a=r(162),c=r(9653),l=r(9282),u=r(5899),d=r(6934),f=r(6885),h=r(320),p=r(4677);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:s},o){s.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${y(r,s)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,s),e.code(o)})):e.func(t,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(s)}`,n.$async,(()=>e.code(y(r,s)).code(o)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function w(e){(0,h.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:s}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function E(e,t){if(e.opts.jtd)return _(e,[],!1,t);const r=(0,s.getSchemaTypes)(e.schema);_(e,r,!(0,s.coerceAndCheckDataType)(e,r),t)}function $({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:s}){const o=r.$comment;if(!0===s.$comment)e.code(u._`${d.default.self}.logger.log(${o})`);else if("function"==typeof s.$comment){const r=u.str`${n}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${o}, ${r}, ${s}.schema)`)}}function _(e,t,r,n){const{gen:s,schema:a,data:c,allErrors:l,opts:f,self:p}=e,{RULES:m}=p;function y(h){(0,o.shouldUseGroup)(a,h)&&(h.type?(s.if((0,i.checkDataType)(h.type,c,f.strictNumbers)),b(e,h),1===t.length&&t[0]===h.type&&r&&(s.else(),(0,i.reportTypeError)(e)),s.endIf()):b(e,h),l||s.if(u._`${d.default.errors} === ${n||0}`))}!a.$ref||!f.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(a,m)?(f.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{S(e.dataTypes,t)||O(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)S(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&O(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const s=r[n];if("object"==typeof s&&(0,o.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&O(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),s.block((()=>{for(const e of m.rules)y(e);y(m.post)}))):s.block((()=>x(e,"$ref",m.all.$ref.definition)))}function b(e,t){const{gen:r,schema:n,opts:{useDefaults:s}}=e;s&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&x(e,r.keyword,r.definition,t.type)}))}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function O(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,h.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(w(e),g(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&$(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,h.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(d.default.vErrors,null),n.let(d.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),E(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:s,opts:o}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${s}(${d.default.vErrors})`))):(t.assign(u._`${n}.errors`,d.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class P{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",j(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:s,def:o}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(s.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:s}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,i.checkDataTypes)(e,t,s.opts.strictNumbers,i.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e),(0,l.extendSubschemaMode)(r,e);const s={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(w(e),g(e))?function(e,t){const{schema:r,gen:n,opts:s}=e;s.$comment&&r.$comment&&$(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,f.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",d.default.errors);E(e,o),n.var(t,u._`${o} === ${d.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(s,t),s}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=h.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=h.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function x(e,t,r,n){const s=new P(e,r,t);"code"in r?r.code(s,n):s.$data&&r.validate?(0,c.funcKeywordCode)(s,r):"macro"in r?(0,c.macroKeywordCode)(s,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(s,r)}t.KeywordCxt=P;const N=/^\/(?:[^~]|~0|~1)*$/,I=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function j(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let s,o;if(""===e)return d.default.rootData;if("/"===e[0]){if(!N.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,o=d.default.rootData}else{const i=I.exec(e);if(!i)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+i[1];if(s=i[2],"#"===s){if(a>=t)throw new Error(c("property/index",a));return n[t-a]}if(a>t)throw new Error(c("data",a));if(o=r[t-a],!s)return o}let i=o;const a=s.split("/");for(const e of a)e&&(o=u._`${o}${(0,u.getProperty)((0,h.unescapeJsonPointer)(e))}`,i=u._`${i} && ${o}`);return i;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=j},9653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(5899),s=r(6934),o=r(7470),i=r(4677);function a(e){const{gen:t,data:r,it:s}=e;t.if(s.parentData,(()=>t.assign(r,n._`${s.parentData}[${s.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:s,schema:o,parentSchema:i,it:a}=e,l=t.macro.call(a.self,o,i,a),u=c(r,s,l);!1!==a.opts.validateSchema&&a.self.validateSchema(l,!0);const d=r.name("valid");e.subschema({schema:l,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:l,keyword:u,schema:d,parentSchema:f,$data:h,it:p}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(p,t);const m=!h&&t.compile?t.compile.call(p.self,d,f,p):t.validate,y=c(l,u,m),g=l.let("valid");function v(r=(t.async?n._`await `:n.nil)){const i=p.opts.passContext?s.default.this:s.default.self,a=!("compile"in t&&!h||!1===t.schema);l.assign(g,n._`${r}${(0,o.callValidateCode)(e,y,i,a)}`,t.modifying)}function w(e){var r;l.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)v(),t.modifying&&a(e),w((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>v(n._`await `)),(t=>l.assign(g,!1).if(n._`${t} instanceof ${p.ValidationError}`,(()=>l.assign(e,n._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=n._`${y}.errors`;return l.assign(e,null),v(n.nil),e}();t.modifying&&a(e),w((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(s.default.vErrors,n._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`).assign(s.default.errors,n._`${s.default.vErrors}.length`),(0,i.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},s,o){if(Array.isArray(s.keyword)?!s.keyword.includes(o):s.keyword!==o)throw new Error("ajv implementation error");const i=s.dependencies;if(null==i?void 0:i.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${i.join(",")}`);if(s.validateSchema&&!s.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(s.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},9282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(5899),s=r(320);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:i,errSchemaPath:a,topSchemaRef:c}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,s.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===i||void 0===a||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:i,topSchemaRef:c,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:i,dataTypes:a,propertyName:c}){if(void 0!==i&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:i,dataPathArr:a,opts:c}=t;u(l.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${i}${(0,s.getErrorPath)(r,o,c.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==i&&(u(i instanceof n.Name?i:l.let("data",i,!0)),void 0!==c&&(e.propertyName=c)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:s,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==s&&(e.createErrors=s),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},3579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(5032);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var s=r(5899);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return s.CodeGen}});const o=r(7173),i=r(433),a=r(6777),c=r(7760),l=r(5899),u=r(6885),d=r(2292),f=r(320),h=r(9756),p=r(2972),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function E(e){var t,r,n,s,o,i,a,c,l,u,d,f,h,y,g,v,w,E,$,_,b,S,O,P,x;const N=e.strict,I=null===(t=e.code)||void 0===t?void 0:t.optimize,j=!0===I||void 0===I?1:I||0,R=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,A=null!==(s=e.uriResolver)&&void 0!==s?s:p.default;return{strictSchema:null===(i=null!==(o=e.strictSchema)&&void 0!==o?o:N)||void 0===i||i,strictNumbers:null===(c=null!==(a=e.strictNumbers)&&void 0!==a?a:N)||void 0===c||c,strictTypes:null!==(u=null!==(l=e.strictTypes)&&void 0!==l?l:N)&&void 0!==u?u:"log",strictTuples:null!==(f=null!==(d=e.strictTuples)&&void 0!==d?d:N)&&void 0!==f?f:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:N)&&void 0!==y&&y,code:e.code?{...e.code,optimize:j,regExp:R}:{optimize:j,regExp:R},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(w=e.meta)||void 0===w||w,messages:null===(E=e.messages)||void 0===E||E,inlineRefs:null===($=e.inlineRefs)||void 0===$||$,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(b=e.addUsedSchema)||void 0===b||b,validateSchema:null===(S=e.validateSchema)||void 0===S||S,validateFormats:null===(O=e.validateFormats)||void 0===O||O,unicodeRegExp:null===(P=e.unicodeRegExp)||void 0===P||P,int32range:null===(x=e.int32range)||void 0===x||x,uriResolver:A}}class ${constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...E(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return N;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,v,e,"NOT SUPPORTED"),_.call(this,w,e,"DEPRECATED","warn"),this._metaOpts=x.call(this),e.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&P.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=h;"id"===r&&(n={...h},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return a.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await l.call(this,e);this.refs[e]||await s.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let s;if("object"==typeof e){const{schemaId:t}=this.opts;if(s=e[t],void 0!==s&&"string"!=typeof s)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=b.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=b.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(j.call(this,r,t),!t)return(0,f.eachItem)(r,(e=>R.call(this,e))),this;T.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,f.eachItem)(r,0===n.type.length?e=>R.call(this,e,n):e=>n.type.forEach((t=>R.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let s=e;for(const e of t)s=s[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=s[e];n&&o&&(s[e]=D(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,s=this.opts.addUsedSchema){let o;const{schemaId:i}=this.opts;if("object"==typeof e)o=e[i];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,u.normalizeId)(o||r);const l=u.getSchemaRefs.call(this,e,r);return a=new c.SchemaEnv({schema:e,schemaId:i,meta:t,baseId:r,localRefs:l}),this._cache.set(a.schema,a),s&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,r,n="error"){for(const s in e){const o=s;o in t&&this.logger[n](`${r}: option ${s}. ${e[o]}`)}}function b(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function O(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function P(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function x(){const e={...this.opts};for(const t of y)delete e[t];return e}t.default=$,$.ValidationError=o.default,$.MissingRefError=i.default;const N={log(){},warn(){},error(){}},I=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){const{RULES:r}=this;if((0,f.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!I.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function R(e,t,r){var n;const s=null==t?void 0:t.post;if(r&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let i=s?o.post:o.rules.find((({type:e})=>e===r));if(i||(i={type:r,rules:[]},o.rules.push(i)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?A.call(this,i,a,t.before):i.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function A(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function T(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const C={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,C]}}},283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4063);n.code='require("ajv/dist/runtime/equal").default',t.default=n},6913:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,s=0;for(;s=55296&&r<=56319&&s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(540);n.code='require("ajv/dist/runtime/uri").default',t.default=n},7173:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(5899),s=r(320),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?i(e,n):(0,s.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function i(e,t){const{gen:r,schema:o,data:i,keyword:a,it:c}=e;c.items=!0;const l=r.const("len",n._`${i}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${l} <= ${t.length}`);else if("object"==typeof o&&!(0,s.alwaysValidSchema)(c,o)){const o=r.var("valid",n._`${l} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:s.Type.Num},o),c.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=i,t.default=o},2038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7470),s=r(5899),o=r(6934),i=r(320),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>s._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:c,errsCount:l,it:u}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:d,opts:f}=u;if(u.props=!0,"all"!==f.removeAdditional&&(0,i.alwaysValidSchema)(u,r))return;const h=(0,n.allSchemaProperties)(a.properties),p=(0,n.allSchemaProperties)(a.patternProperties);function m(e){t.code(s._`delete ${c}[${e}]`)}function y(n){if("all"===f.removeAdditional||f.removeAdditional&&!1===r)m(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,i.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===f.removeAdditional?(g(n,r,!1),t.if((0,s.not)(r),(()=>{e.reset(),m(n)}))):(g(n,r),d||t.if((0,s.not)(r),(()=>t.break())))}}}function g(t,r,n){const s={keyword:"additionalProperties",dataProp:t,dataPropType:i.Type.Str};!1===n&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(s,r)}t.forIn("key",c,(r=>{h.length||p.length?t.if(function(r){let o;if(h.length>8){const e=(0,i.schemaRefOrVal)(u,a.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=h.length?(0,s.or)(...h.map((e=>s._`${r} === ${e}`))):s.nil;return p.length&&(o=(0,s.or)(o,...p.map((t=>s._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,s.not)(o)}(r),(()=>y(r))):y(r)})),e.ok(s._`${l} === ${o.default.errors}`)}};t.default=a},6386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(320),s={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(s,t))return;const i=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(i)}))}};t.default=s},3235:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(7470).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},6065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(320),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:i,it:a}=e;let c,l;const{minContains:u,maxContains:d}=o;a.opts.next?(c=void 0===u?1:u,l=d):c=1;const f=t.const("len",n._`${i}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,s.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,s.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,s.alwaysValidSchema)(a,r)){let t=n._`${f} >= ${c}`;return void 0!==l&&(t=n._`${t} && ${f} <= ${l}`),void e.pass(t)}a.items=!0;const h=t.name("valid");function p(){const e=t.name("_valid"),r=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===l?t.if(n._`${e} >= ${c}`,(()=>t.assign(h,!0).break())):(t.if(n._`${e} > ${l}`,(()=>t.assign(h,!1).break())),1===c?t.assign(h,!0):t.if(n._`${e} >= ${c}`,(()=>t.assign(h,!0))))}(r)))))}function m(r,n){t.forRange("i",0,f,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:s.Type.Num,compositeRule:!0},r),n()}))}void 0===l&&1===c?m(h,(()=>t.if(h,(()=>t.break())))):0===c?(t.let(h,!0),void 0!==l&&t.if(n._`${i}.length > 0`,p)):(t.let(h,!1),p()),e.result(h,(()=>e.reset()))}};t.default=o},4839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(5899),s=r(320),o=r(7470);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const s=1===t?"property":"properties";return n.str`must have ${s} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>n._`{property: ${e}, + missingProperty: ${s}, + depsCount: ${t}, + deps: ${r}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),c(e,r)}};function a(e,t=e.schema){const{gen:r,data:s,it:i}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const c in t){const l=t[c];if(0===l.length)continue;const u=(0,o.propertyInData)(r,s,c,i.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(", ")}),i.allErrors?r.if(u,(()=>{for(const t of l)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,o.checkMissingProp)(e,l,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function c(e,t=e.schema){const{gen:r,data:n,keyword:i,it:a}=e,c=r.name("valid");for(const l in t)(0,s.alwaysValidSchema)(a,t[l])||(r.if((0,o.propertyInData)(r,n,l,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:i,schemaProp:l},c);e.mergeValidEvaluated(t,c)}),(()=>r.var(c,!0))),e.ok(c))}t.validatePropertyDeps=a,t.validateSchemaDeps=c,t.default=i},6100:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(320),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,s.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=i(o,"then"),c=i(o,"else");if(!a&&!c)return;const l=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),a&&c){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,d("then",r),d("else",r))}else a?t.if(u,d("then")):t.if((0,n.not)(u),d("else"));function d(r,s){return()=>{const o=e.subschema({keyword:r},u);t.assign(l,u),e.mergeValidEvaluated(o,l),s?t.assign(s,n._`${r}`):e.setParams({ifClause:r})}}e.pass(l,(()=>e.error(!0)))}};function i(e,t){const r=e.schema[t];return void 0!==r&&!(0,s.alwaysValidSchema)(e,r)}t.default=o},222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(558),s=r(4531),o=r(4820),i=r(3785),a=r(6065),c=r(4839),l=r(7620),u=r(2038),d=r(3966),f=r(5975),h=r(2624),p=r(3235),m=r(7706),y=r(6386),g=r(6100),v=r(8957);t.default=function(e=!1){const t=[h.default,p.default,m.default,y.default,g.default,v.default,l.default,u.default,c.default,d.default,f.default];return e?t.push(s.default,i.default):t.push(n.default,o.default),t.push(a.default),t}},4820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(5899),s=r(320),o=r(7470),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,s.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:i,data:a,keyword:c,it:l}=e;!function(e){const{opts:n,errSchemaPath:o}=l,i=r.length,a=i===e.minItems&&(i===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${c}" is ${i}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,s.checkStrictMode)(l,e,n.strictTuples)}}(i),l.opts.unevaluated&&r.length&&!0!==l.items&&(l.items=s.mergeEvaluated.items(o,r.length,l.items));const u=o.name("valid"),d=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,s.alwaysValidSchema)(l,t)||(o.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:c,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=a,t.default=i},3785:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(320),o=r(7470),i=r(558),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,s.alwaysValidSchema)(n,t)||(a?(0,i.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},2624:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(320),s={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:s}=e;if((0,n.alwaysValidSchema)(s,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=s},7706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(320),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&o.discriminator)return;const a=r,c=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block((function(){a.forEach(((r,o)=>{let a;(0,s.alwaysValidSchema)(i,r)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},u),o>0&&t.if(n._`${u} && ${c}`).assign(c,!1).assign(l,n._`[${l}, ${o}]`).else(),t.if(u,(()=>{t.assign(c,!0),t.assign(l,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(c,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},5975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7470),s=r(5899),o=r(320),i=r(320),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,n.allSchemaProperties)(r),f=d.filter((e=>(0,o.alwaysValidSchema)(l,r[e])));if(0===d.length||f.length===d.length&&(!l.opts.unevaluated||!0===l.props))return;const h=u.strictSchema&&!u.allowMatchingProperties&&c.properties,p=t.name("valid");!0===l.props||l.props instanceof s.Name||(l.props=(0,i.evaluatedPropsToName)(t,l.props));const{props:m}=l;function y(e){for(const t in h)new RegExp(e).test(t)&&(0,o.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function g(r){t.forIn("key",a,(o=>{t.if(s._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=f.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:i.Type.Str},p),l.opts.unevaluated&&!0!==m?t.assign(s._`${m}[${o}]`,!0):n||l.allErrors||t.if((0,s.not)(p),(()=>t.break()))}))}))}!function(){for(const e of d)h&&y(e),l.allErrors?g(e):(t.var(p,!0),g(e),t.if(p))}()}};t.default=a},4531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4820),s={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=s},3966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5032),s=r(7470),o=r(320),i=r(2038),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:c,it:l}=e;"all"===l.opts.removeAdditional&&void 0===a.additionalProperties&&i.default.code(new n.KeywordCxt(l,i.default,"additionalProperties"));const u=(0,s.allSchemaProperties)(r);for(const e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&!0!==l.props&&(l.props=o.mergeEvaluated.props(t,(0,o.toHash)(u),l.props));const d=u.filter((e=>!(0,o.alwaysValidSchema)(l,r[e])));if(0===d.length)return;const f=t.name("valid");for(const r of d)h(r)?p(r):(t.if((0,s.propertyInData)(t,c,r,l.opts.ownProperties)),p(r),l.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(f);function h(e){return l.opts.useDefaults&&!l.compositeRule&&void 0!==r[e].default}function p(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t.default=a},7620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(320),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:i}=e;if((0,s.alwaysValidSchema)(i,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(a)}};t.default=o},8957:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(320),s={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=s},7470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(5899),s=r(320),o=r(6934),i=r(320);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function c(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function l(e,t,r,s){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return s?(0,n.or)(o,(0,n.not)(c(e,t,r))):o}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:s,it:o}=e;r.if(l(r,s,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},s,o){return(0,n.or)(...s.map((s=>(0,n.and)(l(e,t,s,r.ownProperties),n._`${o} = ${s}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=c,t.propertyInData=function(e,t,r,s){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return s?n._`${o} && ${c(e,t,r)}`:o},t.noPropertyInData=l,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,s.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:i,errorPath:a},it:c},l,u,d){const f=d?n._`${e}, ${t}, ${s}${i}`:t,h=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,c.parentData],[o.default.parentDataProperty,c.parentDataProperty],[o.default.rootData,o.default.rootData]];c.opts.dynamicRef&&h.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const p=n._`${f}, ${r.object(...h)}`;return u!==n.nil?n._`${l}.call(${u}, ${p})`:n._`${l}(${p})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const s=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,s);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?d:(0,i.useFunc)(e,o)}(${r}, ${s})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:i}=e,a=t.name("valid");if(i.allErrors){const e=t.let("valid",!0);return c((()=>t.assign(e,!1))),e}return t.var(a,!0),c((()=>t.break())),a;function c(i){const c=t.const("len",n._`${r}.length`);t.forRange("i",0,c,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:s.Type.Num},a),t.if((0,n.not)(a),i)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,s.alwaysValidSchema)(i,e)))&&!i.opts.unevaluated)return;const a=t.let("valid",!1),c=t.name("_valid");t.block((()=>r.forEach(((r,s)=>{const i=e.subschema({keyword:o,schemaProp:s,compositeRule:!0},c);t.assign(a,n._`${a} || ${c}`),e.mergeValidEvaluated(i,c)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},194:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},4901:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(194),s=r(3898),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,s.default];t.default=o},3898:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(433),s=r(7470),o=r(5899),i=r(6934),a=r(7760),c=r(320),l={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:s}=e,{baseId:i,schemaEnv:c,validateName:l,opts:f,self:h}=s,{root:p}=c;if(("#"===r||"#/"===r)&&i===p.baseId)return function(){if(c===p)return d(e,l,c,c.$async);const r=t.scopeValue("root",{ref:p});return d(e,o._`${r}.validate`,p,p.$async)}();const m=a.resolveRef.call(h,p,i,r);if(void 0===m)throw new n.default(s.opts.uriResolver,i,r);return m instanceof a.SchemaEnv?function(t){const r=u(e,t);d(e,r,t,t.$async)}(m):function(n){const s=t.scopeValue("schema",!0===f.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),i=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:s,errSchemaPath:r},i);e.mergeEvaluated(a),e.ok(i)}(m)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,n){const{gen:a,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,h=f.passContext?i.default.this:o.nil;function p(e){const t=o._`${e}.errors`;a.assign(i.default.vErrors,o._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),a.assign(i.default.errors,o._`${i.default.vErrors}.length`)}function m(e){var t;if(!l.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==l.props)if(n&&!n.dynamicProps)void 0!==n.props&&(l.props=c.mergeEvaluated.props(a,n.props,l.props));else{const t=a.var("props",o._`${e}.evaluated.props`);l.props=c.mergeEvaluated.props(a,t,l.props,o.Name)}if(!0!==l.items)if(n&&!n.dynamicItems)void 0!==n.items&&(l.items=c.mergeEvaluated.items(a,n.items,l.items));else{const t=a.var("items",o._`${e}.evaluated.items`);l.items=c.mergeEvaluated.items(a,t,l.items,o.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,s.callValidateCode)(e,t,h)}`),m(t),u||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${l.ValidationError})`,(()=>a.throw(e))),p(e),u||a.assign(r,!1)})),e.ok(r)}():e.result((0,s.callValidateCode)(e,t,h),(()=>m(t)),(()=>p(t)))}t.getValidate=u,t.callRef=d,t.default=l},8402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(2872),o=r(7760),i=r(320),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===s.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:c,it:l}=e,{oneOf:u}=c;if(!l.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=a.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),h=t.const("tag",n._`${r}${(0,n.getProperty)(d)}`);function p(r){const s=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},s);return e.mergeEvaluated(o,n.Name),s}t.if(n._`typeof ${h} == "string"`,(()=>function(){const r=function(){var e;const t={},r=s(c);let n=!0;for(let t=0;te.error(!1,{discrError:s.DiscrError.Tag,tag:h,tagName:d}))),e.ok(f)}};t.default=a},2872:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},6568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4901),s=r(6823),o=r(222),i=r(4805),a=r(4110),c=[n.default,s.default,(0,o.default)(),i.default,a.metadataVocabulary,a.contentVocabulary];t.default=c},2970:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:s,$data:o,schema:i,schemaCode:a,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;l.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:f.formats,code:l.code.formats}),i=r.const("fDef",n._`${o}[${a}]`),c=r.let("fType"),u=r.let("format");r.if(n._`typeof ${i} == "object" && !(${i} instanceof RegExp)`,(()=>r.assign(c,n._`${i}.type || "string"`).assign(u,n._`${i}.validate`)),(()=>r.assign(c,n._`"string"`).assign(u,i))),e.fail$data((0,n.or)(!1===l.strictSchema?n.nil:n._`${a} && !${u}`,function(){const e=d.$async?n._`(${i}.async ? await ${u}(${s}) : ${u}(${s}))`:n._`${u}(${s})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${s}))`;return n._`${u} && ${u} !== true && ${c} === ${t} && !${r}`}()))}():function(){const o=f.formats[i];if(!o)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return`unknown format "${i}" ignored in schema at path "${u}"`}f.logger.warn(e())}();if(!0===o)return;const[a,c,h]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):l.code.formats?n._`${l.code.formats}${(0,n.getProperty)(i)}`:void 0,s=r.scopeValue("formats",{key:i,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,s]:[e.type||"string",e.validate,n._`${s}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${h}(${s})`}return"function"==typeof c?n._`${h}(${s})`:n._`${h}.test(${s})`}())}())}};t.default=s},4805:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(2970).default];t.default=n},4110:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},1475:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(320),o=r(283),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:i,schemaCode:a,schema:c}=e;i||c&&"object"==typeof c?e.fail$data(n._`!${(0,s.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${c} !== ${r}`)}};t.default=i},975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(320),o=r(283),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:i,schema:a,schemaCode:c,it:l}=e;if(!i&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=l.opts.loopEnum;let d;const f=()=>null!=d?d:d=(0,s.useFunc)(t,o.default);let h;if(u||i)h=t.let("valid"),e.block$data(h,(function(){t.assign(h,!1),t.forOf("v",c,(e=>t.if(n._`${f()}(${r}, ${e})`,(()=>t.assign(h,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",c);h=(0,n.or)(...a.map(((t,s)=>function(e,t){const s=a[t];return"object"==typeof s&&null!==s?n._`${f()}(${r}, ${e}[${t}])`:n._`${r} === ${s}`}(e,s))))}e.pass(h)}};t.default=i},6823:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8276),s=r(7597),o=r(7398),i=r(3486),a=r(1448),c=r(8813),l=r(7511),u=r(9075),d=r(1475),f=r(975),h=[n.default,s.default,o.default,i.default,a.default,c.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];t.default=h},7511:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${s}`)}};t.default=s},7398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=r(320),o=r(6913),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i,it:a}=e,c="maxLength"===t?n.operators.GT:n.operators.LT,l=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,s.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${l} ${c} ${i}`)}};t.default=i},8276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s=n.operators,o={maximum:{okStr:"<=",ok:s.LTE,fail:s.GT},minimum:{okStr:">=",ok:s.GTE,fail:s.LT},exclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},exclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},i={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:i,code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(n._`${r} ${o[t].fail} ${s} || isNaN(${r})`)}};t.default=a},1448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${s}`)}};t.default=s},7597:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5899),s={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:s,it:o}=e,i=o.opts.multipleOfPrecision,a=t.let("res"),c=i?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${s} === 0 || (${a} = ${r}/${s}, ${c}))`)}};t.default=s},3486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7470),s=r(5899),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>s.str`must match pattern "${e}"`,params:({schemaCode:e})=>s._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:i,it:a}=e,c=a.opts.unicodeRegExp?"u":"",l=r?s._`(new RegExp(${i}, ${c}))`:(0,n.usePattern)(e,o);e.fail$data(s._`!${l}.test(${t})`)}};t.default=o},8813:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7470),s=r(5899),o=r(320),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>s.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>s._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:i,data:a,$data:c,it:l}=e,{opts:u}=l;if(!c&&0===r.length)return;const d=r.length>=u.loopRequired;if(l.allErrors?function(){if(d||c)e.block$data(s.nil,f);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(d||c){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,i,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,u.ownProperties)),t.if((0,s.not)(o),(()=>{e.error(),t.break()}))}),s.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){t.forOf("prop",i,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,u.ownProperties),(()=>e.error()))}))}}};t.default=i},9075:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2292),s=r(5899),o=r(320),i=r(283),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>s.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>s._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:a,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!a&&!c)return;const f=t.let("valid"),h=l.items?(0,n.getSchemaTypes)(l.items):[];function p(o,i){const a=t.name("item"),c=(0,n.checkDataTypes)(h,a,d.opts.strictNumbers,n.DataType.Wrong),l=t.const("indices",s._`{}`);t.for(s._`;${o}--;`,(()=>{t.let(a,s._`${r}[${o}]`),t.if(c,s._`continue`),h.length>1&&t.if(s._`typeof ${a} == "string"`,s._`${a} += "_"`),t.if(s._`typeof ${l}[${a}] == "number"`,(()=>{t.assign(i,s._`${l}[${a}]`),e.error(),t.assign(f,!1).break()})).code(s._`${l}[${a}] = ${o}`)}))}function m(n,a){const c=(0,o.useFunc)(t,i.default),l=t.name("outer");t.label(l).for(s._`;${n}--;`,(()=>t.for(s._`${a} = ${n}; ${a}--;`,(()=>t.if(s._`${c}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(f,!1).break(l)}))))))}e.block$data(f,(function(){const n=t.let("i",s._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(f,!0),t.if(s._`${n} > 1`,(()=>(h.length>0&&!h.some((e=>"object"===e||"array"===e))?p:m)(n,o)))}),s._`${u} === false`),e.ok(f)}};t.default=a},5528:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,s,o,i,a,c,l,u,d){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var f in n(o,i,a,c,l,u,d),o){var h=o[f];if(Array.isArray(h)){if(f in t.arrayKeywords)for(var p=0;p{"use strict";const n=r(6022);e.exports=(e,t={})=>{if("function"!=typeof e)throw new TypeError(`Expected the first argument to be a function, got \`${typeof e}\``);const{wait:r=0,before:s=!1,after:o=!0}=t;if(!s&&!o)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let i,a;const c=function(...t){const n=this,c=s&&!i;return clearTimeout(i),i=setTimeout((()=>{i=void 0,o&&(a=e.apply(n,t))}),r),c&&(a=e.apply(n,t)),a};return n(c,e),c.cancel=()=>{i&&(clearTimeout(i),i=void 0)},c}},6022:e=>{"use strict";const t=(e,t,n,s)=>{if("length"===n||"prototype"===n)return;if("arguments"===n||"caller"===n)return;const o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!r(o,i)&&s||Object.defineProperty(e,n,i)},r=function(e,t){return void 0===e||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},n=(e,t)=>`/* Wrapped ${e}*/\n${t}`,s=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),o=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");e.exports=(e,r,{ignoreNonConfigurable:i=!1}={})=>{const{name:a}=e;for(const n of Reflect.ownKeys(r))t(e,r,n,i);return((e,t)=>{const r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)})(e,r),((e,t,r)=>{const i=""===r?"":`with ${r.trim()}() `,a=n.bind(null,i,t.toString());Object.defineProperty(a,"name",o),Object.defineProperty(e,"toString",{...s,value:a})})(e,r,a),e}},3517:(e,t,r)=>{"use strict";const n=r(4290),s=new Set(["__proto__","prototype","constructor"]);function o(e){const t=e.split("."),r=[];for(let e=0;es.has(e)))?[]:r}e.exports={get(e,t,r){if(!n(e)||"string"!=typeof t)return void 0===r?e:r;const s=o(t);if(0!==s.length){for(let t=0;t{"use strict";const n=r(1787);class s{static instances={};errorHandler=null;eventLogger=null;functions={};hooks=[];isDev=!1;levels=null;logId=null;scope=null;transports={};variables={};constructor({allowUnknownLevel:e=!1,errorHandler:t,eventLogger:r,initializeFn:o,isDev:i=!1,levels:a=["error","warn","info","verbose","debug","silly"],logId:c,transportFactories:l={},variables:u}={}){this.addLevel=this.addLevel.bind(this),this.create=this.create.bind(this),this.logData=this.logData.bind(this),this.processMessage=this.processMessage.bind(this),this.allowUnknownLevel=e,this.initializeFn=o,this.isDev=i,this.levels=a,this.logId=c,this.transportFactories=l,this.variables=u||{},this.scope=n(this),this.addLevel("log",!1);for(const e of this.levels)this.addLevel(e,!1);this.errorHandler=t,t?.setOptions({logFn:this.error}),this.eventLogger=r,r?.setOptions({logger:this});for(const[e,t]of Object.entries(l))this.transports[e]=t(this);s.instances[c]=this}static getInstance({logId:e}){return this.instances[e]||this.instances.default}addLevel(e,t=this.levels.length){!1!==t&&this.levels.splice(t,0,e),this[e]=(...t)=>this.logData(t,{level:e}),this.functions[e]=this[e]}catchErrors(e){return this.processMessage({data:["log.catchErrors is deprecated. Use log.errorHandler instead"],level:"warn"},{transports:["console"]}),this.errorHandler.startCatching(e)}create(e){return"string"==typeof e&&(e={logId:e}),new s({...e,errorHandler:this.errorHandler,initializeFn:this.initializeFn,isDev:this.isDev,transportFactories:this.transportFactories,variables:{...this.variables}})}compareLevels(e,t,r=this.levels){const n=r.indexOf(e),s=r.indexOf(t);return-1===s||-1===n||s<=n}initialize(e={}){this.initializeFn({logger:this,...e})}logData(e,t={}){this.processMessage({data:e,...t})}processMessage(e,{transports:t=this.transports}={}){if("errorHandler"===e.cmd)return void this.errorHandler.handle(e.error,{errorName:e.errorName,processType:"renderer",showDialog:Boolean(e.showDialog)});let r=e.level;this.allowUnknownLevel||(r=this.levels.includes(e.level)?e.level:"info");const n={date:new Date,...e,level:r,variables:{...this.variables,...e.variables}};for(const[r,s]of this.transportEntries(t))if("function"==typeof s&&!1!==s.level&&this.compareLevels(s.level,e.level))try{const e=this.hooks.reduce(((e,t)=>e?t(e,s,r):e),n);e&&s({...e,data:[...e.data]})}catch(e){this.processInternalErrorFn(e)}}processInternalErrorFn(e){}transportEntries(e=this.transports){return(Array.isArray(e)?e:Object.entries(e)).map((e=>{switch(typeof e){case"string":return this.transports[e]?[e,this.transports[e]]:null;case"function":return[e.name,e];default:return Array.isArray(e)?e:null}})).filter(Boolean)}}e.exports=s},1787:e=>{"use strict";e.exports=function(e){return Object.defineProperties(t,{defaultLabel:{value:"",writable:!0},labelPadding:{value:!0,writable:!0},maxLabelLength:{value:0,writable:!0},labelLength:{get(){switch(typeof t.labelPadding){case"boolean":return t.labelPadding?t.maxLabelLength:0;case"number":return t.labelPadding;default:return 0}}}});function t(r){t.maxLabelLength=Math.max(t.maxLabelLength,r.length);const n={};for(const t of[...e.levels,"log"])n[t]=(...n)=>e.logData(n,{level:t,scope:r});return n}}},7377:(e,t,r)=>{"use strict";"undefined"==typeof process||"renderer"===process.type||"worker"===process.type?(r(9654),e.exports=r(9618)):e.exports=r(7631)},2641:(e,t,r)=>{"use strict";const n=r(2674);e.exports=class{isActive=!1;logFn=null;onError=null;showDialog=!0;constructor({logFn:e=null,onError:t=null,showDialog:r=!0}={}){this.createIssue=this.createIssue.bind(this),this.handleError=this.handleError.bind(this),this.handleRejection=this.handleRejection.bind(this),this.setOptions({logFn:e,onError:t,showDialog:r}),this.startCatching=this.startCatching.bind(this),this.stopCatching=this.stopCatching.bind(this)}handle(e,{logFn:t=this.logFn,onError:r=this.onError,processType:s="browser",showDialog:o=this.showDialog,errorName:i=""}={}){e=function(e){if(e instanceof Error)return e;if(e&&"object"==typeof e){if(e.message)return Object.assign(new Error(e.message),e);try{return new Error(JSON.stringify(e))}catch(t){return new Error(`Couldn't normalize error ${String(e)}: ${t}`)}}return new Error(`Can't normalize error ${String(e)}`)}(e);try{if("function"==typeof r){const t=n.getVersions();if(!1===r({createIssue:this.createIssue,error:e,errorName:i,processType:s,versions:t}))return}i?t(i,e):t(e),o&&!i.includes("rejection")&&n.showErrorBox(`A JavaScript error occurred in the ${s} process`,e.stack)}catch{console.error(e)}}setOptions({logFn:e,onError:t,showDialog:r}){"function"==typeof e&&(this.logFn=e),"function"==typeof t&&(this.onError=t),"boolean"==typeof r&&(this.showDialog=r)}startCatching({onError:e,showDialog:t}={}){this.isActive||(this.isActive=!0,this.setOptions({onError:e,showDialog:t}),process.on("uncaughtException",this.handleError),process.on("unhandledRejection",this.handleRejection))}stopCatching(){this.isActive=!1,process.removeListener("uncaughtException",this.handleError),process.removeListener("unhandledRejection",this.handleRejection)}createIssue(e,t){n.openUrl(`${e}?${new URLSearchParams(t).toString()}`)}handleError(e){this.handle(e,{errorName:"Unhandled"})}handleRejection(e){const t=e instanceof Error?e:new Error(JSON.stringify(e));this.handle(t,{errorName:"Unhandled rejection"})}}},6900:(e,t,r)=>{"use strict";const n=r(2674);e.exports=class{disposers=[];format="{eventSource}#{eventName}:";formatters={app:{"certificate-error":({args:e})=>this.arrayToObject(e.slice(1,4),["url","error","certificate"]),"child-process-gone":({args:e})=>1===e.length?e[0]:e,"render-process-gone":({args:[e,t]})=>t&&"object"==typeof t?{...t,...this.getWebContentsDetails(e)}:[]},webContents:{"console-message":({args:[e,t,r,n]})=>{if(!(e<3))return{message:t,source:`${n}:${r}`}},"did-fail-load":({args:e})=>this.arrayToObject(e,["errorCode","errorDescription","validatedURL","isMainFrame","frameProcessId","frameRoutingId"]),"did-fail-provisional-load":({args:e})=>this.arrayToObject(e,["errorCode","errorDescription","validatedURL","isMainFrame","frameProcessId","frameRoutingId"]),"plugin-crashed":({args:e})=>this.arrayToObject(e,["name","version"]),"preload-error":({args:e})=>this.arrayToObject(e,["preloadPath","error"])}};events={app:{"certificate-error":!0,"child-process-gone":!0,"render-process-gone":!0},webContents:{"did-fail-load":!0,"did-fail-provisional-load":!0,"plugin-crashed":!0,"preload-error":!0,unresponsive:!0}};level="error";scope="";constructor(e={}){this.setOptions(e)}setOptions({events:e,level:t,logger:r,format:n,formatters:s,scope:o}){"object"==typeof e&&(this.events=e),"string"==typeof t&&(this.level=t),"object"==typeof r&&(this.logger=r),"string"!=typeof n&&"function"!=typeof n||(this.format=n),"object"==typeof s&&(this.formatters=s),"string"==typeof o&&(this.scope=o)}startLogging(e={}){this.setOptions(e),this.disposeListeners();for(const e of this.getEventNames(this.events.app))this.disposers.push(n.onAppEvent(e,((...t)=>{this.handleEvent({eventSource:"app",eventName:e,handlerArgs:t})})));for(const e of this.getEventNames(this.events.webContents))this.disposers.push(n.onEveryWebContentsEvent(e,((...t)=>{this.handleEvent({eventSource:"webContents",eventName:e,handlerArgs:t})})))}stopLogging(){this.disposeListeners()}arrayToObject(e,t){const r={};return t.forEach(((t,n)=>{r[t]=e[n]})),e.length>t.length&&(r.unknownArgs=e.slice(t.length)),r}disposeListeners(){this.disposers.forEach((e=>e())),this.disposers=[]}formatEventLog({eventName:e,eventSource:t,handlerArgs:r}){const[n,...s]=r;if("function"==typeof this.format)return this.format({args:s,event:n,eventName:e,eventSource:t});const o=this.formatters[t]?.[e];let i=s;if("function"==typeof o&&(i=o({args:s,event:n,eventName:e,eventSource:t})),!i)return;const a={};return Array.isArray(i)?a.args=i:"object"==typeof i&&Object.assign(a,i),"webContents"===t&&Object.assign(a,this.getWebContentsDetails(n?.sender)),[this.format.replace("{eventSource}","app"===t?"App":"WebContents").replace("{eventName}",e),a]}getEventNames(e){return e&&"object"==typeof e?Object.entries(e).filter((([e,t])=>t)).map((([e])=>e)):[]}getWebContentsDetails(e){if(!e?.loadURL)return{};try{return{webContents:{id:e.id,url:e.getURL()}}}catch{return{}}}handleEvent({eventName:e,eventSource:t,handlerArgs:r}){const n=this.formatEventLog({eventName:e,eventSource:t,handlerArgs:r});if(n){const e=this.scope?this.logger.scope(this.scope):this.logger;e?.[this.level]?.(...n)}}}},2674:(e,t,r)=>{"use strict";const n=r(2037),s=r(1017);let o;try{o=r(2298)}catch{o=null}function i(){return c("app")}function a(){const e=i();return e?"name"in e?e.name:e.getName():null}function c(e){return o?.[e]||null}function l(){return"browser"===process.type&&o?.ipcMain?o.ipcMain:"renderer"===process.type&&o?.ipcRenderer?o.ipcRenderer:null}function u(){const e=i();return e?"version"in e?e.version:e.getVersion():null}function d(){let e=n.type().replace("_"," "),t=n.release();return"Darwin"===e&&(e="macOS",t=function(){const e=Number(n.release().split(".")[0]);return e<=19?"10."+(e-4):e-9}()),`${e} ${t}`}function f(e){const t=i();if(!t)return null;try{return t.getPath(e)}catch(e){return null}}e.exports={getAppUserDataPath:()=>f("userData"),getName:a,getPath:f,getVersion:u,getVersions:()=>({app:`${a()} ${u()}`,electron:`Electron ${process.versions.electron}`,os:d()}),isDev(){const e=i();return void 0!==e?.isPackaged?!e.isPackaged:"string"==typeof process.execPath?s.basename(process.execPath).toLowerCase().startsWith("electron"):"1"===process.env.ELECTRON_IS_DEV},isElectron:()=>Boolean(process.versions.electron),onAppEvent:(e,t)=>(o?.app?.on(e,t),()=>{o?.app?.off(e,t)}),onAppReady(e){o?.app?.isReady()?e():o?.app?.once?o?.app?.once("ready",e):e()},onEveryWebContentsEvent(e,t){return o?.webContents?.getAllWebContents().forEach((r=>{r.on(e,t)})),o?.app?.on("web-contents-created",r),()=>{o?.webContents?.getAllWebContents().forEach((r=>{r.off(e,t)})),o?.app?.off("web-contents-created",r)};function r(r,n){n.on(e,t)}},onIpc(e,t){l()?.on(e,t)},onIpcInvoke(e,t){l()?.handle?.(e,t)},openUrl(e,t=console.error){c("shell")?.openExternal(e).catch(t)},setPreloadFileForSessions({filePath:e,includeFutureSession:t=!0,getSessions:r=(()=>[o?.session?.defaultSession])}){for(const e of r().filter(Boolean))n(e);function n(t){t.setPreloads([...t.getPreloads(),e])}t&&o?.app?.on("session-created",(e=>{n(e)}))},sendIpc(e,t){"browser"===process.type?function(e,t){o?.BrowserWindow?.getAllWindows().forEach((r=>{!1===r.webContents?.isDestroyed()&&r.webContents.send(e,t)}))}(e,t):"renderer"===process.type&&function(e,t){l()?.send(e,t)}(e,t)},showErrorBox(e,t){const r=c("dialog");r&&r.showErrorBox(e,t)}}},7631:(e,t,r)=>{"use strict";const n=r(2674),{initialize:s}=r(5471),o=r(429),i=r(1688),a=r(7988),c=r(2666),l=r(2641),u=r(6900),d=new c({errorHandler:new l,eventLogger:new u,initializeFn:s,isDev:n.isDev(),logId:"default",transportFactories:{console:o,file:i,remote:a},variables:{processType:"main"}});function f(e){c.getInstance(e)?.processMessage(e)}d.processInternalErrorFn=e=>{d.transports.console.writeFn({message:{data:["Unhandled electron-log error",e],level:"error"}})},e.exports=d,e.exports.Logger=c,e.exports.default=e.exports,n.onIpc("__ELECTRON_LOG__",((e,t)=>{t.scope&&c.getInstance(t).scope(t.scope);const r=new Date(t.date);f({...t,date:r.getTime()?r:new Date})})),n.onIpcInvoke("__ELECTRON_LOG__",((e,{cmd:t="",logId:r})=>"getOptions"===t?{levels:c.getInstance({logId:r}).levels,logId:r}:(f({data:[`Unknown cmd '${t}'`],level:"error"}),{})))},5471:(e,t,r)=>{"use strict";const n=r(7147),s=r(2037),o=r(1017),i=r(2674),a=r(9654);e.exports={initialize({getSessions:e,includeFutureSession:t,logger:r,preload:c=!0,spyRendererConsole:l=!1}){i.onAppReady((()=>{try{c&&function({getSessions:e,includeFutureSession:t,preloadOption:r}){let c="string"==typeof r?r:o.resolve(__dirname,"../renderer/electron-log-preload.js");if(!n.existsSync(c)){c=o.join(i.getAppUserDataPath()||s.tmpdir(),"electron-log-preload.js");const e=`\n try {\n (${a.toString()})(require('electron'));\n } catch(e) {\n console.error(e);\n }\n `;n.writeFileSync(c,e,"utf8")}i.setPreloadFileForSessions({filePath:c,includeFutureSession:t,getSessions:e})}({getSessions:e,includeFutureSession:t,preloadOption:c}),l&&function({logger:e}){const t=["verbose","info","warning","error"];i.onEveryWebContentsEvent("console-message",((r,n,s)=>{e.processMessage({data:[s],level:t[n],variables:{processType:"renderer"}})}))}({logger:r})}catch(e){r.warn(e)}}))}}},1888:(e,t,r)=>{"use strict";const{transform:n}=r(6829);function s(e){const t=Math.abs(e);return`${e>=0?"-":"+"}${Math.floor(t/60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`}function o({data:e,logger:t,message:r}){const{defaultLabel:n,labelLength:s}=t?.scope||{},o=e[0];let i,a=r.scope;return a||(a=n),i=""===a?s>0?"".padEnd(s+3):"":"string"==typeof a?` (${a})`.padEnd(s+3):"",e[0]=o.replace("{scope}",i),e}function i({data:e,message:t}){let r=e[0];if("string"!=typeof r)return e;r=r.replace("{level}]",`${t.level}]`.padEnd(6," "));const n=t.date||new Date;return e[0]=r.replace(/\{(\w+)}/g,((e,r)=>{switch(r){case"level":return t.level||"info";case"logId":return t.logId;case"y":return n.getFullYear().toString(10);case"m":return(n.getMonth()+1).toString(10).padStart(2,"0");case"d":return n.getDate().toString(10).padStart(2,"0");case"h":return n.getHours().toString(10).padStart(2,"0");case"i":return n.getMinutes().toString(10).padStart(2,"0");case"s":return n.getSeconds().toString(10).padStart(2,"0");case"ms":return n.getMilliseconds().toString(10).padStart(3,"0");case"z":return s(n.getTimezoneOffset());case"iso":return n.toISOString();default:return t.variables?.[r]||e}})).trim(),e}function a({data:e}){const t=e[0];if("string"!=typeof t)return e;if(t.lastIndexOf("{text}")===t.length-6)return e[0]=t.replace(/\s?{text}/,""),""===e[0]&&e.shift(),e;const r=t.split("{text}");let n=[];return""!==r[0]&&n.push(r[0]),n=n.concat(e.slice(1)),""!==r[1]&&n.push(r[1]),n}e.exports={concatFirstStringElements:function({data:e}){return"string"!=typeof e[0]||"string"!=typeof e[1]||e[0].match(/%[1cdfiOos]/)?e:[`${e[0]} ${e[1]}`,...e.slice(2)]},formatScope:o,formatText:a,formatVariables:i,timeZoneFromOffset:s,format({message:e,logger:t,transport:r,data:s=e?.data}){switch(typeof r.format){case"string":return n({message:e,logger:t,transforms:[i,o,a],transport:r,initialData:[r.format,...s]});case"function":return r.format({data:s,level:e?.level||"info",logger:t,message:e,transport:r});default:return s}}}},2189:(e,t,r)=>{"use strict";const n=r(3837);function s(e={}){const t=new WeakSet;return function(r,n){if("object"==typeof n&&null!==n){if(t.has(n))return;t.add(n)}return o(0,n,e)}}function o(e,t,r={}){const n=!1!==r?.serializeMapAndSet;return t instanceof Error?t.stack:t?"function"==typeof t?`[function] ${t.toString()}`:n&&t instanceof Map&&Object.fromEntries?Object.fromEntries(t):n&&t instanceof Set&&Array.from?Array.from(t):t:t}e.exports={serialize:o,maxDepth({data:t,transport:r,depth:n=r?.depth??6}){if(!t)return t;if(n<1)return Array.isArray(t)?"[array]":"object"==typeof t&&t?"[object]":t;if(Array.isArray(t))return t.map((t=>e.exports.maxDepth({data:t,depth:n-1})));if("object"!=typeof t)return t;if(t&&"function"==typeof t.toISOString)return t;if(null===t)return null;if(t instanceof Error)return t;const s={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(s[r]=e.exports.maxDepth({data:t[r],depth:n-1}));return s},toJSON:({data:e})=>JSON.parse(JSON.stringify(e,s())),toString({data:e,transport:t}){const r=t?.inspectOptions||{},o=e.map((e=>{if(void 0!==e)try{const t=JSON.stringify(e,s()," ");return void 0===t?void 0:JSON.parse(t)}catch(t){return e}}));return n.formatWithOptions(r,...o)}}},2163:e=>{"use strict";e.exports={transformStyles:s,applyAnsiStyles:({data:e})=>s(e,r,n),removeStyles:({data:e})=>s(e,(()=>""))};const t={unset:"",black:"",red:"",green:"",yellow:"",blue:"",magenta:"",cyan:"",white:""};function r(e){const r=e.replace(/color:\s*(\w+).*/,"$1").toLowerCase();return t[r]||""}function n(e){return e+t.unset}function s(e,t,r){const n={};return e.reduce(((e,s,o,i)=>{if(n[o])return e;if("string"==typeof s){let e=o,a=!1;s=s.replace(/%[1cdfiOos]/g,(r=>{if(e+=1,"%c"!==r)return r;const o=i[e];return"string"==typeof o?(n[e]=!0,a=!0,t(o,s)):r})),a&&r&&(s=r(s))}return e.push(s),e}),[])}},6829:e=>{"use strict";e.exports={transform:function({logger:e,message:t,transport:r,initialData:n=t?.data||[],transforms:s=r?.transforms}){return s.reduce(((n,s)=>"function"==typeof s?s({data:n,logger:e,message:t,transport:r}):n),n)}}},429:(e,t,r)=>{"use strict";const{concatFirstStringElements:n,format:s}=r(1888),{maxDepth:o,toJSON:i}=r(2189),{applyAnsiStyles:a,removeStyles:c}=r(2163),{transform:l}=r(6829),u={error:console.error,warn:console.warn,info:console.info,verbose:console.info,debug:console.debug,silly:console.debug,log:console.log};e.exports=f;const d=`%c{h}:{i}:{s}.{ms}{scope}%c ${"win32"===process.platform?">":"›"} {text}`;function f(e){return Object.assign((function t(r){const n=l({logger:e,message:r,transport:t});t.writeFn({message:{...r,data:n}})}),{format:d,level:"silly",transforms:[h,s,p,n,o,i],useStyles:process.env.FORCE_STYLES,writeFn({message:e}){(u[e.level]||u.info)(...e.data)}})}function h({data:e,message:t,transport:r}){return r.format!==d?e:[`color:${m(t.level)}`,"color:unset",...e]}function p(e){const{message:t,transport:r}=e;return(function(e,t){if("boolean"==typeof e)return e;const r="error"===t||"warn"===t?process.stderr:process.stdout;return r&&r.isTTY}(r.useStyles,t.level)?a:c)(e)}function m(e){const t={error:"red",warn:"yellow",info:"cyan",default:"unset"};return t[e]||t.default}Object.assign(f,{DEFAULT_FORMAT:d})},9441:(e,t,r)=>{"use strict";const n=r(2361),s=r(7147),o=r(2037);e.exports=class extends n{asyncWriteQueue=[];bytesWritten=0;hasActiveAsyncWriting=!1;path=null;initialSize=void 0;writeOptions=null;writeAsync=!1;constructor({path:e,writeOptions:t={encoding:"utf8",flag:"a",mode:438},writeAsync:r=!1}){super(),this.path=e,this.writeOptions=t,this.writeAsync=r}get size(){return this.getSize()}clear(){try{return s.writeFileSync(this.path,"",{mode:this.writeOptions.mode,flag:"w"}),this.reset(),!0}catch(e){return"ENOENT"===e.code||(this.emit("error",e,this),!1)}}crop(e){try{const t=function(e,t){const r=Buffer.alloc(t),n=s.statSync(e),o=Math.min(n.size,t),i=Math.max(0,n.size-t),a=s.openSync(e,"r"),c=s.readSync(a,r,0,o,i);return s.closeSync(a),r.toString("utf8",0,c)}(this.path,e||4096);this.clear(),this.writeLine(`[log cropped]${o.EOL}${t}`)}catch(e){this.emit("error",new Error(`Couldn't crop file ${this.path}. ${e.message}`),this)}}getSize(){if(void 0===this.initialSize)try{const e=s.statSync(this.path);this.initialSize=e.size}catch(e){this.initialSize=0}return this.initialSize+this.bytesWritten}increaseBytesWrittenCounter(e){this.bytesWritten+=Buffer.byteLength(e,this.writeOptions.encoding)}isNull(){return!1}nextAsyncWrite(){const e=this;if(this.hasActiveAsyncWriting||0===this.asyncWriteQueue.length)return;const t=this.asyncWriteQueue.join("");this.asyncWriteQueue=[],this.hasActiveAsyncWriting=!0,s.writeFile(this.path,t,this.writeOptions,(r=>{e.hasActiveAsyncWriting=!1,r?e.emit("error",new Error(`Couldn't write to ${e.path}. ${r.message}`),this):e.increaseBytesWrittenCounter(t),e.nextAsyncWrite()}))}reset(){this.initialSize=void 0,this.bytesWritten=0}toString(){return this.path}writeLine(e){if(e+=o.EOL,this.writeAsync)return this.asyncWriteQueue.push(e),void this.nextAsyncWrite();try{s.writeFileSync(this.path,e,this.writeOptions),this.increaseBytesWrittenCounter(e)}catch(e){this.emit("error",new Error(`Couldn't write to ${this.path}. ${e.message}`),this)}}}},8126:(e,t,r)=>{"use strict";const n=r(2361),s=r(7147),o=r(1017),i=r(9441),a=r(8392);e.exports=class extends n{store={};constructor(){super(),this.emitError=this.emitError.bind(this)}provide({filePath:e,writeOptions:t,writeAsync:r=!1}){let n;try{if(e=o.resolve(e),this.store[e])return this.store[e];n=this.createFile({filePath:e,writeOptions:t,writeAsync:r})}catch(t){n=new a({path:e}),this.emitError(t,n)}return n.on("error",this.emitError),this.store[e]=n,n}createFile({filePath:e,writeOptions:t,writeAsync:r}){return this.testFileWriting(e),new i({path:e,writeOptions:t,writeAsync:r})}emitError(e,t){this.emit("error",e,t)}testFileWriting(e){s.mkdirSync(o.dirname(e),{recursive:!0}),s.writeFileSync(e,"",{flag:"a"})}}},8392:(e,t,r)=>{"use strict";const n=r(9441);e.exports=class extends n{clear(){}crop(){}getSize(){return 0}isNull(){return!0}writeLine(){}}},1688:(e,t,r)=>{"use strict";const n=r(7147),s=r(1017),o=r(2037),i=r(8126),a=r(1230),{transform:c}=r(6829),{removeStyles:l}=r(2163),{format:u}=r(1888),{toString:d}=r(2189);e.exports=function(e,t=f){let r;return t.listenerCount("error")<1&&t.on("error",((e,t)=>{p(`Can't write to ${t}`,e)})),Object.assign(i,{fileName:h(e.variables.processType),format:"[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}]{scope} {text}",getFile:m,inspectOptions:{depth:5},level:"silly",maxSize:1048576,readAllLogs:function({fileFilter:e=(e=>e.endsWith(".log"))}={}){const t=s.dirname(i.resolvePathFn(r));return n.readdirSync(t).map((e=>s.join(t,e))).filter(e).map((e=>{try{return{path:e,lines:n.readFileSync(e,"utf8").split(o.EOL)}}catch{return null}})).filter(Boolean)},sync:!0,transforms:[l,u,d],writeOptions:{flag:"a",mode:438,encoding:"utf8"},archiveLogFn(e){const t=e.toString(),r=s.parse(t);try{n.renameSync(t,s.join(r.dir,`${r.name}.old${r.ext}`))}catch(t){p("Could not rotate log",t);const r=Math.round(i.maxSize/4);e.crop(Math.min(r,262144))}},resolvePathFn:e=>s.join(e.libraryDefaultDir,e.fileName)});function i(t){const r=m(t);i.maxSize>0&&r.size>i.maxSize&&(i.archiveLogFn(r),r.reset());const n=c({logger:e,message:t,transport:i});r.writeLine(n)}function p(t,r=null,n="error"){const s=[`electron-log.transports.file: ${t}`];r&&s.push(r),e.transports.console({data:s,date:new Date,level:n})}function m(e){r||(r=Object.create(Object.prototype,{...Object.getOwnPropertyDescriptors(a.getPathVariables(process.platform)),fileName:{get:()=>i.fileName,enumerable:!0}}),"function"==typeof i.archiveLog&&(i.archiveLogFn=i.archiveLog,p("archiveLog is deprecated. Use archiveLogFn instead")),"function"==typeof i.resolvePath&&(i.resolvePathFn=i.resolvePath,p("resolvePath is deprecated. Use resolvePathFn instead")));const n=i.resolvePathFn(r,e);return t.provide({filePath:n,writeAsync:!i.sync,writeOptions:i.writeOptions})}};const f=new i;function h(e=process.type){switch(e){case"renderer":return"renderer.log";case"worker":return"worker.log";default:return"main.log"}}},2628:(e,t,r)=>{"use strict";const n=r(7147),s=r(1017);function o(...e){if(!e[0])return null;try{const t=function(e,t){let r=t;for(;;){const t=s.parse(r),o=t.root,i=t.dir;if(n.existsSync(s.join(r,e)))return s.resolve(s.join(r,e));if(r===o)return null;r=i}}("package.json",s.join(...e));if(!t)return null;const r=JSON.parse(n.readFileSync(t,"utf8")),o=r.productName||r.name;if(!o||"electron"===o.toLowerCase())return null;if(r.productName||r.name)return{name:o,version:r.version}}catch(e){return null}}e.exports={readPackageJson:function(){return o(r.c[r.s]&&r.c[r.s].filename)||o(function(){const e=process.argv.filter((e=>0===e.indexOf("--user-data-dir=")));return 0===e.length||"string"!=typeof e[0]?null:e[0].replace("--user-data-dir=","")}())||o(process.resourcesPath,"app.asar")||o(process.resourcesPath,"app")||o(process.cwd())||{name:null,version:null}},tryReadJsonAt:o}},1230:(e,t,r)=>{"use strict";const n=r(2037),s=r(1017),o=r(2674),i=r(2628);function a(e){const t=o.getPath("appData");if(t)return t;const r=c();switch(e){case"darwin":return s.join(r,"Library/Application Support");case"win32":return process.env.APPDATA||s.join(r,"AppData/Roaming");default:return process.env.XDG_CONFIG_HOME||s.join(r,".config")}}function c(){return n.homedir?n.homedir():process.env.HOME}function l(e,t){return"darwin"===e?s.join(c(),"Library/Logs",t):s.join(f(e,t),"logs")}function u(e){return"darwin"===e?s.join(c(),"Library/Logs","{appName}"):s.join(a(e),"{appName}","logs")}function d(){let e=o.getName()||"",t=o.getVersion();if("electron"===e.toLowerCase()&&(e="",t=""),e&&t)return{name:e,version:t};const r=i.readPackageJson();return e||(e=r.name),t||(t=r.version),e||(e="Electron"),{name:e,version:t}}function f(e,t){return o.getName()!==t?s.join(a(e),t):o.getPath("userData")||s.join(a(e),t)}e.exports={getAppData:a,getLibraryDefaultDir:l,getLibraryTemplate:u,getNameAndVersion:d,getPathVariables:function(e){const t=d(),r=t.name,s=t.version;return{appData:a(e),appName:r,appVersion:s,get electronDefaultDir(){return o.getPath("logs")},home:c(),libraryDefaultDir:l(e,r),libraryTemplate:u(e),temp:o.getPath("temp")||n.tmpdir(),userData:f(e,r)}},getUserData:f}},7988:(e,t,r)=>{"use strict";const n=r(3685),s=r(5687),{transform:o}=r(6829),{removeStyles:i}=r(2163),{toJSON:a,maxDepth:c}=r(2189);e.exports=function(e){return Object.assign(t,{client:{name:"electron-application"},depth:6,level:!1,requestOptions:{},transforms:[i,a,c],makeBodyFn:({message:e})=>JSON.stringify({client:t.client,data:e.data,date:e.date.getTime(),level:e.level,scope:e.scope,variables:e.variables}),processErrorFn({error:r}){e.processMessage({data:[`electron-log: can't POST ${t.url}`,r],level:"warn"},{transports:["console","file"]})},sendRequestFn({serverUrl:e,requestOptions:t,body:r}){const o=(e.startsWith("https:")?s:n).request(e,{method:"POST",...t,headers:{"Content-Type":"application/json","Content-Length":r.length,...t.headers}});return o.write(r),o.end(),o}});function t(r){if(!t.url)return;const n=t.makeBodyFn({logger:e,message:{...r,data:o({logger:e,message:r,transport:t})},transport:t}),s=t.sendRequestFn({serverUrl:t.url,requestOptions:t.requestOptions,body:Buffer.from(n,"utf8")});s.on("error",(n=>t.processErrorFn({error:n,logger:e,message:r,request:s,transport:t})))}}},9654:(e,t,r)=>{"use strict";let n={};try{n=r(2298)}catch(e){}function s({contextBridge:e,ipcRenderer:t}){if(!t)return;t.on("__ELECTRON_LOG_IPC__",((e,t)=>{window.postMessage({cmd:"message",...t})})),t.invoke("__ELECTRON_LOG__",{cmd:"getOptions"}).catch((e=>console.error(new Error(`electron-log isn't initialized in the main process. Please call log.initialize() before. ${e.message}`))));const r={sendToMain(e){try{t.send("__ELECTRON_LOG__",e)}catch(r){console.error("electronLog.sendToMain ",r,"data:",e),t.send("__ELECTRON_LOG__",{cmd:"errorHandler",error:{message:r?.message,stack:r?.stack},errorName:"sendToMain"})}},log(...e){r.sendToMain({data:e,level:"info"})}};for(const e of["error","warn","info","verbose","debug","silly"])r[e]=(...t)=>r.sendToMain({data:t,level:e});if(e&&process.contextIsolated)try{e.exposeInMainWorld("__electronLog",r)}catch{}"object"==typeof window?window.__electronLog=r:__electronLog=r}n.ipcRenderer&&s(n),e.exports=s},9618:(e,t,r)=>{"use strict";const n=r(2666),s=r(3893),o=r(6448),i=r(8671);e.exports=function(){const e=new n({allowUnknownLevel:!0,errorHandler:new s,initializeFn:()=>{},logId:"default",transportFactories:{console:o,ipc:i},variables:{processType:"renderer"}});return e.errorHandler.setOptions({logFn({error:t,errorName:r,showDialog:n}){e.transports.console({data:[r,t].filter(Boolean),level:"error"}),e.transports.ipc({cmd:"errorHandler",error:{cause:t?.cause,code:t?.code,name:t?.name,message:t?.message,stack:t?.stack},errorName:r,logId:e.logId,showDialog:n})}}),"object"==typeof window&&window.addEventListener("message",(e=>{const{cmd:t,logId:r,...s}=e.data||{},o=n.getInstance({logId:r});"message"===t&&o.processMessage(s,{transports:["console"]})})),new Proxy(e,{get:(t,r)=>void 0!==t[r]?t[r]:(...t)=>e.logData(t,{level:r})})}(),e.exports.Logger=n,e.exports.default=e.exports},3893:e=>{"use strict";const t=console.error;e.exports=class{logFn=null;onError=null;showDialog=!1;preventDefault=!0;constructor({logFn:e=null}={}){this.handleError=this.handleError.bind(this),this.handleRejection=this.handleRejection.bind(this),this.startCatching=this.startCatching.bind(this),this.logFn=e}handle(e,{logFn:r=this.logFn,errorName:n="",onError:s=this.onError,showDialog:o=this.showDialog}={}){try{!1!==s?.({error:e,errorName:n,processType:"renderer"})&&r({error:e,errorName:n,showDialog:o})}catch{t(e)}}setOptions({logFn:e,onError:t,preventDefault:r,showDialog:n}){"function"==typeof e&&(this.logFn=e),"function"==typeof t&&(this.onError=t),"boolean"==typeof r&&(this.preventDefault=r),"boolean"==typeof n&&(this.showDialog=n)}startCatching({onError:e,showDialog:t}={}){this.isActive||(this.isActive=!0,this.setOptions({onError:e,showDialog:t}),window.addEventListener("error",(e=>{this.preventDefault&&e.preventDefault?.(),this.handleError(e.error||e)})),window.addEventListener("unhandledrejection",(e=>{this.preventDefault&&e.preventDefault?.(),this.handleRejection(e.reason||e)})))}handleError(e){this.handle(e,{errorName:"Unhandled"})}handleRejection(e){const t=e instanceof Error?e:new Error(JSON.stringify(e));this.handle(t,{errorName:"Unhandled rejection"})}}},6448:e=>{"use strict";e.exports=function(e){return Object.assign(r,{format:"{h}:{i}:{s}.{ms}{scope} › {text}",formatDataFn:({data:t=[],date:n=new Date,format:s=r.format,logId:o=e.logId,scope:i=e.scopeName,...a})=>"function"==typeof s?s({...a,data:t,date:n,logId:o,scope:i}):("string"!=typeof s||(t.unshift(s),"string"==typeof t[1]&&t[1].match(/%[1cdfiOos]/)&&(t=[`${t[0]} ${t[1]}`,...t.slice(2)]),t[0]=t[0].replace(/\{(\w+)}/g,((e,t)=>{switch(t){case"level":return a.level;case"logId":return o;case"scope":return i?` (${i})`:"";case"text":return"";case"y":return n.getFullYear().toString(10);case"m":return(n.getMonth()+1).toString(10).padStart(2,"0");case"d":return n.getDate().toString(10).padStart(2,"0");case"h":return n.getHours().toString(10).padStart(2,"0");case"i":return n.getMinutes().toString(10).padStart(2,"0");case"s":return n.getSeconds().toString(10).padStart(2,"0");case"ms":return n.getMilliseconds().toString(10).padStart(3,"0");case"iso":return n.toISOString();default:return a.variables?.[t]||e}})).trim()),t),writeFn({message:{level:e,data:r}}){const n=t[e]||t.info;setTimeout((()=>n(...r)))}});function r(e){r.writeFn({message:{...e,data:r.formatDataFn(e)}})}};const t={error:console.error,warn:console.warn,info:console.info,verbose:console.info,debug:console.debug,silly:console.debug,log:console.log}},8671:e=>{"use strict";e.exports=function(e){return Object.assign(r,{depth:5,serializeFn:(e,{depth:n=5,seen:s=new WeakSet}={})=>n<1?`[${typeof e}]`:s.has(e)?e:["function","symbol"].includes(typeof e)?e.toString():Object(e)!==e?e:t.has(e.constructor)?`[${e.constructor.name}]`:Array.isArray(e)?e.map((e=>r.serializeFn(e,{depth:n-1,seen:s}))):e instanceof Error?e.stack:e instanceof Map?new Map(Array.from(e).map((([e,t])=>[r.serializeFn(e,{depth:n-1,seen:s}),r.serializeFn(t,{depth:n-1,seen:s})]))):e instanceof Set?new Set(Array.from(e).map((e=>r.serializeFn(e,{depth:n-1,seen:s})))):(s.add(e),Object.fromEntries(Object.entries(e).map((([e,t])=>[e,r.serializeFn(t,{depth:n-1,seen:s})]))))});function r(t){if(window.__electronLog)try{__electronLog.sendToMain(r.serializeFn(t,{depth:r.depth}))}catch(r){e.transports.console({data:["electronLog.transports.ipc",r,"data:",t.data],level:"error"})}else e.processMessage({data:["electron-log: logger isn't initialized in the main process"],level:"error"},{transports:["console"]})}};const t=new Set([Promise,WeakMap,WeakSet])},6143:(e,t,r)=>{"use strict";const n=r(1017),{app:s,ipcMain:o,ipcRenderer:i,shell:a}=r(2298),c=r(9658);let l=!1;const u=()=>{if(!o||!s)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");const e={defaultCwd:s.getPath("userData"),appVersion:s.getVersion()};return l||(o.on("electron-store-get-data",(t=>{t.returnValue=e})),l=!0),e};e.exports=class extends c{constructor(e){let t,r;if(i){const e=i.sendSync("electron-store-get-data");if(!e)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");({defaultCwd:t,appVersion:r}=e)}else o&&s&&({defaultCwd:t,appVersion:r}=u());(e={name:"config",...e}).projectVersion||(e.projectVersion=r),e.cwd?e.cwd=n.isAbsolute(e.cwd)?e.cwd:n.join(t,e.cwd):e.cwd=t,e.configName=e.name,delete e.name,super(e)}static initRenderer(){u()}openInEditor(){a.openPath(this.path)}}},1766:(e,t,r)=>{"use strict";const n=r(1017),s=r(2037),o=s.homedir(),i=s.tmpdir(),{env:a}=process,c=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected string, got "+typeof e);return(t=Object.assign({suffix:"nodejs"},t)).suffix&&(e+=`-${t.suffix}`),"darwin"===process.platform?(e=>{const t=n.join(o,"Library");return{data:n.join(t,"Application Support",e),config:n.join(t,"Preferences",e),cache:n.join(t,"Caches",e),log:n.join(t,"Logs",e),temp:n.join(i,e)}})(e):"win32"===process.platform?(e=>{const t=a.APPDATA||n.join(o,"AppData","Roaming"),r=a.LOCALAPPDATA||n.join(o,"AppData","Local");return{data:n.join(r,e,"Data"),config:n.join(t,e,"Config"),cache:n.join(r,e,"Cache"),log:n.join(r,e,"Log"),temp:n.join(i,e)}})(e):(e=>{const t=n.basename(o);return{data:n.join(a.XDG_DATA_HOME||n.join(o,".local","share"),e),config:n.join(a.XDG_CONFIG_HOME||n.join(o,".config"),e),cache:n.join(a.XDG_CACHE_HOME||n.join(o,".cache"),e),log:n.join(a.XDG_STATE_HOME||n.join(o,".local","state"),e),temp:n.join(i,t,e)}})(e)};e.exports=c,e.exports.default=c},4063:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(s=n;0!=s--;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(s=n;0!=s--;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;0!=s--;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!=t&&r!=r}},9516:(e,t,r)=>{"use strict";const n=r(1017),s=r(6401);e.exports=(e,t={})=>{const r=n.resolve(t.cwd||""),{root:o}=n.parse(r),i=[].concat(e);return new Promise((e=>{!function t(r){s(i,{cwd:r}).then((s=>{s?e(n.join(r,s)):r===o?e(null):t(n.dirname(r))}))}(r)}))},e.exports.sync=(e,t={})=>{let r=n.resolve(t.cwd||"");const{root:o}=n.parse(r),i=[].concat(e);for(;;){const e=s.sync(i,{cwd:r});if(e)return n.join(r,e);if(r===o)return null;r=n.dirname(r)}}},4290:e=>{"use strict";e.exports=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)}},6401:(e,t,r)=>{"use strict";const n=r(1017),s=r(6789),o=r(1885);e.exports=(e,t)=>(t=Object.assign({cwd:process.cwd()},t),o(e,(e=>s(n.resolve(t.cwd,e))),t)),e.exports.sync=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const r of e)if(s.sync(n.resolve(t.cwd,r)))return r}},6789:(e,t,r)=>{"use strict";const n=r(7147);e.exports=e=>new Promise((t=>{n.access(e,(e=>{t(!e)}))})),e.exports.sync=e=>{try{return n.accessSync(e),!0}catch(e){return!1}}},9593:(e,t,r)=>{"use strict";const n=r(4411),s=Symbol("max"),o=Symbol("length"),i=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),u=Symbol("noDisposeOnSet"),d=Symbol("lruList"),f=Symbol("cache"),h=Symbol("updateAgeOnGet"),p=()=>1,m=(e,t,r)=>{const n=e[f].get(t);if(n){const t=n.value;if(y(e,t)){if(v(e,n),!e[a])return}else r&&(e[h]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},g=e=>{if(e[o]>e[s])for(let t=e[d].tail;e[o]>e[s]&&null!==t;){const r=t.prev;v(e,t),t=r}},v=(e,t)=>{if(t){const r=t.value;e[l]&&e[l](r.key,r.value),e[o]-=r.length,e[f].delete(r.key),e[d].removeNode(t)}};class w{constructor(e,t,r,n,s){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=s||0}}const E=(e,t,r,n)=>{let s=r.value;y(e,s)&&(v(e,r),e[a]||(s=void 0)),s&&t.call(n,s.value,s.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[s]=e.max||1/0;const t=e.length||p;if(this[i]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[l]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[s]=e||1/0,g(this)}get max(){return this[s]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,g(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[i]&&(this[i]=e,this[o]=0,this[d].forEach((e=>{e.length=this[i](e.value,e.key),this[o]+=e.length}))),g(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;E(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;E(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[l]&&this[d]&&this[d].length&&this[d].forEach((e=>this[l](e.key,e.value))),this[f]=new Map,this[d]=new n,this[o]=0}dump(){return this[d].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[i](t,e);if(this[f].has(e)){if(a>this[s])return v(this,this[f].get(e)),!1;const i=this[f].get(e).value;return this[l]&&(this[u]||this[l](e,i.value)),i.now=n,i.maxAge=r,i.value=t,this[o]+=a-i.length,i.length=a,this.get(e),g(this),!0}const h=new w(e,t,a,n,r);return h.length>this[s]?(this[l]&&this[l](e,t),!1):(this[o]+=h.length,this[d].unshift(h),this[f].set(e,this[d].head),g(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!y(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[d].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],s=n.e||0;if(0===s)this.set(n.k,n.v);else{const e=s-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[f].forEach(((e,t)=>m(this,t,!1)))}}},4341:e=>{"use strict";const t=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};e.exports=t,e.exports.default=t},1572:function(e,t,r){e.exports=(r(2081),r(6113),function(e){function t(n){if(r[n])return r[n].exports;var s=r[n]={exports:{},id:n,loaded:!1};return e[n].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(34)},function(e,t,r){var n=r(29)("wks"),s=r(33),o=r(2).Symbol,i="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=i&&o[e]||(i?o:s)("Symbol."+e))}).store=n},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(9);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){e.exports=!r(24)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,r){var n=r(12),s=r(17);e.exports=r(4)?function(e,t,r){return n.f(e,t,s(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(14);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,s){return e.call(t,r,n,s)}}return function(){return e.apply(t,arguments)}}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){var n=r(3),s=r(26),o=r(32),i=Object.defineProperty;t.f=r(4)?Object.defineProperty:function(e,t,r){if(n(e),t=o(t,!0),n(r),s)try{return i(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(42),s=r(15);e.exports=function(e){return n(s(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){var n=r(9),s=r(2).document,o=n(s)&&n(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){var n=r(12).f,s=r(8),o=r(1)("toStringTag");e.exports=function(e,t,r){e&&!s(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,r){var n=r(29)("keys"),s=r(33);e.exports=function(e){return n[e]||(n[e]=s(e))}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(11),s=r(1)("toStringTag"),o="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),s))?r:o?n(t):"Object"==(i=n(t))&&"function"==typeof t.callee?"Arguments":i}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){var n=r(2),s=r(6),o=r(7),i=r(5),a="prototype",c=function(e,t,r){var l,u,d,f=e&c.F,h=e&c.G,p=e&c.S,m=e&c.P,y=e&c.B,g=e&c.W,v=h?s:s[t]||(s[t]={}),w=v[a],E=h?n:p?n[t]:(n[t]||{})[a];for(l in h&&(r=t),r)(u=!f&&E&&void 0!==E[l])&&l in v||(d=u?E[l]:r[l],v[l]=h&&"function"!=typeof E[l]?r[l]:y&&u?o(d,n):g&&E[l]==d?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[a]=e[a],t}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((v.virtual||(v.virtual={}))[l]=d,e&c.R&&w&&!w[l]&&i(w,l,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){e.exports=r(2).document&&document.documentElement},function(e,t,r){e.exports=!r(4)&&!r(24)((function(){return 7!=Object.defineProperty(r(16)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,r){"use strict";var n=r(28),s=r(23),o=r(57),i=r(5),a=r(8),c=r(10),l=r(45),u=r(18),d=r(52),f=r(1)("iterator"),h=!([].keys&&"next"in[].keys()),p="keys",m="values",y=function(){return this};e.exports=function(e,t,r,g,v,w,E){l(r,t,g);var $,_,b,S=function(e){if(!h&&e in N)return N[e];switch(e){case p:case m:return function(){return new r(this,e)}}return function(){return new r(this,e)}},O=t+" Iterator",P=v==m,x=!1,N=e.prototype,I=N[f]||N["@@iterator"]||v&&N[v],j=I||S(v),R=v?P?S("entries"):j:void 0,A="Array"==t&&N.entries||I;if(A&&(b=d(A.call(new e)))!==Object.prototype&&(u(b,O,!0),n||a(b,f)||i(b,f,y)),P&&I&&I.name!==m&&(x=!0,j=function(){return I.call(this)}),n&&!E||!h&&!x&&N[f]||i(N,f,j),c[t]=j,c[O]=y,v)if($={values:P?j:S(m),keys:w?j:S(p),entries:R},E)for(_ in $)_ in N||o(N,_,$[_]);else s(s.P+s.F*(h||x),t,$);return $}},function(e,t){e.exports=!0},function(e,t,r){var n=r(2),s="__core-js_shared__",o=n[s]||(n[s]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,r){var n,s,o,i=r(7),a=r(41),c=r(25),l=r(16),u=r(2),d=u.process,f=u.setImmediate,h=u.clearImmediate,p=u.MessageChannel,m=0,y={},g="onreadystatechange",v=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},w=function(e){v.call(e.data)};f&&h||(f=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return y[++m]=function(){a("function"==typeof e?e:Function(e),t)},n(m),m},h=function(e){delete y[e]},"process"==r(11)(d)?n=function(e){d.nextTick(i(v,e,1))}:p?(o=(s=new p).port2,s.port1.onmessage=w,n=i(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(n=function(e){u.postMessage(e+"","*")},u.addEventListener("message",w,!1)):n=g in l("script")?function(e){c.appendChild(l("script"))[g]=function(){c.removeChild(this),v.call(e)}}:function(e){setTimeout(i(v,e,1),0)}),e.exports={set:f,clear:h}},function(e,t,r){var n=r(20),s=Math.min;e.exports=function(e){return e>0?s(n(e),9007199254740991):0}},function(e,t,r){var n=r(9);e.exports=function(e,t){if(!n(e))return e;var r,s;if(t&&"function"==typeof(r=e.toString)&&!n(s=r.call(e)))return s;if("function"==typeof(r=e.valueOf)&&!n(s=r.call(e)))return s;if(!t&&"function"==typeof(r=e.toString)&&!n(s=r.call(e)))return s;throw TypeError("Can't convert object to primitive value")}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){"use strict";function n(e){return(0,a.createHash)("sha256").update(e).digest("hex")}function s(e){switch(c){case"darwin":return e.split("IOPlatformUUID")[1].split("\n")[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error("Unsupported platform: "+process.platform)}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){return e&&e.__esModule?e:{default:e}}(r(35));t.machineIdSync=function(e){var t=s((0,i.execSync)(l[c]).toString());return e?t:n(t)},t.machineId=function(e){return new o.default((function(t,r){return(0,i.exec)(l[c],{},(function(o,i,a){if(o)return r(new Error("Error while obtaining machine id: "+o.stack));var c=s(i.toString());return t(e?c:n(c))}))}))};var i=r(70),a=r(71),c=process.platform,l={darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:{native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"}["win32"!==process.platform?"":"ia32"===process.arch&&process.env.hasOwnProperty("PROCESSOR_ARCHITEW6432")?"mixed":"native"]+"\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"}},function(e,t,r){e.exports={default:r(36),__esModule:!0}},function(e,t,r){r(66),r(68),r(69),r(67),e.exports=r(6).Promise},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){var n=r(13),s=r(31),o=r(62);e.exports=function(e){return function(t,r,i){var a,c=n(t),l=s(c.length),u=o(i,l);if(e&&r!=r){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}}},function(e,t,r){var n=r(7),s=r(44),o=r(43),i=r(3),a=r(31),c=r(64),l={},u={};t=e.exports=function(e,t,r,d,f){var h,p,m,y,g=f?function(){return e}:c(e),v=n(r,d,t?2:1),w=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(o(g)){for(h=a(e.length);h>w;w++)if((y=t?v(i(p=e[w])[0],p[1]):v(e[w]))===l||y===u)return y}else for(m=g.call(e);!(p=m.next()).done;)if((y=s(m,v,p.value,t))===l||y===u)return y},t.BREAK=l,t.RETURN=u},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){var n=r(10),s=r(1)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||o[s]===e)}},function(e,t,r){var n=r(3);e.exports=function(e,t,r,s){try{return s?t(n(r)[0],r[1]):t(r)}catch(t){var o=e.return;throw void 0!==o&&n(o.call(e)),t}}},function(e,t,r){"use strict";var n=r(49),s=r(17),o=r(18),i={};r(5)(i,r(1)("iterator"),(function(){return this})),e.exports=function(e,t,r){e.prototype=n(i,{next:s(1,r)}),o(e,t+" Iterator")}},function(e,t,r){var n=r(1)("iterator"),s=!1;try{var o=[7][n]();o.return=function(){s=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!s)return!1;var r=!1;try{var o=[7],i=o[n]();i.next=function(){return{done:r=!0}},o[n]=function(){return i},e(o)}catch(e){}return r}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){var n=r(2),s=r(30).set,o=n.MutationObserver||n.WebKitMutationObserver,i=n.process,a=n.Promise,c="process"==r(11)(i);e.exports=function(){var e,t,r,l=function(){var n,s;for(c&&(n=i.domain)&&n.exit();e;){s=e.fn,e=e.next;try{s()}catch(n){throw e?r():t=void 0,n}}t=void 0,n&&n.enter()};if(c)r=function(){i.nextTick(l)};else if(o){var u=!0,d=document.createTextNode("");new o(l).observe(d,{characterData:!0}),r=function(){d.data=u=!u}}else if(a&&a.resolve){var f=a.resolve();r=function(){f.then(l)}}else r=function(){s.call(n,l)};return function(n){var s={fn:n,next:void 0};t&&(t.next=s),e||(e=s,r()),t=s}}},function(e,t,r){var n=r(3),s=r(50),o=r(22),i=r(19)("IE_PROTO"),a=function(){},c="prototype",l=function(){var e,t=r(16)("iframe"),n=o.length;for(t.style.display="none",r(25).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("