@superglue/cli 1.1.76 → 1.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/cli.js +2 -2
- package/package.json +1 -1
|
@@ -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.77",
|
|
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 QS=Object.create;var nl=Object.defineProperty;var SS=Object.getOwnPropertyDescriptor;var DS=Object.getOwnPropertyNames;var TS=Object.getPrototypeOf,RS=Object.prototype.hasOwnProperty;var he=(o,e)=>()=>(o&&(e=o(o=0)),e);var y=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Bv=(o,e)=>{for(var t in e)nl(o,t,{get:e[t],enumerable:!0})},Qv=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of DS(e))!RS.call(o,i)&&i!==t&&nl(o,i,{get:()=>e[i],enumerable:!(a=SS(e,i))||a.enumerable});return o};var W=(o,e,t)=>(t=o!=null?QS(TS(o)):{},Qv(e||!o||!o.__esModule?nl(t,"default",{value:o,enumerable:!0}):t,o)),Rp=o=>Qv(nl({},"__esModule",{value:!0}),o);var Nv=y((Ile,Rv)=>{"use strict";var Sv=9007199254740991,NS="[object Arguments]",US="[object Function]",OS="[object GeneratorFunction]",MS=/^(?:0|[1-9]\d*)$/;function _S(o,e){for(var t=-1,a=Array(o);++t<o;)a[t]=e(t);return a}function LS(o,e){return function(t){return o(e(t))}}var cl=Object.prototype,Np=cl.hasOwnProperty,Dv=cl.toString,FS=cl.propertyIsEnumerable,PS=LS(Object.keys,Object);function HS(o,e){var t=WS(o)||$S(o)?_S(o.length,String):[],a=t.length,i=!!a;for(var r in o)(e||Np.call(o,r))&&!(i&&(r=="length"||YS(r,a)))&&t.push(r);return t}function GS(o){if(!VS(o))return PS(o);var e=[];for(var t in Object(o))Np.call(o,t)&&t!="constructor"&&e.push(t);return e}function YS(o,e){return e=e??Sv,!!e&&(typeof o=="number"||MS.test(o))&&o>-1&&o%1==0&&o<e}function VS(o){var e=o&&o.constructor,t=typeof e=="function"&&e.prototype||cl;return o===t}function $S(o){return JS(o)&&Np.call(o,"callee")&&(!FS.call(o,"callee")||Dv.call(o)==NS)}var WS=Array.isArray;function Tv(o){return o!=null&&ZS(o.length)&&!KS(o)}function JS(o){return e7(o)&&Tv(o)}function KS(o){var e=XS(o)?Dv.call(o):"";return e==US||e==OS}function ZS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Sv}function XS(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function e7(o){return!!o&&typeof o=="object"}function o7(o){return Tv(o)?HS(o):GS(o)}Rv.exports=o7});var ux=y((Vn,ss)=>{"use strict";var t7=200,Yv="__lodash_hash_undefined__",a7=800,i7=16,Vv=9007199254740991,$v="[object Arguments]",r7="[object Array]",s7="[object AsyncFunction]",n7="[object Boolean]",c7="[object Date]",m7="[object Error]",Wv="[object Function]",l7="[object GeneratorFunction]",u7="[object Map]",d7="[object Number]",g7="[object Null]",Jv="[object Object]",p7="[object Proxy]",h7="[object RegExp]",f7="[object Set]",b7="[object String]",y7="[object Undefined]",k7="[object WeakMap]",A7="[object ArrayBuffer]",w7="[object DataView]",v7="[object Float32Array]",x7="[object Float64Array]",z7="[object Int8Array]",q7="[object Int16Array]",E7="[object Int32Array]",I7="[object Uint8Array]",C7="[object Uint8ClampedArray]",j7="[object Uint16Array]",B7="[object Uint32Array]",Q7=/[\\^$.*+?()[\]{}|]/g,S7=/^\[object .+?Constructor\]$/,D7=/^(?:0|[1-9]\d*)$/,ke={};ke[v7]=ke[x7]=ke[z7]=ke[q7]=ke[E7]=ke[I7]=ke[C7]=ke[j7]=ke[B7]=!0;ke[$v]=ke[r7]=ke[A7]=ke[n7]=ke[w7]=ke[c7]=ke[m7]=ke[Wv]=ke[u7]=ke[d7]=ke[Jv]=ke[h7]=ke[f7]=ke[b7]=ke[k7]=!1;var Kv=typeof global=="object"&&global&&global.Object===Object&&global,T7=typeof self=="object"&&self&&self.Object===Object&&self,Jn=Kv||T7||Function("return this")(),Zv=typeof Vn=="object"&&Vn&&!Vn.nodeType&&Vn,$n=Zv&&typeof ss=="object"&&ss&&!ss.nodeType&&ss,Xv=$n&&$n.exports===Zv,Up=Xv&&Kv.process,Uv=(function(){try{var o=$n&&$n.require&&$n.require("util").types;return o||Up&&Up.binding&&Up.binding("util")}catch{}})(),Ov=Uv&&Uv.isTypedArray;function R7(o,e,t){switch(t.length){case 0:return o.call(e);case 1:return o.call(e,t[0]);case 2:return o.call(e,t[0],t[1]);case 3:return o.call(e,t[0],t[1],t[2])}return o.apply(e,t)}function N7(o,e){for(var t=-1,a=Array(o);++t<o;)a[t]=e(t);return a}function U7(o){return function(e){return o(e)}}function O7(o,e){return o?.[e]}function M7(o,e){return function(t){return o(e(t))}}var _7=Array.prototype,L7=Function.prototype,ul=Object.prototype,Op=Jn["__core-js_shared__"],dl=L7.toString,ka=ul.hasOwnProperty,Mv=(function(){var o=/[^.]+$/.exec(Op&&Op.keys&&Op.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),ex=ul.toString,F7=dl.call(Object),P7=RegExp("^"+dl.call(ka).replace(Q7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ml=Xv?Jn.Buffer:void 0,_v=Jn.Symbol,Lv=Jn.Uint8Array,Fv=ml?ml.allocUnsafe:void 0,ox=M7(Object.getPrototypeOf,Object),Pv=Object.create,H7=ul.propertyIsEnumerable,G7=_7.splice,Ki=_v?_v.toStringTag:void 0,ll=(function(){try{var o=Hp(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Y7=ml?ml.isBuffer:void 0,Hv=Math.max,V7=Date.now,tx=Hp(Jn,"Map"),Wn=Hp(Object,"create"),$7=(function(){function o(){}return function(e){if(!Xi(e))return{};if(Pv)return Pv(e);o.prototype=e;var t=new o;return o.prototype=void 0,t}})();function Zi(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function W7(){this.__data__=Wn?Wn(null):{},this.size=0}function J7(o){var e=this.has(o)&&delete this.__data__[o];return this.size-=e?1:0,e}function K7(o){var e=this.__data__;if(Wn){var t=e[o];return t===Yv?void 0:t}return ka.call(e,o)?e[o]:void 0}function Z7(o){var e=this.__data__;return Wn?e[o]!==void 0:ka.call(e,o)}function X7(o,e){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=Wn&&e===void 0?Yv:e,this}Zi.prototype.clear=W7;Zi.prototype.delete=J7;Zi.prototype.get=K7;Zi.prototype.has=Z7;Zi.prototype.set=X7;function Aa(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function eD(){this.__data__=[],this.size=0}function oD(o){var e=this.__data__,t=gl(e,o);if(t<0)return!1;var a=e.length-1;return t==a?e.pop():G7.call(e,t,1),--this.size,!0}function tD(o){var e=this.__data__,t=gl(e,o);return t<0?void 0:e[t][1]}function aD(o){return gl(this.__data__,o)>-1}function iD(o,e){var t=this.__data__,a=gl(t,o);return a<0?(++this.size,t.push([o,e])):t[a][1]=e,this}Aa.prototype.clear=eD;Aa.prototype.delete=oD;Aa.prototype.get=tD;Aa.prototype.has=aD;Aa.prototype.set=iD;function ns(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function rD(){this.size=0,this.__data__={hash:new Zi,map:new(tx||Aa),string:new Zi}}function sD(o){var e=hl(this,o).delete(o);return this.size-=e?1:0,e}function nD(o){return hl(this,o).get(o)}function cD(o){return hl(this,o).has(o)}function mD(o,e){var t=hl(this,o),a=t.size;return t.set(o,e),this.size+=t.size==a?0:1,this}ns.prototype.clear=rD;ns.prototype.delete=sD;ns.prototype.get=nD;ns.prototype.has=cD;ns.prototype.set=mD;function cs(o){var e=this.__data__=new Aa(o);this.size=e.size}function lD(){this.__data__=new Aa,this.size=0}function uD(o){var e=this.__data__,t=e.delete(o);return this.size=e.size,t}function dD(o){return this.__data__.get(o)}function gD(o){return this.__data__.has(o)}function pD(o,e){var t=this.__data__;if(t instanceof Aa){var a=t.__data__;if(!tx||a.length<t7-1)return a.push([o,e]),this.size=++t.size,this;t=this.__data__=new ns(a)}return t.set(o,e),this.size=t.size,this}cs.prototype.clear=lD;cs.prototype.delete=uD;cs.prototype.get=dD;cs.prototype.has=gD;cs.prototype.set=pD;function hD(o,e){var t=Fp(o),a=!t&&Lp(o),i=!t&&!a&&sx(o),r=!t&&!a&&!i&&cx(o),s=t||a||i||r,n=s?N7(o.length,String):[],c=n.length;for(var m in o)(e||ka.call(o,m))&&!(s&&(m=="length"||i&&(m=="offset"||m=="parent")||r&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||ix(m,c)))&&n.push(m);return n}function Mp(o,e,t){(t!==void 0&&!fl(o[e],t)||t===void 0&&!(e in o))&&Pp(o,e,t)}function fD(o,e,t){var a=o[e];(!(ka.call(o,e)&&fl(a,t))||t===void 0&&!(e in o))&&Pp(o,e,t)}function gl(o,e){for(var t=o.length;t--;)if(fl(o[t][0],e))return t;return-1}function Pp(o,e,t){e=="__proto__"&&ll?ll(o,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[e]=t}var bD=BD();function pl(o){return o==null?o===void 0?y7:g7:Ki&&Ki in Object(o)?QD(o):UD(o)}function Gv(o){return Kn(o)&&pl(o)==$v}function yD(o){if(!Xi(o)||RD(o))return!1;var e=Yp(o)?P7:S7;return e.test(LD(o))}function kD(o){return Kn(o)&&nx(o.length)&&!!ke[pl(o)]}function AD(o){if(!Xi(o))return ND(o);var e=rx(o),t=[];for(var a in o)a=="constructor"&&(e||!ka.call(o,a))||t.push(a);return t}function ax(o,e,t,a,i){o!==e&&bD(e,function(r,s){if(i||(i=new cs),Xi(r))wD(o,e,s,t,ax,a,i);else{var n=a?a(_p(o,s),r,s+"",o,e,i):void 0;n===void 0&&(n=r),Mp(o,s,n)}},mx)}function wD(o,e,t,a,i,r,s){var n=_p(o,t),c=_p(e,t),m=s.get(c);if(m){Mp(o,t,m);return}var l=r?r(n,c,t+"",o,e,s):void 0,u=l===void 0;if(u){var d=Fp(c),g=!d&&sx(c),p=!d&&!g&&cx(c);l=c,d||g||p?Fp(n)?l=n:FD(n)?l=ID(n):g?(u=!1,l=zD(c,!0)):p?(u=!1,l=ED(c,!0)):l=[]:PD(c)||Lp(c)?(l=n,Lp(n)?l=HD(n):(!Xi(n)||Yp(n))&&(l=SD(c))):u=!1}u&&(s.set(c,l),i(l,c,a,r,s),s.delete(c)),Mp(o,t,l)}function vD(o,e){return MD(OD(o,e,lx),o+"")}var xD=ll?function(o,e){return ll(o,"toString",{configurable:!0,enumerable:!1,value:YD(e),writable:!0})}:lx;function zD(o,e){if(e)return o.slice();var t=o.length,a=Fv?Fv(t):new o.constructor(t);return o.copy(a),a}function qD(o){var e=new o.constructor(o.byteLength);return new Lv(e).set(new Lv(o)),e}function ED(o,e){var t=e?qD(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function ID(o,e){var t=-1,a=o.length;for(e||(e=Array(a));++t<a;)e[t]=o[t];return e}function CD(o,e,t,a){var i=!t;t||(t={});for(var r=-1,s=e.length;++r<s;){var n=e[r],c=a?a(t[n],o[n],n,t,o):void 0;c===void 0&&(c=o[n]),i?Pp(t,n,c):fD(t,n,c)}return t}function jD(o){return vD(function(e,t){var a=-1,i=t.length,r=i>1?t[i-1]:void 0,s=i>2?t[2]:void 0;for(r=o.length>3&&typeof r=="function"?(i--,r):void 0,s&&DD(t[0],t[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++a<i;){var n=t[a];n&&o(e,n,a,r)}return e})}function BD(o){return function(e,t,a){for(var i=-1,r=Object(e),s=a(e),n=s.length;n--;){var c=s[o?n:++i];if(t(r[c],c,r)===!1)break}return e}}function hl(o,e){var t=o.__data__;return TD(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Hp(o,e){var t=O7(o,e);return yD(t)?t:void 0}function QD(o){var e=ka.call(o,Ki),t=o[Ki];try{o[Ki]=void 0;var a=!0}catch{}var i=ex.call(o);return a&&(e?o[Ki]=t:delete o[Ki]),i}function SD(o){return typeof o.constructor=="function"&&!rx(o)?$7(ox(o)):{}}function ix(o,e){var t=typeof o;return e=e??Vv,!!e&&(t=="number"||t!="symbol"&&D7.test(o))&&o>-1&&o%1==0&&o<e}function DD(o,e,t){if(!Xi(t))return!1;var a=typeof e;return(a=="number"?Gp(t)&&ix(e,t.length):a=="string"&&e in t)?fl(t[e],o):!1}function TD(o){var e=typeof o;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?o!=="__proto__":o===null}function RD(o){return!!Mv&&Mv in o}function rx(o){var e=o&&o.constructor,t=typeof e=="function"&&e.prototype||ul;return o===t}function ND(o){var e=[];if(o!=null)for(var t in Object(o))e.push(t);return e}function UD(o){return ex.call(o)}function OD(o,e,t){return e=Hv(e===void 0?o.length-1:e,0),function(){for(var a=arguments,i=-1,r=Hv(a.length-e,0),s=Array(r);++i<r;)s[i]=a[e+i];i=-1;for(var n=Array(e+1);++i<e;)n[i]=a[i];return n[e]=t(s),R7(o,this,n)}}function _p(o,e){if(!(e==="constructor"&&typeof o[e]=="function")&&e!="__proto__")return o[e]}var MD=_D(xD);function _D(o){var e=0,t=0;return function(){var a=V7(),i=i7-(a-t);if(t=a,i>0){if(++e>=a7)return arguments[0]}else e=0;return o.apply(void 0,arguments)}}function LD(o){if(o!=null){try{return dl.call(o)}catch{}try{return o+""}catch{}}return""}function fl(o,e){return o===e||o!==o&&e!==e}var Lp=Gv((function(){return arguments})())?Gv:function(o){return Kn(o)&&ka.call(o,"callee")&&!H7.call(o,"callee")},Fp=Array.isArray;function Gp(o){return o!=null&&nx(o.length)&&!Yp(o)}function FD(o){return Kn(o)&&Gp(o)}var sx=Y7||VD;function Yp(o){if(!Xi(o))return!1;var e=pl(o);return e==Wv||e==l7||e==s7||e==p7}function nx(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Vv}function Xi(o){var e=typeof o;return o!=null&&(e=="object"||e=="function")}function Kn(o){return o!=null&&typeof o=="object"}function PD(o){if(!Kn(o)||pl(o)!=Jv)return!1;var e=ox(o);if(e===null)return!0;var t=ka.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&dl.call(t)==F7}var cx=Ov?U7(Ov):kD;function HD(o){return CD(o,mx(o))}function mx(o){return Gp(o)?hD(o,!0):AD(o)}var GD=jD(function(o,e,t){ax(o,e,t)});function YD(o){return function(){return o}}function lx(o){return o}function VD(){return!1}ss.exports=GD});var qx=y((Cle,zx)=>{"use strict";var hx=200,Wp="__lodash_hash_undefined__",$D=1/0,WD=9007199254740991,JD="[object Function]",KD="[object GeneratorFunction]",ZD=/[\\^$.*+?()[\]{}|]/g,XD=/^\[object .+?Constructor\]$/,eT=typeof global=="object"&&global&&global.Object===Object&&global,oT=typeof self=="object"&&self&&self.Object===Object&&self,Jp=eT||oT||Function("return this")();function tT(o,e,t){switch(t.length){case 0:return o.call(e);case 1:return o.call(e,t[0]);case 2:return o.call(e,t[0],t[1]);case 3:return o.call(e,t[0],t[1],t[2])}return o.apply(e,t)}function aT(o,e){for(var t=-1,a=o?o.length:0,i=0,r=[];++t<a;){var s=o[t];e(s,t,o)&&(r[i++]=s)}return r}function fx(o,e){var t=o?o.length:0;return!!t&&nT(o,e,0)>-1}function bx(o,e,t){for(var a=-1,i=o?o.length:0;++a<i;)if(t(e,o[a]))return!0;return!1}function iT(o,e){for(var t=-1,a=o?o.length:0,i=Array(a);++t<a;)i[t]=e(o[t],t,o);return i}function rT(o,e){for(var t=-1,a=e.length,i=o.length;++t<a;)o[i+t]=e[t];return o}function sT(o,e,t,a){for(var i=o.length,r=t+(a?1:-1);a?r--:++r<i;)if(e(o[r],r,o))return r;return-1}function nT(o,e,t){if(e!==e)return sT(o,cT,t);for(var a=t-1,i=o.length;++a<i;)if(o[a]===e)return a;return-1}function cT(o){return o!==o}function mT(o){return function(e){return o(e)}}function yx(o,e){return o.has(e)}function lT(o,e){return o?.[e]}function uT(o){var e=!1;if(o!=null&&typeof o.toString!="function")try{e=!!(o+"")}catch{}return e}function kx(o){var e=-1,t=Array(o.size);return o.forEach(function(a){t[++e]=a}),t}var dT=Array.prototype,gT=Function.prototype,Ax=Object.prototype,Vp=Jp["__core-js_shared__"],dx=(function(){var o=/[^.]+$/.exec(Vp&&Vp.keys&&Vp.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),wx=gT.toString,Kp=Ax.hasOwnProperty,pT=Ax.toString,hT=RegExp("^"+wx.call(Kp).replace(ZD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fT=dT.splice,gx=Math.max,bT=Zp(Jp,"Map"),$p=Zp(Jp,"Set"),Zn=Zp(Object,"create");function er(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function yT(){this.__data__=Zn?Zn(null):{}}function kT(o){return this.has(o)&&delete this.__data__[o]}function AT(o){var e=this.__data__;if(Zn){var t=e[o];return t===Wp?void 0:t}return Kp.call(e,o)?e[o]:void 0}function wT(o){var e=this.__data__;return Zn?e[o]!==void 0:Kp.call(e,o)}function vT(o,e){var t=this.__data__;return t[o]=Zn&&e===void 0?Wp:e,this}er.prototype.clear=yT;er.prototype.delete=kT;er.prototype.get=AT;er.prototype.has=wT;er.prototype.set=vT;function ms(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function xT(){this.__data__=[]}function zT(o){var e=this.__data__,t=bl(e,o);if(t<0)return!1;var a=e.length-1;return t==a?e.pop():fT.call(e,t,1),!0}function qT(o){var e=this.__data__,t=bl(e,o);return t<0?void 0:e[t][1]}function ET(o){return bl(this.__data__,o)>-1}function IT(o,e){var t=this.__data__,a=bl(t,o);return a<0?t.push([o,e]):t[a][1]=e,this}ms.prototype.clear=xT;ms.prototype.delete=zT;ms.prototype.get=qT;ms.prototype.has=ET;ms.prototype.set=IT;function ls(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function CT(){this.__data__={hash:new er,map:new(bT||ms),string:new er}}function jT(o){return yl(this,o).delete(o)}function BT(o){return yl(this,o).get(o)}function QT(o){return yl(this,o).has(o)}function ST(o,e){return yl(this,o).set(o,e),this}ls.prototype.clear=CT;ls.prototype.delete=jT;ls.prototype.get=BT;ls.prototype.has=QT;ls.prototype.set=ST;function Xn(o){var e=-1,t=o?o.length:0;for(this.__data__=new ls;++e<t;)this.add(o[e])}function DT(o){return this.__data__.set(o,Wp),this}function TT(o){return this.__data__.has(o)}Xn.prototype.add=Xn.prototype.push=DT;Xn.prototype.has=TT;function bl(o,e){for(var t=o.length;t--;)if(HT(o[t][0],e))return t;return-1}function px(o,e,t,a){var i=-1,r=fx,s=!0,n=o.length,c=[],m=e.length;if(!n)return c;t&&(e=iT(e,mT(t))),a?(r=bx,s=!1):e.length>=hx&&(r=yx,s=!1,e=new Xn(e));e:for(;++i<n;){var l=o[i],u=t?t(l):l;if(l=a||l!==0?l:0,s&&u===u){for(var d=m;d--;)if(e[d]===u)continue e;c.push(l)}else r(e,u,a)||c.push(l)}return c}function RT(o){if(!xx(o)||LT(o))return!1;var e=vx(o)||uT(o)?hT:XD;return e.test(FT(o))}function NT(o,e){return e=gx(e===void 0?o.length-1:e,0),function(){for(var t=arguments,a=-1,i=gx(t.length-e,0),r=Array(i);++a<i;)r[a]=t[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=t[a];return s[e]=r,tT(o,this,s)}}function UT(o,e,t){var a=-1,i=fx,r=o.length,s=!0,n=[],c=n;if(t)s=!1,i=bx;else if(r>=hx){var m=e?null:MT(o);if(m)return kx(m);s=!1,i=yx,c=new Xn}else c=e?[]:n;e:for(;++a<r;){var l=o[a],u=e?e(l):l;if(l=t||l!==0?l:0,s&&u===u){for(var d=c.length;d--;)if(c[d]===u)continue e;e&&c.push(u),n.push(l)}else i(c,u,t)||(c!==n&&c.push(u),n.push(l))}return n}function OT(o,e,t){for(var a=-1,i=o.length;++a<i;)var r=r?rT(px(r,o[a],e,t),px(o[a],r,e,t)):o[a];return r&&r.length?UT(r,e,t):[]}var MT=$p&&1/kx(new $p([,-0]))[1]==$D?function(o){return new $p(o)}:WT;function yl(o,e){var t=o.__data__;return _T(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Zp(o,e){var t=lT(o,e);return RT(t)?t:void 0}function _T(o){var e=typeof o;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?o!=="__proto__":o===null}function LT(o){return!!dx&&dx in o}function FT(o){if(o!=null){try{return wx.call(o)}catch{}try{return o+""}catch{}}return""}var PT=NT(function(o){return OT(aT(o,YT))});function HT(o,e){return o===e||o!==o&&e!==e}function GT(o){return o!=null&&VT(o.length)&&!vx(o)}function YT(o){return $T(o)&>(o)}function vx(o){var e=xx(o)?pT.call(o):"";return e==JD||e==KD}function VT(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=WD}function xx(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function $T(o){return!!o&&typeof o=="object"}function WT(){}zx.exports=PT});var Al=y(wa=>{"use strict";var th=wa&&wa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(wa,"__esModule",{value:!0});wa.toJsonSchema=oR;wa.convertRequiredToArray=ec;wa.generateDefaultFromSchema=oc;wa.parseJsonSafe=kl;wa.normalizeToolSchemas=tR;var Xp=th(Nv()),eh=th(ux()),JT=th(qx());function us(o,e){if(o===e)return!0;if(o===null||e===null||typeof o!="object"||typeof e!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t=Object.keys(o),a=Object.keys(e);if(t.length!==a.length)return!1;let i=e;return t.every(r=>r in i&&us(o[r],i[r]))}var KT={required:!1,requiredDepth:Number.POSITIVE_INFINITY,postProcessFnc:null,strings:{preProcessFnc:null},arrays:{mode:"all"},objects:{preProcessFnc:null,postProcessFnc:null,additionalProperties:!0}},ZT={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)}},ds={typeNames:["integer","number","string","array","object","boolean","null","date"],getType(o){return ds.typeNames.find(e=>ZT[e](o))},mergeSchemaObjs(o,e){if(!o||!e)return null;let t=(0,Xp.default)(o),a=(0,Xp.default)(e);if(!us(t,a)){if(o.type==="array"&&e.type==="array"&&us((0,JT.default)(t,a),["items"])){let r=t.length>a.length?e:o,s=t.length>a.length?o:e;if((0,Xp.default)(r).reduce((c,m)=>us(r[m],s[m])&&c,!0))return r}if(o.type!=="object"||e.type!=="object")return null}let i={};for(let r=0,{length:s}=t;r<s;r++){let n=t[r];if(ds.getType(o[n])==="object"){let c=ds.mergeSchemaObjs(o[n],e[n]);if(c)i[n]=c;else{if(o.type==="object"||e.type==="object")return{type:"object"};if(n!=="items"||o.type!=="array"||e.type!=="array")return null}}else if(n==="type")if(o[n]!==e[n])if(o[n]==="integer"&&e[n]==="number"||o[n]==="number"&&e[n]==="integer")i[n]="number";else return null;else i[n]=o[n];else{if(!us(o[n],e[n]))return null;i[n]=o[n]}}return i}};function XT(o){let e;for(let t=0,{length:a}=o;t<a;t++){let i=o[t];if(t>0&&(i==="integer"&&e==="number"?i="number":i==="number"&&e==="integer"&&(e="number"),e!==i))return null;e=i}return e}function eR(o){return XT(o.map(e=>ds.getType(e)))}var oh=class{constructor(e){this.options=(0,eh.default)({},KT,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 t=e.map(a=>{this.depth++;let i=this.getSchema(a);return this.depth--,i});return t.reduce((a,i)=>ds.mergeSchemaObjs(a,i),t.pop())}getObjectSchemaDefault(e){let t={type:"object"},a=Object.keys(e);return a.length>0&&(t.properties=a.reduce((i,r)=>(this.depth++,i[r]=this.getSchema(e[r]),this.depth--,i),{})),t}getObjectSchema(e){return this.options.objects.preProcessFnc?this.options.objects.preProcessFnc(e,this.getObjectSchemaDefault):this.getObjectSchemaDefault(e)}getArraySchemaMerging(e){let t={type:"array"},a=eR(e);if(a)if(t.items={type:a},a!=="integer"&&a!=="number"){let i=this.getCommonArrayItemSchema(e);i&&(t.items=i)}else this.options.required&&(t.items.required=!0);return t}getArraySchemaNoMerging(e){let t={type:"array"};return e.length>0&&(this.depth++,t.items=this.getSchema(e[0]),this.depth--),t}getArraySchemaTuple(e){let t={type:"array"};return e.length>0&&(t.items=e.map(a=>{this.depth++;let i=this.getSchema(a);return this.depth--,i})),t}getArraySchemaUniform(e){let t=this.getArraySchemaNoMerging(e);if(e.length>1)for(let a=1;a<e.length;a++){this.depth++;let i=this.getSchema(e[a]);if(this.depth--,!us(t.items,i))throw new Error("Invalid schema, incompatible array items")}return t}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,t,a){return this.options.required&&this.depth<=this.options.requiredDepth?(0,eh.default)({},t,{required:!0}):t}objectPostProcessDefault(e,t){return this.options.objects.additionalProperties===!1&&Object.getOwnPropertyNames(t).length>0?(0,eh.default)({},e,{additionalProperties:!1}):e}getSchema(e){let t=ds.getType(e);t||(t="null");let a;switch(t){case"object":a=this.getObjectSchema(e);break;case"array":a=this.getArraySchema(e);break;case"string":a=this.getStringSchema(e);break;default:a={type:t}}return this.options.postProcessFnc?a=this.options.postProcessFnc(t,a,e,this.commmonPostProcessDefault):a=this.commmonPostProcessDefault(t,a,e),t==="object"&&(this.options.objects.postProcessFnc?a=this.options.objects.postProcessFnc(a,e,this.objectPostProcessDefault):a=this.objectPostProcessDefault(a,e)),a}};function oR(o,e){return new oh(e).getSchema(o)}function ec(o){if(!o||typeof o!="object")return o;if(Array.isArray(o))return o.map(t=>ec(t));let e={...o};if(delete e.required,e.properties&&typeof e.properties=="object"){let t=[],a={};for(let[i,r]of Object.entries(e.properties)){let s=r;if(s&&typeof s=="object"&&s.required===!0){t.push(i);let{required:n,...c}=s;a[i]=ec(c)}else a[i]=ec(s)}e.properties=a,t.length>0&&(e.required=t)}return e.items&&(e.items=ec(e.items)),e}function oc(o){if(!o||typeof o!="object")return null;if(o.const!==void 0)return o.const;if(o.enum&&Array.isArray(o.enum)&&o.enum.length>0)return o.enum[0];if(o.default!==void 0)return o.default;if(o.oneOf&&Array.isArray(o.oneOf)&&o.oneOf.length>0)return oc(o.oneOf[0]);if(o.anyOf&&Array.isArray(o.anyOf)&&o.anyOf.length>0)return oc(o.anyOf[0]);switch(Array.isArray(o.type)?o.type[0]:o.type){case"string":case"number":case"integer":case"boolean":return null;case"null":return null;case"array":return o.items?[]:[];case"object":let t={};if(o.properties&&typeof o.properties=="object"){let a=o.required||[];for(let[i,r]of Object.entries(o.properties))t[i]=oc(r)}return t;default:if(o.properties&&typeof o.properties=="object"){let a={};for(let[i,r]of Object.entries(o.properties))a[i]=oc(r);return a}return null}}function kl(o){if(typeof o!="string")return o;try{return JSON.parse(o)}catch{return o}}function tR(o){let e={...o};return e.inputSchema&&(e.inputSchema=kl(e.inputSchema)),e.outputSchema&&(e.outputSchema=kl(e.outputSchema)),e.responseSchema&&(e.responseSchema=kl(e.responseSchema)),e}});var rt=y(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.PLAYBOOK_LIMITS=E.DEFAULT_PROJECT_ID=E.PROJECT_LIMITS=E.PROJECT_RESOURCE_TYPES=E.MCP_SERVER_AUTH_MODES=E.OAUTH_CONTINUATION_REASON_MAX_CHARS=E.AGENT_REQUEST_BUSY_STATUSES=E.AGENT_SESSION_RESOURCE_KINDS=E.AGENT_MESSAGE_SCHEMA_VERSION=E.AGENT_APPROVAL_MODES=E.ConfirmationAction=E.SKILL_GATED_TOOLS=E.LOADABLE_MARKDOWN_NAMES=E.SKILL_REFERENCE_NAMES=E.SKILL_BODY_NAMES=E.AGENT_CHECKLIST_MAX_LABEL_CHARS=E.AGENT_CHECKLIST_MAX_ITEMS=E.AGENT_CHECKLIST_MIN_ITEMS=E.DYNAMIC_AGENT_TOOLS=E.AGENT_TOOLS=E.AGENT_BASE_TOOLS=E.AGENT_GLOBAL_TOOLS=E.ARTIFACT_PROPOSAL_ID_PREFIX=E.ARTIFACT_PLAYGROUND_DRAFT_ID=E.PLAYBOOK_PLAYGROUND_DRAFT_ID=E.PLAYGROUND_TOOL_DRAFT_ID=E.AgentType=E.FileStatus=E.MAX_BULK_RESOURCE_SHARE_OPERATIONS=E.MAX_BULK_MUTATION_IDS=E.RunExecutionKind=E.RequestSource=E.RunStatus=E.CredentialMode=E.UpsertMode=E.LogLevel=E.PaginationType=E.DecompressionMethod=E.AuthType=E.FileType=E.CacheMode=E.HttpMethod=E.SupportedFileType=void 0;E.isRequestConfig=aR;E.isTransformConfig=iR;E.getDefaultProjectDisplayName=rR;E.projectResourceKey=gs;E.parseProjectResourceKey=sR;E.normalizeProjectResourceRefs=nR;E.uniqueProjectResourceRefs=cR;E.mergeProjectResourceRefs=mR;var Ex;(function(o){o.JSON="JSON",o.CSV="CSV",o.XML="XML",o.HTML="HTML",o.YAML="YAML",o.EXCEL="EXCEL",o.PDF="PDF",o.DOCX="DOCX",o.PPTX="PPTX",o.ZIP="ZIP",o.GZIP="GZIP",o.BINARY="BINARY",o.RAW="RAW",o.AUTO="AUTO"})(Ex||(E.SupportedFileType=Ex={}));var Ix;(function(o){o.GET="GET",o.POST="POST",o.PUT="PUT",o.DELETE="DELETE",o.PATCH="PATCH",o.HEAD="HEAD",o.OPTIONS="OPTIONS"})(Ix||(E.HttpMethod=Ix={}));var Cx;(function(o){o.ENABLED="ENABLED",o.READONLY="READONLY",o.WRITEONLY="WRITEONLY",o.DISABLED="DISABLED"})(Cx||(E.CacheMode=Cx={}));var jx;(function(o){o.CSV="CSV",o.JSON="JSON",o.XML="XML",o.YAML="YAML",o.EXCEL="EXCEL",o.HTML="HTML",o.PDF="PDF",o.DOCX="DOCX",o.PPTX="PPTX",o.ZIP="ZIP",o.BINARY="BINARY",o.RAW="RAW",o.AUTO="AUTO"})(jx||(E.FileType=jx={}));var Bx;(function(o){o.NONE="NONE",o.OAUTH2="OAUTH2",o.HEADER="HEADER",o.QUERY_PARAM="QUERY_PARAM"})(Bx||(E.AuthType=Bx={}));var Qx;(function(o){o.GZIP="GZIP",o.DEFLATE="DEFLATE",o.NONE="NONE",o.AUTO="AUTO",o.ZIP="ZIP"})(Qx||(E.DecompressionMethod=Qx={}));var Sx;(function(o){o.OFFSET_BASED="OFFSET_BASED",o.PAGE_BASED="PAGE_BASED",o.CURSOR_BASED="CURSOR_BASED",o.DISABLED="DISABLED"})(Sx||(E.PaginationType=Sx={}));var Dx;(function(o){o.DEBUG="DEBUG",o.INFO="INFO",o.WARN="WARN",o.ERROR="ERROR"})(Dx||(E.LogLevel=Dx={}));var Tx;(function(o){o.CREATE="CREATE",o.UPDATE="UPDATE",o.UPSERT="UPSERT"})(Tx||(E.UpsertMode=Tx={}));var Rx;(function(o){o.MERGE="MERGE",o.REPLACE="REPLACE"})(Rx||(E.CredentialMode=Rx={}));var Nx;(function(o){o.RUNNING="RUNNING",o.SUCCESS="SUCCESS",o.FAILED="FAILED",o.ABORTED="ABORTED"})(Nx||(E.RunStatus=Nx={}));var Ux;(function(o){o.API="api",o.FRONTEND="frontend",o.AGENT="agent",o.SCHEDULER="scheduler",o.MCP="mcp",o.TOOL_CHAIN="tool-chain",o.WEBHOOK="webhook",o.CLI="cli"})(Ux||(E.RequestSource=Ux={}));var Ox;(function(o){o.FULL="full",o.DRAFT="draft",o.SINGLE_STEP="single-step"})(Ox||(E.RunExecutionKind=Ox={}));E.MAX_BULK_MUTATION_IDS=100;E.MAX_BULK_RESOURCE_SHARE_OPERATIONS=1e3;function aR(o){return!o||typeof o!="object"?!1:o.type==="request"||!("type"in o)||o.type===void 0}function iR(o){return o?.type==="transform"}var Mx;(function(o){o.PENDING="PENDING",o.UPLOADING="UPLOADING",o.PROCESSING="PROCESSING",o.COMPLETED="COMPLETED",o.FAILED="FAILED"})(Mx||(E.FileStatus=Mx={}));var va;(function(o){o.MAIN="main",o.BACKGROUND_ARTIFACT="background_artifact",o.PLAYGROUND="playground",o.SYSTEM_PLAYGROUND="system_playground",o.PLAYBOOK_PLAYGROUND="playbook_playground",o.ARTIFACT_PLAYGROUND="artifact_playground",o.ACCESS_RULES="access_rules"})(va||(E.AgentType=va={}));E.PLAYGROUND_TOOL_DRAFT_ID="@playground-draft";E.PLAYBOOK_PLAYGROUND_DRAFT_ID="@playground-draft";E.ARTIFACT_PLAYGROUND_DRAFT_ID="@playground-draft";E.ARTIFACT_PROPOSAL_ID_PREFIX="artifact_proposal_";E.AGENT_GLOBAL_TOOLS=["run_command","load_skill"];E.AGENT_BASE_TOOLS=[...E.AGENT_GLOBAL_TOOLS,"call_system","run_tool","share_resource","use_checklist"];E.AGENT_TOOLS={[va.MAIN]:[...E.AGENT_BASE_TOOLS],[va.BACKGROUND_ARTIFACT]:["run_command","create_artifact"],[va.PLAYGROUND]:[...E.AGENT_BASE_TOOLS,"edit_tool"],[va.SYSTEM_PLAYGROUND]:[...E.AGENT_GLOBAL_TOOLS,"call_system","create_system","edit_system","set_credentials","authenticate_oauth","share_resource","use_checklist"],[va.PLAYBOOK_PLAYGROUND]:[...E.AGENT_GLOBAL_TOOLS,"call_system","run_tool","create_playbook","edit_playbook","save_playbook","share_resource","use_checklist"],[va.ARTIFACT_PLAYGROUND]:[...E.AGENT_BASE_TOOLS],[va.ACCESS_RULES]:[...E.AGENT_GLOBAL_TOOLS,"create_role","edit_role","use_checklist"]};E.DYNAMIC_AGENT_TOOLS=["web_search"];E.AGENT_CHECKLIST_MIN_ITEMS=4;E.AGENT_CHECKLIST_MAX_ITEMS=15;E.AGENT_CHECKLIST_MAX_LABEL_CHARS=120;E.SKILL_BODY_NAMES=["superglue-info","tool-building","tool-editing","system-setup","access-management","tool-deployment","notifications","artifacts","playbooks","projects","file-handling","superglue-brain","email","workspace-apps","meetings"];E.SKILL_REFERENCE_NAMES=["http","graphql","postgres","mssql","odbc","redis","mongodb","sftp-smb","file-runtime","tunnel-handling"];E.LOADABLE_MARKDOWN_NAMES=[...E.SKILL_BODY_NAMES,...E.SKILL_REFERENCE_NAMES];E.SKILL_GATED_TOOLS={"tool-building":["build_tool","set_tool_state"],"tool-editing":["edit_tool","save_tool","set_tool_state"],"system-setup":["create_system","edit_system","set_credentials","authenticate_oauth"],"tool-deployment":["create_schedule","edit_schedule","create_mcp_server","edit_mcp_server","show_mcp_server"],"access-management":["create_role","edit_role","share_resource"],playbooks:["create_playbook","edit_playbook"],projects:["create_project","edit_project"],artifacts:["create_artifact","start_background_agent","edit_artifact"]};var _x;(function(o){o.CONFIRMED="confirmed",o.CONFIRMED_AND_SAVE="confirmed_and_save",o.DECLINED="declined",o.OAUTH_SUCCESS="oauth_success",o.OAUTH_FAILURE="oauth_failure"})(_x||(E.ConfirmationAction=_x={}));E.AGENT_APPROVAL_MODES=["ask","act"];E.AGENT_MESSAGE_SCHEMA_VERSION=1;E.AGENT_SESSION_RESOURCE_KINDS=["tool","system","playbook","artifact"];E.AGENT_REQUEST_BUSY_STATUSES=["queued","claimed","running","cancelling"];E.OAUTH_CONTINUATION_REASON_MAX_CHARS=500;E.MCP_SERVER_AUTH_MODES=["oauth","creator_api_key"];E.PROJECT_RESOURCE_TYPES=["system","playbook","artifact","file","tool"];E.PROJECT_LIMITS={name:80,description:500};E.DEFAULT_PROJECT_ID="default";function rR(o){return o.trim()||"Your workspace"}function gs(o){return`${o.type}:${o.id}`}function sR(o){let e=o.indexOf(":");return{type:o.slice(0,e),id:o.slice(e+1)}}function nR({value:o,field:e="resourceRefs"}){if(o===void 0)return{refs:[]};if(!Array.isArray(o))return{error:`${e} must be an array`};let t=[],a=new Set;for(let[i,r]of o.entries()){if(!r||typeof r!="object"||Array.isArray(r))return{error:`${e}[${i}] must be shaped as { type, id }`};let s=r,n=typeof s.type=="string"?s.type.trim():"",c=typeof s.id=="string"?s.id.trim():"";if(!E.PROJECT_RESOURCE_TYPES.includes(n))return{error:`${e}[${i}].type is unsupported`};if(!c||c.length>255)return{error:`${e}[${i}].id must contain between 1 and 255 characters`};let m={type:n,id:c},l=gs(m);a.has(l)||t.push(m),a.add(l)}return{refs:t}}function cR(o){return[...new Map(o.map(e=>[gs(e),e])).values()]}function mR({current:o,add:e,remove:t}){let a=new Map(o.map(i=>[gs(i),i]));for(let i of t)a.delete(gs(i));for(let i of e)a.set(gs(i),i);return[...a.values()]}E.PLAYBOOK_LIMITS={name:120,whenToRun:500,inputs:2e3,instructions:8e3,completionCriteria:2e3,systemRefs:10,toolRefs:25,credentialRefs:10,fileRefs:15,compiledRender:24e3}});var lR,Fx,Lx,uR,dR,gR,pR,Px=he(()=>{"use strict";lR=o=>{let e=Lx(o,0);if(e===void 0||!dR(o[e]))return;let t=Lx(o,e+1);if(t!==void 0)return gR(o,e,t)},Fx=lR,Lx=(o,e)=>{for(let t=e;t<o.length;t+=1){let a=o[t];if(!uR(a))return t}},uR=o=>o===" "||o===" "||o===`
|
|
2
|
+
"use strict";var QS=Object.create;var nl=Object.defineProperty;var SS=Object.getOwnPropertyDescriptor;var DS=Object.getOwnPropertyNames;var TS=Object.getPrototypeOf,RS=Object.prototype.hasOwnProperty;var he=(o,e)=>()=>(o&&(e=o(o=0)),e);var y=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),Bv=(o,e)=>{for(var t in e)nl(o,t,{get:e[t],enumerable:!0})},Qv=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of DS(e))!RS.call(o,i)&&i!==t&&nl(o,i,{get:()=>e[i],enumerable:!(a=SS(e,i))||a.enumerable});return o};var W=(o,e,t)=>(t=o!=null?QS(TS(o)):{},Qv(e||!o||!o.__esModule?nl(t,"default",{value:o,enumerable:!0}):t,o)),Rp=o=>Qv(nl({},"__esModule",{value:!0}),o);var Nv=y((Ile,Rv)=>{"use strict";var Sv=9007199254740991,NS="[object Arguments]",US="[object Function]",OS="[object GeneratorFunction]",MS=/^(?:0|[1-9]\d*)$/;function _S(o,e){for(var t=-1,a=Array(o);++t<o;)a[t]=e(t);return a}function LS(o,e){return function(t){return o(e(t))}}var cl=Object.prototype,Np=cl.hasOwnProperty,Dv=cl.toString,FS=cl.propertyIsEnumerable,PS=LS(Object.keys,Object);function HS(o,e){var t=WS(o)||$S(o)?_S(o.length,String):[],a=t.length,i=!!a;for(var r in o)(e||Np.call(o,r))&&!(i&&(r=="length"||YS(r,a)))&&t.push(r);return t}function GS(o){if(!VS(o))return PS(o);var e=[];for(var t in Object(o))Np.call(o,t)&&t!="constructor"&&e.push(t);return e}function YS(o,e){return e=e??Sv,!!e&&(typeof o=="number"||MS.test(o))&&o>-1&&o%1==0&&o<e}function VS(o){var e=o&&o.constructor,t=typeof e=="function"&&e.prototype||cl;return o===t}function $S(o){return JS(o)&&Np.call(o,"callee")&&(!FS.call(o,"callee")||Dv.call(o)==NS)}var WS=Array.isArray;function Tv(o){return o!=null&&ZS(o.length)&&!KS(o)}function JS(o){return e7(o)&&Tv(o)}function KS(o){var e=XS(o)?Dv.call(o):"";return e==US||e==OS}function ZS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Sv}function XS(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function e7(o){return!!o&&typeof o=="object"}function o7(o){return Tv(o)?HS(o):GS(o)}Rv.exports=o7});var ux=y((Vn,ss)=>{"use strict";var t7=200,Yv="__lodash_hash_undefined__",a7=800,i7=16,Vv=9007199254740991,$v="[object Arguments]",r7="[object Array]",s7="[object AsyncFunction]",n7="[object Boolean]",c7="[object Date]",m7="[object Error]",Wv="[object Function]",l7="[object GeneratorFunction]",u7="[object Map]",d7="[object Number]",g7="[object Null]",Jv="[object Object]",p7="[object Proxy]",h7="[object RegExp]",f7="[object Set]",b7="[object String]",y7="[object Undefined]",k7="[object WeakMap]",A7="[object ArrayBuffer]",w7="[object DataView]",v7="[object Float32Array]",x7="[object Float64Array]",z7="[object Int8Array]",q7="[object Int16Array]",E7="[object Int32Array]",I7="[object Uint8Array]",C7="[object Uint8ClampedArray]",j7="[object Uint16Array]",B7="[object Uint32Array]",Q7=/[\\^$.*+?()[\]{}|]/g,S7=/^\[object .+?Constructor\]$/,D7=/^(?:0|[1-9]\d*)$/,ke={};ke[v7]=ke[x7]=ke[z7]=ke[q7]=ke[E7]=ke[I7]=ke[C7]=ke[j7]=ke[B7]=!0;ke[$v]=ke[r7]=ke[A7]=ke[n7]=ke[w7]=ke[c7]=ke[m7]=ke[Wv]=ke[u7]=ke[d7]=ke[Jv]=ke[h7]=ke[f7]=ke[b7]=ke[k7]=!1;var Kv=typeof global=="object"&&global&&global.Object===Object&&global,T7=typeof self=="object"&&self&&self.Object===Object&&self,Jn=Kv||T7||Function("return this")(),Zv=typeof Vn=="object"&&Vn&&!Vn.nodeType&&Vn,$n=Zv&&typeof ss=="object"&&ss&&!ss.nodeType&&ss,Xv=$n&&$n.exports===Zv,Up=Xv&&Kv.process,Uv=(function(){try{var o=$n&&$n.require&&$n.require("util").types;return o||Up&&Up.binding&&Up.binding("util")}catch{}})(),Ov=Uv&&Uv.isTypedArray;function R7(o,e,t){switch(t.length){case 0:return o.call(e);case 1:return o.call(e,t[0]);case 2:return o.call(e,t[0],t[1]);case 3:return o.call(e,t[0],t[1],t[2])}return o.apply(e,t)}function N7(o,e){for(var t=-1,a=Array(o);++t<o;)a[t]=e(t);return a}function U7(o){return function(e){return o(e)}}function O7(o,e){return o?.[e]}function M7(o,e){return function(t){return o(e(t))}}var _7=Array.prototype,L7=Function.prototype,ul=Object.prototype,Op=Jn["__core-js_shared__"],dl=L7.toString,ka=ul.hasOwnProperty,Mv=(function(){var o=/[^.]+$/.exec(Op&&Op.keys&&Op.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),ex=ul.toString,F7=dl.call(Object),P7=RegExp("^"+dl.call(ka).replace(Q7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ml=Xv?Jn.Buffer:void 0,_v=Jn.Symbol,Lv=Jn.Uint8Array,Fv=ml?ml.allocUnsafe:void 0,ox=M7(Object.getPrototypeOf,Object),Pv=Object.create,H7=ul.propertyIsEnumerable,G7=_7.splice,Ki=_v?_v.toStringTag:void 0,ll=(function(){try{var o=Hp(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Y7=ml?ml.isBuffer:void 0,Hv=Math.max,V7=Date.now,tx=Hp(Jn,"Map"),Wn=Hp(Object,"create"),$7=(function(){function o(){}return function(e){if(!Xi(e))return{};if(Pv)return Pv(e);o.prototype=e;var t=new o;return o.prototype=void 0,t}})();function Zi(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function W7(){this.__data__=Wn?Wn(null):{},this.size=0}function J7(o){var e=this.has(o)&&delete this.__data__[o];return this.size-=e?1:0,e}function K7(o){var e=this.__data__;if(Wn){var t=e[o];return t===Yv?void 0:t}return ka.call(e,o)?e[o]:void 0}function Z7(o){var e=this.__data__;return Wn?e[o]!==void 0:ka.call(e,o)}function X7(o,e){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=Wn&&e===void 0?Yv:e,this}Zi.prototype.clear=W7;Zi.prototype.delete=J7;Zi.prototype.get=K7;Zi.prototype.has=Z7;Zi.prototype.set=X7;function Aa(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function eD(){this.__data__=[],this.size=0}function oD(o){var e=this.__data__,t=gl(e,o);if(t<0)return!1;var a=e.length-1;return t==a?e.pop():G7.call(e,t,1),--this.size,!0}function tD(o){var e=this.__data__,t=gl(e,o);return t<0?void 0:e[t][1]}function aD(o){return gl(this.__data__,o)>-1}function iD(o,e){var t=this.__data__,a=gl(t,o);return a<0?(++this.size,t.push([o,e])):t[a][1]=e,this}Aa.prototype.clear=eD;Aa.prototype.delete=oD;Aa.prototype.get=tD;Aa.prototype.has=aD;Aa.prototype.set=iD;function ns(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function rD(){this.size=0,this.__data__={hash:new Zi,map:new(tx||Aa),string:new Zi}}function sD(o){var e=hl(this,o).delete(o);return this.size-=e?1:0,e}function nD(o){return hl(this,o).get(o)}function cD(o){return hl(this,o).has(o)}function mD(o,e){var t=hl(this,o),a=t.size;return t.set(o,e),this.size+=t.size==a?0:1,this}ns.prototype.clear=rD;ns.prototype.delete=sD;ns.prototype.get=nD;ns.prototype.has=cD;ns.prototype.set=mD;function cs(o){var e=this.__data__=new Aa(o);this.size=e.size}function lD(){this.__data__=new Aa,this.size=0}function uD(o){var e=this.__data__,t=e.delete(o);return this.size=e.size,t}function dD(o){return this.__data__.get(o)}function gD(o){return this.__data__.has(o)}function pD(o,e){var t=this.__data__;if(t instanceof Aa){var a=t.__data__;if(!tx||a.length<t7-1)return a.push([o,e]),this.size=++t.size,this;t=this.__data__=new ns(a)}return t.set(o,e),this.size=t.size,this}cs.prototype.clear=lD;cs.prototype.delete=uD;cs.prototype.get=dD;cs.prototype.has=gD;cs.prototype.set=pD;function hD(o,e){var t=Fp(o),a=!t&&Lp(o),i=!t&&!a&&sx(o),r=!t&&!a&&!i&&cx(o),s=t||a||i||r,n=s?N7(o.length,String):[],c=n.length;for(var m in o)(e||ka.call(o,m))&&!(s&&(m=="length"||i&&(m=="offset"||m=="parent")||r&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||ix(m,c)))&&n.push(m);return n}function Mp(o,e,t){(t!==void 0&&!fl(o[e],t)||t===void 0&&!(e in o))&&Pp(o,e,t)}function fD(o,e,t){var a=o[e];(!(ka.call(o,e)&&fl(a,t))||t===void 0&&!(e in o))&&Pp(o,e,t)}function gl(o,e){for(var t=o.length;t--;)if(fl(o[t][0],e))return t;return-1}function Pp(o,e,t){e=="__proto__"&&ll?ll(o,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[e]=t}var bD=BD();function pl(o){return o==null?o===void 0?y7:g7:Ki&&Ki in Object(o)?QD(o):UD(o)}function Gv(o){return Kn(o)&&pl(o)==$v}function yD(o){if(!Xi(o)||RD(o))return!1;var e=Yp(o)?P7:S7;return e.test(LD(o))}function kD(o){return Kn(o)&&nx(o.length)&&!!ke[pl(o)]}function AD(o){if(!Xi(o))return ND(o);var e=rx(o),t=[];for(var a in o)a=="constructor"&&(e||!ka.call(o,a))||t.push(a);return t}function ax(o,e,t,a,i){o!==e&&bD(e,function(r,s){if(i||(i=new cs),Xi(r))wD(o,e,s,t,ax,a,i);else{var n=a?a(_p(o,s),r,s+"",o,e,i):void 0;n===void 0&&(n=r),Mp(o,s,n)}},mx)}function wD(o,e,t,a,i,r,s){var n=_p(o,t),c=_p(e,t),m=s.get(c);if(m){Mp(o,t,m);return}var l=r?r(n,c,t+"",o,e,s):void 0,u=l===void 0;if(u){var d=Fp(c),g=!d&&sx(c),p=!d&&!g&&cx(c);l=c,d||g||p?Fp(n)?l=n:FD(n)?l=ID(n):g?(u=!1,l=zD(c,!0)):p?(u=!1,l=ED(c,!0)):l=[]:PD(c)||Lp(c)?(l=n,Lp(n)?l=HD(n):(!Xi(n)||Yp(n))&&(l=SD(c))):u=!1}u&&(s.set(c,l),i(l,c,a,r,s),s.delete(c)),Mp(o,t,l)}function vD(o,e){return MD(OD(o,e,lx),o+"")}var xD=ll?function(o,e){return ll(o,"toString",{configurable:!0,enumerable:!1,value:YD(e),writable:!0})}:lx;function zD(o,e){if(e)return o.slice();var t=o.length,a=Fv?Fv(t):new o.constructor(t);return o.copy(a),a}function qD(o){var e=new o.constructor(o.byteLength);return new Lv(e).set(new Lv(o)),e}function ED(o,e){var t=e?qD(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function ID(o,e){var t=-1,a=o.length;for(e||(e=Array(a));++t<a;)e[t]=o[t];return e}function CD(o,e,t,a){var i=!t;t||(t={});for(var r=-1,s=e.length;++r<s;){var n=e[r],c=a?a(t[n],o[n],n,t,o):void 0;c===void 0&&(c=o[n]),i?Pp(t,n,c):fD(t,n,c)}return t}function jD(o){return vD(function(e,t){var a=-1,i=t.length,r=i>1?t[i-1]:void 0,s=i>2?t[2]:void 0;for(r=o.length>3&&typeof r=="function"?(i--,r):void 0,s&&DD(t[0],t[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++a<i;){var n=t[a];n&&o(e,n,a,r)}return e})}function BD(o){return function(e,t,a){for(var i=-1,r=Object(e),s=a(e),n=s.length;n--;){var c=s[o?n:++i];if(t(r[c],c,r)===!1)break}return e}}function hl(o,e){var t=o.__data__;return TD(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Hp(o,e){var t=O7(o,e);return yD(t)?t:void 0}function QD(o){var e=ka.call(o,Ki),t=o[Ki];try{o[Ki]=void 0;var a=!0}catch{}var i=ex.call(o);return a&&(e?o[Ki]=t:delete o[Ki]),i}function SD(o){return typeof o.constructor=="function"&&!rx(o)?$7(ox(o)):{}}function ix(o,e){var t=typeof o;return e=e??Vv,!!e&&(t=="number"||t!="symbol"&&D7.test(o))&&o>-1&&o%1==0&&o<e}function DD(o,e,t){if(!Xi(t))return!1;var a=typeof e;return(a=="number"?Gp(t)&&ix(e,t.length):a=="string"&&e in t)?fl(t[e],o):!1}function TD(o){var e=typeof o;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?o!=="__proto__":o===null}function RD(o){return!!Mv&&Mv in o}function rx(o){var e=o&&o.constructor,t=typeof e=="function"&&e.prototype||ul;return o===t}function ND(o){var e=[];if(o!=null)for(var t in Object(o))e.push(t);return e}function UD(o){return ex.call(o)}function OD(o,e,t){return e=Hv(e===void 0?o.length-1:e,0),function(){for(var a=arguments,i=-1,r=Hv(a.length-e,0),s=Array(r);++i<r;)s[i]=a[e+i];i=-1;for(var n=Array(e+1);++i<e;)n[i]=a[i];return n[e]=t(s),R7(o,this,n)}}function _p(o,e){if(!(e==="constructor"&&typeof o[e]=="function")&&e!="__proto__")return o[e]}var MD=_D(xD);function _D(o){var e=0,t=0;return function(){var a=V7(),i=i7-(a-t);if(t=a,i>0){if(++e>=a7)return arguments[0]}else e=0;return o.apply(void 0,arguments)}}function LD(o){if(o!=null){try{return dl.call(o)}catch{}try{return o+""}catch{}}return""}function fl(o,e){return o===e||o!==o&&e!==e}var Lp=Gv((function(){return arguments})())?Gv:function(o){return Kn(o)&&ka.call(o,"callee")&&!H7.call(o,"callee")},Fp=Array.isArray;function Gp(o){return o!=null&&nx(o.length)&&!Yp(o)}function FD(o){return Kn(o)&&Gp(o)}var sx=Y7||VD;function Yp(o){if(!Xi(o))return!1;var e=pl(o);return e==Wv||e==l7||e==s7||e==p7}function nx(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Vv}function Xi(o){var e=typeof o;return o!=null&&(e=="object"||e=="function")}function Kn(o){return o!=null&&typeof o=="object"}function PD(o){if(!Kn(o)||pl(o)!=Jv)return!1;var e=ox(o);if(e===null)return!0;var t=ka.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&dl.call(t)==F7}var cx=Ov?U7(Ov):kD;function HD(o){return CD(o,mx(o))}function mx(o){return Gp(o)?hD(o,!0):AD(o)}var GD=jD(function(o,e,t){ax(o,e,t)});function YD(o){return function(){return o}}function lx(o){return o}function VD(){return!1}ss.exports=GD});var qx=y((Cle,zx)=>{"use strict";var hx=200,Wp="__lodash_hash_undefined__",$D=1/0,WD=9007199254740991,JD="[object Function]",KD="[object GeneratorFunction]",ZD=/[\\^$.*+?()[\]{}|]/g,XD=/^\[object .+?Constructor\]$/,eT=typeof global=="object"&&global&&global.Object===Object&&global,oT=typeof self=="object"&&self&&self.Object===Object&&self,Jp=eT||oT||Function("return this")();function tT(o,e,t){switch(t.length){case 0:return o.call(e);case 1:return o.call(e,t[0]);case 2:return o.call(e,t[0],t[1]);case 3:return o.call(e,t[0],t[1],t[2])}return o.apply(e,t)}function aT(o,e){for(var t=-1,a=o?o.length:0,i=0,r=[];++t<a;){var s=o[t];e(s,t,o)&&(r[i++]=s)}return r}function fx(o,e){var t=o?o.length:0;return!!t&&nT(o,e,0)>-1}function bx(o,e,t){for(var a=-1,i=o?o.length:0;++a<i;)if(t(e,o[a]))return!0;return!1}function iT(o,e){for(var t=-1,a=o?o.length:0,i=Array(a);++t<a;)i[t]=e(o[t],t,o);return i}function rT(o,e){for(var t=-1,a=e.length,i=o.length;++t<a;)o[i+t]=e[t];return o}function sT(o,e,t,a){for(var i=o.length,r=t+(a?1:-1);a?r--:++r<i;)if(e(o[r],r,o))return r;return-1}function nT(o,e,t){if(e!==e)return sT(o,cT,t);for(var a=t-1,i=o.length;++a<i;)if(o[a]===e)return a;return-1}function cT(o){return o!==o}function mT(o){return function(e){return o(e)}}function yx(o,e){return o.has(e)}function lT(o,e){return o?.[e]}function uT(o){var e=!1;if(o!=null&&typeof o.toString!="function")try{e=!!(o+"")}catch{}return e}function kx(o){var e=-1,t=Array(o.size);return o.forEach(function(a){t[++e]=a}),t}var dT=Array.prototype,gT=Function.prototype,Ax=Object.prototype,Vp=Jp["__core-js_shared__"],dx=(function(){var o=/[^.]+$/.exec(Vp&&Vp.keys&&Vp.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),wx=gT.toString,Kp=Ax.hasOwnProperty,pT=Ax.toString,hT=RegExp("^"+wx.call(Kp).replace(ZD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fT=dT.splice,gx=Math.max,bT=Zp(Jp,"Map"),$p=Zp(Jp,"Set"),Zn=Zp(Object,"create");function er(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function yT(){this.__data__=Zn?Zn(null):{}}function kT(o){return this.has(o)&&delete this.__data__[o]}function AT(o){var e=this.__data__;if(Zn){var t=e[o];return t===Wp?void 0:t}return Kp.call(e,o)?e[o]:void 0}function wT(o){var e=this.__data__;return Zn?e[o]!==void 0:Kp.call(e,o)}function vT(o,e){var t=this.__data__;return t[o]=Zn&&e===void 0?Wp:e,this}er.prototype.clear=yT;er.prototype.delete=kT;er.prototype.get=AT;er.prototype.has=wT;er.prototype.set=vT;function ms(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function xT(){this.__data__=[]}function zT(o){var e=this.__data__,t=bl(e,o);if(t<0)return!1;var a=e.length-1;return t==a?e.pop():fT.call(e,t,1),!0}function qT(o){var e=this.__data__,t=bl(e,o);return t<0?void 0:e[t][1]}function ET(o){return bl(this.__data__,o)>-1}function IT(o,e){var t=this.__data__,a=bl(t,o);return a<0?t.push([o,e]):t[a][1]=e,this}ms.prototype.clear=xT;ms.prototype.delete=zT;ms.prototype.get=qT;ms.prototype.has=ET;ms.prototype.set=IT;function ls(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function CT(){this.__data__={hash:new er,map:new(bT||ms),string:new er}}function jT(o){return yl(this,o).delete(o)}function BT(o){return yl(this,o).get(o)}function QT(o){return yl(this,o).has(o)}function ST(o,e){return yl(this,o).set(o,e),this}ls.prototype.clear=CT;ls.prototype.delete=jT;ls.prototype.get=BT;ls.prototype.has=QT;ls.prototype.set=ST;function Xn(o){var e=-1,t=o?o.length:0;for(this.__data__=new ls;++e<t;)this.add(o[e])}function DT(o){return this.__data__.set(o,Wp),this}function TT(o){return this.__data__.has(o)}Xn.prototype.add=Xn.prototype.push=DT;Xn.prototype.has=TT;function bl(o,e){for(var t=o.length;t--;)if(HT(o[t][0],e))return t;return-1}function px(o,e,t,a){var i=-1,r=fx,s=!0,n=o.length,c=[],m=e.length;if(!n)return c;t&&(e=iT(e,mT(t))),a?(r=bx,s=!1):e.length>=hx&&(r=yx,s=!1,e=new Xn(e));e:for(;++i<n;){var l=o[i],u=t?t(l):l;if(l=a||l!==0?l:0,s&&u===u){for(var d=m;d--;)if(e[d]===u)continue e;c.push(l)}else r(e,u,a)||c.push(l)}return c}function RT(o){if(!xx(o)||LT(o))return!1;var e=vx(o)||uT(o)?hT:XD;return e.test(FT(o))}function NT(o,e){return e=gx(e===void 0?o.length-1:e,0),function(){for(var t=arguments,a=-1,i=gx(t.length-e,0),r=Array(i);++a<i;)r[a]=t[e+a];a=-1;for(var s=Array(e+1);++a<e;)s[a]=t[a];return s[e]=r,tT(o,this,s)}}function UT(o,e,t){var a=-1,i=fx,r=o.length,s=!0,n=[],c=n;if(t)s=!1,i=bx;else if(r>=hx){var m=e?null:MT(o);if(m)return kx(m);s=!1,i=yx,c=new Xn}else c=e?[]:n;e:for(;++a<r;){var l=o[a],u=e?e(l):l;if(l=t||l!==0?l:0,s&&u===u){for(var d=c.length;d--;)if(c[d]===u)continue e;e&&c.push(u),n.push(l)}else i(c,u,t)||(c!==n&&c.push(u),n.push(l))}return n}function OT(o,e,t){for(var a=-1,i=o.length;++a<i;)var r=r?rT(px(r,o[a],e,t),px(o[a],r,e,t)):o[a];return r&&r.length?UT(r,e,t):[]}var MT=$p&&1/kx(new $p([,-0]))[1]==$D?function(o){return new $p(o)}:WT;function yl(o,e){var t=o.__data__;return _T(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Zp(o,e){var t=lT(o,e);return RT(t)?t:void 0}function _T(o){var e=typeof o;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?o!=="__proto__":o===null}function LT(o){return!!dx&&dx in o}function FT(o){if(o!=null){try{return wx.call(o)}catch{}try{return o+""}catch{}}return""}var PT=NT(function(o){return OT(aT(o,YT))});function HT(o,e){return o===e||o!==o&&e!==e}function GT(o){return o!=null&&VT(o.length)&&!vx(o)}function YT(o){return $T(o)&>(o)}function vx(o){var e=xx(o)?pT.call(o):"";return e==JD||e==KD}function VT(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=WD}function xx(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function $T(o){return!!o&&typeof o=="object"}function WT(){}zx.exports=PT});var Al=y(wa=>{"use strict";var th=wa&&wa.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(wa,"__esModule",{value:!0});wa.toJsonSchema=oR;wa.convertRequiredToArray=ec;wa.generateDefaultFromSchema=oc;wa.parseJsonSafe=kl;wa.normalizeToolSchemas=tR;var Xp=th(Nv()),eh=th(ux()),JT=th(qx());function us(o,e){if(o===e)return!0;if(o===null||e===null||typeof o!="object"||typeof e!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t=Object.keys(o),a=Object.keys(e);if(t.length!==a.length)return!1;let i=e;return t.every(r=>r in i&&us(o[r],i[r]))}var KT={required:!1,requiredDepth:Number.POSITIVE_INFINITY,postProcessFnc:null,strings:{preProcessFnc:null},arrays:{mode:"all"},objects:{preProcessFnc:null,postProcessFnc:null,additionalProperties:!0}},ZT={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)}},ds={typeNames:["integer","number","string","array","object","boolean","null","date"],getType(o){return ds.typeNames.find(e=>ZT[e](o))},mergeSchemaObjs(o,e){if(!o||!e)return null;let t=(0,Xp.default)(o),a=(0,Xp.default)(e);if(!us(t,a)){if(o.type==="array"&&e.type==="array"&&us((0,JT.default)(t,a),["items"])){let r=t.length>a.length?e:o,s=t.length>a.length?o:e;if((0,Xp.default)(r).reduce((c,m)=>us(r[m],s[m])&&c,!0))return r}if(o.type!=="object"||e.type!=="object")return null}let i={};for(let r=0,{length:s}=t;r<s;r++){let n=t[r];if(ds.getType(o[n])==="object"){let c=ds.mergeSchemaObjs(o[n],e[n]);if(c)i[n]=c;else{if(o.type==="object"||e.type==="object")return{type:"object"};if(n!=="items"||o.type!=="array"||e.type!=="array")return null}}else if(n==="type")if(o[n]!==e[n])if(o[n]==="integer"&&e[n]==="number"||o[n]==="number"&&e[n]==="integer")i[n]="number";else return null;else i[n]=o[n];else{if(!us(o[n],e[n]))return null;i[n]=o[n]}}return i}};function XT(o){let e;for(let t=0,{length:a}=o;t<a;t++){let i=o[t];if(t>0&&(i==="integer"&&e==="number"?i="number":i==="number"&&e==="integer"&&(e="number"),e!==i))return null;e=i}return e}function eR(o){return XT(o.map(e=>ds.getType(e)))}var oh=class{constructor(e){this.options=(0,eh.default)({},KT,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 t=e.map(a=>{this.depth++;let i=this.getSchema(a);return this.depth--,i});return t.reduce((a,i)=>ds.mergeSchemaObjs(a,i),t.pop())}getObjectSchemaDefault(e){let t={type:"object"},a=Object.keys(e);return a.length>0&&(t.properties=a.reduce((i,r)=>(this.depth++,i[r]=this.getSchema(e[r]),this.depth--,i),{})),t}getObjectSchema(e){return this.options.objects.preProcessFnc?this.options.objects.preProcessFnc(e,this.getObjectSchemaDefault):this.getObjectSchemaDefault(e)}getArraySchemaMerging(e){let t={type:"array"},a=eR(e);if(a)if(t.items={type:a},a!=="integer"&&a!=="number"){let i=this.getCommonArrayItemSchema(e);i&&(t.items=i)}else this.options.required&&(t.items.required=!0);return t}getArraySchemaNoMerging(e){let t={type:"array"};return e.length>0&&(this.depth++,t.items=this.getSchema(e[0]),this.depth--),t}getArraySchemaTuple(e){let t={type:"array"};return e.length>0&&(t.items=e.map(a=>{this.depth++;let i=this.getSchema(a);return this.depth--,i})),t}getArraySchemaUniform(e){let t=this.getArraySchemaNoMerging(e);if(e.length>1)for(let a=1;a<e.length;a++){this.depth++;let i=this.getSchema(e[a]);if(this.depth--,!us(t.items,i))throw new Error("Invalid schema, incompatible array items")}return t}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,t,a){return this.options.required&&this.depth<=this.options.requiredDepth?(0,eh.default)({},t,{required:!0}):t}objectPostProcessDefault(e,t){return this.options.objects.additionalProperties===!1&&Object.getOwnPropertyNames(t).length>0?(0,eh.default)({},e,{additionalProperties:!1}):e}getSchema(e){let t=ds.getType(e);t||(t="null");let a;switch(t){case"object":a=this.getObjectSchema(e);break;case"array":a=this.getArraySchema(e);break;case"string":a=this.getStringSchema(e);break;default:a={type:t}}return this.options.postProcessFnc?a=this.options.postProcessFnc(t,a,e,this.commmonPostProcessDefault):a=this.commmonPostProcessDefault(t,a,e),t==="object"&&(this.options.objects.postProcessFnc?a=this.options.objects.postProcessFnc(a,e,this.objectPostProcessDefault):a=this.objectPostProcessDefault(a,e)),a}};function oR(o,e){return new oh(e).getSchema(o)}function ec(o){if(!o||typeof o!="object")return o;if(Array.isArray(o))return o.map(t=>ec(t));let e={...o};if(delete e.required,e.properties&&typeof e.properties=="object"){let t=[],a={};for(let[i,r]of Object.entries(e.properties)){let s=r;if(s&&typeof s=="object"&&s.required===!0){t.push(i);let{required:n,...c}=s;a[i]=ec(c)}else a[i]=ec(s)}e.properties=a,t.length>0&&(e.required=t)}return e.items&&(e.items=ec(e.items)),e}function oc(o){if(!o||typeof o!="object")return null;if(o.const!==void 0)return o.const;if(o.enum&&Array.isArray(o.enum)&&o.enum.length>0)return o.enum[0];if(o.default!==void 0)return o.default;if(o.oneOf&&Array.isArray(o.oneOf)&&o.oneOf.length>0)return oc(o.oneOf[0]);if(o.anyOf&&Array.isArray(o.anyOf)&&o.anyOf.length>0)return oc(o.anyOf[0]);switch(Array.isArray(o.type)?o.type[0]:o.type){case"string":case"number":case"integer":case"boolean":return null;case"null":return null;case"array":return o.items?[]:[];case"object":let t={};if(o.properties&&typeof o.properties=="object"){let a=o.required||[];for(let[i,r]of Object.entries(o.properties))t[i]=oc(r)}return t;default:if(o.properties&&typeof o.properties=="object"){let a={};for(let[i,r]of Object.entries(o.properties))a[i]=oc(r);return a}return null}}function kl(o){if(typeof o!="string")return o;try{return JSON.parse(o)}catch{return o}}function tR(o){let e={...o};return e.inputSchema&&(e.inputSchema=kl(e.inputSchema)),e.outputSchema&&(e.outputSchema=kl(e.outputSchema)),e.responseSchema&&(e.responseSchema=kl(e.responseSchema)),e}});var rt=y(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.PLAYBOOK_LIMITS=E.DEFAULT_PROJECT_ID=E.PROJECT_LIMITS=E.PROJECT_RESOURCE_TYPES=E.MCP_SERVER_AUTH_MODES=E.OAUTH_POPUP_CLOSED_MESSAGE=E.OAUTH_CONTINUATION_REASON_MAX_CHARS=E.AGENT_REQUEST_BUSY_STATUSES=E.AGENT_SESSION_RESOURCE_KINDS=E.AGENT_MESSAGE_SCHEMA_VERSION=E.AGENT_APPROVAL_MODES=E.ConfirmationAction=E.SKILL_GATED_TOOLS=E.LOADABLE_MARKDOWN_NAMES=E.SKILL_REFERENCE_NAMES=E.SKILL_BODY_NAMES=E.AGENT_CHECKLIST_MAX_LABEL_CHARS=E.AGENT_CHECKLIST_MAX_ITEMS=E.AGENT_CHECKLIST_MIN_ITEMS=E.DYNAMIC_AGENT_TOOLS=E.AGENT_TOOLS=E.AGENT_BASE_TOOLS=E.AGENT_GLOBAL_TOOLS=E.ARTIFACT_PROPOSAL_ID_PREFIX=E.ARTIFACT_PLAYGROUND_DRAFT_ID=E.PLAYBOOK_PLAYGROUND_DRAFT_ID=E.PLAYGROUND_TOOL_DRAFT_ID=E.AgentType=E.FileStatus=E.MAX_BULK_RESOURCE_SHARE_OPERATIONS=E.MAX_BULK_MUTATION_IDS=E.RunExecutionKind=E.RequestSource=E.RunStatus=E.CredentialMode=E.UpsertMode=E.LogLevel=E.PaginationType=E.DecompressionMethod=E.AuthType=E.FileType=E.CacheMode=E.HttpMethod=E.SupportedFileType=void 0;E.isRequestConfig=aR;E.isTransformConfig=iR;E.getDefaultProjectDisplayName=rR;E.projectResourceKey=gs;E.parseProjectResourceKey=sR;E.normalizeProjectResourceRefs=nR;E.uniqueProjectResourceRefs=cR;E.mergeProjectResourceRefs=mR;var Ex;(function(o){o.JSON="JSON",o.CSV="CSV",o.XML="XML",o.HTML="HTML",o.YAML="YAML",o.EXCEL="EXCEL",o.PDF="PDF",o.DOCX="DOCX",o.PPTX="PPTX",o.ZIP="ZIP",o.GZIP="GZIP",o.BINARY="BINARY",o.RAW="RAW",o.AUTO="AUTO"})(Ex||(E.SupportedFileType=Ex={}));var Ix;(function(o){o.GET="GET",o.POST="POST",o.PUT="PUT",o.DELETE="DELETE",o.PATCH="PATCH",o.HEAD="HEAD",o.OPTIONS="OPTIONS"})(Ix||(E.HttpMethod=Ix={}));var Cx;(function(o){o.ENABLED="ENABLED",o.READONLY="READONLY",o.WRITEONLY="WRITEONLY",o.DISABLED="DISABLED"})(Cx||(E.CacheMode=Cx={}));var jx;(function(o){o.CSV="CSV",o.JSON="JSON",o.XML="XML",o.YAML="YAML",o.EXCEL="EXCEL",o.HTML="HTML",o.PDF="PDF",o.DOCX="DOCX",o.PPTX="PPTX",o.ZIP="ZIP",o.BINARY="BINARY",o.RAW="RAW",o.AUTO="AUTO"})(jx||(E.FileType=jx={}));var Bx;(function(o){o.NONE="NONE",o.OAUTH2="OAUTH2",o.HEADER="HEADER",o.QUERY_PARAM="QUERY_PARAM"})(Bx||(E.AuthType=Bx={}));var Qx;(function(o){o.GZIP="GZIP",o.DEFLATE="DEFLATE",o.NONE="NONE",o.AUTO="AUTO",o.ZIP="ZIP"})(Qx||(E.DecompressionMethod=Qx={}));var Sx;(function(o){o.OFFSET_BASED="OFFSET_BASED",o.PAGE_BASED="PAGE_BASED",o.CURSOR_BASED="CURSOR_BASED",o.DISABLED="DISABLED"})(Sx||(E.PaginationType=Sx={}));var Dx;(function(o){o.DEBUG="DEBUG",o.INFO="INFO",o.WARN="WARN",o.ERROR="ERROR"})(Dx||(E.LogLevel=Dx={}));var Tx;(function(o){o.CREATE="CREATE",o.UPDATE="UPDATE",o.UPSERT="UPSERT"})(Tx||(E.UpsertMode=Tx={}));var Rx;(function(o){o.MERGE="MERGE",o.REPLACE="REPLACE"})(Rx||(E.CredentialMode=Rx={}));var Nx;(function(o){o.RUNNING="RUNNING",o.SUCCESS="SUCCESS",o.FAILED="FAILED",o.ABORTED="ABORTED"})(Nx||(E.RunStatus=Nx={}));var Ux;(function(o){o.API="api",o.FRONTEND="frontend",o.AGENT="agent",o.SCHEDULER="scheduler",o.MCP="mcp",o.TOOL_CHAIN="tool-chain",o.WEBHOOK="webhook",o.CLI="cli"})(Ux||(E.RequestSource=Ux={}));var Ox;(function(o){o.FULL="full",o.DRAFT="draft",o.SINGLE_STEP="single-step"})(Ox||(E.RunExecutionKind=Ox={}));E.MAX_BULK_MUTATION_IDS=100;E.MAX_BULK_RESOURCE_SHARE_OPERATIONS=1e3;function aR(o){return!o||typeof o!="object"?!1:o.type==="request"||!("type"in o)||o.type===void 0}function iR(o){return o?.type==="transform"}var Mx;(function(o){o.PENDING="PENDING",o.UPLOADING="UPLOADING",o.PROCESSING="PROCESSING",o.COMPLETED="COMPLETED",o.FAILED="FAILED"})(Mx||(E.FileStatus=Mx={}));var va;(function(o){o.MAIN="main",o.BACKGROUND_ARTIFACT="background_artifact",o.PLAYGROUND="playground",o.SYSTEM_PLAYGROUND="system_playground",o.PLAYBOOK_PLAYGROUND="playbook_playground",o.ARTIFACT_PLAYGROUND="artifact_playground",o.ACCESS_RULES="access_rules"})(va||(E.AgentType=va={}));E.PLAYGROUND_TOOL_DRAFT_ID="@playground-draft";E.PLAYBOOK_PLAYGROUND_DRAFT_ID="@playground-draft";E.ARTIFACT_PLAYGROUND_DRAFT_ID="@playground-draft";E.ARTIFACT_PROPOSAL_ID_PREFIX="artifact_proposal_";E.AGENT_GLOBAL_TOOLS=["run_command","load_skill"];E.AGENT_BASE_TOOLS=[...E.AGENT_GLOBAL_TOOLS,"call_system","run_tool","share_resource","use_checklist"];E.AGENT_TOOLS={[va.MAIN]:[...E.AGENT_BASE_TOOLS],[va.BACKGROUND_ARTIFACT]:["run_command","create_artifact"],[va.PLAYGROUND]:[...E.AGENT_BASE_TOOLS,"edit_tool"],[va.SYSTEM_PLAYGROUND]:[...E.AGENT_GLOBAL_TOOLS,"call_system","create_system","edit_system","set_credentials","authenticate_oauth","share_resource","use_checklist"],[va.PLAYBOOK_PLAYGROUND]:[...E.AGENT_GLOBAL_TOOLS,"call_system","run_tool","create_playbook","edit_playbook","save_playbook","share_resource","use_checklist"],[va.ARTIFACT_PLAYGROUND]:[...E.AGENT_BASE_TOOLS],[va.ACCESS_RULES]:[...E.AGENT_GLOBAL_TOOLS,"create_role","edit_role","use_checklist"]};E.DYNAMIC_AGENT_TOOLS=["web_search"];E.AGENT_CHECKLIST_MIN_ITEMS=4;E.AGENT_CHECKLIST_MAX_ITEMS=15;E.AGENT_CHECKLIST_MAX_LABEL_CHARS=120;E.SKILL_BODY_NAMES=["superglue-info","tool-building","tool-editing","system-setup","access-management","tool-deployment","notifications","artifacts","playbooks","projects","file-handling","superglue-brain","email","workspace-apps","meetings"];E.SKILL_REFERENCE_NAMES=["http","graphql","postgres","mssql","odbc","redis","mongodb","sftp-smb","file-runtime","tunnel-handling"];E.LOADABLE_MARKDOWN_NAMES=[...E.SKILL_BODY_NAMES,...E.SKILL_REFERENCE_NAMES];E.SKILL_GATED_TOOLS={"tool-building":["build_tool","set_tool_state"],"tool-editing":["edit_tool","save_tool","set_tool_state"],"system-setup":["create_system","edit_system","set_credentials","authenticate_oauth"],"tool-deployment":["create_schedule","edit_schedule","create_mcp_server","edit_mcp_server","show_mcp_server"],"access-management":["create_role","edit_role","share_resource"],playbooks:["create_playbook","edit_playbook"],projects:["create_project","edit_project"],artifacts:["create_artifact","start_background_agent","edit_artifact"]};var _x;(function(o){o.CONFIRMED="confirmed",o.CONFIRMED_AND_SAVE="confirmed_and_save",o.DECLINED="declined",o.OAUTH_SUCCESS="oauth_success",o.OAUTH_FAILURE="oauth_failure"})(_x||(E.ConfirmationAction=_x={}));E.AGENT_APPROVAL_MODES=["ask","act"];E.AGENT_MESSAGE_SCHEMA_VERSION=1;E.AGENT_SESSION_RESOURCE_KINDS=["tool","system","playbook","artifact"];E.AGENT_REQUEST_BUSY_STATUSES=["queued","claimed","running","cancelling"];E.OAUTH_CONTINUATION_REASON_MAX_CHARS=500;E.OAUTH_POPUP_CLOSED_MESSAGE="OAuth authentication did not complete.";E.MCP_SERVER_AUTH_MODES=["oauth","creator_api_key"];E.PROJECT_RESOURCE_TYPES=["system","playbook","artifact","file","tool"];E.PROJECT_LIMITS={name:80,description:500};E.DEFAULT_PROJECT_ID="default";function rR(o){return o.trim()||"Your workspace"}function gs(o){return`${o.type}:${o.id}`}function sR(o){let e=o.indexOf(":");return{type:o.slice(0,e),id:o.slice(e+1)}}function nR({value:o,field:e="resourceRefs"}){if(o===void 0)return{refs:[]};if(!Array.isArray(o))return{error:`${e} must be an array`};let t=[],a=new Set;for(let[i,r]of o.entries()){if(!r||typeof r!="object"||Array.isArray(r))return{error:`${e}[${i}] must be shaped as { type, id }`};let s=r,n=typeof s.type=="string"?s.type.trim():"",c=typeof s.id=="string"?s.id.trim():"";if(!E.PROJECT_RESOURCE_TYPES.includes(n))return{error:`${e}[${i}].type is unsupported`};if(!c||c.length>255)return{error:`${e}[${i}].id must contain between 1 and 255 characters`};let m={type:n,id:c},l=gs(m);a.has(l)||t.push(m),a.add(l)}return{refs:t}}function cR(o){return[...new Map(o.map(e=>[gs(e),e])).values()]}function mR({current:o,add:e,remove:t}){let a=new Map(o.map(i=>[gs(i),i]));for(let i of t)a.delete(gs(i));for(let i of e)a.set(gs(i),i);return[...a.values()]}E.PLAYBOOK_LIMITS={name:120,whenToRun:500,inputs:2e3,instructions:8e3,completionCriteria:2e3,systemRefs:10,toolRefs:25,credentialRefs:10,fileRefs:15,compiledRender:24e3}});var lR,Fx,Lx,uR,dR,gR,pR,Px=he(()=>{"use strict";lR=o=>{let e=Lx(o,0);if(e===void 0||!dR(o[e]))return;let t=Lx(o,e+1);if(t!==void 0)return gR(o,e,t)},Fx=lR,Lx=(o,e)=>{for(let t=e;t<o.length;t+=1){let a=o[t];if(!uR(a))return t}},uR=o=>o===" "||o===" "||o===`
|
|
3
3
|
`||o==="\r",dR=o=>o==="{"||o==="[",gR=(o,e,t)=>{let a;for(let i=t-1;i>e;i-=1){let r=o[i];if(r==="\r")return;if(r===`
|
|
4
4
|
`)return pR(a);if(a===void 0)a=r;else if(a[0]===r)a+=r;else return}},pR=o=>o===void 0?0:o[0]===" "?o.length:o});var Hx,ah,hR,fR,Gx=he(()=>{"use strict";Hx=(o,e)=>{let t=ah(o,"toPrecision",e,e);return t===void 0?ah(o,"toExponential",e,e):t},ah=(o,e,t,a)=>{let r=o[e](a).replace(hR,"$1").replace(fR,"$1");return r.length<=t?r:a===1?void 0:ah(o,e,t,a-1)},hR=/(e)\+/iu,fR=/\.?0*($|e)/iu});var Vx,bR,yR,Yx,$x=he(()=>{"use strict";Vx=(o,e)=>{if(typeof o!="string")throw new TypeError(`Input must be a JSON string: ${o}`);bR(e)},bR=o=>{if(yR(o),o<0)throw new TypeError(`"maxSize" argument must be positive: ${o}`);if(o<Yx)throw new TypeError(`"maxSize" argument must be at least ${Yx}: ${o}`)},yR=o=>{if(o===void 0)throw new TypeError('"maxSize" argument must be defined');if(!Number.isInteger(o))throw new TypeError(`"maxSize" argument must be an integer: ${o}`)},Yx=7});var wl,Wx,vl,kR,AR,wR,vR,Jx,xR,zR,qR,ER,IR,CR,ih=he(()=>{"use strict";wl=(o,e,t)=>{let a=Jx(e,t);return Wx(o,e,a)},Wx=(o,e,t)=>{if(t>=e)return t;let a=o[t];return a>=IR&&a<=CR?Wx(o,e,t+1):t},vl=(o,e,t)=>{if(t===void 0)return t;let a=Jx(e,t);return kR(o,a)},kR=(o,e)=>AR(o,e)?e-3:wR(o,e)?e-2:vR(o,e)?e-1:e,AR=(o,e)=>e>=3&&o[e-3]>=xR&&o[e-3]<=zR,wR=(o,e)=>e>=2&&o[e-2]>=qR,vR=(o,e)=>e>=1&&o[e-1]>=ER,Jx=(o,e)=>e<0||Object.is(e,-0)?Math.max(o+e,0):e,xR=240,zR=244,qR=224,ER=194,IR=128,CR=191});var Kx,Zx=he(()=>{"use strict";ih();Kx=(o,e,t)=>{let a=globalThis.Buffer.from(o),i=wl(a,a.length,e),r=vl(a,a.length,t);return i===0&&r>=a.length?a.toString():a.toString("utf8",i,r)}});var Xx,ez=he(()=>{"use strict";Xx=/[\uD800-\uDFFF]/gu});var xl,BR,nh=he(()=>{"use strict";ez();xl=o=>BR(o)?o.replace(Xx,"\uFFFD"):o,BR=o=>{for(let e=0;e<o.length;e+=1){let t=o.codePointAt(e);if(t>=55296&&t<=57343)return!0}return!1}});var ch,oz=he(()=>{"use strict";ch=({input:o,targetByteCount:e,firstStartSurrogate:t,lastStartSurrogate:a,firstEndSurrogate:i,lastEndSurrogate:r,increment:s,canBacktrack:n,shift:c,charIndexInit:m})=>{let l=m,u=l,d=0;for(;d<e;l+=s){u=l;let p=o.charCodeAt(l);if(Number.isNaN(p))break;if(p<=127){d+=1;continue}if(p<=2047){d+=2;continue}if(d+=3,p<t||p>a)continue;let b=o.charCodeAt(l+s);Number.isNaN(b)||b<i||b>r||(d+=1,l+=s)}return(n&&d>e?u:l)+c}});var mh,RR,NR,tz=he(()=>{"use strict";oz();mh=(o,e,t)=>e<0||Object.is(e,-0)?NR(o,e,t):RR(o,e,t),RR=(o,e,t)=>ch({input:o,targetByteCount:e,firstStartSurrogate:55296,lastStartSurrogate:56319,firstEndSurrogate:56320,lastEndSurrogate:57343,increment:1,canBacktrack:t,shift:0,charIndexInit:0}),NR=(o,e,t)=>ch({input:o,targetByteCount:-e,firstStartSurrogate:56320,lastStartSurrogate:57343,firstEndSurrogate:55296,lastEndSurrogate:56319,increment:-1,canBacktrack:!t,shift:1,charIndexInit:o.length-1})});var zl,UR,az=he(()=>{"use strict";nh();tz();zl=(o,e,t)=>{let a=mh(o,e,!1),i=UR(o,t),r=a===0&&i===void 0?o:o.slice(a,i);return xl(r)},UR=(o,e)=>{if(e===void 0)return e;let t=mh(o,e,!0);return t===o.length?void 0:t}});var rz,OR,lh,iz,MR,_R,ql,sz=he(()=>{"use strict";ih();rz=(o,e,t)=>{let{textEncoder:a,textDecoder:i}=OR(),r=MR(o),{written:s}=a.encodeInto(o,r),n=wl(r,s,e),c=vl(r,s,t),m=c===void 0?s:Math.min(c,s),l=r.subarray(n,m);return i.decode(l)},OR=()=>(lh===void 0&&(lh=new globalThis.TextEncoder,iz=new globalThis.TextDecoder("utf8",{fatal:!1})),{textEncoder:lh,textDecoder:iz}),MR=o=>{let e=o.length*3;return e>_R?new Uint8Array(e):((ql===void 0||ql.length<e)&&(ql=new Uint8Array(e)),ql)},_R=1e5});var nz,uh,cz,mz=he(()=>{"use strict";nz=(o,e)=>{if(e===void 0)return e;let t=uh(o,e);return t>=o.length*cz?void 0:t},uh=(o,e)=>e<=o.length*-cz?0:e,cz=4});var lz,LR,FR,uz,dz=he(()=>{"use strict";lz=(o,e,t)=>{if(typeof o!="string")throw new TypeError(`First argument must be a string: ${o}`);LR(e),FR(t)},LR=o=>{if(o===void 0)throw new TypeError("Second argument is required.");uz("Second",o)},FR=o=>{o!==void 0&&uz("Third",o)},uz=(o,e)=>{if(!Number.isInteger(e))throw new TypeError(`${o} argument must be an integer: ${e}`)}});var gz,PR,dh,pz=he(()=>{"use strict";gz=o=>{let e=!0,t=0;for(let a=0;a<dh;a+=1){let i=PR(o,a);i<=127||(e&&(e=!1),i>2047&&(t+=1))}return{asciiOnly:e,longCharsPercentage:t/dh}},PR=(o,e)=>{let t=dh-1,a=1-(t-e)/t,i=Math.round(a*(o.length-1));return o.charCodeAt(i)},dh=50});var HR,hz,GR,YR,VR,$R,fz,bz=he(()=>{"use strict";Zx();az();sz();mz();nh();dz();pz();HR=(o,e,t)=>{if(lz(o,e,t),o==="")return o;let a=uh(o,e),i=nz(o,t);return i===void 0&&Object.is(a,0)?xl(o):GR(o,a,i)},hz=HR,GR=(o,e,t)=>{if(o.length<=YR)return zl(o,e,t);let{asciiOnly:a,longCharsPercentage:i}=gz(o);return a?$R(o,e,t):i>=VR?zl(o,e,t):fz(o,e,t)},YR=200,VR=.4,$R=(o,e,t)=>"Buffer"in globalThis&&"from"in globalThis.Buffer?Kx(o,e,t):fz(o,e,t),fz=(o,e,t)=>"TextEncoder"in globalThis?rz(o,e,t):zl(o,e,t)});var kz,WR,JR,KR,ZR,tc,yz,Az=he(()=>{"use strict";bz();kz=(o,e)=>{let t=JSON.stringify(o),a=KR(t),i=hz(a,0,e-yz.length-tc.length*2),s=`${WR(i)}${yz}`;return ZR(s)},WR=o=>o.replace(JR,""),JR=/(\\|\\u[0-9a-fA-F]{0,3})$/u,KR=o=>o.slice(tc.length,-tc.length),ZR=o=>`${tc}${o}${tc}`,tc='"',yz="..."});var wz,vz=he(()=>{"use strict";wz=o=>globalThis.Buffer.byteLength(o)});var gh,XR,eN,oN,tN,aN,iN,xz=he(()=>{"use strict";gh=o=>{let e=o.length,t=e;for(let a=0;a<e;a+=1){let i=o.charCodeAt(a);if(i<=XR)continue;if(i<=eN){t+=1;continue}if(t+=2,i<oN||i>tN)continue;let r=o.charCodeAt(a+1);r<aN||r>iN||(a+=1)}return t},XR=127,eN=2047,oN=55296,tN=56319,aN=56320,iN=57343});var zz,rN,sN,nN,El,qz=he(()=>{"use strict";zz=()=>rN.bind(void 0,new TextEncoder),rN=(o,e)=>{let t=sN(e);return o.encodeInto(e,t).written},sN=o=>{let e=o.length*3;return e>nN?new Uint8Array(e):((El===void 0||El.length<e)&&(El=new Uint8Array(e)),El)},nN=1e5});var mN,lN,Ez,Iz=he(()=>{"use strict";vz();xz();qz();mN=()=>"Buffer"in globalThis&&"byteLength"in globalThis.Buffer?wz:"TextEncoder"in globalThis?lN.bind(void 0,zz()):gh,lN=(o,e)=>e.length<100?gh(e):o(e),Ez=mN()});var Cz,uN,dN,gN,pN,ph,jz=he(()=>{"use strict";Iz();Cz=o=>{if(o===null)return uN;if(o===!0)return dN;if(o===!1)return gN;let e=typeof o;return e==="object"?pN:e==="number"?JSON.stringify(o).length:ph(o)},uN=4,dN=4,gN=5,pN=2,ph=o=>Ez(JSON.stringify(o))});var Il,Qz,Sz,Dz,hN,Tz,Bz,Rz,fN,ac=he(()=>{"use strict";jz();Il=({size:o,increment:e,maxSize:t,truncatedProps:a,path:i,value:r})=>{let s=o+e,n=s>t;return n?{size:o,stop:n,truncatedProps:[...a,{path:i,value:r}]}:{size:s,stop:n,truncatedProps:a}},Qz=o=>Cz(o),Sz=(o,e,t)=>{let a=Tz({empty:o,indent:e,depth:t,keySpaceSize:0}),i=Rz(o);return a+i},Dz=({key:o,empty:e,indent:t,depth:a})=>{let i=Tz({empty:e,indent:t,depth:a,keySpaceSize:1}),r=ph(o),s=Rz(e);return i+r+hN+s},hN=1,Tz=({empty:o,indent:e,depth:t,keySpaceSize:a})=>{if(e===void 0)return 0;let i=Bz+e*(t+1),r=o?Bz+e*t:0;return a+i+r},Bz=1,Rz=o=>o?0:fN,fN=1});var Cl,bN,hh=he(()=>{"use strict";ac();Cl=({parent:o,truncatedProps:e,path:t,increment:a,maxSize:i,key:r,empty:s,size:n,truncateValue:c,indent:m,depth:l})=>{let u=o[r],d=[...t,r],{size:g,stop:p,truncatedProps:b}=Il({size:n,increment:a,maxSize:i,truncatedProps:e,path:d,value:u});return p?{empty:s,size:g,truncatedProps:b}:bN({value:u,truncatedProps:e,path:d,maxSize:i,empty:s,size:n,newSize:g,truncateValue:c,indent:m,depth:l})},bN=({value:o,truncatedProps:e,path:t,maxSize:a,empty:i,size:r,newSize:s,truncateValue:n,indent:c,depth:m})=>{let{value:l,size:u,truncatedProps:d}=n({value:o,truncatedProps:e,path:t,size:s,maxSize:a,indent:c,depth:m+1});return l===void 0?{empty:i,size:r,truncatedProps:d}:{empty:!1,size:u,value:l,truncatedProps:d}}});var Nz,Uz=he(()=>{"use strict";hh();ac();Nz=({array:o,truncatedProps:e,path:t,size:a,maxSize:i,truncateValue:r,indent:s,depth:n})=>{let c=[],m={empty:!0,size:a,truncatedProps:e};for(let l=0;l<o.length;l+=1){let u=Sz(m.empty,s,n);m=Cl({parent:o,truncatedProps:m.truncatedProps,path:t,increment:u,maxSize:i,key:l,empty:m.empty,size:m.size,truncateValue:r,indent:s,depth:n}),m.value!==void 0&&c.push(m.value)}return{value:c,size:m.size,truncatedProps:m.truncatedProps}}});var Oz,Mz=he(()=>{"use strict";hh();ac();Oz=({object:o,truncatedProps:e,path:t,size:a,maxSize:i,truncateValue:r,indent:s,depth:n})=>{let c={},m={empty:!0,size:a,truncatedProps:e};for(let l in o){let u=Dz({key:l,empty:m.empty,indent:s,depth:n});m=Cl({parent:o,truncatedProps:m.truncatedProps,path:t,increment:u,maxSize:i,key:l,empty:m.empty,size:m.size,truncateValue:r,indent:s,depth:n}),m.value!==void 0&&(c[l]=m.value)}return{value:c,size:m.size,truncatedProps:m.truncatedProps}}});var jl,yN,_z=he(()=>{"use strict";Uz();Mz();ac();jl=({value:o,truncatedProps:e,path:t,size:a,maxSize:i,indent:r,depth:s})=>{let n=Qz(o),{size:c,stop:m,truncatedProps:l}=Il({size:a,increment:n,maxSize:i,truncatedProps:e,path:t,value:o});return m?{value:void 0,size:c,truncatedProps:l}:yN({value:o,truncatedProps:l,path:t,size:c,maxSize:i,indent:r,depth:s})},yN=({value:o,truncatedProps:e,path:t,size:a,maxSize:i,indent:r,depth:s})=>typeof o!="object"||o===null?{value:o,size:a,truncatedProps:e}:Array.isArray(o)?Nz({array:o,truncatedProps:e,path:t,size:a,maxSize:i,truncateValue:jl,indent:r,depth:s}):Oz({object:o,truncatedProps:e,path:t,size:a,maxSize:i,truncateValue:jl,indent:r,depth:s})});var Lz={};Bv(Lz,{default:()=>AN});var kN,AN,wN,vN,xN,Fz=he(()=>{"use strict";Px();Gx();$x();Az();_z();kN=(o,e)=>{Vx(o,e);let t=wN(o),a=vN(o),{value:i,truncatedProps:r}=jl({value:a,truncatedProps:[],path:[],size:0,maxSize:e,indent:t,depth:0});return{jsonString:xN({newValue:i,value:a,maxSize:e,indent:t}),truncatedProps:r}},AN=kN,wN=o=>{let e=Fx(o);return typeof e=="string"?e.length:e},vN=o=>{try{return JSON.parse(o)}catch(e){throw new TypeError(`Invalid JSON string: "${o}"
|
|
5
5
|
${e.message}`)}},xN=({newValue:o,value:e,maxSize:t,indent:a})=>o!==void 0?JSON.stringify(o,void 0,a):typeof e=="number"?Hx(e,t):kz(e,t)});var Hz=y(Pz=>{"use strict";Object.defineProperty(Pz,"__esModule",{value:!0})});var ti=y(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.CronField=void 0;var fh=class o{#e=!1;#o=!1;#a=!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,t={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={...t,rawValue:t.rawValue??""},this.#i=e.sort(o.sorter),this.#a=this.options.wildcard!==void 0?this.options.wildcard:this.#r(),this.#e=this.options.rawValue.includes("L")||e.includes("L"),this.#o=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.#o}get isWildcard(){return this.#a}get values(){return this.#i}static sorter(e,t){let a=typeof e=="number",i=typeof t=="number";return a&&i?e-t:!a&&!i?e.localeCompare(t):a?-1:1}static findNearestValueInList(e,t,a=!1){if(a){for(let i=e.length-1;i>=0;i--)if(e[i]<t)return e[i];return null}for(let i=0;i<e.length;i++)if(e[i]>t)return e[i];return null}findNearestValue(e,t=!1){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:this.#a,values:this.#i}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join("")}`:"",a=n=>c=>new RegExp(`^\\d{0,2}${c}$`).test(n),i=n=>(e=n,typeof n=="number"?n>=this.min&&n<=this.max:this.chars.some(a(n)));if(!this.#i.every(i))throw new Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let s=this.#i.find((n,c)=>this.#i.indexOf(n)!==c);if(s)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${s}`)}#r(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>this.#i.includes(e))}};Bl.CronField=fh});var Gz=y(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.CronDayOfMonth=void 0;var zN=ti(),qN=1,EN=31,IN=Object.freeze(["L"]),bh=class extends zN.CronField{static get min(){return qN}static get max(){return EN}static get chars(){return IN}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};Ql.CronDayOfMonth=bh});var Yz=y(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.CronDayOfWeek=void 0;var CN=ti(),jN=0,BN=7,QN=Object.freeze(["L"]),yh=class extends CN.CronField{static get min(){return jN}static get max(){return BN}static get chars(){return QN}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};Sl.CronDayOfWeek=yh});var Vz=y(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.CronHour=void 0;var SN=ti(),DN=0,TN=23,RN=Object.freeze([]),kh=class extends SN.CronField{static get min(){return DN}static get max(){return TN}static get chars(){return RN}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};Dl.CronHour=kh});var $z=y(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.CronMinute=void 0;var NN=ti(),UN=0,ON=59,MN=Object.freeze([]),Ah=class extends NN.CronField{static get min(){return UN}static get max(){return ON}static get chars(){return MN}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};Tl.CronMinute=Ah});var zq=y(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var za=class extends Error{},Bh=class extends za{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},Qh=class extends za{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},Sh=class extends za{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},ri=class extends za{},Fl=class extends za{constructor(e){super(`Invalid unit ${e}`)}},$e=class extends za{},Gt=class extends za{constructor(){super("Zone is an abstract class")}},B="numeric",Bt="short",Mo="long",Pl={year:B,month:B,day:B},q0={year:B,month:Bt,day:B},_N={year:B,month:Bt,day:B,weekday:Bt},E0={year:B,month:Mo,day:B},I0={year:B,month:Mo,day:B,weekday:Mo},C0={hour:B,minute:B},j0={hour:B,minute:B,second:B},B0={hour:B,minute:B,second:B,timeZoneName:Bt},Q0={hour:B,minute:B,second:B,timeZoneName:Mo},S0={hour:B,minute:B,hourCycle:"h23"},D0={hour:B,minute:B,second:B,hourCycle:"h23"},T0={hour:B,minute:B,second:B,hourCycle:"h23",timeZoneName:Bt},R0={hour:B,minute:B,second:B,hourCycle:"h23",timeZoneName:Mo},N0={year:B,month:B,day:B,hour:B,minute:B},U0={year:B,month:B,day:B,hour:B,minute:B,second:B},O0={year:B,month:Bt,day:B,hour:B,minute:B},M0={year:B,month:Bt,day:B,hour:B,minute:B,second:B},LN={year:B,month:Bt,day:B,weekday:Bt,hour:B,minute:B},_0={year:B,month:Mo,day:B,hour:B,minute:B,timeZoneName:Bt},L0={year:B,month:Mo,day:B,hour:B,minute:B,second:B,timeZoneName:Bt},F0={year:B,month:Mo,day:B,weekday:Mo,hour:B,minute:B,timeZoneName:Mo},P0={year:B,month:Mo,day:B,weekday:Mo,hour:B,minute:B,second:B,timeZoneName:Mo},ni=class{get type(){throw new Gt}get name(){throw new Gt}get ianaName(){return this.name}get isUniversal(){throw new Gt}offsetName(e,t){throw new Gt}formatOffset(e,t){throw new Gt}offset(e){throw new Gt}equals(e){throw new Gt}get isValid(){throw new Gt}},wh=null,mc=class o extends ni{static get instance(){return wh===null&&(wh=new o),wh}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:a}){return eq(e,t,a)}formatOffset(e,t){return cc(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},Dh=new Map;function FN(o){let e=Dh.get(o);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:o,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Dh.set(o,e)),e}var PN={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function HN(o,e){let t=o.format(e).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,r,s,n,c,m,l]=a;return[s,i,r,n,c,m,l]}function GN(o,e){let t=o.formatToParts(e),a=[];for(let i=0;i<t.length;i++){let{type:r,value:s}=t[i],n=PN[r];r==="era"?a[n]=s:V(n)||(a[n]=parseInt(s,10))}return a}var vh=new Map,qa=class o extends ni{static create(e){let t=vh.get(e);return t===void 0&&vh.set(e,t=new o(e)),t}static resetCache(){vh.clear(),Dh.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=o.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:a}){return eq(e,t,a,this.name)}formatOffset(e,t){return cc(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let a=FN(this.name),[i,r,s,n,c,m,l]=a.formatToParts?GN(a,t):HN(a,t);n==="BC"&&(i=-Math.abs(i)+1);let d=Jl({year:i,month:r,day:s,hour:c===24?0:c,minute:m,second:l,millisecond:0}),g=+t,p=g%1e3;return g-=p>=0?p:1e3+p,(d-g)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},Wz={};function YN(o,e={}){let t=JSON.stringify([o,e]),a=Wz[t];return a||(a=new Intl.ListFormat(o,e),Wz[t]=a),a}var Th=new Map;function Rh(o,e={}){let t=JSON.stringify([o,e]),a=Th.get(t);return a===void 0&&(a=new Intl.DateTimeFormat(o,e),Th.set(t,a)),a}var Nh=new Map;function VN(o,e={}){let t=JSON.stringify([o,e]),a=Nh.get(t);return a===void 0&&(a=new Intl.NumberFormat(o,e),Nh.set(t,a)),a}var Uh=new Map;function $N(o,e={}){let{base:t,...a}=e,i=JSON.stringify([o,a]),r=Uh.get(i);return r===void 0&&(r=new Intl.RelativeTimeFormat(o,e),Uh.set(i,r)),r}var rc=null;function WN(){return rc||(rc=new Intl.DateTimeFormat().resolvedOptions().locale,rc)}var Oh=new Map;function H0(o){let e=Oh.get(o);return e===void 0&&(e=new Intl.DateTimeFormat(o).resolvedOptions(),Oh.set(o,e)),e}var Mh=new Map;function JN(o){let e=Mh.get(o);if(!e){let t=new Intl.Locale(o);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...G0,...e}),Mh.set(o,e)}return e}function KN(o){let e=o.indexOf("-x-");e!==-1&&(o=o.substring(0,e));let t=o.indexOf("-u-");if(t===-1)return[o];{let a,i;try{a=Rh(o).resolvedOptions(),i=o}catch{let c=o.substring(0,t);a=Rh(c).resolvedOptions(),i=c}let{numberingSystem:r,calendar:s}=a;return[i,r,s]}}function ZN(o,e,t){return(t||e)&&(o.includes("-u-")||(o+="-u"),t&&(o+=`-ca-${t}`),e&&(o+=`-nu-${e}`)),o}function XN(o){let e=[];for(let t=1;t<=12;t++){let a=ze.utc(2009,t,1);e.push(o(a))}return e}function eU(o){let e=[];for(let t=1;t<=7;t++){let a=ze.utc(2016,11,13+t);e.push(o(a))}return e}function Rl(o,e,t,a){let i=o.listingMode();return i==="error"?null:i==="en"?t(e):a(e)}function oU(o){return o.numberingSystem&&o.numberingSystem!=="latn"?!1:o.numberingSystem==="latn"||!o.locale||o.locale.startsWith("en")||H0(o.locale).numberingSystem==="latn"}var _h=class{constructor(e,t,a){this.padTo=a.padTo||0,this.floor=a.floor||!1;let{padTo:i,floor:r,...s}=a;if(!t||Object.keys(s).length>0){let n={useGrouping:!1,...a};a.padTo>0&&(n.minimumIntegerDigits=a.padTo),this.inf=VN(e,n)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{let t=this.floor?Math.floor(e):Kh(e,3);return Ue(t,this.padTo)}}},Lh=class{constructor(e,t,a){this.opts=a,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),n=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&qa.create(n).valid?(i=n,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 r={...this.opts};r.timeZone=r.timeZone||i,this.dtf=Rh(t,r)}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(t=>{if(t.type==="timeZoneName"){let a=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:a}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},Fh=class{constructor(e,t,a){this.opts={style:"long",...a},!t&&Z0()&&(this.rtf=$N(e,a))}format(e,t){return this.rtf?this.rtf.format(e,t):vU(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},G0={firstDay:1,minimalDays:4,weekend:[6,7]},be=class o{static fromOpts(e){return o.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,a,i,r=!1){let s=e||Ae.defaultLocale,n=s||(r?"en-US":WN()),c=t||Ae.defaultNumberingSystem,m=a||Ae.defaultOutputCalendar,l=Hh(i)||Ae.defaultWeekSettings;return new o(n,c,m,l,s)}static resetCache(){rc=null,Th.clear(),Nh.clear(),Uh.clear(),Oh.clear(),Mh.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:a,weekSettings:i}={}){return o.create(e,t,a,i)}constructor(e,t,a,i,r){let[s,n,c]=KN(e);this.locale=s,this.numberingSystem=t||n||null,this.outputCalendar=a||c||null,this.weekSettings=i,this.intl=ZN(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=oU(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:o.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Hh(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,t=!1){return Rl(this,e,aq,()=>{let a=this.intl==="ja"||this.intl.startsWith("ja-");t&=!a;let i=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";if(!this.monthsCache[r][e]){let s=a?n=>this.dtFormatter(n,i).format():n=>this.extract(n,i,"month");this.monthsCache[r][e]=XN(s)}return this.monthsCache[r][e]})}weekdays(e,t=!1){return Rl(this,e,sq,()=>{let a=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=eU(r=>this.extract(r,a,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Rl(this,void 0,()=>nq,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ze.utc(2016,11,13,9),ze.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Rl(this,e,cq,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[ze.utc(-40,1,1),ze.utc(2017,1,1)].map(a=>this.extract(a,t,"era"))),this.eraCache[e]})}extract(e,t,a){let i=this.dtFormatter(e,t),r=i.formatToParts(),s=r.find(n=>n.type.toLowerCase()===a);return s?s.value:null}numberFormatter(e={}){return new _h(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Lh(e,this.intl,t)}relFormatter(e={}){return new Fh(this.intl,this.isEnglish(),e)}listFormatter(e={}){return YN(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||H0(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:X0()?JN(this.locale):G0}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})`}},xh=null,_o=class o extends ni{static get utcInstance(){return xh===null&&(xh=new o(0)),xh}static instance(e){return e===0?o.utcInstance:new o(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new o(Kl(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${cc(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${cc(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return cc(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},Hl=class extends ni{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 ii(o,e){if(V(o)||o===null)return e;if(o instanceof ni)return o;if(nU(o)){let t=o.toLowerCase();return t==="default"?e:t==="local"||t==="system"?mc.instance:t==="utc"||t==="gmt"?_o.utcInstance:_o.parseSpecifier(t)||qa.create(o)}else return si(o)?_o.instance(o):typeof o=="object"&&"offset"in o&&typeof o.offset=="function"?o:new Hl(o)}var Vh={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"},Jz={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]},tU=Vh.hanidec.replace(/[\[|\]]/g,"").split("");function aU(o){let e=parseInt(o,10);if(isNaN(e)){e="";for(let t=0;t<o.length;t++){let a=o.charCodeAt(t);if(o[t].search(Vh.hanidec)!==-1)e+=tU.indexOf(o[t]);else for(let i in Jz){let[r,s]=Jz[i];a>=r&&a<=s&&(e+=a-r)}}return parseInt(e,10)}else return e}var Ph=new Map;function iU(){Ph.clear()}function Ct({numberingSystem:o},e=""){let t=o||"latn",a=Ph.get(t);a===void 0&&(a=new Map,Ph.set(t,a));let i=a.get(e);return i===void 0&&(i=new RegExp(`${Vh[t]}${e}`),a.set(e,i)),i}var Kz=()=>Date.now(),Zz="system",Xz=null,e0=null,o0=null,t0=60,a0,i0=null,Ae=class{static get now(){return Kz}static set now(e){Kz=e}static set defaultZone(e){Zz=e}static get defaultZone(){return ii(Zz,mc.instance)}static get defaultLocale(){return Xz}static set defaultLocale(e){Xz=e}static get defaultNumberingSystem(){return e0}static set defaultNumberingSystem(e){e0=e}static get defaultOutputCalendar(){return o0}static set defaultOutputCalendar(e){o0=e}static get defaultWeekSettings(){return i0}static set defaultWeekSettings(e){i0=Hh(e)}static get twoDigitCutoffYear(){return t0}static set twoDigitCutoffYear(e){t0=e%100}static get throwOnInvalid(){return a0}static set throwOnInvalid(e){a0=e}static resetCaches(){be.resetCache(),qa.resetCache(),ze.resetCache(),iU()}},Oo=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},Y0=[0,31,59,90,120,151,181,212,243,273,304,334],V0=[0,31,60,91,121,152,182,213,244,274,305,335];function nt(o,e){return new Oo("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${o}, which is invalid`)}function $h(o,e,t){let a=new Date(Date.UTC(o,e-1,t));o<100&&o>=0&&a.setUTCFullYear(a.getUTCFullYear()-1900);let i=a.getUTCDay();return i===0?7:i}function $0(o,e,t){return t+(uc(o)?V0:Y0)[e-1]}function W0(o,e){let t=uc(o)?V0:Y0,a=t.findIndex(r=>r<e),i=e-t[a];return{month:a+1,day:i}}function Wh(o,e){return(o-e+7)%7+1}function Gl(o,e=4,t=1){let{year:a,month:i,day:r}=o,s=$0(a,i,r),n=Wh($h(a,i,r),t),c=Math.floor((s-n+14-e)/7),m;return c<1?(m=a-1,c=lc(m,e,t)):c>lc(a,e,t)?(m=a+1,c=1):m=a,{weekYear:m,weekNumber:c,weekday:n,...Zl(o)}}function r0(o,e=4,t=1){let{weekYear:a,weekNumber:i,weekday:r}=o,s=Wh($h(a,1,e),t),n=bs(a),c=i*7+r-s-7+e,m;c<1?(m=a-1,c+=bs(m)):c>n?(m=a+1,c-=bs(a)):m=a;let{month:l,day:u}=W0(m,c);return{year:m,month:l,day:u,...Zl(o)}}function zh(o){let{year:e,month:t,day:a}=o,i=$0(e,t,a);return{year:e,ordinal:i,...Zl(o)}}function s0(o){let{year:e,ordinal:t}=o,{month:a,day:i}=W0(e,t);return{year:e,month:a,day:i,...Zl(o)}}function n0(o,e){if(!V(o.localWeekday)||!V(o.localWeekNumber)||!V(o.localWeekYear)){if(!V(o.weekday)||!V(o.weekNumber)||!V(o.weekYear))throw new ri("Cannot mix locale-based week fields with ISO-based week fields");return V(o.localWeekday)||(o.weekday=o.localWeekday),V(o.localWeekNumber)||(o.weekNumber=o.localWeekNumber),V(o.localWeekYear)||(o.weekYear=o.localWeekYear),delete o.localWeekday,delete o.localWeekNumber,delete o.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function rU(o,e=4,t=1){let a=Wl(o.weekYear),i=ct(o.weekNumber,1,lc(o.weekYear,e,t)),r=ct(o.weekday,1,7);return a?i?r?!1:nt("weekday",o.weekday):nt("week",o.weekNumber):nt("weekYear",o.weekYear)}function sU(o){let e=Wl(o.year),t=ct(o.ordinal,1,bs(o.year));return e?t?!1:nt("ordinal",o.ordinal):nt("year",o.year)}function J0(o){let e=Wl(o.year),t=ct(o.month,1,12),a=ct(o.day,1,Yl(o.year,o.month));return e?t?a?!1:nt("day",o.day):nt("month",o.month):nt("year",o.year)}function K0(o){let{hour:e,minute:t,second:a,millisecond:i}=o,r=ct(e,0,23)||e===24&&t===0&&a===0&&i===0,s=ct(t,0,59),n=ct(a,0,59),c=ct(i,0,999);return r?s?n?c?!1:nt("millisecond",i):nt("second",a):nt("minute",t):nt("hour",e)}function V(o){return typeof o>"u"}function si(o){return typeof o=="number"}function Wl(o){return typeof o=="number"&&o%1===0}function nU(o){return typeof o=="string"}function cU(o){return Object.prototype.toString.call(o)==="[object Date]"}function Z0(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function X0(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function mU(o){return Array.isArray(o)?o:[o]}function c0(o,e,t){if(o.length!==0)return o.reduce((a,i)=>{let r=[e(i),i];return a&&t(a[0],r[0])===a[0]?a:r},null)[1]}function lU(o,e){return e.reduce((t,a)=>(t[a]=o[a],t),{})}function ks(o,e){return Object.prototype.hasOwnProperty.call(o,e)}function Hh(o){if(o==null)return null;if(typeof o!="object")throw new $e("Week settings must be an object");if(!ct(o.firstDay,1,7)||!ct(o.minimalDays,1,7)||!Array.isArray(o.weekend)||o.weekend.some(e=>!ct(e,1,7)))throw new $e("Invalid week settings");return{firstDay:o.firstDay,minimalDays:o.minimalDays,weekend:Array.from(o.weekend)}}function ct(o,e,t){return Wl(o)&&o>=e&&o<=t}function uU(o,e){return o-e*Math.floor(o/e)}function Ue(o,e=2){let t=o<0,a;return t?a="-"+(""+-o).padStart(e,"0"):a=(""+o).padStart(e,"0"),a}function ai(o){if(!(V(o)||o===null||o===""))return parseInt(o,10)}function or(o){if(!(V(o)||o===null||o===""))return parseFloat(o)}function Jh(o){if(!(V(o)||o===null||o==="")){let e=parseFloat("0."+o)*1e3;return Math.floor(e)}}function Kh(o,e,t="round"){let a=10**e;switch(t){case"expand":return o>0?Math.ceil(o*a)/a:Math.floor(o*a)/a;case"trunc":return Math.trunc(o*a)/a;case"round":return Math.round(o*a)/a;case"floor":return Math.floor(o*a)/a;case"ceil":return Math.ceil(o*a)/a;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function uc(o){return o%4===0&&(o%100!==0||o%400===0)}function bs(o){return uc(o)?366:365}function Yl(o,e){let t=uU(e-1,12)+1,a=o+(e-t)/12;return t===2?uc(a)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Jl(o){let e=Date.UTC(o.year,o.month-1,o.day,o.hour,o.minute,o.second,o.millisecond);return o.year<100&&o.year>=0&&(e=new Date(e),e.setUTCFullYear(o.year,o.month-1,o.day)),+e}function m0(o,e,t){return-Wh($h(o,1,e),t)+e-1}function lc(o,e=4,t=1){let a=m0(o,e,t),i=m0(o+1,e,t);return(bs(o)-a+i)/7}function Gh(o){return o>99?o:o>Ae.twoDigitCutoffYear?1900+o:2e3+o}function eq(o,e,t,a=null){let i=new Date(o),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(r.timeZone=a);let s={timeZoneName:e,...r},n=new Intl.DateTimeFormat(t,s).formatToParts(i).find(c=>c.type.toLowerCase()==="timezonename");return n?n.value:null}function Kl(o,e){let t=parseInt(o,10);Number.isNaN(t)&&(t=0);let a=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-a:a;return t*60+i}function oq(o){let e=Number(o);if(typeof o=="boolean"||o===""||!Number.isFinite(e))throw new $e(`Invalid unit value ${o}`);return e}function Vl(o,e){let t={};for(let a in o)if(ks(o,a)){let i=o[a];if(i==null)continue;t[e(a)]=oq(i)}return t}function cc(o,e){let t=Math.trunc(Math.abs(o/60)),a=Math.trunc(Math.abs(o%60)),i=o>=0?"+":"-";switch(e){case"short":return`${i}${Ue(t,2)}:${Ue(a,2)}`;case"narrow":return`${i}${t}${a>0?`:${a}`:""}`;case"techie":return`${i}${Ue(t,2)}${Ue(a,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Zl(o){return lU(o,["hour","minute","second","millisecond"])}var dU=["January","February","March","April","May","June","July","August","September","October","November","December"],tq=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],gU=["J","F","M","A","M","J","J","A","S","O","N","D"];function aq(o){switch(o){case"narrow":return[...gU];case"short":return[...tq];case"long":return[...dU];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 iq=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],rq=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],pU=["M","T","W","T","F","S","S"];function sq(o){switch(o){case"narrow":return[...pU];case"short":return[...rq];case"long":return[...iq];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var nq=["AM","PM"],hU=["Before Christ","Anno Domini"],fU=["BC","AD"],bU=["B","A"];function cq(o){switch(o){case"narrow":return[...bU];case"short":return[...fU];case"long":return[...hU];default:return null}}function yU(o){return nq[o.hour<12?0:1]}function kU(o,e){return sq(e)[o.weekday-1]}function AU(o,e){return aq(e)[o.month-1]}function wU(o,e){return cq(e)[o.year<0?0:1]}function vU(o,e,t="always",a=!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."]},r=["hours","minutes","seconds"].indexOf(o)===-1;if(t==="auto"&&r){let u=o==="days";switch(e){case 1:return u?"tomorrow":`next ${i[o][0]}`;case-1:return u?"yesterday":`last ${i[o][0]}`;case 0:return u?"today":`this ${i[o][0]}`}}let s=Object.is(e,-0)||e<0,n=Math.abs(e),c=n===1,m=i[o],l=a?c?m[1]:m[2]||m[1]:c?i[o][0]:o;return s?`${n} ${l} ago`:`in ${n} ${l}`}function l0(o,e){let t="";for(let a of o)a.literal?t+=a.val:t+=e(a.val);return t}var xU={D:Pl,DD:q0,DDD:E0,DDDD:I0,t:C0,tt:j0,ttt:B0,tttt:Q0,T:S0,TT:D0,TTT:T0,TTTT:R0,f:N0,ff:O0,fff:_0,ffff:F0,F:U0,FF:M0,FFF:L0,FFFF:P0},Uo=class o{static create(e,t={}){return new o(e,t)}static parseFormat(e){let t=null,a="",i=!1,r=[];for(let s=0;s<e.length;s++){let n=e.charAt(s);n==="'"?((a.length>0||i)&&r.push({literal:i||/^\s+$/.test(a),val:a===""?"'":a}),t=null,a="",i=!i):i||n===t?a+=n:(a.length>0&&r.push({literal:/^\s+$/.test(a),val:a}),a=n,t=n)}return a.length>0&&r.push({literal:i||/^\s+$/.test(a),val:a}),r}static macroTokenToFormatOpts(e){return xU[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,a=void 0){if(this.opts.forceSimple)return Ue(e,t);let i={...this.opts};return t>0&&(i.padTo=t),a&&(i.signDisplay=a),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){let a=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(g,p)=>this.loc.extract(e,g,p),s=g=>e.isOffsetFixed&&e.offset===0&&g.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,g.format):"",n=()=>a?yU(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(g,p)=>a?AU(e,g):r(p?{month:g}:{month:g,day:"numeric"},"month"),m=(g,p)=>a?kU(e,g):r(p?{weekday:g}:{weekday:g,month:"long",day:"numeric"},"weekday"),l=g=>{let p=o.macroTokenToFormatOpts(g);return p?this.formatWithSystemDefault(e,p):g},u=g=>a?wU(e,g):r({era:g},"era"),d=g=>{switch(g){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 n();case"d":return i?r({day:"numeric"},"day"):this.num(e.day);case"dd":return i?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return m("short",!0);case"cccc":return m("long",!0);case"ccccc":return m("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return m("short",!1);case"EEEE":return m("long",!1);case"EEEEE":return m("narrow",!1);case"L":return i?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?r({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?r({month:"numeric"},"month"):this.num(e.month);case"MM":return i?r({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?r({year:"numeric"},"year"):this.num(e.year);case"yy":return i?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("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(g)}};return l0(o.parseFormat(t),d)}formatDurationFromString(e,t){let a=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}},r=(l,u)=>d=>{let g=i(d);if(g){let p=u.isNegativeDuration&&g!==u.largestUnit?a:1,b;return this.opts.signMode==="negativeLargestOnly"&&g!==u.largestUnit?b="never":this.opts.signMode==="all"?b="always":b="auto",this.num(l.get(g)*p,d.length,b)}else return d},s=o.parseFormat(t),n=s.reduce((l,{literal:u,val:d})=>u?l:l.concat(d),[]),c=e.shiftTo(...n.map(i).filter(l=>l)),m={isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]};return l0(s,r(c,m))}},mq=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function As(...o){let e=o.reduce((t,a)=>t+a.source,"");return RegExp(`^${e}$`)}function ws(...o){return e=>o.reduce(([t,a,i],r)=>{let[s,n,c]=r(e,i);return[{...t,...s},n||a,c]},[{},null,1]).slice(0,2)}function vs(o,...e){if(o==null)return[null,null];for(let[t,a]of e){let i=t.exec(o);if(i)return a(i)}return[null,null]}function lq(...o){return(e,t)=>{let a={},i;for(i=0;i<o.length;i++)a[o[i]]=ai(e[t+i]);return[a,null,t+i]}}var uq=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,zU=`(?:${uq.source}?(?:\\[(${mq.source})\\])?)?`,Zh=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,dq=RegExp(`${Zh.source}${zU}`),Xh=RegExp(`(?:[Tt]${dq.source})?`),qU=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,EU=/(\d{4})-?W(\d\d)(?:-?(\d))?/,IU=/(\d{4})-?(\d{3})/,CU=lq("weekYear","weekNumber","weekDay"),jU=lq("year","ordinal"),BU=/(\d{4})-(\d\d)-(\d\d)/,gq=RegExp(`${Zh.source} ?(?:${uq.source}|(${mq.source}))?`),QU=RegExp(`(?: ${gq.source})?`);function ys(o,e,t){let a=o[e];return V(a)?t:ai(a)}function SU(o,e){return[{year:ys(o,e),month:ys(o,e+1,1),day:ys(o,e+2,1)},null,e+3]}function xs(o,e){return[{hours:ys(o,e,0),minutes:ys(o,e+1,0),seconds:ys(o,e+2,0),milliseconds:Jh(o[e+3])},null,e+4]}function dc(o,e){let t=!o[e]&&!o[e+1],a=Kl(o[e+1],o[e+2]),i=t?null:_o.instance(a);return[{},i,e+3]}function gc(o,e){let t=o[e]?qa.create(o[e]):null;return[{},t,e+1]}var DU=RegExp(`^T?${Zh.source}$`),TU=/^-?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 RU(o){let[e,t,a,i,r,s,n,c,m]=o,l=e[0]==="-",u=c&&c[0]==="-",d=(g,p=!1)=>g!==void 0&&(p||g&&l)?-g:g;return[{years:d(or(t)),months:d(or(a)),weeks:d(or(i)),days:d(or(r)),hours:d(or(s)),minutes:d(or(n)),seconds:d(or(c),c==="-0"),milliseconds:d(Jh(m),u)}]}var NU={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ef(o,e,t,a,i,r,s){let n={year:e.length===2?Gh(ai(e)):ai(e),month:tq.indexOf(t)+1,day:ai(a),hour:ai(i),minute:ai(r)};return s&&(n.second=ai(s)),o&&(n.weekday=o.length>3?iq.indexOf(o)+1:rq.indexOf(o)+1),n}var UU=/^(?:(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 OU(o){let[,e,t,a,i,r,s,n,c,m,l,u]=o,d=ef(e,i,a,t,r,s,n),g;return c?g=NU[c]:m?g=0:g=Kl(l,u),[d,new _o(g)]}function MU(o){return o.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var _U=/^(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$/,LU=/^(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$/,FU=/^(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 u0(o){let[,e,t,a,i,r,s,n]=o;return[ef(e,i,a,t,r,s,n),_o.utcInstance]}function PU(o){let[,e,t,a,i,r,s,n]=o;return[ef(e,n,t,a,i,r,s),_o.utcInstance]}var HU=As(qU,Xh),GU=As(EU,Xh),YU=As(IU,Xh),VU=As(dq),pq=ws(SU,xs,dc,gc),$U=ws(CU,xs,dc,gc),WU=ws(jU,xs,dc,gc),JU=ws(xs,dc,gc);function KU(o){return vs(o,[HU,pq],[GU,$U],[YU,WU],[VU,JU])}function ZU(o){return vs(MU(o),[UU,OU])}function XU(o){return vs(o,[_U,u0],[LU,u0],[FU,PU])}function eO(o){return vs(o,[TU,RU])}var oO=ws(xs);function tO(o){return vs(o,[DU,oO])}var aO=As(BU,QU),iO=As(gq),rO=ws(xs,dc,gc);function sO(o){return vs(o,[aO,pq],[iO,rO])}var d0="Invalid Duration",hq={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}},nO={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},...hq},st=146097/400,ps=146097/4800,cO={years:{quarters:4,months:12,weeks:st/7,days:st,hours:st*24,minutes:st*24*60,seconds:st*24*60*60,milliseconds:st*24*60*60*1e3},quarters:{months:3,weeks:st/28,days:st/4,hours:st*24/4,minutes:st*24*60/4,seconds:st*24*60*60/4,milliseconds:st*24*60*60*1e3/4},months:{weeks:ps/7,days:ps,hours:ps*24,minutes:ps*24*60,seconds:ps*24*60*60,milliseconds:ps*24*60*60*1e3},...hq},ar=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],mO=ar.slice(0).reverse();function xa(o,e,t=!1){let a={values:t?e.values:{...o.values,...e.values||{}},loc:o.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||o.conversionAccuracy,matrix:e.matrix||o.matrix};return new Fe(a)}function fq(o,e){var t;let a=(t=e.milliseconds)!=null?t:0;for(let i of mO.slice(1))e[i]&&(a+=e[i]*o[i].milliseconds);return a}function g0(o,e){let t=fq(o,e)<0?-1:1;ar.reduceRight((a,i)=>{if(V(e[i]))return a;if(a){let r=e[a]*t,s=o[i][a],n=Math.floor(r/s);e[i]+=n*t,e[a]-=n*s*t}return i},null),ar.reduce((a,i)=>{if(V(e[i]))return a;if(a){let r=e[a]%1;e[a]-=r,e[i]+=r*o[a][i]}return i},null)}function p0(o){let e={};for(let[t,a]of Object.entries(o))a!==0&&(e[t]=a);return e}var Fe=class o{constructor(e){let t=e.conversionAccuracy==="longterm"||!1,a=t?cO:nO;e.matrix&&(a=e.matrix),this.values=e.values,this.loc=e.loc||be.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=a,this.isLuxonDuration=!0}static fromMillis(e,t){return o.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new $e(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new o({values:Vl(e,o.normalizeUnit),loc:be.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(si(e))return o.fromMillis(e);if(o.isDuration(e))return e;if(typeof e=="object")return o.fromObject(e);throw new $e(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[a]=eO(e);return a?o.fromObject(a,t):o.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[a]=tO(e);return a?o.fromObject(a,t):o.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new $e("need to specify a reason the Duration is invalid");let a=e instanceof Oo?e:new Oo(e,t);if(Ae.throwOnInvalid)throw new Sh(a);return new o({invalid:a})}static normalizeUnit(e){let t={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(!t)throw new Fl(e);return t}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,t={}){let a={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?Uo.create(this.loc,a).formatDurationFromString(this,e):d0}toHuman(e={}){if(!this.isValid)return d0;let t=e.showZeros!==!1,a=ar.map(i=>{let r=this.values[i];return V(r)||r===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(r)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(a)}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+=Kh(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},ze.fromMillis(t,{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?fq(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=o.fromDurationLike(e),a={};for(let i of ar)(ks(t.values,i)||ks(this.values,i))&&(a[i]=t.get(i)+this.get(i));return xa(this,{values:a},!0)}minus(e){if(!this.isValid)return this;let t=o.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let a of Object.keys(this.values))t[a]=oq(e(this.values[a],a));return xa(this,{values:t},!0)}get(e){return this[o.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,...Vl(e,o.normalizeUnit)};return xa(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:a,matrix:i}={}){let s={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:a};return xa(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return g0(this.matrix,e),xa(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=p0(this.normalize().shiftToAll().toObject());return xa(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>o.normalizeUnit(s));let t={},a={},i=this.toObject(),r;for(let s of ar)if(e.indexOf(s)>=0){r=s;let n=0;for(let m in a)n+=this.matrix[m][s]*a[m],a[m]=0;si(i[s])&&(n+=i[s]);let c=Math.trunc(n);t[s]=c,a[s]=(n*1e3-c*1e3)/1e3}else si(i[s])&&(a[s]=i[s]);for(let s in a)a[s]!==0&&(t[r]+=s===r?a[s]:a[s]/this.matrix[r][s]);return g0(this.matrix,t),xa(this,{values:t},!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 t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return xa(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=p0(this.values);return xa(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 t(a,i){return a===void 0||a===0?i===void 0||i===0:a===i}for(let a of ar)if(!t(this.values[a],e.values[a]))return!1;return!0}},hs="Invalid Interval";function lO(o,e){return!o||!o.isValid?rr.invalid("missing or invalid start"):!e||!e.isValid?rr.invalid("missing or invalid end"):e<o?rr.invalid("end before start",`The end of an interval must be after its start, but you had start=${o.toISO()} and end=${e.toISO()}`):null}var rr=class o{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new $e("need to specify a reason the Interval is invalid");let a=e instanceof Oo?e:new Oo(e,t);if(Ae.throwOnInvalid)throw new Qh(a);return new o({invalid:a})}static fromDateTimes(e,t){let a=ic(e),i=ic(t),r=lO(a,i);return r??new o({start:a,end:i})}static after(e,t){let a=Fe.fromDurationLike(t),i=ic(e);return o.fromDateTimes(i,i.plus(a))}static before(e,t){let a=Fe.fromDurationLike(t),i=ic(e);return o.fromDateTimes(i.minus(a),i)}static fromISO(e,t){let[a,i]=(e||"").split("/",2);if(a&&i){let r,s;try{r=ze.fromISO(a,t),s=r.isValid}catch{s=!1}let n,c;try{n=ze.fromISO(i,t),c=n.isValid}catch{c=!1}if(s&&c)return o.fromDateTimes(r,n);if(s){let m=Fe.fromISO(i,t);if(m.isValid)return o.after(r,m)}else if(c){let m=Fe.fromISO(a,t);if(m.isValid)return o.before(n,m)}}return o.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",t){if(!this.isValid)return NaN;let a=this.start.startOf(e,t),i;return t!=null&&t.useLocaleWeeks?i=this.end.reconfigure({locale:a.locale}):i=this.end,i=i.startOf(e,t),Math.floor(i.diff(a,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:t}={}){return this.isValid?o.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(ic).filter(s=>this.contains(s)).sort((s,n)=>s.toMillis()-n.toMillis()),a=[],{s:i}=this,r=0;for(;i<this.e;){let s=t[r]||this.e,n=+s>+this.e?this.e:s;a.push(o.fromDateTimes(i,n)),i=n,r+=1}return a}splitBy(e){let t=Fe.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:a}=this,i=1,r,s=[];for(;a<this.e;){let n=this.start.plus(t.mapUnits(c=>c*i));r=+n>+this.e?this.e:n,s.push(o.fromDateTimes(a,r)),a=r,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 t=this.s>e.s?this.s:e.s,a=this.e<e.e?this.e:e.e;return t>=a?null:o.fromDateTimes(t,a)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,a=this.e>e.e?this.e:e.e;return o.fromDateTimes(t,a)}static merge(e){let[t,a]=e.sort((i,r)=>i.s-r.s).reduce(([i,r],s)=>r?r.overlaps(s)||r.abutsStart(s)?[i,r.union(s)]:[i.concat([r]),s]:[i,s],[[],null]);return a&&t.push(a),t}static xor(e){let t=null,a=0,i=[],r=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),s=Array.prototype.concat(...r),n=s.sort((c,m)=>c.time-m.time);for(let c of n)a+=c.type==="s"?1:-1,a===1?t=c.time:(t&&+t!=+c.time&&i.push(o.fromDateTimes(t,c.time)),t=null);return o.merge(i)}difference(...e){return o.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:hs}[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=Pl,t={}){return this.isValid?Uo.create(this.s.loc.clone(t),e).formatInterval(this):hs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:hs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:hs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:hs}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:hs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Fe.invalid(this.invalidReason)}mapEndpoints(e){return o.fromDateTimes(e(this.s),e(this.e))}},ir=class{static hasDST(e=Ae.defaultZone){let t=ze.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return qa.isValidZone(e)}static normalizeZone(e){return ii(e,Ae.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||be.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||be.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||be.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:a=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||be.create(t,a,r)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:a=null,locObj:i=null,outputCalendar:r="gregory"}={}){return(i||be.create(t,a,r)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:a=null,locObj:i=null}={}){return(i||be.create(t,a,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:a=null,locObj:i=null}={}){return(i||be.create(t,a,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return be.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return be.create(t,null,"gregory").eras(e)}static features(){return{relative:Z0(),localeWeek:X0()}}};function h0(o,e){let t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),a=t(e)-t(o);return Math.floor(Fe.fromMillis(a).as("days"))}function uO(o,e,t){let a=[["years",(c,m)=>m.year-c.year],["quarters",(c,m)=>m.quarter-c.quarter+(m.year-c.year)*4],["months",(c,m)=>m.month-c.month+(m.year-c.year)*12],["weeks",(c,m)=>{let l=h0(c,m);return(l-l%7)/7}],["days",h0]],i={},r=o,s,n;for(let[c,m]of a)t.indexOf(c)>=0&&(s=c,i[c]=m(o,e),n=r.plus(i),n>e?(i[c]--,o=r.plus(i),o>e&&(n=o,i[c]--,o=r.plus(i))):o=n);return[o,i,n,s]}function dO(o,e,t,a){let[i,r,s,n]=uO(o,e,t),c=e-i,m=t.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);m.length===0&&(s<e&&(s=i.plus({[n]:1})),s!==i&&(r[n]=(r[n]||0)+c/(s-i)));let l=Fe.fromObject(r,a);return m.length>0?Fe.fromMillis(c,a).shiftTo(...m).plus(l):l}var gO="missing Intl.DateTimeFormat.formatToParts support";function me(o,e=t=>t){return{regex:o,deser:([t])=>e(aU(t))}}var pO="\xA0",bq=`[ ${pO}]`,yq=new RegExp(bq,"g");function hO(o){return o.replace(/\./g,"\\.?").replace(yq,bq)}function f0(o){return o.replace(/\./g,"").replace(yq," ").toLowerCase()}function jt(o,e){return o===null?null:{regex:RegExp(o.map(hO).join("|")),deser:([t])=>o.findIndex(a=>f0(t)===f0(a))+e}}function b0(o,e){return{regex:o,deser:([,t,a])=>Kl(t,a),groups:e}}function Nl(o){return{regex:o,deser:([e])=>e}}function fO(o){return o.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function bO(o,e){let t=Ct(e),a=Ct(e,"{2}"),i=Ct(e,"{3}"),r=Ct(e,"{4}"),s=Ct(e,"{6}"),n=Ct(e,"{1,2}"),c=Ct(e,"{1,3}"),m=Ct(e,"{1,6}"),l=Ct(e,"{1,9}"),u=Ct(e,"{2,4}"),d=Ct(e,"{4,6}"),g=A=>({regex:RegExp(fO(A.val)),deser:([k])=>k,literal:!0}),b=(A=>{if(o.literal)return g(A);switch(A.val){case"G":return jt(e.eras("short"),0);case"GG":return jt(e.eras("long"),0);case"y":return me(m);case"yy":return me(u,Gh);case"yyyy":return me(r);case"yyyyy":return me(d);case"yyyyyy":return me(s);case"M":return me(n);case"MM":return me(a);case"MMM":return jt(e.months("short",!0),1);case"MMMM":return jt(e.months("long",!0),1);case"L":return me(n);case"LL":return me(a);case"LLL":return jt(e.months("short",!1),1);case"LLLL":return jt(e.months("long",!1),1);case"d":return me(n);case"dd":return me(a);case"o":return me(c);case"ooo":return me(i);case"HH":return me(a);case"H":return me(n);case"hh":return me(a);case"h":return me(n);case"mm":return me(a);case"m":return me(n);case"q":return me(n);case"qq":return me(a);case"s":return me(n);case"ss":return me(a);case"S":return me(c);case"SSS":return me(i);case"u":return Nl(l);case"uu":return Nl(n);case"uuu":return me(t);case"a":return jt(e.meridiems(),0);case"kkkk":return me(r);case"kk":return me(u,Gh);case"W":return me(n);case"WW":return me(a);case"E":case"c":return me(t);case"EEE":return jt(e.weekdays("short",!1),1);case"EEEE":return jt(e.weekdays("long",!1),1);case"ccc":return jt(e.weekdays("short",!0),1);case"cccc":return jt(e.weekdays("long",!0),1);case"Z":case"ZZ":return b0(new RegExp(`([+-]${n.source})(?::(${a.source}))?`),2);case"ZZZ":return b0(new RegExp(`([+-]${n.source})(${a.source})?`),2);case"z":return Nl(/[a-z_+-/]{1,256}?/i);case" ":return Nl(/[^\S\n\r]/);default:return g(A)}})(o)||{invalidReason:gO};return b.token=o,b}var yO={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 kO(o,e,t){let{type:a,value:i}=o;if(a==="literal"){let c=/^\s+$/.test(i);return{literal:!c,val:c?" ":i}}let r=e[a],s=a;a==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=t.hour12?"hour12":"hour24");let n=yO[s];if(typeof n=="object"&&(n=n[r]),n)return{literal:!1,val:n}}function AO(o){return[`^${o.map(t=>t.regex).reduce((t,a)=>`${t}(${a.source})`,"")}$`,o]}function wO(o,e,t){let a=o.match(e);if(a){let i={},r=1;for(let s in t)if(ks(t,s)){let n=t[s],c=n.groups?n.groups+1:1;!n.literal&&n.token&&(i[n.token.val[0]]=n.deser(a.slice(r,r+c))),r+=c}return[a,i]}else return[a,{}]}function vO(o){let e=r=>{switch(r){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}},t=null,a;return V(o.z)||(t=qa.create(o.z)),V(o.Z)||(t||(t=new _o(o.Z)),a=o.Z),V(o.q)||(o.M=(o.q-1)*3+1),V(o.h)||(o.h<12&&o.a===1?o.h+=12:o.h===12&&o.a===0&&(o.h=0)),o.G===0&&o.y&&(o.y=-o.y),V(o.u)||(o.S=Jh(o.u)),[Object.keys(o).reduce((r,s)=>{let n=e(s);return n&&(r[n]=o[s]),r},{}),t,a]}var qh=null;function xO(){return qh||(qh=ze.fromMillis(1555555555555)),qh}function zO(o,e){if(o.literal)return o;let t=Uo.macroTokenToFormatOpts(o.val),a=wq(t,e);return a==null||a.includes(void 0)?o:a}function kq(o,e){return Array.prototype.concat(...o.map(t=>zO(t,e)))}var $l=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=kq(Uo.parseFormat(t),e),this.units=this.tokens.map(a=>bO(a,e)),this.disqualifyingUnit=this.units.find(a=>a.invalidReason),!this.disqualifyingUnit){let[a,i]=AO(this.units);this.regex=RegExp(a,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[t,a]=wO(e,this.regex,this.handlers),[i,r,s]=a?vO(a):[null,null,void 0];if(ks(a,"a")&&ks(a,"H"))throw new ri("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:a,result:i,zone:r,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 Aq(o,e,t){return new $l(o,t).explainFromTokens(e)}function qO(o,e,t){let{result:a,zone:i,specificOffset:r,invalidReason:s}=Aq(o,e,t);return[a,i,r,s]}function wq(o,e){if(!o)return null;let a=Uo.create(e,o).dtFormatter(xO()),i=a.formatToParts(),r=a.resolvedOptions();return i.map(s=>kO(s,o,r))}var Eh="Invalid DateTime",y0=864e13;function sc(o){return new Oo("unsupported zone",`the zone "${o.name}" is not supported`)}function Ih(o){return o.weekData===null&&(o.weekData=Gl(o.c)),o.weekData}function Ch(o){return o.localWeekData===null&&(o.localWeekData=Gl(o.c,o.loc.getMinDaysInFirstWeek(),o.loc.getStartOfWeek())),o.localWeekData}function tr(o,e){let t={ts:o.ts,zone:o.zone,c:o.c,o:o.o,loc:o.loc,invalid:o.invalid};return new ze({...t,...e,old:t})}function vq(o,e,t){let a=o-e*60*1e3,i=t.offset(a);if(e===i)return[a,e];a-=(i-e)*60*1e3;let r=t.offset(a);return i===r?[a,i]:[o-Math.min(i,r)*60*1e3,Math.max(i,r)]}function Ul(o,e){o+=e*60*1e3;let t=new Date(o);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Ml(o,e,t){return vq(Jl(o),e,t)}function k0(o,e){let t=o.o,a=o.c.year+Math.trunc(e.years),i=o.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,r={...o.c,year:a,month:i,day:Math.min(o.c.day,Yl(a,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=Fe.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"),n=Jl(r),[c,m]=vq(n,t,o.zone);return s!==0&&(c+=s,m=o.zone.offset(c)),{ts:c,o:m}}function fs(o,e,t,a,i,r){let{setZone:s,zone:n}=t;if(o&&Object.keys(o).length!==0||e){let c=e||n,m=ze.fromObject(o,{...t,zone:c,specificOffset:r});return s?m:m.setZone(n)}else return ze.invalid(new Oo("unparsable",`the input "${i}" can't be parsed as ${a}`))}function Ol(o,e,t=!0){return o.isValid?Uo.create(be.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(o,e):null}function jh(o,e,t){let a=o.c.year>9999||o.c.year<0,i="";if(a&&o.c.year>=0&&(i+="+"),i+=Ue(o.c.year,a?6:4),t==="year")return i;if(e){if(i+="-",i+=Ue(o.c.month),t==="month")return i;i+="-"}else if(i+=Ue(o.c.month),t==="month")return i;return i+=Ue(o.c.day),i}function A0(o,e,t,a,i,r,s){let n=!t||o.c.millisecond!==0||o.c.second!==0,c="";switch(s){case"day":case"month":case"year":break;default:if(c+=Ue(o.c.hour),s==="hour")break;if(e){if(c+=":",c+=Ue(o.c.minute),s==="minute")break;n&&(c+=":",c+=Ue(o.c.second))}else{if(c+=Ue(o.c.minute),s==="minute")break;n&&(c+=Ue(o.c.second))}if(s==="second")break;n&&(!a||o.c.millisecond!==0)&&(c+=".",c+=Ue(o.c.millisecond,3))}return i&&(o.isOffsetFixed&&o.offset===0&&!r?c+="Z":o.o<0?(c+="-",c+=Ue(Math.trunc(-o.o/60)),c+=":",c+=Ue(Math.trunc(-o.o%60))):(c+="+",c+=Ue(Math.trunc(o.o/60)),c+=":",c+=Ue(Math.trunc(o.o%60)))),r&&(c+="["+o.zone.ianaName+"]"),c}var xq={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},EO={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},IO={ordinal:1,hour:0,minute:0,second:0,millisecond:0},_l=["year","month","day","hour","minute","second","millisecond"],CO=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],jO=["year","ordinal","hour","minute","second","millisecond"];function Ll(o){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"}[o.toLowerCase()];if(!e)throw new Fl(o);return e}function w0(o){switch(o.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ll(o)}}function BO(o){if(nc===void 0&&(nc=Ae.now()),o.type!=="iana")return o.offset(nc);let e=o.name,t=Yh.get(e);return t===void 0&&(t=o.offset(nc),Yh.set(e,t)),t}function v0(o,e){let t=ii(e.zone,Ae.defaultZone);if(!t.isValid)return ze.invalid(sc(t));let a=be.fromObject(e),i,r;if(V(o.year))i=Ae.now();else{for(let c of _l)V(o[c])&&(o[c]=xq[c]);let s=J0(o)||K0(o);if(s)return ze.invalid(s);let n=BO(t);[i,r]=Ml(o,n,t)}return new ze({ts:i,zone:t,loc:a,o:r})}function x0(o,e,t){let a=V(t.round)?!0:t.round,i=V(t.rounding)?"trunc":t.rounding,r=(n,c)=>(n=Kh(n,a||t.calendary?0:2,t.calendary?"round":i),e.loc.clone(t).relFormatter(t).format(n,c)),s=n=>t.calendary?e.hasSame(o,n)?0:e.startOf(n).diff(o.startOf(n),n).get(n):e.diff(o,n).get(n);if(t.unit)return r(s(t.unit),t.unit);for(let n of t.units){let c=s(n);if(Math.abs(c)>=1)return r(c,n)}return r(o>e?-0:0,t.units[t.units.length-1])}function z0(o){let e={},t;return o.length>0&&typeof o[o.length-1]=="object"?(e=o[o.length-1],t=Array.from(o).slice(0,o.length-1)):t=Array.from(o),[e,t]}var nc,Yh=new Map,ze=class o{constructor(e){let t=e.zone||Ae.defaultZone,a=e.invalid||(Number.isNaN(e.ts)?new Oo("invalid input"):null)||(t.isValid?null:sc(t));this.ts=V(e.ts)?Ae.now():e.ts;let i=null,r=null;if(!a)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,r]=[e.old.c,e.old.o];else{let n=si(e.o)&&!e.old?e.o:t.offset(this.ts);i=Ul(this.ts,n),a=Number.isNaN(i.year)?new Oo("invalid input"):null,i=a?null:i,r=a?null:n}this._zone=t,this.loc=e.loc||be.create(),this.invalid=a,this.weekData=null,this.localWeekData=null,this.c=i,this.o=r,this.isLuxonDateTime=!0}static now(){return new o({})}static local(){let[e,t]=z0(arguments),[a,i,r,s,n,c,m]=t;return v0({year:a,month:i,day:r,hour:s,minute:n,second:c,millisecond:m},e)}static utc(){let[e,t]=z0(arguments),[a,i,r,s,n,c,m]=t;return e.zone=_o.utcInstance,v0({year:a,month:i,day:r,hour:s,minute:n,second:c,millisecond:m},e)}static fromJSDate(e,t={}){let a=cU(e)?e.valueOf():NaN;if(Number.isNaN(a))return o.invalid("invalid input");let i=ii(t.zone,Ae.defaultZone);return i.isValid?new o({ts:a,zone:i,loc:be.fromObject(t)}):o.invalid(sc(i))}static fromMillis(e,t={}){if(si(e))return e<-y0||e>y0?o.invalid("Timestamp out of range"):new o({ts:e,zone:ii(t.zone,Ae.defaultZone),loc:be.fromObject(t)});throw new $e(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(si(e))return new o({ts:e*1e3,zone:ii(t.zone,Ae.defaultZone),loc:be.fromObject(t)});throw new $e("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};let a=ii(t.zone,Ae.defaultZone);if(!a.isValid)return o.invalid(sc(a));let i=be.fromObject(t),r=Vl(e,w0),{minDaysInFirstWeek:s,startOfWeek:n}=n0(r,i),c=Ae.now(),m=V(t.specificOffset)?a.offset(c):t.specificOffset,l=!V(r.ordinal),u=!V(r.year),d=!V(r.month)||!V(r.day),g=u||d,p=r.weekYear||r.weekNumber;if((g||l)&&p)throw new ri("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&l)throw new ri("Can't mix ordinal dates with month/day");let b=p||r.weekday&&!g,A,k,x=Ul(c,m);b?(A=CO,k=EO,x=Gl(x,s,n)):l?(A=jO,k=IO,x=zh(x)):(A=_l,k=xq);let v=!1;for(let oe of A){let te=r[oe];V(te)?v?r[oe]=k[oe]:r[oe]=x[oe]:v=!0}let j=b?rU(r,s,n):l?sU(r):J0(r),I=j||K0(r);if(I)return o.invalid(I);let T=b?r0(r,s,n):l?s0(r):r,[D,O]=Ml(T,m,a),S=new o({ts:D,zone:a,o:O,loc:i});return r.weekday&&g&&e.weekday!==S.weekday?o.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${S.toISO()}`):S.isValid?S:o.invalid(S.invalid)}static fromISO(e,t={}){let[a,i]=KU(e);return fs(a,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[a,i]=ZU(e);return fs(a,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[a,i]=XU(e);return fs(a,i,t,"HTTP",t)}static fromFormat(e,t,a={}){if(V(e)||V(t))throw new $e("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:r=null}=a,s=be.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0}),[n,c,m,l]=qO(s,e,t);return l?o.invalid(l):fs(n,c,a,`format ${t}`,e,m)}static fromString(e,t,a={}){return o.fromFormat(e,t,a)}static fromSQL(e,t={}){let[a,i]=sO(e);return fs(a,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new $e("need to specify a reason the DateTime is invalid");let a=e instanceof Oo?e:new Oo(e,t);if(Ae.throwOnInvalid)throw new Bh(a);return new o({invalid:a})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let a=wq(e,be.fromObject(t));return a?a.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return kq(Uo.parseFormat(e),be.fromObject(t)).map(i=>i.val).join("")}static resetCache(){nc=void 0,Yh.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?Ih(this).weekYear:NaN}get weekNumber(){return this.isValid?Ih(this).weekNumber:NaN}get weekday(){return this.isValid?Ih(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ch(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ch(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ch(this).weekYear:NaN}get ordinal(){return this.isValid?zh(this.c).ordinal:NaN}get monthShort(){return this.isValid?ir.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ir.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ir.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ir.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,t=6e4,a=Jl(this.c),i=this.zone.offset(a-e),r=this.zone.offset(a+e),s=this.zone.offset(a-i*t),n=this.zone.offset(a-r*t);if(s===n)return[this];let c=a-s*t,m=a-n*t,l=Ul(c,s),u=Ul(m,n);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[tr(this,{ts:c}),tr(this,{ts:m})]:[this]}get isInLeapYear(){return uc(this.year)}get daysInMonth(){return Yl(this.year,this.month)}get daysInYear(){return this.isValid?bs(this.year):NaN}get weeksInWeekYear(){return this.isValid?lc(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?lc(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:a,calendar:i}=Uo.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:a,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(_o.instance(e),t)}toLocal(){return this.setZone(Ae.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:a=!1}={}){if(e=ii(e,Ae.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||a){let r=e.offset(this.ts),s=this.toObject();[i]=Ml(s,r,e)}return tr(this,{ts:i,zone:e})}else return o.invalid(sc(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:a}={}){let i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:a});return tr(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Vl(e,w0),{minDaysInFirstWeek:a,startOfWeek:i}=n0(t,this.loc),r=!V(t.weekYear)||!V(t.weekNumber)||!V(t.weekday),s=!V(t.ordinal),n=!V(t.year),c=!V(t.month)||!V(t.day),m=n||c,l=t.weekYear||t.weekNumber;if((m||s)&&l)throw new ri("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new ri("Can't mix ordinal dates with month/day");let u;r?u=r0({...Gl(this.c,a,i),...t},a,i):V(t.ordinal)?(u={...this.toObject(),...t},V(t.day)&&(u.day=Math.min(Yl(u.year,u.month),u.day))):u=s0({...zh(this.c),...t});let[d,g]=Ml(u,this.o,this.zone);return tr(this,{ts:d,o:g})}plus(e){if(!this.isValid)return this;let t=Fe.fromDurationLike(e);return tr(this,k0(this,t))}minus(e){if(!this.isValid)return this;let t=Fe.fromDurationLike(e).negate();return tr(this,k0(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let a={},i=Fe.normalizeUnit(e);switch(i){case"years":a.month=1;case"quarters":case"months":a.day=1;case"weeks":case"days":a.hour=0;case"hours":a.minute=0;case"minutes":a.second=0;case"seconds":a.millisecond=0;break}if(i==="weeks")if(t){let r=this.loc.getStartOfWeek(),{weekday:s}=this;s<r&&(a.weekNumber=this.weekNumber-1),a.weekday=r}else a.weekday=1;if(i==="quarters"){let r=Math.ceil(this.month/3);a.month=(r-1)*3+1}return this.set(a)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Uo.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Eh}toLocaleString(e=Pl,t={}){return this.isValid?Uo.create(this.loc.clone(t),e).formatDateTime(this):Eh}toLocaleParts(e={}){return this.isValid?Uo.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:a=!1,includeOffset:i=!0,extendedZone:r=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=Ll(s);let n=e==="extended",c=jh(this,n,s);return _l.indexOf(s)>=3&&(c+="T"),c+=A0(this,n,t,a,i,r,s),c}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?jh(this,e==="extended",Ll(t)):null}toISOWeekDate(){return Ol(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:a=!0,includePrefix:i=!1,extendedZone:r=!1,format:s="extended",precision:n="milliseconds"}={}){return this.isValid?(n=Ll(n),(i&&_l.indexOf(n)>=3?"T":"")+A0(this,s==="extended",t,e,a,r,n)):null}toRFC2822(){return Ol(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ol(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?jh(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:a=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(a&&(i+=" "),t?i+="z":e&&(i+="ZZ")),Ol(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Eh}[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 t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",a={}){if(!this.isValid||!e.isValid)return Fe.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...a},r=mU(t).map(Fe.normalizeUnit),s=e.valueOf()>this.valueOf(),n=s?this:e,c=s?e:this,m=dO(n,c,r,i);return s?m.negate():m}diffNow(e="milliseconds",t={}){return this.diff(o.now(),e,t)}until(e){return this.isValid?rr.fromDateTimes(this,e):this}hasSame(e,t,a){if(!this.isValid)return!1;let i=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(t,a)<=i&&i<=r.endOf(t,a)}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 t=e.base||o.fromObject({},{zone:this.zone}),a=e.padding?this<t?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(i=e.unit,r=void 0),x0(t,this.plus(a),{...e,numeric:"always",units:i,unit:r})}toRelativeCalendar(e={}){return this.isValid?x0(e.base||o.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(o.isDateTime))throw new $e("min requires all arguments be DateTimes");return c0(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(o.isDateTime))throw new $e("max requires all arguments be DateTimes");return c0(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,a={}){let{locale:i=null,numberingSystem:r=null}=a,s=be.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0});return Aq(s,e,t)}static fromStringExplain(e,t,a={}){return o.fromFormatExplain(e,t,a)}static buildFormatParser(e,t={}){let{locale:a=null,numberingSystem:i=null}=t,r=be.fromOpts({locale:a,numberingSystem:i,defaultToEN:!0});return new $l(r,e)}static fromFormatParser(e,t,a={}){if(V(e)||V(t))throw new $e("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:r=null}=a,s=be.fromOpts({locale:i,numberingSystem:r,defaultToEN:!0});if(!s.equals(t.locale))throw new $e(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${t.locale}`);let{result:n,zone:c,specificOffset:m,invalidReason:l}=t.explainFromTokens(e);return l?o.invalid(l):fs(n,c,a,`format ${t.format}`,e,m)}static get DATE_SHORT(){return Pl}static get DATE_MED(){return q0}static get DATE_MED_WITH_WEEKDAY(){return _N}static get DATE_FULL(){return E0}static get DATE_HUGE(){return I0}static get TIME_SIMPLE(){return C0}static get TIME_WITH_SECONDS(){return j0}static get TIME_WITH_SHORT_OFFSET(){return B0}static get TIME_WITH_LONG_OFFSET(){return Q0}static get TIME_24_SIMPLE(){return S0}static get TIME_24_WITH_SECONDS(){return D0}static get TIME_24_WITH_SHORT_OFFSET(){return T0}static get TIME_24_WITH_LONG_OFFSET(){return R0}static get DATETIME_SHORT(){return N0}static get DATETIME_SHORT_WITH_SECONDS(){return U0}static get DATETIME_MED(){return O0}static get DATETIME_MED_WITH_SECONDS(){return M0}static get DATETIME_MED_WITH_WEEKDAY(){return LN}static get DATETIME_FULL(){return _0}static get DATETIME_FULL_WITH_SECONDS(){return L0}static get DATETIME_HUGE(){return F0}static get DATETIME_HUGE_WITH_SECONDS(){return P0}};function ic(o){if(ze.isDateTime(o))return o;if(o&&o.valueOf&&si(o.valueOf()))return ze.fromJSDate(o);if(o&&typeof o=="object")return ze.fromObject(o);throw new $e(`Unknown datetime argument: ${o}, of type ${typeof o}`)}var QO="3.7.2";Lo.DateTime=ze;Lo.Duration=Fe;Lo.FixedOffsetZone=_o;Lo.IANAZone=qa;Lo.Info=ir;Lo.Interval=rr;Lo.InvalidZone=Hl;Lo.Settings=Ae;Lo.SystemZone=mc;Lo.VERSION=QO;Lo.Zone=ni});var ou=y(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.CronDate=ho.DAYS_IN_MONTH=ho.DateMathOp=ho.TimeUnit=void 0;var sr=zq(),io;(function(o){o.Second="Second",o.Minute="Minute",o.Hour="Hour",o.Day="Day",o.Month="Month",o.Year="Year"})(io||(ho.TimeUnit=io={}));var Xl;(function(o){o.Add="Add",o.Subtract="Subtract"})(Xl||(ho.DateMathOp=Xl={}));ho.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var eu=class o{#e;#o=null;#a=null;#i={add:{[io.Year]:this.addYear.bind(this),[io.Month]:this.addMonth.bind(this),[io.Day]:this.addDay.bind(this),[io.Hour]:this.addHour.bind(this),[io.Minute]:this.addMinute.bind(this),[io.Second]:this.addSecond.bind(this)},subtract:{[io.Year]:this.subtractYear.bind(this),[io.Month]:this.subtractMonth.bind(this),[io.Day]:this.subtractDay.bind(this),[io.Hour]:this.subtractHour.bind(this),[io.Minute]:this.subtractMinute.bind(this),[io.Second]:this.subtractSecond.bind(this)}};constructor(e,t){let a={zone:t};if(e?e instanceof o?(this.#e=e.#e,this.#o=e.#o,this.#a=e.#a):e instanceof Date?this.#e=sr.DateTime.fromJSDate(e,a):typeof e=="number"?this.#e=sr.DateTime.fromMillis(e,a):(this.#e=sr.DateTime.fromISO(e,a),this.#e.isValid||(this.#e=sr.DateTime.fromRFC2822(e,a)),this.#e.isValid||(this.#e=sr.DateTime.fromSQL(e,a)),this.#e.isValid||(this.#e=sr.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",a))):this.#e=sr.DateTime.local(),!this.#e.isValid)throw new Error(`CronDate: unhandled timestamp: ${e}`);t&&t!==this.#e.zoneName&&(this.#e=this.#e.setZone(t))}static#r(e){return e%4===0&&e%100!==0||e%400===0}get dstStart(){return this.#o}set dstStart(e){this.#o=e}get dstEnd(){return this.#a}set dstEnd(e){this.#a=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,t){if(e===Xl.Add){this.addUnit(t);return}if(e===Xl.Subtract){this.subtractUnit(t);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.#t().day}getUTCFullYear(){return this.#t().year}getUTCDay(){let e=this.#t().weekday;return e===7?0:e}getUTCMonth(){return this.#t().month-1}getUTCHours(){return this.#t().hour}getUTCMinutes(){return this.#t().minute}getUTCSeconds(){return this.#t().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:t}=this.#e;if(t===2){let a=o.#r(this.#e.year);return e===ho.DAYS_IN_MONTH[t-1]-(a?0:1)}return e===ho.DAYS_IN_MONTH[t-1]}isLastWeekdayOfMonth(){let{day:e,month:t}=this.#e,a;return t===2?a=ho.DAYS_IN_MONTH[t-1]-(o.#r(this.#e.year)?0:1):a=ho.DAYS_IN_MONTH[t-1],e>a-7}applyDateOperation(e,t,a){if(t===io.Month||t===io.Day){this.invokeDateOperation(e,t);return}let i=this.getHours();this.invokeDateOperation(e,t);let r=this.getHours(),s=r-i;s===2?a!==24&&(this.dstStart=r):s===0&&this.getMinutes()===0&&this.getSeconds()===0&&a!==24&&(this.dstEnd=r)}#t(){return this.#e.toUTC()}};ho.CronDate=eu;ho.default=eu});var qq=y(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.CronMonth=void 0;var SO=ou(),DO=ti(),TO=1,RO=12,NO=Object.freeze([]),of=class extends DO.CronField{static get min(){return TO}static get max(){return RO}static get chars(){return NO}static get daysInMonth(){return SO.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};tu.CronMonth=of});var Eq=y(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.CronSecond=void 0;var UO=ti(),OO=0,MO=59,_O=Object.freeze([]),tf=class extends UO.CronField{static get min(){return OO}static get max(){return MO}static get chars(){return _O}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};au.CronSecond=tf});var iu=y(zo=>{"use strict";var LO=zo&&zo.__createBinding||(Object.create?(function(o,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(o,a,i)}):(function(o,e,t,a){a===void 0&&(a=t),o[a]=e[t]})),ci=zo&&zo.__exportStar||function(o,e){for(var t in o)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&LO(e,o,t)};Object.defineProperty(zo,"__esModule",{value:!0});ci(Hz(),zo);ci(Gz(),zo);ci(Yz(),zo);ci(ti(),zo);ci(Vz(),zo);ci($z(),zo);ci(qq(),zo);ci(Eq(),zo)});var rf=y(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.CronFieldCollection=void 0;var mt=iu(),af=class o{#e;#o;#a;#i;#r;#t;static from(e,t){return new o({second:this.resolveField(mt.CronSecond,e.second,t.second),minute:this.resolveField(mt.CronMinute,e.minute,t.minute),hour:this.resolveField(mt.CronHour,e.hour,t.hour),dayOfMonth:this.resolveField(mt.CronDayOfMonth,e.dayOfMonth,t.dayOfMonth),month:this.resolveField(mt.CronMonth,e.month,t.month),dayOfWeek:this.resolveField(mt.CronDayOfWeek,e.dayOfWeek,t.dayOfWeek)})}static resolveField(e,t,a){return a?a instanceof mt.CronField?a:new e(a):t}constructor({second:e,minute:t,hour:a,dayOfMonth:i,month:r,dayOfWeek:s}){if(!e)throw new Error("Validation error, Field second is missing");if(!t)throw new Error("Validation error, Field minute is missing");if(!a)throw new Error("Validation error, Field hour is missing");if(!i)throw new Error("Validation error, Field dayOfMonth is missing");if(!r)throw new Error("Validation error, Field month is missing");if(!s)throw new Error("Validation error, Field dayOfWeek is missing");if(r.values.length===1&&!i.hasLastChar&&!(parseInt(i.values[0],10)<=mt.CronMonth.daysInMonth[r.values[0]-1]))throw new Error("Invalid explicit day of month definition");this.#e=e,this.#o=t,this.#a=a,this.#r=r,this.#t=s,this.#i=i}get second(){return this.#e}get minute(){return this.#o}get hour(){return this.#a}get dayOfMonth(){return this.#i}get month(){return this.#r}get dayOfWeek(){return this.#t}static compactField(e){if(e.length===0)return[];let t=[],a;return e.forEach((i,r,s)=>{if(a===void 0){a={start:i,count:1};return}let n=s[r-1]||a.start,c=s[r+1];if(i==="L"||i==="W"){t.push(a),t.push({start:i,count:1}),a=void 0;return}if(a.step===void 0&&c!==void 0){let m=i-n,l=c-i;if(m<=l){a={...a,count:2,end:i,step:m};return}a.step=1}i-(a.end??0)===a.step?(a.count++,a.end=i):(a.count===1?t.push({start:a.start,count:1}):a.count===2?(t.push({start:a.start,count:1}),t.push({start:a.end??n,count:1})):t.push(a),a={start:i,count:1})}),a&&t.push(a),t}static#c(e,t,a){let i=t.step;return i?i===1&&t.start===e.min&&t.end&&t.end>=a?e.hasQuestionMarkChar?"?":"*":i!==1&&t.start===e.min&&t.end&&t.end>=a-i+1?`*/${i}`:null:null}static#s(e,t){let a=e.step;if(a===1)return`${e.start}-${e.end}`;let i=e.start===0?e.count-1:e.count;if(!a)throw new Error("Unexpected range step");if(!e.end)throw new Error("Unexpected range end");if(a*i>e.end){let r=(n,c)=>{if(typeof e.start!="number")throw new Error("Unexpected range start");return c%a===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,r).filter(n=>n!==null).join(",")}return e.end===t-a+1?`${e.start}/${a}`:`${e.start}-${e.end}/${a}`}stringifyField(e){let t=e.max,a=e.values;if(e instanceof mt.CronDayOfWeek){t=6;let r=this.#t.values;a=r[r.length-1]===7?r.slice(0,-1):r}e instanceof mt.CronDayOfMonth&&(t=this.#r.values.length===1?mt.CronMonth.daysInMonth[this.#r.values[0]-1]:e.max);let i=o.compactField(a);if(i.length===1){let r=o.#c(e,i[0],t);if(r)return r}return i.map(r=>{let s=r.count===1?r.start.toString():o.#s(r,t);return e instanceof mt.CronDayOfWeek&&e.nthDay>0?`${s}#${e.nthDay}`:s}).join(",")}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(this.#e)),t.push(this.stringifyField(this.#o),this.stringifyField(this.#a),this.stringifyField(this.#i),this.stringifyField(this.#r),this.stringifyField(this.#t)),t.join(" ")}serialize(){return{second:this.#e.serialize(),minute:this.#o.serialize(),hour:this.#a.serialize(),dayOfMonth:this.#i.serialize(),month:this.#r.serialize(),dayOfWeek:this.#t.serialize()}}};ru.CronFieldCollection=af});var sf=y(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.CronExpression=lt.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=lt.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var je=ou();lt.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range";lt.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";var Iq=1e4,su=class o{#e;#o;#a;#i;#r;#t;#c=null;#s=!1;constructor(e,t){this.#e=t,this.#o=t.tz,this.#i=t.startDate?new je.CronDate(t.startDate,this.#o):null,this.#r=t.endDate?new je.CronDate(t.endDate,this.#o):null;let a=t.currentDate??t.startDate;if(a){let i=new je.CronDate(a,this.#o);this.#i&&i.getTime()<this.#i.getTime()?a=this.#i:this.#r&&i.getTime()>this.#r.getTime()&&(a=this.#r)}this.#a=new je.CronDate(a,this.#o),this.#t=e}get fields(){return this.#t}static fieldsToExpression(e,t){return new o(e,t||{})}static#n(e,t){return t.some(a=>a===e)}#m(e,t){return e[t?e.length-1:0]}#u(e){let t=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#c===t)return this.#s;let a=new je.CronDate(e);a.setStartOfDay();let i=new je.CronDate(e);return i.setEndOfDay(),this.#c=t,this.#s=a.getUTCOffset()!==i.getUTCOffset(),this.#s}#l(e,t,a){let i=this.#t.second.values,r=e.getSeconds(),s=this.#t.second.findNearestValue(r,a);if(s!==null){e.setSeconds(s);return}e.applyDateOperation(t,je.TimeUnit.Minute,this.#t.hour.values.length),e.setSeconds(this.#m(i,a))}#d(e,t,a){let i=this.#t.minute.values,r=this.#t.second.values,s=e.getMinutes(),n=this.#t.minute.findNearestValue(s,a);if(n!==null){e.setMinutes(n),e.setSeconds(this.#m(r,a));return}e.applyDateOperation(t,je.TimeUnit.Hour,this.#t.hour.values.length),e.setMinutes(this.#m(i,a)),e.setSeconds(this.#m(r,a))}static#p(e,t){let a=t.isLastWeekdayOfMonth();return e.some(i=>{let r=parseInt(i.toString().charAt(0),10)%7;if(Number.isNaN(r))throw new Error(`Invalid last weekday of the month expression: ${i}`);return t.getDay()===r&&a})}next(){return this.#f()}prev(){return this.#f(!0)}hasNext(){let e=this.#a;try{return this.#f(),!0}catch{return!1}finally{this.#a=e}}hasPrev(){let e=this.#a;try{return this.#f(!0),!0}catch{return!1}finally{this.#a=e}}take(e){let t=[];if(e>=0)for(let a=0;a<e;a++)try{t.push(this.next())}catch{return t}else for(let a=0;a>e;a--)try{t.push(this.prev())}catch{return t}return t}reset(e){this.#a=new je.CronDate(e||this.#e.currentDate)}stringify(e=!1){return this.#t.stringify(e)}includesDate(e){let{second:t,minute:a,hour:i,month:r}=this.#t,s=new je.CronDate(e,this.#o);return!(!t.values.includes(s.getSeconds())||!a.values.includes(s.getMinutes())||!i.values.includes(s.getHours())||!r.values.includes(s.getMonth()+1)||!this.#g(s)||this.#t.dayOfWeek.nthDay>0&&Math.ceil(s.getDate()/7)!==this.#t.dayOfWeek.nthDay)}toString(){return this.#e.expression||this.stringify(!0)}#g(e){let t=this.#t.dayOfMonth.isWildcard,a=!t,i=this.#t.dayOfWeek.isWildcard,r=!i,s=o.#n(e.getDate(),this.#t.dayOfMonth.values)||this.#t.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),n=o.#n(e.getDay(),this.#t.dayOfWeek.values)||this.#t.dayOfWeek.hasLastChar&&o.#p(this.#t.dayOfWeek.values,e);return!!(a&&r&&(s||n)||s&&!r||t&&!i&&n)}#b(e,t,a){let i=this.#t.hour.values,r=i,s=e.getHours(),n=o.#n(s,i),c=e.dstStart===s,m=e.dstEnd===s;if(c)return o.#n(s-1,i)?!0:(e.invokeDateOperation(t,je.TimeUnit.Hour),!1);if(m&&!a)return e.dstEnd=null,e.applyDateOperation(je.DateMathOp.Add,je.TimeUnit.Hour,r.length),!1;if(n)return!0;e.dstStart=null;let l=this.#t.hour.findNearestValue(s,a);if(l===null)return e.applyDateOperation(t,je.TimeUnit.Day,r.length),!1;if(this.#u(e)){let u=a?s-l:l-s;for(let d=0;d<u;d++)e.applyDateOperation(t,je.TimeUnit.Hour,r.length)}else e.setHours(l);return e.setMinutes(this.#m(this.#t.minute.values,a)),e.setSeconds(this.#m(this.#t.second.values,a)),!1}#h(e){if(!this.#i&&!this.#r)return;let t=e.getTime();if(this.#i&&t<this.#i.getTime())throw new Error(lt.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(this.#r&&t>this.#r.getTime())throw new Error(lt.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#f(e=!1){let t=e?je.DateMathOp.Subtract:je.DateMathOp.Add,a=new je.CronDate(this.#a),i=a.getTime(),r=0;for(;++r<Iq;){if(this.#h(a),!this.#g(a)){a.applyDateOperation(t,je.TimeUnit.Day,this.#t.hour.values.length);continue}if(!(this.#t.dayOfWeek.nthDay<=0||Math.ceil(a.getDate()/7)===this.#t.dayOfWeek.nthDay)){a.applyDateOperation(t,je.TimeUnit.Day,this.#t.hour.values.length);continue}if(!o.#n(a.getMonth()+1,this.#t.month.values)){a.applyDateOperation(t,je.TimeUnit.Month,this.#t.hour.values.length);continue}if(this.#b(a,t,e)){if(!o.#n(a.getMinutes(),this.#t.minute.values)){this.#d(a,t,e);continue}if(!o.#n(a.getSeconds(),this.#t.second.values)){this.#l(a,t,e);continue}if(i===a.getTime()){(t==="Add"||a.getMilliseconds()===0)&&a.applyDateOperation(t,je.TimeUnit.Second,this.#t.hour.values.length);continue}break}}if(r>Iq)throw new Error(lt.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return a.getMilliseconds()!==0&&a.setMilliseconds(0),this.#a=a,a}[Symbol.iterator](){return{next:()=>({value:this.#f(),done:!this.hasNext()})}}};lt.CronExpression=su;lt.default=su});var Cq=y(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.seededRandom=HO;function FO(o){let e=2166136261;for(let t=0;t<o.length;t++)e^=o.charCodeAt(t),e=Math.imul(e,16777619);return()=>e>>>0}function PO(o){return()=>{let e=o+=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 HO(o){let e=o?FO(o)():Math.floor(Math.random()*1e10);return PO(e)}});var nu=y(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.CronExpressionParser=gt.DayOfWeek=gt.Months=gt.CronUnit=gt.PredefinedExpressions=void 0;var GO=rf(),YO=sf(),VO=Cq(),ut=iu(),cf;(function(o){o["@yearly"]="0 0 0 1 1 *",o["@annually"]="0 0 0 1 1 *",o["@monthly"]="0 0 0 1 * *",o["@weekly"]="0 0 0 * * 0",o["@daily"]="0 0 0 * * *",o["@hourly"]="0 0 * * * *",o["@minutely"]="0 * * * * *",o["@secondly"]="* * * * * *",o["@weekdays"]="0 0 0 * * 1-5",o["@weekends"]="0 0 0 * * 0,6"})(cf||(gt.PredefinedExpressions=cf={}));var dt;(function(o){o.Second="Second",o.Minute="Minute",o.Hour="Hour",o.DayOfMonth="DayOfMonth",o.Month="Month",o.DayOfWeek="DayOfWeek"})(dt||(gt.CronUnit=dt={}));var mf;(function(o){o[o.jan=1]="jan",o[o.feb=2]="feb",o[o.mar=3]="mar",o[o.apr=4]="apr",o[o.may=5]="may",o[o.jun=6]="jun",o[o.jul=7]="jul",o[o.aug=8]="aug",o[o.sep=9]="sep",o[o.oct=10]="oct",o[o.nov=11]="nov",o[o.dec=12]="dec"})(mf||(gt.Months=mf={}));var lf;(function(o){o[o.sun=0]="sun",o[o.mon=1]="mon",o[o.tue=2]="tue",o[o.wed=3]="wed",o[o.thu=4]="thu",o[o.fri=5]="fri",o[o.sat=6]="sat"})(lf||(gt.DayOfWeek=lf={}));var uf=class o{static parse(e,t={}){let{strict:a=!1,hashSeed:i}=t,r=(0,VO.seededRandom)(i);e=cf[e]||e;let s=o.#e(e,a);if(!(s.dayOfMonth==="*"||s.dayOfWeek==="*"||!a))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");let n=o.#o(dt.Second,s.second,ut.CronSecond.constraints,r),c=o.#o(dt.Minute,s.minute,ut.CronMinute.constraints,r),m=o.#o(dt.Hour,s.hour,ut.CronHour.constraints,r),l=o.#o(dt.Month,s.month,ut.CronMonth.constraints,r),u=o.#o(dt.DayOfMonth,s.dayOfMonth,ut.CronDayOfMonth.constraints,r),{dayOfWeek:d,nthDayOfWeek:g}=o.#u(s.dayOfWeek),p=o.#o(dt.DayOfWeek,d,ut.CronDayOfWeek.constraints,r),b=new GO.CronFieldCollection({second:new ut.CronSecond(n,{rawValue:s.second}),minute:new ut.CronMinute(c,{rawValue:s.minute}),hour:new ut.CronHour(m,{rawValue:s.hour}),dayOfMonth:new ut.CronDayOfMonth(u,{rawValue:s.dayOfMonth}),month:new ut.CronMonth(l,{rawValue:s.month}),dayOfWeek:new ut.CronDayOfWeek(p,{rawValue:s.dayOfWeek,nthDayOfWeek:g})});return new YO.CronExpression(b,{...t,expression:e})}static#e(e,t){if(t&&!e.length)throw new Error("Invalid cron expression");e=e||"0 * * * * *";let a=e.trim().split(/\s+/);if(t&&a.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(a.length>6)throw new Error("Invalid cron expression, too many fields");let i=["*","*","*","*","*","0"];a.length<i.length&&a.unshift(...i.slice(a.length));let[r,s,n,c,m,l]=a;return{second:r,minute:s,hour:n,dayOfMonth:c,month:m,dayOfWeek:l}}static#o(e,t,a,i){if((e===dt.Month||e===dt.DayOfWeek)&&(t=t.replace(/[a-z]{3}/gi,r=>{r=r.toLowerCase();let s=mf[r]||lf[r];if(s===void 0)throw new Error(`Validation error, cannot resolve alias "${r}"`);return s.toString()})),!a.validChars.test(t))throw new Error(`Invalid characters, got value: ${t}`);return t=this.#a(t,a),t=this.#i(t,a,i),this.#r(e,t,a)}static#a(e,t){return e.replace(/[*?]/g,t.min+"-"+t.max)}static#i(e,t,a){let i=a();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(r,s,n,c)=>{if(s&&n&&c){let m=parseInt(s,10),l=parseInt(n,10),u=parseInt(c,10);if(m>l)throw new Error(`Invalid range: ${m}-${l}, min > max`);if(u<=0)throw new Error(`Invalid step: ${u}, must be positive`);let d=Math.max(m,t.min),g=Math.floor(i*u),p=[];for(let b=Math.floor(d/u)*u+g;b<=l;b+=u)b>=d&&p.push(b);return p.join(",")}else if(s&&n){let m=parseInt(s,10),l=parseInt(n,10);if(m>l)throw new Error(`Invalid range: ${m}-${l}, min > max`);return String(Math.floor(i*(l-m+1))+m)}else if(c){let m=parseInt(c,10);if(m<=0)throw new Error(`Invalid step: ${m}, must be positive`);let l=Math.floor(i*m),u=[];for(let d=Math.floor(t.min/m)*m+l;d<=t.max;d+=m)d>=t.min&&u.push(d);return u.join(",")}else return String(Math.floor(i*(t.max-t.min+1)+t.min))})}static#r(e,t,a){let i=[];function r(n,c){if(Array.isArray(n))i.push(...n);else if(o.#l(c,n))i.push(n);else{let m=parseInt(n.toString(),10);if(!(m>=c.min&&m<=c.max))throw new Error(`Constraint error, got value ${n} expected range ${c.min}-${c.max}`);i.push(e===dt.DayOfWeek?m%7:n)}}return t.split(",").forEach(n=>{if(!(n.length>0))throw new Error("Invalid list value format");r(o.#t(e,n,a),a)}),i}static#t(e,t,a){let i=t.split("/");if(i.length>2)throw new Error(`Invalid repeat: ${t}`);return i.length===2?(isNaN(parseInt(i[0],10))||(i[0]=`${i[0]}-${a.max}`),o.#m(e,i[0],parseInt(i[1],10),a)):o.#m(e,t,1,a)}static#c(e,t,a){if(!(!isNaN(e)&&!isNaN(t)&&e>=a.min&&t<=a.max))throw new Error(`Constraint error, got range ${e}-${t} expected range ${a.min}-${a.max}`);if(e>t)throw new Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw new Error(`Constraint error, cannot repeat at every ${e} time.`)}static#n(e,t,a,i){let r=[];e===dt.DayOfWeek&&a%7===0&&r.push(0);for(let s=t;s<=a;s+=i)r.indexOf(s)===-1&&r.push(s);return r}static#m(e,t,a,i){let r=t.split("-");if(r.length<=1)return isNaN(+t)?t:+t;let[s,n]=r.map(c=>parseInt(c,10));return this.#c(s,n,i),this.#s(a),this.#n(e,s,n,a)}static#u(e){let t=e.split("#");if(t.length<=1)return{dayOfWeek:t[0]};let a=+t[t.length-1],i=e.match(/([,-/])/);if(i!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${i?.[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(a)&&a>=1&&a<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:t[0],nthDayOfWeek:a}}static#l(e,t){return e.chars.some(a=>t.toString().includes(a))}};gt.CronExpressionParser=uf});var jq=y(Yt=>{"use strict";var $O=Yt&&Yt.__createBinding||(Object.create?(function(o,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(o,a,i)}):(function(o,e,t,a){a===void 0&&(a=t),o[a]=e[t]})),WO=Yt&&Yt.__setModuleDefault||(Object.create?(function(o,e){Object.defineProperty(o,"default",{enumerable:!0,value:e})}):function(o,e){o.default=e}),JO=Yt&&Yt.__importStar||(function(){var o=function(e){return o=Object.getOwnPropertyNames||function(t){var a=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a[a.length]=i);return a},o(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=o(e),i=0;i<a.length;i++)a[i]!=="default"&&$O(t,e,a[i]);return WO(t,e),t}})();Object.defineProperty(Yt,"__esModule",{value:!0});Yt.CronFileParser=void 0;var KO=nu(),df=class o{static async parseFile(e){let{readFile:t}=await Promise.resolve().then(()=>JO(require("fs/promises"))),a=await t(e,"utf8");return o.#e(a)}static parseFileSync(e){let{readFileSync:t}=require("fs"),a=t(e,"utf8");return o.#e(a)}static#e(e){let t=e.split(`
|
|
@@ -1411,7 +1411,7 @@ ${r}`;break;case"retry":S5(r)&&(t[i]=r);break;case"id":D5(r)&&(t[i]=r);break;cas
|
|
|
1411
1411
|
`);o.stack=t?`${t}
|
|
1412
1412
|
${r}`:i.stack}Q.exports.fetch=function(e,t=void 0){return nme(e,t).catch(a=>{throw H5?$5(a,H5):a&&typeof a=="object"&&Error.captureStackTrace(a,Q.exports.fetch),a})};Q.exports.Headers=$r().Headers;Q.exports.Response=Fm().Response;Q.exports.Request=An().Request;Q.exports.FormData=hd().FormData;var{setGlobalOrigin:cme,getGlobalOrigin:mme}=qy();Q.exports.setGlobalOrigin=cme;Q.exports.getGlobalOrigin=mme;var{CacheStorage:lme}=B9(),{kConstruct:ume}=de();Q.exports.caches=new lme(ume);var{deleteCookie:dme,getCookies:gme,getSetCookies:pme,setCookie:hme,parseCookie:fme}=F9();Q.exports.deleteCookie=dme;Q.exports.getCookies=gme;Q.exports.getSetCookies=pme;Q.exports.setCookie=hme;Q.exports.parseCookie=fme;var{parseMIMEType:bme,serializeAMimeType:yme}=bt();Q.exports.parseMIMEType=bme;Q.exports.serializeAMimeType=yme;var{CloseEvent:kme,ErrorEvent:Ame,MessageEvent:wme}=Tg(),{WebSocket:vme,ping:xme}=w5();Q.exports.WebSocket=vme;Q.exports.CloseEvent=kme;Q.exports.ErrorEvent=Ame;Q.exports.MessageEvent=wme;Q.exports.ping=xme;Q.exports.WebSocketStream=j5().WebSocketStream;Q.exports.WebSocketError=ov().WebSocketError;Q.exports.request=el(Qn.request);Q.exports.stream=el(Qn.stream);Q.exports.pipeline=el(Qn.pipeline);Q.exports.connect=el(Qn.connect);Q.exports.upgrade=el(Qn.upgrade);Q.exports.MockClient=Wce;Q.exports.MockCallHistory=Jce;Q.exports.MockCallHistoryLog=Kce;Q.exports.MockPool=Xce;Q.exports.MockAgent=Zce;Q.exports.SnapshotAgent=eme;Q.exports.mockErrors=ome;var{EventSource:zme}=P5();Q.exports.EventSource=zme;function qme(){globalThis.fetch=Q.exports.fetch,globalThis.Headers=Q.exports.Headers,globalThis.Response=Q.exports.Response,globalThis.Request=Q.exports.Request,globalThis.FormData=Q.exports.FormData,globalThis.WebSocket=Q.exports.WebSocket,globalThis.CloseEvent=Q.exports.CloseEvent,globalThis.ErrorEvent=Q.exports.ErrorEvent,globalThis.MessageEvent=Q.exports.MessageEvent,globalThis.EventSource=Q.exports.EventSource}Q.exports.install=qme});var J5=y(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.SuperglueClient=Dn.SuperglueHttpError=void 0;var Sn=rt(),Va=Jf(),Eme=wb(),Ime=cI(),Cme=Kt(),$a=Cs(),jme=wu(),tl=14400*1e3,ol;if(typeof globalThis.process<"u"&&globalThis.process.versions?.node)try{let{Agent:o}=W5();ol=new o({headersTimeout:tl,bodyTimeout:tl})}catch{}var $g=class extends Error{constructor(e,t,a,i){super(e),this.status=t,this.code=a,this.details=i,this.name="SuperglueHttpError"}};Dn.SuperglueHttpError=$g;var nv=class{constructor({apiKey:e,apiEndpoint:t,onInfrastructureError:a,sseTokenProvider:i,tokenProvider:r}){if(!e&&!r)throw new Error("SuperglueClient requires either apiKey or tokenProvider");this.tokenProvider=r??(async()=>e),this.apiEndpoint=t??"https://api.superglue.cloud",this.sseManager=new Eme.SSELogSubscriptionManager(this.apiEndpoint,i??this.tokenProvider),this.onInfrastructureError=a}async getApiKey(){return this.tokenProvider()}isInfrastructureError(e){return(0,Cme.isAbortError)(e)?!1:!!(e instanceof TypeError&&e.message.toLowerCase().includes("fetch")||e instanceof Error&&e.name==="TimeoutError")}async restRequest(e,t,a,i,r){let n=await(await this.restResponse({method:e,path:t,body:a,extraHeaders:i,requestInit:r})).text();if(n)return JSON.parse(n)}async restResponse({method:e,path:t,body:a,extraHeaders:i,requestInit:r}){let s=`${this.apiEndpoint.replace(/\/$/,"")}${t}`,n=a!=null,c=typeof FormData<"u"&&a instanceof FormData,l={Authorization:`Bearer ${await this.getApiKey()}`,...i};n&&!c&&e!=="GET"&&(l["Content-Type"]="application/json");let u;try{u=await fetch(s,{...r,method:e,headers:l,body:n?c?a:JSON.stringify(a):void 0,signal:r?.signal??AbortSignal.timeout(tl),...ol?{dispatcher:ol}:{}})}catch(d){throw this.isInfrastructureError(d)&&this.onInfrastructureError?.(),d}if(!u.ok)throw await this.buildHttpError(u);return u}async uploadFiles(e,t){if(typeof t?.process!="boolean")throw new Error("process must be a boolean");if(e.length===0)return[];let a=e.map(l=>({...l,contentLength:l.contentLength??this.getUploadContentLength(l.content)})),r=(await this.restRequest("POST","/v1/files/uploads",{process:t.process,files:a.map(({fileName:l,contentType:u,contentLength:d})=>({fileName:l,contentLength:d,...u?{contentType:u}:{}}))})).data.files;if(r.length!==a.length)throw await Promise.all(r.map(l=>this.deleteFileUpload(l.id).catch(()=>{}))),new Error("Upload response did not match the selected files");let s=await Promise.allSettled(r.map(async(l,u)=>{let d=a[u],g=await fetch(l.uploadUrl,{method:"PUT",body:d.content,headers:d.contentType?{"Content-Type":d.contentType}:void 0,signal:AbortSignal.timeout(Math.min(tl,l.expiresIn*1e3))});if(!g.ok)throw new Error(`Upload failed for ${d.fileName}: ${g.status} ${g.statusText}`);return l.id})),n=s.flatMap(l=>l.status==="fulfilled"?[l.value]:[]),c=new Map;if(n.length>0)try{let l=await this.restRequest("POST","/v1/files/uploads/complete",{fileIds:n});c=new Map(l.data.files.map(u=>[u.id,u]))}catch(l){c=new Map(n.map(u=>[u,{id:u,fileName:a[r.findIndex(d=>d.id===u)]?.fileName||u,contentLength:a[r.findIndex(d=>d.id===u)]?.contentLength||0,status:"failed",error:l instanceof Error?l.message:String(l)}]))}let m=r.map((l,u)=>{let d=s[u],g=a[u];return d.status==="rejected"?{id:l.id,fileName:g.fileName,contentLength:g.contentLength,status:"failed",error:d.reason instanceof Error?d.reason.message:String(d.reason)}:c.get(l.id)||{id:l.id,fileName:g.fileName,contentLength:g.contentLength,status:"failed",error:"Upload completion returned no result"}});return await Promise.all(m.filter(l=>l.status==="failed").map(l=>this.deleteFileUpload(l.id).catch(()=>{}))),m}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 t=await e.text(),a=`HTTP ${e.status}: ${t}`,i,r;try{let s=JSON.parse(t);s&&typeof s=="object"&&!Array.isArray(s)&&(r=s),typeof s?.code=="string"&&(i=s.code);let n=s.error;typeof n=="string"?a=n:n&&typeof n=="object"&&(a=n.message||JSON.stringify(n))}catch{}return new $g(a,e.status,i,r)}async streamRequest(e,t,a){let i=e.includes("?")?"&":"?",r=`${this.apiEndpoint.replace(/\/$/,"")}${e}${i}stream=true`,n={Authorization:`Bearer ${await this.getApiKey()}`,Accept:"text/event-stream","Content-Type":"application/json"},c;try{c=await fetch(r,{method:"POST",headers:n,body:JSON.stringify(t),signal:a??AbortSignal.timeout(tl),...ol?{dispatcher:ol}:{}})}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}if(!c.ok)throw await this.buildHttpError(c);if(!(c.headers.get("content-type")||"").includes("text/event-stream")){let l=await c.text();return l?JSON.parse(l):void 0}try{return await(0,Ime.consumeEventStreamResult)(c)}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}}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 t=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:t.status==="success",data:t.data,error:t.error,tool:t.tool,stepResults:t.stepResults?.map(a=>({...a}))||[],...t.fileArtifacts&&t.fileArtifacts.length>0?{fileArtifacts:t.fileArtifacts}:{},...t.metadata?.warnings?.length?{warnings:t.metadata.warnings}:{}}}async runToolConfig(e){let t=e.createRun?"/v1/tools/run?createRun=true":"/v1/tools/run",a=await this.restRequest("POST",t,{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:a.status?a.status==="success":a.success??!1,data:a.data,error:a.error,tool:a.tool||e.tool,stepResults:a.stepResults?.map(r=>({...r}))||[],...a.fileArtifacts&&a.fileArtifacts.length>0?{fileArtifacts:a.fileArtifacts}:{},...a.metadata?.warnings?.length?{warnings:a.metadata.warnings}:{}}}async abortToolExecution(e){return{success:!0,runId:(await this.restRequest("POST",`/v1/runs/${encodeURIComponent(e)}/cancel`)).runId}}async executeStep({step:e,payload:t,files:a,previousResults:i,credentials:r,options:s,runId:n,systemIds:c,createRun:m,parentToolId:l,stepIndex:u,stepId:d,signal:g,stream:p}){let b={step:e,payload:t,files:a,previousResults:i,credentials:r,options:s,runId:n,systemIds:c,createRun:m,parentToolId:l,stepIndex:u,stepId:d};return p?this.streamRequest("/v1/tools/step/run",b,g):this.restRequest("POST","/v1/tools/step/run",b,void 0,g?{signal:g}:void 0)}async abortStep(e){return this.restRequest("POST","/v1/tools/step/abort",{runId:e})}async executeTransformOnly({outputTransform:e,outputSchema:t,inputSchema:a,payload:i,files:r,stepResults:s,options:n,runId:c,createRun:m,parentToolId:l,stepId:u,signal:d,stream:g}){let p={outputTransform:e,outputSchema:t,inputSchema:a,payload:i,files:r,stepResults:s,options:n,runId:c,createRun:m,parentToolId:l,stepId:u};return g?this.streamRequest("/v1/tools/transform/run",p,d):this.restRequest("POST","/v1/tools/transform/run",p,void 0,d?{signal:d}:void 0)}async createRun({toolId:e,toolConfig:t,toolResult:a,stepResults:i,toolPayload:r,status:s,error:n,startedAt:c,completedAt:m,executionKind:l,parentToolId:u,draftId:d}){return this.restRequest("POST","/v1/runs",{toolId:e,toolConfig:t,toolResult:a,stepResults:i,toolPayload:r,status:s,error:n,startedAt:(0,$a.toUTCISOString)(c,"run.startedAt"),completedAt:(0,$a.toUTCISOString)(m,"run.completedAt"),executionKind:l,parentToolId:u,draftId:d})}async checkRunLimit(){return(await this.restRequest("POST","/v1/runs/check-limit")).data}async extract({file:e,envelope:t}){if(!e)throw new Error("File must be provided for extract.");let a=new FormData;a.append("file",e);let i=t?"/v1/extract?envelope=true":"/v1/extract";return this.restRequest("POST",i,a)}mapOpenAPIRunToRun(e){let t={running:Sn.RunStatus.RUNNING,success:Sn.RunStatus.SUCCESS,failed:Sn.RunStatus.FAILED,aborted:Sn.RunStatus.ABORTED};return{runId:e.runId??e.id,toolId:e.toolId,tool:e.tool,systemIds:e.systemIds,status:t[e.status]??Sn.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??Sn.RunExecutionKind.FULL},fileArtifacts:e.fileArtifacts}}mapOpenAPIScheduleToToolSchedule(e){return{...e,lastRunAt:e.lastRunAt?(0,$a.requireUTCDate)(e.lastRunAt,"schedule.lastRunAt"):void 0,nextRunAt:(0,$a.requireUTCDate)(e.nextRunAt,"schedule.nextRunAt"),createdAt:(0,$a.requireUTCDate)(e.createdAt,"schedule.createdAt"),updatedAt:(0,$a.requireUTCDate)(e.updatedAt,"schedule.updatedAt")}}async listRuns(e={}){let t=(0,Va.createSearchListQueryParams)(e);e.toolId!==void 0&&t.set("toolId",e.toolId),e.searchUserIds?.length&&t.set("searchUserIds",e.searchUserIds.join(",")),e.includeTotal!==void 0&&t.set("includeTotal",String(e.includeTotal)),e.startedAfter!==void 0&&t.set("startedAfter",e.startedAfter instanceof Date?(0,$a.toUTCISOString)(e.startedAfter,"run.startedAfter"):e.startedAfter),e.statuses!==void 0?t.set("status",e.statuses.join(",")):e.status!==void 0&&t.set("status",e.status),e.requestSources!==void 0&&t.set("requestSources",e.requestSources.join(",")),e.executionKinds!==void 0&&t.set("executionKinds",e.executionKinds.join(",")),e.userId!==void 0&&t.set("userId",e.userId),e.systemId!==void 0&&t.set("systemId",e.systemId),e.systemIds!==void 0&&t.set("systemIds",e.systemIds.join(","));let a=t.size>0?`?${t.toString()}`:"",i=await this.restRequest("GET",`/v1/runs${a}`,void 0,void 0,{signal:e.signal});return{data:i.data.map(r=>this.mapOpenAPIRunToRun(r)),total:i.total,page:i.page,limit:i.limit,hasMore:i.hasMore}}async getActivityCounts(e){let t=new URLSearchParams;e?.from&&t.set("from",e.from instanceof Date?(0,$a.toUTCISOString)(e.from,"activity.from"):e.from),e?.to&&t.set("to",e.to instanceof Date?(0,$a.toUTCISOString)(e.to,"activity.to"):e.to);let a=t.toString();return(await this.restRequest("GET",`/v1/activity/counts${a?`?${a}`:""}`,void 0,void 0,{signal:e?.signal})).counts}async getRun(e){try{let t=await this.restRequest("GET",`/v1/runs/${encodeURIComponent(e)}`);return this.mapOpenAPIRunToRun(t)}catch(t){if(t.message?.includes("404")||t.message?.includes("not found"))return null;throw t}}async getTool(e){try{return await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}`)}catch(t){if(t.message?.includes("404")||t.message?.includes("not found")||t.message?.includes("403")||t.message?.includes("not allowed"))return null;throw t}}async getToolState(e){return(await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/state`)).state}async setToolState(e,t){await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/state`,{state:t})}async deleteToolState(e){return(await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/state`)).deletedKeys}async archiveTool(e,t=!0){return this.updateTool(e,{archived:t})}async bulkArchiveTools(e,t=!0){return this.restRequest("POST","/v1/tools/bulk/archive",{ids:e,archived:t})}async bulkDeleteTools(e){return this.restRequest("POST","/v1/tools/bulk/delete",{ids:e})}async listTools(e={}){let t=(0,Va.createListQueryParams)(e);e.includeArchived!==void 0&&t.set("includeArchived",String(e.includeArchived));let a=t.size>0?`?${t.toString()}`:"";return this.restRequest("GET",`/v1/tools${a}`)}async listAllTools(e={}){return(0,Va.listAllPages)((t,a)=>this.listTools({...e,page:t,limit:a}))}async createTool(e,t){return this.restRequest("POST","/v1/tools",{...t,id:e})}async updateTool(e,t){return this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}`,t)}async deleteTool(e){try{return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}`),!0}catch(t){if(t.message?.includes("404"))return!1;throw t}}async renameTool(e,t){return this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/rename`,{newId:t})}async getWorkflow(e){return this.getTool(e)}async archiveWorkflow(e,t=!0){return this.upsertWorkflow(e,{archived:t})}async createWorkflow(e,t){return this.createTool(e,t)}async updateWorkflow(e,t){return this.updateTool(e,t)}async upsertWorkflow(e,t){return await this.getTool(e)?this.updateTool(e,t):this.createTool(e,t)}async deleteWorkflow(e){return this.deleteTool(e)}async renameWorkflow(e,t){return this.renameTool(e,t)}async listSchedules(e={}){let t=(0,Va.createListQueryParams)(e),a=t.size>0?`?${t.toString()}`:"",i=e.toolId?`/v1/tools/${encodeURIComponent(e.toolId)}/schedules${a}`:`/v1/schedules${a}`,r=await this.restRequest("GET",i);return{...r,data:r.data.map(s=>this.mapOpenAPIScheduleToToolSchedule(s))}}async listAllSchedules(e={}){return(0,Va.listAllPages)((t,a)=>this.listSchedules({...e,page:t,limit:a}))}async getToolSchedule(e,t){try{let a=await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(t)}`);return this.mapOpenAPIScheduleToToolSchedule(a)}catch(a){if(a.message?.includes("404")||a.message?.includes("not found"))return null;throw a}}async createToolSchedule(e,t){let a=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/schedules`,{...t,timezone:t.timezone||(0,jme.getRuntimeTimezone)()});return this.mapOpenAPIScheduleToToolSchedule(a)}async updateToolSchedule(e,t,a){let i=await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(t)}`,a);return this.mapOpenAPIScheduleToToolSchedule(i)}async deleteToolSchedule(e,t){return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(t)}`),!0}async bulkSetSchedulesEnabled(e,t){return this.restRequest("POST","/v1/schedules/bulk/enable",{ids:e,enabled:t})}async bulkDeleteSchedules(e){return this.restRequest("POST","/v1/schedules/bulk/delete",{ids:e})}async listCredentials(e={}){let t=(0,Va.createListQueryParams)(e);e.systemId!==void 0&&t.set("systemId",e.systemId);let a=t.size>0?`?${t.toString()}`:"";return this.restRequest("GET",`/v1/credentials${a}`)}async listAllCredentials(e={}){return(0,Va.listAllPages)((t,a)=>this.listCredentials({...e,page:t,limit:a}))}async createCredentials(e){return(await this.restRequest("POST","/v1/credentials",e)).data}async replaceCredentials(e,t){return(await this.restRequest("PUT",`/v1/credentials/${encodeURIComponent(e)}`,{credentials:t})).data}async updateCredentials(e,t){return(await this.restRequest("PATCH",`/v1/credentials/${encodeURIComponent(e)}`,t)).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 t=(0,Va.createListQueryParams)(e),a=t.size>0?`?${t.toString()}`:"";return this.restRequest("GET",`/v1/systems${a}`)}async listAllSystems(e={}){return(0,Va.listAllPages)((t,a)=>this.listSystems({...e,page:t,limit:a}))}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,t){return(await this.restRequest("PATCH",`/v1/systems/${encodeURIComponent(e)}`,t)).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,t){return(await this.restRequest("POST",`/v1/oauth/exchanges/${encodeURIComponent(e)}/complete`,t)).data}async searchSystemDocumentation(e,t){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/search`,{keywords:t})).data}async triggerSystemDocumentationScrapeJob(e,t){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/scrape`,t)).data}async fetchOpenApiSpec(e,t,a){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/openapi`,{url:t,link:a?.link})).data}async uploadSystemDocumentationFiles(e,t,a){let i=await this.uploadFiles(t,{process:!0}),r=i.flatMap(s=>s.status==="uploaded"?[s.id]:[]);if(r.length>0)try{await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/files`,{fileIds:r,link:a?.link!==!1})}catch(s){throw await Promise.all(r.map(n=>this.deleteFileUpload(n).catch(()=>{}))),s}if(!a?.settle){let s=i.filter(n=>n.status==="failed");if(s.length>0)throw new Error(s.map(n=>n.error).join("; "))}return i}async listSystemDocumentationFiles(e,t){let a=new URLSearchParams;t?.length&&a.set("fileIds",t.join(","));let i=a.size>0?`?${a.toString()}`:"";return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files${i}`)).data}async getSystemDocumentationFileContent(e,t,a){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(t)}/content?processed=${a.processed}`)).data}async deleteSystemDocumentationFile(e,t){await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(t)}`)}async generateCredentialsLink(e){try{return{success:!0,credentialsUrl:(await this.restRequest("POST","/v1/authenticate",e||{})).data.credentialsUrl}}catch(t){return{success:!1,error:t.message}}}};Dn.SuperglueClient=nv});var Z5=y(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.UnquotedKeyStrategy=Ce.TripleQuoteStrategy=Ce.TrailingCommaStrategy=Ce.SingleQuoteStrategy=Ce.PythonLiteralStrategy=Ce.CommentStrategy=Ce.ResilientJsonParser=Ce.RepairStrategy=void 0;Ce.parseJsonResilient=Bme;Ce.parseJSON=Qme;Ce.isValidJson=Sme;Ce.prettyPrintJson=Dme;Ce.minifyJson=Tme;var Ht=class{validate(e){try{return JSON.parse(e),!0}catch{return!1}}};Ce.RepairStrategy=Ht;var Wg=class extends Ht{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,(t,a)=>{let i=a.trim();if(i.startsWith("{")&&i.endsWith("}")||i.startsWith("[")&&i.endsWith("]"))try{let s=JSON.parse(i);return JSON.stringify(s)}catch{return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`}return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`})}};Ce.TripleQuoteStrategy=Wg;var Jg=class extends Ht{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")}};Ce.PythonLiteralStrategy=Jg;var Kg=class extends Ht{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")}};Ce.TrailingCommaStrategy=Kg;var Zg=class extends Ht{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 t=e.replace(/([{,]\s*)'([^']+)'(\s*:)/g,'$1"$2"$3');return t=t.replace(/(:\s*)'([^']+)'(\s*[,}])/g,'$1"$2"$3'),t}};Ce.SingleQuoteStrategy=Zg;var Xg=class extends Ht{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')}};Ce.UnquotedKeyStrategy=Xg;var ep=class extends Ht{constructor(){super(...arguments),this.name="CommentRemoval",this.description="Removes JavaScript-style comments"}canApply(e){return/\/\/.*$|\/\*[\s\S]*?\*\//m.test(e)}apply(e){let t=e.replace(/\/\/.*$/gm,"");return t=t.replace(/\/\*[\s\S]*?\*\//g,""),t}};Ce.CommentStrategy=ep;var cv=class extends Ht{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(t){let a=t.message||"";return a.includes("control character")||a.includes("Bad control")||a.includes("Unexpected token")&&/[\n\r\t]/.test(e)}}apply(e){let t="",a=!1,i=!1;for(let r=0;r<e.length;r++){let s=e[r],n=r>0?e[r-1]:"";if(i){t+=s,i=!1;continue}if(s==="\\"&&a){t+=s,i=!0;continue}if(s==='"'&&n!=="\\"){a=!a,t+=s;continue}if(a)switch(s){case`
|
|
1413
1413
|
`:t+="\\n";break;case"\r":t+="\\r";break;case" ":t+="\\t";break;case"\b":t+="\\b";break;case"\f":t+="\\f";break;default:let c=s.charCodeAt(0);c<32?t+="\\u"+("0000"+c.toString(16)).slice(-4):t+=s}else t+=s}return t}},mv=class extends Ht{constructor(){super(...arguments),this.name="TrailingCharactersRepair",this.description="Removes trailing characters after valid JSON structure"}canApply(e){let t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;let a=0,i=0,r=!1,s=!1;for(let n=0;n<t.length;n++){let c=t[n];if(r)s?s=!1:c==="\\"?s=!0:c==='"'&&(r=!1);else if(c==='"')r=!0;else if(c==="{")a++;else if(c==="}"){if(a--,a===0&&i===0&&n>0&&n<t.length-1)return!0}else if(c==="[")i++;else if(c==="]"&&(i--,i===0&&a===0&&n>0&&n<t.length-1))return!0}return!1}apply(e){let t=e.trim(),a=0,i=0,r=!1,s=!1,n=-1;for(let c=0;c<t.length;c++){let m=t[c];if(r)s?s=!1:m==="\\"?s=!0:m==='"'&&(r=!1);else if(m==='"')r=!0;else if(m==="{")a++;else if(m==="}"){if(a--,a===0&&i===0&&c>0){n=c;break}}else if(m==="[")i++;else if(m==="]"&&(i--,i===0&&a===0&&c>0)){n=c;break}}return n>0&&n<t.length-1?t.substring(0,n+1):e}},Tn=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 Wg,new Zg,new cv,new mv,new Jg,new Kg,new Xg,new ep]}parse(e){let t=Date.now();this.repairLog=[];let a=e instanceof Buffer?e.toString("utf8"):String(e);try{return{success:!0,data:JSON.parse(a),metadata:{parseTime:Date.now()-t,strategiesApplied:[]}}}catch(s){if(!this.options.attemptRepair)return{success:!1,error:`JSON parse error: ${s}`,metadata:{parseTime:Date.now()-t}}}let i=a,r=[];for(let s of this.strategies)if(s.canApply(i)){let n=i;if(i=s.apply(i),n!==i){r.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()-t,strategiesApplied:r}}}catch{}}}try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-t,strategiesApplied:r}}}catch(s){let n=this.aggressiveFallback(i);return n.success?{...n,repairs:[...this.repairLog,"Applied aggressive fallback"],metadata:{parseTime:Date.now()-t,strategiesApplied:[...r,"AggressiveFallback"]}}:{success:!1,error:`Failed to parse JSON after applying ${r.length} strategies: ${s}`,repairs:this.repairLog,metadata:{parseTime:Date.now()-t,strategiesApplied:r}}}}aggressiveFallback(e){try{let t=e.indexOf("{"),a=e.indexOf("[");if(t===-1&&a===-1)return{success:!1,error:"No JSON-like structure found"};let i=t===-1?a:a===-1?t:Math.min(t,a),r=e.substring(i);for(let n of this.strategies)n.canApply(r)&&(r=n.apply(r));return{success:!0,data:JSON.parse(r)}}catch(t){return{success:!1,error:`Aggressive fallback failed: ${t}`}}}addStrategy(e){this.strategies.push(e)}removeStrategy(e){this.strategies=this.strategies.filter(t=>t.name!==e)}getStrategies(){return this.strategies.map(e=>e.name)}};Ce.ResilientJsonParser=Tn;var K5=new Tn;function Bme(o,e){return(e?new Tn(e):K5).parse(o)}function Qme(o){let e=K5.parse(o);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 Sme(o){try{return JSON.parse(o),!0}catch{return!1}}function Dme(o,e=2){return JSON.stringify(o,null,e)}function Tme(o){let t=new Tn().parse(o);if(t.success)return JSON.stringify(t.data);throw new Error("Cannot minify invalid JSON")}});var tt=y(F=>{"use strict";var Rme=F&&F.__createBinding||(Object.create?(function(o,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(o,a,i)}):(function(o,e,t,a){a===void 0&&(a=t),o[a]=e[t]})),Z=F&&F.__exportStar||function(o,e){for(var t in o)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Rme(e,o,t)};Object.defineProperty(F,"__esModule",{value:!0});F.SSELogSubscriptionManager=F.SuperglueHttpError=F.SuperglueClient=void 0;Z(r1(),F);Z(h1(),F);Z(f1(),F);Z(w1(),F);Z(q1(),F);Z(Mc(),F);Z(H1(),F);Z(G1(),F);Z(Y1(),F);Z(V1(),F);Z(Jf(),F);Z(W1(),F);Z(J1(),F);Z(K1(),F);Z(X1(),F);Z(e2(),F);Z(t2(),F);Z(Al(),F);Z(i2(),F);Z(r2(),F);Z(n2(),F);Z(l2(),F);Z(d2(),F);Z(y2(),F);Z(A2(),F);Z(v2(),F);Z(D2(),F);Z(R2(),F);Z(lb(),F);Z(W2(),F);Z(yb(),F);Z(X2(),F);Z(aI(),F);Z(rI(),F);Z(rt(),F);Z(Kt(),F);Z(sI(),F);Z(nI(),F);Z(Ru(),F);Z(Cs(),F);Z(wu(),F);var X5=J5();Object.defineProperty(F,"SuperglueClient",{enumerable:!0,get:function(){return X5.SuperglueClient}});Object.defineProperty(F,"SuperglueHttpError",{enumerable:!0,get:function(){return X5.SuperglueHttpError}});var Nme=wb();Object.defineProperty(F,"SSELogSubscriptionManager",{enumerable:!0,get:function(){return Nme.SSELogSubscriptionManager}});Z(Z5(),F)});var Tp=require("commander");var Ro=W(require("fs")),t6=W(require("os")),Wa=W(require("path")),al=W(tt()),e6=new Set(["runner","builder","admin"]),o6={output:{mode:"stdout",directory:".superglue/output"},preset:"admin"};function Ja(o){let e=Wa.join(process.cwd(),".superglue"),t=t6.homedir();if(!t)return e;let a=Wa.join(t,".superglue");return o===!0?e:o===!1?a:Ro.existsSync(Wa.join(e,"config.json"))?e:a}function lv(o){return Wa.join(Ja(o),"config.json")}function op(o){let e=lv(o);if(!Ro.existsSync(e))return{};try{return JSON.parse(Ro.readFileSync(e,"utf-8"))}catch{return{}}}function Rn(o){let e=op(),t=o.apiKey||(0,al.readProcessEnvironmentValue)("SUPERGLUE_API_KEY")||e.apiKey||"",a=o.endpoint||(0,al.readProcessEnvironmentValue)("SUPERGLUE_API_ENDPOINT")||e.endpoint||"https://api.superglue.cloud",i=(0,al.readProcessEnvironmentValue)("SUPERGLUE_WEB_ENDPOINT")||e.webEndpoint||a.replace(/:3002\b/,":3001").replace(/api\.superglue/,"app.superglue"),r=(0,al.readProcessEnvironmentValue)("SUPERGLUE_CLI_PRESET"),s=r&&e6.has(r)?r:e.preset&&e6.has(e.preset)?e.preset:"admin";return{...o6,...e,apiKey:t,endpoint:a,webEndpoint:i,preset:s,output:{...o6.output,...e.output}}}function tp(o,e){let t=Ja(e);Ro.existsSync(t)||Ro.mkdirSync(t,{recursive:!0}),Ro.writeFileSync(Wa.join(t,"config.json"),JSON.stringify(o,null,2)+`
|
|
1414
|
-
`,{mode:384})}function ap(o,e){let t=Wa.join(Ja(e),"drafts");if(Ro.existsSync(t)||Ro.mkdirSync(t,{recursive:!0}),o.output.mode==="stdout+file"){let a=Wa.resolve(o.output.directory);Ro.existsSync(a)||Ro.mkdirSync(a,{recursive:!0})}}var bv=W(tt());var uv=W(require("readline"));var r6=require("child_process"),s6=require("util");var a6={name:"@superglue/cli",version:"1.1.
|
|
1414
|
+
`,{mode:384})}function ap(o,e){let t=Wa.join(Ja(e),"drafts");if(Ro.existsSync(t)||Ro.mkdirSync(t,{recursive:!0}),o.output.mode==="stdout+file"){let a=Wa.resolve(o.output.directory);Ro.existsSync(a)||Ro.mkdirSync(a,{recursive:!0})}}var bv=W(tt());var uv=W(require("readline"));var r6=require("child_process"),s6=require("util");var a6={name:"@superglue/cli",version:"1.1.77",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 Ome=(0,s6.promisify)(r6.exec),xo=a6.version;function i6(o){let e=o.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:o}}function rp(o,e){let t=o.split("."),a=e.split("."),i=Math.max(t.length,a.length);for(let r=0;r<i;r++){let s=i6(t[r]||"0"),n=i6(a[r]||"0");if(s.numeric<n.numeric)return-1;if(s.numeric>n.numeric||s.prerelease===null&&n.prerelease!==null)return 1;if(s.prerelease!==null&&n.prerelease===null)return-1;if(s.prerelease!==null&&n.prerelease!==null){if(s.prerelease<n.prerelease)return-1;if(s.prerelease>n.prerelease)return 1}}return 0}async function sp(){try{let o=await fetch("https://registry.npmjs.org/@superglue/cli/latest",{signal:AbortSignal.timeout(5e3)});return o.ok&&(await o.json()).version||null}catch{return null}}var ip=null;function n6(){G()&&(ip=sp())}async function c6(){if(!(!G()||!ip)){try{let o=new Promise(t=>{setTimeout(()=>t(null),2e3).unref()}),e=await Promise.race([ip,o]);e&&rp(xo,e)<0&&(console.error(""),console.error(`${h.cyan}${h.bold} Update available: ${xo} \u2192 ${e}${h.reset}`),console.error(`${h.cyan} Run ${h.bold}sg update${h.reset}${h.cyan} to upgrade${h.reset}`),console.error(""))}catch{}ip=null}}async function m6(){let o=await sp();if(!o)return{success:!1,message:"Could not fetch latest version from npm"};if(rp(xo,o)>=0)return{success:!0,message:`Already on latest version (${xo})`};try{return await Ome("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${xo} to ${o}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var G=()=>process.argv.includes("--table")&&process.stdout.isTTY,Et=()=>process.argv.includes("--full"),h={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 l6(o,e){let t=e||o;return`\x1B]8;;${o}\x07${h.underline}${h.cyan}${t}${h.reset}\x1B]8;;\x07`}function u6(){if(!G())return;let o=h.reset,e=h.dim,t="\x1B[47;30m",a=[" #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- "," =@@@- @@@@ "," @@@ @@% "," -@@ @@@@= @@@ @@@ @@@@@#@ @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@* %@@ "," @@ @@@ *@ @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @% @@@ @@@ @@@ @@* @@# "," #@@ @@@# @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @@@ @@@ @@@ @@* @@ "," @@- @@@@= @@@ @@@ @@@@@@@ @@@@@@ @@@@@@@ @@@ @@% @@@ @@@ @@@ @@@@@. @@."," #@% .@@@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* @@ "," @@ @ @@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* *@@ "," -@@ @@@@= @@@@@@ @@@ @@@@@@@ @@@ -@@ @@@@@@ @@@@@@% @@@@@@. @@@@@@* #@@ "," :@@* @@@ "," %@@@ =@@@. "," :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% "];console.log(""),a.forEach(i=>{let r=i.search(/\S/),s=i.length-[...i].reverse().join("").search(/\S/)-1;if(r===-1)return console.log(" "+i);let n=i.slice(0,r),c=i.slice(r,s+1).split("").map(l=>l===" "?" ":"\u2588").join(""),m=i.slice(s+1);console.log(` ${n}${t}${c}${o}${m}`)}),console.log(` ${e} CLI v${xo}${o}`),console.log("")}function Ee(o){if(!G())return{stop:()=>{},update:()=>{},log:()=>{}};let e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],t=0,a=o,i=()=>process.stdout.write("\r\x1B[2K"),r=()=>{process.stdout.write(`\r ${h.cyan}${e[t++%e.length]}${h.reset} ${a}`)},s=setInterval(r,80);return{update:n=>{a=n},log:n=>{i(),console.log(` ${h.dim}\u2502${h.reset} ${n}`),r()},stop:n=>{clearInterval(s),i(),n&&console.log(` ${n}`)}}}function U(o){G()?np(o):console.log(JSON.stringify(o,null,2))}function re(o,e){G()?(console.log(` ${h.green}\u2713${h.reset} ${o}`),e&&np(e,4)):console.log(JSON.stringify({success:!0,message:o,...e&&typeof e=="object"?e:{data:e}}))}function z(o,e){G()?(console.error(` ${h.red}\u2717${h.reset} ${o}`),e&&np(e,4)):console.error(JSON.stringify({success:!1,error:o,details:e}))}function d6(o){G()&&console.log(` ${h.yellow}\u26A0${h.reset} ${o}`)}function go(o){G()&&console.log(` ${h.dim}${o}${h.reset}`)}function Ka(o){G()&&(console.log(`
|
|
1415
1415
|
${h.bold}${h.cyan}${o}${h.reset}`),console.log(` ${h.dim}${"\u2500".repeat(o.length)}${h.reset}`))}function pa(o,e,t){if(!G()){console.log(JSON.stringify({success:!0,total:t?.total??o.length,items:o}));return}if(o.length===0){console.log(`
|
|
1416
1416
|
${h.dim}0 results${h.reset}
|
|
1417
1417
|
`);return}let a=e||Object.keys(o[0]),i=Et()?1/0:60,r=a.map(l=>Math.min(i,Math.max(l.length,...o.map(u=>String(u[l]??"").replace(/[\n\r]+/g," ").trim().length))));console.log("");let s=a.map((l,u)=>`${h.bold}${h.cyan}${l.toUpperCase().padEnd(r[u])}${h.reset}`).join(" ");console.log(` ${s}`);let n=r.map(l=>`${h.dim}${"\u2500".repeat(l)}${h.reset}`).join(`${h.dim}\u2500\u2500${h.reset}`);console.log(` ${n}`);for(let l of o){let u=a.map((d,g)=>{let p=String(l[d]??"").replace(/[\n\r]+/g," ").trim();if(p.length>i){let A=`\u2026 (${p.length})`;p=p.slice(0,Math.max(0,i-A.length))+`${h.dim}${A}${h.reset}`}return d==="status"?`${{success:h.green,running:h.yellow,failed:h.red,aborted:h.red,error:h.red,pending:h.dim}[p.toLowerCase()]||""}${p.padEnd(r[g])}${h.reset}`:p.padEnd(r[g])}).join(" ");console.log(` ${u}`)}let c=t?.total??o.length,m=c===o.length?`${o.length} result${o.length===1?"":"s"}`:`${o.length} of ${c} result${c===1?"":"s"}`;console.log(`
|