@superglue/cli 1.1.125 → 1.1.127
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superglue",
|
|
3
3
|
"description": "Build, test, and manage superglue tools via the sg CLI. Use when working with superglue tools, systems, APIs, SDKs, or the sg command.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.127",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "superglue",
|
|
7
7
|
"email": "hello@superglue.cloud"
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var IV=Object.create;var vd=Object.defineProperty;var CV=Object.getOwnPropertyDescriptor;var bV=Object.getOwnPropertyNames;var SV=Object.getPrototypeOf,BV=Object.prototype.hasOwnProperty;var qe=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sv=(t,e)=>{for(var r in e)vd(t,r,{get:e[r],enumerable:!0})},av=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bV(e))!BV.call(t,i)&&i!==r&&vd(t,i,{get:()=>e[i],enumerable:!(n=CV(e,i))||n.enumerable});return t};var pe=(t,e,r)=>(r=t!=null?IV(SV(t)):{},av(e||!t||!t.__esModule?vd(r,"default",{value:t,enumerable:!0}):r,t)),Ty=t=>av(vd({},"__esModule",{value:!0}),t);var dv=h((PDe,Av)=>{"use strict";var cv=9007199254740991,QV="[object Arguments]",wV="[object Function]",vV="[object GeneratorFunction]",_V=/^(?:0|[1-9]\d*)$/;function DV(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function TV(t,e){return function(r){return t(e(r))}}var _d=Object.prototype,Ry=_d.hasOwnProperty,uv=_d.toString,RV=_d.propertyIsEnumerable,kV=TV(Object.keys,Object);function NV(t,e){var r=LV(t)||xV(t)?DV(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||Ry.call(t,o))&&!(i&&(o=="length"||UV(o,n)))&&r.push(o);return r}function OV(t){if(!MV(t))return kV(t);var e=[];for(var r in Object(t))Ry.call(t,r)&&r!="constructor"&&e.push(r);return e}function UV(t,e){return e=e??cv,!!e&&(typeof t=="number"||_V.test(t))&&t>-1&&t%1==0&&t<e}function MV(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||_d;return t===r}function xV(t){return PV(t)&&Ry.call(t,"callee")&&(!RV.call(t,"callee")||uv.call(t)==QV)}var LV=Array.isArray;function lv(t){return t!=null&&$V(t.length)&&!FV(t)}function PV(t){return qV(t)&&lv(t)}function FV(t){var e=jV(t)?uv.call(t):"";return e==wV||e==vV}function $V(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=cv}function jV(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function qV(t){return!!t&&typeof t=="object"}function HV(t){return lv(t)?NV(t):OV(t)}Av.exports=HV});var $v=h((Ju,rc)=>{"use strict";var GV=200,bv="__lodash_hash_undefined__",VV=800,zV=16,Sv=9007199254740991,Bv="[object Arguments]",YV="[object Array]",JV="[object AsyncFunction]",WV="[object Boolean]",ZV="[object Date]",KV="[object Error]",Qv="[object Function]",XV="[object GeneratorFunction]",ez="[object Map]",tz="[object Number]",rz="[object Null]",wv="[object Object]",nz="[object Proxy]",iz="[object RegExp]",oz="[object Set]",sz="[object String]",az="[object Undefined]",cz="[object WeakMap]",uz="[object ArrayBuffer]",lz="[object DataView]",Az="[object Float32Array]",dz="[object Float64Array]",fz="[object Int8Array]",pz="[object Int16Array]",gz="[object Int32Array]",hz="[object Uint8Array]",mz="[object Uint8ClampedArray]",yz="[object Uint16Array]",Ez="[object Uint32Array]",Iz=/[\\^$.*+?()[\]{}|]/g,Cz=/^\[object .+?Constructor\]$/,bz=/^(?:0|[1-9]\d*)$/,ze={};ze[Az]=ze[dz]=ze[fz]=ze[pz]=ze[gz]=ze[hz]=ze[mz]=ze[yz]=ze[Ez]=!0;ze[Bv]=ze[YV]=ze[uz]=ze[WV]=ze[lz]=ze[ZV]=ze[KV]=ze[Qv]=ze[ez]=ze[tz]=ze[wv]=ze[iz]=ze[oz]=ze[sz]=ze[cz]=!1;var vv=typeof global=="object"&&global&&global.Object===Object&&global,Sz=typeof self=="object"&&self&&self.Object===Object&&self,Ku=vv||Sz||Function("return this")(),_v=typeof Ju=="object"&&Ju&&!Ju.nodeType&&Ju,Wu=_v&&typeof rc=="object"&&rc&&!rc.nodeType&&rc,Dv=Wu&&Wu.exports===_v,ky=Dv&&vv.process,fv=(function(){try{var t=Wu&&Wu.require&&Wu.require("util").types;return t||ky&&ky.binding&&ky.binding("util")}catch{}})(),pv=fv&&fv.isTypedArray;function Bz(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Qz(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function wz(t){return function(e){return t(e)}}function vz(t,e){return t?.[e]}function _z(t,e){return function(r){return t(e(r))}}var Dz=Array.prototype,Tz=Function.prototype,Rd=Object.prototype,Ny=Ku["__core-js_shared__"],kd=Tz.toString,uo=Rd.hasOwnProperty,gv=(function(){var t=/[^.]+$/.exec(Ny&&Ny.keys&&Ny.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),Tv=Rd.toString,Rz=kd.call(Object),kz=RegExp("^"+kd.call(uo).replace(Iz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dd=Dv?Ku.Buffer:void 0,hv=Ku.Symbol,mv=Ku.Uint8Array,yv=Dd?Dd.allocUnsafe:void 0,Rv=_z(Object.getPrototypeOf,Object),Ev=Object.create,Nz=Rd.propertyIsEnumerable,Oz=Dz.splice,Ys=hv?hv.toStringTag:void 0,Td=(function(){try{var t=Py(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Uz=Dd?Dd.isBuffer:void 0,Iv=Math.max,Mz=Date.now,kv=Py(Ku,"Map"),Zu=Py(Object,"create"),xz=(function(){function t(){}return function(e){if(!Ws(e))return{};if(Ev)return Ev(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();function Js(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Lz(){this.__data__=Zu?Zu(null):{},this.size=0}function Pz(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Fz(t){var e=this.__data__;if(Zu){var r=e[t];return r===bv?void 0:r}return uo.call(e,t)?e[t]:void 0}function $z(t){var e=this.__data__;return Zu?e[t]!==void 0:uo.call(e,t)}function jz(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Zu&&e===void 0?bv:e,this}Js.prototype.clear=Lz;Js.prototype.delete=Pz;Js.prototype.get=Fz;Js.prototype.has=$z;Js.prototype.set=jz;function lo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function qz(){this.__data__=[],this.size=0}function Hz(t){var e=this.__data__,r=Nd(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Oz.call(e,r,1),--this.size,!0}function Gz(t){var e=this.__data__,r=Nd(e,t);return r<0?void 0:e[r][1]}function Vz(t){return Nd(this.__data__,t)>-1}function zz(t,e){var r=this.__data__,n=Nd(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}lo.prototype.clear=qz;lo.prototype.delete=Hz;lo.prototype.get=Gz;lo.prototype.has=Vz;lo.prototype.set=zz;function nc(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Yz(){this.size=0,this.__data__={hash:new Js,map:new(kv||lo),string:new Js}}function Jz(t){var e=Ud(this,t).delete(t);return this.size-=e?1:0,e}function Wz(t){return Ud(this,t).get(t)}function Zz(t){return Ud(this,t).has(t)}function Kz(t,e){var r=Ud(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}nc.prototype.clear=Yz;nc.prototype.delete=Jz;nc.prototype.get=Wz;nc.prototype.has=Zz;nc.prototype.set=Kz;function ic(t){var e=this.__data__=new lo(t);this.size=e.size}function Xz(){this.__data__=new lo,this.size=0}function eY(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function tY(t){return this.__data__.get(t)}function rY(t){return this.__data__.has(t)}function nY(t,e){var r=this.__data__;if(r instanceof lo){var n=r.__data__;if(!kv||n.length<GV-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new nc(n)}return r.set(t,e),this.size=r.size,this}ic.prototype.clear=Xz;ic.prototype.delete=eY;ic.prototype.get=tY;ic.prototype.has=rY;ic.prototype.set=nY;function iY(t,e){var r=xy(t),n=!r&&My(t),i=!r&&!n&&Mv(t),o=!r&&!n&&!i&&Lv(t),s=r||n||i||o,a=s?Qz(t.length,String):[],c=a.length;for(var u in t)(e||uo.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ov(u,c)))&&a.push(u);return a}function Oy(t,e,r){(r!==void 0&&!Md(t[e],r)||r===void 0&&!(e in t))&&Ly(t,e,r)}function oY(t,e,r){var n=t[e];(!(uo.call(t,e)&&Md(n,r))||r===void 0&&!(e in t))&&Ly(t,e,r)}function Nd(t,e){for(var r=t.length;r--;)if(Md(t[r][0],e))return r;return-1}function Ly(t,e,r){e=="__proto__"&&Td?Td(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var sY=EY();function Od(t){return t==null?t===void 0?az:rz:Ys&&Ys in Object(t)?IY(t):wY(t)}function Cv(t){return Xu(t)&&Od(t)==Bv}function aY(t){if(!Ws(t)||BY(t))return!1;var e=$y(t)?kz:Cz;return e.test(TY(t))}function cY(t){return Xu(t)&&xv(t.length)&&!!ze[Od(t)]}function uY(t){if(!Ws(t))return QY(t);var e=Uv(t),r=[];for(var n in t)n=="constructor"&&(e||!uo.call(t,n))||r.push(n);return r}function Nv(t,e,r,n,i){t!==e&&sY(e,function(o,s){if(i||(i=new ic),Ws(o))lY(t,e,s,r,Nv,n,i);else{var a=n?n(Uy(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),Oy(t,s,a)}},Pv)}function lY(t,e,r,n,i,o,s){var a=Uy(t,r),c=Uy(e,r),u=s.get(c);if(u){Oy(t,r,u);return}var l=o?o(a,c,r+"",t,e,s):void 0,A=l===void 0;if(A){var d=xy(c),f=!d&&Mv(c),g=!d&&!f&&Lv(c);l=c,d||f||g?xy(a)?l=a:RY(a)?l=hY(a):f?(A=!1,l=fY(c,!0)):g?(A=!1,l=gY(c,!0)):l=[]:kY(c)||My(c)?(l=a,My(a)?l=NY(a):(!Ws(a)||$y(a))&&(l=CY(c))):A=!1}A&&(s.set(c,l),i(l,c,n,o,s),s.delete(c)),Oy(t,r,l)}function AY(t,e){return _Y(vY(t,e,Fv),t+"")}var dY=Td?function(t,e){return Td(t,"toString",{configurable:!0,enumerable:!1,value:UY(e),writable:!0})}:Fv;function fY(t,e){if(e)return t.slice();var r=t.length,n=yv?yv(r):new t.constructor(r);return t.copy(n),n}function pY(t){var e=new t.constructor(t.byteLength);return new mv(e).set(new mv(t)),e}function gY(t,e){var r=e?pY(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function hY(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function mY(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=n?n(r[a],t[a],a,r,t):void 0;c===void 0&&(c=t[a]),i?Ly(r,a,c):oY(r,a,c)}return r}function yY(t){return AY(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&bY(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var a=r[n];a&&t(e,a,n,o)}return e})}function EY(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var c=s[t?a:++i];if(r(o[c],c,o)===!1)break}return e}}function Ud(t,e){var r=t.__data__;return SY(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Py(t,e){var r=vz(t,e);return aY(r)?r:void 0}function IY(t){var e=uo.call(t,Ys),r=t[Ys];try{t[Ys]=void 0;var n=!0}catch{}var i=Tv.call(t);return n&&(e?t[Ys]=r:delete t[Ys]),i}function CY(t){return typeof t.constructor=="function"&&!Uv(t)?xz(Rv(t)):{}}function Ov(t,e){var r=typeof t;return e=e??Sv,!!e&&(r=="number"||r!="symbol"&&bz.test(t))&&t>-1&&t%1==0&&t<e}function bY(t,e,r){if(!Ws(r))return!1;var n=typeof e;return(n=="number"?Fy(r)&&Ov(e,r.length):n=="string"&&e in r)?Md(r[e],t):!1}function SY(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function BY(t){return!!gv&&gv in t}function Uv(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Rd;return t===r}function QY(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}function wY(t){return Tv.call(t)}function vY(t,e,r){return e=Iv(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Iv(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),Bz(t,this,a)}}function Uy(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var _Y=DY(dY);function DY(t){var e=0,r=0;return function(){var n=Mz(),i=zV-(n-r);if(r=n,i>0){if(++e>=VV)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function TY(t){if(t!=null){try{return kd.call(t)}catch{}try{return t+""}catch{}}return""}function Md(t,e){return t===e||t!==t&&e!==e}var My=Cv((function(){return arguments})())?Cv:function(t){return Xu(t)&&uo.call(t,"callee")&&!Nz.call(t,"callee")},xy=Array.isArray;function Fy(t){return t!=null&&xv(t.length)&&!$y(t)}function RY(t){return Xu(t)&&Fy(t)}var Mv=Uz||MY;function $y(t){if(!Ws(t))return!1;var e=Od(t);return e==Qv||e==XV||e==JV||e==nz}function xv(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Sv}function Ws(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Xu(t){return t!=null&&typeof t=="object"}function kY(t){if(!Xu(t)||Od(t)!=wv)return!1;var e=Rv(t);if(e===null)return!0;var r=uo.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&kd.call(r)==Rz}var Lv=pv?wz(pv):cY;function NY(t){return mY(t,Pv(t))}function Pv(t){return Fy(t)?iY(t,!0):uY(t)}var OY=yY(function(t,e,r){Nv(t,e,r)});function UY(t){return function(){return t}}function Fv(t){return t}function MY(){return!1}rc.exports=OY});var t0=h((FDe,e0)=>{"use strict";var Gv=200,Hy="__lodash_hash_undefined__",xY=1/0,LY=9007199254740991,PY="[object Function]",FY="[object GeneratorFunction]",$Y=/[\\^$.*+?()[\]{}|]/g,jY=/^\[object .+?Constructor\]$/,qY=typeof global=="object"&&global&&global.Object===Object&&global,HY=typeof self=="object"&&self&&self.Object===Object&&self,Gy=qY||HY||Function("return this")();function GY(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function VY(t,e){for(var r=-1,n=t?t.length:0,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function Vv(t,e){var r=t?t.length:0;return!!r&&WY(t,e,0)>-1}function zv(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function zY(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function YY(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function JY(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function WY(t,e,r){if(e!==e)return JY(t,ZY,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function ZY(t){return t!==t}function KY(t){return function(e){return t(e)}}function Yv(t,e){return t.has(e)}function XY(t,e){return t?.[e]}function eJ(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function Jv(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var tJ=Array.prototype,rJ=Function.prototype,Wv=Object.prototype,jy=Gy["__core-js_shared__"],jv=(function(){var t=/[^.]+$/.exec(jy&&jy.keys&&jy.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),Zv=rJ.toString,Vy=Wv.hasOwnProperty,nJ=Wv.toString,iJ=RegExp("^"+Zv.call(Vy).replace($Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oJ=tJ.splice,qv=Math.max,sJ=zy(Gy,"Map"),qy=zy(Gy,"Set"),el=zy(Object,"create");function Zs(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function aJ(){this.__data__=el?el(null):{}}function cJ(t){return this.has(t)&&delete this.__data__[t]}function uJ(t){var e=this.__data__;if(el){var r=e[t];return r===Hy?void 0:r}return Vy.call(e,t)?e[t]:void 0}function lJ(t){var e=this.__data__;return el?e[t]!==void 0:Vy.call(e,t)}function AJ(t,e){var r=this.__data__;return r[t]=el&&e===void 0?Hy:e,this}Zs.prototype.clear=aJ;Zs.prototype.delete=cJ;Zs.prototype.get=uJ;Zs.prototype.has=lJ;Zs.prototype.set=AJ;function oc(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function dJ(){this.__data__=[]}function fJ(t){var e=this.__data__,r=xd(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():oJ.call(e,r,1),!0}function pJ(t){var e=this.__data__,r=xd(e,t);return r<0?void 0:e[r][1]}function gJ(t){return xd(this.__data__,t)>-1}function hJ(t,e){var r=this.__data__,n=xd(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}oc.prototype.clear=dJ;oc.prototype.delete=fJ;oc.prototype.get=pJ;oc.prototype.has=gJ;oc.prototype.set=hJ;function sc(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function mJ(){this.__data__={hash:new Zs,map:new(sJ||oc),string:new Zs}}function yJ(t){return Ld(this,t).delete(t)}function EJ(t){return Ld(this,t).get(t)}function IJ(t){return Ld(this,t).has(t)}function CJ(t,e){return Ld(this,t).set(t,e),this}sc.prototype.clear=mJ;sc.prototype.delete=yJ;sc.prototype.get=EJ;sc.prototype.has=IJ;sc.prototype.set=CJ;function tl(t){var e=-1,r=t?t.length:0;for(this.__data__=new sc;++e<r;)this.add(t[e])}function bJ(t){return this.__data__.set(t,Hy),this}function SJ(t){return this.__data__.has(t)}tl.prototype.add=tl.prototype.push=bJ;tl.prototype.has=SJ;function xd(t,e){for(var r=t.length;r--;)if(NJ(t[r][0],e))return r;return-1}function Hv(t,e,r,n){var i=-1,o=Vv,s=!0,a=t.length,c=[],u=e.length;if(!a)return c;r&&(e=zY(e,KY(r))),n?(o=zv,s=!1):e.length>=Gv&&(o=Yv,s=!1,e=new tl(e));e:for(;++i<a;){var l=t[i],A=r?r(l):l;if(l=n||l!==0?l:0,s&&A===A){for(var d=u;d--;)if(e[d]===A)continue e;c.push(l)}else o(e,A,n)||c.push(l)}return c}function BJ(t){if(!Xv(t)||TJ(t))return!1;var e=Kv(t)||eJ(t)?iJ:jY;return e.test(RJ(t))}function QJ(t,e){return e=qv(e===void 0?t.length-1:e,0),function(){for(var r=arguments,n=-1,i=qv(r.length-e,0),o=Array(i);++n<i;)o[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o,GY(t,this,s)}}function wJ(t,e,r){var n=-1,i=Vv,o=t.length,s=!0,a=[],c=a;if(r)s=!1,i=zv;else if(o>=Gv){var u=e?null:_J(t);if(u)return Jv(u);s=!1,i=Yv,c=new tl}else c=e?[]:a;e:for(;++n<o;){var l=t[n],A=e?e(l):l;if(l=r||l!==0?l:0,s&&A===A){for(var d=c.length;d--;)if(c[d]===A)continue e;e&&c.push(A),a.push(l)}else i(c,A,r)||(c!==a&&c.push(A),a.push(l))}return a}function vJ(t,e,r){for(var n=-1,i=t.length;++n<i;)var o=o?YY(Hv(o,t[n],e,r),Hv(t[n],o,e,r)):t[n];return o&&o.length?wJ(o,e,r):[]}var _J=qy&&1/Jv(new qy([,-0]))[1]==xY?function(t){return new qy(t)}:LJ;function Ld(t,e){var r=t.__data__;return DJ(e)?r[typeof e=="string"?"string":"hash"]:r.map}function zy(t,e){var r=XY(t,e);return BJ(r)?r:void 0}function DJ(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function TJ(t){return!!jv&&jv in t}function RJ(t){if(t!=null){try{return Zv.call(t)}catch{}try{return t+""}catch{}}return""}var kJ=QJ(function(t){return vJ(VY(t,UJ))});function NJ(t,e){return t===e||t!==t&&e!==e}function OJ(t){return t!=null&&MJ(t.length)&&!Kv(t)}function UJ(t){return xJ(t)&&OJ(t)}function Kv(t){var e=Xv(t)?nJ.call(t):"";return e==PY||e==FY}function MJ(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=LY}function Xv(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function xJ(t){return!!t&&typeof t=="object"}function LJ(){}e0.exports=kJ});var Fd=h(Ao=>{"use strict";var Zy=Ao&&Ao.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.toJsonSchema=HJ;Ao.convertRequiredToArray=rl;Ao.generateDefaultFromSchema=nl;Ao.parseJsonSafe=Pd;Ao.normalizeToolSchemas=GJ;var Yy=Zy(dv()),Jy=Zy($v()),PJ=Zy(t0());function ac(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;let i=e;return r.every(o=>o in i&&ac(t[o],i[o]))}var FJ={required:!1,requiredDepth:Number.POSITIVE_INFINITY,postProcessFnc:null,strings:{preProcessFnc:null},arrays:{mode:"all"},objects:{preProcessFnc:null,postProcessFnc:null,additionalProperties:!0}},$J={string:function(e){return typeof e=="string"},number:function(e){return typeof e=="number"&&isFinite(e)},integer:function(e){return typeof e=="number"&&e%1===0},boolean:function(e){return typeof e=="boolean"},array:function(e){return e instanceof Array},null:function(e){return e===null},date:function(e){return e instanceof Date},any:function(e){return!0},object:function(e){return e&&typeof e=="object"&&!(e instanceof Array)&&!(e instanceof Date)}},cc={typeNames:["integer","number","string","array","object","boolean","null","date"],getType(t){return cc.typeNames.find(e=>$J[e](t))},mergeSchemaObjs(t,e){if(!t||!e)return null;let r=(0,Yy.default)(t),n=(0,Yy.default)(e);if(!ac(r,n)){if(t.type==="array"&&e.type==="array"&&ac((0,PJ.default)(r,n),["items"])){let o=r.length>n.length?e:t,s=r.length>n.length?t:e;if((0,Yy.default)(o).reduce((c,u)=>ac(o[u],s[u])&&c,!0))return o}if(t.type!=="object"||e.type!=="object")return null}let i={};for(let o=0,{length:s}=r;o<s;o++){let a=r[o];if(cc.getType(t[a])==="object"){let c=cc.mergeSchemaObjs(t[a],e[a]);if(c)i[a]=c;else{if(t.type==="object"||e.type==="object")return{type:"object"};if(a!=="items"||t.type!=="array"||e.type!=="array")return null}}else if(a==="type")if(t[a]!==e[a])if(t[a]==="integer"&&e[a]==="number"||t[a]==="number"&&e[a]==="integer")i[a]="number";else return null;else i[a]=t[a];else{if(!ac(t[a],e[a]))return null;i[a]=t[a]}}return i}};function jJ(t){let e;for(let r=0,{length:n}=t;r<n;r++){let i=t[r];if(r>0&&(i==="integer"&&e==="number"?i="number":i==="number"&&e==="integer"&&(e="number"),e!==i))return null;e=i}return e}function qJ(t){return jJ(t.map(e=>cc.getType(e)))}var Wy=class{constructor(e){this.options=(0,Jy.default)({},FJ,e),this.depth=0,this.getObjectSchemaDefault=this.getObjectSchemaDefault.bind(this),this.getStringSchemaDefault=this.getStringSchemaDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this),this.commmonPostProcessDefault=this.commmonPostProcessDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this)}getCommonArrayItemSchema(e){let r=e.map(n=>{this.depth++;let i=this.getSchema(n);return this.depth--,i});return r.reduce((n,i)=>cc.mergeSchemaObjs(n,i),r.pop())}getObjectSchemaDefault(e){let r={type:"object"},n=Object.keys(e);return n.length>0&&(r.properties=n.reduce((i,o)=>(this.depth++,i[o]=this.getSchema(e[o]),this.depth--,i),{})),r}getObjectSchema(e){return this.options.objects.preProcessFnc?this.options.objects.preProcessFnc(e,this.getObjectSchemaDefault):this.getObjectSchemaDefault(e)}getArraySchemaMerging(e){let r={type:"array"},n=qJ(e);if(n)if(r.items={type:n},n!=="integer"&&n!=="number"){let i=this.getCommonArrayItemSchema(e);i&&(r.items=i)}else this.options.required&&(r.items.required=!0);return r}getArraySchemaNoMerging(e){let r={type:"array"};return e.length>0&&(this.depth++,r.items=this.getSchema(e[0]),this.depth--),r}getArraySchemaTuple(e){let r={type:"array"};return e.length>0&&(r.items=e.map(n=>{this.depth++;let i=this.getSchema(n);return this.depth--,i})),r}getArraySchemaUniform(e){let r=this.getArraySchemaNoMerging(e);if(e.length>1)for(let n=1;n<e.length;n++){this.depth++;let i=this.getSchema(e[n]);if(this.depth--,!ac(r.items,i))throw new Error("Invalid schema, incompatible array items")}return r}getArraySchema(e){if(e.length===0)return{type:"array"};switch(this.options.arrays.mode){case"all":return this.getArraySchemaMerging(e);case"first":return this.getArraySchemaNoMerging(e);case"uniform":return this.getArraySchemaUniform(e);case"tuple":return this.getArraySchemaTuple(e);default:throw new Error(`Unknown array mode option '${this.options.arrays.mode}'`)}}getStringSchemaDefault(e){return{type:"string"}}getStringSchema(e){return this.options.strings.preProcessFnc?this.options.strings.preProcessFnc(e,this.getStringSchemaDefault):this.getStringSchemaDefault(e)}commmonPostProcessDefault(e,r,n){return this.options.required&&this.depth<=this.options.requiredDepth?(0,Jy.default)({},r,{required:!0}):r}objectPostProcessDefault(e,r){return this.options.objects.additionalProperties===!1&&Object.getOwnPropertyNames(r).length>0?(0,Jy.default)({},e,{additionalProperties:!1}):e}getSchema(e){let r=cc.getType(e);r||(r="null");let n;switch(r){case"object":n=this.getObjectSchema(e);break;case"array":n=this.getArraySchema(e);break;case"string":n=this.getStringSchema(e);break;default:n={type:r}}return this.options.postProcessFnc?n=this.options.postProcessFnc(r,n,e,this.commmonPostProcessDefault):n=this.commmonPostProcessDefault(r,n,e),r==="object"&&(this.options.objects.postProcessFnc?n=this.options.objects.postProcessFnc(n,e,this.objectPostProcessDefault):n=this.objectPostProcessDefault(n,e)),n}};function HJ(t,e){return new Wy(e).getSchema(t)}function rl(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>rl(r));let e={...t};if(delete e.required,e.properties&&typeof e.properties=="object"){let r=[],n={};for(let[i,o]of Object.entries(e.properties)){let s=o;if(s&&typeof s=="object"&&s.required===!0){r.push(i);let{required:a,...c}=s;n[i]=rl(c)}else n[i]=rl(s)}e.properties=n,r.length>0&&(e.required=r)}return e.items&&(e.items=rl(e.items)),e}function nl(t){if(!t||typeof t!="object")return null;if(t.const!==void 0)return t.const;if(t.enum&&Array.isArray(t.enum)&&t.enum.length>0)return t.enum[0];if(t.default!==void 0)return t.default;if(t.oneOf&&Array.isArray(t.oneOf)&&t.oneOf.length>0)return nl(t.oneOf[0]);if(t.anyOf&&Array.isArray(t.anyOf)&&t.anyOf.length>0)return nl(t.anyOf[0]);switch(Array.isArray(t.type)?t.type[0]:t.type){case"string":case"number":case"integer":case"boolean":return null;case"null":return null;case"array":return t.items?[]:[];case"object":let r={};if(t.properties&&typeof t.properties=="object"){let n=t.required||[];for(let[i,o]of Object.entries(t.properties))r[i]=nl(o)}return r;default:if(t.properties&&typeof t.properties=="object"){let n={};for(let[i,o]of Object.entries(t.properties))n[i]=nl(o);return n}return null}}function Pd(t){if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}}function GJ(t){let e={...t};return e.inputSchema&&(e.inputSchema=Pd(e.inputSchema)),e.outputSchema&&(e.outputSchema=Pd(e.outputSchema)),e.responseSchema&&(e.responseSchema=Pd(e.responseSchema)),e}});var qr=h(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.PLAYBOOK_LIMITS=x.MCP_SERVER_AUTH_MODES=x.OAUTH_POPUP_CLOSED_MESSAGE=x.OAUTH_CONTINUATION_REASON_MAX_CHARS=x.AGENT_REQUEST_BUSY_STATUSES=x.AGENT_SESSION_RESOURCE_KINDS=x.AGENT_MESSAGE_SCHEMA_VERSION=x.AGENT_APPROVAL_MODES=x.ConfirmationAction=x.LOADABLE_MARKDOWN_NAMES=x.SKILL_REFERENCE_NAMES=x.SKILL_BODY_NAMES=x.AGENT_CHECKLIST_MAX_LABEL_CHARS=x.AGENT_CHECKLIST_MAX_ITEMS=x.AGENT_CHECKLIST_MIN_ITEMS=x.DYNAMIC_AGENT_TOOLS=x.AGENT_TOOLS=x.AGENT_NATIVE_TOOLS=x.PLAYBOOK_PLAYGROUND_DRAFT_ID=x.PLAYGROUND_TOOL_DRAFT_ID=x.AgentType=x.FileStatus=x.MAX_BULK_RESOURCE_SHARE_OPERATIONS=x.MAX_BULK_MUTATION_IDS=x.RunExecutionKind=x.RequestSource=x.RunStatus=x.CredentialMode=x.UpsertMode=x.LogLevel=x.PaginationType=x.DecompressionMethod=x.AuthType=x.FileType=x.CacheMode=x.HttpMethod=x.SupportedFileType=x.RUN_COMMAND_EFFECT_KINDS=void 0;x.isRequestConfig=VJ;x.isTransformConfig=zJ;x.RUN_COMMAND_EFFECT_KINDS=["tool","tool_state","system","project","schedule","mcp_server","role","playbook","artifact","share","org_settings","file"];var r0;(function(t){t.JSON="JSON",t.CSV="CSV",t.XML="XML",t.HTML="HTML",t.YAML="YAML",t.EXCEL="EXCEL",t.PDF="PDF",t.DOCX="DOCX",t.PPTX="PPTX",t.ZIP="ZIP",t.GZIP="GZIP",t.BINARY="BINARY",t.RAW="RAW",t.AUTO="AUTO"})(r0||(x.SupportedFileType=r0={}));var n0;(function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS"})(n0||(x.HttpMethod=n0={}));var i0;(function(t){t.ENABLED="ENABLED",t.READONLY="READONLY",t.WRITEONLY="WRITEONLY",t.DISABLED="DISABLED"})(i0||(x.CacheMode=i0={}));var o0;(function(t){t.CSV="CSV",t.JSON="JSON",t.XML="XML",t.YAML="YAML",t.EXCEL="EXCEL",t.HTML="HTML",t.PDF="PDF",t.DOCX="DOCX",t.PPTX="PPTX",t.ZIP="ZIP",t.BINARY="BINARY",t.RAW="RAW",t.AUTO="AUTO"})(o0||(x.FileType=o0={}));var s0;(function(t){t.NONE="NONE",t.OAUTH2="OAUTH2",t.HEADER="HEADER",t.QUERY_PARAM="QUERY_PARAM"})(s0||(x.AuthType=s0={}));var a0;(function(t){t.GZIP="GZIP",t.DEFLATE="DEFLATE",t.NONE="NONE",t.AUTO="AUTO",t.ZIP="ZIP"})(a0||(x.DecompressionMethod=a0={}));var c0;(function(t){t.OFFSET_BASED="OFFSET_BASED",t.PAGE_BASED="PAGE_BASED",t.CURSOR_BASED="CURSOR_BASED",t.DISABLED="DISABLED"})(c0||(x.PaginationType=c0={}));var u0;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"})(u0||(x.LogLevel=u0={}));var l0;(function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.UPSERT="UPSERT"})(l0||(x.UpsertMode=l0={}));var A0;(function(t){t.MERGE="MERGE",t.REPLACE="REPLACE"})(A0||(x.CredentialMode=A0={}));var d0;(function(t){t.RUNNING="RUNNING",t.SUCCESS="SUCCESS",t.FAILED="FAILED",t.ABORTED="ABORTED"})(d0||(x.RunStatus=d0={}));var f0;(function(t){t.API="api",t.FRONTEND="frontend",t.AGENT="agent",t.SCHEDULER="scheduler",t.MCP="mcp",t.TOOL_CHAIN="tool-chain",t.WEBHOOK="webhook",t.CLI="cli"})(f0||(x.RequestSource=f0={}));var p0;(function(t){t.FULL="full",t.DRAFT="draft",t.SINGLE_STEP="single-step"})(p0||(x.RunExecutionKind=p0={}));x.MAX_BULK_MUTATION_IDS=100;x.MAX_BULK_RESOURCE_SHARE_OPERATIONS=1e3;function VJ(t){return!t||typeof t!="object"?!1:t.type==="request"||!("type"in t)||t.type===void 0}function zJ(t){return t?.type==="transform"}var g0;(function(t){t.PENDING="PENDING",t.UPLOADING="UPLOADING",t.PROCESSING="PROCESSING",t.COMPLETED="COMPLETED",t.FAILED="FAILED"})(g0||(x.FileStatus=g0={}));var Jo;(function(t){t.MAIN="main",t.PLAYGROUND="playground",t.SYSTEM_PLAYGROUND="system_playground",t.PLAYBOOK_PLAYGROUND="playbook_playground",t.ARTIFACT_PLAYGROUND="artifact_playground",t.ACCESS_RULES="access_rules"})(Jo||(x.AgentType=Jo={}));x.PLAYGROUND_TOOL_DRAFT_ID="@playground-draft";x.PLAYBOOK_PLAYGROUND_DRAFT_ID="@playground-draft";x.AGENT_NATIVE_TOOLS=["run_command","load_skill","use_checklist","set_credentials","authenticate_oauth"];x.AGENT_TOOLS={[Jo.MAIN]:[...x.AGENT_NATIVE_TOOLS],[Jo.PLAYGROUND]:[...x.AGENT_NATIVE_TOOLS],[Jo.SYSTEM_PLAYGROUND]:[...x.AGENT_NATIVE_TOOLS],[Jo.PLAYBOOK_PLAYGROUND]:[...x.AGENT_NATIVE_TOOLS],[Jo.ARTIFACT_PLAYGROUND]:[...x.AGENT_NATIVE_TOOLS],[Jo.ACCESS_RULES]:[...x.AGENT_NATIVE_TOOLS]};x.DYNAMIC_AGENT_TOOLS=["web_search"];x.AGENT_CHECKLIST_MIN_ITEMS=4;x.AGENT_CHECKLIST_MAX_ITEMS=15;x.AGENT_CHECKLIST_MAX_LABEL_CHARS=120;x.SKILL_BODY_NAMES=["superglue-info","tool-building","tool-editing","system-setup","access-management","tool-deployment","notifications","artifacts","playbooks","projects","superglue-brain","email","workspace-apps","meetings","brand-guidelines"];x.SKILL_REFERENCE_NAMES=["http","graphql","postgres","mssql","odbc","redis","mongodb","sftp-smb","suitecloud","tool-files","tunnel-handling"];x.LOADABLE_MARKDOWN_NAMES=[...x.SKILL_BODY_NAMES,...x.SKILL_REFERENCE_NAMES];var h0;(function(t){t.CONFIRMED="confirmed",t.DECLINED="declined",t.OAUTH_SUCCESS="oauth_success",t.OAUTH_FAILURE="oauth_failure"})(h0||(x.ConfirmationAction=h0={}));x.AGENT_APPROVAL_MODES=["ask","act"];x.AGENT_MESSAGE_SCHEMA_VERSION=1;x.AGENT_SESSION_RESOURCE_KINDS=["tool","system","playbook","artifact"];x.AGENT_REQUEST_BUSY_STATUSES=["queued","claimed","running","cancelling"];x.OAUTH_CONTINUATION_REASON_MAX_CHARS=500;x.OAUTH_POPUP_CLOSED_MESSAGE="OAuth authentication did not complete.";x.MCP_SERVER_AUTH_MODES=["oauth","creator_api_key"];x.PLAYBOOK_LIMITS={name:120,whenToRun:500,inputs:25e3,instructions:1e5,completionCriteria:25e3,systemRefs:10,toolRefs:25,credentialRefs:10,fileRefs:15,compiledRender:512e3}});var YJ,y0,m0,JJ,WJ,ZJ,KJ,E0=qe(()=>{"use strict";YJ=t=>{let e=m0(t,0);if(e===void 0||!WJ(t[e]))return;let r=m0(t,e+1);if(r!==void 0)return ZJ(t,e,r)},y0=YJ,m0=(t,e)=>{for(let r=e;r<t.length;r+=1){let n=t[r];if(!JJ(n))return r}},JJ=t=>t===" "||t===" "||t===`
|
|
2
|
+
"use strict";var IV=Object.create;var vd=Object.defineProperty;var CV=Object.getOwnPropertyDescriptor;var bV=Object.getOwnPropertyNames;var SV=Object.getPrototypeOf,BV=Object.prototype.hasOwnProperty;var qe=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sv=(t,e)=>{for(var r in e)vd(t,r,{get:e[r],enumerable:!0})},av=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bV(e))!BV.call(t,i)&&i!==r&&vd(t,i,{get:()=>e[i],enumerable:!(n=CV(e,i))||n.enumerable});return t};var pe=(t,e,r)=>(r=t!=null?IV(SV(t)):{},av(e||!t||!t.__esModule?vd(r,"default",{value:t,enumerable:!0}):r,t)),Ty=t=>av(vd({},"__esModule",{value:!0}),t);var dv=h((PDe,Av)=>{"use strict";var cv=9007199254740991,QV="[object Arguments]",wV="[object Function]",vV="[object GeneratorFunction]",_V=/^(?:0|[1-9]\d*)$/;function DV(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function TV(t,e){return function(r){return t(e(r))}}var _d=Object.prototype,Ry=_d.hasOwnProperty,uv=_d.toString,RV=_d.propertyIsEnumerable,kV=TV(Object.keys,Object);function NV(t,e){var r=LV(t)||xV(t)?DV(t.length,String):[],n=r.length,i=!!n;for(var o in t)(e||Ry.call(t,o))&&!(i&&(o=="length"||UV(o,n)))&&r.push(o);return r}function OV(t){if(!MV(t))return kV(t);var e=[];for(var r in Object(t))Ry.call(t,r)&&r!="constructor"&&e.push(r);return e}function UV(t,e){return e=e??cv,!!e&&(typeof t=="number"||_V.test(t))&&t>-1&&t%1==0&&t<e}function MV(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||_d;return t===r}function xV(t){return PV(t)&&Ry.call(t,"callee")&&(!RV.call(t,"callee")||uv.call(t)==QV)}var LV=Array.isArray;function lv(t){return t!=null&&$V(t.length)&&!FV(t)}function PV(t){return qV(t)&&lv(t)}function FV(t){var e=jV(t)?uv.call(t):"";return e==wV||e==vV}function $V(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=cv}function jV(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function qV(t){return!!t&&typeof t=="object"}function HV(t){return lv(t)?NV(t):OV(t)}Av.exports=HV});var $v=h((Ju,rc)=>{"use strict";var GV=200,bv="__lodash_hash_undefined__",VV=800,zV=16,Sv=9007199254740991,Bv="[object Arguments]",YV="[object Array]",JV="[object AsyncFunction]",WV="[object Boolean]",ZV="[object Date]",KV="[object Error]",Qv="[object Function]",XV="[object GeneratorFunction]",ez="[object Map]",tz="[object Number]",rz="[object Null]",wv="[object Object]",nz="[object Proxy]",iz="[object RegExp]",oz="[object Set]",sz="[object String]",az="[object Undefined]",cz="[object WeakMap]",uz="[object ArrayBuffer]",lz="[object DataView]",Az="[object Float32Array]",dz="[object Float64Array]",fz="[object Int8Array]",pz="[object Int16Array]",gz="[object Int32Array]",hz="[object Uint8Array]",mz="[object Uint8ClampedArray]",yz="[object Uint16Array]",Ez="[object Uint32Array]",Iz=/[\\^$.*+?()[\]{}|]/g,Cz=/^\[object .+?Constructor\]$/,bz=/^(?:0|[1-9]\d*)$/,ze={};ze[Az]=ze[dz]=ze[fz]=ze[pz]=ze[gz]=ze[hz]=ze[mz]=ze[yz]=ze[Ez]=!0;ze[Bv]=ze[YV]=ze[uz]=ze[WV]=ze[lz]=ze[ZV]=ze[KV]=ze[Qv]=ze[ez]=ze[tz]=ze[wv]=ze[iz]=ze[oz]=ze[sz]=ze[cz]=!1;var vv=typeof global=="object"&&global&&global.Object===Object&&global,Sz=typeof self=="object"&&self&&self.Object===Object&&self,Ku=vv||Sz||Function("return this")(),_v=typeof Ju=="object"&&Ju&&!Ju.nodeType&&Ju,Wu=_v&&typeof rc=="object"&&rc&&!rc.nodeType&&rc,Dv=Wu&&Wu.exports===_v,ky=Dv&&vv.process,fv=(function(){try{var t=Wu&&Wu.require&&Wu.require("util").types;return t||ky&&ky.binding&&ky.binding("util")}catch{}})(),pv=fv&&fv.isTypedArray;function Bz(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Qz(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function wz(t){return function(e){return t(e)}}function vz(t,e){return t?.[e]}function _z(t,e){return function(r){return t(e(r))}}var Dz=Array.prototype,Tz=Function.prototype,Rd=Object.prototype,Ny=Ku["__core-js_shared__"],kd=Tz.toString,uo=Rd.hasOwnProperty,gv=(function(){var t=/[^.]+$/.exec(Ny&&Ny.keys&&Ny.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),Tv=Rd.toString,Rz=kd.call(Object),kz=RegExp("^"+kd.call(uo).replace(Iz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dd=Dv?Ku.Buffer:void 0,hv=Ku.Symbol,mv=Ku.Uint8Array,yv=Dd?Dd.allocUnsafe:void 0,Rv=_z(Object.getPrototypeOf,Object),Ev=Object.create,Nz=Rd.propertyIsEnumerable,Oz=Dz.splice,Ys=hv?hv.toStringTag:void 0,Td=(function(){try{var t=Py(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Uz=Dd?Dd.isBuffer:void 0,Iv=Math.max,Mz=Date.now,kv=Py(Ku,"Map"),Zu=Py(Object,"create"),xz=(function(){function t(){}return function(e){if(!Ws(e))return{};if(Ev)return Ev(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();function Js(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Lz(){this.__data__=Zu?Zu(null):{},this.size=0}function Pz(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Fz(t){var e=this.__data__;if(Zu){var r=e[t];return r===bv?void 0:r}return uo.call(e,t)?e[t]:void 0}function $z(t){var e=this.__data__;return Zu?e[t]!==void 0:uo.call(e,t)}function jz(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Zu&&e===void 0?bv:e,this}Js.prototype.clear=Lz;Js.prototype.delete=Pz;Js.prototype.get=Fz;Js.prototype.has=$z;Js.prototype.set=jz;function lo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function qz(){this.__data__=[],this.size=0}function Hz(t){var e=this.__data__,r=Nd(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Oz.call(e,r,1),--this.size,!0}function Gz(t){var e=this.__data__,r=Nd(e,t);return r<0?void 0:e[r][1]}function Vz(t){return Nd(this.__data__,t)>-1}function zz(t,e){var r=this.__data__,n=Nd(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}lo.prototype.clear=qz;lo.prototype.delete=Hz;lo.prototype.get=Gz;lo.prototype.has=Vz;lo.prototype.set=zz;function nc(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Yz(){this.size=0,this.__data__={hash:new Js,map:new(kv||lo),string:new Js}}function Jz(t){var e=Ud(this,t).delete(t);return this.size-=e?1:0,e}function Wz(t){return Ud(this,t).get(t)}function Zz(t){return Ud(this,t).has(t)}function Kz(t,e){var r=Ud(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}nc.prototype.clear=Yz;nc.prototype.delete=Jz;nc.prototype.get=Wz;nc.prototype.has=Zz;nc.prototype.set=Kz;function ic(t){var e=this.__data__=new lo(t);this.size=e.size}function Xz(){this.__data__=new lo,this.size=0}function eY(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function tY(t){return this.__data__.get(t)}function rY(t){return this.__data__.has(t)}function nY(t,e){var r=this.__data__;if(r instanceof lo){var n=r.__data__;if(!kv||n.length<GV-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new nc(n)}return r.set(t,e),this.size=r.size,this}ic.prototype.clear=Xz;ic.prototype.delete=eY;ic.prototype.get=tY;ic.prototype.has=rY;ic.prototype.set=nY;function iY(t,e){var r=xy(t),n=!r&&My(t),i=!r&&!n&&Mv(t),o=!r&&!n&&!i&&Lv(t),s=r||n||i||o,a=s?Qz(t.length,String):[],c=a.length;for(var u in t)(e||uo.call(t,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ov(u,c)))&&a.push(u);return a}function Oy(t,e,r){(r!==void 0&&!Md(t[e],r)||r===void 0&&!(e in t))&&Ly(t,e,r)}function oY(t,e,r){var n=t[e];(!(uo.call(t,e)&&Md(n,r))||r===void 0&&!(e in t))&&Ly(t,e,r)}function Nd(t,e){for(var r=t.length;r--;)if(Md(t[r][0],e))return r;return-1}function Ly(t,e,r){e=="__proto__"&&Td?Td(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var sY=EY();function Od(t){return t==null?t===void 0?az:rz:Ys&&Ys in Object(t)?IY(t):wY(t)}function Cv(t){return Xu(t)&&Od(t)==Bv}function aY(t){if(!Ws(t)||BY(t))return!1;var e=$y(t)?kz:Cz;return e.test(TY(t))}function cY(t){return Xu(t)&&xv(t.length)&&!!ze[Od(t)]}function uY(t){if(!Ws(t))return QY(t);var e=Uv(t),r=[];for(var n in t)n=="constructor"&&(e||!uo.call(t,n))||r.push(n);return r}function Nv(t,e,r,n,i){t!==e&&sY(e,function(o,s){if(i||(i=new ic),Ws(o))lY(t,e,s,r,Nv,n,i);else{var a=n?n(Uy(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),Oy(t,s,a)}},Pv)}function lY(t,e,r,n,i,o,s){var a=Uy(t,r),c=Uy(e,r),u=s.get(c);if(u){Oy(t,r,u);return}var l=o?o(a,c,r+"",t,e,s):void 0,A=l===void 0;if(A){var d=xy(c),f=!d&&Mv(c),g=!d&&!f&&Lv(c);l=c,d||f||g?xy(a)?l=a:RY(a)?l=hY(a):f?(A=!1,l=fY(c,!0)):g?(A=!1,l=gY(c,!0)):l=[]:kY(c)||My(c)?(l=a,My(a)?l=NY(a):(!Ws(a)||$y(a))&&(l=CY(c))):A=!1}A&&(s.set(c,l),i(l,c,n,o,s),s.delete(c)),Oy(t,r,l)}function AY(t,e){return _Y(vY(t,e,Fv),t+"")}var dY=Td?function(t,e){return Td(t,"toString",{configurable:!0,enumerable:!1,value:UY(e),writable:!0})}:Fv;function fY(t,e){if(e)return t.slice();var r=t.length,n=yv?yv(r):new t.constructor(r);return t.copy(n),n}function pY(t){var e=new t.constructor(t.byteLength);return new mv(e).set(new mv(t)),e}function gY(t,e){var r=e?pY(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function hY(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function mY(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=n?n(r[a],t[a],a,r,t):void 0;c===void 0&&(c=t[a]),i?Ly(r,a,c):oY(r,a,c)}return r}function yY(t){return AY(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&bY(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var a=r[n];a&&t(e,a,n,o)}return e})}function EY(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var c=s[t?a:++i];if(r(o[c],c,o)===!1)break}return e}}function Ud(t,e){var r=t.__data__;return SY(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Py(t,e){var r=vz(t,e);return aY(r)?r:void 0}function IY(t){var e=uo.call(t,Ys),r=t[Ys];try{t[Ys]=void 0;var n=!0}catch{}var i=Tv.call(t);return n&&(e?t[Ys]=r:delete t[Ys]),i}function CY(t){return typeof t.constructor=="function"&&!Uv(t)?xz(Rv(t)):{}}function Ov(t,e){var r=typeof t;return e=e??Sv,!!e&&(r=="number"||r!="symbol"&&bz.test(t))&&t>-1&&t%1==0&&t<e}function bY(t,e,r){if(!Ws(r))return!1;var n=typeof e;return(n=="number"?Fy(r)&&Ov(e,r.length):n=="string"&&e in r)?Md(r[e],t):!1}function SY(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function BY(t){return!!gv&&gv in t}function Uv(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Rd;return t===r}function QY(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}function wY(t){return Tv.call(t)}function vY(t,e,r){return e=Iv(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Iv(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=n[i];return a[e]=r(s),Bz(t,this,a)}}function Uy(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var _Y=DY(dY);function DY(t){var e=0,r=0;return function(){var n=Mz(),i=zV-(n-r);if(r=n,i>0){if(++e>=VV)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function TY(t){if(t!=null){try{return kd.call(t)}catch{}try{return t+""}catch{}}return""}function Md(t,e){return t===e||t!==t&&e!==e}var My=Cv((function(){return arguments})())?Cv:function(t){return Xu(t)&&uo.call(t,"callee")&&!Nz.call(t,"callee")},xy=Array.isArray;function Fy(t){return t!=null&&xv(t.length)&&!$y(t)}function RY(t){return Xu(t)&&Fy(t)}var Mv=Uz||MY;function $y(t){if(!Ws(t))return!1;var e=Od(t);return e==Qv||e==XV||e==JV||e==nz}function xv(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Sv}function Ws(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Xu(t){return t!=null&&typeof t=="object"}function kY(t){if(!Xu(t)||Od(t)!=wv)return!1;var e=Rv(t);if(e===null)return!0;var r=uo.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&kd.call(r)==Rz}var Lv=pv?wz(pv):cY;function NY(t){return mY(t,Pv(t))}function Pv(t){return Fy(t)?iY(t,!0):uY(t)}var OY=yY(function(t,e,r){Nv(t,e,r)});function UY(t){return function(){return t}}function Fv(t){return t}function MY(){return!1}rc.exports=OY});var t0=h((FDe,e0)=>{"use strict";var Gv=200,Hy="__lodash_hash_undefined__",xY=1/0,LY=9007199254740991,PY="[object Function]",FY="[object GeneratorFunction]",$Y=/[\\^$.*+?()[\]{}|]/g,jY=/^\[object .+?Constructor\]$/,qY=typeof global=="object"&&global&&global.Object===Object&&global,HY=typeof self=="object"&&self&&self.Object===Object&&self,Gy=qY||HY||Function("return this")();function GY(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function VY(t,e){for(var r=-1,n=t?t.length:0,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function Vv(t,e){var r=t?t.length:0;return!!r&&WY(t,e,0)>-1}function zv(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function zY(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function YY(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function JY(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function WY(t,e,r){if(e!==e)return JY(t,ZY,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function ZY(t){return t!==t}function KY(t){return function(e){return t(e)}}function Yv(t,e){return t.has(e)}function XY(t,e){return t?.[e]}function eJ(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}function Jv(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var tJ=Array.prototype,rJ=Function.prototype,Wv=Object.prototype,jy=Gy["__core-js_shared__"],jv=(function(){var t=/[^.]+$/.exec(jy&&jy.keys&&jy.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),Zv=rJ.toString,Vy=Wv.hasOwnProperty,nJ=Wv.toString,iJ=RegExp("^"+Zv.call(Vy).replace($Y,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oJ=tJ.splice,qv=Math.max,sJ=zy(Gy,"Map"),qy=zy(Gy,"Set"),el=zy(Object,"create");function Zs(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function aJ(){this.__data__=el?el(null):{}}function cJ(t){return this.has(t)&&delete this.__data__[t]}function uJ(t){var e=this.__data__;if(el){var r=e[t];return r===Hy?void 0:r}return Vy.call(e,t)?e[t]:void 0}function lJ(t){var e=this.__data__;return el?e[t]!==void 0:Vy.call(e,t)}function AJ(t,e){var r=this.__data__;return r[t]=el&&e===void 0?Hy:e,this}Zs.prototype.clear=aJ;Zs.prototype.delete=cJ;Zs.prototype.get=uJ;Zs.prototype.has=lJ;Zs.prototype.set=AJ;function oc(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function dJ(){this.__data__=[]}function fJ(t){var e=this.__data__,r=xd(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():oJ.call(e,r,1),!0}function pJ(t){var e=this.__data__,r=xd(e,t);return r<0?void 0:e[r][1]}function gJ(t){return xd(this.__data__,t)>-1}function hJ(t,e){var r=this.__data__,n=xd(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}oc.prototype.clear=dJ;oc.prototype.delete=fJ;oc.prototype.get=pJ;oc.prototype.has=gJ;oc.prototype.set=hJ;function sc(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function mJ(){this.__data__={hash:new Zs,map:new(sJ||oc),string:new Zs}}function yJ(t){return Ld(this,t).delete(t)}function EJ(t){return Ld(this,t).get(t)}function IJ(t){return Ld(this,t).has(t)}function CJ(t,e){return Ld(this,t).set(t,e),this}sc.prototype.clear=mJ;sc.prototype.delete=yJ;sc.prototype.get=EJ;sc.prototype.has=IJ;sc.prototype.set=CJ;function tl(t){var e=-1,r=t?t.length:0;for(this.__data__=new sc;++e<r;)this.add(t[e])}function bJ(t){return this.__data__.set(t,Hy),this}function SJ(t){return this.__data__.has(t)}tl.prototype.add=tl.prototype.push=bJ;tl.prototype.has=SJ;function xd(t,e){for(var r=t.length;r--;)if(NJ(t[r][0],e))return r;return-1}function Hv(t,e,r,n){var i=-1,o=Vv,s=!0,a=t.length,c=[],u=e.length;if(!a)return c;r&&(e=zY(e,KY(r))),n?(o=zv,s=!1):e.length>=Gv&&(o=Yv,s=!1,e=new tl(e));e:for(;++i<a;){var l=t[i],A=r?r(l):l;if(l=n||l!==0?l:0,s&&A===A){for(var d=u;d--;)if(e[d]===A)continue e;c.push(l)}else o(e,A,n)||c.push(l)}return c}function BJ(t){if(!Xv(t)||TJ(t))return!1;var e=Kv(t)||eJ(t)?iJ:jY;return e.test(RJ(t))}function QJ(t,e){return e=qv(e===void 0?t.length-1:e,0),function(){for(var r=arguments,n=-1,i=qv(r.length-e,0),o=Array(i);++n<i;)o[n]=r[e+n];n=-1;for(var s=Array(e+1);++n<e;)s[n]=r[n];return s[e]=o,GY(t,this,s)}}function wJ(t,e,r){var n=-1,i=Vv,o=t.length,s=!0,a=[],c=a;if(r)s=!1,i=zv;else if(o>=Gv){var u=e?null:_J(t);if(u)return Jv(u);s=!1,i=Yv,c=new tl}else c=e?[]:a;e:for(;++n<o;){var l=t[n],A=e?e(l):l;if(l=r||l!==0?l:0,s&&A===A){for(var d=c.length;d--;)if(c[d]===A)continue e;e&&c.push(A),a.push(l)}else i(c,A,r)||(c!==a&&c.push(A),a.push(l))}return a}function vJ(t,e,r){for(var n=-1,i=t.length;++n<i;)var o=o?YY(Hv(o,t[n],e,r),Hv(t[n],o,e,r)):t[n];return o&&o.length?wJ(o,e,r):[]}var _J=qy&&1/Jv(new qy([,-0]))[1]==xY?function(t){return new qy(t)}:LJ;function Ld(t,e){var r=t.__data__;return DJ(e)?r[typeof e=="string"?"string":"hash"]:r.map}function zy(t,e){var r=XY(t,e);return BJ(r)?r:void 0}function DJ(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function TJ(t){return!!jv&&jv in t}function RJ(t){if(t!=null){try{return Zv.call(t)}catch{}try{return t+""}catch{}}return""}var kJ=QJ(function(t){return vJ(VY(t,UJ))});function NJ(t,e){return t===e||t!==t&&e!==e}function OJ(t){return t!=null&&MJ(t.length)&&!Kv(t)}function UJ(t){return xJ(t)&&OJ(t)}function Kv(t){var e=Xv(t)?nJ.call(t):"";return e==PY||e==FY}function MJ(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=LY}function Xv(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function xJ(t){return!!t&&typeof t=="object"}function LJ(){}e0.exports=kJ});var Fd=h(Ao=>{"use strict";var Zy=Ao&&Ao.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.toJsonSchema=HJ;Ao.convertRequiredToArray=rl;Ao.generateDefaultFromSchema=nl;Ao.parseJsonSafe=Pd;Ao.normalizeToolSchemas=GJ;var Yy=Zy(dv()),Jy=Zy($v()),PJ=Zy(t0());function ac(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!="object"||typeof e!="object"||Array.isArray(t)!==Array.isArray(e))return!1;let r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;let i=e;return r.every(o=>o in i&&ac(t[o],i[o]))}var FJ={required:!1,requiredDepth:Number.POSITIVE_INFINITY,postProcessFnc:null,strings:{preProcessFnc:null},arrays:{mode:"all"},objects:{preProcessFnc:null,postProcessFnc:null,additionalProperties:!0}},$J={string:function(e){return typeof e=="string"},number:function(e){return typeof e=="number"&&isFinite(e)},integer:function(e){return typeof e=="number"&&e%1===0},boolean:function(e){return typeof e=="boolean"},array:function(e){return e instanceof Array},null:function(e){return e===null},date:function(e){return e instanceof Date},any:function(e){return!0},object:function(e){return e&&typeof e=="object"&&!(e instanceof Array)&&!(e instanceof Date)}},cc={typeNames:["integer","number","string","array","object","boolean","null","date"],getType(t){return cc.typeNames.find(e=>$J[e](t))},mergeSchemaObjs(t,e){if(!t||!e)return null;let r=(0,Yy.default)(t),n=(0,Yy.default)(e);if(!ac(r,n)){if(t.type==="array"&&e.type==="array"&&ac((0,PJ.default)(r,n),["items"])){let o=r.length>n.length?e:t,s=r.length>n.length?t:e;if((0,Yy.default)(o).reduce((c,u)=>ac(o[u],s[u])&&c,!0))return o}if(t.type!=="object"||e.type!=="object")return null}let i={};for(let o=0,{length:s}=r;o<s;o++){let a=r[o];if(cc.getType(t[a])==="object"){let c=cc.mergeSchemaObjs(t[a],e[a]);if(c)i[a]=c;else{if(t.type==="object"||e.type==="object")return{type:"object"};if(a!=="items"||t.type!=="array"||e.type!=="array")return null}}else if(a==="type")if(t[a]!==e[a])if(t[a]==="integer"&&e[a]==="number"||t[a]==="number"&&e[a]==="integer")i[a]="number";else return null;else i[a]=t[a];else{if(!ac(t[a],e[a]))return null;i[a]=t[a]}}return i}};function jJ(t){let e;for(let r=0,{length:n}=t;r<n;r++){let i=t[r];if(r>0&&(i==="integer"&&e==="number"?i="number":i==="number"&&e==="integer"&&(e="number"),e!==i))return null;e=i}return e}function qJ(t){return jJ(t.map(e=>cc.getType(e)))}var Wy=class{constructor(e){this.options=(0,Jy.default)({},FJ,e),this.depth=0,this.getObjectSchemaDefault=this.getObjectSchemaDefault.bind(this),this.getStringSchemaDefault=this.getStringSchemaDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this),this.commmonPostProcessDefault=this.commmonPostProcessDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this)}getCommonArrayItemSchema(e){let r=e.map(n=>{this.depth++;let i=this.getSchema(n);return this.depth--,i});return r.reduce((n,i)=>cc.mergeSchemaObjs(n,i),r.pop())}getObjectSchemaDefault(e){let r={type:"object"},n=Object.keys(e);return n.length>0&&(r.properties=n.reduce((i,o)=>(this.depth++,i[o]=this.getSchema(e[o]),this.depth--,i),{})),r}getObjectSchema(e){return this.options.objects.preProcessFnc?this.options.objects.preProcessFnc(e,this.getObjectSchemaDefault):this.getObjectSchemaDefault(e)}getArraySchemaMerging(e){let r={type:"array"},n=qJ(e);if(n)if(r.items={type:n},n!=="integer"&&n!=="number"){let i=this.getCommonArrayItemSchema(e);i&&(r.items=i)}else this.options.required&&(r.items.required=!0);return r}getArraySchemaNoMerging(e){let r={type:"array"};return e.length>0&&(this.depth++,r.items=this.getSchema(e[0]),this.depth--),r}getArraySchemaTuple(e){let r={type:"array"};return e.length>0&&(r.items=e.map(n=>{this.depth++;let i=this.getSchema(n);return this.depth--,i})),r}getArraySchemaUniform(e){let r=this.getArraySchemaNoMerging(e);if(e.length>1)for(let n=1;n<e.length;n++){this.depth++;let i=this.getSchema(e[n]);if(this.depth--,!ac(r.items,i))throw new Error("Invalid schema, incompatible array items")}return r}getArraySchema(e){if(e.length===0)return{type:"array"};switch(this.options.arrays.mode){case"all":return this.getArraySchemaMerging(e);case"first":return this.getArraySchemaNoMerging(e);case"uniform":return this.getArraySchemaUniform(e);case"tuple":return this.getArraySchemaTuple(e);default:throw new Error(`Unknown array mode option '${this.options.arrays.mode}'`)}}getStringSchemaDefault(e){return{type:"string"}}getStringSchema(e){return this.options.strings.preProcessFnc?this.options.strings.preProcessFnc(e,this.getStringSchemaDefault):this.getStringSchemaDefault(e)}commmonPostProcessDefault(e,r,n){return this.options.required&&this.depth<=this.options.requiredDepth?(0,Jy.default)({},r,{required:!0}):r}objectPostProcessDefault(e,r){return this.options.objects.additionalProperties===!1&&Object.getOwnPropertyNames(r).length>0?(0,Jy.default)({},e,{additionalProperties:!1}):e}getSchema(e){let r=cc.getType(e);r||(r="null");let n;switch(r){case"object":n=this.getObjectSchema(e);break;case"array":n=this.getArraySchema(e);break;case"string":n=this.getStringSchema(e);break;default:n={type:r}}return this.options.postProcessFnc?n=this.options.postProcessFnc(r,n,e,this.commmonPostProcessDefault):n=this.commmonPostProcessDefault(r,n,e),r==="object"&&(this.options.objects.postProcessFnc?n=this.options.objects.postProcessFnc(n,e,this.objectPostProcessDefault):n=this.objectPostProcessDefault(n,e)),n}};function HJ(t,e){return new Wy(e).getSchema(t)}function rl(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>rl(r));let e={...t};if(delete e.required,e.properties&&typeof e.properties=="object"){let r=[],n={};for(let[i,o]of Object.entries(e.properties)){let s=o;if(s&&typeof s=="object"&&s.required===!0){r.push(i);let{required:a,...c}=s;n[i]=rl(c)}else n[i]=rl(s)}e.properties=n,r.length>0&&(e.required=r)}return e.items&&(e.items=rl(e.items)),e}function nl(t){if(!t||typeof t!="object")return null;if(t.const!==void 0)return t.const;if(t.enum&&Array.isArray(t.enum)&&t.enum.length>0)return t.enum[0];if(t.default!==void 0)return t.default;if(t.oneOf&&Array.isArray(t.oneOf)&&t.oneOf.length>0)return nl(t.oneOf[0]);if(t.anyOf&&Array.isArray(t.anyOf)&&t.anyOf.length>0)return nl(t.anyOf[0]);switch(Array.isArray(t.type)?t.type[0]:t.type){case"string":case"number":case"integer":case"boolean":return null;case"null":return null;case"array":return t.items?[]:[];case"object":let r={};if(t.properties&&typeof t.properties=="object"){let n=t.required||[];for(let[i,o]of Object.entries(t.properties))r[i]=nl(o)}return r;default:if(t.properties&&typeof t.properties=="object"){let n={};for(let[i,o]of Object.entries(t.properties))n[i]=nl(o);return n}return null}}function Pd(t){if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}}function GJ(t){let e={...t};return e.inputSchema&&(e.inputSchema=Pd(e.inputSchema)),e.outputSchema&&(e.outputSchema=Pd(e.outputSchema)),e.responseSchema&&(e.responseSchema=Pd(e.responseSchema)),e}});var qr=h(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.PLAYBOOK_LIMITS=x.MCP_SERVER_AUTH_MODES=x.OAUTH_POPUP_CLOSED_MESSAGE=x.OAUTH_CONTINUATION_REASON_MAX_CHARS=x.AGENT_REQUEST_BUSY_STATUSES=x.AGENT_SESSION_RESOURCE_KINDS=x.AGENT_MESSAGE_SCHEMA_VERSION=x.AGENT_APPROVAL_MODES=x.ConfirmationAction=x.LOADABLE_MARKDOWN_NAMES=x.SKILL_REFERENCE_NAMES=x.SKILL_BODY_NAMES=x.AGENT_CHECKLIST_MAX_LABEL_CHARS=x.AGENT_CHECKLIST_MAX_ITEMS=x.AGENT_CHECKLIST_MIN_ITEMS=x.DYNAMIC_AGENT_TOOLS=x.AGENT_TOOLS=x.AGENT_NATIVE_TOOLS=x.PLAYBOOK_PLAYGROUND_DRAFT_ID=x.PLAYGROUND_TOOL_DRAFT_ID=x.AgentType=x.FileStatus=x.MAX_BULK_RESOURCE_SHARE_OPERATIONS=x.MAX_BULK_MUTATION_IDS=x.RunExecutionKind=x.RequestSource=x.RunStatus=x.CredentialMode=x.UpsertMode=x.LogLevel=x.PaginationType=x.DecompressionMethod=x.AuthType=x.FileType=x.CacheMode=x.HttpMethod=x.SupportedFileType=x.RUN_COMMAND_EFFECT_KINDS=void 0;x.isRequestConfig=VJ;x.isTransformConfig=zJ;x.RUN_COMMAND_EFFECT_KINDS=["tool","tool_state","system","project","schedule","mcp_server","role","playbook","artifact","share","org_settings","file"];var r0;(function(t){t.JSON="JSON",t.CSV="CSV",t.XML="XML",t.HTML="HTML",t.YAML="YAML",t.EXCEL="EXCEL",t.PDF="PDF",t.DOCX="DOCX",t.PPTX="PPTX",t.ZIP="ZIP",t.GZIP="GZIP",t.BINARY="BINARY",t.RAW="RAW",t.AUTO="AUTO"})(r0||(x.SupportedFileType=r0={}));var n0;(function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.DELETE="DELETE",t.PATCH="PATCH",t.HEAD="HEAD",t.OPTIONS="OPTIONS"})(n0||(x.HttpMethod=n0={}));var i0;(function(t){t.ENABLED="ENABLED",t.READONLY="READONLY",t.WRITEONLY="WRITEONLY",t.DISABLED="DISABLED"})(i0||(x.CacheMode=i0={}));var o0;(function(t){t.CSV="CSV",t.JSON="JSON",t.XML="XML",t.YAML="YAML",t.EXCEL="EXCEL",t.HTML="HTML",t.PDF="PDF",t.DOCX="DOCX",t.PPTX="PPTX",t.ZIP="ZIP",t.BINARY="BINARY",t.RAW="RAW",t.AUTO="AUTO"})(o0||(x.FileType=o0={}));var s0;(function(t){t.NONE="NONE",t.OAUTH2="OAUTH2",t.HEADER="HEADER",t.QUERY_PARAM="QUERY_PARAM"})(s0||(x.AuthType=s0={}));var a0;(function(t){t.GZIP="GZIP",t.DEFLATE="DEFLATE",t.NONE="NONE",t.AUTO="AUTO",t.ZIP="ZIP"})(a0||(x.DecompressionMethod=a0={}));var c0;(function(t){t.OFFSET_BASED="OFFSET_BASED",t.PAGE_BASED="PAGE_BASED",t.CURSOR_BASED="CURSOR_BASED",t.DISABLED="DISABLED"})(c0||(x.PaginationType=c0={}));var u0;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"})(u0||(x.LogLevel=u0={}));var l0;(function(t){t.CREATE="CREATE",t.UPDATE="UPDATE",t.UPSERT="UPSERT"})(l0||(x.UpsertMode=l0={}));var A0;(function(t){t.MERGE="MERGE",t.REPLACE="REPLACE"})(A0||(x.CredentialMode=A0={}));var d0;(function(t){t.RUNNING="RUNNING",t.SUCCESS="SUCCESS",t.FAILED="FAILED",t.ABORTED="ABORTED"})(d0||(x.RunStatus=d0={}));var f0;(function(t){t.API="api",t.FRONTEND="frontend",t.AGENT="agent",t.SCHEDULER="scheduler",t.MCP="mcp",t.TOOL_CHAIN="tool-chain",t.WEBHOOK="webhook",t.CLI="cli"})(f0||(x.RequestSource=f0={}));var p0;(function(t){t.FULL="full",t.DRAFT="draft",t.SINGLE_STEP="single-step"})(p0||(x.RunExecutionKind=p0={}));x.MAX_BULK_MUTATION_IDS=100;x.MAX_BULK_RESOURCE_SHARE_OPERATIONS=1e3;function VJ(t){return!t||typeof t!="object"?!1:t.type==="request"||!("type"in t)||t.type===void 0}function zJ(t){return t?.type==="transform"}var g0;(function(t){t.PENDING="PENDING",t.UPLOADING="UPLOADING",t.PROCESSING="PROCESSING",t.COMPLETED="COMPLETED",t.FAILED="FAILED"})(g0||(x.FileStatus=g0={}));var Jo;(function(t){t.MAIN="main",t.PLAYGROUND="playground",t.SYSTEM_PLAYGROUND="system_playground",t.PLAYBOOK_PLAYGROUND="playbook_playground",t.ARTIFACT_PLAYGROUND="artifact_playground",t.ACCESS_RULES="access_rules"})(Jo||(x.AgentType=Jo={}));x.PLAYGROUND_TOOL_DRAFT_ID="@playground-draft";x.PLAYBOOK_PLAYGROUND_DRAFT_ID="@playground-draft";x.AGENT_NATIVE_TOOLS=["run_command","load_skill","use_checklist","set_credentials","authenticate_oauth"];x.AGENT_TOOLS={[Jo.MAIN]:[...x.AGENT_NATIVE_TOOLS],[Jo.PLAYGROUND]:[...x.AGENT_NATIVE_TOOLS],[Jo.SYSTEM_PLAYGROUND]:[...x.AGENT_NATIVE_TOOLS],[Jo.PLAYBOOK_PLAYGROUND]:[...x.AGENT_NATIVE_TOOLS],[Jo.ARTIFACT_PLAYGROUND]:[...x.AGENT_NATIVE_TOOLS],[Jo.ACCESS_RULES]:[...x.AGENT_NATIVE_TOOLS]};x.DYNAMIC_AGENT_TOOLS=["web_search"];x.AGENT_CHECKLIST_MIN_ITEMS=4;x.AGENT_CHECKLIST_MAX_ITEMS=15;x.AGENT_CHECKLIST_MAX_LABEL_CHARS=120;x.SKILL_BODY_NAMES=["superglue-info","tool-building","tool-editing","system-setup","access-management","tool-deployment","notifications","artifacts","playbooks","projects","superglue-brain","email","workspace-apps","meetings","brand-guidelines","demos"];x.SKILL_REFERENCE_NAMES=["http","graphql","postgres","mssql","odbc","redis","mongodb","sftp-smb","suitecloud","tool-files","tunnel-handling"];x.LOADABLE_MARKDOWN_NAMES=[...x.SKILL_BODY_NAMES,...x.SKILL_REFERENCE_NAMES];var h0;(function(t){t.CONFIRMED="confirmed",t.DECLINED="declined",t.OAUTH_SUCCESS="oauth_success",t.OAUTH_FAILURE="oauth_failure"})(h0||(x.ConfirmationAction=h0={}));x.AGENT_APPROVAL_MODES=["ask","act"];x.AGENT_MESSAGE_SCHEMA_VERSION=1;x.AGENT_SESSION_RESOURCE_KINDS=["tool","system","playbook","artifact"];x.AGENT_REQUEST_BUSY_STATUSES=["queued","claimed","running","cancelling"];x.OAUTH_CONTINUATION_REASON_MAX_CHARS=500;x.OAUTH_POPUP_CLOSED_MESSAGE="OAuth authentication did not complete.";x.MCP_SERVER_AUTH_MODES=["oauth","creator_api_key"];x.PLAYBOOK_LIMITS={name:120,whenToRun:500,inputs:25e3,instructions:1e5,completionCriteria:25e3,systemRefs:10,toolRefs:25,credentialRefs:10,fileRefs:15,compiledRender:512e3}});var YJ,y0,m0,JJ,WJ,ZJ,KJ,E0=qe(()=>{"use strict";YJ=t=>{let e=m0(t,0);if(e===void 0||!WJ(t[e]))return;let r=m0(t,e+1);if(r!==void 0)return ZJ(t,e,r)},y0=YJ,m0=(t,e)=>{for(let r=e;r<t.length;r+=1){let n=t[r];if(!JJ(n))return r}},JJ=t=>t===" "||t===" "||t===`
|
|
3
3
|
`||t==="\r",WJ=t=>t==="{"||t==="[",ZJ=(t,e,r)=>{let n;for(let i=r-1;i>e;i-=1){let o=t[i];if(o==="\r")return;if(o===`
|
|
4
4
|
`)return KJ(n);if(n===void 0)n=o;else if(n[0]===o)n+=o;else return}},KJ=t=>t===void 0?0:t[0]===" "?t.length:t});var I0,Ky,XJ,eW,C0=qe(()=>{"use strict";I0=(t,e)=>{let r=Ky(t,"toPrecision",e,e);return r===void 0?Ky(t,"toExponential",e,e):r},Ky=(t,e,r,n)=>{let o=t[e](n).replace(XJ,"$1").replace(eW,"$1");return o.length<=r?o:n===1?void 0:Ky(t,e,r,n-1)},XJ=/(e)\+/iu,eW=/\.?0*($|e)/iu});var S0,tW,rW,b0,B0=qe(()=>{"use strict";S0=(t,e)=>{if(typeof t!="string")throw new TypeError(`Input must be a JSON string: ${t}`);tW(e)},tW=t=>{if(rW(t),t<0)throw new TypeError(`"maxSize" argument must be positive: ${t}`);if(t<b0)throw new TypeError(`"maxSize" argument must be at least ${b0}: ${t}`)},rW=t=>{if(t===void 0)throw new TypeError('"maxSize" argument must be defined');if(!Number.isInteger(t))throw new TypeError(`"maxSize" argument must be an integer: ${t}`)},b0=7});var $d,Q0,jd,nW,iW,oW,sW,w0,aW,cW,uW,lW,AW,dW,Xy=qe(()=>{"use strict";$d=(t,e,r)=>{let n=w0(e,r);return Q0(t,e,n)},Q0=(t,e,r)=>{if(r>=e)return r;let n=t[r];return n>=AW&&n<=dW?Q0(t,e,r+1):r},jd=(t,e,r)=>{if(r===void 0)return r;let n=w0(e,r);return nW(t,n)},nW=(t,e)=>iW(t,e)?e-3:oW(t,e)?e-2:sW(t,e)?e-1:e,iW=(t,e)=>e>=3&&t[e-3]>=aW&&t[e-3]<=cW,oW=(t,e)=>e>=2&&t[e-2]>=uW,sW=(t,e)=>e>=1&&t[e-1]>=lW,w0=(t,e)=>e<0||Object.is(e,-0)?Math.max(t+e,0):e,aW=240,cW=244,uW=224,lW=194,AW=128,dW=191});var v0,_0=qe(()=>{"use strict";Xy();v0=(t,e,r)=>{let n=globalThis.Buffer.from(t),i=$d(n,n.length,e),o=jd(n,n.length,r);return i===0&&o>=n.length?n.toString():n.toString("utf8",i,o)}});var D0,T0=qe(()=>{"use strict";D0=/[\uD800-\uDFFF]/gu});var qd,pW,rE=qe(()=>{"use strict";T0();qd=t=>pW(t)?t.replace(D0,"\uFFFD"):t,pW=t=>{for(let e=0;e<t.length;e+=1){let r=t.codePointAt(e);if(r>=55296&&r<=57343)return!0}return!1}});var nE,R0=qe(()=>{"use strict";nE=({input:t,targetByteCount:e,firstStartSurrogate:r,lastStartSurrogate:n,firstEndSurrogate:i,lastEndSurrogate:o,increment:s,canBacktrack:a,shift:c,charIndexInit:u})=>{let l=u,A=l,d=0;for(;d<e;l+=s){A=l;let g=t.charCodeAt(l);if(Number.isNaN(g))break;if(g<=127){d+=1;continue}if(g<=2047){d+=2;continue}if(d+=3,g<r||g>n)continue;let I=t.charCodeAt(l+s);Number.isNaN(I)||I<i||I>o||(d+=1,l+=s)}return(a&&d>e?A:l)+c}});var iE,EW,IW,k0=qe(()=>{"use strict";R0();iE=(t,e,r)=>e<0||Object.is(e,-0)?IW(t,e,r):EW(t,e,r),EW=(t,e,r)=>nE({input:t,targetByteCount:e,firstStartSurrogate:55296,lastStartSurrogate:56319,firstEndSurrogate:56320,lastEndSurrogate:57343,increment:1,canBacktrack:r,shift:0,charIndexInit:0}),IW=(t,e,r)=>nE({input:t,targetByteCount:-e,firstStartSurrogate:56320,lastStartSurrogate:57343,firstEndSurrogate:55296,lastEndSurrogate:56319,increment:-1,canBacktrack:!r,shift:1,charIndexInit:t.length-1})});var Hd,CW,N0=qe(()=>{"use strict";rE();k0();Hd=(t,e,r)=>{let n=iE(t,e,!1),i=CW(t,r),o=n===0&&i===void 0?t:t.slice(n,i);return qd(o)},CW=(t,e)=>{if(e===void 0)return e;let r=iE(t,e,!0);return r===t.length?void 0:r}});var U0,bW,oE,O0,SW,BW,Gd,M0=qe(()=>{"use strict";Xy();U0=(t,e,r)=>{let{textEncoder:n,textDecoder:i}=bW(),o=SW(t),{written:s}=n.encodeInto(t,o),a=$d(o,s,e),c=jd(o,s,r),u=c===void 0?s:Math.min(c,s),l=o.subarray(a,u);return i.decode(l)},bW=()=>(oE===void 0&&(oE=new globalThis.TextEncoder,O0=new globalThis.TextDecoder("utf8",{fatal:!1})),{textEncoder:oE,textDecoder:O0}),SW=t=>{let e=t.length*3;return e>BW?new Uint8Array(e):((Gd===void 0||Gd.length<e)&&(Gd=new Uint8Array(e)),Gd)},BW=1e5});var x0,sE,L0,P0=qe(()=>{"use strict";x0=(t,e)=>{if(e===void 0)return e;let r=sE(t,e);return r>=t.length*L0?void 0:r},sE=(t,e)=>e<=t.length*-L0?0:e,L0=4});var F0,QW,wW,$0,j0=qe(()=>{"use strict";F0=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`First argument must be a string: ${t}`);QW(e),wW(r)},QW=t=>{if(t===void 0)throw new TypeError("Second argument is required.");$0("Second",t)},wW=t=>{t!==void 0&&$0("Third",t)},$0=(t,e)=>{if(!Number.isInteger(e))throw new TypeError(`${t} argument must be an integer: ${e}`)}});var q0,vW,aE,H0=qe(()=>{"use strict";q0=t=>{let e=!0,r=0;for(let n=0;n<aE;n+=1){let i=vW(t,n);i<=127||(e&&(e=!1),i>2047&&(r+=1))}return{asciiOnly:e,longCharsPercentage:r/aE}},vW=(t,e)=>{let r=aE-1,n=1-(r-e)/r,i=Math.round(n*(t.length-1));return t.charCodeAt(i)},aE=50});var _W,G0,DW,TW,RW,kW,V0,z0=qe(()=>{"use strict";_0();N0();M0();P0();rE();j0();H0();_W=(t,e,r)=>{if(F0(t,e,r),t==="")return t;let n=sE(t,e),i=x0(t,r);return i===void 0&&Object.is(n,0)?qd(t):DW(t,n,i)},G0=_W,DW=(t,e,r)=>{if(t.length<=TW)return Hd(t,e,r);let{asciiOnly:n,longCharsPercentage:i}=q0(t);return n?kW(t,e,r):i>=RW?Hd(t,e,r):V0(t,e,r)},TW=200,RW=.4,kW=(t,e,r)=>"Buffer"in globalThis&&"from"in globalThis.Buffer?v0(t,e,r):V0(t,e,r),V0=(t,e,r)=>"TextEncoder"in globalThis?U0(t,e,r):Hd(t,e,r)});var J0,NW,OW,UW,MW,il,Y0,W0=qe(()=>{"use strict";z0();J0=(t,e)=>{let r=JSON.stringify(t),n=UW(r),i=G0(n,0,e-Y0.length-il.length*2),s=`${NW(i)}${Y0}`;return MW(s)},NW=t=>t.replace(OW,""),OW=/(\\|\\u[0-9a-fA-F]{0,3})$/u,UW=t=>t.slice(il.length,-il.length),MW=t=>`${il}${t}${il}`,il='"',Y0="..."});var Z0,K0=qe(()=>{"use strict";Z0=t=>globalThis.Buffer.byteLength(t)});var cE,xW,LW,PW,FW,$W,jW,X0=qe(()=>{"use strict";cE=t=>{let e=t.length,r=e;for(let n=0;n<e;n+=1){let i=t.charCodeAt(n);if(i<=xW)continue;if(i<=LW){r+=1;continue}if(r+=2,i<PW||i>FW)continue;let o=t.charCodeAt(n+1);o<$W||o>jW||(n+=1)}return r},xW=127,LW=2047,PW=55296,FW=56319,$W=56320,jW=57343});var e_,qW,HW,GW,Vd,t_=qe(()=>{"use strict";e_=()=>qW.bind(void 0,new TextEncoder),qW=(t,e)=>{let r=HW(e);return t.encodeInto(e,r).written},HW=t=>{let e=t.length*3;return e>GW?new Uint8Array(e):((Vd===void 0||Vd.length<e)&&(Vd=new Uint8Array(e)),Vd)},GW=1e5});var zW,YW,r_,n_=qe(()=>{"use strict";K0();X0();t_();zW=()=>"Buffer"in globalThis&&"byteLength"in globalThis.Buffer?Z0:"TextEncoder"in globalThis?YW.bind(void 0,e_()):cE,YW=(t,e)=>e.length<100?cE(e):t(e),r_=zW()});var i_,JW,WW,ZW,KW,uE,o_=qe(()=>{"use strict";n_();i_=t=>{if(t===null)return JW;if(t===!0)return WW;if(t===!1)return ZW;let e=typeof t;return e==="object"?KW:e==="number"?JSON.stringify(t).length:uE(t)},JW=4,WW=4,ZW=5,KW=2,uE=t=>r_(JSON.stringify(t))});var zd,a_,c_,u_,XW,l_,s_,A_,e4,ol=qe(()=>{"use strict";o_();zd=({size:t,increment:e,maxSize:r,truncatedProps:n,path:i,value:o})=>{let s=t+e,a=s>r;return a?{size:t,stop:a,truncatedProps:[...n,{path:i,value:o}]}:{size:s,stop:a,truncatedProps:n}},a_=t=>i_(t),c_=(t,e,r)=>{let n=l_({empty:t,indent:e,depth:r,keySpaceSize:0}),i=A_(t);return n+i},u_=({key:t,empty:e,indent:r,depth:n})=>{let i=l_({empty:e,indent:r,depth:n,keySpaceSize:1}),o=uE(t),s=A_(e);return i+o+XW+s},XW=1,l_=({empty:t,indent:e,depth:r,keySpaceSize:n})=>{if(e===void 0)return 0;let i=s_+e*(r+1),o=t?s_+e*r:0;return n+i+o},s_=1,A_=t=>t?0:e4,e4=1});var Yd,t4,lE=qe(()=>{"use strict";ol();Yd=({parent:t,truncatedProps:e,path:r,increment:n,maxSize:i,key:o,empty:s,size:a,truncateValue:c,indent:u,depth:l})=>{let A=t[o],d=[...r,o],{size:f,stop:g,truncatedProps:I}=zd({size:a,increment:n,maxSize:i,truncatedProps:e,path:d,value:A});return g?{empty:s,size:f,truncatedProps:I}:t4({value:A,truncatedProps:e,path:d,maxSize:i,empty:s,size:a,newSize:f,truncateValue:c,indent:u,depth:l})},t4=({value:t,truncatedProps:e,path:r,maxSize:n,empty:i,size:o,newSize:s,truncateValue:a,indent:c,depth:u})=>{let{value:l,size:A,truncatedProps:d}=a({value:t,truncatedProps:e,path:r,size:s,maxSize:n,indent:c,depth:u+1});return l===void 0?{empty:i,size:o,truncatedProps:d}:{empty:!1,size:A,value:l,truncatedProps:d}}});var d_,f_=qe(()=>{"use strict";lE();ol();d_=({array:t,truncatedProps:e,path:r,size:n,maxSize:i,truncateValue:o,indent:s,depth:a})=>{let c=[],u={empty:!0,size:n,truncatedProps:e};for(let l=0;l<t.length;l+=1){let A=c_(u.empty,s,a);u=Yd({parent:t,truncatedProps:u.truncatedProps,path:r,increment:A,maxSize:i,key:l,empty:u.empty,size:u.size,truncateValue:o,indent:s,depth:a}),u.value!==void 0&&c.push(u.value)}return{value:c,size:u.size,truncatedProps:u.truncatedProps}}});var p_,g_=qe(()=>{"use strict";lE();ol();p_=({object:t,truncatedProps:e,path:r,size:n,maxSize:i,truncateValue:o,indent:s,depth:a})=>{let c={},u={empty:!0,size:n,truncatedProps:e};for(let l in t){let A=u_({key:l,empty:u.empty,indent:s,depth:a});u=Yd({parent:t,truncatedProps:u.truncatedProps,path:r,increment:A,maxSize:i,key:l,empty:u.empty,size:u.size,truncateValue:o,indent:s,depth:a}),u.value!==void 0&&(c[l]=u.value)}return{value:c,size:u.size,truncatedProps:u.truncatedProps}}});var Jd,r4,h_=qe(()=>{"use strict";f_();g_();ol();Jd=({value:t,truncatedProps:e,path:r,size:n,maxSize:i,indent:o,depth:s})=>{let a=a_(t),{size:c,stop:u,truncatedProps:l}=zd({size:n,increment:a,maxSize:i,truncatedProps:e,path:r,value:t});return u?{value:void 0,size:c,truncatedProps:l}:r4({value:t,truncatedProps:l,path:r,size:c,maxSize:i,indent:o,depth:s})},r4=({value:t,truncatedProps:e,path:r,size:n,maxSize:i,indent:o,depth:s})=>typeof t!="object"||t===null?{value:t,size:n,truncatedProps:e}:Array.isArray(t)?d_({array:t,truncatedProps:e,path:r,size:n,maxSize:i,truncateValue:Jd,indent:o,depth:s}):p_({object:t,truncatedProps:e,path:r,size:n,maxSize:i,truncateValue:Jd,indent:o,depth:s})});var m_={};sv(m_,{default:()=>i4});var n4,i4,o4,s4,a4,y_=qe(()=>{"use strict";E0();C0();B0();W0();h_();n4=(t,e)=>{S0(t,e);let r=o4(t),n=s4(t),{value:i,truncatedProps:o}=Jd({value:n,truncatedProps:[],path:[],size:0,maxSize:e,indent:r,depth:0});return{jsonString:a4({newValue:i,value:n,maxSize:e,indent:r}),truncatedProps:o}},i4=n4,o4=t=>{let e=y0(t);return typeof e=="string"?e.length:e},s4=t=>{try{return JSON.parse(t)}catch(e){throw new TypeError(`Invalid JSON string: "${t}"
|
|
5
5
|
${e.message}`)}},a4=({newValue:t,value:e,maxSize:r,indent:n})=>t!==void 0?JSON.stringify(t,void 0,n):typeof e=="number"?I0(e,r):J0(e,r)});var I_=h(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0})});var Wo=h(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.CronField=void 0;var AE=class t{#e=!1;#t=!1;#n=!1;#i=[];options={rawValue:""};static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(e,r={rawValue:""}){if(!Array.isArray(e))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(e.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...r,rawValue:r.rawValue??""},this.#i=e.sort(t.sorter),this.#n=this.options.wildcard!==void 0?this.options.wildcard:this.#o(),this.#e=this.options.rawValue.includes("L")||e.includes("L"),this.#t=this.options.rawValue.includes("?")||e.includes("?")}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#i}static sorter(e,r){let n=typeof e=="number",i=typeof r=="number";return n&&i?e-r:!n&&!i?e.localeCompare(r):n?-1:1}static findNearestValueInList(e,r,n=!1){if(n){for(let i=e.length-1;i>=0;i--)if(e[i]<r)return e[i];return null}for(let i=0;i<e.length;i++)if(e[i]>r)return e[i];return null}findNearestValue(e,r=!1){return this.constructor.findNearestValueInList(this.values,e,r)}serialize(){return{wildcard:this.#n,values:this.#i}}validate(){let e,r=this.chars.length>0?` or chars ${this.chars.join("")}`:"",n=a=>c=>new RegExp(`^\\d{0,2}${c}$`).test(a),i=a=>(e=a,typeof a=="number"?a>=this.min&&a<=this.max:this.chars.some(n(a)));if(!this.#i.every(i))throw new Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${r}`);let s=this.#i.find((a,c)=>this.#i.indexOf(a)!==c);if(s)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${s}`)}#o(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,r)=>r+this.min).every(e=>this.#i.includes(e))}};Wd.CronField=AE});var C_=h(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.CronDayOfMonth=void 0;var c4=Wo(),u4=1,l4=31,A4=Object.freeze(["L"]),dE=class extends c4.CronField{static get min(){return u4}static get max(){return l4}static get chars(){return A4}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};Zd.CronDayOfMonth=dE});var b_=h(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.CronDayOfWeek=void 0;var d4=Wo(),f4=0,p4=7,g4=Object.freeze(["L"]),fE=class extends d4.CronField{static get min(){return f4}static get max(){return p4}static get chars(){return g4}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};Kd.CronDayOfWeek=fE});var S_=h(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});Xd.CronHour=void 0;var h4=Wo(),m4=0,y4=23,E4=Object.freeze([]),pE=class extends h4.CronField{static get min(){return m4}static get max(){return y4}static get chars(){return E4}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};Xd.CronHour=pE});var B_=h(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.CronMinute=void 0;var I4=Wo(),C4=0,b4=59,S4=Object.freeze([]),gE=class extends I4.CronField{static get min(){return C4}static get max(){return b4}static get chars(){return S4}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};ef.CronMinute=gE});var eT=h(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});var po=class extends Error{},QE=class extends po{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},wE=class extends po{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},vE=class extends po{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Xo=class extends po{},uf=class extends po{constructor(e){super(`Invalid unit ${e}`)}},Qt=class extends po{},Mn=class extends po{constructor(){super("Zone is an abstract class")}},$="numeric",Cn="short",Cr="long",lf={year:$,month:$,day:$},tD={year:$,month:Cn,day:$},B4={year:$,month:Cn,day:$,weekday:Cn},rD={year:$,month:Cr,day:$},nD={year:$,month:Cr,day:$,weekday:Cr},iD={hour:$,minute:$},oD={hour:$,minute:$,second:$},sD={hour:$,minute:$,second:$,timeZoneName:Cn},aD={hour:$,minute:$,second:$,timeZoneName:Cr},cD={hour:$,minute:$,hourCycle:"h23"},uD={hour:$,minute:$,second:$,hourCycle:"h23"},lD={hour:$,minute:$,second:$,hourCycle:"h23",timeZoneName:Cn},AD={hour:$,minute:$,second:$,hourCycle:"h23",timeZoneName:Cr},dD={year:$,month:$,day:$,hour:$,minute:$},fD={year:$,month:$,day:$,hour:$,minute:$,second:$},pD={year:$,month:Cn,day:$,hour:$,minute:$},gD={year:$,month:Cn,day:$,hour:$,minute:$,second:$},Q4={year:$,month:Cn,day:$,weekday:Cn,hour:$,minute:$},hD={year:$,month:Cr,day:$,hour:$,minute:$,timeZoneName:Cn},mD={year:$,month:Cr,day:$,hour:$,minute:$,second:$,timeZoneName:Cn},yD={year:$,month:Cr,day:$,weekday:Cr,hour:$,minute:$,timeZoneName:Cr},ED={year:$,month:Cr,day:$,weekday:Cr,hour:$,minute:$,second:$,timeZoneName:Cr},ts=class{get type(){throw new Mn}get name(){throw new Mn}get ianaName(){return this.name}get isUniversal(){throw new Mn}offsetName(e,r){throw new Mn}formatOffset(e,r){throw new Mn}offset(e){throw new Mn}equals(e){throw new Mn}get isValid(){throw new Mn}},hE=null,Al=class t extends ts{static get instance(){return hE===null&&(hE=new t),hE}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return TD(e,r,n)}formatOffset(e,r){return ll(this.offset(e),r)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},_E=new Map;function w4(t){let e=_E.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),_E.set(t,e)),e}var v4={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function _4(t,e){let r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,o,s,a,c,u,l]=n;return[s,i,o,a,c,u,l]}function D4(t,e){let r=t.formatToParts(e),n=[];for(let i=0;i<r.length;i++){let{type:o,value:s}=r[i],a=v4[o];o==="era"?n[a]=s:Ae(a)||(n[a]=parseInt(s,10))}return n}var mE=new Map,go=class t extends ts{static create(e){let r=mE.get(e);return r===void 0&&mE.set(e,r=new t(e)),r}static resetCache(){mE.clear(),_E.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:r,locale:n}){return TD(e,r,n,this.name)}formatOffset(e,r){return ll(this.offset(e),r)}offset(e){if(!this.valid)return NaN;let r=new Date(e);if(isNaN(r))return NaN;let n=w4(this.name),[i,o,s,a,c,u,l]=n.formatToParts?D4(n,r):_4(n,r);a==="BC"&&(i=-Math.abs(i)+1);let d=mf({year:i,month:o,day:s,hour:c===24?0:c,minute:u,second:l,millisecond:0}),f=+r,g=f%1e3;return f-=g>=0?g:1e3+g,(d-f)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},Q_={};function T4(t,e={}){let r=JSON.stringify([t,e]),n=Q_[r];return n||(n=new Intl.ListFormat(t,e),Q_[r]=n),n}var DE=new Map;function TE(t,e={}){let r=JSON.stringify([t,e]),n=DE.get(r);return n===void 0&&(n=new Intl.DateTimeFormat(t,e),DE.set(r,n)),n}var RE=new Map;function R4(t,e={}){let r=JSON.stringify([t,e]),n=RE.get(r);return n===void 0&&(n=new Intl.NumberFormat(t,e),RE.set(r,n)),n}var kE=new Map;function k4(t,e={}){let{base:r,...n}=e,i=JSON.stringify([t,n]),o=kE.get(i);return o===void 0&&(o=new Intl.RelativeTimeFormat(t,e),kE.set(i,o)),o}var al=null;function N4(){return al||(al=new Intl.DateTimeFormat().resolvedOptions().locale,al)}var NE=new Map;function ID(t){let e=NE.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),NE.set(t,e)),e}var OE=new Map;function O4(t){let e=OE.get(t);if(!e){let r=new Intl.Locale(t);e="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in e||(e={...CD,...e}),OE.set(t,e)}return e}function U4(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let r=t.indexOf("-u-");if(r===-1)return[t];{let n,i;try{n=TE(t).resolvedOptions(),i=t}catch{let c=t.substring(0,r);n=TE(c).resolvedOptions(),i=c}let{numberingSystem:o,calendar:s}=n;return[i,o,s]}}function M4(t,e,r){return(r||e)&&(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`)),t}function x4(t){let e=[];for(let r=1;r<=12;r++){let n=Ke.utc(2009,r,1);e.push(t(n))}return e}function L4(t){let e=[];for(let r=1;r<=7;r++){let n=Ke.utc(2016,11,13+r);e.push(t(n))}return e}function tf(t,e,r,n){let i=t.listingMode();return i==="error"?null:i==="en"?r(e):n(e)}function P4(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||ID(t.locale).numberingSystem==="latn"}var UE=class{constructor(e,r,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...s}=n;if(!r||Object.keys(s).length>0){let a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=R4(e,a)}}format(e){if(this.inf){let r=this.floor?Math.floor(e):e;return this.inf.format(r)}else{let r=this.floor?Math.floor(e):VE(e,3);return pt(r,this.padTo)}}},ME=class{constructor(e,r,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let s=-1*(e.offset/60),a=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&go.create(a).valid?(i=a,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=TE(r,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(r=>{if(r.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:n}}else return r}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},xE=class{constructor(e,r,n){this.opts={style:"long",...n},!r&&_D()&&(this.rtf=k4(e,n))}format(e,r){return this.rtf?this.rtf.format(e,r):sZ(r,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,r){return this.rtf?this.rtf.formatToParts(e,r):[]}},CD={firstDay:1,minimalDays:4,weekend:[6,7]},He=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,r,n,i,o=!1){let s=e||Ye.defaultLocale,a=s||(o?"en-US":N4()),c=r||Ye.defaultNumberingSystem,u=n||Ye.defaultOutputCalendar,l=PE(i)||Ye.defaultWeekSettings;return new t(a,c,u,l,s)}static resetCache(){al=null,DE.clear(),RE.clear(),kE.clear(),NE.clear(),OE.clear()}static fromObject({locale:e,numberingSystem:r,outputCalendar:n,weekSettings:i}={}){return t.create(e,r,n,i)}constructor(e,r,n,i,o){let[s,a,c]=U4(e);this.locale=s,this.numberingSystem=r||a||null,this.outputCalendar=n||c||null,this.weekSettings=i,this.intl=M4(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=P4(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&r?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,PE(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,r=!1){return tf(this,e,ND,()=>{let n=this.intl==="ja"||this.intl.startsWith("ja-");r&=!n;let i=r?{month:e,day:"numeric"}:{month:e},o=r?"format":"standalone";if(!this.monthsCache[o][e]){let s=n?a=>this.dtFormatter(a,i).format():a=>this.extract(a,i,"month");this.monthsCache[o][e]=x4(s)}return this.monthsCache[o][e]})}weekdays(e,r=!1){return tf(this,e,MD,()=>{let n=r?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=r?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=L4(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return tf(this,void 0,()=>xD,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ke.utc(2016,11,13,9),Ke.utc(2016,11,13,19)].map(r=>this.extract(r,e,"dayperiod"))}return this.meridiemCache})}eras(e){return tf(this,e,LD,()=>{let r={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ke.utc(-40,1,1),Ke.utc(2017,1,1)].map(n=>this.extract(n,r,"era"))),this.eraCache[e]})}extract(e,r,n){let i=this.dtFormatter(e,r),o=i.formatToParts(),s=o.find(a=>a.type.toLowerCase()===n);return s?s.value:null}numberFormatter(e={}){return new UE(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,r={}){return new ME(e,this.intl,r)}relFormatter(e={}){return new xE(this.intl,this.isEnglish(),e)}listFormatter(e={}){return T4(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ID(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:DD()?O4(this.locale):CD}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},yE=null,br=class t extends ts{static get utcInstance(){return yE===null&&(yE=new t(0)),yE}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new t(yf(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ll(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ll(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return ll(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},Af=class extends ts{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Ko(t,e){if(Ae(t)||t===null)return e;if(t instanceof ts)return t;if(G4(t)){let r=t.toLowerCase();return r==="default"?e:r==="local"||r==="system"?Al.instance:r==="utc"||r==="gmt"?br.utcInstance:br.parseSpecifier(r)||go.create(t)}else return es(t)?br.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Af(t)}var jE={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},w_={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},F4=jE.hanidec.replace(/[\[|\]]/g,"").split("");function $4(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r<t.length;r++){let n=t.charCodeAt(r);if(t[r].search(jE.hanidec)!==-1)e+=F4.indexOf(t[r]);else for(let i in w_){let[o,s]=w_[i];n>=o&&n<=s&&(e+=n-o)}}return parseInt(e,10)}else return e}var LE=new Map;function j4(){LE.clear()}function En({numberingSystem:t},e=""){let r=t||"latn",n=LE.get(r);n===void 0&&(n=new Map,LE.set(r,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${jE[r]}${e}`),n.set(e,i)),i}var v_=()=>Date.now(),__="system",D_=null,T_=null,R_=null,k_=60,N_,O_=null,Ye=class{static get now(){return v_}static set now(e){v_=e}static set defaultZone(e){__=e}static get defaultZone(){return Ko(__,Al.instance)}static get defaultLocale(){return D_}static set defaultLocale(e){D_=e}static get defaultNumberingSystem(){return T_}static set defaultNumberingSystem(e){T_=e}static get defaultOutputCalendar(){return R_}static set defaultOutputCalendar(e){R_=e}static get defaultWeekSettings(){return O_}static set defaultWeekSettings(e){O_=PE(e)}static get twoDigitCutoffYear(){return k_}static set twoDigitCutoffYear(e){k_=e%100}static get throwOnInvalid(){return N_}static set throwOnInvalid(e){N_=e}static resetCaches(){He.resetCache(),go.resetCache(),Ke.resetCache(),j4()}},Ir=class{constructor(e,r){this.reason=e,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},bD=[0,31,59,90,120,151,181,212,243,273,304,334],SD=[0,31,60,91,121,152,182,213,244,274,305,335];function Gr(t,e){return new Ir("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function qE(t,e,r){let n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function BD(t,e,r){return r+(fl(t)?SD:bD)[e-1]}function QD(t,e){let r=fl(t)?SD:bD,n=r.findIndex(o=>o<e),i=e-r[n];return{month:n+1,day:i}}function HE(t,e){return(t-e+7)%7+1}function df(t,e=4,r=1){let{year:n,month:i,day:o}=t,s=BD(n,i,o),a=HE(qE(n,i,o),r),c=Math.floor((s-a+14-e)/7),u;return c<1?(u=n-1,c=dl(u,e,r)):c>dl(n,e,r)?(u=n+1,c=1):u=n,{weekYear:u,weekNumber:c,weekday:a,...Ef(t)}}function U_(t,e=4,r=1){let{weekYear:n,weekNumber:i,weekday:o}=t,s=HE(qE(n,1,e),r),a=dc(n),c=i*7+o-s-7+e,u;c<1?(u=n-1,c+=dc(u)):c>a?(u=n+1,c-=dc(n)):u=n;let{month:l,day:A}=QD(u,c);return{year:u,month:l,day:A,...Ef(t)}}function EE(t){let{year:e,month:r,day:n}=t,i=BD(e,r,n);return{year:e,ordinal:i,...Ef(t)}}function M_(t){let{year:e,ordinal:r}=t,{month:n,day:i}=QD(e,r);return{year:e,month:n,day:i,...Ef(t)}}function x_(t,e){if(!Ae(t.localWeekday)||!Ae(t.localWeekNumber)||!Ae(t.localWeekYear)){if(!Ae(t.weekday)||!Ae(t.weekNumber)||!Ae(t.weekYear))throw new Xo("Cannot mix locale-based week fields with ISO-based week fields");return Ae(t.localWeekday)||(t.weekday=t.localWeekday),Ae(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),Ae(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function q4(t,e=4,r=1){let n=hf(t.weekYear),i=Vr(t.weekNumber,1,dl(t.weekYear,e,r)),o=Vr(t.weekday,1,7);return n?i?o?!1:Gr("weekday",t.weekday):Gr("week",t.weekNumber):Gr("weekYear",t.weekYear)}function H4(t){let e=hf(t.year),r=Vr(t.ordinal,1,dc(t.year));return e?r?!1:Gr("ordinal",t.ordinal):Gr("year",t.year)}function wD(t){let e=hf(t.year),r=Vr(t.month,1,12),n=Vr(t.day,1,ff(t.year,t.month));return e?r?n?!1:Gr("day",t.day):Gr("month",t.month):Gr("year",t.year)}function vD(t){let{hour:e,minute:r,second:n,millisecond:i}=t,o=Vr(e,0,23)||e===24&&r===0&&n===0&&i===0,s=Vr(r,0,59),a=Vr(n,0,59),c=Vr(i,0,999);return o?s?a?c?!1:Gr("millisecond",i):Gr("second",n):Gr("minute",r):Gr("hour",e)}function Ae(t){return typeof t>"u"}function es(t){return typeof t=="number"}function hf(t){return typeof t=="number"&&t%1===0}function G4(t){return typeof t=="string"}function V4(t){return Object.prototype.toString.call(t)==="[object Date]"}function _D(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function DD(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function z4(t){return Array.isArray(t)?t:[t]}function L_(t,e,r){if(t.length!==0)return t.reduce((n,i)=>{let o=[e(i),i];return n&&r(n[0],o[0])===n[0]?n:o},null)[1]}function Y4(t,e){return e.reduce((r,n)=>(r[n]=t[n],r),{})}function pc(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function PE(t){if(t==null)return null;if(typeof t!="object")throw new Qt("Week settings must be an object");if(!Vr(t.firstDay,1,7)||!Vr(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!Vr(e,1,7)))throw new Qt("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function Vr(t,e,r){return hf(t)&&t>=e&&t<=r}function J4(t,e){return t-e*Math.floor(t/e)}function pt(t,e=2){let r=t<0,n;return r?n="-"+(""+-t).padStart(e,"0"):n=(""+t).padStart(e,"0"),n}function Zo(t){if(!(Ae(t)||t===null||t===""))return parseInt(t,10)}function Ks(t){if(!(Ae(t)||t===null||t===""))return parseFloat(t)}function GE(t){if(!(Ae(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function VE(t,e,r="round"){let n=10**e;switch(r){case"expand":return t>0?Math.ceil(t*n)/n:Math.floor(t*n)/n;case"trunc":return Math.trunc(t*n)/n;case"round":return Math.round(t*n)/n;case"floor":return Math.floor(t*n)/n;case"ceil":return Math.ceil(t*n)/n;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function fl(t){return t%4===0&&(t%100!==0||t%400===0)}function dc(t){return fl(t)?366:365}function ff(t,e){let r=J4(e-1,12)+1,n=t+(e-r)/12;return r===2?fl(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function mf(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function P_(t,e,r){return-HE(qE(t,1,e),r)+e-1}function dl(t,e=4,r=1){let n=P_(t,e,r),i=P_(t+1,e,r);return(dc(t)-n+i)/7}function FE(t){return t>99?t:t>Ye.twoDigitCutoffYear?1900+t:2e3+t}function TD(t,e,r,n=null){let i=new Date(t),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let s={timeZoneName:e,...o},a=new Intl.DateTimeFormat(r,s).formatToParts(i).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function yf(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);let n=parseInt(e,10)||0,i=r<0||Object.is(r,-0)?-n:n;return r*60+i}function RD(t){let e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new Qt(`Invalid unit value ${t}`);return e}function pf(t,e){let r={};for(let n in t)if(pc(t,n)){let i=t[n];if(i==null)continue;r[e(n)]=RD(i)}return r}function ll(t,e){let r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${pt(r,2)}:${pt(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${pt(r,2)}${pt(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ef(t){return Y4(t,["hour","minute","second","millisecond"])}var W4=["January","February","March","April","May","June","July","August","September","October","November","December"],kD=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Z4=["J","F","M","A","M","J","J","A","S","O","N","D"];function ND(t){switch(t){case"narrow":return[...Z4];case"short":return[...kD];case"long":return[...W4];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var OD=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],UD=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],K4=["M","T","W","T","F","S","S"];function MD(t){switch(t){case"narrow":return[...K4];case"short":return[...UD];case"long":return[...OD];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var xD=["AM","PM"],X4=["Before Christ","Anno Domini"],eZ=["BC","AD"],tZ=["B","A"];function LD(t){switch(t){case"narrow":return[...tZ];case"short":return[...eZ];case"long":return[...X4];default:return null}}function rZ(t){return xD[t.hour<12?0:1]}function nZ(t,e){return MD(e)[t.weekday-1]}function iZ(t,e){return ND(e)[t.month-1]}function oZ(t,e){return LD(e)[t.year<0?0:1]}function sZ(t,e,r="always",n=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&o){let A=t==="days";switch(e){case 1:return A?"tomorrow":`next ${i[t][0]}`;case-1:return A?"yesterday":`last ${i[t][0]}`;case 0:return A?"today":`this ${i[t][0]}`}}let s=Object.is(e,-0)||e<0,a=Math.abs(e),c=a===1,u=i[t],l=n?c?u[1]:u[2]||u[1]:c?i[t][0]:t;return s?`${a} ${l} ago`:`in ${a} ${l}`}function F_(t,e){let r="";for(let n of t)n.literal?r+=n.val:r+=e(n.val);return r}var aZ={D:lf,DD:tD,DDD:rD,DDDD:nD,t:iD,tt:oD,ttt:sD,tttt:aD,T:cD,TT:uD,TTT:lD,TTTT:AD,f:dD,ff:pD,fff:hD,ffff:yD,F:fD,FF:gD,FFF:mD,FFFF:ED},Er=class t{static create(e,r={}){return new t(e,r)}static parseFormat(e){let r=null,n="",i=!1,o=[];for(let s=0;s<e.length;s++){let a=e.charAt(s);a==="'"?((n.length>0||i)&&o.push({literal:i||/^\s+$/.test(n),val:n===""?"'":n}),r=null,n="",i=!i):i||a===r?n+=a:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=a,r=a)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return aZ[e]}constructor(e,r){this.opts=r,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...r}).format()}dtFormatter(e,r={}){return this.loc.dtFormatter(e,{...this.opts,...r})}formatDateTime(e,r){return this.dtFormatter(e,r).format()}formatDateTimeParts(e,r){return this.dtFormatter(e,r).formatToParts()}formatInterval(e,r){return this.dtFormatter(e.start,r).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,r){return this.dtFormatter(e,r).resolvedOptions()}num(e,r=0,n=void 0){if(this.opts.forceSimple)return pt(e,r);let i={...this.opts};return r>0&&(i.padTo=r),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,r){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(f,g)=>this.loc.extract(e,f,g),s=f=>e.isOffsetFixed&&e.offset===0&&f.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,f.format):"",a=()=>n?rZ(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(f,g)=>n?iZ(e,f):o(g?{month:f}:{month:f,day:"numeric"},"month"),u=(f,g)=>n?nZ(e,f):o(g?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),l=f=>{let g=t.macroTokenToFormatOpts(f);return g?this.formatWithSystemDefault(e,g):f},A=f=>n?oZ(e,f):o({era:f},"era"),d=f=>{switch(f){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return i?o({day:"numeric"},"day"):this.num(e.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(e.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(e.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return A("short");case"GG":return A("long");case"GGGGG":return A("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(f)}};return F_(t.parseFormat(r),d)}formatDurationFromString(e,r){let n=this.opts.signMode==="negativeLargestOnly"?-1:1,i=l=>{switch(l[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=(l,A)=>d=>{let f=i(d);if(f){let g=A.isNegativeDuration&&f!==A.largestUnit?n:1,I;return this.opts.signMode==="negativeLargestOnly"&&f!==A.largestUnit?I="never":this.opts.signMode==="all"?I="always":I="auto",this.num(l.get(f)*g,d.length,I)}else return d},s=t.parseFormat(r),a=s.reduce((l,{literal:A,val:d})=>A?l:l.concat(d),[]),c=e.shiftTo(...a.map(i).filter(l=>l)),u={isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]};return F_(s,o(c,u))}},PD=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function gc(...t){let e=t.reduce((r,n)=>r+n.source,"");return RegExp(`^${e}$`)}function hc(...t){return e=>t.reduce(([r,n,i],o)=>{let[s,a,c]=o(e,i);return[{...r,...s},a||n,c]},[{},null,1]).slice(0,2)}function mc(t,...e){if(t==null)return[null,null];for(let[r,n]of e){let i=r.exec(t);if(i)return n(i)}return[null,null]}function FD(...t){return(e,r)=>{let n={},i;for(i=0;i<t.length;i++)n[t[i]]=Zo(e[r+i]);return[n,null,r+i]}}var $D=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,cZ=`(?:${$D.source}?(?:\\[(${PD.source})\\])?)?`,zE=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,jD=RegExp(`${zE.source}${cZ}`),YE=RegExp(`(?:[Tt]${jD.source})?`),uZ=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,lZ=/(\d{4})-?W(\d\d)(?:-?(\d))?/,AZ=/(\d{4})-?(\d{3})/,dZ=FD("weekYear","weekNumber","weekDay"),fZ=FD("year","ordinal"),pZ=/(\d{4})-(\d\d)-(\d\d)/,qD=RegExp(`${zE.source} ?(?:${$D.source}|(${PD.source}))?`),gZ=RegExp(`(?: ${qD.source})?`);function fc(t,e,r){let n=t[e];return Ae(n)?r:Zo(n)}function hZ(t,e){return[{year:fc(t,e),month:fc(t,e+1,1),day:fc(t,e+2,1)},null,e+3]}function yc(t,e){return[{hours:fc(t,e,0),minutes:fc(t,e+1,0),seconds:fc(t,e+2,0),milliseconds:GE(t[e+3])},null,e+4]}function pl(t,e){let r=!t[e]&&!t[e+1],n=yf(t[e+1],t[e+2]),i=r?null:br.instance(n);return[{},i,e+3]}function gl(t,e){let r=t[e]?go.create(t[e]):null;return[{},r,e+1]}var mZ=RegExp(`^T?${zE.source}$`),yZ=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function EZ(t){let[e,r,n,i,o,s,a,c,u]=t,l=e[0]==="-",A=c&&c[0]==="-",d=(f,g=!1)=>f!==void 0&&(g||f&&l)?-f:f;return[{years:d(Ks(r)),months:d(Ks(n)),weeks:d(Ks(i)),days:d(Ks(o)),hours:d(Ks(s)),minutes:d(Ks(a)),seconds:d(Ks(c),c==="-0"),milliseconds:d(GE(u),A)}]}var IZ={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function JE(t,e,r,n,i,o,s){let a={year:e.length===2?FE(Zo(e)):Zo(e),month:kD.indexOf(r)+1,day:Zo(n),hour:Zo(i),minute:Zo(o)};return s&&(a.second=Zo(s)),t&&(a.weekday=t.length>3?OD.indexOf(t)+1:UD.indexOf(t)+1),a}var CZ=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function bZ(t){let[,e,r,n,i,o,s,a,c,u,l,A]=t,d=JE(e,i,n,r,o,s,a),f;return c?f=IZ[c]:u?f=0:f=yf(l,A),[d,new br(f)]}function SZ(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var BZ=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,QZ=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,wZ=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function $_(t){let[,e,r,n,i,o,s,a]=t;return[JE(e,i,n,r,o,s,a),br.utcInstance]}function vZ(t){let[,e,r,n,i,o,s,a]=t;return[JE(e,a,r,n,i,o,s),br.utcInstance]}var _Z=gc(uZ,YE),DZ=gc(lZ,YE),TZ=gc(AZ,YE),RZ=gc(jD),HD=hc(hZ,yc,pl,gl),kZ=hc(dZ,yc,pl,gl),NZ=hc(fZ,yc,pl,gl),OZ=hc(yc,pl,gl);function UZ(t){return mc(t,[_Z,HD],[DZ,kZ],[TZ,NZ],[RZ,OZ])}function MZ(t){return mc(SZ(t),[CZ,bZ])}function xZ(t){return mc(t,[BZ,$_],[QZ,$_],[wZ,vZ])}function LZ(t){return mc(t,[yZ,EZ])}var PZ=hc(yc);function FZ(t){return mc(t,[mZ,PZ])}var $Z=gc(pZ,gZ),jZ=gc(qD),qZ=hc(yc,pl,gl);function HZ(t){return mc(t,[$Z,HD],[jZ,qZ])}var j_="Invalid Duration",GD={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},GZ={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...GD},Hr=146097/400,uc=146097/4800,VZ={years:{quarters:4,months:12,weeks:Hr/7,days:Hr,hours:Hr*24,minutes:Hr*24*60,seconds:Hr*24*60*60,milliseconds:Hr*24*60*60*1e3},quarters:{months:3,weeks:Hr/28,days:Hr/4,hours:Hr*24/4,minutes:Hr*24*60/4,seconds:Hr*24*60*60/4,milliseconds:Hr*24*60*60*1e3/4},months:{weeks:uc/7,days:uc,hours:uc*24,minutes:uc*24*60,seconds:uc*24*60*60,milliseconds:uc*24*60*60*1e3},...GD},ea=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],zZ=ea.slice(0).reverse();function fo(t,e,r=!1){let n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Et(n)}function VD(t,e){var r;let n=(r=e.milliseconds)!=null?r:0;for(let i of zZ.slice(1))e[i]&&(n+=e[i]*t[i].milliseconds);return n}function q_(t,e){let r=VD(t,e)<0?-1:1;ea.reduceRight((n,i)=>{if(Ae(e[i]))return n;if(n){let o=e[n]*r,s=t[i][n],a=Math.floor(o/s);e[i]+=a*r,e[n]-=a*s*r}return i},null),ea.reduce((n,i)=>{if(Ae(e[i]))return n;if(n){let o=e[n]%1;e[n]-=o,e[i]+=o*t[n][i]}return i},null)}function H_(t){let e={};for(let[r,n]of Object.entries(t))n!==0&&(e[r]=n);return e}var Et=class t{constructor(e){let r=e.conversionAccuracy==="longterm"||!1,n=r?VZ:GZ;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||He.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,r){return t.fromObject({milliseconds:e},r)}static fromObject(e,r={}){if(e==null||typeof e!="object")throw new Qt(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:pf(e,t.normalizeUnit),loc:He.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(e){if(es(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new Qt(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,r){let[n]=LZ(e);return n?t.fromObject(n,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,r){let[n]=FZ(e);return n?t.fromObject(n,r):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,r=null){if(!e)throw new Qt("need to specify a reason the Duration is invalid");let n=e instanceof Ir?e:new Ir(e,r);if(Ye.throwOnInvalid)throw new vE(n);return new t({invalid:n})}static normalizeUnit(e){let r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!r)throw new uf(e);return r}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,r={}){let n={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?Er.create(this.loc,n).formatDurationFromString(this,e):j_}toHuman(e={}){if(!this.isValid)return j_;let r=e.showZeros!==!1,n=ea.map(i=>{let o=this.values[i];return Ae(o)||o===0&&!r?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(o)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=VE(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let r=this.toMillis();return r<0||r>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Ke.fromMillis(r,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?VD(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e),n={};for(let i of ea)(pc(r.values,i)||pc(this.values,i))&&(n[i]=r.get(i)+this.get(i));return fo(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let r=t.fromDurationLike(e);return this.plus(r.negate())}mapUnits(e){if(!this.isValid)return this;let r={};for(let n of Object.keys(this.values))r[n]=RD(e(this.values[n],n));return fo(this,{values:r},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let r={...this.values,...pf(e,t.normalizeUnit)};return fo(this,{values:r})}reconfigure({locale:e,numberingSystem:r,conversionAccuracy:n,matrix:i}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:r}),matrix:i,conversionAccuracy:n};return fo(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return q_(this.matrix,e),fo(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=H_(this.normalize().shiftToAll().toObject());return fo(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>t.normalizeUnit(s));let r={},n={},i=this.toObject(),o;for(let s of ea)if(e.indexOf(s)>=0){o=s;let a=0;for(let u in n)a+=this.matrix[u][s]*n[u],n[u]=0;es(i[s])&&(a+=i[s]);let c=Math.trunc(a);r[s]=c,n[s]=(a*1e3-c*1e3)/1e3}else es(i[s])&&(n[s]=i[s]);for(let s in n)n[s]!==0&&(r[o]+=s===o?n[s]:n[s]/this.matrix[o][s]);return q_(this.matrix,r),fo(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let r of Object.keys(this.values))e[r]=this.values[r]===0?0:-this.values[r];return fo(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=H_(this.values);return fo(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function r(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of ea)if(!r(this.values[n],e.values[n]))return!1;return!0}},lc="Invalid Interval";function YZ(t,e){return!t||!t.isValid?ra.invalid("missing or invalid start"):!e||!e.isValid?ra.invalid("missing or invalid end"):e<t?ra.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var ra=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,r=null){if(!e)throw new Qt("need to specify a reason the Interval is invalid");let n=e instanceof Ir?e:new Ir(e,r);if(Ye.throwOnInvalid)throw new wE(n);return new t({invalid:n})}static fromDateTimes(e,r){let n=sl(e),i=sl(r),o=YZ(n,i);return o??new t({start:n,end:i})}static after(e,r){let n=Et.fromDurationLike(r),i=sl(e);return t.fromDateTimes(i,i.plus(n))}static before(e,r){let n=Et.fromDurationLike(r),i=sl(e);return t.fromDateTimes(i.minus(n),i)}static fromISO(e,r){let[n,i]=(e||"").split("/",2);if(n&&i){let o,s;try{o=Ke.fromISO(n,r),s=o.isValid}catch{s=!1}let a,c;try{a=Ke.fromISO(i,r),c=a.isValid}catch{c=!1}if(s&&c)return t.fromDateTimes(o,a);if(s){let u=Et.fromISO(i,r);if(u.isValid)return t.after(o,u)}else if(c){let u=Et.fromISO(n,r);if(u.isValid)return t.before(a,u)}}return t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",r){if(!this.isValid)return NaN;let n=this.start.startOf(e,r),i;return r!=null&&r.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(e,r),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:r}={}){return this.isValid?t.fromDateTimes(e||this.s,r||this.e):this}splitAt(...e){if(!this.isValid)return[];let r=e.map(sl).filter(s=>this.contains(s)).sort((s,a)=>s.toMillis()-a.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let s=r[o]||this.e,a=+s>+this.e?this.e:s;n.push(t.fromDateTimes(i,a)),i=a,o+=1}return n}splitBy(e){let r=Et.fromDurationLike(e);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,s=[];for(;n<this.e;){let a=this.start.plus(r.mapUnits(c=>c*i));o=+a>+this.e?this.e:a,s.push(t.fromDateTimes(n,o)),n=o,i+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let r=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return r>=n?null:t.fromDateTimes(r,n)}union(e){if(!this.isValid)return this;let r=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return t.fromDateTimes(r,n)}static merge(e){let[r,n]=e.sort((i,o)=>i.s-o.s).reduce(([i,o],s)=>o?o.overlaps(s)||o.abutsStart(s)?[i,o.union(s)]:[i.concat([o]),s]:[i,s],[[],null]);return n&&r.push(n),r}static xor(e){let r=null,n=0,i=[],o=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),s=Array.prototype.concat(...o),a=s.sort((c,u)=>c.time-u.time);for(let c of a)n+=c.type==="s"?1:-1,n===1?r=c.time:(r&&+r!=+c.time&&i.push(t.fromDateTimes(r,c.time)),r=null);return t.merge(i)}difference(...e){return t.xor([this].concat(e)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:lc}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=lf,r={}){return this.isValid?Er.create(this.s.loc.clone(r),e).formatInterval(this):lc}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:lc}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:lc}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:lc}toFormat(e,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${r}${this.e.toFormat(e)}`:lc}toDuration(e,r){return this.isValid?this.e.diff(this.s,e,r):Et.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},ta=class{static hasDST(e=Ye.defaultZone){let r=Ke.now().setZone(e).set({month:12});return!e.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(e){return go.isValidZone(e)}static normalizeZone(e){return Ko(e,Ye.defaultZone)}static getStartOfWeek({locale:e=null,locObj:r=null}={}){return(r||He.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:r=null}={}){return(r||He.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:r=null}={}){return(r||He.create(e)).getWeekendDays().slice()}static months(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||He.create(r,n,o)).months(e)}static monthsFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||He.create(r,n,o)).months(e,!0)}static weekdays(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||He.create(r,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:r=null,numberingSystem:n=null,locObj:i=null}={}){return(i||He.create(r,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return He.create(e).meridiems()}static eras(e="short",{locale:r=null}={}){return He.create(r,null,"gregory").eras(e)}static features(){return{relative:_D(),localeWeek:DD()}}};function G_(t,e){let r=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(Et.fromMillis(n).as("days"))}function JZ(t,e,r){let n=[["years",(c,u)=>u.year-c.year],["quarters",(c,u)=>u.quarter-c.quarter+(u.year-c.year)*4],["months",(c,u)=>u.month-c.month+(u.year-c.year)*12],["weeks",(c,u)=>{let l=G_(c,u);return(l-l%7)/7}],["days",G_]],i={},o=t,s,a;for(let[c,u]of n)r.indexOf(c)>=0&&(s=c,i[c]=u(t,e),a=o.plus(i),a>e?(i[c]--,t=o.plus(i),t>e&&(a=t,i[c]--,t=o.plus(i))):t=a);return[t,i,a,s]}function WZ(t,e,r,n){let[i,o,s,a]=JZ(t,e,r),c=e-i,u=r.filter(A=>["hours","minutes","seconds","milliseconds"].indexOf(A)>=0);u.length===0&&(s<e&&(s=i.plus({[a]:1})),s!==i&&(o[a]=(o[a]||0)+c/(s-i)));let l=Et.fromObject(o,n);return u.length>0?Et.fromMillis(c,n).shiftTo(...u).plus(l):l}var ZZ="missing Intl.DateTimeFormat.formatToParts support";function Ne(t,e=r=>r){return{regex:t,deser:([r])=>e($4(r))}}var KZ="\xA0",zD=`[ ${KZ}]`,YD=new RegExp(zD,"g");function XZ(t){return t.replace(/\./g,"\\.?").replace(YD,zD)}function V_(t){return t.replace(/\./g,"").replace(YD," ").toLowerCase()}function In(t,e){return t===null?null:{regex:RegExp(t.map(XZ).join("|")),deser:([r])=>t.findIndex(n=>V_(r)===V_(n))+e}}function z_(t,e){return{regex:t,deser:([,r,n])=>yf(r,n),groups:e}}function rf(t){return{regex:t,deser:([e])=>e}}function e6(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function t6(t,e){let r=En(e),n=En(e,"{2}"),i=En(e,"{3}"),o=En(e,"{4}"),s=En(e,"{6}"),a=En(e,"{1,2}"),c=En(e,"{1,3}"),u=En(e,"{1,6}"),l=En(e,"{1,9}"),A=En(e,"{2,4}"),d=En(e,"{4,6}"),f=b=>({regex:RegExp(e6(b.val)),deser:([S])=>S,literal:!0}),I=(b=>{if(t.literal)return f(b);switch(b.val){case"G":return In(e.eras("short"),0);case"GG":return In(e.eras("long"),0);case"y":return Ne(u);case"yy":return Ne(A,FE);case"yyyy":return Ne(o);case"yyyyy":return Ne(d);case"yyyyyy":return Ne(s);case"M":return Ne(a);case"MM":return Ne(n);case"MMM":return In(e.months("short",!0),1);case"MMMM":return In(e.months("long",!0),1);case"L":return Ne(a);case"LL":return Ne(n);case"LLL":return In(e.months("short",!1),1);case"LLLL":return In(e.months("long",!1),1);case"d":return Ne(a);case"dd":return Ne(n);case"o":return Ne(c);case"ooo":return Ne(i);case"HH":return Ne(n);case"H":return Ne(a);case"hh":return Ne(n);case"h":return Ne(a);case"mm":return Ne(n);case"m":return Ne(a);case"q":return Ne(a);case"qq":return Ne(n);case"s":return Ne(a);case"ss":return Ne(n);case"S":return Ne(c);case"SSS":return Ne(i);case"u":return rf(l);case"uu":return rf(a);case"uuu":return Ne(r);case"a":return In(e.meridiems(),0);case"kkkk":return Ne(o);case"kk":return Ne(A,FE);case"W":return Ne(a);case"WW":return Ne(n);case"E":case"c":return Ne(r);case"EEE":return In(e.weekdays("short",!1),1);case"EEEE":return In(e.weekdays("long",!1),1);case"ccc":return In(e.weekdays("short",!0),1);case"cccc":return In(e.weekdays("long",!0),1);case"Z":case"ZZ":return z_(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return z_(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return rf(/[a-z_+-/]{1,256}?/i);case" ":return rf(/[^\S\n\r]/);default:return f(b)}})(t)||{invalidReason:ZZ};return I.token=t,I}var r6={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function n6(t,e,r){let{type:n,value:i}=t;if(n==="literal"){let c=/^\s+$/.test(i);return{literal:!c,val:c?" ":i}}let o=e[n],s=n;n==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=r.hour12?"hour12":"hour24");let a=r6[s];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function i6(t){return[`^${t.map(r=>r.regex).reduce((r,n)=>`${r}(${n.source})`,"")}$`,t]}function o6(t,e,r){let n=t.match(e);if(n){let i={},o=1;for(let s in r)if(pc(r,s)){let a=r[s],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(n.slice(o,o+c))),o+=c}return[n,i]}else return[n,{}]}function s6(t){let e=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r=null,n;return Ae(t.z)||(r=go.create(t.z)),Ae(t.Z)||(r||(r=new br(t.Z)),n=t.Z),Ae(t.q)||(t.M=(t.q-1)*3+1),Ae(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),Ae(t.u)||(t.S=GE(t.u)),[Object.keys(t).reduce((o,s)=>{let a=e(s);return a&&(o[a]=t[s]),o},{}),r,n]}var IE=null;function a6(){return IE||(IE=Ke.fromMillis(1555555555555)),IE}function c6(t,e){if(t.literal)return t;let r=Er.macroTokenToFormatOpts(t.val),n=ZD(r,e);return n==null||n.includes(void 0)?t:n}function JD(t,e){return Array.prototype.concat(...t.map(r=>c6(r,e)))}var gf=class{constructor(e,r){if(this.locale=e,this.format=r,this.tokens=JD(Er.parseFormat(r),e),this.units=this.tokens.map(n=>t6(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=i6(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[r,n]=o6(e,this.regex,this.handlers),[i,o,s]=n?s6(n):[null,null,void 0];if(pc(n,"a")&&pc(n,"H"))throw new Xo("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:r,matches:n,result:i,zone:o,specificOffset:s}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function WD(t,e,r){return new gf(t,r).explainFromTokens(e)}function u6(t,e,r){let{result:n,zone:i,specificOffset:o,invalidReason:s}=WD(t,e,r);return[n,i,o,s]}function ZD(t,e){if(!t)return null;let n=Er.create(e,t).dtFormatter(a6()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(s=>n6(s,t,o))}var CE="Invalid DateTime",Y_=864e13;function cl(t){return new Ir("unsupported zone",`the zone "${t.name}" is not supported`)}function bE(t){return t.weekData===null&&(t.weekData=df(t.c)),t.weekData}function SE(t){return t.localWeekData===null&&(t.localWeekData=df(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Xs(t,e){let r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Ke({...r,...e,old:r})}function KD(t,e,r){let n=t-e*60*1e3,i=r.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;let o=r.offset(n);return i===o?[n,i]:[t-Math.min(i,o)*60*1e3,Math.max(i,o)]}function nf(t,e){t+=e*60*1e3;let r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function sf(t,e,r){return KD(mf(t),e,r)}function J_(t,e){let r=t.o,n=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o={...t.c,year:n,month:i,day:Math.min(t.c.day,ff(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=Et.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=mf(o),[c,u]=KD(a,r,t.zone);return s!==0&&(c+=s,u=t.zone.offset(c)),{ts:c,o:u}}function Ac(t,e,r,n,i,o){let{setZone:s,zone:a}=r;if(t&&Object.keys(t).length!==0||e){let c=e||a,u=Ke.fromObject(t,{...r,zone:c,specificOffset:o});return s?u:u.setZone(a)}else return Ke.invalid(new Ir("unparsable",`the input "${i}" can't be parsed as ${n}`))}function of(t,e,r=!0){return t.isValid?Er.create(He.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function BE(t,e,r){let n=t.c.year>9999||t.c.year<0,i="";if(n&&t.c.year>=0&&(i+="+"),i+=pt(t.c.year,n?6:4),r==="year")return i;if(e){if(i+="-",i+=pt(t.c.month),r==="month")return i;i+="-"}else if(i+=pt(t.c.month),r==="month")return i;return i+=pt(t.c.day),i}function W_(t,e,r,n,i,o,s){let a=!r||t.c.millisecond!==0||t.c.second!==0,c="";switch(s){case"day":case"month":case"year":break;default:if(c+=pt(t.c.hour),s==="hour")break;if(e){if(c+=":",c+=pt(t.c.minute),s==="minute")break;a&&(c+=":",c+=pt(t.c.second))}else{if(c+=pt(t.c.minute),s==="minute")break;a&&(c+=pt(t.c.second))}if(s==="second")break;a&&(!n||t.c.millisecond!==0)&&(c+=".",c+=pt(t.c.millisecond,3))}return i&&(t.isOffsetFixed&&t.offset===0&&!o?c+="Z":t.o<0?(c+="-",c+=pt(Math.trunc(-t.o/60)),c+=":",c+=pt(Math.trunc(-t.o%60))):(c+="+",c+=pt(Math.trunc(t.o/60)),c+=":",c+=pt(Math.trunc(t.o%60)))),o&&(c+="["+t.zone.ianaName+"]"),c}var XD={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},l6={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},A6={ordinal:1,hour:0,minute:0,second:0,millisecond:0},af=["year","month","day","hour","minute","second","millisecond"],d6=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],f6=["year","ordinal","hour","minute","second","millisecond"];function cf(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new uf(t);return e}function Z_(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return cf(t)}}function p6(t){if(ul===void 0&&(ul=Ye.now()),t.type!=="iana")return t.offset(ul);let e=t.name,r=$E.get(e);return r===void 0&&(r=t.offset(ul),$E.set(e,r)),r}function K_(t,e){let r=Ko(e.zone,Ye.defaultZone);if(!r.isValid)return Ke.invalid(cl(r));let n=He.fromObject(e),i,o;if(Ae(t.year))i=Ye.now();else{for(let c of af)Ae(t[c])&&(t[c]=XD[c]);let s=wD(t)||vD(t);if(s)return Ke.invalid(s);let a=p6(r);[i,o]=sf(t,a,r)}return new Ke({ts:i,zone:r,loc:n,o})}function X_(t,e,r){let n=Ae(r.round)?!0:r.round,i=Ae(r.rounding)?"trunc":r.rounding,o=(a,c)=>(a=VE(a,n||r.calendary?0:2,r.calendary?"round":i),e.loc.clone(r).relFormatter(r).format(a,c)),s=a=>r.calendary?e.hasSame(t,a)?0:e.startOf(a).diff(t.startOf(a),a).get(a):e.diff(t,a).get(a);if(r.unit)return o(s(r.unit),r.unit);for(let a of r.units){let c=s(a);if(Math.abs(c)>=1)return o(c,a)}return o(t>e?-0:0,r.units[r.units.length-1])}function eD(t){let e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}var ul,$E=new Map,Ke=class t{constructor(e){let r=e.zone||Ye.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Ir("invalid input"):null)||(r.isValid?null:cl(r));this.ts=Ae(e.ts)?Ye.now():e.ts;let i=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(r))[i,o]=[e.old.c,e.old.o];else{let a=es(e.o)&&!e.old?e.o:r.offset(this.ts);i=nf(this.ts,a),n=Number.isNaN(i.year)?new Ir("invalid input"):null,i=n?null:i,o=n?null:a}this._zone=r,this.loc=e.loc||He.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,r]=eD(arguments),[n,i,o,s,a,c,u]=r;return K_({year:n,month:i,day:o,hour:s,minute:a,second:c,millisecond:u},e)}static utc(){let[e,r]=eD(arguments),[n,i,o,s,a,c,u]=r;return e.zone=br.utcInstance,K_({year:n,month:i,day:o,hour:s,minute:a,second:c,millisecond:u},e)}static fromJSDate(e,r={}){let n=V4(e)?e.valueOf():NaN;if(Number.isNaN(n))return t.invalid("invalid input");let i=Ko(r.zone,Ye.defaultZone);return i.isValid?new t({ts:n,zone:i,loc:He.fromObject(r)}):t.invalid(cl(i))}static fromMillis(e,r={}){if(es(e))return e<-Y_||e>Y_?t.invalid("Timestamp out of range"):new t({ts:e,zone:Ko(r.zone,Ye.defaultZone),loc:He.fromObject(r)});throw new Qt(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,r={}){if(es(e))return new t({ts:e*1e3,zone:Ko(r.zone,Ye.defaultZone),loc:He.fromObject(r)});throw new Qt("fromSeconds requires a numerical input")}static fromObject(e,r={}){e=e||{};let n=Ko(r.zone,Ye.defaultZone);if(!n.isValid)return t.invalid(cl(n));let i=He.fromObject(r),o=pf(e,Z_),{minDaysInFirstWeek:s,startOfWeek:a}=x_(o,i),c=Ye.now(),u=Ae(r.specificOffset)?n.offset(c):r.specificOffset,l=!Ae(o.ordinal),A=!Ae(o.year),d=!Ae(o.month)||!Ae(o.day),f=A||d,g=o.weekYear||o.weekNumber;if((f||l)&&g)throw new Xo("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&l)throw new Xo("Can't mix ordinal dates with month/day");let I=g||o.weekday&&!f,b,S,w=nf(c,u);I?(b=d6,S=l6,w=df(w,s,a)):l?(b=f6,S=A6,w=EE(w)):(b=af,S=XD);let Q=!1;for(let Ce of b){let Se=o[Ce];Ae(Se)?Q?o[Ce]=S[Ce]:o[Ce]=w[Ce]:Q=!0}let N=I?q4(o,s,a):l?H4(o):wD(o),O=N||vD(o);if(O)return t.invalid(O);let G=I?U_(o,s,a):l?M_(o):o,[J,X]=sf(G,u,n),Y=new t({ts:J,zone:n,o:X,loc:i});return o.weekday&&f&&e.weekday!==Y.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${Y.toISO()}`):Y.isValid?Y:t.invalid(Y.invalid)}static fromISO(e,r={}){let[n,i]=UZ(e);return Ac(n,i,r,"ISO 8601",e)}static fromRFC2822(e,r={}){let[n,i]=MZ(e);return Ac(n,i,r,"RFC 2822",e)}static fromHTTP(e,r={}){let[n,i]=xZ(e);return Ac(n,i,r,"HTTP",r)}static fromFormat(e,r,n={}){if(Ae(e)||Ae(r))throw new Qt("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,s=He.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[a,c,u,l]=u6(s,e,r);return l?t.invalid(l):Ac(a,c,n,`format ${r}`,e,u)}static fromString(e,r,n={}){return t.fromFormat(e,r,n)}static fromSQL(e,r={}){let[n,i]=HZ(e);return Ac(n,i,r,"SQL",e)}static invalid(e,r=null){if(!e)throw new Qt("need to specify a reason the DateTime is invalid");let n=e instanceof Ir?e:new Ir(e,r);if(Ye.throwOnInvalid)throw new QE(n);return new t({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,r={}){let n=ZD(e,He.fromObject(r));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,r={}){return JD(Er.parseFormat(e),He.fromObject(r)).map(i=>i.val).join("")}static resetCache(){ul=void 0,$E.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?bE(this).weekYear:NaN}get weekNumber(){return this.isValid?bE(this).weekNumber:NaN}get weekday(){return this.isValid?bE(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?SE(this).weekday:NaN}get localWeekNumber(){return this.isValid?SE(this).weekNumber:NaN}get localWeekYear(){return this.isValid?SE(this).weekYear:NaN}get ordinal(){return this.isValid?EE(this.c).ordinal:NaN}get monthShort(){return this.isValid?ta.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ta.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ta.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ta.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,r=6e4,n=mf(this.c),i=this.zone.offset(n-e),o=this.zone.offset(n+e),s=this.zone.offset(n-i*r),a=this.zone.offset(n-o*r);if(s===a)return[this];let c=n-s*r,u=n-a*r,l=nf(c,s),A=nf(u,a);return l.hour===A.hour&&l.minute===A.minute&&l.second===A.second&&l.millisecond===A.millisecond?[Xs(this,{ts:c}),Xs(this,{ts:u})]:[this]}get isInLeapYear(){return fl(this.year)}get daysInMonth(){return ff(this.year,this.month)}get daysInYear(){return this.isValid?dc(this.year):NaN}get weeksInWeekYear(){return this.isValid?dl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?dl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:r,numberingSystem:n,calendar:i}=Er.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:r,numberingSystem:n,outputCalendar:i}}toUTC(e=0,r={}){return this.setZone(br.instance(e),r)}toLocal(){return this.setZone(Ye.defaultZone)}setZone(e,{keepLocalTime:r=!1,keepCalendarTime:n=!1}={}){if(e=Ko(e,Ye.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(r||n){let o=e.offset(this.ts),s=this.toObject();[i]=sf(s,o,e)}return Xs(this,{ts:i,zone:e})}else return t.invalid(cl(e))}reconfigure({locale:e,numberingSystem:r,outputCalendar:n}={}){let i=this.loc.clone({locale:e,numberingSystem:r,outputCalendar:n});return Xs(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let r=pf(e,Z_),{minDaysInFirstWeek:n,startOfWeek:i}=x_(r,this.loc),o=!Ae(r.weekYear)||!Ae(r.weekNumber)||!Ae(r.weekday),s=!Ae(r.ordinal),a=!Ae(r.year),c=!Ae(r.month)||!Ae(r.day),u=a||c,l=r.weekYear||r.weekNumber;if((u||s)&&l)throw new Xo("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new Xo("Can't mix ordinal dates with month/day");let A;o?A=U_({...df(this.c,n,i),...r},n,i):Ae(r.ordinal)?(A={...this.toObject(),...r},Ae(r.day)&&(A.day=Math.min(ff(A.year,A.month),A.day))):A=M_({...EE(this.c),...r});let[d,f]=sf(A,this.o,this.zone);return Xs(this,{ts:d,o:f})}plus(e){if(!this.isValid)return this;let r=Et.fromDurationLike(e);return Xs(this,J_(this,r))}minus(e){if(!this.isValid)return this;let r=Et.fromDurationLike(e).negate();return Xs(this,J_(this,r))}startOf(e,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;let n={},i=Et.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(r){let o=this.loc.getStartOfWeek(),{weekday:s}=this;s<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(e,r){return this.isValid?this.plus({[e]:1}).startOf(e,r).minus(1):this}toFormat(e,r={}){return this.isValid?Er.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,e):CE}toLocaleString(e=lf,r={}){return this.isValid?Er.create(this.loc.clone(r),e).formatDateTime(this):CE}toLocaleParts(e={}){return this.isValid?Er.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:r=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=cf(s);let a=e==="extended",c=BE(this,a,s);return af.indexOf(s)>=3&&(c+="T"),c+=W_(this,a,r,n,i,o,s),c}toISODate({format:e="extended",precision:r="day"}={}){return this.isValid?BE(this,e==="extended",cf(r)):null}toISOWeekDate(){return of(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:r=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:s="extended",precision:a="milliseconds"}={}){return this.isValid?(a=cf(a),(i&&af.indexOf(a)>=3?"T":"")+W_(this,s==="extended",r,e,n,o,a)):null}toRFC2822(){return of(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return of(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?BE(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:r=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(r||e)&&(n&&(i+=" "),r?i+="z":e&&(i+="ZZ")),of(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():CE}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let r={...this.c};return e.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,r="milliseconds",n={}){if(!this.isValid||!e.isValid)return Et.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=z4(r).map(Et.normalizeUnit),s=e.valueOf()>this.valueOf(),a=s?this:e,c=s?e:this,u=WZ(a,c,o,i);return s?u.negate():u}diffNow(e="milliseconds",r={}){return this.diff(t.now(),e,r)}until(e){return this.isValid?ra.fromDateTimes(this,e):this}hasSame(e,r,n){if(!this.isValid)return!1;let i=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(r,n)<=i&&i<=o.endOf(r,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let r=e.base||t.fromObject({},{zone:this.zone}),n=e.padding?this<r?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(i=e.unit,o=void 0),X_(r,this.plus(n),{...e,numeric:"always",units:i,unit:o})}toRelativeCalendar(e={}){return this.isValid?X_(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new Qt("min requires all arguments be DateTimes");return L_(e,r=>r.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new Qt("max requires all arguments be DateTimes");return L_(e,r=>r.valueOf(),Math.max)}static fromFormatExplain(e,r,n={}){let{locale:i=null,numberingSystem:o=null}=n,s=He.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return WD(s,e,r)}static fromStringExplain(e,r,n={}){return t.fromFormatExplain(e,r,n)}static buildFormatParser(e,r={}){let{locale:n=null,numberingSystem:i=null}=r,o=He.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new gf(o,e)}static fromFormatParser(e,r,n={}){if(Ae(e)||Ae(r))throw new Qt("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,s=He.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!s.equals(r.locale))throw new Qt(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${r.locale}`);let{result:a,zone:c,specificOffset:u,invalidReason:l}=r.explainFromTokens(e);return l?t.invalid(l):Ac(a,c,n,`format ${r.format}`,e,u)}static get DATE_SHORT(){return lf}static get DATE_MED(){return tD}static get DATE_MED_WITH_WEEKDAY(){return B4}static get DATE_FULL(){return rD}static get DATE_HUGE(){return nD}static get TIME_SIMPLE(){return iD}static get TIME_WITH_SECONDS(){return oD}static get TIME_WITH_SHORT_OFFSET(){return sD}static get TIME_WITH_LONG_OFFSET(){return aD}static get TIME_24_SIMPLE(){return cD}static get TIME_24_WITH_SECONDS(){return uD}static get TIME_24_WITH_SHORT_OFFSET(){return lD}static get TIME_24_WITH_LONG_OFFSET(){return AD}static get DATETIME_SHORT(){return dD}static get DATETIME_SHORT_WITH_SECONDS(){return fD}static get DATETIME_MED(){return pD}static get DATETIME_MED_WITH_SECONDS(){return gD}static get DATETIME_MED_WITH_WEEKDAY(){return Q4}static get DATETIME_FULL(){return hD}static get DATETIME_FULL_WITH_SECONDS(){return mD}static get DATETIME_HUGE(){return yD}static get DATETIME_HUGE_WITH_SECONDS(){return ED}};function sl(t){if(Ke.isDateTime(t))return t;if(t&&t.valueOf&&es(t.valueOf()))return Ke.fromJSDate(t);if(t&&typeof t=="object")return Ke.fromObject(t);throw new Qt(`Unknown datetime argument: ${t}, of type ${typeof t}`)}var g6="3.7.2";Sr.DateTime=Ke;Sr.Duration=Et;Sr.FixedOffsetZone=br;Sr.IANAZone=go;Sr.Info=ta;Sr.Interval=ra;Sr.InvalidZone=Af;Sr.Settings=Ye;Sr.SystemZone=Al;Sr.VERSION=g6;Sr.Zone=ts});var bf=h(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.CronDate=Jt.DAYS_IN_MONTH=Jt.DateMathOp=Jt.TimeUnit=void 0;var na=eT(),Mt;(function(t){t.Second="Second",t.Minute="Minute",t.Hour="Hour",t.Day="Day",t.Month="Month",t.Year="Year"})(Mt||(Jt.TimeUnit=Mt={}));var If;(function(t){t.Add="Add",t.Subtract="Subtract"})(If||(Jt.DateMathOp=If={}));Jt.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var Cf=class t{#e;#t=null;#n=null;#i={add:{[Mt.Year]:this.addYear.bind(this),[Mt.Month]:this.addMonth.bind(this),[Mt.Day]:this.addDay.bind(this),[Mt.Hour]:this.addHour.bind(this),[Mt.Minute]:this.addMinute.bind(this),[Mt.Second]:this.addSecond.bind(this)},subtract:{[Mt.Year]:this.subtractYear.bind(this),[Mt.Month]:this.subtractMonth.bind(this),[Mt.Day]:this.subtractDay.bind(this),[Mt.Hour]:this.subtractHour.bind(this),[Mt.Minute]:this.subtractMinute.bind(this),[Mt.Second]:this.subtractSecond.bind(this)}};constructor(e,r){let n={zone:r};if(e?e instanceof t?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n):e instanceof Date?this.#e=na.DateTime.fromJSDate(e,n):typeof e=="number"?this.#e=na.DateTime.fromMillis(e,n):(this.#e=na.DateTime.fromISO(e,n),this.#e.isValid||(this.#e=na.DateTime.fromRFC2822(e,n)),this.#e.isValid||(this.#e=na.DateTime.fromSQL(e,n)),this.#e.isValid||(this.#e=na.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",n))):this.#e=na.DateTime.local(),!this.#e.isValid)throw new Error(`CronDate: unhandled timestamp: ${e}`);r&&r!==this.#e.zoneName&&(this.#e=this.#e.setZone(r))}static#o(e){return e%4===0&&e%100!==0||e%400===0}get dstStart(){return this.#t}set dstStart(e){this.#t=e}get dstEnd(){return this.#n}set dstEnd(e){this.#n=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf("month")}addDay(){this.#e=this.#e.plus({days:1}).startOf("day")}addHour(){this.#e=this.#e.plus({hours:1}).startOf("hour")}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf("minute")}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf("month").startOf("second")}subtractDay(){this.#e=this.#e.minus({days:1}).endOf("day").startOf("second")}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf("hour").startOf("second")}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf("minute").startOf("second")}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){this.#i.add[e]()}subtractUnit(e){this.#i.subtract[e]()}invokeDateOperation(e,r){if(e===If.Add){this.addUnit(r);return}if(e===If.Subtract){this.subtractUnit(r);return}throw new Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf("day")}setEndOfDay(){this.#e=this.#e.endOf("day")}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#r().day}getUTCFullYear(){return this.#r().year}getUTCDay(){let e=this.#r().weekday;return e===7?0:e}getUTCMonth(){return this.#r().month-1}getUTCHours(){return this.#r().hour}getUTCMinutes(){return this.#r().minute}getUTCSeconds(){return this.#r().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:e,month:r}=this.#e;if(r===2){let n=t.#o(this.#e.year);return e===Jt.DAYS_IN_MONTH[r-1]-(n?0:1)}return e===Jt.DAYS_IN_MONTH[r-1]}isLastWeekdayOfMonth(){let{day:e,month:r}=this.#e,n;return r===2?n=Jt.DAYS_IN_MONTH[r-1]-(t.#o(this.#e.year)?0:1):n=Jt.DAYS_IN_MONTH[r-1],e>n-7}applyDateOperation(e,r,n){if(r===Mt.Month||r===Mt.Day){this.invokeDateOperation(e,r);return}let i=this.getHours();this.invokeDateOperation(e,r);let o=this.getHours(),s=o-i;s===2?n!==24&&(this.dstStart=o):s===0&&this.getMinutes()===0&&this.getSeconds()===0&&n!==24&&(this.dstEnd=o)}#r(){return this.#e.toUTC()}};Jt.CronDate=Cf;Jt.default=Cf});var tT=h(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.CronMonth=void 0;var h6=bf(),m6=Wo(),y6=1,E6=12,I6=Object.freeze([]),WE=class extends m6.CronField{static get min(){return y6}static get max(){return E6}static get chars(){return I6}static get daysInMonth(){return h6.DAYS_IN_MONTH}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};Sf.CronMonth=WE});var rT=h(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf.CronSecond=void 0;var C6=Wo(),b6=0,S6=59,B6=Object.freeze([]),ZE=class extends C6.CronField{static get min(){return b6}static get max(){return S6}static get chars(){return B6}constructor(e,r){super(e,r),this.validate()}get values(){return super.values}};Bf.CronSecond=ZE});var Qf=h(ir=>{"use strict";var Q6=ir&&ir.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rs=ir&&ir.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Q6(e,t,r)};Object.defineProperty(ir,"__esModule",{value:!0});rs(I_(),ir);rs(C_(),ir);rs(b_(),ir);rs(Wo(),ir);rs(S_(),ir);rs(B_(),ir);rs(tT(),ir);rs(rT(),ir)});var XE=h(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.CronFieldCollection=void 0;var zr=Qf(),KE=class t{#e;#t;#n;#i;#o;#r;static from(e,r){return new t({second:this.resolveField(zr.CronSecond,e.second,r.second),minute:this.resolveField(zr.CronMinute,e.minute,r.minute),hour:this.resolveField(zr.CronHour,e.hour,r.hour),dayOfMonth:this.resolveField(zr.CronDayOfMonth,e.dayOfMonth,r.dayOfMonth),month:this.resolveField(zr.CronMonth,e.month,r.month),dayOfWeek:this.resolveField(zr.CronDayOfWeek,e.dayOfWeek,r.dayOfWeek)})}static resolveField(e,r,n){return n?n instanceof zr.CronField?n:new e(n):r}constructor({second:e,minute:r,hour:n,dayOfMonth:i,month:o,dayOfWeek:s}){if(!e)throw new Error("Validation error, Field second is missing");if(!r)throw new Error("Validation error, Field minute is missing");if(!n)throw new Error("Validation error, Field hour is missing");if(!i)throw new Error("Validation error, Field dayOfMonth is missing");if(!o)throw new Error("Validation error, Field month is missing");if(!s)throw new Error("Validation error, Field dayOfWeek is missing");if(o.values.length===1&&!i.hasLastChar&&!(parseInt(i.values[0],10)<=zr.CronMonth.daysInMonth[o.values[0]-1]))throw new Error("Invalid explicit day of month definition");this.#e=e,this.#t=r,this.#n=n,this.#o=o,this.#r=s,this.#i=i}get second(){return this.#e}get minute(){return this.#t}get hour(){return this.#n}get dayOfMonth(){return this.#i}get month(){return this.#o}get dayOfWeek(){return this.#r}static compactField(e){if(e.length===0)return[];let r=[],n;return e.forEach((i,o,s)=>{if(n===void 0){n={start:i,count:1};return}let a=s[o-1]||n.start,c=s[o+1];if(i==="L"||i==="W"){r.push(n),r.push({start:i,count:1}),n=void 0;return}if(n.step===void 0&&c!==void 0){let u=i-a,l=c-i;if(u<=l){n={...n,count:2,end:i,step:u};return}n.step=1}i-(n.end??0)===n.step?(n.count++,n.end=i):(n.count===1?r.push({start:n.start,count:1}):n.count===2?(r.push({start:n.start,count:1}),r.push({start:n.end??a,count:1})):r.push(n),n={start:i,count:1})}),n&&r.push(n),r}static#c(e,r,n){let i=r.step;return i?i===1&&r.start===e.min&&r.end&&r.end>=n?e.hasQuestionMarkChar?"?":"*":i!==1&&r.start===e.min&&r.end&&r.end>=n-i+1?`*/${i}`:null:null}static#s(e,r){let n=e.step;if(n===1)return`${e.start}-${e.end}`;let i=e.start===0?e.count-1:e.count;if(!n)throw new Error("Unexpected range step");if(!e.end)throw new Error("Unexpected range end");if(n*i>e.end){let o=(a,c)=>{if(typeof e.start!="number")throw new Error("Unexpected range start");return c%n===0?e.start+c:null};if(typeof e.start!="number")throw new Error("Unexpected range start");let s={length:e.end-e.start+1};return Array.from(s,o).filter(a=>a!==null).join(",")}return e.end===r-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(e){let r=e.max,n=e.values;if(e instanceof zr.CronDayOfWeek){r=6;let o=this.#r.values;n=o[o.length-1]===7?o.slice(0,-1):o}e instanceof zr.CronDayOfMonth&&(r=this.#o.values.length===1?zr.CronMonth.daysInMonth[this.#o.values[0]-1]:e.max);let i=t.compactField(n);if(i.length===1){let o=t.#c(e,i[0],r);if(o)return o}return i.map(o=>{let s=o.count===1?o.start.toString():t.#s(o,r);return e instanceof zr.CronDayOfWeek&&e.nthDay>0?`${s}#${e.nthDay}`:s}).join(",")}stringify(e=!1){let r=[];return e&&r.push(this.stringifyField(this.#e)),r.push(this.stringifyField(this.#t),this.stringifyField(this.#n),this.stringifyField(this.#i),this.stringifyField(this.#o),this.stringifyField(this.#r)),r.join(" ")}serialize(){return{second:this.#e.serialize(),minute:this.#t.serialize(),hour:this.#n.serialize(),dayOfMonth:this.#i.serialize(),month:this.#o.serialize(),dayOfWeek:this.#r.serialize()}}};wf.CronFieldCollection=KE});var eI=h(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.CronExpression=Yr.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=Yr.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var it=bf();Yr.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range";Yr.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";var nT=1e4,vf=class t{#e;#t;#n;#i;#o;#r;#c=null;#s=!1;constructor(e,r){this.#e=r,this.#t=r.tz,this.#i=r.startDate?new it.CronDate(r.startDate,this.#t):null,this.#o=r.endDate?new it.CronDate(r.endDate,this.#t):null;let n=r.currentDate??r.startDate;if(n){let i=new it.CronDate(n,this.#t);this.#i&&i.getTime()<this.#i.getTime()?n=this.#i:this.#o&&i.getTime()>this.#o.getTime()&&(n=this.#o)}this.#n=new it.CronDate(n,this.#t),this.#r=e}get fields(){return this.#r}static fieldsToExpression(e,r){return new t(e,r||{})}static#a(e,r){return r.some(n=>n===e)}#u(e,r){return e[r?e.length-1:0]}#A(e){let r=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#c===r)return this.#s;let n=new it.CronDate(e);n.setStartOfDay();let i=new it.CronDate(e);return i.setEndOfDay(),this.#c=r,this.#s=n.getUTCOffset()!==i.getUTCOffset(),this.#s}#l(e,r,n){let i=this.#r.second.values,o=e.getSeconds(),s=this.#r.second.findNearestValue(o,n);if(s!==null){e.setSeconds(s);return}e.applyDateOperation(r,it.TimeUnit.Minute,this.#r.hour.values.length),e.setSeconds(this.#u(i,n))}#d(e,r,n){let i=this.#r.minute.values,o=this.#r.second.values,s=e.getMinutes(),a=this.#r.minute.findNearestValue(s,n);if(a!==null){e.setMinutes(a),e.setSeconds(this.#u(o,n));return}e.applyDateOperation(r,it.TimeUnit.Hour,this.#r.hour.values.length),e.setMinutes(this.#u(i,n)),e.setSeconds(this.#u(o,n))}static#p(e,r){let n=r.isLastWeekdayOfMonth();return e.some(i=>{let o=parseInt(i.toString().charAt(0),10)%7;if(Number.isNaN(o))throw new Error(`Invalid last weekday of the month expression: ${i}`);return r.getDay()===o&&n})}next(){return this.#h()}prev(){return this.#h(!0)}hasNext(){let e=this.#n;try{return this.#h(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#h(!0),!0}catch{return!1}finally{this.#n=e}}take(e){let r=[];if(e>=0)for(let n=0;n<e;n++)try{r.push(this.next())}catch{return r}else for(let n=0;n>e;n--)try{r.push(this.prev())}catch{return r}return r}reset(e){this.#n=new it.CronDate(e||this.#e.currentDate)}stringify(e=!1){return this.#r.stringify(e)}includesDate(e){let{second:r,minute:n,hour:i,month:o}=this.#r,s=new it.CronDate(e,this.#t);return!(!r.values.includes(s.getSeconds())||!n.values.includes(s.getMinutes())||!i.values.includes(s.getHours())||!o.values.includes(s.getMonth()+1)||!this.#f(s)||this.#r.dayOfWeek.nthDay>0&&Math.ceil(s.getDate()/7)!==this.#r.dayOfWeek.nthDay)}toString(){return this.#e.expression||this.stringify(!0)}#f(e){let r=this.#r.dayOfMonth.isWildcard,n=!r,i=this.#r.dayOfWeek.isWildcard,o=!i,s=t.#a(e.getDate(),this.#r.dayOfMonth.values)||this.#r.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),a=t.#a(e.getDay(),this.#r.dayOfWeek.values)||this.#r.dayOfWeek.hasLastChar&&t.#p(this.#r.dayOfWeek.values,e);return!!(n&&o&&(s||a)||s&&!o||r&&!i&&a)}#m(e,r,n){let i=this.#r.hour.values,o=i,s=e.getHours(),a=t.#a(s,i),c=e.dstStart===s,u=e.dstEnd===s;if(c)return t.#a(s-1,i)?!0:(e.invokeDateOperation(r,it.TimeUnit.Hour),!1);if(u&&!n)return e.dstEnd=null,e.applyDateOperation(it.DateMathOp.Add,it.TimeUnit.Hour,o.length),!1;if(a)return!0;e.dstStart=null;let l=this.#r.hour.findNearestValue(s,n);if(l===null)return e.applyDateOperation(r,it.TimeUnit.Day,o.length),!1;if(this.#A(e)){let A=n?s-l:l-s;for(let d=0;d<A;d++)e.applyDateOperation(r,it.TimeUnit.Hour,o.length)}else e.setHours(l);return e.setMinutes(this.#u(this.#r.minute.values,n)),e.setSeconds(this.#u(this.#r.second.values,n)),!1}#g(e){if(!this.#i&&!this.#o)return;let r=e.getTime();if(this.#i&&r<this.#i.getTime())throw new Error(Yr.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(this.#o&&r>this.#o.getTime())throw new Error(Yr.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#h(e=!1){let r=e?it.DateMathOp.Subtract:it.DateMathOp.Add,n=new it.CronDate(this.#n),i=n.getTime(),o=0;for(;++o<nT;){if(this.#g(n),!this.#f(n)){n.applyDateOperation(r,it.TimeUnit.Day,this.#r.hour.values.length);continue}if(!(this.#r.dayOfWeek.nthDay<=0||Math.ceil(n.getDate()/7)===this.#r.dayOfWeek.nthDay)){n.applyDateOperation(r,it.TimeUnit.Day,this.#r.hour.values.length);continue}if(!t.#a(n.getMonth()+1,this.#r.month.values)){n.applyDateOperation(r,it.TimeUnit.Month,this.#r.hour.values.length);continue}if(this.#m(n,r,e)){if(!t.#a(n.getMinutes(),this.#r.minute.values)){this.#d(n,r,e);continue}if(!t.#a(n.getSeconds(),this.#r.second.values)){this.#l(n,r,e);continue}if(i===n.getTime()){(r==="Add"||n.getMilliseconds()===0)&&n.applyDateOperation(r,it.TimeUnit.Second,this.#r.hour.values.length);continue}break}}if(o>nT)throw new Error(Yr.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return n.getMilliseconds()!==0&&n.setMilliseconds(0),this.#n=n,n}[Symbol.iterator](){return{next:()=>({value:this.#h(),done:!this.hasNext()})}}};Yr.CronExpression=vf;Yr.default=vf});var iT=h(tI=>{"use strict";Object.defineProperty(tI,"__esModule",{value:!0});tI.seededRandom=_6;function w6(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619);return()=>e>>>0}function v6(t){return()=>{let e=t+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function _6(t){let e=t?w6(t)():Math.floor(Math.random()*1e10);return v6(e)}});var _f=h(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.CronExpressionParser=Zr.DayOfWeek=Zr.Months=Zr.CronUnit=Zr.PredefinedExpressions=void 0;var D6=XE(),T6=eI(),R6=iT(),Jr=Qf(),rI;(function(t){t["@yearly"]="0 0 0 1 1 *",t["@annually"]="0 0 0 1 1 *",t["@monthly"]="0 0 0 1 * *",t["@weekly"]="0 0 0 * * 0",t["@daily"]="0 0 0 * * *",t["@hourly"]="0 0 * * * *",t["@minutely"]="0 * * * * *",t["@secondly"]="* * * * * *",t["@weekdays"]="0 0 0 * * 1-5",t["@weekends"]="0 0 0 * * 0,6"})(rI||(Zr.PredefinedExpressions=rI={}));var Wr;(function(t){t.Second="Second",t.Minute="Minute",t.Hour="Hour",t.DayOfMonth="DayOfMonth",t.Month="Month",t.DayOfWeek="DayOfWeek"})(Wr||(Zr.CronUnit=Wr={}));var nI;(function(t){t[t.jan=1]="jan",t[t.feb=2]="feb",t[t.mar=3]="mar",t[t.apr=4]="apr",t[t.may=5]="may",t[t.jun=6]="jun",t[t.jul=7]="jul",t[t.aug=8]="aug",t[t.sep=9]="sep",t[t.oct=10]="oct",t[t.nov=11]="nov",t[t.dec=12]="dec"})(nI||(Zr.Months=nI={}));var iI;(function(t){t[t.sun=0]="sun",t[t.mon=1]="mon",t[t.tue=2]="tue",t[t.wed=3]="wed",t[t.thu=4]="thu",t[t.fri=5]="fri",t[t.sat=6]="sat"})(iI||(Zr.DayOfWeek=iI={}));var oI=class t{static parse(e,r={}){let{strict:n=!1,hashSeed:i}=r,o=(0,R6.seededRandom)(i);e=rI[e]||e;let s=t.#e(e,n);if(!(s.dayOfMonth==="*"||s.dayOfWeek==="*"||!n))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");let a=t.#t(Wr.Second,s.second,Jr.CronSecond.constraints,o),c=t.#t(Wr.Minute,s.minute,Jr.CronMinute.constraints,o),u=t.#t(Wr.Hour,s.hour,Jr.CronHour.constraints,o),l=t.#t(Wr.Month,s.month,Jr.CronMonth.constraints,o),A=t.#t(Wr.DayOfMonth,s.dayOfMonth,Jr.CronDayOfMonth.constraints,o),{dayOfWeek:d,nthDayOfWeek:f}=t.#A(s.dayOfWeek),g=t.#t(Wr.DayOfWeek,d,Jr.CronDayOfWeek.constraints,o),I=new D6.CronFieldCollection({second:new Jr.CronSecond(a,{rawValue:s.second}),minute:new Jr.CronMinute(c,{rawValue:s.minute}),hour:new Jr.CronHour(u,{rawValue:s.hour}),dayOfMonth:new Jr.CronDayOfMonth(A,{rawValue:s.dayOfMonth}),month:new Jr.CronMonth(l,{rawValue:s.month}),dayOfWeek:new Jr.CronDayOfWeek(g,{rawValue:s.dayOfWeek,nthDayOfWeek:f})});return new T6.CronExpression(I,{...r,expression:e})}static#e(e,r){if(r&&!e.length)throw new Error("Invalid cron expression");e=e||"0 * * * * *";let n=e.trim().split(/\s+/);if(r&&n.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(n.length>6)throw new Error("Invalid cron expression, too many fields");let i=["*","*","*","*","*","0"];n.length<i.length&&n.unshift(...i.slice(n.length));let[o,s,a,c,u,l]=n;return{second:o,minute:s,hour:a,dayOfMonth:c,month:u,dayOfWeek:l}}static#t(e,r,n,i){if((e===Wr.Month||e===Wr.DayOfWeek)&&(r=r.replace(/[a-z]{3}/gi,o=>{o=o.toLowerCase();let s=nI[o]||iI[o];if(s===void 0)throw new Error(`Validation error, cannot resolve alias "${o}"`);return s.toString()})),!n.validChars.test(r))throw new Error(`Invalid characters, got value: ${r}`);return r=this.#n(r,n),r=this.#i(r,n,i),this.#o(e,r,n)}static#n(e,r){return e.replace(/[*?]/g,r.min+"-"+r.max)}static#i(e,r,n){let i=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(o,s,a,c)=>{if(s&&a&&c){let u=parseInt(s,10),l=parseInt(a,10),A=parseInt(c,10);if(u>l)throw new Error(`Invalid range: ${u}-${l}, min > max`);if(A<=0)throw new Error(`Invalid step: ${A}, must be positive`);let d=Math.max(u,r.min),f=Math.floor(i*A),g=[];for(let I=Math.floor(d/A)*A+f;I<=l;I+=A)I>=d&&g.push(I);return g.join(",")}else if(s&&a){let u=parseInt(s,10),l=parseInt(a,10);if(u>l)throw new Error(`Invalid range: ${u}-${l}, min > max`);return String(Math.floor(i*(l-u+1))+u)}else if(c){let u=parseInt(c,10);if(u<=0)throw new Error(`Invalid step: ${u}, must be positive`);let l=Math.floor(i*u),A=[];for(let d=Math.floor(r.min/u)*u+l;d<=r.max;d+=u)d>=r.min&&A.push(d);return A.join(",")}else return String(Math.floor(i*(r.max-r.min+1)+r.min))})}static#o(e,r,n){let i=[];function o(a,c){if(Array.isArray(a))i.push(...a);else if(t.#l(c,a))i.push(a);else{let u=parseInt(a.toString(),10);if(!(u>=c.min&&u<=c.max))throw new Error(`Constraint error, got value ${a} expected range ${c.min}-${c.max}`);i.push(e===Wr.DayOfWeek?u%7:a)}}return r.split(",").forEach(a=>{if(!(a.length>0))throw new Error("Invalid list value format");o(t.#r(e,a,n),n)}),i}static#r(e,r,n){let i=r.split("/");if(i.length>2)throw new Error(`Invalid repeat: ${r}`);return i.length===2?(isNaN(parseInt(i[0],10))||(i[0]=`${i[0]}-${n.max}`),t.#u(e,i[0],parseInt(i[1],10),n)):t.#u(e,r,1,n)}static#c(e,r,n){if(!(!isNaN(e)&&!isNaN(r)&&e>=n.min&&r<=n.max))throw new Error(`Constraint error, got range ${e}-${r} expected range ${n.min}-${n.max}`);if(e>r)throw new Error(`Invalid range: ${e}-${r}, min(${e}) > max(${r})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw new Error(`Constraint error, cannot repeat at every ${e} time.`)}static#a(e,r,n,i){let o=[];e===Wr.DayOfWeek&&n%7===0&&o.push(0);for(let s=r;s<=n;s+=i)o.indexOf(s)===-1&&o.push(s);return o}static#u(e,r,n,i){let o=r.split("-");if(o.length<=1)return isNaN(+r)?r:+r;let[s,a]=o.map(c=>parseInt(c,10));return this.#c(s,a,i),this.#s(n),this.#a(e,s,a,n)}static#A(e){let r=e.split("#");if(r.length<=1)return{dayOfWeek:r[0]};let n=+r[r.length-1],i=e.match(/([,-/])/);if(i!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${i?.[0]}\` special characters are incompatible`);if(!(r.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:r[0],nthDayOfWeek:n}}static#l(e,r){return e.chars.some(n=>r.toString().includes(n))}};Zr.CronExpressionParser=oI});var oT=h(xn=>{"use strict";var k6=xn&&xn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),N6=xn&&xn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),O6=xn&&xn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},t(e)};return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),i=0;i<n.length;i++)n[i]!=="default"&&k6(r,e,n[i]);return N6(r,e),r}})();Object.defineProperty(xn,"__esModule",{value:!0});xn.CronFileParser=void 0;var U6=_f(),sI=class t{static async parseFile(e){let{readFile:r}=await Promise.resolve().then(()=>O6(require("fs/promises"))),n=await r(e,"utf8");return t.#e(n)}static parseFileSync(e){let{readFileSync:r}=require("fs"),n=r(e,"utf8");return t.#e(n)}static#e(e){let r=e.split(`
|
|
@@ -1714,7 +1714,7 @@ ${o}`;break;case"retry":CH(o)&&(r[i]=o);break;case"id":bH(o)&&(r[i]=o);break;cas
|
|
|
1714
1714
|
`);t.stack=r?`${r}
|
|
1715
1715
|
${o}`:i.stack}V.exports.fetch=function(e,r=void 0){return E_e(e,r).catch(n=>{throw NH?xH(n,NH):n&&typeof n=="object"&&Error.captureStackTrace(n,V.exports.fetch),n})};V.exports.Headers=Ha().Headers;V.exports.Response=cd().Response;V.exports.Request=bu().Request;V.exports.FormData=uh().FormData;var{setGlobalOrigin:I_e,getGlobalOrigin:C_e}=tS();V.exports.setGlobalOrigin=I_e;V.exports.getGlobalOrigin=C_e;var{CacheStorage:b_e}=Eq(),{kConstruct:S_e}=Fe();V.exports.caches=new b_e(S_e);var{deleteCookie:B_e,getCookies:Q_e,getSetCookies:w_e,setCookie:v_e,parseCookie:__e}=Rq();V.exports.deleteCookie=B_e;V.exports.getCookies=Q_e;V.exports.getSetCookies=w_e;V.exports.setCookie=v_e;V.exports.parseCookie=__e;var{parseMIMEType:D_e,serializeAMimeType:T_e}=cn();V.exports.parseMIMEType=D_e;V.exports.serializeAMimeType=T_e;var{CloseEvent:R_e,ErrorEvent:k_e,MessageEvent:N_e}=_m(),{WebSocket:O_e,ping:U_e}=lH();V.exports.WebSocket=O_e;V.exports.CloseEvent=R_e;V.exports.ErrorEvent=k_e;V.exports.MessageEvent=N_e;V.exports.ping=U_e;V.exports.WebSocketStream=yH().WebSocketStream;V.exports.WebSocketError=Rw().WebSocketError;V.exports.request=Id(Nu.request);V.exports.stream=Id(Nu.stream);V.exports.pipeline=Id(Nu.pipeline);V.exports.connect=Id(Nu.connect);V.exports.upgrade=Id(Nu.upgrade);V.exports.MockClient=a_e;V.exports.MockCallHistory=c_e;V.exports.MockCallHistoryLog=u_e;V.exports.MockPool=A_e;V.exports.MockAgent=l_e;V.exports.SnapshotAgent=d_e;V.exports.mockErrors=f_e;var{EventSource:M_e}=kH();V.exports.EventSource=M_e;function x_e(){globalThis.fetch=V.exports.fetch,globalThis.Headers=V.exports.Headers,globalThis.Response=V.exports.Response,globalThis.Request=V.exports.Request,globalThis.FormData=V.exports.FormData,globalThis.WebSocket=V.exports.WebSocket,globalThis.CloseEvent=V.exports.CloseEvent,globalThis.ErrorEvent=V.exports.ErrorEvent,globalThis.MessageEvent=V.exports.MessageEvent,globalThis.EventSource=V.exports.EventSource}V.exports.install=x_e});var FH=h(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});Uu.SuperglueClient=Uu.SuperglueHttpError=void 0;var Ou=qr(),Fo=SC(),L_e=ZC(),P_e=ZM(),F_e=jn(),$o=Sc(),$_e=jf(),bd=14400*1e3,Cd;if(typeof globalThis.process<"u"&&globalThis.process.versions?.node)try{let{Agent:t}=LH();Cd=new t({headersTimeout:bd,bodyTimeout:bd})}catch{}function PH(t){if(t?.aborted)throw t.reason??new DOMException("Aborted","AbortError")}var jm=class extends Error{constructor(e,r,n,i){super(e),this.status=r,this.code=n,this.details=i,this.name="SuperglueHttpError"}};Uu.SuperglueHttpError=jm;var xw=class{constructor({apiKey:e,apiEndpoint:r,onInfrastructureError:n,refreshToken:i,sseTokenProvider:o,tokenProvider:s}){if(!e&&!s)throw new Error("SuperglueClient requires either apiKey or tokenProvider");this.tokenProvider=s??(async()=>e),this.apiEndpoint=r??"https://api.superglue.cloud",this.sseManager=new L_e.SSELogSubscriptionManager(this.apiEndpoint,o??this.tokenProvider,i),this.onInfrastructureError=n,this.refreshToken=i}async getApiKey(){return this.tokenProvider()}async fetchWithAuthRetry(e,r){let n=await this.getApiKey(),i=await e(n);if(i.status!==401||!this.refreshToken)return i;PH(r);let o=await this.refreshToken();return PH(r),!o||o===n?i:(i.body?.cancel(),e(o))}isInfrastructureError(e){return(0,F_e.isAbortError)(e)?!1:!!(e instanceof TypeError&&e.message.toLowerCase().includes("fetch")||e instanceof Error&&e.name==="TimeoutError")}async restRequest(e,r,n,i,o){let a=await(await this.restResponse({method:e,path:r,body:n,extraHeaders:i,requestInit:o})).text();if(a)return JSON.parse(a)}async restResponse({method:e,path:r,body:n,extraHeaders:i,requestInit:o}){let s=`${this.apiEndpoint.replace(/\/$/,"")}${r}`,a=n!=null,c=typeof FormData<"u"&&n instanceof FormData,u=A=>{let d={Authorization:`Bearer ${A}`,...i};return a&&!c&&e!=="GET"&&(d["Content-Type"]="application/json"),fetch(s,{...o,method:e,headers:d,body:a?c?n:JSON.stringify(n):void 0,signal:o?.signal??AbortSignal.timeout(bd),...Cd?{dispatcher:Cd}:{}})},l;try{l=await this.fetchWithAuthRetry(u,o?.signal)}catch(A){throw this.isInfrastructureError(A)&&this.onInfrastructureError?.(),A}if(!l.ok)throw await this.buildHttpError(l);return l}async uploadFiles(e,r){if(typeof r?.process!="boolean")throw new Error("process must be a boolean");if(e.length===0)return[];let n=e.map(l=>({...l,contentLength:l.contentLength??this.getUploadContentLength(l.content)})),o=(await this.restRequest("POST","/v1/files/uploads",{process:r.process,files:n.map(({fileName:l,contentType:A,contentLength:d})=>({fileName:l,contentLength:d,...A?{contentType:A}:{}}))})).data.files;if(o.length!==n.length)throw await Promise.all(o.map(l=>this.deleteFileUpload(l.id).catch(()=>{}))),new Error("Upload response did not match the selected files");let s=await Promise.allSettled(o.map(async(l,A)=>{let d=n[A],f=await fetch(l.uploadUrl,{method:"PUT",body:d.content,headers:d.contentType?{"Content-Type":d.contentType}:void 0,signal:AbortSignal.timeout(Math.min(bd,l.expiresIn*1e3))});if(!f.ok)throw new Error(`Upload failed for ${d.fileName}: ${f.status} ${f.statusText}`);return l.id})),a=s.flatMap(l=>l.status==="fulfilled"?[l.value]:[]),c=new Map;if(a.length>0)try{let l=await this.restRequest("POST","/v1/files/uploads/complete",{fileIds:a});c=new Map(l.data.files.map(A=>[A.id,A]))}catch(l){c=new Map(a.map(A=>[A,{id:A,fileName:n[o.findIndex(d=>d.id===A)]?.fileName||A,contentLength:n[o.findIndex(d=>d.id===A)]?.contentLength||0,status:"failed",error:l instanceof Error?l.message:String(l)}]))}let u=o.map((l,A)=>{let d=s[A],f=n[A];return d.status==="rejected"?{id:l.id,fileName:f.fileName,contentLength:f.contentLength,status:"failed",error:d.reason instanceof Error?d.reason.message:String(d.reason)}:c.get(l.id)||{id:l.id,fileName:f.fileName,contentLength:f.contentLength,status:"failed",error:"Upload completion returned no result"}});return await Promise.all(u.filter(l=>l.status==="failed").map(l=>this.deleteFileUpload(l.id).catch(()=>{}))),u}async deleteFileUpload(e){await this.restRequest("DELETE",`/v1/files/uploads/${encodeURIComponent(e)}`)}getUploadContentLength(e){return typeof e=="string"?new TextEncoder().encode(e).byteLength:e instanceof Uint8Array?e.byteLength:e.size}async buildHttpError(e){e.status>=500&&this.onInfrastructureError?.();let r=await e.text(),n=`HTTP ${e.status}: ${r}`,i,o;try{let s=JSON.parse(r);s&&typeof s=="object"&&!Array.isArray(s)&&(o=s),typeof s?.code=="string"&&(i=s.code);let a=s.error;typeof a=="string"?n=a:a&&typeof a=="object"&&(n=a.message||JSON.stringify(a))}catch{}return new jm(n,e.status,i,o)}async streamRequest(e,r,n){let i=e.includes("?")?"&":"?",o=`${this.apiEndpoint.replace(/\/$/,"")}${e}${i}stream=true`,s=u=>fetch(o,{method:"POST",headers:{Authorization:`Bearer ${u}`,Accept:"text/event-stream","Content-Type":"application/json"},body:JSON.stringify(r),signal:n??AbortSignal.timeout(bd),...Cd?{dispatcher:Cd}:{}}),a;try{a=await this.fetchWithAuthRetry(s,n)}catch(u){throw this.isInfrastructureError(u)&&this.onInfrastructureError?.(),u}if(!a.ok)throw await this.buildHttpError(a);if(!(a.headers.get("content-type")||"").includes("text/event-stream")){let u=await a.text();return u?JSON.parse(u):void 0}try{return await(0,P_e.consumeEventStreamResult)(a)}catch(u){throw this.isInfrastructureError(u)&&this.onInfrastructureError?.(),u}}async subscribeToLogsSSE(e={}){return this.sseManager.subscribeToLogs(e)}async disconnect(){await this.sseManager.disconnect()}async getMe(){return this.restRequest("GET","/v1/me")}async completeOnboarding(){return this.restRequest("POST","/v1/me/onboarding/complete")}async runTool(e){let r=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e.toolId)}/run`,{inputs:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture},void 0,e.signal?{signal:e.signal}:void 0);return{success:r.status==="success",data:r.data,error:r.error,tool:r.tool,stepResults:r.stepResults?.map(n=>({...n}))||[],...r.fileArtifacts&&r.fileArtifacts.length>0?{fileArtifacts:r.fileArtifacts}:{},...r.metadata?.warnings?.length?{warnings:r.metadata.warnings}:{}}}async runToolConfig(e){let r=e.createRun?"/v1/tools/run?createRun=true":"/v1/tools/run",n=await this.restRequest("POST",r,{tool:e.tool,payload:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture,executionKind:e.executionKind,parentToolId:e.parentToolId,draftId:e.draftId},e.traceId?{"X-Trace-Id":e.traceId}:void 0,e.signal?{signal:e.signal}:void 0);return{success:n.status?n.status==="success":n.success??!1,data:n.data,error:n.error,tool:n.tool||e.tool,stepResults:n.stepResults?.map(o=>({...o}))||[],...n.fileArtifacts&&n.fileArtifacts.length>0?{fileArtifacts:n.fileArtifacts}:{},...n.metadata?.warnings?.length?{warnings:n.metadata.warnings}:{}}}async abortToolExecution(e){return{success:!0,runId:(await this.restRequest("POST",`/v1/runs/${encodeURIComponent(e)}/cancel`)).runId}}async executeStep({step:e,payload:r,files:n,previousResults:i,credentials:o,options:s,runId:a,systemIds:c,createRun:u,parentToolId:l,stepIndex:A,stepId:d,signal:f,stream:g}){let I={step:e,payload:r,files:n,previousResults:i,credentials:o,options:s,runId:a,systemIds:c,createRun:u,parentToolId:l,stepIndex:A,stepId:d};return g?this.streamRequest("/v1/tools/step/run",I,f):this.restRequest("POST","/v1/tools/step/run",I,void 0,f?{signal:f}:void 0)}async abortStep(e){return this.restRequest("POST","/v1/tools/step/abort",{runId:e})}async executeTransformOnly({outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:u,parentToolId:l,stepId:A,signal:d,stream:f}){let g={outputTransform:e,outputSchema:r,inputSchema:n,payload:i,files:o,stepResults:s,options:a,runId:c,createRun:u,parentToolId:l,stepId:A};return f?this.streamRequest("/v1/tools/transform/run",g,d):this.restRequest("POST","/v1/tools/transform/run",g,void 0,d?{signal:d}:void 0)}async createRun({toolId:e,toolConfig:r,toolResult:n,stepResults:i,toolPayload:o,status:s,error:a,startedAt:c,completedAt:u,executionKind:l,parentToolId:A,draftId:d}){return this.restRequest("POST","/v1/runs",{toolId:e,toolConfig:r,toolResult:n,stepResults:i,toolPayload:o,status:s,error:a,startedAt:(0,$o.toUTCISOString)(c,"run.startedAt"),completedAt:(0,$o.toUTCISOString)(u,"run.completedAt"),executionKind:l,parentToolId:A,draftId:d})}async checkRunLimit(){return(await this.restRequest("POST","/v1/runs/check-limit")).data}async extract({file:e,envelope:r}){if(!e)throw new Error("File must be provided for extract.");let n=new FormData;n.append("file",e);let i=r?"/v1/extract?envelope=true":"/v1/extract";return this.restRequest("POST",i,n)}mapOpenAPIRunToRun(e){let r={running:Ou.RunStatus.RUNNING,success:Ou.RunStatus.SUCCESS,failed:Ou.RunStatus.FAILED,aborted:Ou.RunStatus.ABORTED};return{runId:e.runId??e.id,toolId:e.toolId,tool:e.tool,systemIds:e.systemIds,status:r[e.status]??Ou.RunStatus.FAILED,toolPayload:e.toolPayload,data:e.data,toolResult:e.data,error:e.error,stepResults:e.stepResults,options:e.options,requestSource:e.requestSource,traceId:e.traceId,resultStorageUri:e.resultStorageUri,userId:e.userId,userEmail:e.userEmail,userName:e.userName,metadata:{...e.metadata,executionKind:e.metadata?.executionKind??Ou.RunExecutionKind.FULL},fileArtifacts:e.fileArtifacts}}mapOpenAPIScheduleToToolSchedule(e){return{...e,lastRunAt:e.lastRunAt?(0,$o.requireUTCDate)(e.lastRunAt,"schedule.lastRunAt"):void 0,nextRunAt:(0,$o.requireUTCDate)(e.nextRunAt,"schedule.nextRunAt"),createdAt:(0,$o.requireUTCDate)(e.createdAt,"schedule.createdAt"),updatedAt:(0,$o.requireUTCDate)(e.updatedAt,"schedule.updatedAt")}}async listRuns(e={}){let r=(0,Fo.createSearchListQueryParams)(e);e.toolId!==void 0&&r.set("toolId",e.toolId),e.searchUserIds?.length&&r.set("searchUserIds",e.searchUserIds.join(",")),e.includeTotal!==void 0&&r.set("includeTotal",String(e.includeTotal)),e.startedAfter!==void 0&&r.set("startedAfter",e.startedAfter instanceof Date?(0,$o.toUTCISOString)(e.startedAfter,"run.startedAfter"):e.startedAfter),e.statuses!==void 0?r.set("status",e.statuses.join(",")):e.status!==void 0&&r.set("status",e.status),e.requestSources!==void 0&&r.set("requestSources",e.requestSources.join(",")),e.executionKinds!==void 0&&r.set("executionKinds",e.executionKinds.join(",")),e.userId!==void 0&&r.set("userId",e.userId),e.systemId!==void 0&&r.set("systemId",e.systemId),e.systemIds!==void 0&&r.set("systemIds",e.systemIds.join(","));let n=r.size>0?`?${r.toString()}`:"",i=await this.restRequest("GET",`/v1/runs${n}`,void 0,void 0,{signal:e.signal});return{data:i.data.map(o=>this.mapOpenAPIRunToRun(o)),total:i.total,page:i.page,limit:i.limit,hasMore:i.hasMore}}async getActivityCounts(e){let r=new URLSearchParams;e?.from&&r.set("from",e.from instanceof Date?(0,$o.toUTCISOString)(e.from,"activity.from"):e.from),e?.to&&r.set("to",e.to instanceof Date?(0,$o.toUTCISOString)(e.to,"activity.to"):e.to);let n=r.toString();return(await this.restRequest("GET",`/v1/activity/counts${n?`?${n}`:""}`,void 0,void 0,{signal:e?.signal})).counts}async getRun(e){try{let r=await this.restRequest("GET",`/v1/runs/${encodeURIComponent(e)}`);return this.mapOpenAPIRunToRun(r)}catch(r){if(r.message?.includes("404")||r.message?.includes("not found"))return null;throw r}}async getTool(e){try{return await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}`)}catch(r){if(r.message?.includes("404")||r.message?.includes("not found")||r.message?.includes("403")||r.message?.includes("not allowed"))return null;throw r}}async getToolState(e){return(await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/state`)).state}async setToolState(e,r){await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/state`,{state:r})}async deleteToolState(e){return(await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/state`)).deletedKeys}async archiveTool(e,r=!0){return this.updateTool(e,{archived:r})}async bulkArchiveTools(e,r=!0){return this.restRequest("POST","/v1/tools/bulk/archive",{ids:e,archived:r})}async bulkDeleteTools(e){return this.restRequest("POST","/v1/tools/bulk/delete",{ids:e})}async listTools(e={}){let r=(0,Fo.createListQueryParams)(e);e.includeArchived!==void 0&&r.set("includeArchived",String(e.includeArchived));let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/tools${n}`)}async listAllTools(e={}){return(0,Fo.listAllPages)((r,n)=>this.listTools({...e,page:r,limit:n}))}async createTool(e,r){return this.restRequest("POST","/v1/tools",{...r,id:e})}async updateTool(e,r){return this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}`,r)}async deleteTool(e){try{return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}`),!0}catch(r){if(r.message?.includes("404"))return!1;throw r}}async renameTool(e,r){return this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/rename`,{newId:r})}async getWorkflow(e){return this.getTool(e)}async archiveWorkflow(e,r=!0){return this.upsertWorkflow(e,{archived:r})}async createWorkflow(e,r){return this.createTool(e,r)}async updateWorkflow(e,r){return this.updateTool(e,r)}async upsertWorkflow(e,r){return await this.getTool(e)?this.updateTool(e,r):this.createTool(e,r)}async deleteWorkflow(e){return this.deleteTool(e)}async renameWorkflow(e,r){return this.renameTool(e,r)}async listSchedules(e={}){let r=(0,Fo.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"",i=e.toolId?`/v1/tools/${encodeURIComponent(e.toolId)}/schedules${n}`:`/v1/schedules${n}`,o=await this.restRequest("GET",i);return{...o,data:o.data.map(s=>this.mapOpenAPIScheduleToToolSchedule(s))}}async listAllSchedules(e={}){return(0,Fo.listAllPages)((r,n)=>this.listSchedules({...e,page:r,limit:n}))}async getToolSchedule(e,r){try{let n=await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`);return this.mapOpenAPIScheduleToToolSchedule(n)}catch(n){if(n.message?.includes("404")||n.message?.includes("not found"))return null;throw n}}async createToolSchedule(e,r){let n=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/schedules`,{...r,timezone:r.timezone||(0,$_e.getRuntimeTimezone)()});return this.mapOpenAPIScheduleToToolSchedule(n)}async updateToolSchedule(e,r,n){let i=await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`,n);return this.mapOpenAPIScheduleToToolSchedule(i)}async deleteToolSchedule(e,r){return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(r)}`),!0}async bulkSetSchedulesEnabled(e,r){return this.restRequest("POST","/v1/schedules/bulk/enable",{ids:e,enabled:r})}async bulkDeleteSchedules(e){return this.restRequest("POST","/v1/schedules/bulk/delete",{ids:e})}async listCredentials(e={}){let r=(0,Fo.createListQueryParams)(e);e.systemId!==void 0&&r.set("systemId",e.systemId);let n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/credentials${n}`)}async listAllCredentials(e={}){return(0,Fo.listAllPages)((r,n)=>this.listCredentials({...e,page:r,limit:n}))}async createCredentials(e){return(await this.restRequest("POST","/v1/credentials",e)).data}async replaceCredentials(e,r){return(await this.restRequest("PUT",`/v1/credentials/${encodeURIComponent(e)}`,{credentials:r})).data}async updateCredentials(e,r){return(await this.restRequest("PATCH",`/v1/credentials/${encodeURIComponent(e)}`,r)).data}async deleteCredentials(e){await this.restRequest("DELETE",`/v1/credentials/${encodeURIComponent(e)}`)}async setDefaultCredentials(e){await this.restRequest("POST",`/v1/credentials/${encodeURIComponent(e)}/default`)}async listSystems(e={}){let r=(0,Fo.createListQueryParams)(e),n=r.size>0?`?${r.toString()}`:"";return this.restRequest("GET",`/v1/systems${n}`)}async listAllSystems(e={}){return(0,Fo.listAllPages)((r,n)=>this.listSystems({...e,page:r,limit:n}))}async getSystem(e){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}`)).data}async createSystem(e){return(await this.restRequest("POST","/v1/systems",e)).data}async updateSystem(e,r){return(await this.restRequest("PATCH",`/v1/systems/${encodeURIComponent(e)}`,r)).data}async deleteSystem(e){return await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}`),!0}async bulkDeleteSystems(e){return this.restRequest("POST","/v1/systems/bulk/delete",{ids:e})}async createOAuthExchange(e){return(await this.restRequest("POST","/v1/oauth/exchanges",e)).data}async completeOAuthExchange(e,r){return(await this.restRequest("POST",`/v1/oauth/exchanges/${encodeURIComponent(e)}/complete`,r)).data}async searchSystemDocumentation(e,r){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/search`,{keywords:r})).data}async triggerSystemDocumentationScrapeJob(e,r){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/scrape`,r)).data}async fetchOpenApiSpec(e,r,n){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/openapi`,{url:r,link:n?.link})).data}async uploadSystemDocumentationFiles(e,r,n){let i=await this.uploadFiles(r,{process:!0}),o=i.flatMap(s=>s.status==="uploaded"?[s.id]:[]);if(o.length>0)try{await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/files`,{fileIds:o,link:n?.link!==!1})}catch(s){throw await Promise.all(o.map(a=>this.deleteFileUpload(a).catch(()=>{}))),s}if(!n?.settle){let s=i.filter(a=>a.status==="failed");if(s.length>0)throw new Error(s.map(a=>a.error).join("; "))}return i}async listSystemDocumentationFiles(e,r){let n=new URLSearchParams;r?.length&&n.set("fileIds",r.join(","));let i=n.size>0?`?${n.toString()}`:"";return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files${i}`)).data}async getSystemDocumentationFileContent(e,r,n){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(r)}/content?processed=${n.processed}`)).data}async deleteSystemDocumentationFile(e,r){await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(r)}`)}async generateCredentialsLink(e){try{return{success:!0,credentialsUrl:(await this.restRequest("POST","/v1/authenticate",e||{})).data.credentialsUrl}}catch(r){return{success:!1,error:r.message}}}};Uu.SuperglueClient=xw});var jH=h(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.UnquotedKeyStrategy=nt.TripleQuoteStrategy=nt.TrailingCommaStrategy=nt.SingleQuoteStrategy=nt.PythonLiteralStrategy=nt.CommentStrategy=nt.ResilientJsonParser=nt.RepairStrategy=void 0;nt.parseJsonResilient=j_e;nt.parseJSON=q_e;nt.isValidJson=H_e;nt.prettyPrintJson=G_e;nt.minifyJson=V_e;var Un=class{validate(e){try{return JSON.parse(e),!0}catch{return!1}}};nt.RepairStrategy=Un;var qm=class extends Un{constructor(){super(...arguments),this.name="TripleQuoteRepair",this.description="Converts triple-quoted strings to proper JSON, parsing nested JSON content"}canApply(e){return/"""/.test(e)}apply(e){return e.replace(/"""([\s\S]*?)"""/g,(r,n)=>{let i=n.trim();if(i.startsWith("{")&&i.endsWith("}")||i.startsWith("[")&&i.endsWith("]"))try{let s=JSON.parse(i);return JSON.stringify(s)}catch{return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`}return`"${n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`})}};nt.TripleQuoteStrategy=qm;var Hm=class extends Un{constructor(){super(...arguments),this.name="PythonLiteralRepair",this.description="Converts Python literals to JavaScript equivalents"}canApply(e){return/\b(None|True|False)\b/.test(e)}apply(e){return e.replace(/\bNone\b/g,"null").replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false")}};nt.PythonLiteralStrategy=Hm;var Gm=class extends Un{constructor(){super(...arguments),this.name="TrailingCommaRepair",this.description="Removes trailing commas from objects and arrays"}canApply(e){return/,\s*[}\]]/.test(e)}apply(e){return e.replace(/,(\s*[}\]])/g,"$1")}};nt.TrailingCommaStrategy=Gm;var Vm=class extends Un{constructor(){super(...arguments),this.name="SingleQuoteRepair",this.description="Converts single quotes to double quotes"}canApply(e){return/[{,]\s*'[^']*'\s*:/.test(e)||/:\s*'[^']*'/.test(e)}apply(e){let r=e.replace(/([{,]\s*)'([^']+)'(\s*:)/g,'$1"$2"$3');return r=r.replace(/(:\s*)'([^']+)'(\s*[,}])/g,'$1"$2"$3'),r}};nt.SingleQuoteStrategy=Vm;var zm=class extends Un{constructor(){super(...arguments),this.name="UnquotedKeyRepair",this.description="Adds quotes to unquoted object keys"}canApply(e){return/[{,]\s*[a-zA-Z_$][a-zA-Z0-9_$]*\s*:/.test(e)}apply(e){return e.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)(\s*:)/g,'$1"$2"$3')}};nt.UnquotedKeyStrategy=zm;var Ym=class extends Un{constructor(){super(...arguments),this.name="CommentRemoval",this.description="Removes JavaScript-style comments"}canApply(e){return/\/\/.*$|\/\*[\s\S]*?\*\//m.test(e)}apply(e){let r=e.replace(/\/\/.*$/gm,"");return r=r.replace(/\/\*[\s\S]*?\*\//g,""),r}};nt.CommentStrategy=Ym;var Lw=class extends Un{constructor(){super(...arguments),this.name="UnescapedControlCharactersRepair",this.description="Escapes unescaped control characters (newlines, tabs, etc.) in JSON strings"}canApply(e){try{return JSON.parse(e),!1}catch(r){let n=r.message||"";return n.includes("control character")||n.includes("Bad control")||n.includes("Unexpected token")&&/[\n\r\t]/.test(e)}}apply(e){let r="",n=!1,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=o>0?e[o-1]:"";if(i){r+=s,i=!1;continue}if(s==="\\"&&n){r+=s,i=!0;continue}if(s==='"'&&a!=="\\"){n=!n,r+=s;continue}if(n)switch(s){case`
|
|
1716
1716
|
`:r+="\\n";break;case"\r":r+="\\r";break;case" ":r+="\\t";break;case"\b":r+="\\b";break;case"\f":r+="\\f";break;default:let c=s.charCodeAt(0);c<32?r+="\\u"+("0000"+c.toString(16)).slice(-4):r+=s}else r+=s}return r}},Pw=class extends Un{constructor(){super(...arguments),this.name="TrailingCharactersRepair",this.description="Removes trailing characters after valid JSON structure"}canApply(e){let r=e.trim();if(!r.startsWith("{")&&!r.startsWith("["))return!1;let n=0,i=0,o=!1,s=!1;for(let a=0;a<r.length;a++){let c=r[a];if(o)s?s=!1:c==="\\"?s=!0:c==='"'&&(o=!1);else if(c==='"')o=!0;else if(c==="{")n++;else if(c==="}"){if(n--,n===0&&i===0&&a>0&&a<r.length-1)return!0}else if(c==="[")i++;else if(c==="]"&&(i--,i===0&&n===0&&a>0&&a<r.length-1))return!0}return!1}apply(e){let r=e.trim(),n=0,i=0,o=!1,s=!1,a=-1;for(let c=0;c<r.length;c++){let u=r[c];if(o)s?s=!1:u==="\\"?s=!0:u==='"'&&(o=!1);else if(u==='"')o=!0;else if(u==="{")n++;else if(u==="}"){if(n--,n===0&&i===0&&c>0){a=c;break}}else if(u==="[")i++;else if(u==="]"&&(i--,i===0&&n===0&&c>0)){a=c;break}}return a>0&&a<r.length-1?r.substring(0,a+1):e}},Mu=class{constructor(e={}){this.strategies=[],this.repairLog=[],this.options={attemptRepair:!0,maxDepth:10,preserveStringsOnFailure:!1,logRepairs:!1,...e},this.initializeDefaultStrategies(),e.customStrategies&&this.strategies.push(...e.customStrategies)}initializeDefaultStrategies(){this.strategies=[new qm,new Vm,new Lw,new Pw,new Hm,new Gm,new zm,new Ym]}parse(e){let r=Date.now();this.repairLog=[];let n=e instanceof Buffer?e.toString("utf8"):String(e);try{return{success:!0,data:JSON.parse(n),metadata:{parseTime:Date.now()-r,strategiesApplied:[]}}}catch(s){if(!this.options.attemptRepair)return{success:!1,error:`JSON parse error: ${s}`,metadata:{parseTime:Date.now()-r}}}let i=n,o=[];for(let s of this.strategies)if(s.canApply(i)){let a=i;if(i=s.apply(i),a!==i){o.push(s.name),this.repairLog.push(s.description),this.options.logRepairs&&console.log(`Applied ${s.name}: ${s.description}`);try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}catch{}}}try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}catch(s){let a=this.aggressiveFallback(i);return a.success?{...a,repairs:[...this.repairLog,"Applied aggressive fallback"],metadata:{parseTime:Date.now()-r,strategiesApplied:[...o,"AggressiveFallback"]}}:{success:!1,error:`Failed to parse JSON after applying ${o.length} strategies: ${s}`,repairs:this.repairLog,metadata:{parseTime:Date.now()-r,strategiesApplied:o}}}}aggressiveFallback(e){try{let r=e.indexOf("{"),n=e.indexOf("[");if(r===-1&&n===-1)return{success:!1,error:"No JSON-like structure found"};let i=r===-1?n:n===-1?r:Math.min(r,n),o=e.substring(i);for(let a of this.strategies)a.canApply(o)&&(o=a.apply(o));return{success:!0,data:JSON.parse(o)}}catch(r){return{success:!1,error:`Aggressive fallback failed: ${r}`}}}addStrategy(e){this.strategies.push(e)}removeStrategy(e){this.strategies=this.strategies.filter(r=>r.name!==e)}getStrategies(){return this.strategies.map(e=>e.name)}};nt.ResilientJsonParser=Mu;var $H=new Mu;function j_e(t,e){return(e?new Mu(e):$H).parse(t)}function q_e(t){let e=$H.parse(t);if(e.success)return e.repairs&&e.repairs.length>0&&console.log("JSON parsed with repairs:",e.repairs),e.data;throw new Error(`Failed to parse JSON: ${e.error}`)}function H_e(t){try{return JSON.parse(t),!0}catch{return!1}}function G_e(t,e=2){return JSON.stringify(t,null,e)}function V_e(t){let r=new Mu().parse(t);if(r.success)return JSON.stringify(r.data);throw new Error("Cannot minify invalid JSON")}});var Fr=h(te=>{"use strict";var z_e=te&&te.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ge=te&&te.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&z_e(e,t,r)};Object.defineProperty(te,"__esModule",{value:!0});te.SSELogSubscriptionManager=te.SuperglueHttpError=te.SuperglueClient=void 0;ge(NR(),te);ge(qR(),te);ge(aU(),te);ge(dU(),te);ge(fU(),te);ge(iA(),te);ge(NU(),te);ge(OU(),te);ge(UU(),te);ge(MU(),te);ge(SC(),te);ge(LU(),te);ge(PU(),te);ge(FU(),te);ge(wC(),te);ge(jU(),te);ge(HU(),te);ge(GU(),te);ge(zU(),te);ge(Fd(),te);ge(JU(),te);ge(WU(),te);ge(KU(),te);ge(tM(),te);ge(rM(),te);ge(cM(),te);ge(lM(),te);ge(dM(),te);ge(fM(),te);ge(BM(),te);ge(wM(),te);ge($C(),te);ge(LM(),te);ge(YC(),te);ge(jM(),te);ge(VM(),te);ge(YM(),te);ge(qr(),te);ge(jn(),te);ge(JM(),te);ge(WM(),te);ge(Dg(),te);ge(Sc(),te);ge(jf(),te);var qH=FH();Object.defineProperty(te,"SuperglueClient",{enumerable:!0,get:function(){return qH.SuperglueClient}});Object.defineProperty(te,"SuperglueHttpError",{enumerable:!0,get:function(){return qH.SuperglueHttpError}});var Y_e=ZC();Object.defineProperty(te,"SSELogSubscriptionManager",{enumerable:!0,get:function(){return Y_e.SSELogSubscriptionManager}});ge(jH(),te)});var Dy=require("commander");var mr=pe(require("fs")),VH=pe(require("os")),jo=pe(require("path")),Sd=pe(Fr()),HH=new Set(["runner","builder","admin"]),GH={output:{mode:"stdout",directory:".superglue/output"},preset:"admin"};function qo(t){let e=jo.join(process.cwd(),".superglue"),r=VH.homedir();if(!r)return e;let n=jo.join(r,".superglue");return t===!0?e:t===!1?n:mr.existsSync(jo.join(e,"config.json"))?e:n}function Fw(t){return jo.join(qo(t),"config.json")}function Jm(t){let e=Fw(t);if(!mr.existsSync(e))return{};try{return JSON.parse(mr.readFileSync(e,"utf-8"))}catch{return{}}}function xu(t){let e=Jm(),r=t.apiKey||(0,Sd.readProcessEnvironmentValue)("SUPERGLUE_API_KEY")||e.apiKey||"",n=t.endpoint||(0,Sd.readProcessEnvironmentValue)("SUPERGLUE_API_ENDPOINT")||e.endpoint||"https://api.superglue.cloud",i=(0,Sd.readProcessEnvironmentValue)("SUPERGLUE_WEB_ENDPOINT")||e.webEndpoint||n.replace(/:3002\b/,":3001").replace(/api\.superglue/,"app.superglue"),o=(0,Sd.readProcessEnvironmentValue)("SUPERGLUE_CLI_PRESET"),s=o&&HH.has(o)?o:e.preset&&HH.has(e.preset)?e.preset:"admin";return{...GH,...e,apiKey:r,endpoint:n,webEndpoint:i,preset:s,output:{...GH.output,...e.output}}}function Wm(t,e){let r=qo(e);mr.existsSync(r)||mr.mkdirSync(r,{recursive:!0}),mr.writeFileSync(jo.join(r,"config.json"),JSON.stringify(t,null,2)+`
|
|
1717
|
-
`,{mode:384})}function Zm(t,e){let r=jo.join(qo(e),"drafts");if(mr.existsSync(r)||mr.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=jo.resolve(t.output.directory);mr.existsSync(n)||mr.mkdirSync(n,{recursive:!0})}}var zw=pe(Fr());var $w=pe(require("readline"));var JH=require("child_process"),WH=require("util");var zH={name:"@superglue/cli",version:"1.1.
|
|
1717
|
+
`,{mode:384})}function Zm(t,e){let r=jo.join(qo(e),"drafts");if(mr.existsSync(r)||mr.mkdirSync(r,{recursive:!0}),t.output.mode==="stdout+file"){let n=jo.resolve(t.output.directory);mr.existsSync(n)||mr.mkdirSync(n,{recursive:!0})}}var zw=pe(Fr());var $w=pe(require("readline"));var JH=require("child_process"),WH=require("util");var zH={name:"@superglue/cli",version:"1.1.127",bin:{sg:"./dist/cli.js"},files:[".claude-plugin/","dist/","skills/","LICENSE"],dependencies:{commander:"15.0.0-0","fast-json-patch":"3.1.1"},devDependencies:{"@superglue/shared":"file:../shared","@types/node":"25.5.0",tsup:"8.5.1",typescript:"5.8.3"},scripts:{build:"tsup && (cp -r skills dist/ 2>/dev/null || true)",dev:"tsup --watch","type-check":"tsc --noEmit",prepublishOnly:"npm run build"},publishConfig:{access:"public"}};var W_e=(0,WH.promisify)(JH.exec),nr=zH.version;function YH(t){let e=t.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:t}}function Xm(t,e){let r=t.split("."),n=e.split("."),i=Math.max(r.length,n.length);for(let o=0;o<i;o++){let s=YH(r[o]||"0"),a=YH(n[o]||"0");if(s.numeric<a.numeric)return-1;if(s.numeric>a.numeric||s.prerelease===null&&a.prerelease!==null)return 1;if(s.prerelease!==null&&a.prerelease===null)return-1;if(s.prerelease!==null&&a.prerelease!==null){if(s.prerelease<a.prerelease)return-1;if(s.prerelease>a.prerelease)return 1}}return 0}async function ey(){try{let t=await fetch("https://registry.npmjs.org/@superglue/cli/latest",{signal:AbortSignal.timeout(5e3)});return t.ok&&(await t.json()).version||null}catch{return null}}var Km=null;function ZH(){ue()&&(Km=ey())}async function KH(){if(!(!ue()||!Km)){try{let t=new Promise(r=>{setTimeout(()=>r(null),2e3).unref()}),e=await Promise.race([Km,t]);e&&Xm(nr,e)<0&&(console.error(""),console.error(`${m.cyan}${m.bold} Update available: ${nr} \u2192 ${e}${m.reset}`),console.error(`${m.cyan} Run ${m.bold}sg update${m.reset}${m.cyan} to upgrade${m.reset}`),console.error(""))}catch{}Km=null}}async function XH(){let t=await ey();if(!t)return{success:!1,message:"Could not fetch latest version from npm"};if(Xm(nr,t)>=0)return{success:!0,message:`Already on latest version (${nr})`};try{return await W_e("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${nr} to ${t}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var ue=()=>process.argv.includes("--table")&&process.stdout.isTTY,mn=()=>process.argv.includes("--full"),m={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m"};function eG(t,e){let r=e||t;return`\x1B]8;;${t}\x07${m.underline}${m.cyan}${r}${m.reset}\x1B]8;;\x07`}function tG(){if(!ue())return;let t=m.reset,e=m.dim,r="\x1B[47;30m",n=[" #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- "," =@@@- @@@@ "," @@@ @@% "," -@@ @@@@= @@@ @@@ @@@@@#@ @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@* %@@ "," @@ @@@ *@ @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @% @@@ @@@ @@@ @@* @@# "," #@@ @@@# @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @@@ @@@ @@@ @@* @@ "," @@- @@@@= @@@ @@@ @@@@@@@ @@@@@@ @@@@@@@ @@@ @@% @@@ @@@ @@@ @@@@@. @@."," #@% .@@@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* @@ "," @@ @ @@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* *@@ "," -@@ @@@@= @@@@@@ @@@ @@@@@@@ @@@ -@@ @@@@@@ @@@@@@% @@@@@@. @@@@@@* #@@ "," :@@* @@@ "," %@@@ =@@@. "," :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% "];console.log(""),n.forEach(i=>{let o=i.search(/\S/),s=i.length-[...i].reverse().join("").search(/\S/)-1;if(o===-1)return console.log(" "+i);let a=i.slice(0,o),c=i.slice(o,s+1).split("").map(l=>l===" "?" ":"\u2588").join(""),u=i.slice(s+1);console.log(` ${a}${r}${c}${t}${u}`)}),console.log(` ${e} CLI v${nr}${t}`),console.log("")}function et(t){if(!ue())return{stop:()=>{},update:()=>{},log:()=>{}};let e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r=0,n=t,i=()=>process.stdout.write("\r\x1B[2K"),o=()=>{process.stdout.write(`\r ${m.cyan}${e[r++%e.length]}${m.reset} ${n}`)},s=setInterval(o,80);return{update:a=>{n=a},log:a=>{i(),console.log(` ${m.dim}\u2502${m.reset} ${a}`),o()},stop:a=>{clearInterval(s),i(),a&&console.log(` ${a}`)}}}function re(t){ue()?ty(t):console.log(JSON.stringify(t,null,2))}function Qe(t,e){ue()?(console.log(` ${m.green}\u2713${m.reset} ${t}`),e&&ty(e,4)):console.log(JSON.stringify({success:!0,message:t,...e&&typeof e=="object"?e:{data:e}}))}function v(t,e){ue()?(console.error(` ${m.red}\u2717${m.reset} ${t}`),e&&ty(e,4)):console.error(JSON.stringify({success:!1,error:t,details:e}))}function rG(t){ue()&&console.log(` ${m.yellow}\u26A0${m.reset} ${t}`)}function zt(t){ue()&&console.log(` ${m.dim}${t}${m.reset}`)}function Ho(t){ue()&&(console.log(`
|
|
1718
1718
|
${m.bold}${m.cyan}${t}${m.reset}`),console.log(` ${m.dim}${"\u2500".repeat(t.length)}${m.reset}`))}function io(t,e,r){if(!ue()){console.log(JSON.stringify({success:!0,total:r?.total??t.length,items:t}));return}if(t.length===0){console.log(`
|
|
1719
1719
|
${m.dim}0 results${m.reset}
|
|
1720
1720
|
`);return}let n=e||Object.keys(t[0]),i=mn()?1/0:60,o=n.map(l=>Math.min(i,Math.max(l.length,...t.map(A=>String(A[l]??"").replace(/[\n\r]+/g," ").trim().length))));console.log("");let s=n.map((l,A)=>`${m.bold}${m.cyan}${l.toUpperCase().padEnd(o[A])}${m.reset}`).join(" ");console.log(` ${s}`);let a=o.map(l=>`${m.dim}${"\u2500".repeat(l)}${m.reset}`).join(`${m.dim}\u2500\u2500${m.reset}`);console.log(` ${a}`);for(let l of t){let A=n.map((d,f)=>{let g=String(l[d]??"").replace(/[\n\r]+/g," ").trim();if(g.length>i){let b=`\u2026 (${g.length})`;g=g.slice(0,Math.max(0,i-b.length))+`${m.dim}${b}${m.reset}`}return d==="status"?`${{success:m.green,running:m.yellow,failed:m.red,aborted:m.red,error:m.red,pending:m.dim}[g.toLowerCase()]||""}${g.padEnd(o[f])}${m.reset}`:g.padEnd(o[f])}).join(" ");console.log(` ${A}`)}let c=r?.total??t.length,u=c===t.length?`${t.length} result${t.length===1?"":"s"}`:`${t.length} of ${c} result${c===1?"":"s"}`;console.log(`
|
|
@@ -1906,12 +1906,12 @@ Quick Reference:
|
|
|
1906
1906
|
sg run download <runId> <fileKey> Download a specific file artifact
|
|
1907
1907
|
|
|
1908
1908
|
Output: JSON by default. Use --table for human-readable, --full to disable truncation.
|
|
1909
|
-
`);sV(n,e),aV(n,e),cV(n,e)}var wy=pe(require("fs"));function zu(t,e=!1){let r={id:t.id,toolId:t.toolId,status:t.enabled?"active":"inactive",cronExpression:t.cronExpression,timezone:t.timezone,nextRunAt:t.nextRunAt.toISOString()};return e?{...r,payload:t.payload||{},options:t.options||{},createdByUserId:t.createdByUserId,lastRunAt:t.lastRunAt?.toISOString(),createdAt:t.createdAt.toISOString(),updatedAt:t.updatedAt.toISOString()}:r}function AV(t){return{active:t.filter(e=>e.enabled).length,inactive:t.filter(e=>!e.enabled).length}}function Qy(t,e){let r;try{r=JSON.parse(t)}catch(n){throw new Error(`Invalid ${e} JSON: ${n.message}`)}if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`${e} must be a JSON object`);return r}function NDe(t,e){let r=t.trim().startsWith("{")?t:wy.readFileSync(t,"utf-8");return Qy(r,e)}function vy({inline:t,file:e,label:r}){if(t!==void 0&&e!==void 0)throw new Error(`Use either --${r} or --${r}-file, not both`);if(e!==void 0)return Qy(wy.readFileSync(e,"utf-8"),r);if(t!==void 0)return Qy(t,r)}function lV({value:t,name:e,min:r,max:n}){let i=Number(t);if(!Number.isInteger(i)||i<r||n!==void 0&&i>n){let o=n===void 0?`at least ${r}`:`between ${r} and ${n}`;throw new Error(`--${e} must be an integer ${o}`)}return i}function nv(t){return t.options!==void 0||t.optionsFile!==void 0||t.clearOptions||t.webhookUrl!==void 0||t.toolChain!==void 0||t.clearWebhook||t.retries!==void 0||t.timeout!==void 0}function _y(t,e){if(!nv(t))return;if(t.options!==void 0&&t.optionsFile!==void 0)throw new Error("Use either --options or --options-file, not both");if(t.webhookUrl!==void 0&&t.toolChain!==void 0)throw new Error("Use either --webhook-url or --tool-chain, not both");if(t.clearWebhook&&(t.webhookUrl!==void 0||t.toolChain!==void 0))throw new Error("Use --clear-webhook without --webhook-url or --tool-chain");let r=t.clearOptions?{}:{...e||{}};return t.options!==void 0&&(r=NDe(t.options,"options")),t.optionsFile!==void 0&&(r=Qy(wy.readFileSync(t.optionsFile,"utf-8"),"options")),t.retries!==void 0&&(r.retries=lV({value:t.retries,name:"retries",min:0,max:
|
|
1909
|
+
`);sV(n,e),aV(n,e),cV(n,e)}var wy=pe(require("fs"));function zu(t,e=!1){let r={id:t.id,toolId:t.toolId,status:t.enabled?"active":"inactive",cronExpression:t.cronExpression,timezone:t.timezone,nextRunAt:t.nextRunAt.toISOString()};return e?{...r,payload:t.payload||{},options:t.options||{},createdByUserId:t.createdByUserId,lastRunAt:t.lastRunAt?.toISOString(),createdAt:t.createdAt.toISOString(),updatedAt:t.updatedAt.toISOString()}:r}function AV(t){return{active:t.filter(e=>e.enabled).length,inactive:t.filter(e=>!e.enabled).length}}function Qy(t,e){let r;try{r=JSON.parse(t)}catch(n){throw new Error(`Invalid ${e} JSON: ${n.message}`)}if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`${e} must be a JSON object`);return r}function NDe(t,e){let r=t.trim().startsWith("{")?t:wy.readFileSync(t,"utf-8");return Qy(r,e)}function vy({inline:t,file:e,label:r}){if(t!==void 0&&e!==void 0)throw new Error(`Use either --${r} or --${r}-file, not both`);if(e!==void 0)return Qy(wy.readFileSync(e,"utf-8"),r);if(t!==void 0)return Qy(t,r)}function lV({value:t,name:e,min:r,max:n}){let i=Number(t);if(!Number.isInteger(i)||i<r||n!==void 0&&i>n){let o=n===void 0?`at least ${r}`:`between ${r} and ${n}`;throw new Error(`--${e} must be an integer ${o}`)}return i}function nv(t){return t.options!==void 0||t.optionsFile!==void 0||t.clearOptions||t.webhookUrl!==void 0||t.toolChain!==void 0||t.clearWebhook||t.retries!==void 0||t.timeout!==void 0}function _y(t,e){if(!nv(t))return;if(t.options!==void 0&&t.optionsFile!==void 0)throw new Error("Use either --options or --options-file, not both");if(t.webhookUrl!==void 0&&t.toolChain!==void 0)throw new Error("Use either --webhook-url or --tool-chain, not both");if(t.clearWebhook&&(t.webhookUrl!==void 0||t.toolChain!==void 0))throw new Error("Use --clear-webhook without --webhook-url or --tool-chain");let r=t.clearOptions?{}:{...e||{}};return t.options!==void 0&&(r=NDe(t.options,"options")),t.optionsFile!==void 0&&(r=Qy(wy.readFileSync(t.optionsFile,"utf-8"),"options")),t.retries!==void 0&&(r.retries=lV({value:t.retries,name:"retries",min:0,max:3})),t.timeout!==void 0&&(r.timeout=lV({value:t.timeout,name:"timeout",min:100})),t.clearWebhook?delete r.webhookUrl:t.toolChain!==void 0?r.webhookUrl=`tool:${t.toolChain}`:t.webhookUrl!==void 0&&(r.webhookUrl=t.webhookUrl),r}function Yu(t){let e=t instanceof Error?t.message:String(t);return e.toLowerCase().includes("fetch failed")?["Could not reach the configured superglue API endpoint.","Set SUPERGLUE_API_ENDPOINT or pass --endpoint, then run `sg login` or provide an org-scoped API key for headless auth."].join(" "):e}function dV(t,e){t.command("create").description("Create a schedule for a saved tool").requiredOption("--tool <id>","Saved tool ID to schedule").requiredOption("--cron <expression>","5-field cron expression").option("--timezone <name>","IANA timezone, defaults to the local timezone").option("--disabled","Create the schedule disabled").option("--payload <json>","JSON object payload passed to each scheduled run").option("--payload-file <path>","JSON file payload passed to each scheduled run").option("--options <json-or-file>","Request options JSON object or file path").option("--options-file <path>","Request options JSON file").option("--webhook-url <url>","Webhook URL called after successful execution").option("--tool-chain <toolId>","Tool ID to run after successful execution").option("--retries <n>","Retry count, 0-3").option("--timeout <ms>","Request timeout in milliseconds").addHelpText("after",`
|
|
1910
1910
|
Examples:
|
|
1911
1911
|
sg schedule create --tool daily_report --cron "0 9 * * 1-5" --timezone UTC
|
|
1912
1912
|
sg schedule create --tool sync_crm --cron "*/15 * * * *" --timezone Europe/Berlin --payload '{"limit":100}'
|
|
1913
1913
|
sg schedule create --tool import_orders --cron "0 * * * *" --timezone UTC --tool-chain notify_team
|
|
1914
|
-
`).action(async r=>{let{client:n}=e();try{let i=vy({inline:r.payload,file:r.payloadFile,label:"payload"}),o=_y(r),s=await n.createToolSchedule(r.tool,{cronExpression:r.cron,timezone:r.timezone,enabled:!r.disabled,payload:i,options:o});ue()?Qe(`Schedule created: ${m.bold}${s.id}${m.reset}`,{toolId:s.toolId,status:s.enabled?"active":"inactive",nextRunAt:s.nextRunAt.toISOString()}):re({success:!0,schedule:zu(s,!0)})}catch(i){v(Yu(i)),process.exit(1)}})}function fV(t,e){t.command("edit").description("Edit an existing schedule").requiredOption("--tool <id>","Saved tool ID that owns the schedule").requiredOption("--id <id>","Schedule ID").option("--cron <expression>","New 5-field cron expression").option("--timezone <name>","New IANA timezone").option("--enabled","Enable the schedule").option("--disabled","Disable the schedule").option("--payload <json>","Replacement JSON object payload").option("--payload-file <path>","Replacement JSON payload file").option("--options <json-or-file>","Replacement request options JSON object or file path").option("--options-file <path>","Replacement request options JSON file").option("--clear-options","Replace request options with an empty object").option("--webhook-url <url>","Set webhook URL called after successful execution").option("--tool-chain <toolId>","Set tool ID to run after successful execution").option("--clear-webhook","Remove webhook/tool-chain success action from options").option("--retries <n>","Set retry count, 0-
|
|
1914
|
+
`).action(async r=>{let{client:n}=e();try{let i=vy({inline:r.payload,file:r.payloadFile,label:"payload"}),o=_y(r),s=await n.createToolSchedule(r.tool,{cronExpression:r.cron,timezone:r.timezone,enabled:!r.disabled,payload:i,options:o});ue()?Qe(`Schedule created: ${m.bold}${s.id}${m.reset}`,{toolId:s.toolId,status:s.enabled?"active":"inactive",nextRunAt:s.nextRunAt.toISOString()}):re({success:!0,schedule:zu(s,!0)})}catch(i){v(Yu(i)),process.exit(1)}})}function fV(t,e){t.command("edit").description("Edit an existing schedule").requiredOption("--tool <id>","Saved tool ID that owns the schedule").requiredOption("--id <id>","Schedule ID").option("--cron <expression>","New 5-field cron expression").option("--timezone <name>","New IANA timezone").option("--enabled","Enable the schedule").option("--disabled","Disable the schedule").option("--payload <json>","Replacement JSON object payload").option("--payload-file <path>","Replacement JSON payload file").option("--options <json-or-file>","Replacement request options JSON object or file path").option("--options-file <path>","Replacement request options JSON file").option("--clear-options","Replace request options with an empty object").option("--webhook-url <url>","Set webhook URL called after successful execution").option("--tool-chain <toolId>","Set tool ID to run after successful execution").option("--clear-webhook","Remove webhook/tool-chain success action from options").option("--retries <n>","Set retry count, 0-3").option("--timeout <ms>","Set request timeout in milliseconds").addHelpText("after",`
|
|
1915
1915
|
Examples:
|
|
1916
1916
|
sg schedule edit --tool daily_report --id <scheduleId> --disabled
|
|
1917
1917
|
sg schedule edit --tool daily_report --id <scheduleId> --cron "0 8 * * *" --timezone UTC
|
|
@@ -179,16 +179,16 @@ Set step-level `failureBehavior: "continue"` to keep the workflow running after
|
|
|
179
179
|
|
|
180
180
|
**Connection/server errors:**
|
|
181
181
|
|
|
182
|
-
- Default
|
|
183
|
-
- Retries on fetch-level
|
|
184
|
-
- Fixed delay between retries
|
|
182
|
+
- Default 1 retry per request. Steps and direct system calls have no retry setting; schedule `options.retries` (0-3) applies to every request in the scheduled run
|
|
183
|
+
- Retries on fetch-level connection failures (reset, TLS, DNS) and on 5xx responses. Other 4xx responses fail immediately
|
|
184
|
+
- Fixed 1000ms delay between retries
|
|
185
185
|
|
|
186
186
|
**Rate limiting (429):**
|
|
187
187
|
|
|
188
|
-
-
|
|
189
|
-
- Respects `Retry-After` header (seconds or HTTP-date)
|
|
190
|
-
-
|
|
191
|
-
-
|
|
188
|
+
- Separate from the `retries` budget; applies even when `retries` is 0
|
|
189
|
+
- Respects `Retry-After` header (seconds or HTTP-date) on the first retry
|
|
190
|
+
- Otherwise exponential backoff `4^n * 1000ms + jitter` (4s, 16s, 64s, 256s, 1024s)
|
|
191
|
+
- Fails once the total 429 wait would exceed `MAX_RATE_LIMIT_WAIT_MS` (1hr)
|
|
192
192
|
|
|
193
193
|
**Timeouts:** Request timeout aborts the fetch and throws immediately — timeouts are not retried.
|
|
194
194
|
|
package/package.json
CHANGED
|
@@ -179,16 +179,16 @@ Set step-level `failureBehavior: "continue"` to keep the workflow running after
|
|
|
179
179
|
|
|
180
180
|
**Connection/server errors:**
|
|
181
181
|
|
|
182
|
-
- Default
|
|
183
|
-
- Retries on fetch-level
|
|
184
|
-
- Fixed delay between retries
|
|
182
|
+
- Default 1 retry per request. Steps and direct system calls have no retry setting; schedule `options.retries` (0-3) applies to every request in the scheduled run
|
|
183
|
+
- Retries on fetch-level connection failures (reset, TLS, DNS) and on 5xx responses. Other 4xx responses fail immediately
|
|
184
|
+
- Fixed 1000ms delay between retries
|
|
185
185
|
|
|
186
186
|
**Rate limiting (429):**
|
|
187
187
|
|
|
188
|
-
-
|
|
189
|
-
- Respects `Retry-After` header (seconds or HTTP-date)
|
|
190
|
-
-
|
|
191
|
-
-
|
|
188
|
+
- Separate from the `retries` budget; applies even when `retries` is 0
|
|
189
|
+
- Respects `Retry-After` header (seconds or HTTP-date) on the first retry
|
|
190
|
+
- Otherwise exponential backoff `4^n * 1000ms + jitter` (4s, 16s, 64s, 256s, 1024s)
|
|
191
|
+
- Fails once the total 429 wait would exceed `MAX_RATE_LIMIT_WAIT_MS` (1hr)
|
|
192
192
|
|
|
193
193
|
**Timeouts:** Request timeout aborts the fetch and throws immediately — timeouts are not retried.
|
|
194
194
|
|