@squidcloud/backend 1.0.503 → 1.0.504
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/src/source-code/source-git-command.d.ts +6 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal/source-code.js +1 -1
- package/dist/cjs/langgraph.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/source-code.js +1 -1
- package/dist/esm/langgraph.js +1 -1
- package/dist/internal-common/src/public-types-backend/ai-agent.public-context.d.ts +16 -0
- package/dist/internal-common/src/public-types-backend/langgraph.public-context.d.ts +11 -0
- package/dist/internal-common/src/public-types-backend/storage.public-types.d.ts +5 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={243(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,l=1/0,p=9007199254740991,f=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",y="[object Boolean]",_="[object Date]",v="[object Error]",k="[object Function]",b="[object GeneratorFunction]",T="[object Map]",O="[object Number]",C="[object Object]",w="[object Promise]",A="[object RegExp]",E="[object Set]",I="[object String]",x="[object Symbol]",N="[object WeakMap]",S="[object ArrayBuffer]",R="[object DataView]",D="[object Float32Array]",L="[object Float64Array]",$="[object Int8Array]",G="[object Int16Array]",M="[object Int32Array]",P="[object Uint8Array]",j="[object Uint8ClampedArray]",Q="[object Uint16Array]",W="[object Uint32Array]",Y=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,V=RegExp(q.source),z=RegExp(F.source),H=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,be="\\ud800-\\udfff",Te="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Oe="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",we="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+be+"]",xe="["+Ee+"]",Ne="["+Te+"]",Se="\\d+",Re="["+Oe+"]",De="["+Ce+"]",Le="[^"+be+Ee+Se+Oe+Ce+we+"]",$e="\\ud83c[\\udffb-\\udfff]",Ge="[^"+be+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+we+"]",Qe="\\u200d",We="(?:"+De+"|"+Le+")",Ye="(?:"+je+"|"+Le+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ne+"|"+$e+")?",Fe="["+Ae+"]?",Ve=Fe+qe+"(?:"+Qe+"(?:"+[Ge,Me,Pe].join("|")+")"+Fe+qe+")*",ze="(?:"+[Re,Me,Pe].join("|")+")"+Ve,He="(?:"+[Ge+Ne+"?",Ne,Me,Pe,Ie].join("|")+")",Ke=RegExp("['’]","g"),Ze=RegExp(Ne,"g"),Xe=RegExp($e+"(?="+$e+")|"+He+Ve,"g"),Je=RegExp([je+"?"+De+"+"+Ue+"(?="+[xe,je,"$"].join("|")+")",Ye+"+"+Be+"(?="+[xe,je+We,"$"].join("|")+")",je+"?"+We+"+"+Ue,je+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Se,ze].join("|"),"g"),et=RegExp("["+Qe+be+Te+Ae+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[D]=ot[L]=ot[$]=ot[G]=ot[M]=ot[P]=ot[j]=ot[Q]=ot[W]=!0,ot[g]=ot[m]=ot[S]=ot[y]=ot[R]=ot[_]=ot[v]=ot[k]=ot[T]=ot[O]=ot[C]=ot[A]=ot[E]=ot[I]=ot[N]=!1;var it={};it[g]=it[m]=it[S]=it[R]=it[y]=it[_]=it[D]=it[L]=it[$]=it[G]=it[M]=it[T]=it[O]=it[C]=it[A]=it[E]=it[I]=it[x]=it[P]=it[j]=it[Q]=it[W]=!0,it[v]=it[k]=it[N]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,st=parseInt,ct="object"==typeof global&&global&&global.Object===Object&&global,lt="object"==typeof self&&self&&self.Object===Object&&self,pt=ct||lt||Function("return this")(),ft=t&&!t.nodeType&&t,dt=ft&&e&&!e.nodeType&&e,ht=dt&&dt.exports===ft,gt=ht&&ct.process,mt=function(){try{return dt&&dt.require&&dt.require("util").types||gt&>.binding&>.binding("util")}catch(e){}}(),yt=mt&&mt.isArrayBuffer,_t=mt&&mt.isDate,vt=mt&&mt.isMap,kt=mt&&mt.isRegExp,bt=mt&&mt.isSet,Tt=mt&&mt.isTypedArray;function Ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function It(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function xt(e,t){return!(null==e||!e.length)&&jt(e,t,0)>-1}function Nt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function St(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Rt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Dt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Lt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function $t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Gt=Ut("length");function Mt(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Pt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function jt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Pt(e,Wt,n)}function Qt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Wt(e){return e!=e}function Yt(e,t){var n=null==e?0:e.length;return n?Ft(e,t)/n:f}function Ut(e){return function(t){return null==t?o:t[e]}}function Bt(e){return function(t){return null==e?o:e[t]}}function qt(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Ft(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Vt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function zt(e){return e?e.slice(0,fn(e)+1).replace(re,""):e}function Ht(e){return function(t){return e(t)}}function Kt(e,t){return St(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&jt(t,e[n],0)>-1;);return n}function Jt(e,t){for(var n=e.length;n--&&jt(t,e[n],0)>-1;);return n}var en=Bt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Bt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==u||(e[n]=u,i[o++]=n)}return i}function sn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function ln(e){return rn(e)?function(e){for(var t=Xe.lastIndex=0;Xe.test(e);)++t;return t}(e):Gt(e)}function pn(e){return rn(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var dn=Bt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hn=function e(t){var n,r=(t=null==t?pt:hn.defaults(pt.Object(),t,hn.pick(pt,nt))).Array,oe=t.Date,be=t.Error,Te=t.Function,Oe=t.Math,Ce=t.Object,we=t.RegExp,Ae=t.String,Ee=t.TypeError,Ie=r.prototype,xe=Te.prototype,Ne=Ce.prototype,Se=t["__core-js_shared__"],Re=xe.toString,De=Ne.hasOwnProperty,Le=0,$e=(n=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ge=Ne.toString,Me=Re.call(Ce),Pe=pt._,je=we("^"+Re.call(De).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qe=ht?t.Buffer:o,We=t.Symbol,Ye=t.Uint8Array,Ue=Qe?Qe.allocUnsafe:o,Be=an(Ce.getPrototypeOf,Ce),qe=Ce.create,Fe=Ne.propertyIsEnumerable,Ve=Ie.splice,ze=We?We.isConcatSpreadable:o,He=We?We.iterator:o,Xe=We?We.toStringTag:o,et=function(){try{var e=ci(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==pt.Date.now&&oe.now,lt=t.setTimeout!==pt.setTimeout&&t.setTimeout,ft=Oe.ceil,dt=Oe.floor,gt=Ce.getOwnPropertySymbols,mt=Qe?Qe.isBuffer:o,Gt=t.isFinite,Bt=Ie.join,gn=an(Ce.keys,Ce),mn=Oe.max,yn=Oe.min,_n=oe.now,vn=t.parseInt,kn=Oe.random,bn=Ie.reverse,Tn=ci(t,"DataView"),On=ci(t,"Map"),Cn=ci(t,"Promise"),wn=ci(t,"Set"),An=ci(t,"WeakMap"),En=ci(Ce,"create"),In=An&&new An,xn={},Nn=Mi(Tn),Sn=Mi(On),Rn=Mi(Cn),Dn=Mi(wn),Ln=Mi(An),$n=We?We.prototype:o,Gn=$n?$n.valueOf:o,Mn=$n?$n.toString:o;function Pn(e){if(eu(e)&&!Ua(e)&&!(e instanceof Yn)){if(e instanceof Wn)return e;if(De.call(e,"__wrapped__"))return Pi(e)}return new Wn(e)}var jn=function(){function e(){}return function(t){if(!Ja(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Qn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Yn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Vn(e){var t=this.__data__=new Bn(e);this.size=t.size}function zn(e,t){var n=Ua(e),r=!n&&Ya(e),o=!n&&!r&&Va(e),i=!n&&!r&&!o&&su(e),a=n||r||o||i,u=a?Vt(e.length,Ae):[],s=u.length;for(var c in e)!t&&!De.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mi(c,s))||u.push(c);return u}function Hn(e){var t=e.length;return t?e[qr(0,t-1)]:o}function Kn(e,t){return Ri(Eo(e),ir(t,0,e.length))}function Zn(e){return Ri(Eo(e))}function Xn(e,t,n){(n!==o&&!ja(e[t],n)||n===o&&!(t in e))&&rr(e,t,n)}function Jn(e,t,n){var r=e[t];De.call(e,t)&&ja(r,n)&&(n!==o||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(ja(e[n][0],t))return n;return-1}function tr(e,t,n,r){return lr(e,function(e,o,i){t(r,e,n(e),i)}),r}function nr(e,t){return e&&Io(t,Nu(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,i=t.length,a=r(i),u=null==e;++n<i;)a[n]=u?o:wu(e,t[n]);return a}function ir(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ar(e,t,n,r,i,a){var u,s=1&t,c=2&t,l=4&t;if(n&&(u=i?n(e,r,i,a):n(e)),u!==o)return u;if(!Ja(e))return e;var p=Ua(e);if(p){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Eo(e,u)}else{var f=fi(e),d=f==k||f==b;if(Va(e))return bo(e,s);if(f==C||f==g||d&&!i){if(u=c||d?{}:hi(e),!s)return c?function(e,t){return Io(e,pi(e),t)}(e,function(e,t){return e&&Io(t,Su(t),e)}(u,e)):function(e,t){return Io(e,li(e),t)}(e,nr(u,e))}else{if(!it[f])return i?e:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case S:return To(e);case y:case _:return new o(+e);case R:return function(e,t){var n=t?To(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case L:case $:case G:case M:case P:case j:case Q:case W:return Oo(e,n);case T:return new o;case O:case I:return new o(e);case A:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new o;case x:return r=e,Gn?Ce(Gn.call(r)):{}}}(e,f,s)}}a||(a=new Vn);var h=a.get(e);if(h)return h;a.set(e,u),iu(e)?e.forEach(function(r){u.add(ar(r,t,n,r,e,a))}):tu(e)&&e.forEach(function(r,o){u.set(o,ar(r,t,n,o,e,a))});var m=p?o:(l?c?ni:ti:c?Su:Nu)(e);return wt(m||e,function(r,o){m&&(r=e[o=r]),Jn(u,o,ar(r,t,n,o,e,a))}),u}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var i=n[r],a=t[i],u=e[i];if(u===o&&!(i in e)||!a(u))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new Ee(i);return Ii(function(){e.apply(o,n)},t)}function cr(e,t,n,r){var o=-1,i=xt,a=!0,u=e.length,s=[],c=t.length;if(!u)return s;n&&(t=St(t,Ht(n))),r?(i=Nt,a=!1):t.length>=200&&(i=Zt,a=!1,t=new Fn(t));e:for(;++o<u;){var l=e[o],p=null==n?l:n(l);if(l=r||0!==l?l:0,a&&p==p){for(var f=c;f--;)if(t[f]===p)continue e;s.push(l)}else i(t,p,r)||s.push(l)}return s}Pn.templateSettings={escape:H,evaluate:K,interpolate:Z,variable:"",imports:{_:Pn}},Pn.prototype=Qn.prototype,Pn.prototype.constructor=Pn,Wn.prototype=jn(Qn.prototype),Wn.prototype.constructor=Wn,Yn.prototype=jn(Qn.prototype),Yn.prototype.constructor=Yn,Un.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return n===a?o:n}return De.call(t,e)?t[e]:o},Un.prototype.has=function(e){var t=this.__data__;return En?t[e]!==o:De.call(t,e)},Un.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&t===o?a:t,this},Bn.prototype.clear=function(){this.__data__=[],this.size=0},Bn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():Ve.call(t,n,1),--this.size,0))},Bn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?o:t[n][1]},Bn.prototype.has=function(e){return er(this.__data__,e)>-1},Bn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(On||Bn),string:new Un}},qn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return ui(this,e).get(e)},qn.prototype.has=function(e){return ui(this,e).has(e)},qn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Fn.prototype.add=Fn.prototype.push=function(e){return this.__data__.set(e,a),this},Fn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.clear=function(){this.__data__=new Bn,this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Vn.prototype.get=function(e){return this.__data__.get(e)},Vn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Bn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var lr=So(_r),pr=So(vr,!0);function fr(e,t){var n=!0;return lr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function dr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],u=t(a);if(null!=u&&(s===o?u==u&&!uu(u):n(u,s)))var s=u,c=a}return c}function hr(e,t){var n=[];return lr(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gi),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?gr(u,t-1,n,r,o):Rt(o,u):r||(o[o.length]=u)}return o}var mr=Ro(),yr=Ro(!0);function _r(e,t){return e&&mr(e,t,Nu)}function vr(e,t){return e&&yr(e,t,Nu)}function kr(e,t){return It(t,function(t){return Ka(e[t])})}function br(e,t){for(var n=0,r=(t=yo(t,e)).length;null!=e&&n<r;)e=e[Gi(t[n++])];return n&&n==r?e:o}function Tr(e,t,n){var r=t(e);return Ua(e)?r:Rt(r,n(e))}function Or(e){return null==e?e===o?"[object Undefined]":"[object Null]":Xe&&Xe in Ce(e)?function(e){var t=De.call(e,Xe),n=e[Xe];try{e[Xe]=o;var r=!0}catch(e){}var i=Ge.call(e);return r&&(t?e[Xe]=n:delete e[Xe]),i}(e):function(e){return Ge.call(e)}(e)}function Cr(e,t){return e>t}function wr(e,t){return null!=e&&De.call(e,t)}function Ar(e,t){return null!=e&&t in Ce(e)}function Er(e,t,n){for(var i=n?Nt:xt,a=e[0].length,u=e.length,s=u,c=r(u),l=1/0,p=[];s--;){var f=e[s];s&&t&&(f=St(f,Ht(t))),l=yn(f.length,l),c[s]=!n&&(t||a>=120&&f.length>=120)?new Fn(s&&f):o}f=e[0];var d=-1,h=c[0];e:for(;++d<a&&p.length<l;){var g=f[d],m=t?t(g):g;if(g=n||0!==g?g:0,!(h?Zt(h,m):i(p,m,n))){for(s=u;--s;){var y=c[s];if(!(y?Zt(y,m):i(e[s],m,n)))continue e}h&&h.push(m),p.push(g)}}return p}function Ir(e,t,n){var r=null==(e=wi(e,t=yo(t,e)))?e:e[Gi(Hi(t))];return null==r?o:Ot(r,e,n)}function xr(e){return eu(e)&&Or(e)==g}function Nr(e,t,n,r,i){return e===t||(null==e||null==t||!eu(e)&&!eu(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var u=Ua(e),s=Ua(t),c=u?m:fi(e),l=s?m:fi(t),p=(c=c==g?C:c)==C,f=(l=l==g?C:l)==C,d=c==l;if(d&&Va(e)){if(!Va(t))return!1;u=!0,p=!1}if(d&&!p)return a||(a=new Vn),u||su(e)?Jo(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!i(new Ye(e),new Ye(t)));case y:case _:case O:return ja(+e,+t);case v:return e.name==t.name&&e.message==t.message;case A:case I:return e==t+"";case T:var u=on;case E:var s=1&r;if(u||(u=sn),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Jo(u(e),u(t),r,o,i,a);return a.delete(e),l;case x:if(Gn)return Gn.call(e)==Gn.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=p&&De.call(e,"__wrapped__"),k=f&&De.call(t,"__wrapped__");if(h||k){var b=h?e.value():e,w=k?t.value():t;return a||(a=new Vn),i(b,w,n,r,a)}}return!!d&&(a||(a=new Vn),function(e,t,n,r,i,a){var u=1&n,s=ti(e),c=s.length;if(c!=ti(t).length&&!u)return!1;for(var l=c;l--;){var p=s[l];if(!(u?p in t:De.call(t,p)))return!1}var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var g=u;++l<c;){var m=e[p=s[l]],y=t[p];if(r)var _=u?r(y,m,p,t,e,a):r(m,y,p,e,t,a);if(!(_===o?m===y||i(m,y,n,r,a):_)){h=!1;break}g||(g="constructor"==p)}if(h&&!g){var v=e.constructor,k=t.constructor;v==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof k&&k instanceof k||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Nr,i))}function Sr(e,t,n,r){var i=n.length,a=i,u=!r;if(null==e)return!a;for(e=Ce(e);i--;){var s=n[i];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var c=(s=n[i])[0],l=e[c],p=s[1];if(u&&s[2]){if(l===o&&!(c in e))return!1}else{var f=new Vn;if(r)var d=r(l,p,c,e,t,f);if(!(d===o?Nr(p,l,3,r,f):d))return!1}}return!0}function Rr(e){return!(!Ja(e)||(t=e,$e&&$e in t))&&(Ka(e)?je:ge).test(Mi(e));var t}function Dr(e){return"function"==typeof e?e:null==e?ns:"object"==typeof e?Ua(e)?Pr(e[0],e[1]):Mr(e):ps(e)}function Lr(e){if(!bi(e))return gn(e);var t=[];for(var n in Ce(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function $r(e,t){return e<t}function Gr(e,t){var n=-1,o=qa(e)?r(e.length):[];return lr(e,function(e,r,i){o[++n]=t(e,r,i)}),o}function Mr(e){var t=si(e);return 1==t.length&&t[0][2]?Oi(t[0][0],t[0][1]):function(n){return n===e||Sr(n,e,t)}}function Pr(e,t){return _i(e)&&Ti(t)?Oi(Gi(e),t):function(n){var r=wu(n,e);return r===o&&r===t?Au(n,e):Nr(t,r,3)}}function jr(e,t,n,r,i){e!==t&&mr(t,function(a,u){if(i||(i=new Vn),Ja(a))!function(e,t,n,r,i,a,u){var s=Ai(e,n),c=Ai(t,n),l=u.get(c);if(l)Xn(e,n,l);else{var p=a?a(s,c,n+"",e,t,u):o,f=p===o;if(f){var d=Ua(c),h=!d&&Va(c),g=!d&&!h&&su(c);p=c,d||h||g?Ua(s)?p=s:Fa(s)?p=Eo(s):h?(f=!1,p=bo(c,!0)):g?(f=!1,p=Oo(c,!0)):p=[]:ru(c)||Ya(c)?(p=s,Ya(s)?p=mu(s):Ja(s)&&!Ka(s)||(p=hi(c))):f=!1}f&&(u.set(c,p),i(p,c,r,a,u),u.delete(c)),Xn(e,n,p)}}(e,t,u,n,jr,r,i);else{var s=r?r(Ai(e,u),a,u+"",e,t,i):o;s===o&&(s=a),Xn(e,u,s)}},Su)}function Qr(e,t){var n=e.length;if(n)return mi(t+=t<0?n:0,n)?e[t]:o}function Wr(e,t,n){t=t.length?St(t,function(e){return Ua(e)?function(t){return br(t,1===e.length?e[0]:e)}:e}):[ns];var r=-1;t=St(t,Ht(ai()));var o=Gr(e,function(e,n,o){var i=St(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var s=Co(o[r],i[r]);if(s)return r>=u?s:s*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(o)}function Yr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=br(e,a);n(u,a)&&Kr(i,yo(a,e),u)}return i}function Ur(e,t,n,r){var o=r?Qt:jt,i=-1,a=t.length,u=e;for(e===t&&(t=Eo(t)),n&&(u=St(e,Ht(n)));++i<a;)for(var s=0,c=t[i],l=n?n(c):c;(s=o(u,l,s,r))>-1;)u!==e&&Ve.call(u,s,1),Ve.call(e,s,1);return e}function Br(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;mi(o)?Ve.call(e,o,1):so(e,o)}}return e}function qr(e,t){return e+dt(kn()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Vr(e,t){return xi(Ci(e,t,ns),e+"")}function zr(e){return Hn(ju(e))}function Hr(e,t){var n=ju(e);return Ri(n,ir(t,0,n.length))}function Kr(e,t,n,r){if(!Ja(e))return e;for(var i=-1,a=(t=yo(t,e)).length,u=a-1,s=e;null!=s&&++i<a;){var c=Gi(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=u){var p=s[c];(l=r?r(p,c,s):o)===o&&(l=Ja(p)?p:mi(t[i+1])?[]:{})}Jn(s,c,l),s=s[c]}return e}var Zr=In?function(e,t){return In.set(e,t),e}:ns,Xr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Ju(t),writable:!0})}:ns;function Jr(e){return Ri(ju(e))}function eo(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function to(e,t){var n;return lr(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function no(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!uu(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ro(e,t,ns,n)}function ro(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=n(t))!=t,s=null===t,c=uu(t),l=t===o;i<a;){var p=dt((i+a)/2),f=n(e[p]),d=f!==o,h=null===f,g=f==f,m=uu(f);if(u)var y=r||g;else y=l?g&&(r||d):s?g&&d&&(r||!h):c?g&&d&&!h&&(r||!m):!h&&!m&&(r?f<=t:f<t);y?i=p+1:a=p}return yn(a,4294967294)}function oo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!ja(u,s)){var s=u;i[o++]=0===a?0:a}}return i}function io(e){return"number"==typeof e?e:uu(e)?f:+e}function ao(e){if("string"==typeof e)return e;if(Ua(e))return St(e,ao)+"";if(uu(e))return Mn?Mn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=xt,i=e.length,a=!0,u=[],s=u;if(n)a=!1,o=Nt;else if(i>=200){var c=t?null:Vo(e);if(c)return sn(c);a=!1,o=Zt,s=new Fn}else s=t?[]:u;e:for(;++r<i;){var l=e[r],p=t?t(l):l;if(l=n||0!==l?l:0,a&&p==p){for(var f=s.length;f--;)if(s[f]===p)continue e;t&&s.push(p),u.push(l)}else o(s,p,n)||(s!==u&&s.push(p),u.push(l))}return u}function so(e,t){var n=-1,r=(t=yo(t,e)).length;if(!r)return!0;for(;++n<r;){var o=Gi(t[n]);if("__proto__"===o&&!De.call(e,"__proto__"))return!1;if(("constructor"===o||"prototype"===o)&&n<r-1)return!1}var i=wi(e,t);return null==i||delete i[Gi(Hi(t))]}function co(e,t,n,r){return Kr(e,t,n(br(e,t)),r)}function lo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?eo(e,r?0:i,r?i+1:o):eo(e,r?i+1:0,r?o:i)}function po(e,t){var n=e;return n instanceof Yn&&(n=n.value()),Dt(t,function(e,t){return t.func.apply(t.thisArg,Rt([e],t.args))},n)}function fo(e,t,n){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=e[i],s=-1;++s<o;)s!=i&&(a[i]=cr(a[i]||u,e[s],t,n));return uo(gr(a,1),t,n)}function ho(e,t,n){for(var r=-1,i=e.length,a=t.length,u={};++r<i;){var s=r<a?t[r]:o;n(u,e[r],s)}return u}function go(e){return Fa(e)?e:[]}function mo(e){return"function"==typeof e?e:ns}function yo(e,t){return Ua(e)?e:_i(e,t)?[e]:$i(yu(e))}var _o=Vr;function vo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:eo(e,t,n)}var ko=at||function(e){return pt.clearTimeout(e)};function bo(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function To(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function Oo(e,t){var n=t?To(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Co(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=uu(e),u=t!==o,s=null===t,c=t==t,l=uu(t);if(!s&&!l&&!a&&e>t||a&&u&&c&&!s&&!l||r&&u&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!u&&i||!c)return-1}return 0}function wo(e,t,n,o){for(var i=-1,a=e.length,u=n.length,s=-1,c=t.length,l=mn(a-u,0),p=r(c+l),f=!o;++s<c;)p[s]=t[s];for(;++i<u;)(f||i<a)&&(p[n[i]]=e[i]);for(;l--;)p[s++]=e[i++];return p}function Ao(e,t,n,o){for(var i=-1,a=e.length,u=-1,s=n.length,c=-1,l=t.length,p=mn(a-s,0),f=r(p+l),d=!o;++i<p;)f[i]=e[i];for(var h=i;++c<l;)f[h+c]=t[c];for(;++u<s;)(d||i<a)&&(f[h+n[u]]=e[i++]);return f}function Eo(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function Io(e,t,n,r){var i=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var s=t[a],c=r?r(n[s],e[s],s,n,e):o;c===o&&(c=e[s]),i?rr(n,s,c):Jn(n,s,c)}return n}function xo(e,t){return function(n,r){var o=Ua(n)?Ct:tr,i=t?t():{};return o(n,e,ai(r,2),i)}}function No(e){return Vr(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,u&&yi(n[0],n[1],u)&&(a=i<3?o:a,i=1),t=Ce(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}function So(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ce(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Ro(e){return function(t,n,r){for(var o=-1,i=Ce(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(!1===n(i[s],s,i))break}return t}}function Do(e){return function(t){var n=rn(t=yu(t))?pn(t):o,r=n?n[0]:t.charAt(0),i=n?vo(n,1).join(""):t.slice(1);return r[e]()+i}}function Lo(e){return function(t){return Dt(Ku(Yu(t).replace(Ke,"")),e,"")}}function $o(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),r=e.apply(n,t);return Ja(r)?r:n}}function Go(e){return function(t,n,r){var i=Ce(t);if(!qa(t)){var a=ai(n,3);t=Nu(t),n=function(e){return a(i[e],e,i)}}var u=e(t,n,r);return u>-1?i[a?t[u]:u]:o}}function Mo(e){return ei(function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new Ee(i);if(a&&!s&&"wrapper"==oi(u))var s=new Wn([],!0)}for(r=s?r:n;++r<n;){var c=oi(u=t[r]),l="wrapper"==c?ri(u):o;s=l&&vi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[oi(l[0])].apply(s,l[3]):1==u.length&&vi(u)?s[c]():s.thru(u)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Ua(r))return s.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}function Po(e,t,n,i,a,u,s,l,p,f){var d=t&c,h=1&t,g=2&t,m=24&t,y=512&t,_=g?o:$o(e);return function c(){for(var v=arguments.length,k=r(v),b=v;b--;)k[b]=arguments[b];if(m)var T=ii(c),O=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(k,T);if(i&&(k=wo(k,i,a,m)),u&&(k=Ao(k,u,s,m)),v-=O,m&&v<f){var C=un(k,T);return qo(e,t,Po,c.placeholder,n,k,C,l,p,f-v)}var w=h?n:this,A=g?w[e]:e;return v=k.length,l?k=function(e,t){for(var n=e.length,r=yn(t.length,n),i=Eo(e);r--;){var a=t[r];e[r]=mi(a,n)?i[a]:o}return e}(k,l):y&&v>1&&k.reverse(),d&&p<v&&(k.length=p),this&&this!==pt&&this instanceof c&&(A=_||$o(A)),A.apply(w,k)}}function jo(e,t){return function(n,r){return function(e,t,n,r){return _r(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}function Qo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ao(n),r=ao(r)):(n=io(n),r=io(r)),i=e(n,r)}return i}}function Wo(e){return ei(function(t){return t=St(t,Ht(ai())),Vr(function(n){var r=this;return e(t,function(e){return Ot(e,r,n)})})})}function Yo(e,t){var n=(t=t===o?" ":ao(t)).length;if(n<2)return n?Fr(t,e):t;var r=Fr(t,ft(e/ln(t)));return rn(t)?vo(pn(r),0,e).join(""):r.slice(0,e)}function Uo(e){return function(t,n,i){return i&&"number"!=typeof i&&yi(t,n,i)&&(n=i=o),t=fu(t),n===o?(n=t,t=0):n=fu(n),function(e,t,n,o){for(var i=-1,a=mn(ft((t-e)/(n||1)),0),u=r(a);a--;)u[o?a:++i]=e,e+=n;return u}(t,n,i=i===o?t<n?1:-1:fu(i),e)}}function Bo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gu(t),n=gu(n)),e(t,n)}}function qo(e,t,n,r,i,a,u,c,l,p){var f=8&t;t|=f?s:64,4&(t&=~(f?64:s))||(t&=-4);var d=[e,t,i,f?a:o,f?u:o,f?o:a,f?o:u,c,l,p],h=n.apply(o,d);return vi(e)&&Ei(h,d),h.placeholder=r,Ni(h,e,t)}function Fo(e){var t=Oe[e];return function(e,n){if(e=gu(e),(n=null==n?0:yn(du(n),292))&&Gt(e)){var r=(yu(e)+"e").split("e");return+((r=(yu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vo=wn&&1/sn(new wn([,-0]))[1]==l?function(e){return new wn(e)}:us;function zo(e){return function(t){var n=fi(t);return n==T?on(t):n==E?cn(t):function(e,t){return St(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ho(e,t,n,a,l,p,f,d){var h=2&t;if(!h&&"function"!=typeof e)throw new Ee(i);var g=a?a.length:0;if(g||(t&=-97,a=l=o),f=f===o?f:mn(du(f),0),d=d===o?d:du(d),g-=l?l.length:0,64&t){var m=a,y=l;a=l=o}var _=h?o:ri(e),v=[e,t,n,a,l,m,y,p,f,d];if(_&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?wo(l,s,t[4]):s,e[4]=l?un(e[3],u):t[4]}(s=t[5])&&(l=e[5],e[5]=l?Ao(l,s,t[6]):s,e[6]=l?un(e[5],u):t[6]),(s=t[7])&&(e[7]=s),r&c&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(v,_),e=v[0],t=v[1],n=v[2],a=v[3],l=v[4],!(d=v[9]=v[9]===o?h?0:e.length:mn(v[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||16==t?function(e,t,n){var i=$o(e);return function a(){for(var u=arguments.length,s=r(u),c=u,l=ii(a);c--;)s[c]=arguments[c];var p=u<3&&s[0]!==l&&s[u-1]!==l?[]:un(s,l);return(u-=p.length)<n?qo(e,t,Po,a.placeholder,o,s,p,o,o,n-u):Ot(this&&this!==pt&&this instanceof a?i:e,this,s)}}(e,t,d):t!=s&&33!=t||l.length?Po.apply(o,v):function(e,t,n,o){var i=1&t,a=$o(e);return function t(){for(var u=-1,s=arguments.length,c=-1,l=o.length,p=r(l+s),f=this&&this!==pt&&this instanceof t?a:e;++c<l;)p[c]=o[c];for(;s--;)p[c++]=arguments[++u];return Ot(f,i?n:this,p)}}(e,t,n,a);else var k=function(e,t,n){var r=1&t,o=$o(e);return function t(){return(this&&this!==pt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ni((_?Zr:Ei)(k,v),e,t)}function Ko(e,t,n,r){return e===o||ja(e,Ne[n])&&!De.call(r,n)?t:e}function Zo(e,t,n,r,i,a){return Ja(e)&&Ja(t)&&(a.set(t,e),jr(e,t,o,Zo,a),a.delete(t)),e}function Xo(e){return ru(e)?o:e}function Jo(e,t,n,r,i,a){var u=1&n,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var l=a.get(e),p=a.get(t);if(l&&p)return l==t&&p==e;var f=-1,d=!0,h=2&n?new Fn:o;for(a.set(e,t),a.set(t,e);++f<s;){var g=e[f],m=t[f];if(r)var y=u?r(m,g,f,t,e,a):r(g,m,f,e,t,a);if(y!==o){if(y)continue;d=!1;break}if(h){if(!$t(t,function(e,t){if(!Zt(h,t)&&(g===e||i(g,e,n,r,a)))return h.push(t)})){d=!1;break}}else if(g!==m&&!i(g,m,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ei(e){return xi(Ci(e,o,Bi),e+"")}function ti(e){return Tr(e,Nu,li)}function ni(e){return Tr(e,Su,pi)}var ri=In?function(e){return In.get(e)}:us;function oi(e){for(var t=e.name+"",n=xn[t],r=De.call(xn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(De.call(Pn,"placeholder")?Pn:e).placeholder}function ai(){var e=Pn.iteratee||rs;return e=e===rs?Dr:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function si(e){for(var t=Nu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Ti(o)]}return t}function ci(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Rr(n)?n:o}var li=gt?function(e){return null==e?[]:(e=Ce(e),It(gt(e),function(t){return Fe.call(e,t)}))}:hs,pi=gt?function(e){for(var t=[];e;)Rt(t,li(e)),e=Be(e);return t}:hs,fi=Or;function di(e,t,n){for(var r=-1,o=(t=yo(t,e)).length,i=!1;++r<o;){var a=Gi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Xa(o)&&mi(a,o)&&(Ua(e)||Ya(e))}function hi(e){return"function"!=typeof e.constructor||bi(e)?{}:jn(Be(e))}function gi(e){return Ua(e)||Ya(e)||!!(ze&&e&&e[ze])}function mi(e,t){var n=typeof e;return!!(t=t??p)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function yi(e,t,n){if(!Ja(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&mi(t,n.length):"string"==r&&t in n)&&ja(n[t],e)}function _i(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!uu(e))||J.test(e)||!X.test(e)||null!=t&&e in Ce(t)}function vi(e){var t=oi(e),n=Pn[t];if("function"!=typeof n||!(t in Yn.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(Tn&&fi(new Tn(new ArrayBuffer(1)))!=R||On&&fi(new On)!=T||Cn&&fi(Cn.resolve())!=w||wn&&fi(new wn)!=E||An&&fi(new An)!=N)&&(fi=function(e){var t=Or(e),n=t==C?e.constructor:o,r=n?Mi(n):"";if(r)switch(r){case Nn:return R;case Sn:return T;case Rn:return w;case Dn:return E;case Ln:return N}return t});var ki=Se?Ka:gs;function bi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ne)}function Ti(e){return e==e&&!Ja(e)}function Oi(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Ce(n))}}function Ci(e,t,n){return t=mn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=mn(o.length-t,0),u=r(a);++i<a;)u[i]=o[t+i];i=-1;for(var s=r(t+1);++i<t;)s[i]=o[i];return s[t]=n(u),Ot(e,this,s)}}function wi(e,t){return t.length<2?e:br(e,eo(t,0,-1))}function Ai(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ei=Si(Zr),Ii=lt||function(e,t){return pt.setTimeout(e,t)},xi=Si(Xr);function Ni(e,t,n){var r=t+"";return xi(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return wt(h,function(n){var r="_."+n[0];t&n[1]&&!xt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(ue):[]}(r),n)))}function Si(e){var t=0,n=0;return function(){var r=_n(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=qr(n,i),u=e[a];e[a]=e[n],e[n]=u}return e.length=t,e}var Di,Li,$i=(Di=Da(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)}),t},function(e){return 500===Li.size&&Li.clear(),e}),Li=Di.cache,Di);function Gi(e){if("string"==typeof e||uu(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mi(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Pi(e){if(e instanceof Yn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Eo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ji=Vr(function(e,t){return Fa(e)?cr(e,gr(t,1,Fa,!0)):[]}),Qi=Vr(function(e,t){var n=Hi(t);return Fa(n)&&(n=o),Fa(e)?cr(e,gr(t,1,Fa,!0),ai(n,2)):[]}),Wi=Vr(function(e,t){var n=Hi(t);return Fa(n)&&(n=o),Fa(e)?cr(e,gr(t,1,Fa,!0),o,n):[]});function Yi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:du(n);return o<0&&(o=mn(r+o,0)),Pt(e,ai(t,3),o)}function Ui(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=du(n),i=n<0?mn(r+i,0):yn(i,r-1)),Pt(e,ai(t,3),i,!0)}function Bi(e){return null!=e&&e.length?gr(e,1):[]}function qi(e){return e&&e.length?e[0]:o}var Fi=Vr(function(e){var t=St(e,go);return t.length&&t[0]===e[0]?Er(t):[]}),Vi=Vr(function(e){var t=Hi(e),n=St(e,go);return t===Hi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Er(n,ai(t,2)):[]}),zi=Vr(function(e){var t=Hi(e),n=St(e,go);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Er(n,o,t):[]});function Hi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ki=Vr(Zi);function Zi(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var Xi=ei(function(e,t){var n=null==e?0:e.length,r=or(e,t);return Br(e,St(t,function(e){return mi(e,n)?+e:e}).sort(Co)),r});function Ji(e){return null==e?e:bn.call(e)}var ea=Vr(function(e){return uo(gr(e,1,Fa,!0))}),ta=Vr(function(e){var t=Hi(e);return Fa(t)&&(t=o),uo(gr(e,1,Fa,!0),ai(t,2))}),na=Vr(function(e){var t=Hi(e);return t="function"==typeof t?t:o,uo(gr(e,1,Fa,!0),o,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=It(e,function(e){if(Fa(e))return t=mn(e.length,t),!0}),Vt(t,function(t){return St(e,Ut(t))})}function oa(e,t){if(!e||!e.length)return[];var n=ra(e);return null==t?n:St(n,function(e){return Ot(t,o,e)})}var ia=Vr(function(e,t){return Fa(e)?cr(e,t):[]}),aa=Vr(function(e){return fo(It(e,Fa))}),ua=Vr(function(e){var t=Hi(e);return Fa(t)&&(t=o),fo(It(e,Fa),ai(t,2))}),sa=Vr(function(e){var t=Hi(e);return t="function"==typeof t?t:o,fo(It(e,Fa),o,t)}),ca=Vr(ra),la=Vr(function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,oa(e,n)});function pa(e){var t=Pn(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var da=ei(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Yn&&mi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:o}),new Wn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)}),ha=xo(function(e,t,n){De.call(e,n)?++e[n]:rr(e,n,1)}),ga=Go(Yi),ma=Go(Ui);function ya(e,t){return(Ua(e)?wt:lr)(e,ai(t,3))}function _a(e,t){return(Ua(e)?At:pr)(e,ai(t,3))}var va=xo(function(e,t,n){De.call(e,n)?e[n].push(t):rr(e,n,[t])}),ka=Vr(function(e,t,n){var o=-1,i="function"==typeof t,a=qa(e)?r(e.length):[];return lr(e,function(e){a[++o]=i?Ot(t,e,n):Ir(e,t,n)}),a}),ba=xo(function(e,t,n){rr(e,n,t)});function Ta(e,t){return(Ua(e)?St:Gr)(e,ai(t,3))}var Oa=xo(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ca=Vr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,gr(t,1),[])}),wa=ct||function(){return pt.Date.now()};function Aa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Ho(e,c,o,o,o,o,t)}function Ea(e,t){var n;if("function"!=typeof t)throw new Ee(i);return e=du(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ia=Vr(function(e,t,n){var r=1;if(n.length){var o=un(n,ii(Ia));r|=s}return Ho(e,r,t,n,o)}),xa=Vr(function(e,t,n){var r=3;if(n.length){var o=un(n,ii(xa));r|=s}return Ho(t,r,e,n,o)});function Na(e,t,n){var r,a,u,s,c,l,p=0,f=!1,d=!1,h=!0;if("function"!=typeof e)throw new Ee(i);function g(t){var n=r,i=a;return r=a=o,p=t,s=e.apply(i,n)}function m(e){var n=e-l;return l===o||n>=t||n<0||d&&e-p>=u}function y(){var e=wa();if(m(e))return _(e);c=Ii(y,function(e){var n=t-(e-l);return d?yn(n,u-(e-p)):n}(e))}function _(e){return c=o,h&&r?g(e):(r=a=o,s)}function v(){var e=wa(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===o)return function(e){return p=e,c=Ii(y,t),f?g(e):s}(l);if(d)return ko(c),c=Ii(y,t),g(l)}return c===o&&(c=Ii(y,t)),s}return t=gu(t)||0,Ja(n)&&(f=!!n.leading,u=(d="maxWait"in n)?mn(gu(n.maxWait)||0,t):u,h="trailing"in n?!!n.trailing:h),v.cancel=function(){c!==o&&ko(c),p=0,r=l=a=c=o},v.flush=function(){return c===o?s:_(wa())},v}var Sa=Vr(function(e,t){return sr(e,1,t)}),Ra=Vr(function(e,t,n){return sr(e,gu(t)||0,n)});function Da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Da.Cache||qn),n}function La(e){if("function"!=typeof e)throw new Ee(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Da.Cache=qn;var $a=_o(function(e,t){var n=(t=1==t.length&&Ua(t[0])?St(t[0],Ht(ai())):St(gr(t,1),Ht(ai()))).length;return Vr(function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return Ot(e,this,r)})}),Ga=Vr(function(e,t){var n=un(t,ii(Ga));return Ho(e,s,o,t,n)}),Ma=Vr(function(e,t){var n=un(t,ii(Ma));return Ho(e,64,o,t,n)}),Pa=ei(function(e,t){return Ho(e,256,o,o,o,t)});function ja(e,t){return e===t||e!=e&&t!=t}var Qa=Bo(Cr),Wa=Bo(function(e,t){return e>=t}),Ya=xr(function(){return arguments}())?xr:function(e){return eu(e)&&De.call(e,"callee")&&!Fe.call(e,"callee")},Ua=r.isArray,Ba=yt?Ht(yt):function(e){return eu(e)&&Or(e)==S};function qa(e){return null!=e&&Xa(e.length)&&!Ka(e)}function Fa(e){return eu(e)&&qa(e)}var Va=mt||gs,za=_t?Ht(_t):function(e){return eu(e)&&Or(e)==_};function Ha(e){if(!eu(e))return!1;var t=Or(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ru(e)}function Ka(e){if(!Ja(e))return!1;var t=Or(e);return t==k||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==du(e)}function Xa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function Ja(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eu(e){return null!=e&&"object"==typeof e}var tu=vt?Ht(vt):function(e){return eu(e)&&fi(e)==T};function nu(e){return"number"==typeof e||eu(e)&&Or(e)==O}function ru(e){if(!eu(e)||Or(e)!=C)return!1;var t=Be(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==Me}var ou=kt?Ht(kt):function(e){return eu(e)&&Or(e)==A},iu=bt?Ht(bt):function(e){return eu(e)&&fi(e)==E};function au(e){return"string"==typeof e||!Ua(e)&&eu(e)&&Or(e)==I}function uu(e){return"symbol"==typeof e||eu(e)&&Or(e)==x}var su=Tt?Ht(Tt):function(e){return eu(e)&&Xa(e.length)&&!!ot[Or(e)]},cu=Bo($r),lu=Bo(function(e,t){return e<=t});function pu(e){if(!e)return[];if(qa(e))return au(e)?pn(e):Eo(e);if(He&&e[He])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[He]());var t=fi(e);return(t==T?on:t==E?sn:ju)(e)}function fu(e){return e?(e=gu(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function du(e){var t=fu(e),n=t%1;return t==t?n?t-n:t:0}function hu(e){return e?ir(du(e),0,d):0}function gu(e){if("number"==typeof e)return e;if(uu(e))return f;if(Ja(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ja(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var n=he.test(e);return n||me.test(e)?st(e.slice(2),n?2:8):de.test(e)?f:+e}function mu(e){return Io(e,Su(e))}function yu(e){return null==e?"":ao(e)}var _u=No(function(e,t){if(bi(t)||qa(t))Io(t,Nu(t),e);else for(var n in t)De.call(t,n)&&Jn(e,n,t[n])}),vu=No(function(e,t){Io(t,Su(t),e)}),ku=No(function(e,t,n,r){Io(t,Su(t),e,r)}),bu=No(function(e,t,n,r){Io(t,Nu(t),e,r)}),Tu=ei(or),Ou=Vr(function(e,t){e=Ce(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],u=Su(a),s=-1,c=u.length;++s<c;){var l=u[s],p=e[l];(p===o||ja(p,Ne[l])&&!De.call(e,l))&&(e[l]=a[l])}return e}),Cu=Vr(function(e){return e.push(o,Zo),Ot(Du,o,e)});function wu(e,t,n){var r=null==e?o:br(e,t);return r===o?n:r}function Au(e,t){return null!=e&&di(e,t,Ar)}var Eu=jo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ge.call(t)),e[t]=n},Ju(ns)),Iu=jo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ge.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]},ai),xu=Vr(Ir);function Nu(e){return qa(e)?zn(e):Lr(e)}function Su(e){return qa(e)?zn(e,!0):function(e){if(!Ja(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=bi(e),n=[];for(var r in e)("constructor"!=r||!t&&De.call(e,r))&&n.push(r);return n}(e)}var Ru=No(function(e,t,n){jr(e,t,n)}),Du=No(function(e,t,n,r){jr(e,t,n,r)}),Lu=ei(function(e,t){var n={};if(null==e)return n;var r=!1;t=St(t,function(t){return t=yo(t,e),r||(r=t.length>1),t}),Io(e,ni(e),n),r&&(n=ar(n,7,Xo));for(var o=t.length;o--;)so(n,t[o]);return n}),$u=ei(function(e,t){return null==e?{}:function(e,t){return Yr(e,t,function(t,n){return Au(e,n)})}(e,t)});function Gu(e,t){if(null==e)return{};var n=St(ni(e),function(e){return[e]});return t=ai(t),Yr(e,n,function(e,n){return t(e,n[0])})}var Mu=zo(Nu),Pu=zo(Su);function ju(e){return null==e?[]:Kt(e,Nu(e))}var Qu=Lo(function(e,t,n){return t=t.toLowerCase(),e+(n?Wu(t):t)});function Wu(e){return Hu(yu(e).toLowerCase())}function Yu(e){return(e=yu(e))&&e.replace(_e,en).replace(Ze,"")}var Uu=Lo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Bu=Lo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),qu=Do("toLowerCase"),Fu=Lo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Vu=Lo(function(e,t,n){return e+(n?" ":"")+Hu(t)}),zu=Lo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Hu=Do("toUpperCase");function Ku(e,t,n){return e=yu(e),(t=n?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Zu=Vr(function(e,t){try{return Ot(e,o,t)}catch(e){return Ha(e)?e:new be(e)}}),Xu=ei(function(e,t){return wt(t,function(t){t=Gi(t),rr(e,t,Ia(e[t],e))}),e});function Ju(e){return function(){return e}}var es=Mo(),ts=Mo(!0);function ns(e){return e}function rs(e){return Dr("function"==typeof e?e:ar(e,1))}var os=Vr(function(e,t){return function(n){return Ir(n,e,t)}}),is=Vr(function(e,t){return function(n){return Ir(e,n,t)}});function as(e,t,n){var r=Nu(t),o=kr(t,r);null!=n||Ja(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=kr(t,Nu(t)));var i=!(Ja(n)&&"chain"in n&&!n.chain),a=Ka(e);return wt(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Eo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Rt([this.value()],arguments))})}),e}function us(){}var ss=Wo(St),cs=Wo(Et),ls=Wo($t);function ps(e){return _i(e)?Ut(Gi(e)):function(e){return function(t){return br(t,e)}}(e)}var fs=Uo(),ds=Uo(!0);function hs(){return[]}function gs(){return!1}var ms,ys=Qo(function(e,t){return e+t},0),_s=Fo("ceil"),vs=Qo(function(e,t){return e/t},1),ks=Fo("floor"),bs=Qo(function(e,t){return e*t},1),Ts=Fo("round"),Os=Qo(function(e,t){return e-t},0);return Pn.after=function(e,t){if("function"!=typeof t)throw new Ee(i);return e=du(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=Aa,Pn.assign=_u,Pn.assignIn=vu,Pn.assignInWith=ku,Pn.assignWith=bu,Pn.at=Tu,Pn.before=Ea,Pn.bind=Ia,Pn.bindAll=Xu,Pn.bindKey=xa,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},Pn.chain=pa,Pn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===o)?1:mn(du(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,u=0,s=r(ft(i/t));a<i;)s[u++]=eo(e,a,a+=t);return s},Pn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Pn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Rt(Ua(n)?Eo(n):[n],gr(t,1))},Pn.cond=function(e){var t=null==e?0:e.length,n=ai();return e=t?St(e,function(e){if("function"!=typeof e[1])throw new Ee(i);return[n(e[0]),e[1]]}):[],Vr(function(n){for(var r=-1;++r<t;){var o=e[r];if(Ot(o[0],this,n))return Ot(o[1],this,n)}})},Pn.conforms=function(e){return function(e){var t=Nu(e);return function(n){return ur(n,e,t)}}(ar(e,1))},Pn.constant=Ju,Pn.countBy=ha,Pn.create=function(e,t){var n=jn(e);return null==t?n:nr(n,t)},Pn.curry=function e(t,n,r){var i=Ho(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Pn.curryRight=function e(t,n,r){var i=Ho(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Pn.debounce=Na,Pn.defaults=Ou,Pn.defaultsDeep=Cu,Pn.defer=Sa,Pn.delay=Ra,Pn.difference=ji,Pn.differenceBy=Qi,Pn.differenceWith=Wi,Pn.drop=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=n||t===o?1:du(t))<0?0:t,r):[]},Pn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,0,(t=r-(t=n||t===o?1:du(t)))<0?0:t):[]},Pn.dropRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0,!0):[]},Pn.dropWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0):[]},Pn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=du(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:du(r))<0&&(r+=i),r=n>r?0:hu(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Pn.filter=function(e,t){return(Ua(e)?It:hr)(e,ai(t,3))},Pn.flatMap=function(e,t){return gr(Ta(e,t),1)},Pn.flatMapDeep=function(e,t){return gr(Ta(e,t),l)},Pn.flatMapDepth=function(e,t,n){return n=n===o?1:du(n),gr(Ta(e,t),n)},Pn.flatten=Bi,Pn.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},Pn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===o?1:du(t)):[]},Pn.flip=function(e){return Ho(e,512)},Pn.flow=es,Pn.flowRight=ts,Pn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];rr(r,o[0],o[1])}return r},Pn.functions=function(e){return null==e?[]:kr(e,Nu(e))},Pn.functionsIn=function(e){return null==e?[]:kr(e,Su(e))},Pn.groupBy=va,Pn.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Pn.intersection=Fi,Pn.intersectionBy=Vi,Pn.intersectionWith=zi,Pn.invert=Eu,Pn.invertBy=Iu,Pn.invokeMap=ka,Pn.iteratee=rs,Pn.keyBy=ba,Pn.keys=Nu,Pn.keysIn=Su,Pn.map=Ta,Pn.mapKeys=function(e,t){var n={};return t=ai(t,3),_r(e,function(e,r,o){rr(n,t(e,r,o),e)}),n},Pn.mapValues=function(e,t){var n={};return t=ai(t,3),_r(e,function(e,r,o){rr(n,r,t(e,r,o))}),n},Pn.matches=function(e){return Mr(ar(e,1))},Pn.matchesProperty=function(e,t){return Pr(e,ar(t,1))},Pn.memoize=Da,Pn.merge=Ru,Pn.mergeWith=Du,Pn.method=os,Pn.methodOf=is,Pn.mixin=as,Pn.negate=La,Pn.nthArg=function(e){return e=du(e),Vr(function(t){return Qr(t,e)})},Pn.omit=Lu,Pn.omitBy=function(e,t){return Gu(e,La(ai(t)))},Pn.once=function(e){return Ea(2,e)},Pn.orderBy=function(e,t,n,r){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(n=r?o:n)||(n=null==n?[]:[n]),Wr(e,t,n))},Pn.over=ss,Pn.overArgs=$a,Pn.overEvery=cs,Pn.overSome=ls,Pn.partial=Ga,Pn.partialRight=Ma,Pn.partition=Oa,Pn.pick=$u,Pn.pickBy=Gu,Pn.property=ps,Pn.propertyOf=function(e){return function(t){return null==e?o:br(e,t)}},Pn.pull=Ki,Pn.pullAll=Zi,Pn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,ai(n,2)):e},Pn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,o,n):e},Pn.pullAt=Xi,Pn.range=fs,Pn.rangeRight=ds,Pn.rearg=Pa,Pn.reject=function(e,t){return(Ua(e)?It:hr)(e,La(ai(t,3)))},Pn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ai(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Br(e,o),n},Pn.rest=function(e,t){if("function"!=typeof e)throw new Ee(i);return Vr(e,t=t===o?t:du(t))},Pn.reverse=Ji,Pn.sampleSize=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:du(t),(Ua(e)?Kn:Hr)(e,t)},Pn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},Pn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Kr(e,t,n,r)},Pn.shuffle=function(e){return(Ua(e)?Zn:Jr)(e)},Pn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&yi(e,t,n)?(t=0,n=r):(t=null==t?0:du(t),n=n===o?r:du(n)),eo(e,t,n)):[]},Pn.sortBy=Ca,Pn.sortedUniq=function(e){return e&&e.length?oo(e):[]},Pn.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ai(t,2)):[]},Pn.split=function(e,t,n){return n&&"number"!=typeof n&&yi(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=yu(e))&&("string"==typeof t||null!=t&&!ou(t))&&!(t=ao(t))&&rn(e)?vo(pn(e),0,n):e.split(t,n):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new Ee(i);return t=null==t?0:mn(du(t),0),Vr(function(n){var r=n[t],o=vo(n,0,t);return r&&Rt(o,r),Ot(e,this,o)})},Pn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Pn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:du(t))<0?0:t):[]},Pn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:du(t)))<0?0:t,r):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?lo(e,ai(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Ee(i);return Ja(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Na(e,t,{leading:r,maxWait:t,trailing:o})},Pn.thru=fa,Pn.toArray=pu,Pn.toPairs=Mu,Pn.toPairsIn=Pu,Pn.toPath=function(e){return Ua(e)?St(e,Gi):uu(e)?[e]:Eo($i(yu(e)))},Pn.toPlainObject=mu,Pn.transform=function(e,t,n){var r=Ua(e),o=r||Va(e)||su(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ja(e)&&Ka(i)?jn(Be(e)):{}}return(o?wt:_r)(e,function(e,r,o){return t(n,e,r,o)}),n},Pn.unary=function(e){return Aa(e,1)},Pn.union=ea,Pn.unionBy=ta,Pn.unionWith=na,Pn.uniq=function(e){return e&&e.length?uo(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?uo(e,ai(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},Pn.unset=function(e,t){return null==e||so(e,t)},Pn.unzip=ra,Pn.unzipWith=oa,Pn.update=function(e,t,n){return null==e?e:co(e,t,mo(n))},Pn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:co(e,t,mo(n),r)},Pn.values=ju,Pn.valuesIn=function(e){return null==e?[]:Kt(e,Su(e))},Pn.without=ia,Pn.words=Ku,Pn.wrap=function(e,t){return Ga(mo(t),e)},Pn.xor=aa,Pn.xorBy=ua,Pn.xorWith=sa,Pn.zip=ca,Pn.zipObject=function(e,t){return ho(e||[],t||[],Jn)},Pn.zipObjectDeep=function(e,t){return ho(e||[],t||[],Kr)},Pn.zipWith=la,Pn.entries=Mu,Pn.entriesIn=Pu,Pn.extend=vu,Pn.extendWith=ku,as(Pn,Pn),Pn.add=ys,Pn.attempt=Zu,Pn.camelCase=Qu,Pn.capitalize=Wu,Pn.ceil=_s,Pn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=gu(n))==n?n:0),t!==o&&(t=(t=gu(t))==t?t:0),ir(gu(e),t,n)},Pn.clone=function(e){return ar(e,4)},Pn.cloneDeep=function(e){return ar(e,5)},Pn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},Pn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},Pn.conformsTo=function(e,t){return null==t||ur(e,t,Nu(t))},Pn.deburr=Yu,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=vs,Pn.endsWith=function(e,t,n){e=yu(e),t=ao(t);var r=e.length,i=n=n===o?r:ir(du(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Pn.eq=ja,Pn.escape=function(e){return(e=yu(e))&&z.test(e)?e.replace(F,tn):e},Pn.escapeRegExp=function(e){return(e=yu(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Pn.every=function(e,t,n){var r=Ua(e)?Et:fr;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},Pn.find=ga,Pn.findIndex=Yi,Pn.findKey=function(e,t){return Mt(e,ai(t,3),_r)},Pn.findLast=ma,Pn.findLastIndex=Ui,Pn.findLastKey=function(e,t){return Mt(e,ai(t,3),vr)},Pn.floor=ks,Pn.forEach=ya,Pn.forEachRight=_a,Pn.forIn=function(e,t){return null==e?e:mr(e,ai(t,3),Su)},Pn.forInRight=function(e,t){return null==e?e:yr(e,ai(t,3),Su)},Pn.forOwn=function(e,t){return e&&_r(e,ai(t,3))},Pn.forOwnRight=function(e,t){return e&&vr(e,ai(t,3))},Pn.get=wu,Pn.gt=Qa,Pn.gte=Wa,Pn.has=function(e,t){return null!=e&&di(e,t,wr)},Pn.hasIn=Au,Pn.head=qi,Pn.identity=ns,Pn.includes=function(e,t,n,r){e=qa(e)?e:ju(e),n=n&&!r?du(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),au(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&jt(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:du(n);return o<0&&(o=mn(r+o,0)),jt(e,t,o)},Pn.inRange=function(e,t,n){return t=fu(t),n===o?(n=t,t=0):n=fu(n),function(e,t,n){return e>=yn(t,n)&&e<mn(t,n)}(e=gu(e),t,n)},Pn.invoke=xu,Pn.isArguments=Ya,Pn.isArray=Ua,Pn.isArrayBuffer=Ba,Pn.isArrayLike=qa,Pn.isArrayLikeObject=Fa,Pn.isBoolean=function(e){return!0===e||!1===e||eu(e)&&Or(e)==y},Pn.isBuffer=Va,Pn.isDate=za,Pn.isElement=function(e){return eu(e)&&1===e.nodeType&&!ru(e)},Pn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||Va(e)||su(e)||Ya(e)))return!e.length;var t=fi(e);if(t==T||t==E)return!e.size;if(bi(e))return!Lr(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},Pn.isEqual=function(e,t){return Nr(e,t)},Pn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Nr(e,t,o,n):!!r},Pn.isError=Ha,Pn.isFinite=function(e){return"number"==typeof e&&Gt(e)},Pn.isFunction=Ka,Pn.isInteger=Za,Pn.isLength=Xa,Pn.isMap=tu,Pn.isMatch=function(e,t){return e===t||Sr(e,t,si(t))},Pn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Sr(e,t,si(t),n)},Pn.isNaN=function(e){return nu(e)&&e!=+e},Pn.isNative=function(e){if(ki(e))throw new be("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Pn.isNil=function(e){return null==e},Pn.isNull=function(e){return null===e},Pn.isNumber=nu,Pn.isObject=Ja,Pn.isObjectLike=eu,Pn.isPlainObject=ru,Pn.isRegExp=ou,Pn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=p},Pn.isSet=iu,Pn.isString=au,Pn.isSymbol=uu,Pn.isTypedArray=su,Pn.isUndefined=function(e){return e===o},Pn.isWeakMap=function(e){return eu(e)&&fi(e)==N},Pn.isWeakSet=function(e){return eu(e)&&"[object WeakSet]"==Or(e)},Pn.join=function(e,t){return null==e?"":Bt.call(e,t)},Pn.kebabCase=Uu,Pn.last=Hi,Pn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=du(n))<0?mn(r+i,0):yn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Pt(e,Wt,i,!0)},Pn.lowerCase=Bu,Pn.lowerFirst=qu,Pn.lt=cu,Pn.lte=lu,Pn.max=function(e){return e&&e.length?dr(e,ns,Cr):o},Pn.maxBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Cr):o},Pn.mean=function(e){return Yt(e,ns)},Pn.meanBy=function(e,t){return Yt(e,ai(t,2))},Pn.min=function(e){return e&&e.length?dr(e,ns,$r):o},Pn.minBy=function(e,t){return e&&e.length?dr(e,ai(t,2),$r):o},Pn.stubArray=hs,Pn.stubFalse=gs,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=bs,Pn.nth=function(e,t){return e&&e.length?Qr(e,du(t)):o},Pn.noConflict=function(){return pt._===this&&(pt._=Pe),this},Pn.noop=us,Pn.now=wa,Pn.pad=function(e,t,n){e=yu(e);var r=(t=du(t))?ln(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Yo(dt(o),n)+e+Yo(ft(o),n)},Pn.padEnd=function(e,t,n){e=yu(e);var r=(t=du(t))?ln(e):0;return t&&r<t?e+Yo(t-r,n):e},Pn.padStart=function(e,t,n){e=yu(e);var r=(t=du(t))?ln(e):0;return t&&r<t?Yo(t-r,n)+e:e},Pn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),vn(yu(e).replace(re,""),t||0)},Pn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=fu(e),t===o?(t=e,e=0):t=fu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=kn();return yn(e+i*(t-e+ut("1e-"+((i+"").length-1))),t)}return qr(e,t)},Pn.reduce=function(e,t,n){var r=Ua(e)?Dt:qt,o=arguments.length<3;return r(e,ai(t,4),n,o,lr)},Pn.reduceRight=function(e,t,n){var r=Ua(e)?Lt:qt,o=arguments.length<3;return r(e,ai(t,4),n,o,pr)},Pn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:du(t),Fr(yu(e),t)},Pn.replace=function(){var e=arguments,t=yu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,n){var r=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Gi(t[r])];a===o&&(r=i,a=n),e=Ka(a)?a.call(e):a}return e},Pn.round=Ts,Pn.runInContext=e,Pn.sample=function(e){return(Ua(e)?Hn:zr)(e)},Pn.size=function(e){if(null==e)return 0;if(qa(e))return au(e)?ln(e):e.length;var t=fi(e);return t==T||t==E?e.size:Lr(e).length},Pn.snakeCase=Fu,Pn.some=function(e,t,n){var r=Ua(e)?$t:to;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},Pn.sortedIndex=function(e,t){return no(e,t)},Pn.sortedIndexBy=function(e,t,n){return ro(e,t,ai(n,2))},Pn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=no(e,t);if(r<n&&ja(e[r],t))return r}return-1},Pn.sortedLastIndex=function(e,t){return no(e,t,!0)},Pn.sortedLastIndexBy=function(e,t,n){return ro(e,t,ai(n,2),!0)},Pn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=no(e,t,!0)-1;if(ja(e[n],t))return n}return-1},Pn.startCase=Vu,Pn.startsWith=function(e,t,n){return e=yu(e),n=null==n?0:ir(du(n),0,e.length),t=ao(t),e.slice(n,n+t.length)==t},Pn.subtract=Os,Pn.sum=function(e){return e&&e.length?Ft(e,ns):0},Pn.sumBy=function(e,t){return e&&e.length?Ft(e,ai(t,2)):0},Pn.template=function(e,t,n){var r=Pn.templateSettings;n&&yi(e,t,n)&&(t=o),e=yu(e),t=bu({},t,r,Ko);var i=bu({},t.imports,r.imports,Ko),a=Nu(i),u=Kt(i,a);wt(a,function(e){if(ce.test(e))throw new be("Invalid `imports` option passed into `_.template`")});var s,c,l=0,p=t.interpolate||ve,f="__p += '",d=we((t.escape||ve).source+"|"+p.source+"|"+(p===Z?pe:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),h="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,function(t,n,r,o,i,a){return r||(r=o),f+=e.slice(l,a).replace(ke,nn),n&&(s=!0,f+="' +\n__e("+n+") +\n'"),i&&(c=!0,f+="';\n"+i+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+t.length,t}),f+="';\n";var g=De.call(t,"variable")&&t.variable;if(g){if(ce.test(g))throw new be("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(c?f.replace(Y,""):f).replace(U,"$1").replace(B,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Zu(function(){return Te(a,h+"return "+f).apply(o,u)});if(m.source=f,Ha(m))throw m;return m},Pn.times=function(e,t){if((e=du(e))<1||e>p)return[];var n=d,r=yn(e,d);t=ai(t),e-=d;for(var o=Vt(r,t);++n<e;)t(n);return o},Pn.toFinite=fu,Pn.toInteger=du,Pn.toLength=hu,Pn.toLower=function(e){return yu(e).toLowerCase()},Pn.toNumber=gu,Pn.toSafeInteger=function(e){return e?ir(du(e),-9007199254740991,p):0===e?e:0},Pn.toString=yu,Pn.toUpper=function(e){return yu(e).toUpperCase()},Pn.trim=function(e,t,n){if((e=yu(e))&&(n||t===o))return zt(e);if(!e||!(t=ao(t)))return e;var r=pn(e),i=pn(t);return vo(r,Xt(r,i),Jt(r,i)+1).join("")},Pn.trimEnd=function(e,t,n){if((e=yu(e))&&(n||t===o))return e.slice(0,fn(e)+1);if(!e||!(t=ao(t)))return e;var r=pn(e);return vo(r,0,Jt(r,pn(t))+1).join("")},Pn.trimStart=function(e,t,n){if((e=yu(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=ao(t)))return e;var r=pn(e);return vo(r,Xt(r,pn(t))).join("")},Pn.truncate=function(e,t){var n=30,r="...";if(Ja(t)){var i="separator"in t?t.separator:i;n="length"in t?du(t.length):n,r="omission"in t?ao(t.omission):r}var a=(e=yu(e)).length;if(rn(e)){var u=pn(e);a=u.length}if(n>=a)return e;var s=n-ln(r);if(s<1)return r;var c=u?vo(u,0,s).join(""):e.slice(0,s);if(i===o)return c+r;if(u&&(s+=c.length-s),ou(i)){if(e.slice(s).search(i)){var l,p=c;for(i.global||(i=we(i.source,yu(fe.exec(i))+"g")),i.lastIndex=0;l=i.exec(p);)var f=l.index;c=c.slice(0,f===o?s:f)}}else if(e.indexOf(ao(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},Pn.unescape=function(e){return(e=yu(e))&&V.test(e)?e.replace(q,dn):e},Pn.uniqueId=function(e){var t=++Le;return yu(e)+t},Pn.upperCase=zu,Pn.upperFirst=Hu,Pn.each=ya,Pn.eachRight=_a,Pn.first=qi,as(Pn,(ms={},_r(Pn,function(e,t){De.call(Pn.prototype,t)||(ms[t]=e)}),ms),{chain:!1}),Pn.VERSION="4.18.1",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Pn[e].placeholder=Pn}),wt(["drop","take"],function(e,t){Yn.prototype[e]=function(n){n=n===o?1:mn(du(n),0);var r=this.__filtered__&&!t?new Yn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Yn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),wt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Yn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),wt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Yn.prototype[e]=function(){return this[n](1).value()[0]}}),wt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Yn.prototype[e]=function(){return this.__filtered__?new Yn(this):this[n](1)}}),Yn.prototype.compact=function(){return this.filter(ns)},Yn.prototype.find=function(e){return this.filter(e).head()},Yn.prototype.findLast=function(e){return this.reverse().find(e)},Yn.prototype.invokeMap=Vr(function(e,t){return"function"==typeof e?new Yn(this):this.map(function(n){return Ir(n,e,t)})}),Yn.prototype.reject=function(e){return this.filter(La(ai(e)))},Yn.prototype.slice=function(e,t){e=du(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Yn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=du(t))<0?n.dropRight(-t):n.take(t-e)),n)},Yn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yn.prototype.toArray=function(){return this.take(d)},_r(Yn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Pn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Pn.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,s=t instanceof Yn,c=u[0],l=s||Ua(t),p=function(e){var t=i.apply(Pn,Rt([e],u));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var f=this.__chain__,d=!!this.__actions__.length,h=a&&!f,g=s&&!d;if(!a&&l){t=g?t:new Yn(this);var m=e.apply(t,u);return m.__actions__.push({func:fa,args:[p],thisArg:o}),new Wn(m,f)}return h&&g?e.apply(this,u):(m=this.thru(p),h?r?m.value()[0]:m.value():m)})}),wt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ie[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ua(o)?o:[],e)}return this[n](function(n){return t.apply(Ua(n)?n:[],e)})}}),_r(Yn.prototype,function(e,t){var n=Pn[t];if(n){var r=n.name+"";De.call(xn,r)||(xn[r]=[]),xn[r].push({name:t,func:n})}}),xn[Po(o,2).name]=[{name:"wrapper",func:o}],Yn.prototype.clone=function(){var e=new Yn(this.__wrapped__);return e.__actions__=Eo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Eo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Eo(this.__views__),e},Yn.prototype.reverse=function(){if(this.__filtered__){var e=new Yn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,s=u-a,c=r?u:a-1,l=this.__iteratees__,p=l.length,f=0,d=yn(s,this.__takeCount__);if(!n||!r&&o==s&&d==s)return po(e,this.__actions__);var h=[];e:for(;s--&&f<d;){for(var g=-1,m=e[c+=t];++g<p;){var y=l[g],_=y.iteratee,v=y.type,k=_(m);if(2==v)m=k;else if(!k){if(1==v)continue e;break e}}h[f++]=m}return h},Pn.prototype.at=da,Pn.prototype.chain=function(){return pa(this)},Pn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Pn.prototype.next=function(){this.__values__===o&&(this.__values__=pu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,n=this;n instanceof Qn;){var r=Pi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yn){var t=e;return this.__actions__.length&&(t=new Yn(this)),(t=t.reverse()).__actions__.push({func:fa,args:[Ji],thisArg:o}),new Wn(t,this.__chain__)}return this.thru(Ji)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return po(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,He&&(Pn.prototype[He]=function(){return this}),Pn}();pt._=hn,(r=function(){return hn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],i=t[r++];n.o(e,o)?0===i&&r++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);let r={};(()=>{"use strict";n.r(r),n.d(r,{ApiCallContext:()=>Ft,CronExpression:()=>Vt,DistributedLockContext:()=>zt,FUNCTION_AFFINITY_SCOPES:()=>W,GraphqlContext:()=>Ht,MUTATION_TYPES:()=>Zt,Meta:()=>U,MutationContext:()=>Xt,QueryContext:()=>ct,SOURCE_CODE_ANALYZER_MODELS:()=>e.SOURCE_CODE_ANALYZER_MODELS,SOURCE_CODE_ANALYZE_FUNCTION_ID:()=>e.SOURCE_CODE_ANALYZE_FUNCTION_ID,SOURCE_CODE_INTEGRATION_TYPES:()=>e.SOURCE_CODE_INTEGRATION_TYPES,SOURCE_CODE_MAX_REPOSITORIES:()=>e.SOURCE_CODE_MAX_REPOSITORIES,SOURCE_CODE_MAX_SUPPLEMENTAL_INSTRUCTIONS_LENGTH:()=>e.SOURCE_CODE_MAX_SUPPLEMENTAL_INSTRUCTIONS_LENGTH,SOURCE_CONTROL_PROVIDERS:()=>e.SOURCE_CONTROL_PROVIDERS,SecureAiAgentContext:()=>qt,SecureLangGraphContext:()=>Kt,SquidLlmService:()=>Ut,SquidProject:()=>Bt,SquidService:()=>Gt,USER_CODE_MODULE_ID:()=>Ce,USER_CODE_MODULE_IDS:()=>Ae,USER_CODE_PYTHON_MODULE_ID:()=>we,WorkspaceClient:()=>Dt,aiFunction:()=>oe,aiFunctionsConfigurator:()=>ie,clientConnectionStateHandler:()=>ve,createWebhookResponse:()=>Jt,eventHandler:()=>ne,executable:()=>re,getPassiveSquid:()=>Yt,getSquid:()=>Wt,getSquidService:()=>Pt,isWorkspaceServerConfigured:()=>Rt,limiterConfigToOptions:()=>Te,limits:()=>de,llmAsk:()=>ge,llmService:()=>he,mcpAuthorizer:()=>_e,mcpServer:()=>me,mcpTool:()=>ye,metadata:()=>q,normalizeBitbucketRepositorySelection:()=>e.normalizeBitbucketRepositorySelection,normalizeGitHubRepositorySelection:()=>e.normalizeGitHubRepositorySelection,onQueueMessage:()=>te,publicCollection:()=>H,scheduler:()=>ue,secureAiAgent:()=>pe,secureAiQuery:()=>V,secureApi:()=>J,secureCollection:()=>z,secureDatabase:()=>F,secureDistributedLock:()=>le,secureGraphQL:()=>ee,secureLangGraph:()=>fe,secureMetric:()=>X,secureNativeQuery:()=>ce,secureStorage:()=>K,secureTopic:()=>Z,squidInject:()=>jt,trigger:()=>ae,webhook:()=>se});const e=require("@squidcloud/client");let t=e=>new Error(e);function o(e,n,...r){e||function(e,...n){const r=a(e);if("object"==typeof r)throw r;throw t(r||"Assertion error",...n)}(n,...r)}function i(e,t,...n){return o(e,t,...n),e}function a(e){return void 0===e?"":"string"==typeof e?e:e()}const u=(e,t=void 0)=>{o(function(e){return"string"==typeof e}(e),()=>function(e,t,n){const r=a(e);if("object"==typeof r)throw r;return`${r?`${r}: `:""}${t} ${function(e){return void 0===e?"<undefined>":"symbol"==typeof e?e.toString():null===e?"<null>":`<${typeof e}:${e}>`}(n)}`}(t,"Not a string",e))};function s(e,t){return e instanceof Error?e.message:null!=t?t:`${e}`}const c=/^[A-Za-z0-9_-]{1,64}$/;function l(e,t){o(function(e){return c.test(e)}(e),`Invalid @aiFunction id "${e}"${t?` on ${t}`:""}: it must be 1–64 characters of letters, digits, "_" and "-" — the tool-name charset LLM providers accept.`)}function p(e){const t=e.split(":");return o(2===t.length,`Invalid service function name: ${e}`),t[1]}Object.keys({cpuMillis:{min:100,max:2e3},memoryMi:{min:512,max:8192},pythonMemoryMb:{min:256,max:8192},pythonMaxCpus:{min:1,max:4},forcedPythonsPerPod:{min:2,max:100},minPods:{min:1,max:20},maxPods:{min:1,max:50}});var f=n(243);const d=new Set(["date","time","date-time","duration","uri","uri-reference","uri-template","url","email","hostname","ipv4","ipv6","regex","uuid","json-pointer","json-pointer-uri-fragment","relative-json-pointer","byte","int32","int64","float","double","password","binary"]),h=new Set(["object","array","string","number","integer","boolean","null"]),g=new Set(["title","description","default","examples","deprecated","readOnly","writeOnly","$comment"]),m=new Set(["$schema","$id","$defs","definitions"]),y=new Set(["$schema","$id","$defs","definitions","$comment","discriminator"]),_=new Set(["minLength","maxLength","minItems","maxItems","minProperties","maxProperties"]),v=new Set(["minimum","maximum","exclusiveMinimum","exclusiveMaximum"]),k=["type","enum","const","anyOf","oneOf","$ref","allOf"];function b(e){const t=`Parameter '${e.name}'`;if("object"!==e.type)return S(e.schema)?[]:[`${t}: 'schema' is only supported on 'object' parameters.`];const n=[];return S(e.enum)||n.push(`${t}: 'enum' is not supported on 'object' parameters; put it inside 'schema'.`),R(e.schema)?(n.push(...function(e){const t=[];if("object"!==e.type&&t.push("#: the root must declare type 'object'."),T(e,e,"#",0,t),t.length)return t;try{const n=E(e,e,[],{nodes:0},0),r=JSON.stringify(n).length;r>65536&&t.push(`#: is ${r} characters once '$ref's are inlined; the limit is 65536.`)}catch(e){t.push(s(e))}return t}(e.schema).map(e=>`${t} schema ${e}`)),n):(n.push(`${t}: an 'object' parameter requires a JSON Schema object in 'schema'.`),n)}function T(e,t,n,r,o){if(r>16)return void o.push(`${n}: nests deeper than 16 levels.`);const i=e===t;for(const[a,u]of Object.entries(e)){const s=`${n}/${G(a)}`;if(!a.startsWith("x-")&&"discriminator"!==a)if(!m.has(a)||i)switch(a){case"properties":case"$defs":case"definitions":if(!R(u)){o.push(`${s}: must be an object.`);break}for(const[e,n]of Object.entries(u))O(n,t,`${s}/${G(e)}`,r,o);break;case"items":case"propertyNames":O(u,t,s,r,o);break;case"additionalProperties":"boolean"!=typeof u&&O(u,t,s,r,o);break;case"anyOf":case"oneOf":case"allOf":C(a,u,e,t,s,r,o);break;case"$ref":w(u,e,t,s,o);break;case"type":L(u)||o.push(`${s}: must be a JSON type name or a non-empty list of distinct ones.`);break;case"required":D(u)||o.push(`${s}: must be a list of distinct property names.`);break;case"enum":Array.isArray(u)&&u.length||o.push(`${s}: must be a non-empty list.`);break;case"examples":Array.isArray(u)||o.push(`${s}: must be a list.`);break;case"const":case"default":break;case"pattern":$(u)||o.push(`${s}: must be a valid regular expression.`);break;case"format":"string"==typeof u&&d.has(u)||o.push(`${s}: unsupported format; use one of ${[...d].join(", ")}.`);break;case"multipleOf":"number"==typeof u&&u>0||o.push(`${s}: must be a number greater than 0.`);break;case"uniqueItems":case"deprecated":case"readOnly":case"writeOnly":"boolean"!=typeof u&&o.push(`${s}: must be a boolean.`);break;case"title":case"description":case"$comment":case"$schema":case"$id":"string"!=typeof u&&o.push(`${s}: must be a string.`);break;default:_.has(a)?(!Number.isInteger(u)||u<0)&&o.push(`${s}: must be a non-negative integer.`):v.has(a)?"number"==typeof u&&Number.isFinite(u)||o.push(`${s}: must be a number.`):o.push(`${s}: unsupported keyword.`)}else o.push(`${s}: is only supported at the root of the schema.`)}var a;((a=e.type)==="array"||Array.isArray(a)&&a.includes("array"))&&void 0===e.items&&o.push(`${n}: an array schema must declare 'items'.`),k.some(t=>void 0!==e[t])||o.push(`${n}: must declare 'type' (or 'enum', 'const', 'anyOf', 'oneOf' or '$ref').`),void 0===e.properties||void 0===e.anyOf&&void 0===e.oneOf||o.push(`${n}: cannot combine 'properties' with 'anyOf' or 'oneOf'; list the properties in each branch.`),function(e,t,n){const{required:r,properties:o,additionalProperties:i}=e;if(!D(r)||!function(e,t){return!1===t||void 0===t&&void 0!==e}(o,i))return;const a=R(o)?o:{},u=r.filter(e=>!(e in a));u.length&&n.push(`${t}/required: ${u.join(", ")} not declared in 'properties' of a closed object.`)}(e,n,o)}function O(e,t,n,r,o){R(e)?T(e,t,n,r+1,o):o.push(`${n}: must be a schema object.`)}function C(e,t,n,r,o,i,a){Array.isArray(t)&&t.length?("allOf"===e&&(t.length>1&&a.push(`${o}: only a single-element 'allOf' is supported.`),A(n,e,o,a)),t.forEach((e,t)=>O(e,r,`${o}/${t}`,i,a))):a.push(`${o}: must be a non-empty list of schemas.`)}function w(e,t,n,r,o){"string"==typeof e&&e.startsWith("#")?(R(x(n,e))||o.push(`${r}: '${e}' does not point to a schema in this schema.`),A(t,"$ref",r,o)):o.push(`${r}: only local references ('#/...') are supported.`)}function A(e,t,n,r){const o=Object.keys(e).filter(e=>e!==t&&!g.has(e)&&!y.has(e)&&!e.startsWith("x-"));o.length&&r.push(`${n}: '${t}' can only be combined with annotations, not with ${o.join(", ")}.`)}function E(e,t,n,r,i){o(++r.nodes<=5e3,"#: expands to more than 5000 schemas once '$ref's are inlined."),o(i<=16,"#: nests deeper than 16 levels once '$ref's are inlined.");const a=e.$ref;if("string"==typeof a){o(!n.includes(a),`#: '${a}' is recursive; recursive schemas are not supported.`);const u=x(t,a);return o(R(u),`#: '${a}' does not point to a schema in this schema.`),I(E(u,t,[...n,a],r,i),e)}const u=e.allOf;if(Array.isArray(u))return I(E(u[0],t,n,r,i),e);const s={};for(const[o,a]of Object.entries(e))if(!y.has(o)&&!o.startsWith("x-"))if("properties"===o){const e={};for(const[o,u]of Object.entries(a))e[o]=E(u,t,n,r,i+1);s[o]=e}else"items"===o||"propertyNames"===o||"additionalProperties"===o&&R(a)?s[o]=E(a,t,n,r,i+1):s[o]="anyOf"===o||"oneOf"===o?a.map(e=>E(e,t,n,r,i+1)):a;return void 0!==s.properties&&void 0===s.additionalProperties&&(s.additionalProperties=!1),s}function I(e,t){const n=Object.entries(t).filter(([e])=>g.has(e)&&"$comment"!==e);return n.length?{...e,...Object.fromEntries(n)}:e}function x(e,t){const n=t.slice(1);if(!n)return e;if(!n.startsWith("/"))return;let r=e;for(const e of n.slice(1).split("/")){if(!R(r))return;const t=N(e);if(void 0===t)return;r=Object.hasOwn(r,t)?r[t]:void 0}return r}function N(e){try{return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}catch{return}}function S(e){return null==e}function R(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function D(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)&&new Set(e).size===e.length}function L(e){return"string"==typeof e?h.has(e):D(e)&&e.length>0&&e.every(e=>h.has(e))}function $(e){if("string"!=typeof e)return!1;try{return new RegExp(e,"u"),!0}catch{return!1}}function G(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}new WeakMap;const M=[...["gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-6-astra","gpt-6-luna","gpt-6.1-sol","gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","o1","o3","o3-mini","o4-mini","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5.1","gpt-5.2","gpt-5.2-pro","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.5","gpt-5.5-pro","gpt-6-sol"],...["claude-fable-5","claude-fable-5-1","claude-haiku-4-5-20251001","claude-opus-5-5","claude-sonnet-5-5","claude-3-7-sonnet-latest","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-opus-4-8","claude-opus-5","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-6","claude-sonnet-5"],...["gemini-3.1-pro","gemini-3.8-flash","gemini-3.5-flash-lite","gemini-2.5-pro","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-3-flash","gemini-3-pro","gemini-3.1-flash-lite","gemini-3.5-flash","gemini-3.6-flash","gemini-3.7-flash"],...["grok-4.6","grok-4-1-fast-reasoning","grok-4-1-fast-non-reasoning","grok-4.5","grok-4.3","grok-3","grok-3-fast","grok-3-mini","grok-3-mini-fast","grok-4","grok-4-fast-reasoning","grok-4-fast-non-reasoning"],"bedrock-claude-sonnet-4-5"];function P(e){return M.includes(e)}const j={kind:"budget",perLevel:{low:1024,medium:8192,high:24576,minimal:0}},Q={"gpt-4o":{name:"gpt-4o",displayName:"GPT-4o",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:16384,contextWindowTokens:128e3,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-terra"},"gpt-4o-mini":{name:"gpt-4o-mini",displayName:"GPT-4o Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:16384,contextWindowTokens:128e3,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-terra"},"gpt-4.1":{name:"gpt-4.1",displayName:"GPT-4.1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-terra"},"gpt-4.1-mini":{name:"gpt-4.1-mini",displayName:"GPT-4.1 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-terra"},"gpt-4.1-nano":{name:"gpt-4.1-nano",displayName:"GPT-4.1 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-luna"},o1:{name:"o1",displayName:"GPT-o1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},o3:{name:"o3",displayName:"GPT-o3",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"o3-mini":{name:"o3-mini",displayName:"GPT-o3 Mini",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"o4-mini":{name:"o4-mini",displayName:"GPT-o4 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5":{name:"gpt-5",displayName:"GPT-5",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5-mini":{name:"gpt-5-mini",displayName:"GPT-5 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5-nano":{name:"gpt-5-nano",displayName:"GPT-5 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-luna"},"gpt-5.1":{name:"gpt-5.1",displayName:"GPT-5.1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.2":{name:"gpt-5.2",displayName:"GPT-5.2",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.2-pro":{name:"gpt-5.2-pro",displayName:"GPT-5.2 Pro",description:"Legacy most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-6-astra"},"gpt-5.4":{name:"gpt-5.4",displayName:"GPT-5.4",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.4-mini":{name:"gpt-5.4-mini",displayName:"GPT-5.4 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.4-nano":{name:"gpt-5.4-nano",displayName:"GPT-5.4 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-luna"},"gpt-5.5":{name:"gpt-5.5",displayName:"GPT-5.5",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.5-pro":{name:"gpt-5.5-pro",displayName:"GPT-5.5 Pro",description:"Legacy most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},replacedBy:"gpt-6-astra"},"gpt-5.6-sol":{name:"gpt-5.6-sol",displayName:"GPT-5.6 Sol",description:"Flagship model for complex tasks",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},supportsExplicitPromptCache:!0},"gpt-5.6-terra":{name:"gpt-5.6-terra",displayName:"GPT-5.6 Terra",description:"Balanced and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},supportsExplicitPromptCache:!0},"gpt-5.6-luna":{name:"gpt-5.6-luna",displayName:"GPT-5.6 Luna",description:"Fast and affordable",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},supportsExplicitPromptCache:!0},"gpt-6-astra":{name:"gpt-6-astra",displayName:"GPT-6 Astra",description:"Most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high","xhigh","max"]},supportsExplicitPromptCache:!0},"gpt-6-sol":{name:"gpt-6-sol",displayName:"GPT-6 Sol",description:"Legacy workhorse model for complex tasks",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["none","low","medium","high","xhigh","max"]},supportsExplicitPromptCache:!0,replacedBy:"gpt-6.1-sol"},"gpt-6-luna":{name:"gpt-6-luna",displayName:"GPT-6 Luna",description:"Fast and affordable",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["none","low","medium","high","xhigh","max"]},supportsExplicitPromptCache:!0},"gpt-6.1-sol":{name:"gpt-6.1-sol",displayName:"GPT-6.1 Sol",description:"Near-Astra performance for complex work at a lower cost",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high","xhigh","max"]},supportsExplicitPromptCache:!0},"claude-sonnet-5-5":{name:"claude-sonnet-5-5",displayName:"Claude Sonnet 5.5",description:"Balanced performance",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-sonnet-5":{name:"claude-sonnet-5",displayName:"Claude Sonnet 5",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0,replacedBy:"claude-sonnet-5-5"},"claude-sonnet-4-6":{name:"claude-sonnet-4-6",displayName:"Claude Sonnet 4.6",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!0,replacedBy:"claude-sonnet-5-5"},"claude-sonnet-4-5-20250929":{name:"claude-sonnet-4-5-20250929",displayName:"Claude Sonnet 4.5",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,replacedBy:"claude-sonnet-5-5"},"claude-3-7-sonnet-latest":{name:"claude-3-7-sonnet-latest",displayName:"Claude Sonnet 3.7",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-sonnet-5-5",supportsTemperature:!1},"claude-haiku-4-5-20251001":{name:"claude-haiku-4-5-20251001",displayName:"Claude Haiku 4.5",description:"Fastest responses",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1},"claude-opus-4-20250514":{name:"claude-opus-4-20250514",displayName:"Claude Opus 4",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:32e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-opus-5-5",supportsTemperature:!1},"claude-opus-4-1-20250805":{name:"claude-opus-4-1-20250805",displayName:"Claude Opus 4.1",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:32e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-opus-5-5",supportsTemperature:!1},"claude-opus-4-5-20251101":{name:"claude-opus-4-5-20251101",displayName:"Claude Opus 4.5",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,replacedBy:"claude-opus-5-5"},"claude-opus-4-6":{name:"claude-opus-4-6",displayName:"Claude Opus 4.6",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,replacedBy:"claude-opus-5-5"},"claude-opus-4-7":{name:"claude-opus-4-7",displayName:"Claude Opus 4.7",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0,replacedBy:"claude-opus-5-5"},"claude-opus-4-8":{name:"claude-opus-4-8",displayName:"Claude Opus 4.8",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0,replacedBy:"claude-opus-5-5"},"claude-fable-5":{name:"claude-fable-5",displayName:"Claude Fable 5",description:"Maximum capability, highest cost",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-fable-5-1":{name:"claude-fable-5-1",displayName:"Claude Fable 5.1",description:"Maximum capability, highest cost",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-opus-5":{name:"claude-opus-5",displayName:"Claude Opus 5",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0,replacedBy:"claude-opus-5-5"},"claude-opus-5-5":{name:"claude-opus-5-5",displayName:"Claude Opus 5.5",description:"Most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-sonnet-4-20250514":{name:"claude-sonnet-4-20250514",displayName:"Claude Sonnet 4",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-sonnet-5-5",supportsTemperature:!1},"bedrock-claude-sonnet-4-5":{name:"bedrock-claude-sonnet-4-5",vendorModelName:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",displayName:"Claude Sonnet 4.5 (Bedrock)",description:"Claude Sonnet hosted on AWS Bedrock",providerType:"bedrock",requiresExplicitAvailability:!0,maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1},"gemini-2.5-flash":{name:"gemini-2.5-flash",displayName:"Gemini Flash 2.5",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.8-flash"},"gemini-2.5-pro":{name:"gemini-2.5-pro",displayName:"Gemini Pro 2.5",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.1-pro"},"gemini-2.5-flash-lite":{name:"gemini-2.5-flash-lite",displayName:"Gemini Flash 2.5 Lite",description:"Legacy lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.5-flash-lite"},"gemini-3-flash":{name:"gemini-3-flash",vendorModelName:"gemini-3-flash-preview",displayName:"Gemini Flash 3",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.8-flash"},"gemini-3.1-flash-lite":{name:"gemini-3.1-flash-lite",displayName:"Gemini Flash 3.1 Lite",description:"Legacy lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.5-flash-lite"},"gemini-3.5-flash":{name:"gemini-3.5-flash",displayName:"Gemini Flash 3.5",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.8-flash"},"gemini-3.5-flash-lite":{name:"gemini-3.5-flash-lite",displayName:"Gemini Flash 3.5 Lite",description:"Lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,reasoning:j},"gemini-3.6-flash":{name:"gemini-3.6-flash",displayName:"Gemini Flash 3.6",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.8-flash"},"gemini-3.7-flash":{name:"gemini-3.7-flash",displayName:"Gemini Flash 3.7",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,reasoning:j,replacedBy:"gemini-3.8-flash"},"gemini-3.8-flash":{name:"gemini-3.8-flash",displayName:"Gemini Flash 3.8",description:"Fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]}},"gemini-3-pro":{name:"gemini-3-pro",vendorModelName:"gemini-3-pro-preview",displayName:"Gemini Pro 3",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.1-pro"},"gemini-3.1-pro":{name:"gemini-3.1-pro",vendorModelName:"gemini-3.1-pro-preview",displayName:"Gemini Pro 3.1",description:"Most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1},"grok-3":{name:"grok-3",displayName:"Grok-3",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4.6",supportsTemperature:!1},"grok-3-fast":{name:"grok-3-fast",displayName:"Grok-3 Fast",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",supportsTemperature:!1},"grok-3-mini":{name:"grok-3-mini",displayName:"Grok-3 Mini",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4.6",supportsTemperature:!1},"grok-3-mini-fast":{name:"grok-3-mini-fast",displayName:"Grok-3 Mini Fast",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",supportsTemperature:!1},"grok-4":{name:"grok-4",displayName:"Grok-4",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4.6",supportsTemperature:!1},"grok-4.5":{name:"grok-4.5",displayName:"Grok-4.5",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:5e5,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},replacedBy:"grok-4.6"},"grok-4.6":{name:"grok-4.6",displayName:"Grok-4.6",description:"Most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:5e5,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high","xhigh"]}},"grok-4.3":{name:"grok-4.3",displayName:"Grok-4.3",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4.6",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]}},"grok-4-fast-reasoning":{name:"grok-4-fast-reasoning",displayName:"Grok-4 Fast Reasoning",description:"Legacy optimized for reasoning tasks",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-reasoning",supportsTemperature:!1},"grok-4-fast-non-reasoning":{name:"grok-4-fast-non-reasoning",displayName:"Grok-4 Fast Non-Reasoning",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",supportsTemperature:!1},"grok-4-1-fast-reasoning":{name:"grok-4-1-fast-reasoning",displayName:"Grok-4.1 Fast Reasoning",description:"Optimized for reasoning tasks",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:2e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","high"]}},"grok-4-1-fast-non-reasoning":{name:"grok-4-1-fast-non-reasoning",displayName:"Grok-4.1 Fast Non-Reasoning",description:"Fast general-purpose model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:2e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",supportsTemperature:!0,reasoning:{kind:"none"}}};for(const e of Object.values(Q))o(!e.replacedBy||!Q[e.replacedBy]?.replacedBy,`Model ${e.name} is replaced by ${e.replacedBy}, which is also marked as replaced (is not active).`),o(!e.replacedBy||e.description.startsWith("Legacy"),`Model ${e.name} is deprecated and its description must start with 'Legacy': '${e.description}'.`);const W=["pod","worker"],Y=(e,t)=>Array.isArray(e)?e.concat(t):void 0;class U{constructor(){this.data={codeChecksum:"initial",databases:{},storage:{},executables:{},apis:{},graphql:{},triggers:{},schedulers:{},webhooks:{},nativeQueries:{},distributedLocks:{},aiChatbots:{},clientConnectionStateChangeHandlers:[],aiFunctions:{},openApiControllersMap:{},queues:{},queueMessageHandlers:{},eventHandlers:{},metrics:{security:{write:[],all:[]}},limits:{},llms:{},mcp:{},integrationLifecycleHooks:{onIntegrationCreated:!1,onIntegrationDeleted:!1,onIntegrationChanged:!1}}}secureDatabase(t,n,r=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[r]:{security:{[t]:[n]}}}})}secureAiQuery(t,n=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[n]:{security:{aiQuery:[t]}}}})}secureCollection(t,n,r,o=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[o]:{collections:{[t]:{security:{[n]:[r]}}}}}})}publicCollection(t,n,r=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[r]:{collections:{[t]:{publicAccess:{[n]:!0}}}}}})}secureStorage(t,n,r=e.BUILT_IN_STORAGE_INTEGRATION_ID){B(this.data,{storage:{[r]:{security:{[t]:[n]}}}})}secureTopic(t,n,r,o=e.BUILT_IN_QUEUE_INTEGRATION_ID){B(this.data,{queues:{[o]:{topics:{[t]:{security:{[n]:[r]}}}}}})}queueMessage(t,n,r=e.BUILT_IN_QUEUE_INTEGRATION_ID){B(this.data,{queueMessageHandlers:{[r]:{[t]:[n]}}})}eventHandler(e,t){B(this.data,{eventHandlers:{[e]:[t]}})}secureMetric(e,t,n){B(this.data,{metrics:{security:{[t]:[{namePrefix:e,serviceFunction:n}]}}})}secureApi(e,t,n){B(this.data,t?{apis:{[e]:{endpoints:{[t]:{security:[n]}}}}}:{apis:{[e]:{security:[n]}}})}secureGraphQL(e,t){B(this.data,{graphql:{[e]:{security:[t]}}})}transformDatabase(t,n,r=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[r]:{transform:{[t]:{type:t,serviceFunction:n}}}}})}transformCollection(t,n,r,o=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[o]:{collections:{[t]:{transform:{[n]:{type:n,serviceFunction:r}}}}}}})}executable(e){const t=e.split(":")[1],n={serviceFunction:e},r=this.data.executables[t];r&&r.serviceFunction!==e&&console.warn(`Executable name collision: "${t}" is registered by both "${r.serviceFunction}" and "${e}". Use qualified names to avoid ambiguity.`),B(this.data,{executables:{[t]:n,[e]:n}})}aiFunction(e,{id:t,description:n,promptId:r,params:i,attributes:a,categories:u,internal:s}){!function(e,t){const n=t.filter(e=>void 0!==e.affinity&&null!==e.affinity);o(n.length<=1,()=>`Function '${e}' declares affinity on more than one parameter (${n.map(e=>e.name).join(", ")}); a function has at most one affinity key.`);for(const t of n)o("string"===t.type,`Affinity parameter '${t.name}' of '${e}' must be of type 'string', got '${t.type}'.`),o(W.includes(t.affinity),`Affinity parameter '${t.name}' of '${e}' declares an unknown scope '${t.affinity}'; expected one of ${W.map(e=>`'${e}'`).join(", ")}.`)}(e,i),function(e,t){const n=t.flatMap(b);o(!n.length,()=>`Function '${e}' has invalid parameters:\n${n.join("\n")}`)}(e,i);const c={aiFunctions:{[t]:{serviceFunction:e,description:n,promptId:r,params:i,attributes:a,categories:u,internal:s}}};B(this.data,c)}aiFunctionsConfigurator(e,{id:t,integrationTypes:n}){const r={aiFunctionsConfigurators:{[t]:{serviceFunction:e,integrationTypes:n}}};B(this.data,r)}trigger(e,t,n,r,i){o(!this.data.triggers[e],`Duplicate Trigger IDs: ${e}`),this.data.triggers[e]={integrationId:r,collectionName:t,functionName:n,mutationTypes:i}}scheduler(e,t,n,r){o(!this.data.schedulers[e],`Duplicate Scheduler IDs: ${e}`),this.data.schedulers[e]={cronExpression:t,functionName:n,exclusive:r}}webhook(e,t){o(!this.data.webhooks[e],`Duplicate Webhook IDs: ${e}`),this.data.webhooks[e]={functionName:t}}secureNativeQuery(e,t){B(this.data,{nativeQueries:{[e]:[t]}})}secureDistributedLock(e,t){B(this.data,e?{distributedLocks:{mutexes:{[e]:{security:[t]}}}}:{distributedLocks:{security:[t]}})}secureAiAgent(t,n){B(this.data,t?{aiChatbots:{[e.AI_AGENTS_INTEGRATION_ID]:{profiles:{[t]:{security:{chat:[n]}}}}}}:{aiChatbots:{[e.AI_AGENTS_INTEGRATION_ID]:{security:{chat:[n]}}}})}secureLangGraph(e,t){B(this.data,{langgraphs:e?{[e]:{security:{invoke:[t]}}}:{security:{invoke:[t]}}})}langGraph(e,t,n){o(!this.data.langgraphs?.[e]?.serviceFunction,`Duplicate LangGraph IDs: ${e}`),B(this.data,{langgraphs:{[e]:{serviceFunction:t,...void 0===n?{}:{description:n}}}})}limits(e,t){B(this.data,{limits:{[e]:t}})}clientConnectionChangeHandler(e){B(this.data,{clientConnectionStateChangeHandlers:[e]})}llmService(e,t){const n=t.models;o(void 0===this.data.llms?.[e]?.models,`LLM service '${e}' is already registered.`);const r=Object.keys(n);o(r.length>0,`LLM service '${e}' must declare at least one model.`);for(const t of r)o(!P(t),`LLM service '${e}' cannot declare an already-defined model: '${t}'.`);const i=Object.values(this.data.llms??{}).flatMap(e=>Object.keys(e.models??{}));for(const e of r)o(!i.includes(e),`Model '${e}' is already defined by another LLM service.`);B(this.data,{llms:{[e]:{models:n,...void 0!==t.supportsFunctions&&{supportsFunctions:t.supportsFunctions}}}})}llmAsk(e){const t=e.split(":")[0];o(void 0===this.data.llms?.[t]?.ask,`LLM service '${t}' already has an 'ask' function defined.`),B(this.data,{llms:{[t]:{ask:e}}})}mcpServer(e,t){const n=t.id;o(void 0===Object.values(this.data.mcp||{}).find(e=>e.options?.id===n),`MCP server with id ${n} already exists (${e}).`),B(this.data,{mcp:{[e]:{options:t,tools:[]}}})}mcpAuthorizer(e){const[t,n]=e.split(":");o(!this.data.mcp?.[t]?.authorizer,`MCP server '${t}' already has authorizer: ${n}.`),B(this.data,{mcp:{[t]:{authorizer:e}}})}mcpTool(e,t){const[n,r]=e.split(":");o(void 0===this.data.mcp?.[n]?.tools?.find(t=>t.serviceFunctionName===e),`MCP server '${n}' already has tool ${r}.`),B(this.data,{mcp:{[n]:{tools:[{serviceFunctionName:e,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema}]}}})}setIntegrationLifecycleHooks(e){this.data.integrationLifecycleHooks={onIntegrationCreated:e.onIntegrationCreated,onIntegrationChanged:e.onIntegrationChanged,onIntegrationDeleted:e.onIntegrationDeleted}}}function B(e,t){(0,f.mergeWith)(e,t,Y)}const q=new U;function F(e,t){return be(n=>q.secureDatabase(e,n,t))}function V(e){return be(t=>q.secureAiQuery(t,e))}function z(e,t,n){return be(r=>q.secureCollection(e,t,r,n))}function H(e,t,n){return()=>{q.publicCollection(e,t,n)}}function K(e,t){return be(n=>q.secureStorage(e,n,t))}function Z(e,t,n){return be(r=>q.secureTopic(e,t,r,n))}function X(e){return be(t=>q.secureMetric(e.metricNamePrefix||"",e.type,t))}function J(e,t){return be(n=>q.secureApi(e,t,n))}function ee(e){return be(t=>q.secureGraphQL(e,t))}function te(e,t){return be(n=>q.queueMessage(e,n,t))}function ne(e){return be(t=>q.eventHandler(e,t))}function re(){return be(e=>q.executable(e))}function oe(e,t=[],n={},r=[],o=!1){return function(a,u,s){const c=ke(a,u),f=p(c);let d;return"object"==typeof e?(i(e.description??e.promptId,`AI function definition requires either "description" or "promptId" to be defined: ${u}`),void 0!==e.id&&l(e.id,u),d={id:e.id??f,description:e.description,promptId:e.promptId,params:i(e.params,`AI function definition requires "params" to be defined: ${u}`),attributes:e.attributes||{},categories:e.categories||[],internal:e.internal||!1}):d={id:f,description:e,promptId:void 0,params:t,attributes:n,categories:r,internal:o},q.aiFunction(c,d),s}}function ie(e){return function(t,n,r){const o=ke(t,n);void 0!==e.id&&l(e.id,n);const i={id:e.id??p(o),integrationTypes:e.integrationTypes};return q.aiFunctionsConfigurator(o,i),r}}function ae(t,n="",r){const i="object"==typeof t?{...t}:{id:t,collection:n,integrationId:r};return o(i.collection,"Collection name can't be empty"),function(t,n,r){return i.id||(i.id=ke(t,n)),q.trigger(i.id,i.collection,ke(t,n),i.integrationId||e.BUILT_IN_DB_INTEGRATION_ID,i.mutationTypes),r}}function ue(e,t,n=!0){return function(r,o,a){const u=ke(r,o);let s;return s="object"==typeof e?{cron:e.cron,id:e.id||u,exclusive:e.exclusive??!0}:{id:e,cron:i(t,"cronExpression must be defined"),exclusive:n},q.scheduler(s.id,s.cron,u,s.exclusive),a}}function se(e){return be(t=>q.webhook(e,t))}function ce(e){return be(t=>q.secureNativeQuery(e,t))}function le(e){return be(t=>q.secureDistributedLock(e,t))}function pe(e){return be(t=>q.secureAiAgent(e,t))}function fe(e){return function(t,n,r){return q.secureLangGraph(e,ke(t,n)),r}}function de(e){return be(t=>q.limits(t,Te(e)))}function he(e){return t=>{q.llmService(t.name,e)}}function ge(){return be(e=>q.llmAsk(e))}function me(e){return t=>{q.mcpServer(t.name,e)}}function ye(e){return be(t=>q.mcpTool(t,e))}function _e(){return be(e=>q.mcpAuthorizer(e))}function ve(){return be(e=>q.clientConnectionChangeHandler(e))}function ke(e,t){return`${e.constructor.name}:${t}`}function be(e){return function(t,n,r){return e(ke(t,n)),r}}function Te(e){return void 0!==e.rateLimit&&("number"==typeof e.rateLimit?e.rateLimit=[{value:e.rateLimit,scope:"global"}]:"object"!=typeof e.rateLimit||Array.isArray(e.rateLimit)||(e.rateLimit=[e.rateLimit]),e.rateLimit.forEach(e=>{void 0===e.scope&&(e.scope="global")})),void 0!==e.quotaLimit&&("number"==typeof e.quotaLimit?e.quotaLimit=[{value:e.quotaLimit,scope:"global",renewPeriod:"monthly"}]:"object"!=typeof e.quotaLimit||Array.isArray(e.quotaLimit)||(e.quotaLimit=[e.quotaLimit]),e.quotaLimit.forEach(e=>{void 0===e.scope&&(e.scope="global"),void 0===e.renewPeriod&&(e.renewPeriod="monthly")})),e}const Oe=require("path"),Ce="user-code",we="user-code-python",Ae=[Ce,we];function Ee(e){u(e,"Invalid application ID");const t=e.split("-");o(t.length<4,`Invalid application ID: ${e}`);const[n,r,i]=t;return{appId:n,environmentId:r??"prod",squidDeveloperId:i}}const Ie=require("node:async_hooks"),xe=(require("node:stream"),"__docId__"),Ne=/[.\[\]]/;function Se(e,t){if(!e)return;const n=t.split(Ne);let r,o=e;for(;o&&n.length;){const e=n.shift();if(e){if("object"!=typeof o||!(e in o))return;r=o[e],o=r}}return r}function Re(e){return null==e}function De(e,t){if(e===t)return!0;if(null===e||null===t)return!1;const n=typeof e;if(n!==typeof t)return!1;if("object"!==n)return e===t;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(const n of r)if(!o.includes(n)||!De(e[n],t[n]))return!1;return!0}function Le(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=$e(e[r],t);return n}function $e(e,t){const n=t?t(e):void 0;if(void 0!==n)return n;if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e))return Le(e,t);if(e instanceof Map)return new Map(Le(Array.from(e),t));if(e instanceof Set)return new Set(Le(Array.from(e),t));if(ArrayBuffer.isView(e))return r=e,"undefined"!=typeof Buffer&&r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length);var r;const o={};for(const n in e)Object.hasOwnProperty.call(e,n)&&(o[n]=$e(e[n],t));return o}function Ge(e){if(Array.isArray(e))return e.map(e=>Ge(e));if("object"!=typeof e||null===e||e instanceof Date)return e;const t=Object.keys(e),n={};return t.sort().forEach(t=>{n[t]=Ge(e[t])}),n}function Me(e){return function(e){if(void 0===e)return null;const t=$e(e,e=>function(e){return"[object Date]"===Object.prototype.toString.call(e)}(e)?{$date:e.toISOString()}:void 0);return JSON.stringify(t)}(Ge(e))}function Pe(e){return $e(JSON.parse(e),e=>{if(null===e||"object"!=typeof e)return;const t=e,n=t.$date;return n&&1===Object.keys(t).length?new Date(n):void 0})}function je(e,t,n){if(e=e instanceof Date?e.getTime():e??null,t=t instanceof Date?t.getTime():t??null,"=="===n)return De(e,t);if("!="===n)return!De(e,t);switch(n){case"<":return!Re(e)&&(!!Re(t)||t<e);case"<=":return!!Re(t)||!Re(e)&&t<=e;case">":return!Re(t)&&(!!Re(e)||t>e);case">=":return!!Re(e)||!Re(t)&&t>=e;case"like":return"string"==typeof t&&"string"==typeof e&&Qe(t,e,!1);case"not like":return!("string"==typeof t&&"string"==typeof e&&Qe(t,e,!1));case"like_cs":return"string"==typeof t&&"string"==typeof e&&Qe(t,e,!0);case"not like_cs":return!("string"==typeof t&&"string"==typeof e&&Qe(t,e,!0));case"array_includes_some":{const n=t;return Array.isArray(t)&&Array.isArray(e)&&e.some(e=>i(n,"VALUE_CANNOT_BE_NULL").some(t=>De(t,e)))}case"array_includes_all":{const n=t;return Array.isArray(e)&&Array.isArray(t)&&e.every(e=>i(n,"VALUE_CANNOT_BE_NULL").some(t=>De(t,e)))}case"array_not_includes":{const n=t;return Array.isArray(t)&&Array.isArray(e)&&e.every(e=>!i(n,"VALUE_CANNOT_BE_NULL").some(t=>De(t,e)))}default:throw new Error(`Unsupported operator comparison: ${n}`)}}function Qe(e,t,n){n||(e=e.toLowerCase(),t=t.toLowerCase());const r=function(e){let t="";for(let n=0;n<e.length;++n)"\\"===e[n]?n+1<e.length&&["%","_"].includes(e[n+1])?(t+=e[n+1],n++):n+1<e.length&&"\\"===e[n+1]?(t+="\\\\",n++):t+="\\":"%"===e[n]?t+="[\\s\\S]*":"_"===e[n]?t+="[\\s\\S]":("/-\\^$*+?.()[]{}|".includes(e[n])&&(t+="\\"),t+=e[n]);return t}(t);return new RegExp(`^${r}$`).test(e)}function We(e){return"fieldName"in e}function Ye(e){return"docIds"in e}function Ue(e,t,n){const r=e.docIds.some(e=>Object.entries(e).every(([e,r])=>je(r,n(t,e)??null,"==")));switch(e.operator){case"==":case"in":return r;case"!=":case"not in":return!r}}function Be(e,t,n,r){const o=e,i=r(t,xe);if("string"!=typeof i)return je(o,i??null,n);let a;try{a=Pe(i)}catch{return je(o,i,n)}if(!a||"object"!=typeof a||Array.isArray(a))return je(o,i,n);const u=Object.keys(a);if(1===u.length&&"__id"===u[0]){const e=a.__id,t=function(e){if("object"==typeof e&&null!==e&&!Array.isArray(e)){const t=Object.keys(e);return 1===t.length&&"__id"===t[0]?e.__id:Me(e)}if("string"==typeof e)try{const t=Pe(e);if(t&&"object"==typeof t&&!Array.isArray(t)){const e=Object.keys(t);if(1===e.length&&"__id"===e[0])return t.__id}}catch{}return e}(o);return je(t,e,n)}if(1===u.length){const e=function(e,t){if("object"==typeof e&&null!==e&&!Array.isArray(e)){const n=Object.keys(e);if(1===n.length&&n[0]===t)return e[t]}if("string"==typeof e)try{const n=Pe(e);if(n&&"object"==typeof n&&!Array.isArray(n)){const e=Object.keys(n);if(1===e.length&&e[0]===t)return n[t]}}catch{}return e}(o,u[0]);return je(e,a[u[0]],n)}return"object"!=typeof o||null===o||Array.isArray(o)?je(o,i,n):je(Me(o),i,n)}const qe={"in:in":(e,t)=>e.every(e=>t.includes(e)),"in:not in":(e,t)=>e.every(e=>t.every(t=>function(e,t){return Re(e)||Re(t)?Re(e)!==Re(t):ze(e,t)&&!De(e,t)&&!(Number.isNaN(e)&&Number.isNaN(t))}(e,t))),"not in:not in":(e,t)=>t.every(t=>e.includes(t)),">:not in":(e,t)=>t.every(t=>Ze(e,t)),">=:not in":(e,t)=>t.every(t=>Ke(e,t)),"<:not in":(e,t)=>t.every(t=>Ve(e,t)),"<=:not in":(e,t)=>t.every(t=>Fe(e,t)),">:>":(e,t)=>Ze(e,t),">=:>":(e,t)=>Ke(e,t),"in:>":(e,t)=>e.every(e=>Ke(e,t)),">:>=":(e,t)=>Ze(e,t),">=:>=":(e,t)=>Ze(e,t),"in:>=":(e,t)=>e.every(e=>Ze(e,t)),"<:<":(e,t)=>Ve(e,t),"<=:<":(e,t)=>Fe(e,t),"in:<":(e,t)=>e.every(e=>Fe(e,t)),"<:<=":(e,t)=>Ve(e,t),"<=:<=":(e,t)=>Ve(e,t),"in:<=":(e,t)=>e.every(e=>Ve(e,t)),"like:like":(e,t)=>Je(e.toLowerCase(),t.toLowerCase()),"like_cs:like":(e,t)=>Je(e.toLowerCase(),t.toLowerCase()),"like:like_cs":(e,t)=>Je(e,t)&&rt(t),"like_cs:like_cs":(e,t)=>Je(e,t),"like:not like":(e,t)=>!tt(e.toLowerCase(),t.toLowerCase()),"like_cs:not like":(e,t)=>!tt(e.toLowerCase(),t.toLowerCase()),"like:not like_cs":(e,t)=>!tt(e.toLowerCase(),t.toLowerCase()),"like_cs:not like_cs":(e,t)=>!tt(e,t),"not like:not like":(e,t)=>Je(t.toLowerCase(),e.toLowerCase()),"not like_cs:not like":(e,t)=>Je(t,e)&&rt(e),"not like:not like_cs":(e,t)=>Je(t.toLowerCase(),e.toLowerCase()),"not like_cs:not like_cs":(e,t)=>Je(t,e),"in:like":(e,t)=>e.every(e=>je(t,e,"like")),"in:like_cs":(e,t)=>e.every(e=>je(t,e,"like_cs")),"in:not like":(e,t)=>e.every(e=>He(e)&&je(t,e,"not like")),"in:not like_cs":(e,t)=>e.every(e=>He(e)&&je(t,e,"not like_cs")),"like:in":(e,t)=>ot(e)&&rt(e)&&t.includes(e),"like_cs:in":(e,t)=>ot(e)&&t.includes(e),"not in:not like":(e,t)=>ot(t)&&rt(t)&&e.includes(t),"not in:not like_cs":(e,t)=>ot(t)&&e.includes(t),"like:not in":(e,t)=>t.every(t=>je(e,t,"not like")),"like_cs:not in":(e,t)=>t.every(t=>je(e,t,"not like_cs")),"not like:not in":(e,t)=>t.every(t=>je(e,t,"like")),"not like_cs:not in":(e,t)=>t.every(t=>je(e,t,"like_cs")),"array_includes_some:array_includes_some":(e,t)=>e.every(e=>t.includes(e)),"array_includes_all:array_includes_all":(e,t)=>t.every(t=>e.includes(t)),"array_not_includes:array_not_includes":(e,t)=>t.every(t=>e.includes(t)),"array_includes_all:array_includes_some":(e,t)=>e.some(e=>t.includes(e)),"array_includes_some:array_includes_all":(e,t)=>e.every(e=>t.every(t=>e===t))};function Fe(e,t){return Re(e)?!Re(t):!Re(t)&&ze(e,t)&&e<t}function Ve(e,t){return!!Re(e)||!Re(t)&&ze(e,t)&&e<=t}function ze(e,t){return typeof e==typeof t&&e instanceof Date==t instanceof Date}function He(e){return Re(e)||"string"==typeof e}function Ke(e,t){return Fe(t,e)}function Ze(e,t){return Ve(t,e)}function Xe(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=e[n+1];"\\"!==r||"%"!==o&&"_"!==o?"\\"===r&&"\\"===o?(t.push(r),n++):t.push(r):(t.push(r+o),n++)}return t}function Je(e,t){return et(Xe(e),Xe(t))}function et(e,t,n=0,r=0){if(r>=t.length)return n>=e.length;if(n>=e.length)return at(t.slice(r));const o=e[n],i=t[r];return"%"===o&&"%"===i?et(e,t,n+1,r+1)||et(e,t,n+1,r):"%"!==o&&("%"===i?et(e,t,n,r+1)||et(e,t,n+1,r):(o===i||"_"===i)&&et(e,t,n+1,r+1))}function tt(e,t){return nt(Xe(e),Xe(t))}function nt(e,t,n=0,r=0){if(n>=e.length&&r>=t.length)return!0;if(n>=e.length)return at(t.slice(r));if(r>=t.length)return at(e.slice(n));const o=e[n],i=t[r];return"%"===o&&"%"===i?nt(e,t,n+1,r+1)||nt(e,t,n,r+1)||nt(e,t,n+1,r):"%"===o||"%"===i?nt(e,t,n,r+1)||nt(e,t,n+1,r):(o===i||"_"===o||"_"===i)&&nt(e,t,n+1,r+1)}function rt(e){return e===e.toLowerCase()&&e===e.toUpperCase()}function ot(e){return!/[%_\\]/.test(e)}function it(e,t){return e.includes("like")&&"string"==typeof t&&function(e){for(let t=0;t<e.length;t++)if("\\"===e[t]){if(!["%","_","\\"].includes(e[t+1]))return!0;t++}return!1}(t)}function at(e){return e.every(e=>"%"===e)}function ut(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(t,r))return!1;if(!De(e[r],t[r]))return!1}return!0}function st(e,t){return t.every(t=>{const n=Object.keys(t).sort();if(n.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(n[t]!==e[t])return!1;return!0})}class ct{constructor(e){this.query=e,this.query=e;const t=this.query.conditions.filter(We),n=this.query.conditions.filter(Ye),r=n.flatMap(e=>function(e){if("=="!==e.operator&&"in"!==e.operator)return[];if(0===e.docIds.length)return[];const t=[],n=e.docIds[0];for(const r of Object.keys(n)){const o=n[r];e.docIds.every(e=>Object.prototype.hasOwnProperty.call(e,r)&&De(e[r],o))&&t.push({fieldName:r,operator:"==",value:o})}return t}(e));this.exactSimpleConditions=this.parseConditions(t),this.exactDocIdConditions=n,this.subqueryConditions=this.parseConditions([...t,...r])}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}get projectFields(){return this.query.projectFields}sortedBy(e){return!e.find((e,t)=>!De(this.query.sortOrder[t],{...e,asc:e.asc??!0}))}sortedByExact(e){return e.length===this.query.sortOrder.length&&this.sortedBy(e)}isSubqueryOf(e,t,n){return this.isSubqueryOfCondition({fieldName:e,operator:t,value:n})}isSubqueryOfCondition(e){return!!this.subqueryConditions.filter(t=>t.fieldName===e.fieldName).find(t=>this.evaluateSubset(t,e))}isSubqueryOfConditions(e){return this.parseConditions(e).every(e=>this.isSubqueryOfCondition(e))}isSubqueryOfQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;for(const t of e.conditions.filter(Ye))if(!this.childImpliesParentDocIdCondition(t))return!1;const t=e.conditions.filter(We),n=this.isSubqueryOfConditions(t),r=this.sortedBy(e.sortOrder),o=-1===e.limit||this.limit>-1&&this.limit<e.limit,i=this.isProjectFieldsSubset(this.query.projectFields,e.projectFields);return n&&r&&o&&i}childImpliesParentDocIdCondition(e){const t=e.docIds;if(0===t.length)return!1;const n="=="===e.operator||"in"===e.operator,r=Object.keys(t[0]).sort(),o=[];for(const e of this.query.conditions)Ye(e)&&o.push(...e.docIds);if(!st(r,t)||!st(r,o))return!1;const i=this.buildChildEffectiveTupleSet();return n?void 0!==i.allowed&&i.allowed.every(e=>t.some(t=>ut(e,t))):void 0!==i.allowed?i.allowed.every(e=>!t.some(t=>ut(e,t))):t.every(e=>i.excluded.some(t=>ut(e,t)))}buildChildEffectiveTupleSet(){let e;const t=[];for(const n of this.query.conditions)if(Ye(n))if("=="===n.operator||"in"===n.operator)e=void 0===e?[...n.docIds]:e.filter(e=>n.docIds.some(t=>ut(e,t)));else for(const e of n.docIds)t.some(t=>ut(t,e))||t.push(e);return void 0!==e&&t.length>0&&(e=e.filter(e=>!t.some(t=>ut(e,t)))),{allowed:e,excluded:t}}isProjectFieldsSubset(e,t){if(!t)return!0;if(!e)return!1;const n=new Set(t);return e.every(e=>n.has(e))}getConditionsFor(...e){return this.subqueryConditions.filter(t=>e.includes(t.fieldName))}getConditionsForField(e){return this.subqueryConditions.filter(t=>t.fieldName===e)}documentMatchesQuery(e){for(const t of this.exactSimpleConditions){const n=t.fieldName,r=t.operator;if(n===xe){const n=t.value;if("in"===r||"not in"===r){const t=(Array.isArray(n)?n:[n]).some(t=>Be(t,e,"==",Se));if(!("in"===r?t:!t))return!1;continue}if(!Be(n,e,r,Se))return!1;continue}const o=Se(e,n);if("in"===r){if(t.value.includes(o))continue;return!1}if("not in"!==r){if(!je(t.value,o,r))return!1}else if(t.value.includes(o))return!1}for(const t of this.exactDocIdConditions)if(!Ue(t,e,Se))return!1;return!0}evaluateSubset(e,t){const{operator:n,value:r}=e,{operator:o,value:i}=this.parseConditions([t])[0],a=qe[`${n}:${o}`];return!!a&&!it(n,r)&&!it(o,i)&&a(r,i)}parseConditions(e){const t=[],n=new Map,r=new Map;return e.forEach(e=>{switch(e.operator){case"==":case"in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}}),n.forEach((e,n)=>{t.push({fieldName:n,operator:"in",value:e})}),r.forEach((e,n)=>{t.push({fieldName:n,operator:"not in",value:e})}),t}}function lt(){if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;throw new Error("Unable to locate global object")}void 0===lt()?.SQUID_LOG_DEBUG_ENABLED&&function(e=!0){lt().SQUID_LOG_DEBUG_ENABLED=e}(function(){let e="";return"undefined"!=typeof window&&window.location?e=new URLSearchParams(window.location.search).get("SQUID_DEBUG")||"":"undefined"!=typeof process&&process.env&&(e=process.env.SQUID_DEBUG||""),"1"===e||"true"===e}());const pt="__squidMetadata",ft="CIRCULAR_DEPENDENCY",dt=(new Ie.AsyncLocalStorage,[]);function ht(e,t,n){const r=mt();r.codeDirByServiceClassName.set(e.name,n);let i=r.serviceInstanceByCtor.get(e);if(!i||function(e){return e[pt]||{version:0}}(i).version<=1){const n=mt(),r={...n,...t};o(!dt.includes(e),()=>`${ft}: ${dt[dt.length-1]?.name} => ${e.name}`),dt.push(e);try{i=n.requestLocalStorage.run(t,()=>new e(r))}finally{dt.pop()}n.serviceInstanceByCtor.set(e,i)}else(function(e,t){o(e.backendApiKey===t.backendApiKey,"backendApiKey does not match."),o(e.requestLocalStorage===t.requestLocalStorage,"requestLocalStorage does not match"),o(e.environmentId===t.environmentId,"environmentId does not match"),o(e.squidDeveloperId===t.squidDeveloperId,"squidDeveloperId does not match");const n=Ee(e.appId),r=Ee(t.appId);o(n.appId===r.appId,`appId does not match! Before: ${n.appId}, after ${r.appId}`)})(i.config,r),i.config.secrets=r.secrets,i.config.apiKeys=r.apiKeys;return i}const gt="SQUID_GLOBAL_CONFIG";function mt(){return i(lt()[gt],"Squid global config is not defined! Make sure you are not trying to use Squid at module load time.")}const yt=require("child_process"),_t=require("crypto"),vt=require("fs/promises"),kt=require("os"),bt=require("util");class Tt{constructor(){this.promises=new Map}getOrStart(e,t){let n=this.promises.get(e);return n||(n=t().catch(t=>{throw this.promises.delete(e),t}),this.promises.set(e,n)),n}}const Ot=(0,Oe.join)((0,kt.tmpdir)(),"squid-workspaces"),Ct=/^[A-Za-z0-9_-]{1,200}$/;function wt(e){return"string"==typeof e&&Ct.test(e)}const At=(0,bt.promisify)(yt.execFile),Et="SQUID_WORKSPACE_SERVER_HOST",It=(0,Oe.join)((0,kt.tmpdir)(),"squid-workspace-ssh","id_ed25519"),xt="markers",Nt=3e5,St=["set -eu",'key_path=$(wslpath -u "$1")','certificate_path=$(wslpath -u "$2")','local_path=$(wslpath -u "$3")',"remote_path=$4","port=$5","direction=$6","temporary_directory=$(mktemp -d /tmp/squid-workspace-rsync.XXXXXX)","cleanup() {",' rm -f -- "$temporary_directory/id_ed25519" "$temporary_directory/id_ed25519-cert.pub" "$temporary_directory/known_hosts"',' rmdir -- "$temporary_directory" 2>/dev/null || true',"}","trap cleanup EXIT","trap 'exit 129' HUP","trap 'exit 130' INT","trap 'exit 143' TERM",'install -m 600 "$key_path" "$temporary_directory/id_ed25519"','install -m 644 "$certificate_path" "$temporary_directory/id_ed25519-cert.pub"','ssh_command="ssh -i $temporary_directory/id_ed25519 -o CertificateFile=$temporary_directory/id_ed25519-cert.pub -p $port -o UserKnownHostsFile=$temporary_directory/known_hosts -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 -o ServerAliveInterval=15 -o ServerAliveCountMax=3"','if [ "$direction" = pull ]; then',' rsync -a -e "$ssh_command" --delete "$remote_path" "$local_path/"','elif [ "$direction" = push ]; then',' rsync -a --fsync -e "$ssh_command" --delete "$local_path/" "$remote_path"',"else"," exit 64","fi"].join("\n");function Rt(){return!!process.env[Et]}class Dt{constructor(e={}){this.lp="WorkspaceClient",this.podKeypairCache=new Tt;const{rpcTransport:t,localCacheRoot:n=Ot}=e;o((0,Oe.isAbsolute)(n),()=>`localCacheRoot must be absolute: "${n}"`),this.rpcTransport=t??{post:async(e,t,n)=>await Wt().rpcManager.post(e,t,[],"files",{},n)},this.localCacheRoot=n}async create(e,t){const n=e??(0,_t.randomUUID)();o(wt(n),()=>`Invalid workspace id "${n}"`);const{idleTtlSeconds:r,localCacheStrategy:i="refresh",signal:a}=t??{};var u;o(void 0===r||"number"==typeof(u=r)&&Number.isInteger(u)&&u>=600&&u<=2592e3,()=>`Invalid idleTtlSeconds ${r}`),o("refresh"===i||"reuse"===i,()=>`Invalid localCacheStrategy "${i}"`),Lt(a);const s=this.resolveLocalWorkspaceDir(n);return await this.markLocalWorkspaceUsed(n),Lt(a),"reuse"===i&&await async function(e){try{const t=await(0,vt.lstat)(e);return t.isDirectory()&&!t.isSymbolicLink()}catch(e){if("ENOENT"===e.code)return!1;throw e}}(s)||(await(0,vt.mkdir)(s,{recursive:!0}),Lt(a),await this.pull(n,s,r,a),Lt(a)),this.buildMetadata(n,s)}async push(e){o(wt(e),()=>`Invalid workspace id "${e}"`);const t=this.resolveLocalWorkspaceDir(e);return await this.markLocalWorkspaceUsed(e),await this.pushDir(e,t),this.buildMetadata(e,t)}async discardLocal(e){o(wt(e),()=>`Invalid workspace id "${e}"`),await(0,vt.rm)(this.resolveLocalWorkspaceDir(e),{recursive:!0,force:!0}),await(0,vt.rm)(this.resolveLocalWorkspaceMarkerPath(e),{force:!0}),await(0,vt.rm)(this.resolveLocalWorkspaceQuarantineDir(e),{recursive:!0,force:!0})}async delete(e){o(wt(e),()=>`Invalid workspace id "${e}"`);const t=`${this.lp}.delete:`;try{await this.rpcTransport.post("workspaces/delete",{workspaceId:e})}catch(n){throw new Error(`${t} Failed to delete workspace "${e}" on the server: ${s(n)}`)}await(0,vt.rm)(this.resolveLocalWorkspaceDir(e),{recursive:!0,force:!0}),await(0,vt.rm)(this.resolveLocalWorkspaceMarkerPath(e),{force:!0}),await(0,vt.rm)(this.resolveLocalWorkspaceQuarantineDir(e),{recursive:!0,force:!0})}buildMetadata(e,t){return{id:e,path:t}}resolveLocalWorkspaceDir(e){return(0,Oe.join)(this.localCacheRoot,"workspaces",e)}resolveLocalWorkspaceMarkerPath(e){return(0,Oe.join)(this.localCacheRoot,xt,e)}resolveLocalWorkspaceQuarantineDir(e){return(0,Oe.join)(this.localCacheRoot,".evicting",e)}async markLocalWorkspaceUsed(e){const t=this.resolveLocalWorkspaceMarkerPath(e);await(0,vt.mkdir)((0,Oe.join)(this.localCacheRoot,xt),{recursive:!0}),await(0,vt.writeFile)(t,"")}async pull(e,t,n,r){const o=`${this.lp}.pull:`;try{await this.rsync(e,["--delete",`${this.remoteTarget()}/`,`${t}/`],"read",n,r)}catch(t){if(this.isMissingRemoteError(t))return;throw new Error(`${o} Failed to pull workspace "${e}": ${s(t)}`)}}async pushDir(e,t){const n=`${this.lp}.push:`;try{await this.rsync(e,["--delete",`${t}/`,`${this.remoteTarget()}/`],"write")}catch(t){throw new Error(`${n} Failed to push workspace "${e}": ${s(t)}`)}}async rsync(e,t,n,r,o){Lt(o),await this.ensurePodKeypair(),Lt(o);const i=`${this.sshKeyPath()}-cert-${(0,_t.randomUUID)()}.pub`;try{await this.issueCert(e,i,n,r,o),Lt(o);const a=`ssh -i ${this.sshKeyPath()} -o CertificateFile=${i} -p ${this.sshPort()} -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 -o ServerAliveInterval=15 -o ServerAliveCountMax=3`;if("win32"===process.platform&&"true"===process.env.SQUID_WORKSPACE_USE_WSL_RSYNC)await this.rsyncThroughWsl(t,i,o);else{const e="read"===n?[]:["--fsync"];await At("rsync",["-a",...e,"-e",a,...t],{signal:o,timeout:Nt})}}finally{await(0,vt.rm)(i,{force:!0}).catch(()=>{})}}async rsyncThroughWsl(e,t,n){const r=`${this.remoteTarget()}/`,[i,a,u]=e;o(3===e.length&&"--delete"===i&&(a===r&&!!u||u===r&&!!a),"WORKSPACE_WSL_RSYNC_ARGUMENTS_INVALID");const s=a===r?"pull":"push",c=(o("string"==typeof(l="pull"===s?u:a)&&l.length>0,"WORKSPACE_WSL_RSYNC_PATH_INVALID"),l.replace(/[\\/]+$/u,""));var l;o((0,Oe.isAbsolute)(c)&&!c.includes("\0"),"WORKSPACE_WSL_RSYNC_PATH_INVALID");const p=this.sshPort();o(/^\d{1,5}$/.test(p)&&Number(p)<=65535,"WORKSPACE_WSL_RSYNC_PORT_INVALID"),await At("wsl.exe",["--exec","sh","-c",St,"workspace-rsync",this.sshKeyPath(),t,c,r,p,s],{signal:n,timeout:Nt})}ensurePodKeypair(){return this.podKeypairCache.getOrStart("podKeypair",()=>this.generatePodKeypair())}async generatePodKeypair(){const e=this.sshKeyPath();await this.fileExists(e)||(await(0,vt.mkdir)((0,Oe.join)(e,".."),{recursive:!0}),await At("ssh-keygen",["-t","ed25519","-N","","-f",e,"-C","squid-workspace"],{timeout:3e4}))}async issueCert(e,t,n,r,o){const i=`${this.lp}.issueCert:`,a=(await(0,vt.readFile)(`${this.sshKeyPath()}.pub`,"utf8")).trim();try{const{certificate:i}=await this.rpcTransport.post("workspaces/issueCert",{workspaceId:e,ephemeralPublicKey:a,idleTtlSeconds:r,accessMode:n},o);Lt(o),await(0,vt.writeFile)(t,`${i}\n`,{mode:420})}catch(t){throw new Error(`${i} Failed to obtain certificate for workspace "${e}": ${s(t)}`)}}async fileExists(e){try{return await(0,vt.access)(e),!0}catch{return!1}}remoteTarget(){return`${this.sshUser()}@${this.sshHost()}:.`}isMissingRemoteError(e){const t=e&&"object"==typeof e&&"code"in e?e.code:void 0,n=s(e);return 23===t&&/no such file or directory/i.test(n)||12===t&&n.includes("Restricted directory does not exist!")}isWorkspaceBusyError(e){return 409===(e&&"object"==typeof e&&"statusCode"in e?e.statusCode:void 0)&&s(e).includes("WORKSPACE_BUSY")}isTimeoutError(e){return e instanceof Error&&"TimeoutError"===e.name}sshHost(){return this.getEnv(Et)}sshPort(){return process.env.SQUID_WORKSPACE_SERVER_PORT||"22"}sshUser(){return process.env.SQUID_WORKSPACE_SSH_USER||"workspace"}sshKeyPath(){return process.env.SQUID_WORKSPACE_SSH_KEY_PATH||It}getEnv(e){const t=process.env[e];return o(t,()=>`Missing required env var "${e}" for WorkspaceClient`),t}}function Lt(e){if(e?.aborted)throw e.reason instanceof Error?e.reason:new Error("WORKSPACE_OPERATION_ABORTED")}function $t(e,t,n){return{body:t.body||"",statusCode:t.statusCode||n,headers:t.headers||{},[e]:!0}}class Gt{constructor(){this.region=process.env.SQUID_REGION||"local",this.config=mt(),this[pt]={version:2},this.backendBaseUrl=function(e,t){let n="https",r=`${t}.${e}.${new URL("https://squid.cloud").host}`,o="";/^local/.test(e)&&(n="http",o="8000",/android$/.test(e)?r="10.0.2.2":function(e){return/ios$/.test(e)}(e)&&(r="localhost"));const i=n+"://"+r+(o?`:${o}`:""),a="".replace(/^\/+/,"");return a?`${i}/${a}`:i}(this.region,this.config.appId)}get secrets(){return this.config.secrets}get apiKeys(){return this.config.apiKeys}get context(){return this.getRequestConfig().context}get squid(){return Wt()}get assetsDirectory(){const e=Object.getPrototypeOf(this).constructor.name,t=this.config.codeDir||this.config.codeDirByServiceClassName.get(e);return o(t,()=>`No codeDir found for service: ${e}`),Oe.resolve(t,"public")}get workspace(){return new Dt}getApiKey(){return this.config.backendApiKey}getUserAuth(){const{auth:e}=this.getRequestConfig();return"Bearer"===e?.type?e:void 0}getApiKeyAuth(){const{auth:e}=this.getRequestConfig();return"ApiKey"===e?.type?e:void 0}hasLiveState(){return!1}async releaseLiveState(){}isAuthenticated(){const{auth:e}=this.getRequestConfig();return!!e}assertIsAuthenticated(){this.assertInRequestScope(),o(this.isAuthenticated(),"UNAUTHORIZED")}assertInRequestScope(){o(this.config.requestLocalStorage.getStore(),"This method can only be called with a valid request scope.")}assertApiKeyCall(){o(this.getApiKeyAuth(),"This method can only be called with API key")}createWebhookResponse(e,t,n){return $t("__isWebhookResponse__",{body:e,statusCode:t,headers:n},e?200:204)}throwWebhookResponse(e){throw $t("__isWebhookResponse__",e,500)}createOpenApiResponse(e,t,n){return $t("__isOpenApiResponse__",{body:e,statusCode:t,headers:n},e?200:204)}throwOpenApiResponse(e){throw $t("__isOpenApiResponse__",e,500)}async convertToSquidFile(e){return{__isSquidFile__:!0,data:new Uint8Array(await e.arrayBuffer()),fieldName:e.name,mimetype:e.type,originalName:e.name,size:e.size,encoding:e.type}}async publishAiStatusUpdate(e,t){const n={type:"aiStatus",agentId:e.agentId,messageId:e.messageId,chatId:e.chatId,jobId:e.jobId,payload:{statusUpdateId:e.messageId,title:e.title,body:e.body,parentStatusUpdateId:e.parentStatusUpdateId,tags:e.tags}};await this.squid.getNotificationClient().publishSystemNotification(n,[t])}getRequestConfig(){return this.assertInRequestScope(),i(this.config.requestLocalStorage.getStore(),"Failed to access request data outside of the request's scope")}}function Mt(e,t){return ht(e,{},t)}function Pt(e,t){const n=Object.getPrototypeOf(t).constructor.name,r=mt().codeDirByServiceClassName.get(n);return o(r,()=>`Caller class codeDir is not set: ${n}`),Mt(e,r)}function jt(e,t=Ce){return Mt(e,i(mt().moduleById.get(t),"Module not found: "+t).codeDir)}function Qt(){const e=mt(),t=process.env.SQUID_REGION||"local",n=process.env.SQUID_CONSOLE_REGION,r=Ee(e.appId);return{appId:r.appId,apiKey:e.backendApiKey,squidDeveloperId:r.squidDeveloperId,environmentId:r.environmentId,region:t,consoleRegion:n}}function Wt(){return e.Squid.getInstance(Qt())}function Yt(){return e.Squid.getInstance({...Qt(),isPassiveMode:!0})}class Ut extends Gt{}class Bt{constructor(){q.setIntegrationLifecycleHooks({onIntegrationCreated:this.onIntegrationCreated!==Bt.prototype.onIntegrationCreated,onIntegrationDeleted:this.onIntegrationDeleted!==Bt.prototype.onIntegrationDeleted,onIntegrationChanged:this.onIntegrationChanged!==Bt.prototype.onIntegrationChanged})}get squid(){return Wt()}metadata(){return q.data}async onIntegrationCreated(e){}async onIntegrationChanged(e){}async onIntegrationDeleted(e){}async cleanup(){for(const t of e.Squid.getInstances())await t.destruct()}}class qt{constructor(e){this.agentId=e.agentId,this.prompt=e.prompt,this.options=e.options}}class Ft{constructor(e){this.integrationId=e.integrationId,this.endpointId=e.endpointId,this.url=e.url,this.method=e.method,this.body=e.body,this.options=e.options}}var Vt;!function(e){e.EVERY_SECOND="* * * * * *",e.EVERY_5_SECONDS="*/5 * * * * *",e.EVERY_10_SECONDS="*/10 * * * * *",e.EVERY_30_SECONDS="*/30 * * * * *",e.EVERY_MINUTE="*/1 * * * *",e.EVERY_5_MINUTES="0 */5 * * * *",e.EVERY_10_MINUTES="0 */10 * * * *",e.EVERY_30_MINUTES="0 */30 * * * *",e.EVERY_HOUR="0 0-23/1 * * *",e.EVERY_2_HOURS="0 0-23/2 * * *",e.EVERY_3_HOURS="0 0-23/3 * * *",e.EVERY_4_HOURS="0 0-23/4 * * *",e.EVERY_5_HOURS="0 0-23/5 * * *",e.EVERY_6_HOURS="0 0-23/6 * * *",e.EVERY_7_HOURS="0 0-23/7 * * *",e.EVERY_8_HOURS="0 0-23/8 * * *",e.EVERY_9_HOURS="0 0-23/9 * * *",e.EVERY_10_HOURS="0 0-23/10 * * *",e.EVERY_11_HOURS="0 0-23/11 * * *",e.EVERY_12_HOURS="0 0-23/12 * * *",e.EVERY_DAY_AT_1AM="0 01 * * *",e.EVERY_DAY_AT_2AM="0 02 * * *",e.EVERY_DAY_AT_3AM="0 03 * * *",e.EVERY_DAY_AT_4AM="0 04 * * *",e.EVERY_DAY_AT_5AM="0 05 * * *",e.EVERY_DAY_AT_6AM="0 06 * * *",e.EVERY_DAY_AT_7AM="0 07 * * *",e.EVERY_DAY_AT_8AM="0 08 * * *",e.EVERY_DAY_AT_9AM="0 09 * * *",e.EVERY_DAY_AT_10AM="0 10 * * *",e.EVERY_DAY_AT_11AM="0 11 * * *",e.EVERY_DAY_AT_NOON="0 12 * * *",e.EVERY_DAY_AT_1PM="0 13 * * *",e.EVERY_DAY_AT_2PM="0 14 * * *",e.EVERY_DAY_AT_3PM="0 15 * * *",e.EVERY_DAY_AT_4PM="0 16 * * *",e.EVERY_DAY_AT_5PM="0 17 * * *",e.EVERY_DAY_AT_6PM="0 18 * * *",e.EVERY_DAY_AT_7PM="0 19 * * *",e.EVERY_DAY_AT_8PM="0 20 * * *",e.EVERY_DAY_AT_9PM="0 21 * * *",e.EVERY_DAY_AT_10PM="0 22 * * *",e.EVERY_DAY_AT_11PM="0 23 * * *",e.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",e.EVERY_WEEK="0 0 * * 7",e.EVERY_WEEKDAY="0 0 * * 1-5",e.EVERY_WEEKEND="0 0 * * 6,7",e.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",e.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",e.EVERY_2ND_HOUR="0 */2 * * *",e.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",e.EVERY_2ND_MONTH="0 0 1 */2 *",e.EVERY_QUARTER="0 0 1 */3 *",e.EVERY_6_MONTHS="0 0 1 */6 *",e.EVERY_YEAR="0 0 1 1 *",e.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",e.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",e.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",e.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",e.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",e.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",e.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",e.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",e.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",e.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",e.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",e.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",e.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",e.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",e.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",e.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",e.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",e.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",e.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",e.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",e.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",e.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",e.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",e.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",e.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",e.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",e.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",e.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"}(Vt||(Vt={}));class zt{constructor(e){this.mutex=e}}class Ht{constructor(e){this.isGraphiQL=e.isGraphiQL,this.query=e.query,this.operationName=e.operationName,this.variables=e.variables}}class Kt{constructor(e){this.operation=e.operation,this.graphId=e.graphId,this.threadId=e.threadId,this.input=e.input,this.resumePayload=e.resumePayload,this.graphContext=e.graphContext}}const Zt=["insert","update","delete"];class Xt{constructor(e,t,n){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=n}get before(){return this.beforeAndAfterDocs.before}get after(){return this.beforeAndAfterDocs.after}getMutationType(){return this.mutation.type}affectsPath(e){return!De(Se(this.before,e),Se(this.after,e))}affectedPaths(e=""){o("update"===this.mutation.type,"affectedPaths can only be used with update mutations");const t=[];return this.checkPath(e,t),t}checkPath(e,t){const n=Se(this.before,e),r=Se(this.after,e);if(!De(n,r)&&(""!==e&&t.push(e),"object"==typeof n&&null!==n&&"object"==typeof r&&null!==r)){const o=Object.keys(n),i=Object.keys(r);new Set([...o,...i]).forEach(n=>{const r=e?`${e}.${n}`:n;this.checkPath(r,t)})}}}function Jt(e){return{__isWebhookResponse__:!0,body:"",statusCode:204,headers:{},...e}}})();const o=exports;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
|
2
|
+
(()=>{var e={243(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",s=32,c=128,l=1/0,p=9007199254740991,f=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",y="[object Boolean]",_="[object Date]",v="[object Error]",k="[object Function]",b="[object GeneratorFunction]",T="[object Map]",O="[object Number]",C="[object Object]",w="[object Promise]",A="[object RegExp]",E="[object Set]",x="[object String]",I="[object Symbol]",N="[object WeakMap]",S="[object ArrayBuffer]",R="[object DataView]",D="[object Float32Array]",L="[object Float64Array]",$="[object Int8Array]",G="[object Int16Array]",P="[object Int32Array]",M="[object Uint8Array]",j="[object Uint8ClampedArray]",Q="[object Uint16Array]",W="[object Uint32Array]",Y=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,V=RegExp(q.source),z=RegExp(F.source),H=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,me=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,be="\\ud800-\\udfff",Te="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Oe="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",we="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xe="["+be+"]",Ie="["+Ee+"]",Ne="["+Te+"]",Se="\\d+",Re="["+Oe+"]",De="["+Ce+"]",Le="[^"+be+Ee+Se+Oe+Ce+we+"]",$e="\\ud83c[\\udffb-\\udfff]",Ge="[^"+be+"]",Pe="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+we+"]",Qe="\\u200d",We="(?:"+De+"|"+Le+")",Ye="(?:"+je+"|"+Le+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ne+"|"+$e+")?",Fe="["+Ae+"]?",Ve=Fe+qe+"(?:"+Qe+"(?:"+[Ge,Pe,Me].join("|")+")"+Fe+qe+")*",ze="(?:"+[Re,Pe,Me].join("|")+")"+Ve,He="(?:"+[Ge+Ne+"?",Ne,Pe,Me,xe].join("|")+")",Ke=RegExp("['’]","g"),Ze=RegExp(Ne,"g"),Xe=RegExp($e+"(?="+$e+")|"+He+Ve,"g"),Je=RegExp([je+"?"+De+"+"+Ue+"(?="+[Ie,je,"$"].join("|")+")",Ye+"+"+Be+"(?="+[Ie,je+We,"$"].join("|")+")",je+"?"+We+"+"+Ue,je+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Se,ze].join("|"),"g"),et=RegExp("["+Qe+be+Te+Ae+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[D]=ot[L]=ot[$]=ot[G]=ot[P]=ot[M]=ot[j]=ot[Q]=ot[W]=!0,ot[g]=ot[m]=ot[S]=ot[y]=ot[R]=ot[_]=ot[v]=ot[k]=ot[T]=ot[O]=ot[C]=ot[A]=ot[E]=ot[x]=ot[N]=!1;var it={};it[g]=it[m]=it[S]=it[R]=it[y]=it[_]=it[D]=it[L]=it[$]=it[G]=it[P]=it[T]=it[O]=it[C]=it[A]=it[E]=it[x]=it[I]=it[M]=it[j]=it[Q]=it[W]=!0,it[v]=it[k]=it[N]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,st=parseInt,ct="object"==typeof global&&global&&global.Object===Object&&global,lt="object"==typeof self&&self&&self.Object===Object&&self,pt=ct||lt||Function("return this")(),ft=t&&!t.nodeType&&t,dt=ft&&e&&!e.nodeType&&e,ht=dt&&dt.exports===ft,gt=ht&&ct.process,mt=function(){try{return dt&&dt.require&&dt.require("util").types||gt&>.binding&>.binding("util")}catch(e){}}(),yt=mt&&mt.isArrayBuffer,_t=mt&&mt.isDate,vt=mt&&mt.isMap,kt=mt&&mt.isRegExp,bt=mt&&mt.isSet,Tt=mt&&mt.isTypedArray;function Ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function wt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function xt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function It(e,t){return!(null==e||!e.length)&&jt(e,t,0)>-1}function Nt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function St(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Rt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Dt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Lt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function $t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Gt=Ut("length");function Pt(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function Mt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function jt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Mt(e,Wt,n)}function Qt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Wt(e){return e!=e}function Yt(e,t){var n=null==e?0:e.length;return n?Ft(e,t)/n:f}function Ut(e){return function(t){return null==t?o:t[e]}}function Bt(e){return function(t){return null==e?o:e[t]}}function qt(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Ft(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Vt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function zt(e){return e?e.slice(0,fn(e)+1).replace(re,""):e}function Ht(e){return function(t){return e(t)}}function Kt(e,t){return St(t,function(t){return e[t]})}function Zt(e,t){return e.has(t)}function Xt(e,t){for(var n=-1,r=e.length;++n<r&&jt(t,e[n],0)>-1;);return n}function Jt(e,t){for(var n=e.length;n--&&jt(t,e[n],0)>-1;);return n}var en=Bt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Bt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==u||(e[n]=u,i[o++]=n)}return i}function sn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function ln(e){return rn(e)?function(e){for(var t=Xe.lastIndex=0;Xe.test(e);)++t;return t}(e):Gt(e)}function pn(e){return rn(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var dn=Bt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hn=function e(t){var n,r=(t=null==t?pt:hn.defaults(pt.Object(),t,hn.pick(pt,nt))).Array,oe=t.Date,be=t.Error,Te=t.Function,Oe=t.Math,Ce=t.Object,we=t.RegExp,Ae=t.String,Ee=t.TypeError,xe=r.prototype,Ie=Te.prototype,Ne=Ce.prototype,Se=t["__core-js_shared__"],Re=Ie.toString,De=Ne.hasOwnProperty,Le=0,$e=(n=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ge=Ne.toString,Pe=Re.call(Ce),Me=pt._,je=we("^"+Re.call(De).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qe=ht?t.Buffer:o,We=t.Symbol,Ye=t.Uint8Array,Ue=Qe?Qe.allocUnsafe:o,Be=an(Ce.getPrototypeOf,Ce),qe=Ce.create,Fe=Ne.propertyIsEnumerable,Ve=xe.splice,ze=We?We.isConcatSpreadable:o,He=We?We.iterator:o,Xe=We?We.toStringTag:o,et=function(){try{var e=ci(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==pt.Date.now&&oe.now,lt=t.setTimeout!==pt.setTimeout&&t.setTimeout,ft=Oe.ceil,dt=Oe.floor,gt=Ce.getOwnPropertySymbols,mt=Qe?Qe.isBuffer:o,Gt=t.isFinite,Bt=xe.join,gn=an(Ce.keys,Ce),mn=Oe.max,yn=Oe.min,_n=oe.now,vn=t.parseInt,kn=Oe.random,bn=xe.reverse,Tn=ci(t,"DataView"),On=ci(t,"Map"),Cn=ci(t,"Promise"),wn=ci(t,"Set"),An=ci(t,"WeakMap"),En=ci(Ce,"create"),xn=An&&new An,In={},Nn=Pi(Tn),Sn=Pi(On),Rn=Pi(Cn),Dn=Pi(wn),Ln=Pi(An),$n=We?We.prototype:o,Gn=$n?$n.valueOf:o,Pn=$n?$n.toString:o;function Mn(e){if(eu(e)&&!Ua(e)&&!(e instanceof Yn)){if(e instanceof Wn)return e;if(De.call(e,"__wrapped__"))return Mi(e)}return new Wn(e)}var jn=function(){function e(){}return function(t){if(!Ja(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Qn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Yn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Vn(e){var t=this.__data__=new Bn(e);this.size=t.size}function zn(e,t){var n=Ua(e),r=!n&&Ya(e),o=!n&&!r&&Va(e),i=!n&&!r&&!o&&su(e),a=n||r||o||i,u=a?Vt(e.length,Ae):[],s=u.length;for(var c in e)!t&&!De.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mi(c,s))||u.push(c);return u}function Hn(e){var t=e.length;return t?e[qr(0,t-1)]:o}function Kn(e,t){return Ri(Eo(e),ir(t,0,e.length))}function Zn(e){return Ri(Eo(e))}function Xn(e,t,n){(n!==o&&!ja(e[t],n)||n===o&&!(t in e))&&rr(e,t,n)}function Jn(e,t,n){var r=e[t];De.call(e,t)&&ja(r,n)&&(n!==o||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(ja(e[n][0],t))return n;return-1}function tr(e,t,n,r){return lr(e,function(e,o,i){t(r,e,n(e),i)}),r}function nr(e,t){return e&&xo(t,Nu(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,i=t.length,a=r(i),u=null==e;++n<i;)a[n]=u?o:wu(e,t[n]);return a}function ir(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ar(e,t,n,r,i,a){var u,s=1&t,c=2&t,l=4&t;if(n&&(u=i?n(e,r,i,a):n(e)),u!==o)return u;if(!Ja(e))return e;var p=Ua(e);if(p){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!s)return Eo(e,u)}else{var f=fi(e),d=f==k||f==b;if(Va(e))return bo(e,s);if(f==C||f==g||d&&!i){if(u=c||d?{}:hi(e),!s)return c?function(e,t){return xo(e,pi(e),t)}(e,function(e,t){return e&&xo(t,Su(t),e)}(u,e)):function(e,t){return xo(e,li(e),t)}(e,nr(u,e))}else{if(!it[f])return i?e:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case S:return To(e);case y:case _:return new o(+e);case R:return function(e,t){var n=t?To(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case L:case $:case G:case P:case M:case j:case Q:case W:return Oo(e,n);case T:return new o;case O:case x:return new o(e);case A:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new o;case I:return r=e,Gn?Ce(Gn.call(r)):{}}}(e,f,s)}}a||(a=new Vn);var h=a.get(e);if(h)return h;a.set(e,u),iu(e)?e.forEach(function(r){u.add(ar(r,t,n,r,e,a))}):tu(e)&&e.forEach(function(r,o){u.set(o,ar(r,t,n,o,e,a))});var m=p?o:(l?c?ni:ti:c?Su:Nu)(e);return wt(m||e,function(r,o){m&&(r=e[o=r]),Jn(u,o,ar(r,t,n,o,e,a))}),u}function ur(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var i=n[r],a=t[i],u=e[i];if(u===o&&!(i in e)||!a(u))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new Ee(i);return xi(function(){e.apply(o,n)},t)}function cr(e,t,n,r){var o=-1,i=It,a=!0,u=e.length,s=[],c=t.length;if(!u)return s;n&&(t=St(t,Ht(n))),r?(i=Nt,a=!1):t.length>=200&&(i=Zt,a=!1,t=new Fn(t));e:for(;++o<u;){var l=e[o],p=null==n?l:n(l);if(l=r||0!==l?l:0,a&&p==p){for(var f=c;f--;)if(t[f]===p)continue e;s.push(l)}else i(t,p,r)||s.push(l)}return s}Mn.templateSettings={escape:H,evaluate:K,interpolate:Z,variable:"",imports:{_:Mn}},Mn.prototype=Qn.prototype,Mn.prototype.constructor=Mn,Wn.prototype=jn(Qn.prototype),Wn.prototype.constructor=Wn,Yn.prototype=jn(Qn.prototype),Yn.prototype.constructor=Yn,Un.prototype.clear=function(){this.__data__=En?En(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(En){var n=t[e];return n===a?o:n}return De.call(t,e)?t[e]:o},Un.prototype.has=function(e){var t=this.__data__;return En?t[e]!==o:De.call(t,e)},Un.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=En&&t===o?a:t,this},Bn.prototype.clear=function(){this.__data__=[],this.size=0},Bn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():Ve.call(t,n,1),--this.size,0))},Bn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?o:t[n][1]},Bn.prototype.has=function(e){return er(this.__data__,e)>-1},Bn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(On||Bn),string:new Un}},qn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return ui(this,e).get(e)},qn.prototype.has=function(e){return ui(this,e).has(e)},qn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Fn.prototype.add=Fn.prototype.push=function(e){return this.__data__.set(e,a),this},Fn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.clear=function(){this.__data__=new Bn,this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Vn.prototype.get=function(e){return this.__data__.get(e)},Vn.prototype.has=function(e){return this.__data__.has(e)},Vn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Bn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var lr=So(_r),pr=So(vr,!0);function fr(e,t){var n=!0;return lr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function dr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],u=t(a);if(null!=u&&(s===o?u==u&&!uu(u):n(u,s)))var s=u,c=a}return c}function hr(e,t){var n=[];return lr(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gi),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?gr(u,t-1,n,r,o):Rt(o,u):r||(o[o.length]=u)}return o}var mr=Ro(),yr=Ro(!0);function _r(e,t){return e&&mr(e,t,Nu)}function vr(e,t){return e&&yr(e,t,Nu)}function kr(e,t){return xt(t,function(t){return Ka(e[t])})}function br(e,t){for(var n=0,r=(t=yo(t,e)).length;null!=e&&n<r;)e=e[Gi(t[n++])];return n&&n==r?e:o}function Tr(e,t,n){var r=t(e);return Ua(e)?r:Rt(r,n(e))}function Or(e){return null==e?e===o?"[object Undefined]":"[object Null]":Xe&&Xe in Ce(e)?function(e){var t=De.call(e,Xe),n=e[Xe];try{e[Xe]=o;var r=!0}catch(e){}var i=Ge.call(e);return r&&(t?e[Xe]=n:delete e[Xe]),i}(e):function(e){return Ge.call(e)}(e)}function Cr(e,t){return e>t}function wr(e,t){return null!=e&&De.call(e,t)}function Ar(e,t){return null!=e&&t in Ce(e)}function Er(e,t,n){for(var i=n?Nt:It,a=e[0].length,u=e.length,s=u,c=r(u),l=1/0,p=[];s--;){var f=e[s];s&&t&&(f=St(f,Ht(t))),l=yn(f.length,l),c[s]=!n&&(t||a>=120&&f.length>=120)?new Fn(s&&f):o}f=e[0];var d=-1,h=c[0];e:for(;++d<a&&p.length<l;){var g=f[d],m=t?t(g):g;if(g=n||0!==g?g:0,!(h?Zt(h,m):i(p,m,n))){for(s=u;--s;){var y=c[s];if(!(y?Zt(y,m):i(e[s],m,n)))continue e}h&&h.push(m),p.push(g)}}return p}function xr(e,t,n){var r=null==(e=wi(e,t=yo(t,e)))?e:e[Gi(Hi(t))];return null==r?o:Ot(r,e,n)}function Ir(e){return eu(e)&&Or(e)==g}function Nr(e,t,n,r,i){return e===t||(null==e||null==t||!eu(e)&&!eu(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var u=Ua(e),s=Ua(t),c=u?m:fi(e),l=s?m:fi(t),p=(c=c==g?C:c)==C,f=(l=l==g?C:l)==C,d=c==l;if(d&&Va(e)){if(!Va(t))return!1;u=!0,p=!1}if(d&&!p)return a||(a=new Vn),u||su(e)?Jo(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!i(new Ye(e),new Ye(t)));case y:case _:case O:return ja(+e,+t);case v:return e.name==t.name&&e.message==t.message;case A:case x:return e==t+"";case T:var u=on;case E:var s=1&r;if(u||(u=sn),e.size!=t.size&&!s)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Jo(u(e),u(t),r,o,i,a);return a.delete(e),l;case I:if(Gn)return Gn.call(e)==Gn.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=p&&De.call(e,"__wrapped__"),k=f&&De.call(t,"__wrapped__");if(h||k){var b=h?e.value():e,w=k?t.value():t;return a||(a=new Vn),i(b,w,n,r,a)}}return!!d&&(a||(a=new Vn),function(e,t,n,r,i,a){var u=1&n,s=ti(e),c=s.length;if(c!=ti(t).length&&!u)return!1;for(var l=c;l--;){var p=s[l];if(!(u?p in t:De.call(t,p)))return!1}var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var g=u;++l<c;){var m=e[p=s[l]],y=t[p];if(r)var _=u?r(y,m,p,t,e,a):r(m,y,p,e,t,a);if(!(_===o?m===y||i(m,y,n,r,a):_)){h=!1;break}g||(g="constructor"==p)}if(h&&!g){var v=e.constructor,k=t.constructor;v==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof k&&k instanceof k||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,Nr,i))}function Sr(e,t,n,r){var i=n.length,a=i,u=!r;if(null==e)return!a;for(e=Ce(e);i--;){var s=n[i];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var c=(s=n[i])[0],l=e[c],p=s[1];if(u&&s[2]){if(l===o&&!(c in e))return!1}else{var f=new Vn;if(r)var d=r(l,p,c,e,t,f);if(!(d===o?Nr(p,l,3,r,f):d))return!1}}return!0}function Rr(e){return!(!Ja(e)||(t=e,$e&&$e in t))&&(Ka(e)?je:ge).test(Pi(e));var t}function Dr(e){return"function"==typeof e?e:null==e?ns:"object"==typeof e?Ua(e)?Mr(e[0],e[1]):Pr(e):ps(e)}function Lr(e){if(!bi(e))return gn(e);var t=[];for(var n in Ce(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function $r(e,t){return e<t}function Gr(e,t){var n=-1,o=qa(e)?r(e.length):[];return lr(e,function(e,r,i){o[++n]=t(e,r,i)}),o}function Pr(e){var t=si(e);return 1==t.length&&t[0][2]?Oi(t[0][0],t[0][1]):function(n){return n===e||Sr(n,e,t)}}function Mr(e,t){return _i(e)&&Ti(t)?Oi(Gi(e),t):function(n){var r=wu(n,e);return r===o&&r===t?Au(n,e):Nr(t,r,3)}}function jr(e,t,n,r,i){e!==t&&mr(t,function(a,u){if(i||(i=new Vn),Ja(a))!function(e,t,n,r,i,a,u){var s=Ai(e,n),c=Ai(t,n),l=u.get(c);if(l)Xn(e,n,l);else{var p=a?a(s,c,n+"",e,t,u):o,f=p===o;if(f){var d=Ua(c),h=!d&&Va(c),g=!d&&!h&&su(c);p=c,d||h||g?Ua(s)?p=s:Fa(s)?p=Eo(s):h?(f=!1,p=bo(c,!0)):g?(f=!1,p=Oo(c,!0)):p=[]:ru(c)||Ya(c)?(p=s,Ya(s)?p=mu(s):Ja(s)&&!Ka(s)||(p=hi(c))):f=!1}f&&(u.set(c,p),i(p,c,r,a,u),u.delete(c)),Xn(e,n,p)}}(e,t,u,n,jr,r,i);else{var s=r?r(Ai(e,u),a,u+"",e,t,i):o;s===o&&(s=a),Xn(e,u,s)}},Su)}function Qr(e,t){var n=e.length;if(n)return mi(t+=t<0?n:0,n)?e[t]:o}function Wr(e,t,n){t=t.length?St(t,function(e){return Ua(e)?function(t){return br(t,1===e.length?e[0]:e)}:e}):[ns];var r=-1;t=St(t,Ht(ai()));var o=Gr(e,function(e,n,o){var i=St(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var s=Co(o[r],i[r]);if(s)return r>=u?s:s*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(o)}function Yr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=br(e,a);n(u,a)&&Kr(i,yo(a,e),u)}return i}function Ur(e,t,n,r){var o=r?Qt:jt,i=-1,a=t.length,u=e;for(e===t&&(t=Eo(t)),n&&(u=St(e,Ht(n)));++i<a;)for(var s=0,c=t[i],l=n?n(c):c;(s=o(u,l,s,r))>-1;)u!==e&&Ve.call(u,s,1),Ve.call(e,s,1);return e}function Br(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;mi(o)?Ve.call(e,o,1):so(e,o)}}return e}function qr(e,t){return e+dt(kn()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Vr(e,t){return Ii(Ci(e,t,ns),e+"")}function zr(e){return Hn(ju(e))}function Hr(e,t){var n=ju(e);return Ri(n,ir(t,0,n.length))}function Kr(e,t,n,r){if(!Ja(e))return e;for(var i=-1,a=(t=yo(t,e)).length,u=a-1,s=e;null!=s&&++i<a;){var c=Gi(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=u){var p=s[c];(l=r?r(p,c,s):o)===o&&(l=Ja(p)?p:mi(t[i+1])?[]:{})}Jn(s,c,l),s=s[c]}return e}var Zr=xn?function(e,t){return xn.set(e,t),e}:ns,Xr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Ju(t),writable:!0})}:ns;function Jr(e){return Ri(ju(e))}function eo(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function to(e,t){var n;return lr(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function no(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!uu(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ro(e,t,ns,n)}function ro(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=n(t))!=t,s=null===t,c=uu(t),l=t===o;i<a;){var p=dt((i+a)/2),f=n(e[p]),d=f!==o,h=null===f,g=f==f,m=uu(f);if(u)var y=r||g;else y=l?g&&(r||d):s?g&&d&&(r||!h):c?g&&d&&!h&&(r||!m):!h&&!m&&(r?f<=t:f<t);y?i=p+1:a=p}return yn(a,4294967294)}function oo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!ja(u,s)){var s=u;i[o++]=0===a?0:a}}return i}function io(e){return"number"==typeof e?e:uu(e)?f:+e}function ao(e){if("string"==typeof e)return e;if(Ua(e))return St(e,ao)+"";if(uu(e))return Pn?Pn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function uo(e,t,n){var r=-1,o=It,i=e.length,a=!0,u=[],s=u;if(n)a=!1,o=Nt;else if(i>=200){var c=t?null:Vo(e);if(c)return sn(c);a=!1,o=Zt,s=new Fn}else s=t?[]:u;e:for(;++r<i;){var l=e[r],p=t?t(l):l;if(l=n||0!==l?l:0,a&&p==p){for(var f=s.length;f--;)if(s[f]===p)continue e;t&&s.push(p),u.push(l)}else o(s,p,n)||(s!==u&&s.push(p),u.push(l))}return u}function so(e,t){var n=-1,r=(t=yo(t,e)).length;if(!r)return!0;for(;++n<r;){var o=Gi(t[n]);if("__proto__"===o&&!De.call(e,"__proto__"))return!1;if(("constructor"===o||"prototype"===o)&&n<r-1)return!1}var i=wi(e,t);return null==i||delete i[Gi(Hi(t))]}function co(e,t,n,r){return Kr(e,t,n(br(e,t)),r)}function lo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?eo(e,r?0:i,r?i+1:o):eo(e,r?i+1:0,r?o:i)}function po(e,t){var n=e;return n instanceof Yn&&(n=n.value()),Dt(t,function(e,t){return t.func.apply(t.thisArg,Rt([e],t.args))},n)}function fo(e,t,n){var o=e.length;if(o<2)return o?uo(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=e[i],s=-1;++s<o;)s!=i&&(a[i]=cr(a[i]||u,e[s],t,n));return uo(gr(a,1),t,n)}function ho(e,t,n){for(var r=-1,i=e.length,a=t.length,u={};++r<i;){var s=r<a?t[r]:o;n(u,e[r],s)}return u}function go(e){return Fa(e)?e:[]}function mo(e){return"function"==typeof e?e:ns}function yo(e,t){return Ua(e)?e:_i(e,t)?[e]:$i(yu(e))}var _o=Vr;function vo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:eo(e,t,n)}var ko=at||function(e){return pt.clearTimeout(e)};function bo(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function To(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function Oo(e,t){var n=t?To(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Co(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=uu(e),u=t!==o,s=null===t,c=t==t,l=uu(t);if(!s&&!l&&!a&&e>t||a&&u&&c&&!s&&!l||r&&u&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!u&&i||!c)return-1}return 0}function wo(e,t,n,o){for(var i=-1,a=e.length,u=n.length,s=-1,c=t.length,l=mn(a-u,0),p=r(c+l),f=!o;++s<c;)p[s]=t[s];for(;++i<u;)(f||i<a)&&(p[n[i]]=e[i]);for(;l--;)p[s++]=e[i++];return p}function Ao(e,t,n,o){for(var i=-1,a=e.length,u=-1,s=n.length,c=-1,l=t.length,p=mn(a-s,0),f=r(p+l),d=!o;++i<p;)f[i]=e[i];for(var h=i;++c<l;)f[h+c]=t[c];for(;++u<s;)(d||i<a)&&(f[h+n[u]]=e[i++]);return f}function Eo(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function xo(e,t,n,r){var i=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var s=t[a],c=r?r(n[s],e[s],s,n,e):o;c===o&&(c=e[s]),i?rr(n,s,c):Jn(n,s,c)}return n}function Io(e,t){return function(n,r){var o=Ua(n)?Ct:tr,i=t?t():{};return o(n,e,ai(r,2),i)}}function No(e){return Vr(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,u&&yi(n[0],n[1],u)&&(a=i<3?o:a,i=1),t=Ce(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}function So(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ce(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Ro(e){return function(t,n,r){for(var o=-1,i=Ce(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(!1===n(i[s],s,i))break}return t}}function Do(e){return function(t){var n=rn(t=yu(t))?pn(t):o,r=n?n[0]:t.charAt(0),i=n?vo(n,1).join(""):t.slice(1);return r[e]()+i}}function Lo(e){return function(t){return Dt(Ku(Yu(t).replace(Ke,"")),e,"")}}function $o(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),r=e.apply(n,t);return Ja(r)?r:n}}function Go(e){return function(t,n,r){var i=Ce(t);if(!qa(t)){var a=ai(n,3);t=Nu(t),n=function(e){return a(i[e],e,i)}}var u=e(t,n,r);return u>-1?i[a?t[u]:u]:o}}function Po(e){return ei(function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new Ee(i);if(a&&!s&&"wrapper"==oi(u))var s=new Wn([],!0)}for(r=s?r:n;++r<n;){var c=oi(u=t[r]),l="wrapper"==c?ri(u):o;s=l&&vi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?s[oi(l[0])].apply(s,l[3]):1==u.length&&vi(u)?s[c]():s.thru(u)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Ua(r))return s.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}function Mo(e,t,n,i,a,u,s,l,p,f){var d=t&c,h=1&t,g=2&t,m=24&t,y=512&t,_=g?o:$o(e);return function c(){for(var v=arguments.length,k=r(v),b=v;b--;)k[b]=arguments[b];if(m)var T=ii(c),O=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(k,T);if(i&&(k=wo(k,i,a,m)),u&&(k=Ao(k,u,s,m)),v-=O,m&&v<f){var C=un(k,T);return qo(e,t,Mo,c.placeholder,n,k,C,l,p,f-v)}var w=h?n:this,A=g?w[e]:e;return v=k.length,l?k=function(e,t){for(var n=e.length,r=yn(t.length,n),i=Eo(e);r--;){var a=t[r];e[r]=mi(a,n)?i[a]:o}return e}(k,l):y&&v>1&&k.reverse(),d&&p<v&&(k.length=p),this&&this!==pt&&this instanceof c&&(A=_||$o(A)),A.apply(w,k)}}function jo(e,t){return function(n,r){return function(e,t,n,r){return _r(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}function Qo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ao(n),r=ao(r)):(n=io(n),r=io(r)),i=e(n,r)}return i}}function Wo(e){return ei(function(t){return t=St(t,Ht(ai())),Vr(function(n){var r=this;return e(t,function(e){return Ot(e,r,n)})})})}function Yo(e,t){var n=(t=t===o?" ":ao(t)).length;if(n<2)return n?Fr(t,e):t;var r=Fr(t,ft(e/ln(t)));return rn(t)?vo(pn(r),0,e).join(""):r.slice(0,e)}function Uo(e){return function(t,n,i){return i&&"number"!=typeof i&&yi(t,n,i)&&(n=i=o),t=fu(t),n===o?(n=t,t=0):n=fu(n),function(e,t,n,o){for(var i=-1,a=mn(ft((t-e)/(n||1)),0),u=r(a);a--;)u[o?a:++i]=e,e+=n;return u}(t,n,i=i===o?t<n?1:-1:fu(i),e)}}function Bo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gu(t),n=gu(n)),e(t,n)}}function qo(e,t,n,r,i,a,u,c,l,p){var f=8&t;t|=f?s:64,4&(t&=~(f?64:s))||(t&=-4);var d=[e,t,i,f?a:o,f?u:o,f?o:a,f?o:u,c,l,p],h=n.apply(o,d);return vi(e)&&Ei(h,d),h.placeholder=r,Ni(h,e,t)}function Fo(e){var t=Oe[e];return function(e,n){if(e=gu(e),(n=null==n?0:yn(du(n),292))&&Gt(e)){var r=(yu(e)+"e").split("e");return+((r=(yu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Vo=wn&&1/sn(new wn([,-0]))[1]==l?function(e){return new wn(e)}:us;function zo(e){return function(t){var n=fi(t);return n==T?on(t):n==E?cn(t):function(e,t){return St(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ho(e,t,n,a,l,p,f,d){var h=2&t;if(!h&&"function"!=typeof e)throw new Ee(i);var g=a?a.length:0;if(g||(t&=-97,a=l=o),f=f===o?f:mn(du(f),0),d=d===o?d:du(d),g-=l?l.length:0,64&t){var m=a,y=l;a=l=o}var _=h?o:ri(e),v=[e,t,n,a,l,m,y,p,f,d];if(_&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var s=t[3];if(s){var l=e[3];e[3]=l?wo(l,s,t[4]):s,e[4]=l?un(e[3],u):t[4]}(s=t[5])&&(l=e[5],e[5]=l?Ao(l,s,t[6]):s,e[6]=l?un(e[5],u):t[6]),(s=t[7])&&(e[7]=s),r&c&&(e[8]=null==e[8]?t[8]:yn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(v,_),e=v[0],t=v[1],n=v[2],a=v[3],l=v[4],!(d=v[9]=v[9]===o?h?0:e.length:mn(v[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||16==t?function(e,t,n){var i=$o(e);return function a(){for(var u=arguments.length,s=r(u),c=u,l=ii(a);c--;)s[c]=arguments[c];var p=u<3&&s[0]!==l&&s[u-1]!==l?[]:un(s,l);return(u-=p.length)<n?qo(e,t,Mo,a.placeholder,o,s,p,o,o,n-u):Ot(this&&this!==pt&&this instanceof a?i:e,this,s)}}(e,t,d):t!=s&&33!=t||l.length?Mo.apply(o,v):function(e,t,n,o){var i=1&t,a=$o(e);return function t(){for(var u=-1,s=arguments.length,c=-1,l=o.length,p=r(l+s),f=this&&this!==pt&&this instanceof t?a:e;++c<l;)p[c]=o[c];for(;s--;)p[c++]=arguments[++u];return Ot(f,i?n:this,p)}}(e,t,n,a);else var k=function(e,t,n){var r=1&t,o=$o(e);return function t(){return(this&&this!==pt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ni((_?Zr:Ei)(k,v),e,t)}function Ko(e,t,n,r){return e===o||ja(e,Ne[n])&&!De.call(r,n)?t:e}function Zo(e,t,n,r,i,a){return Ja(e)&&Ja(t)&&(a.set(t,e),jr(e,t,o,Zo,a),a.delete(t)),e}function Xo(e){return ru(e)?o:e}function Jo(e,t,n,r,i,a){var u=1&n,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var l=a.get(e),p=a.get(t);if(l&&p)return l==t&&p==e;var f=-1,d=!0,h=2&n?new Fn:o;for(a.set(e,t),a.set(t,e);++f<s;){var g=e[f],m=t[f];if(r)var y=u?r(m,g,f,t,e,a):r(g,m,f,e,t,a);if(y!==o){if(y)continue;d=!1;break}if(h){if(!$t(t,function(e,t){if(!Zt(h,t)&&(g===e||i(g,e,n,r,a)))return h.push(t)})){d=!1;break}}else if(g!==m&&!i(g,m,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ei(e){return Ii(Ci(e,o,Bi),e+"")}function ti(e){return Tr(e,Nu,li)}function ni(e){return Tr(e,Su,pi)}var ri=xn?function(e){return xn.get(e)}:us;function oi(e){for(var t=e.name+"",n=In[t],r=De.call(In,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(De.call(Mn,"placeholder")?Mn:e).placeholder}function ai(){var e=Mn.iteratee||rs;return e=e===rs?Dr:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function si(e){for(var t=Nu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Ti(o)]}return t}function ci(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Rr(n)?n:o}var li=gt?function(e){return null==e?[]:(e=Ce(e),xt(gt(e),function(t){return Fe.call(e,t)}))}:hs,pi=gt?function(e){for(var t=[];e;)Rt(t,li(e)),e=Be(e);return t}:hs,fi=Or;function di(e,t,n){for(var r=-1,o=(t=yo(t,e)).length,i=!1;++r<o;){var a=Gi(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Xa(o)&&mi(a,o)&&(Ua(e)||Ya(e))}function hi(e){return"function"!=typeof e.constructor||bi(e)?{}:jn(Be(e))}function gi(e){return Ua(e)||Ya(e)||!!(ze&&e&&e[ze])}function mi(e,t){var n=typeof e;return!!(t=t??p)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t}function yi(e,t,n){if(!Ja(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&mi(t,n.length):"string"==r&&t in n)&&ja(n[t],e)}function _i(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!uu(e))||J.test(e)||!X.test(e)||null!=t&&e in Ce(t)}function vi(e){var t=oi(e),n=Mn[t];if("function"!=typeof n||!(t in Yn.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(Tn&&fi(new Tn(new ArrayBuffer(1)))!=R||On&&fi(new On)!=T||Cn&&fi(Cn.resolve())!=w||wn&&fi(new wn)!=E||An&&fi(new An)!=N)&&(fi=function(e){var t=Or(e),n=t==C?e.constructor:o,r=n?Pi(n):"";if(r)switch(r){case Nn:return R;case Sn:return T;case Rn:return w;case Dn:return E;case Ln:return N}return t});var ki=Se?Ka:gs;function bi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ne)}function Ti(e){return e==e&&!Ja(e)}function Oi(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Ce(n))}}function Ci(e,t,n){return t=mn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=mn(o.length-t,0),u=r(a);++i<a;)u[i]=o[t+i];i=-1;for(var s=r(t+1);++i<t;)s[i]=o[i];return s[t]=n(u),Ot(e,this,s)}}function wi(e,t){return t.length<2?e:br(e,eo(t,0,-1))}function Ai(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ei=Si(Zr),xi=lt||function(e,t){return pt.setTimeout(e,t)},Ii=Si(Xr);function Ni(e,t,n){var r=t+"";return Ii(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return wt(h,function(n){var r="_."+n[0];t&n[1]&&!It(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(ue):[]}(r),n)))}function Si(e){var t=0,n=0;return function(){var r=_n(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Ri(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=qr(n,i),u=e[a];e[a]=e[n],e[n]=u}return e.length=t,e}var Di,Li,$i=(Di=Da(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)}),t},function(e){return 500===Li.size&&Li.clear(),e}),Li=Di.cache,Di);function Gi(e){if("string"==typeof e||uu(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Pi(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Mi(e){if(e instanceof Yn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=Eo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ji=Vr(function(e,t){return Fa(e)?cr(e,gr(t,1,Fa,!0)):[]}),Qi=Vr(function(e,t){var n=Hi(t);return Fa(n)&&(n=o),Fa(e)?cr(e,gr(t,1,Fa,!0),ai(n,2)):[]}),Wi=Vr(function(e,t){var n=Hi(t);return Fa(n)&&(n=o),Fa(e)?cr(e,gr(t,1,Fa,!0),o,n):[]});function Yi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:du(n);return o<0&&(o=mn(r+o,0)),Mt(e,ai(t,3),o)}function Ui(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=du(n),i=n<0?mn(r+i,0):yn(i,r-1)),Mt(e,ai(t,3),i,!0)}function Bi(e){return null!=e&&e.length?gr(e,1):[]}function qi(e){return e&&e.length?e[0]:o}var Fi=Vr(function(e){var t=St(e,go);return t.length&&t[0]===e[0]?Er(t):[]}),Vi=Vr(function(e){var t=Hi(e),n=St(e,go);return t===Hi(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Er(n,ai(t,2)):[]}),zi=Vr(function(e){var t=Hi(e),n=St(e,go);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Er(n,o,t):[]});function Hi(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Ki=Vr(Zi);function Zi(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var Xi=ei(function(e,t){var n=null==e?0:e.length,r=or(e,t);return Br(e,St(t,function(e){return mi(e,n)?+e:e}).sort(Co)),r});function Ji(e){return null==e?e:bn.call(e)}var ea=Vr(function(e){return uo(gr(e,1,Fa,!0))}),ta=Vr(function(e){var t=Hi(e);return Fa(t)&&(t=o),uo(gr(e,1,Fa,!0),ai(t,2))}),na=Vr(function(e){var t=Hi(e);return t="function"==typeof t?t:o,uo(gr(e,1,Fa,!0),o,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=xt(e,function(e){if(Fa(e))return t=mn(e.length,t),!0}),Vt(t,function(t){return St(e,Ut(t))})}function oa(e,t){if(!e||!e.length)return[];var n=ra(e);return null==t?n:St(n,function(e){return Ot(t,o,e)})}var ia=Vr(function(e,t){return Fa(e)?cr(e,t):[]}),aa=Vr(function(e){return fo(xt(e,Fa))}),ua=Vr(function(e){var t=Hi(e);return Fa(t)&&(t=o),fo(xt(e,Fa),ai(t,2))}),sa=Vr(function(e){var t=Hi(e);return t="function"==typeof t?t:o,fo(xt(e,Fa),o,t)}),ca=Vr(ra),la=Vr(function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,oa(e,n)});function pa(e){var t=Mn(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var da=ei(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Yn&&mi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:o}),new Wn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)}),ha=Io(function(e,t,n){De.call(e,n)?++e[n]:rr(e,n,1)}),ga=Go(Yi),ma=Go(Ui);function ya(e,t){return(Ua(e)?wt:lr)(e,ai(t,3))}function _a(e,t){return(Ua(e)?At:pr)(e,ai(t,3))}var va=Io(function(e,t,n){De.call(e,n)?e[n].push(t):rr(e,n,[t])}),ka=Vr(function(e,t,n){var o=-1,i="function"==typeof t,a=qa(e)?r(e.length):[];return lr(e,function(e){a[++o]=i?Ot(t,e,n):xr(e,t,n)}),a}),ba=Io(function(e,t,n){rr(e,n,t)});function Ta(e,t){return(Ua(e)?St:Gr)(e,ai(t,3))}var Oa=Io(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ca=Vr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&yi(e,t[0],t[1])?t=[]:n>2&&yi(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,gr(t,1),[])}),wa=ct||function(){return pt.Date.now()};function Aa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Ho(e,c,o,o,o,o,t)}function Ea(e,t){var n;if("function"!=typeof t)throw new Ee(i);return e=du(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var xa=Vr(function(e,t,n){var r=1;if(n.length){var o=un(n,ii(xa));r|=s}return Ho(e,r,t,n,o)}),Ia=Vr(function(e,t,n){var r=3;if(n.length){var o=un(n,ii(Ia));r|=s}return Ho(t,r,e,n,o)});function Na(e,t,n){var r,a,u,s,c,l,p=0,f=!1,d=!1,h=!0;if("function"!=typeof e)throw new Ee(i);function g(t){var n=r,i=a;return r=a=o,p=t,s=e.apply(i,n)}function m(e){var n=e-l;return l===o||n>=t||n<0||d&&e-p>=u}function y(){var e=wa();if(m(e))return _(e);c=xi(y,function(e){var n=t-(e-l);return d?yn(n,u-(e-p)):n}(e))}function _(e){return c=o,h&&r?g(e):(r=a=o,s)}function v(){var e=wa(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===o)return function(e){return p=e,c=xi(y,t),f?g(e):s}(l);if(d)return ko(c),c=xi(y,t),g(l)}return c===o&&(c=xi(y,t)),s}return t=gu(t)||0,Ja(n)&&(f=!!n.leading,u=(d="maxWait"in n)?mn(gu(n.maxWait)||0,t):u,h="trailing"in n?!!n.trailing:h),v.cancel=function(){c!==o&&ko(c),p=0,r=l=a=c=o},v.flush=function(){return c===o?s:_(wa())},v}var Sa=Vr(function(e,t){return sr(e,1,t)}),Ra=Vr(function(e,t,n){return sr(e,gu(t)||0,n)});function Da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ee(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Da.Cache||qn),n}function La(e){if("function"!=typeof e)throw new Ee(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Da.Cache=qn;var $a=_o(function(e,t){var n=(t=1==t.length&&Ua(t[0])?St(t[0],Ht(ai())):St(gr(t,1),Ht(ai()))).length;return Vr(function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return Ot(e,this,r)})}),Ga=Vr(function(e,t){var n=un(t,ii(Ga));return Ho(e,s,o,t,n)}),Pa=Vr(function(e,t){var n=un(t,ii(Pa));return Ho(e,64,o,t,n)}),Ma=ei(function(e,t){return Ho(e,256,o,o,o,t)});function ja(e,t){return e===t||e!=e&&t!=t}var Qa=Bo(Cr),Wa=Bo(function(e,t){return e>=t}),Ya=Ir(function(){return arguments}())?Ir:function(e){return eu(e)&&De.call(e,"callee")&&!Fe.call(e,"callee")},Ua=r.isArray,Ba=yt?Ht(yt):function(e){return eu(e)&&Or(e)==S};function qa(e){return null!=e&&Xa(e.length)&&!Ka(e)}function Fa(e){return eu(e)&&qa(e)}var Va=mt||gs,za=_t?Ht(_t):function(e){return eu(e)&&Or(e)==_};function Ha(e){if(!eu(e))return!1;var t=Or(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ru(e)}function Ka(e){if(!Ja(e))return!1;var t=Or(e);return t==k||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==du(e)}function Xa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function Ja(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eu(e){return null!=e&&"object"==typeof e}var tu=vt?Ht(vt):function(e){return eu(e)&&fi(e)==T};function nu(e){return"number"==typeof e||eu(e)&&Or(e)==O}function ru(e){if(!eu(e)||Or(e)!=C)return!1;var t=Be(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==Pe}var ou=kt?Ht(kt):function(e){return eu(e)&&Or(e)==A},iu=bt?Ht(bt):function(e){return eu(e)&&fi(e)==E};function au(e){return"string"==typeof e||!Ua(e)&&eu(e)&&Or(e)==x}function uu(e){return"symbol"==typeof e||eu(e)&&Or(e)==I}var su=Tt?Ht(Tt):function(e){return eu(e)&&Xa(e.length)&&!!ot[Or(e)]},cu=Bo($r),lu=Bo(function(e,t){return e<=t});function pu(e){if(!e)return[];if(qa(e))return au(e)?pn(e):Eo(e);if(He&&e[He])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[He]());var t=fi(e);return(t==T?on:t==E?sn:ju)(e)}function fu(e){return e?(e=gu(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function du(e){var t=fu(e),n=t%1;return t==t?n?t-n:t:0}function hu(e){return e?ir(du(e),0,d):0}function gu(e){if("number"==typeof e)return e;if(uu(e))return f;if(Ja(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ja(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var n=he.test(e);return n||me.test(e)?st(e.slice(2),n?2:8):de.test(e)?f:+e}function mu(e){return xo(e,Su(e))}function yu(e){return null==e?"":ao(e)}var _u=No(function(e,t){if(bi(t)||qa(t))xo(t,Nu(t),e);else for(var n in t)De.call(t,n)&&Jn(e,n,t[n])}),vu=No(function(e,t){xo(t,Su(t),e)}),ku=No(function(e,t,n,r){xo(t,Su(t),e,r)}),bu=No(function(e,t,n,r){xo(t,Nu(t),e,r)}),Tu=ei(or),Ou=Vr(function(e,t){e=Ce(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&yi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],u=Su(a),s=-1,c=u.length;++s<c;){var l=u[s],p=e[l];(p===o||ja(p,Ne[l])&&!De.call(e,l))&&(e[l]=a[l])}return e}),Cu=Vr(function(e){return e.push(o,Zo),Ot(Du,o,e)});function wu(e,t,n){var r=null==e?o:br(e,t);return r===o?n:r}function Au(e,t){return null!=e&&di(e,t,Ar)}var Eu=jo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ge.call(t)),e[t]=n},Ju(ns)),xu=jo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ge.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]},ai),Iu=Vr(xr);function Nu(e){return qa(e)?zn(e):Lr(e)}function Su(e){return qa(e)?zn(e,!0):function(e){if(!Ja(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=bi(e),n=[];for(var r in e)("constructor"!=r||!t&&De.call(e,r))&&n.push(r);return n}(e)}var Ru=No(function(e,t,n){jr(e,t,n)}),Du=No(function(e,t,n,r){jr(e,t,n,r)}),Lu=ei(function(e,t){var n={};if(null==e)return n;var r=!1;t=St(t,function(t){return t=yo(t,e),r||(r=t.length>1),t}),xo(e,ni(e),n),r&&(n=ar(n,7,Xo));for(var o=t.length;o--;)so(n,t[o]);return n}),$u=ei(function(e,t){return null==e?{}:function(e,t){return Yr(e,t,function(t,n){return Au(e,n)})}(e,t)});function Gu(e,t){if(null==e)return{};var n=St(ni(e),function(e){return[e]});return t=ai(t),Yr(e,n,function(e,n){return t(e,n[0])})}var Pu=zo(Nu),Mu=zo(Su);function ju(e){return null==e?[]:Kt(e,Nu(e))}var Qu=Lo(function(e,t,n){return t=t.toLowerCase(),e+(n?Wu(t):t)});function Wu(e){return Hu(yu(e).toLowerCase())}function Yu(e){return(e=yu(e))&&e.replace(_e,en).replace(Ze,"")}var Uu=Lo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Bu=Lo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),qu=Do("toLowerCase"),Fu=Lo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Vu=Lo(function(e,t,n){return e+(n?" ":"")+Hu(t)}),zu=Lo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Hu=Do("toUpperCase");function Ku(e,t,n){return e=yu(e),(t=n?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Je)||[]}(e):function(e){return e.match(se)||[]}(e):e.match(t)||[]}var Zu=Vr(function(e,t){try{return Ot(e,o,t)}catch(e){return Ha(e)?e:new be(e)}}),Xu=ei(function(e,t){return wt(t,function(t){t=Gi(t),rr(e,t,xa(e[t],e))}),e});function Ju(e){return function(){return e}}var es=Po(),ts=Po(!0);function ns(e){return e}function rs(e){return Dr("function"==typeof e?e:ar(e,1))}var os=Vr(function(e,t){return function(n){return xr(n,e,t)}}),is=Vr(function(e,t){return function(n){return xr(e,n,t)}});function as(e,t,n){var r=Nu(t),o=kr(t,r);null!=n||Ja(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=kr(t,Nu(t)));var i=!(Ja(n)&&"chain"in n&&!n.chain),a=Ka(e);return wt(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Eo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Rt([this.value()],arguments))})}),e}function us(){}var ss=Wo(St),cs=Wo(Et),ls=Wo($t);function ps(e){return _i(e)?Ut(Gi(e)):function(e){return function(t){return br(t,e)}}(e)}var fs=Uo(),ds=Uo(!0);function hs(){return[]}function gs(){return!1}var ms,ys=Qo(function(e,t){return e+t},0),_s=Fo("ceil"),vs=Qo(function(e,t){return e/t},1),ks=Fo("floor"),bs=Qo(function(e,t){return e*t},1),Ts=Fo("round"),Os=Qo(function(e,t){return e-t},0);return Mn.after=function(e,t){if("function"!=typeof t)throw new Ee(i);return e=du(e),function(){if(--e<1)return t.apply(this,arguments)}},Mn.ary=Aa,Mn.assign=_u,Mn.assignIn=vu,Mn.assignInWith=ku,Mn.assignWith=bu,Mn.at=Tu,Mn.before=Ea,Mn.bind=xa,Mn.bindAll=Xu,Mn.bindKey=Ia,Mn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},Mn.chain=pa,Mn.chunk=function(e,t,n){t=(n?yi(e,t,n):t===o)?1:mn(du(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,u=0,s=r(ft(i/t));a<i;)s[u++]=eo(e,a,a+=t);return s},Mn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Mn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Rt(Ua(n)?Eo(n):[n],gr(t,1))},Mn.cond=function(e){var t=null==e?0:e.length,n=ai();return e=t?St(e,function(e){if("function"!=typeof e[1])throw new Ee(i);return[n(e[0]),e[1]]}):[],Vr(function(n){for(var r=-1;++r<t;){var o=e[r];if(Ot(o[0],this,n))return Ot(o[1],this,n)}})},Mn.conforms=function(e){return function(e){var t=Nu(e);return function(n){return ur(n,e,t)}}(ar(e,1))},Mn.constant=Ju,Mn.countBy=ha,Mn.create=function(e,t){var n=jn(e);return null==t?n:nr(n,t)},Mn.curry=function e(t,n,r){var i=Ho(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Mn.curryRight=function e(t,n,r){var i=Ho(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},Mn.debounce=Na,Mn.defaults=Ou,Mn.defaultsDeep=Cu,Mn.defer=Sa,Mn.delay=Ra,Mn.difference=ji,Mn.differenceBy=Qi,Mn.differenceWith=Wi,Mn.drop=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=n||t===o?1:du(t))<0?0:t,r):[]},Mn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,0,(t=r-(t=n||t===o?1:du(t)))<0?0:t):[]},Mn.dropRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0,!0):[]},Mn.dropWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0):[]},Mn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&yi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=du(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:du(r))<0&&(r+=i),r=n>r?0:hu(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Mn.filter=function(e,t){return(Ua(e)?xt:hr)(e,ai(t,3))},Mn.flatMap=function(e,t){return gr(Ta(e,t),1)},Mn.flatMapDeep=function(e,t){return gr(Ta(e,t),l)},Mn.flatMapDepth=function(e,t,n){return n=n===o?1:du(n),gr(Ta(e,t),n)},Mn.flatten=Bi,Mn.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},Mn.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===o?1:du(t)):[]},Mn.flip=function(e){return Ho(e,512)},Mn.flow=es,Mn.flowRight=ts,Mn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];rr(r,o[0],o[1])}return r},Mn.functions=function(e){return null==e?[]:kr(e,Nu(e))},Mn.functionsIn=function(e){return null==e?[]:kr(e,Su(e))},Mn.groupBy=va,Mn.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Mn.intersection=Fi,Mn.intersectionBy=Vi,Mn.intersectionWith=zi,Mn.invert=Eu,Mn.invertBy=xu,Mn.invokeMap=ka,Mn.iteratee=rs,Mn.keyBy=ba,Mn.keys=Nu,Mn.keysIn=Su,Mn.map=Ta,Mn.mapKeys=function(e,t){var n={};return t=ai(t,3),_r(e,function(e,r,o){rr(n,t(e,r,o),e)}),n},Mn.mapValues=function(e,t){var n={};return t=ai(t,3),_r(e,function(e,r,o){rr(n,r,t(e,r,o))}),n},Mn.matches=function(e){return Pr(ar(e,1))},Mn.matchesProperty=function(e,t){return Mr(e,ar(t,1))},Mn.memoize=Da,Mn.merge=Ru,Mn.mergeWith=Du,Mn.method=os,Mn.methodOf=is,Mn.mixin=as,Mn.negate=La,Mn.nthArg=function(e){return e=du(e),Vr(function(t){return Qr(t,e)})},Mn.omit=Lu,Mn.omitBy=function(e,t){return Gu(e,La(ai(t)))},Mn.once=function(e){return Ea(2,e)},Mn.orderBy=function(e,t,n,r){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(n=r?o:n)||(n=null==n?[]:[n]),Wr(e,t,n))},Mn.over=ss,Mn.overArgs=$a,Mn.overEvery=cs,Mn.overSome=ls,Mn.partial=Ga,Mn.partialRight=Pa,Mn.partition=Oa,Mn.pick=$u,Mn.pickBy=Gu,Mn.property=ps,Mn.propertyOf=function(e){return function(t){return null==e?o:br(e,t)}},Mn.pull=Ki,Mn.pullAll=Zi,Mn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,ai(n,2)):e},Mn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,o,n):e},Mn.pullAt=Xi,Mn.range=fs,Mn.rangeRight=ds,Mn.rearg=Ma,Mn.reject=function(e,t){return(Ua(e)?xt:hr)(e,La(ai(t,3)))},Mn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ai(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Br(e,o),n},Mn.rest=function(e,t){if("function"!=typeof e)throw new Ee(i);return Vr(e,t=t===o?t:du(t))},Mn.reverse=Ji,Mn.sampleSize=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:du(t),(Ua(e)?Kn:Hr)(e,t)},Mn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},Mn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Kr(e,t,n,r)},Mn.shuffle=function(e){return(Ua(e)?Zn:Jr)(e)},Mn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&yi(e,t,n)?(t=0,n=r):(t=null==t?0:du(t),n=n===o?r:du(n)),eo(e,t,n)):[]},Mn.sortBy=Ca,Mn.sortedUniq=function(e){return e&&e.length?oo(e):[]},Mn.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ai(t,2)):[]},Mn.split=function(e,t,n){return n&&"number"!=typeof n&&yi(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=yu(e))&&("string"==typeof t||null!=t&&!ou(t))&&!(t=ao(t))&&rn(e)?vo(pn(e),0,n):e.split(t,n):[]},Mn.spread=function(e,t){if("function"!=typeof e)throw new Ee(i);return t=null==t?0:mn(du(t),0),Vr(function(n){var r=n[t],o=vo(n,0,t);return r&&Rt(o,r),Ot(e,this,o)})},Mn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Mn.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:du(t))<0?0:t):[]},Mn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:du(t)))<0?0:t,r):[]},Mn.takeRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!1,!0):[]},Mn.takeWhile=function(e,t){return e&&e.length?lo(e,ai(t,3)):[]},Mn.tap=function(e,t){return t(e),e},Mn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Ee(i);return Ja(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Na(e,t,{leading:r,maxWait:t,trailing:o})},Mn.thru=fa,Mn.toArray=pu,Mn.toPairs=Pu,Mn.toPairsIn=Mu,Mn.toPath=function(e){return Ua(e)?St(e,Gi):uu(e)?[e]:Eo($i(yu(e)))},Mn.toPlainObject=mu,Mn.transform=function(e,t,n){var r=Ua(e),o=r||Va(e)||su(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Ja(e)&&Ka(i)?jn(Be(e)):{}}return(o?wt:_r)(e,function(e,r,o){return t(n,e,r,o)}),n},Mn.unary=function(e){return Aa(e,1)},Mn.union=ea,Mn.unionBy=ta,Mn.unionWith=na,Mn.uniq=function(e){return e&&e.length?uo(e):[]},Mn.uniqBy=function(e,t){return e&&e.length?uo(e,ai(t,2)):[]},Mn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?uo(e,o,t):[]},Mn.unset=function(e,t){return null==e||so(e,t)},Mn.unzip=ra,Mn.unzipWith=oa,Mn.update=function(e,t,n){return null==e?e:co(e,t,mo(n))},Mn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:co(e,t,mo(n),r)},Mn.values=ju,Mn.valuesIn=function(e){return null==e?[]:Kt(e,Su(e))},Mn.without=ia,Mn.words=Ku,Mn.wrap=function(e,t){return Ga(mo(t),e)},Mn.xor=aa,Mn.xorBy=ua,Mn.xorWith=sa,Mn.zip=ca,Mn.zipObject=function(e,t){return ho(e||[],t||[],Jn)},Mn.zipObjectDeep=function(e,t){return ho(e||[],t||[],Kr)},Mn.zipWith=la,Mn.entries=Pu,Mn.entriesIn=Mu,Mn.extend=vu,Mn.extendWith=ku,as(Mn,Mn),Mn.add=ys,Mn.attempt=Zu,Mn.camelCase=Qu,Mn.capitalize=Wu,Mn.ceil=_s,Mn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=gu(n))==n?n:0),t!==o&&(t=(t=gu(t))==t?t:0),ir(gu(e),t,n)},Mn.clone=function(e){return ar(e,4)},Mn.cloneDeep=function(e){return ar(e,5)},Mn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},Mn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},Mn.conformsTo=function(e,t){return null==t||ur(e,t,Nu(t))},Mn.deburr=Yu,Mn.defaultTo=function(e,t){return null==e||e!=e?t:e},Mn.divide=vs,Mn.endsWith=function(e,t,n){e=yu(e),t=ao(t);var r=e.length,i=n=n===o?r:ir(du(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Mn.eq=ja,Mn.escape=function(e){return(e=yu(e))&&z.test(e)?e.replace(F,tn):e},Mn.escapeRegExp=function(e){return(e=yu(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Mn.every=function(e,t,n){var r=Ua(e)?Et:fr;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},Mn.find=ga,Mn.findIndex=Yi,Mn.findKey=function(e,t){return Pt(e,ai(t,3),_r)},Mn.findLast=ma,Mn.findLastIndex=Ui,Mn.findLastKey=function(e,t){return Pt(e,ai(t,3),vr)},Mn.floor=ks,Mn.forEach=ya,Mn.forEachRight=_a,Mn.forIn=function(e,t){return null==e?e:mr(e,ai(t,3),Su)},Mn.forInRight=function(e,t){return null==e?e:yr(e,ai(t,3),Su)},Mn.forOwn=function(e,t){return e&&_r(e,ai(t,3))},Mn.forOwnRight=function(e,t){return e&&vr(e,ai(t,3))},Mn.get=wu,Mn.gt=Qa,Mn.gte=Wa,Mn.has=function(e,t){return null!=e&&di(e,t,wr)},Mn.hasIn=Au,Mn.head=qi,Mn.identity=ns,Mn.includes=function(e,t,n,r){e=qa(e)?e:ju(e),n=n&&!r?du(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),au(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&jt(e,t,n)>-1},Mn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:du(n);return o<0&&(o=mn(r+o,0)),jt(e,t,o)},Mn.inRange=function(e,t,n){return t=fu(t),n===o?(n=t,t=0):n=fu(n),function(e,t,n){return e>=yn(t,n)&&e<mn(t,n)}(e=gu(e),t,n)},Mn.invoke=Iu,Mn.isArguments=Ya,Mn.isArray=Ua,Mn.isArrayBuffer=Ba,Mn.isArrayLike=qa,Mn.isArrayLikeObject=Fa,Mn.isBoolean=function(e){return!0===e||!1===e||eu(e)&&Or(e)==y},Mn.isBuffer=Va,Mn.isDate=za,Mn.isElement=function(e){return eu(e)&&1===e.nodeType&&!ru(e)},Mn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||Va(e)||su(e)||Ya(e)))return!e.length;var t=fi(e);if(t==T||t==E)return!e.size;if(bi(e))return!Lr(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},Mn.isEqual=function(e,t){return Nr(e,t)},Mn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Nr(e,t,o,n):!!r},Mn.isError=Ha,Mn.isFinite=function(e){return"number"==typeof e&&Gt(e)},Mn.isFunction=Ka,Mn.isInteger=Za,Mn.isLength=Xa,Mn.isMap=tu,Mn.isMatch=function(e,t){return e===t||Sr(e,t,si(t))},Mn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Sr(e,t,si(t),n)},Mn.isNaN=function(e){return nu(e)&&e!=+e},Mn.isNative=function(e){if(ki(e))throw new be("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Mn.isNil=function(e){return null==e},Mn.isNull=function(e){return null===e},Mn.isNumber=nu,Mn.isObject=Ja,Mn.isObjectLike=eu,Mn.isPlainObject=ru,Mn.isRegExp=ou,Mn.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=p},Mn.isSet=iu,Mn.isString=au,Mn.isSymbol=uu,Mn.isTypedArray=su,Mn.isUndefined=function(e){return e===o},Mn.isWeakMap=function(e){return eu(e)&&fi(e)==N},Mn.isWeakSet=function(e){return eu(e)&&"[object WeakSet]"==Or(e)},Mn.join=function(e,t){return null==e?"":Bt.call(e,t)},Mn.kebabCase=Uu,Mn.last=Hi,Mn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=du(n))<0?mn(r+i,0):yn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Mt(e,Wt,i,!0)},Mn.lowerCase=Bu,Mn.lowerFirst=qu,Mn.lt=cu,Mn.lte=lu,Mn.max=function(e){return e&&e.length?dr(e,ns,Cr):o},Mn.maxBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Cr):o},Mn.mean=function(e){return Yt(e,ns)},Mn.meanBy=function(e,t){return Yt(e,ai(t,2))},Mn.min=function(e){return e&&e.length?dr(e,ns,$r):o},Mn.minBy=function(e,t){return e&&e.length?dr(e,ai(t,2),$r):o},Mn.stubArray=hs,Mn.stubFalse=gs,Mn.stubObject=function(){return{}},Mn.stubString=function(){return""},Mn.stubTrue=function(){return!0},Mn.multiply=bs,Mn.nth=function(e,t){return e&&e.length?Qr(e,du(t)):o},Mn.noConflict=function(){return pt._===this&&(pt._=Me),this},Mn.noop=us,Mn.now=wa,Mn.pad=function(e,t,n){e=yu(e);var r=(t=du(t))?ln(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Yo(dt(o),n)+e+Yo(ft(o),n)},Mn.padEnd=function(e,t,n){e=yu(e);var r=(t=du(t))?ln(e):0;return t&&r<t?e+Yo(t-r,n):e},Mn.padStart=function(e,t,n){e=yu(e);var r=(t=du(t))?ln(e):0;return t&&r<t?Yo(t-r,n)+e:e},Mn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),vn(yu(e).replace(re,""),t||0)},Mn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&yi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=fu(e),t===o?(t=e,e=0):t=fu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=kn();return yn(e+i*(t-e+ut("1e-"+((i+"").length-1))),t)}return qr(e,t)},Mn.reduce=function(e,t,n){var r=Ua(e)?Dt:qt,o=arguments.length<3;return r(e,ai(t,4),n,o,lr)},Mn.reduceRight=function(e,t,n){var r=Ua(e)?Lt:qt,o=arguments.length<3;return r(e,ai(t,4),n,o,pr)},Mn.repeat=function(e,t,n){return t=(n?yi(e,t,n):t===o)?1:du(t),Fr(yu(e),t)},Mn.replace=function(){var e=arguments,t=yu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mn.result=function(e,t,n){var r=-1,i=(t=yo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Gi(t[r])];a===o&&(r=i,a=n),e=Ka(a)?a.call(e):a}return e},Mn.round=Ts,Mn.runInContext=e,Mn.sample=function(e){return(Ua(e)?Hn:zr)(e)},Mn.size=function(e){if(null==e)return 0;if(qa(e))return au(e)?ln(e):e.length;var t=fi(e);return t==T||t==E?e.size:Lr(e).length},Mn.snakeCase=Fu,Mn.some=function(e,t,n){var r=Ua(e)?$t:to;return n&&yi(e,t,n)&&(t=o),r(e,ai(t,3))},Mn.sortedIndex=function(e,t){return no(e,t)},Mn.sortedIndexBy=function(e,t,n){return ro(e,t,ai(n,2))},Mn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=no(e,t);if(r<n&&ja(e[r],t))return r}return-1},Mn.sortedLastIndex=function(e,t){return no(e,t,!0)},Mn.sortedLastIndexBy=function(e,t,n){return ro(e,t,ai(n,2),!0)},Mn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=no(e,t,!0)-1;if(ja(e[n],t))return n}return-1},Mn.startCase=Vu,Mn.startsWith=function(e,t,n){return e=yu(e),n=null==n?0:ir(du(n),0,e.length),t=ao(t),e.slice(n,n+t.length)==t},Mn.subtract=Os,Mn.sum=function(e){return e&&e.length?Ft(e,ns):0},Mn.sumBy=function(e,t){return e&&e.length?Ft(e,ai(t,2)):0},Mn.template=function(e,t,n){var r=Mn.templateSettings;n&&yi(e,t,n)&&(t=o),e=yu(e),t=bu({},t,r,Ko);var i=bu({},t.imports,r.imports,Ko),a=Nu(i),u=Kt(i,a);wt(a,function(e){if(ce.test(e))throw new be("Invalid `imports` option passed into `_.template`")});var s,c,l=0,p=t.interpolate||ve,f="__p += '",d=we((t.escape||ve).source+"|"+p.source+"|"+(p===Z?pe:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),h="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,function(t,n,r,o,i,a){return r||(r=o),f+=e.slice(l,a).replace(ke,nn),n&&(s=!0,f+="' +\n__e("+n+") +\n'"),i&&(c=!0,f+="';\n"+i+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+t.length,t}),f+="';\n";var g=De.call(t,"variable")&&t.variable;if(g){if(ce.test(g))throw new be("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(c?f.replace(Y,""):f).replace(U,"$1").replace(B,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Zu(function(){return Te(a,h+"return "+f).apply(o,u)});if(m.source=f,Ha(m))throw m;return m},Mn.times=function(e,t){if((e=du(e))<1||e>p)return[];var n=d,r=yn(e,d);t=ai(t),e-=d;for(var o=Vt(r,t);++n<e;)t(n);return o},Mn.toFinite=fu,Mn.toInteger=du,Mn.toLength=hu,Mn.toLower=function(e){return yu(e).toLowerCase()},Mn.toNumber=gu,Mn.toSafeInteger=function(e){return e?ir(du(e),-9007199254740991,p):0===e?e:0},Mn.toString=yu,Mn.toUpper=function(e){return yu(e).toUpperCase()},Mn.trim=function(e,t,n){if((e=yu(e))&&(n||t===o))return zt(e);if(!e||!(t=ao(t)))return e;var r=pn(e),i=pn(t);return vo(r,Xt(r,i),Jt(r,i)+1).join("")},Mn.trimEnd=function(e,t,n){if((e=yu(e))&&(n||t===o))return e.slice(0,fn(e)+1);if(!e||!(t=ao(t)))return e;var r=pn(e);return vo(r,0,Jt(r,pn(t))+1).join("")},Mn.trimStart=function(e,t,n){if((e=yu(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=ao(t)))return e;var r=pn(e);return vo(r,Xt(r,pn(t))).join("")},Mn.truncate=function(e,t){var n=30,r="...";if(Ja(t)){var i="separator"in t?t.separator:i;n="length"in t?du(t.length):n,r="omission"in t?ao(t.omission):r}var a=(e=yu(e)).length;if(rn(e)){var u=pn(e);a=u.length}if(n>=a)return e;var s=n-ln(r);if(s<1)return r;var c=u?vo(u,0,s).join(""):e.slice(0,s);if(i===o)return c+r;if(u&&(s+=c.length-s),ou(i)){if(e.slice(s).search(i)){var l,p=c;for(i.global||(i=we(i.source,yu(fe.exec(i))+"g")),i.lastIndex=0;l=i.exec(p);)var f=l.index;c=c.slice(0,f===o?s:f)}}else if(e.indexOf(ao(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},Mn.unescape=function(e){return(e=yu(e))&&V.test(e)?e.replace(q,dn):e},Mn.uniqueId=function(e){var t=++Le;return yu(e)+t},Mn.upperCase=zu,Mn.upperFirst=Hu,Mn.each=ya,Mn.eachRight=_a,Mn.first=qi,as(Mn,(ms={},_r(Mn,function(e,t){De.call(Mn.prototype,t)||(ms[t]=e)}),ms),{chain:!1}),Mn.VERSION="4.18.1",wt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Mn[e].placeholder=Mn}),wt(["drop","take"],function(e,t){Yn.prototype[e]=function(n){n=n===o?1:mn(du(n),0);var r=this.__filtered__&&!t?new Yn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Yn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),wt(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Yn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),wt(["head","last"],function(e,t){var n="take"+(t?"Right":"");Yn.prototype[e]=function(){return this[n](1).value()[0]}}),wt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Yn.prototype[e]=function(){return this.__filtered__?new Yn(this):this[n](1)}}),Yn.prototype.compact=function(){return this.filter(ns)},Yn.prototype.find=function(e){return this.filter(e).head()},Yn.prototype.findLast=function(e){return this.reverse().find(e)},Yn.prototype.invokeMap=Vr(function(e,t){return"function"==typeof e?new Yn(this):this.map(function(n){return xr(n,e,t)})}),Yn.prototype.reject=function(e){return this.filter(La(ai(e)))},Yn.prototype.slice=function(e,t){e=du(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Yn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=du(t))<0?n.dropRight(-t):n.take(t-e)),n)},Yn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yn.prototype.toArray=function(){return this.take(d)},_r(Yn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Mn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Mn.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,s=t instanceof Yn,c=u[0],l=s||Ua(t),p=function(e){var t=i.apply(Mn,Rt([e],u));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(s=l=!1);var f=this.__chain__,d=!!this.__actions__.length,h=a&&!f,g=s&&!d;if(!a&&l){t=g?t:new Yn(this);var m=e.apply(t,u);return m.__actions__.push({func:fa,args:[p],thisArg:o}),new Wn(m,f)}return h&&g?e.apply(this,u):(m=this.thru(p),h?r?m.value()[0]:m.value():m)})}),wt(["pop","push","shift","sort","splice","unshift"],function(e){var t=xe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Mn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ua(o)?o:[],e)}return this[n](function(n){return t.apply(Ua(n)?n:[],e)})}}),_r(Yn.prototype,function(e,t){var n=Mn[t];if(n){var r=n.name+"";De.call(In,r)||(In[r]=[]),In[r].push({name:t,func:n})}}),In[Mo(o,2).name]=[{name:"wrapper",func:o}],Yn.prototype.clone=function(){var e=new Yn(this.__wrapped__);return e.__actions__=Eo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Eo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Eo(this.__views__),e},Yn.prototype.reverse=function(){if(this.__filtered__){var e=new Yn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=yn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,s=u-a,c=r?u:a-1,l=this.__iteratees__,p=l.length,f=0,d=yn(s,this.__takeCount__);if(!n||!r&&o==s&&d==s)return po(e,this.__actions__);var h=[];e:for(;s--&&f<d;){for(var g=-1,m=e[c+=t];++g<p;){var y=l[g],_=y.iteratee,v=y.type,k=_(m);if(2==v)m=k;else if(!k){if(1==v)continue e;break e}}h[f++]=m}return h},Mn.prototype.at=da,Mn.prototype.chain=function(){return pa(this)},Mn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Mn.prototype.next=function(){this.__values__===o&&(this.__values__=pu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Mn.prototype.plant=function(e){for(var t,n=this;n instanceof Qn;){var r=Mi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Mn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yn){var t=e;return this.__actions__.length&&(t=new Yn(this)),(t=t.reverse()).__actions__.push({func:fa,args:[Ji],thisArg:o}),new Wn(t,this.__chain__)}return this.thru(Ji)},Mn.prototype.toJSON=Mn.prototype.valueOf=Mn.prototype.value=function(){return po(this.__wrapped__,this.__actions__)},Mn.prototype.first=Mn.prototype.head,He&&(Mn.prototype[He]=function(){return this}),Mn}();pt._=hn,(r=function(){return hn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],i=t[r++];n.o(e,o)?0===i&&r++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);let r={};(()=>{"use strict";n.r(r),n.d(r,{ApiCallContext:()=>Ut,CronExpression:()=>Bt,DistributedLockContext:()=>qt,FUNCTION_AFFINITY_SCOPES:()=>W,GraphqlContext:()=>Ft,MUTATION_TYPES:()=>zt,Meta:()=>U,MutationContext:()=>Ht,QueryContext:()=>at,SOURCE_CODE_ANALYZER_MODELS:()=>e.SOURCE_CODE_ANALYZER_MODELS,SOURCE_CODE_ANALYZE_FUNCTION_ID:()=>e.SOURCE_CODE_ANALYZE_FUNCTION_ID,SOURCE_CODE_INTEGRATION_TYPES:()=>e.SOURCE_CODE_INTEGRATION_TYPES,SOURCE_CODE_MAX_REPOSITORIES:()=>e.SOURCE_CODE_MAX_REPOSITORIES,SOURCE_CODE_MAX_SUPPLEMENTAL_INSTRUCTIONS_LENGTH:()=>e.SOURCE_CODE_MAX_SUPPLEMENTAL_INSTRUCTIONS_LENGTH,SOURCE_CONTROL_PROVIDERS:()=>e.SOURCE_CONTROL_PROVIDERS,SecureAiAgentContext:()=>Yt,SecureLangGraphContext:()=>Vt,SquidLlmService:()=>Qt,SquidProject:()=>Wt,SquidService:()=>Dt,USER_CODE_MODULE_ID:()=>Ce,USER_CODE_MODULE_IDS:()=>Ae,USER_CODE_PYTHON_MODULE_ID:()=>we,WorkspaceClient:()=>Nt,aiFunction:()=>oe,aiFunctionsConfigurator:()=>ie,clientConnectionStateHandler:()=>ve,createWebhookResponse:()=>Kt,eventHandler:()=>ne,executable:()=>re,getPassiveSquid:()=>jt,getSquid:()=>Mt,getSquidService:()=>$t,isWorkspaceServerConfigured:()=>It,limiterConfigToOptions:()=>Te,limits:()=>de,llmAsk:()=>ge,llmService:()=>he,mcpAuthorizer:()=>_e,mcpServer:()=>me,mcpTool:()=>ye,metadata:()=>q,normalizeBitbucketRepositorySelection:()=>e.normalizeBitbucketRepositorySelection,normalizeGitHubRepositorySelection:()=>e.normalizeGitHubRepositorySelection,onQueueMessage:()=>te,publicCollection:()=>H,scheduler:()=>ue,secureAiAgent:()=>pe,secureAiQuery:()=>V,secureApi:()=>J,secureCollection:()=>z,secureDatabase:()=>F,secureDistributedLock:()=>le,secureGraphQL:()=>ee,secureLangGraph:()=>fe,secureMetric:()=>X,secureNativeQuery:()=>ce,secureStorage:()=>K,secureTopic:()=>Z,squidInject:()=>Gt,trigger:()=>ae,webhook:()=>se});const e=require("@squidcloud/client");let t=e=>new Error(e);function o(e,n,...r){e||function(e,...n){const r=a(e);if("object"==typeof r)throw r;throw t(r||"Assertion error",...n)}(n,...r)}function i(e,t,...n){return o(e,t,...n),e}function a(e){return void 0===e?"":"string"==typeof e?e:e()}const u=(e,t=void 0)=>{o(function(e){return"string"==typeof e}(e),()=>function(e,t,n){const r=a(e);if("object"==typeof r)throw r;return`${r?`${r}: `:""}${t} ${function(e){return void 0===e?"<undefined>":"symbol"==typeof e?e.toString():null===e?"<null>":`<${typeof e}:${e}>`}(n)}`}(t,"Not a string",e))};function s(e,t){return e instanceof Error?e.message:null!=t?t:`${e}`}const c=/^[A-Za-z0-9_-]{1,64}$/;function l(e,t){o(function(e){return c.test(e)}(e),`Invalid @aiFunction id "${e}"${t?` on ${t}`:""}: it must be 1–64 characters of letters, digits, "_" and "-" — the tool-name charset LLM providers accept.`)}function p(e){const t=e.split(":");return o(2===t.length,`Invalid service function name: ${e}`),t[1]}Object.keys({cpuMillis:{min:100,max:2e3},memoryMi:{min:512,max:8192},pythonMemoryMb:{min:256,max:8192},pythonMaxCpus:{min:1,max:4},forcedPythonsPerPod:{min:2,max:100},minPods:{min:1,max:20},maxPods:{min:1,max:50}});var f=n(243);const d=new Set(["date","time","date-time","duration","uri","uri-reference","uri-template","url","email","hostname","ipv4","ipv6","regex","uuid","json-pointer","json-pointer-uri-fragment","relative-json-pointer","byte","int32","int64","float","double","password","binary"]),h=new Set(["object","array","string","number","integer","boolean","null"]),g=new Set(["title","description","default","examples","deprecated","readOnly","writeOnly","$comment"]),m=new Set(["$schema","$id","$defs","definitions"]),y=new Set(["$schema","$id","$defs","definitions","$comment","discriminator"]),_=new Set(["minLength","maxLength","minItems","maxItems","minProperties","maxProperties"]),v=new Set(["minimum","maximum","exclusiveMinimum","exclusiveMaximum"]),k=["type","enum","const","anyOf","oneOf","$ref","allOf"];function b(e){const t=`Parameter '${e.name}'`;if("object"!==e.type)return S(e.schema)?[]:[`${t}: 'schema' is only supported on 'object' parameters.`];const n=[];return S(e.enum)||n.push(`${t}: 'enum' is not supported on 'object' parameters; put it inside 'schema'.`),R(e.schema)?(n.push(...function(e){const t=[];if("object"!==e.type&&t.push("#: the root must declare type 'object'."),T(e,e,"#",0,t),t.length)return t;try{const n=E(e,e,[],{nodes:0},0),r=JSON.stringify(n).length;r>65536&&t.push(`#: is ${r} characters once '$ref's are inlined; the limit is 65536.`)}catch(e){t.push(s(e))}return t}(e.schema).map(e=>`${t} schema ${e}`)),n):(n.push(`${t}: an 'object' parameter requires a JSON Schema object in 'schema'.`),n)}function T(e,t,n,r,o){if(r>16)return void o.push(`${n}: nests deeper than 16 levels.`);const i=e===t;for(const[a,u]of Object.entries(e)){const s=`${n}/${G(a)}`;if(!a.startsWith("x-")&&"discriminator"!==a)if(!m.has(a)||i)switch(a){case"properties":case"$defs":case"definitions":if(!R(u)){o.push(`${s}: must be an object.`);break}for(const[e,n]of Object.entries(u))O(n,t,`${s}/${G(e)}`,r,o);break;case"items":case"propertyNames":O(u,t,s,r,o);break;case"additionalProperties":"boolean"!=typeof u&&O(u,t,s,r,o);break;case"anyOf":case"oneOf":case"allOf":C(a,u,e,t,s,r,o);break;case"$ref":w(u,e,t,s,o);break;case"type":L(u)||o.push(`${s}: must be a JSON type name or a non-empty list of distinct ones.`);break;case"required":D(u)||o.push(`${s}: must be a list of distinct property names.`);break;case"enum":Array.isArray(u)&&u.length||o.push(`${s}: must be a non-empty list.`);break;case"examples":Array.isArray(u)||o.push(`${s}: must be a list.`);break;case"const":case"default":break;case"pattern":$(u)||o.push(`${s}: must be a valid regular expression.`);break;case"format":"string"==typeof u&&d.has(u)||o.push(`${s}: unsupported format; use one of ${[...d].join(", ")}.`);break;case"multipleOf":"number"==typeof u&&u>0||o.push(`${s}: must be a number greater than 0.`);break;case"uniqueItems":case"deprecated":case"readOnly":case"writeOnly":"boolean"!=typeof u&&o.push(`${s}: must be a boolean.`);break;case"title":case"description":case"$comment":case"$schema":case"$id":"string"!=typeof u&&o.push(`${s}: must be a string.`);break;default:_.has(a)?(!Number.isInteger(u)||u<0)&&o.push(`${s}: must be a non-negative integer.`):v.has(a)?"number"==typeof u&&Number.isFinite(u)||o.push(`${s}: must be a number.`):o.push(`${s}: unsupported keyword.`)}else o.push(`${s}: is only supported at the root of the schema.`)}var a;((a=e.type)==="array"||Array.isArray(a)&&a.includes("array"))&&void 0===e.items&&o.push(`${n}: an array schema must declare 'items'.`),k.some(t=>void 0!==e[t])||o.push(`${n}: must declare 'type' (or 'enum', 'const', 'anyOf', 'oneOf' or '$ref').`),void 0===e.properties||void 0===e.anyOf&&void 0===e.oneOf||o.push(`${n}: cannot combine 'properties' with 'anyOf' or 'oneOf'; list the properties in each branch.`),function(e,t,n){const{required:r,properties:o,additionalProperties:i}=e;if(!D(r)||!function(e,t){return!1===t||void 0===t&&void 0!==e}(o,i))return;const a=R(o)?o:{},u=r.filter(e=>!(e in a));u.length&&n.push(`${t}/required: ${u.join(", ")} not declared in 'properties' of a closed object.`)}(e,n,o)}function O(e,t,n,r,o){R(e)?T(e,t,n,r+1,o):o.push(`${n}: must be a schema object.`)}function C(e,t,n,r,o,i,a){Array.isArray(t)&&t.length?("allOf"===e&&(t.length>1&&a.push(`${o}: only a single-element 'allOf' is supported.`),A(n,e,o,a)),t.forEach((e,t)=>O(e,r,`${o}/${t}`,i,a))):a.push(`${o}: must be a non-empty list of schemas.`)}function w(e,t,n,r,o){"string"==typeof e&&e.startsWith("#")?(R(I(n,e))||o.push(`${r}: '${e}' does not point to a schema in this schema.`),A(t,"$ref",r,o)):o.push(`${r}: only local references ('#/...') are supported.`)}function A(e,t,n,r){const o=Object.keys(e).filter(e=>e!==t&&!g.has(e)&&!y.has(e)&&!e.startsWith("x-"));o.length&&r.push(`${n}: '${t}' can only be combined with annotations, not with ${o.join(", ")}.`)}function E(e,t,n,r,i){o(++r.nodes<=5e3,"#: expands to more than 5000 schemas once '$ref's are inlined."),o(i<=16,"#: nests deeper than 16 levels once '$ref's are inlined.");const a=e.$ref;if("string"==typeof a){o(!n.includes(a),`#: '${a}' is recursive; recursive schemas are not supported.`);const u=I(t,a);return o(R(u),`#: '${a}' does not point to a schema in this schema.`),x(E(u,t,[...n,a],r,i),e)}const u=e.allOf;if(Array.isArray(u))return x(E(u[0],t,n,r,i),e);const s={};for(const[o,a]of Object.entries(e))if(!y.has(o)&&!o.startsWith("x-"))if("properties"===o){const e={};for(const[o,u]of Object.entries(a))e[o]=E(u,t,n,r,i+1);s[o]=e}else"items"===o||"propertyNames"===o||"additionalProperties"===o&&R(a)?s[o]=E(a,t,n,r,i+1):s[o]="anyOf"===o||"oneOf"===o?a.map(e=>E(e,t,n,r,i+1)):a;return void 0!==s.properties&&void 0===s.additionalProperties&&(s.additionalProperties=!1),s}function x(e,t){const n=Object.entries(t).filter(([e])=>g.has(e)&&"$comment"!==e);return n.length?{...e,...Object.fromEntries(n)}:e}function I(e,t){const n=t.slice(1);if(!n)return e;if(!n.startsWith("/"))return;let r=e;for(const e of n.slice(1).split("/")){if(!R(r))return;const t=N(e);if(void 0===t)return;r=Object.hasOwn(r,t)?r[t]:void 0}return r}function N(e){try{return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}catch{return}}function S(e){return null==e}function R(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function D(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)&&new Set(e).size===e.length}function L(e){return"string"==typeof e?h.has(e):D(e)&&e.length>0&&e.every(e=>h.has(e))}function $(e){if("string"!=typeof e)return!1;try{return new RegExp(e,"u"),!0}catch{return!1}}function G(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}new WeakMap;const P=[...["gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-6-astra","gpt-6-luna","gpt-6.1-sol","gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","o1","o3","o3-mini","o4-mini","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5.1","gpt-5.2","gpt-5.2-pro","gpt-5.4","gpt-5.4-mini","gpt-5.4-nano","gpt-5.5","gpt-5.5-pro","gpt-6-sol"],...["claude-fable-5","claude-fable-5-1","claude-haiku-5-5","claude-opus-5-5","claude-sonnet-5-5","claude-3-7-sonnet-latest","claude-haiku-4-5-20251001","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-opus-4-8","claude-opus-5","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","claude-sonnet-4-6","claude-sonnet-5"],...["gemini-4-argon","gemini-3.8-flash","gemini-3.5-flash-lite","gemini-2.5-pro","gemini-3.1-pro","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-3-flash","gemini-3-pro","gemini-3.1-flash-lite","gemini-3.5-flash","gemini-3.6-flash","gemini-3.7-flash"],...["grok-4.6","grok-4-1-fast-reasoning","grok-4-1-fast-non-reasoning","grok-4.5","grok-4.3","grok-3","grok-3-fast","grok-3-mini","grok-3-mini-fast","grok-4","grok-4-fast-reasoning","grok-4-fast-non-reasoning"],"bedrock-claude-sonnet-4-5"];function M(e){return P.includes(e)}const j={kind:"budget",perLevel:{low:1024,medium:8192,high:24576,minimal:0}},Q={"gpt-4o":{name:"gpt-4o",displayName:"GPT-4o",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:16384,contextWindowTokens:128e3,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-terra"},"gpt-4o-mini":{name:"gpt-4o-mini",displayName:"GPT-4o Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:16384,contextWindowTokens:128e3,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-terra"},"gpt-4.1":{name:"gpt-4.1",displayName:"GPT-4.1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-terra"},"gpt-4.1-mini":{name:"gpt-4.1-mini",displayName:"GPT-4.1 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-terra"},"gpt-4.1-nano":{name:"gpt-4.1-nano",displayName:"GPT-4.1 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!0,replacedBy:"gpt-5.6-luna"},o1:{name:"o1",displayName:"GPT-o1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},o3:{name:"o3",displayName:"GPT-o3",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"o3-mini":{name:"o3-mini",displayName:"GPT-o3 Mini",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"o4-mini":{name:"o4-mini",displayName:"GPT-o4 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5":{name:"gpt-5",displayName:"GPT-5",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5-mini":{name:"gpt-5-mini",displayName:"GPT-5 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5-nano":{name:"gpt-5-nano",displayName:"GPT-5 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-luna"},"gpt-5.1":{name:"gpt-5.1",displayName:"GPT-5.1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.2":{name:"gpt-5.2",displayName:"GPT-5.2",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.2-pro":{name:"gpt-5.2-pro",displayName:"GPT-5.2 Pro",description:"Legacy most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-6-astra"},"gpt-5.4":{name:"gpt-5.4",displayName:"GPT-5.4",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.4-mini":{name:"gpt-5.4-mini",displayName:"GPT-5.4 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.4-nano":{name:"gpt-5.4-nano",displayName:"GPT-5.4 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-luna"},"gpt-5.5":{name:"gpt-5.5",displayName:"GPT-5.5",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,replacedBy:"gpt-5.6-terra"},"gpt-5.5-pro":{name:"gpt-5.5-pro",displayName:"GPT-5.5 Pro",description:"Legacy most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},replacedBy:"gpt-6-astra"},"gpt-5.6-sol":{name:"gpt-5.6-sol",displayName:"GPT-5.6 Sol",description:"Flagship model for complex tasks",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},supportsExplicitPromptCache:!0},"gpt-5.6-terra":{name:"gpt-5.6-terra",displayName:"GPT-5.6 Terra",description:"Balanced and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},supportsExplicitPromptCache:!0},"gpt-5.6-luna":{name:"gpt-5.6-luna",displayName:"GPT-5.6 Luna",description:"Fast and affordable",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},supportsExplicitPromptCache:!0},"gpt-6-astra":{name:"gpt-6-astra",displayName:"GPT-6 Astra",description:"Most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high","xhigh","max"]},supportsExplicitPromptCache:!0},"gpt-6-sol":{name:"gpt-6-sol",displayName:"GPT-6 Sol",description:"Legacy workhorse model for complex tasks",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["none","low","medium","high","xhigh","max"]},supportsExplicitPromptCache:!0,replacedBy:"gpt-6.1-sol"},"gpt-6-luna":{name:"gpt-6-luna",displayName:"GPT-6 Luna",description:"Fast and affordable",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["none","low","medium","high","xhigh","max"]},supportsExplicitPromptCache:!0},"gpt-6.1-sol":{name:"gpt-6.1-sol",displayName:"GPT-6.1 Sol",description:"Near-Astra performance for complex work at a lower cost",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high","xhigh","max"]},supportsExplicitPromptCache:!0},"claude-sonnet-5-5":{name:"claude-sonnet-5-5",displayName:"Claude Sonnet 5.5",description:"Balanced performance",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-sonnet-5":{name:"claude-sonnet-5",displayName:"Claude Sonnet 5",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0,replacedBy:"claude-sonnet-5-5"},"claude-sonnet-4-6":{name:"claude-sonnet-4-6",displayName:"Claude Sonnet 4.6",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!0,replacedBy:"claude-sonnet-5-5"},"claude-sonnet-4-5-20250929":{name:"claude-sonnet-4-5-20250929",displayName:"Claude Sonnet 4.5",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,replacedBy:"claude-sonnet-5-5"},"claude-3-7-sonnet-latest":{name:"claude-3-7-sonnet-latest",displayName:"Claude Sonnet 3.7",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-sonnet-5-5",supportsTemperature:!1},"claude-haiku-5-5":{name:"claude-haiku-5-5",displayName:"Claude Haiku 5.5",description:"Fastest responses",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-haiku-4-5-20251001":{name:"claude-haiku-4-5-20251001",displayName:"Claude Haiku 4.5",description:"Legacy fastest responses",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,replacedBy:"claude-haiku-5-5"},"claude-opus-4-20250514":{name:"claude-opus-4-20250514",displayName:"Claude Opus 4",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:32e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-opus-5-5",supportsTemperature:!1},"claude-opus-4-1-20250805":{name:"claude-opus-4-1-20250805",displayName:"Claude Opus 4.1",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:32e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-opus-5-5",supportsTemperature:!1},"claude-opus-4-5-20251101":{name:"claude-opus-4-5-20251101",displayName:"Claude Opus 4.5",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,replacedBy:"claude-opus-5-5"},"claude-opus-4-6":{name:"claude-opus-4-6",displayName:"Claude Opus 4.6",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,replacedBy:"claude-opus-5-5"},"claude-opus-4-7":{name:"claude-opus-4-7",displayName:"Claude Opus 4.7",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0,replacedBy:"claude-opus-5-5"},"claude-opus-4-8":{name:"claude-opus-4-8",displayName:"Claude Opus 4.8",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0,replacedBy:"claude-opus-5-5"},"claude-fable-5":{name:"claude-fable-5",displayName:"Claude Fable 5",description:"Maximum capability, highest cost",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-fable-5-1":{name:"claude-fable-5-1",displayName:"Claude Fable 5.1",description:"Maximum capability, highest cost",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-opus-5":{name:"claude-opus-5",displayName:"Claude Opus 5",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0,replacedBy:"claude-opus-5-5"},"claude-opus-5-5":{name:"claude-opus-5-5",displayName:"Claude Opus 5.5",description:"Most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1,usesAdaptiveThinking:!0},"claude-sonnet-4-20250514":{name:"claude-sonnet-4-20250514",displayName:"Claude Sonnet 4",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-sonnet-5-5",supportsTemperature:!1},"bedrock-claude-sonnet-4-5":{name:"bedrock-claude-sonnet-4-5",vendorModelName:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",displayName:"Claude Sonnet 4.5 (Bedrock)",description:"Claude Sonnet hosted on AWS Bedrock",providerType:"bedrock",requiresExplicitAvailability:!0,maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",supportsTemperature:!1},"gemini-2.5-flash":{name:"gemini-2.5-flash",displayName:"Gemini Flash 2.5",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.8-flash"},"gemini-2.5-pro":{name:"gemini-2.5-pro",displayName:"Gemini Pro 2.5",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-4-argon"},"gemini-2.5-flash-lite":{name:"gemini-2.5-flash-lite",displayName:"Gemini Flash 2.5 Lite",description:"Legacy lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.5-flash-lite"},"gemini-3-flash":{name:"gemini-3-flash",vendorModelName:"gemini-3-flash-preview",displayName:"Gemini Flash 3",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.8-flash"},"gemini-3.1-flash-lite":{name:"gemini-3.1-flash-lite",displayName:"Gemini Flash 3.1 Lite",description:"Legacy lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.5-flash-lite"},"gemini-3.5-flash":{name:"gemini-3.5-flash",displayName:"Gemini Flash 3.5",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.8-flash"},"gemini-3.5-flash-lite":{name:"gemini-3.5-flash-lite",displayName:"Gemini Flash 3.5 Lite",description:"Lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,reasoning:j},"gemini-3.6-flash":{name:"gemini-3.6-flash",displayName:"Gemini Flash 3.6",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-3.8-flash"},"gemini-3.7-flash":{name:"gemini-3.7-flash",displayName:"Gemini Flash 3.7",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,reasoning:j,replacedBy:"gemini-3.8-flash"},"gemini-3.8-flash":{name:"gemini-3.8-flash",displayName:"Gemini Flash 3.8",description:"Fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]}},"gemini-3-pro":{name:"gemini-3-pro",vendorModelName:"gemini-3-pro-preview",displayName:"Gemini Pro 3",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-4-argon"},"gemini-3.1-pro":{name:"gemini-3.1-pro",vendorModelName:"gemini-3.1-pro-preview",displayName:"Gemini Pro 3.1",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,replacedBy:"gemini-4-argon"},"gemini-4-argon":{name:"gemini-4-argon",displayName:"Gemini 4 Argon",description:"Maximum capability, highest cost",providerType:"gemini",maxOutputTokens:65536,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]}},"grok-3":{name:"grok-3",displayName:"Grok-3",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4.6",supportsTemperature:!1},"grok-3-fast":{name:"grok-3-fast",displayName:"Grok-3 Fast",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",supportsTemperature:!1},"grok-3-mini":{name:"grok-3-mini",displayName:"Grok-3 Mini",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4.6",supportsTemperature:!1},"grok-3-mini-fast":{name:"grok-3-mini-fast",displayName:"Grok-3 Mini Fast",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",supportsTemperature:!1},"grok-4":{name:"grok-4",displayName:"Grok-4",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4.6",supportsTemperature:!1},"grok-4.5":{name:"grok-4.5",displayName:"Grok-4.5",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:5e5,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]},replacedBy:"grok-4.6"},"grok-4.6":{name:"grok-4.6",displayName:"Grok-4.6",description:"Most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:5e5,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high","xhigh"]}},"grok-4.3":{name:"grok-4.3",displayName:"Grok-4.3",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4.6",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","medium","high"]}},"grok-4-fast-reasoning":{name:"grok-4-fast-reasoning",displayName:"Grok-4 Fast Reasoning",description:"Legacy optimized for reasoning tasks",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-reasoning",supportsTemperature:!1},"grok-4-fast-non-reasoning":{name:"grok-4-fast-non-reasoning",displayName:"Grok-4 Fast Non-Reasoning",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",supportsTemperature:!1},"grok-4-1-fast-reasoning":{name:"grok-4-1-fast-reasoning",displayName:"Grok-4.1 Fast Reasoning",description:"Optimized for reasoning tasks",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:2e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",supportsTemperature:!1,reasoning:{kind:"levels",supported:["low","high"]}},"grok-4-1-fast-non-reasoning":{name:"grok-4-1-fast-non-reasoning",displayName:"Grok-4.1 Fast Non-Reasoning",description:"Fast general-purpose model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:2e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",supportsTemperature:!0,reasoning:{kind:"none"}}};for(const e of Object.values(Q))o(!e.replacedBy||!Q[e.replacedBy]?.replacedBy,`Model ${e.name} is replaced by ${e.replacedBy}, which is also marked as replaced (is not active).`),o(!e.replacedBy||e.description.startsWith("Legacy"),`Model ${e.name} is deprecated and its description must start with 'Legacy': '${e.description}'.`);const W=["pod","worker"],Y=(e,t)=>Array.isArray(e)?e.concat(t):void 0;class U{constructor(){this.data={codeChecksum:"initial",databases:{},storage:{},executables:{},apis:{},graphql:{},triggers:{},schedulers:{},webhooks:{},nativeQueries:{},distributedLocks:{},aiChatbots:{},clientConnectionStateChangeHandlers:[],aiFunctions:{},openApiControllersMap:{},queues:{},queueMessageHandlers:{},eventHandlers:{},metrics:{security:{write:[],all:[]}},limits:{},llms:{},mcp:{},integrationLifecycleHooks:{onIntegrationCreated:!1,onIntegrationDeleted:!1,onIntegrationChanged:!1}}}secureDatabase(t,n,r=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[r]:{security:{[t]:[n]}}}})}secureAiQuery(t,n=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[n]:{security:{aiQuery:[t]}}}})}secureCollection(t,n,r,o=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[o]:{collections:{[t]:{security:{[n]:[r]}}}}}})}publicCollection(t,n,r=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[r]:{collections:{[t]:{publicAccess:{[n]:!0}}}}}})}secureStorage(t,n,r=e.BUILT_IN_STORAGE_INTEGRATION_ID){B(this.data,{storage:{[r]:{security:{[t]:[n]}}}})}secureTopic(t,n,r,o=e.BUILT_IN_QUEUE_INTEGRATION_ID){B(this.data,{queues:{[o]:{topics:{[t]:{security:{[n]:[r]}}}}}})}queueMessage(t,n,r=e.BUILT_IN_QUEUE_INTEGRATION_ID){B(this.data,{queueMessageHandlers:{[r]:{[t]:[n]}}})}eventHandler(e,t){B(this.data,{eventHandlers:{[e]:[t]}})}secureMetric(e,t,n){B(this.data,{metrics:{security:{[t]:[{namePrefix:e,serviceFunction:n}]}}})}secureApi(e,t,n){B(this.data,t?{apis:{[e]:{endpoints:{[t]:{security:[n]}}}}}:{apis:{[e]:{security:[n]}}})}secureGraphQL(e,t){B(this.data,{graphql:{[e]:{security:[t]}}})}transformDatabase(t,n,r=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[r]:{transform:{[t]:{type:t,serviceFunction:n}}}}})}transformCollection(t,n,r,o=e.BUILT_IN_DB_INTEGRATION_ID){B(this.data,{databases:{[o]:{collections:{[t]:{transform:{[n]:{type:n,serviceFunction:r}}}}}}})}executable(e){const t=e.split(":")[1],n={serviceFunction:e},r=this.data.executables[t];r&&r.serviceFunction!==e&&console.warn(`Executable name collision: "${t}" is registered by both "${r.serviceFunction}" and "${e}". Use qualified names to avoid ambiguity.`),B(this.data,{executables:{[t]:n,[e]:n}})}aiFunction(e,{id:t,description:n,promptId:r,params:i,attributes:a,categories:u,internal:s}){!function(e,t){const n=t.filter(e=>void 0!==e.affinity&&null!==e.affinity);o(n.length<=1,()=>`Function '${e}' declares affinity on more than one parameter (${n.map(e=>e.name).join(", ")}); a function has at most one affinity key.`);for(const t of n)o("string"===t.type,`Affinity parameter '${t.name}' of '${e}' must be of type 'string', got '${t.type}'.`),o(W.includes(t.affinity),`Affinity parameter '${t.name}' of '${e}' declares an unknown scope '${t.affinity}'; expected one of ${W.map(e=>`'${e}'`).join(", ")}.`)}(e,i),function(e,t){const n=t.flatMap(b);o(!n.length,()=>`Function '${e}' has invalid parameters:\n${n.join("\n")}`)}(e,i);const c={aiFunctions:{[t]:{serviceFunction:e,description:n,promptId:r,params:i,attributes:a,categories:u,internal:s}}};B(this.data,c)}aiFunctionsConfigurator(e,{id:t,integrationTypes:n}){const r={aiFunctionsConfigurators:{[t]:{serviceFunction:e,integrationTypes:n}}};B(this.data,r)}trigger(e,t,n,r,i){o(!this.data.triggers[e],`Duplicate Trigger IDs: ${e}`),this.data.triggers[e]={integrationId:r,collectionName:t,functionName:n,mutationTypes:i}}scheduler(e,t,n,r){o(!this.data.schedulers[e],`Duplicate Scheduler IDs: ${e}`),this.data.schedulers[e]={cronExpression:t,functionName:n,exclusive:r}}webhook(e,t){o(!this.data.webhooks[e],`Duplicate Webhook IDs: ${e}`),this.data.webhooks[e]={functionName:t}}secureNativeQuery(e,t){B(this.data,{nativeQueries:{[e]:[t]}})}secureDistributedLock(e,t){B(this.data,e?{distributedLocks:{mutexes:{[e]:{security:[t]}}}}:{distributedLocks:{security:[t]}})}secureAiAgent(t,n){B(this.data,t?{aiChatbots:{[e.AI_AGENTS_INTEGRATION_ID]:{profiles:{[t]:{security:{chat:[n]}}}}}}:{aiChatbots:{[e.AI_AGENTS_INTEGRATION_ID]:{security:{chat:[n]}}}})}secureLangGraph(e,t){B(this.data,{langgraphs:e?{[e]:{security:{invoke:[t]}}}:{security:{invoke:[t]}}})}langGraph(e,t,n){o(!this.data.langgraphs?.[e]?.serviceFunction,`Duplicate LangGraph IDs: ${e}`),B(this.data,{langgraphs:{[e]:{serviceFunction:t,...void 0===n?{}:{description:n}}}})}limits(e,t){B(this.data,{limits:{[e]:t}})}clientConnectionChangeHandler(e){B(this.data,{clientConnectionStateChangeHandlers:[e]})}llmService(e,t){const n=t.models;o(void 0===this.data.llms?.[e]?.models,`LLM service '${e}' is already registered.`);const r=Object.keys(n);o(r.length>0,`LLM service '${e}' must declare at least one model.`);for(const t of r)o(!M(t),`LLM service '${e}' cannot declare an already-defined model: '${t}'.`);const i=Object.values(this.data.llms??{}).flatMap(e=>Object.keys(e.models??{}));for(const e of r)o(!i.includes(e),`Model '${e}' is already defined by another LLM service.`);B(this.data,{llms:{[e]:{models:n,...void 0!==t.supportsFunctions&&{supportsFunctions:t.supportsFunctions}}}})}llmAsk(e){const t=e.split(":")[0];o(void 0===this.data.llms?.[t]?.ask,`LLM service '${t}' already has an 'ask' function defined.`),B(this.data,{llms:{[t]:{ask:e}}})}mcpServer(e,t){const n=t.id;o(void 0===Object.values(this.data.mcp||{}).find(e=>e.options?.id===n),`MCP server with id ${n} already exists (${e}).`),B(this.data,{mcp:{[e]:{options:t,tools:[]}}})}mcpAuthorizer(e){const[t,n]=e.split(":");o(!this.data.mcp?.[t]?.authorizer,`MCP server '${t}' already has authorizer: ${n}.`),B(this.data,{mcp:{[t]:{authorizer:e}}})}mcpTool(e,t){const[n,r]=e.split(":");o(void 0===this.data.mcp?.[n]?.tools?.find(t=>t.serviceFunctionName===e),`MCP server '${n}' already has tool ${r}.`),B(this.data,{mcp:{[n]:{tools:[{serviceFunctionName:e,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema}]}}})}setIntegrationLifecycleHooks(e){this.data.integrationLifecycleHooks={onIntegrationCreated:e.onIntegrationCreated,onIntegrationChanged:e.onIntegrationChanged,onIntegrationDeleted:e.onIntegrationDeleted}}}function B(e,t){(0,f.mergeWith)(e,t,Y)}const q=new U;function F(e,t){return be(n=>q.secureDatabase(e,n,t))}function V(e){return be(t=>q.secureAiQuery(t,e))}function z(e,t,n){return be(r=>q.secureCollection(e,t,r,n))}function H(e,t,n){return()=>{q.publicCollection(e,t,n)}}function K(e,t){return be(n=>q.secureStorage(e,n,t))}function Z(e,t,n){return be(r=>q.secureTopic(e,t,r,n))}function X(e){return be(t=>q.secureMetric(e.metricNamePrefix||"",e.type,t))}function J(e,t){return be(n=>q.secureApi(e,t,n))}function ee(e){return be(t=>q.secureGraphQL(e,t))}function te(e,t){return be(n=>q.queueMessage(e,n,t))}function ne(e){return be(t=>q.eventHandler(e,t))}function re(){return be(e=>q.executable(e))}function oe(e,t=[],n={},r=[],o=!1){return function(a,u,s){const c=ke(a,u),f=p(c);let d;return"object"==typeof e?(i(e.description??e.promptId,`AI function definition requires either "description" or "promptId" to be defined: ${u}`),void 0!==e.id&&l(e.id,u),d={id:e.id??f,description:e.description,promptId:e.promptId,params:i(e.params,`AI function definition requires "params" to be defined: ${u}`),attributes:e.attributes||{},categories:e.categories||[],internal:e.internal||!1}):d={id:f,description:e,promptId:void 0,params:t,attributes:n,categories:r,internal:o},q.aiFunction(c,d),s}}function ie(e){return function(t,n,r){const o=ke(t,n);void 0!==e.id&&l(e.id,n);const i={id:e.id??p(o),integrationTypes:e.integrationTypes};return q.aiFunctionsConfigurator(o,i),r}}function ae(t,n="",r){const i="object"==typeof t?{...t}:{id:t,collection:n,integrationId:r};return o(i.collection,"Collection name can't be empty"),function(t,n,r){return i.id||(i.id=ke(t,n)),q.trigger(i.id,i.collection,ke(t,n),i.integrationId||e.BUILT_IN_DB_INTEGRATION_ID,i.mutationTypes),r}}function ue(e,t,n=!0){return function(r,o,a){const u=ke(r,o);let s;return s="object"==typeof e?{cron:e.cron,id:e.id||u,exclusive:e.exclusive??!0}:{id:e,cron:i(t,"cronExpression must be defined"),exclusive:n},q.scheduler(s.id,s.cron,u,s.exclusive),a}}function se(e){return be(t=>q.webhook(e,t))}function ce(e){return be(t=>q.secureNativeQuery(e,t))}function le(e){return be(t=>q.secureDistributedLock(e,t))}function pe(e){return be(t=>q.secureAiAgent(e,t))}function fe(e){return function(t,n,r){return q.secureLangGraph(e,ke(t,n)),r}}function de(e){return be(t=>q.limits(t,Te(e)))}function he(e){return t=>{q.llmService(t.name,e)}}function ge(){return be(e=>q.llmAsk(e))}function me(e){return t=>{q.mcpServer(t.name,e)}}function ye(e){return be(t=>q.mcpTool(t,e))}function _e(){return be(e=>q.mcpAuthorizer(e))}function ve(){return be(e=>q.clientConnectionChangeHandler(e))}function ke(e,t){return`${e.constructor.name}:${t}`}function be(e){return function(t,n,r){return e(ke(t,n)),r}}function Te(e){return void 0!==e.rateLimit&&("number"==typeof e.rateLimit?e.rateLimit=[{value:e.rateLimit,scope:"global"}]:"object"!=typeof e.rateLimit||Array.isArray(e.rateLimit)||(e.rateLimit=[e.rateLimit]),e.rateLimit.forEach(e=>{void 0===e.scope&&(e.scope="global")})),void 0!==e.quotaLimit&&("number"==typeof e.quotaLimit?e.quotaLimit=[{value:e.quotaLimit,scope:"global",renewPeriod:"monthly"}]:"object"!=typeof e.quotaLimit||Array.isArray(e.quotaLimit)||(e.quotaLimit=[e.quotaLimit]),e.quotaLimit.forEach(e=>{void 0===e.scope&&(e.scope="global"),void 0===e.renewPeriod&&(e.renewPeriod="monthly")})),e}const Oe=require("path"),Ce="user-code",we="user-code-python",Ae=[Ce,we];function Ee(e){u(e,"Invalid application ID");const t=e.split("-");o(t.length<4,`Invalid application ID: ${e}`);const[n,r,i]=t;return{appId:n,environmentId:r??"prod",squidDeveloperId:i}}const xe=require("node:async_hooks"),Ie=(require("node:stream"),"__docId__"),Ne=/[.\[\]]/;function Se(e,t,n){"__proto__"===t?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}function Re(e,t){if(!e)return;const n=t.split(Ne);let r,o=e;for(;o&&n.length;){const e=n.shift();if(e){if("object"!=typeof o||!Object.hasOwn(o,e))return;r=o[e],o=r}}return r}function De(e){return null==e}function Le(e,t){if(e===t)return!0;if(null===e||null===t)return!1;const n=typeof e;if(n!==typeof t)return!1;if("object"!==n)return e===t;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(const n of r)if(!o.includes(n)||!Le(e[n],t[n]))return!1;return!0}function $e(e,t){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Ge(e[r],t);return n}function Ge(e,t){const n=t?t(e):void 0;if(void 0!==n)return n;if("object"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e))return $e(e,t);if(e instanceof Map)return new Map($e(Array.from(e),t));if(e instanceof Set)return new Set($e(Array.from(e),t));if(ArrayBuffer.isView(e))return r=e,"undefined"!=typeof Buffer&&r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length);var r;const o={};for(const n in e)Object.hasOwnProperty.call(e,n)&&Se(o,n,Ge(e[n],t));return o}function Pe(e,t=!1){if(Array.isArray(e))return e.map(e=>Pe(e,t));if("object"!=typeof e||null===e||e instanceof Date)return e;const n=Object.keys(e).filter(e=>t||"__proto__"!==e),r={};return n.sort().forEach(n=>{Se(r,n,Pe(e[n],t))}),r}function Me(e){return function(e){if(void 0===e)return null;const t=Ge(e,e=>function(e){return"[object Date]"===Object.prototype.toString.call(e)}(e)?{$date:e.toISOString()}:void 0);return JSON.stringify(t)}(Pe(e))}function je(e){return Ge(JSON.parse(e),e=>{if(null===e||"object"!=typeof e)return;const t=e,n=t.$date;return n&&1===Object.keys(t).length?new Date(n):void 0})}function Qe(e,t,n){if(e=e instanceof Date?e.getTime():e??null,t=t instanceof Date?t.getTime():t??null,"=="===n)return Le(e,t);if("!="===n)return!Le(e,t);switch(n){case"<":return!De(e)&&(!!De(t)||t<e);case"<=":return!!De(t)||!De(e)&&t<=e;case">":return!De(t)&&(!!De(e)||t>e);case">=":return!!De(e)||!De(t)&&t>=e;case"like":return"string"==typeof t&&"string"==typeof e&&We(t,e,!1);case"not like":return!("string"==typeof t&&"string"==typeof e&&We(t,e,!1));case"like_cs":return"string"==typeof t&&"string"==typeof e&&We(t,e,!0);case"not like_cs":return!("string"==typeof t&&"string"==typeof e&&We(t,e,!0));case"array_includes_some":{const n=t;return Array.isArray(t)&&Array.isArray(e)&&e.some(e=>i(n,"VALUE_CANNOT_BE_NULL").some(t=>Le(t,e)))}case"array_includes_all":{const n=t;return Array.isArray(e)&&Array.isArray(t)&&e.every(e=>i(n,"VALUE_CANNOT_BE_NULL").some(t=>Le(t,e)))}case"array_not_includes":{const n=t;return Array.isArray(t)&&Array.isArray(e)&&e.every(e=>!i(n,"VALUE_CANNOT_BE_NULL").some(t=>Le(t,e)))}default:throw new Error(`Unsupported operator comparison: ${n}`)}}function We(e,t,n){n||(e=e.toLowerCase(),t=t.toLowerCase());const r=function(e){let t="";for(let n=0;n<e.length;++n)"\\"===e[n]?n+1<e.length&&["%","_"].includes(e[n+1])?(t+=e[n+1],n++):n+1<e.length&&"\\"===e[n+1]?(t+="\\\\",n++):t+="\\":"%"===e[n]?t+="[\\s\\S]*":"_"===e[n]?t+="[\\s\\S]":("/-\\^$*+?.()[]{}|".includes(e[n])&&(t+="\\"),t+=e[n]);return t}(t);return new RegExp(`^${r}$`).test(e)}function Ye(e){return"fieldName"in e}function Ue(e){return"docIds"in e}function Be(e,t,n){const r=e.docIds.some(e=>Object.entries(e).every(([e,r])=>Qe(r,n(t,e)??null,"==")));switch(e.operator){case"==":case"in":return r;case"!=":case"not in":return!r}}function qe(e,t,n,r){const o=e,i=r(t,Ie);if("string"!=typeof i)return Qe(o,i??null,n);let a;try{a=je(i)}catch{return Qe(o,i,n)}if(!a||"object"!=typeof a||Array.isArray(a))return Qe(o,i,n);const u=Object.keys(a);if(1===u.length&&"__id"===u[0]){const e=a.__id,t=function(e){if("object"==typeof e&&null!==e&&!Array.isArray(e)){const t=Object.keys(e);return 1===t.length&&"__id"===t[0]?e.__id:Me(e)}if("string"==typeof e)try{const t=je(e);if(t&&"object"==typeof t&&!Array.isArray(t)){const e=Object.keys(t);if(1===e.length&&"__id"===e[0])return t.__id}}catch{}return e}(o);return Qe(t,e,n)}if(1===u.length){const e=function(e,t){if("object"==typeof e&&null!==e&&!Array.isArray(e)){const n=Object.keys(e);if(1===n.length&&n[0]===t)return e[t]}if("string"==typeof e)try{const n=je(e);if(n&&"object"==typeof n&&!Array.isArray(n)){const e=Object.keys(n);if(1===e.length&&e[0]===t)return n[t]}}catch{}return e}(o,u[0]);return Qe(e,a[u[0]],n)}return"object"!=typeof o||null===o||Array.isArray(o)?Qe(o,i,n):Qe(Me(o),i,n)}const Fe={"in:in":(e,t)=>e.every(e=>t.includes(e)),"not in:not in":(e,t)=>t.every(t=>e.includes(t)),">:>":(e,t)=>Ze(e,t),">=:>":(e,t)=>Ke(e,t),"in:>":(e,t)=>e.every(e=>Ke(e,t)),">:>=":(e,t)=>Ze(e,t),">=:>=":(e,t)=>Ze(e,t),"in:>=":(e,t)=>e.every(e=>Ze(e,t)),"<:<":(e,t)=>ze(e,t),"<=:<":(e,t)=>Ve(e,t),"in:<":(e,t)=>e.every(e=>Ve(e,t)),"<:<=":(e,t)=>ze(e,t),"<=:<=":(e,t)=>ze(e,t),"in:<=":(e,t)=>e.every(e=>ze(e,t)),"like:like":(e,t)=>Je(e.toLowerCase(),t.toLowerCase()),"like_cs:like":(e,t)=>Je(e.toLowerCase(),t.toLowerCase()),"like:like_cs":(e,t)=>Je(e,t)&&tt(t),"like_cs:like_cs":(e,t)=>Je(e,t),"not like:not like":(e,t)=>Je(t.toLowerCase(),e.toLowerCase()),"not like_cs:not like":(e,t)=>Je(t,e)&&tt(e),"not like:not like_cs":(e,t)=>Je(t.toLowerCase(),e.toLowerCase()),"not like_cs:not like_cs":(e,t)=>Je(t,e),"in:like":(e,t)=>e.every(e=>Qe(t,e,"like")),"in:like_cs":(e,t)=>e.every(e=>Qe(t,e,"like_cs")),"like:in":(e,t)=>nt(e)&&tt(e)&&t.includes(e),"like_cs:in":(e,t)=>nt(e)&&t.includes(e),"not in:not like":(e,t)=>nt(t)&&tt(t)&&e.includes(t),"not in:not like_cs":(e,t)=>nt(t)&&e.includes(t),"not like:not in":(e,t)=>t.every(t=>Qe(e,t,"like")),"not like_cs:not in":(e,t)=>t.every(t=>Qe(e,t,"like_cs")),"array_includes_some:array_includes_some":(e,t)=>e.every(e=>t.includes(e)),"array_includes_all:array_includes_all":(e,t)=>t.length>0&&t.every(t=>e.includes(t)),"array_not_includes:array_not_includes":(e,t)=>t.every(t=>e.includes(t)),"array_includes_all:array_includes_some":(e,t)=>e.some(e=>t.includes(e)),"array_includes_some:array_includes_all":(e,t)=>t.length>0&&e.every(e=>t.every(t=>e===t))};function Ve(e,t){return De(e)?!De(t):!De(t)&&He(e,t)&&e<t}function ze(e,t){return!!De(e)||!De(t)&&He(e,t)&&e<=t}function He(e,t){return typeof e==typeof t&&("object"!=typeof e||e instanceof Date&&t instanceof Date)}function Ke(e,t){return Ve(t,e)}function Ze(e,t){return ze(t,e)}function Xe(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],o=e[n+1];"\\"!==r||"%"!==o&&"_"!==o?"\\"===r&&"\\"===o?(t.push(r),n++):t.push(r):(t.push(r+o),n++)}return t}function Je(e,t){return et(Xe(e),Xe(t))}function et(e,t,n=0,r=0){if(r>=t.length)return n>=e.length;if(n>=e.length)return t.slice(r).every(e=>"%"===e);const o=e[n],i=t[r];return"%"===o&&"%"===i?et(e,t,n+1,r+1)||et(e,t,n+1,r):"%"!==o&&("%"===i?et(e,t,n,r+1)||et(e,t,n+1,r):(o===i||"_"===i)&&et(e,t,n+1,r+1))}function tt(e){return e===e.toLowerCase()&&e===e.toUpperCase()}function nt(e){return!/[%_\\]/.test(e)}function rt(e,t){return e.includes("like")&&"string"==typeof t&&function(e){for(let t=0;t<e.length;t++)if("\\"===e[t]){if(!["%","_","\\"].includes(e[t+1]))return!0;t++}return!1}(t)}function ot(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(t,r))return!1;if(!Le(e[r],t[r]))return!1}return!0}function it(e,t){return t.every(t=>{const n=Object.keys(t).sort();if(n.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(n[t]!==e[t])return!1;return!0})}class at{constructor(e){this.query=e,this.query=e;const t=this.query.conditions.filter(Ye),n=this.query.conditions.filter(Ue),r=n.flatMap(e=>function(e){if("=="!==e.operator&&"in"!==e.operator)return[];if(0===e.docIds.length)return[];const t=[],n=e.docIds[0];for(const r of Object.keys(n)){const o=n[r];e.docIds.every(e=>Object.prototype.hasOwnProperty.call(e,r)&&Le(e[r],o))&&t.push({fieldName:r,operator:"==",value:o})}return t}(e));this.exactSimpleConditions=this.parseConditions(t),this.exactDocIdConditions=n,this.subqueryConditions=this.parseConditions([...t,...r])}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}get projectFields(){return this.query.projectFields}sortedBy(e){return!e.find((e,t)=>!Le(this.query.sortOrder[t],{...e,asc:e.asc??!0}))}sortedByExact(e){return e.length===this.query.sortOrder.length&&this.sortedBy(e)}isSubqueryOf(e,t,n){return this.isSubqueryOfCondition({fieldName:e,operator:t,value:n})}isSubqueryOfCondition(e){return!!this.subqueryConditions.filter(t=>t.fieldName===e.fieldName).find(t=>this.evaluateSubset(t,e))}isSubqueryOfConditions(e){return this.parseConditions(e).every(e=>this.isSubqueryOfCondition(e))}isSubqueryOfQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;for(const t of e.conditions.filter(Ue))if(!this.childImpliesParentDocIdCondition(t))return!1;const t=e.conditions.filter(Ye),n=this.isSubqueryOfConditions(t),r=this.sortedBy(e.sortOrder),o=-1===e.limit||this.limit>-1&&this.limit<e.limit,i=this.isProjectFieldsSubset(this.query.projectFields,e.projectFields);return n&&r&&o&&i}childImpliesParentDocIdCondition(e){const t=e.docIds;if(0===t.length)return!1;const n="=="===e.operator||"in"===e.operator,r=Object.keys(t[0]).sort(),o=[];for(const e of this.query.conditions)Ue(e)&&o.push(...e.docIds);if(!it(r,t)||!it(r,o))return!1;const i=this.buildChildEffectiveTupleSet();return n?void 0!==i.allowed&&i.allowed.every(e=>t.some(t=>ot(e,t))):void 0!==i.allowed?i.allowed.every(e=>!t.some(t=>ot(e,t))):t.every(e=>i.excluded.some(t=>ot(e,t)))}buildChildEffectiveTupleSet(){let e;const t=[];for(const n of this.query.conditions)if(Ue(n))if("=="===n.operator||"in"===n.operator)e=void 0===e?[...n.docIds]:e.filter(e=>n.docIds.some(t=>ot(e,t)));else for(const e of n.docIds)t.some(t=>ot(t,e))||t.push(e);return void 0!==e&&t.length>0&&(e=e.filter(e=>!t.some(t=>ot(e,t)))),{allowed:e,excluded:t}}isProjectFieldsSubset(e,t){if(!t)return!0;if(!e)return!1;const n=new Set(t);return e.every(e=>n.has(e))}getConditionsFor(...e){return this.subqueryConditions.filter(t=>e.includes(t.fieldName))}getConditionsForField(e){return this.subqueryConditions.filter(t=>t.fieldName===e)}documentMatchesQuery(e){for(const t of this.exactSimpleConditions){const n=t.fieldName,r=t.operator;if(n===Ie){const n=t.value;if("in"===r||"not in"===r){const t=(Array.isArray(n)?n:[n]).some(t=>qe(t,e,"==",Re));if(!("in"===r?t:!t))return!1;continue}if(!qe(n,e,r,Re))return!1;continue}const o=Re(e,n);if("in"===r){if(t.value.includes(o))continue;return!1}if("not in"!==r){if(!Qe(t.value,o,r))return!1}else if(t.value.includes(o))return!1}for(const t of this.exactDocIdConditions)if(!Be(t,e,Re))return!1;return!0}evaluateSubset(e,t){const{operator:n,value:r}=e,{operator:o,value:i}=this.parseConditions([t])[0],a=Fe[`${n}:${o}`];return!!a&&(">"===o&&De(i)?">"===n&&De(r):!rt(n,r)&&!rt(o,i)&&a(r,i))}parseConditions(e){const t=[],n=new Map,r=new Map;return e.forEach(e=>{switch(e.operator){case"==":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat([e.value]));break;case"in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;case"!=":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat([e.value]));break;case"not in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}}),n.forEach((e,n)=>{t.push({fieldName:n,operator:"in",value:e})}),r.forEach((e,n)=>{t.push({fieldName:n,operator:"not in",value:e})}),t}}function ut(){if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;throw new Error("Unable to locate global object")}void 0===ut()?.SQUID_LOG_DEBUG_ENABLED&&function(e=!0){ut().SQUID_LOG_DEBUG_ENABLED=e}(function(){let e="";return"undefined"!=typeof window&&window.location?e=new URLSearchParams(window.location.search).get("SQUID_DEBUG")||"":"undefined"!=typeof process&&process.env&&(e=process.env.SQUID_DEBUG||""),"1"===e||"true"===e}());const st="__squidMetadata",ct="CIRCULAR_DEPENDENCY",lt=(new xe.AsyncLocalStorage,[]);function pt(e,t,n){const r=dt();r.codeDirByServiceClassName.set(e.name,n);let i=r.serviceInstanceByCtor.get(e);if(!i||function(e){return e[st]||{version:0}}(i).version<=1){const n=dt(),r={...n,...t};o(!lt.includes(e),()=>`${ct}: ${lt[lt.length-1]?.name} => ${e.name}`),lt.push(e);try{i=n.requestLocalStorage.run(t,()=>new e(r))}finally{lt.pop()}n.serviceInstanceByCtor.set(e,i)}else(function(e,t){o(e.backendApiKey===t.backendApiKey,"backendApiKey does not match."),o(e.requestLocalStorage===t.requestLocalStorage,"requestLocalStorage does not match"),o(e.environmentId===t.environmentId,"environmentId does not match"),o(e.squidDeveloperId===t.squidDeveloperId,"squidDeveloperId does not match");const n=Ee(e.appId),r=Ee(t.appId);o(n.appId===r.appId,`appId does not match! Before: ${n.appId}, after ${r.appId}`)})(i.config,r),i.config.secrets=r.secrets,i.config.apiKeys=r.apiKeys;return i}const ft="SQUID_GLOBAL_CONFIG";function dt(){return i(ut()[ft],"Squid global config is not defined! Make sure you are not trying to use Squid at module load time.")}const ht=require("child_process"),gt=require("crypto"),mt=require("fs/promises"),yt=require("os"),_t=require("util");class vt{constructor(){this.promises=new Map}getOrStart(e,t){let n=this.promises.get(e);return n||(n=t().catch(t=>{throw this.promises.delete(e),t}),this.promises.set(e,n)),n}}const kt=(0,Oe.join)((0,yt.tmpdir)(),"squid-workspaces"),bt=/^[A-Za-z0-9_-]{1,200}$/;function Tt(e){return"string"==typeof e&&bt.test(e)}const Ot=(0,_t.promisify)(ht.execFile),Ct="SQUID_WORKSPACE_SERVER_HOST",wt=(0,Oe.join)((0,yt.tmpdir)(),"squid-workspace-ssh","id_ed25519"),At="markers",Et=3e5,xt=["set -eu",'key_path=$(wslpath -u "$1")','certificate_path=$(wslpath -u "$2")','local_path=$(wslpath -u "$3")',"remote_path=$4","port=$5","direction=$6","temporary_directory=$(mktemp -d /tmp/squid-workspace-rsync.XXXXXX)","cleanup() {",' rm -f -- "$temporary_directory/id_ed25519" "$temporary_directory/id_ed25519-cert.pub" "$temporary_directory/known_hosts"',' rmdir -- "$temporary_directory" 2>/dev/null || true',"}","trap cleanup EXIT","trap 'exit 129' HUP","trap 'exit 130' INT","trap 'exit 143' TERM",'install -m 600 "$key_path" "$temporary_directory/id_ed25519"','install -m 644 "$certificate_path" "$temporary_directory/id_ed25519-cert.pub"','ssh_command="ssh -i $temporary_directory/id_ed25519 -o CertificateFile=$temporary_directory/id_ed25519-cert.pub -p $port -o UserKnownHostsFile=$temporary_directory/known_hosts -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 -o ServerAliveInterval=15 -o ServerAliveCountMax=3"','if [ "$direction" = pull ]; then',' rsync -a -e "$ssh_command" --delete "$remote_path" "$local_path/"','elif [ "$direction" = push ]; then',' rsync -a --fsync -e "$ssh_command" --delete "$local_path/" "$remote_path"',"else"," exit 64","fi"].join("\n");function It(){return!!process.env[Ct]}class Nt{constructor(e={}){this.lp="WorkspaceClient",this.podKeypairCache=new vt;const{rpcTransport:t,localCacheRoot:n=kt}=e;o((0,Oe.isAbsolute)(n),()=>`localCacheRoot must be absolute: "${n}"`),this.rpcTransport=t??{post:async(e,t,n)=>await Mt().rpcManager.post(e,t,[],"files",{},n)},this.localCacheRoot=n}async create(e,t){const n=e??(0,gt.randomUUID)();o(Tt(n),()=>`Invalid workspace id "${n}"`);const{idleTtlSeconds:r,localCacheStrategy:i="refresh",signal:a}=t??{};var u;o(void 0===r||"number"==typeof(u=r)&&Number.isInteger(u)&&u>=600&&u<=2592e3,()=>`Invalid idleTtlSeconds ${r}`),o("refresh"===i||"reuse"===i,()=>`Invalid localCacheStrategy "${i}"`),St(a);const s=this.resolveLocalWorkspaceDir(n);return await this.markLocalWorkspaceUsed(n),St(a),"reuse"===i&&await async function(e){try{const t=await(0,mt.lstat)(e);return t.isDirectory()&&!t.isSymbolicLink()}catch(e){if("ENOENT"===e.code)return!1;throw e}}(s)||(await(0,mt.mkdir)(s,{recursive:!0}),St(a),await this.pull(n,s,r,a),St(a)),this.buildMetadata(n,s)}async push(e){o(Tt(e),()=>`Invalid workspace id "${e}"`);const t=this.resolveLocalWorkspaceDir(e);return await this.markLocalWorkspaceUsed(e),await this.pushDir(e,t),this.buildMetadata(e,t)}async discardLocal(e){o(Tt(e),()=>`Invalid workspace id "${e}"`),await(0,mt.rm)(this.resolveLocalWorkspaceDir(e),{recursive:!0,force:!0}),await(0,mt.rm)(this.resolveLocalWorkspaceMarkerPath(e),{force:!0}),await(0,mt.rm)(this.resolveLocalWorkspaceQuarantineDir(e),{recursive:!0,force:!0})}async delete(e){o(Tt(e),()=>`Invalid workspace id "${e}"`);const t=`${this.lp}.delete:`;try{await this.rpcTransport.post("workspaces/delete",{workspaceId:e})}catch(n){throw new Error(`${t} Failed to delete workspace "${e}" on the server: ${s(n)}`)}await(0,mt.rm)(this.resolveLocalWorkspaceDir(e),{recursive:!0,force:!0}),await(0,mt.rm)(this.resolveLocalWorkspaceMarkerPath(e),{force:!0}),await(0,mt.rm)(this.resolveLocalWorkspaceQuarantineDir(e),{recursive:!0,force:!0})}buildMetadata(e,t){return{id:e,path:t}}resolveLocalWorkspaceDir(e){return(0,Oe.join)(this.localCacheRoot,"workspaces",e)}resolveLocalWorkspaceMarkerPath(e){return(0,Oe.join)(this.localCacheRoot,At,e)}resolveLocalWorkspaceQuarantineDir(e){return(0,Oe.join)(this.localCacheRoot,".evicting",e)}async markLocalWorkspaceUsed(e){const t=this.resolveLocalWorkspaceMarkerPath(e);await(0,mt.mkdir)((0,Oe.join)(this.localCacheRoot,At),{recursive:!0}),await(0,mt.writeFile)(t,"")}async pull(e,t,n,r){const o=`${this.lp}.pull:`;try{await this.rsync(e,["--delete",`${this.remoteTarget()}/`,`${t}/`],"read",n,r)}catch(t){if(this.isMissingRemoteError(t))return;throw new Error(`${o} Failed to pull workspace "${e}": ${s(t)}`)}}async pushDir(e,t){const n=`${this.lp}.push:`;try{await this.rsync(e,["--delete",`${t}/`,`${this.remoteTarget()}/`],"write")}catch(t){throw new Error(`${n} Failed to push workspace "${e}": ${s(t)}`)}}async rsync(e,t,n,r,o){St(o),await this.ensurePodKeypair(),St(o);const i=`${this.sshKeyPath()}-cert-${(0,gt.randomUUID)()}.pub`;try{await this.issueCert(e,i,n,r,o),St(o);const a=`ssh -i ${this.sshKeyPath()} -o CertificateFile=${i} -p ${this.sshPort()} -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 -o ServerAliveInterval=15 -o ServerAliveCountMax=3`;if("win32"===process.platform&&"true"===process.env.SQUID_WORKSPACE_USE_WSL_RSYNC)await this.rsyncThroughWsl(t,i,o);else{const e="read"===n?[]:["--fsync"];await Ot("rsync",["-a",...e,"-e",a,...t],{signal:o,timeout:Et})}}finally{await(0,mt.rm)(i,{force:!0}).catch(()=>{})}}async rsyncThroughWsl(e,t,n){const r=`${this.remoteTarget()}/`,[i,a,u]=e;o(3===e.length&&"--delete"===i&&(a===r&&!!u||u===r&&!!a),"WORKSPACE_WSL_RSYNC_ARGUMENTS_INVALID");const s=a===r?"pull":"push",c=(o("string"==typeof(l="pull"===s?u:a)&&l.length>0,"WORKSPACE_WSL_RSYNC_PATH_INVALID"),l.replace(/[\\/]+$/u,""));var l;o((0,Oe.isAbsolute)(c)&&!c.includes("\0"),"WORKSPACE_WSL_RSYNC_PATH_INVALID");const p=this.sshPort();o(/^\d{1,5}$/.test(p)&&Number(p)<=65535,"WORKSPACE_WSL_RSYNC_PORT_INVALID"),await Ot("wsl.exe",["--exec","sh","-c",xt,"workspace-rsync",this.sshKeyPath(),t,c,r,p,s],{signal:n,timeout:Et})}ensurePodKeypair(){return this.podKeypairCache.getOrStart("podKeypair",()=>this.generatePodKeypair())}async generatePodKeypair(){const e=this.sshKeyPath();await this.fileExists(e)||(await(0,mt.mkdir)((0,Oe.join)(e,".."),{recursive:!0}),await Ot("ssh-keygen",["-t","ed25519","-N","","-f",e,"-C","squid-workspace"],{timeout:3e4}))}async issueCert(e,t,n,r,o){const i=`${this.lp}.issueCert:`,a=(await(0,mt.readFile)(`${this.sshKeyPath()}.pub`,"utf8")).trim();try{const{certificate:i}=await this.rpcTransport.post("workspaces/issueCert",{workspaceId:e,ephemeralPublicKey:a,idleTtlSeconds:r,accessMode:n},o);St(o),await(0,mt.writeFile)(t,`${i}\n`,{mode:420})}catch(t){throw new Error(`${i} Failed to obtain certificate for workspace "${e}": ${s(t)}`)}}async fileExists(e){try{return await(0,mt.access)(e),!0}catch{return!1}}remoteTarget(){return`${this.sshUser()}@${this.sshHost()}:.`}isMissingRemoteError(e){const t=e&&"object"==typeof e&&"code"in e?e.code:void 0,n=s(e);return 23===t&&/no such file or directory/i.test(n)||12===t&&n.includes("Restricted directory does not exist!")}isWorkspaceBusyError(e){return 409===(e&&"object"==typeof e&&"statusCode"in e?e.statusCode:void 0)&&s(e).includes("WORKSPACE_BUSY")}isTimeoutError(e){return e instanceof Error&&"TimeoutError"===e.name}sshHost(){return this.getEnv(Ct)}sshPort(){return process.env.SQUID_WORKSPACE_SERVER_PORT||"22"}sshUser(){return process.env.SQUID_WORKSPACE_SSH_USER||"workspace"}sshKeyPath(){return process.env.SQUID_WORKSPACE_SSH_KEY_PATH||wt}getEnv(e){const t=process.env[e];return o(t,()=>`Missing required env var "${e}" for WorkspaceClient`),t}}function St(e){if(e?.aborted)throw e.reason instanceof Error?e.reason:new Error("WORKSPACE_OPERATION_ABORTED")}function Rt(e,t,n){return{body:t.body||"",statusCode:t.statusCode||n,headers:t.headers||{},[e]:!0}}class Dt{constructor(){this.region=process.env.SQUID_REGION||"local",this.config=dt(),this[st]={version:2},this.backendBaseUrl=function(e,t){let n="https",r=`${t}.${e}.${new URL("https://squid.cloud").host}`,o="";/^local/.test(e)&&(n="http",o="8000",/android$/.test(e)?r="10.0.2.2":function(e){return/ios$/.test(e)}(e)&&(r="localhost"));const i=n+"://"+r+(o?`:${o}`:""),a="".replace(/^\/+/,"");return a?`${i}/${a}`:i}(this.region,this.config.appId)}get secrets(){return this.config.secrets}get apiKeys(){return this.config.apiKeys}get context(){return this.getRequestConfig().context}get squid(){return Mt()}get assetsDirectory(){const e=Object.getPrototypeOf(this).constructor.name,t=this.config.codeDir||this.config.codeDirByServiceClassName.get(e);return o(t,()=>`No codeDir found for service: ${e}`),Oe.resolve(t,"public")}get workspace(){return new Nt}getApiKey(){return this.config.backendApiKey}getUserAuth(){const{auth:e}=this.getRequestConfig();return"Bearer"===e?.type?e:void 0}getApiKeyAuth(){const{auth:e}=this.getRequestConfig();return"ApiKey"===e?.type?e:void 0}hasLiveState(){return!1}async releaseLiveState(){}isAuthenticated(){const{auth:e}=this.getRequestConfig();return!!e}assertIsAuthenticated(){this.assertInRequestScope(),o(this.isAuthenticated(),"UNAUTHORIZED")}assertInRequestScope(){o(this.config.requestLocalStorage.getStore(),"This method can only be called with a valid request scope.")}assertApiKeyCall(){o(this.getApiKeyAuth(),"This method can only be called with API key")}createWebhookResponse(e,t,n){return Rt("__isWebhookResponse__",{body:e,statusCode:t,headers:n},e?200:204)}throwWebhookResponse(e){throw Rt("__isWebhookResponse__",e,500)}createOpenApiResponse(e,t,n){return Rt("__isOpenApiResponse__",{body:e,statusCode:t,headers:n},e?200:204)}throwOpenApiResponse(e){throw Rt("__isOpenApiResponse__",e,500)}async convertToSquidFile(e){return{__isSquidFile__:!0,data:new Uint8Array(await e.arrayBuffer()),fieldName:e.name,mimetype:e.type,originalName:e.name,size:e.size,encoding:e.type}}async publishAiStatusUpdate(e,t){const n={type:"aiStatus",agentId:e.agentId,messageId:e.messageId,chatId:e.chatId,jobId:e.jobId,payload:{statusUpdateId:e.messageId,title:e.title,body:e.body,parentStatusUpdateId:e.parentStatusUpdateId,tags:e.tags}};await this.squid.getNotificationClient().publishSystemNotification(n,[t])}getRequestConfig(){return this.assertInRequestScope(),i(this.config.requestLocalStorage.getStore(),"Failed to access request data outside of the request's scope")}}function Lt(e,t){return pt(e,{},t)}function $t(e,t){const n=Object.getPrototypeOf(t).constructor.name,r=dt().codeDirByServiceClassName.get(n);return o(r,()=>`Caller class codeDir is not set: ${n}`),Lt(e,r)}function Gt(e,t=Ce){return Lt(e,i(dt().moduleById.get(t),"Module not found: "+t).codeDir)}function Pt(){const e=dt(),t=process.env.SQUID_REGION||"local",n=process.env.SQUID_CONSOLE_REGION,r=process.env.SQUID_CORE_URL,o=Ee(e.appId);return{appId:o.appId,apiKey:e.backendApiKey,squidDeveloperId:o.squidDeveloperId,environmentId:o.environmentId,region:t,consoleRegion:n,...r?{baseUrl:r}:{}}}function Mt(){return e.Squid.getInstance(Pt())}function jt(){return e.Squid.getInstance({...Pt(),isPassiveMode:!0})}class Qt extends Dt{}class Wt{constructor(){q.setIntegrationLifecycleHooks({onIntegrationCreated:this.onIntegrationCreated!==Wt.prototype.onIntegrationCreated,onIntegrationDeleted:this.onIntegrationDeleted!==Wt.prototype.onIntegrationDeleted,onIntegrationChanged:this.onIntegrationChanged!==Wt.prototype.onIntegrationChanged})}get squid(){return Mt()}metadata(){return q.data}async onIntegrationCreated(e){}async onIntegrationChanged(e){}async onIntegrationDeleted(e){}async cleanup(){for(const t of e.Squid.getInstances())await t.destruct()}}class Yt{constructor(e){this.agentId=e.agentId,this.prompt=e.prompt,this.options=e.options,this.session=e.session,this.storedSession=e.storedSession}}class Ut{constructor(e){this.integrationId=e.integrationId,this.endpointId=e.endpointId,this.url=e.url,this.method=e.method,this.body=e.body,this.options=e.options}}var Bt;!function(e){e.EVERY_SECOND="* * * * * *",e.EVERY_5_SECONDS="*/5 * * * * *",e.EVERY_10_SECONDS="*/10 * * * * *",e.EVERY_30_SECONDS="*/30 * * * * *",e.EVERY_MINUTE="*/1 * * * *",e.EVERY_5_MINUTES="0 */5 * * * *",e.EVERY_10_MINUTES="0 */10 * * * *",e.EVERY_30_MINUTES="0 */30 * * * *",e.EVERY_HOUR="0 0-23/1 * * *",e.EVERY_2_HOURS="0 0-23/2 * * *",e.EVERY_3_HOURS="0 0-23/3 * * *",e.EVERY_4_HOURS="0 0-23/4 * * *",e.EVERY_5_HOURS="0 0-23/5 * * *",e.EVERY_6_HOURS="0 0-23/6 * * *",e.EVERY_7_HOURS="0 0-23/7 * * *",e.EVERY_8_HOURS="0 0-23/8 * * *",e.EVERY_9_HOURS="0 0-23/9 * * *",e.EVERY_10_HOURS="0 0-23/10 * * *",e.EVERY_11_HOURS="0 0-23/11 * * *",e.EVERY_12_HOURS="0 0-23/12 * * *",e.EVERY_DAY_AT_1AM="0 01 * * *",e.EVERY_DAY_AT_2AM="0 02 * * *",e.EVERY_DAY_AT_3AM="0 03 * * *",e.EVERY_DAY_AT_4AM="0 04 * * *",e.EVERY_DAY_AT_5AM="0 05 * * *",e.EVERY_DAY_AT_6AM="0 06 * * *",e.EVERY_DAY_AT_7AM="0 07 * * *",e.EVERY_DAY_AT_8AM="0 08 * * *",e.EVERY_DAY_AT_9AM="0 09 * * *",e.EVERY_DAY_AT_10AM="0 10 * * *",e.EVERY_DAY_AT_11AM="0 11 * * *",e.EVERY_DAY_AT_NOON="0 12 * * *",e.EVERY_DAY_AT_1PM="0 13 * * *",e.EVERY_DAY_AT_2PM="0 14 * * *",e.EVERY_DAY_AT_3PM="0 15 * * *",e.EVERY_DAY_AT_4PM="0 16 * * *",e.EVERY_DAY_AT_5PM="0 17 * * *",e.EVERY_DAY_AT_6PM="0 18 * * *",e.EVERY_DAY_AT_7PM="0 19 * * *",e.EVERY_DAY_AT_8PM="0 20 * * *",e.EVERY_DAY_AT_9PM="0 21 * * *",e.EVERY_DAY_AT_10PM="0 22 * * *",e.EVERY_DAY_AT_11PM="0 23 * * *",e.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",e.EVERY_WEEK="0 0 * * 7",e.EVERY_WEEKDAY="0 0 * * 1-5",e.EVERY_WEEKEND="0 0 * * 6,7",e.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",e.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",e.EVERY_2ND_HOUR="0 */2 * * *",e.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",e.EVERY_2ND_MONTH="0 0 1 */2 *",e.EVERY_QUARTER="0 0 1 */3 *",e.EVERY_6_MONTHS="0 0 1 */6 *",e.EVERY_YEAR="0 0 1 1 *",e.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",e.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",e.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",e.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",e.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",e.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",e.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",e.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",e.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",e.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",e.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",e.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",e.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",e.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",e.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",e.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",e.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",e.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",e.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",e.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",e.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",e.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",e.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",e.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",e.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",e.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",e.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",e.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"}(Bt||(Bt={}));class qt{constructor(e){this.mutex=e}}class Ft{constructor(e){this.isGraphiQL=e.isGraphiQL,this.query=e.query,this.operationName=e.operationName,this.variables=e.variables}}class Vt{constructor(e){this.operation=e.operation,this.graphId=e.graphId,this.threadId=e.threadId,this.input=e.input,this.resumePayload=e.resumePayload,this.graphContext=e.graphContext,this.session=e.session,this.storedSession=e.storedSession}}const zt=["insert","update","delete"];class Ht{constructor(e,t,n){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=n}get before(){return this.beforeAndAfterDocs.before}get after(){return this.beforeAndAfterDocs.after}getMutationType(){return this.mutation.type}affectsPath(e){return!Le(Re(this.before,e),Re(this.after,e))}affectedPaths(e=""){o("update"===this.mutation.type,"affectedPaths can only be used with update mutations");const t=[];return this.checkPath(e,t),t}checkPath(e,t){const n=Re(this.before,e),r=Re(this.after,e);if(!Le(n,r)&&(""!==e&&t.push(e),"object"==typeof n&&null!==n&&"object"==typeof r&&null!==r)){const o=Object.keys(n),i=Object.keys(r);new Set([...o,...i]).forEach(n=>{const r=e?`${e}.${n}`:n;this.checkPath(r,t)})}}}function Kt(e){return{__isWebhookResponse__:!0,body:"",statusCode:204,headers:{},...e}}})();const o=exports;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|