@famibee/skynovel 1.48.13 → 1.63.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/CallStack.js +25 -0
- package/dist/CallStack.js.map +1 -0
- package/dist/EventMng.js +1588 -0
- package/dist/EventMng.js.map +1 -0
- package/dist/LayerMng.js +2924 -0
- package/dist/LayerMng.js.map +1 -0
- package/dist/PropParser.js +833 -0
- package/dist/PropParser.js.map +1 -0
- package/dist/Reading.js +784 -0
- package/dist/Reading.js.map +1 -0
- package/dist/ScriptIterator.js +1125 -0
- package/dist/ScriptIterator.js.map +1 -0
- package/dist/SndBuf.js +1519 -0
- package/dist/SndBuf.js.map +1 -0
- package/dist/SoundMng.js +136 -0
- package/dist/SoundMng.js.map +1 -0
- package/dist/Variable.js +479 -0
- package/dist/Variable.js.map +1 -0
- package/dist/app.d.ts +5 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/appMain.d.ts +6 -6
- package/dist/appMain.d.ts.map +1 -1
- package/dist/appMain_cmn.d.ts +30 -0
- package/dist/appMain_cmn.d.ts.map +1 -0
- package/dist/build.d.ts +2 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/gamepad.js +511 -0
- package/dist/gamepad.js.map +1 -0
- package/dist/index.d.ts +32 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/preload.d.ts +34 -31
- package/dist/preload.d.ts.map +1 -1
- package/dist/sn/AnalyzeTagArg.d.ts +10 -6
- package/dist/sn/AnalyzeTagArg.d.ts.map +1 -1
- package/dist/sn/Areas.d.ts +7 -5
- package/dist/sn/Areas.d.ts.map +1 -1
- package/dist/sn/Button.d.ts +2 -2
- package/dist/sn/Button.d.ts.map +1 -1
- package/dist/sn/CallStack.d.ts +12 -5
- package/dist/sn/CallStack.d.ts.map +1 -1
- package/dist/sn/CmnInterface.d.ts +178 -117
- package/dist/sn/CmnInterface.d.ts.map +1 -1
- package/dist/sn/CmnLib.d.ts +20 -19
- package/dist/sn/CmnLib.d.ts.map +1 -1
- package/dist/sn/CmnTween.d.ts +6 -8
- package/dist/sn/CmnTween.d.ts.map +1 -1
- package/dist/sn/Config.d.ts +6 -4
- package/dist/sn/Config.d.ts.map +1 -1
- package/dist/sn/ConfigBase.d.ts +39 -24
- package/dist/sn/ConfigBase.d.ts.map +1 -1
- package/dist/sn/DebugMng.d.ts +3 -2
- package/dist/sn/DebugMng.d.ts.map +1 -1
- package/dist/sn/DesignCast.d.ts +5 -6
- package/dist/sn/DesignCast.d.ts.map +1 -1
- package/dist/sn/EventListenerCtn.d.ts +3 -3
- package/dist/sn/EventListenerCtn.d.ts.map +1 -1
- package/dist/sn/EventMng.d.ts +5 -11
- package/dist/sn/EventMng.d.ts.map +1 -1
- package/dist/sn/FocusMng.d.ts.map +1 -1
- package/dist/sn/FrameMng.d.ts +3 -4
- package/dist/sn/FrameMng.d.ts.map +1 -1
- package/dist/sn/Grammar.d.ts +133 -16
- package/dist/sn/Grammar.d.ts.map +1 -1
- package/dist/sn/GrpLayer.d.ts +8 -4
- package/dist/sn/GrpLayer.d.ts.map +1 -1
- package/dist/sn/Hyphenation.d.ts +42 -0
- package/dist/sn/Hyphenation.d.ts.map +1 -0
- package/dist/sn/Layer.d.ts +24 -4
- package/dist/sn/Layer.d.ts.map +1 -1
- package/dist/sn/LayerMng.d.ts +17 -24
- package/dist/sn/LayerMng.d.ts.map +1 -1
- package/dist/sn/Log.d.ts +18 -0
- package/dist/sn/Log.d.ts.map +1 -0
- package/dist/sn/Main.d.ts +4 -6
- package/dist/sn/Main.d.ts.map +1 -1
- package/dist/sn/Pages.d.ts +1 -1
- package/dist/sn/Pages.d.ts.map +1 -1
- package/dist/sn/PropParser.d.ts +2 -2
- package/dist/sn/PropParser.d.ts.map +1 -1
- package/dist/sn/Reading.d.ts +86 -0
- package/dist/sn/Reading.d.ts.map +1 -0
- package/dist/sn/RubySpliter.d.ts +1 -3
- package/dist/sn/RubySpliter.d.ts.map +1 -1
- package/dist/sn/ScriptIterator.d.ts +20 -10
- package/dist/sn/ScriptIterator.d.ts.map +1 -1
- package/dist/sn/SndBuf.d.ts +15 -5
- package/dist/sn/SndBuf.d.ts.map +1 -1
- package/dist/sn/SoundMng.d.ts +3 -2
- package/dist/sn/SoundMng.d.ts.map +1 -1
- package/dist/sn/SpritesMng.d.ts +4 -4
- package/dist/sn/SpritesMng.d.ts.map +1 -1
- package/dist/sn/SysApp.d.ts +12 -16
- package/dist/sn/SysApp.d.ts.map +1 -1
- package/dist/sn/SysBase.d.ts +24 -27
- package/dist/sn/SysBase.d.ts.map +1 -1
- package/dist/sn/SysNode.d.ts +9 -9
- package/dist/sn/SysNode.d.ts.map +1 -1
- package/dist/sn/SysWeb.d.ts +10 -14
- package/dist/sn/SysWeb.d.ts.map +1 -1
- package/dist/sn/TxtLayer.d.ts +79 -7
- package/dist/sn/TxtLayer.d.ts.map +1 -1
- package/dist/sn/TxtStage.d.ts +45 -30
- package/dist/sn/TxtStage.d.ts.map +1 -1
- package/dist/sn/Variable.d.ts +33 -13
- package/dist/sn/Variable.d.ts.map +1 -1
- package/dist/sn/htm2tx.d.ts +3 -0
- package/dist/sn/htm2tx.d.ts.map +1 -0
- package/dist/test/AnalyzeTagArg.test.d.ts +2 -0
- package/dist/test/AnalyzeTagArg.test.d.ts.map +1 -0
- package/dist/test/AreasTest.test.d.ts +2 -0
- package/dist/test/AreasTest.test.d.ts.map +1 -0
- package/dist/test/CmnLib.test.d.ts +2 -0
- package/dist/test/CmnLib.test.d.ts.map +1 -0
- package/dist/test/Config.test.d.ts +2 -0
- package/dist/test/Config.test.d.ts.map +1 -0
- package/dist/test/Grammar.test.d.ts +2 -0
- package/dist/test/Grammar.test.d.ts.map +1 -0
- package/dist/test/HyphTest.test.d.ts +2 -0
- package/dist/test/HyphTest.test.d.ts.map +1 -0
- package/dist/test/Log.test.d.ts +2 -0
- package/dist/test/Log.test.d.ts.map +1 -0
- package/dist/test/PropParser.test.d.ts +2 -0
- package/dist/test/PropParser.test.d.ts.map +1 -0
- package/dist/test/RubySpliter.test.d.ts +2 -0
- package/dist/test/RubySpliter.test.d.ts.map +1 -0
- package/dist/test/SysTest.d.ts +5 -0
- package/dist/test/SysTest.d.ts.map +1 -0
- package/dist/test/ValTest.d.ts +31 -0
- package/dist/test/ValTest.d.ts.map +1 -0
- package/dist/test/Variable.test.d.ts +2 -0
- package/dist/test/Variable.test.d.ts.map +1 -0
- package/dist/web.d.ts +5 -1
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +6 -30102
- package/dist/web.js.map +1 -1
- package/dist/web2.js +23020 -0
- package/dist/web2.js.map +1 -0
- package/dist_app/CallStack.js +25 -0
- package/dist_app/CallStack.js.map +1 -0
- package/dist_app/EventMng.js +1588 -0
- package/dist_app/EventMng.js.map +1 -0
- package/dist_app/LayerMng.js +2924 -0
- package/dist_app/LayerMng.js.map +1 -0
- package/dist_app/PropParser.js +833 -0
- package/dist_app/PropParser.js.map +1 -0
- package/dist_app/Reading.js +784 -0
- package/dist_app/Reading.js.map +1 -0
- package/dist_app/ScriptIterator.js +1125 -0
- package/dist_app/ScriptIterator.js.map +1 -0
- package/dist_app/SndBuf.js +1519 -0
- package/dist_app/SndBuf.js.map +1 -0
- package/dist_app/SoundMng.js +136 -0
- package/dist_app/SoundMng.js.map +1 -0
- package/dist_app/Variable.js +479 -0
- package/dist_app/Variable.js.map +1 -0
- package/dist_app/app.d.ts +9 -0
- package/dist_app/app.d.ts.map +1 -0
- package/dist_app/app.js +9 -0
- package/dist_app/app.js.map +1 -0
- package/dist_app/app2.js +19819 -0
- package/dist_app/app2.js.map +1 -0
- package/dist_app/appMain.d.ts +9 -0
- package/dist_app/appMain.d.ts.map +1 -0
- package/dist_app/appMain.js +23 -0
- package/dist_app/appMain.js.map +1 -0
- package/dist_app/appMain_cmn.d.ts +30 -0
- package/dist_app/appMain_cmn.d.ts.map +1 -0
- package/dist_app/build.d.ts +2 -0
- package/dist_app/build.d.ts.map +1 -0
- package/dist_app/gamepad.js +511 -0
- package/dist_app/gamepad.js.map +1 -0
- package/dist_app/index.d.ts +33 -0
- package/dist_app/index.d.ts.map +1 -0
- package/dist_app/preload.d.ts +47 -0
- package/dist_app/preload.d.ts.map +1 -0
- package/dist_app/preload.js +2 -0
- package/dist_app/preload.js.map +1 -0
- package/dist_app/sn/AnalyzeTagArg.d.ts +28 -0
- package/dist_app/sn/AnalyzeTagArg.d.ts.map +1 -0
- package/dist_app/sn/Areas.d.ts +15 -0
- package/dist_app/sn/Areas.d.ts.map +1 -0
- package/dist_app/sn/Button.d.ts +23 -0
- package/dist_app/sn/Button.d.ts.map +1 -0
- package/dist_app/sn/CallStack.d.ts +23 -0
- package/dist_app/sn/CallStack.d.ts.map +1 -0
- package/dist_app/sn/CmnInterface.d.ts +227 -0
- package/dist_app/sn/CmnInterface.d.ts.map +1 -0
- package/dist_app/sn/CmnLib.d.ts +46 -0
- package/dist_app/sn/CmnLib.d.ts.map +1 -0
- package/dist_app/sn/CmnTween.d.ts +35 -0
- package/dist_app/sn/CmnTween.d.ts.map +1 -0
- package/dist_app/sn/Config.d.ts +12 -0
- package/dist_app/sn/Config.d.ts.map +1 -0
- package/dist_app/sn/ConfigBase.d.ts +111 -0
- package/dist_app/sn/ConfigBase.d.ts.map +1 -0
- package/dist_app/sn/DebugMng.d.ts +14 -0
- package/dist_app/sn/DebugMng.d.ts.map +1 -0
- package/dist_app/sn/DesignCast.d.ts +53 -0
- package/dist_app/sn/DesignCast.d.ts.map +1 -0
- package/dist_app/sn/EventListenerCtn.d.ts +13 -0
- package/dist_app/sn/EventListenerCtn.d.ts.map +1 -0
- package/dist_app/sn/EventMng.d.ts +29 -0
- package/dist_app/sn/EventMng.d.ts.map +1 -0
- package/dist_app/sn/FocusMng.d.ts +13 -0
- package/dist_app/sn/FocusMng.d.ts.map +1 -0
- package/dist_app/sn/FrameMng.d.ts +20 -0
- package/dist_app/sn/FrameMng.d.ts.map +1 -0
- package/dist_app/sn/Grammar.d.ts +291 -0
- package/dist_app/sn/Grammar.d.ts.map +1 -0
- package/dist_app/sn/GrpLayer.d.ts +49 -0
- package/dist_app/sn/GrpLayer.d.ts.map +1 -0
- package/dist_app/sn/Hyphenation.d.ts +42 -0
- package/dist_app/sn/Hyphenation.d.ts.map +1 -0
- package/dist_app/sn/Layer.d.ts +86 -0
- package/dist_app/sn/Layer.d.ts.map +1 -0
- package/dist_app/sn/LayerMng.d.ts +46 -0
- package/dist_app/sn/LayerMng.d.ts.map +1 -0
- package/dist_app/sn/Log.d.ts +18 -0
- package/dist_app/sn/Log.d.ts.map +1 -0
- package/dist_app/sn/Main.d.ts +16 -0
- package/dist_app/sn/Main.d.ts.map +1 -0
- package/dist_app/sn/Pages.d.ts +26 -0
- package/dist_app/sn/Pages.d.ts.map +1 -0
- package/dist_app/sn/PropParser.d.ts +12 -0
- package/dist_app/sn/PropParser.d.ts.map +1 -0
- package/dist_app/sn/Reading.d.ts +86 -0
- package/dist_app/sn/Reading.d.ts.map +1 -0
- package/dist_app/sn/RubySpliter.d.ts +14 -0
- package/dist_app/sn/RubySpliter.d.ts.map +1 -0
- package/dist_app/sn/ScriptIterator.d.ts +58 -0
- package/dist_app/sn/ScriptIterator.d.ts.map +1 -0
- package/dist_app/sn/SndBuf.d.ts +30 -0
- package/dist_app/sn/SndBuf.d.ts.map +1 -0
- package/dist_app/sn/SoundMng.d.ts +16 -0
- package/dist_app/sn/SoundMng.d.ts.map +1 -0
- package/dist_app/sn/SpritesMng.d.ts +27 -0
- package/dist_app/sn/SpritesMng.d.ts.map +1 -0
- package/dist_app/sn/SysApp.d.ts +32 -0
- package/dist_app/sn/SysApp.d.ts.map +1 -0
- package/dist_app/sn/SysBase.d.ts +79 -0
- package/dist_app/sn/SysBase.d.ts.map +1 -0
- package/dist_app/sn/SysNode.d.ts +15 -0
- package/dist_app/sn/SysNode.d.ts.map +1 -0
- package/dist_app/sn/SysWeb.d.ts +26 -0
- package/dist_app/sn/SysWeb.d.ts.map +1 -0
- package/dist_app/sn/TxtLayer.d.ts +121 -0
- package/dist_app/sn/TxtLayer.d.ts.map +1 -0
- package/dist_app/sn/TxtStage.d.ts +90 -0
- package/dist_app/sn/TxtStage.d.ts.map +1 -0
- package/dist_app/sn/Variable.d.ts +48 -0
- package/dist_app/sn/Variable.d.ts.map +1 -0
- package/dist_app/sn/htm2tx.d.ts +3 -0
- package/dist_app/sn/htm2tx.d.ts.map +1 -0
- package/dist_app/test/AnalyzeTagArg.test.d.ts +2 -0
- package/dist_app/test/AnalyzeTagArg.test.d.ts.map +1 -0
- package/dist_app/test/AreasTest.test.d.ts +2 -0
- package/dist_app/test/AreasTest.test.d.ts.map +1 -0
- package/dist_app/test/CmnLib.test.d.ts +2 -0
- package/dist_app/test/CmnLib.test.d.ts.map +1 -0
- package/dist_app/test/Config.test.d.ts +2 -0
- package/dist_app/test/Config.test.d.ts.map +1 -0
- package/dist_app/test/Grammar.test.d.ts +2 -0
- package/dist_app/test/Grammar.test.d.ts.map +1 -0
- package/dist_app/test/HyphTest.test.d.ts +2 -0
- package/dist_app/test/HyphTest.test.d.ts.map +1 -0
- package/dist_app/test/Log.test.d.ts +2 -0
- package/dist_app/test/Log.test.d.ts.map +1 -0
- package/dist_app/test/PropParser.test.d.ts +2 -0
- package/dist_app/test/PropParser.test.d.ts.map +1 -0
- package/dist_app/test/RubySpliter.test.d.ts +2 -0
- package/dist_app/test/RubySpliter.test.d.ts.map +1 -0
- package/dist_app/test/SysTest.d.ts +5 -0
- package/dist_app/test/SysTest.d.ts.map +1 -0
- package/dist_app/test/ValTest.d.ts +31 -0
- package/dist_app/test/ValTest.d.ts.map +1 -0
- package/dist_app/test/Variable.test.d.ts +2 -0
- package/dist_app/test/Variable.test.d.ts.map +1 -0
- package/dist_app/web.d.ts +9 -0
- package/dist_app/web.d.ts.map +1 -0
- package/package.json +57 -51
- package/dist/app.js +0 -28154
- package/dist/app.js.map +0 -1
- package/dist/appMain.js +0 -16
- package/dist/appMain.js.map +0 -1
- package/dist/preload.js +0 -2
- package/dist/preload.js.map +0 -1
- package/dist/sn/ReadState.d.ts +0 -79
- package/dist/sn/ReadState.d.ts.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("electron"),ut=require("fs"),Sf=require("constants"),Rf=require("stream"),xi=require("util"),Yl=require("assert"),me=require("path"),Ql=require("crypto"),bf=require("events"),Pf=require("os"),ef=require("zlib");var Fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={},Nt={},uo;function ve(){return uo||(uo=1,Nt.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((l,i)=>{t.push((f,s)=>f!=null?i(f):l(s)),e.apply(this,t)})},"name",{value:e.name})},Nt.fromPromise=function(e){return Object.defineProperty(function(...t){const l=t[t.length-1];if(typeof l!="function")return e.apply(this,t);t.pop(),e.apply(this,t).then(i=>l(null,i),l)},"name",{value:e.name})}),Nt}var Un,lo;function Nf(){if(lo)return Un;lo=1;var e=Sf,t=process.cwd,l=null,i=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return l||(l=t.call(process)),l};try{process.cwd()}catch{}if(typeof process.chdir=="function"){var f=process.chdir;process.chdir=function(r){l=null,f.call(process,r)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,f)}Un=s;function s(r){e.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&a(r),r.lutimes||o(r),r.chown=g(r.chown),r.fchown=g(r.fchown),r.lchown=g(r.lchown),r.chmod=c(r.chmod),r.fchmod=c(r.fchmod),r.lchmod=c(r.lchmod),r.chownSync=w(r.chownSync),r.fchownSync=w(r.fchownSync),r.lchownSync=w(r.lchownSync),r.chmodSync=d(r.chmodSync),r.fchmodSync=d(r.fchmodSync),r.lchmodSync=d(r.lchmodSync),r.stat=_(r.stat),r.fstat=_(r.fstat),r.lstat=_(r.lstat),r.statSync=E(r.statSync),r.fstatSync=E(r.fstatSync),r.lstatSync=E(r.lstatSync),r.chmod&&!r.lchmod&&(r.lchmod=function(u,h,n){n&&process.nextTick(n)},r.lchmodSync=function(){}),r.chown&&!r.lchown&&(r.lchown=function(u,h,n,m){m&&process.nextTick(m)},r.lchownSync=function(){}),i==="win32"&&(r.rename=typeof r.rename!="function"?r.rename:function(u){function h(n,m,v){var p=Date.now(),y=0;u(n,m,function $(b){if(b&&(b.code==="EACCES"||b.code==="EPERM"||b.code==="EBUSY")&&Date.now()-p<6e4){setTimeout(function(){r.stat(m,function(N,L){N&&N.code==="ENOENT"?u(n,m,$):v(b)})},y),y<100&&(y+=10);return}v&&v(b)})}return Object.setPrototypeOf&&Object.setPrototypeOf(h,u),h}(r.rename)),r.read=typeof r.read!="function"?r.read:function(u){function h(n,m,v,p,y,$){var b;if($&&typeof $=="function"){var N=0;b=function(L,F,H){if(L&&L.code==="EAGAIN"&&N<10)return N++,u.call(r,n,m,v,p,y,b);$.apply(this,arguments)}}return u.call(r,n,m,v,p,y,b)}return Object.setPrototypeOf&&Object.setPrototypeOf(h,u),h}(r.read),r.readSync=typeof r.readSync!="function"?r.readSync:function(u){return function(h,n,m,v,p){for(var y=0;;)try{return u.call(r,h,n,m,v,p)}catch($){if($.code==="EAGAIN"&&y<10){y++;continue}throw $}}}(r.readSync);function a(u){u.lchmod=function(h,n,m){u.open(h,e.O_WRONLY|e.O_SYMLINK,n,function(v,p){if(v){m&&m(v);return}u.fchmod(p,n,function(y){u.close(p,function($){m&&m(y||$)})})})},u.lchmodSync=function(h,n){var m=u.openSync(h,e.O_WRONLY|e.O_SYMLINK,n),v=!0,p;try{p=u.fchmodSync(m,n),v=!1}finally{if(v)try{u.closeSync(m)}catch{}else u.closeSync(m)}return p}}function o(u){e.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(h,n,m,v){u.open(h,e.O_SYMLINK,function(p,y){if(p){v&&v(p);return}u.futimes(y,n,m,function($){u.close(y,function(b){v&&v($||b)})})})},u.lutimesSync=function(h,n,m){var v=u.openSync(h,e.O_SYMLINK),p,y=!0;try{p=u.futimesSync(v,n,m),y=!1}finally{if(y)try{u.closeSync(v)}catch{}else u.closeSync(v)}return p}):u.futimes&&(u.lutimes=function(h,n,m,v){v&&process.nextTick(v)},u.lutimesSync=function(){})}function c(u){return u&&function(h,n,m){return u.call(r,h,n,function(v){R(v)&&(v=null),m&&m.apply(this,arguments)})}}function d(u){return u&&function(h,n){try{return u.call(r,h,n)}catch(m){if(!R(m))throw m}}}function g(u){return u&&function(h,n,m,v){return u.call(r,h,n,m,function(p){R(p)&&(p=null),v&&v.apply(this,arguments)})}}function w(u){return u&&function(h,n,m){try{return u.call(r,h,n,m)}catch(v){if(!R(v))throw v}}}function _(u){return u&&function(h,n,m){typeof n=="function"&&(m=n,n=null);function v(p,y){y&&(y.uid<0&&(y.uid+=4294967296),y.gid<0&&(y.gid+=4294967296)),m&&m.apply(this,arguments)}return n?u.call(r,h,n,v):u.call(r,h,v)}}function E(u){return u&&function(h,n){var m=n?u.call(r,h,n):u.call(r,h);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function R(u){if(!u||u.code==="ENOSYS")return!0;var h=!process.getuid||process.getuid()!==0;return!!(h&&(u.code==="EINVAL"||u.code==="EPERM"))}}return Un}var Vn,fo;function Of(){if(fo)return Vn;fo=1;var e=Rf.Stream;Vn=t;function t(l){return{ReadStream:i,WriteStream:f};function i(s,r){if(!(this instanceof i))return new i(s,r);e.call(this);var a=this;this.path=s,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,r=r||{};for(var o=Object.keys(r),c=0,d=o.length;c<d;c++){var g=o[c];this[g]=r[g]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}l.open(this.path,this.flags,this.mode,function(w,_){if(w){a.emit("error",w),a.readable=!1;return}a.fd=_,a.emit("open",_),a._read()})}function f(s,r){if(!(this instanceof f))return new f(s,r);e.call(this),this.path=s,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var a=Object.keys(r),o=0,c=a.length;o<c;o++){var d=a[o];this[d]=r[d]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=l.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}return Vn}var zn,ho;function If(){if(ho)return zn;ho=1,zn=t;var e=Object.getPrototypeOf||function(l){return l.__proto__};function t(l){if(l===null||typeof l!="object")return l;if(l instanceof Object)var i={__proto__:e(l)};else var i=Object.create(null);return Object.getOwnPropertyNames(l).forEach(function(f){Object.defineProperty(i,f,Object.getOwnPropertyDescriptor(l,f))}),i}return zn}var Ot,mo;function St(){if(mo)return Ot;mo=1;var e=ut,t=Nf(),l=Of(),i=If(),f=xi,s,r;typeof Symbol=="function"&&typeof Symbol.for=="function"?(s=Symbol.for("graceful-fs.queue"),r=Symbol.for("graceful-fs.previous")):(s="___graceful-fs.queue",r="___graceful-fs.previous");function a(){}function o(u,h){Object.defineProperty(u,s,{get:function(){return h}})}var c=a;if(f.debuglog?c=f.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(c=function(){var u=f.format.apply(f,arguments);u="GFS4: "+u.split(/\n/).join(`
|
|
2
|
+
GFS4: `),console.error(u)}),!e[s]){var d=Fn[s]||[];o(e,d),e.close=function(u){function h(n,m){return u.call(e,n,function(v){v||E(),typeof m=="function"&&m.apply(this,arguments)})}return Object.defineProperty(h,r,{value:u}),h}(e.close),e.closeSync=function(u){function h(n){u.apply(e,arguments),E()}return Object.defineProperty(h,r,{value:u}),h}(e.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){c(e[s]),Yl.equal(e[s].length,0)})}Fn[s]||o(Fn,e[s]),Ot=g(i(e)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!e.__patched&&(Ot=g(e),e.__patched=!0);function g(u){t(u),u.gracefulify=g,u.createReadStream=O,u.createWriteStream=q;var h=u.readFile;u.readFile=n;function n(P,A,K){return typeof A=="function"&&(K=A,A=null),B(P,A,K);function B(X,Z,I,C){return h(X,Z,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?w([B,[X,Z,I],k,C||Date.now(),Date.now()]):typeof I=="function"&&I.apply(this,arguments)})}}var m=u.writeFile;u.writeFile=v;function v(P,A,K,B){return typeof K=="function"&&(B=K,K=null),X(P,A,K,B);function X(Z,I,C,k,U){return m(Z,I,C,function(x){x&&(x.code==="EMFILE"||x.code==="ENFILE")?w([X,[Z,I,C,k],x,U||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var p=u.appendFile;p&&(u.appendFile=y);function y(P,A,K,B){return typeof K=="function"&&(B=K,K=null),X(P,A,K,B);function X(Z,I,C,k,U){return p(Z,I,C,function(x){x&&(x.code==="EMFILE"||x.code==="ENFILE")?w([X,[Z,I,C,k],x,U||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var $=u.copyFile;$&&(u.copyFile=b);function b(P,A,K,B){return typeof K=="function"&&(B=K,K=0),X(P,A,K,B);function X(Z,I,C,k,U){return $(Z,I,C,function(x){x&&(x.code==="EMFILE"||x.code==="ENFILE")?w([X,[Z,I,C,k],x,U||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}var N=u.readdir;u.readdir=F;var L=/^v[0-5]\./;function F(P,A,K){typeof A=="function"&&(K=A,A=null);var B=L.test(process.version)?function(I,C,k,U){return N(I,X(I,C,k,U))}:function(I,C,k,U){return N(I,C,X(I,C,k,U))};return B(P,A,K);function X(Z,I,C,k){return function(U,x){U&&(U.code==="EMFILE"||U.code==="ENFILE")?w([B,[Z,I,C],U,k||Date.now(),Date.now()]):(x&&x.sort&&x.sort(),typeof C=="function"&&C.call(this,U,x))}}}if(process.version.substr(0,4)==="v0.8"){var H=l(u);W=H.ReadStream,G=H.WriteStream}var M=u.ReadStream;M&&(W.prototype=Object.create(M.prototype),W.prototype.open=j);var V=u.WriteStream;V&&(G.prototype=Object.create(V.prototype),G.prototype.open=D),Object.defineProperty(u,"ReadStream",{get:function(){return W},set:function(P){W=P},enumerable:!0,configurable:!0}),Object.defineProperty(u,"WriteStream",{get:function(){return G},set:function(P){G=P},enumerable:!0,configurable:!0});var z=W;Object.defineProperty(u,"FileReadStream",{get:function(){return z},set:function(P){z=P},enumerable:!0,configurable:!0});var J=G;Object.defineProperty(u,"FileWriteStream",{get:function(){return J},set:function(P){J=P},enumerable:!0,configurable:!0});function W(P,A){return this instanceof W?(M.apply(this,arguments),this):W.apply(Object.create(W.prototype),arguments)}function j(){var P=this;S(P.path,P.flags,P.mode,function(A,K){A?(P.autoClose&&P.destroy(),P.emit("error",A)):(P.fd=K,P.emit("open",K),P.read())})}function G(P,A){return this instanceof G?(V.apply(this,arguments),this):G.apply(Object.create(G.prototype),arguments)}function D(){var P=this;S(P.path,P.flags,P.mode,function(A,K){A?(P.destroy(),P.emit("error",A)):(P.fd=K,P.emit("open",K))})}function O(P,A){return new u.ReadStream(P,A)}function q(P,A){return new u.WriteStream(P,A)}var T=u.open;u.open=S;function S(P,A,K,B){return typeof K=="function"&&(B=K,K=null),X(P,A,K,B);function X(Z,I,C,k,U){return T(Z,I,C,function(x,Y){x&&(x.code==="EMFILE"||x.code==="ENFILE")?w([X,[Z,I,C,k],x,U||Date.now(),Date.now()]):typeof k=="function"&&k.apply(this,arguments)})}}return u}function w(u){c("ENQUEUE",u[0].name,u[1]),e[s].push(u),R()}var _;function E(){for(var u=Date.now(),h=0;h<e[s].length;++h)e[s][h].length>2&&(e[s][h][3]=u,e[s][h][4]=u);R()}function R(){if(clearTimeout(_),_=void 0,e[s].length!==0){var u=e[s].shift(),h=u[0],n=u[1],m=u[2],v=u[3],p=u[4];if(v===void 0)c("RETRY",h.name,n),h.apply(null,n);else if(Date.now()-v>=6e4){c("TIMEOUT",h.name,n);var y=n.pop();typeof y=="function"&&y.call(null,m)}else{var $=Date.now()-p,b=Math.max(p-v,1),N=Math.min(b*1.2,100);$>=N?(c("RETRY",h.name,n),h.apply(null,n.concat([v]))):e[s].push(u)}_===void 0&&(_=setTimeout(R,0))}}return Ot}var po;function Ee(){return po||(po=1,function(e){const t=ve().fromCallback,l=St(),i=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(f=>typeof l[f]=="function");Object.assign(e,l),i.forEach(f=>{e[f]=t(l[f])}),e.exists=function(f,s){return typeof s=="function"?l.exists(f,s):new Promise(r=>l.exists(f,r))},e.read=function(f,s,r,a,o,c){return typeof c=="function"?l.read(f,s,r,a,o,c):new Promise((d,g)=>{l.read(f,s,r,a,o,(w,_,E)=>{if(w)return g(w);d({bytesRead:_,buffer:E})})})},e.write=function(f,s,...r){return typeof r[r.length-1]=="function"?l.write(f,s,...r):new Promise((a,o)=>{l.write(f,s,...r,(c,d,g)=>{if(c)return o(c);a({bytesWritten:d,buffer:g})})})},e.readv=function(f,s,...r){return typeof r[r.length-1]=="function"?l.readv(f,s,...r):new Promise((a,o)=>{l.readv(f,s,...r,(c,d,g)=>{if(c)return o(c);a({bytesRead:d,buffers:g})})})},e.writev=function(f,s,...r){return typeof r[r.length-1]=="function"?l.writev(f,s,...r):new Promise((a,o)=>{l.writev(f,s,...r,(c,d,g)=>{if(c)return o(c);a({bytesWritten:d,buffers:g})})})},typeof l.realpath.native=="function"?e.realpath.native=t(l.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")}(Mn)),Mn}var It={},Gn={},yo;function Tf(){if(yo)return Gn;yo=1;const e=me;return Gn.checkPath=function(l){if(process.platform==="win32"&&/[<>:"|?*]/.test(l.replace(e.parse(l).root,""))){const f=new Error(`Path contains invalid characters: ${l}`);throw f.code="EINVAL",f}},Gn}var vo;function Cf(){if(vo)return It;vo=1;const e=Ee(),{checkPath:t}=Tf(),l=i=>{const f={mode:511};return typeof i=="number"?i:{...f,...i}.mode};return It.makeDir=async(i,f)=>(t(i),e.mkdir(i,{mode:l(f),recursive:!0})),It.makeDirSync=(i,f)=>(t(i),e.mkdirSync(i,{mode:l(f),recursive:!0})),It}var Kn,_o;function qe(){if(_o)return Kn;_o=1;const e=ve().fromPromise,{makeDir:t,makeDirSync:l}=Cf(),i=e(t);return Kn={mkdirs:i,mkdirsSync:l,mkdirp:i,mkdirpSync:l,ensureDir:i,ensureDirSync:l},Kn}var Hn,go;function st(){if(go)return Hn;go=1;const e=ve().fromPromise,t=Ee();function l(i){return t.access(i).then(()=>!0).catch(()=>!1)}return Hn={pathExists:e(l),pathExistsSync:t.existsSync},Hn}var xn,$o;function rf(){if($o)return xn;$o=1;const e=Ee(),t=ve().fromPromise;async function l(f,s,r){const a=await e.open(f,"r+");let o=null;try{await e.futimes(a,s,r)}finally{try{await e.close(a)}catch(c){o=c}}if(o)throw o}function i(f,s,r){const a=e.openSync(f,"r+");return e.futimesSync(a,s,r),e.closeSync(a)}return xn={utimesMillis:t(l),utimesMillisSync:i},xn}var Bn,Eo;function lt(){if(Eo)return Bn;Eo=1;const e=Ee(),t=me,l=ve().fromPromise;function i(w,_,E){const R=E.dereference?u=>e.stat(u,{bigint:!0}):u=>e.lstat(u,{bigint:!0});return Promise.all([R(w),R(_).catch(u=>{if(u.code==="ENOENT")return null;throw u})]).then(([u,h])=>({srcStat:u,destStat:h}))}function f(w,_,E){let R;const u=E.dereference?n=>e.statSync(n,{bigint:!0}):n=>e.lstatSync(n,{bigint:!0}),h=u(w);try{R=u(_)}catch(n){if(n.code==="ENOENT")return{srcStat:h,destStat:null};throw n}return{srcStat:h,destStat:R}}async function s(w,_,E,R){const{srcStat:u,destStat:h}=await i(w,_,R);if(h){if(c(u,h)){const n=t.basename(w),m=t.basename(_);if(E==="move"&&n!==m&&n.toLowerCase()===m.toLowerCase())return{srcStat:u,destStat:h,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(u.isDirectory()&&!h.isDirectory())throw new Error(`Cannot overwrite non-directory '${_}' with directory '${w}'.`);if(!u.isDirectory()&&h.isDirectory())throw new Error(`Cannot overwrite directory '${_}' with non-directory '${w}'.`)}if(u.isDirectory()&&d(w,_))throw new Error(g(w,_,E));return{srcStat:u,destStat:h}}function r(w,_,E,R){const{srcStat:u,destStat:h}=f(w,_,R);if(h){if(c(u,h)){const n=t.basename(w),m=t.basename(_);if(E==="move"&&n!==m&&n.toLowerCase()===m.toLowerCase())return{srcStat:u,destStat:h,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(u.isDirectory()&&!h.isDirectory())throw new Error(`Cannot overwrite non-directory '${_}' with directory '${w}'.`);if(!u.isDirectory()&&h.isDirectory())throw new Error(`Cannot overwrite directory '${_}' with non-directory '${w}'.`)}if(u.isDirectory()&&d(w,_))throw new Error(g(w,_,E));return{srcStat:u,destStat:h}}async function a(w,_,E,R){const u=t.resolve(t.dirname(w)),h=t.resolve(t.dirname(E));if(h===u||h===t.parse(h).root)return;let n;try{n=await e.stat(h,{bigint:!0})}catch(m){if(m.code==="ENOENT")return;throw m}if(c(_,n))throw new Error(g(w,E,R));return a(w,_,h,R)}function o(w,_,E,R){const u=t.resolve(t.dirname(w)),h=t.resolve(t.dirname(E));if(h===u||h===t.parse(h).root)return;let n;try{n=e.statSync(h,{bigint:!0})}catch(m){if(m.code==="ENOENT")return;throw m}if(c(_,n))throw new Error(g(w,E,R));return o(w,_,h,R)}function c(w,_){return _.ino!==void 0&&_.dev!==void 0&&_.ino===w.ino&&_.dev===w.dev}function d(w,_){const E=t.resolve(w).split(t.sep).filter(u=>u),R=t.resolve(_).split(t.sep).filter(u=>u);return E.every((u,h)=>R[h]===u)}function g(w,_,E){return`Cannot ${E} '${w}' to a subdirectory of itself, '${_}'.`}return Bn={checkPaths:l(s),checkPathsSync:r,checkParentPaths:l(a),checkParentPathsSync:o,isSrcSubdir:d,areIdentical:c},Bn}var Wn,wo;function Df(){if(wo)return Wn;wo=1;async function e(t,l){const i=[];for await(const f of t)i.push(l(f).then(()=>null,s=>s??new Error("unknown error")));await Promise.all(i.map(f=>f.then(s=>{if(s!==null)throw s})))}return Wn={asyncIteratorConcurrentProcess:e},Wn}var Jn,So;function Af(){if(So)return Jn;So=1;const e=Ee(),t=me,{mkdirs:l}=qe(),{pathExists:i}=st(),{utimesMillis:f}=rf(),s=lt(),{asyncIteratorConcurrentProcess:r}=Df();async function a(u,h,n={}){typeof n=="function"&&(n={filter:n}),n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
3
|
+
|
|
4
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");const{srcStat:m,destStat:v}=await s.checkPaths(u,h,"copy",n);if(await s.checkParentPaths(u,m,h,"copy"),!await o(u,h,n))return;const y=t.dirname(h);await i(y)||await l(y),await c(v,u,h,n)}async function o(u,h,n){return n.filter?n.filter(u,h):!0}async function c(u,h,n,m){const p=await(m.dereference?e.stat:e.lstat)(h);if(p.isDirectory())return E(p,u,h,n,m);if(p.isFile()||p.isCharacterDevice()||p.isBlockDevice())return d(p,u,h,n,m);if(p.isSymbolicLink())return R(u,h,n,m);throw p.isSocket()?new Error(`Cannot copy a socket file: ${h}`):p.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${h}`):new Error(`Unknown file: ${h}`)}async function d(u,h,n,m,v){if(!h)return g(u,n,m,v);if(v.overwrite)return await e.unlink(m),g(u,n,m,v);if(v.errorOnExist)throw new Error(`'${m}' already exists`)}async function g(u,h,n,m){if(await e.copyFile(h,n),m.preserveTimestamps){w(u.mode)&&await _(n,u.mode);const v=await e.stat(h);await f(n,v.atime,v.mtime)}return e.chmod(n,u.mode)}function w(u){return(u&128)===0}function _(u,h){return e.chmod(u,h|128)}async function E(u,h,n,m,v){h||await e.mkdir(m),await r(await e.opendir(n),async p=>{const y=t.join(n,p.name),$=t.join(m,p.name);if(await o(y,$,v)){const{destStat:N}=await s.checkPaths(y,$,"copy",v);await c(N,y,$,v)}}),h||await e.chmod(m,u.mode)}async function R(u,h,n,m){let v=await e.readlink(h);if(m.dereference&&(v=t.resolve(process.cwd(),v)),!u)return e.symlink(v,n);let p=null;try{p=await e.readlink(n)}catch(y){if(y.code==="EINVAL"||y.code==="UNKNOWN")return e.symlink(v,n);throw y}if(m.dereference&&(p=t.resolve(process.cwd(),p)),s.isSrcSubdir(v,p))throw new Error(`Cannot copy '${v}' to a subdirectory of itself, '${p}'.`);if(s.isSrcSubdir(p,v))throw new Error(`Cannot overwrite '${p}' with '${v}'.`);return await e.unlink(n),e.symlink(v,n)}return Jn=a,Jn}var Zn,Ro;function Lf(){if(Ro)return Zn;Ro=1;const e=St(),t=me,l=qe().mkdirsSync,i=rf().utimesMillisSync,f=lt();function s(p,y,$){typeof $=="function"&&($={filter:$}),$=$||{},$.clobber="clobber"in $?!!$.clobber:!0,$.overwrite="overwrite"in $?!!$.overwrite:$.clobber,$.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
5
|
+
|
|
6
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");const{srcStat:b,destStat:N}=f.checkPathsSync(p,y,"copy",$);if(f.checkParentPathsSync(p,b,y,"copy"),$.filter&&!$.filter(p,y))return;const L=t.dirname(y);return e.existsSync(L)||l(L),r(N,p,y,$)}function r(p,y,$,b){const L=(b.dereference?e.statSync:e.lstatSync)(y);if(L.isDirectory())return R(L,p,y,$,b);if(L.isFile()||L.isCharacterDevice()||L.isBlockDevice())return a(L,p,y,$,b);if(L.isSymbolicLink())return m(p,y,$,b);throw L.isSocket()?new Error(`Cannot copy a socket file: ${y}`):L.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${y}`):new Error(`Unknown file: ${y}`)}function a(p,y,$,b,N){return y?o(p,$,b,N):c(p,$,b,N)}function o(p,y,$,b){if(b.overwrite)return e.unlinkSync($),c(p,y,$,b);if(b.errorOnExist)throw new Error(`'${$}' already exists`)}function c(p,y,$,b){return e.copyFileSync(y,$),b.preserveTimestamps&&d(p.mode,y,$),_($,p.mode)}function d(p,y,$){return g(p)&&w($,p),E(y,$)}function g(p){return(p&128)===0}function w(p,y){return _(p,y|128)}function _(p,y){return e.chmodSync(p,y)}function E(p,y){const $=e.statSync(p);return i(y,$.atime,$.mtime)}function R(p,y,$,b,N){return y?h($,b,N):u(p.mode,$,b,N)}function u(p,y,$,b){return e.mkdirSync($),h(y,$,b),_($,p)}function h(p,y,$){const b=e.opendirSync(p);try{let N;for(;(N=b.readSync())!==null;)n(N.name,p,y,$)}finally{b.closeSync()}}function n(p,y,$,b){const N=t.join(y,p),L=t.join($,p);if(b.filter&&!b.filter(N,L))return;const{destStat:F}=f.checkPathsSync(N,L,"copy",b);return r(F,N,L,b)}function m(p,y,$,b){let N=e.readlinkSync(y);if(b.dereference&&(N=t.resolve(process.cwd(),N)),p){let L;try{L=e.readlinkSync($)}catch(F){if(F.code==="EINVAL"||F.code==="UNKNOWN")return e.symlinkSync(N,$);throw F}if(b.dereference&&(L=t.resolve(process.cwd(),L)),f.isSrcSubdir(N,L))throw new Error(`Cannot copy '${N}' to a subdirectory of itself, '${L}'.`);if(f.isSrcSubdir(L,N))throw new Error(`Cannot overwrite '${L}' with '${N}'.`);return v(N,$)}else return e.symlinkSync(N,$)}function v(p,y){return e.unlinkSync(y),e.symlinkSync(p,y)}return Zn=s,Zn}var Xn,bo;function Bi(){if(bo)return Xn;bo=1;const e=ve().fromPromise;return Xn={copy:e(Af()),copySync:Lf()},Xn}var Yn,Po;function En(){if(Po)return Yn;Po=1;const e=St(),t=ve().fromCallback;function l(f,s){e.rm(f,{recursive:!0,force:!0},s)}function i(f){e.rmSync(f,{recursive:!0,force:!0})}return Yn={remove:t(l),removeSync:i},Yn}var Qn,No;function qf(){if(No)return Qn;No=1;const e=ve().fromPromise,t=Ee(),l=me,i=qe(),f=En(),s=e(async function(o){let c;try{c=await t.readdir(o)}catch{return i.mkdirs(o)}return Promise.all(c.map(d=>f.remove(l.join(o,d))))});function r(a){let o;try{o=t.readdirSync(a)}catch{return i.mkdirsSync(a)}o.forEach(c=>{c=l.join(a,c),f.removeSync(c)})}return Qn={emptyDirSync:r,emptydirSync:r,emptyDir:s,emptydir:s},Qn}var es,Oo;function kf(){if(Oo)return es;Oo=1;const e=ve().fromPromise,t=me,l=Ee(),i=qe();async function f(r){let a;try{a=await l.stat(r)}catch{}if(a&&a.isFile())return;const o=t.dirname(r);let c=null;try{c=await l.stat(o)}catch(d){if(d.code==="ENOENT"){await i.mkdirs(o),await l.writeFile(r,"");return}else throw d}c.isDirectory()?await l.writeFile(r,""):await l.readdir(o)}function s(r){let a;try{a=l.statSync(r)}catch{}if(a&&a.isFile())return;const o=t.dirname(r);try{l.statSync(o).isDirectory()||l.readdirSync(o)}catch(c){if(c&&c.code==="ENOENT")i.mkdirsSync(o);else throw c}l.writeFileSync(r,"")}return es={createFile:e(f),createFileSync:s},es}var ts,Io;function jf(){if(Io)return ts;Io=1;const e=ve().fromPromise,t=me,l=Ee(),i=qe(),{pathExists:f}=st(),{areIdentical:s}=lt();async function r(o,c){let d;try{d=await l.lstat(c)}catch{}let g;try{g=await l.lstat(o)}catch(E){throw E.message=E.message.replace("lstat","ensureLink"),E}if(d&&s(g,d))return;const w=t.dirname(c);await f(w)||await i.mkdirs(w),await l.link(o,c)}function a(o,c){let d;try{d=l.lstatSync(c)}catch{}try{const _=l.lstatSync(o);if(d&&s(_,d))return}catch(_){throw _.message=_.message.replace("lstat","ensureLink"),_}const g=t.dirname(c);return l.existsSync(g)||i.mkdirsSync(g),l.linkSync(o,c)}return ts={createLink:e(r),createLinkSync:a},ts}var rs,To;function Ff(){if(To)return rs;To=1;const e=me,t=Ee(),{pathExists:l}=st(),i=ve().fromPromise;async function f(r,a){if(e.isAbsolute(r)){try{await t.lstat(r)}catch(g){throw g.message=g.message.replace("lstat","ensureSymlink"),g}return{toCwd:r,toDst:r}}const o=e.dirname(a),c=e.join(o,r);if(await l(c))return{toCwd:c,toDst:r};try{await t.lstat(r)}catch(g){throw g.message=g.message.replace("lstat","ensureSymlink"),g}return{toCwd:r,toDst:e.relative(o,r)}}function s(r,a){if(e.isAbsolute(r)){if(!t.existsSync(r))throw new Error("absolute srcpath does not exist");return{toCwd:r,toDst:r}}const o=e.dirname(a),c=e.join(o,r);if(t.existsSync(c))return{toCwd:c,toDst:r};if(!t.existsSync(r))throw new Error("relative srcpath does not exist");return{toCwd:r,toDst:e.relative(o,r)}}return rs={symlinkPaths:i(f),symlinkPathsSync:s},rs}var ns,Co;function Mf(){if(Co)return ns;Co=1;const e=Ee(),t=ve().fromPromise;async function l(f,s){if(s)return s;let r;try{r=await e.lstat(f)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function i(f,s){if(s)return s;let r;try{r=e.lstatSync(f)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}return ns={symlinkType:t(l),symlinkTypeSync:i},ns}var ss,Do;function Uf(){if(Do)return ss;Do=1;const e=ve().fromPromise,t=me,l=Ee(),{mkdirs:i,mkdirsSync:f}=qe(),{symlinkPaths:s,symlinkPathsSync:r}=Ff(),{symlinkType:a,symlinkTypeSync:o}=Mf(),{pathExists:c}=st(),{areIdentical:d}=lt();async function g(_,E,R){let u;try{u=await l.lstat(E)}catch{}if(u&&u.isSymbolicLink()){const[v,p]=await Promise.all([l.stat(_),l.stat(E)]);if(d(v,p))return}const h=await s(_,E);_=h.toDst;const n=await a(h.toCwd,R),m=t.dirname(E);return await c(m)||await i(m),l.symlink(_,E,n)}function w(_,E,R){let u;try{u=l.lstatSync(E)}catch{}if(u&&u.isSymbolicLink()){const v=l.statSync(_),p=l.statSync(E);if(d(v,p))return}const h=r(_,E);_=h.toDst,R=o(h.toCwd,R);const n=t.dirname(E);return l.existsSync(n)||f(n),l.symlinkSync(_,E,R)}return ss={createSymlink:e(g),createSymlinkSync:w},ss}var is,Ao;function Vf(){if(Ao)return is;Ao=1;const{createFile:e,createFileSync:t}=kf(),{createLink:l,createLinkSync:i}=jf(),{createSymlink:f,createSymlinkSync:s}=Uf();return is={createFile:e,createFileSync:t,ensureFile:e,ensureFileSync:t,createLink:l,createLinkSync:i,ensureLink:l,ensureLinkSync:i,createSymlink:f,createSymlinkSync:s,ensureSymlink:f,ensureSymlinkSync:s},is}var os,Lo;function Wi(){if(Lo)return os;Lo=1;function e(l,{EOL:i=`
|
|
7
|
+
`,finalEOL:f=!0,replacer:s=null,spaces:r}={}){const a=f?i:"";return JSON.stringify(l,s,r).replace(/\n/g,i)+a}function t(l){return Buffer.isBuffer(l)&&(l=l.toString("utf8")),l.replace(/^\uFEFF/,"")}return os={stringify:e,stripBom:t},os}var as,qo;function zf(){if(qo)return as;qo=1;let e;try{e=St()}catch{e=ut}const t=ve(),{stringify:l,stripBom:i}=Wi();async function f(g,w={}){typeof w=="string"&&(w={encoding:w});const _=w.fs||e,E="throws"in w?w.throws:!0;let R=await t.fromCallback(_.readFile)(g,w);R=i(R);let u;try{u=JSON.parse(R,w?w.reviver:null)}catch(h){if(E)throw h.message=`${g}: ${h.message}`,h;return null}return u}const s=t.fromPromise(f);function r(g,w={}){typeof w=="string"&&(w={encoding:w});const _=w.fs||e,E="throws"in w?w.throws:!0;try{let R=_.readFileSync(g,w);return R=i(R),JSON.parse(R,w.reviver)}catch(R){if(E)throw R.message=`${g}: ${R.message}`,R;return null}}async function a(g,w,_={}){const E=_.fs||e,R=l(w,_);await t.fromCallback(E.writeFile)(g,R,_)}const o=t.fromPromise(a);function c(g,w,_={}){const E=_.fs||e,R=l(w,_);return E.writeFileSync(g,R,_)}return as={readFile:s,readFileSync:r,writeFile:o,writeFileSync:c},as}var cs,ko;function Gf(){if(ko)return cs;ko=1;const e=zf();return cs={readJson:e.readFile,readJsonSync:e.readFileSync,writeJson:e.writeFile,writeJsonSync:e.writeFileSync},cs}var us,jo;function Ji(){if(jo)return us;jo=1;const e=ve().fromPromise,t=Ee(),l=me,i=qe(),f=st().pathExists;async function s(a,o,c="utf-8"){const d=l.dirname(a);return await f(d)||await i.mkdirs(d),t.writeFile(a,o,c)}function r(a,...o){const c=l.dirname(a);t.existsSync(c)||i.mkdirsSync(c),t.writeFileSync(a,...o)}return us={outputFile:e(s),outputFileSync:r},us}var ls,Fo;function Kf(){if(Fo)return ls;Fo=1;const{stringify:e}=Wi(),{outputFile:t}=Ji();async function l(i,f,s={}){const r=e(f,s);await t(i,r,s)}return ls=l,ls}var fs,Mo;function Hf(){if(Mo)return fs;Mo=1;const{stringify:e}=Wi(),{outputFileSync:t}=Ji();function l(i,f,s){const r=e(f,s);t(i,r,s)}return fs=l,fs}var ds,Uo;function xf(){if(Uo)return ds;Uo=1;const e=ve().fromPromise,t=Gf();return t.outputJson=e(Kf()),t.outputJsonSync=Hf(),t.outputJSON=t.outputJson,t.outputJSONSync=t.outputJsonSync,t.writeJSON=t.writeJson,t.writeJSONSync=t.writeJsonSync,t.readJSON=t.readJson,t.readJSONSync=t.readJsonSync,ds=t,ds}var hs,Vo;function Bf(){if(Vo)return hs;Vo=1;const e=Ee(),t=me,{copy:l}=Bi(),{remove:i}=En(),{mkdirp:f}=qe(),{pathExists:s}=st(),r=lt();async function a(d,g,w={}){const _=w.overwrite||w.clobber||!1,{srcStat:E,isChangingCase:R=!1}=await r.checkPaths(d,g,"move",w);await r.checkParentPaths(d,E,g,"move");const u=t.dirname(g);return t.parse(u).root!==u&&await f(u),o(d,g,_,R)}async function o(d,g,w,_){if(!_){if(w)await i(g);else if(await s(g))throw new Error("dest already exists.")}try{await e.rename(d,g)}catch(E){if(E.code!=="EXDEV")throw E;await c(d,g,w)}}async function c(d,g,w){return await l(d,g,{overwrite:w,errorOnExist:!0,preserveTimestamps:!0}),i(d)}return hs=a,hs}var ms,zo;function Wf(){if(zo)return ms;zo=1;const e=St(),t=me,l=Bi().copySync,i=En().removeSync,f=qe().mkdirpSync,s=lt();function r(g,w,_){_=_||{};const E=_.overwrite||_.clobber||!1,{srcStat:R,isChangingCase:u=!1}=s.checkPathsSync(g,w,"move",_);return s.checkParentPathsSync(g,R,w,"move"),a(w)||f(t.dirname(w)),o(g,w,E,u)}function a(g){const w=t.dirname(g);return t.parse(w).root===w}function o(g,w,_,E){if(E)return c(g,w,_);if(_)return i(w),c(g,w,_);if(e.existsSync(w))throw new Error("dest already exists.");return c(g,w,_)}function c(g,w,_){try{e.renameSync(g,w)}catch(E){if(E.code!=="EXDEV")throw E;return d(g,w,_)}}function d(g,w,_){return l(g,w,{overwrite:_,errorOnExist:!0,preserveTimestamps:!0}),i(g)}return ms=r,ms}var ps,Go;function Jf(){if(Go)return ps;Go=1;const e=ve().fromPromise;return ps={move:e(Bf()),moveSync:Wf()},ps}var ys,Ko;function Zf(){return Ko||(Ko=1,ys={...Ee(),...Bi(),...qf(),...Vf(),...xf(),...qe(),...Jf(),...Ji(),...st(),...En()}),ys}var be=Zf(),Et={exports:{}},vs,Ho;function Xf(){return Ho||(Ho=1,vs=e=>{const t=typeof e;return e!==null&&(t==="object"||t==="function")}),vs}var _s,xo;function Yf(){if(xo)return _s;xo=1;const e=Xf(),t=new Set(["__proto__","prototype","constructor"]),l=f=>!f.some(s=>t.has(s));function i(f){const s=f.split("."),r=[];for(let a=0;a<s.length;a++){let o=s[a];for(;o[o.length-1]==="\\"&&s[a+1]!==void 0;)o=o.slice(0,-1)+".",o+=s[++a];r.push(o)}return l(r)?r:[]}return _s={get(f,s,r){if(!e(f)||typeof s!="string")return r===void 0?f:r;const a=i(s);if(a.length!==0){for(let o=0;o<a.length;o++)if(f=f[a[o]],f==null){if(o!==a.length-1)return r;break}return f===void 0?r:f}},set(f,s,r){if(!e(f)||typeof s!="string")return f;const a=f,o=i(s);for(let c=0;c<o.length;c++){const d=o[c];e(f[d])||(f[d]={}),c===o.length-1&&(f[d]=r),f=f[d]}return a},delete(f,s){if(!e(f)||typeof s!="string")return!1;const r=i(s);for(let a=0;a<r.length;a++){const o=r[a];if(a===r.length-1)return delete f[o],!0;if(f=f[o],!e(f))return!1}},has(f,s){if(!e(f)||typeof s!="string")return!1;const r=i(s);if(r.length===0)return!1;for(let a=0;a<r.length;a++)if(e(f)){if(!(r[a]in f))return!1;f=f[r[a]]}else return!1;return!0}},_s}var Tt={exports:{}},Ct={exports:{}},Dt={exports:{}},At={exports:{}},Bo;function Qf(){if(Bo)return At.exports;Bo=1;const e=ut;return At.exports=t=>new Promise(l=>{e.access(t,i=>{l(!i)})}),At.exports.sync=t=>{try{return e.accessSync(t),!0}catch{return!1}},At.exports}var Lt={exports:{}},qt={exports:{}},Wo;function ed(){if(Wo)return qt.exports;Wo=1;const e=(t,...l)=>new Promise(i=>{i(t(...l))});return qt.exports=e,qt.exports.default=e,qt.exports}var Jo;function td(){if(Jo)return Lt.exports;Jo=1;const e=ed(),t=l=>{if(!((Number.isInteger(l)||l===1/0)&&l>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const i=[];let f=0;const s=()=>{f--,i.length>0&&i.shift()()},r=(c,d,...g)=>{f++;const w=e(c,...g);d(w),w.then(s,s)},a=(c,d,...g)=>{f<l?r(c,d,...g):i.push(r.bind(null,c,d,...g))},o=(c,...d)=>new Promise(g=>a(c,g,...d));return Object.defineProperties(o,{activeCount:{get:()=>f},pendingCount:{get:()=>i.length},clearQueue:{value:()=>{i.length=0}}}),o};return Lt.exports=t,Lt.exports.default=t,Lt.exports}var gs,Zo;function rd(){if(Zo)return gs;Zo=1;const e=td();class t extends Error{constructor(s){super(),this.value=s}}const l=(f,s)=>Promise.resolve(f).then(s),i=f=>Promise.all(f).then(s=>s[1]===!0&&Promise.reject(new t(s[0])));return gs=(f,s,r)=>{r=Object.assign({concurrency:1/0,preserveOrder:!0},r);const a=e(r.concurrency),o=[...f].map(d=>[d,a(l,d,s)]),c=e(r.preserveOrder?1:1/0);return Promise.all(o.map(d=>c(i,d))).then(()=>{}).catch(d=>d instanceof t?d.value:Promise.reject(d))},gs}var Xo;function nd(){if(Xo)return Dt.exports;Xo=1;const e=me,t=Qf(),l=rd();return Dt.exports=(i,f)=>(f=Object.assign({cwd:process.cwd()},f),l(i,s=>t(e.resolve(f.cwd,s)),f)),Dt.exports.sync=(i,f)=>{f=Object.assign({cwd:process.cwd()},f);for(const s of i)if(t.sync(e.resolve(f.cwd,s)))return s},Dt.exports}var Yo;function sd(){if(Yo)return Ct.exports;Yo=1;const e=me,t=nd();return Ct.exports=(l,i={})=>{const f=e.resolve(i.cwd||""),{root:s}=e.parse(f),r=[].concat(l);return new Promise(a=>{(function o(c){t(r,{cwd:c}).then(d=>{d?a(e.join(c,d)):c===s?a(null):o(e.dirname(c))})})(f)})},Ct.exports.sync=(l,i={})=>{let f=e.resolve(i.cwd||"");const{root:s}=e.parse(f),r=[].concat(l);for(;;){const a=t.sync(r,{cwd:f});if(a)return e.join(f,a);if(f===s)return null;f=e.dirname(f)}},Ct.exports}var Qo;function id(){if(Qo)return Tt.exports;Qo=1;const e=sd();return Tt.exports=async({cwd:t}={})=>e("package.json",{cwd:t}),Tt.exports.sync=({cwd:t}={})=>e.sync("package.json",{cwd:t}),Tt.exports}var kt={exports:{}},ea;function od(){if(ea)return kt.exports;ea=1;const e=me,t=Pf,l=t.homedir(),i=t.tmpdir(),{env:f}=process,s=c=>{const d=e.join(l,"Library");return{data:e.join(d,"Application Support",c),config:e.join(d,"Preferences",c),cache:e.join(d,"Caches",c),log:e.join(d,"Logs",c),temp:e.join(i,c)}},r=c=>{const d=f.APPDATA||e.join(l,"AppData","Roaming"),g=f.LOCALAPPDATA||e.join(l,"AppData","Local");return{data:e.join(g,c,"Data"),config:e.join(d,c,"Config"),cache:e.join(g,c,"Cache"),log:e.join(g,c,"Log"),temp:e.join(i,c)}},a=c=>{const d=e.basename(l);return{data:e.join(f.XDG_DATA_HOME||e.join(l,".local","share"),c),config:e.join(f.XDG_CONFIG_HOME||e.join(l,".config"),c),cache:e.join(f.XDG_CACHE_HOME||e.join(l,".cache"),c),log:e.join(f.XDG_STATE_HOME||e.join(l,".local","state"),c),temp:e.join(i,d,c)}},o=(c,d)=>{if(typeof c!="string")throw new TypeError(`Expected string, got ${typeof c}`);return d=Object.assign({suffix:"nodejs"},d),d.suffix&&(c+=`-${d.suffix}`),process.platform==="darwin"?s(c):process.platform==="win32"?r(c):a(c)};return kt.exports=o,kt.exports.default=o,kt.exports}var Oe={},fe={},ta;function Rt(){if(ta)return fe;ta=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.NOOP=fe.LIMIT_FILES_DESCRIPTORS=fe.LIMIT_BASENAME_LENGTH=fe.IS_USER_ROOT=fe.IS_POSIX=fe.DEFAULT_TIMEOUT_SYNC=fe.DEFAULT_TIMEOUT_ASYNC=fe.DEFAULT_WRITE_OPTIONS=fe.DEFAULT_READ_OPTIONS=fe.DEFAULT_FOLDER_MODE=fe.DEFAULT_FILE_MODE=fe.DEFAULT_ENCODING=void 0;const e="utf8";fe.DEFAULT_ENCODING=e;const t=438;fe.DEFAULT_FILE_MODE=t;const l=511;fe.DEFAULT_FOLDER_MODE=l;const i={};fe.DEFAULT_READ_OPTIONS=i;const f={};fe.DEFAULT_WRITE_OPTIONS=f;const s=5e3;fe.DEFAULT_TIMEOUT_ASYNC=s;const r=100;fe.DEFAULT_TIMEOUT_SYNC=r;const a=!!process.getuid;fe.IS_POSIX=a;const o=process.getuid?!process.getuid():!1;fe.IS_USER_ROOT=o;const c=128;fe.LIMIT_BASENAME_LENGTH=c;const d=1e4;fe.LIMIT_FILES_DESCRIPTORS=d;const g=()=>{};return fe.NOOP=g,fe}var jt={},Je={},ra;function ad(){if(ra)return Je;ra=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.attemptifySync=Je.attemptifyAsync=void 0;const e=Rt(),t=(i,f=e.NOOP)=>function(){return i.apply(void 0,arguments).catch(f)};Je.attemptifyAsync=t;const l=(i,f=e.NOOP)=>function(){try{return i.apply(void 0,arguments)}catch(s){return f(s)}};return Je.attemptifySync=l,Je}var Ft={},na;function cd(){if(na)return Ft;na=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e=Rt(),t={isChangeErrorOk:l=>{const{code:i}=l;return i==="ENOSYS"||!e.IS_USER_ROOT&&(i==="EINVAL"||i==="EPERM")},isRetriableError:l=>{const{code:i}=l;return i==="EMFILE"||i==="ENFILE"||i==="EAGAIN"||i==="EBUSY"||i==="EACCESS"||i==="EACCS"||i==="EPERM"},onChangeError:l=>{if(!t.isChangeErrorOk(l))throw l}};return Ft.default=t,Ft}var Ze={},Mt={},sa;function ud(){if(sa)return Mt;sa=1,Object.defineProperty(Mt,"__esModule",{value:!0});const t={interval:25,intervalId:void 0,limit:Rt().LIMIT_FILES_DESCRIPTORS,queueActive:new Set,queueWaiting:new Set,init:()=>{t.intervalId||(t.intervalId=setInterval(t.tick,t.interval))},reset:()=>{t.intervalId&&(clearInterval(t.intervalId),delete t.intervalId)},add:l=>{t.queueWaiting.add(l),t.queueActive.size<t.limit/2?t.tick():t.init()},remove:l=>{t.queueWaiting.delete(l),t.queueActive.delete(l)},schedule:()=>new Promise(l=>{const i=()=>t.remove(f),f=()=>l(i);t.add(f)}),tick:()=>{if(!(t.queueActive.size>=t.limit)){if(!t.queueWaiting.size)return t.reset();for(const l of t.queueWaiting){if(t.queueActive.size>=t.limit)break;t.queueWaiting.delete(l),t.queueActive.add(l),l()}}}};return Mt.default=t,Mt}var ia;function ld(){if(ia)return Ze;ia=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.retryifySync=Ze.retryifyAsync=void 0;const e=ud(),t=(i,f)=>function(s){return function r(){return e.default.schedule().then(a=>i.apply(void 0,arguments).then(o=>(a(),o),o=>{if(a(),Date.now()>=s)throw o;if(f(o)){const c=Math.round(100+400*Math.random());return new Promise(g=>setTimeout(g,c)).then(()=>r.apply(void 0,arguments))}throw o}))}};Ze.retryifyAsync=t;const l=(i,f)=>function(s){return function r(){try{return i.apply(void 0,arguments)}catch(a){if(Date.now()>s)throw a;if(f(a))return r.apply(void 0,arguments);throw a}}};return Ze.retryifySync=l,Ze}var oa;function nf(){if(oa)return jt;oa=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=ut,t=xi,l=ad(),i=cd(),f=ld(),s={chmodAttempt:l.attemptifyAsync(t.promisify(e.chmod),i.default.onChangeError),chownAttempt:l.attemptifyAsync(t.promisify(e.chown),i.default.onChangeError),closeAttempt:l.attemptifyAsync(t.promisify(e.close)),fsyncAttempt:l.attemptifyAsync(t.promisify(e.fsync)),mkdirAttempt:l.attemptifyAsync(t.promisify(e.mkdir)),realpathAttempt:l.attemptifyAsync(t.promisify(e.realpath)),statAttempt:l.attemptifyAsync(t.promisify(e.stat)),unlinkAttempt:l.attemptifyAsync(t.promisify(e.unlink)),closeRetry:f.retryifyAsync(t.promisify(e.close),i.default.isRetriableError),fsyncRetry:f.retryifyAsync(t.promisify(e.fsync),i.default.isRetriableError),openRetry:f.retryifyAsync(t.promisify(e.open),i.default.isRetriableError),readFileRetry:f.retryifyAsync(t.promisify(e.readFile),i.default.isRetriableError),renameRetry:f.retryifyAsync(t.promisify(e.rename),i.default.isRetriableError),statRetry:f.retryifyAsync(t.promisify(e.stat),i.default.isRetriableError),writeRetry:f.retryifyAsync(t.promisify(e.write),i.default.isRetriableError),chmodSyncAttempt:l.attemptifySync(e.chmodSync,i.default.onChangeError),chownSyncAttempt:l.attemptifySync(e.chownSync,i.default.onChangeError),closeSyncAttempt:l.attemptifySync(e.closeSync),mkdirSyncAttempt:l.attemptifySync(e.mkdirSync),realpathSyncAttempt:l.attemptifySync(e.realpathSync),statSyncAttempt:l.attemptifySync(e.statSync),unlinkSyncAttempt:l.attemptifySync(e.unlinkSync),closeSyncRetry:f.retryifySync(e.closeSync,i.default.isRetriableError),fsyncSyncRetry:f.retryifySync(e.fsyncSync,i.default.isRetriableError),openSyncRetry:f.retryifySync(e.openSync,i.default.isRetriableError),readFileSyncRetry:f.retryifySync(e.readFileSync,i.default.isRetriableError),renameSyncRetry:f.retryifySync(e.renameSync,i.default.isRetriableError),statSyncRetry:f.retryifySync(e.statSync,i.default.isRetriableError),writeSyncRetry:f.retryifySync(e.writeSync,i.default.isRetriableError)};return jt.default=s,jt}var Ut={},aa;function fd(){if(aa)return Ut;aa=1,Object.defineProperty(Ut,"__esModule",{value:!0});const e={isFunction:t=>typeof t=="function",isString:t=>typeof t=="string",isUndefined:t=>typeof t>"u"};return Ut.default=e,Ut}var Vt={},ca;function dd(){if(ca)return Vt;ca=1,Object.defineProperty(Vt,"__esModule",{value:!0});const e={},t={next:l=>{const i=e[l];if(!i)return;i.shift();const f=i[0];f?f(()=>t.next(l)):delete e[l]},schedule:l=>new Promise(i=>{let f=e[l];f||(f=e[l]=[]),f.push(i),!(f.length>1)&&i(()=>t.next(l))})};return Vt.default=t,Vt}var zt={},ua;function hd(){if(ua)return zt;ua=1,Object.defineProperty(zt,"__esModule",{value:!0});const e=me,t=Rt(),l=nf(),i={store:{},create:f=>{const s=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),r=Date.now().toString().slice(-10),a="tmp-",o=`.${a}${r}${s}`;return`${f}${o}`},get:(f,s,r=!0)=>{const a=i.truncate(s(f));return a in i.store?i.get(f,s,r):(i.store[a]=r,[a,()=>delete i.store[a]])},purge:f=>{i.store[f]&&(delete i.store[f],l.default.unlinkAttempt(f))},purgeSync:f=>{i.store[f]&&(delete i.store[f],l.default.unlinkSyncAttempt(f))},purgeSyncAll:()=>{for(const f in i.store)i.purgeSync(f)},truncate:f=>{const s=e.basename(f);if(s.length<=t.LIMIT_BASENAME_LENGTH)return f;const r=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(s);if(!r)return f;const a=s.length-t.LIMIT_BASENAME_LENGTH;return`${f.slice(0,-s.length)}${r[1]}${r[2].slice(0,-a)}${r[3]}`}};return process.on("exit",i.purgeSyncAll),zt.default=i,zt}var la;function md(){if(la)return Oe;la=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.writeFileSync=Oe.writeFile=Oe.readFileSync=Oe.readFile=void 0;const e=me,t=Rt(),l=nf(),i=fd(),f=dd(),s=hd();function r(g,w=t.DEFAULT_READ_OPTIONS){var _;if(i.default.isString(w))return r(g,{encoding:w});const E=Date.now()+((_=w.timeout)!==null&&_!==void 0?_:t.DEFAULT_TIMEOUT_ASYNC);return l.default.readFileRetry(E)(g,w)}Oe.readFile=r;function a(g,w=t.DEFAULT_READ_OPTIONS){var _;if(i.default.isString(w))return a(g,{encoding:w});const E=Date.now()+((_=w.timeout)!==null&&_!==void 0?_:t.DEFAULT_TIMEOUT_SYNC);return l.default.readFileSyncRetry(E)(g,w)}Oe.readFileSync=a;const o=(g,w,_,E)=>{if(i.default.isFunction(_))return o(g,w,t.DEFAULT_WRITE_OPTIONS,_);const R=c(g,w,_);return E&&R.then(E,E),R};Oe.writeFile=o;const c=async(g,w,_=t.DEFAULT_WRITE_OPTIONS)=>{var E;if(i.default.isString(_))return c(g,w,{encoding:_});const R=Date.now()+((E=_.timeout)!==null&&E!==void 0?E:t.DEFAULT_TIMEOUT_ASYNC);let u=null,h=null,n=null,m=null,v=null;try{_.schedule&&(u=await _.schedule(g)),h=await f.default.schedule(g),g=await l.default.realpathAttempt(g)||g,[m,n]=s.default.get(g,_.tmpCreate||s.default.create,_.tmpPurge!==!1);const p=t.IS_POSIX&&i.default.isUndefined(_.chown),y=i.default.isUndefined(_.mode);if(p||y){const b=await l.default.statAttempt(g);b&&(_={..._},p&&(_.chown={uid:b.uid,gid:b.gid}),y&&(_.mode=b.mode))}const $=e.dirname(g);await l.default.mkdirAttempt($,{mode:t.DEFAULT_FOLDER_MODE,recursive:!0}),v=await l.default.openRetry(R)(m,"w",_.mode||t.DEFAULT_FILE_MODE),_.tmpCreated&&_.tmpCreated(m),i.default.isString(w)?await l.default.writeRetry(R)(v,w,0,_.encoding||t.DEFAULT_ENCODING):i.default.isUndefined(w)||await l.default.writeRetry(R)(v,w,0,w.length,0),_.fsync!==!1&&(_.fsyncWait!==!1?await l.default.fsyncRetry(R)(v):l.default.fsyncAttempt(v)),await l.default.closeRetry(R)(v),v=null,_.chown&&await l.default.chownAttempt(m,_.chown.uid,_.chown.gid),_.mode&&await l.default.chmodAttempt(m,_.mode);try{await l.default.renameRetry(R)(m,g)}catch(b){if(b.code!=="ENAMETOOLONG")throw b;await l.default.renameRetry(R)(m,s.default.truncate(g))}n(),m=null}finally{v&&await l.default.closeAttempt(v),m&&s.default.purge(m),u&&u(),h&&h()}},d=(g,w,_=t.DEFAULT_WRITE_OPTIONS)=>{var E;if(i.default.isString(_))return d(g,w,{encoding:_});const R=Date.now()+((E=_.timeout)!==null&&E!==void 0?E:t.DEFAULT_TIMEOUT_SYNC);let u=null,h=null,n=null;try{g=l.default.realpathSyncAttempt(g)||g,[h,u]=s.default.get(g,_.tmpCreate||s.default.create,_.tmpPurge!==!1);const m=t.IS_POSIX&&i.default.isUndefined(_.chown),v=i.default.isUndefined(_.mode);if(m||v){const y=l.default.statSyncAttempt(g);y&&(_={..._},m&&(_.chown={uid:y.uid,gid:y.gid}),v&&(_.mode=y.mode))}const p=e.dirname(g);l.default.mkdirSyncAttempt(p,{mode:t.DEFAULT_FOLDER_MODE,recursive:!0}),n=l.default.openSyncRetry(R)(h,"w",_.mode||t.DEFAULT_FILE_MODE),_.tmpCreated&&_.tmpCreated(h),i.default.isString(w)?l.default.writeSyncRetry(R)(n,w,0,_.encoding||t.DEFAULT_ENCODING):i.default.isUndefined(w)||l.default.writeSyncRetry(R)(n,w,0,w.length,0),_.fsync!==!1&&(_.fsyncWait!==!1?l.default.fsyncSyncRetry(R)(n):l.default.fsyncAttempt(n)),l.default.closeSyncRetry(R)(n),n=null,_.chown&&l.default.chownSyncAttempt(h,_.chown.uid,_.chown.gid),_.mode&&l.default.chmodSyncAttempt(h,_.mode);try{l.default.renameSyncRetry(R)(h,g)}catch(y){if(y.code!=="ENAMETOOLONG")throw y;l.default.renameSyncRetry(R)(h,s.default.truncate(g))}u(),h=null}finally{n&&l.default.closeSyncAttempt(n),h&&s.default.purge(h)}};return Oe.writeFileSync=d,Oe}var Gt={exports:{}},$s={},ke={},Xe={},Es={},ws={},Ss={},fa;function vn(){return fa||(fa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class l extends t{constructor(n){if(super(),!e.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=l;class i extends t{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((m,v)=>`${m}${v}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((m,v)=>(v instanceof l&&(m[v.str]=(m[v.str]||0)+1),m),{})}}e._Code=i,e.nil=new i("");function f(h,...n){const m=[h[0]];let v=0;for(;v<n.length;)a(m,n[v]),m.push(h[++v]);return new i(m)}e._=f;const s=new i("+");function r(h,...n){const m=[_(h[0])];let v=0;for(;v<n.length;)m.push(s),a(m,n[v]),m.push(s,_(h[++v]));return o(m),new i(m)}e.str=r;function a(h,n){n instanceof i?h.push(...n._items):n instanceof l?h.push(n):h.push(g(n))}e.addCodeArg=a;function o(h){let n=1;for(;n<h.length-1;){if(h[n]===s){const m=c(h[n-1],h[n+1]);if(m!==void 0){h.splice(n-1,3,m);continue}h[n++]="+"}n++}}function c(h,n){if(n==='""')return h;if(h==='""')return n;if(typeof h=="string")return n instanceof l||h[h.length-1]!=='"'?void 0:typeof n!="string"?`${h.slice(0,-1)}${n}"`:n[0]==='"'?h.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(h instanceof l))return`"${h}${n.slice(1)}`}function d(h,n){return n.emptyStr()?h:h.emptyStr()?n:r`${h}${n}`}e.strConcat=d;function g(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:_(Array.isArray(h)?h.join(","):h)}function w(h){return new i(_(h))}e.stringify=w;function _(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function E(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new i(`.${h}`):f`[${h}]`}e.getProperty=E;function R(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new i(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=R;function u(h){return new i(h.toString())}e.regexpCode=u}(Ss)),Ss}var Rs={},da;function ha(){return da||(da=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=vn();class l extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var i;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class f{constructor({prefixes:c,parent:d}={}){this._names={},this._prefixes=c,this._parent=d}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const d=this._names[c]||this._nameGroup(c);return`${c}${d.index++}`}_nameGroup(c){var d,g;if(!((g=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||g===void 0)&&g.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=f;class s extends t.Name{constructor(c,d){super(d),this.prefix=c}setValue(c,{property:d,itemIndex:g}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(d)}[${g}]`}}e.ValueScopeName=s;const r=(0,t._)`\n`;class a extends f{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?r:t.nil}}get(){return this._scope}name(c){return new s(c,this._newName(c))}value(c,d){var g;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(c),{prefix:_}=w,E=(g=d.key)!==null&&g!==void 0?g:d.ref;let R=this._values[_];if(R){const n=R.get(E);if(n)return n}else R=this._values[_]=new Map;R.set(E,w);const u=this._scope[_]||(this._scope[_]=[]),h=u.length;return u[h]=d.ref,w.setValue(d,{property:_,itemIndex:h}),w}getValue(c,d){const g=this._values[c];if(g)return g.get(d)}scopeRefs(c,d=this._values){return this._reduceValues(d,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,t._)`${c}${g.scopePath}`})}scopeCode(c=this._values,d,g){return this._reduceValues(c,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},d,g)}_reduceValues(c,d,g={},w){let _=t.nil;for(const E in c){const R=c[E];if(!R)continue;const u=g[E]=g[E]||new Map;R.forEach(h=>{if(u.has(h))return;u.set(h,i.Started);let n=d(h);if(n){const m=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${m} ${h} = ${n};${this.opts._n}`}else if(n=w?.(h))_=(0,t._)`${_}${n}${this.opts._n}`;else throw new l(h);u.set(h,i.Completed)})}return _}}e.ValueScope=a}(Rs)),Rs}var ma;function re(){return ma||(ma=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=vn(),l=ha();var i=vn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var f=ha();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return f.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return f.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return f.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return f.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(S,P){return this}}class r extends s{constructor(S,P,A){super(),this.varKind=S,this.name=P,this.rhs=A}render({es5:S,_n:P}){const A=S?l.varKinds.var:this.varKind,K=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${K};`+P}optimizeNames(S,P){if(S[this.name.str])return this.rhs&&(this.rhs=V(this.rhs,S,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(S,P,A){super(),this.lhs=S,this.rhs=P,this.sideEffects=A}render({_n:S}){return`${this.lhs} = ${this.rhs};`+S}optimizeNames(S,P){if(!(this.lhs instanceof t.Name&&!S[this.lhs.str]&&!this.sideEffects))return this.rhs=V(this.rhs,S,P),this}get names(){const S=this.lhs instanceof t.Name?{}:{...this.lhs.names};return M(S,this.rhs)}}class o extends a{constructor(S,P,A,K){super(S,A,K),this.op=P}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class c extends s{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class d extends s{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class g extends s{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class w extends s{constructor(S){super(),this.code=S}render({_n:S}){return`${this.code};`+S}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(S,P){return this.code=V(this.code,S,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends s{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((P,A)=>P+A.render(S),"")}optimizeNodes(){const{nodes:S}=this;let P=S.length;for(;P--;){const A=S[P].optimizeNodes();Array.isArray(A)?S.splice(P,1,...A):A?S[P]=A:S.splice(P,1)}return S.length>0?this:void 0}optimizeNames(S,P){const{nodes:A}=this;let K=A.length;for(;K--;){const B=A[K];B.optimizeNames(S,P)||(z(S,B.names),A.splice(K,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((S,P)=>H(S,P.names),{})}}class E extends _{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class R extends _{}class u extends E{}u.kind="else";class h extends E{constructor(S,P){super(P),this.condition=S}render(S){let P=`if(${this.condition})`+super.render(S);return this.else&&(P+="else "+this.else.render(S)),P}optimizeNodes(){super.optimizeNodes();const S=this.condition;if(S===!0)return this.nodes;let P=this.else;if(P){const A=P.optimizeNodes();P=this.else=Array.isArray(A)?new u(A):A}if(P)return S===!1?P instanceof h?P:P.nodes:this.nodes.length?this:new h(J(S),P instanceof h?[P]:P.nodes);if(!(S===!1||!this.nodes.length))return this}optimizeNames(S,P){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(S,P),!!(super.optimizeNames(S,P)||this.else))return this.condition=V(this.condition,S,P),this}get names(){const S=super.names;return M(S,this.condition),this.else&&H(S,this.else.names),S}}h.kind="if";class n extends E{}n.kind="for";class m extends n{constructor(S){super(),this.iteration=S}render(S){return`for(${this.iteration})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iteration=V(this.iteration,S,P),this}get names(){return H(super.names,this.iteration.names)}}class v extends n{constructor(S,P,A,K){super(),this.varKind=S,this.name=P,this.from=A,this.to=K}render(S){const P=S.es5?l.varKinds.var:this.varKind,{name:A,from:K,to:B}=this;return`for(${P} ${A}=${K}; ${A}<${B}; ${A}++)`+super.render(S)}get names(){const S=M(super.names,this.from);return M(S,this.to)}}class p extends n{constructor(S,P,A,K){super(),this.loop=S,this.varKind=P,this.name=A,this.iterable=K}render(S){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iterable=V(this.iterable,S,P),this}get names(){return H(super.names,this.iterable.names)}}class y extends E{constructor(S,P,A){super(),this.name=S,this.args=P,this.async=A}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}y.kind="func";class $ extends _{render(S){return"return "+super.render(S)}}$.kind="return";class b extends E{render(S){let P="try"+super.render(S);return this.catch&&(P+=this.catch.render(S)),this.finally&&(P+=this.finally.render(S)),P}optimizeNodes(){var S,P;return super.optimizeNodes(),(S=this.catch)===null||S===void 0||S.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(S,P){var A,K;return super.optimizeNames(S,P),(A=this.catch)===null||A===void 0||A.optimizeNames(S,P),(K=this.finally)===null||K===void 0||K.optimizeNames(S,P),this}get names(){const S=super.names;return this.catch&&H(S,this.catch.names),this.finally&&H(S,this.finally.names),S}}class N extends E{constructor(S){super(),this.error=S}render(S){return`catch(${this.error})`+super.render(S)}}N.kind="catch";class L extends E{render(S){return"finally"+super.render(S)}}L.kind="finally";class F{constructor(S,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
8
|
+
`:""},this._extScope=S,this._scope=new l.Scope({parent:S}),this._nodes=[new R]}toString(){return this._root.render(this.opts)}name(S){return this._scope.name(S)}scopeName(S){return this._extScope.name(S)}scopeValue(S,P){const A=this._extScope.value(S,P);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(S,P){return this._extScope.getValue(S,P)}scopeRefs(S){return this._extScope.scopeRefs(S,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(S,P,A,K){const B=this._scope.toName(P);return A!==void 0&&K&&(this._constants[B.str]=A),this._leafNode(new r(S,B,A)),B}const(S,P,A){return this._def(l.varKinds.const,S,P,A)}let(S,P,A){return this._def(l.varKinds.let,S,P,A)}var(S,P,A){return this._def(l.varKinds.var,S,P,A)}assign(S,P,A){return this._leafNode(new a(S,P,A))}add(S,P){return this._leafNode(new o(S,e.operators.ADD,P))}code(S){return typeof S=="function"?S():S!==t.nil&&this._leafNode(new w(S)),this}object(...S){const P=["{"];for(const[A,K]of S)P.length>1&&P.push(","),P.push(A),(A!==K||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,K));return P.push("}"),new t._Code(P)}if(S,P,A){if(this._blockNode(new h(S)),P&&A)this.code(P).else().code(A).endIf();else if(P)this.code(P).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(S){return this._elseNode(new h(S))}else(){return this._elseNode(new u)}endIf(){return this._endBlockNode(h,u)}_for(S,P){return this._blockNode(S),P&&this.code(P).endFor(),this}for(S,P){return this._for(new m(S),P)}forRange(S,P,A,K,B=this.opts.es5?l.varKinds.var:l.varKinds.let){const X=this._scope.toName(S);return this._for(new v(B,X,P,A),()=>K(X))}forOf(S,P,A,K=l.varKinds.const){const B=this._scope.toName(S);if(this.opts.es5){const X=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${X}.length`,Z=>{this.var(B,(0,t._)`${X}[${Z}]`),A(B)})}return this._for(new p("of",K,B,P),()=>A(B))}forIn(S,P,A,K=this.opts.es5?l.varKinds.var:l.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,(0,t._)`Object.keys(${P})`,A);const B=this._scope.toName(S);return this._for(new p("in",K,B,P),()=>A(B))}endFor(){return this._endBlockNode(n)}label(S){return this._leafNode(new c(S))}break(S){return this._leafNode(new d(S))}return(S){const P=new $;if(this._blockNode(P),this.code(S),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(S,P,A){if(!P&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const K=new b;if(this._blockNode(K),this.code(S),P){const B=this.name("e");this._currNode=K.catch=new N(B),P(B)}return A&&(this._currNode=K.finally=new L,this.code(A)),this._endBlockNode(N,L)}throw(S){return this._leafNode(new g(S))}block(S,P){return this._blockStarts.push(this._nodes.length),S&&this.code(S).endBlock(P),this}endBlock(S){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-P;if(A<0||S!==void 0&&A!==S)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${S} expected`);return this._nodes.length=P,this}func(S,P=t.nil,A,K){return this._blockNode(new y(S,P,A)),K&&this.code(K).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(S=1){for(;S-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(S){return this._currNode.nodes.push(S),this}_blockNode(S){this._currNode.nodes.push(S),this._nodes.push(S)}_endBlockNode(S,P){const A=this._currNode;if(A instanceof S||P&&A instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${S.kind}/${P.kind}`:S.kind}"`)}_elseNode(S){const P=this._currNode;if(!(P instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=S,this}get _root(){return this._nodes[0]}get _currNode(){const S=this._nodes;return S[S.length-1]}set _currNode(S){const P=this._nodes;P[P.length-1]=S}}e.CodeGen=F;function H(T,S){for(const P in S)T[P]=(T[P]||0)+(S[P]||0);return T}function M(T,S){return S instanceof t._CodeOrName?H(T,S.names):T}function V(T,S,P){if(T instanceof t.Name)return A(T);if(!K(T))return T;return new t._Code(T._items.reduce((B,X)=>(X instanceof t.Name&&(X=A(X)),X instanceof t._Code?B.push(...X._items):B.push(X),B),[]));function A(B){const X=P[B.str];return X===void 0||S[B.str]!==1?B:(delete S[B.str],X)}function K(B){return B instanceof t._Code&&B._items.some(X=>X instanceof t.Name&&S[X.str]===1&&P[X.str]!==void 0)}}function z(T,S){for(const P in S)T[P]=(T[P]||0)-(S[P]||0)}function J(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${q(T)}`}e.not=J;const W=O(e.operators.AND);function j(...T){return T.reduce(W)}e.and=j;const G=O(e.operators.OR);function D(...T){return T.reduce(G)}e.or=D;function O(T){return(S,P)=>S===t.nil?P:P===t.nil?S:(0,t._)`${q(S)} ${T} ${q(P)}`}function q(T){return T instanceof t.Name?T:(0,t._)`(${T})`}}(ws)),ws}var Q={},pa;function ie(){if(pa)return Q;pa=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.checkStrictMode=Q.getErrorPath=Q.Type=Q.useFunc=Q.setEvaluated=Q.evaluatedPropsToName=Q.mergeEvaluated=Q.eachItem=Q.unescapeJsonPointer=Q.escapeJsonPointer=Q.escapeFragment=Q.unescapeFragment=Q.schemaRefOrVal=Q.schemaHasRulesButRef=Q.schemaHasRules=Q.checkUnknownRules=Q.alwaysValidSchema=Q.toHash=void 0;const e=re(),t=vn();function l(p){const y={};for(const $ of p)y[$]=!0;return y}Q.toHash=l;function i(p,y){return typeof y=="boolean"?y:Object.keys(y).length===0?!0:(f(p,y),!s(y,p.self.RULES.all))}Q.alwaysValidSchema=i;function f(p,y=p.schema){const{opts:$,self:b}=p;if(!$.strictSchema||typeof y=="boolean")return;const N=b.RULES.keywords;for(const L in y)N[L]||v(p,`unknown keyword: "${L}"`)}Q.checkUnknownRules=f;function s(p,y){if(typeof p=="boolean")return!p;for(const $ in p)if(y[$])return!0;return!1}Q.schemaHasRules=s;function r(p,y){if(typeof p=="boolean")return!p;for(const $ in p)if($!=="$ref"&&y.all[$])return!0;return!1}Q.schemaHasRulesButRef=r;function a({topSchemaRef:p,schemaPath:y},$,b,N){if(!N){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return(0,e._)`${$}`}return(0,e._)`${p}${y}${(0,e.getProperty)(b)}`}Q.schemaRefOrVal=a;function o(p){return g(decodeURIComponent(p))}Q.unescapeFragment=o;function c(p){return encodeURIComponent(d(p))}Q.escapeFragment=c;function d(p){return typeof p=="number"?`${p}`:p.replace(/~/g,"~0").replace(/\//g,"~1")}Q.escapeJsonPointer=d;function g(p){return p.replace(/~1/g,"/").replace(/~0/g,"~")}Q.unescapeJsonPointer=g;function w(p,y){if(Array.isArray(p))for(const $ of p)y($);else y(p)}Q.eachItem=w;function _({mergeNames:p,mergeToName:y,mergeValues:$,resultToName:b}){return(N,L,F,H)=>{const M=F===void 0?L:F instanceof e.Name?(L instanceof e.Name?p(N,L,F):y(N,L,F),F):L instanceof e.Name?(y(N,F,L),L):$(L,F);return H===e.Name&&!(M instanceof e.Name)?b(N,M):M}}Q.mergeEvaluated={props:_({mergeNames:(p,y,$)=>p.if((0,e._)`${$} !== true && ${y} !== undefined`,()=>{p.if((0,e._)`${y} === true`,()=>p.assign($,!0),()=>p.assign($,(0,e._)`${$} || {}`).code((0,e._)`Object.assign(${$}, ${y})`))}),mergeToName:(p,y,$)=>p.if((0,e._)`${$} !== true`,()=>{y===!0?p.assign($,!0):(p.assign($,(0,e._)`${$} || {}`),R(p,$,y))}),mergeValues:(p,y)=>p===!0?!0:{...p,...y},resultToName:E}),items:_({mergeNames:(p,y,$)=>p.if((0,e._)`${$} !== true && ${y} !== undefined`,()=>p.assign($,(0,e._)`${y} === true ? true : ${$} > ${y} ? ${$} : ${y}`)),mergeToName:(p,y,$)=>p.if((0,e._)`${$} !== true`,()=>p.assign($,y===!0?!0:(0,e._)`${$} > ${y} ? ${$} : ${y}`)),mergeValues:(p,y)=>p===!0?!0:Math.max(p,y),resultToName:(p,y)=>p.var("items",y)})};function E(p,y){if(y===!0)return p.var("props",!0);const $=p.var("props",(0,e._)`{}`);return y!==void 0&&R(p,$,y),$}Q.evaluatedPropsToName=E;function R(p,y,$){Object.keys($).forEach(b=>p.assign((0,e._)`${y}${(0,e.getProperty)(b)}`,!0))}Q.setEvaluated=R;const u={};function h(p,y){return p.scopeValue("func",{ref:y,code:u[y.code]||(u[y.code]=new t._Code(y.code))})}Q.useFunc=h;var n;(function(p){p[p.Num=0]="Num",p[p.Str=1]="Str"})(n||(Q.Type=n={}));function m(p,y,$){if(p instanceof e.Name){const b=y===n.Num;return $?b?(0,e._)`"[" + ${p} + "]"`:(0,e._)`"['" + ${p} + "']"`:b?(0,e._)`"/" + ${p}`:(0,e._)`"/" + ${p}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,e.getProperty)(p).toString():"/"+d(p)}Q.getErrorPath=m;function v(p,y,$=p.opts.strictSchema){if($){if(y=`strict mode: ${y}`,$===!0)throw new Error(y);p.self.logger.warn(y)}}return Q.checkStrictMode=v,Q}var Kt={},ya;function Ke(){if(ya)return Kt;ya=1,Object.defineProperty(Kt,"__esModule",{value:!0});const e=re(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Kt.default=t,Kt}var va;function wn(){return va||(va=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=re(),l=ie(),i=Ke();e.keywordError={message:({keyword:u})=>(0,t.str)`must pass "${u}" keyword validation`},e.keyword$DataError={message:({keyword:u,schemaType:h})=>h?(0,t.str)`"${u}" keyword must be ${h} ($data)`:(0,t.str)`"${u}" keyword is invalid ($data)`};function f(u,h=e.keywordError,n,m){const{it:v}=u,{gen:p,compositeRule:y,allErrors:$}=v,b=g(u,h,n);m??(y||$)?o(p,b):c(v,(0,t._)`[${b}]`)}e.reportError=f;function s(u,h=e.keywordError,n){const{it:m}=u,{gen:v,compositeRule:p,allErrors:y}=m,$=g(u,h,n);o(v,$),p||y||c(m,i.default.vErrors)}e.reportExtraError=s;function r(u,h){u.assign(i.default.errors,h),u.if((0,t._)`${i.default.vErrors} !== null`,()=>u.if(h,()=>u.assign((0,t._)`${i.default.vErrors}.length`,h),()=>u.assign(i.default.vErrors,null)))}e.resetErrorsCount=r;function a({gen:u,keyword:h,schemaValue:n,data:m,errsCount:v,it:p}){if(v===void 0)throw new Error("ajv implementation error");const y=u.name("err");u.forRange("i",v,i.default.errors,$=>{u.const(y,(0,t._)`${i.default.vErrors}[${$}]`),u.if((0,t._)`${y}.instancePath === undefined`,()=>u.assign((0,t._)`${y}.instancePath`,(0,t.strConcat)(i.default.instancePath,p.errorPath))),u.assign((0,t._)`${y}.schemaPath`,(0,t.str)`${p.errSchemaPath}/${h}`),p.opts.verbose&&(u.assign((0,t._)`${y}.schema`,n),u.assign((0,t._)`${y}.data`,m))})}e.extendErrors=a;function o(u,h){const n=u.const("err",h);u.if((0,t._)`${i.default.vErrors} === null`,()=>u.assign(i.default.vErrors,(0,t._)`[${n}]`),(0,t._)`${i.default.vErrors}.push(${n})`),u.code((0,t._)`${i.default.errors}++`)}function c(u,h){const{gen:n,validateName:m,schemaEnv:v}=u;v.$async?n.throw((0,t._)`new ${u.ValidationError}(${h})`):(n.assign((0,t._)`${m}.errors`,h),n.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function g(u,h,n){const{createErrors:m}=u.it;return m===!1?(0,t._)`{}`:w(u,h,n)}function w(u,h,n={}){const{gen:m,it:v}=u,p=[_(v,n),E(u,n)];return R(u,h,p),m.object(...p)}function _({errorPath:u},{instancePath:h}){const n=h?(0,t.str)`${u}${(0,l.getErrorPath)(h,l.Type.Str)}`:u;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}function E({keyword:u,it:{errSchemaPath:h}},{schemaPath:n,parentSchema:m}){let v=m?h:(0,t.str)`${h}/${u}`;return n&&(v=(0,t.str)`${v}${(0,l.getErrorPath)(n,l.Type.Str)}`),[d.schemaPath,v]}function R(u,{params:h,message:n},m){const{keyword:v,data:p,schemaValue:y,it:$}=u,{opts:b,propertyName:N,topSchemaRef:L,schemaPath:F}=$;m.push([d.keyword,v],[d.params,typeof h=="function"?h(u):h||(0,t._)`{}`]),b.messages&&m.push([d.message,typeof n=="function"?n(u):n]),b.verbose&&m.push([d.schema,y],[d.parentSchema,(0,t._)`${L}${F}`],[i.default.data,p]),N&&m.push([d.propertyName,N])}}(Es)),Es}var _a;function pd(){if(_a)return Xe;_a=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.boolOrEmptySchema=Xe.topBoolOrEmptySchema=void 0;const e=wn(),t=re(),l=Ke(),i={message:"boolean schema is false"};function f(a){const{gen:o,schema:c,validateName:d}=a;c===!1?r(a,!1):typeof c=="object"&&c.$async===!0?o.return(l.default.data):(o.assign((0,t._)`${d}.errors`,null),o.return(!0))}Xe.topBoolOrEmptySchema=f;function s(a,o){const{gen:c,schema:d}=a;d===!1?(c.var(o,!1),r(a)):c.var(o,!0)}Xe.boolOrEmptySchema=s;function r(a,o){const{gen:c,data:d}=a,g={gen:c,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(g,i,void 0,o)}return Xe}var pe={},Ye={},ga;function sf(){if(ga)return Ye;ga=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.getRules=Ye.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function l(f){return typeof f=="string"&&t.has(f)}Ye.isJSONType=l;function i(){const f={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...f,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},f.number,f.string,f.array,f.object],post:{rules:[]},all:{},keywords:{}}}return Ye.getRules=i,Ye}var je={},$a;function of(){if($a)return je;$a=1,Object.defineProperty(je,"__esModule",{value:!0}),je.shouldUseRule=je.shouldUseGroup=je.schemaHasRulesForType=void 0;function e({schema:i,self:f},s){const r=f.RULES.types[s];return r&&r!==!0&&t(i,r)}je.schemaHasRulesForType=e;function t(i,f){return f.rules.some(s=>l(i,s))}je.shouldUseGroup=t;function l(i,f){var s;return i[f.keyword]!==void 0||((s=f.definition.implements)===null||s===void 0?void 0:s.some(r=>i[r]!==void 0))}return je.shouldUseRule=l,je}var Ea;function _n(){if(Ea)return pe;Ea=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.reportTypeError=pe.checkDataTypes=pe.checkDataType=pe.coerceAndCheckDataType=pe.getJSONTypes=pe.getSchemaTypes=pe.DataType=void 0;const e=sf(),t=of(),l=wn(),i=re(),f=ie();var s;(function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"})(s||(pe.DataType=s={}));function r(n){const m=a(n.type);if(m.includes("null")){if(n.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&n.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');n.nullable===!0&&m.push("null")}return m}pe.getSchemaTypes=r;function a(n){const m=Array.isArray(n)?n:n?[n]:[];if(m.every(e.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}pe.getJSONTypes=a;function o(n,m){const{gen:v,data:p,opts:y}=n,$=d(m,y.coerceTypes),b=m.length>0&&!($.length===0&&m.length===1&&(0,t.schemaHasRulesForType)(n,m[0]));if(b){const N=E(m,p,y.strictNumbers,s.Wrong);v.if(N,()=>{$.length?g(n,m,$):u(n)})}return b}pe.coerceAndCheckDataType=o;const c=new Set(["string","number","integer","boolean","null"]);function d(n,m){return m?n.filter(v=>c.has(v)||m==="array"&&v==="array"):[]}function g(n,m,v){const{gen:p,data:y,opts:$}=n,b=p.let("dataType",(0,i._)`typeof ${y}`),N=p.let("coerced",(0,i._)`undefined`);$.coerceTypes==="array"&&p.if((0,i._)`${b} == 'object' && Array.isArray(${y}) && ${y}.length == 1`,()=>p.assign(y,(0,i._)`${y}[0]`).assign(b,(0,i._)`typeof ${y}`).if(E(m,y,$.strictNumbers),()=>p.assign(N,y))),p.if((0,i._)`${N} !== undefined`);for(const F of v)(c.has(F)||F==="array"&&$.coerceTypes==="array")&&L(F);p.else(),u(n),p.endIf(),p.if((0,i._)`${N} !== undefined`,()=>{p.assign(y,N),w(n,N)});function L(F){switch(F){case"string":p.elseIf((0,i._)`${b} == "number" || ${b} == "boolean"`).assign(N,(0,i._)`"" + ${y}`).elseIf((0,i._)`${y} === null`).assign(N,(0,i._)`""`);return;case"number":p.elseIf((0,i._)`${b} == "boolean" || ${y} === null
|
|
9
|
+
|| (${b} == "string" && ${y} && ${y} == +${y})`).assign(N,(0,i._)`+${y}`);return;case"integer":p.elseIf((0,i._)`${b} === "boolean" || ${y} === null
|
|
10
|
+
|| (${b} === "string" && ${y} && ${y} == +${y} && !(${y} % 1))`).assign(N,(0,i._)`+${y}`);return;case"boolean":p.elseIf((0,i._)`${y} === "false" || ${y} === 0 || ${y} === null`).assign(N,!1).elseIf((0,i._)`${y} === "true" || ${y} === 1`).assign(N,!0);return;case"null":p.elseIf((0,i._)`${y} === "" || ${y} === 0 || ${y} === false`),p.assign(N,null);return;case"array":p.elseIf((0,i._)`${b} === "string" || ${b} === "number"
|
|
11
|
+
|| ${b} === "boolean" || ${y} === null`).assign(N,(0,i._)`[${y}]`)}}}function w({gen:n,parentData:m,parentDataProperty:v},p){n.if((0,i._)`${m} !== undefined`,()=>n.assign((0,i._)`${m}[${v}]`,p))}function _(n,m,v,p=s.Correct){const y=p===s.Correct?i.operators.EQ:i.operators.NEQ;let $;switch(n){case"null":return(0,i._)`${m} ${y} null`;case"array":$=(0,i._)`Array.isArray(${m})`;break;case"object":$=(0,i._)`${m} && typeof ${m} == "object" && !Array.isArray(${m})`;break;case"integer":$=b((0,i._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":$=b();break;default:return(0,i._)`typeof ${m} ${y} ${n}`}return p===s.Correct?$:(0,i.not)($);function b(N=i.nil){return(0,i.and)((0,i._)`typeof ${m} == "number"`,N,v?(0,i._)`isFinite(${m})`:i.nil)}}pe.checkDataType=_;function E(n,m,v,p){if(n.length===1)return _(n[0],m,v,p);let y;const $=(0,f.toHash)(n);if($.array&&$.object){const b=(0,i._)`typeof ${m} != "object"`;y=$.null?b:(0,i._)`!${m} || ${b}`,delete $.null,delete $.array,delete $.object}else y=i.nil;$.number&&delete $.integer;for(const b in $)y=(0,i.and)(y,_(b,m,v,p));return y}pe.checkDataTypes=E;const R={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:m})=>typeof n=="string"?(0,i._)`{type: ${n}}`:(0,i._)`{type: ${m}}`};function u(n){const m=h(n);(0,l.reportError)(m,R)}pe.reportTypeError=u;function h(n){const{gen:m,data:v,schema:p}=n,y=(0,f.schemaRefOrVal)(n,p,"type");return{gen:m,keyword:"type",data:v,schema:p.type,schemaCode:y,schemaValue:y,parentSchema:p,params:{},it:n}}return pe}var mt={},wa;function yd(){if(wa)return mt;wa=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.assignDefaults=void 0;const e=re(),t=ie();function l(f,s){const{properties:r,items:a}=f.schema;if(s==="object"&&r)for(const o in r)i(f,o,r[o].default);else s==="array"&&Array.isArray(a)&&a.forEach((o,c)=>i(f,c,o.default))}mt.assignDefaults=l;function i(f,s,r){const{gen:a,compositeRule:o,data:c,opts:d}=f;if(r===void 0)return;const g=(0,e._)`${c}${(0,e.getProperty)(s)}`;if(o){(0,t.checkStrictMode)(f,`default is ignored for: ${g}`);return}let w=(0,e._)`${g} === undefined`;d.useDefaults==="empty"&&(w=(0,e._)`${w} || ${g} === null || ${g} === ""`),a.if(w,(0,e._)`${g} = ${(0,e.stringify)(r)}`)}return mt}var Ie={},ue={},Sa;function Ce(){if(Sa)return ue;Sa=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.validateUnion=ue.validateArray=ue.usePattern=ue.callValidateCode=ue.schemaProperties=ue.allSchemaProperties=ue.noPropertyInData=ue.propertyInData=ue.isOwnProperty=ue.hasPropFunc=ue.reportMissingProp=ue.checkMissingProp=ue.checkReportMissingProp=void 0;const e=re(),t=ie(),l=Ke(),i=ie();function f(n,m){const{gen:v,data:p,it:y}=n;v.if(d(v,p,m,y.opts.ownProperties),()=>{n.setParams({missingProperty:(0,e._)`${m}`},!0),n.error()})}ue.checkReportMissingProp=f;function s({gen:n,data:m,it:{opts:v}},p,y){return(0,e.or)(...p.map($=>(0,e.and)(d(n,m,$,v.ownProperties),(0,e._)`${y} = ${$}`)))}ue.checkMissingProp=s;function r(n,m){n.setParams({missingProperty:m},!0),n.error()}ue.reportMissingProp=r;function a(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ue.hasPropFunc=a;function o(n,m,v){return(0,e._)`${a(n)}.call(${m}, ${v})`}ue.isOwnProperty=o;function c(n,m,v,p){const y=(0,e._)`${m}${(0,e.getProperty)(v)} !== undefined`;return p?(0,e._)`${y} && ${o(n,m,v)}`:y}ue.propertyInData=c;function d(n,m,v,p){const y=(0,e._)`${m}${(0,e.getProperty)(v)} === undefined`;return p?(0,e.or)(y,(0,e.not)(o(n,m,v))):y}ue.noPropertyInData=d;function g(n){return n?Object.keys(n).filter(m=>m!=="__proto__"):[]}ue.allSchemaProperties=g;function w(n,m){return g(m).filter(v=>!(0,t.alwaysValidSchema)(n,m[v]))}ue.schemaProperties=w;function _({schemaCode:n,data:m,it:{gen:v,topSchemaRef:p,schemaPath:y,errorPath:$},it:b},N,L,F){const H=F?(0,e._)`${n}, ${m}, ${p}${y}`:m,M=[[l.default.instancePath,(0,e.strConcat)(l.default.instancePath,$)],[l.default.parentData,b.parentData],[l.default.parentDataProperty,b.parentDataProperty],[l.default.rootData,l.default.rootData]];b.opts.dynamicRef&&M.push([l.default.dynamicAnchors,l.default.dynamicAnchors]);const V=(0,e._)`${H}, ${v.object(...M)}`;return L!==e.nil?(0,e._)`${N}.call(${L}, ${V})`:(0,e._)`${N}(${V})`}ue.callValidateCode=_;const E=(0,e._)`new RegExp`;function R({gen:n,it:{opts:m}},v){const p=m.unicodeRegExp?"u":"",{regExp:y}=m.code,$=y(v,p);return n.scopeValue("pattern",{key:$.toString(),ref:$,code:(0,e._)`${y.code==="new RegExp"?E:(0,i.useFunc)(n,y)}(${v}, ${p})`})}ue.usePattern=R;function u(n){const{gen:m,data:v,keyword:p,it:y}=n,$=m.name("valid");if(y.allErrors){const N=m.let("valid",!0);return b(()=>m.assign(N,!1)),N}return m.var($,!0),b(()=>m.break()),$;function b(N){const L=m.const("len",(0,e._)`${v}.length`);m.forRange("i",0,L,F=>{n.subschema({keyword:p,dataProp:F,dataPropType:t.Type.Num},$),m.if((0,e.not)($),N)})}}ue.validateArray=u;function h(n){const{gen:m,schema:v,keyword:p,it:y}=n;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(L=>(0,t.alwaysValidSchema)(y,L))&&!y.opts.unevaluated)return;const b=m.let("valid",!1),N=m.name("_valid");m.block(()=>v.forEach((L,F)=>{const H=n.subschema({keyword:p,schemaProp:F,compositeRule:!0},N);m.assign(b,(0,e._)`${b} || ${N}`),n.mergeValidEvaluated(H,N)||m.if((0,e.not)(b))})),n.result(b,()=>n.reset(),()=>n.error(!0))}return ue.validateUnion=h,ue}var Ra;function vd(){if(Ra)return Ie;Ra=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.validateKeywordUsage=Ie.validSchemaType=Ie.funcKeywordCode=Ie.macroKeywordCode=void 0;const e=re(),t=Ke(),l=Ce(),i=wn();function f(w,_){const{gen:E,keyword:R,schema:u,parentSchema:h,it:n}=w,m=_.macro.call(n.self,u,h,n),v=c(E,R,m);n.opts.validateSchema!==!1&&n.self.validateSchema(m,!0);const p=E.name("valid");w.subschema({schema:m,schemaPath:e.nil,errSchemaPath:`${n.errSchemaPath}/${R}`,topSchemaRef:v,compositeRule:!0},p),w.pass(p,()=>w.error(!0))}Ie.macroKeywordCode=f;function s(w,_){var E;const{gen:R,keyword:u,schema:h,parentSchema:n,$data:m,it:v}=w;o(v,_);const p=!m&&_.compile?_.compile.call(v.self,h,n,v):_.validate,y=c(R,u,p),$=R.let("valid");w.block$data($,b),w.ok((E=_.valid)!==null&&E!==void 0?E:$);function b(){if(_.errors===!1)F(),_.modifying&&r(w),H(()=>w.error());else{const M=_.async?N():L();_.modifying&&r(w),H(()=>a(w,M))}}function N(){const M=R.let("ruleErrs",null);return R.try(()=>F((0,e._)`await `),V=>R.assign($,!1).if((0,e._)`${V} instanceof ${v.ValidationError}`,()=>R.assign(M,(0,e._)`${V}.errors`),()=>R.throw(V))),M}function L(){const M=(0,e._)`${y}.errors`;return R.assign(M,null),F(e.nil),M}function F(M=_.async?(0,e._)`await `:e.nil){const V=v.opts.passContext?t.default.this:t.default.self,z=!("compile"in _&&!m||_.schema===!1);R.assign($,(0,e._)`${M}${(0,l.callValidateCode)(w,y,V,z)}`,_.modifying)}function H(M){var V;R.if((0,e.not)((V=_.valid)!==null&&V!==void 0?V:$),M)}}Ie.funcKeywordCode=s;function r(w){const{gen:_,data:E,it:R}=w;_.if(R.parentData,()=>_.assign(E,(0,e._)`${R.parentData}[${R.parentDataProperty}]`))}function a(w,_){const{gen:E}=w;E.if((0,e._)`Array.isArray(${_})`,()=>{E.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(w)},()=>w.error())}function o({schemaEnv:w},_){if(_.async&&!w.$async)throw new Error("async keyword in sync schema")}function c(w,_,E){if(E===void 0)throw new Error(`keyword "${_}" failed to compile`);return w.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(w,_,E=!1){return!_.length||_.some(R=>R==="array"?Array.isArray(w):R==="object"?w&&typeof w=="object"&&!Array.isArray(w):typeof w==R||E&&typeof w>"u")}Ie.validSchemaType=d;function g({schema:w,opts:_,self:E,errSchemaPath:R},u,h){if(Array.isArray(u.keyword)?!u.keyword.includes(h):u.keyword!==h)throw new Error("ajv implementation error");const n=u.dependencies;if(n?.some(m=>!Object.prototype.hasOwnProperty.call(w,m)))throw new Error(`parent schema must have dependencies of ${h}: ${n.join(",")}`);if(u.validateSchema&&!u.validateSchema(w[h])){const v=`keyword "${h}" value is invalid at path "${R}": `+E.errorsText(u.validateSchema.errors);if(_.validateSchema==="log")E.logger.error(v);else throw new Error(v)}}return Ie.validateKeywordUsage=g,Ie}var Fe={},ba;function _d(){if(ba)return Fe;ba=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.extendSubschemaMode=Fe.extendSubschemaData=Fe.getSubschema=void 0;const e=re(),t=ie();function l(s,{keyword:r,schemaProp:a,schema:o,schemaPath:c,errSchemaPath:d,topSchemaRef:g}){if(r!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(r!==void 0){const w=s.schema[r];return a===void 0?{schema:w,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(r)}`,errSchemaPath:`${s.errSchemaPath}/${r}`}:{schema:w[a],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(r)}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${r}/${(0,t.escapeFragment)(a)}`}}if(o!==void 0){if(c===void 0||d===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:c,topSchemaRef:g,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}Fe.getSubschema=l;function i(s,r,{dataProp:a,dataPropType:o,data:c,dataTypes:d,propertyName:g}){if(c!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:w}=r;if(a!==void 0){const{errorPath:E,dataPathArr:R,opts:u}=r,h=w.let("data",(0,e._)`${r.data}${(0,e.getProperty)(a)}`,!0);_(h),s.errorPath=(0,e.str)`${E}${(0,t.getErrorPath)(a,o,u.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${a}`,s.dataPathArr=[...R,s.parentDataProperty]}if(c!==void 0){const E=c instanceof e.Name?c:w.let("data",c,!0);_(E),g!==void 0&&(s.propertyName=g)}d&&(s.dataTypes=d);function _(E){s.data=E,s.dataLevel=r.dataLevel+1,s.dataTypes=[],r.definedProperties=new Set,s.parentData=r.data,s.dataNames=[...r.dataNames,E]}}Fe.extendSubschemaData=i;function f(s,{jtdDiscriminator:r,jtdMetadata:a,compositeRule:o,createErrors:c,allErrors:d}){o!==void 0&&(s.compositeRule=o),c!==void 0&&(s.createErrors=c),d!==void 0&&(s.allErrors=d),s.jtdDiscriminator=r,s.jtdMetadata=a}return Fe.extendSubschemaMode=f,Fe}var _e={},bs,Pa;function Sn(){return Pa||(Pa=1,bs=function e(t,l){if(t===l)return!0;if(t&&l&&typeof t=="object"&&typeof l=="object"){if(t.constructor!==l.constructor)return!1;var i,f,s;if(Array.isArray(t)){if(i=t.length,i!=l.length)return!1;for(f=i;f--!==0;)if(!e(t[f],l[f]))return!1;return!0}if(t.constructor===RegExp)return t.source===l.source&&t.flags===l.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===l.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===l.toString();if(s=Object.keys(t),i=s.length,i!==Object.keys(l).length)return!1;for(f=i;f--!==0;)if(!Object.prototype.hasOwnProperty.call(l,s[f]))return!1;for(f=i;f--!==0;){var r=s[f];if(!e(t[r],l[r]))return!1}return!0}return t!==t&&l!==l}),bs}var Ps={exports:{}},Na;function gd(){if(Na)return Ps.exports;Na=1;var e=Ps.exports=function(i,f,s){typeof f=="function"&&(s=f,f={}),s=f.cb||s;var r=typeof s=="function"?s:s.pre||function(){},a=s.post||function(){};t(f,r,a,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,f,s,r,a,o,c,d,g,w){if(r&&typeof r=="object"&&!Array.isArray(r)){f(r,a,o,c,d,g,w);for(var _ in r){var E=r[_];if(Array.isArray(E)){if(_ in e.arrayKeywords)for(var R=0;R<E.length;R++)t(i,f,s,E[R],a+"/"+_+"/"+R,o,a,_,r,R)}else if(_ in e.propsKeywords){if(E&&typeof E=="object")for(var u in E)t(i,f,s,E[u],a+"/"+_+"/"+l(u),o,a,_,r,u)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,f,s,E,a+"/"+_,o,a,_,r)}s(r,a,o,c,d,g,w)}}function l(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return Ps.exports}var Oa;function Rn(){if(Oa)return _e;Oa=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getSchemaRefs=_e.resolveUrl=_e.normalizeId=_e._getFullPath=_e.getFullPath=_e.inlineRef=void 0;const e=ie(),t=Sn(),l=gd(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function f(R,u=!0){return typeof R=="boolean"?!0:u===!0?!r(R):u?a(R)<=u:!1}_e.inlineRef=f;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function r(R){for(const u in R){if(s.has(u))return!0;const h=R[u];if(Array.isArray(h)&&h.some(r)||typeof h=="object"&&r(h))return!0}return!1}function a(R){let u=0;for(const h in R){if(h==="$ref")return 1/0;if(u++,!i.has(h)&&(typeof R[h]=="object"&&(0,e.eachItem)(R[h],n=>u+=a(n)),u===1/0))return 1/0}return u}function o(R,u="",h){h!==!1&&(u=g(u));const n=R.parse(u);return c(R,n)}_e.getFullPath=o;function c(R,u){return R.serialize(u).split("#")[0]+"#"}_e._getFullPath=c;const d=/#\/?$/;function g(R){return R?R.replace(d,""):""}_e.normalizeId=g;function w(R,u,h){return h=g(h),R.resolve(u,h)}_e.resolveUrl=w;const _=/^[a-z_][-a-z0-9._]*$/i;function E(R,u){if(typeof R=="boolean")return{};const{schemaId:h,uriResolver:n}=this.opts,m=g(R[h]||u),v={"":m},p=o(n,m,!1),y={},$=new Set;return l(R,{allKeys:!0},(L,F,H,M)=>{if(M===void 0)return;const V=p+F;let z=v[M];typeof L[h]=="string"&&(z=J.call(this,L[h])),W.call(this,L.$anchor),W.call(this,L.$dynamicAnchor),v[F]=z;function J(j){const G=this.opts.uriResolver.resolve;if(j=g(z?G(z,j):j),$.has(j))throw N(j);$.add(j);let D=this.refs[j];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?b(L,D.schema,j):j!==g(V)&&(j[0]==="#"?(b(L,y[j],j),y[j]=L):this.refs[j]=V),j}function W(j){if(typeof j=="string"){if(!_.test(j))throw new Error(`invalid anchor "${j}"`);J.call(this,`#${j}`)}}}),y;function b(L,F,H){if(F!==void 0&&!t(L,F))throw N(H)}function N(L){return new Error(`reference "${L}" resolves to more than one schema`)}}return _e.getSchemaRefs=E,_e}var Ia;function bn(){if(Ia)return ke;Ia=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getData=ke.KeywordCxt=ke.validateFunctionCode=void 0;const e=pd(),t=_n(),l=of(),i=_n(),f=yd(),s=vd(),r=_d(),a=re(),o=Ke(),c=Rn(),d=ie(),g=wn();function w(I){if(p(I)&&($(I),v(I))){u(I);return}_(I,()=>(0,e.topBoolOrEmptySchema)(I))}ke.validateFunctionCode=w;function _({gen:I,validateName:C,schema:k,schemaEnv:U,opts:x},Y){x.code.es5?I.func(C,(0,a._)`${o.default.data}, ${o.default.valCxt}`,U.$async,()=>{I.code((0,a._)`"use strict"; ${n(k,x)}`),R(I,x),I.code(Y)}):I.func(C,(0,a._)`${o.default.data}, ${E(x)}`,U.$async,()=>I.code(n(k,x)).code(Y))}function E(I){return(0,a._)`{${o.default.instancePath}="", ${o.default.parentData}, ${o.default.parentDataProperty}, ${o.default.rootData}=${o.default.data}${I.dynamicRef?(0,a._)`, ${o.default.dynamicAnchors}={}`:a.nil}}={}`}function R(I,C){I.if(o.default.valCxt,()=>{I.var(o.default.instancePath,(0,a._)`${o.default.valCxt}.${o.default.instancePath}`),I.var(o.default.parentData,(0,a._)`${o.default.valCxt}.${o.default.parentData}`),I.var(o.default.parentDataProperty,(0,a._)`${o.default.valCxt}.${o.default.parentDataProperty}`),I.var(o.default.rootData,(0,a._)`${o.default.valCxt}.${o.default.rootData}`),C.dynamicRef&&I.var(o.default.dynamicAnchors,(0,a._)`${o.default.valCxt}.${o.default.dynamicAnchors}`)},()=>{I.var(o.default.instancePath,(0,a._)`""`),I.var(o.default.parentData,(0,a._)`undefined`),I.var(o.default.parentDataProperty,(0,a._)`undefined`),I.var(o.default.rootData,o.default.data),C.dynamicRef&&I.var(o.default.dynamicAnchors,(0,a._)`{}`)})}function u(I){const{schema:C,opts:k,gen:U}=I;_(I,()=>{k.$comment&&C.$comment&&M(I),L(I),U.let(o.default.vErrors,null),U.let(o.default.errors,0),k.unevaluated&&h(I),b(I),V(I)})}function h(I){const{gen:C,validateName:k}=I;I.evaluated=C.const("evaluated",(0,a._)`${k}.evaluated`),C.if((0,a._)`${I.evaluated}.dynamicProps`,()=>C.assign((0,a._)`${I.evaluated}.props`,(0,a._)`undefined`)),C.if((0,a._)`${I.evaluated}.dynamicItems`,()=>C.assign((0,a._)`${I.evaluated}.items`,(0,a._)`undefined`))}function n(I,C){const k=typeof I=="object"&&I[C.schemaId];return k&&(C.code.source||C.code.process)?(0,a._)`/*# sourceURL=${k} */`:a.nil}function m(I,C){if(p(I)&&($(I),v(I))){y(I,C);return}(0,e.boolOrEmptySchema)(I,C)}function v({schema:I,self:C}){if(typeof I=="boolean")return!I;for(const k in I)if(C.RULES.all[k])return!0;return!1}function p(I){return typeof I.schema!="boolean"}function y(I,C){const{schema:k,gen:U,opts:x}=I;x.$comment&&k.$comment&&M(I),F(I),H(I);const Y=U.const("_errs",o.default.errors);b(I,Y),U.var(C,(0,a._)`${Y} === ${o.default.errors}`)}function $(I){(0,d.checkUnknownRules)(I),N(I)}function b(I,C){if(I.opts.jtd)return J(I,[],!1,C);const k=(0,t.getSchemaTypes)(I.schema),U=(0,t.coerceAndCheckDataType)(I,k);J(I,k,!U,C)}function N(I){const{schema:C,errSchemaPath:k,opts:U,self:x}=I;C.$ref&&U.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(C,x.RULES)&&x.logger.warn(`$ref: keywords ignored in schema at path "${k}"`)}function L(I){const{schema:C,opts:k}=I;C.default!==void 0&&k.useDefaults&&k.strictSchema&&(0,d.checkStrictMode)(I,"default is ignored in the schema root")}function F(I){const C=I.schema[I.opts.schemaId];C&&(I.baseId=(0,c.resolveUrl)(I.opts.uriResolver,I.baseId,C))}function H(I){if(I.schema.$async&&!I.schemaEnv.$async)throw new Error("async schema in sync schema")}function M({gen:I,schemaEnv:C,schema:k,errSchemaPath:U,opts:x}){const Y=k.$comment;if(x.$comment===!0)I.code((0,a._)`${o.default.self}.logger.log(${Y})`);else if(typeof x.$comment=="function"){const ne=(0,a.str)`${U}/$comment`,he=I.scopeValue("root",{ref:C.root});I.code((0,a._)`${o.default.self}.opts.$comment(${Y}, ${ne}, ${he}.schema)`)}}function V(I){const{gen:C,schemaEnv:k,validateName:U,ValidationError:x,opts:Y}=I;k.$async?C.if((0,a._)`${o.default.errors} === 0`,()=>C.return(o.default.data),()=>C.throw((0,a._)`new ${x}(${o.default.vErrors})`)):(C.assign((0,a._)`${U}.errors`,o.default.vErrors),Y.unevaluated&&z(I),C.return((0,a._)`${o.default.errors} === 0`))}function z({gen:I,evaluated:C,props:k,items:U}){k instanceof a.Name&&I.assign((0,a._)`${C}.props`,k),U instanceof a.Name&&I.assign((0,a._)`${C}.items`,U)}function J(I,C,k,U){const{gen:x,schema:Y,data:ne,allErrors:he,opts:ae,self:ce}=I,{RULES:se}=ce;if(Y.$ref&&(ae.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(Y,se))){x.block(()=>K(I,"$ref",se.all.$ref.definition));return}ae.jtd||j(I,C),x.block(()=>{for(const de of se.rules)we(de);we(se.post)});function we(de){(0,l.shouldUseGroup)(Y,de)&&(de.type?(x.if((0,i.checkDataType)(de.type,ne,ae.strictNumbers)),W(I,de),C.length===1&&C[0]===de.type&&k&&(x.else(),(0,i.reportTypeError)(I)),x.endIf()):W(I,de),he||x.if((0,a._)`${o.default.errors} === ${U||0}`))}}function W(I,C){const{gen:k,schema:U,opts:{useDefaults:x}}=I;x&&(0,f.assignDefaults)(I,C.type),k.block(()=>{for(const Y of C.rules)(0,l.shouldUseRule)(U,Y)&&K(I,Y.keyword,Y.definition,C.type)})}function j(I,C){I.schemaEnv.meta||!I.opts.strictTypes||(G(I,C),I.opts.allowUnionTypes||D(I,C),O(I,I.dataTypes))}function G(I,C){if(C.length){if(!I.dataTypes.length){I.dataTypes=C;return}C.forEach(k=>{T(I.dataTypes,k)||P(I,`type "${k}" not allowed by context "${I.dataTypes.join(",")}"`)}),S(I,C)}}function D(I,C){C.length>1&&!(C.length===2&&C.includes("null"))&&P(I,"use allowUnionTypes to allow union type keyword")}function O(I,C){const k=I.self.RULES.all;for(const U in k){const x=k[U];if(typeof x=="object"&&(0,l.shouldUseRule)(I.schema,x)){const{type:Y}=x.definition;Y.length&&!Y.some(ne=>q(C,ne))&&P(I,`missing type "${Y.join(",")}" for keyword "${U}"`)}}}function q(I,C){return I.includes(C)||C==="number"&&I.includes("integer")}function T(I,C){return I.includes(C)||C==="integer"&&I.includes("number")}function S(I,C){const k=[];for(const U of I.dataTypes)T(C,U)?k.push(U):C.includes("integer")&&U==="number"&&k.push("integer");I.dataTypes=k}function P(I,C){const k=I.schemaEnv.baseId+I.errSchemaPath;C+=` at "${k}" (strictTypes)`,(0,d.checkStrictMode)(I,C,I.opts.strictTypes)}class A{constructor(C,k,U){if((0,s.validateKeywordUsage)(C,k,U),this.gen=C.gen,this.allErrors=C.allErrors,this.keyword=U,this.data=C.data,this.schema=C.schema[U],this.$data=k.$data&&C.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(C,this.schema,U,this.$data),this.schemaType=k.schemaType,this.parentSchema=C.schema,this.params={},this.it=C,this.def=k,this.$data)this.schemaCode=C.gen.const("vSchema",Z(this.$data,C));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,k.schemaType,k.allowUndefined))throw new Error(`${U} value must be ${JSON.stringify(k.schemaType)}`);("code"in k?k.trackErrors:k.errors!==!1)&&(this.errsCount=C.gen.const("_errs",o.default.errors))}result(C,k,U){this.failResult((0,a.not)(C),k,U)}failResult(C,k,U){this.gen.if(C),U?U():this.error(),k?(this.gen.else(),k(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(C,k){this.failResult((0,a.not)(C),void 0,k)}fail(C){if(C===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(C),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(C){if(!this.$data)return this.fail(C);const{schemaCode:k}=this;this.fail((0,a._)`${k} !== undefined && (${(0,a.or)(this.invalid$data(),C)})`)}error(C,k,U){if(k){this.setParams(k),this._error(C,U),this.setParams({});return}this._error(C,U)}_error(C,k){(C?g.reportExtraError:g.reportError)(this,this.def.error,k)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(C){this.allErrors||this.gen.if(C)}setParams(C,k){k?Object.assign(this.params,C):this.params=C}block$data(C,k,U=a.nil){this.gen.block(()=>{this.check$data(C,U),k()})}check$data(C=a.nil,k=a.nil){if(!this.$data)return;const{gen:U,schemaCode:x,schemaType:Y,def:ne}=this;U.if((0,a.or)((0,a._)`${x} === undefined`,k)),C!==a.nil&&U.assign(C,!0),(Y.length||ne.validateSchema)&&(U.elseIf(this.invalid$data()),this.$dataError(),C!==a.nil&&U.assign(C,!1)),U.else()}invalid$data(){const{gen:C,schemaCode:k,schemaType:U,def:x,it:Y}=this;return(0,a.or)(ne(),he());function ne(){if(U.length){if(!(k instanceof a.Name))throw new Error("ajv implementation error");const ae=Array.isArray(U)?U:[U];return(0,a._)`${(0,i.checkDataTypes)(ae,k,Y.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function he(){if(x.validateSchema){const ae=C.scopeValue("validate$data",{ref:x.validateSchema});return(0,a._)`!${ae}(${k})`}return a.nil}}subschema(C,k){const U=(0,r.getSubschema)(this.it,C);(0,r.extendSubschemaData)(U,this.it,C),(0,r.extendSubschemaMode)(U,C);const x={...this.it,...U,items:void 0,props:void 0};return m(x,k),x}mergeEvaluated(C,k){const{it:U,gen:x}=this;U.opts.unevaluated&&(U.props!==!0&&C.props!==void 0&&(U.props=d.mergeEvaluated.props(x,C.props,U.props,k)),U.items!==!0&&C.items!==void 0&&(U.items=d.mergeEvaluated.items(x,C.items,U.items,k)))}mergeValidEvaluated(C,k){const{it:U,gen:x}=this;if(U.opts.unevaluated&&(U.props!==!0||U.items!==!0))return x.if(k,()=>this.mergeEvaluated(C,a.Name)),!0}}ke.KeywordCxt=A;function K(I,C,k,U){const x=new A(I,k,C);"code"in k?k.code(x,U):x.$data&&k.validate?(0,s.funcKeywordCode)(x,k):"macro"in k?(0,s.macroKeywordCode)(x,k):(k.compile||k.validate)&&(0,s.funcKeywordCode)(x,k)}const B=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(I,{dataLevel:C,dataNames:k,dataPathArr:U}){let x,Y;if(I==="")return o.default.rootData;if(I[0]==="/"){if(!B.test(I))throw new Error(`Invalid JSON-pointer: ${I}`);x=I,Y=o.default.rootData}else{const ce=X.exec(I);if(!ce)throw new Error(`Invalid JSON-pointer: ${I}`);const se=+ce[1];if(x=ce[2],x==="#"){if(se>=C)throw new Error(ae("property/index",se));return U[C-se]}if(se>C)throw new Error(ae("data",se));if(Y=k[C-se],!x)return Y}let ne=Y;const he=x.split("/");for(const ce of he)ce&&(Y=(0,a._)`${Y}${(0,a.getProperty)((0,d.unescapeJsonPointer)(ce))}`,ne=(0,a._)`${ne} && ${Y}`);return ne;function ae(ce,se){return`Cannot access ${ce} ${se} levels up, current level is ${C}`}}return ke.getData=Z,ke}var Ht={},Ta;function Zi(){if(Ta)return Ht;Ta=1,Object.defineProperty(Ht,"__esModule",{value:!0});class e extends Error{constructor(l){super("validation failed"),this.errors=l,this.ajv=this.validation=!0}}return Ht.default=e,Ht}var xt={},Ca;function Pn(){if(Ca)return xt;Ca=1,Object.defineProperty(xt,"__esModule",{value:!0});const e=Rn();class t extends Error{constructor(i,f,s,r){super(r||`can't resolve reference ${s} from id ${f}`),this.missingRef=(0,e.resolveUrl)(i,f,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return xt.default=t,xt}var Se={},Da;function Xi(){if(Da)return Se;Da=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.resolveSchema=Se.getCompilingSchema=Se.resolveRef=Se.compileSchema=Se.SchemaEnv=void 0;const e=re(),t=Zi(),l=Ke(),i=Rn(),f=ie(),s=bn();class r{constructor(h){var n;this.refs={},this.dynamicAnchors={};let m;typeof h.schema=="object"&&(m=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(n=h.baseId)!==null&&n!==void 0?n:(0,i.normalizeId)(m?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=m?.$async,this.refs={}}}Se.SchemaEnv=r;function a(u){const h=d.call(this,u);if(h)return h;const n=(0,i.getFullPath)(this.opts.uriResolver,u.root.baseId),{es5:m,lines:v}=this.opts.code,{ownProperties:p}=this.opts,y=new e.CodeGen(this.scope,{es5:m,lines:v,ownProperties:p});let $;u.$async&&($=y.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const b=y.scopeName("validate");u.validateName=b;const N={gen:y,allErrors:this.opts.allErrors,data:l.default.data,parentData:l.default.parentData,parentDataProperty:l.default.parentDataProperty,dataNames:[l.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:y.scopeValue("schema",this.opts.code.source===!0?{ref:u.schema,code:(0,e.stringify)(u.schema)}:{ref:u.schema}),validateName:b,ValidationError:$,schema:u.schema,schemaEnv:u,rootId:n,baseId:u.baseId||n,schemaPath:e.nil,errSchemaPath:u.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let L;try{this._compilations.add(u),(0,s.validateFunctionCode)(N),y.optimize(this.opts.code.optimize);const F=y.toString();L=`${y.scopeRefs(l.default.scope)}return ${F}`,this.opts.code.process&&(L=this.opts.code.process(L,u));const M=new Function(`${l.default.self}`,`${l.default.scope}`,L)(this,this.scope.get());if(this.scope.value(b,{ref:M}),M.errors=null,M.schema=u.schema,M.schemaEnv=u,u.$async&&(M.$async=!0),this.opts.code.source===!0&&(M.source={validateName:b,validateCode:F,scopeValues:y._values}),this.opts.unevaluated){const{props:V,items:z}=N;M.evaluated={props:V instanceof e.Name?void 0:V,items:z instanceof e.Name?void 0:z,dynamicProps:V instanceof e.Name,dynamicItems:z instanceof e.Name},M.source&&(M.source.evaluated=(0,e.stringify)(M.evaluated))}return u.validate=M,u}catch(F){throw delete u.validate,delete u.validateName,L&&this.logger.error("Error compiling schema, function code:",L),F}finally{this._compilations.delete(u)}}Se.compileSchema=a;function o(u,h,n){var m;n=(0,i.resolveUrl)(this.opts.uriResolver,h,n);const v=u.refs[n];if(v)return v;let p=w.call(this,u,n);if(p===void 0){const y=(m=u.localRefs)===null||m===void 0?void 0:m[n],{schemaId:$}=this.opts;y&&(p=new r({schema:y,schemaId:$,root:u,baseId:h}))}if(p!==void 0)return u.refs[n]=c.call(this,p)}Se.resolveRef=o;function c(u){return(0,i.inlineRef)(u.schema,this.opts.inlineRefs)?u.schema:u.validate?u:a.call(this,u)}function d(u){for(const h of this._compilations)if(g(h,u))return h}Se.getCompilingSchema=d;function g(u,h){return u.schema===h.schema&&u.root===h.root&&u.baseId===h.baseId}function w(u,h){let n;for(;typeof(n=this.refs[h])=="string";)h=n;return n||this.schemas[h]||_.call(this,u,h)}function _(u,h){const n=this.opts.uriResolver.parse(h),m=(0,i._getFullPath)(this.opts.uriResolver,n);let v=(0,i.getFullPath)(this.opts.uriResolver,u.baseId,void 0);if(Object.keys(u.schema).length>0&&m===v)return R.call(this,n,u);const p=(0,i.normalizeId)(m),y=this.refs[p]||this.schemas[p];if(typeof y=="string"){const $=_.call(this,u,y);return typeof $?.schema!="object"?void 0:R.call(this,n,$)}if(typeof y?.schema=="object"){if(y.validate||a.call(this,y),p===(0,i.normalizeId)(h)){const{schema:$}=y,{schemaId:b}=this.opts,N=$[b];return N&&(v=(0,i.resolveUrl)(this.opts.uriResolver,v,N)),new r({schema:$,schemaId:b,root:u,baseId:v})}return R.call(this,n,y)}}Se.resolveSchema=_;const E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function R(u,{baseId:h,schema:n,root:m}){var v;if(((v=u.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const $ of u.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const b=n[(0,f.unescapeFragment)($)];if(b===void 0)return;n=b;const N=typeof n=="object"&&n[this.opts.schemaId];!E.has($)&&N&&(h=(0,i.resolveUrl)(this.opts.uriResolver,h,N))}let p;if(typeof n!="boolean"&&n.$ref&&!(0,f.schemaHasRulesButRef)(n,this.RULES)){const $=(0,i.resolveUrl)(this.opts.uriResolver,h,n.$ref);p=_.call(this,m,$)}const{schemaId:y}=this.opts;if(p=p||new r({schema:n,schemaId:y,root:m,baseId:h}),p.schema!==p.root.schema)return p}return Se}const $d="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Ed="Meta-schema for $data reference (JSON AnySchema extension proposal)",wd="object",Sd=["$data"],Rd={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},bd=!1,Pd={$id:$d,description:Ed,type:wd,required:Sd,properties:Rd,additionalProperties:bd};var Bt={},pt={exports:{}},Ns,Aa;function Nd(){return Aa||(Aa=1,Ns={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),Ns}var Os,La;function Od(){if(La)return Os;La=1;const{HEX:e}=Nd();function t(E){if(r(E,".")<3)return{host:E,isIPV4:!1};const R=E.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[u]=R;return u?{host:s(u,"."),isIPV4:!0}:{host:E,isIPV4:!1}}function l(E,R=!1){let u="",h=!0;for(const n of E){if(e[n]===void 0)return;n!=="0"&&h===!0&&(h=!1),h||(u+=n)}return R&&u.length===0&&(u="0"),u}function i(E){let R=0;const u={error:!1,address:"",zone:""},h=[],n=[];let m=!1,v=!1,p=!1;function y(){if(n.length){if(m===!1){const $=l(n);if($!==void 0)h.push($);else return u.error=!0,!1}n.length=0}return!0}for(let $=0;$<E.length;$++){const b=E[$];if(!(b==="["||b==="]"))if(b===":"){if(v===!0&&(p=!0),!y())break;if(R++,h.push(":"),R>7){u.error=!0;break}$-1>=0&&E[$-1]===":"&&(v=!0);continue}else if(b==="%"){if(!y())break;m=!0}else{n.push(b);continue}}return n.length&&(m?u.zone=n.join(""):p?h.push(n.join("")):h.push(l(n))),u.address=h.join(""),u}function f(E,R={}){if(r(E,":")<2)return{host:E,isIPV6:!1};const u=i(E);if(u.error)return{host:E,isIPV6:!1};{let h=u.address,n=u.address;return u.zone&&(h+="%"+u.zone,n+="%25"+u.zone),{host:h,escapedHost:n,isIPV6:!0}}}function s(E,R){let u="",h=!0;const n=E.length;for(let m=0;m<n;m++){const v=E[m];v==="0"&&h?(m+1<=n&&E[m+1]===R||m+1===n)&&(u+=v,h=!1):(v===R?h=!0:h=!1,u+=v)}return u}function r(E,R){let u=0;for(let h=0;h<E.length;h++)E[h]===R&&u++;return u}const a=/^\.\.?\//u,o=/^\/\.(?:\/|$)/u,c=/^\/\.\.(?:\/|$)/u,d=/^\/?(?:.|\n)*?(?=\/|$)/u;function g(E){const R=[];for(;E.length;)if(E.match(a))E=E.replace(a,"");else if(E.match(o))E=E.replace(o,"/");else if(E.match(c))E=E.replace(c,"/"),R.pop();else if(E==="."||E==="..")E="";else{const u=E.match(d);if(u){const h=u[0];E=E.slice(h.length),R.push(h)}else throw new Error("Unexpected dot segment condition")}return R.join("")}function w(E,R){const u=R!==!0?escape:unescape;return E.scheme!==void 0&&(E.scheme=u(E.scheme)),E.userinfo!==void 0&&(E.userinfo=u(E.userinfo)),E.host!==void 0&&(E.host=u(E.host)),E.path!==void 0&&(E.path=u(E.path)),E.query!==void 0&&(E.query=u(E.query)),E.fragment!==void 0&&(E.fragment=u(E.fragment)),E}function _(E,R){const u=[];if(E.userinfo!==void 0&&(u.push(E.userinfo),u.push("@")),E.host!==void 0){let h=unescape(E.host);const n=t(h);if(n.isIPV4)h=n.host;else{const m=f(n.host,{});m.isIPV6===!0?h=`[${m.escapedHost}]`:h=E.host}u.push(h)}return(typeof E.port=="number"||typeof E.port=="string")&&(u.push(":"),u.push(String(E.port))),u.length?u.join(""):void 0}return Os={recomposeAuthority:_,normalizeComponentEncoding:w,removeDotSegments:g,normalizeIPv4:t,normalizeIPv6:f,stringArrayToHexStripped:l},Os}var Is,qa;function Id(){if(qa)return Is;qa=1;const e=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function l(n){return typeof n.secure=="boolean"?n.secure:String(n.scheme).toLowerCase()==="wss"}function i(n){return n.host||(n.error=n.error||"HTTP URIs must have a host."),n}function f(n){const m=String(n.scheme).toLowerCase()==="https";return(n.port===(m?443:80)||n.port==="")&&(n.port=void 0),n.path||(n.path="/"),n}function s(n){return n.secure=l(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n}function r(n){if((n.port===(l(n)?443:80)||n.port==="")&&(n.port=void 0),typeof n.secure=="boolean"&&(n.scheme=n.secure?"wss":"ws",n.secure=void 0),n.resourceName){const[m,v]=n.resourceName.split("?");n.path=m&&m!=="/"?m:void 0,n.query=v,n.resourceName=void 0}return n.fragment=void 0,n}function a(n,m){if(!n.path)return n.error="URN can not be parsed",n;const v=n.path.match(t);if(v){const p=m.scheme||n.scheme||"urn";n.nid=v[1].toLowerCase(),n.nss=v[2];const y=`${p}:${m.nid||n.nid}`,$=h[y];n.path=void 0,$&&(n=$.parse(n,m))}else n.error=n.error||"URN can not be parsed.";return n}function o(n,m){const v=m.scheme||n.scheme||"urn",p=n.nid.toLowerCase(),y=`${v}:${m.nid||p}`,$=h[y];$&&(n=$.serialize(n,m));const b=n,N=n.nss;return b.path=`${p||m.nid}:${N}`,m.skipEscape=!0,b}function c(n,m){const v=n;return v.uuid=v.nss,v.nss=void 0,!m.tolerant&&(!v.uuid||!e.test(v.uuid))&&(v.error=v.error||"UUID is not valid."),v}function d(n){const m=n;return m.nss=(n.uuid||"").toLowerCase(),m}const g={scheme:"http",domainHost:!0,parse:i,serialize:f},w={scheme:"https",domainHost:g.domainHost,parse:i,serialize:f},_={scheme:"ws",domainHost:!0,parse:s,serialize:r},E={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},h={http:g,https:w,ws:_,wss:E,urn:{scheme:"urn",parse:a,serialize:o,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:c,serialize:d,skipNormalize:!0}};return Is=h,Is}var ka;function af(){if(ka)return pt.exports;ka=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:l,recomposeAuthority:i,normalizeComponentEncoding:f}=Od(),s=Id();function r(u,h){return typeof u=="string"?u=d(E(u,h),h):typeof u=="object"&&(u=E(d(u,h),h)),u}function a(u,h,n){const m=Object.assign({scheme:"null"},n),v=o(E(u,m),E(h,m),m,!0);return d(v,{...m,skipEscape:!0})}function o(u,h,n,m){const v={};return m||(u=E(d(u,n),n),h=E(d(h,n),n)),n=n||{},!n.tolerant&&h.scheme?(v.scheme=h.scheme,v.userinfo=h.userinfo,v.host=h.host,v.port=h.port,v.path=l(h.path||""),v.query=h.query):(h.userinfo!==void 0||h.host!==void 0||h.port!==void 0?(v.userinfo=h.userinfo,v.host=h.host,v.port=h.port,v.path=l(h.path||""),v.query=h.query):(h.path?(h.path.charAt(0)==="/"?v.path=l(h.path):((u.userinfo!==void 0||u.host!==void 0||u.port!==void 0)&&!u.path?v.path="/"+h.path:u.path?v.path=u.path.slice(0,u.path.lastIndexOf("/")+1)+h.path:v.path=h.path,v.path=l(v.path)),v.query=h.query):(v.path=u.path,h.query!==void 0?v.query=h.query:v.query=u.query),v.userinfo=u.userinfo,v.host=u.host,v.port=u.port),v.scheme=u.scheme),v.fragment=h.fragment,v}function c(u,h,n){return typeof u=="string"?(u=unescape(u),u=d(f(E(u,n),!0),{...n,skipEscape:!0})):typeof u=="object"&&(u=d(f(u,!0),{...n,skipEscape:!0})),typeof h=="string"?(h=unescape(h),h=d(f(E(h,n),!0),{...n,skipEscape:!0})):typeof h=="object"&&(h=d(f(h,!0),{...n,skipEscape:!0})),u.toLowerCase()===h.toLowerCase()}function d(u,h){const n={host:u.host,scheme:u.scheme,userinfo:u.userinfo,port:u.port,path:u.path,query:u.query,nid:u.nid,nss:u.nss,uuid:u.uuid,fragment:u.fragment,reference:u.reference,resourceName:u.resourceName,secure:u.secure,error:""},m=Object.assign({},h),v=[],p=s[(m.scheme||n.scheme||"").toLowerCase()];p&&p.serialize&&p.serialize(n,m),n.path!==void 0&&(m.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),m.reference!=="suffix"&&n.scheme&&v.push(n.scheme,":");const y=i(n,m);if(y!==void 0&&(m.reference!=="suffix"&&v.push("//"),v.push(y),n.path&&n.path.charAt(0)!=="/"&&v.push("/")),n.path!==void 0){let $=n.path;!m.absolutePath&&(!p||!p.absolutePath)&&($=l($)),y===void 0&&($=$.replace(/^\/\//u,"/%2F")),v.push($)}return n.query!==void 0&&v.push("?",n.query),n.fragment!==void 0&&v.push("#",n.fragment),v.join("")}const g=Array.from({length:127},(u,h)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(h)));function w(u){let h=0;for(let n=0,m=u.length;n<m;++n)if(h=u.charCodeAt(n),h>126||g[h])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function E(u,h){const n=Object.assign({},h),m={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},v=u.indexOf("%")!==-1;let p=!1;n.reference==="suffix"&&(u=(n.scheme?n.scheme+":":"")+"//"+u);const y=u.match(_);if(y){if(m.scheme=y[1],m.userinfo=y[3],m.host=y[4],m.port=parseInt(y[5],10),m.path=y[6]||"",m.query=y[7],m.fragment=y[8],isNaN(m.port)&&(m.port=y[5]),m.host){const b=t(m.host);if(b.isIPV4===!1){const N=e(b.host,{isIPV4:!1});m.host=N.host.toLowerCase(),p=N.isIPV6}else m.host=b.host,p=!0}m.scheme===void 0&&m.userinfo===void 0&&m.host===void 0&&m.port===void 0&&!m.path&&m.query===void 0?m.reference="same-document":m.scheme===void 0?m.reference="relative":m.fragment===void 0?m.reference="absolute":m.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==m.reference&&(m.error=m.error||"URI is not a "+n.reference+" reference.");const $=s[(n.scheme||m.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!$||!$.unicodeSupport)&&m.host&&(n.domainHost||$&&$.domainHost)&&p===!1&&w(m.host))try{m.host=URL.domainToASCII(m.host.toLowerCase())}catch(b){m.error=m.error||"Host's domain name can not be converted to ASCII: "+b}(!$||$&&!$.skipNormalize)&&(v&&m.scheme!==void 0&&(m.scheme=unescape(m.scheme)),v&&m.host!==void 0&&(m.host=unescape(m.host)),m.path!==void 0&&m.path.length&&(m.path=escape(unescape(m.path))),m.fragment!==void 0&&m.fragment.length&&(m.fragment=encodeURI(decodeURIComponent(m.fragment)))),$&&$.parse&&$.parse(m,n)}else m.error=m.error||"URI can not be parsed.";return m}const R={SCHEMES:s,normalize:r,resolve:a,resolveComponents:o,equal:c,serialize:d,parse:E};return pt.exports=R,pt.exports.default=R,pt.exports.fastUri=R,pt.exports}var ja;function Td(){if(ja)return Bt;ja=1,Object.defineProperty(Bt,"__esModule",{value:!0});const e=af();return e.code='require("ajv/dist/runtime/uri").default',Bt.default=e,Bt}var Fa;function Cd(){return Fa||(Fa=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=bn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var l=re();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});const i=Zi(),f=Pn(),s=sf(),r=Xi(),a=re(),o=Rn(),c=_n(),d=ie(),g=Pd,w=Td(),_=(D,O)=>new RegExp(D,O);_.code="new RegExp";const E=["removeAdditional","useDefaults","coerceTypes"],R=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),u={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."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},n=200;function m(D){var O,q,T,S,P,A,K,B,X,Z,I,C,k,U,x,Y,ne,he,ae,ce,se,we,de,xe,Be;const Ne=D.strict,We=(O=D.code)===null||O===void 0?void 0:O.optimize,dt=We===!0||We===void 0?1:We||0,ht=(T=(q=D.code)===null||q===void 0?void 0:q.regExp)!==null&&T!==void 0?T:_,jn=(S=D.uriResolver)!==null&&S!==void 0?S:w.default;return{strictSchema:(A=(P=D.strictSchema)!==null&&P!==void 0?P:Ne)!==null&&A!==void 0?A:!0,strictNumbers:(B=(K=D.strictNumbers)!==null&&K!==void 0?K:Ne)!==null&&B!==void 0?B:!0,strictTypes:(Z=(X=D.strictTypes)!==null&&X!==void 0?X:Ne)!==null&&Z!==void 0?Z:"log",strictTuples:(C=(I=D.strictTuples)!==null&&I!==void 0?I:Ne)!==null&&C!==void 0?C:"log",strictRequired:(U=(k=D.strictRequired)!==null&&k!==void 0?k:Ne)!==null&&U!==void 0?U:!1,code:D.code?{...D.code,optimize:dt,regExp:ht}:{optimize:dt,regExp:ht},loopRequired:(x=D.loopRequired)!==null&&x!==void 0?x:n,loopEnum:(Y=D.loopEnum)!==null&&Y!==void 0?Y:n,meta:(ne=D.meta)!==null&&ne!==void 0?ne:!0,messages:(he=D.messages)!==null&&he!==void 0?he:!0,inlineRefs:(ae=D.inlineRefs)!==null&&ae!==void 0?ae:!0,schemaId:(ce=D.schemaId)!==null&&ce!==void 0?ce:"$id",addUsedSchema:(se=D.addUsedSchema)!==null&&se!==void 0?se:!0,validateSchema:(we=D.validateSchema)!==null&&we!==void 0?we:!0,validateFormats:(de=D.validateFormats)!==null&&de!==void 0?de:!0,unicodeRegExp:(xe=D.unicodeRegExp)!==null&&xe!==void 0?xe:!0,int32range:(Be=D.int32range)!==null&&Be!==void 0?Be:!0,uriResolver:jn}}class v{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...m(O)};const{es5:q,lines:T}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:R,es5:q,lines:T}),this.logger=H(O.logger);const S=O.validateFormats;O.validateFormats=!1,this.RULES=(0,s.getRules)(),p.call(this,u,O,"NOT SUPPORTED"),p.call(this,h,O,"DEPRECATED","warn"),this._metaOpts=L.call(this),O.formats&&b.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&N.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),$.call(this),O.validateFormats=S}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:q,schemaId:T}=this.opts;let S=g;T==="id"&&(S={...g},S.id=S.$id,delete S.$id),q&&O&&this.addMetaSchema(S,S[T],!1)}defaultMeta(){const{meta:O,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[q]||O:void 0}validate(O,q){let T;if(typeof O=="string"){if(T=this.getSchema(O),!T)throw new Error(`no schema with key or ref "${O}"`)}else T=this.compile(O);const S=T(q);return"$async"in T||(this.errors=T.errors),S}compile(O,q){const T=this._addSchema(O,q);return T.validate||this._compileSchemaEnv(T)}compileAsync(O,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return S.call(this,O,q);async function S(Z,I){await P.call(this,Z.$schema);const C=this._addSchema(Z,I);return C.validate||A.call(this,C)}async function P(Z){Z&&!this.getSchema(Z)&&await S.call(this,{$ref:Z},!0)}async function A(Z){try{return this._compileSchemaEnv(Z)}catch(I){if(!(I instanceof f.default))throw I;return K.call(this,I),await B.call(this,I.missingSchema),A.call(this,Z)}}function K({missingSchema:Z,missingRef:I}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${I} cannot be resolved`)}async function B(Z){const I=await X.call(this,Z);this.refs[Z]||await P.call(this,I.$schema),this.refs[Z]||this.addSchema(I,Z,q)}async function X(Z){const I=this._loading[Z];if(I)return I;try{return await(this._loading[Z]=T(Z))}finally{delete this._loading[Z]}}}addSchema(O,q,T,S=this.opts.validateSchema){if(Array.isArray(O)){for(const A of O)this.addSchema(A,void 0,T,S);return this}let P;if(typeof O=="object"){const{schemaId:A}=this.opts;if(P=O[A],P!==void 0&&typeof P!="string")throw new Error(`schema ${A} must be string`)}return q=(0,o.normalizeId)(q||P),this._checkUnique(q),this.schemas[q]=this._addSchema(O,T,q,S,!0),this}addMetaSchema(O,q,T=this.opts.validateSchema){return this.addSchema(O,q,!0,T),this}validateSchema(O,q){if(typeof O=="boolean")return!0;let T;if(T=O.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const S=this.validate(T,O);if(!S&&q){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return S}getSchema(O){let q;for(;typeof(q=y.call(this,O))=="string";)O=q;if(q===void 0){const{schemaId:T}=this.opts,S=new r.SchemaEnv({schema:{},schemaId:T});if(q=r.resolveSchema.call(this,S,O),!q)return;this.refs[O]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=y.call(this,O);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const q=O;this._cache.delete(q);let T=O[this.opts.schemaId];return T&&(T=(0,o.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const q of O)this.addKeyword(q);return this}addKeyword(O,q){let T;if(typeof O=="string")T=O,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=T);else if(typeof O=="object"&&q===void 0){if(q=O,T=q.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(V.call(this,T,q),!q)return(0,d.eachItem)(T,P=>z.call(this,P)),this;W.call(this,q);const S={...q,type:(0,c.getJSONTypes)(q.type),schemaType:(0,c.getJSONTypes)(q.schemaType)};return(0,d.eachItem)(T,S.type.length===0?P=>z.call(this,P,S):P=>S.type.forEach(A=>z.call(this,P,S,A))),this}getKeyword(O){const q=this.RULES.all[O];return typeof q=="object"?q.definition:!!q}removeKeyword(O){const{RULES:q}=this;delete q.keywords[O],delete q.all[O];for(const T of q.rules){const S=T.rules.findIndex(P=>P.keyword===O);S>=0&&T.rules.splice(S,1)}return this}addFormat(O,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[O]=q,this}errorsText(O=this.errors,{separator:q=", ",dataVar:T="data"}={}){return!O||O.length===0?"No errors":O.map(S=>`${T}${S.instancePath} ${S.message}`).reduce((S,P)=>S+q+P)}$dataMetaSchema(O,q){const T=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const S of q){const P=S.split("/").slice(1);let A=O;for(const K of P)A=A[K];for(const K in T){const B=T[K];if(typeof B!="object")continue;const{$data:X}=B.definition,Z=A[K];X&&Z&&(A[K]=G(Z))}}return O}_removeAllSchemas(O,q){for(const T in O){const S=O[T];(!q||q.test(T))&&(typeof S=="string"?delete O[T]:S&&!S.meta&&(this._cache.delete(S.schema),delete O[T]))}}_addSchema(O,q,T,S=this.opts.validateSchema,P=this.opts.addUsedSchema){let A;const{schemaId:K}=this.opts;if(typeof O=="object")A=O[K];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let B=this._cache.get(O);if(B!==void 0)return B;T=(0,o.normalizeId)(A||T);const X=o.getSchemaRefs.call(this,O,T);return B=new r.SchemaEnv({schema:O,schemaId:K,meta:q,baseId:T,localRefs:X}),this._cache.set(B.schema,B),P&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=B),S&&this.validateSchema(O,!0),B}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):r.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const q=this.opts;this.opts=this._metaOpts;try{r.compileSchema.call(this,O)}finally{this.opts=q}}}v.ValidationError=i.default,v.MissingRefError=f.default,e.default=v;function p(D,O,q,T="error"){for(const S in D){const P=S;P in O&&this.logger[T](`${q}: option ${S}. ${D[P]}`)}}function y(D){return D=(0,o.normalizeId)(D),this.schemas[D]||this.refs[D]}function $(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const O in D)this.addSchema(D[O],O)}function b(){for(const D in this.opts.formats){const O=this.opts.formats[D];O&&this.addFormat(D,O)}}function N(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in D){const q=D[O];q.keyword||(q.keyword=O),this.addKeyword(q)}}function L(){const D={...this.opts};for(const O of E)delete D[O];return D}const F={log(){},warn(){},error(){}};function H(D){if(D===!1)return F;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const M=/^[a-z_$][a-z0-9_$:-]*$/i;function V(D,O){const{RULES:q}=this;if((0,d.eachItem)(D,T=>{if(q.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!M.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function z(D,O,q){var T;const S=O?.post;if(q&&S)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let A=S?P.post:P.rules.find(({type:B})=>B===q);if(A||(A={type:q,rules:[]},P.rules.push(A)),P.keywords[D]=!0,!O)return;const K={keyword:D,definition:{...O,type:(0,c.getJSONTypes)(O.type),schemaType:(0,c.getJSONTypes)(O.schemaType)}};O.before?J.call(this,A,K,O.before):A.rules.push(K),P.all[D]=K,(T=O.implements)===null||T===void 0||T.forEach(B=>this.addKeyword(B))}function J(D,O,q){const T=D.rules.findIndex(S=>S.keyword===q);T>=0?D.rules.splice(T,0,O):(D.rules.push(O),this.logger.warn(`rule ${q} is not defined`))}function W(D){let{metaSchema:O}=D;O!==void 0&&(D.$data&&this.opts.$data&&(O=G(O)),D.validateSchema=this.compile(O,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function G(D){return{anyOf:[D,j]}}}($s)),$s}var Wt={},Jt={},Zt={},Ma;function Dd(){if(Ma)return Zt;Ma=1,Object.defineProperty(Zt,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Zt.default=e,Zt}var ze={},Ua;function Ad(){if(Ua)return ze;Ua=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.callRef=ze.getValidate=void 0;const e=Pn(),t=Ce(),l=re(),i=Ke(),f=Xi(),s=ie(),r={keyword:"$ref",schemaType:"string",code(c){const{gen:d,schema:g,it:w}=c,{baseId:_,schemaEnv:E,validateName:R,opts:u,self:h}=w,{root:n}=E;if((g==="#"||g==="#/")&&_===n.baseId)return v();const m=f.resolveRef.call(h,n,_,g);if(m===void 0)throw new e.default(w.opts.uriResolver,_,g);if(m instanceof f.SchemaEnv)return p(m);return y(m);function v(){if(E===n)return o(c,R,E,E.$async);const $=d.scopeValue("root",{ref:n});return o(c,(0,l._)`${$}.validate`,n,n.$async)}function p($){const b=a(c,$);o(c,b,$,$.$async)}function y($){const b=d.scopeValue("schema",u.code.source===!0?{ref:$,code:(0,l.stringify)($)}:{ref:$}),N=d.name("valid"),L=c.subschema({schema:$,dataTypes:[],schemaPath:l.nil,topSchemaRef:b,errSchemaPath:g},N);c.mergeEvaluated(L),c.ok(N)}}};function a(c,d){const{gen:g}=c;return d.validate?g.scopeValue("validate",{ref:d.validate}):(0,l._)`${g.scopeValue("wrapper",{ref:d})}.validate`}ze.getValidate=a;function o(c,d,g,w){const{gen:_,it:E}=c,{allErrors:R,schemaEnv:u,opts:h}=E,n=h.passContext?i.default.this:l.nil;w?m():v();function m(){if(!u.$async)throw new Error("async schema referenced by sync schema");const $=_.let("valid");_.try(()=>{_.code((0,l._)`await ${(0,t.callValidateCode)(c,d,n)}`),y(d),R||_.assign($,!0)},b=>{_.if((0,l._)`!(${b} instanceof ${E.ValidationError})`,()=>_.throw(b)),p(b),R||_.assign($,!1)}),c.ok($)}function v(){c.result((0,t.callValidateCode)(c,d,n),()=>y(d),()=>p(d))}function p($){const b=(0,l._)`${$}.errors`;_.assign(i.default.vErrors,(0,l._)`${i.default.vErrors} === null ? ${b} : ${i.default.vErrors}.concat(${b})`),_.assign(i.default.errors,(0,l._)`${i.default.vErrors}.length`)}function y($){var b;if(!E.opts.unevaluated)return;const N=(b=g?.validate)===null||b===void 0?void 0:b.evaluated;if(E.props!==!0)if(N&&!N.dynamicProps)N.props!==void 0&&(E.props=s.mergeEvaluated.props(_,N.props,E.props));else{const L=_.var("props",(0,l._)`${$}.evaluated.props`);E.props=s.mergeEvaluated.props(_,L,E.props,l.Name)}if(E.items!==!0)if(N&&!N.dynamicItems)N.items!==void 0&&(E.items=s.mergeEvaluated.items(_,N.items,E.items));else{const L=_.var("items",(0,l._)`${$}.evaluated.items`);E.items=s.mergeEvaluated.items(_,L,E.items,l.Name)}}}return ze.callRef=o,ze.default=r,ze}var Va;function Ld(){if(Va)return Jt;Va=1,Object.defineProperty(Jt,"__esModule",{value:!0});const e=Dd(),t=Ad(),l=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Jt.default=l,Jt}var Xt={},Yt={},za;function qd(){if(za)return Yt;za=1,Object.defineProperty(Yt,"__esModule",{value:!0});const e=re(),t=e.operators,l={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:s,schemaCode:r})=>(0,e.str)`must be ${l[s].okStr} ${r}`,params:({keyword:s,schemaCode:r})=>(0,e._)`{comparison: ${l[s].okStr}, limit: ${r}}`},f={keyword:Object.keys(l),type:"number",schemaType:"number",$data:!0,error:i,code(s){const{keyword:r,data:a,schemaCode:o}=s;s.fail$data((0,e._)`${a} ${l[r].fail} ${o} || isNaN(${a})`)}};return Yt.default=f,Yt}var Qt={},Ga;function kd(){if(Ga)return Qt;Ga=1,Object.defineProperty(Qt,"__esModule",{value:!0});const e=re(),l={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:f,data:s,schemaCode:r,it:a}=i,o=a.opts.multipleOfPrecision,c=f.let("res"),d=o?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${o}`:(0,e._)`${c} !== parseInt(${c})`;i.fail$data((0,e._)`(${r} === 0 || (${c} = ${s}/${r}, ${d}))`)}};return Qt.default=l,Qt}var er={},tr={},Ka;function jd(){if(Ka)return tr;Ka=1,Object.defineProperty(tr,"__esModule",{value:!0});function e(t){const l=t.length;let i=0,f=0,s;for(;f<l;)i++,s=t.charCodeAt(f++),s>=55296&&s<=56319&&f<l&&(s=t.charCodeAt(f),(s&64512)===56320&&f++);return i}return tr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',tr}var Ha;function Fd(){if(Ha)return er;Ha=1,Object.defineProperty(er,"__esModule",{value:!0});const e=re(),t=ie(),l=jd(),f={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:r}){const a=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${r} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:r,data:a,schemaCode:o,it:c}=s,d=r==="maxLength"?e.operators.GT:e.operators.LT,g=c.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(s.gen,l.default)}(${a})`;s.fail$data((0,e._)`${g} ${d} ${o}`)}};return er.default=f,er}var rr={},xa;function Md(){if(xa)return rr;xa=1,Object.defineProperty(rr,"__esModule",{value:!0});const e=Ce(),t=re(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:f})=>(0,t.str)`must match pattern "${f}"`,params:({schemaCode:f})=>(0,t._)`{pattern: ${f}}`},code(f){const{data:s,$data:r,schema:a,schemaCode:o,it:c}=f,d=c.opts.unicodeRegExp?"u":"",g=r?(0,t._)`(new RegExp(${o}, ${d}))`:(0,e.usePattern)(f,a);f.fail$data((0,t._)`!${g}.test(${s})`)}};return rr.default=i,rr}var nr={},Ba;function Ud(){if(Ba)return nr;Ba=1,Object.defineProperty(nr,"__esModule",{value:!0});const e=re(),l={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:f}){const s=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${f} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:f,data:s,schemaCode:r}=i,a=f==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${s}).length ${a} ${r}`)}};return nr.default=l,nr}var sr={},Wa;function Vd(){if(Wa)return sr;Wa=1,Object.defineProperty(sr,"__esModule",{value:!0});const e=Ce(),t=re(),l=ie(),f={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:r,schema:a,schemaCode:o,data:c,$data:d,it:g}=s,{opts:w}=g;if(!d&&a.length===0)return;const _=a.length>=w.loopRequired;if(g.allErrors?E():R(),w.strictRequired){const n=s.parentSchema.properties,{definedProperties:m}=s.it;for(const v of a)if(n?.[v]===void 0&&!m.has(v)){const p=g.schemaEnv.baseId+g.errSchemaPath,y=`required property "${v}" is not defined at "${p}" (strictRequired)`;(0,l.checkStrictMode)(g,y,g.opts.strictRequired)}}function E(){if(_||d)s.block$data(t.nil,u);else for(const n of a)(0,e.checkReportMissingProp)(s,n)}function R(){const n=r.let("missing");if(_||d){const m=r.let("valid",!0);s.block$data(m,()=>h(n,m)),s.ok(m)}else r.if((0,e.checkMissingProp)(s,a,n)),(0,e.reportMissingProp)(s,n),r.else()}function u(){r.forOf("prop",o,n=>{s.setParams({missingProperty:n}),r.if((0,e.noPropertyInData)(r,c,n,w.ownProperties),()=>s.error())})}function h(n,m){s.setParams({missingProperty:n}),r.forOf(n,o,()=>{r.assign(m,(0,e.propertyInData)(r,c,n,w.ownProperties)),r.if((0,t.not)(m),()=>{s.error(),r.break()})},t.nil)}}};return sr.default=f,sr}var ir={},Ja;function zd(){if(Ja)return ir;Ja=1,Object.defineProperty(ir,"__esModule",{value:!0});const e=re(),l={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:f}){const s=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${f} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:f,data:s,schemaCode:r}=i,a=f==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${s}.length ${a} ${r}`)}};return ir.default=l,ir}var or={},ar={},Za;function Yi(){if(Za)return ar;Za=1,Object.defineProperty(ar,"__esModule",{value:!0});const e=Sn();return e.code='require("ajv/dist/runtime/equal").default',ar.default=e,ar}var Xa;function Gd(){if(Xa)return or;Xa=1,Object.defineProperty(or,"__esModule",{value:!0});const e=_n(),t=re(),l=ie(),i=Yi(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:r,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${r} are identical)`,params:({params:{i:r,j:a}})=>(0,t._)`{i: ${r}, j: ${a}}`},code(r){const{gen:a,data:o,$data:c,schema:d,parentSchema:g,schemaCode:w,it:_}=r;if(!c&&!d)return;const E=a.let("valid"),R=g.items?(0,e.getSchemaTypes)(g.items):[];r.block$data(E,u,(0,t._)`${w} === false`),r.ok(E);function u(){const v=a.let("i",(0,t._)`${o}.length`),p=a.let("j");r.setParams({i:v,j:p}),a.assign(E,!0),a.if((0,t._)`${v} > 1`,()=>(h()?n:m)(v,p))}function h(){return R.length>0&&!R.some(v=>v==="object"||v==="array")}function n(v,p){const y=a.name("item"),$=(0,e.checkDataTypes)(R,y,_.opts.strictNumbers,e.DataType.Wrong),b=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${v}--;`,()=>{a.let(y,(0,t._)`${o}[${v}]`),a.if($,(0,t._)`continue`),R.length>1&&a.if((0,t._)`typeof ${y} == "string"`,(0,t._)`${y} += "_"`),a.if((0,t._)`typeof ${b}[${y}] == "number"`,()=>{a.assign(p,(0,t._)`${b}[${y}]`),r.error(),a.assign(E,!1).break()}).code((0,t._)`${b}[${y}] = ${v}`)})}function m(v,p){const y=(0,l.useFunc)(a,i.default),$=a.name("outer");a.label($).for((0,t._)`;${v}--;`,()=>a.for((0,t._)`${p} = ${v}; ${p}--;`,()=>a.if((0,t._)`${y}(${o}[${v}], ${o}[${p}])`,()=>{r.error(),a.assign(E,!1).break($)})))}}};return or.default=s,or}var cr={},Ya;function Kd(){if(Ya)return cr;Ya=1,Object.defineProperty(cr,"__esModule",{value:!0});const e=re(),t=ie(),l=Yi(),f={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:r,data:a,$data:o,schemaCode:c,schema:d}=s;o||d&&typeof d=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(r,l.default)}(${a}, ${c})`):s.fail((0,e._)`${d} !== ${a}`)}};return cr.default=f,cr}var ur={},Qa;function Hd(){if(Qa)return ur;Qa=1,Object.defineProperty(ur,"__esModule",{value:!0});const e=re(),t=ie(),l=Yi(),f={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:r,data:a,$data:o,schema:c,schemaCode:d,it:g}=s;if(!o&&c.length===0)throw new Error("enum must have non-empty array");const w=c.length>=g.opts.loopEnum;let _;const E=()=>_??(_=(0,t.useFunc)(r,l.default));let R;if(w||o)R=r.let("valid"),s.block$data(R,u);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const n=r.const("vSchema",d);R=(0,e.or)(...c.map((m,v)=>h(n,v)))}s.pass(R);function u(){r.assign(R,!1),r.forOf("v",d,n=>r.if((0,e._)`${E()}(${a}, ${n})`,()=>r.assign(R,!0).break()))}function h(n,m){const v=c[m];return typeof v=="object"&&v!==null?(0,e._)`${E()}(${a}, ${n}[${m}])`:(0,e._)`${a} === ${v}`}}};return ur.default=f,ur}var ec;function xd(){if(ec)return Xt;ec=1,Object.defineProperty(Xt,"__esModule",{value:!0});const e=qd(),t=kd(),l=Fd(),i=Md(),f=Ud(),s=Vd(),r=zd(),a=Gd(),o=Kd(),c=Hd(),d=[e.default,t.default,l.default,i.default,f.default,s.default,r.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},o.default,c.default];return Xt.default=d,Xt}var lr={},it={},tc;function cf(){if(tc)return it;tc=1,Object.defineProperty(it,"__esModule",{value:!0}),it.validateAdditionalItems=void 0;const e=re(),t=ie(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:r,it:a}=s,{items:o}=r;if(!Array.isArray(o)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}f(s,o)}};function f(s,r){const{gen:a,schema:o,data:c,keyword:d,it:g}=s;g.items=!0;const w=a.const("len",(0,e._)`${c}.length`);if(o===!1)s.setParams({len:r.length}),s.pass((0,e._)`${w} <= ${r.length}`);else if(typeof o=="object"&&!(0,t.alwaysValidSchema)(g,o)){const E=a.var("valid",(0,e._)`${w} <= ${r.length}`);a.if((0,e.not)(E),()=>_(E)),s.ok(E)}function _(E){a.forRange("i",r.length,w,R=>{s.subschema({keyword:d,dataProp:R,dataPropType:t.Type.Num},E),g.allErrors||a.if((0,e.not)(E),()=>a.break())})}}return it.validateAdditionalItems=f,it.default=i,it}var fr={},ot={},rc;function uf(){if(rc)return ot;rc=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.validateTuple=void 0;const e=re(),t=ie(),l=Ce(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:r,it:a}=s;if(Array.isArray(r))return f(s,"additionalItems",r);a.items=!0,!(0,t.alwaysValidSchema)(a,r)&&s.ok((0,l.validateArray)(s))}};function f(s,r,a=s.schema){const{gen:o,parentSchema:c,data:d,keyword:g,it:w}=s;R(c),w.opts.unevaluated&&a.length&&w.items!==!0&&(w.items=t.mergeEvaluated.items(o,a.length,w.items));const _=o.name("valid"),E=o.const("len",(0,e._)`${d}.length`);a.forEach((u,h)=>{(0,t.alwaysValidSchema)(w,u)||(o.if((0,e._)`${E} > ${h}`,()=>s.subschema({keyword:g,schemaProp:h,dataProp:h},_)),s.ok(_))});function R(u){const{opts:h,errSchemaPath:n}=w,m=a.length,v=m===u.minItems&&(m===u.maxItems||u[r]===!1);if(h.strictTuples&&!v){const p=`"${g}" is ${m}-tuple, but minItems or maxItems/${r} are not specified or different at path "${n}"`;(0,t.checkStrictMode)(w,p,h.strictTuples)}}}return ot.validateTuple=f,ot.default=i,ot}var nc;function Bd(){if(nc)return fr;nc=1,Object.defineProperty(fr,"__esModule",{value:!0});const e=uf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:l=>(0,e.validateTuple)(l,"items")};return fr.default=t,fr}var dr={},sc;function Wd(){if(sc)return dr;sc=1,Object.defineProperty(dr,"__esModule",{value:!0});const e=re(),t=ie(),l=Ce(),i=cf(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:r}})=>(0,e.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,e._)`{limit: ${r}}`},code(r){const{schema:a,parentSchema:o,it:c}=r,{prefixItems:d}=o;c.items=!0,!(0,t.alwaysValidSchema)(c,a)&&(d?(0,i.validateAdditionalItems)(r,d):r.ok((0,l.validateArray)(r)))}};return dr.default=s,dr}var hr={},ic;function Jd(){if(ic)return hr;ic=1,Object.defineProperty(hr,"__esModule",{value:!0});const e=re(),t=ie(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:f,max:s}})=>s===void 0?(0,e.str)`must contain at least ${f} valid item(s)`:(0,e.str)`must contain at least ${f} and no more than ${s} valid item(s)`,params:({params:{min:f,max:s}})=>s===void 0?(0,e._)`{minContains: ${f}}`:(0,e._)`{minContains: ${f}, maxContains: ${s}}`},code(f){const{gen:s,schema:r,parentSchema:a,data:o,it:c}=f;let d,g;const{minContains:w,maxContains:_}=a;c.opts.next?(d=w===void 0?1:w,g=_):d=1;const E=s.const("len",(0,e._)`${o}.length`);if(f.setParams({min:d,max:g}),g===void 0&&d===0){(0,t.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&d>g){(0,t.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),f.fail();return}if((0,t.alwaysValidSchema)(c,r)){let m=(0,e._)`${E} >= ${d}`;g!==void 0&&(m=(0,e._)`${m} && ${E} <= ${g}`),f.pass(m);return}c.items=!0;const R=s.name("valid");g===void 0&&d===1?h(R,()=>s.if(R,()=>s.break())):d===0?(s.let(R,!0),g!==void 0&&s.if((0,e._)`${o}.length > 0`,u)):(s.let(R,!1),u()),f.result(R,()=>f.reset());function u(){const m=s.name("_valid"),v=s.let("count",0);h(m,()=>s.if(m,()=>n(v)))}function h(m,v){s.forRange("i",0,E,p=>{f.subschema({keyword:"contains",dataProp:p,dataPropType:t.Type.Num,compositeRule:!0},m),v()})}function n(m){s.code((0,e._)`${m}++`),g===void 0?s.if((0,e._)`${m} >= ${d}`,()=>s.assign(R,!0).break()):(s.if((0,e._)`${m} > ${g}`,()=>s.assign(R,!1).break()),d===1?s.assign(R,!0):s.if((0,e._)`${m} >= ${d}`,()=>s.assign(R,!0)))}}};return hr.default=i,hr}var Ts={},oc;function Zd(){return oc||(oc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=re(),l=ie(),i=Ce();e.error={message:({params:{property:o,depsCount:c,deps:d}})=>{const g=c===1?"property":"properties";return(0,t.str)`must have ${g} ${d} when property ${o} is present`},params:({params:{property:o,depsCount:c,deps:d,missingProperty:g}})=>(0,t._)`{property: ${o},
|
|
12
|
+
missingProperty: ${g},
|
|
13
|
+
depsCount: ${c},
|
|
14
|
+
deps: ${d}}`};const f={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(o){const[c,d]=s(o);r(o,c),a(o,d)}};function s({schema:o}){const c={},d={};for(const g in o){if(g==="__proto__")continue;const w=Array.isArray(o[g])?c:d;w[g]=o[g]}return[c,d]}function r(o,c=o.schema){const{gen:d,data:g,it:w}=o;if(Object.keys(c).length===0)return;const _=d.let("missing");for(const E in c){const R=c[E];if(R.length===0)continue;const u=(0,i.propertyInData)(d,g,E,w.opts.ownProperties);o.setParams({property:E,depsCount:R.length,deps:R.join(", ")}),w.allErrors?d.if(u,()=>{for(const h of R)(0,i.checkReportMissingProp)(o,h)}):(d.if((0,t._)`${u} && (${(0,i.checkMissingProp)(o,R,_)})`),(0,i.reportMissingProp)(o,_),d.else())}}e.validatePropertyDeps=r;function a(o,c=o.schema){const{gen:d,data:g,keyword:w,it:_}=o,E=d.name("valid");for(const R in c)(0,l.alwaysValidSchema)(_,c[R])||(d.if((0,i.propertyInData)(d,g,R,_.opts.ownProperties),()=>{const u=o.subschema({keyword:w,schemaProp:R},E);o.mergeValidEvaluated(u,E)},()=>d.var(E,!0)),o.ok(E))}e.validateSchemaDeps=a,e.default=f}(Ts)),Ts}var mr={},ac;function Xd(){if(ac)return mr;ac=1,Object.defineProperty(mr,"__esModule",{value:!0});const e=re(),t=ie(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:f})=>(0,e._)`{propertyName: ${f.propertyName}}`},code(f){const{gen:s,schema:r,data:a,it:o}=f;if((0,t.alwaysValidSchema)(o,r))return;const c=s.name("valid");s.forIn("key",a,d=>{f.setParams({propertyName:d}),f.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},c),s.if((0,e.not)(c),()=>{f.error(!0),o.allErrors||s.break()})}),f.ok(c)}};return mr.default=i,mr}var pr={},cc;function lf(){if(cc)return pr;cc=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=Ce(),t=re(),l=Ke(),i=ie(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:r})=>(0,t._)`{additionalProperty: ${r.additionalProperty}}`},code(r){const{gen:a,schema:o,parentSchema:c,data:d,errsCount:g,it:w}=r;if(!g)throw new Error("ajv implementation error");const{allErrors:_,opts:E}=w;if(w.props=!0,E.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(w,o))return;const R=(0,e.allSchemaProperties)(c.properties),u=(0,e.allSchemaProperties)(c.patternProperties);h(),r.ok((0,t._)`${g} === ${l.default.errors}`);function h(){a.forIn("key",d,y=>{!R.length&&!u.length?v(y):a.if(n(y),()=>v(y))})}function n(y){let $;if(R.length>8){const b=(0,i.schemaRefOrVal)(w,c.properties,"properties");$=(0,e.isOwnProperty)(a,b,y)}else R.length?$=(0,t.or)(...R.map(b=>(0,t._)`${y} === ${b}`)):$=t.nil;return u.length&&($=(0,t.or)($,...u.map(b=>(0,t._)`${(0,e.usePattern)(r,b)}.test(${y})`))),(0,t.not)($)}function m(y){a.code((0,t._)`delete ${d}[${y}]`)}function v(y){if(E.removeAdditional==="all"||E.removeAdditional&&o===!1){m(y);return}if(o===!1){r.setParams({additionalProperty:y}),r.error(),_||a.break();return}if(typeof o=="object"&&!(0,i.alwaysValidSchema)(w,o)){const $=a.name("valid");E.removeAdditional==="failing"?(p(y,$,!1),a.if((0,t.not)($),()=>{r.reset(),m(y)})):(p(y,$),_||a.if((0,t.not)($),()=>a.break()))}}function p(y,$,b){const N={keyword:"additionalProperties",dataProp:y,dataPropType:i.Type.Str};b===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(N,$)}}};return pr.default=s,pr}var yr={},uc;function Yd(){if(uc)return yr;uc=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=bn(),t=Ce(),l=ie(),i=lf(),f={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:r,schema:a,parentSchema:o,data:c,it:d}=s;d.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(d,i.default,"additionalProperties"));const g=(0,t.allSchemaProperties)(a);for(const u of g)d.definedProperties.add(u);d.opts.unevaluated&&g.length&&d.props!==!0&&(d.props=l.mergeEvaluated.props(r,(0,l.toHash)(g),d.props));const w=g.filter(u=>!(0,l.alwaysValidSchema)(d,a[u]));if(w.length===0)return;const _=r.name("valid");for(const u of w)E(u)?R(u):(r.if((0,t.propertyInData)(r,c,u,d.opts.ownProperties)),R(u),d.allErrors||r.else().var(_,!0),r.endIf()),s.it.definedProperties.add(u),s.ok(_);function E(u){return d.opts.useDefaults&&!d.compositeRule&&a[u].default!==void 0}function R(u){s.subschema({keyword:"properties",schemaProp:u,dataProp:u},_)}}};return yr.default=f,yr}var vr={},lc;function Qd(){if(lc)return vr;lc=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=Ce(),t=re(),l=ie(),i=ie(),f={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:r,schema:a,data:o,parentSchema:c,it:d}=s,{opts:g}=d,w=(0,e.allSchemaProperties)(a),_=w.filter(v=>(0,l.alwaysValidSchema)(d,a[v]));if(w.length===0||_.length===w.length&&(!d.opts.unevaluated||d.props===!0))return;const E=g.strictSchema&&!g.allowMatchingProperties&&c.properties,R=r.name("valid");d.props!==!0&&!(d.props instanceof t.Name)&&(d.props=(0,i.evaluatedPropsToName)(r,d.props));const{props:u}=d;h();function h(){for(const v of w)E&&n(v),d.allErrors?m(v):(r.var(R,!0),m(v),r.if(R))}function n(v){for(const p in E)new RegExp(v).test(p)&&(0,l.checkStrictMode)(d,`property ${p} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){r.forIn("key",o,p=>{r.if((0,t._)`${(0,e.usePattern)(s,v)}.test(${p})`,()=>{const y=_.includes(v);y||s.subschema({keyword:"patternProperties",schemaProp:v,dataProp:p,dataPropType:i.Type.Str},R),d.opts.unevaluated&&u!==!0?r.assign((0,t._)`${u}[${p}]`,!0):!y&&!d.allErrors&&r.if((0,t.not)(R),()=>r.break())})})}}};return vr.default=f,vr}var _r={},fc;function eh(){if(fc)return _r;fc=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=ie(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(l){const{gen:i,schema:f,it:s}=l;if((0,e.alwaysValidSchema)(s,f)){l.fail();return}const r=i.name("valid");l.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),l.failResult(r,()=>l.reset(),()=>l.error())},error:{message:"must NOT be valid"}};return _r.default=t,_r}var gr={},dc;function th(){if(dc)return gr;dc=1,Object.defineProperty(gr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ce().validateUnion,error:{message:"must match a schema in anyOf"}};return gr.default=t,gr}var $r={},hc;function rh(){if(hc)return $r;hc=1,Object.defineProperty($r,"__esModule",{value:!0});const e=re(),t=ie(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:f})=>(0,e._)`{passingSchemas: ${f.passing}}`},code(f){const{gen:s,schema:r,parentSchema:a,it:o}=f;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&a.discriminator)return;const c=r,d=s.let("valid",!1),g=s.let("passing",null),w=s.name("_valid");f.setParams({passing:g}),s.block(_),f.result(d,()=>f.reset(),()=>f.error(!0));function _(){c.forEach((E,R)=>{let u;(0,t.alwaysValidSchema)(o,E)?s.var(w,!0):u=f.subschema({keyword:"oneOf",schemaProp:R,compositeRule:!0},w),R>0&&s.if((0,e._)`${w} && ${d}`).assign(d,!1).assign(g,(0,e._)`[${g}, ${R}]`).else(),s.if(w,()=>{s.assign(d,!0),s.assign(g,R),u&&f.mergeEvaluated(u,e.Name)})})}}};return $r.default=i,$r}var Er={},mc;function nh(){if(mc)return Er;mc=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=ie(),t={keyword:"allOf",schemaType:"array",code(l){const{gen:i,schema:f,it:s}=l;if(!Array.isArray(f))throw new Error("ajv implementation error");const r=i.name("valid");f.forEach((a,o)=>{if((0,e.alwaysValidSchema)(s,a))return;const c=l.subschema({keyword:"allOf",schemaProp:o},r);l.ok(r),l.mergeEvaluated(c)})}};return Er.default=t,Er}var wr={},pc;function sh(){if(pc)return wr;pc=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=re(),t=ie(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:r,parentSchema:a,it:o}=s;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const c=f(o,"then"),d=f(o,"else");if(!c&&!d)return;const g=r.let("valid",!0),w=r.name("_valid");if(_(),s.reset(),c&&d){const R=r.let("ifClause");s.setParams({ifClause:R}),r.if(w,E("then",R),E("else",R))}else c?r.if(w,E("then")):r.if((0,e.not)(w),E("else"));s.pass(g,()=>s.error(!0));function _(){const R=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},w);s.mergeEvaluated(R)}function E(R,u){return()=>{const h=s.subschema({keyword:R},w);r.assign(g,w),s.mergeValidEvaluated(h,g),u?r.assign(u,(0,e._)`${R}`):s.setParams({ifClause:R})}}}};function f(s,r){const a=s.schema[r];return a!==void 0&&!(0,t.alwaysValidSchema)(s,a)}return wr.default=i,wr}var Sr={},yc;function ih(){if(yc)return Sr;yc=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ie(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:l,parentSchema:i,it:f}){i.if===void 0&&(0,e.checkStrictMode)(f,`"${l}" without "if" is ignored`)}};return Sr.default=t,Sr}var vc;function oh(){if(vc)return lr;vc=1,Object.defineProperty(lr,"__esModule",{value:!0});const e=cf(),t=Bd(),l=uf(),i=Wd(),f=Jd(),s=Zd(),r=Xd(),a=lf(),o=Yd(),c=Qd(),d=eh(),g=th(),w=rh(),_=nh(),E=sh(),R=ih();function u(h=!1){const n=[d.default,g.default,w.default,_.default,E.default,R.default,r.default,a.default,s.default,o.default,c.default];return h?n.push(t.default,i.default):n.push(e.default,l.default),n.push(f.default),n}return lr.default=u,lr}var Rr={},br={},_c;function ah(){if(_c)return br;_c=1,Object.defineProperty(br,"__esModule",{value:!0});const e=re(),l={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,f){const{gen:s,data:r,$data:a,schema:o,schemaCode:c,it:d}=i,{opts:g,errSchemaPath:w,schemaEnv:_,self:E}=d;if(!g.validateFormats)return;a?R():u();function R(){const h=s.scopeValue("formats",{ref:E.formats,code:g.code.formats}),n=s.const("fDef",(0,e._)`${h}[${c}]`),m=s.let("fType"),v=s.let("format");s.if((0,e._)`typeof ${n} == "object" && !(${n} instanceof RegExp)`,()=>s.assign(m,(0,e._)`${n}.type || "string"`).assign(v,(0,e._)`${n}.validate`),()=>s.assign(m,(0,e._)`"string"`).assign(v,n)),i.fail$data((0,e.or)(p(),y()));function p(){return g.strictSchema===!1?e.nil:(0,e._)`${c} && !${v}`}function y(){const $=_.$async?(0,e._)`(${n}.async ? await ${v}(${r}) : ${v}(${r}))`:(0,e._)`${v}(${r})`,b=(0,e._)`(typeof ${v} == "function" ? ${$} : ${v}.test(${r}))`;return(0,e._)`${v} && ${v} !== true && ${m} === ${f} && !${b}`}}function u(){const h=E.formats[o];if(!h){p();return}if(h===!0)return;const[n,m,v]=y(h);n===f&&i.pass($());function p(){if(g.strictSchema===!1){E.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${o}" ignored in schema at path "${w}"`}}function y(b){const N=b instanceof RegExp?(0,e.regexpCode)(b):g.code.formats?(0,e._)`${g.code.formats}${(0,e.getProperty)(o)}`:void 0,L=s.scopeValue("formats",{key:o,ref:b,code:N});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,e._)`${L}.validate`]:["string",b,L]}function $(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${r})`}return typeof m=="function"?(0,e._)`${v}(${r})`:(0,e._)`${v}.test(${r})`}}}};return br.default=l,br}var gc;function ch(){if(gc)return Rr;gc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const t=[ah().default];return Rr.default=t,Rr}var Qe={},$c;function uh(){return $c||($c=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.contentVocabulary=Qe.metadataVocabulary=void 0,Qe.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Qe.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Qe}var Ec;function lh(){if(Ec)return Wt;Ec=1,Object.defineProperty(Wt,"__esModule",{value:!0});const e=Ld(),t=xd(),l=oh(),i=ch(),f=uh(),s=[e.default,t.default,(0,l.default)(),i.default,f.metadataVocabulary,f.contentVocabulary];return Wt.default=s,Wt}var Pr={},yt={},wc;function fh(){if(wc)return yt;wc=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(yt.DiscrError=e={})),yt}var Sc;function dh(){if(Sc)return Pr;Sc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=re(),t=fh(),l=Xi(),i=Pn(),f=ie(),r={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:o}})=>a===t.DiscrError.Tag?`tag "${o}" must be string`:`value of tag "${o}" must be in oneOf`,params:({params:{discrError:a,tag:o,tagName:c}})=>(0,e._)`{error: ${a}, tag: ${c}, tagValue: ${o}}`},code(a){const{gen:o,data:c,schema:d,parentSchema:g,it:w}=a,{oneOf:_}=g;if(!w.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=d.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const R=o.let("valid",!1),u=o.const("tag",(0,e._)`${c}${(0,e.getProperty)(E)}`);o.if((0,e._)`typeof ${u} == "string"`,()=>h(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:u,tagName:E})),a.ok(R);function h(){const v=m();o.if(!1);for(const p in v)o.elseIf((0,e._)`${u} === ${p}`),o.assign(R,n(v[p]));o.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:u,tagName:E}),o.endIf()}function n(v){const p=o.name("valid"),y=a.subschema({keyword:"oneOf",schemaProp:v},p);return a.mergeEvaluated(y,e.Name),p}function m(){var v;const p={},y=b(g);let $=!0;for(let F=0;F<_.length;F++){let H=_[F];if(H?.$ref&&!(0,f.schemaHasRulesButRef)(H,w.self.RULES)){const V=H.$ref;if(H=l.resolveRef.call(w.self,w.schemaEnv.root,w.baseId,V),H instanceof l.SchemaEnv&&(H=H.schema),H===void 0)throw new i.default(w.opts.uriResolver,w.baseId,V)}const M=(v=H?.properties)===null||v===void 0?void 0:v[E];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);$=$&&(y||b(H)),N(M,F)}if(!$)throw new Error(`discriminator: "${E}" must be required`);return p;function b({required:F}){return Array.isArray(F)&&F.includes(E)}function N(F,H){if(F.const)L(F.const,H);else if(F.enum)for(const M of F.enum)L(M,H);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function L(F,H){if(typeof F!="string"||F in p)throw new Error(`discriminator: "${E}" values must be unique strings`);p[F]=H}}}};return Pr.default=r,Pr}const hh="http://json-schema.org/draft-07/schema#",mh="http://json-schema.org/draft-07/schema#",ph="Core schema meta-schema",yh={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},vh=["object","boolean"],_h={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},gh={$schema:hh,$id:mh,title:ph,definitions:yh,type:vh,properties:_h,default:!0};var Rc;function $h(){return Rc||(Rc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const l=Cd(),i=lh(),f=dh(),s=gh,r=["/properties"],a="http://json-schema.org/draft-07/schema";class o extends l.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(f.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(s,r):s;this.addMetaSchema(E,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=o,e.exports=t=o,e.exports.Ajv=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var c=bn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=re();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 g=Zi();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return g.default}});var w=Pn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}(Gt,Gt.exports)),Gt.exports}var Nr={exports:{}},Cs={},bc;function Eh(){return bc||(bc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(N,L){return{validate:N,compare:L}}e.fullFormats={date:t(s,r),time:t(o,c),"date-time":t(g,w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:R,"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:b,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:h,int32:{type:"number",validate:v},int64:{type:"number",validate:p},float:{type:"number",validate:y},double:{type:"number",validate:y},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,r),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":t(/^\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,w),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},e.formatNames=Object.keys(e.fullFormats);function l(N){return N%4===0&&(N%100!==0||N%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,f=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(N){const L=i.exec(N);if(!L)return!1;const F=+L[1],H=+L[2],M=+L[3];return H>=1&&H<=12&&M>=1&&M<=(H===2&&l(F)?29:f[H])}function r(N,L){if(N&&L)return N>L?1:N<L?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function o(N,L){const F=a.exec(N);if(!F)return!1;const H=+F[1],M=+F[2],V=+F[3],z=F[5];return(H<=23&&M<=59&&V<=59||H===23&&M===59&&V===60)&&(!L||z!=="")}function c(N,L){if(!(N&&L))return;const F=a.exec(N),H=a.exec(L);if(F&&H)return N=F[1]+F[2]+F[3]+(F[4]||""),L=H[1]+H[2]+H[3]+(H[4]||""),N>L?1:N<L?-1:0}const d=/t|\s/i;function g(N){const L=N.split(d);return L.length===2&&s(L[0])&&o(L[1],!0)}function w(N,L){if(!(N&&L))return;const[F,H]=N.split(d),[M,V]=L.split(d),z=r(F,M);if(z!==void 0)return z||c(H,V)}const _=/\/|:/,E=/^(?:[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;function R(N){return _.test(N)&&E.test(N)}const u=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function h(N){return u.lastIndex=0,u.test(N)}const n=-2147483648,m=2**31-1;function v(N){return Number.isInteger(N)&&N<=m&&N>=n}function p(N){return Number.isInteger(N)}function y(){return!0}const $=/[^\\]\\Z/;function b(N){if($.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}}(Cs)),Cs}var Ds={},Or={exports:{}},As={},Me={},et={},Ls={},qs={},ks={},Pc;function gn(){return Pc||(Pc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class l extends t{constructor(n){if(super(),!e.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=l;class i extends t{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((m,v)=>`${m}${v}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((m,v)=>(v instanceof l&&(m[v.str]=(m[v.str]||0)+1),m),{})}}e._Code=i,e.nil=new i("");function f(h,...n){const m=[h[0]];let v=0;for(;v<n.length;)a(m,n[v]),m.push(h[++v]);return new i(m)}e._=f;const s=new i("+");function r(h,...n){const m=[_(h[0])];let v=0;for(;v<n.length;)m.push(s),a(m,n[v]),m.push(s,_(h[++v]));return o(m),new i(m)}e.str=r;function a(h,n){n instanceof i?h.push(...n._items):n instanceof l?h.push(n):h.push(g(n))}e.addCodeArg=a;function o(h){let n=1;for(;n<h.length-1;){if(h[n]===s){const m=c(h[n-1],h[n+1]);if(m!==void 0){h.splice(n-1,3,m);continue}h[n++]="+"}n++}}function c(h,n){if(n==='""')return h;if(h==='""')return n;if(typeof h=="string")return n instanceof l||h[h.length-1]!=='"'?void 0:typeof n!="string"?`${h.slice(0,-1)}${n}"`:n[0]==='"'?h.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(h instanceof l))return`"${h}${n.slice(1)}`}function d(h,n){return n.emptyStr()?h:h.emptyStr()?n:r`${h}${n}`}e.strConcat=d;function g(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:_(Array.isArray(h)?h.join(","):h)}function w(h){return new i(_(h))}e.stringify=w;function _(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function E(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new i(`.${h}`):f`[${h}]`}e.getProperty=E;function R(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new i(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=R;function u(h){return new i(h.toString())}e.regexpCode=u}(ks)),ks}var js={},Nc;function Oc(){return Nc||(Nc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=gn();class l extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var i;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class f{constructor({prefixes:c,parent:d}={}){this._names={},this._prefixes=c,this._parent=d}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const d=this._names[c]||this._nameGroup(c);return`${c}${d.index++}`}_nameGroup(c){var d,g;if(!((g=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||g===void 0)&&g.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=f;class s extends t.Name{constructor(c,d){super(d),this.prefix=c}setValue(c,{property:d,itemIndex:g}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(d)}[${g}]`}}e.ValueScopeName=s;const r=(0,t._)`\n`;class a extends f{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?r:t.nil}}get(){return this._scope}name(c){return new s(c,this._newName(c))}value(c,d){var g;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(c),{prefix:_}=w,E=(g=d.key)!==null&&g!==void 0?g:d.ref;let R=this._values[_];if(R){const n=R.get(E);if(n)return n}else R=this._values[_]=new Map;R.set(E,w);const u=this._scope[_]||(this._scope[_]=[]),h=u.length;return u[h]=d.ref,w.setValue(d,{property:_,itemIndex:h}),w}getValue(c,d){const g=this._values[c];if(g)return g.get(d)}scopeRefs(c,d=this._values){return this._reduceValues(d,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,t._)`${c}${g.scopePath}`})}scopeCode(c=this._values,d,g){return this._reduceValues(c,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},d,g)}_reduceValues(c,d,g={},w){let _=t.nil;for(const E in c){const R=c[E];if(!R)continue;const u=g[E]=g[E]||new Map;R.forEach(h=>{if(u.has(h))return;u.set(h,i.Started);let n=d(h);if(n){const m=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${m} ${h} = ${n};${this.opts._n}`}else if(n=w?.(h))_=(0,t._)`${_}${n}${this.opts._n}`;else throw new l(h);u.set(h,i.Completed)})}return _}}e.ValueScope=a}(js)),js}var Ic;function te(){return Ic||(Ic=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=gn(),l=Oc();var i=gn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var f=Oc();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return f.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return f.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return f.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return f.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(S,P){return this}}class r extends s{constructor(S,P,A){super(),this.varKind=S,this.name=P,this.rhs=A}render({es5:S,_n:P}){const A=S?l.varKinds.var:this.varKind,K=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${K};`+P}optimizeNames(S,P){if(S[this.name.str])return this.rhs&&(this.rhs=V(this.rhs,S,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(S,P,A){super(),this.lhs=S,this.rhs=P,this.sideEffects=A}render({_n:S}){return`${this.lhs} = ${this.rhs};`+S}optimizeNames(S,P){if(!(this.lhs instanceof t.Name&&!S[this.lhs.str]&&!this.sideEffects))return this.rhs=V(this.rhs,S,P),this}get names(){const S=this.lhs instanceof t.Name?{}:{...this.lhs.names};return M(S,this.rhs)}}class o extends a{constructor(S,P,A,K){super(S,A,K),this.op=P}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class c extends s{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class d extends s{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class g extends s{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class w extends s{constructor(S){super(),this.code=S}render({_n:S}){return`${this.code};`+S}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(S,P){return this.code=V(this.code,S,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends s{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((P,A)=>P+A.render(S),"")}optimizeNodes(){const{nodes:S}=this;let P=S.length;for(;P--;){const A=S[P].optimizeNodes();Array.isArray(A)?S.splice(P,1,...A):A?S[P]=A:S.splice(P,1)}return S.length>0?this:void 0}optimizeNames(S,P){const{nodes:A}=this;let K=A.length;for(;K--;){const B=A[K];B.optimizeNames(S,P)||(z(S,B.names),A.splice(K,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((S,P)=>H(S,P.names),{})}}class E extends _{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class R extends _{}class u extends E{}u.kind="else";class h extends E{constructor(S,P){super(P),this.condition=S}render(S){let P=`if(${this.condition})`+super.render(S);return this.else&&(P+="else "+this.else.render(S)),P}optimizeNodes(){super.optimizeNodes();const S=this.condition;if(S===!0)return this.nodes;let P=this.else;if(P){const A=P.optimizeNodes();P=this.else=Array.isArray(A)?new u(A):A}if(P)return S===!1?P instanceof h?P:P.nodes:this.nodes.length?this:new h(J(S),P instanceof h?[P]:P.nodes);if(!(S===!1||!this.nodes.length))return this}optimizeNames(S,P){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(S,P),!!(super.optimizeNames(S,P)||this.else))return this.condition=V(this.condition,S,P),this}get names(){const S=super.names;return M(S,this.condition),this.else&&H(S,this.else.names),S}}h.kind="if";class n extends E{}n.kind="for";class m extends n{constructor(S){super(),this.iteration=S}render(S){return`for(${this.iteration})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iteration=V(this.iteration,S,P),this}get names(){return H(super.names,this.iteration.names)}}class v extends n{constructor(S,P,A,K){super(),this.varKind=S,this.name=P,this.from=A,this.to=K}render(S){const P=S.es5?l.varKinds.var:this.varKind,{name:A,from:K,to:B}=this;return`for(${P} ${A}=${K}; ${A}<${B}; ${A}++)`+super.render(S)}get names(){const S=M(super.names,this.from);return M(S,this.to)}}class p extends n{constructor(S,P,A,K){super(),this.loop=S,this.varKind=P,this.name=A,this.iterable=K}render(S){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iterable=V(this.iterable,S,P),this}get names(){return H(super.names,this.iterable.names)}}class y extends E{constructor(S,P,A){super(),this.name=S,this.args=P,this.async=A}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}y.kind="func";class $ extends _{render(S){return"return "+super.render(S)}}$.kind="return";class b extends E{render(S){let P="try"+super.render(S);return this.catch&&(P+=this.catch.render(S)),this.finally&&(P+=this.finally.render(S)),P}optimizeNodes(){var S,P;return super.optimizeNodes(),(S=this.catch)===null||S===void 0||S.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(S,P){var A,K;return super.optimizeNames(S,P),(A=this.catch)===null||A===void 0||A.optimizeNames(S,P),(K=this.finally)===null||K===void 0||K.optimizeNames(S,P),this}get names(){const S=super.names;return this.catch&&H(S,this.catch.names),this.finally&&H(S,this.finally.names),S}}class N extends E{constructor(S){super(),this.error=S}render(S){return`catch(${this.error})`+super.render(S)}}N.kind="catch";class L extends E{render(S){return"finally"+super.render(S)}}L.kind="finally";class F{constructor(S,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
15
|
+
`:""},this._extScope=S,this._scope=new l.Scope({parent:S}),this._nodes=[new R]}toString(){return this._root.render(this.opts)}name(S){return this._scope.name(S)}scopeName(S){return this._extScope.name(S)}scopeValue(S,P){const A=this._extScope.value(S,P);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(S,P){return this._extScope.getValue(S,P)}scopeRefs(S){return this._extScope.scopeRefs(S,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(S,P,A,K){const B=this._scope.toName(P);return A!==void 0&&K&&(this._constants[B.str]=A),this._leafNode(new r(S,B,A)),B}const(S,P,A){return this._def(l.varKinds.const,S,P,A)}let(S,P,A){return this._def(l.varKinds.let,S,P,A)}var(S,P,A){return this._def(l.varKinds.var,S,P,A)}assign(S,P,A){return this._leafNode(new a(S,P,A))}add(S,P){return this._leafNode(new o(S,e.operators.ADD,P))}code(S){return typeof S=="function"?S():S!==t.nil&&this._leafNode(new w(S)),this}object(...S){const P=["{"];for(const[A,K]of S)P.length>1&&P.push(","),P.push(A),(A!==K||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,K));return P.push("}"),new t._Code(P)}if(S,P,A){if(this._blockNode(new h(S)),P&&A)this.code(P).else().code(A).endIf();else if(P)this.code(P).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(S){return this._elseNode(new h(S))}else(){return this._elseNode(new u)}endIf(){return this._endBlockNode(h,u)}_for(S,P){return this._blockNode(S),P&&this.code(P).endFor(),this}for(S,P){return this._for(new m(S),P)}forRange(S,P,A,K,B=this.opts.es5?l.varKinds.var:l.varKinds.let){const X=this._scope.toName(S);return this._for(new v(B,X,P,A),()=>K(X))}forOf(S,P,A,K=l.varKinds.const){const B=this._scope.toName(S);if(this.opts.es5){const X=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${X}.length`,Z=>{this.var(B,(0,t._)`${X}[${Z}]`),A(B)})}return this._for(new p("of",K,B,P),()=>A(B))}forIn(S,P,A,K=this.opts.es5?l.varKinds.var:l.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,(0,t._)`Object.keys(${P})`,A);const B=this._scope.toName(S);return this._for(new p("in",K,B,P),()=>A(B))}endFor(){return this._endBlockNode(n)}label(S){return this._leafNode(new c(S))}break(S){return this._leafNode(new d(S))}return(S){const P=new $;if(this._blockNode(P),this.code(S),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode($)}try(S,P,A){if(!P&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const K=new b;if(this._blockNode(K),this.code(S),P){const B=this.name("e");this._currNode=K.catch=new N(B),P(B)}return A&&(this._currNode=K.finally=new L,this.code(A)),this._endBlockNode(N,L)}throw(S){return this._leafNode(new g(S))}block(S,P){return this._blockStarts.push(this._nodes.length),S&&this.code(S).endBlock(P),this}endBlock(S){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-P;if(A<0||S!==void 0&&A!==S)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${S} expected`);return this._nodes.length=P,this}func(S,P=t.nil,A,K){return this._blockNode(new y(S,P,A)),K&&this.code(K).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(S=1){for(;S-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(S){return this._currNode.nodes.push(S),this}_blockNode(S){this._currNode.nodes.push(S),this._nodes.push(S)}_endBlockNode(S,P){const A=this._currNode;if(A instanceof S||P&&A instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${S.kind}/${P.kind}`:S.kind}"`)}_elseNode(S){const P=this._currNode;if(!(P instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=S,this}get _root(){return this._nodes[0]}get _currNode(){const S=this._nodes;return S[S.length-1]}set _currNode(S){const P=this._nodes;P[P.length-1]=S}}e.CodeGen=F;function H(T,S){for(const P in S)T[P]=(T[P]||0)+(S[P]||0);return T}function M(T,S){return S instanceof t._CodeOrName?H(T,S.names):T}function V(T,S,P){if(T instanceof t.Name)return A(T);if(!K(T))return T;return new t._Code(T._items.reduce((B,X)=>(X instanceof t.Name&&(X=A(X)),X instanceof t._Code?B.push(...X._items):B.push(X),B),[]));function A(B){const X=P[B.str];return X===void 0||S[B.str]!==1?B:(delete S[B.str],X)}function K(B){return B instanceof t._Code&&B._items.some(X=>X instanceof t.Name&&S[X.str]===1&&P[X.str]!==void 0)}}function z(T,S){for(const P in S)T[P]=(T[P]||0)-(S[P]||0)}function J(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${q(T)}`}e.not=J;const W=O(e.operators.AND);function j(...T){return T.reduce(W)}e.and=j;const G=O(e.operators.OR);function D(...T){return T.reduce(G)}e.or=D;function O(T){return(S,P)=>S===t.nil?P:P===t.nil?S:(0,t._)`${q(S)} ${T} ${q(P)}`}function q(T){return T instanceof t.Name?T:(0,t._)`(${T})`}}(qs)),qs}var ee={},Tc;function oe(){if(Tc)return ee;Tc=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.checkStrictMode=ee.getErrorPath=ee.Type=ee.useFunc=ee.setEvaluated=ee.evaluatedPropsToName=ee.mergeEvaluated=ee.eachItem=ee.unescapeJsonPointer=ee.escapeJsonPointer=ee.escapeFragment=ee.unescapeFragment=ee.schemaRefOrVal=ee.schemaHasRulesButRef=ee.schemaHasRules=ee.checkUnknownRules=ee.alwaysValidSchema=ee.toHash=void 0;const e=te(),t=gn();function l(p){const y={};for(const $ of p)y[$]=!0;return y}ee.toHash=l;function i(p,y){return typeof y=="boolean"?y:Object.keys(y).length===0?!0:(f(p,y),!s(y,p.self.RULES.all))}ee.alwaysValidSchema=i;function f(p,y=p.schema){const{opts:$,self:b}=p;if(!$.strictSchema||typeof y=="boolean")return;const N=b.RULES.keywords;for(const L in y)N[L]||v(p,`unknown keyword: "${L}"`)}ee.checkUnknownRules=f;function s(p,y){if(typeof p=="boolean")return!p;for(const $ in p)if(y[$])return!0;return!1}ee.schemaHasRules=s;function r(p,y){if(typeof p=="boolean")return!p;for(const $ in p)if($!=="$ref"&&y.all[$])return!0;return!1}ee.schemaHasRulesButRef=r;function a({topSchemaRef:p,schemaPath:y},$,b,N){if(!N){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return(0,e._)`${$}`}return(0,e._)`${p}${y}${(0,e.getProperty)(b)}`}ee.schemaRefOrVal=a;function o(p){return g(decodeURIComponent(p))}ee.unescapeFragment=o;function c(p){return encodeURIComponent(d(p))}ee.escapeFragment=c;function d(p){return typeof p=="number"?`${p}`:p.replace(/~/g,"~0").replace(/\//g,"~1")}ee.escapeJsonPointer=d;function g(p){return p.replace(/~1/g,"/").replace(/~0/g,"~")}ee.unescapeJsonPointer=g;function w(p,y){if(Array.isArray(p))for(const $ of p)y($);else y(p)}ee.eachItem=w;function _({mergeNames:p,mergeToName:y,mergeValues:$,resultToName:b}){return(N,L,F,H)=>{const M=F===void 0?L:F instanceof e.Name?(L instanceof e.Name?p(N,L,F):y(N,L,F),F):L instanceof e.Name?(y(N,F,L),L):$(L,F);return H===e.Name&&!(M instanceof e.Name)?b(N,M):M}}ee.mergeEvaluated={props:_({mergeNames:(p,y,$)=>p.if((0,e._)`${$} !== true && ${y} !== undefined`,()=>{p.if((0,e._)`${y} === true`,()=>p.assign($,!0),()=>p.assign($,(0,e._)`${$} || {}`).code((0,e._)`Object.assign(${$}, ${y})`))}),mergeToName:(p,y,$)=>p.if((0,e._)`${$} !== true`,()=>{y===!0?p.assign($,!0):(p.assign($,(0,e._)`${$} || {}`),R(p,$,y))}),mergeValues:(p,y)=>p===!0?!0:{...p,...y},resultToName:E}),items:_({mergeNames:(p,y,$)=>p.if((0,e._)`${$} !== true && ${y} !== undefined`,()=>p.assign($,(0,e._)`${y} === true ? true : ${$} > ${y} ? ${$} : ${y}`)),mergeToName:(p,y,$)=>p.if((0,e._)`${$} !== true`,()=>p.assign($,y===!0?!0:(0,e._)`${$} > ${y} ? ${$} : ${y}`)),mergeValues:(p,y)=>p===!0?!0:Math.max(p,y),resultToName:(p,y)=>p.var("items",y)})};function E(p,y){if(y===!0)return p.var("props",!0);const $=p.var("props",(0,e._)`{}`);return y!==void 0&&R(p,$,y),$}ee.evaluatedPropsToName=E;function R(p,y,$){Object.keys($).forEach(b=>p.assign((0,e._)`${y}${(0,e.getProperty)(b)}`,!0))}ee.setEvaluated=R;const u={};function h(p,y){return p.scopeValue("func",{ref:y,code:u[y.code]||(u[y.code]=new t._Code(y.code))})}ee.useFunc=h;var n;(function(p){p[p.Num=0]="Num",p[p.Str=1]="Str"})(n||(ee.Type=n={}));function m(p,y,$){if(p instanceof e.Name){const b=y===n.Num;return $?b?(0,e._)`"[" + ${p} + "]"`:(0,e._)`"['" + ${p} + "']"`:b?(0,e._)`"/" + ${p}`:(0,e._)`"/" + ${p}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,e.getProperty)(p).toString():"/"+d(p)}ee.getErrorPath=m;function v(p,y,$=p.opts.strictSchema){if($){if(y=`strict mode: ${y}`,$===!0)throw new Error(y);p.self.logger.warn(y)}}return ee.checkStrictMode=v,ee}var Ir={},Cc;function He(){if(Cc)return Ir;Cc=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=te(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Ir.default=t,Ir}var Dc;function Nn(){return Dc||(Dc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=te(),l=oe(),i=He();e.keywordError={message:({keyword:u})=>(0,t.str)`must pass "${u}" keyword validation`},e.keyword$DataError={message:({keyword:u,schemaType:h})=>h?(0,t.str)`"${u}" keyword must be ${h} ($data)`:(0,t.str)`"${u}" keyword is invalid ($data)`};function f(u,h=e.keywordError,n,m){const{it:v}=u,{gen:p,compositeRule:y,allErrors:$}=v,b=g(u,h,n);m??(y||$)?o(p,b):c(v,(0,t._)`[${b}]`)}e.reportError=f;function s(u,h=e.keywordError,n){const{it:m}=u,{gen:v,compositeRule:p,allErrors:y}=m,$=g(u,h,n);o(v,$),p||y||c(m,i.default.vErrors)}e.reportExtraError=s;function r(u,h){u.assign(i.default.errors,h),u.if((0,t._)`${i.default.vErrors} !== null`,()=>u.if(h,()=>u.assign((0,t._)`${i.default.vErrors}.length`,h),()=>u.assign(i.default.vErrors,null)))}e.resetErrorsCount=r;function a({gen:u,keyword:h,schemaValue:n,data:m,errsCount:v,it:p}){if(v===void 0)throw new Error("ajv implementation error");const y=u.name("err");u.forRange("i",v,i.default.errors,$=>{u.const(y,(0,t._)`${i.default.vErrors}[${$}]`),u.if((0,t._)`${y}.instancePath === undefined`,()=>u.assign((0,t._)`${y}.instancePath`,(0,t.strConcat)(i.default.instancePath,p.errorPath))),u.assign((0,t._)`${y}.schemaPath`,(0,t.str)`${p.errSchemaPath}/${h}`),p.opts.verbose&&(u.assign((0,t._)`${y}.schema`,n),u.assign((0,t._)`${y}.data`,m))})}e.extendErrors=a;function o(u,h){const n=u.const("err",h);u.if((0,t._)`${i.default.vErrors} === null`,()=>u.assign(i.default.vErrors,(0,t._)`[${n}]`),(0,t._)`${i.default.vErrors}.push(${n})`),u.code((0,t._)`${i.default.errors}++`)}function c(u,h){const{gen:n,validateName:m,schemaEnv:v}=u;v.$async?n.throw((0,t._)`new ${u.ValidationError}(${h})`):(n.assign((0,t._)`${m}.errors`,h),n.return(!1))}const d={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function g(u,h,n){const{createErrors:m}=u.it;return m===!1?(0,t._)`{}`:w(u,h,n)}function w(u,h,n={}){const{gen:m,it:v}=u,p=[_(v,n),E(u,n)];return R(u,h,p),m.object(...p)}function _({errorPath:u},{instancePath:h}){const n=h?(0,t.str)`${u}${(0,l.getErrorPath)(h,l.Type.Str)}`:u;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,n)]}function E({keyword:u,it:{errSchemaPath:h}},{schemaPath:n,parentSchema:m}){let v=m?h:(0,t.str)`${h}/${u}`;return n&&(v=(0,t.str)`${v}${(0,l.getErrorPath)(n,l.Type.Str)}`),[d.schemaPath,v]}function R(u,{params:h,message:n},m){const{keyword:v,data:p,schemaValue:y,it:$}=u,{opts:b,propertyName:N,topSchemaRef:L,schemaPath:F}=$;m.push([d.keyword,v],[d.params,typeof h=="function"?h(u):h||(0,t._)`{}`]),b.messages&&m.push([d.message,typeof n=="function"?n(u):n]),b.verbose&&m.push([d.schema,y],[d.parentSchema,(0,t._)`${L}${F}`],[i.default.data,p]),N&&m.push([d.propertyName,N])}}(Ls)),Ls}var Ac;function wh(){if(Ac)return et;Ac=1,Object.defineProperty(et,"__esModule",{value:!0}),et.boolOrEmptySchema=et.topBoolOrEmptySchema=void 0;const e=Nn(),t=te(),l=He(),i={message:"boolean schema is false"};function f(a){const{gen:o,schema:c,validateName:d}=a;c===!1?r(a,!1):typeof c=="object"&&c.$async===!0?o.return(l.default.data):(o.assign((0,t._)`${d}.errors`,null),o.return(!0))}et.topBoolOrEmptySchema=f;function s(a,o){const{gen:c,schema:d}=a;d===!1?(c.var(o,!1),r(a)):c.var(o,!0)}et.boolOrEmptySchema=s;function r(a,o){const{gen:c,data:d}=a,g={gen:c,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(g,i,void 0,o)}return et}var ye={},tt={},Lc;function ff(){if(Lc)return tt;Lc=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.getRules=tt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function l(f){return typeof f=="string"&&t.has(f)}tt.isJSONType=l;function i(){const f={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...f,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},f.number,f.string,f.array,f.object],post:{rules:[]},all:{},keywords:{}}}return tt.getRules=i,tt}var Ue={},qc;function df(){if(qc)return Ue;qc=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.shouldUseRule=Ue.shouldUseGroup=Ue.schemaHasRulesForType=void 0;function e({schema:i,self:f},s){const r=f.RULES.types[s];return r&&r!==!0&&t(i,r)}Ue.schemaHasRulesForType=e;function t(i,f){return f.rules.some(s=>l(i,s))}Ue.shouldUseGroup=t;function l(i,f){var s;return i[f.keyword]!==void 0||((s=f.definition.implements)===null||s===void 0?void 0:s.some(r=>i[r]!==void 0))}return Ue.shouldUseRule=l,Ue}var kc;function $n(){if(kc)return ye;kc=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.reportTypeError=ye.checkDataTypes=ye.checkDataType=ye.coerceAndCheckDataType=ye.getJSONTypes=ye.getSchemaTypes=ye.DataType=void 0;const e=ff(),t=df(),l=Nn(),i=te(),f=oe();var s;(function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"})(s||(ye.DataType=s={}));function r(n){const m=a(n.type);if(m.includes("null")){if(n.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!m.length&&n.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');n.nullable===!0&&m.push("null")}return m}ye.getSchemaTypes=r;function a(n){const m=Array.isArray(n)?n:n?[n]:[];if(m.every(e.isJSONType))return m;throw new Error("type must be JSONType or JSONType[]: "+m.join(","))}ye.getJSONTypes=a;function o(n,m){const{gen:v,data:p,opts:y}=n,$=d(m,y.coerceTypes),b=m.length>0&&!($.length===0&&m.length===1&&(0,t.schemaHasRulesForType)(n,m[0]));if(b){const N=E(m,p,y.strictNumbers,s.Wrong);v.if(N,()=>{$.length?g(n,m,$):u(n)})}return b}ye.coerceAndCheckDataType=o;const c=new Set(["string","number","integer","boolean","null"]);function d(n,m){return m?n.filter(v=>c.has(v)||m==="array"&&v==="array"):[]}function g(n,m,v){const{gen:p,data:y,opts:$}=n,b=p.let("dataType",(0,i._)`typeof ${y}`),N=p.let("coerced",(0,i._)`undefined`);$.coerceTypes==="array"&&p.if((0,i._)`${b} == 'object' && Array.isArray(${y}) && ${y}.length == 1`,()=>p.assign(y,(0,i._)`${y}[0]`).assign(b,(0,i._)`typeof ${y}`).if(E(m,y,$.strictNumbers),()=>p.assign(N,y))),p.if((0,i._)`${N} !== undefined`);for(const F of v)(c.has(F)||F==="array"&&$.coerceTypes==="array")&&L(F);p.else(),u(n),p.endIf(),p.if((0,i._)`${N} !== undefined`,()=>{p.assign(y,N),w(n,N)});function L(F){switch(F){case"string":p.elseIf((0,i._)`${b} == "number" || ${b} == "boolean"`).assign(N,(0,i._)`"" + ${y}`).elseIf((0,i._)`${y} === null`).assign(N,(0,i._)`""`);return;case"number":p.elseIf((0,i._)`${b} == "boolean" || ${y} === null
|
|
16
|
+
|| (${b} == "string" && ${y} && ${y} == +${y})`).assign(N,(0,i._)`+${y}`);return;case"integer":p.elseIf((0,i._)`${b} === "boolean" || ${y} === null
|
|
17
|
+
|| (${b} === "string" && ${y} && ${y} == +${y} && !(${y} % 1))`).assign(N,(0,i._)`+${y}`);return;case"boolean":p.elseIf((0,i._)`${y} === "false" || ${y} === 0 || ${y} === null`).assign(N,!1).elseIf((0,i._)`${y} === "true" || ${y} === 1`).assign(N,!0);return;case"null":p.elseIf((0,i._)`${y} === "" || ${y} === 0 || ${y} === false`),p.assign(N,null);return;case"array":p.elseIf((0,i._)`${b} === "string" || ${b} === "number"
|
|
18
|
+
|| ${b} === "boolean" || ${y} === null`).assign(N,(0,i._)`[${y}]`)}}}function w({gen:n,parentData:m,parentDataProperty:v},p){n.if((0,i._)`${m} !== undefined`,()=>n.assign((0,i._)`${m}[${v}]`,p))}function _(n,m,v,p=s.Correct){const y=p===s.Correct?i.operators.EQ:i.operators.NEQ;let $;switch(n){case"null":return(0,i._)`${m} ${y} null`;case"array":$=(0,i._)`Array.isArray(${m})`;break;case"object":$=(0,i._)`${m} && typeof ${m} == "object" && !Array.isArray(${m})`;break;case"integer":$=b((0,i._)`!(${m} % 1) && !isNaN(${m})`);break;case"number":$=b();break;default:return(0,i._)`typeof ${m} ${y} ${n}`}return p===s.Correct?$:(0,i.not)($);function b(N=i.nil){return(0,i.and)((0,i._)`typeof ${m} == "number"`,N,v?(0,i._)`isFinite(${m})`:i.nil)}}ye.checkDataType=_;function E(n,m,v,p){if(n.length===1)return _(n[0],m,v,p);let y;const $=(0,f.toHash)(n);if($.array&&$.object){const b=(0,i._)`typeof ${m} != "object"`;y=$.null?b:(0,i._)`!${m} || ${b}`,delete $.null,delete $.array,delete $.object}else y=i.nil;$.number&&delete $.integer;for(const b in $)y=(0,i.and)(y,_(b,m,v,p));return y}ye.checkDataTypes=E;const R={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:m})=>typeof n=="string"?(0,i._)`{type: ${n}}`:(0,i._)`{type: ${m}}`};function u(n){const m=h(n);(0,l.reportError)(m,R)}ye.reportTypeError=u;function h(n){const{gen:m,data:v,schema:p}=n,y=(0,f.schemaRefOrVal)(n,p,"type");return{gen:m,keyword:"type",data:v,schema:p.type,schemaCode:y,schemaValue:y,parentSchema:p,params:{},it:n}}return ye}var vt={},jc;function Sh(){if(jc)return vt;jc=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.assignDefaults=void 0;const e=te(),t=oe();function l(f,s){const{properties:r,items:a}=f.schema;if(s==="object"&&r)for(const o in r)i(f,o,r[o].default);else s==="array"&&Array.isArray(a)&&a.forEach((o,c)=>i(f,c,o.default))}vt.assignDefaults=l;function i(f,s,r){const{gen:a,compositeRule:o,data:c,opts:d}=f;if(r===void 0)return;const g=(0,e._)`${c}${(0,e.getProperty)(s)}`;if(o){(0,t.checkStrictMode)(f,`default is ignored for: ${g}`);return}let w=(0,e._)`${g} === undefined`;d.useDefaults==="empty"&&(w=(0,e._)`${w} || ${g} === null || ${g} === ""`),a.if(w,(0,e._)`${g} = ${(0,e.stringify)(r)}`)}return vt}var Te={},le={},Fc;function De(){if(Fc)return le;Fc=1,Object.defineProperty(le,"__esModule",{value:!0}),le.validateUnion=le.validateArray=le.usePattern=le.callValidateCode=le.schemaProperties=le.allSchemaProperties=le.noPropertyInData=le.propertyInData=le.isOwnProperty=le.hasPropFunc=le.reportMissingProp=le.checkMissingProp=le.checkReportMissingProp=void 0;const e=te(),t=oe(),l=He(),i=oe();function f(n,m){const{gen:v,data:p,it:y}=n;v.if(d(v,p,m,y.opts.ownProperties),()=>{n.setParams({missingProperty:(0,e._)`${m}`},!0),n.error()})}le.checkReportMissingProp=f;function s({gen:n,data:m,it:{opts:v}},p,y){return(0,e.or)(...p.map($=>(0,e.and)(d(n,m,$,v.ownProperties),(0,e._)`${y} = ${$}`)))}le.checkMissingProp=s;function r(n,m){n.setParams({missingProperty:m},!0),n.error()}le.reportMissingProp=r;function a(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}le.hasPropFunc=a;function o(n,m,v){return(0,e._)`${a(n)}.call(${m}, ${v})`}le.isOwnProperty=o;function c(n,m,v,p){const y=(0,e._)`${m}${(0,e.getProperty)(v)} !== undefined`;return p?(0,e._)`${y} && ${o(n,m,v)}`:y}le.propertyInData=c;function d(n,m,v,p){const y=(0,e._)`${m}${(0,e.getProperty)(v)} === undefined`;return p?(0,e.or)(y,(0,e.not)(o(n,m,v))):y}le.noPropertyInData=d;function g(n){return n?Object.keys(n).filter(m=>m!=="__proto__"):[]}le.allSchemaProperties=g;function w(n,m){return g(m).filter(v=>!(0,t.alwaysValidSchema)(n,m[v]))}le.schemaProperties=w;function _({schemaCode:n,data:m,it:{gen:v,topSchemaRef:p,schemaPath:y,errorPath:$},it:b},N,L,F){const H=F?(0,e._)`${n}, ${m}, ${p}${y}`:m,M=[[l.default.instancePath,(0,e.strConcat)(l.default.instancePath,$)],[l.default.parentData,b.parentData],[l.default.parentDataProperty,b.parentDataProperty],[l.default.rootData,l.default.rootData]];b.opts.dynamicRef&&M.push([l.default.dynamicAnchors,l.default.dynamicAnchors]);const V=(0,e._)`${H}, ${v.object(...M)}`;return L!==e.nil?(0,e._)`${N}.call(${L}, ${V})`:(0,e._)`${N}(${V})`}le.callValidateCode=_;const E=(0,e._)`new RegExp`;function R({gen:n,it:{opts:m}},v){const p=m.unicodeRegExp?"u":"",{regExp:y}=m.code,$=y(v,p);return n.scopeValue("pattern",{key:$.toString(),ref:$,code:(0,e._)`${y.code==="new RegExp"?E:(0,i.useFunc)(n,y)}(${v}, ${p})`})}le.usePattern=R;function u(n){const{gen:m,data:v,keyword:p,it:y}=n,$=m.name("valid");if(y.allErrors){const N=m.let("valid",!0);return b(()=>m.assign(N,!1)),N}return m.var($,!0),b(()=>m.break()),$;function b(N){const L=m.const("len",(0,e._)`${v}.length`);m.forRange("i",0,L,F=>{n.subschema({keyword:p,dataProp:F,dataPropType:t.Type.Num},$),m.if((0,e.not)($),N)})}}le.validateArray=u;function h(n){const{gen:m,schema:v,keyword:p,it:y}=n;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(L=>(0,t.alwaysValidSchema)(y,L))&&!y.opts.unevaluated)return;const b=m.let("valid",!1),N=m.name("_valid");m.block(()=>v.forEach((L,F)=>{const H=n.subschema({keyword:p,schemaProp:F,compositeRule:!0},N);m.assign(b,(0,e._)`${b} || ${N}`),n.mergeValidEvaluated(H,N)||m.if((0,e.not)(b))})),n.result(b,()=>n.reset(),()=>n.error(!0))}return le.validateUnion=h,le}var Mc;function Rh(){if(Mc)return Te;Mc=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.validateKeywordUsage=Te.validSchemaType=Te.funcKeywordCode=Te.macroKeywordCode=void 0;const e=te(),t=He(),l=De(),i=Nn();function f(w,_){const{gen:E,keyword:R,schema:u,parentSchema:h,it:n}=w,m=_.macro.call(n.self,u,h,n),v=c(E,R,m);n.opts.validateSchema!==!1&&n.self.validateSchema(m,!0);const p=E.name("valid");w.subschema({schema:m,schemaPath:e.nil,errSchemaPath:`${n.errSchemaPath}/${R}`,topSchemaRef:v,compositeRule:!0},p),w.pass(p,()=>w.error(!0))}Te.macroKeywordCode=f;function s(w,_){var E;const{gen:R,keyword:u,schema:h,parentSchema:n,$data:m,it:v}=w;o(v,_);const p=!m&&_.compile?_.compile.call(v.self,h,n,v):_.validate,y=c(R,u,p),$=R.let("valid");w.block$data($,b),w.ok((E=_.valid)!==null&&E!==void 0?E:$);function b(){if(_.errors===!1)F(),_.modifying&&r(w),H(()=>w.error());else{const M=_.async?N():L();_.modifying&&r(w),H(()=>a(w,M))}}function N(){const M=R.let("ruleErrs",null);return R.try(()=>F((0,e._)`await `),V=>R.assign($,!1).if((0,e._)`${V} instanceof ${v.ValidationError}`,()=>R.assign(M,(0,e._)`${V}.errors`),()=>R.throw(V))),M}function L(){const M=(0,e._)`${y}.errors`;return R.assign(M,null),F(e.nil),M}function F(M=_.async?(0,e._)`await `:e.nil){const V=v.opts.passContext?t.default.this:t.default.self,z=!("compile"in _&&!m||_.schema===!1);R.assign($,(0,e._)`${M}${(0,l.callValidateCode)(w,y,V,z)}`,_.modifying)}function H(M){var V;R.if((0,e.not)((V=_.valid)!==null&&V!==void 0?V:$),M)}}Te.funcKeywordCode=s;function r(w){const{gen:_,data:E,it:R}=w;_.if(R.parentData,()=>_.assign(E,(0,e._)`${R.parentData}[${R.parentDataProperty}]`))}function a(w,_){const{gen:E}=w;E.if((0,e._)`Array.isArray(${_})`,()=>{E.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(w)},()=>w.error())}function o({schemaEnv:w},_){if(_.async&&!w.$async)throw new Error("async keyword in sync schema")}function c(w,_,E){if(E===void 0)throw new Error(`keyword "${_}" failed to compile`);return w.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(w,_,E=!1){return!_.length||_.some(R=>R==="array"?Array.isArray(w):R==="object"?w&&typeof w=="object"&&!Array.isArray(w):typeof w==R||E&&typeof w>"u")}Te.validSchemaType=d;function g({schema:w,opts:_,self:E,errSchemaPath:R},u,h){if(Array.isArray(u.keyword)?!u.keyword.includes(h):u.keyword!==h)throw new Error("ajv implementation error");const n=u.dependencies;if(n?.some(m=>!Object.prototype.hasOwnProperty.call(w,m)))throw new Error(`parent schema must have dependencies of ${h}: ${n.join(",")}`);if(u.validateSchema&&!u.validateSchema(w[h])){const v=`keyword "${h}" value is invalid at path "${R}": `+E.errorsText(u.validateSchema.errors);if(_.validateSchema==="log")E.logger.error(v);else throw new Error(v)}}return Te.validateKeywordUsage=g,Te}var Ve={},Uc;function bh(){if(Uc)return Ve;Uc=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.extendSubschemaMode=Ve.extendSubschemaData=Ve.getSubschema=void 0;const e=te(),t=oe();function l(s,{keyword:r,schemaProp:a,schema:o,schemaPath:c,errSchemaPath:d,topSchemaRef:g}){if(r!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(r!==void 0){const w=s.schema[r];return a===void 0?{schema:w,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(r)}`,errSchemaPath:`${s.errSchemaPath}/${r}`}:{schema:w[a],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(r)}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${r}/${(0,t.escapeFragment)(a)}`}}if(o!==void 0){if(c===void 0||d===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:c,topSchemaRef:g,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}Ve.getSubschema=l;function i(s,r,{dataProp:a,dataPropType:o,data:c,dataTypes:d,propertyName:g}){if(c!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:w}=r;if(a!==void 0){const{errorPath:E,dataPathArr:R,opts:u}=r,h=w.let("data",(0,e._)`${r.data}${(0,e.getProperty)(a)}`,!0);_(h),s.errorPath=(0,e.str)`${E}${(0,t.getErrorPath)(a,o,u.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${a}`,s.dataPathArr=[...R,s.parentDataProperty]}if(c!==void 0){const E=c instanceof e.Name?c:w.let("data",c,!0);_(E),g!==void 0&&(s.propertyName=g)}d&&(s.dataTypes=d);function _(E){s.data=E,s.dataLevel=r.dataLevel+1,s.dataTypes=[],r.definedProperties=new Set,s.parentData=r.data,s.dataNames=[...r.dataNames,E]}}Ve.extendSubschemaData=i;function f(s,{jtdDiscriminator:r,jtdMetadata:a,compositeRule:o,createErrors:c,allErrors:d}){o!==void 0&&(s.compositeRule=o),c!==void 0&&(s.createErrors=c),d!==void 0&&(s.allErrors=d),s.jtdDiscriminator=r,s.jtdMetadata=a}return Ve.extendSubschemaMode=f,Ve}var ge={},Fs={exports:{}},Vc;function Ph(){if(Vc)return Fs.exports;Vc=1;var e=Fs.exports=function(i,f,s){typeof f=="function"&&(s=f,f={}),s=f.cb||s;var r=typeof s=="function"?s:s.pre||function(){},a=s.post||function(){};t(f,r,a,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,f,s,r,a,o,c,d,g,w){if(r&&typeof r=="object"&&!Array.isArray(r)){f(r,a,o,c,d,g,w);for(var _ in r){var E=r[_];if(Array.isArray(E)){if(_ in e.arrayKeywords)for(var R=0;R<E.length;R++)t(i,f,s,E[R],a+"/"+_+"/"+R,o,a,_,r,R)}else if(_ in e.propsKeywords){if(E&&typeof E=="object")for(var u in E)t(i,f,s,E[u],a+"/"+_+"/"+l(u),o,a,_,r,u)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,f,s,E,a+"/"+_,o,a,_,r)}s(r,a,o,c,d,g,w)}}function l(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return Fs.exports}var zc;function On(){if(zc)return ge;zc=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.getSchemaRefs=ge.resolveUrl=ge.normalizeId=ge._getFullPath=ge.getFullPath=ge.inlineRef=void 0;const e=oe(),t=Sn(),l=Ph(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function f(R,u=!0){return typeof R=="boolean"?!0:u===!0?!r(R):u?a(R)<=u:!1}ge.inlineRef=f;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function r(R){for(const u in R){if(s.has(u))return!0;const h=R[u];if(Array.isArray(h)&&h.some(r)||typeof h=="object"&&r(h))return!0}return!1}function a(R){let u=0;for(const h in R){if(h==="$ref")return 1/0;if(u++,!i.has(h)&&(typeof R[h]=="object"&&(0,e.eachItem)(R[h],n=>u+=a(n)),u===1/0))return 1/0}return u}function o(R,u="",h){h!==!1&&(u=g(u));const n=R.parse(u);return c(R,n)}ge.getFullPath=o;function c(R,u){return R.serialize(u).split("#")[0]+"#"}ge._getFullPath=c;const d=/#\/?$/;function g(R){return R?R.replace(d,""):""}ge.normalizeId=g;function w(R,u,h){return h=g(h),R.resolve(u,h)}ge.resolveUrl=w;const _=/^[a-z_][-a-z0-9._]*$/i;function E(R,u){if(typeof R=="boolean")return{};const{schemaId:h,uriResolver:n}=this.opts,m=g(R[h]||u),v={"":m},p=o(n,m,!1),y={},$=new Set;return l(R,{allKeys:!0},(L,F,H,M)=>{if(M===void 0)return;const V=p+F;let z=v[M];typeof L[h]=="string"&&(z=J.call(this,L[h])),W.call(this,L.$anchor),W.call(this,L.$dynamicAnchor),v[F]=z;function J(j){const G=this.opts.uriResolver.resolve;if(j=g(z?G(z,j):j),$.has(j))throw N(j);$.add(j);let D=this.refs[j];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?b(L,D.schema,j):j!==g(V)&&(j[0]==="#"?(b(L,y[j],j),y[j]=L):this.refs[j]=V),j}function W(j){if(typeof j=="string"){if(!_.test(j))throw new Error(`invalid anchor "${j}"`);J.call(this,`#${j}`)}}}),y;function b(L,F,H){if(F!==void 0&&!t(L,F))throw N(H)}function N(L){return new Error(`reference "${L}" resolves to more than one schema`)}}return ge.getSchemaRefs=E,ge}var Gc;function In(){if(Gc)return Me;Gc=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.getData=Me.KeywordCxt=Me.validateFunctionCode=void 0;const e=wh(),t=$n(),l=df(),i=$n(),f=Sh(),s=Rh(),r=bh(),a=te(),o=He(),c=On(),d=oe(),g=Nn();function w(I){if(p(I)&&($(I),v(I))){u(I);return}_(I,()=>(0,e.topBoolOrEmptySchema)(I))}Me.validateFunctionCode=w;function _({gen:I,validateName:C,schema:k,schemaEnv:U,opts:x},Y){x.code.es5?I.func(C,(0,a._)`${o.default.data}, ${o.default.valCxt}`,U.$async,()=>{I.code((0,a._)`"use strict"; ${n(k,x)}`),R(I,x),I.code(Y)}):I.func(C,(0,a._)`${o.default.data}, ${E(x)}`,U.$async,()=>I.code(n(k,x)).code(Y))}function E(I){return(0,a._)`{${o.default.instancePath}="", ${o.default.parentData}, ${o.default.parentDataProperty}, ${o.default.rootData}=${o.default.data}${I.dynamicRef?(0,a._)`, ${o.default.dynamicAnchors}={}`:a.nil}}={}`}function R(I,C){I.if(o.default.valCxt,()=>{I.var(o.default.instancePath,(0,a._)`${o.default.valCxt}.${o.default.instancePath}`),I.var(o.default.parentData,(0,a._)`${o.default.valCxt}.${o.default.parentData}`),I.var(o.default.parentDataProperty,(0,a._)`${o.default.valCxt}.${o.default.parentDataProperty}`),I.var(o.default.rootData,(0,a._)`${o.default.valCxt}.${o.default.rootData}`),C.dynamicRef&&I.var(o.default.dynamicAnchors,(0,a._)`${o.default.valCxt}.${o.default.dynamicAnchors}`)},()=>{I.var(o.default.instancePath,(0,a._)`""`),I.var(o.default.parentData,(0,a._)`undefined`),I.var(o.default.parentDataProperty,(0,a._)`undefined`),I.var(o.default.rootData,o.default.data),C.dynamicRef&&I.var(o.default.dynamicAnchors,(0,a._)`{}`)})}function u(I){const{schema:C,opts:k,gen:U}=I;_(I,()=>{k.$comment&&C.$comment&&M(I),L(I),U.let(o.default.vErrors,null),U.let(o.default.errors,0),k.unevaluated&&h(I),b(I),V(I)})}function h(I){const{gen:C,validateName:k}=I;I.evaluated=C.const("evaluated",(0,a._)`${k}.evaluated`),C.if((0,a._)`${I.evaluated}.dynamicProps`,()=>C.assign((0,a._)`${I.evaluated}.props`,(0,a._)`undefined`)),C.if((0,a._)`${I.evaluated}.dynamicItems`,()=>C.assign((0,a._)`${I.evaluated}.items`,(0,a._)`undefined`))}function n(I,C){const k=typeof I=="object"&&I[C.schemaId];return k&&(C.code.source||C.code.process)?(0,a._)`/*# sourceURL=${k} */`:a.nil}function m(I,C){if(p(I)&&($(I),v(I))){y(I,C);return}(0,e.boolOrEmptySchema)(I,C)}function v({schema:I,self:C}){if(typeof I=="boolean")return!I;for(const k in I)if(C.RULES.all[k])return!0;return!1}function p(I){return typeof I.schema!="boolean"}function y(I,C){const{schema:k,gen:U,opts:x}=I;x.$comment&&k.$comment&&M(I),F(I),H(I);const Y=U.const("_errs",o.default.errors);b(I,Y),U.var(C,(0,a._)`${Y} === ${o.default.errors}`)}function $(I){(0,d.checkUnknownRules)(I),N(I)}function b(I,C){if(I.opts.jtd)return J(I,[],!1,C);const k=(0,t.getSchemaTypes)(I.schema),U=(0,t.coerceAndCheckDataType)(I,k);J(I,k,!U,C)}function N(I){const{schema:C,errSchemaPath:k,opts:U,self:x}=I;C.$ref&&U.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(C,x.RULES)&&x.logger.warn(`$ref: keywords ignored in schema at path "${k}"`)}function L(I){const{schema:C,opts:k}=I;C.default!==void 0&&k.useDefaults&&k.strictSchema&&(0,d.checkStrictMode)(I,"default is ignored in the schema root")}function F(I){const C=I.schema[I.opts.schemaId];C&&(I.baseId=(0,c.resolveUrl)(I.opts.uriResolver,I.baseId,C))}function H(I){if(I.schema.$async&&!I.schemaEnv.$async)throw new Error("async schema in sync schema")}function M({gen:I,schemaEnv:C,schema:k,errSchemaPath:U,opts:x}){const Y=k.$comment;if(x.$comment===!0)I.code((0,a._)`${o.default.self}.logger.log(${Y})`);else if(typeof x.$comment=="function"){const ne=(0,a.str)`${U}/$comment`,he=I.scopeValue("root",{ref:C.root});I.code((0,a._)`${o.default.self}.opts.$comment(${Y}, ${ne}, ${he}.schema)`)}}function V(I){const{gen:C,schemaEnv:k,validateName:U,ValidationError:x,opts:Y}=I;k.$async?C.if((0,a._)`${o.default.errors} === 0`,()=>C.return(o.default.data),()=>C.throw((0,a._)`new ${x}(${o.default.vErrors})`)):(C.assign((0,a._)`${U}.errors`,o.default.vErrors),Y.unevaluated&&z(I),C.return((0,a._)`${o.default.errors} === 0`))}function z({gen:I,evaluated:C,props:k,items:U}){k instanceof a.Name&&I.assign((0,a._)`${C}.props`,k),U instanceof a.Name&&I.assign((0,a._)`${C}.items`,U)}function J(I,C,k,U){const{gen:x,schema:Y,data:ne,allErrors:he,opts:ae,self:ce}=I,{RULES:se}=ce;if(Y.$ref&&(ae.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(Y,se))){x.block(()=>K(I,"$ref",se.all.$ref.definition));return}ae.jtd||j(I,C),x.block(()=>{for(const de of se.rules)we(de);we(se.post)});function we(de){(0,l.shouldUseGroup)(Y,de)&&(de.type?(x.if((0,i.checkDataType)(de.type,ne,ae.strictNumbers)),W(I,de),C.length===1&&C[0]===de.type&&k&&(x.else(),(0,i.reportTypeError)(I)),x.endIf()):W(I,de),he||x.if((0,a._)`${o.default.errors} === ${U||0}`))}}function W(I,C){const{gen:k,schema:U,opts:{useDefaults:x}}=I;x&&(0,f.assignDefaults)(I,C.type),k.block(()=>{for(const Y of C.rules)(0,l.shouldUseRule)(U,Y)&&K(I,Y.keyword,Y.definition,C.type)})}function j(I,C){I.schemaEnv.meta||!I.opts.strictTypes||(G(I,C),I.opts.allowUnionTypes||D(I,C),O(I,I.dataTypes))}function G(I,C){if(C.length){if(!I.dataTypes.length){I.dataTypes=C;return}C.forEach(k=>{T(I.dataTypes,k)||P(I,`type "${k}" not allowed by context "${I.dataTypes.join(",")}"`)}),S(I,C)}}function D(I,C){C.length>1&&!(C.length===2&&C.includes("null"))&&P(I,"use allowUnionTypes to allow union type keyword")}function O(I,C){const k=I.self.RULES.all;for(const U in k){const x=k[U];if(typeof x=="object"&&(0,l.shouldUseRule)(I.schema,x)){const{type:Y}=x.definition;Y.length&&!Y.some(ne=>q(C,ne))&&P(I,`missing type "${Y.join(",")}" for keyword "${U}"`)}}}function q(I,C){return I.includes(C)||C==="number"&&I.includes("integer")}function T(I,C){return I.includes(C)||C==="integer"&&I.includes("number")}function S(I,C){const k=[];for(const U of I.dataTypes)T(C,U)?k.push(U):C.includes("integer")&&U==="number"&&k.push("integer");I.dataTypes=k}function P(I,C){const k=I.schemaEnv.baseId+I.errSchemaPath;C+=` at "${k}" (strictTypes)`,(0,d.checkStrictMode)(I,C,I.opts.strictTypes)}class A{constructor(C,k,U){if((0,s.validateKeywordUsage)(C,k,U),this.gen=C.gen,this.allErrors=C.allErrors,this.keyword=U,this.data=C.data,this.schema=C.schema[U],this.$data=k.$data&&C.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(C,this.schema,U,this.$data),this.schemaType=k.schemaType,this.parentSchema=C.schema,this.params={},this.it=C,this.def=k,this.$data)this.schemaCode=C.gen.const("vSchema",Z(this.$data,C));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,k.schemaType,k.allowUndefined))throw new Error(`${U} value must be ${JSON.stringify(k.schemaType)}`);("code"in k?k.trackErrors:k.errors!==!1)&&(this.errsCount=C.gen.const("_errs",o.default.errors))}result(C,k,U){this.failResult((0,a.not)(C),k,U)}failResult(C,k,U){this.gen.if(C),U?U():this.error(),k?(this.gen.else(),k(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(C,k){this.failResult((0,a.not)(C),void 0,k)}fail(C){if(C===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(C),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(C){if(!this.$data)return this.fail(C);const{schemaCode:k}=this;this.fail((0,a._)`${k} !== undefined && (${(0,a.or)(this.invalid$data(),C)})`)}error(C,k,U){if(k){this.setParams(k),this._error(C,U),this.setParams({});return}this._error(C,U)}_error(C,k){(C?g.reportExtraError:g.reportError)(this,this.def.error,k)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(C){this.allErrors||this.gen.if(C)}setParams(C,k){k?Object.assign(this.params,C):this.params=C}block$data(C,k,U=a.nil){this.gen.block(()=>{this.check$data(C,U),k()})}check$data(C=a.nil,k=a.nil){if(!this.$data)return;const{gen:U,schemaCode:x,schemaType:Y,def:ne}=this;U.if((0,a.or)((0,a._)`${x} === undefined`,k)),C!==a.nil&&U.assign(C,!0),(Y.length||ne.validateSchema)&&(U.elseIf(this.invalid$data()),this.$dataError(),C!==a.nil&&U.assign(C,!1)),U.else()}invalid$data(){const{gen:C,schemaCode:k,schemaType:U,def:x,it:Y}=this;return(0,a.or)(ne(),he());function ne(){if(U.length){if(!(k instanceof a.Name))throw new Error("ajv implementation error");const ae=Array.isArray(U)?U:[U];return(0,a._)`${(0,i.checkDataTypes)(ae,k,Y.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function he(){if(x.validateSchema){const ae=C.scopeValue("validate$data",{ref:x.validateSchema});return(0,a._)`!${ae}(${k})`}return a.nil}}subschema(C,k){const U=(0,r.getSubschema)(this.it,C);(0,r.extendSubschemaData)(U,this.it,C),(0,r.extendSubschemaMode)(U,C);const x={...this.it,...U,items:void 0,props:void 0};return m(x,k),x}mergeEvaluated(C,k){const{it:U,gen:x}=this;U.opts.unevaluated&&(U.props!==!0&&C.props!==void 0&&(U.props=d.mergeEvaluated.props(x,C.props,U.props,k)),U.items!==!0&&C.items!==void 0&&(U.items=d.mergeEvaluated.items(x,C.items,U.items,k)))}mergeValidEvaluated(C,k){const{it:U,gen:x}=this;if(U.opts.unevaluated&&(U.props!==!0||U.items!==!0))return x.if(k,()=>this.mergeEvaluated(C,a.Name)),!0}}Me.KeywordCxt=A;function K(I,C,k,U){const x=new A(I,k,C);"code"in k?k.code(x,U):x.$data&&k.validate?(0,s.funcKeywordCode)(x,k):"macro"in k?(0,s.macroKeywordCode)(x,k):(k.compile||k.validate)&&(0,s.funcKeywordCode)(x,k)}const B=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(I,{dataLevel:C,dataNames:k,dataPathArr:U}){let x,Y;if(I==="")return o.default.rootData;if(I[0]==="/"){if(!B.test(I))throw new Error(`Invalid JSON-pointer: ${I}`);x=I,Y=o.default.rootData}else{const ce=X.exec(I);if(!ce)throw new Error(`Invalid JSON-pointer: ${I}`);const se=+ce[1];if(x=ce[2],x==="#"){if(se>=C)throw new Error(ae("property/index",se));return U[C-se]}if(se>C)throw new Error(ae("data",se));if(Y=k[C-se],!x)return Y}let ne=Y;const he=x.split("/");for(const ce of he)ce&&(Y=(0,a._)`${Y}${(0,a.getProperty)((0,d.unescapeJsonPointer)(ce))}`,ne=(0,a._)`${ne} && ${Y}`);return ne;function ae(ce,se){return`Cannot access ${ce} ${se} levels up, current level is ${C}`}}return Me.getData=Z,Me}var Tr={},Kc;function Qi(){if(Kc)return Tr;Kc=1,Object.defineProperty(Tr,"__esModule",{value:!0});class e extends Error{constructor(l){super("validation failed"),this.errors=l,this.ajv=this.validation=!0}}return Tr.default=e,Tr}var Cr={},Hc;function Tn(){if(Hc)return Cr;Hc=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=On();class t extends Error{constructor(i,f,s,r){super(r||`can't resolve reference ${s} from id ${f}`),this.missingRef=(0,e.resolveUrl)(i,f,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return Cr.default=t,Cr}var Re={},xc;function eo(){if(xc)return Re;xc=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.resolveSchema=Re.getCompilingSchema=Re.resolveRef=Re.compileSchema=Re.SchemaEnv=void 0;const e=te(),t=Qi(),l=He(),i=On(),f=oe(),s=In();class r{constructor(h){var n;this.refs={},this.dynamicAnchors={};let m;typeof h.schema=="object"&&(m=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(n=h.baseId)!==null&&n!==void 0?n:(0,i.normalizeId)(m?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=m?.$async,this.refs={}}}Re.SchemaEnv=r;function a(u){const h=d.call(this,u);if(h)return h;const n=(0,i.getFullPath)(this.opts.uriResolver,u.root.baseId),{es5:m,lines:v}=this.opts.code,{ownProperties:p}=this.opts,y=new e.CodeGen(this.scope,{es5:m,lines:v,ownProperties:p});let $;u.$async&&($=y.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const b=y.scopeName("validate");u.validateName=b;const N={gen:y,allErrors:this.opts.allErrors,data:l.default.data,parentData:l.default.parentData,parentDataProperty:l.default.parentDataProperty,dataNames:[l.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:y.scopeValue("schema",this.opts.code.source===!0?{ref:u.schema,code:(0,e.stringify)(u.schema)}:{ref:u.schema}),validateName:b,ValidationError:$,schema:u.schema,schemaEnv:u,rootId:n,baseId:u.baseId||n,schemaPath:e.nil,errSchemaPath:u.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let L;try{this._compilations.add(u),(0,s.validateFunctionCode)(N),y.optimize(this.opts.code.optimize);const F=y.toString();L=`${y.scopeRefs(l.default.scope)}return ${F}`,this.opts.code.process&&(L=this.opts.code.process(L,u));const M=new Function(`${l.default.self}`,`${l.default.scope}`,L)(this,this.scope.get());if(this.scope.value(b,{ref:M}),M.errors=null,M.schema=u.schema,M.schemaEnv=u,u.$async&&(M.$async=!0),this.opts.code.source===!0&&(M.source={validateName:b,validateCode:F,scopeValues:y._values}),this.opts.unevaluated){const{props:V,items:z}=N;M.evaluated={props:V instanceof e.Name?void 0:V,items:z instanceof e.Name?void 0:z,dynamicProps:V instanceof e.Name,dynamicItems:z instanceof e.Name},M.source&&(M.source.evaluated=(0,e.stringify)(M.evaluated))}return u.validate=M,u}catch(F){throw delete u.validate,delete u.validateName,L&&this.logger.error("Error compiling schema, function code:",L),F}finally{this._compilations.delete(u)}}Re.compileSchema=a;function o(u,h,n){var m;n=(0,i.resolveUrl)(this.opts.uriResolver,h,n);const v=u.refs[n];if(v)return v;let p=w.call(this,u,n);if(p===void 0){const y=(m=u.localRefs)===null||m===void 0?void 0:m[n],{schemaId:$}=this.opts;y&&(p=new r({schema:y,schemaId:$,root:u,baseId:h}))}if(p!==void 0)return u.refs[n]=c.call(this,p)}Re.resolveRef=o;function c(u){return(0,i.inlineRef)(u.schema,this.opts.inlineRefs)?u.schema:u.validate?u:a.call(this,u)}function d(u){for(const h of this._compilations)if(g(h,u))return h}Re.getCompilingSchema=d;function g(u,h){return u.schema===h.schema&&u.root===h.root&&u.baseId===h.baseId}function w(u,h){let n;for(;typeof(n=this.refs[h])=="string";)h=n;return n||this.schemas[h]||_.call(this,u,h)}function _(u,h){const n=this.opts.uriResolver.parse(h),m=(0,i._getFullPath)(this.opts.uriResolver,n);let v=(0,i.getFullPath)(this.opts.uriResolver,u.baseId,void 0);if(Object.keys(u.schema).length>0&&m===v)return R.call(this,n,u);const p=(0,i.normalizeId)(m),y=this.refs[p]||this.schemas[p];if(typeof y=="string"){const $=_.call(this,u,y);return typeof $?.schema!="object"?void 0:R.call(this,n,$)}if(typeof y?.schema=="object"){if(y.validate||a.call(this,y),p===(0,i.normalizeId)(h)){const{schema:$}=y,{schemaId:b}=this.opts,N=$[b];return N&&(v=(0,i.resolveUrl)(this.opts.uriResolver,v,N)),new r({schema:$,schemaId:b,root:u,baseId:v})}return R.call(this,n,y)}}Re.resolveSchema=_;const E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function R(u,{baseId:h,schema:n,root:m}){var v;if(((v=u.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const $ of u.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const b=n[(0,f.unescapeFragment)($)];if(b===void 0)return;n=b;const N=typeof n=="object"&&n[this.opts.schemaId];!E.has($)&&N&&(h=(0,i.resolveUrl)(this.opts.uriResolver,h,N))}let p;if(typeof n!="boolean"&&n.$ref&&!(0,f.schemaHasRulesButRef)(n,this.RULES)){const $=(0,i.resolveUrl)(this.opts.uriResolver,h,n.$ref);p=_.call(this,m,$)}const{schemaId:y}=this.opts;if(p=p||new r({schema:n,schemaId:y,root:m,baseId:h}),p.schema!==p.root.schema)return p}return Re}const Nh="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Oh="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ih="object",Th=["$data"],Ch={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Dh=!1,Ah={$id:Nh,description:Oh,type:Ih,required:Th,properties:Ch,additionalProperties:Dh};var Dr={},Bc;function Lh(){if(Bc)return Dr;Bc=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=af();return e.code='require("ajv/dist/runtime/uri").default',Dr.default=e,Dr}var Wc;function qh(){return Wc||(Wc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=In();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var l=te();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});const i=Qi(),f=Tn(),s=ff(),r=eo(),a=te(),o=On(),c=$n(),d=oe(),g=Ah,w=Lh(),_=(D,O)=>new RegExp(D,O);_.code="new RegExp";const E=["removeAdditional","useDefaults","coerceTypes"],R=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),u={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."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},n=200;function m(D){var O,q,T,S,P,A,K,B,X,Z,I,C,k,U,x,Y,ne,he,ae,ce,se,we,de,xe,Be;const Ne=D.strict,We=(O=D.code)===null||O===void 0?void 0:O.optimize,dt=We===!0||We===void 0?1:We||0,ht=(T=(q=D.code)===null||q===void 0?void 0:q.regExp)!==null&&T!==void 0?T:_,jn=(S=D.uriResolver)!==null&&S!==void 0?S:w.default;return{strictSchema:(A=(P=D.strictSchema)!==null&&P!==void 0?P:Ne)!==null&&A!==void 0?A:!0,strictNumbers:(B=(K=D.strictNumbers)!==null&&K!==void 0?K:Ne)!==null&&B!==void 0?B:!0,strictTypes:(Z=(X=D.strictTypes)!==null&&X!==void 0?X:Ne)!==null&&Z!==void 0?Z:"log",strictTuples:(C=(I=D.strictTuples)!==null&&I!==void 0?I:Ne)!==null&&C!==void 0?C:"log",strictRequired:(U=(k=D.strictRequired)!==null&&k!==void 0?k:Ne)!==null&&U!==void 0?U:!1,code:D.code?{...D.code,optimize:dt,regExp:ht}:{optimize:dt,regExp:ht},loopRequired:(x=D.loopRequired)!==null&&x!==void 0?x:n,loopEnum:(Y=D.loopEnum)!==null&&Y!==void 0?Y:n,meta:(ne=D.meta)!==null&&ne!==void 0?ne:!0,messages:(he=D.messages)!==null&&he!==void 0?he:!0,inlineRefs:(ae=D.inlineRefs)!==null&&ae!==void 0?ae:!0,schemaId:(ce=D.schemaId)!==null&&ce!==void 0?ce:"$id",addUsedSchema:(se=D.addUsedSchema)!==null&&se!==void 0?se:!0,validateSchema:(we=D.validateSchema)!==null&&we!==void 0?we:!0,validateFormats:(de=D.validateFormats)!==null&&de!==void 0?de:!0,unicodeRegExp:(xe=D.unicodeRegExp)!==null&&xe!==void 0?xe:!0,int32range:(Be=D.int32range)!==null&&Be!==void 0?Be:!0,uriResolver:jn}}class v{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...m(O)};const{es5:q,lines:T}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:R,es5:q,lines:T}),this.logger=H(O.logger);const S=O.validateFormats;O.validateFormats=!1,this.RULES=(0,s.getRules)(),p.call(this,u,O,"NOT SUPPORTED"),p.call(this,h,O,"DEPRECATED","warn"),this._metaOpts=L.call(this),O.formats&&b.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&N.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),$.call(this),O.validateFormats=S}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:q,schemaId:T}=this.opts;let S=g;T==="id"&&(S={...g},S.id=S.$id,delete S.$id),q&&O&&this.addMetaSchema(S,S[T],!1)}defaultMeta(){const{meta:O,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[q]||O:void 0}validate(O,q){let T;if(typeof O=="string"){if(T=this.getSchema(O),!T)throw new Error(`no schema with key or ref "${O}"`)}else T=this.compile(O);const S=T(q);return"$async"in T||(this.errors=T.errors),S}compile(O,q){const T=this._addSchema(O,q);return T.validate||this._compileSchemaEnv(T)}compileAsync(O,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return S.call(this,O,q);async function S(Z,I){await P.call(this,Z.$schema);const C=this._addSchema(Z,I);return C.validate||A.call(this,C)}async function P(Z){Z&&!this.getSchema(Z)&&await S.call(this,{$ref:Z},!0)}async function A(Z){try{return this._compileSchemaEnv(Z)}catch(I){if(!(I instanceof f.default))throw I;return K.call(this,I),await B.call(this,I.missingSchema),A.call(this,Z)}}function K({missingSchema:Z,missingRef:I}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${I} cannot be resolved`)}async function B(Z){const I=await X.call(this,Z);this.refs[Z]||await P.call(this,I.$schema),this.refs[Z]||this.addSchema(I,Z,q)}async function X(Z){const I=this._loading[Z];if(I)return I;try{return await(this._loading[Z]=T(Z))}finally{delete this._loading[Z]}}}addSchema(O,q,T,S=this.opts.validateSchema){if(Array.isArray(O)){for(const A of O)this.addSchema(A,void 0,T,S);return this}let P;if(typeof O=="object"){const{schemaId:A}=this.opts;if(P=O[A],P!==void 0&&typeof P!="string")throw new Error(`schema ${A} must be string`)}return q=(0,o.normalizeId)(q||P),this._checkUnique(q),this.schemas[q]=this._addSchema(O,T,q,S,!0),this}addMetaSchema(O,q,T=this.opts.validateSchema){return this.addSchema(O,q,!0,T),this}validateSchema(O,q){if(typeof O=="boolean")return!0;let T;if(T=O.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const S=this.validate(T,O);if(!S&&q){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return S}getSchema(O){let q;for(;typeof(q=y.call(this,O))=="string";)O=q;if(q===void 0){const{schemaId:T}=this.opts,S=new r.SchemaEnv({schema:{},schemaId:T});if(q=r.resolveSchema.call(this,S,O),!q)return;this.refs[O]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=y.call(this,O);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const q=O;this._cache.delete(q);let T=O[this.opts.schemaId];return T&&(T=(0,o.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const q of O)this.addKeyword(q);return this}addKeyword(O,q){let T;if(typeof O=="string")T=O,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=T);else if(typeof O=="object"&&q===void 0){if(q=O,T=q.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(V.call(this,T,q),!q)return(0,d.eachItem)(T,P=>z.call(this,P)),this;W.call(this,q);const S={...q,type:(0,c.getJSONTypes)(q.type),schemaType:(0,c.getJSONTypes)(q.schemaType)};return(0,d.eachItem)(T,S.type.length===0?P=>z.call(this,P,S):P=>S.type.forEach(A=>z.call(this,P,S,A))),this}getKeyword(O){const q=this.RULES.all[O];return typeof q=="object"?q.definition:!!q}removeKeyword(O){const{RULES:q}=this;delete q.keywords[O],delete q.all[O];for(const T of q.rules){const S=T.rules.findIndex(P=>P.keyword===O);S>=0&&T.rules.splice(S,1)}return this}addFormat(O,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[O]=q,this}errorsText(O=this.errors,{separator:q=", ",dataVar:T="data"}={}){return!O||O.length===0?"No errors":O.map(S=>`${T}${S.instancePath} ${S.message}`).reduce((S,P)=>S+q+P)}$dataMetaSchema(O,q){const T=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const S of q){const P=S.split("/").slice(1);let A=O;for(const K of P)A=A[K];for(const K in T){const B=T[K];if(typeof B!="object")continue;const{$data:X}=B.definition,Z=A[K];X&&Z&&(A[K]=G(Z))}}return O}_removeAllSchemas(O,q){for(const T in O){const S=O[T];(!q||q.test(T))&&(typeof S=="string"?delete O[T]:S&&!S.meta&&(this._cache.delete(S.schema),delete O[T]))}}_addSchema(O,q,T,S=this.opts.validateSchema,P=this.opts.addUsedSchema){let A;const{schemaId:K}=this.opts;if(typeof O=="object")A=O[K];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let B=this._cache.get(O);if(B!==void 0)return B;T=(0,o.normalizeId)(A||T);const X=o.getSchemaRefs.call(this,O,T);return B=new r.SchemaEnv({schema:O,schemaId:K,meta:q,baseId:T,localRefs:X}),this._cache.set(B.schema,B),P&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=B),S&&this.validateSchema(O,!0),B}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):r.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const q=this.opts;this.opts=this._metaOpts;try{r.compileSchema.call(this,O)}finally{this.opts=q}}}v.ValidationError=i.default,v.MissingRefError=f.default,e.default=v;function p(D,O,q,T="error"){for(const S in D){const P=S;P in O&&this.logger[T](`${q}: option ${S}. ${D[P]}`)}}function y(D){return D=(0,o.normalizeId)(D),this.schemas[D]||this.refs[D]}function $(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const O in D)this.addSchema(D[O],O)}function b(){for(const D in this.opts.formats){const O=this.opts.formats[D];O&&this.addFormat(D,O)}}function N(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in D){const q=D[O];q.keyword||(q.keyword=O),this.addKeyword(q)}}function L(){const D={...this.opts};for(const O of E)delete D[O];return D}const F={log(){},warn(){},error(){}};function H(D){if(D===!1)return F;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const M=/^[a-z_$][a-z0-9_$:-]*$/i;function V(D,O){const{RULES:q}=this;if((0,d.eachItem)(D,T=>{if(q.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!M.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function z(D,O,q){var T;const S=O?.post;if(q&&S)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let A=S?P.post:P.rules.find(({type:B})=>B===q);if(A||(A={type:q,rules:[]},P.rules.push(A)),P.keywords[D]=!0,!O)return;const K={keyword:D,definition:{...O,type:(0,c.getJSONTypes)(O.type),schemaType:(0,c.getJSONTypes)(O.schemaType)}};O.before?J.call(this,A,K,O.before):A.rules.push(K),P.all[D]=K,(T=O.implements)===null||T===void 0||T.forEach(B=>this.addKeyword(B))}function J(D,O,q){const T=D.rules.findIndex(S=>S.keyword===q);T>=0?D.rules.splice(T,0,O):(D.rules.push(O),this.logger.warn(`rule ${q} is not defined`))}function W(D){let{metaSchema:O}=D;O!==void 0&&(D.$data&&this.opts.$data&&(O=G(O)),D.validateSchema=this.compile(O,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function G(D){return{anyOf:[D,j]}}}(As)),As}var Ar={},Lr={},qr={},Jc;function kh(){if(Jc)return qr;Jc=1,Object.defineProperty(qr,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return qr.default=e,qr}var Ge={},Zc;function jh(){if(Zc)return Ge;Zc=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.callRef=Ge.getValidate=void 0;const e=Tn(),t=De(),l=te(),i=He(),f=eo(),s=oe(),r={keyword:"$ref",schemaType:"string",code(c){const{gen:d,schema:g,it:w}=c,{baseId:_,schemaEnv:E,validateName:R,opts:u,self:h}=w,{root:n}=E;if((g==="#"||g==="#/")&&_===n.baseId)return v();const m=f.resolveRef.call(h,n,_,g);if(m===void 0)throw new e.default(w.opts.uriResolver,_,g);if(m instanceof f.SchemaEnv)return p(m);return y(m);function v(){if(E===n)return o(c,R,E,E.$async);const $=d.scopeValue("root",{ref:n});return o(c,(0,l._)`${$}.validate`,n,n.$async)}function p($){const b=a(c,$);o(c,b,$,$.$async)}function y($){const b=d.scopeValue("schema",u.code.source===!0?{ref:$,code:(0,l.stringify)($)}:{ref:$}),N=d.name("valid"),L=c.subschema({schema:$,dataTypes:[],schemaPath:l.nil,topSchemaRef:b,errSchemaPath:g},N);c.mergeEvaluated(L),c.ok(N)}}};function a(c,d){const{gen:g}=c;return d.validate?g.scopeValue("validate",{ref:d.validate}):(0,l._)`${g.scopeValue("wrapper",{ref:d})}.validate`}Ge.getValidate=a;function o(c,d,g,w){const{gen:_,it:E}=c,{allErrors:R,schemaEnv:u,opts:h}=E,n=h.passContext?i.default.this:l.nil;w?m():v();function m(){if(!u.$async)throw new Error("async schema referenced by sync schema");const $=_.let("valid");_.try(()=>{_.code((0,l._)`await ${(0,t.callValidateCode)(c,d,n)}`),y(d),R||_.assign($,!0)},b=>{_.if((0,l._)`!(${b} instanceof ${E.ValidationError})`,()=>_.throw(b)),p(b),R||_.assign($,!1)}),c.ok($)}function v(){c.result((0,t.callValidateCode)(c,d,n),()=>y(d),()=>p(d))}function p($){const b=(0,l._)`${$}.errors`;_.assign(i.default.vErrors,(0,l._)`${i.default.vErrors} === null ? ${b} : ${i.default.vErrors}.concat(${b})`),_.assign(i.default.errors,(0,l._)`${i.default.vErrors}.length`)}function y($){var b;if(!E.opts.unevaluated)return;const N=(b=g?.validate)===null||b===void 0?void 0:b.evaluated;if(E.props!==!0)if(N&&!N.dynamicProps)N.props!==void 0&&(E.props=s.mergeEvaluated.props(_,N.props,E.props));else{const L=_.var("props",(0,l._)`${$}.evaluated.props`);E.props=s.mergeEvaluated.props(_,L,E.props,l.Name)}if(E.items!==!0)if(N&&!N.dynamicItems)N.items!==void 0&&(E.items=s.mergeEvaluated.items(_,N.items,E.items));else{const L=_.var("items",(0,l._)`${$}.evaluated.items`);E.items=s.mergeEvaluated.items(_,L,E.items,l.Name)}}}return Ge.callRef=o,Ge.default=r,Ge}var Xc;function Fh(){if(Xc)return Lr;Xc=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=kh(),t=jh(),l=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Lr.default=l,Lr}var kr={},jr={},Yc;function Mh(){if(Yc)return jr;Yc=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=te(),t=e.operators,l={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:s,schemaCode:r})=>(0,e.str)`must be ${l[s].okStr} ${r}`,params:({keyword:s,schemaCode:r})=>(0,e._)`{comparison: ${l[s].okStr}, limit: ${r}}`},f={keyword:Object.keys(l),type:"number",schemaType:"number",$data:!0,error:i,code(s){const{keyword:r,data:a,schemaCode:o}=s;s.fail$data((0,e._)`${a} ${l[r].fail} ${o} || isNaN(${a})`)}};return jr.default=f,jr}var Fr={},Qc;function Uh(){if(Qc)return Fr;Qc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=te(),l={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:f,data:s,schemaCode:r,it:a}=i,o=a.opts.multipleOfPrecision,c=f.let("res"),d=o?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${o}`:(0,e._)`${c} !== parseInt(${c})`;i.fail$data((0,e._)`(${r} === 0 || (${c} = ${s}/${r}, ${d}))`)}};return Fr.default=l,Fr}var Mr={},Ur={},eu;function Vh(){if(eu)return Ur;eu=1,Object.defineProperty(Ur,"__esModule",{value:!0});function e(t){const l=t.length;let i=0,f=0,s;for(;f<l;)i++,s=t.charCodeAt(f++),s>=55296&&s<=56319&&f<l&&(s=t.charCodeAt(f),(s&64512)===56320&&f++);return i}return Ur.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ur}var tu;function zh(){if(tu)return Mr;tu=1,Object.defineProperty(Mr,"__esModule",{value:!0});const e=te(),t=oe(),l=Vh(),f={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:r}){const a=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${r} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:r,data:a,schemaCode:o,it:c}=s,d=r==="maxLength"?e.operators.GT:e.operators.LT,g=c.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(s.gen,l.default)}(${a})`;s.fail$data((0,e._)`${g} ${d} ${o}`)}};return Mr.default=f,Mr}var Vr={},ru;function Gh(){if(ru)return Vr;ru=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=De(),t=te(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:f})=>(0,t.str)`must match pattern "${f}"`,params:({schemaCode:f})=>(0,t._)`{pattern: ${f}}`},code(f){const{data:s,$data:r,schema:a,schemaCode:o,it:c}=f,d=c.opts.unicodeRegExp?"u":"",g=r?(0,t._)`(new RegExp(${o}, ${d}))`:(0,e.usePattern)(f,a);f.fail$data((0,t._)`!${g}.test(${s})`)}};return Vr.default=i,Vr}var zr={},nu;function Kh(){if(nu)return zr;nu=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=te(),l={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:f}){const s=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${f} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:f,data:s,schemaCode:r}=i,a=f==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${s}).length ${a} ${r}`)}};return zr.default=l,zr}var Gr={},su;function Hh(){if(su)return Gr;su=1,Object.defineProperty(Gr,"__esModule",{value:!0});const e=De(),t=te(),l=oe(),f={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:r,schema:a,schemaCode:o,data:c,$data:d,it:g}=s,{opts:w}=g;if(!d&&a.length===0)return;const _=a.length>=w.loopRequired;if(g.allErrors?E():R(),w.strictRequired){const n=s.parentSchema.properties,{definedProperties:m}=s.it;for(const v of a)if(n?.[v]===void 0&&!m.has(v)){const p=g.schemaEnv.baseId+g.errSchemaPath,y=`required property "${v}" is not defined at "${p}" (strictRequired)`;(0,l.checkStrictMode)(g,y,g.opts.strictRequired)}}function E(){if(_||d)s.block$data(t.nil,u);else for(const n of a)(0,e.checkReportMissingProp)(s,n)}function R(){const n=r.let("missing");if(_||d){const m=r.let("valid",!0);s.block$data(m,()=>h(n,m)),s.ok(m)}else r.if((0,e.checkMissingProp)(s,a,n)),(0,e.reportMissingProp)(s,n),r.else()}function u(){r.forOf("prop",o,n=>{s.setParams({missingProperty:n}),r.if((0,e.noPropertyInData)(r,c,n,w.ownProperties),()=>s.error())})}function h(n,m){s.setParams({missingProperty:n}),r.forOf(n,o,()=>{r.assign(m,(0,e.propertyInData)(r,c,n,w.ownProperties)),r.if((0,t.not)(m),()=>{s.error(),r.break()})},t.nil)}}};return Gr.default=f,Gr}var Kr={},iu;function xh(){if(iu)return Kr;iu=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=te(),l={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:f}){const s=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${f} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:f,data:s,schemaCode:r}=i,a=f==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${s}.length ${a} ${r}`)}};return Kr.default=l,Kr}var Hr={},xr={},ou;function to(){if(ou)return xr;ou=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=Sn();return e.code='require("ajv/dist/runtime/equal").default',xr.default=e,xr}var au;function Bh(){if(au)return Hr;au=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=$n(),t=te(),l=oe(),i=to(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:r,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${r} are identical)`,params:({params:{i:r,j:a}})=>(0,t._)`{i: ${r}, j: ${a}}`},code(r){const{gen:a,data:o,$data:c,schema:d,parentSchema:g,schemaCode:w,it:_}=r;if(!c&&!d)return;const E=a.let("valid"),R=g.items?(0,e.getSchemaTypes)(g.items):[];r.block$data(E,u,(0,t._)`${w} === false`),r.ok(E);function u(){const v=a.let("i",(0,t._)`${o}.length`),p=a.let("j");r.setParams({i:v,j:p}),a.assign(E,!0),a.if((0,t._)`${v} > 1`,()=>(h()?n:m)(v,p))}function h(){return R.length>0&&!R.some(v=>v==="object"||v==="array")}function n(v,p){const y=a.name("item"),$=(0,e.checkDataTypes)(R,y,_.opts.strictNumbers,e.DataType.Wrong),b=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${v}--;`,()=>{a.let(y,(0,t._)`${o}[${v}]`),a.if($,(0,t._)`continue`),R.length>1&&a.if((0,t._)`typeof ${y} == "string"`,(0,t._)`${y} += "_"`),a.if((0,t._)`typeof ${b}[${y}] == "number"`,()=>{a.assign(p,(0,t._)`${b}[${y}]`),r.error(),a.assign(E,!1).break()}).code((0,t._)`${b}[${y}] = ${v}`)})}function m(v,p){const y=(0,l.useFunc)(a,i.default),$=a.name("outer");a.label($).for((0,t._)`;${v}--;`,()=>a.for((0,t._)`${p} = ${v}; ${p}--;`,()=>a.if((0,t._)`${y}(${o}[${v}], ${o}[${p}])`,()=>{r.error(),a.assign(E,!1).break($)})))}}};return Hr.default=s,Hr}var Br={},cu;function Wh(){if(cu)return Br;cu=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=te(),t=oe(),l=to(),f={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:r,data:a,$data:o,schemaCode:c,schema:d}=s;o||d&&typeof d=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(r,l.default)}(${a}, ${c})`):s.fail((0,e._)`${d} !== ${a}`)}};return Br.default=f,Br}var Wr={},uu;function Jh(){if(uu)return Wr;uu=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=te(),t=oe(),l=to(),f={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:r,data:a,$data:o,schema:c,schemaCode:d,it:g}=s;if(!o&&c.length===0)throw new Error("enum must have non-empty array");const w=c.length>=g.opts.loopEnum;let _;const E=()=>_??(_=(0,t.useFunc)(r,l.default));let R;if(w||o)R=r.let("valid"),s.block$data(R,u);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const n=r.const("vSchema",d);R=(0,e.or)(...c.map((m,v)=>h(n,v)))}s.pass(R);function u(){r.assign(R,!1),r.forOf("v",d,n=>r.if((0,e._)`${E()}(${a}, ${n})`,()=>r.assign(R,!0).break()))}function h(n,m){const v=c[m];return typeof v=="object"&&v!==null?(0,e._)`${E()}(${a}, ${n}[${m}])`:(0,e._)`${a} === ${v}`}}};return Wr.default=f,Wr}var lu;function Zh(){if(lu)return kr;lu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=Mh(),t=Uh(),l=zh(),i=Gh(),f=Kh(),s=Hh(),r=xh(),a=Bh(),o=Wh(),c=Jh(),d=[e.default,t.default,l.default,i.default,f.default,s.default,r.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},o.default,c.default];return kr.default=d,kr}var Jr={},at={},fu;function hf(){if(fu)return at;fu=1,Object.defineProperty(at,"__esModule",{value:!0}),at.validateAdditionalItems=void 0;const e=te(),t=oe(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:r,it:a}=s,{items:o}=r;if(!Array.isArray(o)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}f(s,o)}};function f(s,r){const{gen:a,schema:o,data:c,keyword:d,it:g}=s;g.items=!0;const w=a.const("len",(0,e._)`${c}.length`);if(o===!1)s.setParams({len:r.length}),s.pass((0,e._)`${w} <= ${r.length}`);else if(typeof o=="object"&&!(0,t.alwaysValidSchema)(g,o)){const E=a.var("valid",(0,e._)`${w} <= ${r.length}`);a.if((0,e.not)(E),()=>_(E)),s.ok(E)}function _(E){a.forRange("i",r.length,w,R=>{s.subschema({keyword:d,dataProp:R,dataPropType:t.Type.Num},E),g.allErrors||a.if((0,e.not)(E),()=>a.break())})}}return at.validateAdditionalItems=f,at.default=i,at}var Zr={},ct={},du;function mf(){if(du)return ct;du=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.validateTuple=void 0;const e=te(),t=oe(),l=De(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:r,it:a}=s;if(Array.isArray(r))return f(s,"additionalItems",r);a.items=!0,!(0,t.alwaysValidSchema)(a,r)&&s.ok((0,l.validateArray)(s))}};function f(s,r,a=s.schema){const{gen:o,parentSchema:c,data:d,keyword:g,it:w}=s;R(c),w.opts.unevaluated&&a.length&&w.items!==!0&&(w.items=t.mergeEvaluated.items(o,a.length,w.items));const _=o.name("valid"),E=o.const("len",(0,e._)`${d}.length`);a.forEach((u,h)=>{(0,t.alwaysValidSchema)(w,u)||(o.if((0,e._)`${E} > ${h}`,()=>s.subschema({keyword:g,schemaProp:h,dataProp:h},_)),s.ok(_))});function R(u){const{opts:h,errSchemaPath:n}=w,m=a.length,v=m===u.minItems&&(m===u.maxItems||u[r]===!1);if(h.strictTuples&&!v){const p=`"${g}" is ${m}-tuple, but minItems or maxItems/${r} are not specified or different at path "${n}"`;(0,t.checkStrictMode)(w,p,h.strictTuples)}}}return ct.validateTuple=f,ct.default=i,ct}var hu;function Xh(){if(hu)return Zr;hu=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=mf(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:l=>(0,e.validateTuple)(l,"items")};return Zr.default=t,Zr}var Xr={},mu;function Yh(){if(mu)return Xr;mu=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=te(),t=oe(),l=De(),i=hf(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:r}})=>(0,e.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,e._)`{limit: ${r}}`},code(r){const{schema:a,parentSchema:o,it:c}=r,{prefixItems:d}=o;c.items=!0,!(0,t.alwaysValidSchema)(c,a)&&(d?(0,i.validateAdditionalItems)(r,d):r.ok((0,l.validateArray)(r)))}};return Xr.default=s,Xr}var Yr={},pu;function Qh(){if(pu)return Yr;pu=1,Object.defineProperty(Yr,"__esModule",{value:!0});const e=te(),t=oe(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:f,max:s}})=>s===void 0?(0,e.str)`must contain at least ${f} valid item(s)`:(0,e.str)`must contain at least ${f} and no more than ${s} valid item(s)`,params:({params:{min:f,max:s}})=>s===void 0?(0,e._)`{minContains: ${f}}`:(0,e._)`{minContains: ${f}, maxContains: ${s}}`},code(f){const{gen:s,schema:r,parentSchema:a,data:o,it:c}=f;let d,g;const{minContains:w,maxContains:_}=a;c.opts.next?(d=w===void 0?1:w,g=_):d=1;const E=s.const("len",(0,e._)`${o}.length`);if(f.setParams({min:d,max:g}),g===void 0&&d===0){(0,t.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&d>g){(0,t.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),f.fail();return}if((0,t.alwaysValidSchema)(c,r)){let m=(0,e._)`${E} >= ${d}`;g!==void 0&&(m=(0,e._)`${m} && ${E} <= ${g}`),f.pass(m);return}c.items=!0;const R=s.name("valid");g===void 0&&d===1?h(R,()=>s.if(R,()=>s.break())):d===0?(s.let(R,!0),g!==void 0&&s.if((0,e._)`${o}.length > 0`,u)):(s.let(R,!1),u()),f.result(R,()=>f.reset());function u(){const m=s.name("_valid"),v=s.let("count",0);h(m,()=>s.if(m,()=>n(v)))}function h(m,v){s.forRange("i",0,E,p=>{f.subschema({keyword:"contains",dataProp:p,dataPropType:t.Type.Num,compositeRule:!0},m),v()})}function n(m){s.code((0,e._)`${m}++`),g===void 0?s.if((0,e._)`${m} >= ${d}`,()=>s.assign(R,!0).break()):(s.if((0,e._)`${m} > ${g}`,()=>s.assign(R,!1).break()),d===1?s.assign(R,!0):s.if((0,e._)`${m} >= ${d}`,()=>s.assign(R,!0)))}}};return Yr.default=i,Yr}var Ms={},yu;function em(){return yu||(yu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=te(),l=oe(),i=De();e.error={message:({params:{property:o,depsCount:c,deps:d}})=>{const g=c===1?"property":"properties";return(0,t.str)`must have ${g} ${d} when property ${o} is present`},params:({params:{property:o,depsCount:c,deps:d,missingProperty:g}})=>(0,t._)`{property: ${o},
|
|
19
|
+
missingProperty: ${g},
|
|
20
|
+
depsCount: ${c},
|
|
21
|
+
deps: ${d}}`};const f={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(o){const[c,d]=s(o);r(o,c),a(o,d)}};function s({schema:o}){const c={},d={};for(const g in o){if(g==="__proto__")continue;const w=Array.isArray(o[g])?c:d;w[g]=o[g]}return[c,d]}function r(o,c=o.schema){const{gen:d,data:g,it:w}=o;if(Object.keys(c).length===0)return;const _=d.let("missing");for(const E in c){const R=c[E];if(R.length===0)continue;const u=(0,i.propertyInData)(d,g,E,w.opts.ownProperties);o.setParams({property:E,depsCount:R.length,deps:R.join(", ")}),w.allErrors?d.if(u,()=>{for(const h of R)(0,i.checkReportMissingProp)(o,h)}):(d.if((0,t._)`${u} && (${(0,i.checkMissingProp)(o,R,_)})`),(0,i.reportMissingProp)(o,_),d.else())}}e.validatePropertyDeps=r;function a(o,c=o.schema){const{gen:d,data:g,keyword:w,it:_}=o,E=d.name("valid");for(const R in c)(0,l.alwaysValidSchema)(_,c[R])||(d.if((0,i.propertyInData)(d,g,R,_.opts.ownProperties),()=>{const u=o.subschema({keyword:w,schemaProp:R},E);o.mergeValidEvaluated(u,E)},()=>d.var(E,!0)),o.ok(E))}e.validateSchemaDeps=a,e.default=f}(Ms)),Ms}var Qr={},vu;function tm(){if(vu)return Qr;vu=1,Object.defineProperty(Qr,"__esModule",{value:!0});const e=te(),t=oe(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:f})=>(0,e._)`{propertyName: ${f.propertyName}}`},code(f){const{gen:s,schema:r,data:a,it:o}=f;if((0,t.alwaysValidSchema)(o,r))return;const c=s.name("valid");s.forIn("key",a,d=>{f.setParams({propertyName:d}),f.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},c),s.if((0,e.not)(c),()=>{f.error(!0),o.allErrors||s.break()})}),f.ok(c)}};return Qr.default=i,Qr}var en={},_u;function pf(){if(_u)return en;_u=1,Object.defineProperty(en,"__esModule",{value:!0});const e=De(),t=te(),l=He(),i=oe(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:r})=>(0,t._)`{additionalProperty: ${r.additionalProperty}}`},code(r){const{gen:a,schema:o,parentSchema:c,data:d,errsCount:g,it:w}=r;if(!g)throw new Error("ajv implementation error");const{allErrors:_,opts:E}=w;if(w.props=!0,E.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(w,o))return;const R=(0,e.allSchemaProperties)(c.properties),u=(0,e.allSchemaProperties)(c.patternProperties);h(),r.ok((0,t._)`${g} === ${l.default.errors}`);function h(){a.forIn("key",d,y=>{!R.length&&!u.length?v(y):a.if(n(y),()=>v(y))})}function n(y){let $;if(R.length>8){const b=(0,i.schemaRefOrVal)(w,c.properties,"properties");$=(0,e.isOwnProperty)(a,b,y)}else R.length?$=(0,t.or)(...R.map(b=>(0,t._)`${y} === ${b}`)):$=t.nil;return u.length&&($=(0,t.or)($,...u.map(b=>(0,t._)`${(0,e.usePattern)(r,b)}.test(${y})`))),(0,t.not)($)}function m(y){a.code((0,t._)`delete ${d}[${y}]`)}function v(y){if(E.removeAdditional==="all"||E.removeAdditional&&o===!1){m(y);return}if(o===!1){r.setParams({additionalProperty:y}),r.error(),_||a.break();return}if(typeof o=="object"&&!(0,i.alwaysValidSchema)(w,o)){const $=a.name("valid");E.removeAdditional==="failing"?(p(y,$,!1),a.if((0,t.not)($),()=>{r.reset(),m(y)})):(p(y,$),_||a.if((0,t.not)($),()=>a.break()))}}function p(y,$,b){const N={keyword:"additionalProperties",dataProp:y,dataPropType:i.Type.Str};b===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(N,$)}}};return en.default=s,en}var tn={},gu;function rm(){if(gu)return tn;gu=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=In(),t=De(),l=oe(),i=pf(),f={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:r,schema:a,parentSchema:o,data:c,it:d}=s;d.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(d,i.default,"additionalProperties"));const g=(0,t.allSchemaProperties)(a);for(const u of g)d.definedProperties.add(u);d.opts.unevaluated&&g.length&&d.props!==!0&&(d.props=l.mergeEvaluated.props(r,(0,l.toHash)(g),d.props));const w=g.filter(u=>!(0,l.alwaysValidSchema)(d,a[u]));if(w.length===0)return;const _=r.name("valid");for(const u of w)E(u)?R(u):(r.if((0,t.propertyInData)(r,c,u,d.opts.ownProperties)),R(u),d.allErrors||r.else().var(_,!0),r.endIf()),s.it.definedProperties.add(u),s.ok(_);function E(u){return d.opts.useDefaults&&!d.compositeRule&&a[u].default!==void 0}function R(u){s.subschema({keyword:"properties",schemaProp:u,dataProp:u},_)}}};return tn.default=f,tn}var rn={},$u;function nm(){if($u)return rn;$u=1,Object.defineProperty(rn,"__esModule",{value:!0});const e=De(),t=te(),l=oe(),i=oe(),f={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:r,schema:a,data:o,parentSchema:c,it:d}=s,{opts:g}=d,w=(0,e.allSchemaProperties)(a),_=w.filter(v=>(0,l.alwaysValidSchema)(d,a[v]));if(w.length===0||_.length===w.length&&(!d.opts.unevaluated||d.props===!0))return;const E=g.strictSchema&&!g.allowMatchingProperties&&c.properties,R=r.name("valid");d.props!==!0&&!(d.props instanceof t.Name)&&(d.props=(0,i.evaluatedPropsToName)(r,d.props));const{props:u}=d;h();function h(){for(const v of w)E&&n(v),d.allErrors?m(v):(r.var(R,!0),m(v),r.if(R))}function n(v){for(const p in E)new RegExp(v).test(p)&&(0,l.checkStrictMode)(d,`property ${p} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){r.forIn("key",o,p=>{r.if((0,t._)`${(0,e.usePattern)(s,v)}.test(${p})`,()=>{const y=_.includes(v);y||s.subschema({keyword:"patternProperties",schemaProp:v,dataProp:p,dataPropType:i.Type.Str},R),d.opts.unevaluated&&u!==!0?r.assign((0,t._)`${u}[${p}]`,!0):!y&&!d.allErrors&&r.if((0,t.not)(R),()=>r.break())})})}}};return rn.default=f,rn}var nn={},Eu;function sm(){if(Eu)return nn;Eu=1,Object.defineProperty(nn,"__esModule",{value:!0});const e=oe(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(l){const{gen:i,schema:f,it:s}=l;if((0,e.alwaysValidSchema)(s,f)){l.fail();return}const r=i.name("valid");l.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),l.failResult(r,()=>l.reset(),()=>l.error())},error:{message:"must NOT be valid"}};return nn.default=t,nn}var sn={},wu;function im(){if(wu)return sn;wu=1,Object.defineProperty(sn,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:De().validateUnion,error:{message:"must match a schema in anyOf"}};return sn.default=t,sn}var on={},Su;function om(){if(Su)return on;Su=1,Object.defineProperty(on,"__esModule",{value:!0});const e=te(),t=oe(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:f})=>(0,e._)`{passingSchemas: ${f.passing}}`},code(f){const{gen:s,schema:r,parentSchema:a,it:o}=f;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&a.discriminator)return;const c=r,d=s.let("valid",!1),g=s.let("passing",null),w=s.name("_valid");f.setParams({passing:g}),s.block(_),f.result(d,()=>f.reset(),()=>f.error(!0));function _(){c.forEach((E,R)=>{let u;(0,t.alwaysValidSchema)(o,E)?s.var(w,!0):u=f.subschema({keyword:"oneOf",schemaProp:R,compositeRule:!0},w),R>0&&s.if((0,e._)`${w} && ${d}`).assign(d,!1).assign(g,(0,e._)`[${g}, ${R}]`).else(),s.if(w,()=>{s.assign(d,!0),s.assign(g,R),u&&f.mergeEvaluated(u,e.Name)})})}}};return on.default=i,on}var an={},Ru;function am(){if(Ru)return an;Ru=1,Object.defineProperty(an,"__esModule",{value:!0});const e=oe(),t={keyword:"allOf",schemaType:"array",code(l){const{gen:i,schema:f,it:s}=l;if(!Array.isArray(f))throw new Error("ajv implementation error");const r=i.name("valid");f.forEach((a,o)=>{if((0,e.alwaysValidSchema)(s,a))return;const c=l.subschema({keyword:"allOf",schemaProp:o},r);l.ok(r),l.mergeEvaluated(c)})}};return an.default=t,an}var cn={},bu;function cm(){if(bu)return cn;bu=1,Object.defineProperty(cn,"__esModule",{value:!0});const e=te(),t=oe(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:r,parentSchema:a,it:o}=s;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const c=f(o,"then"),d=f(o,"else");if(!c&&!d)return;const g=r.let("valid",!0),w=r.name("_valid");if(_(),s.reset(),c&&d){const R=r.let("ifClause");s.setParams({ifClause:R}),r.if(w,E("then",R),E("else",R))}else c?r.if(w,E("then")):r.if((0,e.not)(w),E("else"));s.pass(g,()=>s.error(!0));function _(){const R=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},w);s.mergeEvaluated(R)}function E(R,u){return()=>{const h=s.subschema({keyword:R},w);r.assign(g,w),s.mergeValidEvaluated(h,g),u?r.assign(u,(0,e._)`${R}`):s.setParams({ifClause:R})}}}};function f(s,r){const a=s.schema[r];return a!==void 0&&!(0,t.alwaysValidSchema)(s,a)}return cn.default=i,cn}var un={},Pu;function um(){if(Pu)return un;Pu=1,Object.defineProperty(un,"__esModule",{value:!0});const e=oe(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:l,parentSchema:i,it:f}){i.if===void 0&&(0,e.checkStrictMode)(f,`"${l}" without "if" is ignored`)}};return un.default=t,un}var Nu;function lm(){if(Nu)return Jr;Nu=1,Object.defineProperty(Jr,"__esModule",{value:!0});const e=hf(),t=Xh(),l=mf(),i=Yh(),f=Qh(),s=em(),r=tm(),a=pf(),o=rm(),c=nm(),d=sm(),g=im(),w=om(),_=am(),E=cm(),R=um();function u(h=!1){const n=[d.default,g.default,w.default,_.default,E.default,R.default,r.default,a.default,s.default,o.default,c.default];return h?n.push(t.default,i.default):n.push(e.default,l.default),n.push(f.default),n}return Jr.default=u,Jr}var ln={},fn={},Ou;function fm(){if(Ou)return fn;Ou=1,Object.defineProperty(fn,"__esModule",{value:!0});const e=te(),l={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,f){const{gen:s,data:r,$data:a,schema:o,schemaCode:c,it:d}=i,{opts:g,errSchemaPath:w,schemaEnv:_,self:E}=d;if(!g.validateFormats)return;a?R():u();function R(){const h=s.scopeValue("formats",{ref:E.formats,code:g.code.formats}),n=s.const("fDef",(0,e._)`${h}[${c}]`),m=s.let("fType"),v=s.let("format");s.if((0,e._)`typeof ${n} == "object" && !(${n} instanceof RegExp)`,()=>s.assign(m,(0,e._)`${n}.type || "string"`).assign(v,(0,e._)`${n}.validate`),()=>s.assign(m,(0,e._)`"string"`).assign(v,n)),i.fail$data((0,e.or)(p(),y()));function p(){return g.strictSchema===!1?e.nil:(0,e._)`${c} && !${v}`}function y(){const $=_.$async?(0,e._)`(${n}.async ? await ${v}(${r}) : ${v}(${r}))`:(0,e._)`${v}(${r})`,b=(0,e._)`(typeof ${v} == "function" ? ${$} : ${v}.test(${r}))`;return(0,e._)`${v} && ${v} !== true && ${m} === ${f} && !${b}`}}function u(){const h=E.formats[o];if(!h){p();return}if(h===!0)return;const[n,m,v]=y(h);n===f&&i.pass($());function p(){if(g.strictSchema===!1){E.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${o}" ignored in schema at path "${w}"`}}function y(b){const N=b instanceof RegExp?(0,e.regexpCode)(b):g.code.formats?(0,e._)`${g.code.formats}${(0,e.getProperty)(o)}`:void 0,L=s.scopeValue("formats",{key:o,ref:b,code:N});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,e._)`${L}.validate`]:["string",b,L]}function $(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${r})`}return typeof m=="function"?(0,e._)`${v}(${r})`:(0,e._)`${v}.test(${r})`}}}};return fn.default=l,fn}var Iu;function dm(){if(Iu)return ln;Iu=1,Object.defineProperty(ln,"__esModule",{value:!0});const t=[fm().default];return ln.default=t,ln}var rt={},Tu;function hm(){return Tu||(Tu=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.contentVocabulary=rt.metadataVocabulary=void 0,rt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],rt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),rt}var Cu;function mm(){if(Cu)return Ar;Cu=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Fh(),t=Zh(),l=lm(),i=dm(),f=hm(),s=[e.default,t.default,(0,l.default)(),i.default,f.metadataVocabulary,f.contentVocabulary];return Ar.default=s,Ar}var dn={},_t={},Du;function pm(){if(Du)return _t;Du=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(_t.DiscrError=e={})),_t}var Au;function ym(){if(Au)return dn;Au=1,Object.defineProperty(dn,"__esModule",{value:!0});const e=te(),t=pm(),l=eo(),i=Tn(),f=oe(),r={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:o}})=>a===t.DiscrError.Tag?`tag "${o}" must be string`:`value of tag "${o}" must be in oneOf`,params:({params:{discrError:a,tag:o,tagName:c}})=>(0,e._)`{error: ${a}, tag: ${c}, tagValue: ${o}}`},code(a){const{gen:o,data:c,schema:d,parentSchema:g,it:w}=a,{oneOf:_}=g;if(!w.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=d.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const R=o.let("valid",!1),u=o.const("tag",(0,e._)`${c}${(0,e.getProperty)(E)}`);o.if((0,e._)`typeof ${u} == "string"`,()=>h(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:u,tagName:E})),a.ok(R);function h(){const v=m();o.if(!1);for(const p in v)o.elseIf((0,e._)`${u} === ${p}`),o.assign(R,n(v[p]));o.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:u,tagName:E}),o.endIf()}function n(v){const p=o.name("valid"),y=a.subschema({keyword:"oneOf",schemaProp:v},p);return a.mergeEvaluated(y,e.Name),p}function m(){var v;const p={},y=b(g);let $=!0;for(let F=0;F<_.length;F++){let H=_[F];if(H?.$ref&&!(0,f.schemaHasRulesButRef)(H,w.self.RULES)){const V=H.$ref;if(H=l.resolveRef.call(w.self,w.schemaEnv.root,w.baseId,V),H instanceof l.SchemaEnv&&(H=H.schema),H===void 0)throw new i.default(w.opts.uriResolver,w.baseId,V)}const M=(v=H?.properties)===null||v===void 0?void 0:v[E];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);$=$&&(y||b(H)),N(M,F)}if(!$)throw new Error(`discriminator: "${E}" must be required`);return p;function b({required:F}){return Array.isArray(F)&&F.includes(E)}function N(F,H){if(F.const)L(F.const,H);else if(F.enum)for(const M of F.enum)L(M,H);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function L(F,H){if(typeof F!="string"||F in p)throw new Error(`discriminator: "${E}" values must be unique strings`);p[F]=H}}}};return dn.default=r,dn}const vm="http://json-schema.org/draft-07/schema#",_m="http://json-schema.org/draft-07/schema#",gm="Core schema meta-schema",$m={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Em=["object","boolean"],wm={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},Sm={$schema:vm,$id:_m,title:gm,definitions:$m,type:Em,properties:wm,default:!0};var Lu;function Rm(){return Lu||(Lu=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const l=qh(),i=mm(),f=ym(),s=Sm,r=["/properties"],a="http://json-schema.org/draft-07/schema";class o extends l.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(f.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(s,r):s;this.addMetaSchema(E,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=o,e.exports=t=o,e.exports.Ajv=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var c=In();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=te();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 g=Qi();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return g.default}});var w=Tn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}(Or,Or.exports)),Or.exports}var qu;function bm(){return qu||(qu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Rm(),l=te(),i=l.operators,f={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:a,schemaCode:o})=>l.str`should be ${f[a].okStr} ${o}`,params:({keyword:a,schemaCode:o})=>l._`{comparison: ${f[a].okStr}, limit: ${o}}`};e.formatLimitDefinition={keyword:Object.keys(f),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:o,data:c,schemaCode:d,keyword:g,it:w}=a,{opts:_,self:E}=w;if(!_.validateFormats)return;const R=new t.KeywordCxt(w,E.RULES.all.format.definition,"format");R.$data?u():h();function u(){const m=o.scopeValue("formats",{ref:E.formats,code:_.code.formats}),v=o.const("fmt",l._`${m}[${R.schemaCode}]`);a.fail$data(l.or(l._`typeof ${v} != "object"`,l._`${v} instanceof RegExp`,l._`typeof ${v}.compare != "function"`,n(v)))}function h(){const m=R.schema,v=E.formats[m];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${g}": format "${m}" does not define "compare" function`);const p=o.scopeValue("formats",{key:m,ref:v,code:_.code.formats?l._`${_.code.formats}${l.getProperty(m)}`:void 0});a.fail$data(n(p))}function n(m){return l._`${m}.compare(${c}, ${d}) ${f[g].fail} 0`}},dependencies:["format"]};const r=a=>(a.addKeyword(e.formatLimitDefinition),a);e.default=r}(Ds)),Ds}var ku;function Pm(){return ku||(ku=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const l=Eh(),i=bm(),f=te(),s=new f.Name("fullFormats"),r=new f.Name("fastFormats"),a=(c,d={keywords:!0})=>{if(Array.isArray(d))return o(c,d,l.fullFormats,s),c;const[g,w]=d.mode==="fast"?[l.fastFormats,r]:[l.fullFormats,s],_=d.formats||l.formatNames;return o(c,_,g,w),d.keywords&&i.default(c),c};a.get=(c,d="full")=>{const w=(d==="fast"?l.fastFormats:l.fullFormats)[c];if(!w)throw new Error(`Unknown format "${c}"`);return w};function o(c,d,g,w){var _,E;(_=(E=c.opts.code).formats)!==null&&_!==void 0||(E.formats=f._`require("ajv-formats/dist/formats").${w}`);for(const R of d)c.addFormat(R,g[R])}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}(Nr,Nr.exports)),Nr.exports}var Us,ju;function Nm(){if(ju)return Us;ju=1;const e=(o,c,d,g)=>{if(d==="length"||d==="prototype"||d==="arguments"||d==="caller")return;const w=Object.getOwnPropertyDescriptor(o,d),_=Object.getOwnPropertyDescriptor(c,d);!t(w,_)&&g||Object.defineProperty(o,d,_)},t=function(o,c){return o===void 0||o.configurable||o.writable===c.writable&&o.enumerable===c.enumerable&&o.configurable===c.configurable&&(o.writable||o.value===c.value)},l=(o,c)=>{const d=Object.getPrototypeOf(c);d!==Object.getPrototypeOf(o)&&Object.setPrototypeOf(o,d)},i=(o,c)=>`/* Wrapped ${o}*/
|
|
22
|
+
${c}`,f=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),s=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),r=(o,c,d)=>{const g=d===""?"":`with ${d.trim()}() `,w=i.bind(null,g,c.toString());Object.defineProperty(w,"name",s),Object.defineProperty(o,"toString",{...f,value:w})};return Us=(o,c,{ignoreNonConfigurable:d=!1}={})=>{const{name:g}=o;for(const w of Reflect.ownKeys(c))e(o,c,w,d);return l(o,c),r(o,c,g),o},Us}var Vs,Fu;function Om(){if(Fu)return Vs;Fu=1;const e=Nm();return Vs=(t,l={})=>{if(typeof t!="function")throw new TypeError(`Expected the first argument to be a function, got \`${typeof t}\``);const{wait:i=0,before:f=!1,after:s=!0}=l;if(!f&&!s)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let r,a;const o=function(...c){const d=this,g=()=>{r=void 0,s&&(a=t.apply(d,c))},w=f&&!r;return clearTimeout(r),r=setTimeout(g,i),w&&(a=t.apply(d,c)),a};return e(o,t),o.cancel=()=>{r&&(clearTimeout(r),r=void 0)},o},Vs}var hn={exports:{}},zs,Mu;function Cn(){if(Mu)return zs;Mu=1;const e="2.0.0",t=256,l=Number.MAX_SAFE_INTEGER||9007199254740991,i=16,f=t-6;return zs={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:f,MAX_SAFE_INTEGER:l,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},zs}var Gs,Uu;function Dn(){return Uu||(Uu=1,Gs=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{}),Gs}var Vu;function bt(){return Vu||(Vu=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:l,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:f}=Cn(),s=Dn();t=e.exports={};const r=t.re=[],a=t.safeRe=[],o=t.src=[],c=t.t={};let d=0;const g="[a-zA-Z0-9-]",w=[["\\s",1],["\\d",f],[g,i]],_=R=>{for(const[u,h]of w)R=R.split(`${u}*`).join(`${u}{0,${h}}`).split(`${u}+`).join(`${u}{1,${h}}`);return R},E=(R,u,h)=>{const n=_(u),m=d++;s(R,m,u),c[R]=m,o[m]=u,r[m]=new RegExp(u,h?"g":void 0),a[m]=new RegExp(n,h?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*"),E("NUMERICIDENTIFIERLOOSE","\\d+"),E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${g}*`),E("MAINVERSION",`(${o[c.NUMERICIDENTIFIER]})\\.(${o[c.NUMERICIDENTIFIER]})\\.(${o[c.NUMERICIDENTIFIER]})`),E("MAINVERSIONLOOSE",`(${o[c.NUMERICIDENTIFIERLOOSE]})\\.(${o[c.NUMERICIDENTIFIERLOOSE]})\\.(${o[c.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASEIDENTIFIER",`(?:${o[c.NUMERICIDENTIFIER]}|${o[c.NONNUMERICIDENTIFIER]})`),E("PRERELEASEIDENTIFIERLOOSE",`(?:${o[c.NUMERICIDENTIFIERLOOSE]}|${o[c.NONNUMERICIDENTIFIER]})`),E("PRERELEASE",`(?:-(${o[c.PRERELEASEIDENTIFIER]}(?:\\.${o[c.PRERELEASEIDENTIFIER]})*))`),E("PRERELEASELOOSE",`(?:-?(${o[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[c.PRERELEASEIDENTIFIERLOOSE]})*))`),E("BUILDIDENTIFIER",`${g}+`),E("BUILD",`(?:\\+(${o[c.BUILDIDENTIFIER]}(?:\\.${o[c.BUILDIDENTIFIER]})*))`),E("FULLPLAIN",`v?${o[c.MAINVERSION]}${o[c.PRERELEASE]}?${o[c.BUILD]}?`),E("FULL",`^${o[c.FULLPLAIN]}$`),E("LOOSEPLAIN",`[v=\\s]*${o[c.MAINVERSIONLOOSE]}${o[c.PRERELEASELOOSE]}?${o[c.BUILD]}?`),E("LOOSE",`^${o[c.LOOSEPLAIN]}$`),E("GTLT","((?:<|>)?=?)"),E("XRANGEIDENTIFIERLOOSE",`${o[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),E("XRANGEIDENTIFIER",`${o[c.NUMERICIDENTIFIER]}|x|X|\\*`),E("XRANGEPLAIN",`[v=\\s]*(${o[c.XRANGEIDENTIFIER]})(?:\\.(${o[c.XRANGEIDENTIFIER]})(?:\\.(${o[c.XRANGEIDENTIFIER]})(?:${o[c.PRERELEASE]})?${o[c.BUILD]}?)?)?`),E("XRANGEPLAINLOOSE",`[v=\\s]*(${o[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[c.XRANGEIDENTIFIERLOOSE]})(?:${o[c.PRERELEASELOOSE]})?${o[c.BUILD]}?)?)?`),E("XRANGE",`^${o[c.GTLT]}\\s*${o[c.XRANGEPLAIN]}$`),E("XRANGELOOSE",`^${o[c.GTLT]}\\s*${o[c.XRANGEPLAINLOOSE]}$`),E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${l}})(?:\\.(\\d{1,${l}}))?(?:\\.(\\d{1,${l}}))?`),E("COERCE",`${o[c.COERCEPLAIN]}(?:$|[^\\d])`),E("COERCEFULL",o[c.COERCEPLAIN]+`(?:${o[c.PRERELEASE]})?(?:${o[c.BUILD]})?(?:$|[^\\d])`),E("COERCERTL",o[c.COERCE],!0),E("COERCERTLFULL",o[c.COERCEFULL],!0),E("LONETILDE","(?:~>?)"),E("TILDETRIM",`(\\s*)${o[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",E("TILDE",`^${o[c.LONETILDE]}${o[c.XRANGEPLAIN]}$`),E("TILDELOOSE",`^${o[c.LONETILDE]}${o[c.XRANGEPLAINLOOSE]}$`),E("LONECARET","(?:\\^)"),E("CARETTRIM",`(\\s*)${o[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",E("CARET",`^${o[c.LONECARET]}${o[c.XRANGEPLAIN]}$`),E("CARETLOOSE",`^${o[c.LONECARET]}${o[c.XRANGEPLAINLOOSE]}$`),E("COMPARATORLOOSE",`^${o[c.GTLT]}\\s*(${o[c.LOOSEPLAIN]})$|^$`),E("COMPARATOR",`^${o[c.GTLT]}\\s*(${o[c.FULLPLAIN]})$|^$`),E("COMPARATORTRIM",`(\\s*)${o[c.GTLT]}\\s*(${o[c.LOOSEPLAIN]}|${o[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",E("HYPHENRANGE",`^\\s*(${o[c.XRANGEPLAIN]})\\s+-\\s+(${o[c.XRANGEPLAIN]})\\s*$`),E("HYPHENRANGELOOSE",`^\\s*(${o[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[c.XRANGEPLAINLOOSE]})\\s*$`),E("STAR","(<|>)?=?\\s*\\*"),E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(hn,hn.exports)),hn.exports}var Ks,zu;function ro(){if(zu)return Ks;zu=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ks=i=>i?typeof i!="object"?e:i:t,Ks}var Hs,Gu;function yf(){if(Gu)return Hs;Gu=1;const e=/^[0-9]+$/,t=(i,f)=>{const s=e.test(i),r=e.test(f);return s&&r&&(i=+i,f=+f),i===f?0:s&&!r?-1:r&&!s?1:i<f?-1:1};return Hs={compareIdentifiers:t,rcompareIdentifiers:(i,f)=>t(f,i)},Hs}var xs,Ku;function $e(){if(Ku)return xs;Ku=1;const e=Dn(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:l}=Cn(),{safeRe:i,t:f}=bt(),s=ro(),{compareIdentifiers:r}=yf();class a{constructor(c,d){if(d=s(d),c instanceof a){if(c.loose===!!d.loose&&c.includePrerelease===!!d.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,d),this.options=d,this.loose=!!d.loose,this.includePrerelease=!!d.includePrerelease;const g=c.trim().match(d.loose?i[f.LOOSE]:i[f.FULL]);if(!g)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+g[1],this.minor=+g[2],this.patch=+g[3],this.major>l||this.major<0)throw new TypeError("Invalid major version");if(this.minor>l||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>l||this.patch<0)throw new TypeError("Invalid patch version");g[4]?this.prerelease=g[4].split(".").map(w=>{if(/^[0-9]+$/.test(w)){const _=+w;if(_>=0&&_<l)return _}return w}):this.prerelease=[],this.build=g[5]?g[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof a)){if(typeof c=="string"&&c===this.version)return 0;c=new a(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof a||(c=new a(c,this.options)),r(this.major,c.major)||r(this.minor,c.minor)||r(this.patch,c.patch)}comparePre(c){if(c instanceof a||(c=new a(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let d=0;do{const g=this.prerelease[d],w=c.prerelease[d];if(e("prerelease compare",d,g,w),g===void 0&&w===void 0)return 0;if(w===void 0)return 1;if(g===void 0)return-1;if(g===w)continue;return r(g,w)}while(++d)}compareBuild(c){c instanceof a||(c=new a(c,this.options));let d=0;do{const g=this.build[d],w=c.build[d];if(e("build compare",d,g,w),g===void 0&&w===void 0)return 0;if(w===void 0)return 1;if(g===void 0)return-1;if(g===w)continue;return r(g,w)}while(++d)}inc(c,d,g){switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",d,g);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",d,g);break;case"prepatch":this.prerelease.length=0,this.inc("patch",d,g),this.inc("pre",d,g);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",d,g),this.inc("pre",d,g);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const w=Number(g)?1:0;if(!d&&g===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[w];else{let _=this.prerelease.length;for(;--_>=0;)typeof this.prerelease[_]=="number"&&(this.prerelease[_]++,_=-2);if(_===-1){if(d===this.prerelease.join(".")&&g===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(w)}}if(d){let _=[d,w];g===!1&&(_=[d]),r(this.prerelease[0],d)===0?isNaN(this.prerelease[1])&&(this.prerelease=_):this.prerelease=_}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return xs=a,xs}var Bs,Hu;function ft(){if(Hu)return Bs;Hu=1;const e=$e();return Bs=(l,i,f=!1)=>{if(l instanceof e)return l;try{return new e(l,i)}catch(s){if(!f)return null;throw s}},Bs}var Ws,xu;function Im(){if(xu)return Ws;xu=1;const e=ft();return Ws=(l,i)=>{const f=e(l,i);return f?f.version:null},Ws}var Js,Bu;function Tm(){if(Bu)return Js;Bu=1;const e=ft();return Js=(l,i)=>{const f=e(l.trim().replace(/^[=v]+/,""),i);return f?f.version:null},Js}var Zs,Wu;function Cm(){if(Wu)return Zs;Wu=1;const e=$e();return Zs=(l,i,f,s,r)=>{typeof f=="string"&&(r=s,s=f,f=void 0);try{return new e(l instanceof e?l.version:l,f).inc(i,s,r).version}catch{return null}},Zs}var Xs,Ju;function Dm(){if(Ju)return Xs;Ju=1;const e=ft();return Xs=(l,i)=>{const f=e(l,null,!0),s=e(i,null,!0),r=f.compare(s);if(r===0)return null;const a=r>0,o=a?f:s,c=a?s:f,d=!!o.prerelease.length;if(!!c.prerelease.length&&!d)return!c.patch&&!c.minor?"major":o.patch?"patch":o.minor?"minor":"major";const w=d?"pre":"";return f.major!==s.major?w+"major":f.minor!==s.minor?w+"minor":f.patch!==s.patch?w+"patch":"prerelease"},Xs}var Ys,Zu;function Am(){if(Zu)return Ys;Zu=1;const e=$e();return Ys=(l,i)=>new e(l,i).major,Ys}var Qs,Xu;function Lm(){if(Xu)return Qs;Xu=1;const e=$e();return Qs=(l,i)=>new e(l,i).minor,Qs}var ei,Yu;function qm(){if(Yu)return ei;Yu=1;const e=$e();return ei=(l,i)=>new e(l,i).patch,ei}var ti,Qu;function km(){if(Qu)return ti;Qu=1;const e=ft();return ti=(l,i)=>{const f=e(l,i);return f&&f.prerelease.length?f.prerelease:null},ti}var ri,el;function Ae(){if(el)return ri;el=1;const e=$e();return ri=(l,i,f)=>new e(l,f).compare(new e(i,f)),ri}var ni,tl;function jm(){if(tl)return ni;tl=1;const e=Ae();return ni=(l,i,f)=>e(i,l,f),ni}var si,rl;function Fm(){if(rl)return si;rl=1;const e=Ae();return si=(l,i)=>e(l,i,!0),si}var ii,nl;function no(){if(nl)return ii;nl=1;const e=$e();return ii=(l,i,f)=>{const s=new e(l,f),r=new e(i,f);return s.compare(r)||s.compareBuild(r)},ii}var oi,sl;function Mm(){if(sl)return oi;sl=1;const e=no();return oi=(l,i)=>l.sort((f,s)=>e(f,s,i)),oi}var ai,il;function Um(){if(il)return ai;il=1;const e=no();return ai=(l,i)=>l.sort((f,s)=>e(s,f,i)),ai}var ci,ol;function An(){if(ol)return ci;ol=1;const e=Ae();return ci=(l,i,f)=>e(l,i,f)>0,ci}var ui,al;function so(){if(al)return ui;al=1;const e=Ae();return ui=(l,i,f)=>e(l,i,f)<0,ui}var li,cl;function vf(){if(cl)return li;cl=1;const e=Ae();return li=(l,i,f)=>e(l,i,f)===0,li}var fi,ul;function _f(){if(ul)return fi;ul=1;const e=Ae();return fi=(l,i,f)=>e(l,i,f)!==0,fi}var di,ll;function io(){if(ll)return di;ll=1;const e=Ae();return di=(l,i,f)=>e(l,i,f)>=0,di}var hi,fl;function oo(){if(fl)return hi;fl=1;const e=Ae();return hi=(l,i,f)=>e(l,i,f)<=0,hi}var mi,dl;function gf(){if(dl)return mi;dl=1;const e=vf(),t=_f(),l=An(),i=io(),f=so(),s=oo();return mi=(a,o,c,d)=>{switch(o){case"===":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a===c;case"!==":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,d);case"!=":return t(a,c,d);case">":return l(a,c,d);case">=":return i(a,c,d);case"<":return f(a,c,d);case"<=":return s(a,c,d);default:throw new TypeError(`Invalid operator: ${o}`)}},mi}var pi,hl;function Vm(){if(hl)return pi;hl=1;const e=$e(),t=ft(),{safeRe:l,t:i}=bt();return pi=(s,r)=>{if(s instanceof e)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;r=r||{};let a=null;if(!r.rtl)a=s.match(r.includePrerelease?l[i.COERCEFULL]:l[i.COERCE]);else{const _=r.includePrerelease?l[i.COERCERTLFULL]:l[i.COERCERTL];let E;for(;(E=_.exec(s))&&(!a||a.index+a[0].length!==s.length);)(!a||E.index+E[0].length!==a.index+a[0].length)&&(a=E),_.lastIndex=E.index+E[1].length+E[2].length;_.lastIndex=-1}if(a===null)return null;const o=a[2],c=a[3]||"0",d=a[4]||"0",g=r.includePrerelease&&a[5]?`-${a[5]}`:"",w=r.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${o}.${c}.${d}${g}${w}`,r)},pi}var yi,ml;function zm(){if(ml)return yi;ml=1;class e{constructor(){this.max=1e3,this.map=new Map}get(l){const i=this.map.get(l);if(i!==void 0)return this.map.delete(l),this.map.set(l,i),i}delete(l){return this.map.delete(l)}set(l,i){if(!this.delete(l)&&i!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(l,i)}return this}}return yi=e,yi}var vi,pl;function Le(){if(pl)return vi;pl=1;const e=/\s+/g;class t{constructor(z,J){if(J=f(J),z instanceof t)return z.loose===!!J.loose&&z.includePrerelease===!!J.includePrerelease?z:new t(z.raw,J);if(z instanceof s)return this.raw=z.value,this.set=[[z]],this.formatted=void 0,this;if(this.options=J,this.loose=!!J.loose,this.includePrerelease=!!J.includePrerelease,this.raw=z.trim().replace(e," "),this.set=this.raw.split("||").map(W=>this.parseRange(W.trim())).filter(W=>W.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const W=this.set[0];if(this.set=this.set.filter(j=>!R(j[0])),this.set.length===0)this.set=[W];else if(this.set.length>1){for(const j of this.set)if(j.length===1&&u(j[0])){this.set=[j];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let z=0;z<this.set.length;z++){z>0&&(this.formatted+="||");const J=this.set[z];for(let W=0;W<J.length;W++)W>0&&(this.formatted+=" "),this.formatted+=J[W].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(z){const W=((this.options.includePrerelease&&_)|(this.options.loose&&E))+":"+z,j=i.get(W);if(j)return j;const G=this.options.loose,D=G?o[c.HYPHENRANGELOOSE]:o[c.HYPHENRANGE];z=z.replace(D,H(this.options.includePrerelease)),r("hyphen replace",z),z=z.replace(o[c.COMPARATORTRIM],d),r("comparator trim",z),z=z.replace(o[c.TILDETRIM],g),r("tilde trim",z),z=z.replace(o[c.CARETTRIM],w),r("caret trim",z);let O=z.split(" ").map(P=>n(P,this.options)).join(" ").split(/\s+/).map(P=>F(P,this.options));G&&(O=O.filter(P=>(r("loose invalid filter",P,this.options),!!P.match(o[c.COMPARATORLOOSE])))),r("range list",O);const q=new Map,T=O.map(P=>new s(P,this.options));for(const P of T){if(R(P))return[P];q.set(P.value,P)}q.size>1&&q.has("")&&q.delete("");const S=[...q.values()];return i.set(W,S),S}intersects(z,J){if(!(z instanceof t))throw new TypeError("a Range is required");return this.set.some(W=>h(W,J)&&z.set.some(j=>h(j,J)&&W.every(G=>j.every(D=>G.intersects(D,J)))))}test(z){if(!z)return!1;if(typeof z=="string")try{z=new a(z,this.options)}catch{return!1}for(let J=0;J<this.set.length;J++)if(M(this.set[J],z,this.options))return!0;return!1}}vi=t;const l=zm(),i=new l,f=ro(),s=Ln(),r=Dn(),a=$e(),{safeRe:o,t:c,comparatorTrimReplace:d,tildeTrimReplace:g,caretTrimReplace:w}=bt(),{FLAG_INCLUDE_PRERELEASE:_,FLAG_LOOSE:E}=Cn(),R=V=>V.value==="<0.0.0-0",u=V=>V.value==="",h=(V,z)=>{let J=!0;const W=V.slice();let j=W.pop();for(;J&&W.length;)J=W.every(G=>j.intersects(G,z)),j=W.pop();return J},n=(V,z)=>(r("comp",V,z),V=y(V,z),r("caret",V),V=v(V,z),r("tildes",V),V=b(V,z),r("xrange",V),V=L(V,z),r("stars",V),V),m=V=>!V||V.toLowerCase()==="x"||V==="*",v=(V,z)=>V.trim().split(/\s+/).map(J=>p(J,z)).join(" "),p=(V,z)=>{const J=z.loose?o[c.TILDELOOSE]:o[c.TILDE];return V.replace(J,(W,j,G,D,O)=>{r("tilde",V,W,j,G,D,O);let q;return m(j)?q="":m(G)?q=`>=${j}.0.0 <${+j+1}.0.0-0`:m(D)?q=`>=${j}.${G}.0 <${j}.${+G+1}.0-0`:O?(r("replaceTilde pr",O),q=`>=${j}.${G}.${D}-${O} <${j}.${+G+1}.0-0`):q=`>=${j}.${G}.${D} <${j}.${+G+1}.0-0`,r("tilde return",q),q})},y=(V,z)=>V.trim().split(/\s+/).map(J=>$(J,z)).join(" "),$=(V,z)=>{r("caret",V,z);const J=z.loose?o[c.CARETLOOSE]:o[c.CARET],W=z.includePrerelease?"-0":"";return V.replace(J,(j,G,D,O,q)=>{r("caret",V,j,G,D,O,q);let T;return m(G)?T="":m(D)?T=`>=${G}.0.0${W} <${+G+1}.0.0-0`:m(O)?G==="0"?T=`>=${G}.${D}.0${W} <${G}.${+D+1}.0-0`:T=`>=${G}.${D}.0${W} <${+G+1}.0.0-0`:q?(r("replaceCaret pr",q),G==="0"?D==="0"?T=`>=${G}.${D}.${O}-${q} <${G}.${D}.${+O+1}-0`:T=`>=${G}.${D}.${O}-${q} <${G}.${+D+1}.0-0`:T=`>=${G}.${D}.${O}-${q} <${+G+1}.0.0-0`):(r("no pr"),G==="0"?D==="0"?T=`>=${G}.${D}.${O}${W} <${G}.${D}.${+O+1}-0`:T=`>=${G}.${D}.${O}${W} <${G}.${+D+1}.0-0`:T=`>=${G}.${D}.${O} <${+G+1}.0.0-0`),r("caret return",T),T})},b=(V,z)=>(r("replaceXRanges",V,z),V.split(/\s+/).map(J=>N(J,z)).join(" ")),N=(V,z)=>{V=V.trim();const J=z.loose?o[c.XRANGELOOSE]:o[c.XRANGE];return V.replace(J,(W,j,G,D,O,q)=>{r("xRange",V,W,j,G,D,O,q);const T=m(G),S=T||m(D),P=S||m(O),A=P;return j==="="&&A&&(j=""),q=z.includePrerelease?"-0":"",T?j===">"||j==="<"?W="<0.0.0-0":W="*":j&&A?(S&&(D=0),O=0,j===">"?(j=">=",S?(G=+G+1,D=0,O=0):(D=+D+1,O=0)):j==="<="&&(j="<",S?G=+G+1:D=+D+1),j==="<"&&(q="-0"),W=`${j+G}.${D}.${O}${q}`):S?W=`>=${G}.0.0${q} <${+G+1}.0.0-0`:P&&(W=`>=${G}.${D}.0${q} <${G}.${+D+1}.0-0`),r("xRange return",W),W})},L=(V,z)=>(r("replaceStars",V,z),V.trim().replace(o[c.STAR],"")),F=(V,z)=>(r("replaceGTE0",V,z),V.trim().replace(o[z.includePrerelease?c.GTE0PRE:c.GTE0],"")),H=V=>(z,J,W,j,G,D,O,q,T,S,P,A)=>(m(W)?J="":m(j)?J=`>=${W}.0.0${V?"-0":""}`:m(G)?J=`>=${W}.${j}.0${V?"-0":""}`:D?J=`>=${J}`:J=`>=${J}${V?"-0":""}`,m(T)?q="":m(S)?q=`<${+T+1}.0.0-0`:m(P)?q=`<${T}.${+S+1}.0-0`:A?q=`<=${T}.${S}.${P}-${A}`:V?q=`<${T}.${S}.${+P+1}-0`:q=`<=${q}`,`${J} ${q}`.trim()),M=(V,z,J)=>{for(let W=0;W<V.length;W++)if(!V[W].test(z))return!1;if(z.prerelease.length&&!J.includePrerelease){for(let W=0;W<V.length;W++)if(r(V[W].semver),V[W].semver!==s.ANY&&V[W].semver.prerelease.length>0){const j=V[W].semver;if(j.major===z.major&&j.minor===z.minor&&j.patch===z.patch)return!0}return!1}return!0};return vi}var _i,yl;function Ln(){if(yl)return _i;yl=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(d,g){if(g=l(g),d instanceof t){if(d.loose===!!g.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),r("comparator",d,g),this.options=g,this.loose=!!g.loose,this.parse(d),this.semver===e?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}parse(d){const g=this.options.loose?i[f.COMPARATORLOOSE]:i[f.COMPARATOR],w=d.match(g);if(!w)throw new TypeError(`Invalid comparator: ${d}`);this.operator=w[1]!==void 0?w[1]:"",this.operator==="="&&(this.operator=""),w[2]?this.semver=new a(w[2],this.options.loose):this.semver=e}toString(){return this.value}test(d){if(r("Comparator.test",d,this.options.loose),this.semver===e||d===e)return!0;if(typeof d=="string")try{d=new a(d,this.options)}catch{return!1}return s(d,this.operator,this.semver,this.options)}intersects(d,g){if(!(d instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(d.value,g).test(this.value):d.operator===""?d.value===""?!0:new o(this.value,g).test(d.semver):(g=l(g),g.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!g.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||s(this.semver,"<",d.semver,g)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||s(this.semver,">",d.semver,g)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}_i=t;const l=ro(),{safeRe:i,t:f}=bt(),s=gf(),r=Dn(),a=$e(),o=Le();return _i}var gi,vl;function qn(){if(vl)return gi;vl=1;const e=Le();return gi=(l,i,f)=>{try{i=new e(i,f)}catch{return!1}return i.test(l)},gi}var $i,_l;function Gm(){if(_l)return $i;_l=1;const e=Le();return $i=(l,i)=>new e(l,i).set.map(f=>f.map(s=>s.value).join(" ").trim().split(" ")),$i}var Ei,gl;function Km(){if(gl)return Ei;gl=1;const e=$e(),t=Le();return Ei=(i,f,s)=>{let r=null,a=null,o=null;try{o=new t(f,s)}catch{return null}return i.forEach(c=>{o.test(c)&&(!r||a.compare(c)===-1)&&(r=c,a=new e(r,s))}),r},Ei}var wi,$l;function Hm(){if($l)return wi;$l=1;const e=$e(),t=Le();return wi=(i,f,s)=>{let r=null,a=null,o=null;try{o=new t(f,s)}catch{return null}return i.forEach(c=>{o.test(c)&&(!r||a.compare(c)===1)&&(r=c,a=new e(r,s))}),r},wi}var Si,El;function xm(){if(El)return Si;El=1;const e=$e(),t=Le(),l=An();return Si=(f,s)=>{f=new t(f,s);let r=new e("0.0.0");if(f.test(r)||(r=new e("0.0.0-0"),f.test(r)))return r;r=null;for(let a=0;a<f.set.length;++a){const o=f.set[a];let c=null;o.forEach(d=>{const g=new e(d.semver.version);switch(d.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!c||l(g,c))&&(c=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${d.operator}`)}}),c&&(!r||l(r,c))&&(r=c)}return r&&f.test(r)?r:null},Si}var Ri,wl;function Bm(){if(wl)return Ri;wl=1;const e=Le();return Ri=(l,i)=>{try{return new e(l,i).range||"*"}catch{return null}},Ri}var bi,Sl;function ao(){if(Sl)return bi;Sl=1;const e=$e(),t=Ln(),{ANY:l}=t,i=Le(),f=qn(),s=An(),r=so(),a=oo(),o=io();return bi=(d,g,w,_)=>{d=new e(d,_),g=new i(g,_);let E,R,u,h,n;switch(w){case">":E=s,R=a,u=r,h=">",n=">=";break;case"<":E=r,R=o,u=s,h="<",n="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(f(d,g,_))return!1;for(let m=0;m<g.set.length;++m){const v=g.set[m];let p=null,y=null;if(v.forEach($=>{$.semver===l&&($=new t(">=0.0.0")),p=p||$,y=y||$,E($.semver,p.semver,_)?p=$:u($.semver,y.semver,_)&&(y=$)}),p.operator===h||p.operator===n||(!y.operator||y.operator===h)&&R(d,y.semver))return!1;if(y.operator===n&&u(d,y.semver))return!1}return!0},bi}var Pi,Rl;function Wm(){if(Rl)return Pi;Rl=1;const e=ao();return Pi=(l,i,f)=>e(l,i,">",f),Pi}var Ni,bl;function Jm(){if(bl)return Ni;bl=1;const e=ao();return Ni=(l,i,f)=>e(l,i,"<",f),Ni}var Oi,Pl;function Zm(){if(Pl)return Oi;Pl=1;const e=Le();return Oi=(l,i,f)=>(l=new e(l,f),i=new e(i,f),l.intersects(i,f)),Oi}var Ii,Nl;function Xm(){if(Nl)return Ii;Nl=1;const e=qn(),t=Ae();return Ii=(l,i,f)=>{const s=[];let r=null,a=null;const o=l.sort((w,_)=>t(w,_,f));for(const w of o)e(w,i,f)?(a=w,r||(r=w)):(a&&s.push([r,a]),a=null,r=null);r&&s.push([r,null]);const c=[];for(const[w,_]of s)w===_?c.push(w):!_&&w===o[0]?c.push("*"):_?w===o[0]?c.push(`<=${_}`):c.push(`${w} - ${_}`):c.push(`>=${w}`);const d=c.join(" || "),g=typeof i.raw=="string"?i.raw:String(i);return d.length<g.length?d:i},Ii}var Ti,Ol;function Ym(){if(Ol)return Ti;Ol=1;const e=Le(),t=Ln(),{ANY:l}=t,i=qn(),f=Ae(),s=(g,w,_={})=>{if(g===w)return!0;g=new e(g,_),w=new e(w,_);let E=!1;e:for(const R of g.set){for(const u of w.set){const h=o(R,u,_);if(E=E||h!==null,h)continue e}if(E)return!1}return!0},r=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],o=(g,w,_)=>{if(g===w)return!0;if(g.length===1&&g[0].semver===l){if(w.length===1&&w[0].semver===l)return!0;_.includePrerelease?g=r:g=a}if(w.length===1&&w[0].semver===l){if(_.includePrerelease)return!0;w=a}const E=new Set;let R,u;for(const b of g)b.operator===">"||b.operator===">="?R=c(R,b,_):b.operator==="<"||b.operator==="<="?u=d(u,b,_):E.add(b.semver);if(E.size>1)return null;let h;if(R&&u){if(h=f(R.semver,u.semver,_),h>0)return null;if(h===0&&(R.operator!==">="||u.operator!=="<="))return null}for(const b of E){if(R&&!i(b,String(R),_)||u&&!i(b,String(u),_))return null;for(const N of w)if(!i(b,String(N),_))return!1;return!0}let n,m,v,p,y=u&&!_.includePrerelease&&u.semver.prerelease.length?u.semver:!1,$=R&&!_.includePrerelease&&R.semver.prerelease.length?R.semver:!1;y&&y.prerelease.length===1&&u.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const b of w){if(p=p||b.operator===">"||b.operator===">=",v=v||b.operator==="<"||b.operator==="<=",R){if($&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===$.major&&b.semver.minor===$.minor&&b.semver.patch===$.patch&&($=!1),b.operator===">"||b.operator===">="){if(n=c(R,b,_),n===b&&n!==R)return!1}else if(R.operator===">="&&!i(R.semver,String(b),_))return!1}if(u){if(y&&b.semver.prerelease&&b.semver.prerelease.length&&b.semver.major===y.major&&b.semver.minor===y.minor&&b.semver.patch===y.patch&&(y=!1),b.operator==="<"||b.operator==="<="){if(m=d(u,b,_),m===b&&m!==u)return!1}else if(u.operator==="<="&&!i(u.semver,String(b),_))return!1}if(!b.operator&&(u||R)&&h!==0)return!1}return!(R&&v&&!u&&h!==0||u&&p&&!R&&h!==0||$||y)},c=(g,w,_)=>{if(!g)return w;const E=f(g.semver,w.semver,_);return E>0?g:E<0||w.operator===">"&&g.operator===">="?w:g},d=(g,w,_)=>{if(!g)return w;const E=f(g.semver,w.semver,_);return E<0?g:E>0||w.operator==="<"&&g.operator==="<="?w:g};return Ti=s,Ti}var Ci,Il;function Qm(){if(Il)return Ci;Il=1;const e=bt(),t=Cn(),l=$e(),i=yf(),f=ft(),s=Im(),r=Tm(),a=Cm(),o=Dm(),c=Am(),d=Lm(),g=qm(),w=km(),_=Ae(),E=jm(),R=Fm(),u=no(),h=Mm(),n=Um(),m=An(),v=so(),p=vf(),y=_f(),$=io(),b=oo(),N=gf(),L=Vm(),F=Ln(),H=Le(),M=qn(),V=Gm(),z=Km(),J=Hm(),W=xm(),j=Bm(),G=ao(),D=Wm(),O=Jm(),q=Zm(),T=Xm(),S=Ym();return Ci={parse:f,valid:s,clean:r,inc:a,diff:o,major:c,minor:d,patch:g,prerelease:w,compare:_,rcompare:E,compareLoose:R,compareBuild:u,sort:h,rsort:n,gt:m,lt:v,eq:p,neq:y,gte:$,lte:b,cmp:N,coerce:L,Comparator:F,Range:H,satisfies:M,toComparators:V,maxSatisfying:z,minSatisfying:J,minVersion:W,validRange:j,outside:G,gtr:D,ltr:O,intersects:q,simplifyRange:T,subset:S,SemVer:l,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers},Ci}var gt={exports:{}},mn={exports:{}},Tl;function ep(){if(Tl)return mn.exports;Tl=1;const e=(t,l)=>{for(const i of Reflect.ownKeys(l))Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(l,i));return t};return mn.exports=e,mn.exports.default=e,mn.exports}var Cl;function tp(){if(Cl)return gt.exports;Cl=1;const e=ep(),t=new WeakMap,l=(i,f={})=>{if(typeof i!="function")throw new TypeError("Expected a function");let s,r=0;const a=i.displayName||i.name||"<anonymous>",o=function(...c){if(t.set(o,++r),r===1)s=i.apply(this,c),i=null;else if(f.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return s};return e(o,i),t.set(o,r),o};return gt.exports=l,gt.exports.default=l,gt.exports.callCount=i=>{if(!t.has(i))throw new Error(`The given function \`${i.name}\` is not wrapped by the \`onetime\` package`);return t.get(i)},gt.exports}var pn=Et.exports,Dl;function rp(){return Dl||(Dl=1,function(e,t){var l=pn&&pn.__classPrivateFieldSet||function(W,j,G,D,O){if(D==="m")throw new TypeError("Private method is not writable");if(D==="a"&&!O)throw new TypeError("Private accessor was defined without a setter");if(typeof j=="function"?W!==j||!O:!j.has(W))throw new TypeError("Cannot write private member to an object whose class did not declare it");return D==="a"?O.call(W,G):O?O.value=G:j.set(W,G),G},i=pn&&pn.__classPrivateFieldGet||function(W,j,G,D){if(G==="a"&&!D)throw new TypeError("Private accessor was defined without a getter");if(typeof j=="function"?W!==j||!D:!j.has(W))throw new TypeError("Cannot read private member from an object whose class did not declare it");return G==="m"?D:G==="a"?D.call(W):D?D.value:j.get(W)},f,s,r,a,o,c;Object.defineProperty(t,"__esModule",{value:!0});const d=xi,g=ut,w=me,_=Ql,E=Yl,R=bf,u=Yf(),h=id(),n=od(),m=md(),v=$h(),p=Pm(),y=Om(),$=Qm(),b=tp(),N="aes-256-cbc",L=()=>Object.create(null),F=W=>W!=null;let H="";try{delete require.cache[__filename],H=w.dirname((s=(f=e.parent)===null||f===void 0?void 0:f.filename)!==null&&s!==void 0?s:".")}catch{}const M=(W,j)=>{const G=new Set(["undefined","symbol","function"]),D=typeof j;if(G.has(D))throw new TypeError(`Setting a value of type \`${D}\` for key \`${W}\` is not allowed as it's not supported by JSON`)},V="__internal__",z=`${V}.migrations.version`;class J{constructor(j={}){var G;r.set(this,void 0),a.set(this,void 0),o.set(this,void 0),c.set(this,{}),this._deserialize=P=>JSON.parse(P),this._serialize=P=>JSON.stringify(P,void 0," ");const D={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!1,accessPropertiesByDotNotation:!0,configFileMode:438,...j},O=b(()=>{const P=h.sync({cwd:H}),A=P&&JSON.parse(g.readFileSync(P,"utf8"));return A??{}});if(!D.cwd){if(D.projectName||(D.projectName=O().name),!D.projectName)throw new Error("Project name could not be inferred. Please specify the `projectName` option.");D.cwd=n(D.projectName,{suffix:D.projectSuffix}).config}if(l(this,o,D,"f"),D.schema){if(typeof D.schema!="object")throw new TypeError("The `schema` option must be an object.");const P=new v.default({allErrors:!0,useDefaults:!0});(0,p.default)(P);const A={type:"object",properties:D.schema};l(this,r,P.compile(A),"f");for(const[K,B]of Object.entries(D.schema))B?.default&&(i(this,c,"f")[K]=B.default)}D.defaults&&l(this,c,{...i(this,c,"f"),...D.defaults},"f"),D.serialize&&(this._serialize=D.serialize),D.deserialize&&(this._deserialize=D.deserialize),this.events=new R.EventEmitter,l(this,a,D.encryptionKey,"f");const q=D.fileExtension?`.${D.fileExtension}`:"";this.path=w.resolve(D.cwd,`${(G=D.configName)!==null&&G!==void 0?G:"config"}${q}`);const T=this.store,S=Object.assign(L(),D.defaults,T);this._validate(S);try{E.deepEqual(T,S)}catch{this.store=S}if(D.watch&&this._watch(),D.migrations){if(D.projectVersion||(D.projectVersion=O().version),!D.projectVersion)throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.");this._migrate(D.migrations,D.projectVersion,D.beforeEachMigration)}}get(j,G){if(i(this,o,"f").accessPropertiesByDotNotation)return this._get(j,G);const{store:D}=this;return j in D?D[j]:G}set(j,G){if(typeof j!="string"&&typeof j!="object")throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof j}`);if(typeof j!="object"&&G===void 0)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(j))throw new TypeError(`Please don't use the ${V} key, as it's used to manage this module internal operations.`);const{store:D}=this,O=(q,T)=>{M(q,T),i(this,o,"f").accessPropertiesByDotNotation?u.set(D,q,T):D[q]=T};if(typeof j=="object"){const q=j;for(const[T,S]of Object.entries(q))O(T,S)}else O(j,G);this.store=D}has(j){return i(this,o,"f").accessPropertiesByDotNotation?u.has(this.store,j):j in this.store}reset(...j){for(const G of j)F(i(this,c,"f")[G])&&this.set(G,i(this,c,"f")[G])}delete(j){const{store:G}=this;i(this,o,"f").accessPropertiesByDotNotation?u.delete(G,j):delete G[j],this.store=G}clear(){this.store=L();for(const j of Object.keys(i(this,c,"f")))this.reset(j)}onDidChange(j,G){if(typeof j!="string")throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof j}`);if(typeof G!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof G}`);return this._handleChange(()=>this.get(j),G)}onDidAnyChange(j){if(typeof j!="function")throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof j}`);return this._handleChange(()=>this.store,j)}get size(){return Object.keys(this.store).length}get store(){try{const j=g.readFileSync(this.path,i(this,a,"f")?null:"utf8"),G=this._encryptData(j),D=this._deserialize(G);return this._validate(D),Object.assign(L(),D)}catch(j){if(j?.code==="ENOENT")return this._ensureDirectory(),L();if(i(this,o,"f").clearInvalidConfig&&j.name==="SyntaxError")return L();throw j}}set store(j){this._ensureDirectory(),this._validate(j),this._write(j),this.events.emit("change")}*[(r=new WeakMap,a=new WeakMap,o=new WeakMap,c=new WeakMap,Symbol.iterator)](){for(const[j,G]of Object.entries(this.store))yield[j,G]}_encryptData(j){if(!i(this,a,"f"))return j.toString();try{if(i(this,a,"f"))try{if(j.slice(16,17).toString()===":"){const G=j.slice(0,16),D=_.pbkdf2Sync(i(this,a,"f"),G.toString(),1e4,32,"sha512"),O=_.createDecipheriv(N,D,G);j=Buffer.concat([O.update(Buffer.from(j.slice(17))),O.final()]).toString("utf8")}else{const G=_.createDecipher(N,i(this,a,"f"));j=Buffer.concat([G.update(Buffer.from(j)),G.final()]).toString("utf8")}}catch{}}catch{}return j.toString()}_handleChange(j,G){let D=j();const O=()=>{const q=D,T=j();(0,d.isDeepStrictEqual)(T,q)||(D=T,G.call(this,T,q))};return this.events.on("change",O),()=>this.events.removeListener("change",O)}_validate(j){if(!i(this,r,"f")||i(this,r,"f").call(this,j)||!i(this,r,"f").errors)return;const D=i(this,r,"f").errors.map(({instancePath:O,message:q=""})=>`\`${O.slice(1)}\` ${q}`);throw new Error("Config schema violation: "+D.join("; "))}_ensureDirectory(){g.mkdirSync(w.dirname(this.path),{recursive:!0})}_write(j){let G=this._serialize(j);if(i(this,a,"f")){const D=_.randomBytes(16),O=_.pbkdf2Sync(i(this,a,"f"),D.toString(),1e4,32,"sha512"),q=_.createCipheriv(N,O,D);G=Buffer.concat([D,Buffer.from(":"),q.update(Buffer.from(G)),q.final()])}if(process.env.SNAP)g.writeFileSync(this.path,G,{mode:i(this,o,"f").configFileMode});else try{m.writeFileSync(this.path,G,{mode:i(this,o,"f").configFileMode})}catch(D){if(D?.code==="EXDEV"){g.writeFileSync(this.path,G,{mode:i(this,o,"f").configFileMode});return}throw D}}_watch(){this._ensureDirectory(),g.existsSync(this.path)||this._write(L()),process.platform==="win32"?g.watch(this.path,{persistent:!1},y(()=>{this.events.emit("change")},{wait:100})):g.watchFile(this.path,{persistent:!1},y(()=>{this.events.emit("change")},{wait:5e3}))}_migrate(j,G,D){let O=this._get(z,"0.0.0");const q=Object.keys(j).filter(S=>this._shouldPerformMigration(S,O,G));let T={...this.store};for(const S of q)try{D&&D(this,{fromVersion:O,toVersion:S,finalVersion:G,versions:q});const P=j[S];P(this),this._set(z,S),O=S,T={...this.store}}catch(P){throw this.store=T,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${P}`)}(this._isVersionInRangeFormat(O)||!$.eq(O,G))&&this._set(z,G)}_containsReservedKey(j){return typeof j=="object"&&Object.keys(j)[0]===V?!0:typeof j!="string"?!1:i(this,o,"f").accessPropertiesByDotNotation?!!j.startsWith(`${V}.`):!1}_isVersionInRangeFormat(j){return $.clean(j)===null}_shouldPerformMigration(j,G,D){return this._isVersionInRangeFormat(j)?G!=="0.0.0"&&$.satisfies(G,j)?!1:$.satisfies(D,j):!($.lte(j,G)||$.gt(j,D))}_get(j,G){return u.get(this.store,j,G)}_set(j,G){const{store:D}=this;u.set(D,j,G),this.store=D}}t.default=J,e.exports=J,e.exports.default=J}(Et,Et.exports)),Et.exports}var Di,Al;function np(){if(Al)return Di;Al=1;const e=me,{app:t,ipcMain:l,ipcRenderer:i,shell:f}=Pe,s=rp();let r=!1;const a=()=>{if(!l||!t)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");const c={defaultCwd:t.getPath("userData"),appVersion:t.getVersion()};return r||(l.on("electron-store-get-data",d=>{d.returnValue=c}),r=!0),c};class o extends s{constructor(d){let g,w;if(i){const _=i.sendSync("electron-store-get-data");if(!_)throw new Error("Electron Store: You need to call `.initRenderer()` from the main process.");({defaultCwd:g,appVersion:w}=_)}else l&&t&&({defaultCwd:g,appVersion:w}=a());d={name:"config",...d},d.projectVersion||(d.projectVersion=w),d.cwd?d.cwd=e.isAbsolute(d.cwd)?d.cwd:e.join(g,d.cwd):d.cwd=g,d.configName=d.name,delete d.name,super(d)}static initRenderer(){a()}async openInEditor(){const d=await f.openPath(this.path);if(d)throw new Error(d)}}return Di=o,Di}var sp=np();const Ll=tf(sp);var nt={exports:{}},Ai,ql;function $f(){return ql||(ql=1,Ai={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,END64HDR:20,END64SIG:117853008,END64START:4,END64OFF:8,END64NUMDISKS:16,ZIP64SIG:101075792,ZIP64HDR:56,ZIP64LEAD:12,ZIP64SIZE:4,ZIP64VEM:12,ZIP64VER:14,ZIP64DSK:16,ZIP64DSKDIR:20,ZIP64SUB:24,ZIP64TOT:32,ZIP64SIZB:40,ZIP64OFF:48,ZIP64EXTRA:56,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,AES_ENCRYPT:99,FLG_ENC:1,FLG_COMP1:2,FLG_COMP2:4,FLG_DESC:8,FLG_ENH:16,FLG_PATCH:32,FLG_STR:64,FLG_EFS:2048,FLG_MSK:4096,FILE:2,BUFFER:1,NONE:0,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535,EF_ZIP64_SUNCOMP:0,EF_ZIP64_SCOMP:8,EF_ZIP64_RHO:16,EF_ZIP64_DSN:24}),Ai}var Li={},kl;function co(){return kl||(kl=1,function(e){const t={INVALID_LOC:"Invalid LOC header (bad signature)",INVALID_CEN:"Invalid CEN header (bad signature)",INVALID_END:"Invalid END header (bad signature)",DESCRIPTOR_NOT_EXIST:"No descriptor present",DESCRIPTOR_UNKNOWN:"Unknown descriptor format",DESCRIPTOR_FAULTY:"Descriptor data is malformed",NO_DATA:"Nothing to decompress",BAD_CRC:"CRC32 checksum failed {0}",FILE_IN_THE_WAY:"There is a file in the way: {0}",UNKNOWN_METHOD:"Invalid/unsupported compression method",AVAIL_DATA:"inflate::Available inflate data did not terminate",INVALID_DISTANCE:"inflate::Invalid literal/length or distance code in fixed or dynamic block",TO_MANY_CODES:"inflate::Dynamic block code description: too many length or distance codes",INVALID_REPEAT_LEN:"inflate::Dynamic block code description: repeat more than specified lengths",INVALID_REPEAT_FIRST:"inflate::Dynamic block code description: repeat lengths with no first length",INCOMPLETE_CODES:"inflate::Dynamic block code description: code lengths codes incomplete",INVALID_DYN_DISTANCE:"inflate::Dynamic block code description: invalid distance code lengths",INVALID_CODES_LEN:"inflate::Dynamic block code description: invalid literal/length code lengths",INVALID_STORE_BLOCK:"inflate::Stored block length did not match one's complement",INVALID_BLOCK_TYPE:"inflate::Invalid block type (type == 3)",CANT_EXTRACT_FILE:"Could not extract the file",CANT_OVERRIDE:"Target file already exists",DISK_ENTRY_TOO_LARGE:"Number of disk entries is too large",NO_ZIP:"No zip file was loaded",NO_ENTRY:"Entry doesn't exist",DIRECTORY_CONTENT_ERROR:"A directory cannot have content",FILE_NOT_FOUND:'File not found: "{0}"',NOT_IMPLEMENTED:"Not implemented",INVALID_FILENAME:"Invalid filename",INVALID_FORMAT:"Invalid or unsupported zip format. No END header found",INVALID_PASS_PARAM:"Incompatible password parameter",WRONG_PASSWORD:"Wrong Password",COMMENT_TOO_LONG:"Comment is too long",EXTRA_FIELD_PARSE_ERROR:"Extra field parsing error"};function l(i){return function(...f){return f.length&&(i=i.replace(/\{(\d)\}/g,(s,r)=>f[r]||"")),new Error("ADM-ZIP: "+i)}}for(const i of Object.keys(t))e[i]=l(t[i])}(Li)),Li}var qi,jl;function ip(){if(jl)return qi;jl=1;const e=ut,t=me,l=$f(),i=co(),f=typeof process=="object"&&process.platform==="win32",s=o=>typeof o=="object"&&o!==null,r=new Uint32Array(256).map((o,c)=>{for(let d=0;d<8;d++)(c&1)!==0?c=3988292384^c>>>1:c>>>=1;return c>>>0});function a(o){this.sep=t.sep,this.fs=e,s(o)&&s(o.fs)&&typeof o.fs.statSync=="function"&&(this.fs=o.fs)}return qi=a,a.prototype.makeDir=function(o){const c=this;function d(g){let w=g.split(c.sep)[0];g.split(c.sep).forEach(function(_){if(!(!_||_.substr(-1,1)===":")){w+=c.sep+_;var E;try{E=c.fs.statSync(w)}catch{c.fs.mkdirSync(w)}if(E&&E.isFile())throw i.FILE_IN_THE_WAY(`"${w}"`)}})}d(o)},a.prototype.writeFileTo=function(o,c,d,g){const w=this;if(w.fs.existsSync(o)){if(!d)return!1;var _=w.fs.statSync(o);if(_.isDirectory())return!1}var E=t.dirname(o);w.fs.existsSync(E)||w.makeDir(E);var R;try{R=w.fs.openSync(o,"w",438)}catch{w.fs.chmodSync(o,438),R=w.fs.openSync(o,"w",438)}if(R)try{w.fs.writeSync(R,c,0,c.length,0)}finally{w.fs.closeSync(R)}return w.fs.chmodSync(o,g||438),!0},a.prototype.writeFileToAsync=function(o,c,d,g,w){typeof g=="function"&&(w=g,g=void 0);const _=this;_.fs.exists(o,function(E){if(E&&!d)return w(!1);_.fs.stat(o,function(R,u){if(E&&u.isDirectory())return w(!1);var h=t.dirname(o);_.fs.exists(h,function(n){n||_.makeDir(h),_.fs.open(o,"w",438,function(m,v){m?_.fs.chmod(o,438,function(){_.fs.open(o,"w",438,function(p,y){_.fs.write(y,c,0,c.length,0,function(){_.fs.close(y,function(){_.fs.chmod(o,g||438,function(){w(!0)})})})})}):v?_.fs.write(v,c,0,c.length,0,function(){_.fs.close(v,function(){_.fs.chmod(o,g||438,function(){w(!0)})})}):_.fs.chmod(o,g||438,function(){w(!0)})})})})})},a.prototype.findFiles=function(o){const c=this;function d(g,w,_){let E=[];return c.fs.readdirSync(g).forEach(function(R){const u=t.join(g,R),h=c.fs.statSync(u);E.push(t.normalize(u)+(h.isDirectory()?c.sep:"")),h.isDirectory()&&_&&(E=E.concat(d(u,w,_)))}),E}return d(o,void 0,!0)},a.prototype.findFilesAsync=function(o,c){const d=this;let g=[];d.fs.readdir(o,function(w,_){if(w)return c(w);let E=_.length;if(!E)return c(null,g);_.forEach(function(R){R=t.join(o,R),d.fs.stat(R,function(u,h){if(u)return c(u);h&&(g.push(t.normalize(R)+(h.isDirectory()?d.sep:"")),h.isDirectory()?d.findFilesAsync(R,function(n,m){if(n)return c(n);g=g.concat(m),--E||c(null,g)}):--E||c(null,g))})})})},a.prototype.getAttributes=function(){},a.prototype.setAttributes=function(){},a.crc32update=function(o,c){return r[(o^c)&255]^o>>>8},a.crc32=function(o){typeof o=="string"&&(o=Buffer.from(o,"utf8"));let c=o.length,d=-1;for(let g=0;g<c;)d=a.crc32update(d,o[g++]);return~d>>>0},a.methodToString=function(o){switch(o){case l.STORED:return"STORED ("+o+")";case l.DEFLATED:return"DEFLATED ("+o+")";default:return"UNSUPPORTED ("+o+")"}},a.canonical=function(o){if(!o)return"";const c=t.posix.normalize("/"+o.split("\\").join("/"));return t.join(".",c)},a.zipnamefix=function(o){if(!o)return"";const c=t.posix.normalize("/"+o.split("\\").join("/"));return t.posix.join(".",c)},a.findLast=function(o,c){if(!Array.isArray(o))throw new TypeError("arr is not array");const d=o.length>>>0;for(let g=d-1;g>=0;g--)if(c(o[g],g,o))return o[g]},a.sanitize=function(o,c){o=t.resolve(t.normalize(o));for(var d=c.split("/"),g=0,w=d.length;g<w;g++){var _=t.normalize(t.join(o,d.slice(g,w).join(t.sep)));if(_.indexOf(o)===0)return _}return t.normalize(t.join(o,t.basename(c)))},a.toBuffer=function(c,d){return Buffer.isBuffer(c)?c:c instanceof Uint8Array?Buffer.from(c):typeof c=="string"?d(c):Buffer.alloc(0)},a.readBigUInt64LE=function(o,c){var d=Buffer.from(o.slice(c,c+8));return d.swap64(),parseInt(`0x${d.toString("hex")}`)},a.fromDOS2Date=function(o){return new Date((o>>25&127)+1980,Math.max((o>>21&15)-1,0),Math.max(o>>16&31,1),o>>11&31,o>>5&63,(o&31)<<1)},a.fromDate2DOS=function(o){let c=0,d=0;return o.getFullYear()>1979&&(c=(o.getFullYear()-1980&127)<<9|o.getMonth()+1<<5|o.getDate(),d=o.getHours()<<11|o.getMinutes()<<5|o.getSeconds()>>1),c<<16|d},a.isWin=f,a.crcTable=r,qi}var ki,Fl;function op(){if(Fl)return ki;Fl=1;const e=me;return ki=function(t,{fs:l}){var i=t||"",f=r(),s=null;function r(){return{directory:!1,readonly:!1,hidden:!1,executable:!1,mtime:0,atime:0}}return i&&l.existsSync(i)?(s=l.statSync(i),f.directory=s.isDirectory(),f.mtime=s.mtime,f.atime=s.atime,f.executable=(73&s.mode)!==0,f.readonly=(128&s.mode)===0,f.hidden=e.basename(i)[0]==="."):console.warn("Invalid path: "+i),{get directory(){return f.directory},get readOnly(){return f.readonly},get hidden(){return f.hidden},get mtime(){return f.mtime},get atime(){return f.atime},get executable(){return f.executable},decodeAttributes:function(){},encodeAttributes:function(){},toJSON:function(){return{path:i,isDirectory:f.directory,isReadOnly:f.readonly,isHidden:f.hidden,isExecutable:f.executable,mTime:f.mtime,aTime:f.atime}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},ki}var ji,Ml;function ap(){return Ml||(Ml=1,ji={efs:!0,encode:e=>Buffer.from(e,"utf8"),decode:e=>e.toString("utf8")}),ji}var Ul;function Pt(){return Ul||(Ul=1,nt.exports=ip(),nt.exports.Constants=$f(),nt.exports.Errors=co(),nt.exports.FileAttr=op(),nt.exports.decoder=ap()),nt.exports}var yn={},Fi,Vl;function cp(){if(Vl)return Fi;Vl=1;var e=Pt(),t=e.Constants;return Fi=function(){var l=20,i=10,f=0,s=0,r=0,a=0,o=0,c=0,d=0,g=0,w=0,_=0,E=0,R=0,u=0;l|=e.isWin?2560:768,f|=t.FLG_EFS;const h={extraLen:0},n=v=>Math.max(0,v)>>>0,m=v=>Math.max(0,v)&255;return r=e.fromDate2DOS(new Date),{get made(){return l},set made(v){l=v},get version(){return i},set version(v){i=v},get flags(){return f},set flags(v){f=v},get flags_efs(){return(f&t.FLG_EFS)>0},set flags_efs(v){v?f|=t.FLG_EFS:f&=~t.FLG_EFS},get flags_desc(){return(f&t.FLG_DESC)>0},set flags_desc(v){v?f|=t.FLG_DESC:f&=~t.FLG_DESC},get method(){return s},set method(v){switch(v){case t.STORED:this.version=10;case t.DEFLATED:default:this.version=20}s=v},get time(){return e.fromDOS2Date(this.timeval)},set time(v){this.timeval=e.fromDate2DOS(v)},get timeval(){return r},set timeval(v){r=n(v)},get timeHighByte(){return m(r>>>8)},get crc(){return a},set crc(v){a=n(v)},get compressedSize(){return o},set compressedSize(v){o=n(v)},get size(){return c},set size(v){c=n(v)},get fileNameLength(){return d},set fileNameLength(v){d=v},get extraLength(){return g},set extraLength(v){g=v},get extraLocalLength(){return h.extraLen},set extraLocalLength(v){h.extraLen=v},get commentLength(){return w},set commentLength(v){w=v},get diskNumStart(){return _},set diskNumStart(v){_=n(v)},get inAttr(){return E},set inAttr(v){E=n(v)},get attr(){return R},set attr(v){R=n(v)},get fileAttr(){return(R||0)>>16&4095},get offset(){return u},set offset(v){u=n(v)},get encrypted(){return(f&t.FLG_ENC)===t.FLG_ENC},get centralHeaderSize(){return t.CENHDR+d+g+w},get realDataOffset(){return u+t.LOCHDR+h.fnameLen+h.extraLen},get localHeader(){return h},loadLocalHeaderFromBinary:function(v){var p=v.slice(u,u+t.LOCHDR);if(p.readUInt32LE(0)!==t.LOCSIG)throw e.Errors.INVALID_LOC();h.version=p.readUInt16LE(t.LOCVER),h.flags=p.readUInt16LE(t.LOCFLG),h.method=p.readUInt16LE(t.LOCHOW),h.time=p.readUInt32LE(t.LOCTIM),h.crc=p.readUInt32LE(t.LOCCRC),h.compressedSize=p.readUInt32LE(t.LOCSIZ),h.size=p.readUInt32LE(t.LOCLEN),h.fnameLen=p.readUInt16LE(t.LOCNAM),h.extraLen=p.readUInt16LE(t.LOCEXT);const y=u+t.LOCHDR+h.fnameLen,$=y+h.extraLen;return v.slice(y,$)},loadFromBinary:function(v){if(v.length!==t.CENHDR||v.readUInt32LE(0)!==t.CENSIG)throw e.Errors.INVALID_CEN();l=v.readUInt16LE(t.CENVEM),i=v.readUInt16LE(t.CENVER),f=v.readUInt16LE(t.CENFLG),s=v.readUInt16LE(t.CENHOW),r=v.readUInt32LE(t.CENTIM),a=v.readUInt32LE(t.CENCRC),o=v.readUInt32LE(t.CENSIZ),c=v.readUInt32LE(t.CENLEN),d=v.readUInt16LE(t.CENNAM),g=v.readUInt16LE(t.CENEXT),w=v.readUInt16LE(t.CENCOM),_=v.readUInt16LE(t.CENDSK),E=v.readUInt16LE(t.CENATT),R=v.readUInt32LE(t.CENATX),u=v.readUInt32LE(t.CENOFF)},localHeaderToBinary:function(){var v=Buffer.alloc(t.LOCHDR);return v.writeUInt32LE(t.LOCSIG,0),v.writeUInt16LE(i,t.LOCVER),v.writeUInt16LE(f,t.LOCFLG),v.writeUInt16LE(s,t.LOCHOW),v.writeUInt32LE(r,t.LOCTIM),v.writeUInt32LE(a,t.LOCCRC),v.writeUInt32LE(o,t.LOCSIZ),v.writeUInt32LE(c,t.LOCLEN),v.writeUInt16LE(d,t.LOCNAM),v.writeUInt16LE(h.extraLen,t.LOCEXT),v},centralHeaderToBinary:function(){var v=Buffer.alloc(t.CENHDR+d+g+w);return v.writeUInt32LE(t.CENSIG,0),v.writeUInt16LE(l,t.CENVEM),v.writeUInt16LE(i,t.CENVER),v.writeUInt16LE(f,t.CENFLG),v.writeUInt16LE(s,t.CENHOW),v.writeUInt32LE(r,t.CENTIM),v.writeUInt32LE(a,t.CENCRC),v.writeUInt32LE(o,t.CENSIZ),v.writeUInt32LE(c,t.CENLEN),v.writeUInt16LE(d,t.CENNAM),v.writeUInt16LE(g,t.CENEXT),v.writeUInt16LE(w,t.CENCOM),v.writeUInt16LE(_,t.CENDSK),v.writeUInt16LE(E,t.CENATT),v.writeUInt32LE(R,t.CENATX),v.writeUInt32LE(u,t.CENOFF),v},toJSON:function(){const v=function(p){return p+" bytes"};return{made:l,version:i,flags:f,method:e.methodToString(s),time:this.time,crc:"0x"+a.toString(16).toUpperCase(),compressedSize:v(o),size:v(c),fileNameLength:v(d),extraLength:v(g),commentLength:v(w),diskNumStart:_,inAttr:E,attr:R,offset:u,centralHeaderSize:v(t.CENHDR+d+g+w)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Fi}var Mi,zl;function up(){if(zl)return Mi;zl=1;var e=Pt(),t=e.Constants;return Mi=function(){var l=0,i=0,f=0,s=0,r=0;return{get diskEntries(){return l},set diskEntries(a){l=i=a},get totalEntries(){return i},set totalEntries(a){i=l=a},get size(){return f},set size(a){f=a},get offset(){return s},set offset(a){s=a},get commentLength(){return r},set commentLength(a){r=a},get mainHeaderSize(){return t.ENDHDR+r},loadFromBinary:function(a){if((a.length!==t.ENDHDR||a.readUInt32LE(0)!==t.ENDSIG)&&(a.length<t.ZIP64HDR||a.readUInt32LE(0)!==t.ZIP64SIG))throw e.Errors.INVALID_END();a.readUInt32LE(0)===t.ENDSIG?(l=a.readUInt16LE(t.ENDSUB),i=a.readUInt16LE(t.ENDTOT),f=a.readUInt32LE(t.ENDSIZ),s=a.readUInt32LE(t.ENDOFF),r=a.readUInt16LE(t.ENDCOM)):(l=e.readBigUInt64LE(a,t.ZIP64SUB),i=e.readBigUInt64LE(a,t.ZIP64TOT),f=e.readBigUInt64LE(a,t.ZIP64SIZE),s=e.readBigUInt64LE(a,t.ZIP64OFF),r=0)},toBinary:function(){var a=Buffer.alloc(t.ENDHDR+r);return a.writeUInt32LE(t.ENDSIG,0),a.writeUInt32LE(0,4),a.writeUInt16LE(l,t.ENDSUB),a.writeUInt16LE(i,t.ENDTOT),a.writeUInt32LE(f,t.ENDSIZ),a.writeUInt32LE(s,t.ENDOFF),a.writeUInt16LE(r,t.ENDCOM),a.fill(" ",t.ENDHDR),a},toJSON:function(){const a=function(o,c){let d=o.toString(16).toUpperCase();for(;d.length<c;)d="0"+d;return"0x"+d};return{diskEntries:l,totalEntries:i,size:f+" bytes",offset:a(s,4),commentLength:r}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Mi}var Gl;function Ef(){return Gl||(Gl=1,yn.EntryHeader=cp(),yn.MainHeader=up()),yn}var $t={},Ui,Kl;function lp(){return Kl||(Kl=1,Ui=function(e){var t=ef,l={chunkSize:(parseInt(e.length/1024)+1)*1024};return{deflate:function(){return t.deflateRawSync(e,l)},deflateAsync:function(i){var f=t.createDeflateRaw(l),s=[],r=0;f.on("data",function(a){s.push(a),r+=a.length}),f.on("end",function(){var a=Buffer.alloc(r),o=0;a.fill(0);for(var c=0;c<s.length;c++){var d=s[c];d.copy(a,o),o+=d.length}i&&i(a)}),f.end(e)}}}),Ui}var Vi,Hl;function fp(){if(Hl)return Vi;Hl=1;const e=+(process.versions?process.versions.node:"").split(".")[0]||0;return Vi=function(t,l){var i=ef;const f=e>=15&&l>0?{maxOutputLength:l}:{};return{inflate:function(){return i.inflateRawSync(t,f)},inflateAsync:function(s){var r=i.createInflateRaw(f),a=[],o=0;r.on("data",function(c){a.push(c),o+=c.length}),r.on("end",function(){var c=Buffer.alloc(o),d=0;c.fill(0);for(var g=0;g<a.length;g++){var w=a[g];w.copy(c,d),d+=w.length}s&&s(c)}),r.end(t)}}},Vi}var zi,xl;function dp(){if(xl)return zi;xl=1;const{randomFillSync:e}=Ql,t=co(),l=new Uint32Array(256).map((_,E)=>{for(let R=0;R<8;R++)(E&1)!==0?E=E>>>1^3988292384:E>>>=1;return E>>>0}),i=(_,E)=>Math.imul(_,E)>>>0,f=(_,E)=>l[(_^E)&255]^_>>>8,s=()=>typeof e=="function"?e(Buffer.alloc(12)):s.node();s.node=()=>{const _=Buffer.alloc(12),E=_.length;for(let R=0;R<E;R++)_[R]=Math.random()*256&255;return _};const r={genSalt:s};function a(_){const E=Buffer.isBuffer(_)?_:Buffer.from(_);this.keys=new Uint32Array([305419896,591751049,878082192]);for(let R=0;R<E.length;R++)this.updateKeys(E[R])}a.prototype.updateKeys=function(_){const E=this.keys;return E[0]=f(E[0],_),E[1]+=E[0]&255,E[1]=i(E[1],134775813)+1,E[2]=f(E[2],E[1]>>>24),_},a.prototype.next=function(){const _=(this.keys[2]|2)>>>0;return i(_,_^1)>>8&255};function o(_){const E=new a(_);return function(R){const u=Buffer.alloc(R.length);let h=0;for(let n of R)u[h++]=E.updateKeys(n^E.next());return u}}function c(_){const E=new a(_);return function(R,u,h=0){u||(u=Buffer.alloc(R.length));for(let n of R){const m=E.next();u[h++]=n^m,E.updateKeys(n)}return u}}function d(_,E,R){if(!_||!Buffer.isBuffer(_)||_.length<12)return Buffer.alloc(0);const u=o(R),h=u(_.slice(0,12)),n=(E.flags&8)===8?E.timeHighByte:E.crc>>>24;if(h[11]!==n)throw t.WRONG_PASSWORD();return u(_.slice(12))}function g(_){Buffer.isBuffer(_)&&_.length>=12?r.genSalt=function(){return _.slice(0,12)}:_==="node"?r.genSalt=s.node:r.genSalt=s}function w(_,E,R,u=!1){_==null&&(_=Buffer.alloc(0)),Buffer.isBuffer(_)||(_=Buffer.from(_.toString()));const h=c(R),n=r.genSalt();n[11]=E.crc>>>24&255,u&&(n[10]=E.crc>>>16&255);const m=Buffer.alloc(_.length+12);return h(n,m),h(_,m,12)}return zi={decrypt:d,encrypt:w,_salter:g},zi}var Bl;function hp(){return Bl||(Bl=1,$t.Deflater=lp(),$t.Inflater=fp(),$t.ZipCrypto=dp()),$t}var Gi,Wl;function wf(){if(Wl)return Gi;Wl=1;var e=Pt(),t=Ef(),l=e.Constants,i=hp();return Gi=function(f,s){var r=new t.EntryHeader,a=Buffer.alloc(0),o=Buffer.alloc(0),c=!1,d=null,g=Buffer.alloc(0),w=Buffer.alloc(0),_=!0;const E=f,R=typeof E.decoder=="object"?E.decoder:e.decoder;_=R.hasOwnProperty("efs")?R.efs:!1;function u(){return!s||!(s instanceof Uint8Array)?Buffer.alloc(0):(w=r.loadLocalHeaderFromBinary(s),s.slice(r.realDataOffset,r.realDataOffset+r.compressedSize))}function h($){if(r.flags_desc){const b={},N=r.realDataOffset+r.compressedSize;if(s.readUInt32LE(N)==l.LOCSIG||s.readUInt32LE(N)==l.CENSIG)throw e.Errors.DESCRIPTOR_NOT_EXIST();if(s.readUInt32LE(N)==l.EXTSIG)b.crc=s.readUInt32LE(N+l.EXTCRC),b.compressedSize=s.readUInt32LE(N+l.EXTSIZ),b.size=s.readUInt32LE(N+l.EXTLEN);else if(s.readUInt16LE(N+12)===19280)b.crc=s.readUInt32LE(N+l.EXTCRC-4),b.compressedSize=s.readUInt32LE(N+l.EXTSIZ-4),b.size=s.readUInt32LE(N+l.EXTLEN-4);else throw e.Errors.DESCRIPTOR_UNKNOWN();if(b.compressedSize!==r.compressedSize||b.size!==r.size||b.crc!==r.crc)throw e.Errors.DESCRIPTOR_FAULTY();if(e.crc32($)!==b.crc)return!1}else if(e.crc32($)!==r.localHeader.crc)return!1;return!0}function n($,b,N){if(typeof b>"u"&&typeof $=="string"&&(N=$,$=void 0),c)return $&&b&&b(Buffer.alloc(0),e.Errors.DIRECTORY_CONTENT_ERROR()),Buffer.alloc(0);var L=u();if(L.length===0)return $&&b&&b(L),L;if(r.encrypted){if(typeof N!="string"&&!Buffer.isBuffer(N))throw e.Errors.INVALID_PASS_PARAM();L=i.ZipCrypto.decrypt(L,r,N)}var F=Buffer.alloc(r.size);switch(r.method){case e.Constants.STORED:if(L.copy(F),h(F))return $&&b&&b(F),F;throw $&&b&&b(F,e.Errors.BAD_CRC()),e.Errors.BAD_CRC();case e.Constants.DEFLATED:var H=new i.Inflater(L,r.size);if($)H.inflateAsync(function(M){M.copy(M,0),b&&(h(M)?b(M):b(M,e.Errors.BAD_CRC()))});else{if(H.inflate(F).copy(F,0),!h(F))throw e.Errors.BAD_CRC(`"${R.decode(a)}"`);return F}break;default:throw $&&b&&b(Buffer.alloc(0),e.Errors.UNKNOWN_METHOD()),e.Errors.UNKNOWN_METHOD()}}function m($,b){if((!d||!d.length)&&Buffer.isBuffer(s))return $&&b&&b(u()),u();if(d.length&&!c){var N;switch(r.method){case e.Constants.STORED:return r.compressedSize=r.size,N=Buffer.alloc(d.length),d.copy(N),$&&b&&b(N),N;default:case e.Constants.DEFLATED:var L=new i.Deflater(d);if($)L.deflateAsync(function(H){N=Buffer.alloc(H.length),r.compressedSize=H.length,H.copy(N),b&&b(N)});else{var F=L.deflate();return r.compressedSize=F.length,F}L=null;break}}else if($&&b)b(Buffer.alloc(0));else return Buffer.alloc(0)}function v($,b){return($.readUInt32LE(b+4)<<4)+$.readUInt32LE(b)}function p($){try{for(var b=0,N,L,F;b+4<$.length;)N=$.readUInt16LE(b),b+=2,L=$.readUInt16LE(b),b+=2,F=$.slice(b,b+L),b+=L,l.ID_ZIP64===N&&y(F)}catch{throw e.Errors.EXTRA_FIELD_PARSE_ERROR()}}function y($){var b,N,L,F;$.length>=l.EF_ZIP64_SCOMP&&(b=v($,l.EF_ZIP64_SUNCOMP),r.size===l.EF_ZIP64_OR_32&&(r.size=b)),$.length>=l.EF_ZIP64_RHO&&(N=v($,l.EF_ZIP64_SCOMP),r.compressedSize===l.EF_ZIP64_OR_32&&(r.compressedSize=N)),$.length>=l.EF_ZIP64_DSN&&(L=v($,l.EF_ZIP64_RHO),r.offset===l.EF_ZIP64_OR_32&&(r.offset=L)),$.length>=l.EF_ZIP64_DSN+4&&(F=$.readUInt32LE(l.EF_ZIP64_DSN),r.diskNumStart===l.EF_ZIP64_OR_16&&(r.diskNumStart=F))}return{get entryName(){return R.decode(a)},get rawEntryName(){return a},set entryName($){a=e.toBuffer($,R.encode);var b=a[a.length-1];c=b===47||b===92,r.fileNameLength=a.length},get efs(){return typeof _=="function"?_(this.entryName):_},get extra(){return g},set extra($){g=$,r.extraLength=$.length,p($)},get comment(){return R.decode(o)},set comment($){if(o=e.toBuffer($,R.encode),r.commentLength=o.length,o.length>65535)throw e.Errors.COMMENT_TOO_LONG()},get name(){var $=R.decode(a);return c?$.substr($.length-1).split("/").pop():$.split("/").pop()},get isDirectory(){return c},getCompressedData:function(){return m(!1,null)},getCompressedDataAsync:function($){m(!0,$)},setData:function($){d=e.toBuffer($,e.decoder.encode),!c&&d.length?(r.size=d.length,r.method=e.Constants.DEFLATED,r.crc=e.crc32($),r.changed=!0):r.method=e.Constants.STORED},getData:function($){return r.changed?d:n(!1,null,$)},getDataAsync:function($,b){r.changed?$(d):n(!0,$,b)},set attr($){r.attr=$},get attr(){return r.attr},set header($){r.loadFromBinary($)},get header(){return r},packCentralHeader:function(){r.flags_efs=this.efs,r.extraLength=g.length;var $=r.centralHeaderToBinary(),b=e.Constants.CENHDR;return a.copy($,b),b+=a.length,g.copy($,b),b+=r.extraLength,o.copy($,b),$},packLocalHeader:function(){let $=0;r.flags_efs=this.efs,r.extraLocalLength=w.length;const b=r.localHeaderToBinary(),N=Buffer.alloc(b.length+a.length+r.extraLocalLength);return b.copy(N,$),$+=b.length,a.copy(N,$),$+=a.length,w.copy(N,$),$+=w.length,N},toJSON:function(){const $=function(b){return"<"+(b&&b.length+" bytes buffer"||"null")+">"};return{entryName:this.entryName,name:this.name,comment:this.comment,isDirectory:this.isDirectory,header:r.toJSON(),compressedData:$(s),data:$(d)}},toString:function(){return JSON.stringify(this.toJSON(),null," ")}}},Gi}var Ki,Jl;function mp(){if(Jl)return Ki;Jl=1;const e=wf(),t=Ef(),l=Pt();return Ki=function(i,f){var s=[],r={},a=Buffer.alloc(0),o=new t.MainHeader,c=!1;const d=new Set,g=f,{noSort:w,decoder:_}=g;i?u(g.readEntries):c=!0;function E(){const n=new Set;for(const m of Object.keys(r)){const v=m.split("/");if(v.pop(),!!v.length)for(let p=0;p<v.length;p++){const y=v.slice(0,p+1).join("/")+"/";n.add(y)}}for(const m of n)if(!(m in r)){const v=new e(g);v.entryName=m,v.attr=16,v.temporary=!0,s.push(v),r[v.entryName]=v,d.add(v)}}function R(){if(c=!0,r={},o.diskEntries>(i.length-o.offset)/l.Constants.CENHDR)throw l.Errors.DISK_ENTRY_TOO_LARGE();s=new Array(o.diskEntries);for(var n=o.offset,m=0;m<s.length;m++){var v=n,p=new e(g,i);p.header=i.slice(v,v+=l.Constants.CENHDR),p.entryName=i.slice(v,v+=p.header.fileNameLength),p.header.extraLength&&(p.extra=i.slice(v,v+=p.header.extraLength)),p.header.commentLength&&(p.comment=i.slice(v,v+p.header.commentLength)),n+=p.header.centralHeaderSize,s[m]=p,r[p.entryName]=p}d.clear(),E()}function u(n){var m=i.length-l.Constants.ENDHDR,v=Math.max(0,m-65535),p=v,y=i.length,$=-1,b=0;for((typeof g.trailingSpace=="boolean"?g.trailingSpace:!1)&&(v=0),m;m>=p;m--)if(i[m]===80){if(i.readUInt32LE(m)===l.Constants.ENDSIG){$=m,b=m,y=m+l.Constants.ENDHDR,p=m-l.Constants.END64HDR;continue}if(i.readUInt32LE(m)===l.Constants.END64SIG){p=v;continue}if(i.readUInt32LE(m)===l.Constants.ZIP64SIG){$=m,y=m+l.readBigUInt64LE(i,m+l.Constants.ZIP64SIZE)+l.Constants.ZIP64LEAD;break}}if($==-1)throw l.Errors.INVALID_FORMAT();o.loadFromBinary(i.slice($,y)),o.commentLength&&(a=i.slice(b+l.Constants.ENDHDR)),n&&R()}function h(){s.length>1&&!w&&s.sort((n,m)=>n.entryName.toLowerCase().localeCompare(m.entryName.toLowerCase()))}return{get entries(){return c||R(),s.filter(n=>!d.has(n))},get comment(){return _.decode(a)},set comment(n){a=l.toBuffer(n,_.encode),o.commentLength=a.length},getEntryCount:function(){return c?s.length:o.diskEntries},forEach:function(n){this.entries.forEach(n)},getEntry:function(n){return c||R(),r[n]||null},setEntry:function(n){c||R(),s.push(n),r[n.entryName]=n,o.totalEntries=s.length},deleteFile:function(n,m=!0){c||R();const v=r[n];this.getEntryChildren(v,m).map(y=>y.entryName).forEach(this.deleteEntry)},deleteEntry:function(n){c||R();const m=r[n],v=s.indexOf(m);v>=0&&(s.splice(v,1),delete r[n],o.totalEntries=s.length)},getEntryChildren:function(n,m=!0){if(c||R(),typeof n=="object")if(n.isDirectory&&m){const v=[],p=n.entryName;for(const y of s)y.entryName.startsWith(p)&&v.push(y);return v}else return[n];return[]},getChildCount:function(n){if(n&&n.isDirectory){const m=this.getEntryChildren(n);return m.includes(n)?m.length-1:m.length}return 0},compressToBuffer:function(){c||R(),h();const n=[],m=[];let v=0,p=0;o.size=0,o.offset=0;let y=0;for(const N of this.entries){const L=N.getCompressedData();N.header.offset=p;const F=N.packLocalHeader(),H=F.length+L.length;p+=H,n.push(F),n.push(L);const M=N.packCentralHeader();m.push(M),o.size+=M.length,v+=H+M.length,y++}v+=o.mainHeaderSize,o.offset=p,o.totalEntries=y,p=0;const $=Buffer.alloc(v);for(const N of n)N.copy($,p),p+=N.length;for(const N of m)N.copy($,p),p+=N.length;const b=o.toBinary();return a&&a.copy(b,l.Constants.ENDHDR),b.copy($,p),i=$,c=!1,$},toAsyncBuffer:function(n,m,v,p){try{c||R(),h();const y=[],$=[];let b=0,N=0,L=0;o.size=0,o.offset=0;const F=function(H){if(H.length>0){const M=H.shift(),V=M.entryName+M.extra.toString();v&&v(V),M.getCompressedDataAsync(function(z){p&&p(V),M.header.offset=N;const J=M.packLocalHeader(),W=J.length+z.length;N+=W,y.push(J),y.push(z);const j=M.packCentralHeader();$.push(j),o.size+=j.length,b+=W+j.length,L++,F(H)})}else{b+=o.mainHeaderSize,o.offset=N,o.totalEntries=L,N=0;const M=Buffer.alloc(b);y.forEach(function(z){z.copy(M,N),N+=z.length}),$.forEach(function(z){z.copy(M,N),N+=z.length});const V=o.toBinary();a&&a.copy(V,l.Constants.ENDHDR),V.copy(M,N),i=M,c=!1,n(M)}};F(Array.from(this.entries))}catch(y){m(y)}}}},Ki}var Hi,Zl;function pp(){if(Zl)return Hi;Zl=1;const e=Pt(),t=me,l=wf(),i=mp(),f=(...o)=>e.findLast(o,c=>typeof c=="boolean"),s=(...o)=>e.findLast(o,c=>typeof c=="string"),r=(...o)=>e.findLast(o,c=>typeof c=="function"),a={noSort:!1,readEntries:!1,method:e.Constants.NONE,fs:null};return Hi=function(o,c){let d=null;const g=Object.assign(Object.create(null),a);o&&typeof o=="object"&&(o instanceof Uint8Array||(Object.assign(g,o),o=g.input?g.input:void 0,g.input&&delete g.input),Buffer.isBuffer(o)&&(d=o,g.method=e.Constants.BUFFER,o=void 0)),Object.assign(g,c);const w=new e(g);if((typeof g.decoder!="object"||typeof g.decoder.encode!="function"||typeof g.decoder.decode!="function")&&(g.decoder=e.decoder),o&&typeof o=="string")if(w.fs.existsSync(o))g.method=e.Constants.FILE,g.filename=o,d=w.fs.readFileSync(o);else throw e.Errors.INVALID_FILENAME();const _=new i(d,g),{canonical:E,sanitize:R,zipnamefix:u}=e;function h(p){if(p&&_){var y;if(typeof p=="string"&&(y=_.getEntry(t.posix.normalize(p))),typeof p=="object"&&typeof p.entryName<"u"&&typeof p.header<"u"&&(y=_.getEntry(p.entryName)),y)return y}return null}function n(p){const{join:y,normalize:$,sep:b}=t.posix;return y(".",$(b+p.split("\\").join(b)+b))}function m(p){return p instanceof RegExp?function(y){return function($){return y.test($)}}(p):typeof p!="function"?()=>!0:p}const v=(p,y)=>{let $=y.slice(-1);return $=$===w.sep?w.sep:"",t.relative(p,y)+$};return{readFile:function(p,y){var $=h(p);return $&&$.getData(y)||null},childCount:function(p){const y=h(p);if(y)return _.getChildCount(y)},readFileAsync:function(p,y){var $=h(p);$?$.getDataAsync(y):y(null,"getEntry failed for:"+p)},readAsText:function(p,y){var $=h(p);if($){var b=$.getData();if(b&&b.length)return b.toString(y||"utf8")}return""},readAsTextAsync:function(p,y,$){var b=h(p);b?b.getDataAsync(function(N,L){if(L){y(N,L);return}N&&N.length?y(N.toString($||"utf8")):y("")}):y("")},deleteFile:function(p,y=!0){var $=h(p);$&&_.deleteFile($.entryName,y)},deleteEntry:function(p){var y=h(p);y&&_.deleteEntry(y.entryName)},addZipComment:function(p){_.comment=p},getZipComment:function(){return _.comment||""},addZipEntryComment:function(p,y){var $=h(p);$&&($.comment=y)},getZipEntryComment:function(p){var y=h(p);return y&&y.comment||""},updateFile:function(p,y){var $=h(p);$&&$.setData(y)},addLocalFile:function(p,y,$,b){if(w.fs.existsSync(p)){y=y?n(y):"";const N=t.win32.basename(t.win32.normalize(p));y+=$||N;const L=w.fs.statSync(p),F=L.isFile()?w.fs.readFileSync(p):Buffer.alloc(0);L.isDirectory()&&(y+=w.sep),this.addFile(y,F,b,L)}else throw e.Errors.FILE_NOT_FOUND(p)},addLocalFileAsync:function(p,y){p=typeof p=="object"?p:{localPath:p};const $=t.resolve(p.localPath),{comment:b}=p;let{zipPath:N,zipName:L}=p;const F=this;w.fs.stat($,function(H,M){if(H)return y(H,!1);N=N?n(N):"";const V=t.win32.basename(t.win32.normalize($));if(N+=L||V,M.isFile())w.fs.readFile($,function(z,J){return z?y(z,!1):(F.addFile(N,J,b,M),setImmediate(y,void 0,!0))});else if(M.isDirectory())return N+=w.sep,F.addFile(N,Buffer.alloc(0),b,M),setImmediate(y,void 0,!0)})},addLocalFolder:function(p,y,$){if($=m($),y=y?n(y):"",p=t.normalize(p),w.fs.existsSync(p)){const b=w.findFiles(p),N=this;if(b.length)for(const L of b){const F=t.join(y,v(p,L));$(F)&&N.addLocalFile(L,t.dirname(F))}}else throw e.Errors.FILE_NOT_FOUND(p)},addLocalFolderAsync:function(p,y,$,b){b=m(b),$=$?n($):"",p=t.normalize(p);var N=this;w.fs.open(p,"r",function(L){if(L&&L.code==="ENOENT")y(void 0,e.Errors.FILE_NOT_FOUND(p));else if(L)y(void 0,L);else{var F=w.findFiles(p),H=-1,M=function(){if(H+=1,H<F.length){var V=F[H],z=v(p,V).split("\\").join("/");z=z.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,""),b(z)?w.fs.stat(V,function(J,W){J&&y(void 0,J),W.isFile()?w.fs.readFile(V,function(j,G){j?y(void 0,j):(N.addFile($+z,G,"",W),M())}):(N.addFile($+z+"/",Buffer.alloc(0),"",W),M())}):process.nextTick(()=>{M()})}else y(!0,void 0)};M()}})},addLocalFolderAsync2:function(p,y){const $=this;p=typeof p=="object"?p:{localPath:p},localPath=t.resolve(n(p.localPath));let{zipPath:b,filter:N,namefix:L}=p;N instanceof RegExp?N=function(M){return function(V){return M.test(V)}}(N):typeof N!="function"&&(N=function(){return!0}),b=b?n(b):"",L=="latin1"&&(L=M=>M.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^\x20-\x7E]/g,"")),typeof L!="function"&&(L=M=>M);const F=M=>t.join(b,L(v(localPath,M))),H=M=>t.win32.basename(t.win32.normalize(L(M)));w.fs.open(localPath,"r",function(M){M&&M.code==="ENOENT"?y(void 0,e.Errors.FILE_NOT_FOUND(localPath)):M?y(void 0,M):w.findFilesAsync(localPath,function(V,z){if(V)return y(V);z=z.filter(J=>N(F(J))),z.length||y(void 0,!1),setImmediate(z.reverse().reduce(function(J,W){return function(j,G){if(j||G===!1)return setImmediate(J,j,!1);$.addLocalFileAsync({localPath:W,zipPath:t.dirname(F(W)),zipName:H(W)},J)}},y))})})},addLocalFolderPromise:function(p,y){return new Promise(($,b)=>{this.addLocalFolderAsync2(Object.assign({localPath:p},y),(N,L)=>{N&&b(N),L&&$(this)})})},addFile:function(p,y,$,b){p=u(p);let N=h(p);const L=N!=null;L||(N=new l(g),N.entryName=p),N.comment=$||"";const F=typeof b=="object"&&b instanceof w.fs.Stats;F&&(N.header.time=b.mtime);var H=N.isDirectory?16:0;let M=N.isDirectory?16384:32768;return F?M|=4095&b.mode:typeof b=="number"?M|=4095&b:M|=N.isDirectory?493:420,H=(H|M<<16)>>>0,N.attr=H,N.setData(y),L||_.setEntry(N),N},getEntries:function(p){return _.password=p,_?_.entries:[]},getEntry:function(p){return h(p)},getEntryCount:function(){return _.getEntryCount()},forEach:function(p){return _.forEach(p)},extractEntryTo:function(p,y,$,b,N,L){b=f(!1,b),N=f(!1,N),$=f(!0,$),L=s(N,L);var F=h(p);if(!F)throw e.Errors.NO_ENTRY();var H=E(F.entryName),M=R(y,L&&!F.isDirectory?L:$?H:t.basename(H));if(F.isDirectory){var V=_.getEntryChildren(F);return V.forEach(function(W){if(W.isDirectory)return;var j=W.getData();if(!j)throw e.Errors.CANT_EXTRACT_FILE();var G=E(W.entryName),D=R(y,$?G:t.basename(G));const O=N?W.header.fileAttr:void 0;w.writeFileTo(D,j,b,O)}),!0}var z=F.getData(_.password);if(!z)throw e.Errors.CANT_EXTRACT_FILE();if(w.fs.existsSync(M)&&!b)throw e.Errors.CANT_OVERRIDE();const J=N?p.header.fileAttr:void 0;return w.writeFileTo(M,z,b,J),!0},test:function(p){if(!_)return!1;for(var y in _.entries)try{if(y.isDirectory)continue;var $=_.entries[y].getData(p);if(!$)return!1}catch{return!1}return!0},extractAllTo:function(p,y,$,b){if($=f(!1,$),b=s($,b),y=f(!1,y),!_)throw e.Errors.NO_ZIP();_.entries.forEach(function(N){var L=R(p,E(N.entryName));if(N.isDirectory){w.makeDir(L);return}var F=N.getData(b);if(!F)throw e.Errors.CANT_EXTRACT_FILE();const H=$?N.header.fileAttr:void 0;w.writeFileTo(L,F,y,H);try{w.fs.utimesSync(L,N.header.time,N.header.time)}catch{throw e.Errors.CANT_EXTRACT_FILE()}})},extractAllToAsync:function(p,y,$,b){if(b=r(y,$,b),$=f(!1,$),y=f(!1,y),!b)return new Promise((M,V)=>{this.extractAllToAsync(p,y,$,function(z){z?V(z):M(this)})});if(!_){b(e.Errors.NO_ZIP());return}p=t.resolve(p);const N=M=>R(p,t.normalize(E(M.entryName))),L=(M,V)=>new Error(M+': "'+V+'"'),F=[],H=[];_.entries.forEach(M=>{M.isDirectory?F.push(M):H.push(M)});for(const M of F){const V=N(M),z=$?M.header.fileAttr:void 0;try{w.makeDir(V),z&&w.fs.chmodSync(V,z),w.fs.utimesSync(V,M.header.time,M.header.time)}catch{b(L("Unable to create folder",V))}}H.reverse().reduce(function(M,V){return function(z){if(z)M(z);else{const J=t.normalize(E(V.entryName)),W=R(p,J);V.getDataAsync(function(j,G){if(G)M(G);else if(!j)M(e.Errors.CANT_EXTRACT_FILE());else{const D=$?V.header.fileAttr:void 0;w.writeFileToAsync(W,j,y,D,function(O){O||M(L("Unable to write file",W)),w.fs.utimes(W,V.header.time,V.header.time,function(q){q?M(L("Unable to set times",W)):M()})})}})}}},b)()},writeZip:function(p,y){if(arguments.length===1&&typeof p=="function"&&(y=p,p=""),!p&&g.filename&&(p=g.filename),!!p){var $=_.compressToBuffer();if($){var b=w.writeFileTo(p,$,!0);typeof y=="function"&&y(b?null:new Error("failed"),"")}}},writeZipPromise:function(p,y){const{overwrite:$,perm:b}=Object.assign({overwrite:!0},y);return new Promise((N,L)=>{!p&&g.filename&&(p=g.filename),p||L("ADM-ZIP: ZIP File Name Missing"),this.toBufferPromise().then(F=>{const H=M=>M?N(M):L("ADM-ZIP: Wasn't able to write zip file");w.writeFileToAsync(p,F,$,b,H)},L)})},toBufferPromise:function(){return new Promise((p,y)=>{_.toAsyncBuffer(p,y)})},toBuffer:function(p,y,$,b){return typeof p=="function"?(_.toAsyncBuffer(p,y,$,b),null):_.compressToBuffer()}}},Hi}var yp=pp();const Xl=tf(yp);class wt{constructor(t,l){this.bw=t,this.version=l;const i=wt.#d;this.#s=process.platform==="win32",t.webContents.on("devtools-opened",()=>this.#l()),i.handle("openDevTools",()=>t.webContents.openDevTools()),this.#h.getVersion=l,i.handle("getInfo",()=>this.#h),i.handle("inited",(s,r,a)=>this.#p(r,a)),i.handle("fetch",async(s,r)=>{const a=await fetch(r,{cache:"no-store"});return{ok:a.ok,txt:await a.text()}}),i.handle("fetchAb",async(s,r)=>{const a=await fetch(r,{cache:"no-store"});return{ok:a.ok,ab:await a.arrayBuffer()}}),i.handle("existsSync",(s,r)=>be.existsSync(r)),i.handle("copy",(s,r,a)=>be.copy(r,a)),i.handle("remove",(s,r)=>be.remove(r)),i.handle("ensureFile",(s,r)=>be.ensureFile(r)),i.handle("readFile",(s,r,a)=>be.readFile(r,a)),i.handle("writeFile",(s,r,a,o)=>be.writeFile(r,a,o)),i.handle("appendFile",(s,r,a)=>be.appendFile(r,a).catch(o=>console.error(o))),i.handle("outputFile",(s,r,a)=>be.outputFile(r,a).catch(o=>console.error(o))),i.handle("win_close",()=>t.close()),i.handle("win_setTitle",(s,r)=>t.setTitle(r)),i.handle("showMessageBox",(s,r)=>Pe.dialog.showMessageBox(t,r)),i.handle("showOpenDialog",(s,r)=>Pe.dialog.showOpenDialog(t,r)),i.handle("capturePage",(s,r,a,o)=>t.webContents.capturePage().then(async c=>{await be.ensureFile(r);const d=c.resize({width:a,height:o,quality:"best"}),g=r.endsWith(".png")?d.toPNG():d.toJPEG(80);await be.writeFile(r,g)})),i.handle("navigate_to",(s,r)=>Pe.shell.openExternal(r));let f;i.handle("Store",(s,r)=>{f=new Ll(r)}),i.handle("flush",(s,r)=>{f.store=r}),i.handle("Store_isEmpty",()=>f.size===0),i.handle("Store_get",()=>f.store),i.handle("zip",async(s,r,a)=>{const o=new Xl;o.addLocalFolder(r),await o.writeZipPromise(a)}),i.handle("unzip",async(s,r,a)=>{await be.remove(a),await be.ensureDir(a),new Xl(r).extractAllTo(a,!0)}),i.handle("isSimpleFullScreen",()=>t.simpleFullScreen),this.#s?(i.handle("setSimpleFullScreen",(s,r)=>{this.#e=()=>{},t.setSimpleFullScreen(r),r||(t.setPosition(this.#c,this.#u),t.setContentSize(this.#i,this.#o)),this.#e=()=>this.#t()}),t.on("enter-full-screen",()=>{this.#e=()=>{},t.setContentSize(this.#n.width,this.#n.height),this.#e=()=>this.#t()}),t.on("leave-full-screen",()=>{this.#a(!1,this.#c,this.#u,this.#i,this.#o)})):i.handle("setSimpleFullScreen",(s,r)=>{t.setSimpleFullScreen(r),!r&&t.setContentSize(this.#i,this.#o)}),i.handle("window",(s,r,a,o,c,d)=>this.#a(r,a,o,c,d)),t.on("move",()=>this.#e()),t.on("resize",()=>this.#e()),this.#m()}static init(t){wt.#d=t,Ll.initRenderer()}static#d;#s;#h={getAppPath:Pe.app.getAppPath(),isPackaged:Pe.app.isPackaged,downloads:Pe.app.getPath("downloads"),userData:Pe.app.getPath("userData"),getVersion:"",env:{...process.env},platform:process.platform,arch:process.arch};#c=0;#u=0;#i=0;#o=0;#p(t,l){const{width:i,height:f}=t.window,{c:s,x:r,y:a,w:o}=l;this.#r=i/f;const c=o===i?f:o/this.#r;if(this.#s||this.bw.setAspectRatio(this.#r),this.#a(s,r,a,o,c),this.bw.show(),this.#e=()=>this.#t(),t.debug.devtool){this.#l=()=>{},this.openDevTools=()=>this.bw.webContents.openDevTools({mode:"detach"}),this.openDevTools();return}this.#l=()=>{this.bw.webContents.closeDevTools(),this.bw.setTitle("DevToolは禁止されています。許可する場合は【プロジェクト設定】の【devtool】をONに。"),this.sendShutdown()}}#r=0;#l=()=>this.bw.webContents.closeDevTools();#m(){const t=Pe.screen.getCursorScreenPoint(),l=Pe.screen.getDisplayNearestPoint(t);this.#n=l.workAreaSize}#n;#e=()=>{};#t(){if(this.#f)return;this.#e=()=>{};const[t,l]=this.bw.getPosition(),[i,f]=this.bw.getContentSize();this.#f=setTimeout(()=>{this.#f=void 0;const[s=0,r=0]=this.bw.getPosition(),[a=0,o=0]=this.bw.getContentSize();if(t!==s||l!==r||i!==a||f!==o){this.#t();return}this.#e=()=>this.#t();let c=a,d=o;this.#s&&(i===a?d=a/this.#r:c=o*this.#r),this.#a(!1,s,r,c,d)},1e3/60*10)}#f=void 0;#a(t,l,i,f,s){if(this.bw.simpleFullScreen)return;this.#e=()=>{};const r=this.#c=Math.round(t?(this.#n.width-f)*.5:l),a=this.#u=Math.round(t?(this.#n.height-s)*.5:i);this.bw.setPosition(r,a);const o=this.#i=Math.round(f),c=this.#o=Math.round(s);this.bw.setContentSize(o,c),t||this.#m(),this.sendSaveWinInf({x:r,y:a,w:o,h:c}),this.#e=()=>this.#t()}sendShutdown(){}sendSaveWinInf(t){}openDevTools=()=>{}}class kn extends wt{static initRenderer(t,l,i){let f,s=()=>{};try{wt.init(Pe.ipcMain),f=new Pe.BrowserWindow({show:!1,minWidth:300,minHeight:300,acceptFirstMouse:!0,maximizable:!1,webPreferences:{nodeIntegration:!1,contextIsolation:!0,preload:`${__dirname}/preload.js`}}),console.log=a=>f.webContents.send("log",a);const r=new kn(f,l);s=()=>r.openDevTools(),f.loadFile(t)}catch(r){throw console.error(`early err:${String(r)}`),s(),"initRenderer error"}return f}sendShutdown(){this.bw.webContents.send("shutdown")}sendSaveWinInf(t){this.bw.webContents.send("save_win_inf",t)}}module.exports=kn;exports.appMain=kn;
|
|
23
|
+
//# sourceMappingURL=appMain.js.map
|